@sheetxl/formulas-extended 0.7.28-beta.3 → 0.8.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/browser/cjs/index.cjs +1 -1
  2. package/{node/esm/C1Of99Li1xuXVvHC.mjs → browser/esm/B1VmvhXuEn7zaTB9.mjs} +1 -1
  3. package/browser/esm/{Lw7SD9UV2xQaHBMY.mjs → BFnDPCjxJcoIItFa.mjs} +1 -1
  4. package/{node/esm/Cmx9jVLihcV7UU9j.mjs → browser/esm/BRwwvGaJ6HvkxjFC.mjs} +1 -1
  5. package/browser/esm/{CzzpVN7fGDVLTBAQ.mjs → Bma3CN4_Nec6_4n7.mjs} +1 -1
  6. package/{node/esm/C8ez6oBw4sdDzSct.mjs → browser/esm/BuGemmv84T8m0wqw.mjs} +1 -1
  7. package/{node/esm/DN1_rspUH-tOwmED.mjs → browser/esm/COqdI1LYTHd9oLA6.mjs} +1 -1
  8. package/browser/esm/{v_larpTXJns5MbG8.mjs → CnVJ8GAsshRjRGA-.mjs} +1 -1
  9. package/browser/esm/{CLQ1_t-YsFFTRbw1.mjs → CwoMEzOtRihuYUTr.mjs} +1 -1
  10. package/browser/esm/{CEzXDdvqDDZbH1WV.mjs → DY3kG36QGyDbrANO.mjs} +1 -1
  11. package/browser/esm/{BXjhl9UdRwdpTLAB.mjs → DodhOXkSzelSxHmB.mjs} +1 -1
  12. package/browser/esm/{D-wUpQDKX_k0SiSj.mjs → DpoZ7h1ScIJvbOY9.mjs} +1 -1
  13. package/browser/esm/{CYm12WYrfdzPk8cm.mjs → Dy6UD7hQRBsT0WNp.mjs} +1 -1
  14. package/browser/esm/index.mjs +524 -391
  15. package/browser/esm/{DEQPjlaWWG7gXPtm.mjs → srpVt74r2zbvm1N0.mjs} +1 -1
  16. package/{node/esm/CVd2CtlxuMv1IuIq.mjs → browser/esm/vu0NRDeeTbEHPMYS.mjs} +1 -1
  17. package/{browser/esm/C1Of99Li1xuXVvHC.mjs → node/esm/B1VmvhXuEn7zaTB9.mjs} +1 -1
  18. package/node/esm/{BfPVZqcuHtLRxqLI.mjs → BQyZVLTMNFLbjVap.mjs} +1 -1
  19. package/{browser/esm/Cmx9jVLihcV7UU9j.mjs → node/esm/BRwwvGaJ6HvkxjFC.mjs} +1 -1
  20. package/node/esm/{CzzpVN7fGDVLTBAQ.mjs → Bma3CN4_Nec6_4n7.mjs} +1 -1
  21. package/{browser/esm/C8ez6oBw4sdDzSct.mjs → node/esm/BuGemmv84T8m0wqw.mjs} +1 -1
  22. package/{browser/esm/DN1_rspUH-tOwmED.mjs → node/esm/COqdI1LYTHd9oLA6.mjs} +1 -1
  23. package/node/esm/{v_larpTXJns5MbG8.mjs → CnVJ8GAsshRjRGA-.mjs} +1 -1
  24. package/node/esm/{CLQ1_t-YsFFTRbw1.mjs → CwoMEzOtRihuYUTr.mjs} +1 -1
  25. package/node/esm/{BXjhl9UdRwdpTLAB.mjs → DodhOXkSzelSxHmB.mjs} +1 -1
  26. package/node/esm/{D-wUpQDKX_k0SiSj.mjs → DpoZ7h1ScIJvbOY9.mjs} +1 -1
  27. package/node/esm/{CYm12WYrfdzPk8cm.mjs → Dy6UD7hQRBsT0WNp.mjs} +1 -1
  28. package/node/esm/{CVifmXw-tD8LimNW.mjs → LAkTk93odAfpvx50.mjs} +1 -1
  29. package/node/esm/index.mjs +891 -755
  30. package/node/esm/{DEQPjlaWWG7gXPtm.mjs → srpVt74r2zbvm1N0.mjs} +1 -1
  31. package/{browser/esm/CVd2CtlxuMv1IuIq.mjs → node/esm/vu0NRDeeTbEHPMYS.mjs} +1 -1
  32. package/package.json +3 -3
  33. package/types/src/_utils/Consts.d.ts +2 -2
  34. package/types/src/_utils/FinanceUtils.d.ts +17 -0
  35. package/types/src/financial/Financial.d.ts +12 -11
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.7.28-beta.3
2
+ * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.1
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -14,8 +14,8 @@ var a = Object.defineProperty, o = (t, n) => {
14
14
  return n || a(e, Symbol.toStringTag, { value: "Module" }), e;
15
15
  }, s = o({
16
16
  CUBEKPIMEMBER: () => i,
17
- CUBEMEMBER: () => l,
18
- CUBEMEMBERPROPERTY: () => u,
17
+ CUBEMEMBER: () => u,
18
+ CUBEMEMBERPROPERTY: () => l,
19
19
  CUBERANKEDMEMBER: () => f,
20
20
  CUBESET: () => c,
21
21
  CUBESETCOUNT: () => m,
@@ -24,10 +24,10 @@ var a = Object.defineProperty, o = (t, n) => {
24
24
  function i(t, e, r, a) {
25
25
  throw n.BuiltIn.NA;
26
26
  }
27
- function l(t, e, r) {
27
+ function u(t, e, r) {
28
28
  throw n.BuiltIn.NA;
29
29
  }
30
- function u(t, e, r) {
30
+ function l(t, e, r) {
31
31
  throw n.BuiltIn.NA;
32
32
  }
33
33
  function f(t, e, r, a) {
@@ -69,37 +69,37 @@ var M = [
69
69
  30,
70
70
  31
71
71
  ];
72
- function D(t) {
72
+ function N(t) {
73
73
  return t % 4 == 0 && t % 100 != 0 || t % 400 == 0;
74
74
  }
75
- function d(t, n) {
76
- return D(t) ? M[n] : p[n];
75
+ function D(t, n) {
76
+ return N(t) ? M[n] : p[n];
77
77
  }
78
78
  function g(t, n, e) {
79
- return d(t, n) === e;
79
+ return D(t, n) === e;
80
80
  }
81
- function N(t, n) {
81
+ function d(t, n) {
82
82
  return Math.trunc(t) - Math.trunc(n);
83
83
  }
84
- function y(n, e) {
84
+ function b(n, e) {
85
85
  const r = t.fromSerialDate(n, !0), a = t.fromSerialDate(e, !0), o = a.getFullYear() - r.getFullYear();
86
86
  if (o > 1) return !0;
87
87
  if (o < 1) return !1;
88
88
  const s = a.getMonth() - r.getMonth();
89
89
  return s > 0 || !(s < 0) && a.getDate() > r.getDate();
90
90
  }
91
- function b(t, n) {
91
+ function y(t, n) {
92
92
  if (g(t.getFullYear(), t.getMonth(), t.getDate())) {
93
93
  t.setDate(1), t.setMonth(t.getMonth() + n);
94
94
  const e = t.getFullYear(), r = t.getMonth();
95
- t.setDate(d(e, r));
95
+ t.setDate(D(e, r));
96
96
  } else t.setMonth(t.getMonth() + n);
97
97
  return t;
98
98
  }
99
- function E(t) {
99
+ function v(t) {
100
100
  return !(t < 0 || t > 4);
101
101
  }
102
- function v(n) {
102
+ function E(n) {
103
103
  return t.getDateParts(Math.max(0, Math.floor(n)));
104
104
  }
105
105
  function R(t, n, e, r, a, o) {
@@ -108,12 +108,12 @@ function R(t, n, e, r, a, o) {
108
108
  function I(n, e, r) {
109
109
  switch (r) {
110
110
  case 0: return function(t, n) {
111
- const e = v(t), r = v(n), a = e.year, o = e.month;
112
- let s = e.day, i = r.year, l = r.month, u = r.day, f = !1;
113
- 2 === o ? s === (D(a) ? 29 : 28) && (s = 30, f = !0) : 31 === s && (s = 30);
114
- 31 !== u || f || (s < 30 ? (12 === l ? (i += 1, l = 1) : l += 1, u = 1) : u = 30);
111
+ const e = E(t), r = E(n), a = e.year, o = e.month;
112
+ let s = e.day, i = r.year, u = r.month, l = r.day, f = !1;
113
+ 2 === o ? s === (N(a) ? 29 : 28) && (s = 30, f = !0) : 31 === s && (s = 30);
114
+ 31 !== l || f || (s < 30 ? (12 === u ? (i += 1, u = 1) : u += 1, l = 1) : l = 30);
115
115
  return {
116
- days: Math.abs(R(a, o, s, i, l, u)),
116
+ days: Math.abs(R(a, o, s, i, u, l)),
117
117
  yearDays: 360
118
118
  };
119
119
  }(n, e);
@@ -122,16 +122,16 @@ function I(n, e, r) {
122
122
  days: 0,
123
123
  yearDays: 365
124
124
  };
125
- const r = v(n), a = v(e), o = r.year, s = a.year, i = Math.abs(e - n), l = Math.abs(s - o), u = l + 1, f = s < o ? s : o, c = s < o ? o : s;
125
+ const r = E(n), a = E(e), o = r.year, s = a.year, i = Math.abs(e - n), u = Math.abs(s - o), l = u + 1, f = s < o ? s : o, c = s < o ? o : s;
126
126
  let m, h = t.getSerialDate(f, 1, 1);
127
127
  1900 === f && (h += 1);
128
- if (0 === l) m = t.getSerialDate(f, 12, 31) - h + 1;
129
- else if (1 === l) {
130
- const r = Math.min(n, e), a = Math.max(n, e), o = v(r), s = v(a), i = s.month - o.month;
131
- if (i > 0 || 0 === i && s.day > o.day) m = (t.getSerialDate(c + 1, 1, 1) - h) / u;
128
+ if (0 === u) m = t.getSerialDate(f, 12, 31) - h + 1;
129
+ else if (1 === u) {
130
+ const r = Math.min(n, e), a = Math.max(n, e), o = E(r), s = E(a), i = s.month - o.month;
131
+ if (i > 0 || 0 === i && s.day > o.day) m = (t.getSerialDate(c + 1, 1, 1) - h) / l;
132
132
  else {
133
133
  m = 365;
134
- for (const n of [f, c]) if (D(n)) {
134
+ for (const n of [f, c]) if (N(n)) {
135
135
  const e = t.getSerialDate(n, 2, 29);
136
136
  if (e >= r && e <= a) {
137
137
  m = 366;
@@ -139,7 +139,7 @@ function I(n, e, r) {
139
139
  }
140
140
  }
141
141
  }
142
- } else m = (t.getSerialDate(c + 1, 1, 1) - h) / u;
142
+ } else m = (t.getSerialDate(c + 1, 1, 1) - h) / l;
143
143
  return {
144
144
  days: i,
145
145
  yearDays: m
@@ -155,7 +155,7 @@ function I(n, e, r) {
155
155
  yearDays: 365
156
156
  };
157
157
  case 4: return function(t, n) {
158
- const e = v(t), r = v(n);
158
+ const e = E(t), r = E(n);
159
159
  let a = e.day, o = r.day;
160
160
  31 === a && (a = 30);
161
161
  31 === o && (o = 30);
@@ -174,27 +174,27 @@ function C(t, n) {
174
174
  const e = t.getMonth(), r = t.getDate();
175
175
  return r === new Date(t.getFullYear(), e + 1, 0).getDate() ? new Date(n, e + 1, 0) : new Date(n, e, r);
176
176
  }
177
- function T(n, e, r) {
177
+ function x(n, e, r) {
178
178
  const a = t.fromSerialDate(n, !0);
179
179
  let o = t.fromSerialDate(e, !0);
180
180
  const s = 12 / r;
181
- for (o = C(o, a.getFullYear()), o > a && (o = C(o, o.getFullYear() - 1)); o <= a;) o = b(o, s);
182
- return o = b(o, -s), o;
181
+ for (o = C(o, a.getFullYear()), o > a && (o = C(o, o.getFullYear() - 1)); o <= a;) o = y(o, s);
182
+ return o = y(o, -s), o;
183
183
  }
184
- function A(n, e, r) {
185
- return t.toSerialDate(T(n, e, r), !0);
184
+ function T(n, e, r) {
185
+ return t.toSerialDate(x(n, e, r), !0);
186
186
  }
187
- function w(n, e, r) {
188
- const a = b(T(n, e, r), 12 / r);
187
+ function A(n, e, r) {
188
+ const a = y(x(n, e, r), 12 / r);
189
189
  return t.toSerialDate(a, !0);
190
190
  }
191
- function x(t, n, e, r) {
192
- return S(A(t, n, e), t, r);
191
+ function w(t, n, e, r) {
192
+ return S(T(t, n, e), t, r);
193
193
  }
194
194
  function V(n, e, r, a) {
195
195
  if (3 === a) return 365 / r;
196
196
  if (1 !== a) return 360 / r;
197
- const o = A(n, e, r), s = b(t.fromSerialDate(o, !0), 12 / r), i = t.toSerialDate(s, !0);
197
+ const o = T(n, e, r), s = y(t.fromSerialDate(o, !0), 12 / r), i = t.toSerialDate(s, !0);
198
198
  return o < 0 && 1 === r ? 365 : i - o;
199
199
  }
200
200
  function B(n, e, r) {
@@ -202,80 +202,80 @@ function B(n, e, r) {
202
202
  let o = t.fromSerialDate(e, !0);
203
203
  const s = 12 / r;
204
204
  let i = 0;
205
- for (; o > a;) o = b(o, -s), i++;
205
+ for (; o > a;) o = y(o, -s), i++;
206
206
  return i;
207
207
  }
208
- function O(n, e, r) {
208
+ function F(n, e, r) {
209
209
  let a = t.fromSerialDate(n, !0);
210
- if (a = b(a, e), r) {
210
+ if (a = y(a, e), r) {
211
211
  const t = a.getFullYear(), n = a.getMonth();
212
- a.setDate(d(t, n));
212
+ a.setDate(D(t, n));
213
213
  }
214
214
  return t.toSerialDate(a, !0);
215
215
  }
216
- function P(n, e, r, a, o, s, i, l, u) {
217
- const f = S(r, a, u), c = V(n, a, l, u);
218
- return f < c ? function(t, n, e, r, a, o, s, i, l, u, f) {
219
- const c = B(t, n, i), m = S(t, r, l), h = S(e, t, l), M = o / i, p = 100 * a / i, D = p * u / f;
220
- let d = s / (1 + M) ** (c - 1 + m / f);
221
- d += D / (1 + M) ** (m / f);
222
- for (let t = 2; t <= c; t++) d += p / (1 + M) ** (t - 1 + m / f);
223
- return d -= p * h / f, d;
224
- }(n, e, r, a, o, s, i, l, u, f, c) : function(n, e, r, a, o, s, i, l, u, f) {
225
- const c = B(a, e, l), m = function(n, e, r, a) {
226
- const o = t.fromSerialDate(n, !0), s = t.fromSerialDate(e, !0), i = o.getFullYear(), l = o.getMonth(), u = o.getDate(), f = s.getFullYear(), c = s.getMonth(), m = s.getDate(), h = g(i, l, u) || 1 !== l && u > 28 && u < d(i, l) && g(f, c, m), M = O(e, 0, h);
227
- let p = (a ? 1 : 0) + (e < M ? 1 : 0), D = O(M, r, h);
228
- for (; r > 0 ? D < e : D > e;) D = O(D, r, h), p++;
216
+ function O(n, e, r, a, o, s, i, u, l) {
217
+ const f = S(r, a, l), c = V(n, a, u, l);
218
+ return f < c ? function(t, n, e, r, a, o, s, i, u, l, f) {
219
+ const c = B(t, n, i), m = S(t, r, u), h = S(e, t, u), M = o / i, p = 100 * a / i, N = p * l / f;
220
+ let D = s / (1 + M) ** (c - 1 + m / f);
221
+ D += N / (1 + M) ** (m / f);
222
+ for (let t = 2; t <= c; t++) D += p / (1 + M) ** (t - 1 + m / f);
223
+ return D -= p * h / f, D;
224
+ }(n, e, r, a, o, s, i, u, l, f, c) : function(n, e, r, a, o, s, i, u, l, f) {
225
+ const c = B(a, e, u), m = function(n, e, r, a) {
226
+ const o = t.fromSerialDate(n, !0), s = t.fromSerialDate(e, !0), i = o.getFullYear(), u = o.getMonth(), l = o.getDate(), f = s.getFullYear(), c = s.getMonth(), m = s.getDate(), h = g(i, u, l) || 1 !== u && l > 28 && l < D(i, u) && g(f, c, m), M = F(e, 0, h);
227
+ let p = (a ? 1 : 0) + (e < M ? 1 : 0), N = F(M, r, h);
228
+ for (; r > 0 ? N < e : N > e;) N = F(N, r, h), p++;
229
229
  return p;
230
- }(a, n, 12 / l, !0);
230
+ }(a, n, 12 / u, !0);
231
231
  let h;
232
- h = 2 === u || 3 === u ? S(n, w(n, a, l), u) : f - S(A(n, a, l), n, u);
233
- const M = s / l, p = 100 * o / l;
234
- let D = i / (1 + M) ** (c + m + h / f);
235
- const N = B(r, a, l);
236
- let y = a, E = 0, v = 0;
237
- for (let e = N; e >= 1; e--) {
238
- const a = t.fromSerialDate(y, !0), o = t.toSerialDate(b(a, -12 / l), !0), s = 1 === u ? S(o, y, u) : f;
239
- E += (e > 1 ? s : S(r, y, u)) / s;
240
- const i = Math.max(r, o), c = Math.min(n, y);
241
- v += (i < c ? S(i, c, u) : 0) / s, y = o;
232
+ h = 2 === l || 3 === l ? S(n, A(n, a, u), l) : f - S(T(n, a, u), n, l);
233
+ const M = s / u, p = 100 * o / u;
234
+ let N = i / (1 + M) ** (c + m + h / f);
235
+ const d = B(r, a, u);
236
+ let b = a, v = 0, E = 0;
237
+ for (let e = d; e >= 1; e--) {
238
+ const a = t.fromSerialDate(b, !0), o = t.toSerialDate(y(a, -12 / u), !0), s = 1 === l ? S(o, b, l) : f;
239
+ v += (e > 1 ? s : S(r, b, l)) / s;
240
+ const i = Math.max(r, o), c = Math.min(n, b);
241
+ E += (i < c ? S(i, c, l) : 0) / s, b = o;
242
242
  }
243
- D += p * E / (1 + M) ** (m + h / f);
244
- for (let t = 1; t <= c; t++) D += p / (1 + M) ** (t + m + h / f);
245
- return D -= p * v, D;
246
- }(n, e, r, a, o, s, i, l, u, c);
247
- }
248
- function F(t, n, e, r, a, o, s) {
249
- const i = B(t, n, o), l = V(t, n, o, s), u = x(t, n, o, s), f = l - u, c = 100 * e / o, m = r / o;
250
- if (1 === i) return (c + a) / (m * f / l + 1) - c * u / l;
251
- let h = a / (1 + m) ** (i - 1 + f / l);
252
- for (let t = 1; t <= i; t++) h += c / (1 + m) ** (t - 1 + f / l);
253
- return h -= c * u / l, h;
254
- }
255
- function Y(t, n, e, r, a, o) {
256
- const s = x(t, n, a, o), i = V(t, n, a, o), l = B(t, n, a), u = (i - s) / i - 1, f = 1 + r / a, c = 100 * e / a;
243
+ N += p * v / (1 + M) ** (m + h / f);
244
+ for (let t = 1; t <= c; t++) N += p / (1 + M) ** (t + m + h / f);
245
+ return N -= p * E, N;
246
+ }(n, e, r, a, o, s, i, u, l, c);
247
+ }
248
+ function P(t, n, e, r, a, o, s) {
249
+ const i = B(t, n, o), u = V(t, n, o, s), l = w(t, n, o, s), f = u - l, c = 100 * e / o, m = r / o;
250
+ if (1 === i) return (c + a) / (m * f / u + 1) - c * l / u;
251
+ let h = a / (1 + m) ** (i - 1 + f / u);
252
+ for (let t = 1; t <= i; t++) h += c / (1 + m) ** (t - 1 + f / u);
253
+ return h -= c * l / u, h;
254
+ }
255
+ function L(t, n, e, r, a, o) {
256
+ const s = w(t, n, a, o), i = V(t, n, a, o), u = B(t, n, a), l = (i - s) / i - 1, f = 1 + r / a, c = 100 * e / a;
257
257
  let m = 0, h = 0;
258
- for (let t = 1; t <= l; t++) {
259
- const n = t + u, e = c / f ** n;
258
+ for (let t = 1; t <= u; t++) {
259
+ const n = t + l, e = c / f ** n;
260
260
  m += n * e, h += e;
261
261
  }
262
- const M = l + u, p = 100 / f ** M;
262
+ const M = u + l, p = 100 / f ** M;
263
263
  return m += M * p, h += p, m / h / a;
264
264
  }
265
- function L(t, n, e, r, a) {
266
- const o = Math.min(a / e, 1), s = 1 === o && 1 !== r ? 0 : t * (1 - o) ** (r - 1), i = t * (1 - o) ** r, l = i < n ? s - n : s - i;
267
- return Math.max(l, 0);
265
+ function Y(t, n, e, r, a) {
266
+ const o = Math.min(a / e, 1), s = 1 === o && 1 !== r ? 0 : t * (1 - o) ** (r - 1), i = t * (1 - o) ** r, u = i < n ? s - n : s - i;
267
+ return Math.max(u, 0);
268
268
  }
269
269
  function U(t, n, e) {
270
- return A(t, n, e) >= 0;
270
+ return T(t, n, e) >= 0;
271
271
  }
272
272
  function k(t) {
273
273
  return !(t < 1 || t > 4 || 3 === t);
274
274
  }
275
275
  var q = o({ ACCRINT: () => X });
276
- function X(e, r, a, o, s, i, l = 0, u = !0) {
277
- if (e = Math.trunc(e), r = Math.trunc(r), a = Math.trunc(a), i = Math.trunc(i), l = Math.trunc(l), !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a)) return n.BuiltIn.Value;
278
- if (!k(i) || !E(l) || o <= 0 || s <= 0 || e >= a) return NaN;
276
+ function X(e, r, a, o, s, i, u = 0, l = !0) {
277
+ if (e = Math.trunc(e), r = Math.trunc(r), a = Math.trunc(a), i = Math.trunc(i), u = Math.trunc(u), !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a)) return n.BuiltIn.Value;
278
+ if (!k(i) || !v(u) || o <= 0 || s <= 0 || e >= a) return NaN;
279
279
  const f = function(t, n, e, r, a, o = !0) {
280
280
  const s = Math.ceil(r * (Math.abs(n - t) + Math.abs(n - e)) / 365) + 6;
281
281
  let i = 0;
@@ -283,19 +283,19 @@ function X(e, r, a, o, s, i, l = 0, u = !0) {
283
283
  i = e;
284
284
  break;
285
285
  }
286
- const l = [];
287
- for (let t = -i; l.length <= 600; t++) {
286
+ const u = [];
287
+ for (let t = -i; u.length <= 600; t++) {
288
288
  const a = j(n, r, t);
289
- if (l.push(a), a >= e) break;
289
+ if (u.push(a), a >= e) break;
290
290
  }
291
- let u = null;
291
+ let l = null;
292
292
  if (1 === a) {
293
- const t = l.findIndex((t) => t === n);
294
- t > 0 && (u = n - l[t - 1]);
293
+ const t = u.findIndex((t) => t === n);
294
+ t > 0 && (l = n - u[t - 1]);
295
295
  }
296
296
  let f = 0;
297
- for (let s = 0; s + 1 < l.length; s++) {
298
- const i = l[s], c = l[s + 1];
297
+ for (let s = 0; s + 1 < u.length; s++) {
298
+ const i = u[s], c = u[s + 1];
299
299
  if (c <= t) continue;
300
300
  if (i >= e) break;
301
301
  const m = Math.max(i, t), h = Math.min(c, e);
@@ -309,7 +309,7 @@ function X(e, r, a, o, s, i, l = 0, u = !0) {
309
309
  M = m - i === 1 && c < n ? h - m : I(m, h, 0).days, p = 360 / r;
310
310
  break;
311
311
  case 1:
312
- M = h - m, p = null !== u ? u : c - i;
312
+ M = h - m, p = null !== l ? l : c - i;
313
313
  break;
314
314
  case 2:
315
315
  M = h - m, p = 360 / r;
@@ -323,36 +323,36 @@ function X(e, r, a, o, s, i, l = 0, u = !0) {
323
323
  p > 0 && (f += M / p);
324
324
  }
325
325
  return f;
326
- }(e, r, a, i, l, u);
326
+ }(e, r, a, i, u, l);
327
327
  return s * (o / i) * f;
328
328
  }
329
329
  function j(n, e, r) {
330
330
  const a = Math.round(r * (12 / e)), o = t.fromSerialDate(n, !0);
331
- return b(o, a), t.toSerialDate(o, !0);
331
+ return y(o, a), t.toSerialDate(o, !0);
332
332
  }
333
333
  var _ = o({ AMORDEGRC: () => G });
334
334
  function G(n, e, r, a, o, s, i = 0) {
335
335
  if (i = Math.floor(i), !t.isValidDate(e) || !t.isValidDate(r) || n <= 0 || a < 0 || n < a || o < 0 || s <= 0 || 0 !== i && 1 !== i && 3 !== i || Math.floor(e) > Math.floor(r)) return NaN;
336
- const l = 1 / s, u = s * ((f = l) < 5 ? 1.5 : f <= 6 ? 2 : 2.5);
336
+ const u = 1 / s, l = s * ((f = u) < 5 ? 1.5 : f <= 6 ? 2 : 2.5);
337
337
  var f;
338
338
  const { days: c, yearDays: m } = I(e, r, i), h = c / m;
339
339
  return function(t, n, e, r, a, o, s) {
340
- const i = Math.ceil(r), l = Math.floor(t * e * o);
341
- if (0 === s) return l;
342
- const u = t - Math.floor(t * e * a);
340
+ const i = Math.ceil(r), u = Math.floor(t * e * o);
341
+ if (0 === s) return u;
342
+ const l = t - Math.floor(t * e * a);
343
343
  if (r < 3) {
344
344
  const t = i - 1;
345
- return t <= 0 ? u > n ? u : 0 : s <= t ? Math.ceil(u / t) : 0;
345
+ return t <= 0 ? l > n ? l : 0 : s <= t ? Math.ceil(l / t) : 0;
346
346
  }
347
- let f = u;
347
+ let f = l;
348
348
  for (let t = 1; t <= s; t++) {
349
349
  if (f <= n) return 0;
350
- const r = f * e, a = i - t, o = a > 0 ? f / a : 0, l = Math.floor(Math.max(r, o));
351
- if (t === s) return l;
352
- f -= l;
350
+ const r = f * e, a = i - t, o = a > 0 ? f / a : 0, u = Math.floor(Math.max(r, o));
351
+ if (t === s) return u;
352
+ f -= u;
353
353
  }
354
354
  return 0;
355
- }(n, a, u, l, h, 1 === i && l >= 3 ? c / 365 : h, o > 1 ? Math.floor(o) : Math.ceil(o));
355
+ }(n, a, l, u, h, 1 === i && u >= 3 ? c / 365 : h, o > 1 ? Math.floor(o) : Math.ceil(o));
356
356
  }
357
357
  function z(n) {
358
358
  if (null === n) return 0;
@@ -363,89 +363,100 @@ function z(n) {
363
363
  }
364
364
  return t.parseAsSerialDate(n);
365
365
  }
366
- var H = o({
367
- DATEDIF: () => K,
368
- DAYS360: () => W,
369
- YEARFRAC: () => Q
366
+ function H(n) {
367
+ return null === n ? 0 : t.parseAsNumber(n);
368
+ }
369
+ var K = o({
370
+ DATEDIF: () => Q,
371
+ DAYS360: () => $,
372
+ YEARFRAC: () => W
370
373
  });
371
- function K(n, e, r) {
374
+ function Q(n, e, r) {
372
375
  const a = t.getDateParts(n), o = t.getDateParts(e), s = Math.trunc(n), i = Math.trunc(e);
373
376
  if (r = r.toLowerCase(), n > e) return NaN;
374
- const l = o.year - a.year, u = o.month - a.month, f = o.day - a.day;
377
+ const u = o.year - a.year, l = o.month - a.month, f = o.day - a.day;
375
378
  let c;
376
379
  switch (r) {
377
- case "y": return c = u < 0 || 0 === u && f < 0 ? -1 : 0, c + l;
378
- case "m": return c = f < 0 ? -1 : 0, 12 * l + u + c;
380
+ case "y": return c = l < 0 || 0 === l && f < 0 ? -1 : 0, c + u;
381
+ case "m": return c = f < 0 ? -1 : 0, 12 * u + l + c;
379
382
  case "d": return i - s;
380
383
  case "md": return i - t.getSerialDate(o.year, o.month + (f < 0 ? -1 : 0), a.day);
381
- case "ym": return c = f < 0 ? -1 : 0, (c + 12 * l + u) % 12;
382
- case "yd": return i - t.getSerialDate(o.year - (u < 0 || 0 === u && f < 0 ? 1 : 0), a.month, a.day);
384
+ case "ym": return c = f < 0 ? -1 : 0, (c + 12 * u + l) % 12;
385
+ case "yd": return i - t.getSerialDate(o.year - (l < 0 || 0 === l && f < 0 ? 1 : 0), a.month, a.day);
383
386
  }
384
387
  return NaN;
385
388
  }
386
- function Q(n, e, r = 0) {
389
+ function W(n, e, r = 0) {
387
390
  let a = z(n), o = z(e);
388
- const s = null === (i = r) ? 0 : t.parseAsNumber(i);
389
- var i;
390
- if (!t.isValidDate(a) || !t.isValidDate(o) || !E(s)) return NaN;
391
+ const s = H(r);
392
+ if (!t.isValidDate(a) || !t.isValidDate(o) || !v(s)) return NaN;
391
393
  if (a > o) {
392
394
  const t = a;
393
395
  a = o, o = t;
394
396
  }
395
- const { days: l, yearDays: u } = I(a, o, s);
396
- return l / u;
397
+ const { days: i, yearDays: u } = I(a, o, s);
398
+ return i / u;
397
399
  }
398
- function W(t, n, e = !1) {
400
+ function $(t, n, e = !1) {
399
401
  return e ? (n >= t ? 1 : -1) * I(t, n, 4).days : function(t, n) {
400
- const e = v(t), r = v(n), a = e.year, o = e.month;
401
- let s = e.day, i = r.year, l = r.month, u = r.day;
402
- if (2 === o ? 3 === v(t + 1).month && (s = 30) : 31 === s && (s = 30), 31 === u) if (s < 30) {
403
- const t = v(n + 1);
404
- i = t.year, l = t.month, u = t.day;
405
- } else u = 30;
406
- return R(a, o, s, i, l, u);
402
+ const e = E(t), r = E(n), a = e.year, o = e.month;
403
+ let s = e.day, i = r.year, u = r.month, l = r.day;
404
+ if (2 === o ? 3 === E(t + 1).month && (s = 30) : 31 === s && (s = 30), 31 === l) if (s < 30) {
405
+ const t = E(n + 1);
406
+ i = t.year, u = t.month, l = t.day;
407
+ } else l = 30;
408
+ return R(a, o, s, i, u, l);
407
409
  }(t, n);
408
410
  }
409
- var $ = (t) => {
411
+ var Z = (t) => {
410
412
  const n = t.getLocaleProfile().currencySymbol;
411
413
  return `${n}#,##0.00_);[Red](${n}#,##0.00)`;
412
- }, Z = o({
413
- COUPDAYS: () => J,
414
- CUMIPMT: () => tt,
415
- CUMPRINC: () => nt,
416
- DB: () => et,
417
- DDB: () => rt,
418
- DISC: () => at,
419
- DOLLARDE: () => ot,
420
- DOLLARFR: () => st,
421
- EFFECT: () => it,
422
- FV: () => lt,
423
- FVSCHEDULE: () => ut,
424
- IPMT: () => ft,
425
- IRR: () => ct,
426
- ISPMT: () => mt,
427
- MIRR: () => ht,
428
- NOMINAL: () => Mt,
429
- NPER: () => pt,
430
- NPV: () => Dt,
431
- PDURATION: () => dt,
432
- PMT: () => gt,
433
- PPMT: () => Nt,
434
- PRICEDISC: () => yt,
435
- PV: () => bt,
436
- RATE: () => Et,
437
- RRI: () => vt,
438
- SLN: () => Rt,
439
- STOCKHISTORY: () => It,
440
- SYD: () => St,
441
- TBILLEQ: () => Ct,
442
- TBILLPRICE: () => Tt,
443
- TBILLYIELD: () => At,
444
- XIRR: () => wt,
445
- XNPV: () => xt
414
+ }, J = (t, e) => {
415
+ if (0 === t) {
416
+ if (e < 0) throw n.BuiltIn.Div0;
417
+ if (0 === e) return NaN;
418
+ }
419
+ if (!Number.isInteger(e) || Math.abs(e) > 4294967294) return Math.exp(e * Math.log(t));
420
+ let r = Math.abs(e), a = 1, o = t;
421
+ for (; r > 0;) r % 2 == 1 && (a *= o), o *= o, r = Math.floor(r / 2);
422
+ return e < 0 ? 1 / a : a;
423
+ }, tt = o({
424
+ COUPDAYS: () => nt,
425
+ CUMIPMT: () => et,
426
+ CUMPRINC: () => st,
427
+ DB: () => it,
428
+ DDB: () => ut,
429
+ DISC: () => lt,
430
+ DOLLARDE: () => ft,
431
+ DOLLARFR: () => ct,
432
+ EFFECT: () => mt,
433
+ FV: () => ht,
434
+ FVSCHEDULE: () => Mt,
435
+ IPMT: () => pt,
436
+ IRR: () => Nt,
437
+ ISPMT: () => Dt,
438
+ MIRR: () => gt,
439
+ NOMINAL: () => dt,
440
+ NPER: () => bt,
441
+ NPV: () => yt,
442
+ PDURATION: () => vt,
443
+ PMT: () => Et,
444
+ PPMT: () => Rt,
445
+ PRICEDISC: () => It,
446
+ PV: () => St,
447
+ RATE: () => Ct,
448
+ RRI: () => Tt,
449
+ SLN: () => At,
450
+ STOCKHISTORY: () => wt,
451
+ SYD: () => Vt,
452
+ TBILLEQ: () => Bt,
453
+ TBILLPRICE: () => Ft,
454
+ TBILLYIELD: () => Ot,
455
+ XIRR: () => Pt,
456
+ XNPV: () => Lt
446
457
  });
447
- function J(n, e, r, a = 0) {
448
- if (!t.isValidDate(n) || !t.isValidDate(e) || !k(r) || !E(a) || n >= e) return NaN;
458
+ function nt(n, e, r, a = 0) {
459
+ if (!t.isValidDate(n) || !t.isValidDate(e) || !k(r) || !v(a) || n >= e) return NaN;
449
460
  if (1 === a) {
450
461
  const a = function(t, n, e) {
451
462
  const r = new Date(n);
@@ -456,7 +467,7 @@ function J(n, e, r, a = 0) {
456
467
  }
457
468
  return r;
458
469
  }(t.fromSerialDate(n), t.fromSerialDate(e), r), o = new Date(a);
459
- return o.setMonth(o.getMonth() + Math.round(12 / r)), K(t.toSerialDate(a), t.toSerialDate(o), "D");
470
+ return o.setMonth(o.getMonth() + Math.round(12 / r)), Q(t.toSerialDate(a), t.toSerialDate(o), "D");
460
471
  }
461
472
  let o;
462
473
  switch (a) {
@@ -472,35 +483,66 @@ function J(n, e, r, a = 0) {
472
483
  }
473
484
  return o / r;
474
485
  }
475
- function tt(n, e, r, a, o, s) {
476
- if (!t.isValidDate(a) || !t.isValidDate(o) || n <= 0 || e <= 0 || r <= 0 || a < 1 || o < 1 || a > o || 0 !== s && 1 !== s) return NaN;
477
- const i = gt(n, e, r, 0, s);
478
- let l = 0;
479
- 1 === a && (0 === s && (l = -r), a++);
480
- for (let t = a; t <= o; t++) l += 1 === s ? lt(n, t - 2, i, r, 1) - i : lt(n, t - 1, i, r, 0);
481
- return l *= n, l;
482
- }
483
- function nt(n, e, r, a, o, s) {
484
- if (!t.isValidDate(a) || !t.isValidDate(o) || a > o || n <= 0 || e <= 0 || r <= 0 || a < 1 || o < 1 || a > o || 0 !== s && 1 !== s) return NaN;
485
- const i = gt(n, e, r, 0, s);
486
- let l = 0;
487
- 1 === a && (l = 0 === s ? i + r * n : i, a++);
488
- for (let t = a; t <= o; t++) l += s > 0 ? i - (lt(n, t - 2, i, r, 1) - i) * n : i - lt(n, t - 1, i, r, 0) * n;
489
- return l;
486
+ function et(t, n, e, r, a, o) {
487
+ const s = ot(...at(t, n, e, r, a, o));
488
+ if (!s) return NaN;
489
+ const i = s.count * s.payment - s.principal;
490
+ return Number.isFinite(i) ? i : NaN;
491
+ }
492
+ var rt = (t) => {
493
+ if (void 0 === t) throw n.BuiltIn.NA;
494
+ return H(t);
495
+ }, at = (t, n, e, r, a, o) => [
496
+ rt(t),
497
+ rt(n),
498
+ rt(e),
499
+ rt(r),
500
+ rt(a),
501
+ rt(o)
502
+ ], ot = (t, n, e, r, a, o) => {
503
+ if (t <= 0 || n <= 0 || e <= 0 || r < 1 || r > a || a > n || 0 !== o && 1 !== o) return null;
504
+ const s = Et(t, n, e, 0, o);
505
+ if (!Number.isFinite(s)) return null;
506
+ const i = Math.ceil(r), u = Math.floor(a), l = u - i + 1;
507
+ if (l <= 0) return {
508
+ payment: s,
509
+ principal: 0,
510
+ count: 0
511
+ };
512
+ const f = Math.log1p(t), c = -Math.expm1(-n * f), m = (t, r) => {
513
+ const a = -e * (Math.exp((t - n - 1) * f) * Math.expm1((r - t + 1) * f)) / c;
514
+ return Number.isFinite(a) ? a : -e * (Math.exp((r - n) * f) - Math.exp((t - n - 1) * f)) / c;
515
+ };
516
+ if (!o) return {
517
+ payment: s,
518
+ principal: m(i, u),
519
+ count: l
520
+ };
521
+ let h = i <= 1 ? s : 0;
522
+ const M = Math.max(i, 2);
523
+ return M <= u && (h += m(M, u) / (1 + t)), {
524
+ payment: s,
525
+ principal: h,
526
+ count: l
527
+ };
528
+ };
529
+ function st(t, n, e, r, a, o) {
530
+ const s = ot(...at(t, n, e, r, a, o));
531
+ return s ? s.principal : NaN;
490
532
  }
491
- function et(n, e, r, a, o = 12) {
533
+ function it(n, e, r, a, o = 12) {
492
534
  if (n < 0 || e < 0 || r <= 0 || a < 0) return NaN;
493
535
  if (o < 1 || o > 12) return NaN;
494
536
  if (12 === o && a > r || a > r + 1) return NaN;
495
537
  if (0 === n) return 0;
496
- t.formatResults($(t.getRuntime()));
538
+ t.formatResults(Z(t.getRuntime()));
497
539
  const s = Math.round(1e3 * (1 - Math.pow(e / n, 1 / r))) / 1e3, i = n * s * o / 12;
498
540
  if (1 === a) return i;
499
- let l = n - i;
500
- for (let t = 2; t < a; t++) l -= l * s;
501
- return a === r + 1 ? l * s * (12 - o) / 12 : l * s;
541
+ let u = n - i;
542
+ for (let t = 2; t < a; t++) u -= u * s;
543
+ return a === r + 1 ? u * s * (12 - o) / 12 : u * s;
502
544
  }
503
- function rt(t, n, e, r, a = 2) {
545
+ function ut(t, n, e, r, a = 2) {
504
546
  if (t < 0 || n < 0 || e < 0 || r < 0 || a <= 0) return NaN;
505
547
  if (r > e) return NaN;
506
548
  if (n >= t) return 0;
@@ -508,67 +550,73 @@ function rt(t, n, e, r, a = 2) {
508
550
  for (let i = 1; i <= r; i++) s = Math.min(a / e * (t - o), t - n - o), o += s;
509
551
  return s;
510
552
  }
511
- function at(n, e, r, a, o = 0) {
512
- if (!t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0 || n >= e) return NaN;
553
+ function lt(n, e, r, a, o = 0) {
554
+ if (!t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0 || n >= e) return NaN;
513
555
  let s, i;
514
556
  switch (o) {
515
557
  case 0:
516
- s = 360, i = W(n, e, !1);
558
+ s = 360, i = $(n, e, !1);
517
559
  break;
518
560
  case 1:
519
561
  case 3:
520
- s = 365, i = K(n, e, "D");
562
+ s = 365, i = Q(n, e, "D");
521
563
  break;
522
564
  case 2:
523
- s = 360, i = K(n, e, "D");
565
+ s = 360, i = Q(n, e, "D");
524
566
  break;
525
567
  case 4:
526
- s = 360, i = W(n, e, !0);
568
+ s = 360, i = $(n, e, !0);
527
569
  break;
528
570
  default: return NaN;
529
571
  }
530
572
  return (a - r) / a * s / i;
531
573
  }
532
- function ot(t, e) {
574
+ function ft(t, e) {
533
575
  if ((e = Math.trunc(e)) < 0) return NaN;
534
576
  if (0 === e) throw n.BuiltIn.Div0;
535
577
  if (1 === e) return t;
536
578
  const r = t < 0 ? -1 : 1, a = Math.abs(t), o = Math.trunc(a), s = a - o;
537
579
  return r * (o + Math.round(s * Math.pow(10, Math.ceil(Math.log10(e)))) / e);
538
580
  }
539
- function st(t, e) {
581
+ function ct(t, e) {
540
582
  if ((e = Math.trunc(e)) < 0) return NaN;
541
583
  if (0 === e) throw n.BuiltIn.Div0;
542
584
  if (1 === e) return t;
543
585
  const r = t < 0 ? -1 : 1, a = Math.abs(t), o = Math.trunc(a), s = a - o, i = Math.ceil(Math.log10(e));
544
586
  return r * (o + s * e / Math.pow(10, i));
545
587
  }
546
- function it(t, n) {
547
- return n = Math.trunc(n), t <= 0 || n < 1 ? NaN : Math.pow(1 + t / n, n) - 1;
548
- }
549
- function lt(n, e, r, a = 0, o = 0) {
550
- let s;
551
- if (0 === n) s = a + r * e;
552
- else {
553
- const t = Math.pow(1 + n, e);
554
- s = 1 === o ? a * t + r * (1 + n) * (t - 1) / n : a * t + r * (t - 1) / n;
555
- }
556
- return t.formatResults($(t.getRuntime())), -s;
557
- }
558
- function ut(t, e) {
559
- let r = t;
560
- for (const t of e.values()) {
588
+ function mt(t, n) {
589
+ const e = rt(t), r = Math.trunc(rt(n));
590
+ if (e <= 0 || r < 1) return NaN;
591
+ const a = J(1 + e / r, r) - 1;
592
+ return Number.isFinite(a) ? a : NaN;
593
+ }
594
+ function ht(n, e, r, a = 0, o = 0) {
595
+ if (t.formatResults(Z(t.getRuntime())), 0 === n) return -(a + r * e);
596
+ const s = J(1 + n, e);
597
+ return -(a * s + (s - 1) / n * (1 + n * (o ? 1 : 0)) * r);
598
+ }
599
+ function Mt(e, r) {
600
+ if (void 0 === e || void 0 === r) throw n.BuiltIn.NA;
601
+ let a = rt(e);
602
+ const o = t.getArgs().getRawAt(1), s = o, i = !0 === s?.isIRange, u = i && 1 === s.size && !0 === s.isIReferenceRange;
603
+ if (!i || u) a *= 1 + rt(i ? s.getValueAt(0, 0) ?? null : o);
604
+ else for (const t of r.values()) if (null != t) {
605
+ if (n.isError(t)) throw t;
561
606
  if ("number" != typeof t) throw n.BuiltIn.Value;
562
- r *= 1 + t;
607
+ a *= 1 + t;
563
608
  }
564
- return r;
609
+ return Number.isFinite(a) ? a : 0;
565
610
  }
566
- function ft(t, n, e, r, a = 0, o = 0) {
567
- if (e <= 0 || n < 1 || n > e) return NaN;
568
- const s = gt(t, e, r, a, o);
569
- return 1 === n ? t * (o ? 0 : -r) : t * (o ? lt(t, n - 2, s, r, o) - s : lt(t, n - 1, s, r, o));
611
+ function pt(n, e, r, a, o = 0, s = 0) {
612
+ if (e < 1 || e - 1 >= r) return NaN;
613
+ if (t.formatResults(Z(t.getRuntime())), 1 === e && s) return 0;
614
+ if (0 === n) return 0;
615
+ if (n <= -1) return NaN;
616
+ const i = Math.log1p(n), u = e - 1, l = -n * (a * -Math.expm1((u - r) * i) - o * (u * i < 700 ? Math.exp(-r * i) * Math.expm1(u * i) : Math.exp((u - r) * i) - Math.exp(-r * i))) / -Math.expm1(-r * i);
617
+ return s ? l / (1 + n) : l;
570
618
  }
571
- function ct(t, n = .1) {
619
+ function Nt(t, n = .1) {
572
620
  const e = t.some((t) => t > 0), r = t.some((t) => t < 0);
573
621
  if (!e || !r) return NaN;
574
622
  const a = (n) => {
@@ -579,17 +627,18 @@ function ct(t, n = .1) {
579
627
  };
580
628
  let o = n;
581
629
  for (let t = 0; t < 20; t++) {
582
- const t = a(o), n = o - t / ((a(o + Vt) - t) / Vt);
583
- if (Math.abs(n - o) < Vt) return n;
630
+ const t = a(o), n = o - t / ((a(o + Yt) - t) / Yt);
631
+ if (Math.abs(n - o) < Yt) return n;
584
632
  o = n, o <= -1 && (o = -.9999999);
585
633
  }
586
634
  return NaN;
587
635
  }
588
- function mt(t, e, r, a) {
636
+ function Dt(t, e, r, a) {
589
637
  if (0 === r) throw n.BuiltIn.Div0;
590
- return a * t * (e / r - 1);
638
+ const o = a * (e - r) * t / r;
639
+ return Number.isFinite(o) ? o : NaN;
591
640
  }
592
- function ht(e, r, a) {
641
+ function gt(e, r, a) {
593
642
  const o = e.length;
594
643
  if (!e.some((t) => t < 0)) throw n.BuiltIn.Div0;
595
644
  let s = 0;
@@ -604,141 +653,149 @@ function ht(e, r, a) {
604
653
  }
605
654
  return t.formatResults("0%"), Math.pow(-i / s, 1 / (o - 1)) - 1;
606
655
  }
607
- function Mt(t, n) {
608
- return n = Math.trunc(n), t <= 0 || n < 1 ? NaN : (Math.pow(t + 1, 1 / n) - 1) * n;
656
+ function dt(t, n) {
657
+ const e = rt(t), r = Math.trunc(rt(n));
658
+ if (e <= 0 || r < 1) return NaN;
659
+ const a = (J(e + 1, 1 / r) - 1) * r;
660
+ return Number.isFinite(a) ? a : NaN;
609
661
  }
610
- function pt(t, e, r, a = 0, o = 0) {
662
+ function bt(t, e, r, a = 0, o = 0) {
611
663
  if (0 === t) {
612
664
  if (0 === e) throw n.BuiltIn.Div0;
613
665
  return (-r - a) / e;
614
666
  }
615
- return o && (e *= 1 + t), Math.log((e - a * t) / (r * t + e)) / Math.log(1 + t);
616
- }
617
- function Dt(t, e) {
618
- if (e.length > 254) throw n.BuiltIn.Value;
619
- let r = 0;
620
- for (let a = e.length - 1; a >= 0; a--) {
621
- if (r += e[a], -1 === t) {
622
- if (0 === r) continue;
623
- throw n.BuiltIn.Div0;
624
- }
625
- r /= 1 + t;
626
- }
627
- return r;
667
+ if (t <= -1) return NaN;
668
+ const s = Math.log(1 + t);
669
+ if (0 === s) throw n.BuiltIn.Div0;
670
+ return o && (e *= 1 + t), Math.log((e - a * t) / (r * t + e)) / s;
671
+ }
672
+ function yt(t, e) {
673
+ const r = [];
674
+ for (const t of e) for (const n of t.values()) r.push(n);
675
+ const a = r.length, o = 1 + t;
676
+ if (0 === o) throw n.BuiltIn.Div0;
677
+ if (!Number.isFinite(J(o, a - 1))) throw n.BuiltIn.Div0;
678
+ let s = 0;
679
+ for (let t = a - 1; t >= 0; t--) s += r[t], s /= o;
680
+ return s;
628
681
  }
629
- function dt(t, n, e) {
630
- return t <= 0 || n <= 0 || e <= 0 ? NaN : (Math.log(e) - Math.log(n)) / Math.log(1 + t);
682
+ function vt(t, e, r) {
683
+ if (t <= 0 || e <= 0 || r <= 0) return NaN;
684
+ const a = Math.log(1 + t);
685
+ if (0 === a) throw n.BuiltIn.Div0;
686
+ return (Math.log(r) - Math.log(e)) / a;
631
687
  }
632
- function gt(n, e, r, a = 0, o = 0) {
688
+ function Et(n, e, r, a = 0, o = 0) {
633
689
  if (0 === e) return NaN;
634
- if (0 === n) return (-r - a) / e;
635
- o = o ? 1 : 0;
636
- const s = Math.pow(1 + n, e);
637
- return t.formatResults($(t.getRuntime())), (a * n + r * n * s) * (o ? 1 / (1 + n) : 1) / (1 - s);
638
- }
639
- function Nt(t, n, e, r, a = 0, o = 0) {
640
- return e <= 0 || n < 1 || n > e ? NaN : gt(t, e, r, a, o) - ft(t, n, e, r, a, o);
641
- }
642
- function yt(n, e, r, a, o = 0) {
643
- if (!t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0 || n >= e) return NaN;
690
+ if (t.formatResults(Z(t.getRuntime())), 0 === n) return (-r - a) / e;
691
+ if (n <= -1) return NaN;
692
+ const s = e * Math.log1p(n), i = (r / -Math.expm1(-s) + a / Math.expm1(s)) * n;
693
+ return -(o ? i / (1 + n) : i);
694
+ }
695
+ function Rt(n, e, r, a, o = 0, s = 0) {
696
+ if (e < 1 || e - 1 >= r) return NaN;
697
+ if (t.formatResults(Z(t.getRuntime())), 0 === n) return -(a + o) / r;
698
+ if (n <= -1) return NaN;
699
+ const i = Math.log1p(n), u = -Math.expm1(-r * i);
700
+ if (s && 1 === e) return -n * (a + o * Math.exp(-r * i)) / (u * (1 + n));
701
+ const l = s ? e - 2 : e - 1;
702
+ return -(a + o) * (n * Math.exp((l - r) * i)) / u;
703
+ }
704
+ function It(n, e, r, a, o = 0) {
705
+ if (!t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0 || n >= e) return NaN;
644
706
  let s, i;
645
707
  switch (o) {
646
708
  case 0:
647
- s = 360, i = W(n, e, !1);
709
+ s = 360, i = $(n, e, !1);
648
710
  break;
649
711
  case 1:
650
712
  case 3:
651
- s = 365, i = K(n, e, "D");
713
+ s = 365, i = Q(n, e, "D");
652
714
  break;
653
715
  case 2:
654
- s = 360, i = K(n, e, "D");
716
+ s = 360, i = Q(n, e, "D");
655
717
  break;
656
718
  case 4:
657
- s = 360, i = W(n, e, !0);
719
+ s = 360, i = $(n, e, !0);
658
720
  break;
659
721
  default: return NaN;
660
722
  }
661
723
  return a - r * a * i / s;
662
724
  }
663
- function bt(e, r, a, o = 0, s = 0) {
664
- if (s = s ? 1 : 0, -1 === e) {
665
- if (0 === r) return NaN;
666
- throw n.BuiltIn.Div0;
667
- }
668
- return t.formatResults($(t.getRuntime())), 0 === e ? -a * r - o : ((1 - Math.pow(1 + e, r)) * a * (1 + e * s) / e - o) / Math.pow(1 + e, r);
725
+ function St(e, r, a, o = 0, s = 0) {
726
+ if (t.formatResults(Z(t.getRuntime())), 0 === e) return -(o + a * r);
727
+ const i = J(1 + e, r);
728
+ if (0 === i) throw n.BuiltIn.Div0;
729
+ return -(o + (i - 1) / e * (1 + e * (s ? 1 : 0)) * a) / i;
669
730
  }
670
- function Et(t, e, r, a = 0, o = 0, s = .1) {
731
+ function Ct(t, e, r, a = 0, o = 0, s = .1) {
671
732
  if (s <= -1) throw n.BuiltIn.Value;
672
- o = o ? 1 : 0;
673
- let i = s;
674
- for (let n = 0; n < 100; n++) {
675
- if (i <= -1) return NaN;
676
- let n, s;
677
- if (Math.abs(i) < Vt) n = r * (1 + t * i) + e * (1 + i * o) * t + a, s = r * t + e * o * t;
678
- else {
679
- const l = Math.pow(1 + i, t), u = t * Math.pow(1 + i, t - 1);
680
- n = r * l + e * (1 / i + o) * (l - 1) + a, s = r * u + e * (1 / i + o) * u + e * (-1 / (i * i)) * (l - 1);
681
- }
682
- if (Math.abs(n) < Vt) return i;
683
- i -= n / s;
733
+ const i = o ? 1 : 0, u = (n) => {
734
+ if (0 === n) return r + e * t + a;
735
+ const o = J(1 + n, t);
736
+ return r * o + (o - 1) / n * (1 + n * i) * e + a;
737
+ };
738
+ let l = s, f = u(l), c = f > 0 ? s - .001 : s + .001, m = u(c);
739
+ for (let t = 0; t < xt; t++) {
740
+ const t = c - m * (c - l) / (m - f);
741
+ if (!Number.isFinite(t)) return NaN;
742
+ const n = u(t);
743
+ if (!Number.isFinite(n)) return NaN;
744
+ if (Math.abs(t - c) < 1e-7 && Math.abs(n) < 1e-7) return t <= -1 ? NaN : t;
745
+ l = c, f = m, c = t, m = n;
684
746
  }
685
747
  return NaN;
686
748
  }
687
- function vt(t, n, e) {
688
- return t <= 0 || 0 === n || e < 0 && n > 0 || e > 0 && n < 0 ? NaN : Math.pow(e / n, 1 / t) - 1;
749
+ var xt = 200;
750
+ function Tt(t, n, e) {
751
+ if (t <= 0 || e < 0 && n > 0 || e > 0 && n < 0) return NaN;
752
+ if (0 === n) return 0 === e ? 0 : NaN;
753
+ const r = J(e / n, 1 / t) - 1;
754
+ return Number.isFinite(r) ? r : NaN;
689
755
  }
690
- function Rt(t, e, r) {
756
+ function At(t, e, r) {
691
757
  if (0 === r) throw n.BuiltIn.Div0;
692
758
  return (t - e) / r;
693
759
  }
694
- function It(e, r, a, o = 0, s = 1, i = [
760
+ function wt(e, r, a, o = 0, s = 1, i = [
695
761
  0,
696
762
  1,
697
763
  2,
698
764
  3,
699
765
  4
700
766
  ]) {
701
- const l = a ?? r;
702
- if (!t.isValidDate(r) || !t.isValidDate(l)) throw n.BuiltIn.Num;
767
+ const u = a ?? r;
768
+ if (!t.isValidDate(r) || !t.isValidDate(u)) throw n.BuiltIn.Num;
703
769
  }
704
- function St(t, n, e, r) {
770
+ function Vt(t, n, e, r) {
705
771
  return r > e ? NaN : (t - n) * (e - r + 1) * 2 / (e * (e + 1));
706
772
  }
707
- function Ct(n, e, r) {
708
- if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || y(n, e)) return NaN;
773
+ function Bt(n, e, r) {
774
+ if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || b(n, e)) return NaN;
709
775
  const a = 360 - r * (e - n);
710
776
  return 0 === a ? 0 : a < 0 ? NaN : 365 * r / a;
711
777
  }
712
- function Tt(n, e, r) {
713
- if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || y(n, e)) return NaN;
778
+ function Ft(n, e, r) {
779
+ if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || b(n, e)) return NaN;
714
780
  const a = 360 - r * (e - n);
715
781
  return 0 === a ? 0 : a < 0 ? NaN : 100 * (1 - r * (e - n) / 360);
716
782
  }
717
- function At(n, e, r) {
718
- return n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || y(n, e) ? NaN : 360 * (100 - r) / (r * (e - n));
783
+ function Ot(n, e, r) {
784
+ return n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || b(n, e) ? NaN : 360 * (100 - r) / (r * (e - n));
719
785
  }
720
- function wt(t, e, r = .1) {
721
- const a = t.flatten({
722
- includeEmpty: !0,
723
- onError: "value"
724
- }), o = e.flatten({
725
- includeEmpty: !0,
726
- onError: "value"
727
- });
728
- if (a.length !== o.length) return NaN;
786
+ function Pt(t, e, r = .1) {
787
+ const a = t.flatten({ onError: "value" }), o = e.flatten({ onError: "value" });
788
+ if (a.getRowCount() !== o.getRowCount()) return NaN;
729
789
  const s = [], i = [];
730
- for (let t = 0; t < a.length; t++) {
731
- const e = a[t], r = o[t];
732
- if (null !== e) {
733
- if (null === r) return NaN;
734
- if (n.isError(e) || n.isError(r)) return n.BuiltIn.Value;
735
- if ("number" != typeof r || isNaN(r)) return n.BuiltIn.Value;
736
- s.push(e), i.push(r);
737
- }
738
- }
739
- const l = s.some((t) => t > 0), u = s.some((t) => t < 0);
740
- if (!l || !u) return NaN;
741
- const f = i[0], c = i.map((t) => N(t, f) / 365), m = (t) => {
790
+ for (const [[t, e]] of a.alignValues([o])) if (null !== t) {
791
+ if (null === e) return NaN;
792
+ if (n.isError(t) || n.isError(e)) return n.BuiltIn.Value;
793
+ if ("number" != typeof e || isNaN(e)) return n.BuiltIn.Value;
794
+ s.push(t), i.push(e);
795
+ }
796
+ const u = s.some((t) => t > 0), l = s.some((t) => t < 0);
797
+ if (!u || !l) return NaN;
798
+ const f = i[0], c = i.map((t) => d(t, f) / 365), m = (t) => {
742
799
  const n = 1 + t;
743
800
  let e = 0;
744
801
  for (let t = 0; t < s.length; t++) e += s[t] / Math.pow(n, c[t]);
@@ -746,85 +803,76 @@ function wt(t, e, r = .1) {
746
803
  };
747
804
  let h = r;
748
805
  for (let t = 0; t < 20; t++) {
749
- const t = m(h), n = (m(h + Vt) - t) / Vt;
750
- if (Math.abs(n) < Vt) break;
806
+ const t = m(h), n = (m(h + Yt) - t) / Yt;
807
+ if (Math.abs(n) < Yt) break;
751
808
  const e = h - t / n;
752
- if (Math.abs(e - h) < Vt) return e;
809
+ if (Math.abs(e - h) < Yt) return e;
753
810
  h = e, h <= -1 && (h = -.9999999);
754
811
  }
755
812
  return NaN;
756
813
  }
757
- function xt(t, e, r) {
814
+ function Lt(t, e, r) {
758
815
  if (t <= 0) return NaN;
759
- const a = e.flatten({
760
- includeEmpty: !0,
761
- onError: "value"
762
- }), o = r.flatten({
763
- includeEmpty: !0,
764
- onError: "value"
765
- });
766
- if (a.length !== o.length) return NaN;
767
- if (0 === a.length) return NaN;
816
+ const a = e.flatten({ onError: "value" }), o = r.flatten({ onError: "value" });
817
+ if (a.getRowCount() !== o.getRowCount()) return NaN;
818
+ if (0 === a.getRowCount()) return NaN;
768
819
  const s = [], i = [];
769
- for (let t = 0; t < a.length; t++) {
770
- const e = a[t], r = o[t];
771
- if (null !== e || null !== r) {
772
- if (null === e || null === r) return NaN;
773
- if (n.isError(e) || n.isError(r)) return n.BuiltIn.Value;
774
- if ("number" != typeof e) return NaN;
775
- if ("number" != typeof r) return n.BuiltIn.Value;
776
- s.push(e), i.push(r);
777
- }
820
+ for (const [[t, e]] of a.alignValues([o])) {
821
+ if (null === t || null === e) return NaN;
822
+ if (n.isError(t) || n.isError(e)) return n.BuiltIn.Value;
823
+ if ("number" != typeof t) return NaN;
824
+ if ("number" != typeof e) return n.BuiltIn.Value;
825
+ s.push(t), i.push(e);
778
826
  }
779
827
  for (let t = 1; t < i.length; t++) if (i[t] < i[t - 1]) return NaN;
780
- let l = 0;
781
- const u = i[0];
782
- for (let n = 0; n < s.length; n++) l += s[n] / Math.pow(1 + t, N(i[n], u) / 365);
783
- return l;
828
+ let u = 0;
829
+ const l = i[0];
830
+ for (let n = 0; n < s.length; n++) u += s[n] / Math.pow(1 + t, d(i[n], l) / 365);
831
+ return u;
784
832
  }
785
- var Vt = 1e-7;
786
- var Bt = o({
787
- ACCRINTM: () => Ot,
788
- AMORLINC: () => kt,
789
- INTRATE: () => Pt,
790
- PRICEMAT: () => Lt,
791
- RECEIVED: () => Ft,
792
- YIELDDISC: () => Yt,
793
- YIELDMAT: () => Ut
833
+ var Yt = 1e-7;
834
+ var Ut = o({
835
+ ACCRINTM: () => kt,
836
+ AMORLINC: () => zt,
837
+ INTRATE: () => qt,
838
+ PRICEMAT: () => _t,
839
+ RECEIVED: () => Xt,
840
+ YIELDDISC: () => jt,
841
+ YIELDMAT: () => Gt
794
842
  });
795
- function Ot(n, e, r, a, o = 0) {
796
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0) return NaN;
843
+ function kt(n, e, r, a, o = 0) {
844
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0) return NaN;
797
845
  if (Math.floor(n) > Math.floor(e)) return NaN;
798
846
  if (Math.floor(n) === Math.floor(e)) return 0;
799
847
  const { days: s, yearDays: i } = I(n, e, o);
800
848
  return a * r * s / i;
801
849
  }
802
- function Pt(n, e, r, a, o = 0) {
803
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0 || Math.floor(n) >= Math.floor(e)) return NaN;
850
+ function qt(n, e, r, a, o = 0) {
851
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0 || Math.floor(n) >= Math.floor(e)) return NaN;
804
852
  const { days: s, yearDays: i } = I(n, e, o);
805
853
  return (a - r) / r * (i / s);
806
854
  }
807
- function Ft(n, e, r, a, o = 0) {
808
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !E(o) || Math.floor(n) >= Math.floor(e)) return NaN;
809
- const { days: s, yearDays: i } = I(n, e, o), l = r / (1 - a * s / i);
810
- return l < 0 ? NaN : l;
855
+ function Xt(n, e, r, a, o = 0) {
856
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !v(o) || Math.floor(n) >= Math.floor(e)) return NaN;
857
+ const { days: s, yearDays: i } = I(n, e, o), u = r / (1 - a * s / i);
858
+ return u < 0 ? NaN : u;
811
859
  }
812
- function Yt(n, e, r, a, o = 0) {
813
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !E(o) || Math.floor(n) >= Math.floor(e)) return NaN;
860
+ function jt(n, e, r, a, o = 0) {
861
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !v(o) || Math.floor(n) >= Math.floor(e)) return NaN;
814
862
  const { days: s, yearDays: i } = I(n, e, o);
815
863
  return (a / r - 1) / (s / i);
816
864
  }
817
- function Lt(n, e, r, a, o, s = 0) {
818
- if (s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || !E(s) || !qt(r, n, e)) return NaN;
819
- const { yearDays: i } = I(r, n, s), { days: l } = I(n, e, s), { days: u } = I(r, e, s), { days: f } = I(r, n, s);
820
- return (100 + u / i * a * 100) / (1 + l / i * o) - f / i * a * 100;
865
+ function _t(n, e, r, a, o, s = 0) {
866
+ if (s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || !v(s) || !Ht(r, n, e)) return NaN;
867
+ const { yearDays: i } = I(r, n, s), { days: u } = I(n, e, s), { days: l } = I(r, e, s), { days: f } = I(r, n, s);
868
+ return (100 + l / i * a * 100) / (1 + u / i * o) - f / i * a * 100;
821
869
  }
822
- function Ut(n, e, r, a, o, s = 0) {
823
- if (s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || !E(s) || !qt(r, n, e)) return NaN;
824
- const { yearDays: i } = I(r, n, s), { days: l } = I(n, e, s), { days: u } = I(r, e, s), { days: f } = I(r, n, s);
825
- return ((1 + u / i * a) / (o / 100 + f / i * a) - 1) / (l / i);
870
+ function Gt(n, e, r, a, o, s = 0) {
871
+ if (s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || !v(s) || !Ht(r, n, e)) return NaN;
872
+ const { yearDays: i } = I(r, n, s), { days: u } = I(n, e, s), { days: l } = I(r, e, s), { days: f } = I(r, n, s);
873
+ return ((1 + l / i * a) / (o / 100 + f / i * a) - 1) / (u / i);
826
874
  }
827
- function kt(n, e, r, a, o, s, i = 0) {
875
+ function zt(n, e, r, a, o, s, i = 0) {
828
876
  if (i = Math.floor(i), n <= 0 || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || n < a || o < 0 || s <= 0 || Math.floor(e) > Math.floor(r) || ![
829
877
  0,
830
878
  1,
@@ -832,47 +880,47 @@ function kt(n, e, r, a, o, s, i = 0) {
832
880
  4
833
881
  ].includes(i)) return NaN;
834
882
  o = o > 1 ? Math.floor(o) : Math.ceil(o);
835
- const l = n - a, u = n * s, { days: f, yearDays: c } = I(e, r, i), m = f / c, h = Math.ceil(l / u - m);
836
- return h < 0 ? 0 : 0 === o ? u * m : o === h ? l - u * (m + o - 1) : o > h ? 0 : u;
883
+ const u = n - a, l = n * s, { days: f, yearDays: c } = I(e, r, i), m = f / c, h = Math.ceil(u / l - m);
884
+ return h < 0 ? 0 : 0 === o ? l * m : o === h ? u - l * (m + o - 1) : o > h ? 0 : l;
837
885
  }
838
- function qt(t, n, e) {
886
+ function Ht(t, n, e) {
839
887
  return Math.floor(e) > Math.floor(n) && Math.floor(n) > Math.floor(t);
840
888
  }
841
- var Xt = o({
842
- COUPDAYBS: () => jt,
843
- COUPDAYS: () => _t,
844
- COUPDAYSNC: () => Gt,
845
- COUPNCD: () => zt,
846
- COUPNUM: () => Kt,
847
- COUPPCD: () => Ht
889
+ var Kt = o({
890
+ COUPDAYBS: () => Qt,
891
+ COUPDAYS: () => Wt,
892
+ COUPDAYSNC: () => $t,
893
+ COUPNCD: () => Zt,
894
+ COUPNUM: () => tn,
895
+ COUPPCD: () => Jt
848
896
  });
849
- function jt(n, e, r, a = 0) {
850
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Qt(n, e, r, a) ? x(n, e, r, a) : NaN;
897
+ function Qt(n, e, r, a = 0) {
898
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a) ? w(n, e, r, a) : NaN;
851
899
  }
852
- function _t(n, e, r, a = 0) {
853
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Qt(n, e, r, a) ? V(n, e, r, a) : NaN;
900
+ function Wt(n, e, r, a = 0) {
901
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a) ? V(n, e, r, a) : NaN;
854
902
  }
855
- function Gt(n, e, r, a = 0) {
856
- if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Qt(n, e, r, a))) return NaN;
857
- const { days: o } = I(n, w(n, e, r), a);
903
+ function $t(n, e, r, a = 0) {
904
+ if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a))) return NaN;
905
+ const { days: o } = I(n, A(n, e, r), a);
858
906
  return o;
859
907
  }
860
- function zt(n, e, r, a = 0) {
861
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && !(n >= e) && Qt(n, e, r, a) ? (t.formatResults("Short Date"), w(n, e, r)) : NaN;
908
+ function Zt(n, e, r, a = 0) {
909
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && !(n >= e) && nn(n, e, r, a) ? (t.formatResults("Short Date"), A(n, e, r)) : NaN;
862
910
  }
863
- function Ht(n, e, r, a = 0) {
864
- if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Qt(n, e, r, a))) return NaN;
911
+ function Jt(n, e, r, a = 0) {
912
+ if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a))) return NaN;
865
913
  t.formatResults("d-mmm-yy");
866
- const o = A(n, e, r);
914
+ const o = T(n, e, r);
867
915
  return o < 0 ? 0 : o;
868
916
  }
869
- function Kt(n, e, r, a = 0) {
870
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Qt(n, e, r, a) ? A(n, e, r) < 0 ? NaN : B(n, e, r) : NaN;
917
+ function tn(n, e, r, a = 0) {
918
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a) ? T(n, e, r) < 0 ? NaN : B(n, e, r) : NaN;
871
919
  }
872
- function Qt(t, n, e, r) {
873
- return k(e) && E(r) && Math.floor(t) < Math.floor(n);
920
+ function nn(t, n, e, r) {
921
+ return k(e) && v(r) && Math.floor(t) < Math.floor(n);
874
922
  }
875
- function Wt(t, n) {
923
+ function en(t, n) {
876
924
  const e = 1e-7;
877
925
  let r = t, a = 1, o = 0;
878
926
  for (; a > e && o < 500;) {
@@ -882,73 +930,73 @@ function Wt(t, n) {
882
930
  return Number.isNaN(r) || !Number.isFinite(r) || 500 === o ? function(t, n) {
883
931
  const e = 1e-7, r = 60, a = 60, o = 1.6, s = -1, i = Number.MAX_VALUE;
884
932
  if (t <= s || t >= i) return NaN;
885
- let l, u, f = Math.max(t - .01, -.9999999), c = Math.min(t + .01, i - e), m = !1;
933
+ let u, l, f = Math.max(t - .01, -.9999999), c = Math.min(t + .01, i - e), m = !1;
886
934
  for (let t = 0; t < r; t++) {
887
- if (l = n(f), u = n(c), l * u <= 0) {
935
+ if (u = n(f), l = n(c), u * l <= 0) {
888
936
  m = !0;
889
937
  break;
890
938
  }
891
939
  f = Math.max(f + o * (f - c), -.9999999), c = Math.min(c + o * (c - f), i - e);
892
940
  }
893
941
  if (!m) return NaN;
894
- l = n(f);
895
- let h = f, M = l, p = 0;
942
+ u = n(f);
943
+ let h = f, M = u, p = 0;
896
944
  do
897
- h = f + (c - f) / 2, M = n(h), l * M < 0 ? c = h : (f = h, l = M), p++;
945
+ h = f + (c - f) / 2, M = n(h), u * M < 0 ? c = h : (f = h, u = M), p++;
898
946
  while (Math.abs(M) > e && p < a);
899
947
  return h;
900
948
  }(t, n) : r;
901
949
  }
902
- var $t = o({
903
- DURATION: () => Jt,
904
- MDURATION: () => tn,
905
- PRICE: () => Zt,
906
- YIELD: () => nn
950
+ var rn = o({
951
+ DURATION: () => on,
952
+ MDURATION: () => sn,
953
+ PRICE: () => an,
954
+ YIELD: () => un
907
955
  });
908
- function Zt(n, e, r, a, o, s, i = 0) {
909
- return s = Math.floor(s), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || o <= 0 || !k(s) || !E(i) || Math.floor(n) >= Math.floor(e) || !U(n, e, s) ? NaN : F(n, e, r, a, o, s, i);
956
+ function an(n, e, r, a, o, s, i = 0) {
957
+ return s = Math.floor(s), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || o <= 0 || !k(s) || !v(i) || Math.floor(n) >= Math.floor(e) || !U(n, e, s) ? NaN : P(n, e, r, a, o, s, i);
910
958
  }
911
- function Jt(n, e, r, a, o, s = 0) {
912
- return o = Math.floor(o), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !E(s) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : Y(n, e, r, a, o, s);
959
+ function on(n, e, r, a, o, s = 0) {
960
+ return o = Math.floor(o), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !v(s) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : L(n, e, r, a, o, s);
913
961
  }
914
- function tn(n, e, r, a, o, s = 0) {
915
- return o = Math.floor(o), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !E(s) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : Y(n, e, r, a, o, s) / (1 + a / o);
962
+ function sn(n, e, r, a, o, s = 0) {
963
+ return o = Math.floor(o), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !v(s) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : L(n, e, r, a, o, s) / (1 + a / o);
916
964
  }
917
- function nn(n, e, r, a, o, s, i = 0) {
918
- if (s = Math.floor(s), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a <= 0 || o <= 0 || !k(s) || !E(i) || Math.floor(n) >= Math.floor(e) || !U(n, e, s)) return NaN;
965
+ function un(n, e, r, a, o, s, i = 0) {
966
+ if (s = Math.floor(s), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a <= 0 || o <= 0 || !k(s) || !v(i) || Math.floor(n) >= Math.floor(e) || !U(n, e, s)) return NaN;
919
967
  if (B(n, e, s) > 1) {
920
- const t = Wt(r || .01, (t) => F(n, e, r, t, o, s, i) - a);
968
+ const t = en(r || .01, (t) => P(n, e, r, t, o, s, i) - a);
921
969
  return Number.isNaN(t) ? NaN : t;
922
970
  }
923
- const l = x(n, e, s, i), u = V(n, e, s, i), { days: f } = I(n, e, i), c = a / 100 + l / u * (r / s);
924
- return (o / 100 + r / s - c) / c * s * (u / f);
971
+ const u = w(n, e, s, i), l = V(n, e, s, i), { days: f } = I(n, e, i), c = a / 100 + u / l * (r / s);
972
+ return (o / 100 + r / s - c) / c * s * (l / f);
925
973
  }
926
- var en = o({
927
- ODDFPRICE: () => rn,
928
- ODDFYIELD: () => an,
929
- ODDLPRICE: () => on,
930
- ODDLYIELD: () => sn
974
+ var ln = o({
975
+ ODDFPRICE: () => fn,
976
+ ODDFYIELD: () => cn,
977
+ ODDLPRICE: () => mn,
978
+ ODDLYIELD: () => hn
931
979
  });
932
- function rn(n, e, r, a, o, s, i, l, u = 0) {
933
- return l = Math.floor(l), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || s < 0 || i <= 0 || !k(l) || !E(u) || !fn(n, e, r, a, l) ? NaN : P(n, e, r, a, o, s, i, l, u);
980
+ function fn(n, e, r, a, o, s, i, u, l = 0) {
981
+ return u = Math.floor(u), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || s < 0 || i <= 0 || !k(u) || !v(l) || !Nn(n, e, r, a, u) ? NaN : O(n, e, r, a, o, s, i, u, l);
934
982
  }
935
- function an(n, e, r, a, o, s, i, l, u = 0) {
936
- if (l = Math.floor(l), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || s <= 0 || i <= 0 || !k(l) || !E(u) || !fn(n, e, r, a, l)) return NaN;
937
- const { days: f } = I(n, e, u), c = Wt((o * f * 100 - (s - 100)) / (.25 * (s - 100) * (1 + 2 * f) + 100 * f), (t) => s - P(n, e, r, a, o, t, i, l, u));
983
+ function cn(n, e, r, a, o, s, i, u, l = 0) {
984
+ if (u = Math.floor(u), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || s <= 0 || i <= 0 || !k(u) || !v(l) || !Nn(n, e, r, a, u)) return NaN;
985
+ const { days: f } = I(n, e, l), c = en((o * f * 100 - (s - 100)) / (.25 * (s - 100) * (1 + 2 * f) + 100 * f), (t) => s - O(n, e, r, a, o, t, i, u, l));
938
986
  return Number.isNaN(c) ? NaN : c;
939
987
  }
940
- function on(n, e, r, a, o, s, i, l = 0) {
941
- return i = Math.floor(i), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || s <= 0 || !k(i) || !E(l) || !cn(n, e, r, i) ? NaN : function(t, n, e, r, a, o, s, i) {
942
- const { fAi: l, fDCi: u, fDSCi: f } = ln(t, n, e, s, i);
943
- return (o * s + 100 * r * (u - l * (1 + a * f / s))) / (a * f + s);
944
- }(n, e, r, a, o, s, i, l);
988
+ function mn(n, e, r, a, o, s, i, u = 0) {
989
+ return i = Math.floor(i), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || s <= 0 || !k(i) || !v(u) || !Dn(n, e, r, i) ? NaN : function(t, n, e, r, a, o, s, i) {
990
+ const { fAi: u, fDCi: l, fDSCi: f } = Mn(t, n, e, s, i);
991
+ return (o * s + 100 * r * (l - u * (1 + a * f / s))) / (a * f + s);
992
+ }(n, e, r, a, o, s, i, u);
945
993
  }
946
- function sn(n, e, r, a, o, s, i, l = 0) {
947
- if (i = Math.floor(i), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || s <= 0 || !k(i) || !E(l) || !cn(n, e, r, i)) return NaN;
948
- const { fAi: u, fDCi: f, fDSCi: c } = ln(n, e, r, i, l);
949
- return (i * (s - o) + 100 * a * (f - u)) / (c * o + 100 * a * u * c / i);
994
+ function hn(n, e, r, a, o, s, i, u = 0) {
995
+ if (i = Math.floor(i), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || s <= 0 || !k(i) || !v(u) || !Dn(n, e, r, i)) return NaN;
996
+ const { fAi: l, fDCi: f, fDSCi: c } = Mn(n, e, r, i, u);
997
+ return (i * (s - o) + 100 * a * (f - l)) / (c * o + 100 * a * l * c / i);
950
998
  }
951
- function ln(n, e, r, a, o) {
999
+ function Mn(n, e, r, a, o) {
952
1000
  const s = function(n, e, r) {
953
1001
  const a = t.fromSerialDate(n, !0), o = t.fromSerialDate(e, !0), s = 12 / r;
954
1002
  o.setFullYear(a.getFullYear()), o > a && o.setFullYear(o.getFullYear() - 1);
@@ -956,17 +1004,17 @@ function ln(n, e, r, a, o) {
956
1004
  return t.toSerialDate(o, !0);
957
1005
  }(e, r, a);
958
1006
  return {
959
- fAi: un(r, n, s, a, o),
960
- fDCi: un(r, e, s, a, o),
961
- fDSCi: un(n, e, s, a, o)
1007
+ fAi: pn(r, n, s, a, o),
1008
+ fDCi: pn(r, e, s, a, o),
1009
+ fDSCi: pn(n, e, s, a, o)
962
1010
  };
963
1011
  }
964
- function un(n, e, r, a, o) {
965
- const s = t.fromSerialDate(n, !0), i = t.fromSerialDate(e, !0), l = 12 / a, u = t.fromSerialDate(r, !0);
966
- for (u.setFullYear(s.getFullYear()), u < s && u.setFullYear(u.getFullYear() + 1); u > s;) u.setMonth(u.getMonth() - l);
967
- let f = t.toSerialDate(u, !0);
968
- u.setMonth(u.getMonth() + l);
969
- let c = t.toSerialDate(u, !0);
1012
+ function pn(n, e, r, a, o) {
1013
+ const s = t.fromSerialDate(n, !0), i = t.fromSerialDate(e, !0), u = 12 / a, l = t.fromSerialDate(r, !0);
1014
+ for (l.setFullYear(s.getFullYear()), l < s && l.setFullYear(l.getFullYear() + 1); l > s;) l.setMonth(l.getMonth() - u);
1015
+ let f = t.toSerialDate(l, !0);
1016
+ l.setMonth(l.getMonth() + u);
1017
+ let c = t.toSerialDate(l, !0);
970
1018
  const m = (t, n, e) => 1 === o || 3 === o ? e - n : V(n, e, a, t);
971
1019
  if (c >= e) {
972
1020
  const { days: t } = I(n, e, o);
@@ -974,47 +1022,47 @@ function un(n, e, r, a, o) {
974
1022
  }
975
1023
  const { days: h } = I(n, c, o);
976
1024
  let M = h / m(o, f, c);
977
- const p = t.fromSerialDate(c, !0), D = t.fromSerialDate(c, !0);
978
- for (D.setMonth(D.getMonth() + l); D < i;) p.setMonth(p.getMonth() + l), D.setMonth(D.getMonth() + l), M += 1;
979
- f = t.toSerialDate(p, !0), c = t.toSerialDate(D, !0);
980
- const { days: d } = I(f, e, o);
981
- return M += d / m(o, f, c), M;
1025
+ const p = t.fromSerialDate(c, !0), N = t.fromSerialDate(c, !0);
1026
+ for (N.setMonth(N.getMonth() + u); N < i;) p.setMonth(p.getMonth() + u), N.setMonth(N.getMonth() + u), M += 1;
1027
+ f = t.toSerialDate(p, !0), c = t.toSerialDate(N, !0);
1028
+ const { days: D } = I(f, e, o);
1029
+ return M += D / m(o, f, c), M;
982
1030
  }
983
- function fn(n, e, r, a, o) {
1031
+ function Nn(n, e, r, a, o) {
984
1032
  return Math.floor(e) > Math.floor(a) && Math.floor(a) > Math.floor(n) && Math.floor(n) > Math.floor(r) && function(n, e, r) {
985
1033
  const a = t.fromSerialDate(n, !0), o = t.fromSerialDate(e, !0), s = g(a.getFullYear(), a.getMonth(), a.getDate()), i = g(o.getFullYear(), o.getMonth(), o.getDate());
986
1034
  return !!(a.getDate() === o.getDate() || s && i) && Math.abs(12 * (o.getFullYear() - a.getFullYear()) + (o.getMonth() - a.getMonth())) % (12 / r) == 0;
987
1035
  }(e, a, o) && U(r, e, o);
988
1036
  }
989
- function cn(t, n, e, r) {
1037
+ function Dn(t, n, e, r) {
990
1038
  return Math.floor(n) > Math.floor(t) && Math.floor(t) > Math.floor(e) && U(e, n, r);
991
1039
  }
992
- var mn = o({ VDB: () => hn });
993
- function hn(e, r, a, o, s, i = 2, l = !1) {
1040
+ var gn = o({ VDB: () => dn });
1041
+ function dn(e, r, a, o, s, i = 2, u = !1) {
994
1042
  if (!t.isValidDate(o) || !t.isValidDate(s) || e < 0 || r < 0 || a < 0 || o < 0 || s < 0 || s > a || o > s || i < 0) return NaN;
995
1043
  if (0 === a && 0 === o && 0 === s) throw n.BuiltIn.Div0;
996
1044
  if (e < r) {
997
- if (o >= 1 || l) return 0;
1045
+ if (o >= 1 || u) return 0;
998
1046
  const t = r - e, n = s - o;
999
1047
  return -(n >= 1 ? t : t * n);
1000
1048
  }
1001
- return l ? function(t, n, e, r, a, o) {
1049
+ return u ? function(t, n, e, r, a, o) {
1002
1050
  const s = Math.floor(r) + 1, i = Math.ceil(a);
1003
- let l = 0;
1004
- for (let u = s; u <= i; u++) {
1005
- let f = L(t, n, e, u, o);
1006
- u === s ? f *= Math.min(a, s) - r : u === i && (f *= a - (i - 1)), l += f;
1051
+ let u = 0;
1052
+ for (let l = s; l <= i; l++) {
1053
+ let f = Y(t, n, e, l, o);
1054
+ l === s ? f *= Math.min(a, s) - r : l === i && (f *= a - (i - 1)), u += f;
1007
1055
  }
1008
- return l;
1056
+ return u;
1009
1057
  }(e, r, a, o, s, i) : function(t, n, e, r, a, o) {
1010
1058
  const s = Math.ceil(a);
1011
- let i = t, l = !1, u = 0, f = 0;
1059
+ let i = t, u = !1, l = 0, f = 0;
1012
1060
  for (let c = 1; c <= s && !(i <= n); c++) {
1013
1061
  let s;
1014
- if (l) s = u;
1062
+ if (u) s = l;
1015
1063
  else {
1016
- const r = L(t, n, e, c, o), a = e - (c - 1), f = a > 0 ? (i - n) / a : 0;
1017
- f > r ? (u = f, l = !0, s = f) : s = r;
1064
+ const r = Y(t, n, e, c, o), a = e - (c - 1), f = a > 0 ? (i - n) / a : 0;
1065
+ f > r ? (l = f, u = !0, s = f) : s = r;
1018
1066
  }
1019
1067
  s = Math.min(s, i - n);
1020
1068
  const m = Math.max(c - 1, r);
@@ -1023,53 +1071,50 @@ function hn(e, r, a, o, s, i = 2, l = !1) {
1023
1071
  return f;
1024
1072
  }(e, r, a, o, s, i);
1025
1073
  }
1026
- var Mn = Object.freeze({ includeEmpty: !0 }), pn = (Object.freeze({ axis: e.Axis.Column }), Object.freeze({ axis: e.Axis.Row }), Object.freeze({
1027
- type: r.Number,
1028
- axis: e.Axis.Column
1029
- })), Dn = o({
1030
- FORECAST_ETS: () => dn,
1031
- FORECAST_ETS_CONFINT: () => gn,
1032
- FORECAST_ETS_SEASONALITY: () => Nn,
1033
- FORECAST_ETS_STAT: () => yn
1074
+ var bn = o({
1075
+ FORECAST_ETS: () => yn,
1076
+ FORECAST_ETS_CONFINT: () => vn,
1077
+ FORECAST_ETS_SEASONALITY: () => En,
1078
+ FORECAST_ETS_STAT: () => Rn
1034
1079
  });
1035
- function dn(t, e, r, a = 1, o = 1, s = 1) {
1036
- const i = En(e, r, o, s);
1080
+ function yn(t, e, r, a = 1, o = 1, s = 1) {
1081
+ const i = Sn(e, r, o, s);
1037
1082
  if (n.isError(i)) return i;
1038
- const { values: l, stepSize: u, lastTime: f, firstTime: c } = i, m = Math.round((t - f) / u), h = In(l, a);
1083
+ const { values: u, stepSize: l, lastTime: f, firstTime: c } = i, m = Math.round((t - f) / l), h = Tn(u, a);
1039
1084
  if (n.isError(h)) return h;
1040
- const { alpha: M, beta: p, gamma: D, period: d, b0: g } = h, { L: N, T: y, S: b, finalIndex: E } = Rn(l, M, p, D, d, g).finalState;
1041
- let v = N + m * y;
1042
- return d > 1 && (v += b[(E + m) % d]), v;
1085
+ const { alpha: M, beta: p, gamma: N, period: D, b0: g } = h, { L: d, T: b, S: y, finalIndex: v } = xn(u, M, p, N, D, g).finalState;
1086
+ let E = d + m * b;
1087
+ return D > 1 && (E += y[(v + m) % D]), E;
1043
1088
  }
1044
- function gn(e, r, a, o = .95, s = 1, i = 1, l = 1) {
1089
+ function vn(e, r, a, o = .95, s = 1, i = 1, u = 1) {
1045
1090
  if (o < 0 || o >= 1) return n.BuiltIn.Num;
1046
- const u = En(r, a, i, l);
1047
- if (n.isError(u)) return u;
1048
- const { values: f, stepSize: c, lastTime: m } = u;
1091
+ const l = Sn(r, a, i, u);
1092
+ if (n.isError(l)) return l;
1093
+ const { values: f, stepSize: c, lastTime: m } = l;
1049
1094
  if (f.length < 4) return 0;
1050
- const h = Math.round((e - m) / c), M = In(f, s);
1095
+ const h = Math.round((e - m) / c), M = Tn(f, s);
1051
1096
  if (n.isError(M)) return M;
1052
- const { alpha: p, beta: D, gamma: d, period: g, b0: N } = M, y = function(t, n, e, r, a, o) {
1097
+ const { alpha: p, beta: N, gamma: D, period: g, b0: d } = M, b = function(t, n, e, r, a, o) {
1053
1098
  const s = t.length;
1054
- let i, l;
1055
- const u = new Array(Math.max(1, a)).fill(0);
1099
+ let i, u;
1100
+ const l = new Array(Math.max(1, a)).fill(0);
1056
1101
  if (a > 1 && s >= 2 * a) {
1057
1102
  let n = 0, e = 0;
1058
1103
  for (let e = 0; e < a; e++) n += t[e];
1059
1104
  for (let n = a; n < 2 * a; n++) e += t[n];
1060
- i = n / a, l = (e - n) / (a * a);
1105
+ i = n / a, u = (e - n) / (a * a);
1061
1106
  const r = n / a;
1062
- for (let n = 0; n < a; n++) u[n] = t[n] - r;
1063
- } else i = t[0], l = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1107
+ for (let n = 0; n < a; n++) l[n] = t[n] - r;
1108
+ } else i = t[0], u = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1064
1109
  let f = 0;
1065
1110
  for (let o = 0; o < s; o++) {
1066
- const s = a > 1 ? o % a : 0, c = a > 1 ? u[s] : 0, m = i + l + c, h = t[o] - m;
1111
+ const s = a > 1 ? o % a : 0, c = a > 1 ? l[s] : 0, m = i + u + c, h = t[o] - m;
1067
1112
  f += h * h;
1068
- const M = n * (t[o] - c) + (1 - n) * (i + l), p = e * (M - i) + (1 - e) * l;
1069
- a > 1 && (u[s] = r * (t[o] - M) + (1 - r) * c), i = M, l = p;
1113
+ const M = n * (t[o] - c) + (1 - n) * (i + u), p = e * (M - i) + (1 - e) * u;
1114
+ a > 1 && (l[s] = r * (t[o] - M) + (1 - r) * c), i = M, u = p;
1070
1115
  }
1071
1116
  return Math.sqrt(f / s);
1072
- }(f, p, D, d, g, N), b = function(t, n, e, r) {
1117
+ }(f, p, N, D, g, d), y = function(t, n, e, r) {
1073
1118
  const a = Math.abs(r);
1074
1119
  if (0 === a) return 0;
1075
1120
  let o = 0, s = 1;
@@ -1078,27 +1123,27 @@ function gn(e, r, a, o = .95, s = 1, i = 1, l = 1) {
1078
1123
  s = s + t + (e > 1 && r % e === 0 ? n : 0);
1079
1124
  }
1080
1125
  return o;
1081
- }(p, d, g, h);
1126
+ }(p, D, g, h);
1082
1127
  return function(n) {
1083
1128
  const e = (1 + n) / 2, r = t.getFunction("NORM.S.INV");
1084
1129
  if (r) return r.execute(e);
1085
1130
  const a = Math.sqrt(-2 * Math.log(1 - e));
1086
1131
  return a - (2.515517 + .802853 * a + .010328 * a * a) / (1 + 1.432788 * a + .189269 * a * a + .001308 * a * a * a);
1087
- }(o) * y * Math.sqrt(b);
1132
+ }(o) * b * Math.sqrt(y);
1088
1133
  }
1089
- function Nn(t, e, r = 1, a = 1) {
1090
- const o = En(t, e, r, a);
1134
+ function En(t, e, r = 1, a = 1) {
1135
+ const o = Sn(t, e, r, a);
1091
1136
  if (n.isError(o)) return o === n.BuiltIn.NA ? o : 0;
1092
1137
  const { values: s } = o;
1093
- return s.length < 4 ? 0 : vn(s);
1138
+ return s.length < 4 ? 0 : Cn(s);
1094
1139
  }
1095
- function yn(t, e, r, a = 1, o = 1, s = 1) {
1140
+ function Rn(t, e, r, a = 1, o = 1, s = 1) {
1096
1141
  if (r < 1 || r > 8) return n.BuiltIn.Num;
1097
- const i = En(t, e, o, s);
1142
+ const i = Sn(t, e, o, s);
1098
1143
  if (n.isError(i)) return i;
1099
- const { values: l, stepSize: u } = i;
1100
- if (8 === r) return u;
1101
- const f = In(l, a);
1144
+ const { values: u, stepSize: l } = i;
1145
+ if (8 === r) return l;
1146
+ const f = Tn(u, a);
1102
1147
  if (n.isError(f)) return f;
1103
1148
  const { alpha: c, beta: m, gamma: h, period: M, b0: p } = f;
1104
1149
  switch (r) {
@@ -1108,24 +1153,24 @@ function yn(t, e, r, a = 1, o = 1, s = 1) {
1108
1153
  default: {
1109
1154
  const t = function(t, n, e, r, a, o) {
1110
1155
  const s = t.length;
1111
- let i, l;
1112
- const u = new Array(Math.max(1, a)).fill(0);
1156
+ let i, u;
1157
+ const l = new Array(Math.max(1, a)).fill(0);
1113
1158
  if (a > 1 && s >= 2 * a) {
1114
1159
  let n = 0, e = 0;
1115
1160
  for (let e = 0; e < a; e++) n += t[e];
1116
1161
  for (let n = a; n < 2 * a; n++) e += t[n];
1117
- i = n / a, l = (e - n) / (a * a);
1162
+ i = n / a, u = (e - n) / (a * a);
1118
1163
  const r = n / a;
1119
- for (let n = 0; n < a; n++) u[n] = t[n] - r;
1120
- } else i = t[0], l = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1164
+ for (let n = 0; n < a; n++) l[n] = t[n] - r;
1165
+ } else i = t[0], u = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1121
1166
  let f = 0, c = 0, m = 0, h = 0;
1122
1167
  for (let n = 1; n < s; n++) h += Math.abs(t[n] - t[n - 1]);
1123
1168
  const M = h / (s - 1);
1124
1169
  for (let o = 0; o < s; o++) {
1125
- const s = t[o], h = a > 1 ? o % a : 0, M = a > 1 ? u[h] : 0, p = i + l + M, D = s - p;
1126
- f += Math.abs(D), c += D * D, m += Math.abs(D) / ((Math.abs(s) + Math.abs(p)) / 2 || 1);
1127
- const d = n * (s - M) + (1 - n) * (i + l), g = e * (d - i) + (1 - e) * l;
1128
- a > 1 && (u[h] = r * (s - d) + (1 - r) * M), i = d, l = g;
1170
+ const s = t[o], h = a > 1 ? o % a : 0, M = a > 1 ? l[h] : 0, p = i + u + M, N = s - p;
1171
+ f += Math.abs(N), c += N * N, m += Math.abs(N) / ((Math.abs(s) + Math.abs(p)) / 2 || 1);
1172
+ const D = n * (s - M) + (1 - n) * (i + u), g = e * (D - i) + (1 - e) * u;
1173
+ a > 1 && (l[h] = r * (s - D) + (1 - r) * M), i = D, u = g;
1129
1174
  }
1130
1175
  return {
1131
1176
  mae: f / s,
@@ -1133,7 +1178,7 @@ function yn(t, e, r, a = 1, o = 1, s = 1) {
1133
1178
  smape: m / s,
1134
1179
  mase: 0 === M ? 0 : f / s / M
1135
1180
  };
1136
- }(l, c, m, h, M, p);
1181
+ }(u, c, m, h, M, p);
1137
1182
  if (4 === r) return t.mase;
1138
1183
  if (5 === r) return t.smape;
1139
1184
  if (6 === r) return t.mae;
@@ -1142,7 +1187,7 @@ function yn(t, e, r, a = 1, o = 1, s = 1) {
1142
1187
  }
1143
1188
  return n.BuiltIn.Num;
1144
1189
  }
1145
- function bn(t, e) {
1190
+ function In(t, e) {
1146
1191
  if (1 === t.length) return t[0].value;
1147
1192
  const r = t.map((t) => t.value);
1148
1193
  switch (e) {
@@ -1159,60 +1204,63 @@ function bn(t, e) {
1159
1204
  default: return n.BuiltIn.Num;
1160
1205
  }
1161
1206
  }
1162
- function En(t, e, r, a) {
1207
+ function Sn(t, e, r, a) {
1163
1208
  if (r < 0 || r > 1) return n.BuiltIn.Num;
1164
- const o = t.flatten(Mn), s = e.flatten(Mn);
1165
- if (o.length !== s.length) return n.BuiltIn.NA;
1166
- if (o.length < 2) return n.BuiltIn.Num;
1167
- const i = s.map((t, n) => ({
1168
- time: t,
1169
- value: o[n]
1170
- })).sort((t, n) => t.time - n.time), l = [];
1171
- let u = [i[0]];
1209
+ const o = t.flatten(), s = e.flatten();
1210
+ if (o.getRowCount() !== s.getRowCount()) return n.BuiltIn.NA;
1211
+ if (o.getRowCount() < 2) return n.BuiltIn.Num;
1212
+ const i = [];
1213
+ for (const [[t, n]] of o.alignValues([s])) "number" == typeof t && "number" == typeof n && i.push({
1214
+ time: n,
1215
+ value: t
1216
+ });
1217
+ if (i.sort((t, n) => t.time - n.time), i.length < 2) return n.BuiltIn.Num;
1218
+ const u = [];
1219
+ let l = [i[0]];
1172
1220
  for (let t = 1; t < i.length; t++) {
1173
1221
  const e = i[t];
1174
- if (e.time === i[t - 1].time) u.push(e);
1222
+ if (e.time === i[t - 1].time) l.push(e);
1175
1223
  else {
1176
- const t = bn(u, a);
1224
+ const t = In(l, a);
1177
1225
  if (n.isError(t)) return t;
1178
- l.push({
1179
- time: u[0].time,
1226
+ u.push({
1227
+ time: l[0].time,
1180
1228
  value: t
1181
- }), u = [e];
1229
+ }), l = [e];
1182
1230
  }
1183
1231
  }
1184
- const f = bn(u, a);
1232
+ const f = In(l, a);
1185
1233
  if (n.isError(f)) return f;
1186
- if (l.push({
1187
- time: u[0].time,
1234
+ if (u.push({
1235
+ time: l[0].time,
1188
1236
  value: f
1189
- }), l.length < 2) return n.BuiltIn.Num;
1237
+ }), u.length < 2) return n.BuiltIn.Num;
1190
1238
  const c = [];
1191
- for (let t = 1; t < l.length; t++) c.push(l[t].time - l[t - 1].time);
1239
+ for (let t = 1; t < u.length; t++) c.push(u[t].time - u[t - 1].time);
1192
1240
  c.sort((t, n) => t - n);
1193
1241
  const m = Math.floor(c.length / 2), h = c.length % 2 != 0 ? c[m] : (c[m - 1] + c[m]) / 2;
1194
1242
  if (h <= 0) return n.BuiltIn.Num;
1195
- const M = [l[0].value];
1196
- for (let t = 1; t < l.length; t++) {
1197
- const e = l[t - 1].time, a = l[t].time, o = e + h;
1243
+ const M = [u[0].value];
1244
+ for (let t = 1; t < u.length; t++) {
1245
+ const e = u[t - 1].time, a = u[t].time, o = e + h;
1198
1246
  if (a > o) {
1199
1247
  const n = Math.round((a - e) / h) - 1;
1200
1248
  for (let e = 1; e <= n; e++) if (0 === r) M.push(0);
1201
1249
  else {
1202
- const r = l[t - 1].value, a = l[t].value;
1250
+ const r = u[t - 1].value, a = u[t].value;
1203
1251
  M.push(r + e / (n + 1) * (a - r));
1204
1252
  }
1205
1253
  } else if (Math.abs(a - o) > .01 * h) return n.BuiltIn.Num;
1206
- M.push(l[t].value);
1254
+ M.push(u[t].value);
1207
1255
  }
1208
1256
  return {
1209
1257
  values: M,
1210
1258
  stepSize: h,
1211
- lastTime: l[l.length - 1].time,
1212
- firstTime: l[0].time
1259
+ lastTime: u[u.length - 1].time,
1260
+ firstTime: u[0].time
1213
1261
  };
1214
1262
  }
1215
- function vn(t) {
1263
+ function Cn(t) {
1216
1264
  const n = t.length;
1217
1265
  if (n < 4) return 0;
1218
1266
  const e = t.reduce((t, n) => t + n, 0) / n;
@@ -1224,50 +1272,50 @@ function vn(t) {
1224
1272
  for (let i = 2; i <= s; i++) {
1225
1273
  let s = 0;
1226
1274
  for (let r = 0; r < n - i; r++) s += (t[r] - e) * (t[r + i] - e);
1227
- const l = s / r;
1228
- l > a && l > .3 && (a = l, o = i);
1275
+ const u = s / r;
1276
+ u > a && u > .3 && (a = u, o = i);
1229
1277
  }
1230
1278
  return o;
1231
1279
  }
1232
- function Rn(t, n, e, r, a, o) {
1280
+ function xn(t, n, e, r, a, o) {
1233
1281
  const s = t.length;
1234
- let i, l;
1282
+ let i, u;
1235
1283
  if (a > 1 && s >= 2 * a) {
1236
1284
  let n = 0, e = 0;
1237
1285
  for (let e = 0; e < a; e++) n += t[e];
1238
1286
  for (let n = a; n < 2 * a; n++) e += t[n];
1239
- i = n / a, l = (e - n) / (a * a);
1240
- } else i = t[0], l = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1241
- const u = new Array(Math.max(1, a)).fill(0);
1287
+ i = n / a, u = (e - n) / (a * a);
1288
+ } else i = t[0], u = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1289
+ const l = new Array(Math.max(1, a)).fill(0);
1242
1290
  if (a > 1 && s >= a) {
1243
- const n = u.length > 0 ? (() => {
1291
+ const n = l.length > 0 ? (() => {
1244
1292
  let n = 0;
1245
1293
  for (let e = 0; e < a; e++) n += t[e];
1246
1294
  return n / a;
1247
1295
  })() : i;
1248
- for (let e = 0; e < a; e++) u[e] = t[e] - n;
1296
+ for (let e = 0; e < a; e++) l[e] = t[e] - n;
1249
1297
  }
1250
1298
  let f = 0, c = 0;
1251
1299
  for (let o = 0; o < s; o++) {
1252
- const s = t[o], m = a > 1 ? o % a : 0, h = a > 1 ? u[m] : 0, M = s - (i + l + h);
1300
+ const s = t[o], m = a > 1 ? o % a : 0, h = a > 1 ? l[m] : 0, M = s - (i + u + h);
1253
1301
  f += M * M;
1254
- const p = n * (s - h) + (1 - n) * (i + l), D = e * (p - i) + (1 - e) * l;
1255
- a > 1 && (u[m] = r * (s - p) + (1 - r) * h), i = p, l = D, c = m;
1302
+ const p = n * (s - h) + (1 - n) * (i + u), N = e * (p - i) + (1 - e) * u;
1303
+ a > 1 && (l[m] = r * (s - p) + (1 - r) * h), i = p, u = N, c = m;
1256
1304
  }
1257
1305
  return {
1258
1306
  mse: f / s,
1259
1307
  finalState: {
1260
1308
  L: i,
1261
- T: l,
1262
- S: u,
1309
+ T: u,
1310
+ S: l,
1263
1311
  finalIndex: c
1264
1312
  }
1265
1313
  };
1266
1314
  }
1267
- function In(t, e) {
1315
+ function Tn(t, e) {
1268
1316
  let r = 1;
1269
1317
  if (0 === e) r = 1;
1270
- else if (1 === e) r = vn(t), r <= 1 && (r = 1);
1318
+ else if (1 === e) r = Cn(t), r <= 1 && (r = 1);
1271
1319
  else {
1272
1320
  if (!(e > 1)) return n.BuiltIn.Num;
1273
1321
  r = Math.floor(e);
@@ -1275,9 +1323,9 @@ function In(t, e) {
1275
1323
  if (r > 1 && t.length < 2 * r) return n.BuiltIn.Num;
1276
1324
  const a = t.length;
1277
1325
  if (1 === r) {
1278
- const n = Math.max(1, Math.floor(a / 4)), e = Cn((n) => {
1326
+ const n = Math.max(1, Math.floor(a / 4)), e = wn((n) => {
1279
1327
  const e = Math.max(.001, Math.min(.999, n[0])), r = Math.max(.001, Math.min(.999, n[1])), a = n[2];
1280
- return Rn(t, e, r, 0, 1, a).mse;
1328
+ return xn(t, e, r, 0, 1, a).mse;
1281
1329
  }, [
1282
1330
  .9,
1283
1331
  .1,
@@ -1291,7 +1339,7 @@ function In(t, e) {
1291
1339
  b0: e[2]
1292
1340
  };
1293
1341
  }
1294
- const o = Cn((n) => Rn(t, Math.max(.001, Math.min(.999, n[0])), Math.max(.001, Math.min(.999, n[1])), Math.max(.001, Math.min(.999, n[2])), r).mse, [
1342
+ const o = wn((n) => xn(t, Math.max(.001, Math.min(.999, n[0])), Math.max(.001, Math.min(.999, n[1])), Math.max(.001, Math.min(.999, n[2])), r).mse, [
1295
1343
  .9,
1296
1344
  .1,
1297
1345
  .1
@@ -1304,11 +1352,11 @@ function In(t, e) {
1304
1352
  b0: 0
1305
1353
  };
1306
1354
  }
1307
- function Sn(t, n, e, r, a) {
1355
+ function An(t, n, e, r, a) {
1308
1356
  for (let o = 0; o < t.length; ++o) t[o] = n * e[o] + r * a[o];
1309
1357
  }
1310
- function Cn(t, n, e) {
1311
- const r = (e = e || {}).maxIterations || 200 * n.length, a = e.nonZeroDelta || 1.05, o = e.zeroDelta || .001, s = e.minErrorDelta || 1e-6, i = e.minTolerance || 1e-5, l = void 0 !== e.rho ? e.rho : 1, u = void 0 !== e.chi ? e.chi : 2, f = void 0 !== e.psi ? e.psi : -.5, c = void 0 !== e.sigma ? e.sigma : .5;
1358
+ function wn(t, n, e) {
1359
+ const r = (e = e || {}).maxIterations || 200 * n.length, a = e.nonZeroDelta || 1.05, o = e.zeroDelta || .001, s = e.minErrorDelta || 1e-6, i = e.minTolerance || 1e-5, u = void 0 !== e.rho ? e.rho : 1, l = void 0 !== e.chi ? e.chi : 2, f = void 0 !== e.psi ? e.psi : -.5, c = void 0 !== e.sigma ? e.sigma : .5;
1312
1360
  let m;
1313
1361
  const h = n.length, M = new Array(h + 1);
1314
1362
  M[0] = n, M[0].fx = t(n), M[0].id = 0;
@@ -1320,9 +1368,9 @@ function Cn(t, n, e) {
1320
1368
  for (let n = 0; n < t.length; n++) M[h][n] = t[n];
1321
1369
  M[h].fx = t.fx;
1322
1370
  }
1323
- const D = (t, n) => t.fx - n.fx, d = n.slice(), g = n.slice(), N = n.slice(), y = n.slice();
1371
+ const N = (t, n) => t.fx - n.fx, D = n.slice(), g = n.slice(), d = n.slice(), b = n.slice();
1324
1372
  for (let n = 0; n < r; ++n) {
1325
- if (M.sort(D), e.history) {
1373
+ if (M.sort(N), e.history) {
1326
1374
  const t = M.map((t) => {
1327
1375
  const n = t.slice();
1328
1376
  return n.fx = t.fx, n.id = t.id, n;
@@ -1337,29 +1385,32 @@ function Cn(t, n, e) {
1337
1385
  for (let t = 0; t < h; ++t) m = Math.max(m, Math.abs(M[0][t] - M[1][t]));
1338
1386
  if (Math.abs(M[0].fx - M[h].fx) < s && m < i) break;
1339
1387
  for (let t = 0; t < h; ++t) {
1340
- d[t] = 0;
1341
- for (let n = 0; n < h; ++n) d[t] += M[n][t];
1342
- d[t] /= h;
1388
+ D[t] = 0;
1389
+ for (let n = 0; n < h; ++n) D[t] += M[n][t];
1390
+ D[t] /= h;
1343
1391
  }
1344
1392
  const n = M[h];
1345
- if (Sn(g, 1 + l, d, -l, n), g.fx = t(g), g.fx < M[0].fx) Sn(y, 1 + u, d, -u, n), y.fx = t(y), p(y.fx < g.fx ? y : g);
1393
+ if (An(g, 1 + u, D, -u, n), g.fx = t(g), g.fx < M[0].fx) An(b, 1 + l, D, -l, n), b.fx = t(b), p(b.fx < g.fx ? b : g);
1346
1394
  else if (g.fx >= M[h - 1].fx) {
1347
1395
  let e = !1;
1348
- if (g.fx > n.fx ? (Sn(N, 1 + f, d, -f, n), N.fx = t(N), N.fx < n.fx ? p(N) : e = !0) : (Sn(N, 1 - f * l, d, f * l, n), N.fx = t(N), N.fx < g.fx ? p(N) : e = !0), e) {
1396
+ if (g.fx > n.fx ? (An(d, 1 + f, D, -f, n), d.fx = t(d), d.fx < n.fx ? p(d) : e = !0) : (An(d, 1 - f * u, D, f * u, n), d.fx = t(d), d.fx < g.fx ? p(d) : e = !0), e) {
1349
1397
  if (c >= 1) break;
1350
- for (let n = 1; n < M.length; ++n) Sn(M[n], 1 - c, M[0], c, M[n]), M[n].fx = t(M[n]);
1398
+ for (let n = 1; n < M.length; ++n) An(M[n], 1 - c, M[0], c, M[n]), M[n].fx = t(M[n]);
1351
1399
  }
1352
1400
  } else p(g);
1353
1401
  }
1354
- return M.sort(D), {
1402
+ return M.sort(N), {
1355
1403
  fx: M[0].fx,
1356
1404
  x: M[0]
1357
1405
  };
1358
1406
  }
1359
- var Tn = (t, e) => {
1407
+ var Vn = Object.freeze({ includeEmpty: !0 }), Bn = (Object.freeze({ axis: e.Axis.Column }), Object.freeze({ axis: e.Axis.Row }), Object.freeze({
1408
+ type: r.Number,
1409
+ axis: e.Axis.Row
1410
+ })), Fn = (t, e) => {
1360
1411
  const r = t.getRowCount(), a = t.getColumnCount(), o = r * a;
1361
1412
  if (0 === o) throw n.BuiltIn.Value;
1362
- const s = Bn(t, o), i = 1 === r && a > 1, l = r > 1 && a > 1;
1413
+ const s = Un(t, o), i = 1 === r && a > 1, u = r > 1 && a > 1;
1363
1414
  if (!e || 0 === e.size) {
1364
1415
  const t = new Array(o);
1365
1416
  for (let n = 0; n < o; n++) t[n] = [n + 1];
@@ -1368,52 +1419,52 @@ var Tn = (t, e) => {
1368
1419
  xs: t,
1369
1420
  k: 1,
1370
1421
  isRowOriented: i,
1371
- isRectangularY: l,
1422
+ isRectangularY: u,
1372
1423
  yRows: r,
1373
1424
  yCols: a
1374
1425
  };
1375
1426
  }
1376
- const u = e.getRowCount(), f = e.getColumnCount();
1377
- if (l) {
1378
- if (u !== r || f !== a) throw n.BuiltIn.Ref;
1379
- const t = Bn(e, o), c = new Array(o);
1427
+ const l = e.getRowCount(), f = e.getColumnCount();
1428
+ if (u) {
1429
+ if (l !== r || f !== a) throw n.BuiltIn.Ref;
1430
+ const t = Un(e, o), c = new Array(o);
1380
1431
  for (let n = 0; n < o; n++) c[n] = [t[n]];
1381
1432
  return {
1382
1433
  ys: s,
1383
1434
  xs: c,
1384
1435
  k: 1,
1385
1436
  isRowOriented: i,
1386
- isRectangularY: l,
1437
+ isRectangularY: u,
1387
1438
  yRows: r,
1388
1439
  yCols: a
1389
1440
  };
1390
1441
  }
1391
- if ((i ? f : u) !== o) throw n.BuiltIn.Ref;
1392
- const c = i ? u : f;
1442
+ if ((i ? f : l) !== o) throw n.BuiltIn.Ref;
1443
+ const c = i ? l : f;
1393
1444
  return {
1394
1445
  ys: s,
1395
- xs: On(e, o, c, i),
1446
+ xs: kn(e, o, c, i),
1396
1447
  k: c,
1397
1448
  isRowOriented: i,
1398
- isRectangularY: l,
1449
+ isRectangularY: u,
1399
1450
  yRows: r,
1400
1451
  yCols: a
1401
1452
  };
1402
- }, An = (t) => {
1453
+ }, On = (t) => {
1403
1454
  const e = new Array(t.length);
1404
1455
  for (let r = 0; r < t.length; r++) {
1405
1456
  if (t[r] <= 0) throw n.BuiltIn.Num;
1406
1457
  e[r] = Math.log(t[r]);
1407
1458
  }
1408
1459
  return e;
1409
- }, wn = (t, e, r) => {
1460
+ }, Pn = (t, e, r) => {
1410
1461
  let a, o, s;
1411
1462
  if (e && e.size > 0) {
1412
1463
  const r = ((t, e) => {
1413
1464
  const r = t.getRowCount(), a = t.getColumnCount(), o = r * a;
1414
1465
  if (0 === o) throw n.BuiltIn.Ref;
1415
1466
  if (1 === e.k) {
1416
- const n = Bn(t, o), e = new Array(o);
1467
+ const n = Un(t, o), e = new Array(o);
1417
1468
  for (let t = 0; t < o; t++) e[t] = [n[t]];
1418
1469
  return {
1419
1470
  xs: e,
@@ -1424,7 +1475,7 @@ var Tn = (t, e) => {
1424
1475
  const s = e.isRowOriented ? a : r;
1425
1476
  if ((e.isRowOriented ? r : a) !== e.k) throw n.BuiltIn.Ref;
1426
1477
  return {
1427
- xs: On(t, s, e.k, e.isRowOriented),
1478
+ xs: kn(t, s, e.k, e.isRowOriented),
1428
1479
  rows: e.isRowOriented ? 1 : s,
1429
1480
  cols: e.isRowOriented ? s : 1
1430
1481
  };
@@ -1432,14 +1483,14 @@ var Tn = (t, e) => {
1432
1483
  a = r.xs, o = r.rows, s = r.cols;
1433
1484
  } else a = t.xs, o = t.yRows, s = t.yCols;
1434
1485
  const i = new Array(o);
1435
- let l = 0;
1486
+ let u = 0;
1436
1487
  for (let t = 0; t < o; t++) {
1437
1488
  const n = new Array(s);
1438
- for (let t = 0; t < s; t++) n[t] = r(a[l++]);
1489
+ for (let t = 0; t < s; t++) n[t] = r(a[u++]);
1439
1490
  i[t] = n;
1440
1491
  }
1441
1492
  return i;
1442
- }, xn = (t, n, e) => {
1493
+ }, Ln = (t, n, e) => {
1443
1494
  const r = t.length, a = n.length > 0 ? n[0].length : 0, o = [], s = [];
1444
1495
  e && (o.push(new Array(r).fill(1)), s.push(a));
1445
1496
  for (let t = a - 1; t >= 0; t--) {
@@ -1447,34 +1498,34 @@ var Tn = (t, e) => {
1447
1498
  for (let a = 0; a < r; a++) e[a] = n[a][t];
1448
1499
  o.push(e), s.push(a - 1 - t);
1449
1500
  }
1450
- const i = [], l = [], u = [];
1501
+ const i = [], u = [], l = [];
1451
1502
  for (let t = 0; t < o.length; t++) {
1452
- const n = o[t].slice(), e = Math.sqrt(Pn(n, n)), a = new Array(l.length).fill(0);
1453
- for (let t = 0; t < 2; t++) for (let t = 0; t < l.length; t++) {
1454
- const e = Pn(l[t], n);
1455
- for (let a = 0; a < r; a++) n[a] -= e * l[t][a];
1503
+ const n = o[t].slice(), e = Math.sqrt(qn(n, n)), a = new Array(u.length).fill(0);
1504
+ for (let t = 0; t < 2; t++) for (let t = 0; t < u.length; t++) {
1505
+ const e = qn(u[t], n);
1506
+ for (let a = 0; a < r; a++) n[a] -= e * u[t][a];
1456
1507
  a[t] += e;
1457
1508
  }
1458
- const s = Math.sqrt(Pn(n, n));
1509
+ const s = Math.sqrt(qn(n, n));
1459
1510
  if (!(s <= 1e-10 * (e || 1))) {
1460
1511
  for (let t = 0; t < r; t++) n[t] /= s;
1461
- a.push(s), l.push(n), u.push(a), i.push(t);
1512
+ a.push(s), u.push(n), l.push(a), i.push(t);
1462
1513
  }
1463
1514
  }
1464
1515
  const f = i.length, c = new Array(f);
1465
- for (let n = 0; n < f; n++) c[n] = Pn(l[n], t);
1516
+ for (let n = 0; n < f; n++) c[n] = qn(u[n], t);
1466
1517
  const m = new Array(f).fill(0);
1467
1518
  for (let t = f - 1; t >= 0; t--) {
1468
1519
  let n = c[t];
1469
- for (let e = t + 1; e < f; e++) n -= u[e][t] * m[e];
1470
- m[t] = n / u[t][t];
1520
+ for (let e = t + 1; e < f; e++) n -= l[e][t] * m[e];
1521
+ m[t] = n / l[t][t];
1471
1522
  }
1472
1523
  const h = Array.from({ length: f }, () => new Array(f).fill(0));
1473
1524
  for (let t = f - 1; t >= 0; t--) {
1474
- h[t][t] = 1 / u[t][t];
1525
+ h[t][t] = 1 / l[t][t];
1475
1526
  for (let n = t + 1; n < f; n++) {
1476
1527
  let e = 0;
1477
- for (let r = t + 1; r <= n; r++) e += u[r][t] * h[r][n];
1528
+ for (let r = t + 1; r <= n; r++) e += l[r][t] * h[r][n];
1478
1529
  h[t][n] = -e * h[t][t];
1479
1530
  }
1480
1531
  }
@@ -1486,15 +1537,15 @@ var Tn = (t, e) => {
1486
1537
  for (let n = t; n < f; n++) e += h[t][n] * h[t][n];
1487
1538
  p[n] = e;
1488
1539
  }
1489
- const D = (t) => {
1540
+ const N = (t) => {
1490
1541
  let n = e ? M[a] : 0;
1491
1542
  for (let e = 0; e < a; e++) n += M[a - 1 - e] * t[e];
1492
1543
  return n;
1493
1544
  };
1494
- let d = 0;
1545
+ let D = 0;
1495
1546
  for (let e = 0; e < r; e++) {
1496
- const r = t[e] - D(n[e] ?? []);
1497
- d += r * r;
1547
+ const r = t[e] - N(n[e] ?? []);
1548
+ D += r * r;
1498
1549
  }
1499
1550
  let g = 0;
1500
1551
  if (e) {
@@ -1503,21 +1554,21 @@ var Tn = (t, e) => {
1503
1554
  n /= r;
1504
1555
  for (let e = 0; e < r; e++) g += (t[e] - n) * (t[e] - n);
1505
1556
  } else for (let n = 0; n < r; n++) g += t[n] * t[n];
1506
- const N = g - d, y = e ? f - 1 : f, b = r - y - (e ? 1 : 0), E = b > 0 ? d / b : 0, v = b > 0 ? Math.sqrt(E) : 0, R = new Array(a + 1).fill(0);
1507
- for (let t = 0; t <= a; t++) R[t] = v * Math.sqrt(Math.max(p[t], 0));
1557
+ const d = g - D, b = e ? f - 1 : f, y = r - b - (e ? 1 : 0), v = y > 0 ? D / y : 0, E = y > 0 ? Math.sqrt(v) : 0, R = new Array(a + 1).fill(0);
1558
+ for (let t = 0; t <= a; t++) R[t] = E * Math.sqrt(Math.max(p[t], 0));
1508
1559
  return {
1509
1560
  coefficients: M,
1510
1561
  standardErrors: R,
1511
- kEffective: y,
1512
- df: b,
1513
- sey: v,
1514
- r2: 0 === g ? 1 : N / g,
1515
- f: b > 0 && y > 0 && 0 !== E ? N / y / E : null,
1516
- ssReg: N,
1517
- ssResid: d,
1518
- predict: D
1562
+ kEffective: b,
1563
+ df: y,
1564
+ sey: E,
1565
+ r2: 0 === g ? 1 : d / g,
1566
+ f: y > 0 && b > 0 && 0 !== v ? d / b / v : null,
1567
+ ssReg: d,
1568
+ ssResid: D,
1569
+ predict: N
1519
1570
  };
1520
- }, Vn = (t, e, r) => {
1571
+ }, Yn = (t, e, r) => {
1521
1572
  const a = e.length, o = n.BuiltIn.NA, s = (t, n) => {
1522
1573
  const e = new Array(a).fill(o);
1523
1574
  return e[0] = t, a > 1 && (e[1] = n), e;
@@ -1529,127 +1580,133 @@ var Tn = (t, e) => {
1529
1580
  s(t.f ?? n.BuiltIn.Num, t.df),
1530
1581
  s(t.ssReg, t.ssResid)
1531
1582
  ];
1532
- }, Bn = (t, e) => {
1583
+ }, Un = (t, e) => {
1533
1584
  const r = new Array(e);
1534
1585
  let a = 0;
1535
- for (const e of t.values(Mn)) {
1586
+ for (const e of t.values(Vn)) {
1536
1587
  if ("number" != typeof e) throw n.BuiltIn.Value;
1537
1588
  r[a++] = e;
1538
1589
  }
1539
1590
  return r;
1540
- }, On = (t, n, e, r) => {
1541
- const a = Bn(t, n * e), o = new Array(n);
1591
+ }, kn = (t, n, e, r) => {
1592
+ const a = Un(t, n * e), o = new Array(n);
1542
1593
  for (let t = 0; t < n; t++) {
1543
1594
  const s = new Array(e);
1544
1595
  for (let o = 0; o < e; o++) s[o] = r ? a[o * n + t] : a[t * e + o];
1545
1596
  o[t] = s;
1546
1597
  }
1547
1598
  return o;
1548
- }, Pn = (t, n) => {
1599
+ }, qn = (t, n) => {
1549
1600
  let e = 0;
1550
1601
  for (let r = 0; r < t.length; r++) e += t[r] * n[r];
1551
1602
  return e;
1552
- }, Fn = o({
1553
- GROWTH: () => kn,
1554
- LINEST: () => Yn,
1555
- LOGEST: () => Ln,
1556
- TREND: () => Un
1603
+ }, Xn = o({
1604
+ GROWTH: () => zn,
1605
+ LINEST: () => jn,
1606
+ LOGEST: () => _n,
1607
+ TREND: () => Gn
1557
1608
  });
1558
- function Yn(t, n, e = !0, r = !1) {
1559
- const a = Tn(t, n), o = xn(a.ys, a.xs, e), s = o.coefficients;
1560
- return r ? Vn(o, s, e) : [s.slice()];
1609
+ function jn(t, n, e = !0, r = !1) {
1610
+ const a = Fn(t, n), o = Ln(a.ys, a.xs, e), s = o.coefficients;
1611
+ return r ? Yn(o, s, e) : [s.slice()];
1561
1612
  }
1562
- function Ln(t, n, e = !0, r = !1) {
1563
- const a = Tn(t, n), o = xn(An(a.ys), a.xs, e), s = o.coefficients.map(Math.exp);
1564
- return r ? Vn(o, s, e) : [s];
1613
+ function _n(t, n, e = !0, r = !1) {
1614
+ const a = Fn(t, n), o = Ln(On(a.ys), a.xs, e), s = o.coefficients.map(Math.exp);
1615
+ return r ? Yn(o, s, e) : [s];
1565
1616
  }
1566
- function Un(t, n, e, r = !0) {
1567
- const a = Tn(t, n);
1568
- return wn(a, e, xn(a.ys, a.xs, r).predict);
1617
+ function Gn(t, n, e, r = !0) {
1618
+ const a = Fn(t, n);
1619
+ return Pn(a, e, Ln(a.ys, a.xs, r).predict);
1569
1620
  }
1570
- function kn(t, n, e, r = !0) {
1571
- const a = Tn(t, n);
1572
- return wn(a, e, xn(An(a.ys), a.xs, r).predict).map((t) => t.map(Math.exp));
1621
+ function zn(t, n, e, r = !0) {
1622
+ const a = Fn(t, n);
1623
+ return Pn(a, e, Ln(On(a.ys), a.xs, r).predict).map((t) => t.map(Math.exp));
1573
1624
  }
1574
- var qn = o({
1575
- TTEST: () => Xn,
1576
- T_TEST: () => jn
1625
+ var Hn = o({
1626
+ TTEST: () => Kn,
1627
+ T_TEST: () => Qn
1577
1628
  });
1578
- function Xn(t, n, e, r) {
1579
- return jn(t, n, e, r);
1629
+ function Kn(t, n, e, r) {
1630
+ return Qn(t, n, e, r);
1580
1631
  }
1581
- function jn(t, e, r, a) {
1632
+ function Qn(t, e, r, a) {
1582
1633
  if (r = Math.floor(r), a = Math.floor(a), ![1, 2].includes(r) || ![
1583
1634
  1,
1584
1635
  2,
1585
1636
  3
1586
1637
  ].includes(a)) return NaN;
1587
- const o = t.getShape(), s = e.getShape(), i = o.rows * o.columns, l = s.rows * s.columns;
1588
- if (1 === a && i !== l) return n.BuiltIn.NA;
1589
- const u = t.flatten(pn), f = e.flatten(pn);
1590
- if (null === u || null === f) return n.BuiltIn.Value;
1591
- if (u.length < 2 || f.length < 2) throw n.BuiltIn.Div0;
1592
- if (1 === a && u.length !== f.length) return n.BuiltIn.NA;
1593
- const c = 1 === a ? function(t, n) {
1594
- const e = t.length;
1595
- let r = 0, a = 0, o = 0;
1596
- for (let s = 0; s < e; s++) r += t[s], a += n[s], o += (t[s] - n[s]) ** 2;
1597
- const s = r - a, i = e * o - s ** 2;
1598
- return 0 === i ? { error: !0 } : {
1599
- x: Math.abs(s) * Math.sqrt((e - 1) / i),
1600
- df: e - 1
1601
- };
1602
- }(u, f) : 2 === a ? function(t, n) {
1603
- const e = t.length, r = n.length;
1604
- let a = 0, o = 0, s = 0, i = 0;
1605
- for (const n of t) a += n, o += n * n;
1606
- for (const t of n) s += t, i += t * t;
1607
- const l = o - a ** 2 / e, u = i - s ** 2 / r, f = Math.sqrt(l + u);
1608
- if (0 === f) return { error: !0 };
1609
- const c = e + r - 2;
1610
- return {
1611
- x: Math.abs(a / e - s / r) / f * Math.sqrt(e * r * c / (e + r)),
1612
- df: c
1613
- };
1614
- }(u, f) : function(t, n) {
1615
- const e = t.length, r = n.length;
1616
- let a = 0, o = 0, s = 0, i = 0;
1617
- for (const n of t) a += n, o += n * n;
1618
- for (const t of n) s += t, i += t * t;
1619
- const l = (o - a ** 2 / e) / (e * (e - 1)), u = (i - s ** 2 / r) / (r * (r - 1));
1620
- if (l + u === 0) return { error: !0 };
1621
- const f = Math.abs(a / e - s / r) / Math.sqrt(l + u), c = l / (l + u);
1622
- return {
1623
- x: f,
1624
- df: 1 / (c ** 2 / (e - 1) + (1 - c) ** 2 / (r - 1))
1625
- };
1626
- }(u, f);
1627
- if ("error" in c) throw n.BuiltIn.Div0;
1638
+ const o = t.getShape(), s = e.getShape(), i = o.rows * o.columns, u = s.rows * s.columns;
1639
+ if (1 === a && i !== u) return n.BuiltIn.NA;
1640
+ let l;
1641
+ if (1 === a) {
1642
+ const r = [], a = [], o = t.flatten(Bn).alignValues([e.flatten(Bn)]);
1643
+ for (const [[t, n]] of o) null !== t && null !== n && (r.push(t), a.push(n));
1644
+ if (r.length < 2) throw n.BuiltIn.Div0;
1645
+ l = function(t, n) {
1646
+ const e = t.length;
1647
+ let r = 0, a = 0, o = 0;
1648
+ for (let s = 0; s < e; s++) r += t[s], a += n[s], o += (t[s] - n[s]) ** 2;
1649
+ const s = r - a, i = e * o - s ** 2;
1650
+ return 0 === i ? { error: !0 } : {
1651
+ x: Math.abs(s) * Math.sqrt((e - 1) / i),
1652
+ df: e - 1
1653
+ };
1654
+ }(r, a);
1655
+ } else {
1656
+ const r = t.getValuesFlat(Bn), o = e.getValuesFlat(Bn);
1657
+ if (r.length < 2 || o.length < 2) throw n.BuiltIn.Div0;
1658
+ l = 2 === a ? function(t, n) {
1659
+ const e = t.length, r = n.length;
1660
+ let a = 0, o = 0, s = 0, i = 0;
1661
+ for (const n of t) a += n, o += n * n;
1662
+ for (const t of n) s += t, i += t * t;
1663
+ const u = o - a ** 2 / e, l = i - s ** 2 / r, f = Math.sqrt(u + l);
1664
+ if (0 === f) return { error: !0 };
1665
+ const c = e + r - 2;
1666
+ return {
1667
+ x: Math.abs(a / e - s / r) / f * Math.sqrt(e * r * c / (e + r)),
1668
+ df: c
1669
+ };
1670
+ }(r, o) : function(t, n) {
1671
+ const e = t.length, r = n.length;
1672
+ let a = 0, o = 0, s = 0, i = 0;
1673
+ for (const n of t) a += n, o += n * n;
1674
+ for (const t of n) s += t, i += t * t;
1675
+ const u = (o - a ** 2 / e) / (e * (e - 1)), l = (i - s ** 2 / r) / (r * (r - 1));
1676
+ if (u + l === 0) return { error: !0 };
1677
+ const f = Math.abs(a / e - s / r) / Math.sqrt(u + l), c = u / (u + l);
1678
+ return {
1679
+ x: f,
1680
+ df: 1 / (c ** 2 / (e - 1) + (1 - c) ** 2 / (r - 1))
1681
+ };
1682
+ }(r, o);
1683
+ }
1684
+ if ("error" in l) throw n.BuiltIn.Div0;
1628
1685
  return function(t, n) {
1629
1686
  const e = .5 * function(t, n, e) {
1630
1687
  if (e <= 0) return 0;
1631
1688
  if (e >= 1) return 1;
1632
- const r = Gn(t) + Gn(n) - Gn(t + n), a = Math.exp(Math.log(e) * t + Math.log(1 - e) * n - r);
1633
- return e < (t + 1) / (t + n + 2) ? a * _n(t, n, e) / t : 1 - a * _n(n, t, 1 - e) / n;
1689
+ const r = $n(t) + $n(n) - $n(t + n), a = Math.exp(Math.log(e) * t + Math.log(1 - e) * n - r);
1690
+ return e < (t + 1) / (t + n + 2) ? a * Wn(t, n, e) / t : 1 - a * Wn(n, t, 1 - e) / n;
1634
1691
  }(n / 2, .5, n / (n + t * t));
1635
1692
  return t >= 0 ? 1 - e : e;
1636
- }(-c.x, c.df) * r;
1693
+ }(-l.x, l.df) * r;
1637
1694
  }
1638
- function _n(t, n, e) {
1695
+ function Wn(t, n, e) {
1639
1696
  const r = 1e-30, a = t + n, o = t + 1, s = t - 1;
1640
- let i = 1, l = 1 - a * e / o;
1641
- Math.abs(l) < r && (l = r), l = 1 / l;
1642
- let u = l;
1697
+ let i = 1, u = 1 - a * e / o;
1698
+ Math.abs(u) < r && (u = r), u = 1 / u;
1699
+ let l = u;
1643
1700
  for (let f = 1; f <= 200; f++) {
1644
1701
  const c = 2 * f;
1645
1702
  let m = f * (n - f) * e / ((s + c) * (t + c));
1646
- l = 1 + m * l, Math.abs(l) < r && (l = r), i = 1 + m / i, Math.abs(i) < r && (i = r), l = 1 / l, u *= l * i, m = -(t + f) * (a + f) * e / ((t + c) * (o + c)), l = 1 + m * l, Math.abs(l) < r && (l = r), i = 1 + m / i, Math.abs(i) < r && (i = r), l = 1 / l;
1647
- const h = l * i;
1648
- if (u *= h, Math.abs(h - 1) < 3e-7) break;
1703
+ u = 1 + m * u, Math.abs(u) < r && (u = r), i = 1 + m / i, Math.abs(i) < r && (i = r), u = 1 / u, l *= u * i, m = -(t + f) * (a + f) * e / ((t + c) * (o + c)), u = 1 + m * u, Math.abs(u) < r && (u = r), i = 1 + m / i, Math.abs(i) < r && (i = r), u = 1 / u;
1704
+ const h = u * i;
1705
+ if (l *= h, Math.abs(h - 1) < 3e-16) break;
1649
1706
  }
1650
- return u;
1707
+ return l;
1651
1708
  }
1652
- function Gn(t) {
1709
+ function $n(t) {
1653
1710
  const n = [
1654
1711
  .9999999999998099,
1655
1712
  676.5203681218851,
@@ -1661,21 +1718,21 @@ function Gn(t) {
1661
1718
  9984369578019572e-21,
1662
1719
  1.5056327351493116e-7
1663
1720
  ];
1664
- if (t < .5) return Math.log(Math.PI / Math.sin(Math.PI * t)) - Gn(1 - t);
1721
+ if (t < .5) return Math.log(Math.PI / Math.sin(Math.PI * t)) - $n(1 - t);
1665
1722
  t--;
1666
1723
  let e = n[0];
1667
1724
  for (let r = 1; r < 9; r++) e += n[r] / (t + r);
1668
1725
  const r = t + 7.5;
1669
1726
  return .5 * Math.log(2 * Math.PI) + (t + .5) * Math.log(r) - r + Math.log(e);
1670
1727
  }
1671
- var zn = o({
1672
- REGEXEXTRACT: () => Hn,
1673
- REGEXMATCH: () => Kn,
1674
- REGEXREPLACE: () => Qn,
1675
- REGEXTEST: () => Wn
1728
+ var Zn = o({
1729
+ REGEXEXTRACT: () => Jn,
1730
+ REGEXMATCH: () => te,
1731
+ REGEXREPLACE: () => ne,
1732
+ REGEXTEST: () => ee
1676
1733
  });
1677
- function Hn(e, r, a = 0, o = !1) {
1678
- const s = $n(r, o);
1734
+ function Jn(e, r, a = 0, o = !1) {
1735
+ const s = re(r, o);
1679
1736
  if (n.isError(s)) return s;
1680
1737
  if (0 === a) {
1681
1738
  const r = e.match(s);
@@ -1696,44 +1753,44 @@ function Hn(e, r, a = 0, o = !1) {
1696
1753
  }
1697
1754
  return n.BuiltIn.Value;
1698
1755
  }
1699
- function Kn(t, e, r = !1) {
1700
- const a = $n(e, r);
1756
+ function te(t, e, r = !1) {
1757
+ const a = re(e, r);
1701
1758
  return n.isError(a) ? a : a.test(t);
1702
1759
  }
1703
- function Qn(t, e, r, a = 0, o = !1) {
1704
- const s = $n(e, o);
1760
+ function ne(t, e, r, a = 0, o = !1) {
1761
+ const s = re(e, o);
1705
1762
  if (n.isError(s)) return s;
1706
1763
  if (0 === a) {
1707
1764
  const n = new RegExp(s.source, s.flags + "g");
1708
1765
  return t.replace(n, r);
1709
1766
  }
1710
- let i = 0, l = t;
1711
- const u = new RegExp(s.source, s.flags);
1767
+ let i = 0, u = t;
1768
+ const l = new RegExp(s.source, s.flags);
1712
1769
  let f = 0;
1713
- for (; f <= l.length;) {
1714
- const t = l.slice(f).match(u);
1770
+ for (; f <= u.length;) {
1771
+ const t = u.slice(f).match(l);
1715
1772
  if (!t || void 0 === t.index) break;
1716
1773
  if (i++, i === a) {
1717
1774
  const n = f + t.index;
1718
- l = l.slice(0, n) + t[0].replace(u, r) + l.slice(n + t[0].length);
1775
+ u = u.slice(0, n) + t[0].replace(l, r) + u.slice(n + t[0].length);
1719
1776
  break;
1720
1777
  }
1721
1778
  f += t.index + Math.max(t[0].length, 1);
1722
1779
  }
1723
- return l;
1780
+ return u;
1724
1781
  }
1725
- function Wn(t, e, r = !1) {
1726
- const a = $n(e, r);
1782
+ function ee(t, e, r = !1) {
1783
+ const a = re(e, r);
1727
1784
  return n.isError(a) ? a : a.test(t);
1728
1785
  }
1729
- function $n(t, e) {
1786
+ function re(t, e) {
1730
1787
  try {
1731
1788
  return new RegExp(t, e ? "i" : "");
1732
1789
  } catch {
1733
1790
  return n.BuiltIn.Value;
1734
1791
  }
1735
1792
  }
1736
- var Zn = {
1793
+ var ae = {
1737
1794
  CUBEKPIMEMBER: {
1738
1795
  p: [
1739
1796
  {
@@ -1850,7 +1907,7 @@ var Zn = {
1850
1907
  }],
1851
1908
  r: { s: "string" }
1852
1909
  }
1853
- }, Jn = { ACCRINT: {
1910
+ }, oe = { ACCRINT: {
1854
1911
  p: [
1855
1912
  { n: "issue" },
1856
1913
  { n: "firstInterest" },
@@ -1871,7 +1928,7 @@ var Zn = {
1871
1928
  }
1872
1929
  ],
1873
1930
  r: { s: "number" }
1874
- } }, te = { AMORDEGRC: {
1931
+ } }, se = { AMORDEGRC: {
1875
1932
  p: [
1876
1933
  { n: "cost" },
1877
1934
  { n: "datePurchased" },
@@ -1886,7 +1943,7 @@ var Zn = {
1886
1943
  }
1887
1944
  ],
1888
1945
  r: { s: "number" }
1889
- } }, ne = {
1946
+ } }, ie = {
1890
1947
  DATEDIF: {
1891
1948
  p: [
1892
1949
  { n: "startDate" },
@@ -1930,7 +1987,7 @@ var Zn = {
1930
1987
  ],
1931
1988
  r: { s: "number" }
1932
1989
  }
1933
- }, ee = {
1990
+ }, ue = {
1934
1991
  COUPDAYS: {
1935
1992
  p: [
1936
1993
  { n: "settlement" },
@@ -1945,24 +2002,74 @@ var Zn = {
1945
2002
  r: { s: "number" }
1946
2003
  },
1947
2004
  CUMIPMT: {
2005
+ x: ["noReferenceLift", "noMemberFilter"],
1948
2006
  p: [
1949
- { n: "rate" },
1950
- { n: "nper" },
1951
- { n: "pv" },
1952
- { n: "startPeriod" },
1953
- { n: "endPeriod" },
1954
- { n: "type" }
2007
+ {
2008
+ n: "rate",
2009
+ s: "*",
2010
+ u: 1
2011
+ },
2012
+ {
2013
+ n: "nper",
2014
+ s: "*",
2015
+ u: 1
2016
+ },
2017
+ {
2018
+ n: "pv",
2019
+ s: "*",
2020
+ u: 1
2021
+ },
2022
+ {
2023
+ n: "startPeriod",
2024
+ s: "*",
2025
+ u: 1
2026
+ },
2027
+ {
2028
+ n: "endPeriod",
2029
+ s: "*",
2030
+ u: 1
2031
+ },
2032
+ {
2033
+ n: "type",
2034
+ s: "*",
2035
+ u: 1
2036
+ }
1955
2037
  ],
1956
2038
  r: { s: "number" }
1957
2039
  },
1958
2040
  CUMPRINC: {
2041
+ x: ["noReferenceLift", "noMemberFilter"],
1959
2042
  p: [
1960
- { n: "rate" },
1961
- { n: "nper" },
1962
- { n: "pv" },
1963
- { n: "startPeriod" },
1964
- { n: "endPeriod" },
1965
- { n: "type" }
2043
+ {
2044
+ n: "rate",
2045
+ s: "*",
2046
+ u: 1
2047
+ },
2048
+ {
2049
+ n: "nper",
2050
+ s: "*",
2051
+ u: 1
2052
+ },
2053
+ {
2054
+ n: "pv",
2055
+ s: "*",
2056
+ u: 1
2057
+ },
2058
+ {
2059
+ n: "startPeriod",
2060
+ s: "*",
2061
+ u: 1
2062
+ },
2063
+ {
2064
+ n: "endPeriod",
2065
+ s: "*",
2066
+ u: 1
2067
+ },
2068
+ {
2069
+ n: "type",
2070
+ s: "*",
2071
+ u: 1
2072
+ }
1966
2073
  ],
1967
2074
  r: { s: "number" }
1968
2075
  },
@@ -2017,7 +2124,16 @@ var Zn = {
2017
2124
  r: { s: "number" }
2018
2125
  },
2019
2126
  EFFECT: {
2020
- p: [{ n: "nominalRate" }, { n: "npery" }],
2127
+ x: ["noReferenceLift", "noMemberFilter"],
2128
+ p: [{
2129
+ n: "nominalRate",
2130
+ s: "*",
2131
+ u: 1
2132
+ }, {
2133
+ n: "npery",
2134
+ s: "*",
2135
+ u: 1
2136
+ }],
2021
2137
  r: { s: "number" }
2022
2138
  },
2023
2139
  FV: {
@@ -2040,9 +2156,16 @@ var Zn = {
2040
2156
  r: { s: "number" }
2041
2157
  },
2042
2158
  FVSCHEDULE: {
2043
- p: [{ n: "principal" }, {
2159
+ x: ["noReferenceLift", "noMemberFilter"],
2160
+ p: [{
2161
+ n: "principal",
2162
+ s: "*",
2163
+ u: 1
2164
+ }, {
2044
2165
  n: "schedule",
2045
- r: "r"
2166
+ r: "r",
2167
+ o: "accept",
2168
+ u: 1
2046
2169
  }],
2047
2170
  r: { s: "number" }
2048
2171
  },
@@ -2097,7 +2220,16 @@ var Zn = {
2097
2220
  r: { s: "number" }
2098
2221
  },
2099
2222
  NOMINAL: {
2100
- p: [{ n: "effectiveRate" }, { n: "npery" }],
2223
+ x: ["noReferenceLift", "noMemberFilter"],
2224
+ p: [{
2225
+ n: "effectiveRate",
2226
+ s: "*",
2227
+ u: 1
2228
+ }, {
2229
+ n: "npery",
2230
+ s: "*",
2231
+ u: 1
2232
+ }],
2101
2233
  r: { s: "number" }
2102
2234
  },
2103
2235
  NPER: {
@@ -2121,7 +2253,11 @@ var Zn = {
2121
2253
  NPV: {
2122
2254
  p: [{ n: "rate" }, {
2123
2255
  n: "value",
2124
- g: [{ n: "value" }]
2256
+ g: [{
2257
+ n: "value",
2258
+ s: "number",
2259
+ r: "r"
2260
+ }]
2125
2261
  }],
2126
2262
  r: { s: "number" }
2127
2263
  },
@@ -2335,7 +2471,7 @@ var Zn = {
2335
2471
  ],
2336
2472
  r: { s: "*" }
2337
2473
  }
2338
- }, re = {
2474
+ }, le = {
2339
2475
  ACCRINTM: {
2340
2476
  p: [
2341
2477
  { n: "issue" },
@@ -2438,7 +2574,7 @@ var Zn = {
2438
2574
  ],
2439
2575
  r: { s: "number" }
2440
2576
  }
2441
- }, ae = {
2577
+ }, fe = {
2442
2578
  COUPDAYBS: {
2443
2579
  p: [
2444
2580
  { n: "settlement" },
@@ -2517,7 +2653,7 @@ var Zn = {
2517
2653
  ],
2518
2654
  r: { s: "number" }
2519
2655
  }
2520
- }, oe = {
2656
+ }, ce = {
2521
2657
  PRICE: {
2522
2658
  p: [
2523
2659
  { n: "settlement" },
@@ -2580,7 +2716,7 @@ var Zn = {
2580
2716
  ],
2581
2717
  r: { s: "number" }
2582
2718
  }
2583
- }, se = {
2719
+ }, me = {
2584
2720
  ODDFPRICE: {
2585
2721
  p: [
2586
2722
  { n: "settlement" },
@@ -2651,7 +2787,7 @@ var Zn = {
2651
2787
  ],
2652
2788
  r: { s: "number" }
2653
2789
  }
2654
- }, ie = { VDB: {
2790
+ }, he = { VDB: {
2655
2791
  p: [
2656
2792
  { n: "cost" },
2657
2793
  { n: "salvage" },
@@ -2671,7 +2807,7 @@ var Zn = {
2671
2807
  }
2672
2808
  ],
2673
2809
  r: { s: "number" }
2674
- } }, le = {
2810
+ } }, Me = {
2675
2811
  "FORECAST.ETS": {
2676
2812
  fn: "FORECAST_ETS",
2677
2813
  p: [
@@ -2791,7 +2927,7 @@ var Zn = {
2791
2927
  ],
2792
2928
  r: { s: "*" }
2793
2929
  }
2794
- }, ue = {
2930
+ }, pe = {
2795
2931
  LINEST: {
2796
2932
  p: [
2797
2933
  {
@@ -2916,7 +3052,7 @@ var Zn = {
2916
3052
  r: "m"
2917
3053
  }
2918
3054
  }
2919
- }, fe = {
3055
+ }, Ne = {
2920
3056
  TTEST: {
2921
3057
  p: [
2922
3058
  {
@@ -2952,7 +3088,7 @@ var Zn = {
2952
3088
  ],
2953
3089
  r: { s: "number" }
2954
3090
  }
2955
- }, ce = {
3091
+ }, De = {
2956
3092
  REGEXEXTRACT: {
2957
3093
  p: [
2958
3094
  {
@@ -3043,5 +3179,5 @@ var Zn = {
3043
3179
  ],
3044
3180
  r: { s: "*" }
3045
3181
  }
3046
- }, me = () => import("./C8ez6oBw4sdDzSct.mjs"), he = () => import("./CLQ1_t-YsFFTRbw1.mjs"), Me = () => import("./v_larpTXJns5MbG8.mjs"), pe = () => import("./Cmx9jVLihcV7UU9j.mjs"), De = () => import("./CYm12WYrfdzPk8cm.mjs"), de = () => import("./BXjhl9UdRwdpTLAB.mjs"), ge = () => import("./CzzpVN7fGDVLTBAQ.mjs"), Ne = () => import("./C1Of99Li1xuXVvHC.mjs"), ye = () => import("./CVd2CtlxuMv1IuIq.mjs"), be = () => import("./DN1_rspUH-tOwmED.mjs"), Ee = () => import("./D-wUpQDKX_k0SiSj.mjs"), ve = () => import("./BfPVZqcuHtLRxqLI.mjs"), Re = () => import("./CVifmXw-tD8LimNW.mjs"), Ie = () => import("./DEQPjlaWWG7gXPtm.mjs"), Se = (t, n, e) => (e || (e = /* @__PURE__ */ new Map()), n(e, t, s, Zn, me, "Cube"), n(e, t, q, Jn, he, "Financial"), n(e, t, _, te, Me, "Financial"), n(e, t, H, ne, pe, "Financial"), n(e, t, Z, ee, De, "Financial"), n(e, t, Bt, re, de, "Financial"), n(e, t, Xt, ae, ge, "Financial"), n(e, t, $t, oe, Ne, "Financial"), n(e, t, en, se, ye, "Financial"), n(e, t, mn, ie, be, "Financial"), n(e, t, Dn, le, Ee, "Statistical"), n(e, t, Fn, ue, ve, "Statistical"), n(e, t, qn, fe, Re, "Statistical"), n(e, t, zn, ce, Ie, "Text"), e);
3047
- export { Se as default };
3182
+ }, ge = () => import("./BuGemmv84T8m0wqw.mjs"), de = () => import("./CwoMEzOtRihuYUTr.mjs"), be = () => import("./CnVJ8GAsshRjRGA-.mjs"), ye = () => import("./BRwwvGaJ6HvkxjFC.mjs"), ve = () => import("./Dy6UD7hQRBsT0WNp.mjs"), Ee = () => import("./DodhOXkSzelSxHmB.mjs"), Re = () => import("./Bma3CN4_Nec6_4n7.mjs"), Ie = () => import("./B1VmvhXuEn7zaTB9.mjs"), Se = () => import("./vu0NRDeeTbEHPMYS.mjs"), Ce = () => import("./COqdI1LYTHd9oLA6.mjs"), xe = () => import("./DpoZ7h1ScIJvbOY9.mjs"), Te = () => import("./BQyZVLTMNFLbjVap.mjs"), Ae = () => import("./LAkTk93odAfpvx50.mjs"), we = () => import("./srpVt74r2zbvm1N0.mjs"), Ve = (t, n, e) => (e || (e = /* @__PURE__ */ new Map()), n(e, t, s, ae, ge, "Cube"), n(e, t, q, oe, de, "Financial"), n(e, t, _, se, be, "Financial"), n(e, t, K, ie, ye, "Financial"), n(e, t, tt, ue, ve, "Financial"), n(e, t, Ut, le, Ee, "Financial"), n(e, t, Kt, fe, Re, "Financial"), n(e, t, rn, ce, Ie, "Financial"), n(e, t, ln, me, Se, "Financial"), n(e, t, gn, he, Ce, "Financial"), n(e, t, bn, Me, xe, "Statistical"), n(e, t, Xn, pe, Te, "Statistical"), n(e, t, Hn, Ne, Ae, "Statistical"), n(e, t, Zn, De, we, "Text"), e);
3183
+ export { Ve as default };