scordi-extension 1.14.9 → 1.14.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk/index.js CHANGED
@@ -1,6 +1,6 @@
1
- var xn = Object.defineProperty;
2
- var _n = (r, e, t) => e in r ? xn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var fe = (r, e, t) => _n(r, typeof e != "symbol" ? e + "" : e, t);
1
+ var _n = Object.defineProperty;
2
+ var En = (r, e, t) => e in r ? _n(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var fe = (r, e, t) => En(r, typeof e != "symbol" ? e + "" : e, t);
4
4
  class Nt extends Error {
5
5
  constructor(e, t, a) {
6
6
  super(e), this.code = t, this.details = a, this.name = "EightGError";
@@ -17,14 +17,18 @@ class Nt extends Error {
17
17
  static collectionFailed(e) {
18
18
  return new Nt(`Data collection failed: ${e}`, "COLLECTION_FAILED");
19
19
  }
20
- static requestTimeout() {
21
- return new Nt("Request timeout - Extension did not respond within 30 seconds", "REQUEST_TIMEOUT");
20
+ static requestTimeout(e = 6e5) {
21
+ const t = Math.floor(e / 1e3);
22
+ return new Nt(
23
+ `Request timeout - Extension did not respond within ${t} seconds`,
24
+ "REQUEST_TIMEOUT"
25
+ );
22
26
  }
23
27
  }
24
- function En(r) {
28
+ function Tn(r) {
25
29
  return r && r.type === "8G_EXTENSION_RESPONSE";
26
30
  }
27
- class Fs {
31
+ class Ls {
28
32
  constructor() {
29
33
  }
30
34
  /**
@@ -35,7 +39,7 @@ class Fs {
35
39
  const a = setTimeout(() => {
36
40
  t(Nt.extensionNotInstalled());
37
41
  }, 5e3), s = (i) => {
38
- En(i.data) && (clearTimeout(a), window.removeEventListener("message", s), e(i.data));
42
+ Tn(i.data) && (clearTimeout(a), window.removeEventListener("message", s), e(i.data));
39
43
  };
40
44
  window.addEventListener("message", s), window.postMessage({ type: "8G_EXTENSION_CHECK" }, "*");
41
45
  });
@@ -45,23 +49,23 @@ class Fs {
45
49
  */
46
50
  async collectWorkflow(e) {
47
51
  return new Promise((t, a) => {
48
- const s = `8g_wf_${Date.now()}_${Math.random()}`, i = setTimeout(() => {
49
- a(Nt.requestTimeout());
50
- }, 6e4), c = (f) => {
51
- var k, _, R, S;
52
- if (((k = f.data) == null ? void 0 : k.type) === "8G_COLLECT_RESPONSE" && f.data.requestId === s) {
53
- clearTimeout(i), window.removeEventListener("message", c);
54
- const w = f.data, A = ((_ = w == null ? void 0 : w.result) == null ? void 0 : _.steps) ?? ((S = (R = w == null ? void 0 : w.result) == null ? void 0 : R.result) == null ? void 0 : S.steps) ?? [];
52
+ const s = `8g_wf_${Date.now()}_${Math.random()}`, i = e.timeoutMs ?? 6e5, c = setTimeout(() => {
53
+ a(Nt.requestTimeout(i));
54
+ }, i), f = (w) => {
55
+ var _, R, S, k;
56
+ if (((_ = w.data) == null ? void 0 : _.type) === "8G_COLLECT_RESPONSE" && w.data.requestId === s) {
57
+ clearTimeout(c), window.removeEventListener("message", f);
58
+ const E = w.data, I = ((R = E == null ? void 0 : E.result) == null ? void 0 : R.steps) ?? ((k = (S = E == null ? void 0 : E.result) == null ? void 0 : S.result) == null ? void 0 : k.steps) ?? [];
55
59
  t({
56
- success: w.success,
57
- steps: A,
58
- error: w.success ? void 0 : "Workflow failed",
60
+ success: E.success,
61
+ steps: I,
62
+ error: E.success ? void 0 : "Workflow failed",
59
63
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
60
64
  targetUrl: e.targetUrl
61
65
  });
62
66
  }
63
67
  };
64
- window.addEventListener("message", c), window.postMessage({
68
+ window.addEventListener("message", f), window.postMessage({
65
69
  type: "8G_COLLECT_WORKFLOW",
66
70
  requestId: s,
67
71
  targetUrl: e.targetUrl,
@@ -176,7 +180,7 @@ const z = be.arrayToEnum([
176
180
  "invalid_intersection_types",
177
181
  "not_multiple_of",
178
182
  "not_finite"
179
- ]), Tn = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
183
+ ]), An = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
180
184
  class nt extends Error {
181
185
  get errors() {
182
186
  return this.issues;
@@ -204,10 +208,10 @@ class nt extends Error {
204
208
  else if (c.path.length === 0)
205
209
  a._errors.push(t(c));
206
210
  else {
207
- let f = a, k = 0;
208
- for (; k < c.path.length; ) {
209
- const _ = c.path[k];
210
- k === c.path.length - 1 ? (f[_] = f[_] || { _errors: [] }, f[_]._errors.push(t(c))) : f[_] = f[_] || { _errors: [] }, f = f[_], k++;
211
+ let f = a, w = 0;
212
+ for (; w < c.path.length; ) {
213
+ const _ = c.path[w];
214
+ w === c.path.length - 1 ? (f[_] = f[_] || { _errors: [] }, f[_]._errors.push(t(c))) : f[_] = f[_] || { _errors: [] }, f = f[_], w++;
211
215
  }
212
216
  }
213
217
  };
@@ -298,7 +302,7 @@ const Vt = (r, e) => {
298
302
  return { message: t };
299
303
  };
300
304
  let Hr = Vt;
301
- function An(r) {
305
+ function Sn(r) {
302
306
  Hr = r;
303
307
  }
304
308
  function vr() {
@@ -316,15 +320,15 @@ const br = (r) => {
316
320
  message: s.message
317
321
  };
318
322
  let f = "";
319
- const k = a.filter((_) => !!_).slice().reverse();
320
- for (const _ of k)
323
+ const w = a.filter((_) => !!_).slice().reverse();
324
+ for (const _ of w)
321
325
  f = _(c, { data: e, defaultError: f }).message;
322
326
  return {
323
327
  ...s,
324
328
  path: i,
325
329
  message: f
326
330
  };
327
- }, Sn = [];
331
+ }, Cn = [];
328
332
  function U(r, e) {
329
333
  const t = vr(), a = br({
330
334
  issueData: e,
@@ -421,8 +425,8 @@ function ie(r) {
421
425
  if (e && (t || a))
422
426
  throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
423
427
  return e ? { errorMap: e, description: s } : { errorMap: (c, f) => {
424
- const { message: k } = r;
425
- return c.code === "invalid_enum_value" ? { message: k ?? f.defaultError } : typeof f.data > "u" ? { message: k ?? a ?? f.defaultError } : c.code !== "invalid_type" ? { message: f.defaultError } : { message: k ?? t ?? f.defaultError };
428
+ const { message: w } = r;
429
+ return c.code === "invalid_enum_value" ? { message: w ?? f.defaultError } : typeof f.data > "u" ? { message: w ?? a ?? f.defaultError } : c.code !== "invalid_type" ? { message: f.defaultError } : { message: w ?? t ?? f.defaultError };
426
430
  }, description: s };
427
431
  }
428
432
  class ce {
@@ -547,7 +551,7 @@ class ce {
547
551
  code: D.custom,
548
552
  ...a(s)
549
553
  });
550
- return typeof Promise < "u" && c instanceof Promise ? c.then((k) => k ? !0 : (f(), !1)) : c ? !0 : (f(), !1);
554
+ return typeof Promise < "u" && c instanceof Promise ? c.then((w) => w ? !0 : (f(), !1)) : c ? !0 : (f(), !1);
551
555
  });
552
556
  }
553
557
  refinement(e, t) {
@@ -644,16 +648,16 @@ class ce {
644
648
  return this.safeParse(null).success;
645
649
  }
646
650
  }
647
- const Cn = /^c[^\s-]{8,}$/i, On = /^[0-9a-z]+$/, Dn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Pn = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Nn = /^[a-z0-9_-]{21}$/i, Mn = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Rn = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, In = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, jn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
651
+ const On = /^c[^\s-]{8,}$/i, Dn = /^[0-9a-z]+$/, Pn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Nn = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Mn = /^[a-z0-9_-]{21}$/i, Rn = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, In = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, jn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Fn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
648
652
  let Cr;
649
- const Fn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, $n = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Un = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Ln = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Bn = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Zn = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Yr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", zn = new RegExp(`^${Yr}$`);
653
+ const $n = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Un = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Ln = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Bn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Zn = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, zn = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Yr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Vn = new RegExp(`^${Yr}$`);
650
654
  function Gr(r) {
651
655
  let e = "[0-5]\\d";
652
656
  r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`);
653
657
  const t = r.precision ? "+" : "?";
654
658
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
655
659
  }
656
- function Vn(r) {
660
+ function qn(r) {
657
661
  return new RegExp(`^${Gr(r)}$`);
658
662
  }
659
663
  function Jr(r) {
@@ -661,11 +665,11 @@ function Jr(r) {
661
665
  const t = [];
662
666
  return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
663
667
  }
664
- function qn(r, e) {
665
- return !!((e === "v4" || !e) && Fn.test(r) || (e === "v6" || !e) && Un.test(r));
666
- }
667
668
  function Wn(r, e) {
668
- if (!Mn.test(r))
669
+ return !!((e === "v4" || !e) && $n.test(r) || (e === "v6" || !e) && Ln.test(r));
670
+ }
671
+ function Hn(r, e) {
672
+ if (!Rn.test(r))
669
673
  return !1;
670
674
  try {
671
675
  const [t] = r.split(".");
@@ -677,8 +681,8 @@ function Wn(r, e) {
677
681
  return !1;
678
682
  }
679
683
  }
680
- function Hn(r, e) {
681
- return !!((e === "v4" || !e) && $n.test(r) || (e === "v6" || !e) && Ln.test(r));
684
+ function Yn(r, e) {
685
+ return !!((e === "v4" || !e) && Un.test(r) || (e === "v6" || !e) && Bn.test(r));
682
686
  }
683
687
  class ut extends ce {
684
688
  _parse(e) {
@@ -729,43 +733,43 @@ class ut extends ce {
729
733
  message: i.message
730
734
  }), a.dirty());
731
735
  } else if (i.kind === "email")
732
- In.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
736
+ jn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
733
737
  validation: "email",
734
738
  code: D.invalid_string,
735
739
  message: i.message
736
740
  }), a.dirty());
737
741
  else if (i.kind === "emoji")
738
- Cr || (Cr = new RegExp(jn, "u")), Cr.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
742
+ Cr || (Cr = new RegExp(Fn, "u")), Cr.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
739
743
  validation: "emoji",
740
744
  code: D.invalid_string,
741
745
  message: i.message
742
746
  }), a.dirty());
743
747
  else if (i.kind === "uuid")
744
- Pn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
748
+ Nn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
745
749
  validation: "uuid",
746
750
  code: D.invalid_string,
747
751
  message: i.message
748
752
  }), a.dirty());
749
753
  else if (i.kind === "nanoid")
750
- Nn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
754
+ Mn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
751
755
  validation: "nanoid",
752
756
  code: D.invalid_string,
753
757
  message: i.message
754
758
  }), a.dirty());
755
759
  else if (i.kind === "cuid")
756
- Cn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
760
+ On.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
757
761
  validation: "cuid",
758
762
  code: D.invalid_string,
759
763
  message: i.message
760
764
  }), a.dirty());
761
765
  else if (i.kind === "cuid2")
762
- On.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
766
+ Dn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
763
767
  validation: "cuid2",
764
768
  code: D.invalid_string,
765
769
  message: i.message
766
770
  }), a.dirty());
767
771
  else if (i.kind === "ulid")
768
- Dn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
772
+ Pn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
769
773
  validation: "ulid",
770
774
  code: D.invalid_string,
771
775
  message: i.message
@@ -800,35 +804,35 @@ class ut extends ce {
800
804
  code: D.invalid_string,
801
805
  validation: "datetime",
802
806
  message: i.message
803
- }), a.dirty()) : i.kind === "date" ? zn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
807
+ }), a.dirty()) : i.kind === "date" ? Vn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
804
808
  code: D.invalid_string,
805
809
  validation: "date",
806
810
  message: i.message
807
- }), a.dirty()) : i.kind === "time" ? Vn(i).test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
811
+ }), a.dirty()) : i.kind === "time" ? qn(i).test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
808
812
  code: D.invalid_string,
809
813
  validation: "time",
810
814
  message: i.message
811
- }), a.dirty()) : i.kind === "duration" ? Rn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
815
+ }), a.dirty()) : i.kind === "duration" ? In.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
812
816
  validation: "duration",
813
817
  code: D.invalid_string,
814
818
  message: i.message
815
- }), a.dirty()) : i.kind === "ip" ? qn(e.data, i.version) || (s = this._getOrReturnCtx(e, s), U(s, {
819
+ }), a.dirty()) : i.kind === "ip" ? Wn(e.data, i.version) || (s = this._getOrReturnCtx(e, s), U(s, {
816
820
  validation: "ip",
817
821
  code: D.invalid_string,
818
822
  message: i.message
819
- }), a.dirty()) : i.kind === "jwt" ? Wn(e.data, i.alg) || (s = this._getOrReturnCtx(e, s), U(s, {
823
+ }), a.dirty()) : i.kind === "jwt" ? Hn(e.data, i.alg) || (s = this._getOrReturnCtx(e, s), U(s, {
820
824
  validation: "jwt",
821
825
  code: D.invalid_string,
822
826
  message: i.message
823
- }), a.dirty()) : i.kind === "cidr" ? Hn(e.data, i.version) || (s = this._getOrReturnCtx(e, s), U(s, {
827
+ }), a.dirty()) : i.kind === "cidr" ? Yn(e.data, i.version) || (s = this._getOrReturnCtx(e, s), U(s, {
824
828
  validation: "cidr",
825
829
  code: D.invalid_string,
826
830
  message: i.message
827
- }), a.dirty()) : i.kind === "base64" ? Bn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
831
+ }), a.dirty()) : i.kind === "base64" ? Zn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
828
832
  validation: "base64",
829
833
  code: D.invalid_string,
830
834
  message: i.message
831
- }), a.dirty()) : i.kind === "base64url" ? Zn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
835
+ }), a.dirty()) : i.kind === "base64url" ? zn.test(e.data) || (s = this._getOrReturnCtx(e, s), U(s, {
832
836
  validation: "base64url",
833
837
  code: D.invalid_string,
834
838
  message: i.message
@@ -1063,7 +1067,7 @@ ut.create = (r) => new ut({
1063
1067
  coerce: (r == null ? void 0 : r.coerce) ?? !1,
1064
1068
  ...ie(r)
1065
1069
  });
1066
- function Yn(r, e) {
1070
+ function Gn(r, e) {
1067
1071
  const t = (r.toString().split(".")[1] || "").length, a = (e.toString().split(".")[1] || "").length, s = t > a ? t : a, i = Number.parseInt(r.toFixed(s).replace(".", "")), c = Number.parseInt(e.toFixed(s).replace(".", ""));
1068
1072
  return i % c / 10 ** s;
1069
1073
  }
@@ -1102,7 +1106,7 @@ class At extends ce {
1102
1106
  inclusive: i.inclusive,
1103
1107
  exact: !1,
1104
1108
  message: i.message
1105
- }), s.dirty()) : i.kind === "multipleOf" ? Yn(e.data, i.value) !== 0 && (a = this._getOrReturnCtx(e, a), U(a, {
1109
+ }), s.dirty()) : i.kind === "multipleOf" ? Gn(e.data, i.value) !== 0 && (a = this._getOrReturnCtx(e, a), U(a, {
1106
1110
  code: D.not_multiple_of,
1107
1111
  multipleOf: i.value,
1108
1112
  message: i.message
@@ -1686,10 +1690,10 @@ class Ie extends ce {
1686
1690
  if (!(this._def.catchall instanceof xt && this._def.unknownKeys === "strip"))
1687
1691
  for (const _ in s.data)
1688
1692
  c.includes(_) || f.push(_);
1689
- const k = [];
1693
+ const w = [];
1690
1694
  for (const _ of c) {
1691
1695
  const R = i[_], S = s.data[_];
1692
- k.push({
1696
+ w.push({
1693
1697
  key: { status: "valid", value: _ },
1694
1698
  value: R._parse(new mt(s, S, s.path, _)),
1695
1699
  alwaysSet: _ in s.data
@@ -1699,7 +1703,7 @@ class Ie extends ce {
1699
1703
  const _ = this._def.unknownKeys;
1700
1704
  if (_ === "passthrough")
1701
1705
  for (const R of f)
1702
- k.push({
1706
+ w.push({
1703
1707
  key: { status: "valid", value: R },
1704
1708
  value: { status: "valid", value: s.data[R] }
1705
1709
  });
@@ -1713,7 +1717,7 @@ class Ie extends ce {
1713
1717
  const _ = this._def.catchall;
1714
1718
  for (const R of f) {
1715
1719
  const S = s.data[R];
1716
- k.push({
1720
+ w.push({
1717
1721
  key: { status: "valid", value: R },
1718
1722
  value: _._parse(
1719
1723
  new mt(s, S, s.path, R)
@@ -1725,16 +1729,16 @@ class Ie extends ce {
1725
1729
  }
1726
1730
  return s.common.async ? Promise.resolve().then(async () => {
1727
1731
  const _ = [];
1728
- for (const R of k) {
1729
- const S = await R.key, w = await R.value;
1732
+ for (const R of w) {
1733
+ const S = await R.key, k = await R.value;
1730
1734
  _.push({
1731
1735
  key: S,
1732
- value: w,
1736
+ value: k,
1733
1737
  alwaysSet: R.alwaysSet
1734
1738
  });
1735
1739
  }
1736
1740
  return _;
1737
- }).then((_) => Ge.mergeObjectSync(a, _)) : Ge.mergeObjectSync(a, k);
1741
+ }).then((_) => Ge.mergeObjectSync(a, _)) : Ge.mergeObjectSync(a, w);
1738
1742
  }
1739
1743
  get shape() {
1740
1744
  return this._def.shape();
@@ -1989,7 +1993,7 @@ class tr extends ce {
1989
1993
  {
1990
1994
  let i;
1991
1995
  const c = [];
1992
- for (const k of a) {
1996
+ for (const w of a) {
1993
1997
  const _ = {
1994
1998
  ...t,
1995
1999
  common: {
@@ -1997,7 +2001,7 @@ class tr extends ce {
1997
2001
  issues: []
1998
2002
  },
1999
2003
  parent: null
2000
- }, R = k._parseSync({
2004
+ }, R = w._parseSync({
2001
2005
  data: t.data,
2002
2006
  path: t.path,
2003
2007
  parent: _
@@ -2008,7 +2012,7 @@ class tr extends ce {
2008
2012
  }
2009
2013
  if (i)
2010
2014
  return t.common.issues.push(...i.ctx.common.issues), i.result;
2011
- const f = c.map((k) => new nt(k));
2015
+ const f = c.map((w) => new nt(w));
2012
2016
  return U(t, {
2013
2017
  code: D.invalid_union,
2014
2018
  unionErrors: f
@@ -2094,10 +2098,10 @@ function Rr(r, e) {
2094
2098
  if (t === z.object && a === z.object) {
2095
2099
  const s = be.objectKeys(e), i = be.objectKeys(r).filter((f) => s.indexOf(f) !== -1), c = { ...r, ...e };
2096
2100
  for (const f of i) {
2097
- const k = Rr(r[f], e[f]);
2098
- if (!k.valid)
2101
+ const w = Rr(r[f], e[f]);
2102
+ if (!w.valid)
2099
2103
  return { valid: !1 };
2100
- c[f] = k.data;
2104
+ c[f] = w.data;
2101
2105
  }
2102
2106
  return { valid: !0, data: c };
2103
2107
  } else if (t === z.array && a === z.array) {
@@ -2105,10 +2109,10 @@ function Rr(r, e) {
2105
2109
  return { valid: !1 };
2106
2110
  const s = [];
2107
2111
  for (let i = 0; i < r.length; i++) {
2108
- const c = r[i], f = e[i], k = Rr(c, f);
2109
- if (!k.valid)
2112
+ const c = r[i], f = e[i], w = Rr(c, f);
2113
+ if (!w.valid)
2110
2114
  return { valid: !1 };
2111
- s.push(k.data);
2115
+ s.push(w.data);
2112
2116
  }
2113
2117
  return { valid: !0, data: s };
2114
2118
  } else return t === z.date && a === z.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
@@ -2176,8 +2180,8 @@ class yt extends ce {
2176
2180
  type: "array"
2177
2181
  }), t.dirty());
2178
2182
  const i = [...a.data].map((c, f) => {
2179
- const k = this._def.items[f] || this._def.rest;
2180
- return k ? k._parse(new mt(a, c, a.path, f)) : null;
2183
+ const w = this._def.items[f] || this._def.rest;
2184
+ return w ? w._parse(new mt(a, c, a.path, f)) : null;
2181
2185
  }).filter((c) => !!c);
2182
2186
  return a.common.async ? Promise.all(i).then((c) => Ge.mergeArray(t, c)) : Ge.mergeArray(t, i);
2183
2187
  }
@@ -2257,15 +2261,15 @@ class xr extends ce {
2257
2261
  expected: z.map,
2258
2262
  received: a.parsedType
2259
2263
  }), ee;
2260
- const s = this._def.keyType, i = this._def.valueType, c = [...a.data.entries()].map(([f, k], _) => ({
2264
+ const s = this._def.keyType, i = this._def.valueType, c = [...a.data.entries()].map(([f, w], _) => ({
2261
2265
  key: s._parse(new mt(a, f, a.path, [_, "key"])),
2262
- value: i._parse(new mt(a, k, a.path, [_, "value"]))
2266
+ value: i._parse(new mt(a, w, a.path, [_, "value"]))
2263
2267
  }));
2264
2268
  if (a.common.async) {
2265
2269
  const f = /* @__PURE__ */ new Map();
2266
2270
  return Promise.resolve().then(async () => {
2267
- for (const k of c) {
2268
- const _ = await k.key, R = await k.value;
2271
+ for (const w of c) {
2272
+ const _ = await w.key, R = await w.value;
2269
2273
  if (_.status === "aborted" || R.status === "aborted")
2270
2274
  return ee;
2271
2275
  (_.status === "dirty" || R.status === "dirty") && t.dirty(), f.set(_.value, R.value);
@@ -2274,8 +2278,8 @@ class xr extends ce {
2274
2278
  });
2275
2279
  } else {
2276
2280
  const f = /* @__PURE__ */ new Map();
2277
- for (const k of c) {
2278
- const _ = k.key, R = k.value;
2281
+ for (const w of c) {
2282
+ const _ = w.key, R = w.value;
2279
2283
  if (_.status === "aborted" || R.status === "aborted")
2280
2284
  return ee;
2281
2285
  (_.status === "dirty" || R.status === "dirty") && t.dirty(), f.set(_.value, R.value);
@@ -2316,17 +2320,17 @@ class jt extends ce {
2316
2320
  message: s.maxSize.message
2317
2321
  }), t.dirty());
2318
2322
  const i = this._def.valueType;
2319
- function c(k) {
2323
+ function c(w) {
2320
2324
  const _ = /* @__PURE__ */ new Set();
2321
- for (const R of k) {
2325
+ for (const R of w) {
2322
2326
  if (R.status === "aborted")
2323
2327
  return ee;
2324
2328
  R.status === "dirty" && t.dirty(), _.add(R.value);
2325
2329
  }
2326
2330
  return { status: t.value, value: _ };
2327
2331
  }
2328
- const f = [...a.data.values()].map((k, _) => i._parse(new mt(a, k, a.path, _)));
2329
- return a.common.async ? Promise.all(f).then((k) => c(k)) : c(f);
2332
+ const f = [...a.data.values()].map((w, _) => i._parse(new mt(a, w, a.path, _)));
2333
+ return a.common.async ? Promise.all(f).then((w) => c(w)) : c(f);
2330
2334
  }
2331
2335
  min(e, t) {
2332
2336
  return new jt({
@@ -2366,45 +2370,45 @@ class zt extends ce {
2366
2370
  expected: z.function,
2367
2371
  received: t.parsedType
2368
2372
  }), ee;
2369
- function a(f, k) {
2373
+ function a(f, w) {
2370
2374
  return br({
2371
2375
  data: f,
2372
2376
  path: t.path,
2373
2377
  errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, vr(), Vt].filter((_) => !!_),
2374
2378
  issueData: {
2375
2379
  code: D.invalid_arguments,
2376
- argumentsError: k
2380
+ argumentsError: w
2377
2381
  }
2378
2382
  });
2379
2383
  }
2380
- function s(f, k) {
2384
+ function s(f, w) {
2381
2385
  return br({
2382
2386
  data: f,
2383
2387
  path: t.path,
2384
2388
  errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, vr(), Vt].filter((_) => !!_),
2385
2389
  issueData: {
2386
2390
  code: D.invalid_return_type,
2387
- returnTypeError: k
2391
+ returnTypeError: w
2388
2392
  }
2389
2393
  });
2390
2394
  }
2391
2395
  const i = { errorMap: t.common.contextualErrorMap }, c = t.data;
2392
2396
  if (this._def.returns instanceof Wt) {
2393
2397
  const f = this;
2394
- return Je(async function(...k) {
2395
- const _ = new nt([]), R = await f._def.args.parseAsync(k, i).catch((A) => {
2396
- throw _.addIssue(a(k, A)), _;
2398
+ return Je(async function(...w) {
2399
+ const _ = new nt([]), R = await f._def.args.parseAsync(w, i).catch((E) => {
2400
+ throw _.addIssue(a(w, E)), _;
2397
2401
  }), S = await Reflect.apply(c, this, R);
2398
- return await f._def.returns._def.type.parseAsync(S, i).catch((A) => {
2399
- throw _.addIssue(s(S, A)), _;
2402
+ return await f._def.returns._def.type.parseAsync(S, i).catch((E) => {
2403
+ throw _.addIssue(s(S, E)), _;
2400
2404
  });
2401
2405
  });
2402
2406
  } else {
2403
2407
  const f = this;
2404
- return Je(function(...k) {
2405
- const _ = f._def.args.safeParse(k, i);
2408
+ return Je(function(...w) {
2409
+ const _ = f._def.args.safeParse(w, i);
2406
2410
  if (!_.success)
2407
- throw new nt([a(k, _.error)]);
2411
+ throw new nt([a(w, _.error)]);
2408
2412
  const R = Reflect.apply(c, this, _.data), S = f._def.returns.safeParse(R, i);
2409
2413
  if (!S.success)
2410
2414
  throw new nt([s(R, S.error)]);
@@ -2618,12 +2622,12 @@ class ft extends ce {
2618
2622
  return Promise.resolve(c).then(async (f) => {
2619
2623
  if (t.value === "aborted")
2620
2624
  return ee;
2621
- const k = await this._def.schema._parseAsync({
2625
+ const w = await this._def.schema._parseAsync({
2622
2626
  data: f,
2623
2627
  path: a.path,
2624
2628
  parent: a
2625
2629
  });
2626
- return k.status === "aborted" ? ee : k.status === "dirty" || t.value === "dirty" ? Zt(k.value) : k;
2630
+ return w.status === "aborted" ? ee : w.status === "dirty" || t.value === "dirty" ? Zt(w.value) : w;
2627
2631
  });
2628
2632
  {
2629
2633
  if (t.value === "aborted")
@@ -2638,10 +2642,10 @@ class ft extends ce {
2638
2642
  }
2639
2643
  if (s.type === "refinement") {
2640
2644
  const c = (f) => {
2641
- const k = s.refinement(f, i);
2645
+ const w = s.refinement(f, i);
2642
2646
  if (a.common.async)
2643
- return Promise.resolve(k);
2644
- if (k instanceof Promise)
2647
+ return Promise.resolve(w);
2648
+ if (w instanceof Promise)
2645
2649
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2646
2650
  return f;
2647
2651
  };
@@ -2794,7 +2798,7 @@ _r.create = (r) => new _r({
2794
2798
  typeName: re.ZodNaN,
2795
2799
  ...ie(r)
2796
2800
  });
2797
- const Gn = Symbol("zod_brand");
2801
+ const Jn = Symbol("zod_brand");
2798
2802
  class jr extends ce {
2799
2803
  _parse(e) {
2800
2804
  const { ctx: t } = this._processInputParams(e), a = t.data;
@@ -2872,8 +2876,8 @@ function Kr(r, e = {}, t) {
2872
2876
  if (i instanceof Promise)
2873
2877
  return i.then((c) => {
2874
2878
  if (!c) {
2875
- const f = Zr(e, a), k = f.fatal ?? t ?? !0;
2876
- s.addIssue({ code: "custom", ...f, fatal: k });
2879
+ const f = Zr(e, a), w = f.fatal ?? t ?? !0;
2880
+ s.addIssue({ code: "custom", ...f, fatal: w });
2877
2881
  }
2878
2882
  });
2879
2883
  if (!i) {
@@ -2882,16 +2886,16 @@ function Kr(r, e = {}, t) {
2882
2886
  }
2883
2887
  }) : qt.create();
2884
2888
  }
2885
- const Jn = {
2889
+ const Xn = {
2886
2890
  object: Ie.lazycreate
2887
2891
  };
2888
2892
  var re;
2889
2893
  (function(r) {
2890
2894
  r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
2891
2895
  })(re || (re = {}));
2892
- const Xn = (r, e = {
2896
+ const Kn = (r, e = {
2893
2897
  message: `Input not instance of ${r.name}`
2894
- }) => Kr((t) => t instanceof r, e), Er = ut.create, Fr = At.create, Kn = _r.create, Qn = St.create, Tr = Kt.create, ea = It.create, ta = wr.create, ra = Qt.create, na = er.create, aa = qt.create, sa = Mt.create, ia = xt.create, oa = kr.create, ca = lt.create, Ir = Ie.create, ua = Ie.strictCreate, la = tr.create, fa = Ar.create, da = rr.create, ha = yt.create, pa = nr.create, ma = xr.create, ya = jt.create, ga = zt.create, va = ar.create, ba = sr.create, Qr = Ct.create, wa = ir.create, ka = Wt.create, zr = ft.create, xa = pt.create, _a = Ot.create, Ea = ft.createWithPreprocess, Ta = lr.create, Aa = () => Er().optional(), Sa = () => Fr().optional(), Ca = () => Tr().optional(), Oa = {
2898
+ }) => Kr((t) => t instanceof r, e), Er = ut.create, Fr = At.create, Qn = _r.create, ea = St.create, Tr = Kt.create, ta = It.create, ra = wr.create, na = Qt.create, aa = er.create, sa = qt.create, ia = Mt.create, oa = xt.create, ca = kr.create, ua = lt.create, Ir = Ie.create, la = Ie.strictCreate, fa = tr.create, da = Ar.create, ha = rr.create, pa = yt.create, ma = nr.create, ya = xr.create, ga = jt.create, va = zt.create, ba = ar.create, wa = sr.create, Qr = Ct.create, ka = ir.create, xa = Wt.create, zr = ft.create, _a = pt.create, Ea = Ot.create, Ta = ft.createWithPreprocess, Aa = lr.create, Sa = () => Er().optional(), Ca = () => Fr().optional(), Oa = () => Tr().optional(), Da = {
2895
2899
  string: ((r) => ut.create({ ...r, coerce: !0 })),
2896
2900
  number: ((r) => At.create({ ...r, coerce: !0 })),
2897
2901
  boolean: ((r) => Kt.create({
@@ -2900,13 +2904,13 @@ const Xn = (r, e = {
2900
2904
  })),
2901
2905
  bigint: ((r) => St.create({ ...r, coerce: !0 })),
2902
2906
  date: ((r) => It.create({ ...r, coerce: !0 }))
2903
- }, Da = ee, O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2907
+ }, Pa = ee, O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2904
2908
  __proto__: null,
2905
- BRAND: Gn,
2909
+ BRAND: Jn,
2906
2910
  DIRTY: Zt,
2907
- EMPTY_PATH: Sn,
2911
+ EMPTY_PATH: Cn,
2908
2912
  INVALID: ee,
2909
- NEVER: Da,
2913
+ NEVER: Pa,
2910
2914
  OK: Je,
2911
2915
  ParseStatus: Ge,
2912
2916
  Schema: ce,
@@ -2956,65 +2960,65 @@ const Xn = (r, e = {
2956
2960
  ZodUnknown: Mt,
2957
2961
  ZodVoid: kr,
2958
2962
  addIssueToContext: U,
2959
- any: aa,
2960
- array: ca,
2961
- bigint: Qn,
2963
+ any: sa,
2964
+ array: ua,
2965
+ bigint: ea,
2962
2966
  boolean: Tr,
2963
- coerce: Oa,
2967
+ coerce: Da,
2964
2968
  custom: Kr,
2965
- date: ea,
2969
+ date: ta,
2966
2970
  datetimeRegex: Jr,
2967
2971
  defaultErrorMap: Vt,
2968
- discriminatedUnion: fa,
2972
+ discriminatedUnion: da,
2969
2973
  effect: zr,
2970
2974
  enum: Qr,
2971
- function: ga,
2975
+ function: va,
2972
2976
  getErrorMap: vr,
2973
2977
  getParsedType: kt,
2974
- instanceof: Xn,
2975
- intersection: da,
2978
+ instanceof: Kn,
2979
+ intersection: ha,
2976
2980
  isAborted: Nr,
2977
2981
  isAsync: Xt,
2978
2982
  isDirty: Mr,
2979
2983
  isValid: Rt,
2980
- late: Jn,
2981
- lazy: va,
2982
- literal: ba,
2984
+ late: Xn,
2985
+ lazy: ba,
2986
+ literal: wa,
2983
2987
  makeIssue: br,
2984
- map: ma,
2985
- nan: Kn,
2986
- nativeEnum: wa,
2987
- never: ia,
2988
- null: na,
2989
- nullable: _a,
2988
+ map: ya,
2989
+ nan: Qn,
2990
+ nativeEnum: ka,
2991
+ never: oa,
2992
+ null: aa,
2993
+ nullable: Ea,
2990
2994
  number: Fr,
2991
2995
  object: Ir,
2992
2996
  get objectUtil() {
2993
2997
  return Pr;
2994
2998
  },
2995
- oboolean: Ca,
2996
- onumber: Sa,
2997
- optional: xa,
2998
- ostring: Aa,
2999
- pipeline: Ta,
3000
- preprocess: Ea,
3001
- promise: ka,
3002
- quotelessJson: Tn,
3003
- record: pa,
3004
- set: ya,
3005
- setErrorMap: An,
3006
- strictObject: ua,
2999
+ oboolean: Oa,
3000
+ onumber: Ca,
3001
+ optional: _a,
3002
+ ostring: Sa,
3003
+ pipeline: Aa,
3004
+ preprocess: Ta,
3005
+ promise: xa,
3006
+ quotelessJson: An,
3007
+ record: ma,
3008
+ set: ga,
3009
+ setErrorMap: Sn,
3010
+ strictObject: la,
3007
3011
  string: Er,
3008
- symbol: ta,
3012
+ symbol: ra,
3009
3013
  transformer: zr,
3010
- tuple: ha,
3011
- undefined: ra,
3012
- union: la,
3013
- unknown: sa,
3014
+ tuple: pa,
3015
+ undefined: na,
3016
+ union: fa,
3017
+ unknown: ia,
3014
3018
  get util() {
3015
3019
  return be;
3016
3020
  },
3017
- void: oa
3021
+ void: ca
3018
3022
  }, Symbol.toStringTag, { value: "Module" })), gt = Ir({
3019
3023
  name: Er(),
3020
3024
  selector: Er(),
@@ -3024,28 +3028,28 @@ const Xn = (r, e = {
3024
3028
  waitSelectorTimeout: Fr().optional(),
3025
3029
  multiple: Tr().optional()
3026
3030
  })
3027
- }), Pa = O.object({
3031
+ }), Na = O.object({
3028
3032
  type: O.literal("object"),
3029
3033
  shape: O.record(O.string(), O.any())
3030
- }), Na = O.object({
3034
+ }), Ma = O.object({
3031
3035
  type: O.literal("array"),
3032
3036
  items: O.any()
3033
- }), Ma = O.discriminatedUnion("type", [
3034
- Pa,
3035
- Na
3037
+ }), Ra = O.discriminatedUnion("type", [
3038
+ Na,
3039
+ Ma
3036
3040
  ]), en = O.object({
3037
3041
  name: O.literal("ai-parse-data"),
3038
3042
  sourceData: O.any().optional(),
3039
- schemaDefinition: Ma,
3043
+ schemaDefinition: Ra,
3040
3044
  prompt: O.string().optional(),
3041
3045
  model: O.string().optional(),
3042
3046
  apiKey: O.string().min(1, "OpenAI API key is required")
3043
3047
  // 필수
3044
3048
  });
3045
- function Ra(r) {
3049
+ function Ia(r) {
3046
3050
  return en.parse(r);
3047
3051
  }
3048
- async function Ia(r) {
3052
+ async function ja(r) {
3049
3053
  try {
3050
3054
  const {
3051
3055
  sourceData: e,
@@ -3082,19 +3086,19 @@ async function Ia(r) {
3082
3086
  };
3083
3087
  }
3084
3088
  }
3085
- function $s(r) {
3089
+ function Bs(r) {
3086
3090
  return {
3087
3091
  type: "object",
3088
3092
  shape: r
3089
3093
  };
3090
3094
  }
3091
- function Us(r) {
3095
+ function Zs(r) {
3092
3096
  return {
3093
3097
  type: "array",
3094
3098
  items: r
3095
3099
  };
3096
3100
  }
3097
- const Ls = {
3101
+ const zs = {
3098
3102
  string: (r) => ({
3099
3103
  type: "string",
3100
3104
  ...r
@@ -3137,7 +3141,7 @@ class Sr {
3137
3141
  });
3138
3142
  }
3139
3143
  }
3140
- class ja extends Sr {
3144
+ class Fa extends Sr {
3141
3145
  async find(e, t = document) {
3142
3146
  const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
3143
3147
  try {
@@ -3162,16 +3166,16 @@ class ja extends Sr {
3162
3166
  const s = ((i = a.textContent) == null ? void 0 : i.trim()) || "";
3163
3167
  if (s) {
3164
3168
  a.setAttribute("data-contains", s);
3165
- const f = Array.from(a.childNodes).filter((k) => k.nodeType === Node.TEXT_NODE).map((k) => {
3169
+ const f = Array.from(a.childNodes).filter((w) => w.nodeType === Node.TEXT_NODE).map((w) => {
3166
3170
  var _;
3167
- return ((_ = k.textContent) == null ? void 0 : _.trim()) || "";
3171
+ return ((_ = w.textContent) == null ? void 0 : _.trim()) || "";
3168
3172
  }).join(" ").trim();
3169
3173
  (f && f === s || a.children.length === 0 && s) && a.setAttribute("data-equal", s);
3170
3174
  }
3171
3175
  });
3172
3176
  }
3173
3177
  }
3174
- class Fa extends Sr {
3178
+ class $a extends Sr {
3175
3179
  async find(e, t = document) {
3176
3180
  const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
3177
3181
  if (!a || a.trim() === "")
@@ -3179,29 +3183,29 @@ class Fa extends Sr {
3179
3183
  const c = a.split("|>").map((_) => _.trim());
3180
3184
  if (c.length !== 2)
3181
3185
  return null;
3182
- const f = c[0], k = c[1];
3183
- if (!f || !k)
3186
+ const f = c[0], w = c[1];
3187
+ if (!f || !w)
3184
3188
  return null;
3185
3189
  try {
3186
3190
  const _ = t.querySelector(f);
3187
3191
  if (!_ || !_.contentDocument) return null;
3188
3192
  const R = _.contentDocument;
3189
- return i ? Array.from(R.querySelectorAll(k)) : R.querySelector(k);
3193
+ return i ? Array.from(R.querySelectorAll(w)) : R.querySelector(w);
3190
3194
  } catch (_) {
3191
3195
  return console.error("Iframe Selector error:", _), null;
3192
3196
  }
3193
3197
  }
3194
3198
  }
3195
- class $a extends Sr {
3199
+ class Ua extends Sr {
3196
3200
  async find(e, t = document) {
3197
3201
  const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
3198
3202
  if (!a || a.trim() === "")
3199
3203
  return null;
3200
- const c = a.split(">>").map((k) => k.trim());
3204
+ const c = a.split(">>").map((w) => w.trim());
3201
3205
  let f = t;
3202
3206
  try {
3203
- for (let k = 0; k < c.length; k++) {
3204
- const _ = c[k], R = k === c.length - 1;
3207
+ for (let w = 0; w < c.length; w++) {
3208
+ const _ = c[w], R = w === c.length - 1;
3205
3209
  if (!_)
3206
3210
  return null;
3207
3211
  if (R && i)
@@ -3215,13 +3219,13 @@ class $a extends Sr {
3215
3219
  else
3216
3220
  return null;
3217
3221
  }
3218
- } catch (k) {
3219
- return console.error("Shadow DOM Selector error:", k), null;
3222
+ } catch (w) {
3223
+ return console.error("Shadow DOM Selector error:", w), null;
3220
3224
  }
3221
3225
  return null;
3222
3226
  }
3223
3227
  }
3224
- class Ua extends Sr {
3228
+ class La extends Sr {
3225
3229
  async find(e, t = document) {
3226
3230
  const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
3227
3231
  try {
@@ -3234,8 +3238,8 @@ class Ua extends Sr {
3234
3238
  );
3235
3239
  if (i) {
3236
3240
  const f = [];
3237
- for (let k = 0; k < c.snapshotLength; k++) {
3238
- const _ = c.snapshotItem(k);
3241
+ for (let w = 0; w < c.snapshotLength; w++) {
3242
+ const _ = c.snapshotItem(w);
3239
3243
  _ && _.nodeType === Node.ELEMENT_NODE && f.push(_);
3240
3244
  }
3241
3245
  return Promise.resolve(f.length > 0 ? f : null);
@@ -3248,7 +3252,7 @@ class Ua extends Sr {
3248
3252
  }
3249
3253
  }
3250
3254
  }
3251
- class La {
3255
+ class Ba {
3252
3256
  /**
3253
3257
  * 요소의 안정적인 CSS 셀렉터 생성
3254
3258
  * @param element 대상 요소
@@ -3311,11 +3315,11 @@ class La {
3311
3315
  }
3312
3316
  }
3313
3317
  async function dt(r, e = document) {
3314
- const { selector: t, findBy: a = "cssSelector", option: s } = r, { waitForSelector: i = !1, waitSelectorTimeout: c = 5e3 } = s || {}, f = Ba(t, a);
3318
+ const { selector: t, findBy: a = "cssSelector", option: s } = r, { waitForSelector: i = !1, waitSelectorTimeout: c = 5e3 } = s || {}, f = Za(t, a);
3315
3319
  return i ? f.waitForElement(r, e, c) : f.find(r, e);
3316
3320
  }
3317
- function Ba(r, e) {
3318
- return e === "xpath" ? new Ua() : r.includes(">>") ? new $a() : r.includes("|>") ? new Fa() : new ja();
3321
+ function Za(r, e) {
3322
+ return e === "xpath" ? new La() : r.includes(">>") ? new Ua() : r.includes("|>") ? new $a() : new Fa();
3319
3323
  }
3320
3324
  const tn = gt.extend({
3321
3325
  name: O.literal("get-text"),
@@ -3330,10 +3334,10 @@ const tn = gt.extend({
3330
3334
  scrollWaitMs: O.number().optional(),
3331
3335
  maxScrollAttempts: O.number().optional()
3332
3336
  });
3333
- function Za(r) {
3337
+ function za(r) {
3334
3338
  return tn.parse(r);
3335
3339
  }
3336
- async function za(r) {
3340
+ async function Va(r) {
3337
3341
  try {
3338
3342
  const {
3339
3343
  selector: e = "",
@@ -3343,20 +3347,20 @@ async function za(r) {
3343
3347
  prefixText: i = "",
3344
3348
  suffixText: c = "",
3345
3349
  findBy: f = "cssSelector",
3346
- option: k,
3350
+ option: w,
3347
3351
  filterEmpty: _ = !0,
3348
3352
  scrollToCollect: R = !1,
3349
3353
  scrollDistance: S = 500,
3350
- scrollWaitMs: w = 300,
3351
- maxScrollAttempts: A = 100
3354
+ scrollWaitMs: k = 300,
3355
+ maxScrollAttempts: E = 100
3352
3356
  } = r;
3353
3357
  if (!e)
3354
3358
  throw new Error("Selector is required for get-text block");
3355
- if (R && (k != null && k.multiple))
3356
- return await Va({
3359
+ if (R && (w != null && w.multiple))
3360
+ return await qa({
3357
3361
  selector: e,
3358
3362
  findBy: f,
3359
- option: k,
3363
+ option: w,
3360
3364
  includeTags: t,
3361
3365
  useTextContent: a,
3362
3366
  regex: s,
@@ -3364,10 +3368,10 @@ async function za(r) {
3364
3368
  suffixText: c,
3365
3369
  filterEmpty: _,
3366
3370
  scrollDistance: S,
3367
- scrollWaitMs: w,
3368
- maxScrollAttempts: A
3371
+ scrollWaitMs: k,
3372
+ maxScrollAttempts: E
3369
3373
  });
3370
- const I = await dt({ selector: e, findBy: f, option: k });
3374
+ const I = await dt({ selector: e, findBy: f, option: w });
3371
3375
  if (!I)
3372
3376
  return { data: "" };
3373
3377
  const se = rn(
@@ -3390,7 +3394,7 @@ async function za(r) {
3390
3394
  };
3391
3395
  }
3392
3396
  }
3393
- async function Va(r) {
3397
+ async function qa(r) {
3394
3398
  const {
3395
3399
  selector: e,
3396
3400
  findBy: t,
@@ -3399,20 +3403,20 @@ async function Va(r) {
3399
3403
  useTextContent: i,
3400
3404
  regex: c,
3401
3405
  prefixText: f,
3402
- suffixText: k,
3406
+ suffixText: w,
3403
3407
  filterEmpty: _,
3404
3408
  scrollDistance: R,
3405
3409
  scrollWaitMs: S,
3406
- maxScrollAttempts: w
3407
- } = r, A = rn(s, i, c, f, k), I = /* @__PURE__ */ new Set();
3410
+ maxScrollAttempts: k
3411
+ } = r, E = rn(s, i, c, f, w), I = /* @__PURE__ */ new Set();
3408
3412
  let se = 0, me = 0;
3409
3413
  const ge = 5;
3410
- for (; se < w; ) {
3414
+ for (; se < k; ) {
3411
3415
  const H = await dt({ selector: e, findBy: t, option: a });
3412
3416
  if (H && Array.isArray(H)) {
3413
3417
  const B = I.size;
3414
3418
  if (H.forEach((L) => {
3415
- const V = A(L);
3419
+ const V = E(L);
3416
3420
  (!_ || V.trim() !== "") && I.add(V);
3417
3421
  }), I.size === B) {
3418
3422
  if (me++, me >= ge)
@@ -3431,8 +3435,8 @@ function rn(r, e, t, a = "", s = "") {
3431
3435
  return (i) => {
3432
3436
  let c = "";
3433
3437
  if (r ? c = i.innerHTML : c = e ? i.textContent || "" : i.innerText || "", t) {
3434
- const f = new RegExp(t, "g"), k = c.match(f);
3435
- c = k ? k.join(" ") : "";
3438
+ const f = new RegExp(t, "g"), w = c.match(f);
3439
+ c = w ? w.join(" ") : "";
3436
3440
  }
3437
3441
  return c.trim() && (c = a + c.trim() + s), c;
3438
3442
  };
@@ -3441,10 +3445,10 @@ const nn = gt.extend({
3441
3445
  name: O.literal("attribute-value"),
3442
3446
  attributeName: O.string()
3443
3447
  });
3444
- function qa(r) {
3448
+ function Wa(r) {
3445
3449
  return nn.parse(r);
3446
3450
  }
3447
- async function Wa(r) {
3451
+ async function Ha(r) {
3448
3452
  try {
3449
3453
  const { selector: e = "", attributeName: t, findBy: a = "cssSelector", option: s } = r;
3450
3454
  if (!e)
@@ -3465,10 +3469,10 @@ const an = gt.extend({
3465
3469
  name: O.literal("get-value-form"),
3466
3470
  type: O.enum(["text-field", "select", "checkbox"]).optional()
3467
3471
  });
3468
- function Ha(r) {
3472
+ function Ya(r) {
3469
3473
  return an.parse(r);
3470
3474
  }
3471
- async function Ya(r) {
3475
+ async function Ga(r) {
3472
3476
  try {
3473
3477
  const { selector: e = "", type: t = "text-field", findBy: a = "cssSelector" } = r;
3474
3478
  if (!e)
@@ -3476,7 +3480,7 @@ async function Ya(r) {
3476
3480
  const s = await dt({ selector: e, findBy: a, option: r.option });
3477
3481
  if (!s)
3478
3482
  throw new Error("Form element not found");
3479
- return { data: Ga(s, t) };
3483
+ return { data: Ja(s, t) };
3480
3484
  } catch (e) {
3481
3485
  return {
3482
3486
  hasError: !0,
@@ -3485,7 +3489,7 @@ async function Ya(r) {
3485
3489
  };
3486
3490
  }
3487
3491
  }
3488
- function Ga(r, e) {
3492
+ function Ja(r, e) {
3489
3493
  switch (e) {
3490
3494
  case "text-field":
3491
3495
  if (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement)
@@ -3509,10 +3513,10 @@ const sn = gt.extend({
3509
3513
  setValue: O.string(),
3510
3514
  type: O.enum(["text-field", "select", "checkbox"]).optional()
3511
3515
  });
3512
- function Ja(r) {
3516
+ function Xa(r) {
3513
3517
  return sn.parse(r);
3514
3518
  }
3515
- async function Xa(r) {
3519
+ async function Ka(r) {
3516
3520
  try {
3517
3521
  const { selector: e = "", setValue: t, type: a = "text-field", findBy: s = "cssSelector" } = r;
3518
3522
  if (!e)
@@ -3520,7 +3524,7 @@ async function Xa(r) {
3520
3524
  const i = await dt({ selector: e, findBy: s, option: r.option });
3521
3525
  if (!i)
3522
3526
  throw new Error("Form element not found");
3523
- return Ka(i, t, a), { data: "Form element updated successfully" };
3527
+ return Qa(i, t, a), { data: "Form element updated successfully" };
3524
3528
  } catch (e) {
3525
3529
  return {
3526
3530
  hasError: !0,
@@ -3529,7 +3533,7 @@ async function Xa(r) {
3529
3533
  };
3530
3534
  }
3531
3535
  }
3532
- function Ka(r, e, t) {
3536
+ function Qa(r, e, t) {
3533
3537
  switch (t) {
3534
3538
  case "text-field":
3535
3539
  (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement) && (r.value = e, r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 })));
@@ -3548,10 +3552,10 @@ const on = gt.extend({
3548
3552
  name: O.literal("clear-value-form"),
3549
3553
  type: O.enum(["text-field", "select", "checkbox"]).optional()
3550
3554
  });
3551
- function Qa(r) {
3555
+ function es(r) {
3552
3556
  return on.parse(r);
3553
3557
  }
3554
- async function es(r) {
3558
+ async function ts(r) {
3555
3559
  try {
3556
3560
  const { selector: e = "", type: t = "text-field", findBy: a = "cssSelector" } = r;
3557
3561
  if (!e)
@@ -3559,7 +3563,7 @@ async function es(r) {
3559
3563
  const s = await dt({ selector: e, findBy: a, option: r.option });
3560
3564
  if (!s)
3561
3565
  throw new Error("Form element not found");
3562
- return ts(s, t), { data: "Form element cleared successfully" };
3566
+ return rs(s, t), { data: "Form element cleared successfully" };
3563
3567
  } catch (e) {
3564
3568
  return {
3565
3569
  hasError: !0,
@@ -3568,7 +3572,7 @@ async function es(r) {
3568
3572
  };
3569
3573
  }
3570
3574
  }
3571
- function ts(r, e) {
3575
+ function rs(r, e) {
3572
3576
  switch (e) {
3573
3577
  case "text-field":
3574
3578
  (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement) && (r.value = "", r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 })));
@@ -3586,10 +3590,10 @@ function ts(r, e) {
3586
3590
  const cn = gt.extend({
3587
3591
  name: O.literal("element-exists")
3588
3592
  });
3589
- function rs(r) {
3593
+ function ns(r) {
3590
3594
  return cn.parse(r);
3591
3595
  }
3592
- async function ns(r) {
3596
+ async function as(r) {
3593
3597
  try {
3594
3598
  const { selector: e = "", findBy: t = "cssSelector", option: a } = r;
3595
3599
  if (!e)
@@ -3610,10 +3614,10 @@ const un = gt.extend({
3610
3614
  mode: O.enum(["exact", "contains", "startsWith", "endsWith", "regex"])
3611
3615
  }).optional()
3612
3616
  });
3613
- function as(r) {
3617
+ function ss(r) {
3614
3618
  return un.parse(r);
3615
3619
  }
3616
- async function ss(r) {
3620
+ async function is(r) {
3617
3621
  try {
3618
3622
  const { selector: e = "", findBy: t = "cssSelector", option: a, textFilter: s } = r;
3619
3623
  if (!e)
@@ -3624,17 +3628,17 @@ async function ss(r) {
3624
3628
  let c;
3625
3629
  if (Array.isArray(i))
3626
3630
  if (s) {
3627
- const f = is(i, s.text, s.mode);
3631
+ const f = os(i, s.text, s.mode);
3628
3632
  if (!f) {
3629
- const k = Array.isArray(s.text) ? s.text.join(", ") : s.text;
3630
- throw new Error(`No element found with text filter: "${k}" (mode: ${s.mode})`);
3633
+ const w = Array.isArray(s.text) ? s.text.join(", ") : s.text;
3634
+ throw new Error(`No element found with text filter: "${w}" (mode: ${s.mode})`);
3631
3635
  }
3632
3636
  c = f;
3633
3637
  } else
3634
3638
  c = i[0];
3635
3639
  else
3636
3640
  c = i;
3637
- return await cs(c), { data: !0 };
3641
+ return await us(c), { data: !0 };
3638
3642
  } catch (e) {
3639
3643
  return console.log(e), {
3640
3644
  hasError: !0,
@@ -3643,9 +3647,9 @@ async function ss(r) {
3643
3647
  };
3644
3648
  }
3645
3649
  }
3646
- function is(r, e, t) {
3650
+ function os(r, e, t) {
3647
3651
  for (const a of r) {
3648
- const s = os(a), i = Array.isArray(e) ? e : [e];
3652
+ const s = cs(a), i = Array.isArray(e) ? e : [e];
3649
3653
  for (const c of i) {
3650
3654
  let f = !1;
3651
3655
  switch (t) {
@@ -3676,7 +3680,7 @@ function is(r, e, t) {
3676
3680
  }
3677
3681
  return null;
3678
3682
  }
3679
- function os(r) {
3683
+ function cs(r) {
3680
3684
  if (r.innerText)
3681
3685
  return r.innerText.trim();
3682
3686
  if (r.textContent)
@@ -3692,7 +3696,7 @@ function os(r) {
3692
3696
  const a = r.getAttribute("aria-label");
3693
3697
  return a ? a.trim() : "";
3694
3698
  }
3695
- async function cs(r) {
3699
+ async function us(r) {
3696
3700
  r.scrollIntoView({
3697
3701
  behavior: "instant",
3698
3702
  block: "center",
@@ -3723,13 +3727,13 @@ const ln = O.object({
3723
3727
  keyCode: O.number().optional(),
3724
3728
  modifiers: O.array(O.enum(["Alt", "Control", "Meta", "Shift"])).optional()
3725
3729
  });
3726
- function us(r) {
3730
+ function ls(r) {
3727
3731
  return ln.parse(r);
3728
3732
  }
3729
- async function ls(r) {
3733
+ async function fs(r) {
3730
3734
  try {
3731
3735
  const { key: e, code: t, keyCode: a, modifiers: s = [] } = r;
3732
- return await fs(e, t, a, s), { data: !0 };
3736
+ return await ds(e, t, a, s), { data: !0 };
3733
3737
  } catch (e) {
3734
3738
  return console.log(e), {
3735
3739
  hasError: !0,
@@ -3738,7 +3742,7 @@ async function ls(r) {
3738
3742
  };
3739
3743
  }
3740
3744
  }
3741
- async function fs(r, e, t, a = []) {
3745
+ async function ds(r, e, t, a = []) {
3742
3746
  try {
3743
3747
  const s = await chrome.runtime.sendMessage({
3744
3748
  type: "CDP_KEYPRESS",
@@ -3801,10 +3805,10 @@ const fn = O.object({
3801
3805
  name: O.literal("wait"),
3802
3806
  duration: O.number().min(0)
3803
3807
  });
3804
- function ds(r) {
3808
+ function hs(r) {
3805
3809
  return fn.parse(r);
3806
3810
  }
3807
- async function hs(r) {
3811
+ async function ps(r) {
3808
3812
  try {
3809
3813
  const { duration: e } = r;
3810
3814
  return console.log(`[Wait] Waiting for ${e}ms...`), await new Promise((t) => setTimeout(t, e)), console.log(`[Wait] Wait completed after ${e}ms`), { data: !0 };
@@ -3843,10 +3847,10 @@ const dn = O.object({
3843
3847
  timeoutMs: O.number().min(1e3).optional(),
3844
3848
  position: O.enum(["top-left", "top-right", "bottom-left", "bottom-right"]).optional()
3845
3849
  });
3846
- function ps(r) {
3850
+ function ms(r) {
3847
3851
  return dn.parse(r);
3848
3852
  }
3849
- async function ms(r) {
3853
+ async function ys(r) {
3850
3854
  try {
3851
3855
  const {
3852
3856
  conditions: e,
@@ -3857,8 +3861,8 @@ async function ms(r) {
3857
3861
  } = r;
3858
3862
  console.log("[WaitForCondition] Starting wait with conditions:", e), console.log("[WaitForCondition] Mode:", t, "Timeout:", s);
3859
3863
  const c = !!(e.urlPattern || e.elementExists || e.cookieExists || e.storageKey), f = e.userConfirmation === !0;
3860
- let k = null, _ = null;
3861
- (t === "manual" || t === "auto-or-manual") && f && (k = new Promise((S) => {
3864
+ let w = null, _ = null;
3865
+ (t === "manual" || t === "auto-or-manual") && f && (w = new Promise((S) => {
3862
3866
  _ = S;
3863
3867
  }), window.dispatchEvent(
3864
3868
  new CustomEvent("8g-show-confirmation-ui", {
@@ -3883,23 +3887,23 @@ async function ms(r) {
3883
3887
  console.warn("[WaitForCondition] Invalid URL pattern:", S);
3884
3888
  }
3885
3889
  if (e.elementExists) {
3886
- const { selector: S, findBy: w } = e.elementExists;
3887
- let A = null;
3888
- if (w === "cssSelector" ? A = document.querySelector(S) : w === "xpath" && (A = document.evaluate(
3890
+ const { selector: S, findBy: k } = e.elementExists;
3891
+ let E = null;
3892
+ if (k === "cssSelector" ? E = document.querySelector(S) : k === "xpath" && (E = document.evaluate(
3889
3893
  S,
3890
3894
  document,
3891
3895
  null,
3892
3896
  XPathResult.FIRST_ORDERED_NODE_TYPE,
3893
3897
  null
3894
- ).singleNodeValue), A)
3898
+ ).singleNodeValue), E)
3895
3899
  return {
3896
3900
  success: !0,
3897
3901
  reason: "elementExists",
3898
3902
  message: `Element found: ${S}`
3899
3903
  };
3900
3904
  }
3901
- if (e.cookieExists && document.cookie.split(";").some((A) => {
3902
- const [I] = A.trim().split("=");
3905
+ if (e.cookieExists && document.cookie.split(";").some((E) => {
3906
+ const [I] = E.trim().split("=");
3903
3907
  return I === e.cookieExists;
3904
3908
  }))
3905
3909
  return {
@@ -3908,22 +3912,22 @@ async function ms(r) {
3908
3912
  message: `Cookie found: ${e.cookieExists}`
3909
3913
  };
3910
3914
  if (e.storageKey) {
3911
- const { type: S, key: w } = e.storageKey;
3912
- if ((S === "localStorage" ? window.localStorage : window.sessionStorage).getItem(w) !== null)
3915
+ const { type: S, key: k } = e.storageKey;
3916
+ if ((S === "localStorage" ? window.localStorage : window.sessionStorage).getItem(k) !== null)
3913
3917
  return {
3914
3918
  success: !0,
3915
3919
  reason: "storageKey",
3916
- message: `Storage key found: ${S}.${w}`
3920
+ message: `Storage key found: ${S}.${k}`
3917
3921
  };
3918
3922
  }
3919
3923
  return null;
3920
3924
  };
3921
3925
  return new Promise((S) => {
3922
- let w = null, A = !1;
3926
+ let k = null, E = !1;
3923
3927
  const I = () => {
3924
- w && (clearInterval(w), w = null), window.dispatchEvent(new CustomEvent("8g-hide-confirmation-ui"));
3928
+ k && (clearInterval(k), k = null), window.dispatchEvent(new CustomEvent("8g-hide-confirmation-ui"));
3925
3929
  }, se = (ge) => {
3926
- A || (A = !0, I(), console.log("[WaitForCondition] Resolved with:", ge), S({ data: ge }));
3930
+ E || (E = !0, I(), console.log("[WaitForCondition] Resolved with:", ge), S({ data: ge }));
3927
3931
  }, me = setTimeout(() => {
3928
3932
  se({
3929
3933
  success: !1,
@@ -3931,10 +3935,10 @@ async function ms(r) {
3931
3935
  message: `Timeout after ${s}ms`
3932
3936
  });
3933
3937
  }, s);
3934
- (t === "auto" || t === "auto-or-manual") && c && (w = setInterval(async () => {
3938
+ (t === "auto" || t === "auto-or-manual") && c && (k = setInterval(async () => {
3935
3939
  const ge = await R();
3936
3940
  ge && (clearTimeout(me), se(ge));
3937
- }, a)), (t === "manual" || t === "auto-or-manual") && k && k.then(() => {
3941
+ }, a)), (t === "manual" || t === "auto-or-manual") && w && w.then(() => {
3938
3942
  clearTimeout(me), se({
3939
3943
  success: !0,
3940
3944
  reason: "userConfirmation",
@@ -3953,13 +3957,41 @@ async function ms(r) {
3953
3957
  };
3954
3958
  }
3955
3959
  }
3956
- const hn = gt.extend({
3957
- name: O.literal("save-assets")
3960
+ const hn = O.object({
3961
+ name: O.literal("navigate"),
3962
+ url: O.string().url("Valid URL is required"),
3963
+ waitForLoad: O.boolean().optional(),
3964
+ timeout: O.number().min(0).optional()
3958
3965
  });
3959
- function ys(r) {
3966
+ function gs(r) {
3960
3967
  return hn.parse(r);
3961
3968
  }
3962
- async function gs(r) {
3969
+ async function vs(r) {
3970
+ try {
3971
+ const { url: e, waitForLoad: t = !0, timeout: a = 3e4 } = r;
3972
+ return console.log(`[Navigate] Navigating to: ${e}`), t ? new Promise((s, i) => {
3973
+ const c = setTimeout(() => {
3974
+ i(new Error(`Navigation timeout after ${a}ms`));
3975
+ }, a), f = () => {
3976
+ clearTimeout(c), window.removeEventListener("load", f), console.log(`[Navigate] Page loaded: ${e}`), s({ data: !0 });
3977
+ };
3978
+ document.readyState === "complete" ? (clearTimeout(c), console.log(`[Navigate] Page already loaded: ${e}`), s({ data: !0 })) : window.addEventListener("load", f), window.location.href = e;
3979
+ }) : (window.location.href = e, console.log(`[Navigate] Navigation initiated (no wait): ${e}`), { data: !0 });
3980
+ } catch (e) {
3981
+ return console.error("[Navigate] Error:", e), {
3982
+ hasError: !0,
3983
+ message: e instanceof Error ? e.message : "Unknown error in navigate handler",
3984
+ data: !1
3985
+ };
3986
+ }
3987
+ }
3988
+ const pn = gt.extend({
3989
+ name: O.literal("save-assets")
3990
+ });
3991
+ function bs(r) {
3992
+ return pn.parse(r);
3993
+ }
3994
+ async function ws(r) {
3963
3995
  try {
3964
3996
  const { selector: e = "img, audio, video, source", findBy: t = "cssSelector", option: a } = r, s = await dt({ selector: e, findBy: t, option: a });
3965
3997
  if (!s || !Array.isArray(s))
@@ -3977,7 +4009,7 @@ async function gs(r) {
3977
4009
  };
3978
4010
  }
3979
4011
  }
3980
- class vs {
4012
+ class ks {
3981
4013
  /**
3982
4014
  * 요소의 XPath 생성
3983
4015
  * @param element 대상 요소
@@ -3989,10 +4021,10 @@ class vs {
3989
4021
  let a = e;
3990
4022
  for (; a && a.nodeType === Node.ELEMENT_NODE; ) {
3991
4023
  let i = a.tagName.toLowerCase();
3992
- const c = Array.from(((s = a.parentElement) == null ? void 0 : s.children) || []).filter((k) => k.tagName === a.tagName);
4024
+ const c = Array.from(((s = a.parentElement) == null ? void 0 : s.children) || []).filter((w) => w.tagName === a.tagName);
3993
4025
  if (c.length > 1) {
3994
- const k = c.indexOf(a) + 1;
3995
- i += `[${k}]`;
4026
+ const w = c.indexOf(a) + 1;
4027
+ i += `[${w}]`;
3996
4028
  }
3997
4029
  const f = this.getStableAttributes(a);
3998
4030
  f.length > 0 && (i += `[@${f.join(" and @")}]`), t.unshift(i), a = a.parentElement;
@@ -4032,7 +4064,7 @@ class vs {
4032
4064
  ].some((a) => a.test(e));
4033
4065
  }
4034
4066
  }
4035
- const pn = gt.extend({
4067
+ const mn = gt.extend({
4036
4068
  name: O.literal("get-element-data"),
4037
4069
  includeText: O.boolean().optional(),
4038
4070
  includeTags: O.boolean().optional(),
@@ -4044,10 +4076,10 @@ const pn = gt.extend({
4044
4076
  includeSelector: O.boolean().optional(),
4045
4077
  includeXPath: O.boolean().optional()
4046
4078
  });
4047
- function bs(r) {
4048
- return pn.parse(r);
4079
+ function xs(r) {
4080
+ return mn.parse(r);
4049
4081
  }
4050
- async function ws(r) {
4082
+ async function _s(r) {
4051
4083
  try {
4052
4084
  const {
4053
4085
  selector: e = "",
@@ -4057,31 +4089,31 @@ async function ws(r) {
4057
4089
  regex: i,
4058
4090
  prefixText: c = "",
4059
4091
  suffixText: f = "",
4060
- attributes: k = [],
4092
+ attributes: w = [],
4061
4093
  includeSelector: _ = !1,
4062
4094
  includeXPath: R = !1,
4063
4095
  findBy: S = "cssSelector",
4064
- option: w
4096
+ option: k
4065
4097
  } = r;
4066
4098
  if (!e)
4067
4099
  throw new Error("Selector is required for get-element-data block");
4068
- if (!t && k.length === 0)
4100
+ if (!t && w.length === 0)
4069
4101
  throw new Error("Either includeText must be true or attributes must be provided");
4070
- const A = await dt({ selector: e, findBy: S, option: w });
4071
- if (!A)
4072
- return { data: Array.isArray(A) ? [] : {} };
4073
- const I = ks(
4102
+ const E = await dt({ selector: e, findBy: S, option: k });
4103
+ if (!E)
4104
+ return { data: Array.isArray(E) ? [] : {} };
4105
+ const I = Es(
4074
4106
  t,
4075
4107
  a,
4076
4108
  s,
4077
4109
  i,
4078
4110
  c,
4079
4111
  f,
4080
- k,
4112
+ w,
4081
4113
  _,
4082
4114
  R
4083
4115
  );
4084
- return Array.isArray(A) ? { data: A.map(I) } : { data: I(A) };
4116
+ return Array.isArray(E) ? { data: E.map(I) } : { data: I(E) };
4085
4117
  } catch (e) {
4086
4118
  return {
4087
4119
  hasError: !0,
@@ -4090,28 +4122,28 @@ async function ws(r) {
4090
4122
  };
4091
4123
  }
4092
4124
  }
4093
- function ks(r, e, t, a, s = "", i = "", c = [], f = !1, k = !1) {
4125
+ function Es(r, e, t, a, s = "", i = "", c = [], f = !1, w = !1) {
4094
4126
  return (_) => {
4095
4127
  const R = {};
4096
4128
  if (r) {
4097
4129
  let S = "";
4098
4130
  if (e ? S = _.innerHTML : S = t ? _.textContent || "" : _.innerText || "", a) {
4099
- const w = new RegExp(a, "g"), A = S.match(w);
4100
- S = A ? A.join(" ") : "";
4131
+ const k = new RegExp(a, "g"), E = S.match(k);
4132
+ S = E ? E.join(" ") : "";
4101
4133
  }
4102
4134
  S.trim() && (S = s + S.trim() + i), R.text = S;
4103
4135
  }
4104
4136
  return c.length > 0 && (R.attributes = {}, c.forEach((S) => {
4105
- let w = _.getAttribute(S);
4106
- if (w === null) {
4107
- const A = _.querySelector(`[${S}]`);
4108
- A && (w = A.getAttribute(S));
4137
+ let k = _.getAttribute(S);
4138
+ if (k === null) {
4139
+ const E = _.querySelector(`[${S}]`);
4140
+ E && (k = E.getAttribute(S));
4109
4141
  }
4110
- R.attributes[S] = w;
4111
- })), f && (R.selector = La.generate(_)), k && (R.xpath = vs.generate(_)), R;
4142
+ R.attributes[S] = k;
4143
+ })), f && (R.selector = Ba.generate(_)), w && (R.xpath = ks.generate(_)), R;
4112
4144
  };
4113
4145
  }
4114
- const mn = gt.extend({
4146
+ const yn = gt.extend({
4115
4147
  name: O.literal("scroll"),
4116
4148
  scrollType: O.enum(["toElement", "toBottom", "byDistance", "untilLoaded"]).optional(),
4117
4149
  distance: O.number().optional(),
@@ -4119,10 +4151,10 @@ const mn = gt.extend({
4119
4151
  maxScrolls: O.number().optional(),
4120
4152
  waitAfterScroll: O.number().optional()
4121
4153
  });
4122
- function xs(r) {
4123
- return mn.parse(r);
4154
+ function Ts(r) {
4155
+ return yn.parse(r);
4124
4156
  }
4125
- async function _s(r) {
4157
+ async function As(r) {
4126
4158
  try {
4127
4159
  const {
4128
4160
  selector: e = "",
@@ -4132,19 +4164,19 @@ async function _s(r) {
4132
4164
  maxScrolls: i = 50,
4133
4165
  waitAfterScroll: c = 300,
4134
4166
  findBy: f = "cssSelector",
4135
- option: k
4167
+ option: w
4136
4168
  } = r;
4137
4169
  switch (t) {
4138
4170
  case "toElement":
4139
4171
  if (!e)
4140
4172
  throw new Error("Selector is required for toElement scroll type");
4141
- return await Es(e, f, k, s);
4173
+ return await Ss(e, f, w, s);
4142
4174
  case "toBottom":
4143
- return await Ts(s, c);
4175
+ return await Cs(s, c);
4144
4176
  case "byDistance":
4145
- return await As(a, s);
4177
+ return await Os(a, s);
4146
4178
  case "untilLoaded":
4147
- return await Ss(i, a, s, c);
4179
+ return await Ds(i, a, s, c);
4148
4180
  default:
4149
4181
  throw new Error(`Unknown scroll type: ${t}`);
4150
4182
  }
@@ -4156,7 +4188,7 @@ async function _s(r) {
4156
4188
  };
4157
4189
  }
4158
4190
  }
4159
- async function Es(r, e, t, a) {
4191
+ async function Ss(r, e, t, a) {
4160
4192
  const s = await dt({ selector: r, findBy: e, option: t });
4161
4193
  return s ? ((Array.isArray(s) ? s[0] : s).scrollIntoView({ behavior: a, block: "center" }), { data: !0 }) : {
4162
4194
  hasError: !0,
@@ -4164,7 +4196,7 @@ async function Es(r, e, t, a) {
4164
4196
  data: !1
4165
4197
  };
4166
4198
  }
4167
- async function Ts(r, e) {
4199
+ async function Cs(r, e) {
4168
4200
  let t = document.body.scrollHeight, a = 0;
4169
4201
  const s = 50;
4170
4202
  for (; a < s; ) {
@@ -4179,13 +4211,13 @@ async function Ts(r, e) {
4179
4211
  }
4180
4212
  return { data: !0 };
4181
4213
  }
4182
- async function As(r, e) {
4214
+ async function Os(r, e) {
4183
4215
  return window.scrollBy({
4184
4216
  top: r,
4185
4217
  behavior: e
4186
4218
  }), { data: !0 };
4187
4219
  }
4188
- async function Ss(r, e, t, a) {
4220
+ async function Ds(r, e, t, a) {
4189
4221
  let s = 0, i = document.body.scrollHeight;
4190
4222
  for (; s < r; ) {
4191
4223
  window.scrollBy({
@@ -4193,14 +4225,14 @@ async function Ss(r, e, t, a) {
4193
4225
  behavior: t
4194
4226
  // Use provided behavior
4195
4227
  }), await new Promise((_) => setTimeout(_, a));
4196
- const c = document.body.scrollHeight, f = window.pageYOffset || document.documentElement.scrollTop, k = window.innerHeight;
4197
- if (f + k >= c - 10 && c === i)
4228
+ const c = document.body.scrollHeight, f = window.pageYOffset || document.documentElement.scrollTop, w = window.innerHeight;
4229
+ if (f + w >= c - 10 && c === i)
4198
4230
  break;
4199
4231
  i = c, s++;
4200
4232
  }
4201
4233
  return { data: !0 };
4202
4234
  }
4203
- const yn = O.object({
4235
+ const gn = O.object({
4204
4236
  name: O.literal("fetch-api"),
4205
4237
  url: O.string(),
4206
4238
  method: O.enum(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]).optional(),
@@ -4210,10 +4242,10 @@ const yn = O.object({
4210
4242
  parseJson: O.boolean().optional(),
4211
4243
  returnHeaders: O.boolean().optional()
4212
4244
  });
4213
- function Cs(r) {
4214
- return yn.parse(r);
4245
+ function Ps(r) {
4246
+ return gn.parse(r);
4215
4247
  }
4216
- async function Os(r) {
4248
+ async function Ns(r) {
4217
4249
  try {
4218
4250
  console.log("[FetchApiBlock] Sending API request to background:", r.url);
4219
4251
  const e = await chrome.runtime.sendMessage({
@@ -4245,14 +4277,14 @@ async function Os(r) {
4245
4277
  }
4246
4278
  }
4247
4279
  var qr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4248
- function Ds(r) {
4280
+ function Ms(r) {
4249
4281
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
4250
4282
  }
4251
4283
  function gr(r) {
4252
4284
  throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4253
4285
  }
4254
4286
  var Dr = { exports: {} }, Wr;
4255
- function Ps() {
4287
+ function Rs() {
4256
4288
  return Wr || (Wr = 1, (function(r, e) {
4257
4289
  (function(t) {
4258
4290
  r.exports = t();
@@ -4265,24 +4297,24 @@ function Ps() {
4265
4297
  var S = typeof gr == "function" && gr;
4266
4298
  if (!R && S) return S(_, !0);
4267
4299
  if (f) return f(_, !0);
4268
- var w = new Error("Cannot find module '" + _ + "'");
4269
- throw w.code = "MODULE_NOT_FOUND", w;
4300
+ var k = new Error("Cannot find module '" + _ + "'");
4301
+ throw k.code = "MODULE_NOT_FOUND", k;
4270
4302
  }
4271
- var A = s[_] = { exports: {} };
4272
- a[_][0].call(A.exports, function(I) {
4303
+ var E = s[_] = { exports: {} };
4304
+ a[_][0].call(E.exports, function(I) {
4273
4305
  var se = a[_][1][I];
4274
4306
  return c(se || I);
4275
- }, A, A.exports, t, a, s, i);
4307
+ }, E, E.exports, t, a, s, i);
4276
4308
  }
4277
4309
  return s[_].exports;
4278
4310
  }
4279
- for (var f = typeof gr == "function" && gr, k = 0; k < i.length; k++) c(i[k]);
4311
+ for (var f = typeof gr == "function" && gr, w = 0; w < i.length; w++) c(i[w]);
4280
4312
  return c;
4281
4313
  }
4282
4314
  return t;
4283
4315
  })())({ 1: [function(t, a, s) {
4284
4316
  const i = t("./utils"), c = (function() {
4285
- const f = i.stringToArray, k = [
4317
+ const f = i.stringToArray, w = [
4286
4318
  "Zero",
4287
4319
  "One",
4288
4320
  "Two",
@@ -4325,17 +4357,17 @@ function Ps() {
4325
4357
  "Eighteenth",
4326
4358
  "Nineteenth"
4327
4359
  ], R = ["Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety", "Hundred"], S = ["Thousand", "Million", "Billion", "Trillion"];
4328
- function w(v, T) {
4360
+ function k(v, A) {
4329
4361
  var b = function($, j, C) {
4330
4362
  var F = "";
4331
4363
  if ($ <= 19)
4332
- F = (j ? " and " : "") + (C ? _[$] : k[$]);
4364
+ F = (j ? " and " : "") + (C ? _[$] : w[$]);
4333
4365
  else if ($ < 100) {
4334
4366
  const ye = Math.floor($ / 10), we = $ % 10;
4335
4367
  F = (j ? " and " : "") + R[ye - 2], we > 0 ? F += "-" + b(we, !1, C) : C && (F = F.substring(0, F.length - 1) + "ieth");
4336
4368
  } else if ($ < 1e3) {
4337
4369
  const ye = Math.floor($ / 100), we = $ % 100;
4338
- F = (j ? ", " : "") + k[ye] + " Hundred", we > 0 ? F += b(we, !0, C) : C && (F += "th");
4370
+ F = (j ? ", " : "") + w[ye] + " Hundred", we > 0 ? F += b(we, !0, C) : C && (F += "th");
4339
4371
  } else {
4340
4372
  var X = Math.floor(Math.log10($) / 3);
4341
4373
  X > S.length && (X = S.length);
@@ -4343,23 +4375,23 @@ function Ps() {
4343
4375
  F = (j ? ", " : "") + b(we, !1, !1) + " " + S[X - 1], J > 0 ? F += b(J, !0, C) : C && (F += "th");
4344
4376
  }
4345
4377
  return F;
4346
- }, P = b(v, !1, T);
4378
+ }, P = b(v, !1, A);
4347
4379
  return P;
4348
4380
  }
4349
- const A = {};
4350
- k.forEach(function(v, T) {
4351
- A[v.toLowerCase()] = T;
4352
- }), _.forEach(function(v, T) {
4353
- A[v.toLowerCase()] = T;
4354
- }), R.forEach(function(v, T) {
4381
+ const E = {};
4382
+ w.forEach(function(v, A) {
4383
+ E[v.toLowerCase()] = A;
4384
+ }), _.forEach(function(v, A) {
4385
+ E[v.toLowerCase()] = A;
4386
+ }), R.forEach(function(v, A) {
4355
4387
  const b = v.toLowerCase();
4356
- A[b] = (T + 2) * 10, A[b.substring(0, v.length - 1) + "ieth"] = A[b];
4357
- }), A.hundredth = 100, S.forEach(function(v, T) {
4358
- const b = v.toLowerCase(), P = Math.pow(10, (T + 1) * 3);
4359
- A[b] = P, A[b + "th"] = P;
4388
+ E[b] = (A + 2) * 10, E[b.substring(0, v.length - 1) + "ieth"] = E[b];
4389
+ }), E.hundredth = 100, S.forEach(function(v, A) {
4390
+ const b = v.toLowerCase(), P = Math.pow(10, (A + 1) * 3);
4391
+ E[b] = P, E[b + "th"] = P;
4360
4392
  });
4361
4393
  function I(v) {
4362
- const b = v.split(/,\s|\sand\s|[\s\\-]/).map((j) => A[j]);
4394
+ const b = v.split(/,\s|\sand\s|[\s\\-]/).map((j) => E[j]);
4363
4395
  let P = [0];
4364
4396
  return b.forEach((j) => {
4365
4397
  if (j < 100) {
@@ -4385,38 +4417,38 @@ function Ps() {
4385
4417
  [1, "i"]
4386
4418
  ], me = { M: 1e3, D: 500, C: 100, L: 50, X: 10, V: 5, I: 1 };
4387
4419
  function ge(v) {
4388
- for (var T = 0; T < se.length; T++) {
4389
- const b = se[T];
4420
+ for (var A = 0; A < se.length; A++) {
4421
+ const b = se[A];
4390
4422
  if (v >= b[0])
4391
4423
  return b[1] + ge(v - b[0]);
4392
4424
  }
4393
4425
  return "";
4394
4426
  }
4395
4427
  function H(v) {
4396
- for (var T = 0, b = 1, P = v.length - 1; P >= 0; P--) {
4428
+ for (var A = 0, b = 1, P = v.length - 1; P >= 0; P--) {
4397
4429
  const $ = v[P], j = me[$];
4398
- j < b ? T -= j : (b = j, T += j);
4430
+ j < b ? A -= j : (b = j, A += j);
4399
4431
  }
4400
- return T;
4432
+ return A;
4401
4433
  }
4402
- function N(v, T) {
4403
- for (var b = [], P = T.charCodeAt(0); v > 0; )
4434
+ function N(v, A) {
4435
+ for (var b = [], P = A.charCodeAt(0); v > 0; )
4404
4436
  b.unshift(String.fromCharCode((v - 1) % 26 + P)), v = Math.floor((v - 1) / 26);
4405
4437
  return b.join("");
4406
4438
  }
4407
- function ne(v, T) {
4408
- for (var b = T.charCodeAt(0), P = 0, $ = 0; $ < v.length; $++)
4439
+ function ne(v, A) {
4440
+ for (var b = A.charCodeAt(0), P = 0, $ = 0; $ < v.length; $++)
4409
4441
  P += (v.charCodeAt(v.length - $ - 1) - b + 1) * Math.pow(26, $);
4410
4442
  return P;
4411
4443
  }
4412
- function B(v, T) {
4444
+ function B(v, A) {
4413
4445
  if (typeof v > "u")
4414
4446
  return;
4415
4447
  v = Math.floor(v);
4416
- const b = xe(T);
4448
+ const b = xe(A);
4417
4449
  return V(v, b);
4418
4450
  }
4419
- const E = {
4451
+ const T = {
4420
4452
  DECIMAL: "decimal",
4421
4453
  LETTERS: "letters",
4422
4454
  ROMAN: "roman",
@@ -4427,81 +4459,81 @@ function Ps() {
4427
4459
  LOWER: "lower",
4428
4460
  TITLE: "title"
4429
4461
  };
4430
- function V(v, T) {
4462
+ function V(v, A) {
4431
4463
  let b;
4432
4464
  const P = v < 0;
4433
- switch (v = Math.abs(v), T.primary) {
4434
- case E.LETTERS:
4435
- b = N(v, T.case === L.UPPER ? "A" : "a");
4465
+ switch (v = Math.abs(v), A.primary) {
4466
+ case T.LETTERS:
4467
+ b = N(v, A.case === L.UPPER ? "A" : "a");
4436
4468
  break;
4437
- case E.ROMAN:
4438
- b = ge(v), T.case === L.UPPER && (b = b.toUpperCase());
4469
+ case T.ROMAN:
4470
+ b = ge(v), A.case === L.UPPER && (b = b.toUpperCase());
4439
4471
  break;
4440
- case E.WORDS:
4441
- b = w(v, T.ordinal), T.case === L.UPPER ? b = b.toUpperCase() : T.case === L.LOWER && (b = b.toLowerCase());
4472
+ case T.WORDS:
4473
+ b = k(v, A.ordinal), A.case === L.UPPER ? b = b.toUpperCase() : A.case === L.LOWER && (b = b.toLowerCase());
4442
4474
  break;
4443
- case E.DECIMAL:
4475
+ case T.DECIMAL:
4444
4476
  b = "" + v;
4445
- var $ = T.mandatoryDigits - b.length;
4477
+ var $ = A.mandatoryDigits - b.length;
4446
4478
  if ($ > 0) {
4447
4479
  var j = new Array($ + 1).join("0");
4448
4480
  b = j + b;
4449
4481
  }
4450
- if (T.zeroCode !== 48 && (b = f(b).map((ye) => String.fromCodePoint(ye.codePointAt(0) + T.zeroCode - 48)).join("")), T.regular) {
4451
- const ye = Math.floor((b.length - 1) / T.groupingSeparators.position);
4482
+ if (A.zeroCode !== 48 && (b = f(b).map((ye) => String.fromCodePoint(ye.codePointAt(0) + A.zeroCode - 48)).join("")), A.regular) {
4483
+ const ye = Math.floor((b.length - 1) / A.groupingSeparators.position);
4452
4484
  for (let we = ye; we > 0; we--) {
4453
- const J = b.length - we * T.groupingSeparators.position;
4454
- b = b.substr(0, J) + T.groupingSeparators.character + b.substr(J);
4485
+ const J = b.length - we * A.groupingSeparators.position;
4486
+ b = b.substr(0, J) + A.groupingSeparators.character + b.substr(J);
4455
4487
  }
4456
4488
  } else
4457
- T.groupingSeparators.reverse().forEach((ye) => {
4489
+ A.groupingSeparators.reverse().forEach((ye) => {
4458
4490
  const we = b.length - ye.position;
4459
4491
  b = b.substr(0, we) + ye.character + b.substr(we);
4460
4492
  });
4461
- if (T.ordinal) {
4493
+ if (A.ordinal) {
4462
4494
  var C = { 1: "st", 2: "nd", 3: "rd" }, F = b[b.length - 1], X = C[F];
4463
4495
  (!X || b.length > 1 && b[b.length - 2] === "1") && (X = "th"), b = b + X;
4464
4496
  }
4465
4497
  break;
4466
- case E.SEQUENCE:
4498
+ case T.SEQUENCE:
4467
4499
  throw {
4468
4500
  code: "D3130",
4469
- value: T.token
4501
+ value: A.token
4470
4502
  };
4471
4503
  }
4472
4504
  return P && (b = "-" + b), b;
4473
4505
  }
4474
4506
  const de = [48, 1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3558, 3664, 3792, 3872, 4160, 4240, 6112, 6160, 6470, 6608, 6784, 6800, 6992, 7088, 7232, 7248, 42528, 43216, 43264, 43472, 43504, 43600, 44016, 65296];
4475
4507
  function xe(v) {
4476
- const T = {
4508
+ const A = {
4477
4509
  type: "integer",
4478
- primary: E.DECIMAL,
4510
+ primary: T.DECIMAL,
4479
4511
  case: L.LOWER,
4480
4512
  ordinal: !1
4481
4513
  };
4482
4514
  let b, P;
4483
4515
  const $ = v.lastIndexOf(";");
4484
- switch ($ === -1 ? b = v : (b = v.substring(0, $), P = v.substring($ + 1), P[0] === "o" && (T.ordinal = !0)), b) {
4516
+ switch ($ === -1 ? b = v : (b = v.substring(0, $), P = v.substring($ + 1), P[0] === "o" && (A.ordinal = !0)), b) {
4485
4517
  case "A":
4486
- T.case = L.UPPER;
4518
+ A.case = L.UPPER;
4487
4519
  /* eslnt-disable-next-line no-fallthrough */
4488
4520
  case "a":
4489
- T.primary = E.LETTERS;
4521
+ A.primary = T.LETTERS;
4490
4522
  break;
4491
4523
  case "I":
4492
- T.case = L.UPPER;
4524
+ A.case = L.UPPER;
4493
4525
  /* eslnt-disable-next-line no-fallthrough */
4494
4526
  case "i":
4495
- T.primary = E.ROMAN;
4527
+ A.primary = T.ROMAN;
4496
4528
  break;
4497
4529
  case "W":
4498
- T.case = L.UPPER, T.primary = E.WORDS;
4530
+ A.case = L.UPPER, A.primary = T.WORDS;
4499
4531
  break;
4500
4532
  case "Ww":
4501
- T.case = L.TITLE, T.primary = E.WORDS;
4533
+ A.case = L.TITLE, A.primary = T.WORDS;
4502
4534
  break;
4503
4535
  case "w":
4504
- T.primary = E.WORDS;
4536
+ A.primary = T.WORDS;
4505
4537
  break;
4506
4538
  default: {
4507
4539
  let j = null, C = 0, F = 0, X = [], ye = 0;
@@ -4524,7 +4556,7 @@ function Ps() {
4524
4556
  character: String.fromCodePoint(J)
4525
4557
  }));
4526
4558
  }), C > 0) {
4527
- T.primary = E.DECIMAL, T.zeroCode = j, T.mandatoryDigits = C, T.optionalDigits = F;
4559
+ A.primary = T.DECIMAL, A.zeroCode = j, A.mandatoryDigits = C, A.optionalDigits = F;
4528
4560
  const Q = function(he) {
4529
4561
  if (he.length === 0)
4530
4562
  return 0;
@@ -4540,15 +4572,15 @@ function Ps() {
4540
4572
  return 0;
4541
4573
  return qe;
4542
4574
  }(X);
4543
- Q > 0 ? (T.regular = !0, T.groupingSeparators = {
4575
+ Q > 0 ? (A.regular = !0, A.groupingSeparators = {
4544
4576
  position: Q,
4545
4577
  character: X[0].character
4546
- }) : (T.regular = !1, T.groupingSeparators = X);
4578
+ }) : (A.regular = !1, A.groupingSeparators = X);
4547
4579
  } else
4548
- T.primary = E.SEQUENCE, T.token = b;
4580
+ A.primary = T.SEQUENCE, A.token = b;
4549
4581
  }
4550
4582
  }
4551
- return T;
4583
+ return A;
4552
4584
  }
4553
4585
  const Te = {
4554
4586
  Y: "1",
@@ -4572,20 +4604,20 @@ function Ps() {
4572
4604
  E: "n"
4573
4605
  };
4574
4606
  function Ae(v) {
4575
- var T = [];
4607
+ var A = [];
4576
4608
  const b = {
4577
4609
  type: "datetime",
4578
- parts: T
4610
+ parts: A
4579
4611
  }, P = function(Q, he) {
4580
4612
  if (he > Q) {
4581
4613
  let Y = v.substring(Q, he);
4582
- Y = Y.split("]]").join("]"), T.push({ type: "literal", value: Y });
4614
+ Y = Y.split("]]").join("]"), A.push({ type: "literal", value: Y });
4583
4615
  }
4584
4616
  };
4585
4617
  for (var $ = 0, j = 0; j < v.length; ) {
4586
4618
  if (v.charAt(j) === "[") {
4587
4619
  if (v.charAt(j + 1) === "[") {
4588
- P($, j), T.push({ type: "literal", value: "[" }), j += 2, $ = j;
4620
+ P($, j), A.push({ type: "literal", value: "[" }), j += 2, $ = j;
4589
4621
  continue;
4590
4622
  }
4591
4623
  if (P($, j), $ = j, j = v.indexOf("]", $), j === -1)
@@ -4639,41 +4671,41 @@ function Ps() {
4639
4671
  var J = C.integerFormat.mandatoryDigits + C.integerFormat.optionalDigits;
4640
4672
  J >= 2 && (C.n = J);
4641
4673
  }
4642
- const he = T[T.length - 1];
4674
+ const he = A[A.length - 1];
4643
4675
  he && he.integerFormat && (he.integerFormat.parseWidth = he.integerFormat.mandatoryDigits);
4644
4676
  }
4645
- (C.component === "Z" || C.component === "z") && (C.integerFormat = xe(C.presentation1)), T.push(C), $ = j + 1;
4677
+ (C.component === "Z" || C.component === "z") && (C.integerFormat = xe(C.presentation1)), A.push(C), $ = j + 1;
4646
4678
  }
4647
4679
  j++;
4648
4680
  }
4649
4681
  return P($, j), b;
4650
4682
  }
4651
4683
  const ve = ["", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], Me = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], Qe = 1e3 * 60 * 60 * 24, _e = function(v) {
4652
- const T = Date.UTC(v.year, v.month);
4653
- var b = new Date(T).getUTCDay();
4654
- return b === 0 && (b = 7), b > 4 ? T + (8 - b) * Qe : T - (b - 1) * Qe;
4655
- }, ue = function(v, T) {
4684
+ const A = Date.UTC(v.year, v.month);
4685
+ var b = new Date(A).getUTCDay();
4686
+ return b === 0 && (b = 7), b > 4 ? A + (8 - b) * Qe : A - (b - 1) * Qe;
4687
+ }, ue = function(v, A) {
4656
4688
  return {
4657
4689
  year: v,
4658
- month: T,
4690
+ month: A,
4659
4691
  nextMonth: function() {
4660
- return T === 11 ? ue(v + 1, 0) : ue(v, T + 1);
4692
+ return A === 11 ? ue(v + 1, 0) : ue(v, A + 1);
4661
4693
  },
4662
4694
  previousMonth: function() {
4663
- return T === 0 ? ue(v - 1, 11) : ue(v, T - 1);
4695
+ return A === 0 ? ue(v - 1, 11) : ue(v, A - 1);
4664
4696
  },
4665
4697
  nextYear: function() {
4666
- return ue(v + 1, T);
4698
+ return ue(v + 1, A);
4667
4699
  },
4668
4700
  previousYear: function() {
4669
- return ue(v - 1, T);
4701
+ return ue(v - 1, A);
4670
4702
  }
4671
4703
  };
4672
- }, et = function(v, T) {
4673
- return (T - v) / (Qe * 7) + 1;
4674
- }, ae = (v, T) => {
4704
+ }, et = function(v, A) {
4705
+ return (A - v) / (Qe * 7) + 1;
4706
+ }, ae = (v, A) => {
4675
4707
  let b;
4676
- switch (T) {
4708
+ switch (A) {
4677
4709
  case "Y":
4678
4710
  b = v.getUTCFullYear();
4679
4711
  break;
@@ -4759,7 +4791,7 @@ function Ps() {
4759
4791
  return b;
4760
4792
  };
4761
4793
  let Fe = null;
4762
- function at(v, T, b) {
4794
+ function at(v, A, b) {
4763
4795
  var P = 0, $ = 0;
4764
4796
  if (typeof b < "u") {
4765
4797
  const we = parseInt(b);
@@ -4804,7 +4836,7 @@ function Ps() {
4804
4836
  return Q;
4805
4837
  };
4806
4838
  let C;
4807
- typeof T > "u" ? (Fe === null && (Fe = Ae("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")), C = Fe) : C = Ae(T);
4839
+ typeof A > "u" ? (Fe === null && (Fe = Ae("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")), C = Fe) : C = Ae(A);
4808
4840
  const F = (60 * P + $) * 60 * 1e3, X = new Date(v + F);
4809
4841
  let ye = "";
4810
4842
  return C.parts.forEach(function(we) {
@@ -4812,9 +4844,9 @@ function Ps() {
4812
4844
  }), ye;
4813
4845
  }
4814
4846
  function d(v) {
4815
- var T = {};
4847
+ var A = {};
4816
4848
  if (v.type === "datetime")
4817
- T.type = "datetime", T.parts = v.parts.map(function(b) {
4849
+ A.type = "datetime", A.parts = v.parts.map(function(b) {
4818
4850
  var P = {};
4819
4851
  if (b.type === "literal")
4820
4852
  P.regex = b.value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -4852,49 +4884,49 @@ function Ps() {
4852
4884
  return P.component = b.component, P;
4853
4885
  });
4854
4886
  else {
4855
- T.type = "integer";
4887
+ A.type = "integer";
4856
4888
  const b = v.case === L.UPPER;
4857
4889
  switch (v.primary) {
4858
- case E.LETTERS:
4859
- T.regex = b ? "[A-Z]+" : "[a-z]+", T.parse = function(P) {
4890
+ case T.LETTERS:
4891
+ A.regex = b ? "[A-Z]+" : "[a-z]+", A.parse = function(P) {
4860
4892
  return ne(P, b ? "A" : "a");
4861
4893
  };
4862
4894
  break;
4863
- case E.ROMAN:
4864
- T.regex = b ? "[MDCLXVI]+" : "[mdclxvi]+", T.parse = function(P) {
4895
+ case T.ROMAN:
4896
+ A.regex = b ? "[MDCLXVI]+" : "[mdclxvi]+", A.parse = function(P) {
4865
4897
  return H(b ? P : P.toUpperCase());
4866
4898
  };
4867
4899
  break;
4868
- case E.WORDS:
4869
- T.regex = "(?:" + Object.keys(A).concat("and", "[\\-, ]").join("|") + ")+", T.parse = function(P) {
4900
+ case T.WORDS:
4901
+ A.regex = "(?:" + Object.keys(E).concat("and", "[\\-, ]").join("|") + ")+", A.parse = function(P) {
4870
4902
  return I(P.toLowerCase());
4871
4903
  };
4872
4904
  break;
4873
- case E.DECIMAL:
4874
- T.regex = "[0-9]", v.parseWidth ? T.regex += `{${v.parseWidth}}` : T.regex += "+", v.ordinal && (T.regex += "(?:th|st|nd|rd)"), T.parse = function(P) {
4905
+ case T.DECIMAL:
4906
+ A.regex = "[0-9]", v.parseWidth ? A.regex += `{${v.parseWidth}}` : A.regex += "+", v.ordinal && (A.regex += "(?:th|st|nd|rd)"), A.parse = function(P) {
4875
4907
  let $ = P;
4876
4908
  return v.ordinal && ($ = P.substring(0, P.length - 2)), v.regular ? $ = $.split(",").join("") : v.groupingSeparators.forEach((j) => {
4877
4909
  $ = $.split(j.character).join("");
4878
4910
  }), v.zeroCode !== 48 && ($ = $.split("").map((j) => String.fromCodePoint(j.codePointAt(0) - v.zeroCode + 48)).join("")), parseInt($);
4879
4911
  };
4880
4912
  break;
4881
- case E.SEQUENCE:
4913
+ case T.SEQUENCE:
4882
4914
  throw {
4883
4915
  code: "D3130",
4884
4916
  value: v.token
4885
4917
  };
4886
4918
  }
4887
4919
  }
4888
- return T;
4920
+ return A;
4889
4921
  }
4890
- function m(v, T) {
4922
+ function m(v, A) {
4891
4923
  if (typeof v > "u")
4892
4924
  return;
4893
- const b = xe(T);
4925
+ const b = xe(A);
4894
4926
  return d(b).parse(v);
4895
4927
  }
4896
- function q(v, T) {
4897
- const b = Ae(T), P = d(b), $ = "^" + P.parts.map((X) => "(" + X.regex + ")").join("") + "$";
4928
+ function q(v, A) {
4929
+ const b = Ae(A), P = d(b), $ = "^" + P.parts.map((X) => "(" + X.regex + ")").join("") + "$";
4898
4930
  var C = new RegExp($, "i").exec(v);
4899
4931
  if (C !== null) {
4900
4932
  const Y = {};
@@ -4938,9 +4970,9 @@ function Ps() {
4938
4970
  }
4939
4971
  }
4940
4972
  var le = new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");
4941
- function De(v, T) {
4973
+ function De(v, A) {
4942
4974
  if (!(typeof v > "u"))
4943
- if (typeof T > "u") {
4975
+ if (typeof A > "u") {
4944
4976
  if (!le.test(v))
4945
4977
  throw {
4946
4978
  stack: new Error().stack,
@@ -4949,11 +4981,11 @@ function Ps() {
4949
4981
  };
4950
4982
  return Date.parse(v);
4951
4983
  } else
4952
- return q.call(this, v, T);
4984
+ return q.call(this, v, A);
4953
4985
  }
4954
- function Ee(v, T, b) {
4986
+ function Ee(v, A, b) {
4955
4987
  if (!(typeof v > "u"))
4956
- return at.call(this, v, T, b);
4988
+ return at.call(this, v, A, b);
4957
4989
  }
4958
4990
  return {
4959
4991
  formatInteger: B,
@@ -4968,7 +5000,7 @@ function Ps() {
4968
5000
  (function() {
4969
5001
  var c = t("./utils");
4970
5002
  const f = (() => {
4971
- var k = c.isNumeric, _ = c.isArrayOfStrings, R = c.isArrayOfNumbers, S = c.createSequence, w = c.isSequence, A = c.isFunction, I = c.isLambda, se = c.isPromise, me = c.getFunctionArity, ge = c.isDeepEqual, H = c.stringToArray;
5003
+ var w = c.isNumeric, _ = c.isArrayOfStrings, R = c.isArrayOfNumbers, S = c.createSequence, k = c.isSequence, E = c.isFunction, I = c.isLambda, se = c.isPromise, me = c.getFunctionArity, ge = c.isDeepEqual, H = c.stringToArray;
4972
5004
  function N(n) {
4973
5005
  if (!(typeof n > "u")) {
4974
5006
  var o = 0;
@@ -4984,7 +5016,7 @@ function Ps() {
4984
5016
  if (!(typeof n > "u" || n.length === 0))
4985
5017
  return Math.max.apply(Math, n);
4986
5018
  }
4987
- function E(n) {
5019
+ function T(n) {
4988
5020
  if (!(typeof n > "u" || n.length === 0))
4989
5021
  return Math.min.apply(Math, n);
4990
5022
  }
@@ -5001,7 +5033,7 @@ function Ps() {
5001
5033
  var l;
5002
5034
  if (typeof n == "string")
5003
5035
  l = n;
5004
- else if (A(n))
5036
+ else if (E(n))
5005
5037
  l = "";
5006
5038
  else {
5007
5039
  if (typeof n == "number" && !isFinite(n))
@@ -5012,7 +5044,7 @@ function Ps() {
5012
5044
  };
5013
5045
  var g = o ? 2 : 0;
5014
5046
  Array.isArray(n) && n.outerWrapper && (n = n[0]), l = JSON.stringify(n, function(p, x) {
5015
- return typeof x < "u" && x !== null && x.toPrecision && k(x) ? Number(x.toPrecision(15)) : x && A(x) ? "" : x;
5047
+ return typeof x < "u" && x !== null && x.toPrecision && w(x) ? Number(x.toPrecision(15)) : x && E(x) ? "" : x;
5016
5048
  }, g);
5017
5049
  }
5018
5050
  return l;
@@ -5076,7 +5108,7 @@ function Ps() {
5076
5108
  }
5077
5109
  async function ue(n, o) {
5078
5110
  var l = n.apply(this, [o]);
5079
- if (se(l) && (l = await l), l && !(typeof l.start == "number" || l.end === "number" || Array.isArray(l.groups) || A(l.next)))
5111
+ if (se(l) && (l = await l), l && !(typeof l.start == "number" || l.end === "number" || Array.isArray(l.groups) || E(l.next)))
5080
5112
  throw {
5081
5113
  code: "T1010",
5082
5114
  stack: new Error().stack
@@ -5307,7 +5339,7 @@ function Ps() {
5307
5339
  if (!(typeof n > "u"))
5308
5340
  return typeof o > "u" && (o = ""), n.join(o);
5309
5341
  }
5310
- function T(n, o, l) {
5342
+ function A(n, o, l) {
5311
5343
  if (!(typeof n > "u")) {
5312
5344
  var g = {
5313
5345
  "decimal-separator": ".",
@@ -5439,18 +5471,18 @@ function Ps() {
5439
5471
  if ($e.minimumExponentSize === 0)
5440
5472
  Dt = Yt;
5441
5473
  else {
5442
- var vn = Math.pow(10, $e.scalingFactor), bn = Math.pow(10, $e.scalingFactor - 1);
5443
- for (Dt = Yt, Ut = 0; Dt < bn; )
5474
+ var bn = Math.pow(10, $e.scalingFactor), wn = Math.pow(10, $e.scalingFactor - 1);
5475
+ for (Dt = Yt, Ut = 0; Dt < wn; )
5444
5476
  Dt *= 10, Ut -= 1;
5445
- for (; Dt > vn; )
5477
+ for (; Dt > bn; )
5446
5478
  Dt /= 10, Ut += 1;
5447
5479
  }
5448
- var wn = F(Dt, $e.maximumFactionalPartSize), $r = function(te, Re) {
5480
+ var kn = F(Dt, $e.maximumFactionalPartSize), $r = function(te, Re) {
5449
5481
  var Ye = Math.abs(te).toFixed(Re);
5450
5482
  return it !== "0" && (Ye = Ye.split("").map(function(Ne) {
5451
5483
  return Ne >= "0" && Ne <= "9" ? x[Ne.charCodeAt(0) - 48] : Ne;
5452
5484
  }).join("")), Ye;
5453
- }, oe = $r(wn, $e.maximumFactionalPartSize), He = oe.indexOf(".");
5485
+ }, oe = $r(kn, $e.maximumFactionalPartSize), He = oe.indexOf(".");
5454
5486
  for (He === -1 ? oe = oe + ze : oe = oe.replace(".", ze); oe.charAt(0) === it; )
5455
5487
  oe = oe.substring(1);
5456
5488
  for (; oe.charAt(oe.length - 1) === it; )
@@ -5458,7 +5490,7 @@ function Ps() {
5458
5490
  He = oe.indexOf(ze);
5459
5491
  var Gt = $e.minimumIntegerPartSize - He, Ur = $e.minimumFactionalPartSize - (oe.length - He - 1);
5460
5492
  if (oe = (Gt > 0 ? new Array(Gt + 1).join(it) : "") + oe, oe = oe + (Ur > 0 ? new Array(Ur + 1).join(it) : ""), He = oe.indexOf(ze), $e.regularGrouping > 0)
5461
- for (var kn = Math.floor((He - 1) / $e.regularGrouping), hr = 1; hr <= kn; hr++)
5493
+ for (var xn = Math.floor((He - 1) / $e.regularGrouping), hr = 1; hr <= xn; hr++)
5462
5494
  oe = [oe.slice(0, He - hr * $e.regularGrouping), $t, oe.slice(He - hr * $e.regularGrouping)].join("");
5463
5495
  else
5464
5496
  $e.integerPartGroupingPositions.forEach(function(te) {
@@ -5577,7 +5609,7 @@ function Ps() {
5577
5609
  });
5578
5610
  o = l.length > 0;
5579
5611
  }
5580
- } else typeof n == "string" ? n.length > 0 && (o = !0) : k(n) ? n !== 0 && (o = !0) : n !== null && typeof n == "object" && !A(n) ? Object.keys(n).length > 0 && (o = !0) : typeof n == "boolean" && n === !0 && (o = !0);
5612
+ } else typeof n == "string" ? n.length > 0 && (o = !0) : w(n) ? n !== 0 && (o = !0) : n !== null && typeof n == "object" && !E(n) ? Object.keys(n).length > 0 && (o = !0) : typeof n == "boolean" && n === !0 && (o = !0);
5581
5613
  return o;
5582
5614
  }
5583
5615
  }
@@ -5669,7 +5701,7 @@ function Ps() {
5669
5701
  l[x] = !0;
5670
5702
  });
5671
5703
  }), o = We(l);
5672
- } else n !== null && typeof n == "object" && !A(n) && Object.keys(n).forEach((g) => o.push(g));
5704
+ } else n !== null && typeof n == "object" && !E(n) && Object.keys(n).forEach((g) => o.push(g));
5673
5705
  return o;
5674
5706
  }
5675
5707
  function vt(n, o) {
@@ -5680,7 +5712,7 @@ function Ps() {
5680
5712
  var p = vt(n[g], o);
5681
5713
  typeof p < "u" && (Array.isArray(p) ? p.forEach((x) => l.push(x)) : l.push(p));
5682
5714
  }
5683
- } else n !== null && typeof n == "object" && !A(n) && (l = n[o]);
5715
+ } else n !== null && typeof n == "object" && !E(n) && (l = n[o]);
5684
5716
  return l;
5685
5717
  }
5686
5718
  function _t(n, o) {
@@ -5747,7 +5779,7 @@ function Ps() {
5747
5779
  }
5748
5780
  function ht(n) {
5749
5781
  if (n !== void 0)
5750
- return n === null ? "null" : k(n) ? "number" : typeof n == "string" ? "string" : typeof n == "boolean" ? "boolean" : Array.isArray(n) ? "array" : A(n) ? "function" : "object";
5782
+ return n === null ? "null" : w(n) ? "number" : typeof n == "string" ? "string" : typeof n == "boolean" ? "boolean" : Array.isArray(n) ? "array" : E(n) ? "function" : "object";
5751
5783
  }
5752
5784
  async function Ce(n, o) {
5753
5785
  if (!(typeof n > "u")) {
@@ -5795,7 +5827,7 @@ function Ps() {
5795
5827
  if (!(typeof n > "u")) {
5796
5828
  if (!Array.isArray(n) || n.length <= 1)
5797
5829
  return n;
5798
- for (var o = w(n) ? S() : [], l = 0; l < n.length; l++) {
5830
+ for (var o = k(n) ? S() : [], l = 0; l < n.length; l++) {
5799
5831
  for (var g = n[l], p = !1, x = 0; x < o.length; x++)
5800
5832
  if (ge(g, o[x])) {
5801
5833
  p = !0;
@@ -5818,7 +5850,7 @@ function Ps() {
5818
5850
  sum: N,
5819
5851
  count: ne,
5820
5852
  max: B,
5821
- min: E,
5853
+ min: T,
5822
5854
  average: L,
5823
5855
  string: V,
5824
5856
  substring: de,
@@ -5834,7 +5866,7 @@ function Ps() {
5834
5866
  replace: Fe,
5835
5867
  split: Ee,
5836
5868
  join: v,
5837
- formatNumber: T,
5869
+ formatNumber: A,
5838
5870
  formatBase: b,
5839
5871
  number: P,
5840
5872
  floor: j,
@@ -5878,8 +5910,8 @@ function Ps() {
5878
5910
  }).call(this);
5879
5911
  }).call(this, typeof qr < "u" ? qr : typeof self < "u" ? self : typeof window < "u" ? window : {});
5880
5912
  }, { "./utils": 6 }], 3: [function(t, a, s) {
5881
- var i = t("./datetime"), c = t("./functions"), f = t("./utils"), k = t("./parser"), _ = t("./signature"), R = (function() {
5882
- var S = f.isNumeric, w = f.isArrayOfStrings, A = f.isArrayOfNumbers, I = f.createSequence, se = f.isSequence, me = f.isFunction, ge = f.isLambda, H = f.isIterable, N = f.isPromise, ne = f.getFunctionArity, B = f.isDeepEqual, E = ot(null);
5913
+ var i = t("./datetime"), c = t("./functions"), f = t("./utils"), w = t("./parser"), _ = t("./signature"), R = (function() {
5914
+ var S = f.isNumeric, k = f.isArrayOfStrings, E = f.isArrayOfNumbers, I = f.createSequence, se = f.isSequence, me = f.isFunction, ge = f.isLambda, H = f.isIterable, N = f.isPromise, ne = f.getFunctionArity, B = f.isDeepEqual, T = ot(null);
5883
5915
  async function L(u, h, y) {
5884
5916
  var n, o = y.lookup(Symbol.for("jsonata.__evaluate_entry"));
5885
5917
  switch (o && await o(u, h, y), u.type) {
@@ -5943,7 +5975,7 @@ function Ps() {
5943
5975
  if (Object.prototype.hasOwnProperty.call(u, "predicate"))
5944
5976
  for (var l = 0; l < u.predicate.length; l++)
5945
5977
  n = await ve(u.predicate[l].expr, n, y);
5946
- u.type !== "path" && Object.prototype.hasOwnProperty.call(u, "group") && (n = await T(u.group, n, y));
5978
+ u.type !== "path" && Object.prototype.hasOwnProperty.call(u, "group") && (n = await A(u.group, n, y));
5947
5979
  var g = y.lookup(Symbol.for("jsonata.__evaluate_exit"));
5948
5980
  return g && await g(u, h, y, n), n && se(n) && !n.tupleStream && (u.keepArray && (n.keepSingleton = !0), n.length === 0 ? n = void 0 : n.length === 1 && (n = n.keepSingleton ? n : n[0])), n;
5949
5981
  }
@@ -5962,7 +5994,7 @@ function Ps() {
5962
5994
  else
5963
5995
  for (o = I(), p = 0; p < g.length; p++)
5964
5996
  o.push(g[p]["@"]);
5965
- return u.keepSingletonArray && (Array.isArray(o) && o.cons && !o.sequence && (o = I(o)), o.keepSingleton = !0), u.hasOwnProperty("group") && (o = await T(u.group, l ? g : o, y)), o;
5997
+ return u.keepSingletonArray && (Array.isArray(o) && o.cons && !o.sequence && (o = I(o)), o.keepSingleton = !0), u.hasOwnProperty("group") && (o = await A(u.group, l ? g : o, y)), o;
5966
5998
  }
5967
5999
  function de(u, h) {
5968
6000
  var y = ot(u);
@@ -6045,7 +6077,7 @@ function Ps() {
6045
6077
  var l = h[o], g = l, p = y;
6046
6078
  h.tupleStream && (g = l["@"], p = de(y, l));
6047
6079
  var x = await L(u, g, p);
6048
- S(x) && (x = [x]), A(x) ? x.forEach(function(W) {
6080
+ S(x) && (x = [x]), E(x) ? x.forEach(function(W) {
6049
6081
  var K = Math.floor(W);
6050
6082
  K < 0 && (K = h.length + K), K === o && n.push(l);
6051
6083
  }) : c.boolean(x) && n.push(l);
@@ -6126,7 +6158,7 @@ function Ps() {
6126
6158
  });
6127
6159
  break;
6128
6160
  case "{":
6129
- n = await T(u, h, y);
6161
+ n = await A(u, h, y);
6130
6162
  break;
6131
6163
  }
6132
6164
  return n;
@@ -6274,7 +6306,7 @@ function Ps() {
6274
6306
  var y, n = "", o = "";
6275
6307
  return typeof u < "u" && (n = c.string(u)), typeof h < "u" && (o = c.string(h)), y = n.concat(o), y;
6276
6308
  }
6277
- async function T(u, h, y) {
6309
+ async function A(u, h, y) {
6278
6310
  var n = {}, o = {}, l = !!(h && h.tupleStream);
6279
6311
  Array.isArray(h) || (h = I(h)), h.length === 0 && h.push(void 0);
6280
6312
  for (var g = 0; g < h.length; g++)
@@ -6481,7 +6513,7 @@ function Ps() {
6481
6513
  var pe = await L(u.delete, M, y);
6482
6514
  if (typeof pe < "u") {
6483
6515
  var Pe = pe;
6484
- if (Array.isArray(pe) || (pe = [pe]), !w(pe))
6516
+ if (Array.isArray(pe) || (pe = [pe]), !k(pe))
6485
6517
  throw {
6486
6518
  code: "T2012",
6487
6519
  stack: new Error().stack,
@@ -6499,7 +6531,7 @@ function Ps() {
6499
6531
  };
6500
6532
  return Z(n, "<(oa):o>");
6501
6533
  }
6502
- var J = k("function($f, $g) { function($x){ $g($f($x)) } }");
6534
+ var J = w("function($f, $g) { function($x){ $g($f($x)) } }");
6503
6535
  async function Q(u, h, y) {
6504
6536
  var n, o = await L(u.lhs, h, y);
6505
6537
  if (u.rhs.type === "function")
@@ -6658,7 +6690,7 @@ function Ps() {
6658
6690
  y = y.map(function(g) {
6659
6691
  return "$" + g.trim();
6660
6692
  });
6661
- var n = "function(" + y.join(", ") + "){ _ }", o = k(n);
6693
+ var n = "function(" + y.join(", ") + "){ _ }", o = w(n);
6662
6694
  o.body = u;
6663
6695
  var l = vt(o, h);
6664
6696
  return l;
@@ -6687,7 +6719,7 @@ function Ps() {
6687
6719
  var y = this.input;
6688
6720
  typeof h < "u" && (y = h, Array.isArray(y) && !se(y) && (y = I(y), y.outerWrapper = !0));
6689
6721
  try {
6690
- var n = k(u, !1);
6722
+ var n = w(u, !1);
6691
6723
  } catch (l) {
6692
6724
  throw ht(l), {
6693
6725
  stack: new Error().stack,
@@ -6736,7 +6768,7 @@ function Ps() {
6736
6768
  }
6737
6769
  return y;
6738
6770
  }
6739
- E.bind("sum", Z(c.sum, "<a<n>:n>")), E.bind("count", Z(c.count, "<a:n>")), E.bind("max", Z(c.max, "<a<n>:n>")), E.bind("min", Z(c.min, "<a<n>:n>")), E.bind("average", Z(c.average, "<a<n>:n>")), E.bind("string", Z(c.string, "<x-b?:s>")), E.bind("substring", Z(c.substring, "<s-nn?:s>")), E.bind("substringBefore", Z(c.substringBefore, "<s-s:s>")), E.bind("substringAfter", Z(c.substringAfter, "<s-s:s>")), E.bind("lowercase", Z(c.lowercase, "<s-:s>")), E.bind("uppercase", Z(c.uppercase, "<s-:s>")), E.bind("length", Z(c.length, "<s-:n>")), E.bind("trim", Z(c.trim, "<s-:s>")), E.bind("pad", Z(c.pad, "<s-ns?:s>")), E.bind("match", Z(c.match, "<s-f<s:o>n?:a<o>>")), E.bind("contains", Z(c.contains, "<s-(sf):b>")), E.bind("replace", Z(c.replace, "<s-(sf)(sf)n?:s>")), E.bind("split", Z(c.split, "<s-(sf)n?:a<s>>")), E.bind("join", Z(c.join, "<a<s>s?:s>")), E.bind("formatNumber", Z(c.formatNumber, "<n-so?:s>")), E.bind("formatBase", Z(c.formatBase, "<n-n?:s>")), E.bind("formatInteger", Z(i.formatInteger, "<n-s:s>")), E.bind("parseInteger", Z(i.parseInteger, "<s-s:n>")), E.bind("number", Z(c.number, "<(nsb)-:n>")), E.bind("floor", Z(c.floor, "<n-:n>")), E.bind("ceil", Z(c.ceil, "<n-:n>")), E.bind("round", Z(c.round, "<n-n?:n>")), E.bind("abs", Z(c.abs, "<n-:n>")), E.bind("sqrt", Z(c.sqrt, "<n-:n>")), E.bind("power", Z(c.power, "<n-n:n>")), E.bind("random", Z(c.random, "<:n>")), E.bind("boolean", Z(c.boolean, "<x-:b>")), E.bind("not", Z(c.not, "<x-:b>")), E.bind("map", Z(c.map, "<af>")), E.bind("zip", Z(c.zip, "<a+>")), E.bind("filter", Z(c.filter, "<af>")), E.bind("single", Z(c.single, "<af?>")), E.bind("reduce", Z(c.foldLeft, "<afj?:j>")), E.bind("sift", Z(c.sift, "<o-f?:o>")), E.bind("keys", Z(c.keys, "<x-:a<s>>")), E.bind("lookup", Z(c.lookup, "<x-s:x>")), E.bind("append", Z(c.append, "<xx:a>")), E.bind("exists", Z(c.exists, "<x:b>")), E.bind("spread", Z(c.spread, "<x-:a<o>>")), E.bind("merge", Z(c.merge, "<a<o>:o>")), E.bind("reverse", Z(c.reverse, "<a:a>")), E.bind("each", Z(c.each, "<o-f:a>")), E.bind("error", Z(c.error, "<s?:x>")), E.bind("assert", Z(c.assert, "<bs?:x>")), E.bind("type", Z(c.type, "<x:s>")), E.bind("sort", Z(c.sort, "<af?:a>")), E.bind("shuffle", Z(c.shuffle, "<a:a>")), E.bind("distinct", Z(c.distinct, "<x:x>")), E.bind("base64encode", Z(c.base64encode, "<s-:s>")), E.bind("base64decode", Z(c.base64decode, "<s-:s>")), E.bind("encodeUrlComponent", Z(c.encodeUrlComponent, "<s-:s>")), E.bind("encodeUrl", Z(c.encodeUrl, "<s-:s>")), E.bind("decodeUrlComponent", Z(c.decodeUrlComponent, "<s-:s>")), E.bind("decodeUrl", Z(c.decodeUrl, "<s-:s>")), E.bind("eval", Z(dr, "<sx?:x>")), E.bind("toMillis", Z(i.toMillis, "<s-s?:n>")), E.bind("fromMillis", Z(i.fromMillis, "<n-s?s?:s>")), E.bind("clone", Z(Ht, "<(oa)-:o>"));
6771
+ T.bind("sum", Z(c.sum, "<a<n>:n>")), T.bind("count", Z(c.count, "<a:n>")), T.bind("max", Z(c.max, "<a<n>:n>")), T.bind("min", Z(c.min, "<a<n>:n>")), T.bind("average", Z(c.average, "<a<n>:n>")), T.bind("string", Z(c.string, "<x-b?:s>")), T.bind("substring", Z(c.substring, "<s-nn?:s>")), T.bind("substringBefore", Z(c.substringBefore, "<s-s:s>")), T.bind("substringAfter", Z(c.substringAfter, "<s-s:s>")), T.bind("lowercase", Z(c.lowercase, "<s-:s>")), T.bind("uppercase", Z(c.uppercase, "<s-:s>")), T.bind("length", Z(c.length, "<s-:n>")), T.bind("trim", Z(c.trim, "<s-:s>")), T.bind("pad", Z(c.pad, "<s-ns?:s>")), T.bind("match", Z(c.match, "<s-f<s:o>n?:a<o>>")), T.bind("contains", Z(c.contains, "<s-(sf):b>")), T.bind("replace", Z(c.replace, "<s-(sf)(sf)n?:s>")), T.bind("split", Z(c.split, "<s-(sf)n?:a<s>>")), T.bind("join", Z(c.join, "<a<s>s?:s>")), T.bind("formatNumber", Z(c.formatNumber, "<n-so?:s>")), T.bind("formatBase", Z(c.formatBase, "<n-n?:s>")), T.bind("formatInteger", Z(i.formatInteger, "<n-s:s>")), T.bind("parseInteger", Z(i.parseInteger, "<s-s:n>")), T.bind("number", Z(c.number, "<(nsb)-:n>")), T.bind("floor", Z(c.floor, "<n-:n>")), T.bind("ceil", Z(c.ceil, "<n-:n>")), T.bind("round", Z(c.round, "<n-n?:n>")), T.bind("abs", Z(c.abs, "<n-:n>")), T.bind("sqrt", Z(c.sqrt, "<n-:n>")), T.bind("power", Z(c.power, "<n-n:n>")), T.bind("random", Z(c.random, "<:n>")), T.bind("boolean", Z(c.boolean, "<x-:b>")), T.bind("not", Z(c.not, "<x-:b>")), T.bind("map", Z(c.map, "<af>")), T.bind("zip", Z(c.zip, "<a+>")), T.bind("filter", Z(c.filter, "<af>")), T.bind("single", Z(c.single, "<af?>")), T.bind("reduce", Z(c.foldLeft, "<afj?:j>")), T.bind("sift", Z(c.sift, "<o-f?:o>")), T.bind("keys", Z(c.keys, "<x-:a<s>>")), T.bind("lookup", Z(c.lookup, "<x-s:x>")), T.bind("append", Z(c.append, "<xx:a>")), T.bind("exists", Z(c.exists, "<x:b>")), T.bind("spread", Z(c.spread, "<x-:a<o>>")), T.bind("merge", Z(c.merge, "<a<o>:o>")), T.bind("reverse", Z(c.reverse, "<a:a>")), T.bind("each", Z(c.each, "<o-f:a>")), T.bind("error", Z(c.error, "<s?:x>")), T.bind("assert", Z(c.assert, "<bs?:x>")), T.bind("type", Z(c.type, "<x:s>")), T.bind("sort", Z(c.sort, "<af?:a>")), T.bind("shuffle", Z(c.shuffle, "<a:a>")), T.bind("distinct", Z(c.distinct, "<x:x>")), T.bind("base64encode", Z(c.base64encode, "<s-:s>")), T.bind("base64decode", Z(c.base64decode, "<s-:s>")), T.bind("encodeUrlComponent", Z(c.encodeUrlComponent, "<s-:s>")), T.bind("encodeUrl", Z(c.encodeUrl, "<s-:s>")), T.bind("decodeUrlComponent", Z(c.decodeUrlComponent, "<s-:s>")), T.bind("decodeUrl", Z(c.decodeUrl, "<s-:s>")), T.bind("eval", Z(dr, "<sx?:x>")), T.bind("toMillis", Z(i.toMillis, "<s-s?:n>")), T.bind("fromMillis", Z(i.fromMillis, "<n-s?s?:s>")), T.bind("clone", Z(Ht, "<(oa)-:o>"));
6740
6772
  var Ft = {
6741
6773
  S0101: "String literal must be terminated by a matching quote",
6742
6774
  S0102: "Number out of range: {{token}}",
@@ -6852,11 +6884,11 @@ function Ps() {
6852
6884
  function Ce(u, h) {
6853
6885
  var y, n;
6854
6886
  try {
6855
- y = k(u, h && h.recover), n = y.errors, delete y.errors;
6887
+ y = w(u, h && h.recover), n = y.errors, delete y.errors;
6856
6888
  } catch (g) {
6857
6889
  throw ht(g), g;
6858
6890
  }
6859
- var o = ot(E), l = /* @__PURE__ */ new Date();
6891
+ var o = ot(T), l = /* @__PURE__ */ new Date();
6860
6892
  return o.bind("now", Z(function(g, p) {
6861
6893
  return i.fromMillis(l.getTime(), g, p);
6862
6894
  }, "<s?s?:s>")), o.bind("millis", Z(function() {
@@ -6900,7 +6932,7 @@ function Ps() {
6900
6932
  }
6901
6933
  };
6902
6934
  }
6903
- return Ce.parser = k, Ce;
6935
+ return Ce.parser = w, Ce;
6904
6936
  })();
6905
6937
  a.exports = R;
6906
6938
  }, { "./datetime": 1, "./functions": 2, "./parser": 4, "./signature": 5, "./utils": 6 }], 4: [function(t, a, s) {
@@ -6947,7 +6979,7 @@ function Ps() {
6947
6979
  // not an operator, but needed as a stop character for name tokens
6948
6980
  "~": 0
6949
6981
  // not an operator, but needed as a stop character for name tokens
6950
- }, k = {
6982
+ }, w = {
6951
6983
  // JSON string escape sequences - see json.org
6952
6984
  '"': '"',
6953
6985
  "\\": "\\",
@@ -6959,11 +6991,11 @@ function Ps() {
6959
6991
  r: "\r",
6960
6992
  t: " "
6961
6993
  }, _ = function(S) {
6962
- var w = 0, A = S.length, I = function(ge, H) {
6963
- var N = { type: ge, value: H, position: w };
6994
+ var k = 0, E = S.length, I = function(ge, H) {
6995
+ var N = { type: ge, value: H, position: k };
6964
6996
  return N;
6965
6997
  }, se = function() {
6966
- for (var ge = w, H = 0, N, ne, B = function(L) {
6998
+ for (var ge = k, H = 0, N, ne, B = function(L) {
6967
6999
  if (S.charAt(L) === "/" && H === 0) {
6968
7000
  for (var V = 0; S.charAt(L - (V + 1)) === "\\"; )
6969
7001
  V++;
@@ -6971,132 +7003,132 @@ function Ps() {
6971
7003
  return !0;
6972
7004
  }
6973
7005
  return !1;
6974
- }; w < A; ) {
6975
- var E = S.charAt(w);
6976
- if (B(w)) {
6977
- if (N = S.substring(ge, w), N === "")
7006
+ }; k < E; ) {
7007
+ var T = S.charAt(k);
7008
+ if (B(k)) {
7009
+ if (N = S.substring(ge, k), N === "")
6978
7010
  throw {
6979
7011
  code: "S0301",
6980
7012
  stack: new Error().stack,
6981
- position: w
7013
+ position: k
6982
7014
  };
6983
- for (w++, E = S.charAt(w), ge = w; E === "i" || E === "m"; )
6984
- w++, E = S.charAt(w);
6985
- return ne = S.substring(ge, w) + "g", new RegExp(N, ne);
7015
+ for (k++, T = S.charAt(k), ge = k; T === "i" || T === "m"; )
7016
+ k++, T = S.charAt(k);
7017
+ return ne = S.substring(ge, k) + "g", new RegExp(N, ne);
6986
7018
  }
6987
- (E === "(" || E === "[" || E === "{") && S.charAt(w - 1) !== "\\" && H++, (E === ")" || E === "]" || E === "}") && S.charAt(w - 1) !== "\\" && H--, w++;
7019
+ (T === "(" || T === "[" || T === "{") && S.charAt(k - 1) !== "\\" && H++, (T === ")" || T === "]" || T === "}") && S.charAt(k - 1) !== "\\" && H--, k++;
6988
7020
  }
6989
7021
  throw {
6990
7022
  code: "S0302",
6991
7023
  stack: new Error().stack,
6992
- position: w
7024
+ position: k
6993
7025
  };
6994
7026
  }, me = function(ge) {
6995
- if (w >= A) return null;
6996
- for (var H = S.charAt(w); w < A && `
7027
+ if (k >= E) return null;
7028
+ for (var H = S.charAt(k); k < E && `
6997
7029
  \r\v`.indexOf(H) > -1; )
6998
- w++, H = S.charAt(w);
6999
- if (H === "/" && S.charAt(w + 1) === "*") {
7000
- var N = w;
7001
- for (w += 2, H = S.charAt(w); !(H === "*" && S.charAt(w + 1) === "/"); )
7002
- if (H = S.charAt(++w), w >= A)
7030
+ k++, H = S.charAt(k);
7031
+ if (H === "/" && S.charAt(k + 1) === "*") {
7032
+ var N = k;
7033
+ for (k += 2, H = S.charAt(k); !(H === "*" && S.charAt(k + 1) === "/"); )
7034
+ if (H = S.charAt(++k), k >= E)
7003
7035
  throw {
7004
7036
  code: "S0106",
7005
7037
  stack: new Error().stack,
7006
7038
  position: N
7007
7039
  };
7008
- return w += 2, H = S.charAt(w), me(ge);
7040
+ return k += 2, H = S.charAt(k), me(ge);
7009
7041
  }
7010
7042
  if (ge !== !0 && H === "/")
7011
- return w++, I("regex", se());
7012
- if (H === "." && S.charAt(w + 1) === ".")
7013
- return w += 2, I("operator", "..");
7014
- if (H === ":" && S.charAt(w + 1) === "=")
7015
- return w += 2, I("operator", ":=");
7016
- if (H === "!" && S.charAt(w + 1) === "=")
7017
- return w += 2, I("operator", "!=");
7018
- if (H === ">" && S.charAt(w + 1) === "=")
7019
- return w += 2, I("operator", ">=");
7020
- if (H === "<" && S.charAt(w + 1) === "=")
7021
- return w += 2, I("operator", "<=");
7022
- if (H === "*" && S.charAt(w + 1) === "*")
7023
- return w += 2, I("operator", "**");
7024
- if (H === "~" && S.charAt(w + 1) === ">")
7025
- return w += 2, I("operator", "~>");
7026
- if (H === "?" && S.charAt(w + 1) === ":")
7027
- return w += 2, I("operator", "?:");
7028
- if (H === "?" && S.charAt(w + 1) === "?")
7029
- return w += 2, I("operator", "??");
7043
+ return k++, I("regex", se());
7044
+ if (H === "." && S.charAt(k + 1) === ".")
7045
+ return k += 2, I("operator", "..");
7046
+ if (H === ":" && S.charAt(k + 1) === "=")
7047
+ return k += 2, I("operator", ":=");
7048
+ if (H === "!" && S.charAt(k + 1) === "=")
7049
+ return k += 2, I("operator", "!=");
7050
+ if (H === ">" && S.charAt(k + 1) === "=")
7051
+ return k += 2, I("operator", ">=");
7052
+ if (H === "<" && S.charAt(k + 1) === "=")
7053
+ return k += 2, I("operator", "<=");
7054
+ if (H === "*" && S.charAt(k + 1) === "*")
7055
+ return k += 2, I("operator", "**");
7056
+ if (H === "~" && S.charAt(k + 1) === ">")
7057
+ return k += 2, I("operator", "~>");
7058
+ if (H === "?" && S.charAt(k + 1) === ":")
7059
+ return k += 2, I("operator", "?:");
7060
+ if (H === "?" && S.charAt(k + 1) === "?")
7061
+ return k += 2, I("operator", "??");
7030
7062
  if (Object.prototype.hasOwnProperty.call(f, H))
7031
- return w++, I("operator", H);
7063
+ return k++, I("operator", H);
7032
7064
  if (H === '"' || H === "'") {
7033
7065
  var ne = H;
7034
- w++;
7035
- for (var B = ""; w < A; ) {
7036
- if (H = S.charAt(w), H === "\\")
7037
- if (w++, H = S.charAt(w), Object.prototype.hasOwnProperty.call(k, H))
7038
- B += k[H];
7066
+ k++;
7067
+ for (var B = ""; k < E; ) {
7068
+ if (H = S.charAt(k), H === "\\")
7069
+ if (k++, H = S.charAt(k), Object.prototype.hasOwnProperty.call(w, H))
7070
+ B += w[H];
7039
7071
  else if (H === "u") {
7040
- var E = S.substr(w + 1, 4);
7041
- if (/^[0-9a-fA-F]+$/.test(E)) {
7042
- var L = parseInt(E, 16);
7043
- B += String.fromCharCode(L), w += 4;
7072
+ var T = S.substr(k + 1, 4);
7073
+ if (/^[0-9a-fA-F]+$/.test(T)) {
7074
+ var L = parseInt(T, 16);
7075
+ B += String.fromCharCode(L), k += 4;
7044
7076
  } else
7045
7077
  throw {
7046
7078
  code: "S0104",
7047
7079
  stack: new Error().stack,
7048
- position: w
7080
+ position: k
7049
7081
  };
7050
7082
  } else
7051
7083
  throw {
7052
7084
  code: "S0103",
7053
7085
  stack: new Error().stack,
7054
- position: w,
7086
+ position: k,
7055
7087
  token: H
7056
7088
  };
7057
7089
  else {
7058
7090
  if (H === ne)
7059
- return w++, I("string", B);
7091
+ return k++, I("string", B);
7060
7092
  B += H;
7061
7093
  }
7062
- w++;
7094
+ k++;
7063
7095
  }
7064
7096
  throw {
7065
7097
  code: "S0101",
7066
7098
  stack: new Error().stack,
7067
- position: w
7099
+ position: k
7068
7100
  };
7069
7101
  }
7070
- var V = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/, de = V.exec(S.substring(w));
7102
+ var V = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/, de = V.exec(S.substring(k));
7071
7103
  if (de !== null) {
7072
7104
  var xe = parseFloat(de[0]);
7073
7105
  if (!isNaN(xe) && isFinite(xe))
7074
- return w += de[0].length, I("number", xe);
7106
+ return k += de[0].length, I("number", xe);
7075
7107
  throw {
7076
7108
  code: "S0102",
7077
7109
  stack: new Error().stack,
7078
- position: w,
7110
+ position: k,
7079
7111
  token: de[0]
7080
7112
  };
7081
7113
  }
7082
7114
  var Te;
7083
7115
  if (H === "`") {
7084
- w++;
7085
- var Ae = S.indexOf("`", w);
7116
+ k++;
7117
+ var Ae = S.indexOf("`", k);
7086
7118
  if (Ae !== -1)
7087
- return Te = S.substring(w, Ae), w = Ae + 1, I("name", Te);
7088
- throw w = A, {
7119
+ return Te = S.substring(k, Ae), k = Ae + 1, I("name", Te);
7120
+ throw k = E, {
7089
7121
  code: "S0105",
7090
7122
  stack: new Error().stack,
7091
- position: w
7123
+ position: k
7092
7124
  };
7093
7125
  }
7094
- for (var ve = w, Me; ; )
7095
- if (Me = S.charAt(ve), ve === A || `
7126
+ for (var ve = k, Me; ; )
7127
+ if (Me = S.charAt(ve), ve === E || `
7096
7128
  \r\v`.indexOf(Me) > -1 || Object.prototype.hasOwnProperty.call(f, Me)) {
7097
- if (S.charAt(w) === "$")
7098
- return Te = S.substring(w + 1, ve), w = ve, I("variable", Te);
7099
- switch (Te = S.substring(w, ve), w = ve, Te) {
7129
+ if (S.charAt(k) === "$")
7130
+ return Te = S.substring(k + 1, ve), k = ve, I("variable", Te);
7131
+ switch (Te = S.substring(k, ve), k = ve, Te) {
7100
7132
  case "or":
7101
7133
  case "in":
7102
7134
  case "and":
@@ -7108,16 +7140,16 @@ function Ps() {
7108
7140
  case "null":
7109
7141
  return I("value", null);
7110
7142
  default:
7111
- return w === A && Te === "" ? null : I("name", Te);
7143
+ return k === E && Te === "" ? null : I("name", Te);
7112
7144
  }
7113
7145
  } else
7114
7146
  ve++;
7115
7147
  };
7116
7148
  return me;
7117
- }, R = function(S, w) {
7118
- var A, I, se = {}, me = [], ge = function() {
7149
+ }, R = function(S, k) {
7150
+ var E, I, se = {}, me = [], ge = function() {
7119
7151
  var d = [];
7120
- A.id !== "(end)" && d.push({ type: A.type, value: A.value, position: A.position });
7152
+ E.id !== "(end)" && d.push({ type: E.type, value: E.value, position: E.position });
7121
7153
  for (var m = I(); m !== null; )
7122
7154
  d.push(m), m = I();
7123
7155
  return d;
@@ -7128,7 +7160,7 @@ function Ps() {
7128
7160
  token: this.value,
7129
7161
  position: this.position
7130
7162
  };
7131
- if (w)
7163
+ if (k)
7132
7164
  return d.remaining = ge(), d.type = "error", me.push(d), d;
7133
7165
  throw d.stack = new Error().stack, d;
7134
7166
  }
@@ -7136,35 +7168,35 @@ function Ps() {
7136
7168
  var q = se[d];
7137
7169
  return m = m || 0, q ? m >= q.lbp && (q.lbp = m) : (q = Object.create(H), q.id = q.value = d, q.lbp = m, se[d] = q), q;
7138
7170
  }, ne = function(d) {
7139
- if (w) {
7171
+ if (k) {
7140
7172
  d.remaining = ge(), me.push(d);
7141
7173
  var m = se["(error)"];
7142
- return A = Object.create(m), A.error = d, A.type = "(error)", A;
7174
+ return E = Object.create(m), E.error = d, E.type = "(error)", E;
7143
7175
  } else
7144
7176
  throw d.stack = new Error().stack, d;
7145
7177
  }, B = function(d, m) {
7146
- if (d && A.id !== d) {
7178
+ if (d && E.id !== d) {
7147
7179
  var q;
7148
- A.id === "(end)" ? q = "S0203" : q = "S0202";
7180
+ E.id === "(end)" ? q = "S0203" : q = "S0202";
7149
7181
  var le = {
7150
7182
  code: q,
7151
- position: A.position,
7152
- token: A.value,
7183
+ position: E.position,
7184
+ token: E.value,
7153
7185
  value: d
7154
7186
  };
7155
7187
  return ne(le);
7156
7188
  }
7157
7189
  var De = I(m);
7158
7190
  if (De === null)
7159
- return A = se["(end)"], A.position = S.length, A;
7160
- var Ee = De.value, v = De.type, T;
7191
+ return E = se["(end)"], E.position = S.length, E;
7192
+ var Ee = De.value, v = De.type, A;
7161
7193
  switch (v) {
7162
7194
  case "name":
7163
7195
  case "variable":
7164
- T = se["(name)"];
7196
+ A = se["(name)"];
7165
7197
  break;
7166
7198
  case "operator":
7167
- if (T = se[Ee], !T)
7199
+ if (A = se[Ee], !A)
7168
7200
  return ne({
7169
7201
  code: "S0204",
7170
7202
  stack: new Error().stack,
@@ -7175,10 +7207,10 @@ function Ps() {
7175
7207
  case "string":
7176
7208
  case "number":
7177
7209
  case "value":
7178
- T = se["(literal)"];
7210
+ A = se["(literal)"];
7179
7211
  break;
7180
7212
  case "regex":
7181
- v = "regex", T = se["(regex)"];
7213
+ v = "regex", A = se["(regex)"];
7182
7214
  break;
7183
7215
  /* istanbul ignore next */
7184
7216
  default:
@@ -7189,11 +7221,11 @@ function Ps() {
7189
7221
  token: Ee
7190
7222
  });
7191
7223
  }
7192
- return A = Object.create(T), A.value = Ee, A.type = v, A.position = De.position, A;
7193
- }, E = function(d) {
7194
- var m, q = A;
7195
- for (B(null, !0), m = q.nud(); d < A.lbp; )
7196
- q = A, B(), m = q.led(m);
7224
+ return E = Object.create(A), E.value = Ee, E.type = v, E.position = De.position, E;
7225
+ }, T = function(d) {
7226
+ var m, q = E;
7227
+ for (B(null, !0), m = q.nud(); d < E.lbp; )
7228
+ q = E, B(), m = q.led(m);
7197
7229
  return m;
7198
7230
  }, L = function(d) {
7199
7231
  var m = N(d, 0);
@@ -7203,7 +7235,7 @@ function Ps() {
7203
7235
  }, V = function(d, m, q) {
7204
7236
  var le = m || f[d], De = N(d, le);
7205
7237
  return De.led = q || function(Ee) {
7206
- return this.lhs = Ee, this.rhs = E(le), this.type = "binary", this;
7238
+ return this.lhs = Ee, this.rhs = T(le), this.type = "binary", this;
7207
7239
  }, De;
7208
7240
  }, de = function(d, m, q) {
7209
7241
  var le = N(d, m);
@@ -7211,7 +7243,7 @@ function Ps() {
7211
7243
  }, xe = function(d, m) {
7212
7244
  var q = N(d);
7213
7245
  return q.nud = m || function() {
7214
- return this.expression = E(70), this.type = "unary", this;
7246
+ return this.expression = T(70), this.type = "unary", this;
7215
7247
  }, q;
7216
7248
  };
7217
7249
  L("(end)"), L("(name)"), L("(literal)"), L("(regex)"), N(":"), N(";"), N(","), N(")"), N("]"), N("}"), N(".."), V("."), V("+"), V("-"), V("*"), V("/"), V("%"), V("="), V("<"), V(">"), V("!="), V("<="), V(">="), V("&"), V("and"), V("or"), V("in"), L("and"), L("or"), L("in"), xe("-"), V("~>"), V("??", f["??"], function(d) {
@@ -7220,9 +7252,9 @@ function Ps() {
7220
7252
  value: "(",
7221
7253
  procedure: { type: "variable", value: "exists" },
7222
7254
  arguments: [d]
7223
- }, this.then = d, this.else = E(0), this;
7255
+ }, this.then = d, this.else = T(0), this;
7224
7256
  }), de("(error)", 10, function(d) {
7225
- return this.lhs = d, this.error = A.error, this.remaining = ge(), this.type = "error", this;
7257
+ return this.lhs = d, this.error = E.error, this.remaining = ge(), this.type = "error", this;
7226
7258
  }), xe("*", function() {
7227
7259
  return this.type = "wildcard", this;
7228
7260
  }), xe("**", function() {
@@ -7230,8 +7262,8 @@ function Ps() {
7230
7262
  }), xe("%", function() {
7231
7263
  return this.type = "parent", this;
7232
7264
  }), V("(", f["("], function(d) {
7233
- if (this.procedure = d, this.type = "function", this.arguments = [], A.id !== ")")
7234
- for (; A.type === "operator" && A.id === "?" ? (this.type = "partial", this.arguments.push(A), B("?")) : this.arguments.push(E(0)), A.id === ","; )
7265
+ if (this.procedure = d, this.type = "function", this.arguments = [], E.id !== ")")
7266
+ for (; E.type === "operator" && E.id === "?" ? (this.type = "partial", this.arguments.push(E), B("?")) : this.arguments.push(T(0)), E.id === ","; )
7235
7267
  B(",");
7236
7268
  if (B(")", !0), d.type === "name" && (d.value === "function" || d.value === "λ")) {
7237
7269
  if (this.arguments.forEach(function(Ee, v) {
@@ -7243,8 +7275,8 @@ function Ps() {
7243
7275
  token: Ee.value,
7244
7276
  value: v + 1
7245
7277
  });
7246
- }), this.type = "lambda", A.id === "<") {
7247
- for (var m = A.position, q = 1, le = "<"; q > 0 && A.id !== "{" && A.id !== "(end)"; ) {
7278
+ }), this.type = "lambda", E.id === "<") {
7279
+ for (var m = E.position, q = 1, le = "<"; q > 0 && E.id !== "{" && E.id !== "(end)"; ) {
7248
7280
  var De = B();
7249
7281
  De.id === ">" ? q-- : De.id === "<" && q++, le += De.value;
7250
7282
  }
@@ -7255,41 +7287,41 @@ function Ps() {
7255
7287
  return Ee.position = m + Ee.offset, ne(Ee);
7256
7288
  }
7257
7289
  }
7258
- B("{"), this.body = E(0), B("}");
7290
+ B("{"), this.body = T(0), B("}");
7259
7291
  }
7260
7292
  return this;
7261
7293
  }), xe("(", function() {
7262
- for (var d = []; A.id !== ")" && (d.push(E(0)), A.id === ";"); )
7294
+ for (var d = []; E.id !== ")" && (d.push(T(0)), E.id === ";"); )
7263
7295
  B(";");
7264
7296
  return B(")", !0), this.type = "block", this.expressions = d, this;
7265
7297
  }), xe("[", function() {
7266
7298
  var d = [];
7267
- if (A.id !== "]")
7299
+ if (E.id !== "]")
7268
7300
  for (; ; ) {
7269
- var m = E(0);
7270
- if (A.id === "..") {
7271
- var q = { type: "binary", value: "..", position: A.position, lhs: m };
7272
- B(".."), q.rhs = E(0), m = q;
7301
+ var m = T(0);
7302
+ if (E.id === "..") {
7303
+ var q = { type: "binary", value: "..", position: E.position, lhs: m };
7304
+ B(".."), q.rhs = T(0), m = q;
7273
7305
  }
7274
- if (d.push(m), A.id !== ",")
7306
+ if (d.push(m), E.id !== ",")
7275
7307
  break;
7276
7308
  B(",");
7277
7309
  }
7278
7310
  return B("]", !0), this.expressions = d, this.type = "unary", this;
7279
7311
  }), V("[", f["["], function(d) {
7280
- if (A.id === "]") {
7312
+ if (E.id === "]") {
7281
7313
  for (var m = d; m && m.type === "binary" && m.value === "["; )
7282
7314
  m = m.lhs;
7283
7315
  return m.keepArray = !0, B("]"), d;
7284
7316
  } else
7285
- return this.lhs = d, this.rhs = E(f["]"]), this.type = "binary", B("]", !0), this;
7317
+ return this.lhs = d, this.rhs = T(f["]"]), this.type = "binary", B("]", !0), this;
7286
7318
  }), V("^", f["^"], function(d) {
7287
7319
  B("(");
7288
7320
  for (var m = []; ; ) {
7289
7321
  var q = {
7290
7322
  descending: !1
7291
7323
  };
7292
- if (A.id === "<" ? B("<") : A.id === ">" && (q.descending = !0, B(">")), q.expression = E(0), m.push(q), A.id !== ",")
7324
+ if (E.id === "<" ? B("<") : E.id === ">" && (q.descending = !0, B(">")), q.expression = T(0), m.push(q), E.id !== ",")
7293
7325
  break;
7294
7326
  B(",");
7295
7327
  }
@@ -7297,12 +7329,12 @@ function Ps() {
7297
7329
  });
7298
7330
  var Te = function(d) {
7299
7331
  var m = [];
7300
- if (A.id !== "}")
7332
+ if (E.id !== "}")
7301
7333
  for (; ; ) {
7302
- var q = E(0);
7334
+ var q = T(0);
7303
7335
  B(":");
7304
- var le = E(0);
7305
- if (m.push([q, le]), A.id !== ",")
7336
+ var le = T(0);
7337
+ if (m.push([q, le]), E.id !== ",")
7306
7338
  break;
7307
7339
  B(",");
7308
7340
  }
@@ -7314,27 +7346,27 @@ function Ps() {
7314
7346
  stack: new Error().stack,
7315
7347
  position: d.position,
7316
7348
  token: d.value
7317
- }) : (this.lhs = d, this.rhs = E(f[":="] - 1), this.type = "binary", this);
7349
+ }) : (this.lhs = d, this.rhs = T(f[":="] - 1), this.type = "binary", this);
7318
7350
  }), V("@", f["@"], function(d) {
7319
- return this.lhs = d, this.rhs = E(f["@"]), this.rhs.type !== "variable" ? ne({
7351
+ return this.lhs = d, this.rhs = T(f["@"]), this.rhs.type !== "variable" ? ne({
7320
7352
  code: "S0214",
7321
7353
  stack: new Error().stack,
7322
7354
  position: this.rhs.position,
7323
7355
  token: "@"
7324
7356
  }) : (this.type = "binary", this);
7325
7357
  }), V("#", f["#"], function(d) {
7326
- return this.lhs = d, this.rhs = E(f["#"]), this.rhs.type !== "variable" ? ne({
7358
+ return this.lhs = d, this.rhs = T(f["#"]), this.rhs.type !== "variable" ? ne({
7327
7359
  code: "S0214",
7328
7360
  stack: new Error().stack,
7329
7361
  position: this.rhs.position,
7330
7362
  token: "#"
7331
7363
  }) : (this.type = "binary", this);
7332
7364
  }), V("?", f["?"], function(d) {
7333
- return this.type = "condition", this.condition = d, this.then = E(0), A.id === ":" && (B(":"), this.else = E(0)), this;
7365
+ return this.type = "condition", this.condition = d, this.then = T(0), E.id === ":" && (B(":"), this.else = T(0)), this;
7334
7366
  }), V("?:", f["?:"], function(d) {
7335
- return this.type = "condition", this.condition = d, this.then = d, this.else = E(0), this;
7367
+ return this.type = "condition", this.condition = d, this.then = d, this.else = T(0), this;
7336
7368
  }), xe("|", function() {
7337
- return this.type = "transform", this.pattern = E(0), B("|"), this.update = E(0), A.id === "," && (B(","), this.delete = E(0)), B("|"), this;
7369
+ return this.type = "transform", this.pattern = T(0), B("|"), this.update = T(0), E.id === "," && (B(","), this.delete = T(0)), B("|"), this;
7338
7370
  });
7339
7371
  var Ae = function(d) {
7340
7372
  var m;
@@ -7425,18 +7457,18 @@ function Ps() {
7425
7457
  break;
7426
7458
  case "[":
7427
7459
  m = ae(d.lhs);
7428
- var v = m, T = "predicate";
7429
- if (m.type === "path" && (v = m.steps[m.steps.length - 1], T = "stages"), typeof v.group < "u")
7460
+ var v = m, A = "predicate";
7461
+ if (m.type === "path" && (v = m.steps[m.steps.length - 1], A = "stages"), typeof v.group < "u")
7430
7462
  throw {
7431
7463
  code: "S0209",
7432
7464
  stack: new Error().stack,
7433
7465
  position: d.position
7434
7466
  };
7435
- typeof v[T] > "u" && (v[T] = []);
7467
+ typeof v[A] > "u" && (v[A] = []);
7436
7468
  var b = ae(d.rhs);
7437
7469
  typeof b.seekingParent < "u" && (b.seekingParent.forEach((F) => {
7438
7470
  F.level === 1 ? _e(v, F) : F.level--;
7439
- }), ue(v, b)), v[T].push({ type: "filter", expr: b, position: d.position });
7471
+ }), ue(v, b)), v[A].push({ type: "filter", expr: b, position: d.position });
7440
7472
  break;
7441
7473
  case "{":
7442
7474
  if (m = ae(d.lhs), typeof m.group < "u")
@@ -7570,19 +7602,19 @@ function Ps() {
7570
7602
  position: d.position,
7571
7603
  token: d.value
7572
7604
  };
7573
- if (w)
7605
+ if (k)
7574
7606
  return me.push(C), { type: "error", error: C };
7575
7607
  throw C.stack = new Error().stack, C;
7576
7608
  }
7577
7609
  return d.keepArray && (m.keepArray = !0), m;
7578
7610
  };
7579
7611
  I = _(S), B();
7580
- var Fe = E(0);
7581
- if (A.id !== "(end)") {
7612
+ var Fe = T(0);
7613
+ if (E.id !== "(end)") {
7582
7614
  var at = {
7583
7615
  code: "S0201",
7584
- position: A.position,
7585
- token: A.value
7616
+ position: E.position,
7617
+ token: E.value
7586
7618
  };
7587
7619
  ne(at);
7588
7620
  }
@@ -7608,13 +7640,13 @@ function Ps() {
7608
7640
  o: "objects",
7609
7641
  s: "strings"
7610
7642
  };
7611
- function k(_) {
7612
- for (var R = 1, S = [], w = {}, A = w; R < _.length; ) {
7643
+ function w(_) {
7644
+ for (var R = 1, S = [], k = {}, E = k; R < _.length; ) {
7613
7645
  var I = _.charAt(R);
7614
7646
  if (I === ":")
7615
7647
  break;
7616
7648
  var se = function() {
7617
- S.push(w), A = w, w = {};
7649
+ S.push(k), E = k, k = {};
7618
7650
  }, me = function(V, de, xe, Te) {
7619
7651
  for (var Ae = 1, ve = de; ve < V.length; )
7620
7652
  if (ve++, I = V.charAt(ve), I === Te) {
@@ -7633,32 +7665,32 @@ function Ps() {
7633
7665
  case "l":
7634
7666
  // not so sure about expecting null?
7635
7667
  case "o":
7636
- w.regex = "[" + I + "m]", w.type = I, se();
7668
+ k.regex = "[" + I + "m]", k.type = I, se();
7637
7669
  break;
7638
7670
  case "a":
7639
- w.regex = "[asnblfom]", w.type = I, w.array = !0, se();
7671
+ k.regex = "[asnblfom]", k.type = I, k.array = !0, se();
7640
7672
  break;
7641
7673
  case "f":
7642
- w.regex = "f", w.type = I, se();
7674
+ k.regex = "f", k.type = I, se();
7643
7675
  break;
7644
7676
  case "j":
7645
- w.regex = "[asnblom]", w.type = I, se();
7677
+ k.regex = "[asnblom]", k.type = I, se();
7646
7678
  break;
7647
7679
  case "x":
7648
- w.regex = "[asnblfom]", w.type = I, se();
7680
+ k.regex = "[asnblfom]", k.type = I, se();
7649
7681
  break;
7650
7682
  case "-":
7651
- A.context = !0, A.contextRegex = new RegExp(A.regex), A.regex += "?";
7683
+ E.context = !0, E.contextRegex = new RegExp(E.regex), E.regex += "?";
7652
7684
  break;
7653
7685
  case "?":
7654
7686
  // optional param
7655
7687
  case "+":
7656
- A.regex += I;
7688
+ E.regex += I;
7657
7689
  break;
7658
7690
  case "(":
7659
7691
  var ge = me(_, R, "(", ")"), H = _.substring(R + 1, ge);
7660
7692
  if (H.indexOf("<") === -1)
7661
- w.regex = "[" + H + "m]";
7693
+ k.regex = "[" + H + "m]";
7662
7694
  else
7663
7695
  throw {
7664
7696
  code: "S0402",
@@ -7666,17 +7698,17 @@ function Ps() {
7666
7698
  value: H,
7667
7699
  offset: R
7668
7700
  };
7669
- w.type = "(" + H + ")", R = ge, se();
7701
+ k.type = "(" + H + ")", R = ge, se();
7670
7702
  break;
7671
7703
  case "<":
7672
- if (A.type === "a" || A.type === "f") {
7704
+ if (E.type === "a" || E.type === "f") {
7673
7705
  var N = me(_, R, "<", ">");
7674
- A.subtype = _.substring(R + 1, N), R = N;
7706
+ E.subtype = _.substring(R + 1, N), R = N;
7675
7707
  } else
7676
7708
  throw {
7677
7709
  code: "S0401",
7678
7710
  stack: new Error().stack,
7679
- value: A.type,
7711
+ value: E.type,
7680
7712
  offset: R
7681
7713
  };
7682
7714
  break;
@@ -7685,7 +7717,7 @@ function Ps() {
7685
7717
  }
7686
7718
  var ne = "^" + S.map(function(V) {
7687
7719
  return "(" + V.regex + ")";
7688
- }).join("") + "$", B = new RegExp(ne), E = function(V) {
7720
+ }).join("") + "$", B = new RegExp(ne), T = function(V) {
7689
7721
  var de;
7690
7722
  if (i.isFunction(V))
7691
7723
  de = "f";
@@ -7735,7 +7767,7 @@ function Ps() {
7735
7767
  validate: function(V, de) {
7736
7768
  var xe = "";
7737
7769
  V.forEach(function(Me) {
7738
- xe += E(Me);
7770
+ xe += T(Me);
7739
7771
  });
7740
7772
  var Te = B.exec(xe);
7741
7773
  if (Te) {
@@ -7744,7 +7776,7 @@ function Ps() {
7744
7776
  var _e = V[ve], ue = Te[Qe + 1];
7745
7777
  if (ue === "")
7746
7778
  if (Me.context && Me.contextRegex) {
7747
- var et = E(de);
7779
+ var et = T(de);
7748
7780
  if (Me.contextRegex.test(et))
7749
7781
  Ae.push(de);
7750
7782
  else
@@ -7768,12 +7800,12 @@ function Ps() {
7768
7800
  if (ae !== "a" && ue !== Me.subtype)
7769
7801
  Fe = !1;
7770
7802
  else if (ae === "a" && _e.length > 0) {
7771
- var at = E(_e[0]);
7803
+ var at = T(_e[0]);
7772
7804
  if (at !== Me.subtype.charAt(0))
7773
7805
  Fe = !1;
7774
7806
  else {
7775
7807
  var d = _e.filter(function(m) {
7776
- return E(m) !== at;
7808
+ return T(m) !== at;
7777
7809
  });
7778
7810
  Fe = d.length === 0;
7779
7811
  }
@@ -7799,7 +7831,7 @@ function Ps() {
7799
7831
  }
7800
7832
  };
7801
7833
  }
7802
- return k;
7834
+ return w;
7803
7835
  })();
7804
7836
  a.exports = c;
7805
7837
  }, { "./utils": 6 }], 6: [function(t, a, s) {
@@ -7820,7 +7852,7 @@ function Ps() {
7820
7852
  return typeof B != "string";
7821
7853
  }).length === 0), ne;
7822
7854
  }
7823
- function k(N) {
7855
+ function w(N) {
7824
7856
  var ne = !1;
7825
7857
  return Array.isArray(N) && (ne = N.filter(function(B) {
7826
7858
  return !c(B);
@@ -7836,11 +7868,11 @@ function Ps() {
7836
7868
  function S(N) {
7837
7869
  return N && (N._jsonata_function === !0 || N._jsonata_lambda === !0) || typeof N == "function";
7838
7870
  }
7839
- function w(N) {
7871
+ function k(N) {
7840
7872
  var ne = typeof N.arity == "number" ? N.arity : typeof N.implementation == "function" ? N.implementation.length : typeof N.length == "number" ? N.length : N.arguments.length;
7841
7873
  return ne;
7842
7874
  }
7843
- function A(N) {
7875
+ function E(N) {
7844
7876
  return N && N._jsonata_lambda === !0;
7845
7877
  }
7846
7878
  var I = (typeof Symbol == "function" ? Symbol : {}).iterator || "@@iterator";
@@ -7859,14 +7891,14 @@ function Ps() {
7859
7891
  return !1;
7860
7892
  return !0;
7861
7893
  }
7862
- var E = Object.getOwnPropertyNames(N), L = Object.getOwnPropertyNames(ne);
7863
- if (E.length !== L.length)
7894
+ var T = Object.getOwnPropertyNames(N), L = Object.getOwnPropertyNames(ne);
7895
+ if (T.length !== L.length)
7864
7896
  return !1;
7865
- for (E = E.sort(), L = L.sort(), B = 0; B < E.length; B++)
7866
- if (E[B] !== L[B])
7897
+ for (T = T.sort(), L = L.sort(), B = 0; B < T.length; B++)
7898
+ if (T[B] !== L[B])
7867
7899
  return !1;
7868
- for (B = 0; B < E.length; B++) {
7869
- var V = E[B];
7900
+ for (B = 0; B < T.length; B++) {
7901
+ var V = T[B];
7870
7902
  if (!me(N[V], ne[V]))
7871
7903
  return !1;
7872
7904
  }
@@ -7886,13 +7918,13 @@ function Ps() {
7886
7918
  return {
7887
7919
  isNumeric: c,
7888
7920
  isArrayOfStrings: f,
7889
- isArrayOfNumbers: k,
7921
+ isArrayOfNumbers: w,
7890
7922
  createSequence: _,
7891
7923
  isSequence: R,
7892
7924
  isFunction: S,
7893
- isLambda: A,
7925
+ isLambda: E,
7894
7926
  isIterable: se,
7895
- getFunctionArity: w,
7927
+ getFunctionArity: k,
7896
7928
  isDeepEqual: me,
7897
7929
  stringToArray: H,
7898
7930
  isPromise: ge
@@ -7903,19 +7935,19 @@ function Ps() {
7903
7935
  });
7904
7936
  })(Dr)), Dr.exports;
7905
7937
  }
7906
- var Ns = Ps();
7907
- const Ms = /* @__PURE__ */ Ds(Ns), gn = O.object({
7938
+ var Is = Rs();
7939
+ const js = /* @__PURE__ */ Ms(Is), vn = O.object({
7908
7940
  name: O.literal("data-extract"),
7909
7941
  code: O.string(),
7910
7942
  inputData: O.any().optional()
7911
7943
  });
7912
- function Rs(r) {
7913
- return gn.parse(r);
7944
+ function Fs(r) {
7945
+ return vn.parse(r);
7914
7946
  }
7915
- async function Is(r) {
7947
+ async function $s(r) {
7916
7948
  try {
7917
7949
  console.log("[DataExtractBlock] Executing JSONata query:", r.code);
7918
- const t = await Ms(r.code).evaluate(r.inputData);
7950
+ const t = await js(r.code).evaluate(r.inputData);
7919
7951
  return console.log("[DataExtractBlock] Data extraction successful"), {
7920
7952
  data: t
7921
7953
  };
@@ -7927,7 +7959,7 @@ async function Is(r) {
7927
7959
  };
7928
7960
  }
7929
7961
  }
7930
- const Bs = {
7962
+ const Vs = {
7931
7963
  "get-text": tn,
7932
7964
  "attribute-value": nn,
7933
7965
  "get-value-form": an,
@@ -7938,81 +7970,86 @@ const Bs = {
7938
7970
  keypress: ln,
7939
7971
  wait: fn,
7940
7972
  "wait-for-condition": dn,
7941
- "save-assets": hn,
7942
- "get-element-data": pn,
7943
- scroll: mn,
7973
+ navigate: hn,
7974
+ "save-assets": pn,
7975
+ "get-element-data": mn,
7976
+ scroll: yn,
7944
7977
  "ai-parse-data": en,
7945
- "fetch-api": yn,
7946
- "data-extract": gn
7978
+ "fetch-api": gn,
7979
+ "data-extract": vn
7947
7980
  };
7948
- class Zs {
7981
+ class qs {
7949
7982
  // Implementation
7950
7983
  static async executeBlock(e) {
7951
7984
  try {
7952
7985
  switch (e.name) {
7953
7986
  case "get-text": {
7954
- const t = Za(e);
7955
- return await za(t);
7987
+ const t = za(e);
7988
+ return await Va(t);
7956
7989
  }
7957
7990
  case "attribute-value": {
7958
- const t = qa(e);
7959
- return await Wa(t);
7991
+ const t = Wa(e);
7992
+ return await Ha(t);
7960
7993
  }
7961
7994
  case "get-value-form": {
7962
- const t = Ha(e);
7963
- return await Ya(t);
7995
+ const t = Ya(e);
7996
+ return await Ga(t);
7964
7997
  }
7965
7998
  case "set-value-form": {
7966
- const t = Ja(e);
7967
- return await Xa(t);
7999
+ const t = Xa(e);
8000
+ return await Ka(t);
7968
8001
  }
7969
8002
  case "clear-value-form": {
7970
- const t = Qa(e);
7971
- return await es(t);
8003
+ const t = es(e);
8004
+ return await ts(t);
7972
8005
  }
7973
8006
  case "element-exists": {
7974
- const t = rs(e);
7975
- return await ns(t);
8007
+ const t = ns(e);
8008
+ return await as(t);
7976
8009
  }
7977
8010
  case "event-click": {
7978
- const t = as(e);
7979
- return await ss(t);
8011
+ const t = ss(e);
8012
+ return await is(t);
7980
8013
  }
7981
8014
  case "keypress": {
7982
- const t = us(e);
7983
- return await ls(t);
8015
+ const t = ls(e);
8016
+ return await fs(t);
7984
8017
  }
7985
8018
  case "wait": {
7986
- const t = ds(e);
7987
- return await hs(t);
8019
+ const t = hs(e);
8020
+ return await ps(t);
7988
8021
  }
7989
8022
  case "wait-for-condition": {
7990
- const t = ps(e);
7991
- return await ms(t);
8023
+ const t = ms(e);
8024
+ return await ys(t);
7992
8025
  }
7993
- case "save-assets": {
7994
- const t = ys(e);
7995
- return await gs(t);
8026
+ case "navigate": {
8027
+ const t = gs(e);
8028
+ return await vs(t);
7996
8029
  }
7997
- case "get-element-data": {
8030
+ case "save-assets": {
7998
8031
  const t = bs(e);
7999
8032
  return await ws(t);
8000
8033
  }
8001
- case "scroll": {
8034
+ case "get-element-data": {
8002
8035
  const t = xs(e);
8003
8036
  return await _s(t);
8004
8037
  }
8038
+ case "scroll": {
8039
+ const t = Ts(e);
8040
+ return await As(t);
8041
+ }
8005
8042
  case "ai-parse-data": {
8006
- const t = Ra(e);
8007
- return await Ia(t);
8043
+ const t = Ia(e);
8044
+ return await ja(t);
8008
8045
  }
8009
8046
  case "fetch-api": {
8010
- const t = Cs(e);
8011
- return await Os(t);
8047
+ const t = Ps(e);
8048
+ return await Ns(t);
8012
8049
  }
8013
8050
  case "data-extract": {
8014
- const t = Rs(e);
8015
- return await Is(t);
8051
+ const t = Fs(e);
8052
+ return await $s(t);
8016
8053
  }
8017
8054
  default:
8018
8055
  return {
@@ -8030,20 +8067,20 @@ class Zs {
8030
8067
  }
8031
8068
  }
8032
8069
  }
8033
- class zs {
8070
+ class Ws {
8034
8071
  constructor() {
8035
8072
  fe(this, "expr");
8036
8073
  fe(this, "json");
8037
8074
  }
8038
8075
  }
8039
- class Vs {
8076
+ class Hs {
8040
8077
  constructor() {
8041
8078
  fe(this, "template");
8042
8079
  fe(this, "valueFrom");
8043
8080
  fe(this, "default");
8044
8081
  }
8045
8082
  }
8046
- class qs {
8083
+ class Ys {
8047
8084
  constructor() {
8048
8085
  fe(this, "id");
8049
8086
  fe(this, "title");
@@ -8061,7 +8098,7 @@ class qs {
8061
8098
  fe(this, "delayAfterMs");
8062
8099
  }
8063
8100
  }
8064
- class Ws {
8101
+ class Gs {
8065
8102
  constructor() {
8066
8103
  fe(this, "version");
8067
8104
  fe(this, "id");
@@ -8074,7 +8111,7 @@ class Ws {
8074
8111
  fe(this, "defaultDelayMs");
8075
8112
  }
8076
8113
  }
8077
- class Hs {
8114
+ class Js {
8078
8115
  constructor() {
8079
8116
  fe(this, "stepId");
8080
8117
  fe(this, "skipped");
@@ -8086,7 +8123,7 @@ class Hs {
8086
8123
  fe(this, "attempts");
8087
8124
  }
8088
8125
  }
8089
- class Ys {
8126
+ class Xs {
8090
8127
  constructor() {
8091
8128
  fe(this, "success");
8092
8129
  fe(this, "steps");
@@ -8097,33 +8134,34 @@ class Ys {
8097
8134
  }
8098
8135
  export {
8099
8136
  en as AiParseDataBlockSchema,
8100
- Bs as AllBlockSchemas,
8137
+ Vs as AllBlockSchemas,
8101
8138
  gt as BaseBlockSchema,
8102
- Vs as Binding,
8103
- Zs as BlockHandler,
8139
+ Hs as Binding,
8140
+ qs as BlockHandler,
8104
8141
  on as ClearValueFormsBlockSchema,
8105
- Ys as CollectWorkflowResult,
8106
- zs as Condition,
8107
- gn as DataExtractBlockSchema,
8108
- Fs as EightGClient,
8142
+ Xs as CollectWorkflowResult,
8143
+ Ws as Condition,
8144
+ vn as DataExtractBlockSchema,
8145
+ Ls as EightGClient,
8109
8146
  Nt as EightGError,
8110
8147
  cn as ElementExistsBlockSchema,
8111
8148
  un as EventClickBlockSchema,
8112
- yn as FetchApiBlockSchema,
8149
+ gn as FetchApiBlockSchema,
8113
8150
  nn as GetAttributeValueBlockSchema,
8114
- pn as GetElementDataBlockSchema,
8151
+ mn as GetElementDataBlockSchema,
8115
8152
  tn as GetTextBlockSchema,
8116
8153
  an as GetValueFormsBlockSchema,
8117
8154
  ln as KeypressBlockSchema,
8118
- hn as SaveAssetsBlockSchema,
8119
- Ls as Schema,
8120
- mn as ScrollBlockSchema,
8155
+ hn as NavigateBlockSchema,
8156
+ pn as SaveAssetsBlockSchema,
8157
+ zs as Schema,
8158
+ yn as ScrollBlockSchema,
8121
8159
  sn as SetValueFormsBlockSchema,
8122
8160
  fn as WaitBlockSchema,
8123
8161
  dn as WaitForConditionBlockSchema,
8124
- Ws as Workflow,
8125
- qs as WorkflowStep,
8126
- Hs as WorkflowStepRunResult,
8127
- Us as createArraySchema,
8128
- $s as createSchema
8162
+ Gs as Workflow,
8163
+ Ys as WorkflowStep,
8164
+ Js as WorkflowStepRunResult,
8165
+ Zs as createArraySchema,
8166
+ Bs as createSchema
8129
8167
  };