@sheetxl/sdk 0.8.0-beta.16 → 0.8.0-beta.18

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.
Files changed (110) hide show
  1. package/browser/esm/{B6BdiHigbUdbZp3J.mjs → -P0fym6eh9hn9row.mjs} +2 -2
  2. package/browser/esm/{DlVnybrgwZWxWN3_.mjs → -nOfWMHdlTb9ShjF.mjs} +9 -9
  3. package/browser/esm/{CMChv-fCFh68VQQt.mjs → 0Mw5Ew_7tAiWgc5J.mjs} +14 -14
  4. package/browser/esm/{JV9Szh5qTssjxJoE.mjs → 1ktaHvjuYL6stU4C.mjs} +1 -1
  5. package/browser/esm/{HV0FkJ6k3Ils318J.mjs → B3ifnlsuky2L9HmB.mjs} +33 -33
  6. package/browser/esm/{BtNuoQIrrHw_jnbJ.mjs → B67q5ZrwyKvm3d6W.mjs} +3 -3
  7. package/browser/esm/{KpuD1kEcWB7cT0VM.mjs → BQSd_URWugiyNoNj.mjs} +2 -2
  8. package/browser/esm/{ad9PX897hYE4Srkc.mjs → BWHHWC6H2JgG11Kq.mjs} +2 -2
  9. package/browser/esm/{BlMYYQZP-QM-iBHz.mjs → BYbb2weYQCb_7KI3.mjs} +21 -21
  10. package/browser/esm/{WLlpmgLN5OVLoLrC.mjs → B_hrmyuWaH5VIFpV.mjs} +2 -2
  11. package/browser/esm/{d_t-7d5BD1AdHg3u.mjs → Bql31KGUYo0SCMwZ.mjs} +392 -392
  12. package/browser/esm/{D807piM0VSokWz-L.mjs → BtVpErObXYKJCwHG.mjs} +1 -1
  13. package/browser/esm/{BWY1qiidTUBVPJoD.mjs → By7_c19Kv2YQaDVF.mjs} +475 -475
  14. package/browser/esm/{Zp5-cTJ0Llb6EfGi.mjs → C6M_XM08QtHuaInQ.mjs} +3 -3
  15. package/browser/esm/{BxYuRTSF9ykc-Tpz.mjs → CBHwju4PYiv85_jD.mjs} +2 -2
  16. package/browser/esm/{D-iHJ3q4nwOLcn1D.mjs → CJhYhZtsey3OnWKd.mjs} +1 -1
  17. package/browser/esm/{Dx9Fya60meMpuHqm.mjs → CQlxAbhdxgfu0ERF.mjs} +1 -1
  18. package/browser/esm/{C3JOjQwdG9kAig7i.mjs → CVXOtvee4oFImGyR.mjs} +504 -504
  19. package/browser/esm/{9YWdxmSjzLN4j_ts.mjs → CXQLYHAhE5MLKxZ4.mjs} +37 -37
  20. package/browser/esm/{CUu3zeHqcwMRYiov.mjs → CZiJYw94Yt7xslXS.mjs} +1 -1
  21. package/browser/esm/{BxFzcCYhvo9NXFjC.mjs → ChRUNekYurtOtrP1.mjs} +113 -113
  22. package/browser/esm/{dwGdnbV-CykjNrlm.mjs → CnobgPLHEsTPTFY5.mjs} +1 -1
  23. package/browser/esm/{WR146UAqrsUsL39e.mjs → CxNnMvwtOf76r7yY.mjs} +1 -1
  24. package/browser/esm/{U4FL-QeC0bRUhTEo.mjs → CzmmdfrOYDUGx-Yh.mjs} +1 -1
  25. package/browser/esm/{4MbBwfmW2hDXk9_w.mjs → D2P43UD6TGSXErhr.mjs} +2 -2
  26. package/browser/esm/{Bf80epSsm_RyAOb9.mjs → DH8NuKmZAC9EaqwP.mjs} +18 -18
  27. package/browser/esm/{WcHfawW2lkTHtWUd.mjs → DJuiV0Y8olnwuqB-.mjs} +21 -21
  28. package/browser/esm/{DcB52JPBPmkc3l1m.mjs → DKFaQ2QOyUPCk0sD.mjs} +3 -3
  29. package/browser/esm/{CRbQATfI0yZxe1kX.mjs → DLR8g1DkooIBl8S1.mjs} +2 -2
  30. package/browser/esm/{BF_QwkZ_hs2rFoTT.mjs → DNAXbbB8DGE2xeHy.mjs} +2 -2
  31. package/browser/esm/{BMo2_9Ul36IwRm3S.mjs → DQTUUXcERWI4l0to.mjs} +2 -2
  32. package/browser/esm/{C2PvZwqK-uvsugVS.mjs → DpFowFtk9AeU-89B.mjs} +1 -1
  33. package/browser/esm/{r-o0UCm7KtluNmyK.mjs → DyRVg5YJn7voOO6z.mjs} +2 -2
  34. package/browser/esm/{DW3oQ39IF0bsc_lm.mjs → Pn5Jc-47dk16sYQ4.mjs} +1 -1
  35. package/browser/esm/{BfoE6Dn_GQCIkQD3.mjs → _WWjW2f-YW-AVqAL.mjs} +1 -1
  36. package/browser/esm/{CkZoDPUCK5jMUaeJ.mjs → _lh_Rr5SwLthmbmu.mjs} +7924 -5938
  37. package/browser/esm/index.mjs +367 -366
  38. package/browser/esm/{DvVhatd0J1ch3OCO.mjs → mecFApGwMvcIzlpd.mjs} +36 -36
  39. package/browser/esm/{BqT-ASHP0NVSUUnY.mjs → n4LOSiYtWTzqQa4w.mjs} +661 -661
  40. package/{node/esm/CgdNA3B_GFG_yJiN.mjs → browser/esm/tJB0V8fKbukOYt9U.mjs} +2 -2
  41. package/browser/esm/{C5x0EzqElYGTiTQc.mjs → yRhetuEQfV7moa4B.mjs} +1 -1
  42. package/browser/esm/{e69NcYnKMLnAmqyA.mjs → ybFoQ6IijUJnBeCF.mjs} +1 -1
  43. package/node/esm/{BywIhvYkWk2o7MSW.mjs → 0313aQKBU4DE3v2j.mjs} +1 -1
  44. package/node/esm/{C884edhUf9yMqpPp.mjs → 3gjEEXV2aSt7cKeD.mjs} +1 -1
  45. package/node/esm/{BfPBiAgVmWhuFgFP.mjs → 3smtwEJ0ASF0tKBY.mjs} +2 -2
  46. package/node/esm/{_RIAmJI98l6bIFfZ.mjs → 4k3KKByrUw2Wr2TX.mjs} +1 -1
  47. package/node/esm/{Bknw7zWZhl2-w1pi.mjs → 90jp-mCVEr43zZTj.mjs} +2 -2
  48. package/node/esm/{DfWc3nW_Z_qqc_Wf.mjs → BAEmzj0gb8Cbgz7p.mjs} +3293 -3293
  49. package/node/esm/{CERNLhFrAwtu_p-q.mjs → BBC5dL9bXzOrQDGY.mjs} +1 -1
  50. package/node/esm/{CDHY-0OyQ9348Brb.mjs → BV0cJ_YP_0qzJuPt.mjs} +180 -180
  51. package/node/esm/{DvtyKKzOnoOM80NB.mjs → BcxcYoF_4GFL7Zkl.mjs} +15 -15
  52. package/node/esm/{DOt3t-13tsnM7Fj6.mjs → BesaVk0x7UyfLDk2.mjs} +1 -1
  53. package/node/esm/{Dhv9JymnXqcF54oo.mjs → C-LmDC9oNcbENOK1.mjs} +1 -1
  54. package/node/esm/{BvIPsPiHhMclZ1kH.mjs → CDkUQn5AwYGomlsT.mjs} +36 -36
  55. package/node/esm/{BH8J6vKSO5zI_TWo.mjs → CE4I5qfVmUBf7mED.mjs} +1 -1
  56. package/node/esm/{C_fYuynP2a_70WdL.mjs → CO0UDgbkHGwyTfev.mjs} +1 -1
  57. package/node/esm/{DgnwKbUEyQN5_gWT.mjs → CTWihjVB5uFX7U4j.mjs} +2 -2
  58. package/node/esm/{Cxak8i2NidZ4Uv6v.mjs → CUNaLYCntlclipWu.mjs} +497 -497
  59. package/node/esm/{RTwm9ge1KoPdlBNt.mjs → CY9JqXFJTt5pGhC3.mjs} +1 -1
  60. package/node/esm/{DELfV5HQZo1mInBd.mjs → C_Sqy290v4uzyi1E.mjs} +3 -3
  61. package/node/esm/{BLmdKnkLwkb3wWe6.mjs → Cf-cK3yPe9bjK6o2.mjs} +561 -561
  62. package/node/esm/{CVPieTgKCwkL21nD.mjs → CpvUwhAeDmdEpdR-.mjs} +10662 -8680
  63. package/{browser/esm/C_jLGkFemj55_BP3.mjs → node/esm/Crhg3srH-O5sJERh.mjs} +2 -2
  64. package/node/esm/{CJDV8P3hI8lu--3Z.mjs → Cx2U91jhiTDz600y.mjs} +116 -116
  65. package/node/esm/{BZSxu_ZqX8-Uczzn.mjs → CyWWKan_uk4dHZ6P.mjs} +1 -1
  66. package/node/esm/{CLtUMJfKsy4SevWE.mjs → D48MjKzkj37XsVm1.mjs} +2 -2
  67. package/node/esm/{kaiXmn0AA5WDsLPo.mjs → D7c0zfLVoG7EEln5.mjs} +43 -43
  68. package/node/esm/{A3PEHO1HJvkHfb5n.mjs → D8J4JmOPwG_Yr2GD.mjs} +1 -1
  69. package/node/esm/{By2TFKOjA1HekZap.mjs → D91qb21TrJX98Rw8.mjs} +3 -3
  70. package/node/esm/{D88A3UpCyGRjcX3U.mjs → D9D2NyyKbWXpTj5I.mjs} +2 -2
  71. package/node/esm/{mTIhoz1gEcaEm7s1.mjs → DBF7pIpitcmhi65H.mjs} +2 -2
  72. package/node/esm/{KDGrIa9R5XzWfjM2.mjs → DLPVrV723TSxkXqL.mjs} +1 -1
  73. package/node/esm/{Cs3ibv6YHCDwLRlk.mjs → DWsnb-a-9dfRn5jJ.mjs} +24 -24
  74. package/node/esm/{B4WUGzJBkQu7BXRm.mjs → Dj1pybJRqeZiP1Z6.mjs} +1 -1
  75. package/node/esm/{DBIUe2BC9xU7qMHR.mjs → DtNJOImWtsXVrQps.mjs} +2 -2
  76. package/node/esm/{5OfKfTRX2_y2NwpU.mjs → DxROQlX1KHLb9tHS.mjs} +1 -1
  77. package/node/esm/{446KYBjJQa8g-8Gg.mjs → dp4LxzOEkfTbVX_1.mjs} +21 -21
  78. package/node/esm/{C3zyhnMwQ2hRQBz7.mjs → ee_DgHTffiVTOiU2.mjs} +21 -21
  79. package/node/esm/{CFkX_Cn6avQqQiVC.mjs → fMFapG4AGMQKX8c5.mjs} +33 -33
  80. package/node/esm/index.mjs +545 -544
  81. package/node/esm/{CKwiipdPJGzAiPjg.mjs → jmElgIMAkpc2Ab1m.mjs} +1 -1
  82. package/node/esm/{bIGdvfpnijWeCac6.mjs → yVJ2lEYZob1gwiRZ.mjs} +14 -14
  83. package/package.json +6 -6
  84. package/resources/locales/de/model.msg.json +15 -0
  85. package/resources/locales/en/model.msg.json +15 -0
  86. package/types/scripting-api.json +11445 -11299
  87. package/types/scripting-enums.json +22 -1
  88. package/types/scripting.d.ts +623 -0
  89. package/types/src/address/index.d.ts +2 -0
  90. package/types/src/anomalies/_Anomalies.d.ts +34 -0
  91. package/types/src/anomalies/_CompletenessChecks.d.ts +32 -0
  92. package/types/src/cell/ICell.d.ts +36 -1
  93. package/types/src/cellRange/ICellRange.d.ts +106 -0
  94. package/types/src/index.d.ts +1 -0
  95. package/types/src/license/runtime.browser.d.ts +3 -1
  96. package/types/src/sheet/IWorksheet.d.ts +17 -0
  97. package/types/src/sheet/SheetCell.d.ts +3 -0
  98. package/types/src/sheet/SheetRange.d.ts +6 -0
  99. package/types/src/sheet/Worksheet.d.ts +103 -1
  100. package/types/src/sheet/_ListenerAnchor.d.ts +14 -0
  101. package/types/src/sheet/_SheetStateTypes.d.ts +13 -0
  102. package/types/src/sparkline/ISparklineGroup.d.ts +338 -0
  103. package/types/src/sparkline/ISparklineGroupCollection.d.ts +68 -0
  104. package/types/src/sparkline/SparklineGroup.d.ts +271 -0
  105. package/types/src/sparkline/SparklineGroupCollection.d.ts +25 -0
  106. package/types/src/sparkline/SparklineRanges.d.ts +195 -0
  107. package/types/src/sparkline/index.d.ts +4 -0
  108. package/types/src/sparkline/layout/SparklineLayout.d.ts +71 -0
  109. package/types/src/sparkline/layout/_layoutSparkline.d.ts +42 -0
  110. package/types/src/sparkline/layout/index.d.ts +2 -0
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.18
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { $r as e, Br as t, Dr as n, Fr as r, Gr as i, Hr as a, Ir as o, Jr as s, Kr as c, Lr as l, Mr as u, Nr as d, Qr as f, Rr as p, Ur as m, Vr as h, Wr as g, Xr as _, Yr as ee, Zr as v, ai as te, ci as y, ii as ne, jr as b, kr as x, li as S, oi as C, pi as w, qr as re, zr as T } from "./CkZoDPUCK5jMUaeJ.mjs";
7
+ import { $r as e, Ar as t, Br as n, Gr as r, Hr as i, Ir as a, Jr as o, Kr as s, Lr as c, Mr as l, Nr as u, Or as d, Pr as f, Qr as p, Rr as m, Ur as h, Vr as g, Wr as _, Xr as ee, Yr as v, Zr as y, ai as b, ei as x, li as te, mi as S, oi as C, qr as w, si as ne, ui as T, zr as re } from "./_lh_Rr5SwLthmbmu.mjs";
8
8
  import { FormulaError as E } from "@sheetxl/primitives";
9
9
  function D(e) {
10
10
  console && console.error && console.error(`Error: ${e}`);
@@ -171,7 +171,7 @@ function oe(e) {
171
171
  function B(e) {
172
172
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
173
173
  }
174
- var V = class {
174
+ var se = class {
175
175
  visit(e) {
176
176
  let t = e;
177
177
  switch (t.constructor) {
@@ -199,10 +199,10 @@ var V = class {
199
199
  visitTerminal(e) {}
200
200
  visitRule(e) {}
201
201
  };
202
- function se(e, t = []) {
203
- return e instanceof N || e instanceof I || e instanceof L || (e instanceof R ? e.definition.some((e) => se(e, t)) : !(e instanceof A && t.includes(e)) && e instanceof k && (e instanceof A && t.push(e), e.definition.every((e) => se(e, t))));
202
+ function ce(e, t = []) {
203
+ return e instanceof N || e instanceof I || e instanceof L || (e instanceof R ? e.definition.some((e) => ce(e, t)) : !(e instanceof A && t.includes(e)) && e instanceof k && (e instanceof A && t.push(e), e.definition.every((e) => ce(e, t))));
204
204
  }
205
- function H(e) {
205
+ function V(e) {
206
206
  if (e instanceof A) return "SUBRULE";
207
207
  if (e instanceof N) return "OPTION";
208
208
  if (e instanceof R) return "OR";
@@ -213,7 +213,7 @@ function H(e) {
213
213
  if (e instanceof z) return "CONSUME";
214
214
  throw Error("non exhaustive match");
215
215
  }
216
- var ce = class {
216
+ var le = class {
217
217
  walk(e, t = []) {
218
218
  e.definition.forEach((n, r) => {
219
219
  let i = e.definition.slice(r + 1);
@@ -246,7 +246,7 @@ var ce = class {
246
246
  this.walk(e, r);
247
247
  }
248
248
  walkAtLeastOneSep(e, t, n) {
249
- let r = le(e, t, n);
249
+ let r = ue(e, t, n);
250
250
  this.walk(e, r);
251
251
  }
252
252
  walkMany(e, t, n) {
@@ -254,7 +254,7 @@ var ce = class {
254
254
  this.walk(e, r);
255
255
  }
256
256
  walkManySep(e, t, n) {
257
- let r = le(e, t, n);
257
+ let r = ue(e, t, n);
258
258
  this.walk(e, r);
259
259
  }
260
260
  walkOr(e, t, n) {
@@ -265,28 +265,28 @@ var ce = class {
265
265
  });
266
266
  }
267
267
  };
268
- function le(e, t, n) {
268
+ function ue(e, t, n) {
269
269
  return [new N({ definition: [new z({ terminalType: e.separator })].concat(e.definition) })].concat(t, n);
270
270
  }
271
- function ue(e) {
272
- if (e instanceof A) return ue(e.referencedRule);
271
+ function de(e) {
272
+ if (e instanceof A) return de(e.referencedRule);
273
273
  if (e instanceof z) return [e.terminalType];
274
274
  if (function(e) {
275
275
  return e instanceof M || e instanceof N || e instanceof I || e instanceof P || e instanceof F || e instanceof L || e instanceof z || e instanceof j;
276
276
  }(e)) return function(e) {
277
277
  let t = [], n = e.definition, r, i = 0, a = n.length > i, o = !0;
278
- for (; a && o;) r = n[i], o = se(r), t = t.concat(ue(r)), i += 1, a = n.length > i;
278
+ for (; a && o;) r = n[i], o = ce(r), t = t.concat(de(r)), i += 1, a = n.length > i;
279
279
  return [...new Set(t)];
280
280
  }(e);
281
281
  if (function(e) {
282
282
  return e instanceof R;
283
283
  }(e)) return function(e) {
284
- let t = e.definition.map((e) => ue(e));
284
+ let t = e.definition.map((e) => de(e));
285
285
  return [...new Set(t.flat())];
286
286
  }(e);
287
287
  throw Error("non exhaustive match");
288
288
  }
289
- var de = "_~IN~_", fe = class extends ce {
289
+ var fe = "_~IN~_", pe = class extends le {
290
290
  constructor(e) {
291
291
  super(), this.topProd = e, this.follows = {};
292
292
  }
@@ -295,67 +295,67 @@ var de = "_~IN~_", fe = class extends ce {
295
295
  }
296
296
  walkTerminal(e, t, n) {}
297
297
  walkProdRef(e, t, n) {
298
- let r = (i = e.referencedRule, a = e.idx, i.name + a + de + this.topProd.name);
298
+ let r = (i = e.referencedRule, a = e.idx, i.name + a + fe + this.topProd.name);
299
299
  var i, a;
300
- let o = ue(new M({ definition: t.concat(n) }));
300
+ let o = de(new M({ definition: t.concat(n) }));
301
301
  this.follows[r] = o;
302
302
  }
303
303
  };
304
- function U(e) {
304
+ function H(e) {
305
305
  return e.charCodeAt(0);
306
306
  }
307
- function pe(e, t) {
307
+ function me(e, t) {
308
308
  Array.isArray(e) ? e.forEach(function(e) {
309
309
  t.push(e);
310
310
  }) : t.push(e);
311
311
  }
312
- function W(e, t) {
312
+ function U(e, t) {
313
313
  if (!0 === e[t]) throw "duplicate flag " + t;
314
314
  e[t], e[t] = !0;
315
315
  }
316
- function G(e) {
316
+ function W(e) {
317
317
  if (e === void 0) throw Error("Internal Error - Should never get here!");
318
318
  return !0;
319
319
  }
320
- function me() {
320
+ function he() {
321
321
  throw Error("Internal Error - Should never get here!");
322
322
  }
323
- function he(e) {
323
+ function ge(e) {
324
324
  return e.type === "Character";
325
325
  }
326
- var ge = [];
327
- for (let e = U("0"); e <= U("9"); e++) ge.push(e);
328
- var _e = [U("_")].concat(ge);
329
- for (let e = U("a"); e <= U("z"); e++) _e.push(e);
330
- for (let e = U("A"); e <= U("Z"); e++) _e.push(e);
331
- var ve = [
332
- U(" "),
333
- U("\f"),
334
- U("\n"),
335
- U("\r"),
336
- U(" "),
337
- U("\v"),
338
- U(" "),
339
- U("\xA0"),
340
- U(" "),
341
- U(" "),
342
- U(" "),
343
- U(" "),
344
- U(" "),
345
- U(" "),
346
- U(" "),
347
- U(" "),
348
- U(" "),
349
- U(" "),
350
- U(" "),
351
- U(" "),
352
- U("\u2028"),
353
- U("\u2029"),
354
- U(" "),
355
- U(" "),
356
- U(" "),
357
- U("")
358
- ], ye = /[0-9a-fA-F]/, be = /[0-9]/, xe = /[1-9]/, Se = class {
326
+ var _e = [];
327
+ for (let e = H("0"); e <= H("9"); e++) _e.push(e);
328
+ var ve = [H("_")].concat(_e);
329
+ for (let e = H("a"); e <= H("z"); e++) ve.push(e);
330
+ for (let e = H("A"); e <= H("Z"); e++) ve.push(e);
331
+ var ye = [
332
+ H(" "),
333
+ H("\f"),
334
+ H("\n"),
335
+ H("\r"),
336
+ H(" "),
337
+ H("\v"),
338
+ H(" "),
339
+ H("\xA0"),
340
+ H(" "),
341
+ H(" "),
342
+ H(" "),
343
+ H(" "),
344
+ H(" "),
345
+ H(" "),
346
+ H(" "),
347
+ H(" "),
348
+ H(" "),
349
+ H(" "),
350
+ H(" "),
351
+ H(" "),
352
+ H("\u2028"),
353
+ H("\u2029"),
354
+ H(" "),
355
+ H(" "),
356
+ H(" "),
357
+ H("")
358
+ ], be = /[0-9a-fA-F]/, xe = /[0-9]/, Se = /[1-9]/, Ce = class {
359
359
  visitChildren(e) {
360
360
  for (let t in e) {
361
361
  let n = e[t];
@@ -435,7 +435,7 @@ var ve = [
435
435
  visitGroup(e) {}
436
436
  visitGroupBackReference(e) {}
437
437
  visitQuantifier(e) {}
438
- }, Ce = {}, we = new class {
438
+ }, we = {}, Te = new class {
439
439
  constructor() {
440
440
  this.idx = 0, this.input = "", this.groupIdx = 0;
441
441
  }
@@ -467,18 +467,18 @@ var ve = [
467
467
  };
468
468
  for (; this.isRegExpFlag();) switch (this.popChar()) {
469
469
  case "g":
470
- W(n, "global");
470
+ U(n, "global");
471
471
  break;
472
472
  case "i":
473
- W(n, "ignoreCase");
473
+ U(n, "ignoreCase");
474
474
  break;
475
475
  case "m":
476
- W(n, "multiLine");
476
+ U(n, "multiLine");
477
477
  break;
478
478
  case "u":
479
- W(n, "unicode");
479
+ U(n, "unicode");
480
480
  break;
481
- case "y": W(n, "sticky");
481
+ case "y": U(n, "sticky");
482
482
  }
483
483
  if (this.idx !== this.input.length) throw Error("Redundant input: " + this.input.substring(this.idx));
484
484
  return {
@@ -548,7 +548,7 @@ var ve = [
548
548
  case "!": t = "NegativeLookbehind";
549
549
  }
550
550
  }
551
- G(t);
551
+ W(t);
552
552
  let n = this.disjunction();
553
553
  return this.consumeChar(")"), {
554
554
  type: t,
@@ -556,7 +556,7 @@ var ve = [
556
556
  loc: this.loc(e)
557
557
  };
558
558
  }
559
- return me();
559
+ return he();
560
560
  }
561
561
  quantifier(e = !1) {
562
562
  let t, n = this.idx;
@@ -599,9 +599,9 @@ var ve = [
599
599
  }, this.consumeChar("}");
600
600
  }
601
601
  if (!0 === e && t === void 0) return;
602
- G(t);
602
+ W(t);
603
603
  }
604
- if (!0 !== e || t !== void 0) return G(t) ? (this.peekChar(0) === "?" ? (this.consumeChar("?"), t.greedy = !1) : t.greedy = !0, t.type = "Quantifier", t.loc = this.loc(n), t) : void 0;
604
+ if (!0 !== e || t !== void 0) return W(t) ? (this.peekChar(0) === "?" ? (this.consumeChar("?"), t.greedy = !1) : t.greedy = !0, t.type = "Quantifier", t.loc = this.loc(n), t) : void 0;
605
605
  }
606
606
  atom() {
607
607
  let e, t = this.idx;
@@ -617,17 +617,17 @@ var ve = [
617
617
  break;
618
618
  case "(": e = this.group();
619
619
  }
620
- return e === void 0 && this.isPatternCharacter() && (e = this.patternCharacter()), G(e) ? (e.loc = this.loc(t), this.isQuantifier() && (e.quantifier = this.quantifier()), e) : me();
620
+ return e === void 0 && this.isPatternCharacter() && (e = this.patternCharacter()), W(e) ? (e.loc = this.loc(t), this.isQuantifier() && (e.quantifier = this.quantifier()), e) : he();
621
621
  }
622
622
  dotAll() {
623
623
  return this.consumeChar("."), {
624
624
  type: "Set",
625
625
  complement: !0,
626
626
  value: [
627
- U("\n"),
628
- U("\r"),
629
- U("\u2028"),
630
- U("\u2029")
627
+ H("\n"),
628
+ H("\r"),
629
+ H("\u2028"),
630
+ H("\u2029")
631
631
  ]
632
632
  };
633
633
  }
@@ -670,49 +670,49 @@ var ve = [
670
670
  let e, t = !1;
671
671
  switch (this.popChar()) {
672
672
  case "d":
673
- e = ge;
673
+ e = _e;
674
674
  break;
675
675
  case "D":
676
- e = ge, t = !0;
676
+ e = _e, t = !0;
677
677
  break;
678
678
  case "s":
679
- e = ve;
679
+ e = ye;
680
680
  break;
681
681
  case "S":
682
- e = ve, t = !0;
682
+ e = ye, t = !0;
683
683
  break;
684
684
  case "w":
685
- e = _e;
685
+ e = ve;
686
686
  break;
687
- case "W": e = _e, t = !0;
687
+ case "W": e = ve, t = !0;
688
688
  }
689
- return G(e) ? {
689
+ return W(e) ? {
690
690
  type: "Set",
691
691
  value: e,
692
692
  complement: t
693
- } : me();
693
+ } : he();
694
694
  }
695
695
  controlEscapeAtom() {
696
696
  let e;
697
697
  switch (this.popChar()) {
698
698
  case "f":
699
- e = U("\f");
699
+ e = H("\f");
700
700
  break;
701
701
  case "n":
702
- e = U("\n");
702
+ e = H("\n");
703
703
  break;
704
704
  case "r":
705
- e = U("\r");
705
+ e = H("\r");
706
706
  break;
707
707
  case "t":
708
- e = U(" ");
708
+ e = H(" ");
709
709
  break;
710
- case "v": e = U("\v");
710
+ case "v": e = H("\v");
711
711
  }
712
- return G(e) ? {
712
+ return W(e) ? {
713
713
  type: "Character",
714
714
  value: e
715
- } : me();
715
+ } : he();
716
716
  }
717
717
  controlLetterEscapeAtom() {
718
718
  this.consumeChar("c");
@@ -726,7 +726,7 @@ var ve = [
726
726
  nulCharacterAtom() {
727
727
  return this.consumeChar("0"), {
728
728
  type: "Character",
729
- value: U("\0")
729
+ value: H("\0")
730
730
  };
731
731
  }
732
732
  hexEscapeSequenceAtom() {
@@ -738,7 +738,7 @@ var ve = [
738
738
  identityEscapeAtom() {
739
739
  return {
740
740
  type: "Character",
741
- value: U(this.popChar())
741
+ value: H(this.popChar())
742
742
  };
743
743
  }
744
744
  classPatternCharacterAtom() {
@@ -751,7 +751,7 @@ var ve = [
751
751
  case "]": throw Error("TBD");
752
752
  default: return {
753
753
  type: "Character",
754
- value: U(this.popChar())
754
+ value: H(this.popChar())
755
755
  };
756
756
  }
757
757
  }
@@ -759,17 +759,17 @@ var ve = [
759
759
  let e = [], t = !1;
760
760
  for (this.consumeChar("["), this.peekChar(0) === "^" && (this.consumeChar("^"), t = !0); this.isClassAtom();) {
761
761
  let t = this.classAtom();
762
- if (t.type, he(t) && this.isRangeDash()) {
762
+ if (t.type, ge(t) && this.isRangeDash()) {
763
763
  this.consumeChar("-");
764
764
  let n = this.classAtom();
765
- if (n.type, he(n)) {
765
+ if (n.type, ge(n)) {
766
766
  if (n.value < t.value) throw Error("Range out of order in character class");
767
767
  e.push({
768
768
  from: t.value,
769
769
  to: n.value
770
770
  });
771
- } else pe(t.value, e), e.push(U("-")), pe(n.value, e);
772
- } else pe(t.value, e);
771
+ } else me(t.value, e), e.push(H("-")), me(n.value, e);
772
+ } else me(t.value, e);
773
773
  }
774
774
  return this.consumeChar("]"), {
775
775
  type: "Set",
@@ -792,7 +792,7 @@ var ve = [
792
792
  switch (this.consumeChar("\\"), this.peekChar()) {
793
793
  case "b": return this.consumeChar("b"), {
794
794
  type: "Character",
795
- value: U("\b")
795
+ value: H("\b")
796
796
  };
797
797
  case "d":
798
798
  case "D":
@@ -826,14 +826,14 @@ var ve = [
826
826
  }
827
827
  positiveInteger() {
828
828
  let e = this.popChar();
829
- if (!1 === xe.test(e)) throw Error("Expecting a positive integer");
830
- for (; be.test(this.peekChar(0));) e += this.popChar();
829
+ if (!1 === Se.test(e)) throw Error("Expecting a positive integer");
830
+ for (; xe.test(this.peekChar(0));) e += this.popChar();
831
831
  return parseInt(e, 10);
832
832
  }
833
833
  integerIncludingZero() {
834
834
  let e = this.popChar();
835
- if (!1 === be.test(e)) throw Error("Expecting an integer");
836
- for (; be.test(this.peekChar(0));) e += this.popChar();
835
+ if (!1 === xe.test(e)) throw Error("Expecting an integer");
836
+ for (; xe.test(this.peekChar(0));) e += this.popChar();
837
837
  return parseInt(e, 10);
838
838
  }
839
839
  patternCharacter() {
@@ -856,7 +856,7 @@ var ve = [
856
856
  case "|": throw Error("TBD");
857
857
  default: return {
858
858
  type: "Character",
859
- value: U(e)
859
+ value: H(e)
860
860
  };
861
861
  }
862
862
  }
@@ -874,7 +874,7 @@ var ve = [
874
874
  return this.peekChar() === "-" && this.isClassAtom(1);
875
875
  }
876
876
  isDigit() {
877
- return be.test(this.peekChar(0));
877
+ return xe.test(this.peekChar(0));
878
878
  }
879
879
  isClassAtom(e = 0) {
880
880
  switch (this.peekChar(e)) {
@@ -947,7 +947,7 @@ var ve = [
947
947
  let t = "";
948
948
  for (let n = 0; n < e; n++) {
949
949
  let e = this.popChar();
950
- if (!1 === ye.test(e)) throw Error("Expecting a HexDecimal digits");
950
+ if (!1 === be.test(e)) throw Error("Expecting a HexDecimal digits");
951
951
  t += e;
952
952
  }
953
953
  return {
@@ -974,32 +974,32 @@ var ve = [
974
974
  };
975
975
  }
976
976
  }();
977
- function Te(e) {
977
+ function Ee(e) {
978
978
  let t = e.toString();
979
- if (Ce.hasOwnProperty(t)) return Ce[t];
979
+ if (we.hasOwnProperty(t)) return we[t];
980
980
  {
981
- let e = we.pattern(t);
982
- return Ce[t] = e, e;
981
+ let e = Te.pattern(t);
982
+ return we[t] = e, e;
983
983
  }
984
984
  }
985
- var Ee = "Complement Sets are not supported for first char optimization", De = "Unable to use \"first char\" lexer optimizations:\n";
986
- function Oe(e, t = !1) {
985
+ var De = "Complement Sets are not supported for first char optimization", Oe = "Unable to use \"first char\" lexer optimizations:\n";
986
+ function ke(e, t = !1) {
987
987
  try {
988
- let t = Te(e);
989
- return ke(t.value, {}, t.flags.ignoreCase);
988
+ let t = Ee(e);
989
+ return Ae(t.value, {}, t.flags.ignoreCase);
990
990
  } catch (n) {
991
- if (n.message === Ee) t && O(`${De}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);
991
+ if (n.message === De) t && O(`${Oe}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);
992
992
  else {
993
993
  let n = "";
994
- t && (n = "\n This will disable the lexer's first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."), D(`${De}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues` + n);
994
+ t && (n = "\n This will disable the lexer's first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."), D(`${Oe}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues` + n);
995
995
  }
996
996
  }
997
997
  return [];
998
998
  }
999
- function ke(e, t, n) {
999
+ function Ae(e, t, n) {
1000
1000
  switch (e.type) {
1001
1001
  case "Disjunction":
1002
- for (let r = 0; r < e.value.length; r++) ke(e.value[r], t, n);
1002
+ for (let r = 0; r < e.value.length; r++) Ae(e.value[r], t, n);
1003
1003
  break;
1004
1004
  case "Alternative":
1005
1005
  let r = e.value;
@@ -1019,17 +1019,17 @@ function ke(e, t, n) {
1019
1019
  let a = i;
1020
1020
  switch (a.type) {
1021
1021
  case "Character":
1022
- Ae(a.value, t, n);
1022
+ je(a.value, t, n);
1023
1023
  break;
1024
1024
  case "Set":
1025
- if (!0 === a.complement) throw Error(Ee);
1025
+ if (!0 === a.complement) throw Error(De);
1026
1026
  a.value.forEach((e) => {
1027
- if (typeof e == "number") Ae(e, t, n);
1027
+ if (typeof e == "number") je(e, t, n);
1028
1028
  else {
1029
1029
  let r = e;
1030
- if (!0 === n) for (let e = r.from; e <= r.to; e++) Ae(e, t, n);
1030
+ if (!0 === n) for (let e = r.from; e <= r.to; e++) je(e, t, n);
1031
1031
  else {
1032
- for (let e = r.from; e <= r.to && e < 256; e++) Ae(e, t, n);
1032
+ for (let e = r.from; e <= r.to && e < 256; e++) je(e, t, n);
1033
1033
  if (r.to >= 256) {
1034
1034
  let e = r.from >= 256 ? r.from : 256, n = r.to, i = K(e), a = K(n);
1035
1035
  for (let e = i; e <= a; e++) t[e] = e;
@@ -1039,19 +1039,19 @@ function ke(e, t, n) {
1039
1039
  });
1040
1040
  break;
1041
1041
  case "Group":
1042
- ke(a.value, t, n);
1042
+ Ae(a.value, t, n);
1043
1043
  break;
1044
1044
  default: throw Error("Non Exhaustive Match");
1045
1045
  }
1046
1046
  let o = a.quantifier !== void 0 && a.quantifier.atLeast === 0;
1047
- if (a.type === "Group" && !1 === Me(a) || a.type !== "Group" && !1 === o) break;
1047
+ if (a.type === "Group" && !1 === Ne(a) || a.type !== "Group" && !1 === o) break;
1048
1048
  }
1049
1049
  break;
1050
1050
  default: throw Error("non exhaustive match!");
1051
1051
  }
1052
1052
  return Object.values(t);
1053
1053
  }
1054
- function Ae(e, t, n) {
1054
+ function je(e, t, n) {
1055
1055
  let r = K(e);
1056
1056
  t[r] = r, !0 === n && function(e, t) {
1057
1057
  let n = String.fromCharCode(e), r = n.toUpperCase();
@@ -1067,7 +1067,7 @@ function Ae(e, t, n) {
1067
1067
  }
1068
1068
  }(e, t);
1069
1069
  }
1070
- function je(e, t) {
1070
+ function Me(e, t) {
1071
1071
  return e.value.find((e) => {
1072
1072
  if (typeof e == "number") return t.includes(e);
1073
1073
  {
@@ -1076,11 +1076,11 @@ function je(e, t) {
1076
1076
  }
1077
1077
  });
1078
1078
  }
1079
- function Me(e) {
1079
+ function Ne(e) {
1080
1080
  let t = e.quantifier;
1081
- return !(!t || t.atLeast !== 0) || !!e.value && (Array.isArray(e.value) ? e.value.every(Me) : Me(e.value));
1081
+ return !(!t || t.atLeast !== 0) || !!e.value && (Array.isArray(e.value) ? e.value.every(Ne) : Ne(e.value));
1082
1082
  }
1083
- var Ne = class extends Se {
1083
+ var Pe = class extends Ce {
1084
1084
  constructor(e) {
1085
1085
  super(), this.targetCharCodes = e, this.found = !1;
1086
1086
  }
@@ -1107,12 +1107,12 @@ var Ne = class extends Se {
1107
1107
  this.targetCharCodes.includes(e.value) && (this.found = !0);
1108
1108
  }
1109
1109
  visitSet(e) {
1110
- e.complement ? je(e, this.targetCharCodes) === void 0 && (this.found = !0) : je(e, this.targetCharCodes) !== void 0 && (this.found = !0);
1110
+ e.complement ? Me(e, this.targetCharCodes) === void 0 && (this.found = !0) : Me(e, this.targetCharCodes) !== void 0 && (this.found = !0);
1111
1111
  }
1112
1112
  };
1113
- function Pe(e, t) {
1113
+ function Fe(e, t) {
1114
1114
  if (t instanceof RegExp) {
1115
- let n = Te(t), r = new Ne(e);
1115
+ let n = Ee(t), r = new Pe(e);
1116
1116
  return r.visit(n), r.found;
1117
1117
  }
1118
1118
  for (let n of t) {
@@ -1121,7 +1121,7 @@ function Pe(e, t) {
1121
1121
  }
1122
1122
  return !1;
1123
1123
  }
1124
- var Fe = "PATTERN", Ie = "defaultMode";
1124
+ var G = "PATTERN", Ie = "defaultMode";
1125
1125
  function Le(e, t) {
1126
1126
  let n = (t = Object.assign({
1127
1127
  safeMode: !1,
@@ -1137,12 +1137,12 @@ function Le(e, t) {
1137
1137
  }
1138
1138
  })();
1139
1139
  }), n("Reject Lexer.NA", () => {
1140
- r = e.filter((e) => e[Fe] !== J.NA);
1140
+ r = e.filter((e) => e[G] !== J.NA);
1141
1141
  });
1142
1142
  let i, a, o, s, c, l, u, d, f, p, m, h = !1;
1143
1143
  n("Transform Patterns", () => {
1144
1144
  h = !1, i = r.map((e) => {
1145
- let t = e[Fe];
1145
+ let t = e[G];
1146
1146
  if (t instanceof RegExp) {
1147
1147
  let e = t.source;
1148
1148
  return e.length !== 1 || e === "^" || e === "$" || e === "." || t.ignoreCase ? e.length !== 2 || e[0] !== "\\" || [
@@ -1189,7 +1189,7 @@ function Le(e, t) {
1189
1189
  }), c = r.map((e) => e.PUSH_MODE), l = r.map((e) => Object.hasOwn(e, "POP_MODE"));
1190
1190
  }), n("Line Terminator Handling", () => {
1191
1191
  let e = qe(t.lineTerminatorCharacters);
1192
- u = r.map((e) => !1), t.positionTracking !== "onlyOffset" && (u = r.map((t) => Object.hasOwn(t, "LINE_BREAKS") ? !!t.LINE_BREAKS : !1 === Ge(t, e) && Pe(e, t.PATTERN)));
1192
+ u = r.map((e) => !1), t.positionTracking !== "onlyOffset" && (u = r.map((t) => Object.hasOwn(t, "LINE_BREAKS") ? !!t.LINE_BREAKS : !1 === Ge(t, e) && Fe(e, t.PATTERN)));
1193
1193
  }), n("Misc Mapping #2", () => {
1194
1194
  d = r.map(He), f = i.map(Ue), p = r.reduce((e, t) => {
1195
1195
  let n = t.GROUP;
@@ -1199,7 +1199,7 @@ function Le(e, t) {
1199
1199
  if (!(e instanceof RegExp) || e.flags !== "") return;
1200
1200
  let t;
1201
1201
  try {
1202
- t = Te(e);
1202
+ t = Ee(e);
1203
1203
  } catch {
1204
1204
  return;
1205
1205
  }
@@ -1244,14 +1244,14 @@ function Le(e, t) {
1244
1244
  t !== i && (t = i, Je(e, i, m[r]));
1245
1245
  });
1246
1246
  } else if (n.PATTERN instanceof RegExp) {
1247
- if (n.PATTERN.unicode) g = !1, t.ensureOptimizations && D(`${De}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);
1247
+ if (n.PATTERN.unicode) g = !1, t.ensureOptimizations && D(`${Oe}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);
1248
1248
  else {
1249
- let i = Oe(n.PATTERN, t.ensureOptimizations);
1249
+ let i = ke(n.PATTERN, t.ensureOptimizations);
1250
1250
  i.length === 0 && (g = !1), i.forEach((t) => {
1251
1251
  Je(e, t, m[r]);
1252
1252
  });
1253
1253
  }
1254
- } else t.ensureOptimizations && D(`${De}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`), g = !1;
1254
+ } else t.ensureOptimizations && D(`${Oe}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`), g = !1;
1255
1255
  return e;
1256
1256
  }, []);
1257
1257
  }), {
@@ -1264,7 +1264,7 @@ function Le(e, t) {
1264
1264
  }
1265
1265
  function Re(e, t) {
1266
1266
  let n = [], r = function(e) {
1267
- let t = e.filter((e) => !Object.hasOwn(e, Fe));
1267
+ let t = e.filter((e) => !Object.hasOwn(e, G));
1268
1268
  return {
1269
1269
  errors: t.map((e) => ({
1270
1270
  message: "Token Type: ->" + e.name + "<- missing static 'PATTERN' property",
@@ -1277,7 +1277,7 @@ function Re(e, t) {
1277
1277
  n = n.concat(r.errors);
1278
1278
  let i = function(e) {
1279
1279
  let t = e.filter((e) => {
1280
- let t = e[Fe];
1280
+ let t = e[G];
1281
1281
  return !(t instanceof RegExp || typeof t == "function" || Object.hasOwn(t, "exec") || typeof t == "string");
1282
1282
  });
1283
1283
  return {
@@ -1290,9 +1290,9 @@ function Re(e, t) {
1290
1290
  };
1291
1291
  }(r.valid), a = i.valid;
1292
1292
  return n = n.concat(i.errors), n = n.concat(function(e) {
1293
- let t = [], n = e.filter((e) => e[Fe] instanceof RegExp);
1293
+ let t = [], n = e.filter((e) => e[G] instanceof RegExp);
1294
1294
  return t = t.concat(function(e) {
1295
- class t extends Se {
1295
+ class t extends Ce {
1296
1296
  constructor() {
1297
1297
  super(...arguments), this.found = !1;
1298
1298
  }
@@ -1303,7 +1303,7 @@ function Re(e, t) {
1303
1303
  return e.filter((e) => {
1304
1304
  let n = e.PATTERN;
1305
1305
  try {
1306
- let e = Te(n), r = new t();
1306
+ let e = Ee(n), r = new t();
1307
1307
  return r.visit(e), r.found;
1308
1308
  } catch {
1309
1309
  return ze.test(n.source);
@@ -1314,7 +1314,7 @@ function Re(e, t) {
1314
1314
  tokenTypes: [e]
1315
1315
  }));
1316
1316
  }(n)), t = t.concat(function(e) {
1317
- class t extends Se {
1317
+ class t extends Ce {
1318
1318
  constructor() {
1319
1319
  super(...arguments), this.found = !1;
1320
1320
  }
@@ -1325,7 +1325,7 @@ function Re(e, t) {
1325
1325
  return e.filter((e) => {
1326
1326
  let n = e.PATTERN;
1327
1327
  try {
1328
- let e = Te(n), r = new t();
1328
+ let e = Ee(n), r = new t();
1329
1329
  return r.visit(e), r.found;
1330
1330
  } catch {
1331
1331
  return Be.test(n.source);
@@ -1337,7 +1337,7 @@ function Re(e, t) {
1337
1337
  }));
1338
1338
  }(n)), t = t.concat(function(e) {
1339
1339
  return e.filter((e) => {
1340
- let t = e[Fe];
1340
+ let t = e[G];
1341
1341
  return t instanceof RegExp && (t.multiline || t.global);
1342
1342
  }).map((e) => ({
1343
1343
  message: "Token Type: ->" + e.name + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')",
@@ -1460,7 +1460,7 @@ function Ge(e, t) {
1460
1460
  if (Object.hasOwn(e, "LINE_BREAKS")) return !1;
1461
1461
  if (e.PATTERN instanceof RegExp) {
1462
1462
  try {
1463
- Pe(t, e.PATTERN);
1463
+ Fe(t, e.PATTERN);
1464
1464
  } catch (e) {
1465
1465
  return {
1466
1466
  issue: q.IDENTIFY_TERMINATOR,
@@ -1617,7 +1617,7 @@ var J = class {
1617
1617
  }(n, this.trackStartLines, this.config.lineTerminatorCharacters));
1618
1618
  }), this.TRACE_INIT("performWarningRuntimeChecks", () => {
1619
1619
  this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(function(e, t, n) {
1620
- let r = [], i = !1, a = Object.values(e.modes || {}).flat().filter(Boolean).filter((e) => e[Fe] !== J.NA), o = qe(n);
1620
+ let r = [], i = !1, a = Object.values(e.modes || {}).flat().filter(Boolean).filter((e) => e[G] !== J.NA), o = qe(n);
1621
1621
  return t && a.forEach((e) => {
1622
1622
  let t = Ge(e, o);
1623
1623
  if (!1 !== t) {
@@ -1627,7 +1627,7 @@ var J = class {
1627
1627
  tokenType: e
1628
1628
  };
1629
1629
  r.push(n);
1630
- } else Object.hasOwn(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (i = !0) : Pe(o, e.PATTERN) && (i = !0);
1630
+ } else Object.hasOwn(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (i = !0) : Fe(o, e.PATTERN) && (i = !0);
1631
1631
  }), t && !i && r.push({
1632
1632
  message: "Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.",
1633
1633
  type: q.NO_LINE_BREAKS_FLAGS
@@ -1672,7 +1672,7 @@ var J = class {
1672
1672
  let e = Object.entries(this.canModeBeOptimized).reduce((e, [t, n]) => (!1 === n && e.push(t), e), []);
1673
1673
  if (t.ensureOptimizations && e.length > 0) throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`);
1674
1674
  }), this.TRACE_INIT("clearRegExpParserCache", () => {
1675
- Ce = {};
1675
+ we = {};
1676
1676
  }), this.TRACE_INIT("toFastProperties", () => {
1677
1677
  ae(this);
1678
1678
  });
@@ -1686,14 +1686,14 @@ var J = class {
1686
1686
  return this.tokenizeInternal(e, t);
1687
1687
  }
1688
1688
  tokenizeInternal(e, t) {
1689
- let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = e, ee = _.length, v = 0, te = 0, y = this.hasCustom ? 0 : Math.floor(e.length / 10), ne = Array(y), b = [], x = this.trackStartLines ? 1 : void 0, S = this.trackStartLines ? 1 : void 0, C = {};
1690
- for (let e = 0; e < this.cachedGroupKeys.length; e++) C[this.cachedGroupKeys[e]] = [];
1691
- let w = this.trackStartLines, re = this.config.lineTerminatorsPattern, T = 0, E = [], D = [], O = [], ie = [];
1689
+ let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = e, ee = _.length, v = 0, y = 0, b = this.hasCustom ? 0 : Math.floor(e.length / 10), x = Array(b), te = [], S = this.trackStartLines ? 1 : void 0, C = this.trackStartLines ? 1 : void 0, w = {};
1690
+ for (let e = 0; e < this.cachedGroupKeys.length; e++) w[this.cachedGroupKeys[e]] = [];
1691
+ let ne = this.trackStartLines, T = this.config.lineTerminatorsPattern, re = 0, E = [], D = [], O = [], ie = [];
1692
1692
  Object.freeze(ie);
1693
1693
  let ae = !1, k = (e) => {
1694
1694
  if (O.length === 1 && e.tokenType.PUSH_MODE === void 0) {
1695
1695
  let t = this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);
1696
- b.push({
1696
+ te.push({
1697
1697
  offset: e.startOffset,
1698
1698
  line: e.startLine,
1699
1699
  column: e.startColumn,
@@ -1703,13 +1703,13 @@ var J = class {
1703
1703
  } else {
1704
1704
  O.pop();
1705
1705
  let e = O.at(-1);
1706
- E = this.patternIdxToConfig[e], D = this.charCodeToPatternIdxToConfig[e], T = E.length;
1706
+ E = this.patternIdxToConfig[e], D = this.charCodeToPatternIdxToConfig[e], re = E.length;
1707
1707
  let t = this.canModeBeOptimized[e] && !1 === this.config.safeMode;
1708
1708
  ae = !(!D || !t);
1709
1709
  }
1710
1710
  };
1711
1711
  function A(e) {
1712
- O.push(e), D = this.charCodeToPatternIdxToConfig[e], E = this.patternIdxToConfig[e], T = E.length;
1712
+ O.push(e), D = this.charCodeToPatternIdxToConfig[e], E = this.patternIdxToConfig[e], re = E.length;
1713
1713
  let t = this.canModeBeOptimized[e] && !1 === this.config.safeMode;
1714
1714
  ae = !(!D || !t);
1715
1715
  }
@@ -1718,21 +1718,21 @@ var J = class {
1718
1718
  let M = this.config.recoveryEnabled;
1719
1719
  for (; v < ee;) {
1720
1720
  s = null, u = -1;
1721
- let t = _.charCodeAt(v), y;
1721
+ let t = _.charCodeAt(v), b;
1722
1722
  if (ae) {
1723
1723
  let e = K(t), n = D[e];
1724
- y = n === void 0 ? ie : n;
1725
- } else y = E;
1726
- let N = y.length;
1724
+ b = n === void 0 ? ie : n;
1725
+ } else b = E;
1726
+ let N = b.length;
1727
1727
  for (n = 0; n < N; n++) {
1728
- j = y[n];
1728
+ j = b[n];
1729
1729
  let r = j.pattern;
1730
1730
  switch (c = null, j.matchType) {
1731
1731
  case 0:
1732
1732
  t === j.short && (u = 1, s = r);
1733
1733
  break;
1734
1734
  case 1:
1735
- g = r.exec(_, v, ne, C), g === null ? s = null : (s = g[0], u = s.length, g.payload !== void 0 && (c = g.payload));
1735
+ g = r.exec(_, v, x, w), g === null ? s = null : (s = g[0], u = s.length, g.payload !== void 0 && (c = g.payload));
1736
1736
  break;
1737
1737
  case 3: {
1738
1738
  let e = j.asciiClass;
@@ -1753,7 +1753,7 @@ var J = class {
1753
1753
  let t = o.length;
1754
1754
  for (i = 0; i < t; i++) {
1755
1755
  let t = E[o[i]], n = t.pattern;
1756
- if (l = null, t.matchType === 1 ? (g = n.exec(_, v, ne, C), g === null ? a = null : (a = g[0], g.payload !== void 0 && (l = g.payload))) : (n.lastIndex = v, a = this.match(n, e, v)), a && a.length > s.length) {
1756
+ if (l = null, t.matchType === 1 ? (g = n.exec(_, v, x, w), g === null ? a = null : (a = g[0], g.payload !== void 0 && (l = g.payload))) : (n.lastIndex = v, a = this.match(n, e, v)), a && a.length > s.length) {
1757
1757
  s = a, u = a.length, c = l, j = t;
1758
1758
  break;
1759
1759
  }
@@ -1763,32 +1763,32 @@ var J = class {
1763
1763
  }
1764
1764
  }
1765
1765
  if (u !== -1) {
1766
- if (d = j.group, d !== void 0 && (s = s === null ? e.substring(v, v + u) : s, f = j.tokenTypeIdx, p = this.createTokenInstance(s, v, f, j.tokenType, x, S, u), this.handlePayload(p, c), !1 === d ? te = this.addToken(ne, te, p) : C[d].push(p)), !0 === w && !0 === j.canLineTerminator) {
1766
+ if (d = j.group, d !== void 0 && (s = s === null ? e.substring(v, v + u) : s, f = j.tokenTypeIdx, p = this.createTokenInstance(s, v, f, j.tokenType, S, C, u), this.handlePayload(p, c), !1 === d ? y = this.addToken(x, y, p) : w[d].push(p)), !0 === ne && !0 === j.canLineTerminator) {
1767
1767
  let t, n, r = 0;
1768
- re.lastIndex = 0;
1768
+ T.lastIndex = 0;
1769
1769
  do
1770
- s = s === null ? e.substring(v, v + u) : s, t = re.test(s), !0 === t && (n = re.lastIndex - 1, r++);
1770
+ s = s === null ? e.substring(v, v + u) : s, t = T.test(s), !0 === t && (n = T.lastIndex - 1, r++);
1771
1771
  while (!0 === t);
1772
- r === 0 ? S = this.computeNewColumn(S, u) : (x += r, S = u - n, this.updateTokenEndLineColumnLocation(p, d, n, r, x, S, u));
1773
- } else S = this.computeNewColumn(S, u);
1772
+ r === 0 ? C = this.computeNewColumn(C, u) : (S += r, C = u - n, this.updateTokenEndLineColumnLocation(p, d, n, r, S, C, u));
1773
+ } else C = this.computeNewColumn(C, u);
1774
1774
  v += u, this.handleModes(j, k, A, p);
1775
1775
  } else {
1776
- let t = v, n = x, i = S, a = !1 === M;
1777
- for (; !1 === a && v < ee;) for (v++, r = 0; r < T; r++) {
1776
+ let t = v, n = S, i = C, a = !1 === M;
1777
+ for (; !1 === a && v < ee;) for (v++, r = 0; r < re; r++) {
1778
1778
  let t = E[r], n = t.pattern;
1779
1779
  switch (t.matchType) {
1780
1780
  case 0:
1781
1781
  _.charCodeAt(v) === t.short && (a = !0);
1782
1782
  break;
1783
1783
  case 1:
1784
- a = n.exec(_, v, ne, C) !== null;
1784
+ a = n.exec(_, v, x, w) !== null;
1785
1785
  break;
1786
1786
  case 3:
1787
1787
  case 2: n.lastIndex = v, a = n.exec(e) !== null;
1788
1788
  }
1789
1789
  if (!0 === a) break;
1790
1790
  }
1791
- if (m = v - t, S = this.computeNewColumn(S, m), h = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_, t, m, n, i, O.at(-1)), b.push({
1791
+ if (m = v - t, C = this.computeNewColumn(C, m), h = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_, t, m, n, i, O.at(-1)), te.push({
1792
1792
  offset: t,
1793
1793
  line: n,
1794
1794
  column: i,
@@ -1797,10 +1797,10 @@ var J = class {
1797
1797
  }), !1 === M) break;
1798
1798
  }
1799
1799
  }
1800
- return this.hasCustom || (ne.length = te), {
1801
- tokens: ne,
1802
- groups: C,
1803
- errors: b
1800
+ return this.hasCustom || (x.length = y), {
1801
+ tokens: x,
1802
+ groups: w,
1803
+ errors: te
1804
1804
  };
1805
1805
  }
1806
1806
  handleModes(e, t, n, r) {
@@ -1912,7 +1912,7 @@ var yt = {
1912
1912
  Object.freeze(yt);
1913
1913
  var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a rule which is not defined: ->" + t.nonTerminalName + "<-\ninside top level rule: ->" + e.name + "<-" }, xt = {
1914
1914
  buildDuplicateFoundError(e, t) {
1915
- let n = e.name, r = t[0], i = r.idx, a = H(r), o = (s = r) instanceof z ? s.terminalType.name : s instanceof A ? s.nonTerminalName : "";
1915
+ let n = e.name, r = t[0], i = r.idx, a = V(r), o = (s = r) instanceof z ? s.terminalType.name : s instanceof A ? s.nonTerminalName : "";
1916
1916
  var s;
1917
1917
  let c = `->${a}${i > 0 ? i : ""}<- ${o ? `with argument: ->${o}<-` : ""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;
1918
1918
  return c = c.replace(/[ \t]+/g, " "), c = c.replace(/\s\s+/g, "\n"), c;
@@ -1927,7 +1927,7 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1927
1927
  return r += n ? "These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n" : `<${e.prefixPath.map((e) => st(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`, r += "See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.", r;
1928
1928
  },
1929
1929
  buildEmptyRepetitionError(e) {
1930
- let t = H(e.repetition);
1930
+ let t = V(e.repetition);
1931
1931
  return e.repetition.idx !== 0 && (t += e.repetition.idx), `The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`;
1932
1932
  },
1933
1933
  buildTokenNameError: (e) => "deprecated",
@@ -1942,7 +1942,7 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1942
1942
  let t;
1943
1943
  return t = e.topLevelRule instanceof j ? e.topLevelRule.name : e.topLevelRule, `Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`;
1944
1944
  }
1945
- }, Z, St = class extends V {
1945
+ }, Z, St = class extends se {
1946
1946
  constructor(e, t) {
1947
1947
  super(), this.nameToTopRule = e, this.errMsgProvider = t, this.errors = [];
1948
1948
  }
@@ -1964,7 +1964,7 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1964
1964
  });
1965
1965
  }
1966
1966
  }
1967
- }, Ct = class extends ce {
1967
+ }, Ct = class extends le {
1968
1968
  constructor(e, t) {
1969
1969
  super(), this.topProd = e, this.path = t, this.possibleTokTypes = [], this.nextProductionName = "", this.nextProductionOccurrence = 0, this.found = !1, this.isAtEndOfPath = !1;
1970
1970
  }
@@ -1991,10 +1991,10 @@ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1991
1991
  walkTerminal(e, t, n) {
1992
1992
  if (this.isAtEndOfPath && e.terminalType.name === this.nextTerminalName && e.idx === this.nextTerminalOccurrence && !this.found) {
1993
1993
  let e = new M({ definition: t.concat(n) });
1994
- this.possibleTokTypes = ue(e), this.found = !0;
1994
+ this.possibleTokTypes = de(e), this.found = !0;
1995
1995
  }
1996
1996
  }
1997
- }, Tt = class extends ce {
1997
+ }, Tt = class extends le {
1998
1998
  constructor(e, t) {
1999
1999
  super(), this.topRule = e, this.occurrence = t, this.result = {
2000
2000
  token: void 0,
@@ -2152,7 +2152,7 @@ function Pt(e, t, n) {
2152
2152
  (function(e) {
2153
2153
  e[e.OPTION = 0] = "OPTION", e[e.REPETITION = 1] = "REPETITION", e[e.REPETITION_MANDATORY = 2] = "REPETITION_MANDATORY", e[e.REPETITION_MANDATORY_WITH_SEPARATOR = 3] = "REPETITION_MANDATORY_WITH_SEPARATOR", e[e.REPETITION_WITH_SEPARATOR = 4] = "REPETITION_WITH_SEPARATOR", e[e.ALTERNATION = 5] = "ALTERNATION";
2154
2154
  })(Z ||= {});
2155
- var Ft = class extends ce {
2155
+ var Ft = class extends le {
2156
2156
  constructor(e, t, n) {
2157
2157
  super(), this.topProd = e, this.targetOccurrence = t, this.targetProdType = n;
2158
2158
  }
@@ -2177,7 +2177,7 @@ var Ft = class extends ce {
2177
2177
  walkManySep(e, t, n) {
2178
2178
  this.checkIsTarget(e, Z.REPETITION_WITH_SEPARATOR, t, n) || super.walkOption(e, t, n);
2179
2179
  }
2180
- }, It = class extends V {
2180
+ }, It = class extends se {
2181
2181
  constructor(e, t, n) {
2182
2182
  super(), this.targetOccurrence = e, this.targetProdType = t, this.targetRef = n, this.result = [];
2183
2183
  }
@@ -2302,7 +2302,7 @@ function Gt(e, t, n, r) {
2302
2302
  e.accept(n);
2303
2303
  let r = n.allProductions, i = Object.groupBy(r, Kt), a = Object.fromEntries(Object.entries(i).filter(([e, t]) => t.length > 1));
2304
2304
  return Object.values(a).map((n) => {
2305
- let r = n[0], i = t.buildDuplicateFoundError(e, n), a = H(r), o = {
2305
+ let r = n[0], i = t.buildDuplicateFoundError(e, n), a = V(r), o = {
2306
2306
  message: i,
2307
2307
  type: Q.DUPLICATE_PRODUCTIONS,
2308
2308
  ruleName: e.name,
@@ -2353,12 +2353,12 @@ function Gt(e, t, n, r) {
2353
2353
  return i.concat(a, o, s);
2354
2354
  }
2355
2355
  function Kt(e) {
2356
- return `${H(e)}_#_${e.idx}_#_${qt(e)}`;
2356
+ return `${V(e)}_#_${e.idx}_#_${qt(e)}`;
2357
2357
  }
2358
2358
  function qt(e) {
2359
2359
  return e instanceof z ? e.terminalType.name : e instanceof A ? e.nonTerminalName : "";
2360
2360
  }
2361
- var Jt = class extends V {
2361
+ var Jt = class extends se {
2362
2362
  constructor() {
2363
2363
  super(...arguments), this.allProductions = [];
2364
2364
  }
@@ -2415,14 +2415,14 @@ function Xt(e) {
2415
2415
  else if (n instanceof M || n instanceof N || n instanceof P || n instanceof F || n instanceof L || n instanceof I) t = t.concat(Xt(n.definition));
2416
2416
  else if (n instanceof R) t = n.definition.map((e) => Xt(e.definition)).flat();
2417
2417
  else if (!(n instanceof z)) throw Error("non exhaustive match");
2418
- let r = se(n), i = e.length > 1;
2418
+ let r = ce(n), i = e.length > 1;
2419
2419
  if (r && i) {
2420
2420
  let n = e.slice(1);
2421
2421
  return t.concat(Xt(n));
2422
2422
  }
2423
2423
  return t;
2424
2424
  }
2425
- var Zt = class extends V {
2425
+ var Zt = class extends se {
2426
2426
  constructor() {
2427
2427
  super(...arguments), this.alternations = [];
2428
2428
  }
@@ -2662,7 +2662,7 @@ function $t(e, t, n) {
2662
2662
  return o.concat(s);
2663
2663
  });
2664
2664
  }
2665
- var en = class extends V {
2665
+ var en = class extends se {
2666
2666
  constructor() {
2667
2667
  super(...arguments), this.allProductions = [];
2668
2668
  }
@@ -2793,7 +2793,7 @@ var _n = 1024, vn = 1280, yn = 1536, bn = class {
2793
2793
  return a(o[0], s, r);
2794
2794
  }(e.prodOccurrence, e.rule, e.maxLookahead, e.dynamicTokensEnabled, Mt(e.prodType), Pt);
2795
2795
  }
2796
- }, xn = new class extends V {
2796
+ }, xn = new class extends se {
2797
2797
  constructor() {
2798
2798
  super(...arguments), this.dslMethods = {
2799
2799
  option: [],
@@ -2997,7 +2997,7 @@ var zn, Bn = class e {
2997
2997
  let e = function(e) {
2998
2998
  let t = {};
2999
2999
  return e.forEach((e) => {
3000
- let n = new fe(e).startWalking();
3000
+ let n = new pe(e).startWalking();
3001
3001
  Object.assign(t, n);
3002
3002
  }), t;
3003
3003
  }(Object.values(this.gastProductionsCache));
@@ -3112,7 +3112,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3112
3112
  }
3113
3113
  getFollowSetFromFollowKey(e) {
3114
3114
  if (e === mn) return [X];
3115
- let t = e.ruleName + e.idxInCallingRule + de + e.inRule;
3115
+ let t = e.ruleName + e.idxInCallingRule + fe + e.inRule;
3116
3116
  return this.resyncFollows[t];
3117
3117
  }
3118
3118
  addToResyncTokens(e, t) {
@@ -3152,7 +3152,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3152
3152
  }(e);
3153
3153
  t.forEach((t) => {
3154
3154
  let n = t.idx === 0 ? "" : t.idx;
3155
- this.TRACE_INIT(`${H(t)}${n}`, () => {
3155
+ this.TRACE_INIT(`${V(t)}${n}`, () => {
3156
3156
  let n = this.lookaheadStrategy.buildLookaheadForAlternation({
3157
3157
  prodOccurrence: t.idx,
3158
3158
  rule: e,
@@ -3163,15 +3163,15 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3163
3163
  this.setLaFuncCache(this.fullRuleNameToShort[e.name], 256 | t.idx, n);
3164
3164
  });
3165
3165
  }), n.forEach((t) => {
3166
- this.computeLookaheadFunc(e, t.idx, 768, "Repetition", t.maxLookahead, H(t));
3166
+ this.computeLookaheadFunc(e, t.idx, 768, "Repetition", t.maxLookahead, V(t));
3167
3167
  }), r.forEach((t) => {
3168
- this.computeLookaheadFunc(e, t.idx, 512, "Option", t.maxLookahead, H(t));
3168
+ this.computeLookaheadFunc(e, t.idx, 512, "Option", t.maxLookahead, V(t));
3169
3169
  }), i.forEach((t) => {
3170
- this.computeLookaheadFunc(e, t.idx, _n, "RepetitionMandatory", t.maxLookahead, H(t));
3170
+ this.computeLookaheadFunc(e, t.idx, _n, "RepetitionMandatory", t.maxLookahead, V(t));
3171
3171
  }), a.forEach((t) => {
3172
- this.computeLookaheadFunc(e, t.idx, yn, "RepetitionMandatoryWithSeparator", t.maxLookahead, H(t));
3172
+ this.computeLookaheadFunc(e, t.idx, yn, "RepetitionMandatoryWithSeparator", t.maxLookahead, V(t));
3173
3173
  }), o.forEach((t) => {
3174
- this.computeLookaheadFunc(e, t.idx, vn, "RepetitionWithSeparator", t.maxLookahead, H(t));
3174
+ this.computeLookaheadFunc(e, t.idx, vn, "RepetitionWithSeparator", t.maxLookahead, V(t));
3175
3175
  });
3176
3176
  });
3177
3177
  });
@@ -4128,7 +4128,7 @@ var Vn = class extends Bn {
4128
4128
  }
4129
4129
  }, Hn = class e {
4130
4130
  static shared(t) {
4131
- let n = t?.locale ?? S, r = t?.maxColumn ?? Kn, i = t?.maxRow ?? qn, a = Gn.get(n);
4131
+ let n = t?.locale ?? T, r = t?.maxColumn ?? Kn, i = t?.maxRow ?? qn, a = Gn.get(n);
4132
4132
  a || (a = /* @__PURE__ */ new Map(), Gn.set(n, a));
4133
4133
  let o = `${r}:${i}`, s = a.get(o);
4134
4134
  return s || (s = new e({
@@ -4138,7 +4138,7 @@ var Vn = class extends Bn {
4138
4138
  }), a.set(o, s)), s;
4139
4139
  }
4140
4140
  constructor(e) {
4141
- let t = e?.maxColumn ?? Kn, n = e?.maxRow ?? qn, r = e?.locale ?? S;
4141
+ let t = e?.maxColumn ?? Kn, n = e?.maxRow ?? qn, r = e?.locale ?? T;
4142
4142
  this._locale = r, this._maxColumn = t, this._maxRow = n;
4143
4143
  let { separatorFunction: i, separatorColumn: a, separatorRow: o, separatorDecimal: s } = r.separators;
4144
4144
  if (a === o) throw Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${a}')`);
@@ -4154,12 +4154,12 @@ var Vn = class extends Bn {
4154
4154
  pattern: /[a-zA-Z_\u007F-\uFFFF]+[a-zA-Z0-9_.\u007F-\uFFFF]*(?=\()/
4155
4155
  }), d = Y({
4156
4156
  name: "TableReference",
4157
- pattern: { exec: te },
4157
+ pattern: { exec: C },
4158
4158
  line_breaks: !1,
4159
4159
  start_chars_hint: Wn
4160
4160
  }), f = Y({
4161
4161
  name: "BracketedString",
4162
- pattern: { exec: ne },
4162
+ pattern: { exec: b },
4163
4163
  line_breaks: !1,
4164
4164
  start_chars_hint: [91],
4165
4165
  longer_alt: [d, l]
@@ -4195,7 +4195,7 @@ var Vn = class extends Bn {
4195
4195
  }), v = Y({
4196
4196
  name: "Sheet",
4197
4197
  pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
4198
- }), y = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, b = Y({
4198
+ }), y = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, x = Y({
4199
4199
  name: "NamedToken",
4200
4200
  pattern: { exec: (e, t) => {
4201
4201
  y.lastIndex = t;
@@ -4206,24 +4206,24 @@ var Vn = class extends Bn {
4206
4206
  } },
4207
4207
  line_breaks: !1,
4208
4208
  start_chars_hint: Wn
4209
- }), x = Y({
4209
+ }), te = Y({
4210
4210
  name: "Cell",
4211
4211
  pattern: { exec: Xn(t, n) },
4212
4212
  line_breaks: !1,
4213
4213
  start_chars_hint: [36, ...Un],
4214
- longer_alt: b
4215
- }), C = Y({
4214
+ longer_alt: x
4215
+ }), S = Y({
4216
4216
  name: "Column",
4217
4217
  pattern: { exec: Yn(t) },
4218
4218
  line_breaks: !1,
4219
4219
  start_chars_hint: [36, ...Un],
4220
- longer_alt: b
4220
+ longer_alt: x
4221
4221
  }), w = Y({
4222
4222
  name: "AbsRow",
4223
4223
  pattern: /[$][0-9]+/
4224
- }), re = s === "." ? "\\." : s, T = Y({
4224
+ }), ne = s === "." ? "\\." : s, re = Y({
4225
4225
  name: "NumberToken",
4226
- pattern: RegExp(`[0-9]+${re}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${re}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
4226
+ pattern: RegExp(`[0-9]+${ne}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${ne}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
4227
4227
  }), E = Y({
4228
4228
  name: "ScientificDigit",
4229
4229
  pattern: /[0-9]+\*\*[+-]?[0-9]+/
@@ -4280,38 +4280,38 @@ var Vn = class extends Bn {
4280
4280
  }), B = Y({
4281
4281
  name: "PlusOp",
4282
4282
  pattern: /\+/
4283
- }), V = Y({
4283
+ }), se = Y({
4284
4284
  name: "DivOp",
4285
4285
  pattern: /\//
4286
- }), se = Y({
4286
+ }), ce = Y({
4287
4287
  name: "MinOp",
4288
4288
  pattern: /-/
4289
- }), H = Y({
4289
+ }), V = Y({
4290
4290
  name: "ImplicitIntersectOp",
4291
4291
  pattern: /@/
4292
- }), ce = Y({
4292
+ }), le = Y({
4293
4293
  name: "ConcatOp",
4294
4294
  pattern: /&/
4295
- }), le = Y({
4295
+ }), ue = Y({
4296
4296
  name: "ExOp",
4297
4297
  pattern: /\^/
4298
- }), ue = Y({
4298
+ }), de = Y({
4299
4299
  name: "PercentOp",
4300
4300
  pattern: /%/
4301
- }), de = Y({
4301
+ }), fe = Y({
4302
4302
  name: "ArrayAnchorOp",
4303
4303
  pattern: /#/,
4304
4304
  longer_alt: [h, g]
4305
- }), fe = Y({
4305
+ }), pe = Y({
4306
4306
  name: "GtOp",
4307
4307
  pattern: />/
4308
- }), U = Y({
4308
+ }), H = Y({
4309
4309
  name: "EqOp",
4310
4310
  pattern: /=/
4311
- }), pe = Y({
4311
+ }), me = Y({
4312
4312
  name: "LtOp",
4313
4313
  pattern: /</
4314
- }), W = [
4314
+ }), U = [
4315
4315
  c,
4316
4316
  l,
4317
4317
  ee,
@@ -4329,16 +4329,16 @@ var Vn = class extends Bn {
4329
4329
  N,
4330
4330
  P,
4331
4331
  j,
4332
- x,
4332
+ te,
4333
4333
  ie,
4334
- C,
4334
+ S,
4335
4335
  w,
4336
- T,
4336
+ re,
4337
4337
  E,
4338
4338
  D,
4339
- de,
4340
- H,
4341
- b,
4339
+ fe,
4340
+ V,
4341
+ x,
4342
4342
  F,
4343
4343
  I,
4344
4344
  L,
@@ -4346,11 +4346,11 @@ var Vn = class extends Bn {
4346
4346
  z,
4347
4347
  oe,
4348
4348
  B,
4349
- V,
4350
4349
  se,
4351
4350
  ce,
4352
4351
  le,
4353
4352
  ue,
4353
+ de,
4354
4354
  Y({
4355
4355
  name: "NeqOp",
4356
4356
  pattern: /<>/
@@ -4363,15 +4363,15 @@ var Vn = class extends Bn {
4363
4363
  name: "LteOp",
4364
4364
  pattern: /<=/
4365
4365
  }),
4366
- fe,
4367
- U,
4368
- pe
4366
+ pe,
4367
+ H,
4368
+ me
4369
4369
  ];
4370
- this._lexer = new J(W, { ensureOptimizations: !0 });
4371
- let G = {};
4372
- W.forEach((e) => {
4373
- G[e.name] = e;
4374
- }), a === i && (G.ColSeparator = ae), this._vocabulary = G;
4370
+ this._lexer = new J(U, { ensureOptimizations: !0 });
4371
+ let W = {};
4372
+ U.forEach((e) => {
4373
+ W[e.name] = e;
4374
+ }), a === i && (W.ColSeparator = ae), this._vocabulary = W;
4375
4375
  }
4376
4376
  tokenize(e, t = !0) {
4377
4377
  let n = this._lexer.tokenize(e);
@@ -4469,28 +4469,28 @@ function Zn(e) {
4469
4469
  return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
4470
4470
  }
4471
4471
  var Qn = class {
4472
- constructor(e = S) {
4472
+ constructor(e = T) {
4473
4473
  let t = function(e) {
4474
- let t = [...n];
4474
+ let t = [...d];
4475
4475
  if (e) for (let n of Object.values(e)) {
4476
4476
  let e = n?.trim();
4477
4477
  e && !t.some((t) => t.toLowerCase() === e.toLowerCase()) && t.push(e);
4478
4478
  }
4479
4479
  return t.sort((e, t) => t.length - e.length), t.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
4480
- }(e.specifiers), r = Y({
4480
+ }(e.specifiers), n = Y({
4481
4481
  name: "WhiteSpace",
4482
4482
  pattern: /\s+/,
4483
4483
  group: J.SKIPPED
4484
- }), i = Y({
4484
+ }), r = Y({
4485
4485
  name: "TableSpecifier",
4486
4486
  pattern: RegExp(`\\[#(?:${t})\\]`, "i")
4487
- }), a = [
4487
+ }), i = [
4488
+ n,
4488
4489
  r,
4489
- i,
4490
4490
  Y({
4491
4491
  name: "BracketedColumn",
4492
4492
  pattern: /\[(?:'['#[\]]|'(?!['#[\]])|[^'[\]])*\]/,
4493
- longer_alt: [i]
4493
+ longer_alt: [r]
4494
4494
  }),
4495
4495
  Y({
4496
4496
  name: "BareSpecifier",
@@ -4505,11 +4505,11 @@ var Qn = class {
4505
4505
  pattern: new RegExp(e.separators.separatorFunction.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
4506
4506
  })
4507
4507
  ];
4508
- this._lexer = new J(a, { ensureOptimizations: !0 });
4509
- let o = {};
4510
- a.forEach((e) => {
4511
- o[e.name] = e;
4512
- }), this._vocabulary = o;
4508
+ this._lexer = new J(i, { ensureOptimizations: !0 });
4509
+ let a = {};
4510
+ i.forEach((e) => {
4511
+ a[e.name] = e;
4512
+ }), this._vocabulary = a;
4513
4513
  }
4514
4514
  getVocabulary() {
4515
4515
  return this._vocabulary;
@@ -4518,14 +4518,14 @@ var Qn = class {
4518
4518
  return this._lexer.tokenize(e);
4519
4519
  }
4520
4520
  }, $n = class extends Vn {
4521
- constructor(t = S) {
4522
- let n = new Qn(t), r = n.getVocabulary();
4521
+ constructor(e = T) {
4522
+ let t = new Qn(e), r = t.getVocabulary();
4523
4523
  super(r, {
4524
4524
  nodeLocationTracking: "none",
4525
4525
  maxLookahead: 2,
4526
4526
  skipValidations: !0,
4527
4527
  recoveryEnabled: !1
4528
- }), this._lexer = n;
4528
+ }), this._lexer = t;
4529
4529
  let { TableSpecifier: i, BracketedColumn: a, BareSpecifier: o, ColumnSep: s, ListSep: c } = r, l = this;
4530
4530
  l.RULE("ruleContent", () => {
4531
4531
  let e = [], t = l.SUBRULE(l.ruleItem);
@@ -4540,28 +4540,28 @@ var Qn = class {
4540
4540
  });
4541
4541
  }), e;
4542
4542
  }), l.RULE("ruleItem", () => l.OR([{ ALT: () => l.SUBRULE(l.ruleSpecifier) }, { ALT: () => l.SUBRULE(l.ruleColumnOrRange) }])), l.RULE("ruleSpecifier", () => l.OR([{ ALT: () => {
4543
- let n = l.CONSUME(i);
4543
+ let t = l.CONSUME(i);
4544
4544
  return l.ACTION(() => {
4545
- let r = e(n.image, t);
4546
- return r.image = n.image, r;
4545
+ let n = x(t.image, e);
4546
+ return n.image = t.image, n;
4547
4547
  });
4548
4548
  } }, { ALT: () => {
4549
- let n = l.CONSUME(o);
4549
+ let t = l.CONSUME(o);
4550
4550
  return l.ACTION(() => {
4551
- let r = e(n.image, t);
4552
- return r.image = n.image, r;
4551
+ let n = x(t.image, e);
4552
+ return n.image = t.image, n;
4553
4553
  });
4554
4554
  } }])), l.RULE("ruleColumnOrRange", () => {
4555
- let e = l.CONSUME(a), t, n;
4555
+ let e = l.CONSUME(a), t, r;
4556
4556
  return l.OPTION(() => {
4557
- t = l.CONSUME(s), n = l.CONSUME2(a);
4557
+ t = l.CONSUME(s), r = l.CONSUME2(a);
4558
4558
  }), l.ACTION(() => {
4559
- let r = v(e.image);
4560
- if (r.image = e.image, !n) return r;
4561
- let i = v(n.image);
4562
- i.image = n.image;
4563
- let a = T(":", r, i, !0);
4564
- return a.image = t?.image ?? ":", a;
4559
+ let i = p(e.image);
4560
+ if (i.image = e.image, !r) return i;
4561
+ let a = p(r.image);
4562
+ a.image = r.image;
4563
+ let o = n(":", i, a, !0);
4564
+ return o.image = t?.image ?? ":", o;
4565
4565
  });
4566
4566
  }), l.performSelfAnalysis();
4567
4567
  }
@@ -4577,44 +4577,44 @@ var Qn = class {
4577
4577
  if (n === "@") {
4578
4578
  let e = t.slice(1).trim();
4579
4579
  if (!e) {
4580
- let e = c("@", null, !0);
4580
+ let e = w("@", null, !0);
4581
4581
  return e.image = "@", [e];
4582
4582
  }
4583
4583
  if (e.charAt(0) === "[") {
4584
4584
  let t = this._parseInner(e);
4585
4585
  if (t.length === 1 && t[0].type === "infix") {
4586
- let e = c("@", t[0], !0);
4586
+ let e = w("@", t[0], !0);
4587
4587
  return e.image = "@", [e];
4588
4588
  }
4589
4589
  }
4590
- let n = v(e);
4590
+ let n = p(e);
4591
4591
  n.image = e;
4592
- let r = c("@", n, !0);
4592
+ let r = w("@", n, !0);
4593
4593
  return r.image = "@", [r];
4594
4594
  }
4595
4595
  if (n !== "[" && n !== "#") {
4596
- let t = v(e);
4596
+ let t = p(e);
4597
4597
  return t.image = e, [t];
4598
4598
  }
4599
4599
  return this._parseInner(t);
4600
4600
  }
4601
- parse(e, t, n) {
4601
+ parse(t, n, r) {
4602
4602
  this.reset();
4603
- let r = () => ({
4604
- root: f("", []),
4603
+ let i = () => ({
4604
+ root: e("", []),
4605
4605
  errors: []
4606
4606
  });
4607
- if (!n) return r();
4608
- let i = 0;
4609
- if (n.charAt(0) === "[") {
4610
- let e = n.indexOf("]");
4611
- e !== -1 && n.charAt(e + 1) === "!" && (i = e + 2);
4612
- }
4613
- let a = n.indexOf("[", i);
4614
- if (a === -1) return r();
4615
- let o = n.slice(0, a), s = n.slice(a + 1, -1), c = this._parseContent(s);
4607
+ if (!r) return i();
4608
+ let a = 0;
4609
+ if (r.charAt(0) === "[") {
4610
+ let e = r.indexOf("]");
4611
+ e !== -1 && r.charAt(e + 1) === "!" && (a = e + 2);
4612
+ }
4613
+ let o = r.indexOf("[", a);
4614
+ if (o === -1) return i();
4615
+ let s = r.slice(0, o), c = r.slice(o + 1, -1), l = this._parseContent(c);
4616
4616
  return {
4617
- root: f(o, c),
4617
+ root: e(s, l),
4618
4618
  errors: this.errors.length > 0 ? [...this.errors] : []
4619
4619
  };
4620
4620
  }
@@ -4629,7 +4629,7 @@ var Qn = class {
4629
4629
  ":."
4630
4630
  ]), nr = (e) => {
4631
4631
  if (!e) return null;
4632
- if (e.type === w.Cell) {
4632
+ if (e.type === S.Cell) {
4633
4633
  let t = e.value;
4634
4634
  return t.rowIndex === -(2 ** 53 - 1) ? "col" : t.colIndex === -(2 ** 53 - 1) ? "row" : null;
4635
4635
  }
@@ -4660,8 +4660,8 @@ var sr = {
4660
4660
  }
4661
4661
  }, cr = class extends Vn {
4662
4662
  constructor(e) {
4663
- let n = e?.lexer ?? Hn.shared(e?.lexerOptions), f = n.getVocabulary();
4664
- super(f, {
4663
+ let l = e?.lexer ?? Hn.shared(e?.lexerOptions), d = l.getVocabulary();
4664
+ super(d, {
4665
4665
  skipValidations: !0,
4666
4666
  recoveryEnabled: !0,
4667
4667
  ...e,
@@ -4669,12 +4669,10 @@ var sr = {
4669
4669
  errorMessageProvider: sr,
4670
4670
  maxLookahead: 1
4671
4671
  }), this._ruleInfixOp = this.RULE("ruleInfixOp", () => {
4672
- let { PlusOp: e, MinOp: t, MulOp: n, DivOp: r, ExOp: i, ConcatOp: a, GtOp: o, EqOp: s, LtOp: c, NeqOp: l, GteOp: u, LteOp: d } = this._vocab, f = [];
4673
- return f.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
4674
- let p = this.OR(this._c1 ||= [
4672
+ let { PlusOp: e, MinOp: r, MulOp: i, DivOp: a, ExOp: o, ConcatOp: s, GtOp: c, EqOp: l, LtOp: u, NeqOp: d, GteOp: f, LteOp: p } = this._vocab, m = [];
4673
+ return m.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
4674
+ let t = this.OR(this._c1 ||= [
4675
4675
  { ALT: () => this.CONSUME(e).image },
4676
- { ALT: () => this.CONSUME(t).image },
4677
- { ALT: () => this.CONSUME(n).image },
4678
4676
  { ALT: () => this.CONSUME(r).image },
4679
4677
  { ALT: () => this.CONSUME(i).image },
4680
4678
  { ALT: () => this.CONSUME(a).image },
@@ -4683,29 +4681,31 @@ var sr = {
4683
4681
  { ALT: () => this.CONSUME(c).image },
4684
4682
  { ALT: () => this.CONSUME(l).image },
4685
4683
  { ALT: () => this.CONSUME(u).image },
4686
- { ALT: () => this.CONSUME(d).image }
4687
- ]), m = {
4688
- value: p,
4684
+ { ALT: () => this.CONSUME(d).image },
4685
+ { ALT: () => this.CONSUME(f).image },
4686
+ { ALT: () => this.CONSUME(p).image }
4687
+ ]), n = {
4688
+ value: t,
4689
4689
  index: this.getLexerPosition(),
4690
- isRange: C.includes(p)
4690
+ isRange: ne.includes(t)
4691
4691
  }, h = this.SUBRULE2(this._rulePostfixOp);
4692
- f.push({
4693
- op: m,
4692
+ m.push({
4693
+ op: n,
4694
4694
  node: h
4695
4695
  });
4696
4696
  }), this.ACTION(() => {
4697
- let e = f.length - 1, t = x.length;
4698
- for (let n = 0; e > 0 && n < t; n++) {
4699
- let t = x[n], r = 1;
4700
- for (; r < f.length;) {
4701
- let n = f[r].op;
4702
- if (t.includes(n.value)) {
4703
- let t = f[r - 1].node, i = f[r].node, a = T(n.value, t, i, n.isRange);
4704
- a = this._tag(a, n.index), f[r - 1].node = a, f.splice(r, 1), e--;
4705
- } else r++;
4697
+ let e = m.length - 1, r = t.length;
4698
+ for (let i = 0; e > 0 && i < r; i++) {
4699
+ let r = t[i], a = 1;
4700
+ for (; a < m.length;) {
4701
+ let t = m[a].op;
4702
+ if (r.includes(t.value)) {
4703
+ let r = m[a - 1].node, i = m[a].node, o = n(t.value, r, i, t.isRange);
4704
+ o = this._tag(o, t.index), m[a - 1].node = o, m.splice(a, 1), e--;
4705
+ } else a++;
4706
4706
  }
4707
4707
  }
4708
- }), f[0].node;
4708
+ }), m[0].node;
4709
4709
  }), this._rulePlusMinusOp = this.RULE("rulePlusMinusOp", () => {
4710
4710
  let { PlusOp: e, MinOp: t } = this._vocab;
4711
4711
  return this.OR([{ ALT: () => this.CONSUME(e) }, { ALT: () => this.CONSUME(t) }]);
@@ -4719,8 +4719,8 @@ var sr = {
4719
4719
  }), this.ACTION(() => {
4720
4720
  let e = n.length;
4721
4721
  if (e !== 0) for (let r = 0; r < e; r++) {
4722
- let e = n[r], a = e[0], o = e[1], s = C.includes(a);
4723
- t = i(a, t, s), t = this._tag(t, o);
4722
+ let e = n[r], i = e[0], a = e[1], o = ne.includes(i);
4723
+ t = s(i, t, o), t = this._tag(t, a);
4724
4724
  }
4725
4725
  }), t;
4726
4726
  }), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
@@ -4739,45 +4739,45 @@ var sr = {
4739
4739
  return this.ACTION(() => {
4740
4740
  let e = r.length;
4741
4741
  if (e !== 0) for (let t = e - 1; t >= 0; t--) {
4742
- let e = r[t], n = e[0], a = e[1], o = C.includes(n);
4743
- i = c(n, i, o), i = this._tag(i, a);
4742
+ let e = r[t], n = e[0], a = e[1], o = ne.includes(n);
4743
+ i = w(n, i, o), i = this._tag(i, a);
4744
4744
  }
4745
4745
  }), i;
4746
4746
  }), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
4747
- let { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: n, RangeTrimTrailingOp: r, ArrayAnchorOp: a } = this._vocab, o = [];
4747
+ let { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: r, RangeTrimTrailingOp: i, ArrayAnchorOp: a } = this._vocab, o = [];
4748
4748
  return o.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
4749
4749
  this.CONSUME(a), o.push({ anchor: this.getLexerPosition() });
4750
4750
  }), this.MANY(() => {
4751
- let i = {
4751
+ let n = {
4752
4752
  value: this.OR(this._c2 ||= [
4753
4753
  { ALT: () => this.CONSUME(e).image },
4754
4754
  { ALT: () => this.CONSUME(t).image },
4755
- { ALT: () => this.CONSUME(n).image },
4756
- { ALT: () => this.CONSUME(r).image }
4755
+ { ALT: () => this.CONSUME(r).image },
4756
+ { ALT: () => this.CONSUME(i).image }
4757
4757
  ]),
4758
4758
  index: this.getLexerPosition()
4759
4759
  }, s = this.SUBRULE2(this._ruleCallOp);
4760
4760
  o.push({
4761
- op: i,
4761
+ op: n,
4762
4762
  node: s
4763
4763
  }), this.MANY3(() => {
4764
4764
  this.CONSUME2(a), o.push({ anchor: this.getLexerPosition() });
4765
4765
  });
4766
4766
  }), this.ACTION(() => {
4767
4767
  for (let e = 1; e + 1 < o.length; e++) {
4768
- let t = o[e], n = o[e + 1];
4769
- if (t.op?.value !== ":" || n.op?.value !== ":") continue;
4770
- let r = nr(t.node);
4771
- r && nr(n.node) === r && nr(o[e - 1].node) !== r && (t.node = this._tag(T(":", t.node, n.node, !0), n.op.index), o.splice(e + 1, 1));
4768
+ let t = o[e], r = o[e + 1];
4769
+ if (t.op?.value !== ":" || r.op?.value !== ":") continue;
4770
+ let i = nr(t.node);
4771
+ i && nr(r.node) === i && nr(o[e - 1].node) !== i && (t.node = this._tag(n(":", t.node, r.node, !0), r.op.index), o.splice(e + 1, 1));
4772
4772
  }
4773
4773
  for (let e = 1; e < o.length; e++) {
4774
4774
  let t = o[e];
4775
4775
  if (t.anchor !== void 0) {
4776
- o[0].node = this._tag(i("#", o[0].node, !0), t.anchor);
4776
+ o[0].node = this._tag(s("#", o[0].node, !0), t.anchor);
4777
4777
  continue;
4778
4778
  }
4779
- let n = t.op, r = T(n.value, o[0].node, t.node, !0);
4780
- r = this._tag(r, n.index), o[0].node = r;
4779
+ let r = t.op, i = n(r.value, o[0].node, t.node, !0);
4780
+ i = this._tag(i, r.index), o[0].node = i;
4781
4781
  }
4782
4782
  }), o[0].node;
4783
4783
  }), this._ruleCallOp = this.RULE("ruleCallOp", () => {
@@ -4789,7 +4789,7 @@ var sr = {
4789
4789
  },
4790
4790
  DEF: () => {
4791
4791
  this.CONSUME(e);
4792
- let r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), a = n, o = this.ACTION(() => this._tag(d(a, i), r)), s = this.OPTION(() => this.CONSUME(t));
4792
+ let r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), a = n, o = this.ACTION(() => this._tag(f(a, i), r)), s = this.OPTION(() => this.CONSUME(t));
4793
4793
  this.ACTION(() => {
4794
4794
  s || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()), n = o;
4795
4795
  });
@@ -4810,15 +4810,15 @@ var sr = {
4810
4810
  }), this.ACTION(() => {
4811
4811
  for (; e.length > 1;) {
4812
4812
  let t = e.length - 1;
4813
- for (let n = 0; n < t; n++) {
4814
- let r = e[n], i = e[n + 1], a = T(" ", r, i, !0), o = this._tokenMap.get(r);
4815
- o && delete o.tokenIndexClose;
4816
- let s = this._tokenMap.get(i), c = s?.tokenIndex;
4817
- if (c !== void 0) {
4818
- let e = this.input[c], t = this.input[c - 1]?.endOffset ?? -1, n = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
4819
- n.length > 0 && (a.wsBefore = n);
4813
+ for (let r = 0; r < t; r++) {
4814
+ let i = e[r], a = e[r + 1], o = n(" ", i, a, !0), s = this._tokenMap.get(i);
4815
+ s && delete s.tokenIndexClose;
4816
+ let c = this._tokenMap.get(a), l = c?.tokenIndex;
4817
+ if (l !== void 0) {
4818
+ let e = this.input[l], t = this.input[l - 1]?.endOffset ?? -1, n = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
4819
+ n.length > 0 && (o.wsBefore = n);
4820
4820
  }
4821
- s && delete s.tokenIndex, n + 1 < t && s && delete s.tokenIndexClose, e.splice(n, 2, a), n--, t--;
4821
+ c && delete c.tokenIndex, r + 1 < t && c && delete c.tokenIndexClose, e.splice(r, 2, o), r--, t--;
4822
4822
  }
4823
4823
  }
4824
4824
  }), e[0];
@@ -4841,35 +4841,35 @@ var sr = {
4841
4841
  }), t;
4842
4842
  }), this._ruleParen = this.RULE("ruleParen", () => {
4843
4843
  let { OpenParen: e, CloseParen: t } = this._vocab;
4844
- return this._processParen(w.Paren, e, t);
4844
+ return this._processParen(S.Paren, e, t);
4845
4845
  }), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
4846
- let { OpenCurlyParen: e, CloseCurlyParen: n, ColSeparator: r, RowSeparator: i } = this._vocab, o = a();
4846
+ let { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: n, RowSeparator: r } = this._vocab, i = h();
4847
4847
  this.CONSUME(e);
4848
- let s = this.getLexerPosition(), c = this.ACTION(() => this._tag(t(o), s)), l = this.SUBRULE(this._ruleLiteralForArray);
4848
+ let a = this.getLexerPosition(), o = this.ACTION(() => this._tag(g(i), a)), s = this.SUBRULE(this._ruleLiteralForArray);
4849
4849
  this.ACTION(() => {
4850
- o.value.push(l);
4850
+ i.value.push(s);
4851
4851
  }), this.MANY(() => {
4852
4852
  let e = !1;
4853
4853
  this.OR([{ ALT: () => {
4854
- this.CONSUME(r), e = !0;
4855
- } }, { ALT: () => this.CONSUME(i) }]);
4854
+ this.CONSUME(n), e = !0;
4855
+ } }, { ALT: () => this.CONSUME(r) }]);
4856
4856
  let t = this.SUBRULE2(this._ruleLiteralForArray);
4857
4857
  this.ACTION(() => {
4858
- e || (o = a(), c.value.push(o)), o.value.push(t);
4858
+ e || (i = h(), o.value.push(i)), i.value.push(t);
4859
4859
  });
4860
4860
  });
4861
- let u = this.OPTION(() => this.CONSUME(n));
4862
- return c = this.ACTION(() => (u || this._reportError(c, "Missing closing parenthesis '}'", s), this._tagClose(c, this.getLexerPosition()))), c;
4861
+ let c = this.OPTION(() => this.CONSUME(t));
4862
+ return o = this.ACTION(() => (c || this._reportError(o, "Missing closing parenthesis '}'", a), this._tagClose(o, this.getLexerPosition()))), o;
4863
4863
  }), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
4864
- let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: r } = this._vocab;
4864
+ let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: a } = this._vocab;
4865
4865
  return this.OR([
4866
4866
  { ALT: () => {
4867
- let e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), n = this.ACTION(() => this._tag(g(t.image, this._locale), this.getLexerPosition()));
4868
- return this.ACTION(() => e ? re(e.image, n) : n);
4867
+ let e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), n = this.ACTION(() => this._tag(r(t.image, this._locale), this.getLexerPosition()));
4868
+ return this.ACTION(() => e ? o(e.image, n) : n);
4869
4869
  } },
4870
4870
  { ALT: () => {
4871
4871
  let t = this.CONSUME(e);
4872
- return this.ACTION(() => this._tag(_(t.image), this.getLexerPosition()));
4872
+ return this.ACTION(() => this._tag(y(t.image), this.getLexerPosition()));
4873
4873
  } },
4874
4874
  { ALT: () => {
4875
4875
  let e = this.CONSUME(t);
@@ -4877,23 +4877,23 @@ var sr = {
4877
4877
  } },
4878
4878
  { ALT: () => {
4879
4879
  let e = this.CONSUME(n);
4880
- return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
4880
+ return this.ACTION(() => this._tag(i(e.image, this._locale), this.getLexerPosition()));
4881
4881
  } },
4882
4882
  { ALT: () => {
4883
- let e = this.CONSUME(r);
4884
- return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4883
+ let e = this.CONSUME(a);
4884
+ return this.ACTION(() => this._tag(v(e.image, this._locale), this.getLexerPosition()));
4885
4885
  } }
4886
4886
  ]);
4887
4887
  }), this._ruleLiteral = this.RULE("ruleLiteral", () => {
4888
- let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: r } = this._vocab;
4888
+ let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: a } = this._vocab;
4889
4889
  return this.OR([
4890
4890
  { ALT: () => {
4891
4891
  let e = this.SUBRULE(this._ruleNumber);
4892
- return this.ACTION(() => this._tag(g(e.image, this._locale), this.getLexerPosition()));
4892
+ return this.ACTION(() => this._tag(r(e.image, this._locale), this.getLexerPosition()));
4893
4893
  } },
4894
4894
  { ALT: () => {
4895
4895
  let t = this.CONSUME(e);
4896
- return this.ACTION(() => this._tag(_(t.image), this.getLexerPosition()));
4896
+ return this.ACTION(() => this._tag(y(t.image), this.getLexerPosition()));
4897
4897
  } },
4898
4898
  { ALT: () => {
4899
4899
  let e = this.CONSUME(t);
@@ -4901,17 +4901,17 @@ var sr = {
4901
4901
  } },
4902
4902
  { ALT: () => {
4903
4903
  let e = this.CONSUME(n);
4904
- return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
4904
+ return this.ACTION(() => this._tag(i(e.image, this._locale), this.getLexerPosition()));
4905
4905
  } },
4906
4906
  { ALT: () => {
4907
- let e = this.CONSUME(r);
4908
- return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4907
+ let e = this.CONSUME(a);
4908
+ return this.ACTION(() => this._tag(v(e.image, this._locale), this.getLexerPosition()));
4909
4909
  } }
4910
4910
  ]);
4911
4911
  }), this._ruleFunction = this.RULE("ruleFunction", () => {
4912
4912
  let { FunctionToken: e, OpenParen: t, CloseParen: n } = this._vocab, r = this.CONSUME(e).image, i = this.getLexerPosition();
4913
4913
  this.CONSUME(t);
4914
- let a = this.SUBRULE(this._ruleFunctionArguments), o = this.ACTION(() => this._tag(p(r, a), i)), s = this.OPTION(() => this.CONSUME(n));
4914
+ let a = this.SUBRULE(this._ruleFunctionArguments), o = this.ACTION(() => this._tag(re(r, a), i)), s = this.OPTION(() => this.CONSUME(n));
4915
4915
  return o = this.ACTION(() => (s || this._reportError(o, "Missing closing parenthesis ')'", i), this._tagClose(o, this.getLexerPosition()))), o;
4916
4916
  }), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
4917
4917
  let { ArgSeparator: e, CloseParen: t } = this._vocab, n = [];
@@ -4921,11 +4921,11 @@ var sr = {
4921
4921
  let t;
4922
4922
  this.OPTION2(() => {
4923
4923
  t = this.SUBRULE(this._ruleIntersectOp);
4924
- }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), n.push(t), this.MANY(() => {
4924
+ }), t = this.ACTION(() => t ?? this._tagClose(m(), this.getLexerPosition())), n.push(t), this.MANY(() => {
4925
4925
  let t;
4926
4926
  this.CONSUME(e), this.OPTION3(() => {
4927
4927
  t = this.SUBRULE2(this._ruleIntersectOp);
4928
- }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), n.push(t);
4928
+ }), t = this.ACTION(() => t ?? this._tagClose(m(), this.getLexerPosition())), n.push(t);
4929
4929
  });
4930
4930
  }
4931
4931
  }), n;
@@ -4944,59 +4944,59 @@ var sr = {
4944
4944
  return this._tag(e.root, n);
4945
4945
  });
4946
4946
  }), this._ruleReference = this.RULE("ruleReference", () => {
4947
- let { Sheet: e, SheetQuoted: t, DivOp: n, MulOp: i, PlusOp: a, MinOp: c, ArgSeparator: l, Cell: u, NamedToken: d, SingleQuotedString: f, Column: p, AbsRow: h, DigitToken: g, RefError: _ } = this._vocab, v, te;
4947
+ let { Sheet: e, SheetQuoted: t, DivOp: n, MulOp: r, PlusOp: i, MinOp: o, ArgSeparator: s, Cell: l, NamedToken: u, SingleQuotedString: d, Column: f, AbsRow: p, DigitToken: m, RefError: h } = this._vocab, g, y;
4948
4948
  this.OPTION2({
4949
4949
  GATE: () => {
4950
- for (let r = 1; r < 6; r++) {
4951
- let o = this.LA(r);
4952
- if (o.tokenType === e || o.tokenType === t) return !0;
4953
- if (o.image === "" || o.image === ")" || o.tokenType === n || o.tokenType === i || o.tokenType === a || o.tokenType === c || o.tokenType === l) break;
4950
+ for (let a = 1; a < 6; a++) {
4951
+ let c = this.LA(a);
4952
+ if (c.tokenType === e || c.tokenType === t) return !0;
4953
+ if (c.image === "" || c.image === ")" || c.tokenType === n || c.tokenType === r || c.tokenType === i || c.tokenType === o || c.tokenType === s) break;
4954
4954
  }
4955
4955
  return !1;
4956
4956
  },
4957
4957
  DEF: () => {
4958
- te = this.getLexerPosition() + 1, v = this.SUBRULE(this._rulePrefixSheetName);
4958
+ y = this.getLexerPosition() + 1, g = this.SUBRULE(this._rulePrefixSheetName);
4959
4959
  }
4960
4960
  });
4961
- let y = this.OR([
4961
+ let b = this.OR([
4962
4962
  { ALT: () => {
4963
- let e = this.CONSUME(u), t = this.getLexerPosition();
4964
- return this.ACTION(() => this._tag(r(e.image, this.rowIndex, this.colIndex), t));
4963
+ let e = this.CONSUME(l), t = this.getLexerPosition();
4964
+ return this.ACTION(() => this._tag(a(e.image, this.rowIndex, this.colIndex), t));
4965
4965
  } },
4966
4966
  { ALT: () => {
4967
- let e = this.OR2([{ ALT: () => this.CONSUME(d) }, { ALT: () => this.CONSUME(f) }]);
4968
- return this.ACTION(() => this._tag(m(e.image), this.getLexerPosition()));
4967
+ let e = this.OR2([{ ALT: () => this.CONSUME(u) }, { ALT: () => this.CONSUME(d) }]);
4968
+ return this.ACTION(() => this._tag(_(e.image), this.getLexerPosition()));
4969
4969
  } },
4970
4970
  { ALT: () => this.SUBRULE(this._ruleBracketedString) },
4971
4971
  { ALT: () => this.SUBRULE(this._ruleFunction) },
4972
4972
  { ALT: () => {
4973
- let e = this.CONSUME(p);
4974
- return this.ACTION(() => this._tag(o(e.image, this.colIndex), this.getLexerPosition()));
4973
+ let e = this.CONSUME(f);
4974
+ return this.ACTION(() => this._tag(c(e.image, this.colIndex), this.getLexerPosition()));
4975
4975
  } },
4976
4976
  { ALT: () => {
4977
- let e = this.CONSUME(h);
4977
+ let e = this.CONSUME(p);
4978
4978
  return this.ACTION(() => this._tag(ee(e.image, this.rowIndex), this.getLexerPosition()));
4979
4979
  } },
4980
4980
  { ALT: () => {
4981
- let e = this.CONSUME(g);
4981
+ let e = this.CONSUME(m);
4982
4982
  return this.ACTION(() => this._tag(ee(e.image, this.rowIndex), this.getLexerPosition()));
4983
4983
  } },
4984
4984
  { ALT: () => {
4985
- let e = this.CONSUME(_);
4986
- return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4985
+ let e = this.CONSUME(h);
4986
+ return this.ACTION(() => this._tag(v(e.image, this._locale), this.getLexerPosition()));
4987
4987
  } }
4988
4988
  ]);
4989
4989
  return this.ACTION(() => {
4990
- if (v && y) {
4991
- if (v.name === "") return void this._reportError(y, `'${v.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
4992
- let e = y;
4993
- if (y.type === w.Postfix && y.inputs?.[0] && (e = y.inputs[0]), e.type === w.Cell || e.type === w.Named || e.type === w.Row || e.type === w.TableColumn || e.type === w.Error) {
4994
- e.value.scope = v.name, e.value.scopeImage = v.image;
4990
+ if (g && b) {
4991
+ if (g.name === "") return void this._reportError(b, `'${g.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
4992
+ let e = b;
4993
+ if (b.type === S.Postfix && b.inputs?.[0] && (e = b.inputs[0]), e.type === S.Cell || e.type === S.Named || e.type === S.Row || e.type === S.TableColumn || e.type === S.Error) {
4994
+ e.value.scope = g.name, e.value.scopeImage = g.image;
4995
4995
  let t = this._tokenMap.get(e);
4996
- t && te !== void 0 && (t.tokenIndex = te);
4996
+ t && y !== void 0 && (t.tokenIndex = y);
4997
4997
  }
4998
4998
  }
4999
- }), y;
4999
+ }), b;
5000
5000
  }), this._rulePrefixSheetName = this.RULE("rulePrefixSheetName", () => {
5001
5001
  let { SheetQuoted: e, BracketedString: t, NamedToken: n, Column: r, RangeOp: i, Sheet: a } = this._vocab;
5002
5002
  return this.OR([{ ALT: () => {
@@ -5036,12 +5036,12 @@ var sr = {
5036
5036
  return this.MANY(() => {
5037
5037
  this.CONSUME(e), n.push(this.SUBRULE2(this._ruleIntersectOp));
5038
5038
  }), this.ACTION(() => n.length === 0 ? t : {
5039
- type: w.List,
5039
+ type: S.List,
5040
5040
  value: ",",
5041
5041
  inputs: [t, ...n],
5042
5042
  isReference: !0
5043
5043
  });
5044
- }), this._lexer = n, this._locale = n.getLocale(), this._vocab = f, this._srParser = e?.srParser ?? new $n(this._locale), this.performSelfAnalysis();
5044
+ }), this._lexer = l, this._locale = l.getLocale(), this._vocab = d, this._srParser = e?.srParser ?? new $n(this._locale), this.performSelfAnalysis();
5045
5045
  }
5046
5046
  getLexer() {
5047
5047
  return this._lexer;
@@ -5050,26 +5050,26 @@ var sr = {
5050
5050
  let r = this._lexer.tokenize(n), i;
5051
5051
  if (!r) return {
5052
5052
  root: {
5053
- type: w.Unparsed,
5053
+ type: S.Unparsed,
5054
5054
  value: n
5055
5055
  },
5056
5056
  errors: []
5057
5057
  };
5058
5058
  let a = r.tokens;
5059
5059
  if (a.length === 0) throw new E.Parse(ir);
5060
- return this.input = a, this._inputText = n, this._inputTextLength = n.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = y(i, (t, n) => {
5061
- let r = t.type, i = n?.isReference ? n.value : void 0, a = typeof i == "string" && er.has(i), o = typeof i == "string" && tr.has(i), s = a ? n.inputs : void 0, c = s ? s[0] === t ? s[1] : s[0] : void 0, l = this._lexer.getMaxRow();
5062
- if (a && r !== w.Cell && Number.isInteger(t.value)) {
5060
+ return this.input = a, this._inputText = n, this._inputTextLength = n.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = te(i, (t, n) => {
5061
+ let r = t.type, i = n?.isReference ? n.value : void 0, a = typeof i == "string" && er.has(i), o = typeof i == "string" && tr.has(i), s = a ? n.inputs : void 0, c = s ? s[0] === t ? s[1] : s[0] : void 0, u = this._lexer.getMaxRow();
5062
+ if (a && r !== S.Cell && Number.isInteger(t.value)) {
5063
5063
  let n = ee(t.image, e);
5064
- return b(n, t), nr(c) === "row" ? rr(t.image, l) || this._reportError(n, `'${t.image}' is not a valid row — rows run from 1 to ${l}`) : this._reportError(n, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`), n;
5064
+ return l(n, t), nr(c) === "row" ? rr(t.image, u) || this._reportError(n, `'${t.image}' is not a valid row — rows run from 1 to ${u}`) : this._reportError(n, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`), n;
5065
5065
  }
5066
- if (o && r === w.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
5067
- if (r === w.Cell) {
5066
+ if (o && r === S.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
5067
+ if (r === S.Cell) {
5068
5068
  let e = t.value, n = e.colIndex === -(2 ** 53 - 1), r = e.rowIndex === -(2 ** 53 - 1);
5069
- if ((n || r) && nr(c) === (n ? "row" : "col")) return n && !rr(t.image, l) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), t;
5069
+ if ((n || r) && nr(c) === (n ? "row" : "col")) return n && !rr(t.image, u) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${u}`), t;
5070
5070
  if (n || r || e.colIndex >= 16384) {
5071
- let a = m(t.image);
5072
- b(a, t);
5071
+ let a = _(t.image);
5072
+ l(a, t);
5073
5073
  let s = e.scope;
5074
5074
  return s && (a.value.scope = s, a.value.scopeImage = e.scopeImage), n ? this._reportError(a, `'${t.image}' is not a valid reference — a row needs a column (use ${t.image}:${t.image} for the whole row)`) : r && t.image.includes("$") ? this._reportError(a, `'${t.image}' is not a valid reference — a whole column can only pair with another column (as in ${t.image}:${t.image})`) : o && this._reportError(a, `'${t.image}' is a name — '${i}' needs a cell or range on both sides`), a;
5075
5075
  }
@@ -5132,7 +5132,7 @@ var sr = {
5132
5132
  _bindAllWhitespace(e) {
5133
5133
  if (e) {
5134
5134
  if (this._bindNodeWhitespace(e), e.inputs) for (let t of e.inputs) t && this._bindAllWhitespace(t);
5135
- if (e.type === w.Array && Array.isArray(e.value)) {
5135
+ if (e.type === S.Array && Array.isArray(e.value)) {
5136
5136
  for (let t of e.value) if (t && Array.isArray(t.value)) for (let e of t.value) e && this._bindAllWhitespace(e);
5137
5137
  }
5138
5138
  }