@univerjs/engine-formula 0.10.9 → 0.10.10-experimental.20251010-3f807c5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +440 -440
- package/lib/index.js +440 -440
- package/lib/umd/index.js +2 -2
- package/package.json +5 -5
- package/LICENSE +0 -176
package/lib/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var Ku = Object.defineProperty;
|
|
2
2
|
var Xu = (i, a, e) => a in i ? Ku(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
|
|
3
3
|
var A = (i, a, e) => Xu(i, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
-
import { ObjectMatrix as Ce, CommandType as
|
|
4
|
+
import { ObjectMatrix as Ce, CommandType as Fe, RANGE_TYPE as et, AbsoluteRefType as we, Tools as qe, createIdentifier as Ze, Disposable as Ne, IUniverInstanceService as Yn, LRUMap as Zu, hashAlgorithm as zu, moveRangeByOffset as aa, isValidRange as Ju, isFormulaString as dt, isFormulaId as Nt, Rectangle as Za, cellToRange as ec, Inject as ye, UniverInstanceType as fr, BooleanNumber as qi, LocaleService as tc, LocaleType as mt, numfmt as At, BuildTextUtils as rc, isRealNum as W, getNumfmtParseValueFilter as nc, CellValueType as Vt, isTextFormat as sc, RichTextBuilder as ac, toDisposable as ic, Injector as Ki, generateRandomId as oc, sortRules as uc, RTree as Os, IConfigService as ia, AsyncLock as cc, requestImmediateMacroTask as lc, ICommandService as ir, DataStreamTreeTokenType as Te, DisposableCollection as fc, Optional as hc, Plugin as mc, merge as gc, touchDependencies as cs } from "@univerjs/core";
|
|
5
5
|
import { Subject as hr, BehaviorSubject as Xi, distinctUntilChanged as Zi, combineLatest as dc, map as Cc, Observable as _c, shareReplay as Ac } from "rxjs";
|
|
6
6
|
import { DataSyncPrimaryController as Ec } from "@univerjs/rpc";
|
|
7
|
-
var
|
|
7
|
+
var rr = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(rr || {}), Ut = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(Ut || {}), ct = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ct || {});
|
|
8
8
|
function bc(i, a, e, t, r) {
|
|
9
9
|
for (let n = 0, s = i.length; n < s; n++) {
|
|
10
10
|
const o = i[n];
|
|
@@ -17,7 +17,7 @@ function bc(i, a, e, t, r) {
|
|
|
17
17
|
return !1;
|
|
18
18
|
}
|
|
19
19
|
var m = /* @__PURE__ */ ((i) => (i.DIV_BY_ZERO = "#DIV/0!", i.NAME = "#NAME?", i.VALUE = "#VALUE!", i.NUM = "#NUM!", i.NA = "#N/A", i.CYCLE = "#CYCLE!", i.REF = "#REF!", i.SPILL = "#SPILL!", i.CALC = "#CALC!", i.ERROR = "#ERROR!", i.CONNECT = "#GETTING_DATA", i.NULL = "#NULL!", i))(m || {});
|
|
20
|
-
const
|
|
20
|
+
const or = new Set(Object.values(m)), za = [...new Set(Object.values(m).map((i) => i.length))];
|
|
21
21
|
var yc = /* @__PURE__ */ ((i) => (i[i.Financial = 0] = "Financial", i[i.Date = 1] = "Date", i[i.Math = 2] = "Math", i[i.Statistical = 3] = "Statistical", i[i.Lookup = 4] = "Lookup", i[i.Database = 5] = "Database", i[i.Text = 6] = "Text", i[i.Logical = 7] = "Logical", i[i.Information = 8] = "Information", i[i.Engineering = 9] = "Engineering", i[i.Cube = 10] = "Cube", i[i.Compatibility = 11] = "Compatibility", i[i.Web = 12] = "Web", i[i.Array = 13] = "Array", i[i.Univer = 14] = "Univer", i[i.User = 15] = "User", i[i.DefinedName = 16] = "DefinedName", i))(yc || {}), X = /* @__PURE__ */ ((i) => (i.PLUS = "+", i.MINUS = "-", i.MULTIPLY = "*", i.DIVIDED = "/", i.CONCATENATE = "&", i.POWER = "^", i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(X || {}), k = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(k || {});
|
|
22
22
|
const sn = /* @__PURE__ */ new Map([
|
|
23
23
|
["<>", 4],
|
|
@@ -33,7 +33,7 @@ const sn = /* @__PURE__ */ new Map([
|
|
|
33
33
|
["*", 1],
|
|
34
34
|
["^", 0]
|
|
35
35
|
// ^
|
|
36
|
-
]),
|
|
36
|
+
]), xt = new Set(sn.keys()), Rc = /* @__PURE__ */ new Set([
|
|
37
37
|
"=",
|
|
38
38
|
"<>",
|
|
39
39
|
">",
|
|
@@ -117,7 +117,7 @@ const Mc = /* @__PURE__ */ new Set([
|
|
|
117
117
|
function wc(i) {
|
|
118
118
|
return Mc.has(i);
|
|
119
119
|
}
|
|
120
|
-
const Ji = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Ji), Sc = "((?![\\[\\]\\/?*\\\\]).)*!",
|
|
120
|
+
const Ji = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Ji), Sc = "((?![\\[\\]\\/?*\\\\]).)*!", It = "$", oa = "\\s*?:\\s*?", dn = "[A-Za-z]+", Cn = "[1-9][0-9]*", Vr = `'?(${Ji})?(${Sc})?'?`, Ms = `\\${It}?${dn}\\${It}?${Cn}`, Dc = `^(${Me.AT})?${Vr}${Ms}${oa}${Ms}$`, ei = new RegExp(Dc), Lc = `^${Vr}\\s*?${Ms}(${tt.POUND})?$`, ti = new RegExp(Lc), Pc = `^${Vr}\\${It}?${Cn}${oa}\\${It}?${Cn}$`, ri = new RegExp(Pc), xc = `^${Vr}\\${It}?${dn}${oa}\\${It}?${dn}$`, ni = new RegExp(xc), jc = `^${Vr}\\s*?\\${It}?${Cn}$`, si = new RegExp(jc), Uc = `^${Vr}\\s*?\\${It}?${dn}$`, ai = new RegExp(Uc), vc = "{.*?}", ii = new RegExp(vc, "g");
|
|
121
121
|
function Br(i) {
|
|
122
122
|
return ti.lastIndex = 0, ti.test(i);
|
|
123
123
|
}
|
|
@@ -172,11 +172,11 @@ function Fc(i) {
|
|
|
172
172
|
}
|
|
173
173
|
const kc = {
|
|
174
174
|
id: "formula.mutation.register-function",
|
|
175
|
-
type:
|
|
175
|
+
type: Fe.MUTATION,
|
|
176
176
|
handler: () => !0
|
|
177
177
|
}, ws = {
|
|
178
178
|
id: "formula.mutation.set-array-formula-data",
|
|
179
|
-
type:
|
|
179
|
+
type: Fe.MUTATION,
|
|
180
180
|
handler: (i, a) => !0
|
|
181
181
|
}, $c = /[^0-9]/g, Yc = /[^A-Za-z]/g;
|
|
182
182
|
function on(i) {
|
|
@@ -201,7 +201,7 @@ function oi(i = we.NONE) {
|
|
|
201
201
|
columnAbsoluteString: e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Ft(i) {
|
|
205
205
|
const {
|
|
206
206
|
startColumn: a,
|
|
207
207
|
startRow: e,
|
|
@@ -223,14 +223,14 @@ function It(i) {
|
|
|
223
223
|
return l === f ? l : `${l}:${f}`;
|
|
224
224
|
}
|
|
225
225
|
function Hc(i, a) {
|
|
226
|
-
return `${io(i)}!${
|
|
226
|
+
return `${io(i)}!${Ft(a)}`;
|
|
227
227
|
}
|
|
228
228
|
function Gc(i, a, e) {
|
|
229
|
-
return Ds(i) || Ds(a) ? `'[${Ls(i)}]${Ls(a)}'!${
|
|
229
|
+
return Ds(i) || Ds(a) ? `'[${Ls(i)}]${Ls(a)}'!${Ft(e)}` : `[${i}]${a}!${Ft(e)}`;
|
|
230
230
|
}
|
|
231
231
|
function Ss(i) {
|
|
232
232
|
const { unitId: a, sheetName: e, range: t } = i;
|
|
233
|
-
return a != null && a.length > 0 && e != null && e.length > 0 ? Gc(a, e, t) : e != null && e.length > 0 ? Hc(e, t) :
|
|
233
|
+
return a != null && a.length > 0 && e != null && e.length > 0 ? Gc(a, e, t) : e != null && e.length > 0 ? Hc(e, t) : Ft(t);
|
|
234
234
|
}
|
|
235
235
|
function fs(i) {
|
|
236
236
|
const a = Number.parseInt(i.replace($c, "")) - 1, e = qe.ABCatNum(i.replace(Yc, "")), t = on(i);
|
|
@@ -394,7 +394,7 @@ let Ps = class extends Ne {
|
|
|
394
394
|
return this._currentRange;
|
|
395
395
|
}
|
|
396
396
|
getCurrentRangeForString() {
|
|
397
|
-
return
|
|
397
|
+
return Ft(this._currentRange.range);
|
|
398
398
|
}
|
|
399
399
|
registerDefinedNames(a, e) {
|
|
400
400
|
this._definedNameMap[a] = e, this._updateCache(a), this._update();
|
|
@@ -459,7 +459,7 @@ const Nr = Ze("univer.formula.defined-names.service"), Jb = (i, a) => {
|
|
|
459
459
|
};
|
|
460
460
|
}, ca = {
|
|
461
461
|
id: "formula.mutation.set-defined-name",
|
|
462
|
-
type:
|
|
462
|
+
type: Fe.MUTATION,
|
|
463
463
|
handler: (i, a) => {
|
|
464
464
|
if (a == null)
|
|
465
465
|
return !1;
|
|
@@ -475,7 +475,7 @@ const Nr = Ze("univer.formula.defined-names.service"), Jb = (i, a) => {
|
|
|
475
475
|
}
|
|
476
476
|
}, oo = {
|
|
477
477
|
id: "formula.mutation.remove-defined-name",
|
|
478
|
-
type:
|
|
478
|
+
type: Fe.MUTATION,
|
|
479
479
|
handler: (i, a) => {
|
|
480
480
|
if (a == null)
|
|
481
481
|
return !1;
|
|
@@ -484,54 +484,54 @@ const Nr = Ze("univer.formula.defined-names.service"), Jb = (i, a) => {
|
|
|
484
484
|
}
|
|
485
485
|
}, la = {
|
|
486
486
|
id: "formula.mutation.set-feature-calculation",
|
|
487
|
-
type:
|
|
487
|
+
type: Fe.MUTATION,
|
|
488
488
|
handler: () => !0
|
|
489
489
|
}, fa = {
|
|
490
490
|
id: "formula.mutation.remove-feature-calculation",
|
|
491
|
-
type:
|
|
491
|
+
type: Fe.MUTATION,
|
|
492
492
|
handler: () => !0
|
|
493
493
|
}, uo = {
|
|
494
494
|
id: "formula.mutation.set-formula-calculation-start",
|
|
495
|
-
type:
|
|
495
|
+
type: Fe.MUTATION,
|
|
496
496
|
handler: () => !0
|
|
497
497
|
}, co = {
|
|
498
498
|
id: "formula.mutation.set-formula-calculation-stop",
|
|
499
|
-
type:
|
|
499
|
+
type: Fe.MUTATION,
|
|
500
500
|
handler: () => !0
|
|
501
501
|
}, _n = {
|
|
502
502
|
id: "formula.mutation.set-formula-calculation-notification",
|
|
503
|
-
type:
|
|
503
|
+
type: Fe.MUTATION,
|
|
504
504
|
handler: () => !0
|
|
505
505
|
}, lo = {
|
|
506
506
|
id: "formula.mutation.set-formula-calculation-result",
|
|
507
|
-
type:
|
|
507
|
+
type: Fe.MUTATION,
|
|
508
508
|
handler: () => !0
|
|
509
509
|
}, fo = {
|
|
510
510
|
id: "formula.mutation.set-formula-data",
|
|
511
|
-
type:
|
|
511
|
+
type: Fe.MUTATION,
|
|
512
512
|
handler: (i, a) => !0
|
|
513
513
|
}, ha = {
|
|
514
514
|
id: "formula.mutation.set-other-formula",
|
|
515
|
-
type:
|
|
515
|
+
type: Fe.MUTATION,
|
|
516
516
|
handler: () => !0
|
|
517
517
|
}, ma = {
|
|
518
518
|
id: "formula.mutation.remove-other-formula",
|
|
519
|
-
type:
|
|
519
|
+
type: Fe.MUTATION,
|
|
520
520
|
handler: () => !0
|
|
521
521
|
}, el = {
|
|
522
522
|
id: "formula.mutation.set-super-table",
|
|
523
|
-
type:
|
|
523
|
+
type: Fe.MUTATION,
|
|
524
524
|
handler: () => !0
|
|
525
525
|
}, tl = {
|
|
526
526
|
id: "formula.mutation.remove-super-table",
|
|
527
|
-
type:
|
|
527
|
+
type: Fe.MUTATION,
|
|
528
528
|
handler: () => !0
|
|
529
529
|
}, ho = {
|
|
530
530
|
id: "formula.mutation.set-super-table-option",
|
|
531
|
-
type:
|
|
531
|
+
type: Fe.MUTATION,
|
|
532
532
|
handler: () => !0
|
|
533
533
|
};
|
|
534
|
-
class
|
|
534
|
+
class wt {
|
|
535
535
|
constructor(a) {
|
|
536
536
|
A(this, "_cache");
|
|
537
537
|
this._cache = new Zu(a);
|
|
@@ -557,7 +557,7 @@ class Mt {
|
|
|
557
557
|
return a.length <= 64 ? a : zu(a).toString();
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const gt = "P_1", Tt = "R_1", dr = "L_1", Ir = "LR_1", mo = "LO_1", rl = "LET", Lr = "LAMBDA", nl = "CUBE", sl = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), xs = new wt(1e5);
|
|
561
561
|
function Cr(i) {
|
|
562
562
|
const a = xs.get(i);
|
|
563
563
|
if (a)
|
|
@@ -578,7 +578,7 @@ function ci(i) {
|
|
|
578
578
|
class ae {
|
|
579
579
|
constructor() {
|
|
580
580
|
A(this, "_parent");
|
|
581
|
-
A(this, "_token",
|
|
581
|
+
A(this, "_token", Tt);
|
|
582
582
|
A(this, "_children", []);
|
|
583
583
|
A(this, "_lambdaId");
|
|
584
584
|
A(this, "_functionDefinitionPrivacyVar");
|
|
@@ -682,7 +682,7 @@ class ae {
|
|
|
682
682
|
return r;
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
const go = 2e3, hs = new
|
|
685
|
+
const go = 2e3, hs = new wt(go), ms = new wt(go);
|
|
686
686
|
class ga extends Ne {
|
|
687
687
|
constructor() {
|
|
688
688
|
super(...arguments);
|
|
@@ -752,7 +752,7 @@ class ga extends Ne {
|
|
|
752
752
|
let s = n.getParent(), o = n;
|
|
753
753
|
for (; s; ) {
|
|
754
754
|
const u = s.getToken();
|
|
755
|
-
if (u !==
|
|
755
|
+
if (u !== gt && !an(u) && s.getStartIndex() !== -1) {
|
|
756
756
|
const c = s.getChildren().indexOf(o);
|
|
757
757
|
return {
|
|
758
758
|
functionName: u,
|
|
@@ -779,7 +779,7 @@ class ga extends Ne {
|
|
|
779
779
|
let u = o.getParent(), c = 0;
|
|
780
780
|
for (s[1] === K.OPEN_BRACKET && c++; u; ) {
|
|
781
781
|
const l = u.getToken();
|
|
782
|
-
l !==
|
|
782
|
+
l !== gt && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Lr && (t === 0 ? c += 1 : t--), u = u.getParent();
|
|
783
783
|
}
|
|
784
784
|
return c;
|
|
785
785
|
}
|
|
@@ -865,7 +865,7 @@ class ga extends Ne {
|
|
|
865
865
|
if (this._currentLexerNode.getChildren().length === 0)
|
|
866
866
|
return !0;
|
|
867
867
|
const e = this._currentLexerNode.getChildren()[0];
|
|
868
|
-
return !!(e instanceof ae ||
|
|
868
|
+
return !!(e instanceof ae || xt.has(e) || ls.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
|
|
869
869
|
}
|
|
870
870
|
// eslint-disable-next-line complexity
|
|
871
871
|
getSequenceNode(e) {
|
|
@@ -977,7 +977,7 @@ class ga extends Ne {
|
|
|
977
977
|
if (h && !d)
|
|
978
978
|
return h;
|
|
979
979
|
}
|
|
980
|
-
this._resetCurrentLexerNode(), this._currentLexerNode.setToken(
|
|
980
|
+
this._resetCurrentLexerNode(), this._currentLexerNode.setToken(Tt);
|
|
981
981
|
const s = [];
|
|
982
982
|
let o = this._nodeMaker(e, s);
|
|
983
983
|
if (o === m.VALUE || s.length === 0)
|
|
@@ -987,7 +987,7 @@ class ga extends Ne {
|
|
|
987
987
|
const { hasDefinedName: h, sequenceString: d, definedNames: _ } = r(s);
|
|
988
988
|
u = h, c = d, l = _;
|
|
989
989
|
}
|
|
990
|
-
if (u && (this._resetCurrentLexerNode(), this._currentLexerNode.setToken(
|
|
990
|
+
if (u && (this._resetCurrentLexerNode(), this._currentLexerNode.setToken(Tt), o = this._nodeMaker(`=${c}`), o === m.VALUE))
|
|
991
991
|
return o;
|
|
992
992
|
const f = this._getTopNode(this._currentLexerNode);
|
|
993
993
|
if (f && (this._currentLexerNode = f), t) {
|
|
@@ -1013,7 +1013,7 @@ class ga extends Ne {
|
|
|
1013
1013
|
const f = l.trim();
|
|
1014
1014
|
if (f === "")
|
|
1015
1015
|
continue;
|
|
1016
|
-
if (
|
|
1016
|
+
if (xt.has(f)) {
|
|
1017
1017
|
if (f === X.PLUS && this._deletePlusForPreNode(t[c - 1]))
|
|
1018
1018
|
continue;
|
|
1019
1019
|
if (f !== X.PLUS && f !== X.MINUS && this._deletePlusForPreNode(t[c - 1]))
|
|
@@ -1076,14 +1076,14 @@ class ga extends Ne {
|
|
|
1076
1076
|
return e === K.OPEN_BRACKET;
|
|
1077
1077
|
}
|
|
1078
1078
|
_checkOperator(e) {
|
|
1079
|
-
return e == null || e instanceof ae ? !1 :
|
|
1079
|
+
return e == null || e instanceof ae ? !1 : xt.has(e);
|
|
1080
1080
|
}
|
|
1081
1081
|
_deletePlusForPreNode(e) {
|
|
1082
1082
|
if (e == null)
|
|
1083
1083
|
return !0;
|
|
1084
1084
|
if (!(e instanceof ae)) {
|
|
1085
1085
|
const t = e.trim();
|
|
1086
|
-
if (
|
|
1086
|
+
if (xt.has(t) || t === K.OPEN_BRACKET)
|
|
1087
1087
|
return !0;
|
|
1088
1088
|
}
|
|
1089
1089
|
return !1;
|
|
@@ -1284,7 +1284,7 @@ class ga extends Ne {
|
|
|
1284
1284
|
return !!(this._isOperatorToken(e) || this._unexpectedEndingTokenExcludeOperator(e));
|
|
1285
1285
|
}
|
|
1286
1286
|
_isOperatorToken(e) {
|
|
1287
|
-
return !!
|
|
1287
|
+
return !!xt.has(e);
|
|
1288
1288
|
}
|
|
1289
1289
|
_getSequenceArray(e) {
|
|
1290
1290
|
const t = [];
|
|
@@ -1311,7 +1311,7 @@ class ga extends Ne {
|
|
|
1311
1311
|
_findErrorObject(e, t) {
|
|
1312
1312
|
for (let r = 0; r < za.length; r++) {
|
|
1313
1313
|
const n = za[r], s = t.slice(e, e + n).join("").toUpperCase();
|
|
1314
|
-
if (
|
|
1314
|
+
if (or.has(s))
|
|
1315
1315
|
return s;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
@@ -1351,7 +1351,7 @@ class ga extends Ne {
|
|
|
1351
1351
|
return m.VALUE;
|
|
1352
1352
|
this._addSequenceArray(t, c, u), u++, this._addSequenceArray(t, l, u), u++, this._closeBracket();
|
|
1353
1353
|
continue;
|
|
1354
|
-
} else l && this._newAndPushCurrentLexerNode(
|
|
1354
|
+
} else l && this._newAndPushCurrentLexerNode(gt, u);
|
|
1355
1355
|
} else
|
|
1356
1356
|
this._pushNodeToChildren(c), this._openBracket(
|
|
1357
1357
|
0
|
|
@@ -1408,12 +1408,12 @@ class ga extends Ne {
|
|
|
1408
1408
|
if (l === 1 || l == null) {
|
|
1409
1409
|
if (this._pushNodeToChildren(this._segment), this._resetSegment(), !this._setParentCurrentLexerNode() && u !== o - 1 && l != null)
|
|
1410
1410
|
return m.VALUE;
|
|
1411
|
-
this._newAndPushCurrentLexerNode(
|
|
1411
|
+
this._newAndPushCurrentLexerNode(gt, u);
|
|
1412
1412
|
} else {
|
|
1413
1413
|
const f = new ae();
|
|
1414
1414
|
f.setToken(nl);
|
|
1415
1415
|
const h = new ae();
|
|
1416
|
-
h.setToken(
|
|
1416
|
+
h.setToken(gt), h.changeToParent(f);
|
|
1417
1417
|
const d = this._currentLexerNode.getParent();
|
|
1418
1418
|
if (d && d.getToken() === K.COLON) {
|
|
1419
1419
|
const _ = d.getParent();
|
|
@@ -1425,15 +1425,15 @@ class ga extends Ne {
|
|
|
1425
1425
|
this._changeCurrentBracket(
|
|
1426
1426
|
1
|
|
1427
1427
|
/* FUNCTION */
|
|
1428
|
-
), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(
|
|
1428
|
+
), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(gt, u);
|
|
1429
1429
|
}
|
|
1430
1430
|
} else if (c === K.COLON && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isBracesClose() && this.isSquareBracketClose()) {
|
|
1431
1431
|
const l = new ae();
|
|
1432
1432
|
l.setToken(c);
|
|
1433
1433
|
const f = new ae();
|
|
1434
|
-
f.setToken(
|
|
1434
|
+
f.setToken(gt), f.setParent(l);
|
|
1435
1435
|
const h = new ae();
|
|
1436
|
-
h.setToken(
|
|
1436
|
+
h.setToken(gt), h.setParent(l), l.getChildren().push(f, h);
|
|
1437
1437
|
let d = l, _ = 0;
|
|
1438
1438
|
if (this._segmentCount() > 0) {
|
|
1439
1439
|
let C, E, b = 0;
|
|
@@ -1458,7 +1458,7 @@ class ga extends Ne {
|
|
|
1458
1458
|
l.setToken(c);
|
|
1459
1459
|
const f = this._getLastChildCurrent();
|
|
1460
1460
|
f instanceof ae ? f.changeToParent(l) : f !== !1 && (l.getChildren().push(f), this._removeLastChild()), this._pushNodeToChildren(l), l.setParent(this._currentLexerNode), this._resetSegment();
|
|
1461
|
-
} else if (
|
|
1461
|
+
} else if (xt.has(c) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
|
|
1462
1462
|
let l = this._segment.trim();
|
|
1463
1463
|
if (c === X.MINUS && l === "") {
|
|
1464
1464
|
const f = this._findPreviousToken(s, u - 1) || "", h = this._findNextToken(s, u + 1) || "";
|
|
@@ -1479,7 +1479,7 @@ class ga extends Ne {
|
|
|
1479
1479
|
} else this._segment.length > 0 && l === "" ? l = this._segment : (this._pushNodeToChildren(this._segment), l = "");
|
|
1480
1480
|
if (c === X.LESS_THAN || c === X.GREATER_THAN) {
|
|
1481
1481
|
const f = s[u + 1];
|
|
1482
|
-
if (f &&
|
|
1482
|
+
if (f && xt.has(c + f)) {
|
|
1483
1483
|
this._pushNodeToChildren(l + c + f), this._resetSegment(), this._addSequenceArray(t, c, u), u++, this._addSequenceArray(t, f, u), u++;
|
|
1484
1484
|
continue;
|
|
1485
1485
|
} else
|
|
@@ -1514,10 +1514,10 @@ class ga extends Ne {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
function il(i, a, e, t, r, n, s) {
|
|
1517
|
-
const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c =
|
|
1517
|
+
const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c = dt(o), l = Nt(u), f = i.getValue(r, n), h = (f == null ? void 0 : f.f) || "", d = (f == null ? void 0 : f.si) || "";
|
|
1518
1518
|
function _() {
|
|
1519
1519
|
var C;
|
|
1520
|
-
if (
|
|
1520
|
+
if (dt(h) && Nt(d)) {
|
|
1521
1521
|
const E = (C = e == null ? void 0 : e[d]) == null ? void 0 : C.f;
|
|
1522
1522
|
E ? t.set(d, E) : t.set(d, h);
|
|
1523
1523
|
}
|
|
@@ -1729,9 +1729,9 @@ let _r = class extends Ne {
|
|
|
1729
1729
|
il(c, l, n, s, f, h, d);
|
|
1730
1730
|
}), c.forValue((f, h, d) => {
|
|
1731
1731
|
const _ = (d == null ? void 0 : d.f) || "", C = (d == null ? void 0 : d.si) || "";
|
|
1732
|
-
if (
|
|
1732
|
+
if (Nt(C)) {
|
|
1733
1733
|
const E = n == null ? void 0 : n[C], b = s.get(C);
|
|
1734
|
-
if (E && !
|
|
1734
|
+
if (E && !dt(_)) {
|
|
1735
1735
|
const R = E.f, p = h - E.c, N = f - E.r;
|
|
1736
1736
|
c.setValue(f, h, { f: R, si: C, x: p, y: N }), l.setValue(f, h, { f: R, si: C, x: p, y: N });
|
|
1737
1737
|
} else if (typeof b == "string") {
|
|
@@ -1775,15 +1775,15 @@ let _r = class extends Ne {
|
|
|
1775
1775
|
if (u == null)
|
|
1776
1776
|
return null;
|
|
1777
1777
|
const { f: c, si: l } = u;
|
|
1778
|
-
if (
|
|
1778
|
+
if (dt(c))
|
|
1779
1779
|
return c;
|
|
1780
|
-
if (
|
|
1780
|
+
if (Nt(l)) {
|
|
1781
1781
|
let f = null;
|
|
1782
1782
|
return o.forValue((h, d, _) => {
|
|
1783
1783
|
if (_ == null)
|
|
1784
1784
|
return !0;
|
|
1785
1785
|
const { f: C, si: E } = _;
|
|
1786
|
-
if (
|
|
1786
|
+
if (dt(C) && l === E)
|
|
1787
1787
|
return f = this._lexerTreeBuilder.moveFormulaRefOffset(
|
|
1788
1788
|
C,
|
|
1789
1789
|
e - d,
|
|
@@ -1813,7 +1813,7 @@ let _r = class extends Ne {
|
|
|
1813
1813
|
for (const l of Object.keys(o)) {
|
|
1814
1814
|
const f = Number(l);
|
|
1815
1815
|
for (const h in o[f]) {
|
|
1816
|
-
const d = Number(h), _ = u.getCellRaw(f, d), C =
|
|
1816
|
+
const d = Number(h), _ = u.getCellRaw(f, d), C = dt(_ == null ? void 0 : _.f) || Nt(_ == null ? void 0 : _.si), E = (_ == null ? void 0 : _.v) === void 0;
|
|
1817
1817
|
if (!(C && E)) continue;
|
|
1818
1818
|
c[d] || (c[d] = []);
|
|
1819
1819
|
const b = c[d].slice(-1)[0];
|
|
@@ -1851,7 +1851,7 @@ let _r = class extends Ne {
|
|
|
1851
1851
|
if (c == null)
|
|
1852
1852
|
return !0;
|
|
1853
1853
|
const { f: l, si: f } = c;
|
|
1854
|
-
|
|
1854
|
+
dt(l) && Nt(f) && (t[f] = { f: l, r: o, c: u });
|
|
1855
1855
|
}), t;
|
|
1856
1856
|
}
|
|
1857
1857
|
};
|
|
@@ -1863,7 +1863,7 @@ function fi(i, a, e, t) {
|
|
|
1863
1863
|
i[a] || (i[a] = {}), i[a][e] || (i[a][e] = {});
|
|
1864
1864
|
const r = /* @__PURE__ */ new Map(), n = new Ce(i[a][e]);
|
|
1865
1865
|
t.forValue((o, u, c) => {
|
|
1866
|
-
const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "", h =
|
|
1866
|
+
const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "", h = dt(l), d = Nt(f);
|
|
1867
1867
|
h && d ? (n.setValue(o, u, {
|
|
1868
1868
|
f: l,
|
|
1869
1869
|
si: f
|
|
@@ -1875,7 +1875,7 @@ function fi(i, a, e, t) {
|
|
|
1875
1875
|
});
|
|
1876
1876
|
}), n.forValue((o, u, c) => {
|
|
1877
1877
|
const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "";
|
|
1878
|
-
if (
|
|
1878
|
+
if (Nt(f) && !dt(l)) {
|
|
1879
1879
|
const h = r.get(f);
|
|
1880
1880
|
if (h) {
|
|
1881
1881
|
const d = h.f, _ = u - h.c, C = o - h.r;
|
|
@@ -1983,7 +1983,7 @@ const ll = class js {
|
|
|
1983
1983
|
return a < e;
|
|
1984
1984
|
}
|
|
1985
1985
|
}, je = 0, Ae = 1;
|
|
1986
|
-
class
|
|
1986
|
+
class Wt {
|
|
1987
1987
|
constructor(a = void 0, e = void 0, t = null, r = null, n = null, s = Ae) {
|
|
1988
1988
|
if (this.left = t, this.right = r, this.parent = n, this.color = s, this.item = { key: a, value: e }, a && a instanceof Array && a.length === 2 && !Number.isNaN(a[0]) && !Number.isNaN(a[1])) {
|
|
1989
1989
|
let [o, u] = a;
|
|
@@ -2040,7 +2040,7 @@ class da {
|
|
|
2040
2040
|
* Construct new empty instance of IntervalTree
|
|
2041
2041
|
*/
|
|
2042
2042
|
constructor() {
|
|
2043
|
-
this.root = null, this.nil_node = new
|
|
2043
|
+
this.root = null, this.nil_node = new Wt();
|
|
2044
2044
|
}
|
|
2045
2045
|
/**
|
|
2046
2046
|
* Returns number of items stored in the interval tree
|
|
@@ -2100,7 +2100,7 @@ class da {
|
|
|
2100
2100
|
*/
|
|
2101
2101
|
insert(a, e = a) {
|
|
2102
2102
|
if (a === void 0) return;
|
|
2103
|
-
let t = new
|
|
2103
|
+
let t = new Wt(a, e, this.nil_node, this.nil_node, null, je);
|
|
2104
2104
|
return this.tree_insert(t), this.recalc_max(t), t;
|
|
2105
2105
|
}
|
|
2106
2106
|
/**
|
|
@@ -2110,7 +2110,7 @@ class da {
|
|
|
2110
2110
|
* @returns {boolean} true if item {key, value} exist in the tree, false otherwise
|
|
2111
2111
|
*/
|
|
2112
2112
|
exist(a, e = a) {
|
|
2113
|
-
let t = new
|
|
2113
|
+
let t = new Wt(a, e);
|
|
2114
2114
|
return !!this.tree_search(this.root, t);
|
|
2115
2115
|
}
|
|
2116
2116
|
/**
|
|
@@ -2120,7 +2120,7 @@ class da {
|
|
|
2120
2120
|
* @returns {boolean} true if item {key, value} deleted, false if not found
|
|
2121
2121
|
*/
|
|
2122
2122
|
remove(a, e = a) {
|
|
2123
|
-
let t = new
|
|
2123
|
+
let t = new Wt(a, e), r = this.tree_search(this.root, t);
|
|
2124
2124
|
return r && this.tree_delete(r), r;
|
|
2125
2125
|
}
|
|
2126
2126
|
/**
|
|
@@ -2131,7 +2131,7 @@ class da {
|
|
|
2131
2131
|
* @returns {Array}
|
|
2132
2132
|
*/
|
|
2133
2133
|
search(a, e = (t, r) => t === r ? r.output() : t) {
|
|
2134
|
-
let t = new
|
|
2134
|
+
let t = new Wt(a), r = [];
|
|
2135
2135
|
return this.tree_search_interval(this.root, t, r), r.map((n) => e(n.item.value, n.item.key));
|
|
2136
2136
|
}
|
|
2137
2137
|
/**
|
|
@@ -2140,7 +2140,7 @@ class da {
|
|
|
2140
2140
|
* @returns {boolean}
|
|
2141
2141
|
*/
|
|
2142
2142
|
intersect_any(a) {
|
|
2143
|
-
let e = new
|
|
2143
|
+
let e = new Wt(a);
|
|
2144
2144
|
return this.tree_find_any_interval(this.root, e);
|
|
2145
2145
|
}
|
|
2146
2146
|
/**
|
|
@@ -2166,7 +2166,7 @@ class da {
|
|
|
2166
2166
|
*/
|
|
2167
2167
|
*iterate(a, e = (t, r) => t === r ? r.output() : t) {
|
|
2168
2168
|
let t;
|
|
2169
|
-
for (a ? t = this.tree_search_nearest_forward(this.root, new
|
|
2169
|
+
for (a ? t = this.tree_search_nearest_forward(this.root, new Wt(a)) : this.root && (t = this.local_minimum(this.root)); t; )
|
|
2170
2170
|
yield e(t.item.value, t.item.key), t = this.tree_successor(t);
|
|
2171
2171
|
}
|
|
2172
2172
|
recalc_max(a) {
|
|
@@ -2651,7 +2651,7 @@ Us = gl([
|
|
|
2651
2651
|
Xr(2, ye(_r)),
|
|
2652
2652
|
Xr(3, ye(_o))
|
|
2653
2653
|
], Us);
|
|
2654
|
-
const
|
|
2654
|
+
const Yt = Ze(
|
|
2655
2655
|
"univer.formula.current-data.service"
|
|
2656
2656
|
);
|
|
2657
2657
|
var dl = Object.getOwnPropertyDescriptor, Cl = (i, a, e, t) => {
|
|
@@ -2725,7 +2725,7 @@ let Ar = class extends Ne {
|
|
|
2725
2725
|
Ar = Cl([
|
|
2726
2726
|
gs(0, Nr),
|
|
2727
2727
|
gs(1, ye(ga)),
|
|
2728
|
-
gs(2,
|
|
2728
|
+
gs(2, Yt)
|
|
2729
2729
|
], Ar);
|
|
2730
2730
|
function cn(i) {
|
|
2731
2731
|
if (i == null)
|
|
@@ -2802,7 +2802,7 @@ function ty(i, a, e) {
|
|
|
2802
2802
|
const o = n || s;
|
|
2803
2803
|
return r.n.pattern = o, a;
|
|
2804
2804
|
}
|
|
2805
|
-
const vs = new
|
|
2805
|
+
const vs = new wt(1e5);
|
|
2806
2806
|
function mi(i) {
|
|
2807
2807
|
const a = vs.get(i);
|
|
2808
2808
|
if (a !== void 0)
|
|
@@ -2816,7 +2816,7 @@ function El() {
|
|
|
2816
2816
|
function bl(i) {
|
|
2817
2817
|
if (yl(i))
|
|
2818
2818
|
return 3;
|
|
2819
|
-
const a =
|
|
2819
|
+
const a = At.getFormatInfo(i).type || "unknown";
|
|
2820
2820
|
return Al[a];
|
|
2821
2821
|
}
|
|
2822
2822
|
function yl(i) {
|
|
@@ -2831,16 +2831,16 @@ function Zr(i, a, e) {
|
|
|
2831
2831
|
return e === X.PLUS || e === X.MINUS ? t === 4 && r === 4 || t === 11 && r === 11 ? "" : a : e === X.MULTIPLY || e === X.DIVIDED ? t === 6 && r === 6 || t === 7 && r === 7 || t === 8 && r === 8 || t === 9 && r === 9 ? a : "" : i || a;
|
|
2832
2832
|
}
|
|
2833
2833
|
const Rl = /* @__PURE__ */ new Map([
|
|
2834
|
-
[
|
|
2835
|
-
[
|
|
2836
|
-
[
|
|
2837
|
-
[
|
|
2838
|
-
[
|
|
2839
|
-
[
|
|
2840
|
-
[
|
|
2841
|
-
[
|
|
2842
|
-
[
|
|
2843
|
-
[
|
|
2834
|
+
[mt.EN_US, "$"],
|
|
2835
|
+
[mt.RU_RU, "₽"],
|
|
2836
|
+
[mt.VI_VN, "₫"],
|
|
2837
|
+
[mt.ZH_CN, "¥"],
|
|
2838
|
+
[mt.ZH_TW, "NT$"],
|
|
2839
|
+
[mt.FR_FR, "€"],
|
|
2840
|
+
[mt.FA_IR, "﷼"],
|
|
2841
|
+
[mt.KO_KR, "₩"],
|
|
2842
|
+
[mt.ES_ES, "€"],
|
|
2843
|
+
[mt.CA_ES, "€"]
|
|
2844
2844
|
]);
|
|
2845
2845
|
function gi(i) {
|
|
2846
2846
|
return Rl.get(i) || "$";
|
|
@@ -2852,9 +2852,9 @@ function ze(i, a = 2) {
|
|
|
2852
2852
|
return e > 0 && (t = `.${"0".repeat(e)}`), `"${gi(i)}"#,##0${t}_);[Red]("${gi(i)}"#,##0${t})`;
|
|
2853
2853
|
}
|
|
2854
2854
|
function pl(i, a, e = 2) {
|
|
2855
|
-
return
|
|
2855
|
+
return At.format(ze(i, e), a);
|
|
2856
2856
|
}
|
|
2857
|
-
const _a = new
|
|
2857
|
+
const _a = new wt(1e5);
|
|
2858
2858
|
function Vl(i) {
|
|
2859
2859
|
let a = i;
|
|
2860
2860
|
a.startsWith('"') && a.endsWith('"') && (a = a.slice(1, -1));
|
|
@@ -2865,13 +2865,13 @@ function Vl(i) {
|
|
|
2865
2865
|
value: e.value,
|
|
2866
2866
|
pattern: e.pattern
|
|
2867
2867
|
};
|
|
2868
|
-
const t =
|
|
2868
|
+
const t = At.parseNumber(a);
|
|
2869
2869
|
if (t && t.z)
|
|
2870
2870
|
return ds(a, t.v, t.z);
|
|
2871
|
-
const r =
|
|
2871
|
+
const r = At.parseDate(a);
|
|
2872
2872
|
if (r && r.z)
|
|
2873
2873
|
return ds(a, r.v, r.z);
|
|
2874
|
-
const n =
|
|
2874
|
+
const n = At.parseTime(a);
|
|
2875
2875
|
return n && n.z ? ds(a, n.v, n.z) : {
|
|
2876
2876
|
isNumberPattern: !1
|
|
2877
2877
|
};
|
|
@@ -2927,7 +2927,7 @@ class Hn {
|
|
|
2927
2927
|
return !1;
|
|
2928
2928
|
}
|
|
2929
2929
|
}
|
|
2930
|
-
class
|
|
2930
|
+
class Ht extends Hn {
|
|
2931
2931
|
constructor(e) {
|
|
2932
2932
|
super();
|
|
2933
2933
|
A(this, "_customData");
|
|
@@ -3225,8 +3225,8 @@ class Yt extends Hn {
|
|
|
3225
3225
|
return g.create(m.VALUE);
|
|
3226
3226
|
}
|
|
3227
3227
|
}
|
|
3228
|
-
const Ol = 1e3, Ts = new
|
|
3229
|
-
class g extends
|
|
3228
|
+
const Ol = 1e3, Ts = new wt(Ol);
|
|
3229
|
+
class g extends Ht {
|
|
3230
3230
|
constructor(a, e = "") {
|
|
3231
3231
|
super(a), this._errorType = a, this._errorContent = e;
|
|
3232
3232
|
}
|
|
@@ -3267,9 +3267,9 @@ function Ml(i) {
|
|
|
3267
3267
|
return (a = i == null ? void 0 : i.v) != null ? a : 0;
|
|
3268
3268
|
}
|
|
3269
3269
|
function ry(i, a = !1) {
|
|
3270
|
-
return !a && !(
|
|
3270
|
+
return !a && !(dt(i == null ? void 0 : i.f) || Nt(i == null ? void 0 : i.si)) ? null : typeof (i == null ? void 0 : i.v) == "string" && or.has(i.v) ? i.v : null;
|
|
3271
3271
|
}
|
|
3272
|
-
var
|
|
3272
|
+
var Kt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i))(Kt || {}), Le = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.MIN = 1] = "MIN", i[i.MAX = 2] = "MAX", i))(Le || {});
|
|
3273
3273
|
function An() {
|
|
3274
3274
|
return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
|
|
3275
3275
|
}
|
|
@@ -3352,7 +3352,7 @@ function Aa(i) {
|
|
|
3352
3352
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
3353
3353
|
* MIT Licence
|
|
3354
3354
|
*/
|
|
3355
|
-
var lr = 9e15,
|
|
3355
|
+
var lr = 9e15, Gt = 1e9, Fs = "0123456789abcdef", En = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", bn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", ks = {
|
|
3356
3356
|
// These values must be integers within the stated ranges (inclusive).
|
|
3357
3357
|
// Most of these values can be changed at run-time using the `Decimal.config` method.
|
|
3358
3358
|
// The maximum number of significant digits of the result of a calculation or base conversion.
|
|
@@ -3410,7 +3410,7 @@ var lr = 9e15, Ht = 1e9, Fs = "0123456789abcdef", En = "2.3025850929940456840179
|
|
|
3410
3410
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
3411
3411
|
crypto: !1
|
|
3412
3412
|
// true/false
|
|
3413
|
-
}, Eo,
|
|
3413
|
+
}, Eo, Ot, oe = !0, Gn = "[DecimalError] ", kt = Gn + "Invalid argument: ", bo = Gn + "Precision limit exceeded", yo = Gn + "crypto unavailable", Ro = "[object Decimal]", Ie = Math.floor, Pe = Math.pow, Ll = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Pl = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, xl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, po = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, lt = 1e7, te = 7, jl = 9007199254740991, Ul = En.length - 1, $s = bn.length - 1, I = { toStringTag: Ro };
|
|
3414
3414
|
I.absoluteValue = I.abs = function() {
|
|
3415
3415
|
var i = new this.constructor(this);
|
|
3416
3416
|
return i.s < 0 && (i.s = 1), J(i);
|
|
@@ -3421,7 +3421,7 @@ I.ceil = function() {
|
|
|
3421
3421
|
I.clampedTo = I.clamp = function(i, a) {
|
|
3422
3422
|
var e, t = this, r = t.constructor;
|
|
3423
3423
|
if (i = new r(i), a = new r(a), !i.s || !a.s) return new r(NaN);
|
|
3424
|
-
if (i.gt(a)) throw Error(
|
|
3424
|
+
if (i.gt(a)) throw Error(kt + a);
|
|
3425
3425
|
return e = t.cmp(i), e < 0 ? i : t.cmp(a) > 0 ? a : new r(t);
|
|
3426
3426
|
};
|
|
3427
3427
|
I.comparedTo = I.cmp = function(i) {
|
|
@@ -3437,12 +3437,12 @@ I.comparedTo = I.cmp = function(i) {
|
|
|
3437
3437
|
};
|
|
3438
3438
|
I.cosine = I.cos = function() {
|
|
3439
3439
|
var i, a, e = this, t = e.constructor;
|
|
3440
|
-
return e.d ? e.d[0] ? (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = vl(t, wo(t, e)), t.precision = i, t.rounding = a, J(
|
|
3440
|
+
return e.d ? e.d[0] ? (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = vl(t, wo(t, e)), t.precision = i, t.rounding = a, J(Ot == 2 || Ot == 3 ? e.neg() : e, i, a, !0)) : new t(1) : new t(NaN);
|
|
3441
3441
|
};
|
|
3442
3442
|
I.cubeRoot = I.cbrt = function() {
|
|
3443
3443
|
var i, a, e, t, r, n, s, o, u, c, l = this, f = l.constructor;
|
|
3444
3444
|
if (!l.isFinite() || l.isZero()) return new f(l);
|
|
3445
|
-
for (oe = !1, n = l.s * Pe(l.s * l, 1 / 3), !n || Math.abs(n) == 1 / 0 ? (e = Ue(l.d), i = l.e, (n = (i - e.length + 1) % 3) && (e += n == 1 || n == -2 ? "0" : "00"), n = Pe(e, 1 / 3), i =
|
|
3445
|
+
for (oe = !1, n = l.s * Pe(l.s * l, 1 / 3), !n || Math.abs(n) == 1 / 0 ? (e = Ue(l.d), i = l.e, (n = (i - e.length + 1) % 3) && (e += n == 1 || n == -2 ? "0" : "00"), n = Pe(e, 1 / 3), i = Ie((i + 1) / 3) - (i % 3 == (i < 0 ? -1 : 2)), n == 1 / 0 ? e = "5e" + i : (e = n.toExponential(), e = e.slice(0, e.indexOf("e") + 1) + i), t = new f(e), t.s = l.s) : t = new f(n.toString()), s = (i = f.precision) + 3; ; )
|
|
3446
3446
|
if (o = t, u = o.times(o).times(o), c = u.plus(l), t = Ve(c.plus(l).times(o), c.plus(u), s + 2, 1), Ue(o.d).slice(0, s) === (e = Ue(t.d)).slice(0, s))
|
|
3447
3447
|
if (e = e.slice(s - 3, s + 1), e == "9999" || !r && e == "4999") {
|
|
3448
3448
|
if (!r && (J(o, i + 1, 0), o.times(o).times(o).eq(l))) {
|
|
@@ -3459,7 +3459,7 @@ I.cubeRoot = I.cbrt = function() {
|
|
|
3459
3459
|
I.decimalPlaces = I.dp = function() {
|
|
3460
3460
|
var i, a = this.d, e = NaN;
|
|
3461
3461
|
if (a) {
|
|
3462
|
-
if (i = a.length - 1, e = (i -
|
|
3462
|
+
if (i = a.length - 1, e = (i - Ie(this.e / te)) * te, i = a[i], i) for (; i % 10 == 0; i /= 10) e--;
|
|
3463
3463
|
e < 0 && (e = 0);
|
|
3464
3464
|
}
|
|
3465
3465
|
return e;
|
|
@@ -3511,7 +3511,7 @@ I.hyperbolicTangent = I.tanh = function() {
|
|
|
3511
3511
|
};
|
|
3512
3512
|
I.inverseCosine = I.acos = function() {
|
|
3513
3513
|
var i = this, a = i.constructor, e = i.abs().cmp(1), t = a.precision, r = a.rounding;
|
|
3514
|
-
return e !== -1 ? e === 0 ? i.isNeg() ?
|
|
3514
|
+
return e !== -1 ? e === 0 ? i.isNeg() ? _t(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? _t(a, t + 4, r).times(0.5) : (a.precision = t + 6, a.rounding = 1, i = new a(1).minus(i).div(i.plus(1)).sqrt().atan(), a.precision = t, a.rounding = r, i.times(2));
|
|
3515
3515
|
};
|
|
3516
3516
|
I.inverseHyperbolicCosine = I.acosh = function() {
|
|
3517
3517
|
var i, a, e = this, t = e.constructor;
|
|
@@ -3527,7 +3527,7 @@ I.inverseHyperbolicTangent = I.atanh = function() {
|
|
|
3527
3527
|
};
|
|
3528
3528
|
I.inverseSine = I.asin = function() {
|
|
3529
3529
|
var i, a, e, t, r = this, n = r.constructor;
|
|
3530
|
-
return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i =
|
|
3530
|
+
return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = _t(n, e + 4, t).times(0.5), i.s = r.s, i) : new n(NaN) : (n.precision = e + 6, n.rounding = 1, r = r.div(new n(1).minus(r.times(r)).sqrt().plus(1)).atan(), n.precision = e, n.rounding = t, r.times(2)));
|
|
3531
3531
|
};
|
|
3532
3532
|
I.inverseTangent = I.atan = function() {
|
|
3533
3533
|
var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
|
|
@@ -3535,11 +3535,11 @@ I.inverseTangent = I.atan = function() {
|
|
|
3535
3535
|
if (c.isZero())
|
|
3536
3536
|
return new l(c);
|
|
3537
3537
|
if (c.abs().eq(1) && f + 4 <= $s)
|
|
3538
|
-
return s =
|
|
3538
|
+
return s = _t(l, f + 4, h).times(0.25), s.s = c.s, s;
|
|
3539
3539
|
} else {
|
|
3540
3540
|
if (!c.s) return new l(NaN);
|
|
3541
3541
|
if (f + 4 <= $s)
|
|
3542
|
-
return s =
|
|
3542
|
+
return s = _t(l, f + 4, h).times(0.5), s.s = c.s, s;
|
|
3543
3543
|
}
|
|
3544
3544
|
for (l.precision = o = f + 10, l.rounding = 1, e = Math.min(28, o / te + 2 | 0), i = e; i; --i) c = c.div(c.times(c).plus(1).sqrt().plus(1));
|
|
3545
3545
|
for (oe = !1, a = Math.ceil(o / te), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
|
|
@@ -3550,7 +3550,7 @@ I.isFinite = function() {
|
|
|
3550
3550
|
return !!this.d;
|
|
3551
3551
|
};
|
|
3552
3552
|
I.isInteger = I.isInt = function() {
|
|
3553
|
-
return !!this.d &&
|
|
3553
|
+
return !!this.d && Ie(this.e / te) > this.d.length - 2;
|
|
3554
3554
|
};
|
|
3555
3555
|
I.isNaN = function() {
|
|
3556
3556
|
return !this.s;
|
|
@@ -3587,9 +3587,9 @@ I.logarithm = I.log = function(i) {
|
|
|
3587
3587
|
for (r = e[0]; r % 10 === 0; ) r /= 10;
|
|
3588
3588
|
n = r !== 1;
|
|
3589
3589
|
}
|
|
3590
|
-
if (oe = !1, o = f + d, s =
|
|
3590
|
+
if (oe = !1, o = f + d, s = vt(c, o), t = a ? yn(l, o + 10) : vt(i, o), u = Ve(s, t, o, 1), Pr(u.d, r = f, h))
|
|
3591
3591
|
do
|
|
3592
|
-
if (o += 10, s =
|
|
3592
|
+
if (o += 10, s = vt(c, o), t = a ? yn(l, o + 10) : vt(i, o), u = Ve(s, t, o, 1), !n) {
|
|
3593
3593
|
+Ue(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = J(u, f + 1, 0));
|
|
3594
3594
|
break;
|
|
3595
3595
|
}
|
|
@@ -3608,7 +3608,7 @@ I.minus = I.sub = function(i) {
|
|
|
3608
3608
|
else return new _(u === 3 ? -0 : 0);
|
|
3609
3609
|
return oe ? J(i, o, u) : i;
|
|
3610
3610
|
}
|
|
3611
|
-
if (e =
|
|
3611
|
+
if (e = Ie(i.e / te), l = Ie(d.e / te), c = c.slice(), n = l - e, n) {
|
|
3612
3612
|
for (f = n < 0, f ? (a = c, n = -n, s = h.length) : (a = h, e = l, s = c.length), t = Math.max(Math.ceil(o / te), s) + 2, n > t && (n = t, a.length = 1), a.reverse(), t = n; t--; ) a.push(0);
|
|
3613
3613
|
a.reverse();
|
|
3614
3614
|
} else {
|
|
@@ -3639,7 +3639,7 @@ I.naturalExponential = I.exp = function() {
|
|
|
3639
3639
|
return Ys(this);
|
|
3640
3640
|
};
|
|
3641
3641
|
I.naturalLogarithm = I.ln = function() {
|
|
3642
|
-
return
|
|
3642
|
+
return vt(this);
|
|
3643
3643
|
};
|
|
3644
3644
|
I.negated = I.neg = function() {
|
|
3645
3645
|
var i = new this.constructor(this);
|
|
@@ -3653,7 +3653,7 @@ I.plus = I.add = function(i) {
|
|
|
3653
3653
|
return i.s = -i.s, f.minus(i);
|
|
3654
3654
|
if (c = f.d, l = i.d, o = h.precision, u = h.rounding, !c[0] || !l[0])
|
|
3655
3655
|
return l[0] || (i = new h(f)), oe ? J(i, o, u) : i;
|
|
3656
|
-
if (n =
|
|
3656
|
+
if (n = Ie(f.e / te), t = Ie(i.e / te), c = c.slice(), r = n - t, r) {
|
|
3657
3657
|
for (r < 0 ? (e = c, r = -r, s = l.length) : (e = l, t = n, s = c.length), n = Math.ceil(o / te), s = n > s ? n + 1 : s + 1, r > s && (r = s, e.length = 1), e.reverse(); r--; ) e.push(0);
|
|
3658
3658
|
e.reverse();
|
|
3659
3659
|
}
|
|
@@ -3664,7 +3664,7 @@ I.plus = I.add = function(i) {
|
|
|
3664
3664
|
};
|
|
3665
3665
|
I.precision = I.sd = function(i) {
|
|
3666
3666
|
var a, e = this;
|
|
3667
|
-
if (i !== void 0 && i !== !!i && i !== 1 && i !== 0) throw Error(
|
|
3667
|
+
if (i !== void 0 && i !== !!i && i !== 1 && i !== 0) throw Error(kt + i);
|
|
3668
3668
|
return e.d ? (a = Vo(e.d), i && e.e + 1 > a && (a = e.e + 1)) : a = NaN, a;
|
|
3669
3669
|
};
|
|
3670
3670
|
I.round = function() {
|
|
@@ -3673,13 +3673,13 @@ I.round = function() {
|
|
|
3673
3673
|
};
|
|
3674
3674
|
I.sine = I.sin = function() {
|
|
3675
3675
|
var i, a, e = this, t = e.constructor;
|
|
3676
|
-
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = Bl(t, wo(t, e)), t.precision = i, t.rounding = a, J(
|
|
3676
|
+
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = Bl(t, wo(t, e)), t.precision = i, t.rounding = a, J(Ot > 2 ? e.neg() : e, i, a, !0)) : new t(NaN);
|
|
3677
3677
|
};
|
|
3678
3678
|
I.squareRoot = I.sqrt = function() {
|
|
3679
3679
|
var i, a, e, t, r, n, s = this, o = s.d, u = s.e, c = s.s, l = s.constructor;
|
|
3680
3680
|
if (c !== 1 || !o || !o[0])
|
|
3681
3681
|
return new l(!c || c < 0 && (!o || o[0]) ? NaN : o ? s : 1 / 0);
|
|
3682
|
-
for (oe = !1, c = Math.sqrt(+s), c == 0 || c == 1 / 0 ? (a = Ue(o), (a.length + u) % 2 == 0 && (a += "0"), c = Math.sqrt(a), u =
|
|
3682
|
+
for (oe = !1, c = Math.sqrt(+s), c == 0 || c == 1 / 0 ? (a = Ue(o), (a.length + u) % 2 == 0 && (a += "0"), c = Math.sqrt(a), u = Ie((u + 1) / 2) - (u < 0 || u % 2), c == 1 / 0 ? a = "5e" + u : (a = c.toExponential(), a = a.slice(0, a.indexOf("e") + 1) + u), t = new l(a)) : t = new l(c.toString()), e = (u = l.precision) + 3; ; )
|
|
3683
3683
|
if (n = t, t = n.plus(Ve(s, n, e + 2, 1)).times(0.5), Ue(n.d).slice(0, e) === (a = Ue(t.d)).slice(0, e))
|
|
3684
3684
|
if (a = a.slice(e - 3, e + 1), a == "9999" || !r && a == "4999") {
|
|
3685
3685
|
if (!r && (J(n, u + 1, 0), n.times(n).eq(s))) {
|
|
@@ -3695,13 +3695,13 @@ I.squareRoot = I.sqrt = function() {
|
|
|
3695
3695
|
};
|
|
3696
3696
|
I.tangent = I.tan = function() {
|
|
3697
3697
|
var i, a, e = this, t = e.constructor;
|
|
3698
|
-
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + 10, t.rounding = 1, e = e.sin(), e.s = 1, e = Ve(e, new t(1).minus(e.times(e)).sqrt(), i + 10, 0), t.precision = i, t.rounding = a, J(
|
|
3698
|
+
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + 10, t.rounding = 1, e = e.sin(), e.s = 1, e = Ve(e, new t(1).minus(e.times(e)).sqrt(), i + 10, 0), t.precision = i, t.rounding = a, J(Ot == 2 || Ot == 4 ? e.neg() : e, i, a, !0)) : new t(NaN);
|
|
3699
3699
|
};
|
|
3700
3700
|
I.times = I.mul = function(i) {
|
|
3701
3701
|
var a, e, t, r, n, s, o, u, c, l = this, f = l.constructor, h = l.d, d = (i = new f(i)).d;
|
|
3702
3702
|
if (i.s *= l.s, !h || !h[0] || !d || !d[0])
|
|
3703
3703
|
return new f(!i.s || h && !h[0] && !d || d && !d[0] && !h ? NaN : !h || !d ? i.s / 0 : i.s * 0);
|
|
3704
|
-
for (e =
|
|
3704
|
+
for (e = Ie(l.e / te) + Ie(i.e / te), u = h.length, c = d.length, u < c && (n = h, h = d, d = n, s = u, u = c, c = s), n = [], s = u + c, t = s; t--; ) n.push(0);
|
|
3705
3705
|
for (t = c; --t >= 0; ) {
|
|
3706
3706
|
for (a = 0, r = u + t; r > t; )
|
|
3707
3707
|
o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o % lt | 0, a = o / lt | 0;
|
|
@@ -3715,15 +3715,15 @@ I.toBinary = function(i, a) {
|
|
|
3715
3715
|
};
|
|
3716
3716
|
I.toDecimalPlaces = I.toDP = function(i, a) {
|
|
3717
3717
|
var e = this, t = e.constructor;
|
|
3718
|
-
return e = new t(e), i === void 0 ? e : (He(i, 0,
|
|
3718
|
+
return e = new t(e), i === void 0 ? e : (He(i, 0, Gt), a === void 0 ? a = t.rounding : He(a, 0, 8), J(e, i + e.e + 1, a));
|
|
3719
3719
|
};
|
|
3720
3720
|
I.toExponential = function(i, a) {
|
|
3721
3721
|
var e, t = this, r = t.constructor;
|
|
3722
|
-
return i === void 0 ? e =
|
|
3722
|
+
return i === void 0 ? e = bt(t, !0) : (He(i, 0, Gt), a === void 0 ? a = r.rounding : He(a, 0, 8), t = J(new r(t), i + 1, a), e = bt(t, !0, i + 1)), t.isNeg() && !t.isZero() ? "-" + e : e;
|
|
3723
3723
|
};
|
|
3724
3724
|
I.toFixed = function(i, a) {
|
|
3725
3725
|
var e, t, r = this, n = r.constructor;
|
|
3726
|
-
return i === void 0 ? e =
|
|
3726
|
+
return i === void 0 ? e = bt(r) : (He(i, 0, Gt), a === void 0 ? a = n.rounding : He(a, 0, 8), t = J(new n(r), i + r.e + 1, a), e = bt(t, !1, i + t.e + 1)), r.isNeg() && !r.isZero() ? "-" + e : e;
|
|
3727
3727
|
};
|
|
3728
3728
|
I.toFraction = function(i) {
|
|
3729
3729
|
var a, e, t, r, n, s, o, u, c, l, f, h, d = this, _ = d.d, C = d.constructor;
|
|
@@ -3731,7 +3731,7 @@ I.toFraction = function(i) {
|
|
|
3731
3731
|
if (c = e = new C(1), t = u = new C(0), a = new C(t), n = a.e = Vo(_) - d.e - 1, s = n % te, a.d[0] = Pe(10, s < 0 ? te + s : s), i == null)
|
|
3732
3732
|
i = n > 0 ? a : c;
|
|
3733
3733
|
else {
|
|
3734
|
-
if (o = new C(i), !o.isInt() || o.lt(c)) throw Error(
|
|
3734
|
+
if (o = new C(i), !o.isInt() || o.lt(c)) throw Error(kt + o);
|
|
3735
3735
|
i = o.gt(a) ? n > 0 ? a : c : o;
|
|
3736
3736
|
}
|
|
3737
3737
|
for (oe = !1, o = new C(Ue(_)), l = C.precision, C.precision = n = _.length * te * 2; f = Ve(o, a, 0, 1, 1), r = e.plus(f.times(t)), r.cmp(i) != 1; )
|
|
@@ -3764,40 +3764,40 @@ I.toPower = I.pow = function(i) {
|
|
|
3764
3764
|
if (!o.d || !i.d || !o.d[0] || !i.d[0]) return new u(Pe(+o, c));
|
|
3765
3765
|
if (o = new u(o), o.eq(1)) return o;
|
|
3766
3766
|
if (t = u.precision, n = u.rounding, i.eq(1)) return J(o, t, n);
|
|
3767
|
-
if (a =
|
|
3767
|
+
if (a = Ie(i.e / te), a >= i.d.length - 1 && (e = c < 0 ? -c : c) <= jl)
|
|
3768
3768
|
return r = No(u, o, e, t), i.s < 0 ? new u(1).div(r) : J(r, t, n);
|
|
3769
3769
|
if (s = o.s, s < 0) {
|
|
3770
3770
|
if (a < i.d.length - 1) return new u(NaN);
|
|
3771
3771
|
if ((i.d[a] & 1) == 0 && (s = 1), o.e == 0 && o.d[0] == 1 && o.d.length == 1)
|
|
3772
3772
|
return o.s = s, o;
|
|
3773
3773
|
}
|
|
3774
|
-
return e = Pe(+o, c), a = e == 0 || !isFinite(e) ?
|
|
3774
|
+
return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Ie(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (oe = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = Ys(i.times(vt(o, t + e)), t), r.d && (r = J(r, t + 5, 1), Pr(r.d, t, n) && (a = t + 10, r = J(Ys(i.times(vt(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, oe = !0, u.rounding = n, J(r, t, n));
|
|
3775
3775
|
};
|
|
3776
3776
|
I.toPrecision = function(i, a) {
|
|
3777
3777
|
var e, t = this, r = t.constructor;
|
|
3778
|
-
return i === void 0 ? e =
|
|
3778
|
+
return i === void 0 ? e = bt(t, t.e <= r.toExpNeg || t.e >= r.toExpPos) : (He(i, 1, Gt), a === void 0 ? a = r.rounding : He(a, 0, 8), t = J(new r(t), i, a), e = bt(t, i <= t.e || t.e <= r.toExpNeg, i)), t.isNeg() && !t.isZero() ? "-" + e : e;
|
|
3779
3779
|
};
|
|
3780
3780
|
I.toSignificantDigits = I.toSD = function(i, a) {
|
|
3781
3781
|
var e = this, t = e.constructor;
|
|
3782
|
-
return i === void 0 ? (i = t.precision, a = t.rounding) : (He(i, 1,
|
|
3782
|
+
return i === void 0 ? (i = t.precision, a = t.rounding) : (He(i, 1, Gt), a === void 0 ? a = t.rounding : He(a, 0, 8)), J(new t(e), i, a);
|
|
3783
3783
|
};
|
|
3784
3784
|
I.toString = function() {
|
|
3785
|
-
var i = this, a = i.constructor, e =
|
|
3785
|
+
var i = this, a = i.constructor, e = bt(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
|
|
3786
3786
|
return i.isNeg() && !i.isZero() ? "-" + e : e;
|
|
3787
3787
|
};
|
|
3788
3788
|
I.truncated = I.trunc = function() {
|
|
3789
3789
|
return J(new this.constructor(this), this.e + 1, 1);
|
|
3790
3790
|
};
|
|
3791
3791
|
I.valueOf = I.toJSON = function() {
|
|
3792
|
-
var i = this, a = i.constructor, e =
|
|
3792
|
+
var i = this, a = i.constructor, e = bt(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
|
|
3793
3793
|
return i.isNeg() ? "-" + e : e;
|
|
3794
3794
|
};
|
|
3795
3795
|
function Ue(i) {
|
|
3796
3796
|
var a, e, t, r = i.length - 1, n = "", s = i[0];
|
|
3797
3797
|
if (r > 0) {
|
|
3798
3798
|
for (n += s, a = 1; a < r; a++)
|
|
3799
|
-
t = i[a] + "", e = te - t.length, e && (n +=
|
|
3800
|
-
s = i[a], t = s + "", e = te - t.length, e && (n +=
|
|
3799
|
+
t = i[a] + "", e = te - t.length, e && (n += jt(e)), n += t;
|
|
3800
|
+
s = i[a], t = s + "", e = te - t.length, e && (n += jt(e));
|
|
3801
3801
|
} else if (s === 0)
|
|
3802
3802
|
return "0";
|
|
3803
3803
|
for (; s % 10 === 0; ) s /= 10;
|
|
@@ -3805,7 +3805,7 @@ function Ue(i) {
|
|
|
3805
3805
|
}
|
|
3806
3806
|
function He(i, a, e) {
|
|
3807
3807
|
if (i !== ~~i || i < a || i > e)
|
|
3808
|
-
throw Error(
|
|
3808
|
+
throw Error(kt + i);
|
|
3809
3809
|
}
|
|
3810
3810
|
function Pr(i, a, e, t) {
|
|
3811
3811
|
var r, n, s, o;
|
|
@@ -3864,7 +3864,7 @@ var Ve = /* @__PURE__ */ (function() {
|
|
|
3864
3864
|
z && z[0] == 0 || !G ? ne * 0 : ne / 0
|
|
3865
3865
|
)
|
|
3866
3866
|
);
|
|
3867
|
-
for (u ? (d = 1, l = t.e - r.e) : (u = lt, d = te, l =
|
|
3867
|
+
for (u ? (d = 1, l = t.e - r.e) : (u = lt, d = te, l = Ie(t.e / d) - Ie(r.e / d)), x = G.length, L = z.length, b = new Q(ne), R = b.d = [], f = 0; G[f] == (z[f] || 0); f++) ;
|
|
3868
3868
|
if (G[f] > (z[f] || 0) && l--, n == null ? (w = n = Q.precision, s = Q.rounding) : o ? w = n + (t.e - r.e) + 1 : w = n, w < 0)
|
|
3869
3869
|
R.push(1), _ = !0;
|
|
3870
3870
|
else {
|
|
@@ -3926,10 +3926,10 @@ function J(i, a, e, t) {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
return oe && (i.e > d.maxE ? (i.d = null, i.e = NaN) : i.e < d.minE && (i.e = 0, i.d = [0])), i;
|
|
3928
3928
|
}
|
|
3929
|
-
function
|
|
3929
|
+
function bt(i, a, e) {
|
|
3930
3930
|
if (!i.isFinite()) return Mo(i);
|
|
3931
3931
|
var t, r = i.e, n = Ue(i.d), s = n.length;
|
|
3932
|
-
return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) +
|
|
3932
|
+
return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + jt(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + jt(-r - 1) + n, e && (t = e - s) > 0 && (n += jt(t))) : r >= s ? (n += jt(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + jt(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += jt(t))), n;
|
|
3933
3933
|
}
|
|
3934
3934
|
function Qn(i, a) {
|
|
3935
3935
|
var e = i[0];
|
|
@@ -3941,7 +3941,7 @@ function yn(i, a, e) {
|
|
|
3941
3941
|
throw oe = !0, e && (i.precision = e), Error(bo);
|
|
3942
3942
|
return J(new i(En), a, 1, !0);
|
|
3943
3943
|
}
|
|
3944
|
-
function
|
|
3944
|
+
function _t(i, a, e) {
|
|
3945
3945
|
if (a > $s) throw Error(bo);
|
|
3946
3946
|
return J(new i(bn), a, e, !0);
|
|
3947
3947
|
}
|
|
@@ -3953,14 +3953,14 @@ function Vo(i) {
|
|
|
3953
3953
|
}
|
|
3954
3954
|
return e;
|
|
3955
3955
|
}
|
|
3956
|
-
function
|
|
3956
|
+
function jt(i) {
|
|
3957
3957
|
for (var a = ""; i--; ) a += "0";
|
|
3958
3958
|
return a;
|
|
3959
3959
|
}
|
|
3960
3960
|
function No(i, a, e, t) {
|
|
3961
3961
|
var r, n = new i(1), s = Math.ceil(t / te + 4);
|
|
3962
3962
|
for (oe = !1; ; ) {
|
|
3963
|
-
if (e % 2 && (n = n.times(a), _i(n.d, s) && (r = !0)), e =
|
|
3963
|
+
if (e % 2 && (n = n.times(a), _i(n.d, s) && (r = !0)), e = Ie(e / 2), e === 0) {
|
|
3964
3964
|
e = n.d.length - 1, r && n.d[e] === 0 && ++n.d[e];
|
|
3965
3965
|
break;
|
|
3966
3966
|
}
|
|
@@ -4001,7 +4001,7 @@ function Ys(i, a) {
|
|
|
4001
4001
|
s = o;
|
|
4002
4002
|
}
|
|
4003
4003
|
}
|
|
4004
|
-
function
|
|
4004
|
+
function vt(i, a) {
|
|
4005
4005
|
var e, t, r, n, s, o, u, c, l, f, h, d = 1, _ = 10, C = i, E = C.d, b = C.constructor, R = b.rounding, p = b.precision;
|
|
4006
4006
|
if (C.s < 0 || !E || !E[0] || !C.e && E[0] == 1 && E.length == 1)
|
|
4007
4007
|
return new b(E && !E[0] ? -1 / 0 : C.s != 1 ? NaN : E ? 0 : C);
|
|
@@ -4010,7 +4010,7 @@ function Ut(i, a) {
|
|
|
4010
4010
|
C = C.times(i), e = Ue(C.d), t = e.charAt(0), d++;
|
|
4011
4011
|
n = C.e, t > 1 ? (C = new b("0." + e), n++) : C = new b(t + "." + e.slice(1));
|
|
4012
4012
|
} else
|
|
4013
|
-
return c = yn(b, l + 2, p).times(n + ""), C =
|
|
4013
|
+
return c = yn(b, l + 2, p).times(n + ""), C = vt(new b(t + "." + e.slice(1)), l - _).plus(c), b.precision = p, a == null ? J(C, p, R, oe = !0) : C;
|
|
4014
4014
|
for (f = C, u = s = C = Ve(C.minus(1), C.plus(1), l, 1), h = J(C.times(C), l, 1), r = 3; ; ) {
|
|
4015
4015
|
if (s = J(s.times(h), l, 1), c = u.plus(Ve(s, new b(r), l, 1)), Ue(c.d).slice(0, l) === Ue(u.d).slice(0, l))
|
|
4016
4016
|
if (u = u.times(2), n !== 0 && (u = u.plus(yn(b, l + 2, p).times(n + ""))), u = Ve(u, new b(d), l, 1), a == null)
|
|
@@ -4055,7 +4055,7 @@ function Tl(i, a) {
|
|
|
4055
4055
|
else if (xl.test(a))
|
|
4056
4056
|
e = 8;
|
|
4057
4057
|
else
|
|
4058
|
-
throw Error(
|
|
4058
|
+
throw Error(kt + a);
|
|
4059
4059
|
for (n = a.search(/p/i), n > 0 ? (u = +a.slice(n + 1), a = a.substring(2, n)) : a = a.slice(2), n = a.indexOf("."), s = n >= 0, t = i.constructor, s && (a = a.replace(".", ""), o = a.length, n = o - n, r = No(t, new t(e), n, n * 2)), c = ln(a, e, lt), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
|
|
4060
4060
|
return n < 0 ? new t(i.s * 0) : (i.e = Qn(c, l), i.d = c, oe = !1, s && (i = Ve(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Pe(2, u) : P.pow(2, u))), oe = !0, i);
|
|
4061
4061
|
}
|
|
@@ -4084,24 +4084,24 @@ function Wn(i, a) {
|
|
|
4084
4084
|
return e;
|
|
4085
4085
|
}
|
|
4086
4086
|
function wo(i, a) {
|
|
4087
|
-
var e, t = a.s < 0, r =
|
|
4087
|
+
var e, t = a.s < 0, r = _t(i, i.precision, 1), n = r.times(0.5);
|
|
4088
4088
|
if (a = a.abs(), a.lte(n))
|
|
4089
|
-
return
|
|
4089
|
+
return Ot = t ? 4 : 1, a;
|
|
4090
4090
|
if (e = a.divToInt(r), e.isZero())
|
|
4091
|
-
|
|
4091
|
+
Ot = t ? 3 : 2;
|
|
4092
4092
|
else {
|
|
4093
4093
|
if (a = a.minus(e.times(r)), a.lte(n))
|
|
4094
|
-
return
|
|
4095
|
-
|
|
4094
|
+
return Ot = Ci(e) ? t ? 2 : 3 : t ? 4 : 1, a;
|
|
4095
|
+
Ot = Ci(e) ? t ? 1 : 4 : t ? 3 : 2;
|
|
4096
4096
|
}
|
|
4097
4097
|
return a.minus(r).abs();
|
|
4098
4098
|
}
|
|
4099
4099
|
function Ea(i, a, e, t) {
|
|
4100
4100
|
var r, n, s, o, u, c, l, f, h, d = i.constructor, _ = e !== void 0;
|
|
4101
|
-
if (_ ? (He(e, 1,
|
|
4101
|
+
if (_ ? (He(e, 1, Gt), t === void 0 ? t = d.rounding : He(t, 0, 8)) : (e = d.precision, t = d.rounding), !i.isFinite())
|
|
4102
4102
|
l = Mo(i);
|
|
4103
4103
|
else {
|
|
4104
|
-
for (l =
|
|
4104
|
+
for (l = bt(i), s = l.indexOf("."), _ ? (r = 2, a == 16 ? e = e * 4 - 3 : a == 8 && (e = e * 3 - 2)) : r = a, s >= 0 && (l = l.replace(".", ""), h = new d(1), h.e = l.length - s, h.d = ln(bt(h), 10, r), h.e = h.d.length), f = ln(l, 10, r), n = u = f.length; f[--u] == 0; ) f.pop();
|
|
4105
4105
|
if (!f[0])
|
|
4106
4106
|
l = _ ? "0p+0" : "0";
|
|
4107
4107
|
else {
|
|
@@ -4160,7 +4160,7 @@ function Ql(i) {
|
|
|
4160
4160
|
function Wl(i, a) {
|
|
4161
4161
|
i = new this(i), a = new this(a);
|
|
4162
4162
|
var e, t = this.precision, r = this.rounding, n = t + 4;
|
|
4163
|
-
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e =
|
|
4163
|
+
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = _t(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? _t(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = _t(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(Ve(i, a, n, 1)), a = _t(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(Ve(i, a, n, 1)), e;
|
|
4164
4164
|
}
|
|
4165
4165
|
function ql(i) {
|
|
4166
4166
|
return new this(i).cbrt();
|
|
@@ -4176,7 +4176,7 @@ function Zl(i) {
|
|
|
4176
4176
|
var a, e, t, r = i.defaults === !0, n = [
|
|
4177
4177
|
"precision",
|
|
4178
4178
|
1,
|
|
4179
|
-
|
|
4179
|
+
Gt,
|
|
4180
4180
|
"rounding",
|
|
4181
4181
|
0,
|
|
4182
4182
|
8,
|
|
@@ -4198,8 +4198,8 @@ function Zl(i) {
|
|
|
4198
4198
|
];
|
|
4199
4199
|
for (a = 0; a < n.length; a += 3)
|
|
4200
4200
|
if (e = n[a], r && (this[e] = ks[e]), (t = i[e]) !== void 0)
|
|
4201
|
-
if (
|
|
4202
|
-
else throw Error(
|
|
4201
|
+
if (Ie(t) === t && t >= n[a + 1] && t <= n[a + 2]) this[e] = t;
|
|
4202
|
+
else throw Error(kt + e + ": " + t);
|
|
4203
4203
|
if (e = "crypto", r && (this[e] = ks[e]), (t = i[e]) !== void 0)
|
|
4204
4204
|
if (t === !0 || t === !1 || t === 0 || t === 1)
|
|
4205
4205
|
if (t)
|
|
@@ -4210,7 +4210,7 @@ function Zl(i) {
|
|
|
4210
4210
|
else
|
|
4211
4211
|
this[e] = !1;
|
|
4212
4212
|
else
|
|
4213
|
-
throw Error(
|
|
4213
|
+
throw Error(kt + e + ": " + t);
|
|
4214
4214
|
return this;
|
|
4215
4215
|
}
|
|
4216
4216
|
function zl(i) {
|
|
@@ -4248,7 +4248,7 @@ function So(i) {
|
|
|
4248
4248
|
return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), po.test(n) ? fn(c, n) : Tl(c, n);
|
|
4249
4249
|
if (u === "bigint")
|
|
4250
4250
|
return n < 0 ? (n = -n, c.s = -1) : c.s = 1, fn(c, n.toString());
|
|
4251
|
-
throw Error(
|
|
4251
|
+
throw Error(kt + n);
|
|
4252
4252
|
}
|
|
4253
4253
|
if (r.prototype = I, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set = Zl, r.clone = So, r.isDecimal = Ai, r.abs = Il, r.acos = Fl, r.acosh = kl, r.add = $l, r.asin = Yl, r.asinh = Hl, r.atan = Gl, r.atanh = Ql, r.atan2 = Wl, r.cbrt = ql, r.ceil = Kl, r.clamp = Xl, r.cos = zl, r.cosh = Jl, r.div = ef, r.exp = tf, r.floor = rf, r.hypot = nf, r.ln = sf, r.log = af, r.log10 = uf, r.log2 = of, r.max = cf, r.min = lf, r.mod = ff, r.mul = hf, r.pow = mf, r.random = gf, r.round = df, r.sign = Cf, r.sin = _f, r.sinh = Af, r.sqrt = Ef, r.sub = bf, r.sum = yf, r.tan = Rf, r.tanh = pf, r.trunc = Vf, i === void 0 && (i = {}), i && i.defaults !== !0)
|
|
4254
4254
|
for (t = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], a = 0; a < t.length; ) i.hasOwnProperty(e = t[a++]) || (i[e] = this[e]);
|
|
@@ -4307,7 +4307,7 @@ function mf(i, a) {
|
|
|
4307
4307
|
}
|
|
4308
4308
|
function gf(i) {
|
|
4309
4309
|
var a, e, t, r, n = 0, s = new this(1), o = [];
|
|
4310
|
-
if (i === void 0 ? i = this.precision : He(i, 1,
|
|
4310
|
+
if (i === void 0 ? i = this.precision : He(i, 1, Gt), t = Math.ceil(i / te), this.crypto)
|
|
4311
4311
|
if (crypto.getRandomValues)
|
|
4312
4312
|
for (a = crypto.getRandomValues(new Uint32Array(t)); n < t; )
|
|
4313
4313
|
r = a[n], r >= 429e7 ? a[n] = crypto.getRandomValues(new Uint32Array(1))[0] : o[n++] = r % 1e7;
|
|
@@ -4381,7 +4381,7 @@ function Mf(i, a) {
|
|
|
4381
4381
|
const e = i / a;
|
|
4382
4382
|
return Number.isSafeInteger(e) ? e : new P(i).div(a).toNumber();
|
|
4383
4383
|
}
|
|
4384
|
-
function
|
|
4384
|
+
function Bt(i, a) {
|
|
4385
4385
|
const e = 10 ** Math.trunc(a), t = qn(i, e);
|
|
4386
4386
|
return Math.round(Or(i, e) + t) / e;
|
|
4387
4387
|
}
|
|
@@ -4433,7 +4433,7 @@ function ba(i, a = 12, e = 1e-10) {
|
|
|
4433
4433
|
function Uf(i) {
|
|
4434
4434
|
return i - Math.trunc(i);
|
|
4435
4435
|
}
|
|
4436
|
-
const $n = class $n extends
|
|
4436
|
+
const $n = class $n extends Ht {
|
|
4437
4437
|
static create() {
|
|
4438
4438
|
return this._instance = this._instance || new $n(0), this._instance;
|
|
4439
4439
|
}
|
|
@@ -4557,14 +4557,14 @@ const $n = class $n extends Yt {
|
|
|
4557
4557
|
};
|
|
4558
4558
|
A($n, "_instance");
|
|
4559
4559
|
let ue = $n;
|
|
4560
|
-
const
|
|
4560
|
+
const Xt = class Xt extends Ht {
|
|
4561
4561
|
constructor(e) {
|
|
4562
4562
|
super(e);
|
|
4563
4563
|
A(this, "_value", !1);
|
|
4564
4564
|
this._value = e;
|
|
4565
4565
|
}
|
|
4566
4566
|
static create(e) {
|
|
4567
|
-
return e ? (this._instanceTrue = this._instanceTrue || new
|
|
4567
|
+
return e ? (this._instanceTrue = this._instanceTrue || new Xt(!0), this._instanceTrue) : (this._instanceFalse = this._instanceFalse || new Xt(!1), this._instanceFalse);
|
|
4568
4568
|
}
|
|
4569
4569
|
getValue() {
|
|
4570
4570
|
return this._value;
|
|
@@ -4606,7 +4606,7 @@ const Kt = class Kt extends Yt {
|
|
|
4606
4606
|
const n = y.create(e ? 1 : 0);
|
|
4607
4607
|
return this._convertToNumber().compare(n, t);
|
|
4608
4608
|
}
|
|
4609
|
-
return
|
|
4609
|
+
return Xt.create(r);
|
|
4610
4610
|
}
|
|
4611
4611
|
_compareString(e) {
|
|
4612
4612
|
switch (e) {
|
|
@@ -4707,9 +4707,9 @@ const Kt = class Kt extends Yt {
|
|
|
4707
4707
|
return this;
|
|
4708
4708
|
}
|
|
4709
4709
|
};
|
|
4710
|
-
A(
|
|
4711
|
-
let T =
|
|
4712
|
-
class y extends
|
|
4710
|
+
A(Xt, "_instanceTrue"), A(Xt, "_instanceFalse");
|
|
4711
|
+
let T = Xt;
|
|
4712
|
+
class y extends Ht {
|
|
4713
4713
|
constructor(e) {
|
|
4714
4714
|
super(e);
|
|
4715
4715
|
A(this, "_value", 0);
|
|
@@ -5080,10 +5080,10 @@ class y extends Yt {
|
|
|
5080
5080
|
if (typeof r == "number") {
|
|
5081
5081
|
if (!Number.isFinite(t) || !Number.isFinite(r))
|
|
5082
5082
|
return g.create(m.NUM);
|
|
5083
|
-
const n = t < 0 ? -
|
|
5083
|
+
const n = t < 0 ? -Bt(Math.abs(t), r) : Bt(t, r);
|
|
5084
5084
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
5085
5085
|
}
|
|
5086
|
-
return typeof r == "boolean" ? y.create(
|
|
5086
|
+
return typeof r == "boolean" ? y.create(Bt(t, r ? 1 : 0)) : this;
|
|
5087
5087
|
}
|
|
5088
5088
|
floor(e) {
|
|
5089
5089
|
if (e.isArray())
|
|
@@ -5144,8 +5144,8 @@ class y extends Yt {
|
|
|
5144
5144
|
return n;
|
|
5145
5145
|
}
|
|
5146
5146
|
}
|
|
5147
|
-
const vf = 1e5, Hs = new
|
|
5148
|
-
class j extends
|
|
5147
|
+
const vf = 1e5, Hs = new wt(vf);
|
|
5148
|
+
class j extends Ht {
|
|
5149
5149
|
constructor(e) {
|
|
5150
5150
|
super(e);
|
|
5151
5151
|
A(this, "_value");
|
|
@@ -5265,7 +5265,7 @@ function Kn(i) {
|
|
|
5265
5265
|
let a = !1;
|
|
5266
5266
|
if (typeof i == "string") {
|
|
5267
5267
|
const e = i.toLocaleUpperCase();
|
|
5268
|
-
e ===
|
|
5268
|
+
e === rr.TRUE ? a = !0 : e === rr.FALSE && (a = !1);
|
|
5269
5269
|
} else
|
|
5270
5270
|
i === 1 ? a = !0 : a = !1;
|
|
5271
5271
|
return T.create(a);
|
|
@@ -5296,7 +5296,7 @@ function Do(i = [], a = !1) {
|
|
|
5296
5296
|
e[t] == null && (e[t] = []);
|
|
5297
5297
|
for (let n = 0; n < r.length; n++) {
|
|
5298
5298
|
const s = r[n];
|
|
5299
|
-
e[t][n] =
|
|
5299
|
+
e[t][n] = Mt.create(s, a);
|
|
5300
5300
|
}
|
|
5301
5301
|
}
|
|
5302
5302
|
return e;
|
|
@@ -5313,7 +5313,7 @@ function If(i = []) {
|
|
|
5313
5313
|
}
|
|
5314
5314
|
return a;
|
|
5315
5315
|
}
|
|
5316
|
-
class q extends
|
|
5316
|
+
class q extends Ht {
|
|
5317
5317
|
constructor(e) {
|
|
5318
5318
|
super(typeof e == "string" ? e : Bf());
|
|
5319
5319
|
A(this, "_values", []);
|
|
@@ -5612,7 +5612,7 @@ class q extends Yt {
|
|
|
5612
5612
|
if (o != null)
|
|
5613
5613
|
return c;
|
|
5614
5614
|
}
|
|
5615
|
-
binarySearch(e, t =
|
|
5615
|
+
binarySearch(e, t = Kt.MIN, r = Le.MIN) {
|
|
5616
5616
|
if (e.isError())
|
|
5617
5617
|
return;
|
|
5618
5618
|
const { stringArray: n, stringPosition: s, numberArray: o, numberPosition: u } = this.flattenPosition();
|
|
@@ -5629,14 +5629,14 @@ class q extends Yt {
|
|
|
5629
5629
|
* @param matchType
|
|
5630
5630
|
* @returns
|
|
5631
5631
|
*/
|
|
5632
|
-
_binarySearch(e, t, r, n =
|
|
5632
|
+
_binarySearch(e, t, r, n = Kt.MIN, s = Le.MIN) {
|
|
5633
5633
|
const o = An(), u = Number(e.getValue()), c = !Number.isNaN(u);
|
|
5634
5634
|
let l = 0, f = t.length - 1, h = -1, d = -1, _ = -1;
|
|
5635
5635
|
for (; l <= f; ) {
|
|
5636
5636
|
const C = Math.floor((l + f) / 2), E = t[C];
|
|
5637
5637
|
let b;
|
|
5638
5638
|
if (E.isNull())
|
|
5639
|
-
b = n ===
|
|
5639
|
+
b = n === Kt.MIN ? 1 : -1;
|
|
5640
5640
|
else {
|
|
5641
5641
|
const R = E.getValue();
|
|
5642
5642
|
if (c) {
|
|
@@ -5645,7 +5645,7 @@ class q extends Yt {
|
|
|
5645
5645
|
} else
|
|
5646
5646
|
b = o(R.toString().toLocaleLowerCase(), e.getValue().toString().toLocaleLowerCase());
|
|
5647
5647
|
}
|
|
5648
|
-
if (n ===
|
|
5648
|
+
if (n === Kt.MAX && (b = -b), b === 0) {
|
|
5649
5649
|
h = C;
|
|
5650
5650
|
break;
|
|
5651
5651
|
}
|
|
@@ -5654,9 +5654,9 @@ class q extends Yt {
|
|
|
5654
5654
|
if (s === Le.NORMAL)
|
|
5655
5655
|
return h !== -1 ? r[h] : void 0;
|
|
5656
5656
|
if (s === Le.MIN)
|
|
5657
|
-
return h !== -1 ? r[h] : n ===
|
|
5657
|
+
return h !== -1 ? r[h] : n === Kt.MIN ? r[d] : r[_];
|
|
5658
5658
|
if (s === Le.MAX)
|
|
5659
|
-
return h !== -1 ? r[h] : n ===
|
|
5659
|
+
return h !== -1 ? r[h] : n === Kt.MIN ? r[_] : r[d];
|
|
5660
5660
|
}
|
|
5661
5661
|
sum() {
|
|
5662
5662
|
let e = y.create(0);
|
|
@@ -6064,7 +6064,7 @@ class q extends Yt {
|
|
|
6064
6064
|
);
|
|
6065
6065
|
C != null && C.forEach((E, b) => {
|
|
6066
6066
|
let R = ue.create();
|
|
6067
|
-
|
|
6067
|
+
or.has(b) ? R = g.create(b) : typeof b == "string" ? R = j.create(b) : typeof b == "number" ? R = y.create(b) : typeof b == "boolean" && (R = T.create(b));
|
|
6068
6068
|
let p;
|
|
6069
6069
|
R.isError() ? p = R : e.isError() ? p = e : p = R.compare(e, s, o), (p.isError() || p.getValue() === !0) && E.forEach((N) => {
|
|
6070
6070
|
N >= f && N <= f + u - 1 && (r[N - f] == null && (r[N - f] = []), r[N - f][t] = p);
|
|
@@ -6267,7 +6267,7 @@ class q extends Yt {
|
|
|
6267
6267
|
const f = [];
|
|
6268
6268
|
for (let h = 0; h < l; h++) {
|
|
6269
6269
|
const d = c[h].trim();
|
|
6270
|
-
f.push(
|
|
6270
|
+
f.push(Mt.create(d));
|
|
6271
6271
|
}
|
|
6272
6272
|
n.push(f);
|
|
6273
6273
|
}
|
|
@@ -6287,7 +6287,7 @@ class q extends Yt {
|
|
|
6287
6287
|
return q.create(o);
|
|
6288
6288
|
}
|
|
6289
6289
|
}
|
|
6290
|
-
class
|
|
6290
|
+
class Mt {
|
|
6291
6291
|
static create(a, e = !1) {
|
|
6292
6292
|
if (a == null)
|
|
6293
6293
|
return ue.create();
|
|
@@ -6295,9 +6295,9 @@ class Ot {
|
|
|
6295
6295
|
return T.create(a);
|
|
6296
6296
|
if (typeof a == "string") {
|
|
6297
6297
|
const t = a.toLocaleUpperCase().trim();
|
|
6298
|
-
if (
|
|
6298
|
+
if (or.has(t))
|
|
6299
6299
|
return g.create(t);
|
|
6300
|
-
if (t ===
|
|
6300
|
+
if (t === rr.TRUE || t === rr.FALSE)
|
|
6301
6301
|
return Kn(a);
|
|
6302
6302
|
if (W(a))
|
|
6303
6303
|
return y.create(Number(a));
|
|
@@ -6316,7 +6316,7 @@ function Ff(i) {
|
|
|
6316
6316
|
const a = i.trim();
|
|
6317
6317
|
return a.startsWith('"') && a.endsWith('"');
|
|
6318
6318
|
}
|
|
6319
|
-
const kf = 1e4, Rn = new
|
|
6319
|
+
const kf = 1e4, Rn = new wt(kf);
|
|
6320
6320
|
class Xn extends Hn {
|
|
6321
6321
|
constructor(e) {
|
|
6322
6322
|
super();
|
|
@@ -6556,13 +6556,13 @@ class Xn extends Hn {
|
|
|
6556
6556
|
}
|
|
6557
6557
|
getCellValueObject(e) {
|
|
6558
6558
|
const t = Ml(e);
|
|
6559
|
-
if (
|
|
6559
|
+
if (or.has(t))
|
|
6560
6560
|
return g.create(t);
|
|
6561
|
-
if (e.t ===
|
|
6561
|
+
if (e.t === Vt.NUMBER) {
|
|
6562
6562
|
const r = this._getPatternByCell(e);
|
|
6563
6563
|
return sc(r) ? j.create(t.toString()) : xr(t, r);
|
|
6564
6564
|
}
|
|
6565
|
-
return e.t ===
|
|
6565
|
+
return e.t === Vt.STRING || e.t === Vt.FORCE_STRING ? j.create(t.toString()) : e.t === Vt.BOOLEAN ? Kn(t) : Mt.create(t);
|
|
6566
6566
|
}
|
|
6567
6567
|
_getPatternByCell(e) {
|
|
6568
6568
|
var n;
|
|
@@ -6880,9 +6880,9 @@ function Va(i) {
|
|
|
6880
6880
|
for (const e of a)
|
|
6881
6881
|
if (i.startsWith(e)) {
|
|
6882
6882
|
const t = i.substring(e.length);
|
|
6883
|
-
return [e,
|
|
6883
|
+
return [e, Mt.create(t)];
|
|
6884
6884
|
}
|
|
6885
|
-
return [k.EQUALS,
|
|
6885
|
+
return [k.EQUALS, Mt.create(i)];
|
|
6886
6886
|
}
|
|
6887
6887
|
function Zn(i, a, e, t) {
|
|
6888
6888
|
if (!e)
|
|
@@ -6927,7 +6927,7 @@ function Qf(i) {
|
|
|
6927
6927
|
if (i.isError())
|
|
6928
6928
|
return {
|
|
6929
6929
|
v: i.getErrorType(),
|
|
6930
|
-
t:
|
|
6930
|
+
t: Vt.STRING,
|
|
6931
6931
|
...e,
|
|
6932
6932
|
...t
|
|
6933
6933
|
};
|
|
@@ -6935,17 +6935,17 @@ function Qf(i) {
|
|
|
6935
6935
|
const r = i, n = r.getValue();
|
|
6936
6936
|
return r.isNumber() ? {
|
|
6937
6937
|
v: n,
|
|
6938
|
-
t:
|
|
6938
|
+
t: Vt.NUMBER,
|
|
6939
6939
|
...e,
|
|
6940
6940
|
...t
|
|
6941
6941
|
} : r.isBoolean() ? {
|
|
6942
6942
|
v: n ? 1 : 0,
|
|
6943
|
-
t:
|
|
6943
|
+
t: Vt.BOOLEAN,
|
|
6944
6944
|
...e,
|
|
6945
6945
|
...t
|
|
6946
6946
|
} : r.isString() ? {
|
|
6947
6947
|
v: n,
|
|
6948
|
-
t:
|
|
6948
|
+
t: Vt.STRING,
|
|
6949
6949
|
...e,
|
|
6950
6950
|
...t
|
|
6951
6951
|
} : r.isNull() ? {
|
|
@@ -6954,7 +6954,7 @@ function Qf(i) {
|
|
|
6954
6954
|
...t
|
|
6955
6955
|
} : {
|
|
6956
6956
|
v: n,
|
|
6957
|
-
t:
|
|
6957
|
+
t: Vt.STRING,
|
|
6958
6958
|
...e,
|
|
6959
6959
|
...t
|
|
6960
6960
|
};
|
|
@@ -7121,10 +7121,10 @@ let Qs = class extends Ne {
|
|
|
7121
7121
|
const { unitId: t, sheetName: r, range: n } = Dr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(fr.UNIVER_SHEET);
|
|
7122
7122
|
if (t === "" || t === s.getUnitId())
|
|
7123
7123
|
if (r === "")
|
|
7124
|
-
e = `#gid=${s.getActiveSheet().getSheetId()}&range=${
|
|
7124
|
+
e = `#gid=${s.getActiveSheet().getSheetId()}&range=${Ft(n)}`;
|
|
7125
7125
|
else {
|
|
7126
7126
|
const o = s.getSheetBySheetName(r);
|
|
7127
|
-
o && (e = `#gid=${o.getSheetId()}&range=${
|
|
7127
|
+
o && (e = `#gid=${o.getSheetId()}&range=${Ft(n)}`);
|
|
7128
7128
|
}
|
|
7129
7129
|
} else qe.isLegalUrl(i) && (e = qe.normalizeUrl(i));
|
|
7130
7130
|
return {
|
|
@@ -7507,12 +7507,12 @@ let Ws = class extends Ne {
|
|
|
7507
7507
|
}
|
|
7508
7508
|
};
|
|
7509
7509
|
Ws = th([
|
|
7510
|
-
pi(0,
|
|
7510
|
+
pi(0, Yt),
|
|
7511
7511
|
pi(1, Lo)
|
|
7512
7512
|
], Ws);
|
|
7513
|
-
const
|
|
7513
|
+
const St = Ze("univer.formula.runtime.service");
|
|
7514
7514
|
var ie = /* @__PURE__ */ ((i) => (i[i.REFERENCE = 1] = "REFERENCE", i[i.VALUE = 2] = "VALUE", i[i.OPERATOR = 3] = "OPERATOR", i[i.FUNCTION = 4] = "FUNCTION", i[i.LAMBDA = 5] = "LAMBDA", i[i.LAMBDA_PARAMETER = 6] = "LAMBDA_PARAMETER", i[i.ERROR = 7] = "ERROR", i[i.BASE = 8] = "BASE", i[i.ROOT = 9] = "ROOT", i[i.UNION = 10] = "UNION", i[i.PREFIX = 11] = "PREFIX", i[i.SUFFIX = 12] = "SUFFIX", i[i.NULL = 13] = "NULL", i))(ie || {});
|
|
7515
|
-
const
|
|
7515
|
+
const yt = /* @__PURE__ */ new Map([
|
|
7516
7516
|
[1, 7],
|
|
7517
7517
|
[2, 9],
|
|
7518
7518
|
[3, 8],
|
|
@@ -7595,7 +7595,7 @@ class Ge {
|
|
|
7595
7595
|
setNotEmpty(a = !0) {
|
|
7596
7596
|
}
|
|
7597
7597
|
async executeAsync() {
|
|
7598
|
-
return Promise.resolve(
|
|
7598
|
+
return Promise.resolve(Ut.SUCCESS);
|
|
7599
7599
|
}
|
|
7600
7600
|
serialize() {
|
|
7601
7601
|
const a = this.getToken(), e = this.getChildren(), t = [], r = e.length;
|
|
@@ -7636,8 +7636,8 @@ class xe extends Ge {
|
|
|
7636
7636
|
return this._errorValueObject;
|
|
7637
7637
|
}
|
|
7638
7638
|
}
|
|
7639
|
-
const
|
|
7640
|
-
class
|
|
7639
|
+
const Rt = 100;
|
|
7640
|
+
class pt {
|
|
7641
7641
|
get zIndex() {
|
|
7642
7642
|
return 0;
|
|
7643
7643
|
}
|
|
@@ -7662,24 +7662,24 @@ class qs extends Ge {
|
|
|
7662
7662
|
e == null ? this.setValue(g.create(m.VALUE)) : this.setValue(e.getValue());
|
|
7663
7663
|
}
|
|
7664
7664
|
}
|
|
7665
|
-
class Po extends
|
|
7665
|
+
class Po extends pt {
|
|
7666
7666
|
get zIndex() {
|
|
7667
|
-
return
|
|
7667
|
+
return yt.get(ie.ROOT) || Rt;
|
|
7668
7668
|
}
|
|
7669
7669
|
checkAndCreateNodeType(a) {
|
|
7670
7670
|
if (!(a instanceof ae))
|
|
7671
7671
|
return;
|
|
7672
|
-
if (a.getToken() ===
|
|
7673
|
-
return new qs(
|
|
7672
|
+
if (a.getToken() === Tt)
|
|
7673
|
+
return new qs(Tt);
|
|
7674
7674
|
}
|
|
7675
7675
|
}
|
|
7676
|
-
const rh = 5e3, jr = new
|
|
7676
|
+
const rh = 5e3, jr = new wt(rh);
|
|
7677
7677
|
function Vi(i, a, e, t, r) {
|
|
7678
7678
|
let n = jr.get(`${i}${a}`);
|
|
7679
7679
|
if (n && !xo(n, r))
|
|
7680
7680
|
return n;
|
|
7681
7681
|
const s = e.treeBuilder(a);
|
|
7682
|
-
if (
|
|
7682
|
+
if (or.has(s))
|
|
7683
7683
|
return xe.create(s);
|
|
7684
7684
|
if (n = t.parse(s), n == null)
|
|
7685
7685
|
throw new Error("astNode is null");
|
|
@@ -7700,7 +7700,7 @@ function xo(i, a) {
|
|
|
7700
7700
|
function nh(i, a, e) {
|
|
7701
7701
|
return !!(a != null && xo(a, e));
|
|
7702
7702
|
}
|
|
7703
|
-
const
|
|
7703
|
+
const Qt = Ze("univer.formula-function.service");
|
|
7704
7704
|
class sh extends Ne {
|
|
7705
7705
|
constructor() {
|
|
7706
7706
|
super(...arguments);
|
|
@@ -7766,7 +7766,7 @@ class sh extends Ne {
|
|
|
7766
7766
|
});
|
|
7767
7767
|
}
|
|
7768
7768
|
}
|
|
7769
|
-
var
|
|
7769
|
+
var Be = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED", i.MINUS = "MINUS", i.MULTIPLY = "MULTIPLY", i.PLUS = "PLUS", i.UNION = "UNION", i.CUBE = "CUBE", i))(Be || {}), ah = Object.getOwnPropertyDescriptor, ih = (i, a, e, t) => {
|
|
7770
7770
|
for (var r = t > 1 ? void 0 : t ? ah(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7771
7771
|
(s = i[n]) && (r = s(r) || r);
|
|
7772
7772
|
return r;
|
|
@@ -7797,12 +7797,12 @@ class Vn extends Ge {
|
|
|
7797
7797
|
return l !== u && c !== o || o === c && u === l ? g.create(m.VALUE) : c === o && n >= u && n <= l ? e.getCellByColumn(n) : u === l && r >= o && r <= c ? e.getCellByRow(r) : e.isTable() ? e.getCellByPosition(r) : g.create(m.VALUE);
|
|
7798
7798
|
}
|
|
7799
7799
|
}
|
|
7800
|
-
let Nn = class extends
|
|
7800
|
+
let Nn = class extends pt {
|
|
7801
7801
|
constructor(i, a) {
|
|
7802
7802
|
super(), this._functionService = i, this._runtimeService = a;
|
|
7803
7803
|
}
|
|
7804
7804
|
get zIndex() {
|
|
7805
|
-
return
|
|
7805
|
+
return yt.get(ie.PREFIX) || Rt;
|
|
7806
7806
|
}
|
|
7807
7807
|
checkAndCreateNodeType(i) {
|
|
7808
7808
|
if (!(i instanceof ae))
|
|
@@ -7812,15 +7812,15 @@ let Nn = class extends Rt {
|
|
|
7812
7812
|
return;
|
|
7813
7813
|
let t = "";
|
|
7814
7814
|
if (e === Me.MINUS)
|
|
7815
|
-
t =
|
|
7815
|
+
t = Be.MINUS;
|
|
7816
7816
|
else return e === Me.AT ? new Vn(this._runtimeService, e) : void 0;
|
|
7817
7817
|
const r = this._functionService.getExecutor(t);
|
|
7818
7818
|
return r ? new Vn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
|
|
7819
7819
|
}
|
|
7820
7820
|
};
|
|
7821
7821
|
Nn = ih([
|
|
7822
|
-
Ni(0,
|
|
7823
|
-
Ni(1,
|
|
7822
|
+
Ni(0, Qt),
|
|
7823
|
+
Ni(1, St)
|
|
7824
7824
|
], Nn);
|
|
7825
7825
|
new RegExp(Me.MINUS, "g");
|
|
7826
7826
|
new RegExp(Me.AT, "g");
|
|
@@ -7829,7 +7829,7 @@ function jo(i, a, e) {
|
|
|
7829
7829
|
const s = n.slice(0, 2);
|
|
7830
7830
|
let o = 0;
|
|
7831
7831
|
if (s[0] === Me.MINUS) {
|
|
7832
|
-
const u = a.getExecutor(
|
|
7832
|
+
const u = a.getExecutor(Be.MINUS);
|
|
7833
7833
|
t = new Vn(e, Me.MINUS, u), o++;
|
|
7834
7834
|
}
|
|
7835
7835
|
return s[0] === Me.AT && (r = new Vn(e, Me.AT), t && r.setParent(t), o++), o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
|
|
@@ -7855,7 +7855,7 @@ class ch extends Ge {
|
|
|
7855
7855
|
}
|
|
7856
7856
|
const r = await this._calculateAsync(a);
|
|
7857
7857
|
let n;
|
|
7858
|
-
return r.isAsyncObject() || r.isAsyncArrayObject() ? n = await r.getValue() : n = r, this._setRefData(n), this.setValue(n), Promise.resolve(
|
|
7858
|
+
return r.isAsyncObject() || r.isAsyncArrayObject() ? n = await r.getValue() : n = r, this._setRefData(n), this.setValue(n), Promise.resolve(Ut.SUCCESS);
|
|
7859
7859
|
}
|
|
7860
7860
|
execute() {
|
|
7861
7861
|
const a = [], e = this.getChildren(), t = e.length;
|
|
@@ -7905,7 +7905,7 @@ class ch extends Ge {
|
|
|
7905
7905
|
_handleCustomResult(a) {
|
|
7906
7906
|
var t;
|
|
7907
7907
|
if (typeof a != "object" || a == null)
|
|
7908
|
-
return
|
|
7908
|
+
return Mt.create(a);
|
|
7909
7909
|
const e = Do(a);
|
|
7910
7910
|
return q.create({
|
|
7911
7911
|
calculateValueList: e,
|
|
@@ -7995,18 +7995,18 @@ class lh extends Ge {
|
|
|
7995
7995
|
return ie.FUNCTION;
|
|
7996
7996
|
}
|
|
7997
7997
|
async executeAsync() {
|
|
7998
|
-
return this.setValue(g.create(m.NAME)), Promise.resolve(
|
|
7998
|
+
return this.setValue(g.create(m.NAME)), Promise.resolve(Ut.SUCCESS);
|
|
7999
7999
|
}
|
|
8000
8000
|
execute() {
|
|
8001
8001
|
this.setValue(g.create(m.NAME));
|
|
8002
8002
|
}
|
|
8003
8003
|
}
|
|
8004
|
-
let On = class extends
|
|
8004
|
+
let On = class extends pt {
|
|
8005
8005
|
constructor(i, a, e, t, r, n) {
|
|
8006
8006
|
super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
|
|
8007
8007
|
}
|
|
8008
8008
|
get zIndex() {
|
|
8009
|
-
return
|
|
8009
|
+
return yt.get(ie.FUNCTION) || Rt;
|
|
8010
8010
|
}
|
|
8011
8011
|
create(i) {
|
|
8012
8012
|
const a = this._functionService.getExecutor(i);
|
|
@@ -8037,9 +8037,9 @@ let On = class extends Rt {
|
|
|
8037
8037
|
}
|
|
8038
8038
|
};
|
|
8039
8039
|
On = uh([
|
|
8040
|
-
ur(0,
|
|
8041
|
-
ur(1,
|
|
8042
|
-
ur(2,
|
|
8040
|
+
ur(0, Qt),
|
|
8041
|
+
ur(1, Yt),
|
|
8042
|
+
ur(2, St),
|
|
8043
8043
|
ur(3, Nr),
|
|
8044
8044
|
ur(4, ye(Ki)),
|
|
8045
8045
|
ur(5, ye(_r))
|
|
@@ -8091,7 +8091,7 @@ let br = class extends Ne {
|
|
|
8091
8091
|
}
|
|
8092
8092
|
async _executeAsync(i, a = 0, e = 0) {
|
|
8093
8093
|
if (this._runtimeService.isStopExecution())
|
|
8094
|
-
return Promise.resolve(
|
|
8094
|
+
return Promise.resolve(Ut.ERROR);
|
|
8095
8095
|
const t = i.getChildren(), r = t.length;
|
|
8096
8096
|
for (let n = 0; n < r; n++) {
|
|
8097
8097
|
const s = t[n];
|
|
@@ -8101,11 +8101,11 @@ let br = class extends Ne {
|
|
|
8101
8101
|
}
|
|
8102
8102
|
await this._executeAsync(s, a, e);
|
|
8103
8103
|
}
|
|
8104
|
-
return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.nodeType === ie.FUNCTION && i.isAsync() ? await i.executeAsync() : i.execute(), Promise.resolve(
|
|
8104
|
+
return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.nodeType === ie.FUNCTION && i.isAsync() ? await i.executeAsync() : i.execute(), Promise.resolve(Ut.SUCCESS);
|
|
8105
8105
|
}
|
|
8106
8106
|
_execute(i, a = 0, e = 0) {
|
|
8107
8107
|
if (this._runtimeService.isStopExecution())
|
|
8108
|
-
return
|
|
8108
|
+
return Ut.ERROR;
|
|
8109
8109
|
const t = i.getChildren(), r = t.length;
|
|
8110
8110
|
for (let n = 0; n < r; n++) {
|
|
8111
8111
|
const s = t[n];
|
|
@@ -8115,11 +8115,11 @@ let br = class extends Ne {
|
|
|
8115
8115
|
}
|
|
8116
8116
|
this._execute(s, a, e);
|
|
8117
8117
|
}
|
|
8118
|
-
return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.execute(),
|
|
8118
|
+
return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.execute(), Ut.SUCCESS;
|
|
8119
8119
|
}
|
|
8120
8120
|
};
|
|
8121
8121
|
br = hh([
|
|
8122
|
-
mh(0,
|
|
8122
|
+
mh(0, St)
|
|
8123
8123
|
], br);
|
|
8124
8124
|
function Uo(i) {
|
|
8125
8125
|
return i instanceof ae ? i.getToken() === dr : !1;
|
|
@@ -8167,7 +8167,7 @@ function vo(i) {
|
|
|
8167
8167
|
const r = e.get(t);
|
|
8168
8168
|
return r == null && i.getValue() ? i : vo(r);
|
|
8169
8169
|
}
|
|
8170
|
-
class Oa extends
|
|
8170
|
+
class Oa extends Ht {
|
|
8171
8171
|
constructor(e, t, r) {
|
|
8172
8172
|
super(0);
|
|
8173
8173
|
A(this, "_lambdaPrivacyValueMap", /* @__PURE__ */ new Map());
|
|
@@ -8201,7 +8201,7 @@ class Oa extends Yt {
|
|
|
8201
8201
|
* @param variants
|
|
8202
8202
|
*/
|
|
8203
8203
|
executeCustom(...e) {
|
|
8204
|
-
const t = e.map((r) =>
|
|
8204
|
+
const t = e.map((r) => Mt.create(r));
|
|
8205
8205
|
return this.execute(...t);
|
|
8206
8206
|
}
|
|
8207
8207
|
_setLambdaNodeValue(e) {
|
|
@@ -8278,12 +8278,12 @@ class Ah extends Ge {
|
|
|
8278
8278
|
// return Promise.resolve(AstNodePromiseType.SUCCESS);
|
|
8279
8279
|
// }
|
|
8280
8280
|
}
|
|
8281
|
-
let Mn = class extends
|
|
8281
|
+
let Mn = class extends pt {
|
|
8282
8282
|
constructor(i, a) {
|
|
8283
8283
|
super(), this._runtimeService = i, this._interpreter = a;
|
|
8284
8284
|
}
|
|
8285
8285
|
get zIndex() {
|
|
8286
|
-
return
|
|
8286
|
+
return yt.get(ie.LAMBDA) || Rt;
|
|
8287
8287
|
}
|
|
8288
8288
|
create(i) {
|
|
8289
8289
|
const a = i.getChildren(), e = a[0];
|
|
@@ -8317,7 +8317,7 @@ let Mn = class extends Rt {
|
|
|
8317
8317
|
}
|
|
8318
8318
|
};
|
|
8319
8319
|
Mn = _h([
|
|
8320
|
-
Mi(0,
|
|
8320
|
+
Mi(0, St),
|
|
8321
8321
|
Mi(1, ye(br))
|
|
8322
8322
|
], Mn);
|
|
8323
8323
|
function To(i) {
|
|
@@ -8352,9 +8352,9 @@ class Eh extends Ge {
|
|
|
8352
8352
|
}
|
|
8353
8353
|
}
|
|
8354
8354
|
}
|
|
8355
|
-
class Bo extends
|
|
8355
|
+
class Bo extends pt {
|
|
8356
8356
|
get zIndex() {
|
|
8357
|
-
return
|
|
8357
|
+
return yt.get(ie.LAMBDA_PARAMETER) || Rt;
|
|
8358
8358
|
}
|
|
8359
8359
|
create(a) {
|
|
8360
8360
|
const e = a.getFunctionDefinitionPrivacyVar(), t = a.getLambdaParameter();
|
|
@@ -8390,7 +8390,7 @@ class Vh extends Ge {
|
|
|
8390
8390
|
}
|
|
8391
8391
|
execute() {
|
|
8392
8392
|
const a = this.getChildren();
|
|
8393
|
-
this._functionExecutor.name ===
|
|
8393
|
+
this._functionExecutor.name === Be.COMPARE && this._functionExecutor.setCompareType(this.getToken());
|
|
8394
8394
|
const e = a[0], t = a[1];
|
|
8395
8395
|
let r = e == null ? void 0 : e.getValue(), n = t == null ? void 0 : t.getValue();
|
|
8396
8396
|
const s = this.getToken();
|
|
@@ -8406,17 +8406,17 @@ class Vh extends Ge {
|
|
|
8406
8406
|
);
|
|
8407
8407
|
}
|
|
8408
8408
|
}
|
|
8409
|
-
let wn = class extends
|
|
8409
|
+
let wn = class extends pt {
|
|
8410
8410
|
constructor(i) {
|
|
8411
8411
|
super(), this._functionService = i;
|
|
8412
8412
|
}
|
|
8413
8413
|
get zIndex() {
|
|
8414
|
-
return
|
|
8414
|
+
return yt.get(ie.OPERATOR) || Rt;
|
|
8415
8415
|
}
|
|
8416
8416
|
create(i) {
|
|
8417
8417
|
let a = "";
|
|
8418
8418
|
const e = i;
|
|
8419
|
-
e === X.PLUS ? a =
|
|
8419
|
+
e === X.PLUS ? a = Be.PLUS : e === X.MINUS ? a = Be.MINUS : e === X.MULTIPLY ? a = Be.MULTIPLY : e === X.DIVIDED ? a = Be.DIVIDED : e === X.CONCATENATE ? a = se.CONCATENATE : e === X.POWER ? a = Y.POWER : Rc.has(e) && (a = Be.COMPARE);
|
|
8420
8420
|
const t = this._functionService.getExecutor(a);
|
|
8421
8421
|
return t ? new Vh(e, t) : (console.error(`No function ${i}`), xe.create(m.NAME));
|
|
8422
8422
|
}
|
|
@@ -8424,12 +8424,12 @@ let wn = class extends Rt {
|
|
|
8424
8424
|
if (i instanceof ae)
|
|
8425
8425
|
return;
|
|
8426
8426
|
const a = i.trim();
|
|
8427
|
-
if (!(a.charAt(0) === '"' && a.charAt(a.length - 1) === '"') &&
|
|
8427
|
+
if (!(a.charAt(0) === '"' && a.charAt(a.length - 1) === '"') && xt.has(a))
|
|
8428
8428
|
return this.create(a);
|
|
8429
8429
|
}
|
|
8430
8430
|
};
|
|
8431
8431
|
wn = Rh([
|
|
8432
|
-
ph(0,
|
|
8432
|
+
ph(0, Qt)
|
|
8433
8433
|
], wn);
|
|
8434
8434
|
var Nh = Object.getOwnPropertyDescriptor, Oh = (i, a, e, t) => {
|
|
8435
8435
|
for (var r = t > 1 ? void 0 : t ? Nh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -8462,12 +8462,12 @@ class As extends Ge {
|
|
|
8462
8462
|
};
|
|
8463
8463
|
}
|
|
8464
8464
|
}
|
|
8465
|
-
let Sn = class extends
|
|
8465
|
+
let Sn = class extends pt {
|
|
8466
8466
|
constructor(i, a, e) {
|
|
8467
8467
|
super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e;
|
|
8468
8468
|
}
|
|
8469
8469
|
get zIndex() {
|
|
8470
|
-
return
|
|
8470
|
+
return yt.get(ie.REFERENCE) || Rt;
|
|
8471
8471
|
}
|
|
8472
8472
|
checkAndCreateNodeType(i) {
|
|
8473
8473
|
var l, f;
|
|
@@ -8486,9 +8486,9 @@ let Sn = class extends Rt {
|
|
|
8486
8486
|
}
|
|
8487
8487
|
};
|
|
8488
8488
|
Sn = Oh([
|
|
8489
|
-
_s(0,
|
|
8490
|
-
_s(1,
|
|
8491
|
-
_s(2,
|
|
8489
|
+
_s(0, Yt),
|
|
8490
|
+
_s(1, St),
|
|
8491
|
+
_s(2, Qt)
|
|
8492
8492
|
], Sn);
|
|
8493
8493
|
var Mh = Object.getOwnPropertyDescriptor, wh = (i, a, e, t) => {
|
|
8494
8494
|
for (var r = t > 1 ? void 0 : t ? Mh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -8528,12 +8528,12 @@ class wi extends Ge {
|
|
|
8528
8528
|
return o && this._lexer.treeBuilder(o), g.create(m.VALUE);
|
|
8529
8529
|
}
|
|
8530
8530
|
}
|
|
8531
|
-
let Dn = class extends
|
|
8531
|
+
let Dn = class extends pt {
|
|
8532
8532
|
constructor(i, a, e) {
|
|
8533
8533
|
super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
|
|
8534
8534
|
}
|
|
8535
8535
|
get zIndex() {
|
|
8536
|
-
return
|
|
8536
|
+
return yt.get(ie.SUFFIX) || Rt;
|
|
8537
8537
|
}
|
|
8538
8538
|
checkAndCreateNodeType(i) {
|
|
8539
8539
|
if (!(i instanceof ae))
|
|
@@ -8543,16 +8543,16 @@ let Dn = class extends Rt {
|
|
|
8543
8543
|
return;
|
|
8544
8544
|
let e = "";
|
|
8545
8545
|
if (a === tt.PERCENTAGE)
|
|
8546
|
-
e =
|
|
8546
|
+
e = Be.DIVIDED;
|
|
8547
8547
|
else return a === tt.POUND ? new wi(this._currentConfigService, this._lexer, a) : void 0;
|
|
8548
8548
|
const t = this._functionService.getExecutor(e);
|
|
8549
8549
|
return t ? new wi(this._currentConfigService, this._lexer, a, t) : (console.error(`No function ${i}`), xe.create(m.NAME));
|
|
8550
8550
|
}
|
|
8551
8551
|
};
|
|
8552
8552
|
Dn = wh([
|
|
8553
|
-
Es(0,
|
|
8553
|
+
Es(0, Qt),
|
|
8554
8554
|
Es(1, ye(Ar)),
|
|
8555
|
-
Es(2,
|
|
8555
|
+
Es(2, Yt)
|
|
8556
8556
|
], Dn);
|
|
8557
8557
|
var Sh = Object.getOwnPropertyDescriptor, Dh = (i, a, e, t) => {
|
|
8558
8558
|
for (var r = t > 1 ? void 0 : t ? Sh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -8577,12 +8577,12 @@ class Ph extends Ge {
|
|
|
8577
8577
|
return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, Xf(a, e));
|
|
8578
8578
|
}
|
|
8579
8579
|
}
|
|
8580
|
-
let Ln = class extends
|
|
8580
|
+
let Ln = class extends pt {
|
|
8581
8581
|
constructor(i) {
|
|
8582
8582
|
super(), this._functionService = i;
|
|
8583
8583
|
}
|
|
8584
8584
|
get zIndex() {
|
|
8585
|
-
return
|
|
8585
|
+
return yt.get(ie.UNION) || Rt;
|
|
8586
8586
|
}
|
|
8587
8587
|
create(i) {
|
|
8588
8588
|
return new Ph(i);
|
|
@@ -8596,7 +8596,7 @@ let Ln = class extends Rt {
|
|
|
8596
8596
|
}
|
|
8597
8597
|
};
|
|
8598
8598
|
Ln = Dh([
|
|
8599
|
-
Lh(0,
|
|
8599
|
+
Lh(0, Qt)
|
|
8600
8600
|
], Ln);
|
|
8601
8601
|
class xh extends Ge {
|
|
8602
8602
|
constructor(a) {
|
|
@@ -8608,24 +8608,24 @@ class xh extends Ge {
|
|
|
8608
8608
|
execute() {
|
|
8609
8609
|
var e, t, r;
|
|
8610
8610
|
const a = ((e = this.getParent()) == null ? void 0 : e.nodeType) === ie.FUNCTION && ((r = (t = this.getParent()) == null ? void 0 : t.isFunctionExecutorArgumentsIgnoreNumberPattern) == null ? void 0 : r.call(t));
|
|
8611
|
-
this.setValue(
|
|
8611
|
+
this.setValue(Mt.create(this.getToken(), a));
|
|
8612
8612
|
}
|
|
8613
8613
|
}
|
|
8614
|
-
class Io extends
|
|
8614
|
+
class Io extends pt {
|
|
8615
8615
|
get zIndex() {
|
|
8616
|
-
return
|
|
8616
|
+
return yt.get(ie.VALUE) || Rt;
|
|
8617
8617
|
}
|
|
8618
8618
|
_checkValueNode(a) {
|
|
8619
8619
|
if (Number.isNaN(Number(a))) {
|
|
8620
8620
|
const e = a.trim(), t = e.charAt(0), r = e.charAt(e.length - 1);
|
|
8621
|
-
if (
|
|
8621
|
+
if (or.has(e))
|
|
8622
8622
|
return this.create(e);
|
|
8623
8623
|
if (t === '"' && r === '"')
|
|
8624
8624
|
return this.create(e);
|
|
8625
8625
|
if (t === "{" && r === "}")
|
|
8626
8626
|
return this.create(e);
|
|
8627
8627
|
const n = e.toUpperCase();
|
|
8628
|
-
if (n ===
|
|
8628
|
+
if (n === rr.TRUE || n === rr.FALSE)
|
|
8629
8629
|
return this.create(n);
|
|
8630
8630
|
} else
|
|
8631
8631
|
return this.create(a);
|
|
@@ -8655,13 +8655,13 @@ let Ur = class extends Ne {
|
|
|
8655
8655
|
}), this._astNodeFactoryList = [];
|
|
8656
8656
|
}
|
|
8657
8657
|
parse(a) {
|
|
8658
|
-
const e = new qs(
|
|
8658
|
+
const e = new qs(Tt), t = this._parse(a, e);
|
|
8659
8659
|
return a.hasDefinedNames() && (t == null || t.setDefinedNames(a.getDefinedNames())), t;
|
|
8660
8660
|
}
|
|
8661
8661
|
_lambdaParameterHandler(a, e) {
|
|
8662
8662
|
if (e.getLambdaId == null)
|
|
8663
8663
|
return xe.create(m.VALUE);
|
|
8664
|
-
const t = e.getLambdaId(), r = new qs(
|
|
8664
|
+
const t = e.getLambdaId(), r = new qs(Tt), n = this._runtimeService.getFunctionDefinitionPrivacyVar(t);
|
|
8665
8665
|
if (!n)
|
|
8666
8666
|
return !1;
|
|
8667
8667
|
const s = [...n.keys()], o = a.getChildren(), u = o.length;
|
|
@@ -8705,9 +8705,9 @@ let Ur = class extends Ne {
|
|
|
8705
8705
|
const f = this._changeLetToLambda(a);
|
|
8706
8706
|
return f != null ? this._parse(f, e) : xe.create(m.ERROR);
|
|
8707
8707
|
}
|
|
8708
|
-
if (o ===
|
|
8708
|
+
if (o === gt) {
|
|
8709
8709
|
if (s = e, r === 0)
|
|
8710
|
-
return new bh(
|
|
8710
|
+
return new bh(Tt).setParent(e), s;
|
|
8711
8711
|
} else {
|
|
8712
8712
|
if (o === dr) {
|
|
8713
8713
|
let f = this._lambdaParameterHandler(a, e);
|
|
@@ -8726,7 +8726,7 @@ let Ur = class extends Ne {
|
|
|
8726
8726
|
continue;
|
|
8727
8727
|
let d = null;
|
|
8728
8728
|
if (h instanceof ae) {
|
|
8729
|
-
if (h.getToken() ===
|
|
8729
|
+
if (h.getToken() === gt && h.getChildren().length === 0) {
|
|
8730
8730
|
const _ = (l = h.getParent()) == null ? void 0 : l.getChildren();
|
|
8731
8731
|
if (_ && _.length === 1)
|
|
8732
8732
|
return xe.create(m.NAME);
|
|
@@ -8816,7 +8816,7 @@ let Ur = class extends Ne {
|
|
|
8816
8816
|
}
|
|
8817
8817
|
};
|
|
8818
8818
|
Ur = Uh([
|
|
8819
|
-
ut(0,
|
|
8819
|
+
ut(0, St),
|
|
8820
8820
|
ut(1, ye(Po)),
|
|
8821
8821
|
ut(2, ye(On)),
|
|
8822
8822
|
ut(3, ye(Mn)),
|
|
@@ -9578,7 +9578,7 @@ var Fh = Object.getOwnPropertyDescriptor, kh = (i, a, e, t) => {
|
|
|
9578
9578
|
for (var r = t > 1 ? void 0 : t ? Fh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
9579
9579
|
(s = i[n]) && (r = s(r) || r);
|
|
9580
9580
|
return r;
|
|
9581
|
-
},
|
|
9581
|
+
}, Pt = (i, a) => (e, t) => a(e, t, i);
|
|
9582
9582
|
function cr(i) {
|
|
9583
9583
|
return i.getLastTreeId() || 0;
|
|
9584
9584
|
}
|
|
@@ -10175,20 +10175,20 @@ let Zs = class extends Ne {
|
|
|
10175
10175
|
}
|
|
10176
10176
|
};
|
|
10177
10177
|
Zs = kh([
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10178
|
+
Pt(0, Yt),
|
|
10179
|
+
Pt(1, St),
|
|
10180
|
+
Pt(2, Ma),
|
|
10181
|
+
Pt(3, vr),
|
|
10182
|
+
Pt(4, ye(br)),
|
|
10183
|
+
Pt(5, ye(Ur)),
|
|
10184
|
+
Pt(6, ye(Ar)),
|
|
10185
|
+
Pt(7, Jn)
|
|
10186
10186
|
], Zs);
|
|
10187
10187
|
var $h = Object.getOwnPropertyDescriptor, Yh = (i, a, e, t) => {
|
|
10188
10188
|
for (var r = t > 1 ? void 0 : t ? $h(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
10189
10189
|
(s = i[n]) && (r = s(r) || r);
|
|
10190
10190
|
return r;
|
|
10191
|
-
},
|
|
10191
|
+
}, qt = (i, a) => (e, t) => a(e, t, i);
|
|
10192
10192
|
const Hh = 500, zs = Ze("engine-formula.calculate-formula.service");
|
|
10193
10193
|
let Js = class extends Ne {
|
|
10194
10194
|
constructor(a, e, t, r, n, s, o) {
|
|
@@ -10315,13 +10315,13 @@ let Js = class extends Ne {
|
|
|
10315
10315
|
}
|
|
10316
10316
|
};
|
|
10317
10317
|
Js = Yh([
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10318
|
+
qt(0, ia),
|
|
10319
|
+
qt(1, ye(Ar)),
|
|
10320
|
+
qt(2, Yt),
|
|
10321
|
+
qt(3, St),
|
|
10322
|
+
qt(4, Xs),
|
|
10323
|
+
qt(5, ye(br)),
|
|
10324
|
+
qt(6, ye(Ur))
|
|
10325
10325
|
], Js);
|
|
10326
10326
|
var Gh = Object.getOwnPropertyDescriptor, Qh = (i, a, e, t) => {
|
|
10327
10327
|
for (var r = t > 1 ? void 0 : t ? Gh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -10433,7 +10433,7 @@ let Pn = class extends Ne {
|
|
|
10433
10433
|
}
|
|
10434
10434
|
};
|
|
10435
10435
|
Pn = Qh([
|
|
10436
|
-
ys(0,
|
|
10436
|
+
ys(0, ir),
|
|
10437
10437
|
ys(1, zs),
|
|
10438
10438
|
ys(2, ye(_r))
|
|
10439
10439
|
], Pn);
|
|
@@ -10501,7 +10501,7 @@ function zr(i, a = we.ALL, e) {
|
|
|
10501
10501
|
return `[${i}]`;
|
|
10502
10502
|
}
|
|
10503
10503
|
}
|
|
10504
|
-
function
|
|
10504
|
+
function zt(i) {
|
|
10505
10505
|
let a = i;
|
|
10506
10506
|
if (i.isArray()) {
|
|
10507
10507
|
const e = i.getRowCount(), t = i.getColumnCount();
|
|
@@ -10513,7 +10513,7 @@ function Zt(i) {
|
|
|
10513
10513
|
}
|
|
10514
10514
|
function Yr(...i) {
|
|
10515
10515
|
for (let a = 0; a < i.length; a++) {
|
|
10516
|
-
const e =
|
|
10516
|
+
const e = zt(i[a]);
|
|
10517
10517
|
if (e.isError())
|
|
10518
10518
|
return {
|
|
10519
10519
|
isError: !0,
|
|
@@ -10528,7 +10528,7 @@ function Yr(...i) {
|
|
|
10528
10528
|
}
|
|
10529
10529
|
function H(...i) {
|
|
10530
10530
|
for (let a = 0; a < i.length; a++) {
|
|
10531
|
-
const e =
|
|
10531
|
+
const e = zt(i[a]);
|
|
10532
10532
|
if (e.isError())
|
|
10533
10533
|
return {
|
|
10534
10534
|
isError: !0,
|
|
@@ -10546,7 +10546,7 @@ function H(...i) {
|
|
|
10546
10546
|
variants: i
|
|
10547
10547
|
};
|
|
10548
10548
|
}
|
|
10549
|
-
function
|
|
10549
|
+
function ke(...i) {
|
|
10550
10550
|
for (let a = 0; a < i.length; a++) {
|
|
10551
10551
|
let e = i[a];
|
|
10552
10552
|
if (e.isError())
|
|
@@ -10559,7 +10559,7 @@ function Fe(...i) {
|
|
|
10559
10559
|
isError: !0,
|
|
10560
10560
|
errorObject: g.create(m.NA)
|
|
10561
10561
|
};
|
|
10562
|
-
if (e =
|
|
10562
|
+
if (e = zt(i[a]), e.isError())
|
|
10563
10563
|
return {
|
|
10564
10564
|
isError: !0,
|
|
10565
10565
|
errorObject: e
|
|
@@ -11080,7 +11080,7 @@ function Sa(i) {
|
|
|
11080
11080
|
function Da(i) {
|
|
11081
11081
|
return /^[0-9A-Fa-f]{1,10}$/.test(i);
|
|
11082
11082
|
}
|
|
11083
|
-
function
|
|
11083
|
+
function Jt(i) {
|
|
11084
11084
|
if (i === 0)
|
|
11085
11085
|
return 0;
|
|
11086
11086
|
const a = [
|
|
@@ -11124,7 +11124,7 @@ function zt(i) {
|
|
|
11124
11124
|
return t ? c - 1 : 1 - c;
|
|
11125
11125
|
}
|
|
11126
11126
|
function La(i) {
|
|
11127
|
-
return 1 -
|
|
11127
|
+
return 1 - Jt(i);
|
|
11128
11128
|
}
|
|
11129
11129
|
function zh(i) {
|
|
11130
11130
|
if (i >= 2)
|
|
@@ -11148,7 +11148,7 @@ function mr(i, a = 1) {
|
|
|
11148
11148
|
t *= e, e -= a;
|
|
11149
11149
|
return t;
|
|
11150
11150
|
}
|
|
11151
|
-
function
|
|
11151
|
+
function er(i, a) {
|
|
11152
11152
|
const e = Math.min(i - a, a);
|
|
11153
11153
|
let t = 1;
|
|
11154
11154
|
for (let r = 1; r <= e && Number.isFinite(t); r++)
|
|
@@ -11202,7 +11202,7 @@ function gr(i, a) {
|
|
|
11202
11202
|
(t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
|
|
11203
11203
|
));
|
|
11204
11204
|
}
|
|
11205
|
-
function
|
|
11205
|
+
function Ct(i) {
|
|
11206
11206
|
return i[0].map((a, e) => i.map((t) => t[e]));
|
|
11207
11207
|
}
|
|
11208
11208
|
function rm(i) {
|
|
@@ -11210,7 +11210,7 @@ function rm(i) {
|
|
|
11210
11210
|
return a ? null : nm(e, t);
|
|
11211
11211
|
}
|
|
11212
11212
|
function ko(i) {
|
|
11213
|
-
const a =
|
|
11213
|
+
const a = Ct(i), e = a.length, t = a[0].length;
|
|
11214
11214
|
let r = !0, n = !1;
|
|
11215
11215
|
const s = ra(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
|
|
11216
11216
|
for (let u = 0; u < t; u++) {
|
|
@@ -11288,13 +11288,13 @@ function sm(i) {
|
|
|
11288
11288
|
const a = am(i);
|
|
11289
11289
|
if (!a)
|
|
11290
11290
|
return null;
|
|
11291
|
-
const { matrixU: e, matrixS: t, matrixV: r } = a, n =
|
|
11291
|
+
const { matrixU: e, matrixS: t, matrixV: r } = a, n = Ct(e), s = Array.from({ length: t.length }, () => new Array(i[0].length).fill(0)), o = Math.max(i.length, i[0].length) * Number.EPSILON * t[0];
|
|
11292
11292
|
for (let u = 0; u < t.length; u++)
|
|
11293
11293
|
Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
|
|
11294
11294
|
return gr(r, gr(s, n));
|
|
11295
11295
|
}
|
|
11296
11296
|
function am(i) {
|
|
11297
|
-
const a =
|
|
11297
|
+
const a = Ct(i), e = a.length, t = a[0].length;
|
|
11298
11298
|
if (e < t)
|
|
11299
11299
|
return null;
|
|
11300
11300
|
const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
|
|
@@ -11560,7 +11560,7 @@ function Yo(i, a, e) {
|
|
|
11560
11560
|
return t;
|
|
11561
11561
|
}
|
|
11562
11562
|
function va(i, a, e) {
|
|
11563
|
-
return e === 0 || e === 1 ? a * e === i ? 1 : 0 :
|
|
11563
|
+
return e === 0 || e === 1 ? a * e === i ? 1 : 0 : er(a, i) * e ** i * (1 - e) ** (a - i);
|
|
11564
11564
|
}
|
|
11565
11565
|
function Ta(i, a) {
|
|
11566
11566
|
return i <= 0 ? 0 : Ia(a / 2, i / 2);
|
|
@@ -11731,10 +11731,10 @@ function Cm(i, a, e, t) {
|
|
|
11731
11731
|
return r;
|
|
11732
11732
|
}
|
|
11733
11733
|
function Fa(i, a, e, t) {
|
|
11734
|
-
return a - i > t - e ? 0 :
|
|
11734
|
+
return a - i > t - e ? 0 : er(e, i) * er(t - e, a - i) / er(t, a);
|
|
11735
11735
|
}
|
|
11736
11736
|
function qo(i, a, e) {
|
|
11737
|
-
return i < 0 ? 0 : 0.5 + 0.5 *
|
|
11737
|
+
return i < 0 ? 0 : 0.5 + 0.5 * Jt((Math.log(i) - a) / Math.sqrt(2 * e * e));
|
|
11738
11738
|
}
|
|
11739
11739
|
function _m(i, a, e) {
|
|
11740
11740
|
return i <= 0 ? 0 : Math.exp(-Math.log(i) - 0.5 * Math.log(2 * Math.PI) - Math.log(e) - (Math.log(i) - a) ** 2 / (2 * e * e));
|
|
@@ -11751,10 +11751,10 @@ function Em(i, a, e) {
|
|
|
11751
11751
|
return t;
|
|
11752
11752
|
}
|
|
11753
11753
|
function ka(i, a, e) {
|
|
11754
|
-
return i < 0 ? 0 :
|
|
11754
|
+
return i < 0 ? 0 : er(i + a - 1, a - 1) * e ** a * (1 - e) ** i;
|
|
11755
11755
|
}
|
|
11756
11756
|
function Hr(i, a, e) {
|
|
11757
|
-
return 0.5 * (1 +
|
|
11757
|
+
return 0.5 * (1 + Jt((i - a) / Math.sqrt(2 * e * e)));
|
|
11758
11758
|
}
|
|
11759
11759
|
function Ko(i, a, e) {
|
|
11760
11760
|
return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(e) - (i - a) ** 2 / (2 * e * e));
|
|
@@ -11838,7 +11838,7 @@ function ns(i, a, e) {
|
|
|
11838
11838
|
errorObject: null
|
|
11839
11839
|
};
|
|
11840
11840
|
}
|
|
11841
|
-
function
|
|
11841
|
+
function Et(i) {
|
|
11842
11842
|
const a = i.isArray() ? i.getRowCount() : 1, e = i.isArray() ? i.getColumnCount() : 1, t = [];
|
|
11843
11843
|
for (let r = 0; r < a; r++) {
|
|
11844
11844
|
t[r] = [];
|
|
@@ -11928,13 +11928,13 @@ function is(i, a, e, t, r) {
|
|
|
11928
11928
|
let s = i;
|
|
11929
11929
|
r && (s = i.map((C) => C.map((E) => Math.log(E))));
|
|
11930
11930
|
let o = a, u = e;
|
|
11931
|
-
n && (s =
|
|
11932
|
-
const c =
|
|
11931
|
+
n && (s = Ct(s), o = Ct(o), u = Ct(u)), t && (o = o.map((C) => [...C, 1]));
|
|
11932
|
+
const c = Ct(o), l = gr(c, o), f = gr(c, s);
|
|
11933
11933
|
let h = rm(l);
|
|
11934
11934
|
if (!h && (h = sm(l), !h))
|
|
11935
11935
|
return g.create(m.NA);
|
|
11936
11936
|
let d = gr(h, f);
|
|
11937
|
-
t || d.push([0]), d =
|
|
11937
|
+
t || d.push([0]), d = Ct(d);
|
|
11938
11938
|
const _ = d[0].pop();
|
|
11939
11939
|
if (d[0].reverse(), d[0].push(_), r)
|
|
11940
11940
|
for (let C = 0; C < d[0].length; C++)
|
|
@@ -13654,7 +13654,7 @@ function it(i, a, e) {
|
|
|
13654
13654
|
break;
|
|
13655
13655
|
}
|
|
13656
13656
|
const [d, _] = Va(`${l}`);
|
|
13657
|
-
if (!
|
|
13657
|
+
if (!Mt.create(`${h}`).compare(_, d).getValue()) {
|
|
13658
13658
|
u = !1;
|
|
13659
13659
|
break;
|
|
13660
13660
|
}
|
|
@@ -14030,16 +14030,16 @@ function Ha(i) {
|
|
|
14030
14030
|
return i.replace(/\//g, "-").split("-").map((c) => c.padStart(2, "0")).join("-") === o;
|
|
14031
14031
|
}
|
|
14032
14032
|
function xn(i) {
|
|
14033
|
-
return
|
|
14033
|
+
return At.parseDate(i);
|
|
14034
14034
|
}
|
|
14035
14035
|
function Xm(i) {
|
|
14036
|
-
return
|
|
14036
|
+
return At.parseValue(i);
|
|
14037
14037
|
}
|
|
14038
14038
|
function jn(i) {
|
|
14039
|
-
return
|
|
14039
|
+
return At.parseTime(i);
|
|
14040
14040
|
}
|
|
14041
14041
|
function Ga(i) {
|
|
14042
|
-
return
|
|
14042
|
+
return At.getFormatInfo(i).isDate;
|
|
14043
14043
|
}
|
|
14044
14044
|
const wu = {
|
|
14045
14045
|
1: [6, 0],
|
|
@@ -14093,7 +14093,7 @@ function Un(i, a, e = 1, t) {
|
|
|
14093
14093
|
const f = o + l;
|
|
14094
14094
|
if (t && t.length > 0 && t.some((d) => Math.floor(d) === f))
|
|
14095
14095
|
continue;
|
|
14096
|
-
const h =
|
|
14096
|
+
const h = nr(f);
|
|
14097
14097
|
r.includes(h) || u++;
|
|
14098
14098
|
}
|
|
14099
14099
|
return s >= n ? u : -u;
|
|
@@ -14109,7 +14109,7 @@ function vn(i, a, e = 1, t) {
|
|
|
14109
14109
|
o++;
|
|
14110
14110
|
continue;
|
|
14111
14111
|
}
|
|
14112
|
-
const l =
|
|
14112
|
+
const l = nr(c);
|
|
14113
14113
|
if (r.includes(l)) {
|
|
14114
14114
|
o++;
|
|
14115
14115
|
continue;
|
|
@@ -14138,7 +14138,7 @@ function $(i) {
|
|
|
14138
14138
|
return e < 0 || e > 2958465 ? g.create(m.NUM) : e;
|
|
14139
14139
|
}
|
|
14140
14140
|
}
|
|
14141
|
-
function
|
|
14141
|
+
function nr(i) {
|
|
14142
14142
|
const a = Math.floor(i) === 60;
|
|
14143
14143
|
let e = re(i);
|
|
14144
14144
|
const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())).getTime(), r = new Date(Date.UTC(1900, 1, 28)).getTime();
|
|
@@ -14638,8 +14638,8 @@ class gg extends V {
|
|
|
14638
14638
|
if (typeof t != "number")
|
|
14639
14639
|
return t;
|
|
14640
14640
|
const r = re(t), n = t > 0 ? r.getUTCFullYear() : 1900;
|
|
14641
|
-
let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u =
|
|
14642
|
-
u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), t < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u =
|
|
14641
|
+
let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u = nr(o), c;
|
|
14642
|
+
u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), t < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u = nr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
|
|
14643
14643
|
const l = Math.ceil((t - c + 1) / 7);
|
|
14644
14644
|
return y.create(l);
|
|
14645
14645
|
}
|
|
@@ -15020,7 +15020,7 @@ class Ng extends V {
|
|
|
15020
15020
|
const s = Math.floor(+r.getValue());
|
|
15021
15021
|
if (!this._returnTypeMap[s])
|
|
15022
15022
|
return g.create(m.NUM);
|
|
15023
|
-
const o =
|
|
15023
|
+
const o = nr(n), u = this._returnTypeMap[s][o];
|
|
15024
15024
|
return y.create(u);
|
|
15025
15025
|
}
|
|
15026
15026
|
}
|
|
@@ -15072,9 +15072,9 @@ class Og extends V {
|
|
|
15072
15072
|
}
|
|
15073
15073
|
_getResult(e, t) {
|
|
15074
15074
|
const r = re(e), n = e > 0 ? r.getUTCFullYear() : 1900;
|
|
15075
|
-
let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u =
|
|
15075
|
+
let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u = nr(o), c;
|
|
15076
15076
|
if (t === 21)
|
|
15077
|
-
u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), e < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u =
|
|
15077
|
+
u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), e < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u = nr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
|
|
15078
15078
|
else {
|
|
15079
15079
|
const f = this._returnTypeMap[t];
|
|
15080
15080
|
u < f ? c = o - (u + 7 - f) : c = o - (u - f);
|
|
@@ -15256,13 +15256,13 @@ class Dg extends V {
|
|
|
15256
15256
|
}
|
|
15257
15257
|
calculate(e, t, r) {
|
|
15258
15258
|
let n = r != null ? r : y.create(0);
|
|
15259
|
-
const s =
|
|
15259
|
+
const s = zt(e);
|
|
15260
15260
|
if (s.isError())
|
|
15261
15261
|
return s;
|
|
15262
|
-
const o =
|
|
15262
|
+
const o = zt(t);
|
|
15263
15263
|
if (o.isError())
|
|
15264
15264
|
return o;
|
|
15265
|
-
if (n =
|
|
15265
|
+
if (n = zt(n), n.isError())
|
|
15266
15266
|
return n;
|
|
15267
15267
|
if (s.isBoolean() || o.isBoolean() || n.isBoolean())
|
|
15268
15268
|
return g.create(m.VALUE);
|
|
@@ -16445,7 +16445,7 @@ class Xg extends V {
|
|
|
16445
16445
|
const [u, c] = o, l = +u.getValue(), f = +c.getValue();
|
|
16446
16446
|
if (Number.isNaN(l) || Number.isNaN(f))
|
|
16447
16447
|
return g.create(m.VALUE);
|
|
16448
|
-
r =
|
|
16448
|
+
r = Jt(f) - Jt(l);
|
|
16449
16449
|
} else {
|
|
16450
16450
|
const { isError: n, errorObject: s, variants: o } = H(e);
|
|
16451
16451
|
if (n)
|
|
@@ -16453,7 +16453,7 @@ class Xg extends V {
|
|
|
16453
16453
|
const [u] = o, c = +u.getValue();
|
|
16454
16454
|
if (Number.isNaN(c))
|
|
16455
16455
|
return g.create(m.VALUE);
|
|
16456
|
-
r =
|
|
16456
|
+
r = Jt(c);
|
|
16457
16457
|
}
|
|
16458
16458
|
return y.create(r);
|
|
16459
16459
|
}
|
|
@@ -16471,7 +16471,7 @@ class Zg extends V {
|
|
|
16471
16471
|
const [s] = n, o = +s.getValue();
|
|
16472
16472
|
if (Number.isNaN(o))
|
|
16473
16473
|
return g.create(m.VALUE);
|
|
16474
|
-
const u =
|
|
16474
|
+
const u = Jt(o);
|
|
16475
16475
|
return y.create(u);
|
|
16476
16476
|
}
|
|
16477
16477
|
}
|
|
@@ -17344,13 +17344,13 @@ const U1 = [
|
|
|
17344
17344
|
];
|
|
17345
17345
|
var ee = /* @__PURE__ */ ((i) => (i.ACCRINT = "ACCRINT", i.ACCRINTM = "ACCRINTM", i.AMORDEGRC = "AMORDEGRC", i.AMORLINC = "AMORLINC", i.COUPDAYBS = "COUPDAYBS", i.COUPDAYS = "COUPDAYS", i.COUPDAYSNC = "COUPDAYSNC", i.COUPNCD = "COUPNCD", i.COUPNUM = "COUPNUM", i.COUPPCD = "COUPPCD", i.CUMIPMT = "CUMIPMT", i.CUMPRINC = "CUMPRINC", i.DB = "DB", i.DDB = "DDB", i.DISC = "DISC", i.DOLLARDE = "DOLLARDE", i.DOLLARFR = "DOLLARFR", i.DURATION = "DURATION", i.EFFECT = "EFFECT", i.FV = "FV", i.FVSCHEDULE = "FVSCHEDULE", i.INTRATE = "INTRATE", i.IPMT = "IPMT", i.IRR = "IRR", i.ISPMT = "ISPMT", i.MDURATION = "MDURATION", i.MIRR = "MIRR", i.NOMINAL = "NOMINAL", i.NPER = "NPER", i.NPV = "NPV", i.ODDFPRICE = "ODDFPRICE", i.ODDFYIELD = "ODDFYIELD", i.ODDLPRICE = "ODDLPRICE", i.ODDLYIELD = "ODDLYIELD", i.PDURATION = "PDURATION", i.PMT = "PMT", i.PPMT = "PPMT", i.PRICE = "PRICE", i.PRICEDISC = "PRICEDISC", i.PRICEMAT = "PRICEMAT", i.PV = "PV", i.RATE = "RATE", i.RECEIVED = "RECEIVED", i.RRI = "RRI", i.SLN = "SLN", i.SYD = "SYD", i.TBILLEQ = "TBILLEQ", i.TBILLPRICE = "TBILLPRICE", i.TBILLYIELD = "TBILLYIELD", i.VDB = "VDB", i.XIRR = "XIRR", i.XNPV = "XNPV", i.YIELD = "YIELD", i.YIELDDISC = "YIELDDISC", i.YIELDMAT = "YIELDMAT", i))(ee || {});
|
|
17346
17346
|
function us(i, a, e, t) {
|
|
17347
|
-
const r =
|
|
17347
|
+
const r = $t(i, a, e), { days: n } = _e(r, i, t);
|
|
17348
17348
|
return n;
|
|
17349
17349
|
}
|
|
17350
17350
|
function Xe(i, a, e, t) {
|
|
17351
17351
|
let r;
|
|
17352
17352
|
if (t === 1) {
|
|
17353
|
-
const n =
|
|
17353
|
+
const n = $t(i, a, e);
|
|
17354
17354
|
let s = re(n);
|
|
17355
17355
|
s = pr(s, 12 / e);
|
|
17356
17356
|
const o = Re(s);
|
|
@@ -17365,7 +17365,7 @@ function Lu(i, a, e) {
|
|
|
17365
17365
|
r = pr(r, -12 / e);
|
|
17366
17366
|
return r = pr(r, 12 / e), Re(r);
|
|
17367
17367
|
}
|
|
17368
|
-
function
|
|
17368
|
+
function sr(i, a, e) {
|
|
17369
17369
|
let t = 0;
|
|
17370
17370
|
const r = re(i);
|
|
17371
17371
|
let n = re(a);
|
|
@@ -17373,7 +17373,7 @@ function nr(i, a, e) {
|
|
|
17373
17373
|
n = pr(n, -12 / e), t++;
|
|
17374
17374
|
return t;
|
|
17375
17375
|
}
|
|
17376
|
-
function
|
|
17376
|
+
function $t(i, a, e) {
|
|
17377
17377
|
const t = re(i);
|
|
17378
17378
|
let r = re(a);
|
|
17379
17379
|
for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
|
|
@@ -17381,7 +17381,7 @@ function kt(i, a, e) {
|
|
|
17381
17381
|
return Re(r);
|
|
17382
17382
|
}
|
|
17383
17383
|
function Pu(i, a, e, t, r, n) {
|
|
17384
|
-
const s = us(i, a, r, n), o = Xe(i, a, r, n), u =
|
|
17384
|
+
const s = us(i, a, r, n), o = Xe(i, a, r, n), u = sr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
|
|
17385
17385
|
let h = 0, d = 0;
|
|
17386
17386
|
for (let E = 1; E <= u; E++) {
|
|
17387
17387
|
const b = E + c, R = f / l ** b;
|
|
@@ -17400,7 +17400,7 @@ function qr(i, a, e, t, r) {
|
|
|
17400
17400
|
}
|
|
17401
17401
|
return -n;
|
|
17402
17402
|
}
|
|
17403
|
-
function
|
|
17403
|
+
function ar(i, a, e, t, r) {
|
|
17404
17404
|
let n;
|
|
17405
17405
|
if (i === 0)
|
|
17406
17406
|
n = t + e * a;
|
|
@@ -17414,7 +17414,7 @@ function sr(i, a, e, t, r) {
|
|
|
17414
17414
|
}
|
|
17415
17415
|
function xu(i, a, e, t, r, n) {
|
|
17416
17416
|
const s = qr(i, e, t, r, n);
|
|
17417
|
-
return (a === 1 ? n === 1 ? 0 : -t : n === 1 ?
|
|
17417
|
+
return (a === 1 ? n === 1 ? 0 : -t : n === 1 ? ar(i, a - 2, s, t, 1) - s : ar(i, a - 1, s, t, 0)) * i;
|
|
17418
17418
|
}
|
|
17419
17419
|
function ju(i, a) {
|
|
17420
17420
|
let e = 0;
|
|
@@ -17423,7 +17423,7 @@ function ju(i, a) {
|
|
|
17423
17423
|
return e;
|
|
17424
17424
|
}
|
|
17425
17425
|
function Uu(i, a, e, t, r, n, s, o, u) {
|
|
17426
|
-
const c =
|
|
17426
|
+
const c = Zt(e, t, u), l = Xe(i, t, o, u);
|
|
17427
17427
|
return c < l ? v1(
|
|
17428
17428
|
i,
|
|
17429
17429
|
a,
|
|
@@ -17451,31 +17451,31 @@ function Uu(i, a, e, t, r, n, s, o, u) {
|
|
|
17451
17451
|
}
|
|
17452
17452
|
function v1(i, a, e, t, r, n, s, o, u, c, l) {
|
|
17453
17453
|
let f = 0;
|
|
17454
|
-
const h =
|
|
17454
|
+
const h = sr(i, a, o), d = Zt(i, t, u);
|
|
17455
17455
|
f += s / (1 + n / o) ** (h - 1 + d / l), f += 100 * r / o * c / l / (1 + n / o) ** (d / l);
|
|
17456
17456
|
for (let C = 2; C <= h; C++)
|
|
17457
17457
|
f += 100 * r / o / (1 + n / o) ** (C - 1 + d / l);
|
|
17458
|
-
const _ =
|
|
17458
|
+
const _ = Zt(e, i, u);
|
|
17459
17459
|
return f -= 100 * r / o * _ / l, f;
|
|
17460
17460
|
}
|
|
17461
17461
|
function T1(i, a, e, t, r, n, s, o, u, c) {
|
|
17462
17462
|
let l = 0;
|
|
17463
|
-
const f =
|
|
17463
|
+
const f = sr(t, a, o), h = B1(t, i, 12 / o);
|
|
17464
17464
|
let d;
|
|
17465
17465
|
if (u === 2 || u === 3) {
|
|
17466
17466
|
const R = Lu(i, t, o);
|
|
17467
|
-
d =
|
|
17467
|
+
d = Zt(i, R, u);
|
|
17468
17468
|
} else {
|
|
17469
|
-
const R =
|
|
17469
|
+
const R = $t(i, t, o), { days: p } = _e(R, i, u);
|
|
17470
17470
|
d = c - p;
|
|
17471
17471
|
}
|
|
17472
17472
|
l += s / (1 + n / o) ** (f + h + d / c);
|
|
17473
|
-
const _ =
|
|
17473
|
+
const _ = sr(e, t, o);
|
|
17474
17474
|
let C = t, E = 0, b = 0;
|
|
17475
17475
|
for (let R = _; R >= 1; R--) {
|
|
17476
|
-
const p =
|
|
17476
|
+
const p = tr(C, -12 / o, !1), N = u === 1 ? Zt(p, C, u) : c, M = R > 1 ? N : Zt(e, C, u);
|
|
17477
17477
|
E += M / N;
|
|
17478
|
-
const w = e > p ? e : p, S = i < C ? i : C, D =
|
|
17478
|
+
const w = e > p ? e : p, S = i < C ? i : C, D = Zt(w, S, u);
|
|
17479
17479
|
b += D / N, C = p;
|
|
17480
17480
|
}
|
|
17481
17481
|
l += 100 * r / o * E / (1 + n / o) ** (h + d / c);
|
|
@@ -17483,7 +17483,7 @@ function T1(i, a, e, t, r, n, s, o, u, c) {
|
|
|
17483
17483
|
l += 100 * r / o / (1 + n / o) ** (R + h + d / c);
|
|
17484
17484
|
return l -= 100 * r / o * b, l;
|
|
17485
17485
|
}
|
|
17486
|
-
function
|
|
17486
|
+
function Zt(i, a, e) {
|
|
17487
17487
|
const { days: t } = _e(i, a, e);
|
|
17488
17488
|
return i < a ? t : 0;
|
|
17489
17489
|
}
|
|
@@ -17492,9 +17492,9 @@ function vu(i, a, e) {
|
|
|
17492
17492
|
return !(s !== f && !(o && h) || Math.abs((c - r) * 12 + (l - n)) % (12 / e) !== 0);
|
|
17493
17493
|
}
|
|
17494
17494
|
function Mr(i, a, e) {
|
|
17495
|
-
return
|
|
17495
|
+
return $t(i, a, e) >= 0;
|
|
17496
17496
|
}
|
|
17497
|
-
function
|
|
17497
|
+
function tr(i, a, e) {
|
|
17498
17498
|
let t = re(i);
|
|
17499
17499
|
if (t = pr(t, a), e) {
|
|
17500
17500
|
const r = t.getUTCFullYear(), n = t.getUTCMonth(), s = Wr(r, n);
|
|
@@ -17503,10 +17503,10 @@ function er(i, a, e) {
|
|
|
17503
17503
|
return Re(t);
|
|
17504
17504
|
}
|
|
17505
17505
|
function B1(i, a, e, t) {
|
|
17506
|
-
const r = re(i), n = re(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), h = Rr(s, o, u), d = !h && o !== 1 && u > 28 && u < Wr(s, o) ? Rr(c, l, f) : h, _ =
|
|
17507
|
-
let C = 1 + +(a < _), E =
|
|
17506
|
+
const r = re(i), n = re(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), h = Rr(s, o, u), d = !h && o !== 1 && u > 28 && u < Wr(s, o) ? Rr(c, l, f) : h, _ = tr(a, 0, d);
|
|
17507
|
+
let C = 1 + +(a < _), E = tr(_, e, d);
|
|
17508
17508
|
for (; !(e > 0 ? E >= a : E <= a); )
|
|
17509
|
-
E =
|
|
17509
|
+
E = tr(E, e, d), C++;
|
|
17510
17510
|
return C;
|
|
17511
17511
|
}
|
|
17512
17512
|
function Qa(i, a) {
|
|
@@ -17546,7 +17546,7 @@ function I1(i, a) {
|
|
|
17546
17546
|
return C;
|
|
17547
17547
|
}
|
|
17548
17548
|
function gn(i, a, e, t, r, n, s) {
|
|
17549
|
-
const o =
|
|
17549
|
+
const o = sr(i, a, n), u = Xe(i, a, n, s), c = us(i, a, n, s);
|
|
17550
17550
|
if (o === 1) {
|
|
17551
17551
|
const h = u - c, d = 100 * e / n + r, _ = t / n * h / u + 1, C = 100 * e / n * c / u;
|
|
17552
17552
|
return d / _ - C;
|
|
@@ -17587,15 +17587,15 @@ class F1 extends V {
|
|
|
17587
17587
|
return Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(Q) ? g.create(m.VALUE) : L <= 0 || U <= 0 || ![1, 2, 4].includes(x) || F < 0 || F > 4 || Math.floor(w) >= Math.floor(D) ? g.create(m.NUM) : this._getResult(w, S, D, L, U, x, F, Q);
|
|
17588
17588
|
}
|
|
17589
17589
|
_getResult(e, t, r, n, s, o, u, c) {
|
|
17590
|
-
let l =
|
|
17590
|
+
let l = $t(e, t, o);
|
|
17591
17591
|
if (l <= 0)
|
|
17592
17592
|
return y.create(0);
|
|
17593
|
-
l =
|
|
17593
|
+
l = $t(r, t, o);
|
|
17594
17594
|
const f = 12 / o, h = re(t), d = h.getUTCFullYear(), _ = h.getUTCMonth(), C = h.getUTCDate(), E = Rr(d, _, C);
|
|
17595
|
-
let b =
|
|
17595
|
+
let b = tr(t, -f, E);
|
|
17596
17596
|
if (r > t && c)
|
|
17597
17597
|
for (b = t; b < r; )
|
|
17598
|
-
b =
|
|
17598
|
+
b = tr(b, f, E);
|
|
17599
17599
|
let R = e > b ? e : b, { days: p } = _e(R, r, u);
|
|
17600
17600
|
if (l >= e) {
|
|
17601
17601
|
const { days: L } = _e(R, r, u ? 4 : 0);
|
|
@@ -17604,7 +17604,7 @@ class F1 extends V {
|
|
|
17604
17604
|
r < R && (p = -p);
|
|
17605
17605
|
let N = Xe(b, t, o, u), M = p / N, w = b, S = e;
|
|
17606
17606
|
for (; w > e; ) {
|
|
17607
|
-
S = w, w =
|
|
17607
|
+
S = w, w = tr(w, -f, E), R = e > w ? e : w;
|
|
17608
17608
|
const { days: L } = _e(R, S, u);
|
|
17609
17609
|
if (u === 0)
|
|
17610
17610
|
S >= R || e <= w ? p = L : p = -L, N = Xe(w, S, o, u);
|
|
@@ -17799,9 +17799,9 @@ class W1 extends V {
|
|
|
17799
17799
|
const E = Math.floor(+h.getValue()), b = Math.floor(+d.getValue());
|
|
17800
17800
|
if (Number.isNaN(E) || Number.isNaN(b))
|
|
17801
17801
|
return g.create(m.VALUE);
|
|
17802
|
-
if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C) ||
|
|
17802
|
+
if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C) || $t(_, C, E) < 0)
|
|
17803
17803
|
return g.create(m.NUM);
|
|
17804
|
-
const p =
|
|
17804
|
+
const p = sr(_, C, E);
|
|
17805
17805
|
return y.create(p);
|
|
17806
17806
|
}
|
|
17807
17807
|
}
|
|
@@ -17826,7 +17826,7 @@ class q1 extends V {
|
|
|
17826
17826
|
return g.create(m.VALUE);
|
|
17827
17827
|
if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C))
|
|
17828
17828
|
return g.create(m.NUM);
|
|
17829
|
-
let R =
|
|
17829
|
+
let R = $t(_, C, E);
|
|
17830
17830
|
return R < 0 && (R = 0), y.create(R);
|
|
17831
17831
|
}
|
|
17832
17832
|
}
|
|
@@ -17849,7 +17849,7 @@ class K1 extends V {
|
|
|
17849
17849
|
l === 1 && (o === 0 && (c = -r), l++);
|
|
17850
17850
|
let f = !1;
|
|
17851
17851
|
for (let h = l; h <= s; h++) {
|
|
17852
|
-
const d = o === 1 ?
|
|
17852
|
+
const d = o === 1 ? ar(e, h - 2, u, r, 1) : ar(e, h - 1, u, r, 0);
|
|
17853
17853
|
if (d === 0) {
|
|
17854
17854
|
f = !0;
|
|
17855
17855
|
break;
|
|
@@ -17877,7 +17877,7 @@ class X1 extends V {
|
|
|
17877
17877
|
let c = 0, l = Math.ceil(n);
|
|
17878
17878
|
l === 1 && (c = o === 0 ? u + r * e : u, l++);
|
|
17879
17879
|
for (let f = l; f <= s; f++)
|
|
17880
|
-
c += o === 1 ? u - (
|
|
17880
|
+
c += o === 1 ? u - (ar(e, f - 2, u, r, 1) - u) * e : u - ar(e, f - 1, u, r, 0) * e;
|
|
17881
17881
|
return y.create(c);
|
|
17882
17882
|
}
|
|
17883
17883
|
}
|
|
@@ -18041,7 +18041,7 @@ class r0 extends V {
|
|
|
18041
18041
|
calculate(e, t, r, n, s, o) {
|
|
18042
18042
|
let u = o != null ? o : y.create(0);
|
|
18043
18043
|
u.isNull() && (u = y.create(0));
|
|
18044
|
-
const { isError: c, errorObject: l, variants: f } =
|
|
18044
|
+
const { isError: c, errorObject: l, variants: f } = ke(e, t, r, n, s, u);
|
|
18045
18045
|
if (c)
|
|
18046
18046
|
return l;
|
|
18047
18047
|
const [h, d, _, C, E, b] = f, R = $(h);
|
|
@@ -18104,7 +18104,7 @@ class s0 extends V {
|
|
|
18104
18104
|
const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
|
|
18105
18105
|
if (D)
|
|
18106
18106
|
return L;
|
|
18107
|
-
const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue(), me =
|
|
18107
|
+
const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue(), me = ar(G, ge, de, Ee, pe ? 1 : 0);
|
|
18108
18108
|
return Number.isNaN(me) || !Number.isFinite(me) ? g.create(m.NUM) : R === 0 && p === 0 ? y.create(me, ze(this.getLocale())) : y.create(me);
|
|
18109
18109
|
});
|
|
18110
18110
|
return c === 1 && l === 1 ? E.get(0, 0) : E;
|
|
@@ -18197,10 +18197,10 @@ class o0 extends V {
|
|
|
18197
18197
|
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: F, variants: Q } = B(p, w, S, D, L, U);
|
|
18198
18198
|
if (x)
|
|
18199
18199
|
return F;
|
|
18200
|
-
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(),
|
|
18201
|
-
if (me < 1 || Math.floor(me) > Math.ceil(
|
|
18200
|
+
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue(), Lt = +Ee.getValue();
|
|
18201
|
+
if (me < 1 || Math.floor(me) > Math.ceil(ve))
|
|
18202
18202
|
return g.create(m.NUM);
|
|
18203
|
-
const ot = xu(pe, me,
|
|
18203
|
+
const ot = xu(pe, me, ve, ht, Dt, Lt ? 1 : 0);
|
|
18204
18204
|
return Number.isNaN(ot) || !Number.isFinite(ot) ? g.create(m.NUM) : N === 0 && M === 0 ? y.create(ot, ze(this.getLocale())) : y.create(ot);
|
|
18205
18205
|
});
|
|
18206
18206
|
return l === 1 && f === 1 ? R.get(0, 0) : R;
|
|
@@ -18304,7 +18304,7 @@ class l0 extends V {
|
|
|
18304
18304
|
calculate(e, t, r, n, s, o) {
|
|
18305
18305
|
let u = o != null ? o : y.create(0);
|
|
18306
18306
|
u.isNull() && (u = y.create(0));
|
|
18307
|
-
const { isError: c, errorObject: l, variants: f } =
|
|
18307
|
+
const { isError: c, errorObject: l, variants: f } = ke(e, t, r, n, s, u);
|
|
18308
18308
|
if (c)
|
|
18309
18309
|
return l;
|
|
18310
18310
|
const [h, d, _, C, E, b] = f, R = $(h);
|
|
@@ -18462,8 +18462,8 @@ class m0 extends V {
|
|
|
18462
18462
|
if (G === 0)
|
|
18463
18463
|
me = -(de + Ee) / ge;
|
|
18464
18464
|
else {
|
|
18465
|
-
const
|
|
18466
|
-
me = Math.log(
|
|
18465
|
+
const ve = ge * (1 + G * pe) - Ee * G, ht = de * G + ge * (1 + G * pe);
|
|
18466
|
+
me = Math.log(ve / ht) / Math.log(1 + G);
|
|
18467
18467
|
}
|
|
18468
18468
|
return Number.isNaN(me) || !Number.isFinite(me) ? g.create(m.NUM) : y.create(me);
|
|
18469
18469
|
});
|
|
@@ -18543,7 +18543,7 @@ class d0 extends V {
|
|
|
18543
18543
|
calculate(e, t, r, n, s, o, u, c, l) {
|
|
18544
18544
|
let f = l != null ? l : y.create(0);
|
|
18545
18545
|
f.isNull() && (f = y.create(0));
|
|
18546
|
-
const { isError: h, errorObject: d, variants: _ } =
|
|
18546
|
+
const { isError: h, errorObject: d, variants: _ } = ke(e, t, r, n, s, o, u, c, f);
|
|
18547
18547
|
if (h)
|
|
18548
18548
|
return d;
|
|
18549
18549
|
const [C, E, b, R, p, N, M, w, S] = _, D = $(C);
|
|
@@ -18582,7 +18582,7 @@ class C0 extends V {
|
|
|
18582
18582
|
calculate(e, t, r, n, s, o, u, c, l) {
|
|
18583
18583
|
let f = l != null ? l : y.create(0);
|
|
18584
18584
|
f.isNull() && (f = y.create(0));
|
|
18585
|
-
const { isError: h, errorObject: d, variants: _ } =
|
|
18585
|
+
const { isError: h, errorObject: d, variants: _ } = ke(e, t, r, n, s, o, u, c, f);
|
|
18586
18586
|
if (h)
|
|
18587
18587
|
return d;
|
|
18588
18588
|
const [C, E, b, R, p, N, M, w, S] = _, D = $(C);
|
|
@@ -18624,7 +18624,7 @@ class _0 extends V {
|
|
|
18624
18624
|
calculate(e, t, r, n, s, o, u, c) {
|
|
18625
18625
|
let l = c != null ? c : y.create(0);
|
|
18626
18626
|
l.isNull() && (l = y.create(0));
|
|
18627
|
-
const { isError: f, errorObject: h, variants: d } =
|
|
18627
|
+
const { isError: f, errorObject: h, variants: d } = ke(e, t, r, n, s, o, u, l);
|
|
18628
18628
|
if (f)
|
|
18629
18629
|
return h;
|
|
18630
18630
|
const [_, C, E, b, R, p, N, M] = d, w = $(_);
|
|
@@ -18687,7 +18687,7 @@ class A0 extends V {
|
|
|
18687
18687
|
calculate(e, t, r, n, s, o, u, c) {
|
|
18688
18688
|
let l = c != null ? c : y.create(0);
|
|
18689
18689
|
l.isNull() && (l = y.create(0));
|
|
18690
|
-
const { isError: f, errorObject: h, variants: d } =
|
|
18690
|
+
const { isError: f, errorObject: h, variants: d } = ke(e, t, r, n, s, o, u, l);
|
|
18691
18691
|
if (f)
|
|
18692
18692
|
return h;
|
|
18693
18693
|
const [_, C, E, b, R, p, N, M] = d, w = $(_);
|
|
@@ -18828,10 +18828,10 @@ class y0 extends V {
|
|
|
18828
18828
|
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: F, variants: Q } = B(p, w, S, D, L, U);
|
|
18829
18829
|
if (x)
|
|
18830
18830
|
return F;
|
|
18831
|
-
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(),
|
|
18832
|
-
if (me < 1 || Math.floor(me) > Math.ceil(
|
|
18831
|
+
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue(), Lt = +Ee.getValue();
|
|
18832
|
+
if (me < 1 || Math.floor(me) > Math.ceil(ve) || me - ve >= 1)
|
|
18833
18833
|
return g.create(m.NUM);
|
|
18834
|
-
const ot = qr(pe,
|
|
18834
|
+
const ot = qr(pe, ve, ht, Dt, Lt ? 1 : 0) - xu(pe, me, ve, ht, Dt, Lt ? 1 : 0);
|
|
18835
18835
|
return Number.isNaN(ot) || !Number.isFinite(ot) ? g.create(m.NUM) : N === 0 && M === 0 ? y.create(ot, ze(this.getLocale())) : y.create(ot);
|
|
18836
18836
|
});
|
|
18837
18837
|
return l === 1 && f === 1 ? R.get(0, 0) : R;
|
|
@@ -18846,7 +18846,7 @@ class R0 extends V {
|
|
|
18846
18846
|
calculate(e, t, r, n, s, o, u) {
|
|
18847
18847
|
let c = u != null ? u : y.create(0);
|
|
18848
18848
|
c.isNull() && (c = y.create(0));
|
|
18849
|
-
const { isError: l, errorObject: f, variants: h } =
|
|
18849
|
+
const { isError: l, errorObject: f, variants: h } = ke(e, t, r, n, s, o, c);
|
|
18850
18850
|
if (l)
|
|
18851
18851
|
return f;
|
|
18852
18852
|
const [d, _, C, E, b, R, p] = h, N = $(d);
|
|
@@ -18873,7 +18873,7 @@ class p0 extends V {
|
|
|
18873
18873
|
calculate(e, t, r, n, s) {
|
|
18874
18874
|
let o = s != null ? s : y.create(0);
|
|
18875
18875
|
o.isNull() && (o = y.create(0));
|
|
18876
|
-
const { isError: u, errorObject: c, variants: l } =
|
|
18876
|
+
const { isError: u, errorObject: c, variants: l } = ke(e, t, r, n, o);
|
|
18877
18877
|
if (u)
|
|
18878
18878
|
return c;
|
|
18879
18879
|
const [f, h, d, _, C] = l, E = $(f);
|
|
@@ -18900,7 +18900,7 @@ class V0 extends V {
|
|
|
18900
18900
|
calculate(e, t, r, n, s, o) {
|
|
18901
18901
|
let u = o != null ? o : y.create(0);
|
|
18902
18902
|
u.isNull() && (u = y.create(0));
|
|
18903
|
-
const { isError: c, errorObject: l, variants: f } =
|
|
18903
|
+
const { isError: c, errorObject: l, variants: f } = ke(e, t, r, n, s, u);
|
|
18904
18904
|
if (c)
|
|
18905
18905
|
return l;
|
|
18906
18906
|
const [h, d, _, C, E, b] = f, R = $(h);
|
|
@@ -18983,10 +18983,10 @@ class O0 extends V {
|
|
|
18983
18983
|
const S = _.get(M, w), D = C.get(M, w), L = E.get(M, w), U = b.get(M, w), x = R.get(M, w), { isError: F, errorObject: Q, variants: ne } = B(N, S, D, L, U, x);
|
|
18984
18984
|
if (F)
|
|
18985
18985
|
return Q;
|
|
18986
|
-
const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(),
|
|
18987
|
-
let
|
|
18986
|
+
const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue();
|
|
18987
|
+
let Lt = +Ee.getValue();
|
|
18988
18988
|
const ot = +pe.getValue();
|
|
18989
|
-
return
|
|
18989
|
+
return Lt = Lt ? 1 : 0, me <= 0 || ve >= 0 && ht >= 0 && Dt >= 0 || ve <= 0 && ht <= 0 && Dt <= 0 ? g.create(m.NUM) : this._getResult(me, ve, ht, Dt, Lt, ot, M, w);
|
|
18990
18990
|
});
|
|
18991
18991
|
return f === 1 && h === 1 ? p.get(0, 0) : p;
|
|
18992
18992
|
}
|
|
@@ -19020,7 +19020,7 @@ class M0 extends V {
|
|
|
19020
19020
|
calculate(e, t, r, n, s) {
|
|
19021
19021
|
let o = s != null ? s : y.create(0);
|
|
19022
19022
|
o.isNull() && (o = y.create(0));
|
|
19023
|
-
const { isError: u, errorObject: c, variants: l } =
|
|
19023
|
+
const { isError: u, errorObject: c, variants: l } = ke(e, t, r, n, o);
|
|
19024
19024
|
if (u)
|
|
19025
19025
|
return c;
|
|
19026
19026
|
const [f, h, d, _, C] = l, E = $(f);
|
|
@@ -19145,7 +19145,7 @@ class L0 extends V {
|
|
|
19145
19145
|
A(this, "maxParams", 3);
|
|
19146
19146
|
}
|
|
19147
19147
|
calculate(e, t, r) {
|
|
19148
|
-
const { isError: n, errorObject: s, variants: o } =
|
|
19148
|
+
const { isError: n, errorObject: s, variants: o } = ke(e, t, r);
|
|
19149
19149
|
if (n)
|
|
19150
19150
|
return s;
|
|
19151
19151
|
const [u, c, l] = o, f = $(u);
|
|
@@ -19179,7 +19179,7 @@ class P0 extends V {
|
|
|
19179
19179
|
A(this, "needsLocale", !0);
|
|
19180
19180
|
}
|
|
19181
19181
|
calculate(e, t, r) {
|
|
19182
|
-
const { isError: n, errorObject: s, variants: o } =
|
|
19182
|
+
const { isError: n, errorObject: s, variants: o } = ke(e, t, r);
|
|
19183
19183
|
if (n)
|
|
19184
19184
|
return s;
|
|
19185
19185
|
const [u, c, l] = o, f = $(u);
|
|
@@ -19207,7 +19207,7 @@ class x0 extends V {
|
|
|
19207
19207
|
A(this, "maxParams", 3);
|
|
19208
19208
|
}
|
|
19209
19209
|
calculate(e, t, r) {
|
|
19210
|
-
const { isError: n, errorObject: s, variants: o } =
|
|
19210
|
+
const { isError: n, errorObject: s, variants: o } = ke(e, t, r);
|
|
19211
19211
|
if (n)
|
|
19212
19212
|
return s;
|
|
19213
19213
|
const [u, c, l] = o, f = $(u);
|
|
@@ -19279,8 +19279,8 @@ class j0 extends V {
|
|
|
19279
19279
|
return g.create(m.NUM);
|
|
19280
19280
|
if (ge === 0 && de === 0 && Ee === 0)
|
|
19281
19281
|
return g.create(m.DIV_BY_ZERO);
|
|
19282
|
-
const
|
|
19283
|
-
return d === 0 && _ === 0 ? y.create(
|
|
19282
|
+
const ve = this._getResult(z, G, ge, de, Ee, pe, me);
|
|
19283
|
+
return d === 0 && _ === 0 ? y.create(ve, ze(this.getLocale())) : y.create(ve);
|
|
19284
19284
|
});
|
|
19285
19285
|
return c === 1 && l === 1 ? f.get(0, 0) : f;
|
|
19286
19286
|
}
|
|
@@ -19613,7 +19613,7 @@ class T0 extends V {
|
|
|
19613
19613
|
calculate(e, t, r, n, s, o, u) {
|
|
19614
19614
|
let c = u != null ? u : y.create(0);
|
|
19615
19615
|
c.isNull() && (c = y.create(0));
|
|
19616
|
-
const { isError: l, errorObject: f, variants: h } =
|
|
19616
|
+
const { isError: l, errorObject: f, variants: h } = ke(e, t, r, n, s, o, c);
|
|
19617
19617
|
if (l)
|
|
19618
19618
|
return f;
|
|
19619
19619
|
const [d, _, C, E, b, R, p] = h, N = $(d);
|
|
@@ -19631,7 +19631,7 @@ class T0 extends V {
|
|
|
19631
19631
|
return y.create(x);
|
|
19632
19632
|
}
|
|
19633
19633
|
_getResult(e, t, r, n, s, o, u) {
|
|
19634
|
-
if (
|
|
19634
|
+
if (sr(e, t, o) > 1) {
|
|
19635
19635
|
let E = r || 0.01, b = gn(e, t, r, E, s, o, u), R = b - n;
|
|
19636
19636
|
for (let p = 0; p < 100 && Math.abs(R) > 1e-7; p++)
|
|
19637
19637
|
b = gn(e, t, r, 1.01 * E, s, o, u), E += -R / (b - n - R) * E * 0.01, R = gn(e, t, r, E, s, o, u) - n;
|
|
@@ -19650,7 +19650,7 @@ class B0 extends V {
|
|
|
19650
19650
|
calculate(e, t, r, n, s) {
|
|
19651
19651
|
let o = s != null ? s : y.create(0);
|
|
19652
19652
|
o.isNull() && (o = y.create(0));
|
|
19653
|
-
const { isError: u, errorObject: c, variants: l } =
|
|
19653
|
+
const { isError: u, errorObject: c, variants: l } = ke(e, t, r, n, o);
|
|
19654
19654
|
if (u)
|
|
19655
19655
|
return c;
|
|
19656
19656
|
const [f, h, d, _, C] = l, E = $(f);
|
|
@@ -19677,7 +19677,7 @@ class I0 extends V {
|
|
|
19677
19677
|
calculate(e, t, r, n, s, o) {
|
|
19678
19678
|
let u = o != null ? o : y.create(0);
|
|
19679
19679
|
u.isNull() && (u = y.create(0));
|
|
19680
|
-
const { isError: c, errorObject: l, variants: f } =
|
|
19680
|
+
const { isError: c, errorObject: l, variants: f } = ke(e, t, r, n, s, u);
|
|
19681
19681
|
if (c)
|
|
19682
19682
|
return l;
|
|
19683
19683
|
const [h, d, _, C, E, b] = f, R = $(h);
|
|
@@ -20962,7 +20962,7 @@ class Ld extends V {
|
|
|
20962
20962
|
endColumn: u,
|
|
20963
20963
|
startAbsoluteRefType: l,
|
|
20964
20964
|
endAbsoluteRefType: l
|
|
20965
|
-
}, C = n && !f ? qh(_) :
|
|
20965
|
+
}, C = n && !f ? qh(_) : Ft(_);
|
|
20966
20966
|
return j.create(d !== "" ? `${d}!${C}` : C);
|
|
20967
20967
|
}
|
|
20968
20968
|
}
|
|
@@ -23239,7 +23239,7 @@ class wC extends V {
|
|
|
23239
23239
|
const _ = Math.floor(+h.getValue()), C = Math.floor(+d.getValue());
|
|
23240
23240
|
if (_ < 0 || C < 0 || _ < C)
|
|
23241
23241
|
return g.create(m.NUM);
|
|
23242
|
-
const E =
|
|
23242
|
+
const E = er(_, C);
|
|
23243
23243
|
return Number.isNaN(E) || !Number.isFinite(E) ? g.create(m.NUM) : y.create(E);
|
|
23244
23244
|
});
|
|
23245
23245
|
return r === 1 && n === 1 ? u.get(0, 0) : u;
|
|
@@ -23267,7 +23267,7 @@ class SC extends V {
|
|
|
23267
23267
|
const _ = Math.floor(+h.getValue()), C = Math.floor(+d.getValue());
|
|
23268
23268
|
if (_ < 0 || C < 0 || _ === 0 && _ < C)
|
|
23269
23269
|
return g.create(m.NUM);
|
|
23270
|
-
const E =
|
|
23270
|
+
const E = er(_ + C - 1, _ - 1);
|
|
23271
23271
|
return Number.isNaN(E) || !Number.isFinite(E) ? g.create(m.NUM) : y.create(E);
|
|
23272
23272
|
});
|
|
23273
23273
|
return r === 1 && n === 1 ? u.get(0, 0) : u;
|
|
@@ -23930,7 +23930,7 @@ class t_ extends V {
|
|
|
23930
23930
|
return y.create(0);
|
|
23931
23931
|
if (s > 0 && o < 0 || s < 0 && o > 0)
|
|
23932
23932
|
return g.create(m.NUM);
|
|
23933
|
-
const u =
|
|
23933
|
+
const u = Bt(s / o, 0) * o;
|
|
23934
23934
|
return y.create(u);
|
|
23935
23935
|
}
|
|
23936
23936
|
}
|
|
@@ -25363,7 +25363,7 @@ class F_ extends V {
|
|
|
25363
25363
|
return e.isError() ? e : t.isError() ? t : e.compare(t, this._compareType);
|
|
25364
25364
|
}
|
|
25365
25365
|
}
|
|
25366
|
-
class Wa extends
|
|
25366
|
+
class Wa extends Ht {
|
|
25367
25367
|
constructor(e) {
|
|
25368
25368
|
super("");
|
|
25369
25369
|
A(this, "_values", []);
|
|
@@ -25485,12 +25485,12 @@ class G_ extends V {
|
|
|
25485
25485
|
}
|
|
25486
25486
|
}
|
|
25487
25487
|
const Q_ = [
|
|
25488
|
-
[F_,
|
|
25489
|
-
[$_,
|
|
25490
|
-
[Y_,
|
|
25491
|
-
[H_,
|
|
25492
|
-
[G_,
|
|
25493
|
-
[k_,
|
|
25488
|
+
[F_, Be.COMPARE],
|
|
25489
|
+
[$_, Be.DIVIDED],
|
|
25490
|
+
[Y_, Be.MINUS],
|
|
25491
|
+
[H_, Be.MULTIPLY],
|
|
25492
|
+
[G_, Be.PLUS],
|
|
25493
|
+
[k_, Be.CUBE]
|
|
25494
25494
|
];
|
|
25495
25495
|
class W_ extends V {
|
|
25496
25496
|
constructor() {
|
|
@@ -26525,7 +26525,7 @@ class RA extends V {
|
|
|
26525
26525
|
const { isError: s, errorObject: o } = ns(e, t, r);
|
|
26526
26526
|
if (s)
|
|
26527
26527
|
return o;
|
|
26528
|
-
const u =
|
|
26528
|
+
const u = Et(e);
|
|
26529
26529
|
if (u instanceof g)
|
|
26530
26530
|
return u;
|
|
26531
26531
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -26556,17 +26556,17 @@ class RA extends V {
|
|
|
26556
26556
|
_ *= u[0][l - 2 - C] ** c[d][C];
|
|
26557
26557
|
h[d].push(_);
|
|
26558
26558
|
}
|
|
26559
|
-
return s && (h =
|
|
26559
|
+
return s && (h = Ct(h)), q.createByArray(h);
|
|
26560
26560
|
}
|
|
26561
26561
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
26562
26562
|
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = as(o, s, n, !0), l = r.map((f) => f.map((h) => c * u ** h));
|
|
26563
26563
|
return q.createByArray(l);
|
|
26564
26564
|
}
|
|
26565
26565
|
_getKnownXsValues(e, t) {
|
|
26566
|
-
return !t || t.isNull() ? ss(e.length, e[0].length) :
|
|
26566
|
+
return !t || t.isNull() ? ss(e.length, e[0].length) : Et(t);
|
|
26567
26567
|
}
|
|
26568
26568
|
_getNewXsValues(e, t) {
|
|
26569
|
-
return !t || t.isNull() ? e :
|
|
26569
|
+
return !t || t.isNull() ? e : Et(t);
|
|
26570
26570
|
}
|
|
26571
26571
|
}
|
|
26572
26572
|
class pA extends V {
|
|
@@ -26786,7 +26786,7 @@ class wA extends V {
|
|
|
26786
26786
|
const { isError: s, errorObject: o } = ns(e, t);
|
|
26787
26787
|
if (s)
|
|
26788
26788
|
return o;
|
|
26789
|
-
const u =
|
|
26789
|
+
const u = Et(e);
|
|
26790
26790
|
if (u instanceof g)
|
|
26791
26791
|
return u;
|
|
26792
26792
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -26893,7 +26893,7 @@ class wA extends V {
|
|
|
26893
26893
|
return q.createByArray(l);
|
|
26894
26894
|
}
|
|
26895
26895
|
_getKnownXsValues(e, t) {
|
|
26896
|
-
return !t || t.isNull() ? ss(e.length, e[0].length) :
|
|
26896
|
+
return !t || t.isNull() ? ss(e.length, e[0].length) : Et(t);
|
|
26897
26897
|
}
|
|
26898
26898
|
}
|
|
26899
26899
|
class SA extends V {
|
|
@@ -26906,7 +26906,7 @@ class SA extends V {
|
|
|
26906
26906
|
const { isError: s, errorObject: o } = ns(e, t);
|
|
26907
26907
|
if (s)
|
|
26908
26908
|
return o;
|
|
26909
|
-
const u =
|
|
26909
|
+
const u = Et(e);
|
|
26910
26910
|
if (u instanceof g)
|
|
26911
26911
|
return u;
|
|
26912
26912
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -27013,7 +27013,7 @@ class SA extends V {
|
|
|
27013
27013
|
return q.createByArray(f);
|
|
27014
27014
|
}
|
|
27015
27015
|
_getKnownXsValues(e, t) {
|
|
27016
|
-
return !t || t.isNull() ? ss(e.length, e[0].length) :
|
|
27016
|
+
return !t || t.isNull() ? ss(e.length, e[0].length) : Et(t);
|
|
27017
27017
|
}
|
|
27018
27018
|
}
|
|
27019
27019
|
class DA extends V {
|
|
@@ -27060,7 +27060,7 @@ class LA extends V {
|
|
|
27060
27060
|
const r = this._getRangeValues(e);
|
|
27061
27061
|
if (r instanceof g)
|
|
27062
27062
|
return r;
|
|
27063
|
-
const n =
|
|
27063
|
+
const n = zt(t);
|
|
27064
27064
|
if (n.isError())
|
|
27065
27065
|
return n;
|
|
27066
27066
|
const { isError: s, errorObject: o, variants: u } = B(n);
|
|
@@ -28402,7 +28402,7 @@ class fE extends V {
|
|
|
28402
28402
|
const { isError: s, errorObject: o } = ns(e, t, r);
|
|
28403
28403
|
if (s)
|
|
28404
28404
|
return o;
|
|
28405
|
-
const u =
|
|
28405
|
+
const u = Et(e);
|
|
28406
28406
|
if (u instanceof g)
|
|
28407
28407
|
return u;
|
|
28408
28408
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -28433,7 +28433,7 @@ class fE extends V {
|
|
|
28433
28433
|
_ += u[0][l - 2 - C] * c[d][C];
|
|
28434
28434
|
h[d].push(_);
|
|
28435
28435
|
}
|
|
28436
|
-
return s && (h =
|
|
28436
|
+
return s && (h = Ct(h)), q.createByArray(h);
|
|
28437
28437
|
}
|
|
28438
28438
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
28439
28439
|
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = as(o, s, n, !1);
|
|
@@ -28443,10 +28443,10 @@ class fE extends V {
|
|
|
28443
28443
|
return q.createByArray(l);
|
|
28444
28444
|
}
|
|
28445
28445
|
_getKnownXsValues(e, t) {
|
|
28446
|
-
return !t || t.isNull() ? ss(e.length, e[0].length) :
|
|
28446
|
+
return !t || t.isNull() ? ss(e.length, e[0].length) : Et(t);
|
|
28447
28447
|
}
|
|
28448
28448
|
_getNewXsValues(e, t) {
|
|
28449
|
-
return !t || t.isNull() ? e :
|
|
28449
|
+
return !t || t.isNull() ? e : Et(t);
|
|
28450
28450
|
}
|
|
28451
28451
|
}
|
|
28452
28452
|
class hE extends V {
|
|
@@ -28737,14 +28737,14 @@ class AE extends V {
|
|
|
28737
28737
|
return u;
|
|
28738
28738
|
}
|
|
28739
28739
|
}
|
|
28740
|
-
const EE = Object.values(
|
|
28741
|
-
|
|
28742
|
-
|
|
28743
|
-
|
|
28744
|
-
|
|
28745
|
-
|
|
28746
|
-
|
|
28747
|
-
|
|
28740
|
+
const EE = Object.values(Te).filter((i) => [
|
|
28741
|
+
Te.TABLE_START,
|
|
28742
|
+
Te.TABLE_ROW_START,
|
|
28743
|
+
Te.TABLE_CELL_START,
|
|
28744
|
+
Te.TABLE_CELL_END,
|
|
28745
|
+
Te.TABLE_ROW_END,
|
|
28746
|
+
Te.TABLE_END,
|
|
28747
|
+
Te.CUSTOM_BLOCK
|
|
28748
28748
|
].includes(i));
|
|
28749
28749
|
class bE extends V {
|
|
28750
28750
|
constructor() {
|
|
@@ -28928,7 +28928,7 @@ class OE extends V {
|
|
|
28928
28928
|
let c = +o.getValue(), l = Math.trunc(+u.getValue());
|
|
28929
28929
|
if (l > 127)
|
|
28930
28930
|
return g.create(m.VALUE);
|
|
28931
|
-
l < 0 && (`${c}`.length < Math.abs(l) ? c = 0 : c = c < 0 ? -
|
|
28931
|
+
l < 0 && (`${c}`.length < Math.abs(l) ? c = 0 : c = c < 0 ? -Bt(Math.abs(c), l) : Bt(c, l), l = 0);
|
|
28932
28932
|
const f = pl(this.getLocale(), c, l);
|
|
28933
28933
|
return j.create(f);
|
|
28934
28934
|
}
|
|
@@ -28965,7 +28965,7 @@ class ME extends V {
|
|
|
28965
28965
|
return T.create(s);
|
|
28966
28966
|
}
|
|
28967
28967
|
}
|
|
28968
|
-
const qa = (i, a) =>
|
|
28968
|
+
const qa = (i, a) => At.format(i, a, { throws: !1 }), Se = (i) => {
|
|
28969
28969
|
let a = `${i.getValue()}`;
|
|
28970
28970
|
return i.isNull() && (a = ""), i.isBoolean() && (a = a.toLocaleUpperCase()), i.isNumber() && (i.getPattern() !== "" ? a = qa(i.getPattern(), +i.getValue()) : a = `${ba(+i.getValue())}`), a;
|
|
28971
28971
|
};
|
|
@@ -29107,7 +29107,7 @@ class LE extends V {
|
|
|
29107
29107
|
const d = +l.getValue();
|
|
29108
29108
|
if (h > 127)
|
|
29109
29109
|
return g.create(m.VALUE);
|
|
29110
|
-
h < 0 && (`${f}`.length < Math.abs(h) ? f = 0 : f = f < 0 ? -
|
|
29110
|
+
h < 0 && (`${f}`.length < Math.abs(h) ? f = 0 : f = f < 0 ? -Bt(Math.abs(f), h) : Bt(f, h), h = 0);
|
|
29111
29111
|
let _ = d ? "###0" : "#,##0";
|
|
29112
29112
|
h > 0 && (_ += `.${"0".repeat(h)}`);
|
|
29113
29113
|
const C = qa(_, f);
|
|
@@ -30747,14 +30747,14 @@ class db extends V {
|
|
|
30747
30747
|
return e.isBoolean() && (t = t.toLocaleUpperCase()), t = t.trim().replace(/\s+/g, " "), j.create(t);
|
|
30748
30748
|
}
|
|
30749
30749
|
}
|
|
30750
|
-
const Cb = Object.values(
|
|
30751
|
-
|
|
30752
|
-
|
|
30753
|
-
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
|
|
30750
|
+
const Cb = Object.values(Te).filter((i) => [
|
|
30751
|
+
Te.TABLE_START,
|
|
30752
|
+
Te.TABLE_ROW_START,
|
|
30753
|
+
Te.TABLE_CELL_START,
|
|
30754
|
+
Te.TABLE_CELL_END,
|
|
30755
|
+
Te.TABLE_ROW_END,
|
|
30756
|
+
Te.TABLE_END,
|
|
30757
|
+
Te.CUSTOM_BLOCK
|
|
30758
30758
|
].includes(i));
|
|
30759
30759
|
class _b extends V {
|
|
30760
30760
|
constructor() {
|
|
@@ -31070,7 +31070,7 @@ let sa = class extends Ne {
|
|
|
31070
31070
|
}
|
|
31071
31071
|
};
|
|
31072
31072
|
sa = Sb([
|
|
31073
|
-
Yi(0,
|
|
31073
|
+
Yi(0, ir),
|
|
31074
31074
|
Yi(1, ye(qu))
|
|
31075
31075
|
], sa);
|
|
31076
31076
|
var Db = Object.getOwnPropertyDescriptor, Lb = (i, a, e, t) => {
|
|
@@ -31135,8 +31135,8 @@ let Tn = class extends Ne {
|
|
|
31135
31135
|
}
|
|
31136
31136
|
};
|
|
31137
31137
|
Tn = Lb([
|
|
31138
|
-
rn(0,
|
|
31139
|
-
rn(1,
|
|
31138
|
+
rn(0, ir),
|
|
31139
|
+
rn(1, Qt),
|
|
31140
31140
|
rn(2, ia),
|
|
31141
31141
|
rn(3, hc(Ec))
|
|
31142
31142
|
], Tn);
|
|
@@ -31222,7 +31222,7 @@ let Bn = class extends Ne {
|
|
|
31222
31222
|
}
|
|
31223
31223
|
};
|
|
31224
31224
|
Bn = xb([
|
|
31225
|
-
nn(0,
|
|
31225
|
+
nn(0, ir),
|
|
31226
31226
|
nn(1, vr),
|
|
31227
31227
|
nn(1, Jn),
|
|
31228
31228
|
nn(2, vr)
|
|
@@ -31260,7 +31260,7 @@ let In = class extends Ne {
|
|
|
31260
31260
|
}
|
|
31261
31261
|
};
|
|
31262
31262
|
In = Ub([
|
|
31263
|
-
Hi(0,
|
|
31263
|
+
Hi(0, ir),
|
|
31264
31264
|
Hi(1, vr)
|
|
31265
31265
|
], In);
|
|
31266
31266
|
var vb = Object.getOwnPropertyDescriptor, Tb = (i, a, e, t) => {
|
|
@@ -31298,7 +31298,7 @@ let Fn = class extends Ne {
|
|
|
31298
31298
|
}
|
|
31299
31299
|
};
|
|
31300
31300
|
Fn = Tb([
|
|
31301
|
-
Vs(0,
|
|
31301
|
+
Vs(0, ir),
|
|
31302
31302
|
Vs(1, Ma),
|
|
31303
31303
|
Vs(2, Jn)
|
|
31304
31304
|
], Fn);
|
|
@@ -31341,7 +31341,7 @@ let kn = class extends Ne {
|
|
|
31341
31341
|
}
|
|
31342
31342
|
};
|
|
31343
31343
|
kn = Ib([
|
|
31344
|
-
Gi(0,
|
|
31344
|
+
Gi(0, ir),
|
|
31345
31345
|
Gi(1, Qu)
|
|
31346
31346
|
], kn);
|
|
31347
31347
|
class Fb extends Ne {
|
|
@@ -31413,7 +31413,7 @@ let Wi = (Ns = class extends mc {
|
|
|
31413
31413
|
_initialize() {
|
|
31414
31414
|
const i = !this._config.notExecuteFormula, a = [
|
|
31415
31415
|
// Services
|
|
31416
|
-
[
|
|
31416
|
+
[Qt, { useClass: sh }],
|
|
31417
31417
|
[Nr, { useClass: Ps }],
|
|
31418
31418
|
[kb, { useClass: Fb }],
|
|
31419
31419
|
[Lo, { useClass: Qs }],
|
|
@@ -31432,8 +31432,8 @@ let Wi = (Ns = class extends mc {
|
|
|
31432
31432
|
i && a.push(
|
|
31433
31433
|
// Services
|
|
31434
31434
|
[Ma, { useClass: Ih }],
|
|
31435
|
-
[
|
|
31436
|
-
[
|
|
31435
|
+
[St, { useClass: Ws }],
|
|
31436
|
+
[Yt, { useClass: Us }],
|
|
31437
31437
|
[vr, { useClass: Bh }],
|
|
31438
31438
|
//Controller
|
|
31439
31439
|
[Pn],
|
|
@@ -31480,8 +31480,8 @@ export {
|
|
|
31480
31480
|
$f as AsyncObject,
|
|
31481
31481
|
V as BaseFunction,
|
|
31482
31482
|
Xn as BaseReferenceObject,
|
|
31483
|
-
|
|
31484
|
-
|
|
31483
|
+
Ht as BaseValueObject,
|
|
31484
|
+
rr as BooleanValue,
|
|
31485
31485
|
T as BooleanValueObject,
|
|
31486
31486
|
Pn as CalculateController,
|
|
31487
31487
|
Js as CalculateFormulaService,
|
|
@@ -31492,7 +31492,7 @@ export {
|
|
|
31492
31492
|
Th as DependencyManagerService,
|
|
31493
31493
|
ey as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
|
|
31494
31494
|
Ca as ENGINE_FORMULA_PLUGIN_CONFIG_KEY,
|
|
31495
|
-
|
|
31495
|
+
or as ERROR_TYPE_SET,
|
|
31496
31496
|
m as ErrorType,
|
|
31497
31497
|
g as ErrorValueObject,
|
|
31498
31498
|
ea as FUNCTION_NAMES_ARRAY,
|
|
@@ -31530,10 +31530,10 @@ export {
|
|
|
31530
31530
|
Nr as IDefinedNamesService,
|
|
31531
31531
|
Jn as IDependencyManagerService,
|
|
31532
31532
|
vr as IFeatureCalculationManagerService,
|
|
31533
|
-
|
|
31533
|
+
Yt as IFormulaCurrentConfigService,
|
|
31534
31534
|
Xs as IFormulaDependencyGenerator,
|
|
31535
|
-
|
|
31536
|
-
|
|
31535
|
+
St as IFormulaRuntimeService,
|
|
31536
|
+
Qt as IFunctionService,
|
|
31537
31537
|
Lo as IHyperlinkEngineFormulaService,
|
|
31538
31538
|
Ma as IOtherFormulaManagerService,
|
|
31539
31539
|
_o as ISheetRowFilteredService,
|
|
@@ -31576,7 +31576,7 @@ export {
|
|
|
31576
31576
|
Ln as UnionNodeFactory,
|
|
31577
31577
|
Wi as UniverFormulaEnginePlugin,
|
|
31578
31578
|
Io as ValueNodeFactory,
|
|
31579
|
-
|
|
31579
|
+
Mt as ValueObjectFactory,
|
|
31580
31580
|
k as compareToken,
|
|
31581
31581
|
Ic as convertUnitDataToRuntime,
|
|
31582
31582
|
Wh as deserializeRangeForR1C1,
|
|
@@ -31621,7 +31621,7 @@ export {
|
|
|
31621
31621
|
Kb as normalizeSheetName,
|
|
31622
31622
|
X as operatorToken,
|
|
31623
31623
|
$e as sequenceNodeType,
|
|
31624
|
-
|
|
31624
|
+
Ft as serializeRange,
|
|
31625
31625
|
Ss as serializeRangeToRefString,
|
|
31626
31626
|
Hc as serializeRangeWithSheet,
|
|
31627
31627
|
Gc as serializeRangeWithSpreadsheet,
|