@univerjs/engine-formula 0.10.13 → 0.10.14-nightly.202511070628

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/lib/es/index.js CHANGED
@@ -18,7 +18,7 @@ function bc(i, a, e, t, r) {
18
18
  }
19
19
  var m = /* @__PURE__ */ ((i) => (i.DIV_BY_ZERO = "#DIV/0!", i.NAME = "#NAME?", i.VALUE = "#VALUE!", i.NUM = "#NUM!", i.NA = "#N/A", i.CYCLE = "#CYCLE!", i.REF = "#REF!", i.SPILL = "#SPILL!", i.CALC = "#CALC!", i.ERROR = "#ERROR!", i.CONNECT = "#GETTING_DATA", i.NULL = "#NULL!", i))(m || {});
20
20
  const or = new Set(Object.values(m)), za = [...new Set(Object.values(m).map((i) => i.length))];
21
- var yc = /* @__PURE__ */ ((i) => (i[i.Financial = 0] = "Financial", i[i.Date = 1] = "Date", i[i.Math = 2] = "Math", i[i.Statistical = 3] = "Statistical", i[i.Lookup = 4] = "Lookup", i[i.Database = 5] = "Database", i[i.Text = 6] = "Text", i[i.Logical = 7] = "Logical", i[i.Information = 8] = "Information", i[i.Engineering = 9] = "Engineering", i[i.Cube = 10] = "Cube", i[i.Compatibility = 11] = "Compatibility", i[i.Web = 12] = "Web", i[i.Array = 13] = "Array", i[i.Univer = 14] = "Univer", i[i.User = 15] = "User", i[i.DefinedName = 16] = "DefinedName", i))(yc || {}), X = /* @__PURE__ */ ((i) => (i.PLUS = "+", i.MINUS = "-", i.MULTIPLY = "*", i.DIVIDED = "/", i.CONCATENATE = "&", i.POWER = "^", i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(X || {}), k = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(k || {});
21
+ var yc = /* @__PURE__ */ ((i) => (i[i.Financial = 0] = "Financial", i[i.Date = 1] = "Date", i[i.Math = 2] = "Math", i[i.Statistical = 3] = "Statistical", i[i.Lookup = 4] = "Lookup", i[i.Database = 5] = "Database", i[i.Text = 6] = "Text", i[i.Logical = 7] = "Logical", i[i.Information = 8] = "Information", i[i.Engineering = 9] = "Engineering", i[i.Cube = 10] = "Cube", i[i.Compatibility = 11] = "Compatibility", i[i.Web = 12] = "Web", i[i.Array = 13] = "Array", i[i.Univer = 14] = "Univer", i[i.User = 15] = "User", i[i.DefinedName = 16] = "DefinedName", i))(yc || {}), X = /* @__PURE__ */ ((i) => (i.PLUS = "+", i.MINUS = "-", i.MULTIPLY = "*", i.DIVIDED = "/", i.CONCATENATE = "&", i.POWER = "^", i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(X || {}), F = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(F || {});
22
22
  const sn = /* @__PURE__ */ new Map([
23
23
  ["<>", 4],
24
24
  ["<", 4],
@@ -50,7 +50,7 @@ const ls = /* @__PURE__ */ new Set([
50
50
  ]);
51
51
  var Me = /* @__PURE__ */ ((i) => (i.AT = "@", i.MINUS = "-", i.PLUS = "+", i))(Me || {});
52
52
  const pc = " ", zi = [
53
- ...Object.values(k),
53
+ ...Object.values(F),
54
54
  ...Object.values(X),
55
55
  ...Object.values(K),
56
56
  ...Object.values(tt),
@@ -3047,22 +3047,22 @@ class Ht extends Hn {
3047
3047
  return g.create(m.NAME);
3048
3048
  }
3049
3049
  isEqual(e) {
3050
- return this.compare(e, k.EQUALS);
3050
+ return this.compare(e, F.EQUALS);
3051
3051
  }
3052
3052
  isNotEqual(e) {
3053
- return this.compare(e, k.NOT_EQUAL);
3053
+ return this.compare(e, F.NOT_EQUAL);
3054
3054
  }
3055
3055
  isGreaterThanOrEqual(e) {
3056
- return this.compare(e, k.GREATER_THAN_OR_EQUAL);
3056
+ return this.compare(e, F.GREATER_THAN_OR_EQUAL);
3057
3057
  }
3058
3058
  isLessThanOrEqual(e) {
3059
- return this.compare(e, k.LESS_THAN_OR_EQUAL);
3059
+ return this.compare(e, F.LESS_THAN_OR_EQUAL);
3060
3060
  }
3061
3061
  isLessThan(e) {
3062
- return this.compare(e, k.LESS_THAN);
3062
+ return this.compare(e, F.LESS_THAN);
3063
3063
  }
3064
3064
  isGreaterThan(e) {
3065
- return this.compare(e, k.GREATER_THAN);
3065
+ return this.compare(e, F.GREATER_THAN);
3066
3066
  }
3067
3067
  concatenateFront(e) {
3068
3068
  return g.create(m.NAME);
@@ -3286,18 +3286,18 @@ function di(i) {
3286
3286
  function Sl(i, a, e) {
3287
3287
  let t = !1;
3288
3288
  switch (e) {
3289
- case k.EQUALS:
3289
+ case F.EQUALS:
3290
3290
  t = Cs(i, a);
3291
3291
  break;
3292
- case k.NOT_EQUAL:
3292
+ case F.NOT_EQUAL:
3293
3293
  t = !Cs(i, a);
3294
3294
  break;
3295
- case k.GREATER_THAN:
3296
- case k.GREATER_THAN_OR_EQUAL:
3295
+ case F.GREATER_THAN:
3296
+ case F.GREATER_THAN_OR_EQUAL:
3297
3297
  t = Cs(i, a) || i > di(a);
3298
3298
  break;
3299
- case k.LESS_THAN:
3300
- case k.LESS_THAN_OR_EQUAL:
3299
+ case F.LESS_THAN:
3300
+ case F.LESS_THAN_OR_EQUAL:
3301
3301
  t = i < di(a);
3302
3302
  break;
3303
3303
  }
@@ -3324,23 +3324,23 @@ function Is(i) {
3324
3324
  function Aa(i) {
3325
3325
  let a;
3326
3326
  switch (i) {
3327
- case k.EQUALS:
3328
- a = k.EQUALS;
3327
+ case F.EQUALS:
3328
+ a = F.EQUALS;
3329
3329
  break;
3330
- case k.GREATER_THAN:
3331
- a = k.LESS_THAN;
3330
+ case F.GREATER_THAN:
3331
+ a = F.LESS_THAN;
3332
3332
  break;
3333
- case k.GREATER_THAN_OR_EQUAL:
3334
- a = k.LESS_THAN_OR_EQUAL;
3333
+ case F.GREATER_THAN_OR_EQUAL:
3334
+ a = F.LESS_THAN_OR_EQUAL;
3335
3335
  break;
3336
- case k.LESS_THAN:
3337
- a = k.GREATER_THAN;
3336
+ case F.LESS_THAN:
3337
+ a = F.GREATER_THAN;
3338
3338
  break;
3339
- case k.LESS_THAN_OR_EQUAL:
3340
- a = k.GREATER_THAN_OR_EQUAL;
3339
+ case F.LESS_THAN_OR_EQUAL:
3340
+ a = F.GREATER_THAN_OR_EQUAL;
3341
3341
  break;
3342
- case k.NOT_EQUAL:
3343
- a = k.NOT_EQUAL;
3342
+ case F.NOT_EQUAL:
3343
+ a = F.NOT_EQUAL;
3344
3344
  break;
3345
3345
  }
3346
3346
  return a;
@@ -3855,7 +3855,7 @@ var Ve = /* @__PURE__ */ (function() {
3855
3855
  for (; !t[0] && t.length > 1; ) t.shift();
3856
3856
  }
3857
3857
  return function(t, r, n, s, o, u) {
3858
- var c, l, f, h, d, _, C, E, b, R, p, N, M, w, S, D, L, U, x, F, Q = t.constructor, ne = t.s == r.s ? 1 : -1, z = t.d, G = r.d;
3858
+ var c, l, f, h, d, _, C, E, b, R, p, N, M, w, S, D, L, U, x, k, Q = t.constructor, ne = t.s == r.s ? 1 : -1, z = t.d, G = r.d;
3859
3859
  if (!z || !z[0] || !G || !G[0])
3860
3860
  return new Q(
3861
3861
  // Return NaN if either NaN, or both Infinity or 0.
@@ -3874,9 +3874,9 @@ var Ve = /* @__PURE__ */ (function() {
3874
3874
  _ = h || f < L;
3875
3875
  } else {
3876
3876
  for (h = u / (G[0] + 1) | 0, h > 1 && (G = i(G, h, u), z = i(z, h, u), x = G.length, L = z.length), D = x, p = z.slice(0, x), N = p.length; N < x; ) p[N++] = 0;
3877
- F = G.slice(), F.unshift(0), U = G[0], G[1] >= u / 2 && ++U;
3877
+ k = G.slice(), k.unshift(0), U = G[0], G[1] >= u / 2 && ++U;
3878
3878
  do
3879
- h = 0, c = a(G, p, x, N), c < 0 ? (M = p[0], x != N && (M = M * u + (p[1] || 0)), h = M / U | 0, h > 1 ? (h >= u && (h = u - 1), C = i(G, h, u), E = C.length, N = p.length, c = a(C, p, E, N), c == 1 && (h--, e(C, x < E ? F : G, E, u))) : (h == 0 && (c = h = 1), C = G.slice()), E = C.length, E < N && C.unshift(0), e(p, C, N, u), c == -1 && (N = p.length, c = a(G, p, x, N), c < 1 && (h++, e(p, x < N ? F : G, N, u))), N = p.length) : c === 0 && (h++, p = [0]), R[f++] = h, c && p[0] ? p[N++] = z[D] || 0 : (p = [z[D]], N = 1);
3879
+ h = 0, c = a(G, p, x, N), c < 0 ? (M = p[0], x != N && (M = M * u + (p[1] || 0)), h = M / U | 0, h > 1 ? (h >= u && (h = u - 1), C = i(G, h, u), E = C.length, N = p.length, c = a(C, p, E, N), c == 1 && (h--, e(C, x < E ? k : G, E, u))) : (h == 0 && (c = h = 1), C = G.slice()), E = C.length, E < N && C.unshift(0), e(p, C, N, u), c == -1 && (N = p.length, c = a(G, p, x, N), c < 1 && (h++, e(p, x < N ? k : G, N, u))), N = p.length) : c === 0 && (h++, p = [0]), R[f++] = h, c && p[0] ? p[N++] = z[D] || 0 : (p = [z[D]], N = 1);
3880
3880
  while ((D++ < L || p[0] !== void 0) && w--);
3881
3881
  _ = p[0] !== void 0;
3882
3882
  }
@@ -4556,7 +4556,7 @@ const $n = class $n extends Ht {
4556
4556
  }
4557
4557
  };
4558
4558
  A($n, "_instance");
4559
- let ue = $n;
4559
+ let ce = $n;
4560
4560
  const Xt = class Xt extends Ht {
4561
4561
  constructor(e) {
4562
4562
  super(e);
@@ -4610,13 +4610,13 @@ const Xt = class Xt extends Ht {
4610
4610
  }
4611
4611
  _compareString(e) {
4612
4612
  switch (e) {
4613
- case k.GREATER_THAN:
4614
- case k.GREATER_THAN_OR_EQUAL:
4613
+ case F.GREATER_THAN:
4614
+ case F.GREATER_THAN_OR_EQUAL:
4615
4615
  return !0;
4616
- case k.EQUALS:
4617
- case k.LESS_THAN:
4618
- case k.LESS_THAN_OR_EQUAL:
4619
- case k.NOT_EQUAL:
4616
+ case F.EQUALS:
4617
+ case F.LESS_THAN:
4618
+ case F.LESS_THAN_OR_EQUAL:
4619
+ case F.NOT_EQUAL:
4620
4620
  return !1;
4621
4621
  }
4622
4622
  }
@@ -4869,13 +4869,13 @@ class y extends Ht {
4869
4869
  }
4870
4870
  _compareString(e) {
4871
4871
  switch (e) {
4872
- case k.EQUALS:
4873
- case k.GREATER_THAN:
4874
- case k.GREATER_THAN_OR_EQUAL:
4872
+ case F.EQUALS:
4873
+ case F.GREATER_THAN:
4874
+ case F.GREATER_THAN_OR_EQUAL:
4875
4875
  return !1;
4876
- case k.LESS_THAN:
4877
- case k.LESS_THAN_OR_EQUAL:
4878
- case k.NOT_EQUAL:
4876
+ case F.LESS_THAN:
4877
+ case F.LESS_THAN_OR_EQUAL:
4878
+ case F.NOT_EQUAL:
4879
4879
  return !0;
4880
4880
  }
4881
4881
  }
@@ -4884,29 +4884,29 @@ class y extends Ht {
4884
4884
  }
4885
4885
  _compareFiniteNumber(e, t, r) {
4886
4886
  switch (r) {
4887
- case k.EQUALS:
4887
+ case F.EQUALS:
4888
4888
  return bi(e, t);
4889
- case k.GREATER_THAN:
4889
+ case F.GREATER_THAN:
4890
4890
  return Df(e, t);
4891
- case k.GREATER_THAN_OR_EQUAL:
4891
+ case F.GREATER_THAN_OR_EQUAL:
4892
4892
  return Lf(e, t);
4893
- case k.LESS_THAN:
4893
+ case F.LESS_THAN:
4894
4894
  return Pf(e, t);
4895
- case k.LESS_THAN_OR_EQUAL:
4895
+ case F.LESS_THAN_OR_EQUAL:
4896
4896
  return xf(e, t);
4897
- case k.NOT_EQUAL:
4897
+ case F.NOT_EQUAL:
4898
4898
  return !bi(e, t);
4899
4899
  }
4900
4900
  }
4901
4901
  _compareBoolean(e) {
4902
4902
  switch (e) {
4903
- case k.EQUALS:
4904
- case k.GREATER_THAN:
4905
- case k.GREATER_THAN_OR_EQUAL:
4903
+ case F.EQUALS:
4904
+ case F.GREATER_THAN:
4905
+ case F.GREATER_THAN_OR_EQUAL:
4906
4906
  return !1;
4907
- case k.LESS_THAN:
4908
- case k.LESS_THAN_OR_EQUAL:
4909
- case k.NOT_EQUAL:
4907
+ case F.LESS_THAN:
4908
+ case F.LESS_THAN_OR_EQUAL:
4909
+ case F.NOT_EQUAL:
4910
4910
  return !0;
4911
4911
  }
4912
4912
  }
@@ -5122,22 +5122,22 @@ class y extends Ht {
5122
5122
  _compareInfinity(e, t, r) {
5123
5123
  let n = !1;
5124
5124
  switch (r) {
5125
- case k.EQUALS:
5125
+ case F.EQUALS:
5126
5126
  n = e === t;
5127
5127
  break;
5128
- case k.GREATER_THAN:
5128
+ case F.GREATER_THAN:
5129
5129
  n = e > t;
5130
5130
  break;
5131
- case k.GREATER_THAN_OR_EQUAL:
5131
+ case F.GREATER_THAN_OR_EQUAL:
5132
5132
  n = e >= t;
5133
5133
  break;
5134
- case k.LESS_THAN:
5134
+ case F.LESS_THAN:
5135
5135
  n = e < t;
5136
5136
  break;
5137
- case k.LESS_THAN_OR_EQUAL:
5137
+ case F.LESS_THAN_OR_EQUAL:
5138
5138
  n = e <= t;
5139
5139
  break;
5140
- case k.NOT_EQUAL:
5140
+ case F.NOT_EQUAL:
5141
5141
  n = e !== t;
5142
5142
  break;
5143
5143
  }
@@ -5209,41 +5209,41 @@ class j extends Ht {
5209
5209
  }
5210
5210
  _compareString(e, t, r) {
5211
5211
  switch (r) {
5212
- case k.EQUALS:
5212
+ case F.EQUALS:
5213
5213
  return e === t;
5214
- case k.GREATER_THAN:
5214
+ case F.GREATER_THAN:
5215
5215
  return e > t;
5216
- case k.GREATER_THAN_OR_EQUAL:
5216
+ case F.GREATER_THAN_OR_EQUAL:
5217
5217
  return e >= t;
5218
- case k.LESS_THAN:
5218
+ case F.LESS_THAN:
5219
5219
  return e < t;
5220
- case k.LESS_THAN_OR_EQUAL:
5220
+ case F.LESS_THAN_OR_EQUAL:
5221
5221
  return e <= t;
5222
- case k.NOT_EQUAL:
5222
+ case F.NOT_EQUAL:
5223
5223
  return e !== t;
5224
5224
  }
5225
5225
  }
5226
5226
  _compareNumber(e) {
5227
5227
  switch (e) {
5228
- case k.NOT_EQUAL:
5229
- case k.GREATER_THAN:
5230
- case k.GREATER_THAN_OR_EQUAL:
5228
+ case F.NOT_EQUAL:
5229
+ case F.GREATER_THAN:
5230
+ case F.GREATER_THAN_OR_EQUAL:
5231
5231
  return !0;
5232
- case k.EQUALS:
5233
- case k.LESS_THAN:
5234
- case k.LESS_THAN_OR_EQUAL:
5232
+ case F.EQUALS:
5233
+ case F.LESS_THAN:
5234
+ case F.LESS_THAN_OR_EQUAL:
5235
5235
  return !1;
5236
5236
  }
5237
5237
  }
5238
5238
  _compareBoolean(e) {
5239
5239
  switch (e) {
5240
- case k.EQUALS:
5241
- case k.GREATER_THAN:
5242
- case k.GREATER_THAN_OR_EQUAL:
5240
+ case F.EQUALS:
5241
+ case F.GREATER_THAN:
5242
+ case F.GREATER_THAN_OR_EQUAL:
5243
5243
  return !1;
5244
- case k.LESS_THAN:
5245
- case k.LESS_THAN_OR_EQUAL:
5246
- case k.NOT_EQUAL:
5244
+ case F.LESS_THAN:
5245
+ case F.LESS_THAN_OR_EQUAL:
5246
+ case F.NOT_EQUAL:
5247
5247
  return !0;
5248
5248
  }
5249
5249
  }
@@ -5474,11 +5474,11 @@ class q extends Ht {
5474
5474
  }
5475
5475
  getFirstCell() {
5476
5476
  const { startRow: e, startColumn: t } = this.getRangePosition();
5477
- return this.get(e, t) || this._defaultValue || ue.create();
5477
+ return this.get(e, t) || this._defaultValue || ce.create();
5478
5478
  }
5479
5479
  getLastCell() {
5480
5480
  const { endRow: e, endColumn: t } = this.getRangePosition();
5481
- return this.get(e, t) || this._defaultValue || ue.create();
5481
+ return this.get(e, t) || this._defaultValue || ce.create();
5482
5482
  }
5483
5483
  /**
5484
5484
  * Referring to matrix calculations,
@@ -5494,7 +5494,7 @@ class q extends Ht {
5494
5494
  pickRaw(e) {
5495
5495
  const t = e.getRowCount(), r = e.getColumnCount();
5496
5496
  if (t !== this._rowCount || r !== this._columnCount)
5497
- return [[ue.create()]];
5497
+ return [[ce.create()]];
5498
5498
  const n = [];
5499
5499
  n[0] = [];
5500
5500
  for (let s = 0; s < t; s++)
@@ -5572,7 +5572,7 @@ class q extends Ht {
5572
5572
  if (!d[p])
5573
5573
  return;
5574
5574
  let M = d[p][N] || this._defaultValue;
5575
- M == null && (M = ue.create()), h[_][C] = M, C++;
5575
+ M == null && (M = ce.create()), h[_][C] = M, C++;
5576
5576
  }
5577
5577
  _++;
5578
5578
  }
@@ -5603,7 +5603,7 @@ class q extends Ht {
5603
5603
  if (f == null)
5604
5604
  return !0;
5605
5605
  let _;
5606
- if (n === !0 ? _ = f.compare(e, k.EQUALS) : _ = f.isEqual(e), (_ == null ? void 0 : _.getValue()) === !0)
5606
+ if (n === !0 ? _ = f.compare(e, F.EQUALS) : _ = f.isEqual(e), (_ == null ? void 0 : _.getValue()) === !0)
5607
5607
  return s = f, u = { row: h, column: d }, !1;
5608
5608
  t === Le.MAX ? f.isGreaterThan(e).getValue() === !0 && (o == null || f.minus(e).abs().isLessThanOrEqual(o.minus(e).abs()).getValue() === !0) && (o = f, c = { row: h, column: d }) : t === Le.MIN && f.isLessThan(e).getValue() === !0 && (o == null || f.minus(e).abs().isLessThanOrEqual(o.minus(e).abs()).getValue() === !0) && (o = f, c = { row: h, column: d });
5609
5609
  };
@@ -5778,7 +5778,7 @@ class q extends Ht {
5778
5778
  );
5779
5779
  }
5780
5780
  map(e) {
5781
- const t = (r, n, s) => r == null ? ue.create() : r.isError() ? r : e(r, n, s);
5781
+ const t = (r, n, s) => r == null ? ce.create() : r.isError() ? r : e(r, n, s);
5782
5782
  return this.mapValue(t);
5783
5783
  }
5784
5784
  mapValue(e) {
@@ -5792,7 +5792,7 @@ class q extends Ht {
5792
5792
  u[c] = g.create(m.VALUE);
5793
5793
  else {
5794
5794
  const f = l[c] || this._defaultValue;
5795
- f ? u[c] = e(f, o, c) : u[c] = ue.create();
5795
+ f ? u[c] = e(f, o, c) : u[c] = ce.create();
5796
5796
  }
5797
5797
  }
5798
5798
  n.push(u);
@@ -5873,12 +5873,12 @@ class q extends Ht {
5873
5873
  median() {
5874
5874
  const e = this.flattenPosition().numberArray, t = this._createNewArray([e], 1, e.length), r = t.getColumnCount();
5875
5875
  if (r <= 1)
5876
- return t.get(0, 0) || ue.create();
5876
+ return t.get(0, 0) || ce.create();
5877
5877
  if (t.sortByRow(0), r % 2 === 0) {
5878
- const n = t.get(0, r / 2) || ue.create(), s = t.get(0, r / 2 - 1) || ue.create();
5878
+ const n = t.get(0, r / 2) || ce.create(), s = t.get(0, r / 2 - 1) || ce.create();
5879
5879
  return n.plus(s).divided(y.create(2));
5880
5880
  }
5881
- return t.get(0, (r - 1) / 2) || ue.create();
5881
+ return t.get(0, (r - 1) / 2) || ce.create();
5882
5882
  }
5883
5883
  /**
5884
5884
  * ┌──────────────┬────────────────────────────────┬───────────────────┐
@@ -6042,61 +6042,64 @@ class q extends Ht {
6042
6042
  f + u - 1
6043
6043
  );
6044
6044
  if (d.length > 0) {
6045
- if (s === k.EQUALS) {
6046
- const C = We.getCellPositions(
6045
+ let C = !1;
6046
+ if (s === F.EQUALS) {
6047
+ const E = We.getCellPositions(
6047
6048
  c,
6048
6049
  l,
6049
6050
  t + h,
6050
6051
  e.getValue(),
6051
6052
  d
6052
6053
  );
6053
- C != null && C.forEach((E) => {
6054
- if (E < f || E > f + u - 1)
6054
+ E != null && (E.forEach((b) => {
6055
+ if (b < f || b > f + u - 1)
6055
6056
  return;
6056
- const b = E - f;
6057
- r[b] == null && (r[b] = []), r[b][t] = T.create(!0);
6058
- });
6057
+ const R = b - f;
6058
+ r[R] == null && (r[R] = []), r[R][t] = T.create(!0);
6059
+ }), C = !0);
6059
6060
  } else {
6060
- const C = We.getCellValuePositions(
6061
+ const E = We.getCellValuePositions(
6061
6062
  c,
6062
6063
  l,
6063
6064
  t + h
6064
6065
  );
6065
- C != null && C.forEach((E, b) => {
6066
- let R = ue.create();
6067
- or.has(b) ? R = g.create(b) : typeof b == "string" ? R = j.create(b) : typeof b == "number" ? R = y.create(b) : typeof b == "boolean" && (R = T.create(b));
6068
- let p;
6069
- R.isError() ? p = R : e.isError() ? p = e : p = R.compare(e, s, o), (p.isError() || p.getValue() === !0) && E.forEach((N) => {
6070
- N >= f && N <= f + u - 1 && (r[N - f] == null && (r[N - f] = []), r[N - f][t] = p);
6066
+ E != null && E.forEach((b, R) => {
6067
+ let p = ce.create();
6068
+ or.has(R) ? p = g.create(R) : typeof R == "string" ? p = j.create(R) : typeof R == "number" ? p = y.create(R) : typeof R == "boolean" && (p = T.create(R));
6069
+ let N;
6070
+ p.isError() ? N = p : e.isError() ? N = e : N = p.compare(e, s, o), (N.isError() || N.getValue() === !0) && b.forEach((M) => {
6071
+ M >= f && M <= f + u - 1 && (r[M - f] == null && (r[M - f] = []), r[M - f][t] = N);
6071
6072
  });
6072
6073
  });
6073
6074
  }
6074
- if (_.length > 0)
6075
- for (const C of _) {
6076
- const [E, b] = C;
6077
- for (let R = E; R <= b; R++)
6078
- this.__batchOperatorRowValue(
6079
- e,
6080
- t,
6081
- r,
6082
- n,
6083
- R - f,
6075
+ if (!(s === F.EQUALS && !C && !o)) {
6076
+ if (_.length > 0)
6077
+ for (const E of _) {
6078
+ const [b, R] = E;
6079
+ for (let p = b; p <= R; p++)
6080
+ this.__batchOperatorRowValue(
6081
+ e,
6082
+ t,
6083
+ r,
6084
+ n,
6085
+ p - f,
6086
+ c,
6087
+ l,
6088
+ f,
6089
+ h,
6090
+ s,
6091
+ o
6092
+ );
6093
+ We.setContinueBuildingCache(
6084
6094
  c,
6085
6095
  l,
6086
- f,
6087
- h,
6088
- s,
6089
- o
6096
+ t + h,
6097
+ b,
6098
+ R
6090
6099
  );
6091
- We.setContinueBuildingCache(
6092
- c,
6093
- l,
6094
- t + h,
6095
- E,
6096
- b
6097
- );
6098
- }
6099
- return;
6100
+ }
6101
+ return;
6102
+ }
6100
6103
  }
6101
6104
  }
6102
6105
  for (let d = 0; d < u; d++)
@@ -6173,7 +6176,7 @@ class q extends Ht {
6173
6176
  }
6174
6177
  else
6175
6178
  r[s][t] = g.create(m.NA);
6176
- d != null && (d.isError() ? We.set(
6179
+ d != null && (d.isNull() || (d.isError() ? We.set(
6177
6180
  o,
6178
6181
  u,
6179
6182
  t + l,
@@ -6185,7 +6188,7 @@ class q extends Ht {
6185
6188
  t + l,
6186
6189
  d.getValue(),
6187
6190
  s + c
6188
- ));
6191
+ )));
6189
6192
  }
6190
6193
  // eslint-disable-next-line max-lines-per-function, complexity
6191
6194
  _batchOperatorArray(e, t, r, n) {
@@ -6290,7 +6293,7 @@ class q extends Ht {
6290
6293
  class Mt {
6291
6294
  static create(a, e = !1) {
6292
6295
  if (a == null)
6293
- return ue.create();
6296
+ return ce.create();
6294
6297
  if (typeof a == "boolean")
6295
6298
  return T.create(a);
6296
6299
  if (typeof a == "string") {
@@ -6639,7 +6642,7 @@ class Xn extends Hn {
6639
6642
  const f = new Array(c);
6640
6643
  this.iterator((C, E, b) => {
6641
6644
  const R = E - t, p = b - n;
6642
- f[R] || (f[R] = new Array(l)), C == null && (C = ue.create()), f[R][p] = C;
6645
+ f[R] || (f[R] = new Array(l)), C == null && (C = ce.create()), f[R][p] = C;
6643
6646
  });
6644
6647
  const h = {
6645
6648
  calculateValueList: f,
@@ -6846,7 +6849,7 @@ function O(i, a, e, t) {
6846
6849
  continue;
6847
6850
  }
6848
6851
  if (o >= r || c >= n) {
6849
- u.push(t != null ? t : ue.create());
6852
+ u.push(t != null ? t : ce.create());
6850
6853
  continue;
6851
6854
  }
6852
6855
  const l = e.get(o, c);
@@ -6870,19 +6873,19 @@ function Fr(i, a, e, t = "", r = "") {
6870
6873
  }
6871
6874
  function Va(i) {
6872
6875
  const a = [
6873
- k.EQUALS,
6874
- k.NOT_EQUAL,
6875
- k.GREATER_THAN_OR_EQUAL,
6876
- k.GREATER_THAN,
6877
- k.LESS_THAN_OR_EQUAL,
6878
- k.LESS_THAN
6876
+ F.EQUALS,
6877
+ F.NOT_EQUAL,
6878
+ F.GREATER_THAN_OR_EQUAL,
6879
+ F.GREATER_THAN,
6880
+ F.LESS_THAN_OR_EQUAL,
6881
+ F.LESS_THAN
6879
6882
  ];
6880
6883
  for (const e of a)
6881
6884
  if (i.startsWith(e)) {
6882
6885
  const t = i.substring(e.length);
6883
6886
  return [e, Mt.create(t)];
6884
6887
  }
6885
- return [k.EQUALS, Mt.create(i)];
6888
+ return [F.EQUALS, Mt.create(i)];
6886
6889
  }
6887
6890
  function Zn(i, a, e, t) {
6888
6891
  if (!e)
@@ -6890,7 +6893,7 @@ function Zn(i, a, e, t) {
6890
6893
  const r = `${a.getValue()}`, [n, s] = Va(r);
6891
6894
  e = n, a = s;
6892
6895
  } else
6893
- e = k.EQUALS;
6896
+ e = F.EQUALS;
6894
6897
  return i.compare(a, e, t);
6895
6898
  }
6896
6899
  function Hf(i, a) {
@@ -7055,7 +7058,7 @@ function zn(i, a, e) {
7055
7058
  return n;
7056
7059
  if (u != null && u.isError() && r.isError() && u.getValue() === r.getValue())
7057
7060
  return T.create(!0);
7058
- if (t === k.EQUALS || t === k.NOT_EQUAL) {
7061
+ if (t === F.EQUALS || t === F.NOT_EQUAL) {
7059
7062
  if (u != null && u.isNumber() && r.isString()) {
7060
7063
  const c = r.convertToNumberObjectValue();
7061
7064
  if (c.isNumber())
@@ -7066,9 +7069,9 @@ function zn(i, a, e) {
7066
7069
  if (c.isNumber())
7067
7070
  return c.compare(r, t);
7068
7071
  }
7069
- if (t === k.EQUALS)
7072
+ if (t === F.EQUALS)
7070
7073
  return T.create(!1);
7071
- if (t === k.NOT_EQUAL)
7074
+ if (t === F.NOT_EQUAL)
7072
7075
  return T.create(!0);
7073
7076
  }
7074
7077
  return T.create(!1);
@@ -7343,15 +7346,15 @@ let Ws = class extends Ne {
7343
7346
  const S = this._currentConfigService.getUnitData();
7344
7347
  E.iterator((D, L, U) => {
7345
7348
  var ne, z;
7346
- const x = L - b + e, F = U - R + t, Q = (z = (ne = S[o]) == null ? void 0 : ne[s]) == null ? void 0 : z.cellData.getValue(x, F);
7349
+ const x = L - b + e, k = U - R + t, Q = (z = (ne = S[o]) == null ? void 0 : ne[s]) == null ? void 0 : z.cellData.getValue(x, k);
7347
7350
  if (L === b && U === R)
7348
7351
  _.setValue(e, t, w);
7349
7352
  else if (Q != null)
7350
- Q.v == null && (Q.v = ""), _.setValue(x, F, Q);
7353
+ Q.v == null && (Q.v = ""), _.setValue(x, k, Q);
7351
7354
  else {
7352
- if (this._isInOtherArrayFormulaRange(o, s, e, t, x, F))
7355
+ if (this._isInOtherArrayFormulaRange(o, s, e, t, x, k))
7353
7356
  return !0;
7354
- _.setValue(x, F, { v: "" });
7357
+ _.setValue(x, k, { v: "" });
7355
7358
  }
7356
7359
  });
7357
7360
  } else {
@@ -7371,8 +7374,8 @@ let Ws = class extends Ne {
7371
7374
  return C.setValue(e, t, {}), d.setValue(e, t, { ...this._getValueObjectOfRuntimeData(w) }), !1;
7372
7375
  d.setValue(e, t, { ...U });
7373
7376
  }
7374
- const x = D - b + e, F = L - R + t;
7375
- _.setValue(x, F, U);
7377
+ const x = D - b + e, k = L - R + t;
7378
+ _.setValue(x, k, U);
7376
7379
  });
7377
7380
  }
7378
7381
  } else {
@@ -8373,7 +8376,7 @@ class bh extends Ge {
8373
8376
  return ie.NULL;
8374
8377
  }
8375
8378
  execute() {
8376
- this.setValue(ue.create());
8379
+ this.setValue(ce.create());
8377
8380
  }
8378
8381
  }
8379
8382
  var Y = /* @__PURE__ */ ((i) => (i.ABS = "ABS", i.ACOS = "ACOS", i.ACOSH = "ACOSH", i.ACOT = "ACOT", i.ACOTH = "ACOTH", i.AGGREGATE = "AGGREGATE", i.ARABIC = "ARABIC", i.ASIN = "ASIN", i.ASINH = "ASINH", i.ATAN = "ATAN", i.ATAN2 = "ATAN2", i.ATANH = "ATANH", i.BASE = "BASE", i.CEILING = "CEILING", i.CEILING_MATH = "CEILING.MATH", i.CEILING_PRECISE = "CEILING.PRECISE", i.COMBIN = "COMBIN", i.COMBINA = "COMBINA", i.COS = "COS", i.COSH = "COSH", i.COT = "COT", i.COTH = "COTH", i.CSC = "CSC", i.CSCH = "CSCH", i.DECIMAL = "DECIMAL", i.DEGREES = "DEGREES", i.EVEN = "EVEN", i.EXP = "EXP", i.FACT = "FACT", i.FACTDOUBLE = "FACTDOUBLE", i.FLOOR = "FLOOR", i.FLOOR_MATH = "FLOOR.MATH", i.FLOOR_PRECISE = "FLOOR.PRECISE", i.GCD = "GCD", i.INT = "INT", i.ISO_CEILING = "ISO.CEILING", i.LCM = "LCM", i.LET = "LET", i.LN = "LN", i.LOG = "LOG", i.LOG10 = "LOG10", i.MDETERM = "MDETERM", i.MINVERSE = "MINVERSE", i.MMULT = "MMULT", i.MOD = "MOD", i.MROUND = "MROUND", i.MULTINOMIAL = "MULTINOMIAL", i.MUNIT = "MUNIT", i.ODD = "ODD", i.PI = "PI", i.POWER = "POWER", i.PRODUCT = "PRODUCT", i.QUOTIENT = "QUOTIENT", i.RADIANS = "RADIANS", i.RAND = "RAND", i.RANDARRAY = "RANDARRAY", i.RANDBETWEEN = "RANDBETWEEN", i.ROMAN = "ROMAN", i.ROUND = "ROUND", i.ROUNDBANK = "ROUNDBANK", i.ROUNDDOWN = "ROUNDDOWN", i.ROUNDUP = "ROUNDUP", i.SEC = "SEC", i.SECH = "SECH", i.SERIESSUM = "SERIESSUM", i.SEQUENCE = "SEQUENCE", i.SIGN = "SIGN", i.SIN = "SIN", i.SINH = "SINH", i.SQRT = "SQRT", i.SQRTPI = "SQRTPI", i.SUBTOTAL = "SUBTOTAL", i.SUM = "SUM", i.SUMIF = "SUMIF", i.SUMIFS = "SUMIFS", i.SUMPRODUCT = "SUMPRODUCT", i.SUMSQ = "SUMSQ", i.SUMX2MY2 = "SUMX2MY2", i.SUMX2PY2 = "SUMX2PY2", i.SUMXMY2 = "SUMXMY2", i.TAN = "TAN", i.TANH = "TANH", i.TRUNC = "TRUNC", i))(Y || {}), se = /* @__PURE__ */ ((i) => (i.ASC = "ASC", i.ARRAYTOTEXT = "ARRAYTOTEXT", i.BAHTTEXT = "BAHTTEXT", i.CHAR = "CHAR", i.CLEAN = "CLEAN", i.CODE = "CODE", i.CONCAT = "CONCAT", i.CONCATENATE = "CONCATENATE", i.DBCS = "DBCS", i.DOLLAR = "DOLLAR", i.EXACT = "EXACT", i.FIND = "FIND", i.FINDB = "FINDB", i.FIXED = "FIXED", i.LEFT = "LEFT", i.LEFTB = "LEFTB", i.LEN = "LEN", i.LENB = "LENB", i.LOWER = "LOWER", i.MID = "MID", i.MIDB = "MIDB", i.NUMBERSTRING = "NUMBERSTRING", i.NUMBERVALUE = "NUMBERVALUE", i.PHONETIC = "PHONETIC", i.PROPER = "PROPER", i.REGEXEXTRACT = "REGEXEXTRACT", i.REGEXMATCH = "REGEXMATCH", i.REGEXREPLACE = "REGEXREPLACE", i.REPLACE = "REPLACE", i.REPLACEB = "REPLACEB", i.REPT = "REPT", i.RIGHT = "RIGHT", i.RIGHTB = "RIGHTB", i.SEARCH = "SEARCH", i.SEARCHB = "SEARCHB", i.SUBSTITUTE = "SUBSTITUTE", i.T = "T", i.TEXT = "TEXT", i.TEXTAFTER = "TEXTAFTER", i.TEXTBEFORE = "TEXTBEFORE", i.TEXTJOIN = "TEXTJOIN", i.TEXTSPLIT = "TEXTSPLIT", i.TRIM = "TRIM", i.UNICHAR = "UNICHAR", i.UNICODE = "UNICODE", i.UPPER = "UPPER", i.VALUE = "VALUE", i.VALUETOTEXT = "VALUETOTEXT", i.CALL = "CALL", i.EUROCONVERT = "EUROCONVERT", i.REGISTER_ID = "REGISTER.ID", i))(se || {}), yh = Object.getOwnPropertyDescriptor, Rh = (i, a, e, t) => {
@@ -8398,7 +8401,7 @@ class Vh extends Ge {
8398
8401
  this.setValue(g.create(m.VALUE));
8399
8402
  return;
8400
8403
  }
8401
- r == null && (r = ue.create()), n == null && (n = ue.create()), r.isReferenceObject() && (r = r.toArrayValueObject()), n.isReferenceObject() && (n = n.toArrayValueObject()), this.setValue(
8404
+ r == null && (r = ce.create()), n == null && (n = ce.create()), r.isReferenceObject() && (r = r.toArrayValueObject()), n.isReferenceObject() && (n = n.toArrayValueObject()), this.setValue(
8402
8405
  this._functionExecutor.calculate(
8403
8406
  r,
8404
8407
  n
@@ -9791,9 +9794,9 @@ let Zs = class extends Ne {
9791
9794
  const E = Vi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || cr(this._dependencyManagerService), M = new bs(N);
9792
9795
  for (let w = 0; w < _.length; w++) {
9793
9796
  const S = _[w], { startRow: D, startColumn: L, endRow: U, endColumn: x } = S;
9794
- for (let F = D; F <= U; F++)
9797
+ for (let k = D; k <= U; k++)
9795
9798
  for (let Q = L; Q <= x; Q++) {
9796
- const ne = Q - R, z = F - b;
9799
+ const ne = Q - R, z = k - b;
9797
9800
  if (ne === 0 && z === 0) {
9798
9801
  M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type = Ks.OTHER_FORMULA, M.isCache = C, t.push(M), this._dependencyManagerService.addOtherFormulaDependency(r, o, l, M), this._dependencyManagerService.addFormulaDependencyByDefinedName(M);
9799
9802
  continue;
@@ -10789,7 +10792,7 @@ class V {
10789
10792
  if (s == null)
10790
10793
  return g.create(m.NA);
10791
10794
  let o;
10792
- return t.getRowCount() === 1 ? o = t.get(0, s) || ue.create() : o = t.get(s, 0) || ue.create(), o.isNull() ? y.create(0) : o;
10795
+ return t.getRowCount() === 1 ? o = t.get(0, s) || ce.create() : o = t.get(s, 0) || ce.create(), o.isNull() ? y.create(0) : o;
10793
10796
  }
10794
10797
  _getOneFirstByRaw(a) {
10795
10798
  return a.length === 0 ? g.create(m.NA) : a[0][0] || g.create(m.NA);
@@ -10802,14 +10805,14 @@ class V {
10802
10805
  return r ? this._getOneFirstByRaw(n) : this._getOneLastByRaw(n);
10803
10806
  }
10804
10807
  fuzzySearch(a, e, t, r = !0) {
10805
- const n = t.pickRaw(e.compare(a, k.EQUALS));
10808
+ const n = t.pickRaw(e.compare(a, F.EQUALS));
10806
10809
  return r ? this._getOneFirstByRaw(n) : this._getOneLastByRaw(n);
10807
10810
  }
10808
10811
  orderSearch(a, e, t, r = Le.MIN, n = !1) {
10809
10812
  const s = e.orderSearch(a, r, n);
10810
10813
  if (s == null)
10811
10814
  return g.create(m.NA);
10812
- const o = t.get(s.row, s.column) || ue.create();
10815
+ const o = t.get(s.row, s.column) || ce.create();
10813
10816
  return o.isNull() ? g.create(m.NA) : o;
10814
10817
  }
10815
10818
  binarySearchExpand(a, e, t, r = 0, n, s) {
@@ -10822,7 +10825,7 @@ class V {
10822
10825
  return r ? o = s.getFirstTruePosition() : o = s.getLastTruePosition(), o == null ? g.create(m.NA) : n === 0 ? t.slice([o.row, o.row + 1]) : t.slice(void 0, [o.column, o.column + 1]);
10823
10826
  }
10824
10827
  fuzzySearchExpand(a, e, t, r = !0, n = 0) {
10825
- const s = e.compare(a, k.EQUALS);
10828
+ const s = e.compare(a, F.EQUALS);
10826
10829
  let o;
10827
10830
  return r ? o = s.getFirstTruePosition() : o = s.getLastTruePosition(), o == null ? g.create(m.NA) : n === 0 ? t.slice([o.row, o.row + 1]) : t.slice(void 0, [o.column, o.column + 1]);
10828
10831
  }
@@ -14248,12 +14251,6 @@ class sg extends V {
14248
14251
  A(this, "maxParams", 3);
14249
14252
  }
14250
14253
  calculate(e, t, r) {
14251
- if (e.isError())
14252
- return e;
14253
- if (t.isError())
14254
- return t;
14255
- if (r.isError())
14256
- return r;
14257
14254
  const n = Math.max(
14258
14255
  e.isArray() ? e.getRowCount() : 1,
14259
14256
  t.isArray() ? t.getRowCount() : 1,
@@ -14262,25 +14259,27 @@ class sg extends V {
14262
14259
  e.isArray() ? e.getColumnCount() : 1,
14263
14260
  t.isArray() ? t.getColumnCount() : 1,
14264
14261
  r.isArray() ? r.getColumnCount() : 1
14265
- ), o = O(n, s, e), u = O(n, s, t), c = O(n, s, r);
14266
- return o.map((l, f, h) => {
14267
- const d = u.get(f, h) || ue.create(), _ = c.get(f, h) || ue.create();
14268
- if (l.isError())
14269
- return l;
14270
- if (d.isError())
14271
- return d;
14262
+ ), o = O(n, s, e, g.create(m.NA)), u = O(n, s, t, g.create(m.NA)), c = O(n, s, r, g.create(m.NA)), l = o.map((f, h, d) => {
14263
+ const _ = u.get(h, d), C = c.get(h, d);
14264
+ if (f.isError())
14265
+ return f;
14272
14266
  if (_.isError())
14273
14267
  return _;
14274
- if (l.isString() || d.isString() || _.isString())
14275
- return g.create(m.VALUE);
14276
- let C = +l.getValue();
14277
- const E = Math.floor(+d.getValue()), b = +_.getValue();
14278
- if (C < 0 || C > 9999)
14268
+ if (C.isError())
14269
+ return C;
14270
+ const { isError: E, errorObject: b, variants: R } = B(f, _, C);
14271
+ if (E)
14272
+ return b;
14273
+ const [p, N, M] = R;
14274
+ let w = Math.floor(+p.getValue());
14275
+ const S = Math.floor(+N.getValue()), D = Math.floor(+M.getValue());
14276
+ if (w < 0 || w > 9999)
14279
14277
  return g.create(m.NUM);
14280
- C >= 0 && C < 1899 && (C += 1900);
14281
- const R = new Date(C, E - 1, b), p = Re(R);
14282
- return p < 0 ? g.create(m.NUM) : y.create(p, $a);
14278
+ w >= 0 && w < 1899 && (w += 1900);
14279
+ const L = new Date(w, S - 1, D), U = Re(L);
14280
+ return U < 0 ? g.create(m.NUM) : y.create(U, $a);
14283
14281
  });
14282
+ return n === 1 && s === 1 ? l.get(0, 0) : l;
14284
14283
  }
14285
14284
  }
14286
14285
  class ag extends V {
@@ -14483,7 +14482,7 @@ class lg extends V {
14483
14482
  t.isArray() ? t.getColumnCount() : 1
14484
14483
  ), s = O(r, n, e), o = O(r, n, t);
14485
14484
  return s.map((u, c, l) => {
14486
- const f = o.get(c, l) || ue.create();
14485
+ const f = o.get(c, l) || ce.create();
14487
14486
  if (u.isError())
14488
14487
  return u;
14489
14488
  if (f.isError())
@@ -14886,7 +14885,7 @@ class yg extends V {
14886
14885
  return o.map((l, f, h) => this._calculateTime(l, u, c, f, h));
14887
14886
  }
14888
14887
  _calculateTime(e, t, r, n, s) {
14889
- let o = e, u = t.get(n, s) || ue.create(), c = r.get(n, s) || ue.create();
14888
+ let o = e, u = t.get(n, s) || ce.create(), c = r.get(n, s) || ce.create();
14890
14889
  if ((o.isString() || o.isBoolean()) && (o = o.convertToNumberObjectValue()), (u.isString() || u.isBoolean()) && (u = u.convertToNumberObjectValue()), (c.isString() || c.isBoolean()) && (c = c.convertToNumberObjectValue()), o.isError())
14891
14890
  return o;
14892
14891
  if (u.isError())
@@ -15658,7 +15657,7 @@ P.prototype.cos = function() {
15658
15657
  const i = this.toNumber();
15659
15658
  return new P(Math.cos(i));
15660
15659
  };
15661
- let he = class ce {
15660
+ let he = class ue {
15662
15661
  constructor(a) {
15663
15662
  A(this, "_inumber", "");
15664
15663
  A(this, "_realNum", 0);
@@ -15687,8 +15686,8 @@ let he = class ce {
15687
15686
  return o;
15688
15687
  }
15689
15688
  static createByComplexStr(a, e, t) {
15690
- const r = ce.getComplex(a, e, t);
15691
- return new ce(r);
15689
+ const r = ue.getComplex(a, e, t);
15690
+ return new ue(r);
15692
15691
  }
15693
15692
  _getImReal() {
15694
15693
  if (this._inumber === 0 || this._inumber === "0") {
@@ -15754,7 +15753,7 @@ let he = class ce {
15754
15753
  return this._isError;
15755
15754
  }
15756
15755
  toString() {
15757
- return ce.getComplex(this._realNum, this._iNum, this._suffix);
15756
+ return ue.getComplex(this._realNum, this._iNum, this._suffix);
15758
15757
  }
15759
15758
  isDifferentSuffixes(a) {
15760
15759
  const e = a.getSuffix();
@@ -15769,15 +15768,15 @@ let he = class ce {
15769
15768
  return this._iNum < 0 && (e = -e), e;
15770
15769
  }
15771
15770
  Conjugate() {
15772
- return ce.getComplex(this._realNum, -this._iNum, this._suffix);
15771
+ return ue.getComplex(this._realNum, -this._iNum, this._suffix);
15773
15772
  }
15774
15773
  Cos() {
15775
15774
  if (this._iNum) {
15776
15775
  const a = P.cos(this._realNum).mul(P.cosh(this._iNum)).toNumber(), e = P.sin(this._realNum).mul(P.sinh(this._iNum)).negated().toNumber();
15777
- return ce.getComplex(a, e, this._suffix);
15776
+ return ue.getComplex(a, e, this._suffix);
15778
15777
  } else {
15779
15778
  const a = P.cos(this._realNum).toNumber();
15780
- return ce.getComplex(a, this._iNum, this._suffix);
15779
+ return ue.getComplex(a, this._iNum, this._suffix);
15781
15780
  }
15782
15781
  }
15783
15782
  Cosh() {
@@ -15785,19 +15784,19 @@ let he = class ce {
15785
15784
  return this._isError = !0, "";
15786
15785
  if (this._iNum) {
15787
15786
  const a = P.cosh(this._realNum).mul(P.cos(this._iNum)).toNumber(), e = P.sinh(this._realNum).mul(P.sin(this._iNum)).toNumber();
15788
- return ce.getComplex(a, e, this._suffix);
15787
+ return ue.getComplex(a, e, this._suffix);
15789
15788
  } else {
15790
15789
  const a = P.cosh(this._realNum).toNumber();
15791
- return ce.getComplex(a, this._iNum, this._suffix);
15790
+ return ue.getComplex(a, this._iNum, this._suffix);
15792
15791
  }
15793
15792
  }
15794
15793
  Cot() {
15795
15794
  if (this._iNum) {
15796
15795
  const a = P.cosh(this._iNum * 2).sub(P.cos(this._realNum * 2)), e = P.sin(this._realNum * 2).div(a).toNumber(), t = P.sinh(this._iNum * 2).div(a).negated().toNumber();
15797
- return ce.getComplex(e, t, this._suffix);
15796
+ return ue.getComplex(e, t, this._suffix);
15798
15797
  } else {
15799
15798
  const a = new P(1).div(P.tan(this._realNum)).toNumber();
15800
- return ce.getComplex(a, this._iNum, this._suffix);
15799
+ return ue.getComplex(a, this._iNum, this._suffix);
15801
15800
  }
15802
15801
  }
15803
15802
  Coth() {
@@ -15805,45 +15804,45 @@ let he = class ce {
15805
15804
  return this._isError = !0, "";
15806
15805
  if (this._iNum) {
15807
15806
  const a = P.cosh(this._realNum * 2).sub(P.cos(this._iNum * 2)), e = P.sinh(this._realNum * 2).div(a).toNumber(), t = P.sin(this._iNum * 2).div(a).negated().toNumber();
15808
- return ce.getComplex(e, t, this._suffix);
15807
+ return ue.getComplex(e, t, this._suffix);
15809
15808
  } else {
15810
15809
  const a = new P(1).div(P.tanh(this._realNum)).toNumber();
15811
- return ce.getComplex(a, this._iNum, this._suffix);
15810
+ return ue.getComplex(a, this._iNum, this._suffix);
15812
15811
  }
15813
15812
  }
15814
15813
  Csc() {
15815
15814
  if (this._iNum) {
15816
15815
  const a = P.cosh(this._iNum * 2).sub(P.cos(this._realNum * 2)), e = P.sin(this._realNum).mul(P.cosh(this._iNum)).mul(2).div(a).toNumber(), t = P.cos(this._realNum).mul(P.sinh(this._iNum)).mul(-2).div(a).toNumber();
15817
- return ce.getComplex(e, t, this._suffix);
15816
+ return ue.getComplex(e, t, this._suffix);
15818
15817
  } else {
15819
15818
  const a = new P(1).div(P.sin(this._realNum)).toNumber();
15820
- return ce.getComplex(a, this._iNum, this._suffix);
15819
+ return ue.getComplex(a, this._iNum, this._suffix);
15821
15820
  }
15822
15821
  }
15823
15822
  Csch() {
15824
15823
  if (!Number.isFinite(Math.sinh(this._realNum)) || !Number.isFinite(Math.cosh(this._realNum)))
15825
- return ce.getComplex(0, 0, this._suffix);
15824
+ return ue.getComplex(0, 0, this._suffix);
15826
15825
  if (this._iNum) {
15827
15826
  const a = P.cosh(this._realNum * 2).sub(P.cos(this._iNum * 2)), e = P.sinh(this._realNum).mul(P.cos(this._iNum)).mul(2).div(a).toNumber(), t = P.cosh(this._realNum).mul(P.sin(this._iNum)).mul(-2).div(a).toNumber();
15828
- return ce.getComplex(e, t, this._suffix);
15827
+ return ue.getComplex(e, t, this._suffix);
15829
15828
  } else {
15830
15829
  const a = new P(1).div(P.sinh(this._realNum)).toNumber();
15831
- return ce.getComplex(a, this._iNum, this._suffix);
15830
+ return ue.getComplex(a, this._iNum, this._suffix);
15832
15831
  }
15833
15832
  }
15834
15833
  Div(a) {
15835
15834
  const e = new P(this._realNum), t = new P(this._iNum), r = new P(a.getRealNum()), n = new P(a.getINum()), s = r.mul(r).add(n.mul(n)), o = e.mul(r).add(t.mul(n)).div(s).toNumber(), u = t.mul(r).sub(e.mul(n)).div(s).toNumber(), c = this._suffix === "" ? a.getSuffix() : this._suffix;
15836
- return ce.getComplex(o, u, c);
15835
+ return ue.getComplex(o, u, c);
15837
15836
  }
15838
15837
  Exp() {
15839
15838
  if (!Number.isFinite(Math.exp(this._realNum)))
15840
15839
  return this._isError = !0, "";
15841
15840
  const a = P.exp(this._realNum).mul(P.cos(this._iNum)).toNumber(), e = P.exp(this._realNum).mul(P.sin(this._iNum)).toNumber();
15842
- return ce.getComplex(a, e, this._suffix);
15841
+ return ue.getComplex(a, e, this._suffix);
15843
15842
  }
15844
15843
  Ln() {
15845
15844
  const a = P.sqrt(P.pow(this._realNum, 2).add(P.pow(this._iNum, 2))), e = P.ln(a).toNumber(), t = P.acos(new P(this._realNum).div(a)).toNumber();
15846
- return ce.getComplex(e, t, this._suffix);
15845
+ return ue.getComplex(e, t, this._suffix);
15847
15846
  }
15848
15847
  Log(a) {
15849
15848
  const e = P.sqrt(P.pow(this._realNum, 2).add(P.pow(this._iNum, 2))), t = P.ln(e);
@@ -15853,47 +15852,47 @@ let he = class ce {
15853
15852
  if (o.eq(0))
15854
15853
  return this._isError = !0, "";
15855
15854
  const u = t.mul(n).add(r.mul(s)).div(o).toNumber(), c = r.mul(n).sub(t.mul(s)).div(o).toNumber();
15856
- return ce.getComplex(u, c, this._suffix);
15855
+ return ue.getComplex(u, c, this._suffix);
15857
15856
  }
15858
15857
  Power(a) {
15859
15858
  if (this._realNum === 0 && this._iNum === 0)
15860
- return a > 0 ? ce.getComplex(this._realNum, this._iNum, this._suffix) : (this._isError = !0, "");
15859
+ return a > 0 ? ue.getComplex(this._realNum, this._iNum, this._suffix) : (this._isError = !0, "");
15861
15860
  let e = P.sqrt(P.pow(this._realNum, 2).add(P.pow(this._iNum, 2))), t = P.acos(new P(this._realNum).div(e));
15862
15861
  this._iNum < 0 && (t = t.negated()), e = P.pow(e, a), t = t.mul(a);
15863
15862
  const r = P.cos(t).mul(e).toNumber(), n = P.sin(t).mul(e).toNumber();
15864
- return !Number.isFinite(r) || !Number.isFinite(n) ? (this._isError = !0, "") : ce.getComplex(r, n, this._suffix);
15863
+ return !Number.isFinite(r) || !Number.isFinite(n) ? (this._isError = !0, "") : ue.getComplex(r, n, this._suffix);
15865
15864
  }
15866
15865
  Product(a) {
15867
15866
  const e = new P(this._realNum), t = new P(this._iNum), r = new P(a.getRealNum()), n = new P(a.getINum()), s = e.mul(r).sub(t.mul(n)).toNumber(), o = e.mul(n).add(t.mul(r)).toNumber(), u = this._suffix === "" ? a.getSuffix() : this._suffix;
15868
- return ce.getComplex(s, o, u);
15867
+ return ue.getComplex(s, o, u);
15869
15868
  }
15870
15869
  Sec() {
15871
15870
  if (this._iNum) {
15872
15871
  const a = P.cosh(this._iNum * 2).add(P.cos(this._realNum * 2)), e = P.cos(this._realNum).mul(P.cosh(this._iNum)).mul(2).div(a).toNumber(), t = P.sin(this._realNum).mul(P.sinh(this._iNum)).mul(2).div(a).toNumber();
15873
- return ce.getComplex(e, t, this._suffix);
15872
+ return ue.getComplex(e, t, this._suffix);
15874
15873
  } else {
15875
15874
  const a = new P(1).div(P.cos(this._realNum)).toNumber();
15876
- return ce.getComplex(a, this._iNum, this._suffix);
15875
+ return ue.getComplex(a, this._iNum, this._suffix);
15877
15876
  }
15878
15877
  }
15879
15878
  Sech() {
15880
15879
  if (!Number.isFinite(Math.sinh(this._realNum * 2)) || !Number.isFinite(Math.cosh(this._realNum * 2)))
15881
- return ce.getComplex(0, 0, this._suffix);
15880
+ return ue.getComplex(0, 0, this._suffix);
15882
15881
  if (this._iNum) {
15883
15882
  const a = P.cosh(this._realNum * 2).add(P.cos(this._iNum * 2)), e = P.cosh(this._realNum).mul(P.cos(this._iNum)).mul(2).div(a).toNumber(), t = P.sinh(this._realNum).mul(P.sin(this._iNum)).mul(-2).div(a).toNumber();
15884
- return ce.getComplex(e, t, this._suffix);
15883
+ return ue.getComplex(e, t, this._suffix);
15885
15884
  } else {
15886
15885
  const a = new P(1).div(P.cosh(this._realNum)).toNumber();
15887
- return ce.getComplex(a, this._iNum, this._suffix);
15886
+ return ue.getComplex(a, this._iNum, this._suffix);
15888
15887
  }
15889
15888
  }
15890
15889
  Sin() {
15891
15890
  if (this._iNum) {
15892
15891
  const a = P.sin(this._realNum).mul(P.cosh(this._iNum)).toNumber(), e = P.cos(this._realNum).mul(P.sinh(this._iNum)).toNumber();
15893
- return ce.getComplex(a, e, this._suffix);
15892
+ return ue.getComplex(a, e, this._suffix);
15894
15893
  } else {
15895
15894
  const a = P.sin(this._realNum).toNumber();
15896
- return ce.getComplex(a, this._iNum, this._suffix);
15895
+ return ue.getComplex(a, this._iNum, this._suffix);
15897
15896
  }
15898
15897
  }
15899
15898
  Sinh() {
@@ -15901,10 +15900,10 @@ let he = class ce {
15901
15900
  return this._isError = !0, "";
15902
15901
  if (this._iNum) {
15903
15902
  const a = P.sinh(this._realNum).mul(P.cos(this._iNum)).toNumber(), e = P.cosh(this._realNum).mul(P.sin(this._iNum)).toNumber();
15904
- return ce.getComplex(a, e, this._suffix);
15903
+ return ue.getComplex(a, e, this._suffix);
15905
15904
  } else {
15906
15905
  const a = P.sinh(this._realNum).toNumber();
15907
- return ce.getComplex(a, this._iNum, this._suffix);
15906
+ return ue.getComplex(a, this._iNum, this._suffix);
15908
15907
  }
15909
15908
  }
15910
15909
  Sqrt() {
@@ -15912,23 +15911,23 @@ let he = class ce {
15912
15911
  let t = P.acos(new P(this._realNum).div(a));
15913
15912
  this._iNum < 0 && (t = t.negated());
15914
15913
  const r = e.mul(P.cos(t.div(2).toNumber())).toNumber(), n = e.mul(P.sin(t.div(2))).toNumber();
15915
- return ce.getComplex(r, n, this._suffix);
15914
+ return ue.getComplex(r, n, this._suffix);
15916
15915
  }
15917
15916
  Sub(a) {
15918
15917
  const e = new P(this._realNum), t = new P(this._iNum), r = new P(a.getRealNum()), n = new P(a.getINum()), s = e.sub(r).toNumber(), o = t.sub(n).toNumber(), u = this._suffix === "" ? a.getSuffix() : this._suffix;
15919
- return ce.getComplex(s, o, u);
15918
+ return ue.getComplex(s, o, u);
15920
15919
  }
15921
15920
  Sum(a) {
15922
15921
  const e = new P(this._realNum), t = new P(this._iNum), r = new P(a.getRealNum()), n = new P(a.getINum()), s = e.add(r).toNumber(), o = t.add(n).toNumber(), u = this._suffix === "" ? a.getSuffix() : this._suffix;
15923
- return ce.getComplex(s, o, u);
15922
+ return ue.getComplex(s, o, u);
15924
15923
  }
15925
15924
  Tan() {
15926
15925
  if (this._iNum) {
15927
15926
  const a = P.cos(this._realNum * 2).add(P.cosh(this._iNum * 2)), e = P.sin(this._realNum * 2).div(a).toNumber(), t = P.sinh(this._iNum * 2).div(a).toNumber();
15928
- return ce.getComplex(e, t, this._suffix);
15927
+ return ue.getComplex(e, t, this._suffix);
15929
15928
  } else {
15930
15929
  const a = P.tan(this._realNum).toNumber();
15931
- return ce.getComplex(a, this._iNum, this._suffix);
15930
+ return ue.getComplex(a, this._iNum, this._suffix);
15932
15931
  }
15933
15932
  }
15934
15933
  Tanh() {
@@ -15936,10 +15935,10 @@ let he = class ce {
15936
15935
  return this._isError = !0, "";
15937
15936
  if (this._iNum) {
15938
15937
  const a = P.cosh(this._realNum * 2).add(P.cos(this._iNum * 2)), e = P.sinh(this._realNum * 2).div(a).toNumber(), t = P.sin(this._iNum * 2).div(a).toNumber();
15939
- return ce.getComplex(e, t, this._suffix);
15938
+ return ue.getComplex(e, t, this._suffix);
15940
15939
  } else {
15941
15940
  const a = P.tanh(this._realNum).toNumber();
15942
- return ce.getComplex(a, this._iNum, this._suffix);
15941
+ return ue.getComplex(a, this._iNum, this._suffix);
15943
15942
  }
15944
15943
  }
15945
15944
  };
@@ -17583,8 +17582,8 @@ class F1 extends V {
17583
17582
  const D = $(b);
17584
17583
  if (typeof D != "number")
17585
17584
  return D;
17586
- const L = +R.getValue(), U = +p.getValue(), x = Math.floor(+N.getValue()), F = Math.floor(+M.getValue()), Q = +f.getValue();
17587
- return Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(Q) ? g.create(m.VALUE) : L <= 0 || U <= 0 || ![1, 2, 4].includes(x) || F < 0 || F > 4 || Math.floor(w) >= Math.floor(D) ? g.create(m.NUM) : this._getResult(w, S, D, L, U, x, F, Q);
17585
+ const L = +R.getValue(), U = +p.getValue(), x = Math.floor(+N.getValue()), k = Math.floor(+M.getValue()), Q = +f.getValue();
17586
+ return Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(k) || Number.isNaN(Q) ? g.create(m.VALUE) : L <= 0 || U <= 0 || ![1, 2, 4].includes(x) || k < 0 || k > 4 || Math.floor(w) >= Math.floor(D) ? g.create(m.NUM) : this._getResult(w, S, D, L, U, x, k, Q);
17588
17587
  }
17589
17588
  _getResult(e, t, r, n, s, o, u, c) {
17590
17589
  let l = $t(e, t, o);
@@ -17907,7 +17906,7 @@ class Z1 extends V {
17907
17906
  const p = f.get(b, R), N = h.get(b, R), M = d.get(b, R), w = _.get(b, R), { isError: S, errorObject: D, variants: L } = B(E, p, N, M, w);
17908
17907
  if (S)
17909
17908
  return D;
17910
- const [U, x, F, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +F.getValue();
17909
+ const [U, x, k, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +k.getValue();
17911
17910
  let de = +Q.getValue();
17912
17911
  const Ee = Math.floor(+ne.getValue());
17913
17912
  return z < 0 || G < 0 || ge <= 0 || de <= 0 || Math.floor(de) > Math.floor(ge) || Ee < 1 || Ee > 12 ? g.create(m.NUM) : (de < 1 && (de = 1), de = Math.floor(de), this._getResult(z, G, ge, de, Ee, b, R));
@@ -17950,7 +17949,7 @@ class z1 extends V {
17950
17949
  const p = f.get(b, R), N = h.get(b, R), M = d.get(b, R), w = _.get(b, R), { isError: S, errorObject: D, variants: L } = B(E, p, N, M, w);
17951
17950
  if (S)
17952
17951
  return D;
17953
- const [U, x, F, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
17952
+ const [U, x, k, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
17954
17953
  if (z < 0 || G < 0 || ge <= 0 || de <= 0 || de > ge || Ee <= 0)
17955
17954
  return g.create(m.NUM);
17956
17955
  const pe = na(z, G, ge, de, Ee);
@@ -18104,7 +18103,7 @@ class s0 extends V {
18104
18103
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18105
18104
  if (D)
18106
18105
  return L;
18107
- const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue(), me = ar(G, ge, de, Ee, pe ? 1 : 0);
18106
+ const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue(), me = ar(G, ge, de, Ee, pe ? 1 : 0);
18108
18107
  return Number.isNaN(me) || !Number.isFinite(me) ? g.create(m.NUM) : R === 0 && p === 0 ? y.create(me, ze(this.getLocale())) : y.create(me);
18109
18108
  });
18110
18109
  return c === 1 && l === 1 ? E.get(0, 0) : E;
@@ -18194,9 +18193,9 @@ class o0 extends V {
18194
18193
  u.isArray() ? u.getColumnCount() : 1,
18195
18194
  c.isArray() ? c.getColumnCount() : 1
18196
18195
  ), h = O(l, f, e, g.create(m.NA)), d = O(l, f, t, g.create(m.NA)), _ = O(l, f, r, g.create(m.NA)), C = O(l, f, n, g.create(m.NA)), E = O(l, f, u, g.create(m.NA)), b = O(l, f, c, g.create(m.NA)), R = h.map((p, N, M) => {
18197
- const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: F, variants: Q } = B(p, w, S, D, L, U);
18196
+ const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: k, variants: Q } = B(p, w, S, D, L, U);
18198
18197
  if (x)
18199
- return F;
18198
+ return k;
18200
18199
  const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue(), Lt = +Ee.getValue();
18201
18200
  if (me < 1 || Math.floor(me) > Math.ceil(ve))
18202
18201
  return g.create(m.NUM);
@@ -18286,10 +18285,10 @@ class c0 extends V {
18286
18285
  const E = c.get(_, C), b = l.get(_, C), R = f.get(_, C), { isError: p, errorObject: N, variants: M } = B(d, E, b, R);
18287
18286
  if (p)
18288
18287
  return N;
18289
- const [w, S, D, L] = M, U = +w.getValue(), x = +S.getValue(), F = +D.getValue(), Q = +L.getValue();
18290
- if (F === 0)
18288
+ const [w, S, D, L] = M, U = +w.getValue(), x = +S.getValue(), k = +D.getValue(), Q = +L.getValue();
18289
+ if (k === 0)
18291
18290
  return g.create(m.DIV_BY_ZERO);
18292
- const ne = Q * U * (x / F - 1);
18291
+ const ne = Q * U * (x / k - 1);
18293
18292
  return y.create(ne);
18294
18293
  });
18295
18294
  return s === 1 && o === 1 ? h.get(0, 0) : h;
@@ -18454,7 +18453,7 @@ class m0 extends V {
18454
18453
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18455
18454
  if (D)
18456
18455
  return L;
18457
- const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
18456
+ const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
18458
18457
  let pe = +z.getValue();
18459
18458
  if (pe = pe ? 1 : 0, G === 0 && ge === 0)
18460
18459
  return g.create(m.DIV_BY_ZERO);
@@ -18558,12 +18557,12 @@ class d0 extends V {
18558
18557
  const x = $(R);
18559
18558
  if (typeof x != "number")
18560
18559
  return x;
18561
- const F = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18562
- if (Number.isNaN(F) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G))
18560
+ const k = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18561
+ if (Number.isNaN(k) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G))
18563
18562
  return g.create(m.VALUE);
18564
- if (F < 0 || Q < 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z))
18563
+ if (k < 0 || Q < 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z))
18565
18564
  return g.create(m.NUM);
18566
- const ge = Uu(D, L, U, x, F, Q, ne, z, G);
18565
+ const ge = Uu(D, L, U, x, k, Q, ne, z, G);
18567
18566
  return y.create(ge);
18568
18567
  }
18569
18568
  _validDate(e, t, r, n, s) {
@@ -18597,8 +18596,8 @@ class C0 extends V {
18597
18596
  const x = $(R);
18598
18597
  if (typeof x != "number")
18599
18598
  return x;
18600
- const F = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18601
- return Number.isNaN(F) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G) ? g.create(m.VALUE) : F < 0 || Q <= 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z) ? g.create(m.NUM) : this._getResult(D, L, U, x, F, Q, ne, z, G);
18599
+ const k = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18600
+ return Number.isNaN(k) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G) ? g.create(m.VALUE) : k < 0 || Q <= 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z) ? g.create(m.NUM) : this._getResult(D, L, U, x, k, Q, ne, z, G);
18602
18601
  }
18603
18602
  _validDate(e, t, r, n, s) {
18604
18603
  return this._getDateCorrectOrder(e, t, r, n) && vu(e, t, s) && Mr(n, e, s);
@@ -18636,12 +18635,12 @@ class _0 extends V {
18636
18635
  const D = $(E);
18637
18636
  if (typeof D != "number")
18638
18637
  return D;
18639
- const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), F = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
18640
- if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(Q))
18638
+ const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), k = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
18639
+ if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(k) || Number.isNaN(Q))
18641
18640
  return g.create(m.VALUE);
18642
- if (L < 0 || U < 0 || x <= 0 || ![1, 2, 4].includes(F) || Q < 0 || Q > 4 || !this._validDate(S, w, D, F))
18641
+ if (L < 0 || U < 0 || x <= 0 || ![1, 2, 4].includes(k) || Q < 0 || Q > 4 || !this._validDate(S, w, D, k))
18643
18642
  return g.create(m.NUM);
18644
- const ne = this._getResult(w, S, D, L, U, x, F, Q);
18643
+ const ne = this._getResult(w, S, D, L, U, x, k, Q);
18645
18644
  return y.create(ne);
18646
18645
  }
18647
18646
  _validDate(e, t, r, n) {
@@ -18699,12 +18698,12 @@ class A0 extends V {
18699
18698
  const D = $(E);
18700
18699
  if (typeof D != "number")
18701
18700
  return D;
18702
- const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), F = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
18703
- if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(Q))
18701
+ const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), k = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
18702
+ if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(k) || Number.isNaN(Q))
18704
18703
  return g.create(m.VALUE);
18705
- if (L < 0 || U <= 0 || x <= 0 || ![1, 2, 4].includes(F) || Q < 0 || Q > 4 || !this._validDate(S, w, D, F))
18704
+ if (L < 0 || U <= 0 || x <= 0 || ![1, 2, 4].includes(k) || Q < 0 || Q > 4 || !this._validDate(S, w, D, k))
18706
18705
  return g.create(m.NUM);
18707
- const ne = this._getResult(w, S, D, L, U, x, F, Q);
18706
+ const ne = this._getResult(w, S, D, L, U, x, k, Q);
18708
18707
  return y.create(ne);
18709
18708
  }
18710
18709
  _validDate(e, t, r, n) {
@@ -18793,7 +18792,7 @@ class b0 extends V {
18793
18792
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18794
18793
  if (D)
18795
18794
  return L;
18796
- const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue();
18795
+ const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue();
18797
18796
  if (G <= -1)
18798
18797
  return g.create(m.NUM);
18799
18798
  const me = qr(G, ge, de, Ee, pe ? 1 : 0);
@@ -18825,9 +18824,9 @@ class y0 extends V {
18825
18824
  u.isArray() ? u.getColumnCount() : 1,
18826
18825
  c.isArray() ? c.getColumnCount() : 1
18827
18826
  ), h = O(l, f, e, g.create(m.NA)), d = O(l, f, t, g.create(m.NA)), _ = O(l, f, r, g.create(m.NA)), C = O(l, f, n, g.create(m.NA)), E = O(l, f, u, g.create(m.NA)), b = O(l, f, c, g.create(m.NA)), R = h.map((p, N, M) => {
18828
- const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: F, variants: Q } = B(p, w, S, D, L, U);
18827
+ const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: k, variants: Q } = B(p, w, S, D, L, U);
18829
18828
  if (x)
18830
- return F;
18829
+ return k;
18831
18830
  const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue(), Lt = +Ee.getValue();
18832
18831
  if (me < 1 || Math.floor(me) > Math.ceil(ve) || me - ve >= 1)
18833
18832
  return g.create(m.NUM);
@@ -18918,7 +18917,7 @@ class V0 extends V {
18918
18917
  const D = this._getDateCorrectOrder(p, R, N);
18919
18918
  if (M < 0 || w < 0 || S < 0 || S > 4 || !D)
18920
18919
  return g.create(m.NUM);
18921
- const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: F } = _e(N, R, S), Q = (100 + x / L * M * 100) / (1 + U / L * w) - F / L * M * 100;
18920
+ const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: k } = _e(N, R, S), Q = (100 + x / L * M * 100) / (1 + U / L * w) - k / L * M * 100;
18922
18921
  return y.create(Q);
18923
18922
  }
18924
18923
  _getDateCorrectOrder(e, t, r) {
@@ -18949,7 +18948,7 @@ class N0 extends V {
18949
18948
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18950
18949
  if (D)
18951
18950
  return L;
18952
- const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
18951
+ const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
18953
18952
  let pe = +z.getValue();
18954
18953
  pe = pe ? 1 : 0;
18955
18954
  const me = G === 0 ? -de * ge - Ee : ((1 - (1 + G) ** ge) / G * de * (1 + G * pe) - Ee) / (1 + G) ** ge;
@@ -18980,8 +18979,8 @@ class O0 extends V {
18980
18979
  c.isArray() ? c.getColumnCount() : 1,
18981
18980
  l.isArray() ? l.getColumnCount() : 1
18982
18981
  ), d = O(f, h, e, g.create(m.NA)), _ = O(f, h, t, g.create(m.NA)), C = O(f, h, r, g.create(m.NA)), E = O(f, h, u, g.create(m.NA)), b = O(f, h, c, g.create(m.NA)), R = O(f, h, l, g.create(m.NA)), p = d.map((N, M, w) => {
18983
- const S = _.get(M, w), D = C.get(M, w), L = E.get(M, w), U = b.get(M, w), x = R.get(M, w), { isError: F, errorObject: Q, variants: ne } = B(N, S, D, L, U, x);
18984
- if (F)
18982
+ const S = _.get(M, w), D = C.get(M, w), L = E.get(M, w), U = b.get(M, w), x = R.get(M, w), { isError: k, errorObject: Q, variants: ne } = B(N, S, D, L, U, x);
18983
+ if (k)
18985
18984
  return Q;
18986
18985
  const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue();
18987
18986
  let Lt = +Ee.getValue();
@@ -19274,7 +19273,7 @@ class j0 extends V {
19274
19273
  const C = t.get(d, _), E = r.get(d, _), b = n.get(d, _), R = s.get(d, _), p = o.get(d, _), N = u.get(d, _), { isError: M, errorObject: w, variants: S } = B(h, C, E, b, R, p, N);
19275
19274
  if (M)
19276
19275
  return w;
19277
- const [D, L, U, x, F, Q, ne] = S, z = +D.getValue(), G = +L.getValue(), ge = +U.getValue(), de = +x.getValue(), Ee = +F.getValue(), pe = +Q.getValue(), me = +ne.getValue();
19276
+ const [D, L, U, x, k, Q, ne] = S, z = +D.getValue(), G = +L.getValue(), ge = +U.getValue(), de = +x.getValue(), Ee = +k.getValue(), pe = +Q.getValue(), me = +ne.getValue();
19278
19277
  if (z < 0 || G < 0 || ge < 0 || de < 0 || Ee < 0 || Ee > ge || de > Ee || pe < 0)
19279
19278
  return g.create(m.NUM);
19280
19279
  if (ge === 0 && de === 0 && Ee === 0)
@@ -19695,7 +19694,7 @@ class I0 extends V {
19695
19694
  const D = this._getDateCorrectOrder(p, R, N);
19696
19695
  if (M < 0 || w <= 0 || S < 0 || S > 4 || !D)
19697
19696
  return g.create(m.NUM);
19698
- const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: F } = _e(N, R, S), Q = ((1 + x / L * M) / (w / 100 + F / L * M) - 1) / (U / L);
19697
+ const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: k } = _e(N, R, S), Q = ((1 + x / L * M) / (w / 100 + k / L * M) - 1) / (U / L);
19699
19698
  return y.create(Q);
19700
19699
  }
19701
19700
  _getDateCorrectOrder(e, t, r) {
@@ -20497,7 +20496,7 @@ class Ad extends V {
20497
20496
  (o) => O(t, r, o, g.create(m.NA))
20498
20497
  ), s = n[0].map((o, u, c) => {
20499
20498
  for (let l = 0; l < n.length; l += 2) {
20500
- const f = n[l].get(u, c) || ue.create(), h = n[l + 1].get(u, c) || ue.create();
20499
+ const f = n[l].get(u, c) || ce.create(), h = n[l + 1].get(u, c) || ce.create();
20501
20500
  if (f.isNull())
20502
20501
  continue;
20503
20502
  if (f.isError())
@@ -20819,7 +20818,7 @@ class Md extends V {
20819
20818
  calculate(e, ...t) {
20820
20819
  if (e.isError())
20821
20820
  return e;
20822
- const r = t.length % 2 !== 0, n = r ? t[t.length - 1] : ue.create();
20821
+ const r = t.length % 2 !== 0, n = r ? t[t.length - 1] : ce.create();
20823
20822
  return !e.isArray() && !t.some((s) => s.isArray()) ? this._handleNonArrayInputs(e, t, n, r) : this._handleArrayInputs(e, t, n, r);
20824
20823
  }
20825
20824
  _handleNonArrayInputs(e, t, r, n) {
@@ -20848,7 +20847,7 @@ class Md extends V {
20848
20847
  ), l = O(s, o, r, g.create(m.NA));
20849
20848
  return u.map((f, h, d) => {
20850
20849
  for (let C = 0; C < c.length - (n ? 1 : 0); C += 2) {
20851
- const E = c[C].get(h, d) || ue.create(), b = c[C + 1].get(h, d) || ue.create();
20850
+ const E = c[C].get(h, d) || ce.create(), b = c[C + 1].get(h, d) || ce.create();
20852
20851
  if (!E.isNull()) {
20853
20852
  if (E.isError() || f.isError())
20854
20853
  return E.isError() ? E : f;
@@ -20856,7 +20855,7 @@ class Md extends V {
20856
20855
  return b.isNull() ? g.create(m.NA) : b;
20857
20856
  }
20858
20857
  }
20859
- const _ = l.get(h, d) || ue.create();
20858
+ const _ = l.get(h, d) || ce.create();
20860
20859
  return _.isNull() ? g.create(m.NA) : _;
20861
20860
  });
20862
20861
  }
@@ -22844,7 +22843,7 @@ class fC extends V {
22844
22843
  const u = Is(n), c = Bs(r);
22845
22844
  o = s.binarySearch(e, u, c);
22846
22845
  } else if (r === 2) {
22847
- const u = s.compare(e, k.EQUALS);
22846
+ const u = s.compare(e, F.EQUALS);
22848
22847
  let c;
22849
22848
  if (n !== -1 ? c = u.getFirstTruePosition() : c = u.getLastTruePosition(), c == null)
22850
22849
  return g.create(m.NA);
@@ -25082,7 +25081,7 @@ class x_ extends V {
25082
25081
  return this._calculateSingleCell(e, t);
25083
25082
  {
25084
25083
  const l = e.flatten(), f = t.flatten();
25085
- let h = ue.create();
25084
+ let h = ce.create();
25086
25085
  const d = [], _ = [];
25087
25086
  let C = 0;
25088
25087
  return l.iterator((E, b, R) => {
@@ -25134,7 +25133,7 @@ class j_ extends V {
25134
25133
  return this._calculateSingleCell(e, t);
25135
25134
  {
25136
25135
  const l = e.flatten(), f = t.flatten();
25137
- let h = ue.create();
25136
+ let h = ce.create();
25138
25137
  const d = [], _ = [];
25139
25138
  let C = 0;
25140
25139
  return l.iterator((E, b, R) => {
@@ -25186,7 +25185,7 @@ class U_ extends V {
25186
25185
  return this._calculateSingleCell(e, t);
25187
25186
  {
25188
25187
  const l = e.flatten(), f = t.flatten();
25189
- let h = ue.create();
25188
+ let h = ce.create();
25190
25189
  const d = [], _ = [];
25191
25190
  let C = 0;
25192
25191
  return l.iterator((E, b, R) => {
@@ -25354,7 +25353,7 @@ class F_ extends V {
25354
25353
  super(...arguments);
25355
25354
  A(this, "minParams", 2);
25356
25355
  A(this, "maxParams", 2);
25357
- A(this, "_compareType", k.EQUALS);
25356
+ A(this, "_compareType", F.EQUALS);
25358
25357
  }
25359
25358
  setCompareType(e) {
25360
25359
  this._compareType = e;
@@ -26170,9 +26169,9 @@ class mA extends V {
26170
26169
  if (e.isError())
26171
26170
  return e;
26172
26171
  if (e.isNull() || e.isBoolean())
26173
- return ue.create();
26172
+ return ce.create();
26174
26173
  const t = e.getValue();
26175
- return W(t) ? y.create(+t) : ue.create();
26174
+ return W(t) ? y.create(+t) : ce.create();
26176
26175
  }
26177
26176
  }
26178
26177
  class gA extends V {
@@ -26812,20 +26811,20 @@ class wA extends V {
26812
26811
  const { coefficients: o, X: u, XTXInverse: c } = s;
26813
26812
  let l = [];
26814
26813
  if (n) {
26815
- const f = e.flat(), h = f.length, d = r ? f.reduce((x, F) => x + F, 0) / h : 0, _ = c.length, C = h - _, E = o[0].length, b = new Array(E - 2).fill(m.NA), R = o[0][E - 1], p = [];
26814
+ const f = e.flat(), h = f.length, d = r ? f.reduce((x, k) => x + k, 0) / h : 0, _ = c.length, C = h - _, E = o[0].length, b = new Array(E - 2).fill(m.NA), R = o[0][E - 1], p = [];
26816
26815
  for (let x = 0; x < u.length; x++) {
26817
- let F = R;
26816
+ let k = R;
26818
26817
  for (let Q = E - 2; Q >= 0; Q--)
26819
- F += o[0][E - 2 - Q] * u[x][Q];
26820
- p.push(F);
26818
+ k += o[0][E - 2 - Q] * u[x][Q];
26819
+ p.push(k);
26821
26820
  }
26822
26821
  let N = 0, M = 0;
26823
26822
  for (let x = 0; x < h; x++)
26824
26823
  N += (f[x] - d) ** 2, M += (f[x] - p[x]) ** 2;
26825
26824
  const w = N - M, S = N === 0 ? 0 : w / N, D = [];
26826
26825
  for (let x = _ - 1; x >= 0; x--) {
26827
- const F = C > 0 ? Math.sqrt(M / C * c[x][x]) : 0;
26828
- D.push(F);
26826
+ const k = C > 0 ? Math.sqrt(M / C * c[x][x]) : 0;
26827
+ D.push(k);
26829
26828
  }
26830
26829
  if (r) {
26831
26830
  const x = D.shift();
@@ -26933,25 +26932,25 @@ class SA extends V {
26933
26932
  const { coefficients: o, Y: u, X: c, XTXInverse: l } = s;
26934
26933
  let f = [];
26935
26934
  if (n) {
26936
- const h = u.flat(), d = h.length, _ = r ? h.reduce((F, Q) => F + Q, 0) / d : 0, C = l.length, E = d - C, b = o[0].length, R = new Array(b - 2).fill(m.NA), p = o[0][b - 1], N = [];
26937
- for (let F = 0; F < c.length; F++) {
26935
+ const h = u.flat(), d = h.length, _ = r ? h.reduce((k, Q) => k + Q, 0) / d : 0, C = l.length, E = d - C, b = o[0].length, R = new Array(b - 2).fill(m.NA), p = o[0][b - 1], N = [];
26936
+ for (let k = 0; k < c.length; k++) {
26938
26937
  let Q = p;
26939
26938
  for (let ne = b - 2; ne >= 0; ne--)
26940
- Q *= o[0][b - 2 - ne] ** c[F][ne];
26939
+ Q *= o[0][b - 2 - ne] ** c[k][ne];
26941
26940
  N.push(Math.log(Q));
26942
26941
  }
26943
26942
  let M = 0, w = 0;
26944
- for (let F = 0; F < d; F++)
26945
- M += (h[F] - _) ** 2, !(!r && !Number.isFinite(N[F])) && (w += (h[F] - N[F]) ** 2);
26943
+ for (let k = 0; k < d; k++)
26944
+ M += (h[k] - _) ** 2, !(!r && !Number.isFinite(N[k])) && (w += (h[k] - N[k]) ** 2);
26946
26945
  Number.isFinite(w) || (w = 0);
26947
26946
  const S = M - w, D = M === 0 ? 0 : S / M, L = [];
26948
- for (let F = C - 1; F >= 0; F--) {
26949
- const Q = E > 0 ? Math.sqrt(w / E * l[F][F]) : 0;
26947
+ for (let k = C - 1; k >= 0; k--) {
26948
+ const Q = E > 0 ? Math.sqrt(w / E * l[k][k]) : 0;
26950
26949
  L.push(Q);
26951
26950
  }
26952
26951
  if (r) {
26953
- const F = L.shift();
26954
- L.push(F);
26952
+ const k = L.shift();
26953
+ L.push(k);
26955
26954
  } else
26956
26955
  L.push(m.NA);
26957
26956
  const U = E > 0 ? Math.sqrt(w / E) : 0, x = E > 0 ? S / (b - 1) / (w / E) : m.NUM;
@@ -28946,7 +28945,7 @@ class ME extends V {
28946
28945
  ), n = Math.max(
28947
28946
  e.isArray() ? e.getColumnCount() : 1,
28948
28947
  t.isArray() ? t.getColumnCount() : 1
28949
- ), s = O(r, n, e, ue.create()), o = O(r, n, t, ue.create()), u = s.mapValue((c, l, f) => {
28948
+ ), s = O(r, n, e, ce.create()), o = O(r, n, t, ce.create()), u = s.mapValue((c, l, f) => {
28950
28949
  const h = o.get(l, f);
28951
28950
  return c.isError() ? c : h.isError() ? h : this._handleSingleObject(c, h);
28952
28951
  });
@@ -29161,7 +29160,7 @@ class xE extends V {
29161
29160
  ), s = Math.max(
29162
29161
  e.isArray() ? e.getColumnCount() : 1,
29163
29162
  r.isArray() ? r.getColumnCount() : 1
29164
- ), o = O(n, s, e, ue.create()), u = O(n, s, r, ue.create()), c = o.mapValue((l, f, h) => {
29163
+ ), o = O(n, s, e, ce.create()), u = O(n, s, r, ce.create()), c = o.mapValue((l, f, h) => {
29165
29164
  const d = u.get(f, h);
29166
29165
  return l.isError() ? l : d.isError() ? d : this._handleSingleObject(l, d);
29167
29166
  });
@@ -30578,7 +30577,7 @@ class mb extends V {
30578
30577
  return r;
30579
30578
  const [u] = o, c = +u.getValue();
30580
30579
  let l = r;
30581
- c && (l = r.filter((h) => h !== null));
30580
+ c && (l = r.filter((h) => h !== null && h !== ""));
30582
30581
  let f = "";
30583
30582
  for (let h = 0; h < l.length; h++)
30584
30583
  l[h] !== null && (f += l[h]), h < l.length - 1 && (f += e[h % e.length]);
@@ -31545,7 +31544,7 @@ export {
31545
31544
  Ar as Lexer,
31546
31545
  ae as LexerNode,
31547
31546
  ga as LexerTreeBuilder,
31548
- ue as NullValueObject,
31547
+ ce as NullValueObject,
31549
31548
  y as NumberValueObject,
31550
31549
  wn as OperatorNodeFactory,
31551
31550
  Ih as OtherFormulaManagerService,
@@ -31577,7 +31576,7 @@ export {
31577
31576
  Wi as UniverFormulaEnginePlugin,
31578
31577
  Io as ValueNodeFactory,
31579
31578
  Mt as ValueObjectFactory,
31580
- k as compareToken,
31579
+ F as compareToken,
31581
31580
  Ic as convertUnitDataToRuntime,
31582
31581
  Wh as deserializeRangeForR1C1,
31583
31582
  Dr as deserializeRangeWithSheet,
@@ -31618,8 +31617,10 @@ export {
31618
31617
  Wc as isReferenceStrings,
31619
31618
  Xb as matchRefDrawToken,
31620
31619
  K as matchToken,
31620
+ Ds as needsQuoting,
31621
31621
  Kb as normalizeSheetName,
31622
31622
  X as operatorToken,
31623
+ Ls as quoteSheetName,
31623
31624
  $e as sequenceNodeType,
31624
31625
  Ft as serializeRange,
31625
31626
  Ss as serializeRangeToRefString,
@@ -31627,5 +31628,6 @@ export {
31627
31628
  Gc as serializeRangeWithSpreadsheet,
31628
31629
  fs as singleReferenceToGrid,
31629
31630
  yi as strip,
31630
- ba as stripErrorMargin
31631
+ ba as stripErrorMargin,
31632
+ ui as unquoteSheetName
31631
31633
  };