@univerjs/engine-formula 0.13.0-insiders.20251215-64041bb → 0.13.0-insiders.20251216-1519cb7
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 +1 -1
- package/lib/es/index.js +699 -687
- package/lib/index.js +699 -687
- package/lib/types/engine/dependency/dependency-tree.d.ts +7 -1
- package/lib/umd/index.js +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var wc = Object.defineProperty;
|
|
2
2
|
var Lc = (i, a, e) => a in i ? wc(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
|
|
3
3
|
var A = (i, a, e) => Lc(i, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
-
import { ObjectMatrix as de, CommandType as Se, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, createIdentifier as Je, Disposable as De, IUniverInstanceService as
|
|
4
|
+
import { ObjectMatrix as de, CommandType as Se, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, createIdentifier as Je, Disposable as De, IUniverInstanceService as Jn, LRUMap as Pc, hashAlgorithm as xc, moveRangeByOffset as ga, isValidRange as jc, isFormulaString as At, isFormulaId as Lt, Rectangle as ai, cellToRange as Uc, Inject as ye, UniverInstanceType as Cr, BooleanNumber as co, LocaleService as Tc, BuildTextUtils as vc, LocaleType as Ct, numfmt as yt, isRealNum as q, getNumfmtParseValueFilter as da, CellValueType as wt, isTextFormat as Ic, RichTextBuilder as Fc, toDisposable as Bc, Injector as lo, generateRandomId as kc, sortRules as $c, RTree as js, IConfigService as Ca, AsyncLock as Yc, requestImmediateMacroTask as Hc, ICommandService as Dr, DataStreamTreeTokenType as Be, DisposableCollection as Gc, Optional as Wc, Plugin as Qc, merge as qc, touchDependencies as Es } from "@univerjs/core";
|
|
5
5
|
import { Subject as tr, BehaviorSubject as fo, distinctUntilChanged as mo, combineLatest as Xc, map as Kc, Observable as Zc, shareReplay as zc } from "rxjs";
|
|
6
6
|
import { DataSyncPrimaryController as Jc } from "@univerjs/rpc";
|
|
7
7
|
var ir = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(ir || {}), It = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(It || {}), we = /* @__PURE__ */ ((i) => (i.ALL = "#All", i.DATA = "#Data", i.HEADERS = "#Headers", i.TOTALS = "#Totals", i.THIS_ROW = "#This Row", i))(we || {}), ft = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ft || {});
|
|
@@ -19,7 +19,7 @@ function el(i, a, e, t, r) {
|
|
|
19
19
|
var h = /* @__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))(h || {});
|
|
20
20
|
const lr = new Set(Object.values(h)), ii = [...new Set(Object.values(h).map((i) => i.length))];
|
|
21
21
|
var tl = /* @__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[i.Table = 17] = "Table", i))(tl || {}), Z = /* @__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))(Z || {}), Y = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(Y || {});
|
|
22
|
-
const
|
|
22
|
+
const _n = /* @__PURE__ */ new Map([
|
|
23
23
|
["<>", 4],
|
|
24
24
|
["<", 4],
|
|
25
25
|
[">=", 4],
|
|
@@ -33,7 +33,7 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
33
33
|
["*", 1],
|
|
34
34
|
["^", 0]
|
|
35
35
|
// ^
|
|
36
|
-
]), Dt = new Set(
|
|
36
|
+
]), Dt = new Set(_n.keys()), rl = /* @__PURE__ */ new Set([
|
|
37
37
|
"=",
|
|
38
38
|
"<>",
|
|
39
39
|
">",
|
|
@@ -43,7 +43,7 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
43
43
|
/* LESS_THAN_OR_EQUAL */
|
|
44
44
|
]);
|
|
45
45
|
var X = /* @__PURE__ */ ((i) => (i.OPEN_BRACKET = "(", i.CLOSE_BRACKET = ")", i.COMMA = ",", i.SINGLE_QUOTATION = "'", i.DOUBLE_QUOTATION = '"', i.OPEN_BRACES = "{", i.CLOSE_BRACES = "}", i.COLON = ":", i.OPEN_SQUARE_BRACKET = "[", i.CLOSE_SQUARE_BRACKET = "]", i))(X || {}), nt = /* @__PURE__ */ ((i) => (i.PERCENTAGE = "%", i.POUND = "#", i))(nt || {});
|
|
46
|
-
const
|
|
46
|
+
const Rs = /* @__PURE__ */ new Set([
|
|
47
47
|
"%",
|
|
48
48
|
"#"
|
|
49
49
|
/* POUND */
|
|
@@ -56,7 +56,7 @@ const nl = " ", ho = [
|
|
|
56
56
|
...Object.values(nt),
|
|
57
57
|
...Object.values(Le)
|
|
58
58
|
];
|
|
59
|
-
function
|
|
59
|
+
function An(i) {
|
|
60
60
|
return ho.includes(i);
|
|
61
61
|
}
|
|
62
62
|
function sl(i) {
|
|
@@ -69,7 +69,7 @@ function ky(i) {
|
|
|
69
69
|
return i[0] === "'" && i[i.length - 1] === "'" ? i.substring(1, i.length - 1) : i;
|
|
70
70
|
}
|
|
71
71
|
function $y(i) {
|
|
72
|
-
return
|
|
72
|
+
return An(i) && i !== X.CLOSE_BRACES && i !== X.CLOSE_BRACKET && i !== X.SINGLE_QUOTATION && i !== X.DOUBLE_QUOTATION || i === " ";
|
|
73
73
|
}
|
|
74
74
|
const al = /* @__PURE__ */ new Set([
|
|
75
75
|
Z.PLUS,
|
|
@@ -117,8 +117,8 @@ const ol = /* @__PURE__ */ new Set([
|
|
|
117
117
|
function ul(i) {
|
|
118
118
|
return ol.has(i);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
function
|
|
120
|
+
const wr = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', oi = new RegExp(wr), cl = "((?![\\[\\]\\/?*\\\\]).)*!", $t = "$", es = "\\s*?:\\s*?", On = "[A-Za-z]+", Mn = "[1-9][0-9]*", Lr = `'?(${wr})?(${cl})?'?`, Us = `\\${$t}?${On}\\${$t}?${Mn}`, ll = `^(${Le.AT})?${Lr}${Us}${es}${Us}$`, ui = new RegExp(ll), fl = `^${Lr}\\s*?${Us}(${nt.POUND})?$`, ci = new RegExp(fl), ml = `^${Lr}\\${$t}?${Mn}${es}\\${$t}?${Mn}$`, li = new RegExp(ml), hl = `^${Lr}\\${$t}?${On}${es}\\${$t}?${On}$`, fi = new RegExp(hl), gl = `^${Lr}\\s*?\\${$t}?${Mn}$`, mi = new RegExp(gl), dl = `^${Lr}\\s*?\\${$t}?${On}$`, hi = new RegExp(dl), Fr = "((?![~!@#$%^&*()_+<>?:,./;’,。、‘:“《》?~!@#¥%……()【】\\[\\]\\/\\\\]).)+", go = "\\[#.+\\]\\s*?,\\s*?", Sn = "\\[((?<!#).)*\\]", gi = `${Sn}${es}${Sn}`, Cl = `^(${wr})?${Fr}$`, _l = `^(${wr})?${Fr}(${Sn}|\\[${go}${Sn}\\])+$`, Al = `^(${wr})?${Fr}(\\[${gi}\\])?$|^${Fr}(\\[${go}${gi}\\])?$`, El = `^(${wr})?${Fr}\\[\\s*#([^\\]]+)\\s*\\]$`, di = new RegExp(Cl), Ci = new RegExp(_l), _i = new RegExp(Al), Ai = new RegExp(El), Rl = "{.*?}", Ei = new RegExp(Rl, "g");
|
|
121
|
+
function Xr(i) {
|
|
122
122
|
return ci.lastIndex = 0, ci.test(i);
|
|
123
123
|
}
|
|
124
124
|
function yl(i) {
|
|
@@ -152,7 +152,7 @@ function Ol(i) {
|
|
|
152
152
|
return Ei.lastIndex = 0, Ei.test(i);
|
|
153
153
|
}
|
|
154
154
|
function Ro(i) {
|
|
155
|
-
return
|
|
155
|
+
return Xr(i) || yl(i) || Co(i) || _o(i);
|
|
156
156
|
}
|
|
157
157
|
function Ri(i) {
|
|
158
158
|
const a = {};
|
|
@@ -182,16 +182,16 @@ function Ml(i) {
|
|
|
182
182
|
}
|
|
183
183
|
return a;
|
|
184
184
|
}
|
|
185
|
-
const _t = "P_1", Bt = "R_1",
|
|
185
|
+
const _t = "P_1", Bt = "R_1", Rr = "L_1", Kr = "LR_1", yo = "LO_1", Sl = "LET", Br = "LAMBDA", Dl = "CUBE", wl = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), Ll = {
|
|
186
186
|
id: "formula.mutation.register-function",
|
|
187
187
|
type: Se.MUTATION,
|
|
188
188
|
handler: () => !0
|
|
189
|
-
},
|
|
189
|
+
}, Ts = {
|
|
190
190
|
id: "formula.mutation.set-array-formula-data",
|
|
191
191
|
type: Se.MUTATION,
|
|
192
192
|
handler: (i, a) => !0
|
|
193
193
|
}, Pl = /[^0-9]/g, xl = /[^A-Za-z]/g;
|
|
194
|
-
function
|
|
194
|
+
function En(i) {
|
|
195
195
|
let a = i[0] === "$";
|
|
196
196
|
const e = i.substring(1);
|
|
197
197
|
let t = e.indexOf("$") > -1;
|
|
@@ -202,9 +202,9 @@ function Yy(i) {
|
|
|
202
202
|
a.length > 1 && (i = a[a.length - 1]);
|
|
203
203
|
const e = i.split(":");
|
|
204
204
|
return e.length > 1 ? {
|
|
205
|
-
startAbsoluteRefType:
|
|
206
|
-
endAbsoluteRefType:
|
|
207
|
-
} : { startAbsoluteRefType:
|
|
205
|
+
startAbsoluteRefType: En(e[0]),
|
|
206
|
+
endAbsoluteRefType: En(e[1])
|
|
207
|
+
} : { startAbsoluteRefType: En(e[0]) };
|
|
208
208
|
}
|
|
209
209
|
function yi(i = Pe.NONE) {
|
|
210
210
|
let a = "", e = "";
|
|
@@ -238,14 +238,14 @@ function jl(i, a) {
|
|
|
238
238
|
return `${po(i)}!${Yt(a)}`;
|
|
239
239
|
}
|
|
240
240
|
function Ul(i, a, e) {
|
|
241
|
-
return
|
|
241
|
+
return Is(i) || Is(a) ? `'[${Fs(i)}]${Fs(a)}'!${Yt(e)}` : `[${i}]${a}!${Yt(e)}`;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function vs(i) {
|
|
244
244
|
const { unitId: a, sheetName: e, range: t } = i;
|
|
245
245
|
return a != null && a.length > 0 && e != null && e.length > 0 ? Ul(a, e, t) : e != null && e.length > 0 ? jl(e, t) : Yt(t);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const a = Number.parseInt(i.replace(Pl, "")) - 1, e = Ge.ABCatNum(i.replace(xl, "")), t =
|
|
247
|
+
function ys(i) {
|
|
248
|
+
const a = Number.parseInt(i.replace(Pl, "")) - 1, e = Ge.ABCatNum(i.replace(xl, "")), t = En(i);
|
|
249
249
|
return {
|
|
250
250
|
row: a,
|
|
251
251
|
column: e,
|
|
@@ -264,10 +264,10 @@ function _a(i) {
|
|
|
264
264
|
unitId: e
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function kr(i) {
|
|
268
268
|
const { refBody: a, sheetName: e, unitId: t } = _a(i), r = a.indexOf(":");
|
|
269
269
|
if (r === -1) {
|
|
270
|
-
const _ =
|
|
270
|
+
const _ = ys(a), C = _.row, E = _.column, R = _.absoluteRefType;
|
|
271
271
|
return {
|
|
272
272
|
unitId: t,
|
|
273
273
|
sheetName: e,
|
|
@@ -281,7 +281,7 @@ function Br(i) {
|
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
-
const n = a.substring(0, r), s = a.substring(r + 1), o =
|
|
284
|
+
const n = a.substring(0, r), s = a.substring(r + 1), o = ys(n), u = ys(s), c = o.row > u.row ? u.row : o.row, l = o.column > u.column ? u.column : o.column, f = o.row > u.row ? o.row : u.row, m = o.column > u.column ? o.column : u.column;
|
|
285
285
|
let d = rt.NORMAL;
|
|
286
286
|
return Number.isNaN(c) && Number.isNaN(f) ? d = rt.COLUMN : Number.isNaN(l) && Number.isNaN(m) && (d = rt.ROW), {
|
|
287
287
|
unitId: t,
|
|
@@ -298,11 +298,11 @@ function Br(i) {
|
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
const Tl = ["LOG10"];
|
|
301
|
-
function
|
|
301
|
+
function Rn(i) {
|
|
302
302
|
const a = bo(i);
|
|
303
303
|
if (!Ro(a) || Tl.includes(a.toUpperCase().trim()))
|
|
304
304
|
return !1;
|
|
305
|
-
const { range: e } =
|
|
305
|
+
const { range: e } = kr(a);
|
|
306
306
|
return !(e.endColumn >= 16384);
|
|
307
307
|
}
|
|
308
308
|
function bo(i) {
|
|
@@ -323,7 +323,7 @@ function bo(i) {
|
|
|
323
323
|
function Hy(i, a) {
|
|
324
324
|
const e = (i == null ? void 0 : i.split(",")) || [];
|
|
325
325
|
return i === "" || e.length === 0 ? [] : vl(i) ? e.map((n) => {
|
|
326
|
-
const s =
|
|
326
|
+
const s = kr(n);
|
|
327
327
|
return {
|
|
328
328
|
unitId: s.unitId,
|
|
329
329
|
sheetId: a(s.sheetName),
|
|
@@ -333,15 +333,15 @@ function Hy(i, a) {
|
|
|
333
333
|
}) : [];
|
|
334
334
|
}
|
|
335
335
|
function vl(i) {
|
|
336
|
-
return ((i == null ? void 0 : i.split(",")) || []).every((e) =>
|
|
336
|
+
return ((i == null ? void 0 : i.split(",")) || []).every((e) => Rn(e.trim()));
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Is(i) {
|
|
339
339
|
return i.length === 0 ? !1 : !!(sl(i) || Il(i) || Fl(i) || Bl(i) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?()]/.test(i));
|
|
340
340
|
}
|
|
341
341
|
function po(i) {
|
|
342
|
-
return
|
|
342
|
+
return Is(i) ? `'${Fs(i)}'` : i;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Fs(i) {
|
|
345
345
|
return i.replace(/'/g, "''");
|
|
346
346
|
}
|
|
347
347
|
function bi(i) {
|
|
@@ -370,7 +370,7 @@ var $l = Object.getOwnPropertyDescriptor, Yl = (i, a, e, t) => {
|
|
|
370
370
|
(s = i[n]) && (r = s(r) || r);
|
|
371
371
|
return r;
|
|
372
372
|
}, Hl = (i, a) => (e, t) => a(e, t, i);
|
|
373
|
-
let
|
|
373
|
+
let Bs = class extends De {
|
|
374
374
|
constructor(a) {
|
|
375
375
|
super();
|
|
376
376
|
// 18.2.6 definedNames (Defined Names)
|
|
@@ -478,13 +478,13 @@ let Fs = class extends De {
|
|
|
478
478
|
this._nameCacheMap[a][t.name] = t;
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
|
-
|
|
482
|
-
Hl(0,
|
|
483
|
-
],
|
|
484
|
-
const
|
|
481
|
+
Bs = Yl([
|
|
482
|
+
Hl(0, Jn)
|
|
483
|
+
], Bs);
|
|
484
|
+
const Pr = Je("univer.formula.defined-names.service"), Gy = (i, a) => {
|
|
485
485
|
const { unitId: e, id: t } = a;
|
|
486
486
|
return {
|
|
487
|
-
...i.get(
|
|
487
|
+
...i.get(Pr).getValueById(e, t),
|
|
488
488
|
unitId: e
|
|
489
489
|
};
|
|
490
490
|
}, No = {
|
|
@@ -493,7 +493,7 @@ const Lr = Je("univer.formula.defined-names.service"), Gy = (i, a) => {
|
|
|
493
493
|
handler: (i, a) => {
|
|
494
494
|
if (a == null)
|
|
495
495
|
return !1;
|
|
496
|
-
const e = i.get(
|
|
496
|
+
const e = i.get(Pr), { id: t, unitId: r, name: n, formulaOrRefString: s, comment: o, hidden: u, localSheetId: c, formulaOrRefStringWithPrefix: l } = a;
|
|
497
497
|
return e.registerDefinedName(r, {
|
|
498
498
|
id: t,
|
|
499
499
|
name: n.trim(),
|
|
@@ -510,7 +510,7 @@ const Lr = Je("univer.formula.defined-names.service"), Gy = (i, a) => {
|
|
|
510
510
|
handler: (i, a) => {
|
|
511
511
|
if (a == null)
|
|
512
512
|
return !1;
|
|
513
|
-
const e = i.get(
|
|
513
|
+
const e = i.get(Pr), { unitId: t, id: r } = a;
|
|
514
514
|
return e.removeDefinedName(t, r), !0;
|
|
515
515
|
}
|
|
516
516
|
}, Aa = {
|
|
@@ -537,7 +537,7 @@ const Lr = Je("univer.formula.defined-names.service"), Gy = (i, a) => {
|
|
|
537
537
|
id: "formula.mutation.set-formula-calculation-stop",
|
|
538
538
|
type: Se.MUTATION,
|
|
539
539
|
handler: () => !0
|
|
540
|
-
},
|
|
540
|
+
}, Dn = {
|
|
541
541
|
id: "formula.mutation.set-formula-calculation-notification",
|
|
542
542
|
type: Se.MUTATION,
|
|
543
543
|
handler: () => !0
|
|
@@ -549,7 +549,7 @@ const Lr = Je("univer.formula.defined-names.service"), Gy = (i, a) => {
|
|
|
549
549
|
id: "formula.mutation.set-formula-dependency-calculation",
|
|
550
550
|
type: Se.MUTATION,
|
|
551
551
|
handler: () => !0
|
|
552
|
-
},
|
|
552
|
+
}, ks = {
|
|
553
553
|
id: "formula.mutation.set-formula-dependency-calculation-result",
|
|
554
554
|
type: Se.MUTATION,
|
|
555
555
|
handler: () => !0
|
|
@@ -625,26 +625,26 @@ class Wl extends De {
|
|
|
625
625
|
this._update$.next(null);
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
-
const
|
|
628
|
+
const Zr = Je("univer.formula.super-table.service"), Ql = {
|
|
629
629
|
id: "formula.mutation.set-super-table",
|
|
630
630
|
type: Se.MUTATION,
|
|
631
631
|
handler: (i, a) => {
|
|
632
632
|
const { unitId: e, tableName: t, reference: r } = a;
|
|
633
|
-
return i.get(
|
|
633
|
+
return i.get(Zr).registerTable(e, t, r), !0;
|
|
634
634
|
}
|
|
635
635
|
}, ql = {
|
|
636
636
|
id: "formula.mutation.remove-super-table",
|
|
637
637
|
type: Se.MUTATION,
|
|
638
638
|
handler: (i, a) => {
|
|
639
639
|
const { unitId: e, tableName: t } = a;
|
|
640
|
-
return i.get(
|
|
640
|
+
return i.get(Zr).remove(e, t), !0;
|
|
641
641
|
}
|
|
642
642
|
}, Xl = {
|
|
643
643
|
id: "formula.mutation.set-super-table-option",
|
|
644
644
|
type: Se.MUTATION,
|
|
645
645
|
handler: (i, a) => {
|
|
646
646
|
const { tableOption: e, tableOptionType: t } = a;
|
|
647
|
-
return i.get(
|
|
647
|
+
return i.get(Zr).registerTableOptionMap(e, t), !0;
|
|
648
648
|
}
|
|
649
649
|
};
|
|
650
650
|
class jt {
|
|
@@ -673,16 +673,16 @@ class jt {
|
|
|
673
673
|
return a.length <= 64 ? a : xc(a).toString();
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
678
|
-
const a =
|
|
676
|
+
const $s = new jt(1e5);
|
|
677
|
+
function yr(i) {
|
|
678
|
+
const a = $s.get(i);
|
|
679
679
|
if (a)
|
|
680
680
|
return a;
|
|
681
|
-
const e =
|
|
682
|
-
return
|
|
681
|
+
const e = kr(i);
|
|
682
|
+
return $s.set(i, e), kr(i);
|
|
683
683
|
}
|
|
684
684
|
function Kl() {
|
|
685
|
-
|
|
685
|
+
$s.clear();
|
|
686
686
|
}
|
|
687
687
|
var He = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.NUMBER = 1] = "NUMBER", i[i.STRING = 2] = "STRING", i[i.FUNCTION = 3] = "FUNCTION", i[i.REFERENCE = 4] = "REFERENCE", i[i.ARRAY = 5] = "ARRAY", i[i.DEFINED_NAME = 6] = "DEFINED_NAME", i[i.TABLE = 7] = "TABLE", i))(He || {});
|
|
688
688
|
function pi(i) {
|
|
@@ -798,8 +798,8 @@ class ie {
|
|
|
798
798
|
return r;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
const vo = 2e3,
|
|
802
|
-
class
|
|
801
|
+
const vo = 2e3, bs = new jt(vo), ps = new jt(vo);
|
|
802
|
+
class $r extends De {
|
|
803
803
|
constructor() {
|
|
804
804
|
super(...arguments);
|
|
805
805
|
A(this, "_currentLexerNode", new ie());
|
|
@@ -823,7 +823,7 @@ class kr extends De {
|
|
|
823
823
|
}
|
|
824
824
|
// Table3[[#All],[Column1]:[Column2]]
|
|
825
825
|
dispose() {
|
|
826
|
-
this._resetTemp(), this._currentLexerNode.dispose(),
|
|
826
|
+
this._resetTemp(), this._currentLexerNode.dispose(), bs.clear(), ps.clear();
|
|
827
827
|
}
|
|
828
828
|
getUpLevel() {
|
|
829
829
|
return this._upLevel;
|
|
@@ -868,7 +868,7 @@ class kr extends De {
|
|
|
868
868
|
let s = n.getParent(), o = n;
|
|
869
869
|
for (; s; ) {
|
|
870
870
|
const u = s.getToken();
|
|
871
|
-
if (u !== _t && !
|
|
871
|
+
if (u !== _t && !An(u) && s.getStartIndex() !== -1) {
|
|
872
872
|
const c = s.getChildren().indexOf(o);
|
|
873
873
|
return {
|
|
874
874
|
functionName: u,
|
|
@@ -895,19 +895,19 @@ class kr extends De {
|
|
|
895
895
|
let u = o.getParent(), c = 0;
|
|
896
896
|
for (s[1] === X.OPEN_BRACKET && c++; u; ) {
|
|
897
897
|
const l = u.getToken();
|
|
898
|
-
l !== _t && l !== X.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !==
|
|
898
|
+
l !== _t && l !== X.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Br && (t === 0 ? c += 1 : t--), u = u.getParent();
|
|
899
899
|
}
|
|
900
900
|
return c;
|
|
901
901
|
}
|
|
902
902
|
sequenceNodesBuilder(e) {
|
|
903
|
-
const t =
|
|
903
|
+
const t = ps.get(e);
|
|
904
904
|
if (t)
|
|
905
905
|
return [...t];
|
|
906
906
|
const r = this._getSequenceArray(e);
|
|
907
907
|
if (r.length === 0)
|
|
908
908
|
return;
|
|
909
909
|
const n = this.getSequenceNode(r);
|
|
910
|
-
return
|
|
910
|
+
return ps.set(e, [...n]), n;
|
|
911
911
|
}
|
|
912
912
|
convertRefersToAbsolute(e, t, r, n = "") {
|
|
913
913
|
const s = this.sequenceNodesBuilder(e);
|
|
@@ -918,14 +918,14 @@ class kr extends De {
|
|
|
918
918
|
for (let u = 0, c = s.length; u < c; u++) {
|
|
919
919
|
const l = s[u];
|
|
920
920
|
if (typeof l != "string" && l.nodeType === He.REFERENCE) {
|
|
921
|
-
const { token: f, endIndex: m } = l, d =
|
|
921
|
+
const { token: f, endIndex: m } = l, d = yr(f);
|
|
922
922
|
if (d == null)
|
|
923
923
|
continue;
|
|
924
924
|
const { range: _, sheetName: C, unitId: E } = d, R = {
|
|
925
925
|
..._,
|
|
926
926
|
startAbsoluteRefType: t,
|
|
927
927
|
endAbsoluteRefType: r
|
|
928
|
-
}, y =
|
|
928
|
+
}, y = vs({
|
|
929
929
|
range: R,
|
|
930
930
|
unitId: E,
|
|
931
931
|
sheetName: C || n
|
|
@@ -954,7 +954,7 @@ class kr extends De {
|
|
|
954
954
|
o.push(l);
|
|
955
955
|
continue;
|
|
956
956
|
}
|
|
957
|
-
const { token: f } = l, m =
|
|
957
|
+
const { token: f } = l, m = yr(f), { sheetName: d, unitId: _ } = m;
|
|
958
958
|
let C = m.range;
|
|
959
959
|
if (!n && C.startAbsoluteRefType === Pe.ALL && C.endAbsoluteRefType === Pe.ALL) {
|
|
960
960
|
o.push(l);
|
|
@@ -962,7 +962,7 @@ class kr extends De {
|
|
|
962
962
|
} else
|
|
963
963
|
C = ga(C, t, r, n);
|
|
964
964
|
let E = "";
|
|
965
|
-
jc(C) ? E =
|
|
965
|
+
jc(C) ? E = vs({
|
|
966
966
|
range: C,
|
|
967
967
|
unitId: _,
|
|
968
968
|
sheetName: d
|
|
@@ -981,7 +981,7 @@ class kr extends De {
|
|
|
981
981
|
if (this._currentLexerNode.getChildren().length === 0)
|
|
982
982
|
return !0;
|
|
983
983
|
const e = this._currentLexerNode.getChildren()[0];
|
|
984
|
-
return e instanceof ie ? !0 : !!(this._passArrayOperator(e) || Dt.has(e) ||
|
|
984
|
+
return e instanceof ie ? !0 : !!(this._passArrayOperator(e) || Dt.has(e) || Rs.has(e) || e === Le.AT || e === X.COMMA || e === X.COLON || e === X.OPEN_BRACKET);
|
|
985
985
|
}
|
|
986
986
|
/**
|
|
987
987
|
* ={0,1,2,3,4,5,6} + {0;1;2;3;4;5;6}*7
|
|
@@ -1006,12 +1006,12 @@ class kr extends De {
|
|
|
1006
1006
|
const m = n - f.length;
|
|
1007
1007
|
let d = n - 1;
|
|
1008
1008
|
const _ = n - 1;
|
|
1009
|
-
if (n === s - 1 && this._isLastMergeString(l) && (f += l, d += 1), f === "" ||
|
|
1009
|
+
if (n === s - 1 && this._isLastMergeString(l) && (f += l, d += 1), f === "" || _n.has(f)) {
|
|
1010
1010
|
t.push(l);
|
|
1011
1011
|
continue;
|
|
1012
1012
|
}
|
|
1013
1013
|
const C = f.trim(), E = bo(C);
|
|
1014
|
-
r === !0 && C[C.length - 1] === X.DOUBLE_QUOTATION && C[0] !== X.OPEN_BRACES ? (r = !1, this._processPushSequenceNode(t, He.STRING, f, m, d, _)) :
|
|
1014
|
+
r === !0 && C[C.length - 1] === X.DOUBLE_QUOTATION && C[0] !== X.OPEN_BRACES ? (r = !1, this._processPushSequenceNode(t, He.STRING, f, m, d, _)) : Xr(E) && Rn(E) ? this._processPushSequenceNode(t, He.REFERENCE, f, m, d, _) : Ge.isStringNumber(C) ? this._processPushSequenceNode(t, He.NUMBER, f, m, d, _) : C.length > 0 && this._processPushSequenceNode(t, He.FUNCTION, f, m, d, _), (n !== s - 1 || !this._isLastMergeString(l)) && t.push(l);
|
|
1015
1015
|
}
|
|
1016
1016
|
return this._mergeSequenceNodeReference(t);
|
|
1017
1017
|
}
|
|
@@ -1031,7 +1031,7 @@ class kr extends De {
|
|
|
1031
1031
|
return this._nodeMaker(e, void 0, t);
|
|
1032
1032
|
}
|
|
1033
1033
|
_isLastMergeString(e) {
|
|
1034
|
-
return e === X.DOUBLE_QUOTATION || Ge.isStringNumber(e) || !
|
|
1034
|
+
return e === X.DOUBLE_QUOTATION || Ge.isStringNumber(e) || !An(e);
|
|
1035
1035
|
}
|
|
1036
1036
|
/**
|
|
1037
1037
|
* Merge array and handle ref operations
|
|
@@ -1051,7 +1051,7 @@ class kr extends De {
|
|
|
1051
1051
|
t.push(s);
|
|
1052
1052
|
} else {
|
|
1053
1053
|
const o = e[n + 1], u = e[n + 2];
|
|
1054
|
-
o === X.COLON && typeof s != "string" && u != null && typeof u != "string" &&
|
|
1054
|
+
o === X.COLON && typeof s != "string" && u != null && typeof u != "string" && Rn((s.token + o + u.token).trim()) && (s.nodeType = He.REFERENCE, s.token += o + u.token, s.endIndex = u.endIndex, n += 2), t.push(s);
|
|
1055
1055
|
}
|
|
1056
1056
|
n++;
|
|
1057
1057
|
}
|
|
@@ -1067,7 +1067,7 @@ class kr extends De {
|
|
|
1067
1067
|
const s = r.token.match(/^(\s*([-@+]\s*)+)(.*)$/);
|
|
1068
1068
|
if (s) {
|
|
1069
1069
|
const o = s[1], u = s[3];
|
|
1070
|
-
if (
|
|
1070
|
+
if (Rn(u.trim())) {
|
|
1071
1071
|
const c = o.length, l = r.startIndex, f = r.startIndex + c - 1, m = {
|
|
1072
1072
|
nodeType: He.NORMAL,
|
|
1073
1073
|
// Use appropriate nodeType for operators
|
|
@@ -1099,7 +1099,7 @@ class kr extends De {
|
|
|
1099
1099
|
treeBuilder(e, t = !0, r) {
|
|
1100
1100
|
var f;
|
|
1101
1101
|
if (t === !0) {
|
|
1102
|
-
const m =
|
|
1102
|
+
const m = bs.get(e), d = r && ((f = this._simpleCheckDefinedName) == null ? void 0 : f.call(this, e, r));
|
|
1103
1103
|
if (m && !d)
|
|
1104
1104
|
return m;
|
|
1105
1105
|
}
|
|
@@ -1119,7 +1119,7 @@ class kr extends De {
|
|
|
1119
1119
|
if (l && (this._currentLexerNode = l), t) {
|
|
1120
1120
|
if (!this._suffixExpressionHandler(this._currentLexerNode))
|
|
1121
1121
|
return h.VALUE;
|
|
1122
|
-
|
|
1122
|
+
bs.set(e, this._currentLexerNode);
|
|
1123
1123
|
}
|
|
1124
1124
|
return o && this._currentLexerNode.setDefinedNames(c), this._currentLexerNode;
|
|
1125
1125
|
}
|
|
@@ -1236,7 +1236,7 @@ class kr extends De {
|
|
|
1236
1236
|
const m = (u = s[s.length - 1]) == null ? void 0 : u.trim();
|
|
1237
1237
|
if (!m || m === X.OPEN_BRACKET)
|
|
1238
1238
|
break;
|
|
1239
|
-
const d =
|
|
1239
|
+
const d = _n.get(m), _ = _n.get(f);
|
|
1240
1240
|
if (d === void 0 || _ === void 0)
|
|
1241
1241
|
break;
|
|
1242
1242
|
if (_ >= d)
|
|
@@ -1394,7 +1394,7 @@ class kr extends De {
|
|
|
1394
1394
|
var r, n, s, o, u, c;
|
|
1395
1395
|
const e = (r = this._currentLexerNode) == null ? void 0 : r.getParent();
|
|
1396
1396
|
let t = !1;
|
|
1397
|
-
if (e && e.getToken() ===
|
|
1397
|
+
if (e && e.getToken() === Rr) {
|
|
1398
1398
|
if ((n = e == null ? void 0 : e.getParent()) != null && n.getParent()) {
|
|
1399
1399
|
const l = (o = (s = this._currentLexerNode.getParent()) == null ? void 0 : s.getParent()) == null ? void 0 : o.getParent();
|
|
1400
1400
|
l && (this._currentLexerNode = l), t = !0;
|
|
@@ -1453,7 +1453,7 @@ class kr extends De {
|
|
|
1453
1453
|
const r = this._findPreviousToken(e, t) || "", n = e.length - 1 === t;
|
|
1454
1454
|
if (!n && this._isOperatorToken(r) || n && il(r))
|
|
1455
1455
|
return !0;
|
|
1456
|
-
if (
|
|
1456
|
+
if (Rs.has(r)) {
|
|
1457
1457
|
const s = this._findSecondLastNonSpaceToken(e, t);
|
|
1458
1458
|
if (s == null || ul(s))
|
|
1459
1459
|
return !0;
|
|
@@ -1517,7 +1517,7 @@ class kr extends De {
|
|
|
1517
1517
|
let s = r[++n];
|
|
1518
1518
|
for (; s === " "; )
|
|
1519
1519
|
s = r[++n];
|
|
1520
|
-
return !!
|
|
1520
|
+
return !!An(s);
|
|
1521
1521
|
}
|
|
1522
1522
|
_checkIfErrorObject(e, t) {
|
|
1523
1523
|
return !!this._findErrorObject(e, t);
|
|
@@ -1581,7 +1581,7 @@ class kr extends De {
|
|
|
1581
1581
|
if (f && f === X.OPEN_BRACKET) {
|
|
1582
1582
|
if (!this._setParentCurrentLexerNode() && u !== o - 1)
|
|
1583
1583
|
return h.VALUE;
|
|
1584
|
-
this._newAndPushCurrentLexerNode(
|
|
1584
|
+
this._newAndPushCurrentLexerNode(Rr, u, !0), this._openLambda();
|
|
1585
1585
|
} else if (!this._setAncestorCurrentLexerNode() && u !== o - 1)
|
|
1586
1586
|
return h.VALUE;
|
|
1587
1587
|
} else
|
|
@@ -1666,7 +1666,7 @@ class kr extends De {
|
|
|
1666
1666
|
C && C.changeToParent(f);
|
|
1667
1667
|
}
|
|
1668
1668
|
this._setCurrentLexerNode(d), this._currentLexerNode = m, this._openColon(_);
|
|
1669
|
-
} else if (
|
|
1669
|
+
} else if (Rs.has(c) && this._checkSimilarErrorToken(c, u, s) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
|
|
1670
1670
|
this._pushNodeToChildren(this._segment);
|
|
1671
1671
|
const l = new ie();
|
|
1672
1672
|
l.setToken(c);
|
|
@@ -1778,7 +1778,7 @@ var Jl = Object.getOwnPropertyDescriptor, ef = (i, a, e, t) => {
|
|
|
1778
1778
|
(s = i[n]) && (r = s(r) || r);
|
|
1779
1779
|
return r;
|
|
1780
1780
|
}, Ni = (i, a) => (e, t) => a(e, t, i);
|
|
1781
|
-
let
|
|
1781
|
+
let br = class extends De {
|
|
1782
1782
|
constructor(a, e) {
|
|
1783
1783
|
super();
|
|
1784
1784
|
A(this, "_arrayFormulaRange", {});
|
|
@@ -1839,7 +1839,7 @@ let yr = class extends De {
|
|
|
1839
1839
|
});
|
|
1840
1840
|
}
|
|
1841
1841
|
getFormulaData() {
|
|
1842
|
-
const a = {}, e = this._univerInstanceService.getAllUnitsForType(
|
|
1842
|
+
const a = {}, e = this._univerInstanceService.getAllUnitsForType(Cr.UNIVER_SHEET);
|
|
1843
1843
|
return e.length === 0 || e.forEach((t) => {
|
|
1844
1844
|
const r = t.getUnitId();
|
|
1845
1845
|
a[r] = {}, t.getSheets().forEach((s) => {
|
|
@@ -1915,7 +1915,7 @@ let yr = class extends De {
|
|
|
1915
1915
|
s.getValue(t, r) && (s.realDeleteValue(t, r), this._arrayFormulaRange[a] && (this._arrayFormulaRange[a][e] = s.getData()));
|
|
1916
1916
|
}
|
|
1917
1917
|
getCalculateData() {
|
|
1918
|
-
const a = this._univerInstanceService.getAllUnitsForType(
|
|
1918
|
+
const a = this._univerInstanceService.getAllUnitsForType(Cr.UNIVER_SHEET), e = {}, t = {}, r = {};
|
|
1919
1919
|
for (const n of a) {
|
|
1920
1920
|
const s = n.getUnitId(), o = n.getSheets(), u = {}, c = {};
|
|
1921
1921
|
for (const l of o) {
|
|
@@ -1944,7 +1944,7 @@ let yr = class extends De {
|
|
|
1944
1944
|
* For formulas that are sensitive to hidden rows.
|
|
1945
1945
|
*/
|
|
1946
1946
|
getHiddenRowsFiltered() {
|
|
1947
|
-
const a = this._univerInstanceService.getAllUnitsForType(
|
|
1947
|
+
const a = this._univerInstanceService.getAllUnitsForType(Cr.UNIVER_SHEET), e = {};
|
|
1948
1948
|
for (const t of a) {
|
|
1949
1949
|
const r = t.getUnitId(), n = t.getSheets();
|
|
1950
1950
|
e[r] = {};
|
|
@@ -2106,10 +2106,10 @@ let yr = class extends De {
|
|
|
2106
2106
|
}), t;
|
|
2107
2107
|
}
|
|
2108
2108
|
};
|
|
2109
|
-
|
|
2110
|
-
Ni(0,
|
|
2111
|
-
Ni(1, ye(
|
|
2112
|
-
],
|
|
2109
|
+
br = ef([
|
|
2110
|
+
Ni(0, Jn),
|
|
2111
|
+
Ni(1, ye($r))
|
|
2112
|
+
], br);
|
|
2113
2113
|
function Vi(i, a, e, t) {
|
|
2114
2114
|
i[a] || (i[a] = {}), i[a][e] || (i[a][e] = {});
|
|
2115
2115
|
const r = /* @__PURE__ */ new Map(), n = new de(i[a][e]);
|
|
@@ -2142,7 +2142,7 @@ function Vi(i, a, e, t) {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
2145
|
-
const tf = class
|
|
2145
|
+
const tf = class Ys {
|
|
2146
2146
|
/**
|
|
2147
2147
|
* Accept two comparable values and creates new instance of interval
|
|
2148
2148
|
* Predicate Interval.comparable_less(low, high) supposed to return true on these values
|
|
@@ -2157,7 +2157,7 @@ const tf = class $s {
|
|
|
2157
2157
|
* @returns {Interval}
|
|
2158
2158
|
*/
|
|
2159
2159
|
clone() {
|
|
2160
|
-
return new
|
|
2160
|
+
return new Ys(this.low, this.high);
|
|
2161
2161
|
}
|
|
2162
2162
|
/**
|
|
2163
2163
|
* Propery max returns clone of this interval
|
|
@@ -2204,7 +2204,7 @@ const tf = class $s {
|
|
|
2204
2204
|
* @returns {Interval}
|
|
2205
2205
|
*/
|
|
2206
2206
|
merge(a) {
|
|
2207
|
-
return new
|
|
2207
|
+
return new Ys(
|
|
2208
2208
|
this.low === void 0 ? a.low : this.low < a.low ? this.low : a.low,
|
|
2209
2209
|
this.high === void 0 ? a.high : this.high > a.high ? this.high : a.high
|
|
2210
2210
|
);
|
|
@@ -2530,7 +2530,7 @@ class ba {
|
|
|
2530
2530
|
return e += t, e;
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
|
-
const
|
|
2533
|
+
const Hs = Symbol("EMPTY_CELL");
|
|
2534
2534
|
class rf {
|
|
2535
2535
|
constructor() {
|
|
2536
2536
|
/**
|
|
@@ -2564,7 +2564,7 @@ class rf {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
}
|
|
2566
2566
|
let l = typeof r == "string" ? r.toLowerCase() : r;
|
|
2567
|
-
(l === "" || l === null) && (l =
|
|
2567
|
+
(l === "" || l === null) && (l = Hs);
|
|
2568
2568
|
let f = c.get(l);
|
|
2569
2569
|
f == null && (f = /* @__PURE__ */ new Set(), c.set(l, f)), f.add(n);
|
|
2570
2570
|
}
|
|
@@ -2575,7 +2575,7 @@ class rf {
|
|
|
2575
2575
|
getCellPositions(a, e, t, r, n) {
|
|
2576
2576
|
var u, c, l;
|
|
2577
2577
|
let s = typeof r == "string" ? r.toLowerCase() : r;
|
|
2578
|
-
(s === "" || s === null) && (s =
|
|
2578
|
+
(s === "" || s === null) && (s = Hs);
|
|
2579
2579
|
const o = (l = (c = (u = this._cache.get(a)) == null ? void 0 : u.get(e)) == null ? void 0 : c.get(t)) == null ? void 0 : l.get(s);
|
|
2580
2580
|
return o && [...o].filter((f) => n.some(([m, d]) => f >= m && f <= d));
|
|
2581
2581
|
}
|
|
@@ -2677,8 +2677,8 @@ var sf = Object.getOwnPropertyDescriptor, af = (i, a, e, t) => {
|
|
|
2677
2677
|
for (var r = t > 1 ? void 0 : t ? sf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
2678
2678
|
(s = i[n]) && (r = s(r) || r);
|
|
2679
2679
|
return r;
|
|
2680
|
-
},
|
|
2681
|
-
let
|
|
2680
|
+
}, un = (i, a) => (e, t) => a(e, t, i);
|
|
2681
|
+
let Gs = class extends De {
|
|
2682
2682
|
constructor(a, e, t, r) {
|
|
2683
2683
|
super();
|
|
2684
2684
|
A(this, "_unitData", {});
|
|
@@ -2767,7 +2767,7 @@ let Hs = class extends De {
|
|
|
2767
2767
|
return this._localeService.getCurrentLocale();
|
|
2768
2768
|
}
|
|
2769
2769
|
getSheetsInfo() {
|
|
2770
|
-
const a = this._univerInstanceService.getCurrentUnitForType(
|
|
2770
|
+
const a = this._univerInstanceService.getCurrentUnitForType(Cr.UNIVER_SHEET), { id: e, sheetOrder: t } = a.getSnapshot();
|
|
2771
2771
|
return {
|
|
2772
2772
|
sheetOrder: t,
|
|
2773
2773
|
sheetNameMap: this._sheetIdToNameMap[e]
|
|
@@ -2888,7 +2888,7 @@ let Hs = class extends De {
|
|
|
2888
2888
|
});
|
|
2889
2889
|
}
|
|
2890
2890
|
_loadSheetData() {
|
|
2891
|
-
const a = this._univerInstanceService.getCurrentUnitForType(
|
|
2891
|
+
const a = this._univerInstanceService.getCurrentUnitForType(Cr.UNIVER_SHEET), e = a == null ? void 0 : a.getActiveSheet();
|
|
2892
2892
|
return this._executeUnitId = a == null ? void 0 : a.getUnitId(), this._executeSubUnitId = e == null ? void 0 : e.getSheetId(), this._formulaDataModel.getCalculateData();
|
|
2893
2893
|
}
|
|
2894
2894
|
/**
|
|
@@ -2908,12 +2908,12 @@ let Hs = class extends De {
|
|
|
2908
2908
|
}), this._unitData[e][t].rowData = a[e][t]);
|
|
2909
2909
|
}
|
|
2910
2910
|
};
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
],
|
|
2911
|
+
Gs = af([
|
|
2912
|
+
un(0, Jn),
|
|
2913
|
+
un(1, ye(Tc)),
|
|
2914
|
+
un(2, ye(br)),
|
|
2915
|
+
un(3, ye(Fo))
|
|
2916
|
+
], Gs);
|
|
2917
2917
|
const Wt = Je(
|
|
2918
2918
|
"univer.formula.current-data.service"
|
|
2919
2919
|
);
|
|
@@ -2921,8 +2921,8 @@ var of = Object.getOwnPropertyDescriptor, uf = (i, a, e, t) => {
|
|
|
2921
2921
|
for (var r = t > 1 ? void 0 : t ? of(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
2922
2922
|
(s = i[n]) && (r = s(r) || r);
|
|
2923
2923
|
return r;
|
|
2924
|
-
},
|
|
2925
|
-
let
|
|
2924
|
+
}, Ns = (i, a) => (e, t) => a(e, t, i);
|
|
2925
|
+
let pr = class extends De {
|
|
2926
2926
|
constructor(i, a, e) {
|
|
2927
2927
|
super(), this._definedNamesService = i, this._lexerTreeBuilder = a, this._formulaCurrentConfigService = e;
|
|
2928
2928
|
}
|
|
@@ -2942,18 +2942,18 @@ let br = class extends De {
|
|
|
2942
2942
|
return !0;
|
|
2943
2943
|
}
|
|
2944
2944
|
};
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
],
|
|
2950
|
-
function
|
|
2945
|
+
pr = uf([
|
|
2946
|
+
Ns(0, Pr),
|
|
2947
|
+
Ns(1, ye($r)),
|
|
2948
|
+
Ns(2, Wt)
|
|
2949
|
+
], pr);
|
|
2950
|
+
function yn(i) {
|
|
2951
2951
|
if (i == null)
|
|
2952
2952
|
return !0;
|
|
2953
2953
|
const { v: a, f: e, si: t, p: r } = i;
|
|
2954
2954
|
return !(!(a == null || typeof a == "string" && a.length === 0) || e != null && e.length > 0 || t != null && t.length > 0 || r != null);
|
|
2955
2955
|
}
|
|
2956
|
-
class
|
|
2956
|
+
class ts {
|
|
2957
2957
|
constructor() {
|
|
2958
2958
|
A(this, "pattern", "");
|
|
2959
2959
|
}
|
|
@@ -3020,13 +3020,13 @@ function Bo(i, a, e, t, r) {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
3022
|
var zt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i))(zt || {}), je = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.MIN = 1] = "MIN", i[i.MAX = 2] = "MAX", i))(je || {});
|
|
3023
|
-
function
|
|
3023
|
+
function wn() {
|
|
3024
3024
|
return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
|
|
3025
3025
|
}
|
|
3026
3026
|
function ko(i) {
|
|
3027
3027
|
return i.indexOf("*") > -1 || i.indexOf("?") > -1;
|
|
3028
3028
|
}
|
|
3029
|
-
function
|
|
3029
|
+
function Vs(i, a) {
|
|
3030
3030
|
const e = ff(a).replace(/~?[*?]/g, (r) => r.startsWith("~") ? `\\${r.substring(1)}` : r === "*" ? ".*" : r === "?" ? "." : r);
|
|
3031
3031
|
return new RegExp(`^${e}$`).test(i);
|
|
3032
3032
|
}
|
|
@@ -3037,14 +3037,14 @@ function lf(i, a, e) {
|
|
|
3037
3037
|
let t = !1;
|
|
3038
3038
|
switch (e) {
|
|
3039
3039
|
case Y.EQUALS:
|
|
3040
|
-
t =
|
|
3040
|
+
t = Vs(i, a);
|
|
3041
3041
|
break;
|
|
3042
3042
|
case Y.NOT_EQUAL:
|
|
3043
|
-
t = !
|
|
3043
|
+
t = !Vs(i, a);
|
|
3044
3044
|
break;
|
|
3045
3045
|
case Y.GREATER_THAN:
|
|
3046
3046
|
case Y.GREATER_THAN_OR_EQUAL:
|
|
3047
|
-
t =
|
|
3047
|
+
t = Vs(i, a) || i > Mi(a);
|
|
3048
3048
|
break;
|
|
3049
3049
|
case Y.LESS_THAN:
|
|
3050
3050
|
case Y.LESS_THAN_OR_EQUAL:
|
|
@@ -3056,7 +3056,7 @@ function lf(i, a, e) {
|
|
|
3056
3056
|
function ff(i) {
|
|
3057
3057
|
return i.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
3058
3058
|
}
|
|
3059
|
-
function
|
|
3059
|
+
function Ws(i) {
|
|
3060
3060
|
switch (i) {
|
|
3061
3061
|
case 1:
|
|
3062
3062
|
return 2;
|
|
@@ -3068,7 +3068,7 @@ function Gs(i) {
|
|
|
3068
3068
|
return 0;
|
|
3069
3069
|
}
|
|
3070
3070
|
}
|
|
3071
|
-
function
|
|
3071
|
+
function Qs(i) {
|
|
3072
3072
|
return i === -2 ? 1 : 0;
|
|
3073
3073
|
}
|
|
3074
3074
|
const mf = [
|
|
@@ -3128,16 +3128,16 @@ function Xy(i, a, e) {
|
|
|
3128
3128
|
const o = n || s;
|
|
3129
3129
|
return r.n.pattern = o, a;
|
|
3130
3130
|
}
|
|
3131
|
-
const
|
|
3131
|
+
const qs = new jt(1e5);
|
|
3132
3132
|
function Si(i) {
|
|
3133
|
-
const a =
|
|
3133
|
+
const a = qs.get(i);
|
|
3134
3134
|
if (a !== void 0)
|
|
3135
3135
|
return a;
|
|
3136
3136
|
const e = df(i);
|
|
3137
|
-
return
|
|
3137
|
+
return qs.set(i, e), e;
|
|
3138
3138
|
}
|
|
3139
3139
|
function gf() {
|
|
3140
|
-
|
|
3140
|
+
qs.clear();
|
|
3141
3141
|
}
|
|
3142
3142
|
function df(i) {
|
|
3143
3143
|
if (Cf(i))
|
|
@@ -3148,7 +3148,7 @@ function df(i) {
|
|
|
3148
3148
|
function Cf(i) {
|
|
3149
3149
|
return !!mf.find((a) => i.includes(a)) && i.startsWith("_(");
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3151
|
+
function cn(i, a, e) {
|
|
3152
3152
|
if (i === "")
|
|
3153
3153
|
return a;
|
|
3154
3154
|
if (a === "")
|
|
@@ -3193,16 +3193,16 @@ function Ef(i) {
|
|
|
3193
3193
|
};
|
|
3194
3194
|
const t = yt.parseNumber(a);
|
|
3195
3195
|
if (t && t.z)
|
|
3196
|
-
return
|
|
3196
|
+
return Os(a, t.v, t.z);
|
|
3197
3197
|
const r = yt.parseDate(a);
|
|
3198
3198
|
if (r && r.z)
|
|
3199
|
-
return
|
|
3199
|
+
return Os(a, r.v, r.z);
|
|
3200
3200
|
const n = yt.parseTime(a);
|
|
3201
|
-
return n && n.z ?
|
|
3201
|
+
return n && n.z ? Os(a, n.v, n.z) : {
|
|
3202
3202
|
isNumberPattern: !1
|
|
3203
3203
|
};
|
|
3204
3204
|
}
|
|
3205
|
-
function
|
|
3205
|
+
function Os(i, a, e) {
|
|
3206
3206
|
return Na.set(i, {
|
|
3207
3207
|
value: a,
|
|
3208
3208
|
pattern: e
|
|
@@ -3215,7 +3215,7 @@ function Vs(i, a, e) {
|
|
|
3215
3215
|
function Rf() {
|
|
3216
3216
|
Na.clear();
|
|
3217
3217
|
}
|
|
3218
|
-
class Qt extends
|
|
3218
|
+
class Qt extends ts {
|
|
3219
3219
|
constructor(e) {
|
|
3220
3220
|
super();
|
|
3221
3221
|
A(this, "_customData");
|
|
@@ -3519,17 +3519,17 @@ class Qt extends es {
|
|
|
3519
3519
|
return g.create(h.VALUE);
|
|
3520
3520
|
}
|
|
3521
3521
|
}
|
|
3522
|
-
const yf = 1e3,
|
|
3522
|
+
const yf = 1e3, Xs = new jt(yf);
|
|
3523
3523
|
class g extends Qt {
|
|
3524
3524
|
constructor(a, e = "") {
|
|
3525
3525
|
super(a), this._errorType = a, this._errorContent = e;
|
|
3526
3526
|
}
|
|
3527
3527
|
static create(a, e = "") {
|
|
3528
|
-
const t = `${a}-${e}`, r =
|
|
3528
|
+
const t = `${a}-${e}`, r = Xs.get(t);
|
|
3529
3529
|
if (r)
|
|
3530
3530
|
return r;
|
|
3531
3531
|
const n = new g(a, e);
|
|
3532
|
-
return
|
|
3532
|
+
return Xs.set(t, n), n;
|
|
3533
3533
|
}
|
|
3534
3534
|
getValue() {
|
|
3535
3535
|
return this._errorType;
|
|
@@ -3571,7 +3571,7 @@ function Va(i) {
|
|
|
3571
3571
|
}
|
|
3572
3572
|
return a;
|
|
3573
3573
|
}
|
|
3574
|
-
var
|
|
3574
|
+
var dr = 9e15, qt = 1e9, Ks = "0123456789abcdef", Ln = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", Pn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Zs = {
|
|
3575
3575
|
// These values must be integers within the stated ranges (inclusive).
|
|
3576
3576
|
// Most of these values can be changed at run-time using the `Decimal.config` method.
|
|
3577
3577
|
// The maximum number of significant digits of the result of a calculation or base conversion.
|
|
@@ -3620,16 +3620,16 @@ var gr = 9e15, qt = 1e9, Xs = "0123456789abcdef", wn = "2.3025850929940456840179
|
|
|
3620
3620
|
// 0 to EXP_LIMIT
|
|
3621
3621
|
// The minimum exponent value, beneath which underflow to zero occurs.
|
|
3622
3622
|
// JavaScript numbers: -324 (5e-324)
|
|
3623
|
-
minE: -
|
|
3623
|
+
minE: -dr,
|
|
3624
3624
|
// -1 to -EXP_LIMIT
|
|
3625
3625
|
// The maximum exponent value, above which overflow to Infinity occurs.
|
|
3626
3626
|
// JavaScript numbers: 308 (1.7976931348623157e+308)
|
|
3627
|
-
maxE:
|
|
3627
|
+
maxE: dr,
|
|
3628
3628
|
// 1 to EXP_LIMIT
|
|
3629
3629
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
3630
3630
|
crypto: !1
|
|
3631
3631
|
// true/false
|
|
3632
|
-
}, $o, Pt, ue = !0,
|
|
3632
|
+
}, $o, Pt, ue = !0, rs = "[DecimalError] ", Ht = rs + "Invalid argument: ", Yo = rs + "Precision limit exceeded", Ho = rs + "crypto unavailable", Go = "[object Decimal]", $e = Math.floor, Ue = Math.pow, bf = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, pf = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Nf = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Wo = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ht = 1e7, se = 7, Vf = 9007199254740991, Of = Ln.length - 1, zs = Pn.length - 1, F = { toStringTag: Go };
|
|
3633
3633
|
F.absoluteValue = F.abs = function() {
|
|
3634
3634
|
var i = new this.constructor(this);
|
|
3635
3635
|
return i.s < 0 && (i.s = 1), te(i);
|
|
@@ -3707,7 +3707,7 @@ F.hyperbolicCosine = F.cosh = function() {
|
|
|
3707
3707
|
var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
|
|
3708
3708
|
if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
|
|
3709
3709
|
if (n.isZero()) return o;
|
|
3710
|
-
e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 /
|
|
3710
|
+
e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 / ss(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Nr(s, 1, n.times(a), new s(1), !0);
|
|
3711
3711
|
for (var u, c = i, l = new s(8); c--; )
|
|
3712
3712
|
u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
|
|
3713
3713
|
return te(n, s.precision = e, s.rounding = t, !0);
|
|
@@ -3716,9 +3716,9 @@ F.hyperbolicSine = F.sinh = function() {
|
|
|
3716
3716
|
var i, a, e, t, r = this, n = r.constructor;
|
|
3717
3717
|
if (!r.isFinite() || r.isZero()) return new n(r);
|
|
3718
3718
|
if (a = n.precision, e = n.rounding, n.precision = a + Math.max(r.e, r.sd()) + 4, n.rounding = 1, t = r.d.length, t < 3)
|
|
3719
|
-
r =
|
|
3719
|
+
r = Nr(n, 2, r, r, !0);
|
|
3720
3720
|
else {
|
|
3721
|
-
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 /
|
|
3721
|
+
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / ss(5, i)), r = Nr(n, 2, r, r, !0);
|
|
3722
3722
|
for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
|
|
3723
3723
|
s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
|
|
3724
3724
|
}
|
|
@@ -3753,11 +3753,11 @@ F.inverseTangent = F.atan = function() {
|
|
|
3753
3753
|
if (c.isFinite()) {
|
|
3754
3754
|
if (c.isZero())
|
|
3755
3755
|
return new l(c);
|
|
3756
|
-
if (c.abs().eq(1) && f + 4 <=
|
|
3756
|
+
if (c.abs().eq(1) && f + 4 <= zs)
|
|
3757
3757
|
return s = Rt(l, f + 4, m).times(0.25), s.s = c.s, s;
|
|
3758
3758
|
} else {
|
|
3759
3759
|
if (!c.s) return new l(NaN);
|
|
3760
|
-
if (f + 4 <=
|
|
3760
|
+
if (f + 4 <= zs)
|
|
3761
3761
|
return s = Rt(l, f + 4, m).times(0.5), s.s = c.s, s;
|
|
3762
3762
|
}
|
|
3763
3763
|
for (l.precision = o = f + 10, l.rounding = 1, e = Math.min(28, o / se + 2 | 0), i = e; i; --i) c = c.div(c.times(c).plus(1).sqrt().plus(1));
|
|
@@ -3806,13 +3806,13 @@ F.logarithm = F.log = function(i) {
|
|
|
3806
3806
|
for (r = e[0]; r % 10 === 0; ) r /= 10;
|
|
3807
3807
|
n = r !== 1;
|
|
3808
3808
|
}
|
|
3809
|
-
if (ue = !1, o = f + d, s = Ft(c, o), t = a ?
|
|
3809
|
+
if (ue = !1, o = f + d, s = Ft(c, o), t = a ? xn(l, o + 10) : Ft(i, o), u = Oe(s, t, o, 1), Yr(u.d, r = f, m))
|
|
3810
3810
|
do
|
|
3811
|
-
if (o += 10, s = Ft(c, o), t = a ?
|
|
3811
|
+
if (o += 10, s = Ft(c, o), t = a ? xn(l, o + 10) : Ft(i, o), u = Oe(s, t, o, 1), !n) {
|
|
3812
3812
|
+Ie(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = te(u, f + 1, 0));
|
|
3813
3813
|
break;
|
|
3814
3814
|
}
|
|
3815
|
-
while (
|
|
3815
|
+
while (Yr(u.d, r += 10, m));
|
|
3816
3816
|
return ue = !0, te(u, f, m);
|
|
3817
3817
|
};
|
|
3818
3818
|
F.minus = F.sub = function(i) {
|
|
@@ -3848,14 +3848,14 @@ F.minus = F.sub = function(i) {
|
|
|
3848
3848
|
}
|
|
3849
3849
|
for (; c[--s] === 0; ) c.pop();
|
|
3850
3850
|
for (; c[0] === 0; c.shift()) --e;
|
|
3851
|
-
return c[0] ? (i.d = c, i.e =
|
|
3851
|
+
return c[0] ? (i.d = c, i.e = ns(c, e), ue ? te(i, o, u) : i) : new _(u === 3 ? -0 : 0);
|
|
3852
3852
|
};
|
|
3853
3853
|
F.modulo = F.mod = function(i) {
|
|
3854
3854
|
var a, e = this, t = e.constructor;
|
|
3855
3855
|
return i = new t(i), !e.d || !i.s || i.d && !i.d[0] ? new t(NaN) : !i.d || e.d && !e.d[0] ? te(new t(e), t.precision, t.rounding) : (ue = !1, t.modulo == 9 ? (a = Oe(e, i.abs(), 0, 3, 1), a.s *= i.s) : a = Oe(e, i, 0, t.modulo, 1), a = a.times(i), ue = !0, e.minus(a));
|
|
3856
3856
|
};
|
|
3857
3857
|
F.naturalExponential = F.exp = function() {
|
|
3858
|
-
return
|
|
3858
|
+
return Js(this);
|
|
3859
3859
|
};
|
|
3860
3860
|
F.naturalLogarithm = F.ln = function() {
|
|
3861
3861
|
return Ft(this);
|
|
@@ -3879,7 +3879,7 @@ F.plus = F.add = function(i) {
|
|
|
3879
3879
|
for (s = c.length, r = l.length, s - r < 0 && (r = s, e = l, l = c, c = e), a = 0; r; )
|
|
3880
3880
|
a = (c[--r] = c[r] + l[r] + a) / ht | 0, c[r] %= ht;
|
|
3881
3881
|
for (a && (c.unshift(a), ++t), s = c.length; c[--s] == 0; ) c.pop();
|
|
3882
|
-
return i.d = c, i.e =
|
|
3882
|
+
return i.d = c, i.e = ns(c, t), ue ? te(i, o, u) : i;
|
|
3883
3883
|
};
|
|
3884
3884
|
F.precision = F.sd = function(i) {
|
|
3885
3885
|
var a, e = this;
|
|
@@ -3927,7 +3927,7 @@ F.times = F.mul = function(i) {
|
|
|
3927
3927
|
n[r] = (n[r] + a) % ht | 0;
|
|
3928
3928
|
}
|
|
3929
3929
|
for (; !n[--s]; ) n.pop();
|
|
3930
|
-
return a ? ++e : n.shift(), i.d = n, i.e =
|
|
3930
|
+
return a ? ++e : n.shift(), i.d = n, i.e = ns(n, e), ue ? te(i, f.precision, f.rounding) : i;
|
|
3931
3931
|
};
|
|
3932
3932
|
F.toBinary = function(i, a) {
|
|
3933
3933
|
return Oa(this, 2, i, a);
|
|
@@ -3990,7 +3990,7 @@ F.toPower = F.pow = function(i) {
|
|
|
3990
3990
|
if ((i.d[a] & 1) == 0 && (s = 1), o.e == 0 && o.d[0] == 1 && o.d.length == 1)
|
|
3991
3991
|
return o.s = s, o;
|
|
3992
3992
|
}
|
|
3993
|
-
return e = Ue(+o, c), a = e == 0 || !isFinite(e) ? $e(c * (Math.log("0." + Ie(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) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r =
|
|
3993
|
+
return e = Ue(+o, c), a = e == 0 || !isFinite(e) ? $e(c * (Math.log("0." + Ie(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) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = Js(i.times(Ft(o, t + e)), t), r.d && (r = te(r, t + 5, 1), Yr(r.d, t, n) && (a = t + 10, r = te(Js(i.times(Ft(o, a + e)), a), a + 5, 1), +Ie(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = te(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, te(r, t, n));
|
|
3994
3994
|
};
|
|
3995
3995
|
F.toPrecision = function(i, a) {
|
|
3996
3996
|
var e, t = this, r = t.constructor;
|
|
@@ -4026,15 +4026,15 @@ function Qe(i, a, e) {
|
|
|
4026
4026
|
if (i !== ~~i || i < a || i > e)
|
|
4027
4027
|
throw Error(Ht + i);
|
|
4028
4028
|
}
|
|
4029
|
-
function
|
|
4029
|
+
function Yr(i, a, e, t) {
|
|
4030
4030
|
var r, n, s, o;
|
|
4031
4031
|
for (n = i[0]; n >= 10; n /= 10) --a;
|
|
4032
4032
|
return --a < 0 ? (a += se, r = 0) : (r = Math.ceil((a + 1) / se), a %= se), n = Ue(10, se - a), o = i[r] % n | 0, t == null ? a < 3 ? (a == 0 ? o = o / 100 | 0 : a == 1 && (o = o / 10 | 0), s = e < 4 && o == 99999 || e > 3 && o == 49999 || o == 5e4 || o == 0) : s = (e < 4 && o + 1 == n || e > 3 && o + 1 == n / 2) && (i[r + 1] / n / 100 | 0) == Ue(10, a - 2) - 1 || (o == n / 2 || o == 0) && (i[r + 1] / n / 100 | 0) == 0 : a < 4 ? (a == 0 ? o = o / 1e3 | 0 : a == 1 ? o = o / 100 | 0 : a == 2 && (o = o / 10 | 0), s = (t || e < 4) && o == 9999 || !t && e > 3 && o == 4999) : s = ((t || e < 4) && o + 1 == n || !t && e > 3 && o + 1 == n / 2) && (i[r + 1] / n / 1e3 | 0) == Ue(10, a - 3) - 1, s;
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function bn(i, a, e) {
|
|
4035
4035
|
for (var t, r = [0], n, s = 0, o = i.length; s < o; ) {
|
|
4036
4036
|
for (n = r.length; n--; ) r[n] *= a;
|
|
4037
|
-
for (r[0] +=
|
|
4037
|
+
for (r[0] += Ks.indexOf(i.charAt(s++)), t = 0; t < r.length; t++)
|
|
4038
4038
|
r[t] > e - 1 && (r[t + 1] === void 0 && (r[t + 1] = 0), r[t + 1] += r[t] / e | 0, r[t] %= e);
|
|
4039
4039
|
}
|
|
4040
4040
|
return r.reverse();
|
|
@@ -4042,7 +4042,7 @@ function yn(i, a, e) {
|
|
|
4042
4042
|
function Mf(i, a) {
|
|
4043
4043
|
var e, t, r;
|
|
4044
4044
|
if (a.isZero()) return a;
|
|
4045
|
-
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 /
|
|
4045
|
+
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / ss(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Nr(i, 1, a.times(r), new i(1));
|
|
4046
4046
|
for (var n = e; n--; ) {
|
|
4047
4047
|
var s = a.times(a);
|
|
4048
4048
|
a = s.times(s).minus(s).times(8).plus(1);
|
|
@@ -4150,19 +4150,19 @@ function pt(i, a, e) {
|
|
|
4150
4150
|
var t, r = i.e, n = Ie(i.d), s = n.length;
|
|
4151
4151
|
return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + vt(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + vt(-r - 1) + n, e && (t = e - s) > 0 && (n += vt(t))) : r >= s ? (n += vt(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + vt(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += vt(t))), n;
|
|
4152
4152
|
}
|
|
4153
|
-
function
|
|
4153
|
+
function ns(i, a) {
|
|
4154
4154
|
var e = i[0];
|
|
4155
4155
|
for (a *= se; e >= 10; e /= 10) a++;
|
|
4156
4156
|
return a;
|
|
4157
4157
|
}
|
|
4158
|
-
function
|
|
4158
|
+
function xn(i, a, e) {
|
|
4159
4159
|
if (a > Of)
|
|
4160
4160
|
throw ue = !0, e && (i.precision = e), Error(Yo);
|
|
4161
|
-
return te(new i(
|
|
4161
|
+
return te(new i(Ln), a, 1, !0);
|
|
4162
4162
|
}
|
|
4163
4163
|
function Rt(i, a, e) {
|
|
4164
|
-
if (a >
|
|
4165
|
-
return te(new i(
|
|
4164
|
+
if (a > zs) throw Error(Yo);
|
|
4165
|
+
return te(new i(Pn), a, e, !0);
|
|
4166
4166
|
}
|
|
4167
4167
|
function Qo(i) {
|
|
4168
4168
|
var a = i.length - 1, e = a * se + 1;
|
|
@@ -4200,7 +4200,7 @@ function Xo(i, a, e) {
|
|
|
4200
4200
|
}
|
|
4201
4201
|
return n;
|
|
4202
4202
|
}
|
|
4203
|
-
function
|
|
4203
|
+
function Js(i, a) {
|
|
4204
4204
|
var e, t, r, n, s, o, u, c = 0, l = 0, f = 0, m = i.constructor, d = m.rounding, _ = m.precision;
|
|
4205
4205
|
if (!i.d || !i.d[0] || i.e > 17)
|
|
4206
4206
|
return new m(i.d ? i.d[0] ? i.s < 0 ? 0 : 1 / 0 : 1 : i.s ? i.s < 0 ? 0 : i : NaN);
|
|
@@ -4210,7 +4210,7 @@ function zs(i, a) {
|
|
|
4210
4210
|
if (n = te(n.times(i), u, 1), e = e.times(++l), o = s.plus(Oe(n, e, u, 1)), Ie(o.d).slice(0, u) === Ie(s.d).slice(0, u)) {
|
|
4211
4211
|
for (r = f; r--; ) s = te(s.times(s), u, 1);
|
|
4212
4212
|
if (a == null)
|
|
4213
|
-
if (c < 3 &&
|
|
4213
|
+
if (c < 3 && Yr(s.d, u - t, d, c))
|
|
4214
4214
|
m.precision = u += 10, e = n = o = new m(1), l = 0, c++;
|
|
4215
4215
|
else
|
|
4216
4216
|
return te(s, m.precision = _, d, ue = !0);
|
|
@@ -4229,11 +4229,11 @@ function Ft(i, a) {
|
|
|
4229
4229
|
C = C.times(i), e = Ie(C.d), t = e.charAt(0), d++;
|
|
4230
4230
|
n = C.e, t > 1 ? (C = new R("0." + e), n++) : C = new R(t + "." + e.slice(1));
|
|
4231
4231
|
} else
|
|
4232
|
-
return c =
|
|
4232
|
+
return c = xn(R, l + 2, p).times(n + ""), C = Ft(new R(t + "." + e.slice(1)), l - _).plus(c), R.precision = p, a == null ? te(C, p, y, ue = !0) : C;
|
|
4233
4233
|
for (f = C, u = s = C = Oe(C.minus(1), C.plus(1), l, 1), m = te(C.times(C), l, 1), r = 3; ; ) {
|
|
4234
4234
|
if (s = te(s.times(m), l, 1), c = u.plus(Oe(s, new R(r), l, 1)), Ie(c.d).slice(0, l) === Ie(u.d).slice(0, l))
|
|
4235
|
-
if (u = u.times(2), n !== 0 && (u = u.plus(
|
|
4236
|
-
if (
|
|
4235
|
+
if (u = u.times(2), n !== 0 && (u = u.plus(xn(R, l + 2, p).times(n + ""))), u = Oe(u, new R(d), l, 1), a == null)
|
|
4236
|
+
if (Yr(u.d, l - _, y, o))
|
|
4237
4237
|
R.precision = l += _, c = s = C = Oe(f.minus(1), f.plus(1), l, 1), m = te(C.times(C), l, 1), r = o = 1;
|
|
4238
4238
|
else
|
|
4239
4239
|
return te(u, R.precision = p, y, ue = !0);
|
|
@@ -4245,7 +4245,7 @@ function Ft(i, a) {
|
|
|
4245
4245
|
function Ko(i) {
|
|
4246
4246
|
return String(i.s * i.s / 0);
|
|
4247
4247
|
}
|
|
4248
|
-
function
|
|
4248
|
+
function pn(i, a) {
|
|
4249
4249
|
var e, t, r;
|
|
4250
4250
|
for ((e = a.indexOf(".")) > -1 && (a = a.replace(".", "")), (t = a.search(/e/i)) > 0 ? (e < 0 && (e = t), e += +a.slice(t + 1), a = a.substring(0, t)) : e < 0 && (e = a.length), t = 0; a.charCodeAt(t) === 48; t++) ;
|
|
4251
4251
|
for (r = a.length; a.charCodeAt(r - 1) === 48; --r) ;
|
|
@@ -4264,7 +4264,7 @@ function bn(i, a) {
|
|
|
4264
4264
|
function Sf(i, a) {
|
|
4265
4265
|
var e, t, r, n, s, o, u, c, l;
|
|
4266
4266
|
if (a.indexOf("_") > -1) {
|
|
4267
|
-
if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Wo.test(a)) return
|
|
4267
|
+
if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Wo.test(a)) return pn(i, a);
|
|
4268
4268
|
} else if (a === "Infinity" || a === "NaN")
|
|
4269
4269
|
return +a || (i.s = NaN), i.e = NaN, i.d = null, i;
|
|
4270
4270
|
if (pf.test(a))
|
|
@@ -4275,19 +4275,19 @@ function Sf(i, a) {
|
|
|
4275
4275
|
e = 8;
|
|
4276
4276
|
else
|
|
4277
4277
|
throw Error(Ht + a);
|
|
4278
|
-
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 = qo(t, new t(e), n, n * 2)), c =
|
|
4279
|
-
return n < 0 ? new t(i.s * 0) : (i.e =
|
|
4278
|
+
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 = qo(t, new t(e), n, n * 2)), c = bn(a, e, ht), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
|
|
4279
|
+
return n < 0 ? new t(i.s * 0) : (i.e = ns(c, l), i.d = c, ue = !1, s && (i = Oe(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Ue(2, u) : x.pow(2, u))), ue = !0, i);
|
|
4280
4280
|
}
|
|
4281
4281
|
function Df(i, a) {
|
|
4282
4282
|
var e, t = a.d.length;
|
|
4283
4283
|
if (t < 3)
|
|
4284
|
-
return a.isZero() ? a :
|
|
4285
|
-
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 /
|
|
4284
|
+
return a.isZero() ? a : Nr(i, 2, a, a);
|
|
4285
|
+
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / ss(5, e)), a = Nr(i, 2, a, a);
|
|
4286
4286
|
for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
|
|
4287
4287
|
r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
|
|
4288
4288
|
return a;
|
|
4289
4289
|
}
|
|
4290
|
-
function
|
|
4290
|
+
function Nr(i, a, e, t, r) {
|
|
4291
4291
|
var n, s, o, u, c = i.precision, l = Math.ceil(c / se);
|
|
4292
4292
|
for (ue = !1, u = e.times(e), o = new i(t); ; ) {
|
|
4293
4293
|
if (s = Oe(o.times(u), new i(a++ * a++), c, 1), o = r ? t.plus(s) : t.minus(s), t = Oe(s.times(u), new i(a++ * a++), c, 1), s = o.plus(t), s.d[l] !== void 0) {
|
|
@@ -4298,7 +4298,7 @@ function pr(i, a, e, t, r) {
|
|
|
4298
4298
|
}
|
|
4299
4299
|
return ue = !0, s.d.length = l + 1, s;
|
|
4300
4300
|
}
|
|
4301
|
-
function
|
|
4301
|
+
function ss(i, a) {
|
|
4302
4302
|
for (var e = i; --a; ) e *= i;
|
|
4303
4303
|
return e;
|
|
4304
4304
|
}
|
|
@@ -4320,7 +4320,7 @@ function Oa(i, a, e, t) {
|
|
|
4320
4320
|
if (_ ? (Qe(e, 1, qt), t === void 0 ? t = d.rounding : Qe(t, 0, 8)) : (e = d.precision, t = d.rounding), !i.isFinite())
|
|
4321
4321
|
l = Ko(i);
|
|
4322
4322
|
else {
|
|
4323
|
-
for (l = pt(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(".", ""), m = new d(1), m.e = l.length - s, m.d =
|
|
4323
|
+
for (l = pt(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(".", ""), m = new d(1), m.e = l.length - s, m.d = bn(pt(m), 10, r), m.e = m.d.length), f = bn(l, 10, r), n = u = f.length; f[--u] == 0; ) f.pop();
|
|
4324
4324
|
if (!f[0])
|
|
4325
4325
|
l = _ ? "0p+0" : "0";
|
|
4326
4326
|
else {
|
|
@@ -4328,13 +4328,13 @@ function Oa(i, a, e, t) {
|
|
|
4328
4328
|
for (; ++f[--e] > r - 1; )
|
|
4329
4329
|
f[e] = 0, e || (++n, f.unshift(1));
|
|
4330
4330
|
for (u = f.length; !f[u - 1]; --u) ;
|
|
4331
|
-
for (s = 0, l = ""; s < u; s++) l +=
|
|
4331
|
+
for (s = 0, l = ""; s < u; s++) l += Ks.charAt(f[s]);
|
|
4332
4332
|
if (_) {
|
|
4333
4333
|
if (u > 1)
|
|
4334
4334
|
if (a == 16 || a == 8) {
|
|
4335
4335
|
for (s = a == 16 ? 4 : 3, --u; u % s; u++) l += "0";
|
|
4336
|
-
for (f =
|
|
4337
|
-
for (s = 1, l = "1."; s < u; s++) l +=
|
|
4336
|
+
for (f = bn(l, r, a), u = f.length; !f[u - 1]; --u) ;
|
|
4337
|
+
for (s = 1, l = "1."; s < u; s++) l += Ks.charAt(f[s]);
|
|
4338
4338
|
} else
|
|
4339
4339
|
l = l.charAt(0) + "." + l.slice(1);
|
|
4340
4340
|
l = l + (n < 0 ? "p" : "p+") + n;
|
|
@@ -4391,7 +4391,7 @@ function kf(i, a, e) {
|
|
|
4391
4391
|
return new this(i).clamp(a, e);
|
|
4392
4392
|
}
|
|
4393
4393
|
function $f(i) {
|
|
4394
|
-
if (!i || typeof i != "object") throw Error(
|
|
4394
|
+
if (!i || typeof i != "object") throw Error(rs + "Object expected");
|
|
4395
4395
|
var a, e, t, r = i.defaults === !0, n = [
|
|
4396
4396
|
"precision",
|
|
4397
4397
|
1,
|
|
@@ -4400,26 +4400,26 @@ function $f(i) {
|
|
|
4400
4400
|
0,
|
|
4401
4401
|
8,
|
|
4402
4402
|
"toExpNeg",
|
|
4403
|
-
-
|
|
4403
|
+
-dr,
|
|
4404
4404
|
0,
|
|
4405
4405
|
"toExpPos",
|
|
4406
4406
|
0,
|
|
4407
|
-
|
|
4407
|
+
dr,
|
|
4408
4408
|
"maxE",
|
|
4409
4409
|
0,
|
|
4410
|
-
|
|
4410
|
+
dr,
|
|
4411
4411
|
"minE",
|
|
4412
|
-
-
|
|
4412
|
+
-dr,
|
|
4413
4413
|
0,
|
|
4414
4414
|
"modulo",
|
|
4415
4415
|
0,
|
|
4416
4416
|
9
|
|
4417
4417
|
];
|
|
4418
4418
|
for (a = 0; a < n.length; a += 3)
|
|
4419
|
-
if (e = n[a], r && (this[e] =
|
|
4419
|
+
if (e = n[a], r && (this[e] = Zs[e]), (t = i[e]) !== void 0)
|
|
4420
4420
|
if ($e(t) === t && t >= n[a + 1] && t <= n[a + 2]) this[e] = t;
|
|
4421
4421
|
else throw Error(Ht + e + ": " + t);
|
|
4422
|
-
if (e = "crypto", r && (this[e] =
|
|
4422
|
+
if (e = "crypto", r && (this[e] = Zs[e]), (t = i[e]) !== void 0)
|
|
4423
4423
|
if (t === !0 || t === !1 || t === 0 || t === 1)
|
|
4424
4424
|
if (t)
|
|
4425
4425
|
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
@@ -4461,12 +4461,12 @@ function zo(i) {
|
|
|
4461
4461
|
n || (c.s = NaN), c.e = NaN, c.d = null;
|
|
4462
4462
|
return;
|
|
4463
4463
|
}
|
|
4464
|
-
return
|
|
4464
|
+
return pn(c, n.toString());
|
|
4465
4465
|
}
|
|
4466
4466
|
if (u === "string")
|
|
4467
|
-
return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), Wo.test(n) ?
|
|
4467
|
+
return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), Wo.test(n) ? pn(c, n) : Sf(c, n);
|
|
4468
4468
|
if (u === "bigint")
|
|
4469
|
-
return n < 0 ? (n = -n, c.s = -1) : c.s = 1,
|
|
4469
|
+
return n < 0 ? (n = -n, c.s = -1) : c.s = 1, pn(c, n.toString());
|
|
4470
4470
|
throw Error(Ht + n);
|
|
4471
4471
|
}
|
|
4472
4472
|
if (r.prototype = F, 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 = $f, r.clone = zo, r.isDecimal = Pi, r.abs = wf, r.acos = Lf, r.acosh = Pf, r.add = xf, r.asin = jf, r.asinh = Uf, r.atan = Tf, r.atanh = vf, r.atan2 = If, r.cbrt = Ff, r.ceil = Bf, r.clamp = kf, r.cos = Yf, r.cosh = Hf, r.div = Gf, r.exp = Wf, r.floor = Qf, r.hypot = qf, r.ln = Xf, r.log = Kf, r.log10 = zf, r.log2 = Zf, r.max = Jf, r.min = em, r.mod = tm, r.mul = rm, r.pow = nm, r.random = sm, r.round = am, r.sign = im, r.sin = om, r.sinh = um, r.sqrt = cm, r.sub = lm, r.sum = fm, r.tan = mm, r.tanh = hm, r.trunc = gm, i === void 0 && (i = {}), i && i.defaults !== !0)
|
|
@@ -4581,9 +4581,9 @@ function gm(i) {
|
|
|
4581
4581
|
}
|
|
4582
4582
|
F[Symbol.for("nodejs.util.inspect.custom")] = F.toString;
|
|
4583
4583
|
F[Symbol.toStringTag] = "Decimal";
|
|
4584
|
-
var x = F.constructor = zo(
|
|
4585
|
-
wn = new x(wn);
|
|
4584
|
+
var x = F.constructor = zo(Zs);
|
|
4586
4585
|
Ln = new x(Ln);
|
|
4586
|
+
Pn = new x(Pn);
|
|
4587
4587
|
function dm(i, a) {
|
|
4588
4588
|
const e = i + a;
|
|
4589
4589
|
return Number.isSafeInteger(e) ? e : new x(i).add(a).toNumber();
|
|
@@ -4592,7 +4592,7 @@ function Cm(i, a) {
|
|
|
4592
4592
|
const e = i - a;
|
|
4593
4593
|
return Number.isSafeInteger(e) ? e : new x(i).sub(a).toNumber();
|
|
4594
4594
|
}
|
|
4595
|
-
function
|
|
4595
|
+
function xr(i, a) {
|
|
4596
4596
|
const e = i * a;
|
|
4597
4597
|
return Number.isSafeInteger(e) ? e : new x(i).mul(a).toNumber();
|
|
4598
4598
|
}
|
|
@@ -4601,19 +4601,19 @@ function _m(i, a) {
|
|
|
4601
4601
|
return Number.isSafeInteger(e) ? e : new x(i).div(a).toNumber();
|
|
4602
4602
|
}
|
|
4603
4603
|
function kt(i, a) {
|
|
4604
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4605
|
-
return Math.round(
|
|
4604
|
+
const e = 10 ** Math.trunc(a), t = as(i, e);
|
|
4605
|
+
return Math.round(xr(i, e) + t) / e;
|
|
4606
4606
|
}
|
|
4607
4607
|
function Ze(i, a) {
|
|
4608
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4609
|
-
return Math.floor(
|
|
4608
|
+
const e = 10 ** Math.trunc(a), t = as(i, e);
|
|
4609
|
+
return Math.floor(xr(i, e) + t) / e;
|
|
4610
4610
|
}
|
|
4611
4611
|
function We(i, a) {
|
|
4612
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4613
|
-
return Math.ceil(
|
|
4612
|
+
const e = 10 ** Math.trunc(a), t = as(i, e);
|
|
4613
|
+
return Math.ceil(xr(i, e) - t) / e;
|
|
4614
4614
|
}
|
|
4615
|
-
function
|
|
4616
|
-
return Number.EPSILON * Math.max(1, Math.abs(
|
|
4615
|
+
function as(i, a) {
|
|
4616
|
+
return Number.EPSILON * Math.max(1, Math.abs(xr(i, a)));
|
|
4617
4617
|
}
|
|
4618
4618
|
function xi(i, a) {
|
|
4619
4619
|
return i - a * Math.floor(i / a);
|
|
@@ -4652,9 +4652,9 @@ function Ma(i, a = 12, e = 1e-10) {
|
|
|
4652
4652
|
function Vm(i) {
|
|
4653
4653
|
return i - Math.trunc(i);
|
|
4654
4654
|
}
|
|
4655
|
-
const
|
|
4655
|
+
const zn = class zn extends Qt {
|
|
4656
4656
|
static create() {
|
|
4657
|
-
return this._instance = this._instance || new
|
|
4657
|
+
return this._instance = this._instance || new zn(0), this._instance;
|
|
4658
4658
|
}
|
|
4659
4659
|
isNull() {
|
|
4660
4660
|
return !0;
|
|
@@ -4774,8 +4774,8 @@ const Zn = class Zn extends Qt {
|
|
|
4774
4774
|
return v.create(!1);
|
|
4775
4775
|
}
|
|
4776
4776
|
};
|
|
4777
|
-
A(
|
|
4778
|
-
let ce =
|
|
4777
|
+
A(zn, "_instance");
|
|
4778
|
+
let ce = zn;
|
|
4779
4779
|
const Jt = class Jt extends Qt {
|
|
4780
4780
|
constructor(e) {
|
|
4781
4781
|
super(e);
|
|
@@ -4920,7 +4920,7 @@ const Jt = class Jt extends Qt {
|
|
|
4920
4920
|
return this._convertToNumber().ceil(e);
|
|
4921
4921
|
}
|
|
4922
4922
|
convertToNumberObjectValue() {
|
|
4923
|
-
return
|
|
4923
|
+
return Hr(this.getValue());
|
|
4924
4924
|
}
|
|
4925
4925
|
convertToBooleanObjectValue() {
|
|
4926
4926
|
return this;
|
|
@@ -4961,7 +4961,7 @@ class b extends Qt {
|
|
|
4961
4961
|
let r = this.plusBy(t.getValue());
|
|
4962
4962
|
if (r.isError())
|
|
4963
4963
|
return r;
|
|
4964
|
-
const n =
|
|
4964
|
+
const n = cn(this.getPattern(), t.getPattern(), Z.PLUS);
|
|
4965
4965
|
return r = b.create(Number(r.getValue()), n), r;
|
|
4966
4966
|
}
|
|
4967
4967
|
equalZero() {
|
|
@@ -4977,7 +4977,7 @@ class b extends Qt {
|
|
|
4977
4977
|
let r = this.minusBy(t.getValue());
|
|
4978
4978
|
if (r.isError())
|
|
4979
4979
|
return r;
|
|
4980
|
-
const n =
|
|
4980
|
+
const n = cn(this.getPattern(), t.getPattern(), Z.MINUS);
|
|
4981
4981
|
return r = b.create(Number(r.getValue()), n), r;
|
|
4982
4982
|
}
|
|
4983
4983
|
multiply(e) {
|
|
@@ -4988,7 +4988,7 @@ class b extends Qt {
|
|
|
4988
4988
|
let r = this.multiplyBy(t.getValue());
|
|
4989
4989
|
if (r.isError())
|
|
4990
4990
|
return r;
|
|
4991
|
-
const n =
|
|
4991
|
+
const n = cn(this.getPattern(), t.getPattern(), Z.MULTIPLY);
|
|
4992
4992
|
return r = b.create(Number(r.getValue()), n), r;
|
|
4993
4993
|
}
|
|
4994
4994
|
divided(e) {
|
|
@@ -5001,7 +5001,7 @@ class b extends Qt {
|
|
|
5001
5001
|
let r = this.dividedBy(t.getValue());
|
|
5002
5002
|
if (r.isError())
|
|
5003
5003
|
return r;
|
|
5004
|
-
const n =
|
|
5004
|
+
const n = cn(this.getPattern(), t.getPattern(), Z.DIVIDED);
|
|
5005
5005
|
return r = b.create(Number(r.getValue()), n), r;
|
|
5006
5006
|
}
|
|
5007
5007
|
mod(e) {
|
|
@@ -5072,7 +5072,7 @@ class b extends Qt {
|
|
|
5072
5072
|
return g.create(h.VALUE);
|
|
5073
5073
|
if (!Number.isFinite(t) || !Number.isFinite(r))
|
|
5074
5074
|
return g.create(h.NUM);
|
|
5075
|
-
const n =
|
|
5075
|
+
const n = xr(t, r);
|
|
5076
5076
|
return Number.isFinite(n) ? b.create(n) : g.create(h.NUM);
|
|
5077
5077
|
}
|
|
5078
5078
|
dividedBy(e) {
|
|
@@ -5343,7 +5343,7 @@ class b extends Qt {
|
|
|
5343
5343
|
return this;
|
|
5344
5344
|
}
|
|
5345
5345
|
convertToBooleanObjectValue() {
|
|
5346
|
-
return
|
|
5346
|
+
return is(!0);
|
|
5347
5347
|
}
|
|
5348
5348
|
_compareInfinity(e, t, r) {
|
|
5349
5349
|
let n = !1;
|
|
@@ -5370,7 +5370,7 @@ class b extends Qt {
|
|
|
5370
5370
|
return n;
|
|
5371
5371
|
}
|
|
5372
5372
|
}
|
|
5373
|
-
const Om = 1e5,
|
|
5373
|
+
const Om = 1e5, ea = new jt(Om);
|
|
5374
5374
|
class U extends Qt {
|
|
5375
5375
|
constructor(e) {
|
|
5376
5376
|
super(e);
|
|
@@ -5383,11 +5383,11 @@ class U extends Qt {
|
|
|
5383
5383
|
}
|
|
5384
5384
|
static create(e, t) {
|
|
5385
5385
|
var s;
|
|
5386
|
-
const r =
|
|
5386
|
+
const r = ea.get(e);
|
|
5387
5387
|
if (r && t && this.checkCacheByOptions(r, t))
|
|
5388
5388
|
return r;
|
|
5389
5389
|
const n = new U(e);
|
|
5390
|
-
return t != null && t.isHyperlink && (n._isHyperlink = t.isHyperlink, n._hyperlinkUrl = (s = t.hyperlinkUrl) != null ? s : ""), t != null && t.isImage && (n._isImage = t.isImage, n._imageInfo = t.imageInfo),
|
|
5390
|
+
return t != null && t.isHyperlink && (n._isHyperlink = t.isHyperlink, n._hyperlinkUrl = (s = t.hyperlinkUrl) != null ? s : ""), t != null && t.isImage && (n._isImage = t.isImage, n._imageInfo = t.imageInfo), ea.set(e, n), n;
|
|
5391
5391
|
}
|
|
5392
5392
|
static checkCacheByOptions(e, t) {
|
|
5393
5393
|
return !(e.isHyperlink() !== t.isHyperlink || e.getHyperlinkUrl() !== t.hyperlinkUrl || e.isImage() !== t.isImage || !Ge.diffValue(e.getImageInfo(), t.imageInfo));
|
|
@@ -5483,7 +5483,7 @@ class U extends Qt {
|
|
|
5483
5483
|
}
|
|
5484
5484
|
convertToNumberObjectValue() {
|
|
5485
5485
|
const e = this.getValue(), t = da(e);
|
|
5486
|
-
return t && t.z ?
|
|
5486
|
+
return t && t.z ? Hr(t.v, t.z) : Hr(e);
|
|
5487
5487
|
}
|
|
5488
5488
|
convertToBooleanObjectValue() {
|
|
5489
5489
|
return v.create(!0);
|
|
@@ -5493,7 +5493,7 @@ class U extends Qt {
|
|
|
5493
5493
|
return v.create(n);
|
|
5494
5494
|
}
|
|
5495
5495
|
}
|
|
5496
|
-
function
|
|
5496
|
+
function is(i) {
|
|
5497
5497
|
if (typeof i == "boolean")
|
|
5498
5498
|
return v.create(i);
|
|
5499
5499
|
let a = !1;
|
|
@@ -5508,7 +5508,7 @@ function Mm(i) {
|
|
|
5508
5508
|
let a = i.toString();
|
|
5509
5509
|
return a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.slice(1, -1), a = a.replace(/""/g, '"')), U.create(a);
|
|
5510
5510
|
}
|
|
5511
|
-
function
|
|
5511
|
+
function Hr(i, a = "") {
|
|
5512
5512
|
if (typeof i == "boolean") {
|
|
5513
5513
|
let e = 0;
|
|
5514
5514
|
return i && (e = 1), b.create(e, a);
|
|
@@ -5864,7 +5864,7 @@ class K extends Qt {
|
|
|
5864
5864
|
* @returns
|
|
5865
5865
|
*/
|
|
5866
5866
|
_binarySearch(e, t, r, n = zt.MIN, s = je.MIN) {
|
|
5867
|
-
const o =
|
|
5867
|
+
const o = wn(), u = Number(e.getValue()), c = !Number.isNaN(u);
|
|
5868
5868
|
let l = 0, f = t.length - 1, m = -1, d = -1, _ = -1;
|
|
5869
5869
|
for (; l <= f; ) {
|
|
5870
5870
|
const C = Math.floor((l + f) / 2), E = t[C];
|
|
@@ -6218,7 +6218,7 @@ class K extends Qt {
|
|
|
6218
6218
|
this._flattenCache = null, this._sliceCache.clear();
|
|
6219
6219
|
}
|
|
6220
6220
|
_sort(e) {
|
|
6221
|
-
const t =
|
|
6221
|
+
const t = wn();
|
|
6222
6222
|
return (r, n) => {
|
|
6223
6223
|
const s = r[e], o = n[e];
|
|
6224
6224
|
return s == null ? 1 : o == null ? -1 : s.isError() && s.isError() ? 0 : s.isError() ? 1 : o.isError() ? -1 : t(
|
|
@@ -6416,7 +6416,7 @@ class K extends Qt {
|
|
|
6416
6416
|
o,
|
|
6417
6417
|
u,
|
|
6418
6418
|
t + l,
|
|
6419
|
-
|
|
6419
|
+
Hs,
|
|
6420
6420
|
s + c
|
|
6421
6421
|
) : Ke.set(
|
|
6422
6422
|
o,
|
|
@@ -6537,7 +6537,7 @@ class xt {
|
|
|
6537
6537
|
if (lr.has(t))
|
|
6538
6538
|
return g.create(t);
|
|
6539
6539
|
if (t === ir.TRUE || t === ir.FALSE)
|
|
6540
|
-
return
|
|
6540
|
+
return is(a);
|
|
6541
6541
|
if (q(a))
|
|
6542
6542
|
return b.create(Number(a));
|
|
6543
6543
|
if (!e) {
|
|
@@ -6548,15 +6548,15 @@ class xt {
|
|
|
6548
6548
|
const r = a.replace(/\n/g, "").replace(/\r/g, "");
|
|
6549
6549
|
return !wm(r) && Ol(r) ? K.create(r) : Mm(a);
|
|
6550
6550
|
}
|
|
6551
|
-
return typeof a == "number" ?
|
|
6551
|
+
return typeof a == "number" ? Hr(a) : g.create(h.VALUE);
|
|
6552
6552
|
}
|
|
6553
6553
|
}
|
|
6554
6554
|
function wm(i) {
|
|
6555
6555
|
const a = i.trim();
|
|
6556
6556
|
return a.startsWith('"') && a.endsWith('"');
|
|
6557
6557
|
}
|
|
6558
|
-
const Lm = 1e4,
|
|
6559
|
-
class
|
|
6558
|
+
const Lm = 1e4, _r = new jt(Lm);
|
|
6559
|
+
class jr extends ts {
|
|
6560
6560
|
constructor(e) {
|
|
6561
6561
|
super();
|
|
6562
6562
|
A(this, "_forcedSheetId", "");
|
|
@@ -6629,7 +6629,7 @@ class xr extends es {
|
|
|
6629
6629
|
return e(g.create(h.REF), c, l);
|
|
6630
6630
|
const f = this.getCellData(c, l);
|
|
6631
6631
|
let m = !1;
|
|
6632
|
-
if (
|
|
6632
|
+
if (yn(f)) {
|
|
6633
6633
|
m = e(null, c, l);
|
|
6634
6634
|
continue;
|
|
6635
6635
|
}
|
|
@@ -6812,9 +6812,9 @@ class xr extends es {
|
|
|
6812
6812
|
return g.create(t);
|
|
6813
6813
|
if (e.t === wt.NUMBER) {
|
|
6814
6814
|
const r = this._getPatternByCell(e);
|
|
6815
|
-
return Ic(r) ? U.create(t.toString()) :
|
|
6815
|
+
return Ic(r) ? U.create(t.toString()) : Hr(t, r);
|
|
6816
6816
|
}
|
|
6817
|
-
return e.t === wt.STRING || e.t === wt.FORCE_STRING ? U.create(t.toString()) : e.t === wt.BOOLEAN ?
|
|
6817
|
+
return e.t === wt.STRING || e.t === wt.FORCE_STRING ? U.create(t.toString()) : e.t === wt.BOOLEAN ? is(t) : xt.create(t);
|
|
6818
6818
|
}
|
|
6819
6819
|
_getPatternByCell(e) {
|
|
6820
6820
|
var n;
|
|
@@ -6892,7 +6892,7 @@ class xr extends es {
|
|
|
6892
6892
|
}
|
|
6893
6893
|
toArrayValueObject(e = !0) {
|
|
6894
6894
|
var _;
|
|
6895
|
-
const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u =
|
|
6895
|
+
const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = _r.get(o);
|
|
6896
6896
|
if (u && e)
|
|
6897
6897
|
return u;
|
|
6898
6898
|
const c = r - t + 1, l = s - n + 1;
|
|
@@ -6912,7 +6912,7 @@ class xr extends es {
|
|
|
6912
6912
|
row: t,
|
|
6913
6913
|
column: n
|
|
6914
6914
|
}, d = K.create(m);
|
|
6915
|
-
return e &&
|
|
6915
|
+
return e && _r.set(o, d), d;
|
|
6916
6916
|
}
|
|
6917
6917
|
toUnitRange() {
|
|
6918
6918
|
return {
|
|
@@ -6937,7 +6937,7 @@ class xr extends es {
|
|
|
6937
6937
|
return K.create(e);
|
|
6938
6938
|
}
|
|
6939
6939
|
}
|
|
6940
|
-
class Pm extends
|
|
6940
|
+
class Pm extends ts {
|
|
6941
6941
|
constructor(a) {
|
|
6942
6942
|
super(), this._promise = a;
|
|
6943
6943
|
}
|
|
@@ -6948,7 +6948,7 @@ class Pm extends es {
|
|
|
6948
6948
|
return this._promise;
|
|
6949
6949
|
}
|
|
6950
6950
|
}
|
|
6951
|
-
class xm extends
|
|
6951
|
+
class xm extends ts {
|
|
6952
6952
|
constructor(a) {
|
|
6953
6953
|
super(), this._promiseList = a;
|
|
6954
6954
|
}
|
|
@@ -6978,7 +6978,7 @@ class xm extends es {
|
|
|
6978
6978
|
return K.create(e);
|
|
6979
6979
|
}
|
|
6980
6980
|
}
|
|
6981
|
-
class
|
|
6981
|
+
class jn extends jr {
|
|
6982
6982
|
constructor(a, e, t) {
|
|
6983
6983
|
super(""), this.setRangeData(a), e && this.setForcedSheetIdDirect(e), t && this.setForcedUnitIdDirect(t);
|
|
6984
6984
|
}
|
|
@@ -6986,10 +6986,10 @@ class xn extends xr {
|
|
|
6986
6986
|
return !0;
|
|
6987
6987
|
}
|
|
6988
6988
|
}
|
|
6989
|
-
class Sa extends
|
|
6989
|
+
class Sa extends jr {
|
|
6990
6990
|
constructor(a) {
|
|
6991
6991
|
super(a);
|
|
6992
|
-
const e =
|
|
6992
|
+
const e = yr(a);
|
|
6993
6993
|
this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName), this.setRangeData(e.range);
|
|
6994
6994
|
}
|
|
6995
6995
|
isCell() {
|
|
@@ -7011,7 +7011,7 @@ class Sa extends xr {
|
|
|
7011
7011
|
return t > n ? (o.startRow = n, o.endRow = t) : (o.startRow = t, o.endRow = n), r > s ? (o.startColumn = s, o.endColumn = r) : (o.startColumn = r, o.endColumn = s), a.startAbsoluteRefType && (o.startAbsoluteRefType = a.startAbsoluteRefType), e.startAbsoluteRefType && (o.endAbsoluteRefType = e.startAbsoluteRefType), o;
|
|
7012
7012
|
}
|
|
7013
7013
|
_createRange(a) {
|
|
7014
|
-
const e = new
|
|
7014
|
+
const e = new jn(
|
|
7015
7015
|
a,
|
|
7016
7016
|
this.getForcedSheetId(),
|
|
7017
7017
|
this.getForcedUnitId()
|
|
@@ -7025,10 +7025,10 @@ class Sa extends xr {
|
|
|
7025
7025
|
return s && e.setForcedUnitIdDirect(s), e;
|
|
7026
7026
|
}
|
|
7027
7027
|
}
|
|
7028
|
-
class Da extends
|
|
7028
|
+
class Da extends jr {
|
|
7029
7029
|
constructor(a) {
|
|
7030
7030
|
super(a);
|
|
7031
|
-
const e =
|
|
7031
|
+
const e = yr(a);
|
|
7032
7032
|
this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
|
|
7033
7033
|
const t = {
|
|
7034
7034
|
...e.range,
|
|
@@ -7056,10 +7056,10 @@ class Da extends xr {
|
|
|
7056
7056
|
return n > s ? t.endColumn = n : (t.startColumn = n, t.endColumn = s), r.startAbsoluteRefType && (t.endAbsoluteRefType = r.startAbsoluteRefType), t.rangeType = rt.COLUMN, this.setToken(`${this.getToken()}${X.COLON}${e.getToken()}`), this;
|
|
7057
7057
|
}
|
|
7058
7058
|
}
|
|
7059
|
-
class wa extends
|
|
7059
|
+
class wa extends jr {
|
|
7060
7060
|
constructor(a) {
|
|
7061
7061
|
super(a);
|
|
7062
|
-
const e =
|
|
7062
|
+
const e = yr(a);
|
|
7063
7063
|
this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
|
|
7064
7064
|
const t = {
|
|
7065
7065
|
...e.range,
|
|
@@ -7146,7 +7146,7 @@ function La(i) {
|
|
|
7146
7146
|
}
|
|
7147
7147
|
return [Y.EQUALS, xt.create(i)];
|
|
7148
7148
|
}
|
|
7149
|
-
function
|
|
7149
|
+
function os(i, a, e, t) {
|
|
7150
7150
|
if (!e)
|
|
7151
7151
|
if (a.isString()) {
|
|
7152
7152
|
const r = `${a.getValue()}`, [n, s] = La(r);
|
|
@@ -7159,7 +7159,7 @@ function jm(i, a) {
|
|
|
7159
7159
|
const e = Math.max(i.isArray() ? i.getRowCount() : 1, a.isArray() ? a.getRowCount() : 1), t = Math.max(i.isArray() ? i.getColumnCount() : 1, a.isArray() ? a.getColumnCount() : 1), r = O(e, t, i), n = O(e, t, a);
|
|
7160
7160
|
return r.mapValue((s, o, u) => {
|
|
7161
7161
|
const c = n.get(o, u);
|
|
7162
|
-
return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ?
|
|
7162
|
+
return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ? is(s.getValue() && c.getValue()) : v.create(!1);
|
|
7163
7163
|
});
|
|
7164
7164
|
}
|
|
7165
7165
|
function Um(i) {
|
|
@@ -7233,7 +7233,7 @@ function vm(i) {
|
|
|
7233
7233
|
a = Math.max(a, 1), e = Math.max(e, 1);
|
|
7234
7234
|
}), { maxRowLength: a, maxColumnLength: e };
|
|
7235
7235
|
}
|
|
7236
|
-
function
|
|
7236
|
+
function zr(i, a) {
|
|
7237
7237
|
if (i.length === 0 || i.length % 2 !== 0)
|
|
7238
7238
|
return {
|
|
7239
7239
|
isError: !0,
|
|
@@ -7288,10 +7288,10 @@ function Zr(i, a) {
|
|
|
7288
7288
|
variants: u
|
|
7289
7289
|
};
|
|
7290
7290
|
}
|
|
7291
|
-
function
|
|
7291
|
+
function ta(i) {
|
|
7292
7292
|
return i.isArray() ? i : K.createByArray([[i.getValue()]]);
|
|
7293
7293
|
}
|
|
7294
|
-
function
|
|
7294
|
+
function Jr(i, a, e, t = !1) {
|
|
7295
7295
|
const r = [];
|
|
7296
7296
|
for (let n = 0; n < i.length; n++) {
|
|
7297
7297
|
if (n % 2 === 1) continue;
|
|
@@ -7299,8 +7299,8 @@ function zr(i, a, e, t = !1) {
|
|
|
7299
7299
|
O(a, e, o, g.create(h.NA)).iterator((c, l, f) => {
|
|
7300
7300
|
if (!c)
|
|
7301
7301
|
return;
|
|
7302
|
-
let m =
|
|
7303
|
-
if (t && (m =
|
|
7302
|
+
let m = os(s, c);
|
|
7303
|
+
if (t && (m = us(m, s, c)), r[l] === void 0 && (r[l] = []), r[l][f] === void 0) {
|
|
7304
7304
|
r[l][f] = m;
|
|
7305
7305
|
return;
|
|
7306
7306
|
}
|
|
@@ -7309,7 +7309,7 @@ function zr(i, a, e, t = !1) {
|
|
|
7309
7309
|
}
|
|
7310
7310
|
return r;
|
|
7311
7311
|
}
|
|
7312
|
-
function
|
|
7312
|
+
function us(i, a, e) {
|
|
7313
7313
|
const [t, r] = La(`${e.getValue()}`);
|
|
7314
7314
|
return i.mapValue((n, s, o) => {
|
|
7315
7315
|
const u = a.get(s, o);
|
|
@@ -7342,7 +7342,7 @@ function Im(i, a) {
|
|
|
7342
7342
|
const e = i.isString() && i.getValue() === "", t = a.isString() && a.getValue() === "";
|
|
7343
7343
|
return !!((e || i.isNull()) && (t || a.isNull()) || i.isString() && !e && a.isString() && !t);
|
|
7344
7344
|
}
|
|
7345
|
-
var
|
|
7345
|
+
var vr = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(vr || {});
|
|
7346
7346
|
function Fm(i, a) {
|
|
7347
7347
|
let e;
|
|
7348
7348
|
switch (a) {
|
|
@@ -7369,7 +7369,7 @@ var km = Object.getOwnPropertyDescriptor, $m = (i, a, e, t) => {
|
|
|
7369
7369
|
(s = i[n]) && (r = s(r) || r);
|
|
7370
7370
|
return r;
|
|
7371
7371
|
}, Ym = (i, a) => (e, t) => a(e, t, i);
|
|
7372
|
-
let
|
|
7372
|
+
let ra = class extends De {
|
|
7373
7373
|
constructor(i) {
|
|
7374
7374
|
super(), this._univerInstanceService = i;
|
|
7375
7375
|
}
|
|
@@ -7380,7 +7380,7 @@ let ta = class extends De {
|
|
|
7380
7380
|
};
|
|
7381
7381
|
let e = i;
|
|
7382
7382
|
if (i.startsWith("#") && Ro(i.slice(1))) {
|
|
7383
|
-
const { unitId: t, sheetName: r, range: n } =
|
|
7383
|
+
const { unitId: t, sheetName: r, range: n } = kr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(Cr.UNIVER_SHEET);
|
|
7384
7384
|
if (t === "" || t === s.getUnitId())
|
|
7385
7385
|
if (r === "")
|
|
7386
7386
|
e = `#gid=${s.getActiveSheet().getSheetId()}&range=${Yt(n)}`;
|
|
@@ -7394,9 +7394,9 @@ let ta = class extends De {
|
|
|
7394
7394
|
};
|
|
7395
7395
|
}
|
|
7396
7396
|
};
|
|
7397
|
-
|
|
7398
|
-
Ym(0,
|
|
7399
|
-
],
|
|
7397
|
+
ra = $m([
|
|
7398
|
+
Ym(0, Jn)
|
|
7399
|
+
], ra);
|
|
7400
7400
|
const eu = Je(
|
|
7401
7401
|
"univer.formula.hyperlink-engine-formula.service"
|
|
7402
7402
|
);
|
|
@@ -7404,8 +7404,8 @@ var Hm = Object.getOwnPropertyDescriptor, Gm = (i, a, e, t) => {
|
|
|
7404
7404
|
for (var r = t > 1 ? void 0 : t ? Hm(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7405
7405
|
(s = i[n]) && (r = s(r) || r);
|
|
7406
7406
|
return r;
|
|
7407
|
-
}, vi = (i, a) => (e, t) => a(e, t, i), tt = /* @__PURE__ */ ((i) => (i[i.IDLE = 0] = "IDLE", i[i.START = 1] = "START", i[i.START_DEPENDENCY = 2] = "START_DEPENDENCY", i[i.START_CALCULATION = 3] = "START_CALCULATION", i[i.CURRENTLY_CALCULATING = 4] = "CURRENTLY_CALCULATING", i[i.START_DEPENDENCY_ARRAY_FORMULA = 5] = "START_DEPENDENCY_ARRAY_FORMULA", i[i.START_CALCULATION_ARRAY_FORMULA = 6] = "START_CALCULATION_ARRAY_FORMULA", i[i.CURRENTLY_CALCULATING_ARRAY_FORMULA = 7] = "CURRENTLY_CALCULATING_ARRAY_FORMULA", i[i.CALCULATION_COMPLETED = 8] = "CALCULATION_COMPLETED", i))(tt || {}),
|
|
7408
|
-
let
|
|
7407
|
+
}, vi = (i, a) => (e, t) => a(e, t, i), tt = /* @__PURE__ */ ((i) => (i[i.IDLE = 0] = "IDLE", i[i.START = 1] = "START", i[i.START_DEPENDENCY = 2] = "START_DEPENDENCY", i[i.START_CALCULATION = 3] = "START_CALCULATION", i[i.CURRENTLY_CALCULATING = 4] = "CURRENTLY_CALCULATING", i[i.START_DEPENDENCY_ARRAY_FORMULA = 5] = "START_DEPENDENCY_ARRAY_FORMULA", i[i.START_CALCULATION_ARRAY_FORMULA = 6] = "START_CALCULATION_ARRAY_FORMULA", i[i.CURRENTLY_CALCULATING_ARRAY_FORMULA = 7] = "CURRENTLY_CALCULATING_ARRAY_FORMULA", i[i.CALCULATION_COMPLETED = 8] = "CALCULATION_COMPLETED", i))(tt || {}), Ir = /* @__PURE__ */ ((i) => (i[i.INITIAL = 0] = "INITIAL", i[i.STOP_EXECUTION = 1] = "STOP_EXECUTION", i[i.NOT_EXECUTED = 2] = "NOT_EXECUTED", i[i.SUCCESS = 3] = "SUCCESS", i))(Ir || {});
|
|
7408
|
+
let na = class extends De {
|
|
7409
7409
|
constructor(a, e) {
|
|
7410
7410
|
super();
|
|
7411
7411
|
A(this, "_formulaExecuteStage", 0);
|
|
@@ -7741,7 +7741,7 @@ let ra = class extends De {
|
|
|
7741
7741
|
};
|
|
7742
7742
|
}
|
|
7743
7743
|
clearArrayObjectCache() {
|
|
7744
|
-
|
|
7744
|
+
_r.clear();
|
|
7745
7745
|
}
|
|
7746
7746
|
// eslint-disable-next-line complexity
|
|
7747
7747
|
_checkIfArrayFormulaRangeHasData(a, e, t, r, n) {
|
|
@@ -7758,7 +7758,7 @@ let ra = class extends De {
|
|
|
7758
7758
|
w
|
|
7759
7759
|
);
|
|
7760
7760
|
const T = (S = (M = (V = l == null ? void 0 : l[a]) == null ? void 0 : V[e]) == null ? void 0 : M.cellData) == null ? void 0 : S.getValue(D, w), j = this._getRuntimeFeatureCellValue(D, w, e, a);
|
|
7761
|
-
if (!
|
|
7761
|
+
if (!yn(L) || this._isInOtherArrayFormulaRange(a, e, t, r, D, w) || !yn(T) || !yn(j))
|
|
7762
7762
|
return !0;
|
|
7763
7763
|
}
|
|
7764
7764
|
return !1;
|
|
@@ -7807,10 +7807,10 @@ let ra = class extends De {
|
|
|
7807
7807
|
return n.length === 0 ? !0 : el(n, a, e, t, r);
|
|
7808
7808
|
}
|
|
7809
7809
|
};
|
|
7810
|
-
|
|
7810
|
+
na = Gm([
|
|
7811
7811
|
vi(0, Wt),
|
|
7812
7812
|
vi(1, eu)
|
|
7813
|
-
],
|
|
7813
|
+
], na);
|
|
7814
7814
|
const Nt = Je("univer.formula.runtime.service");
|
|
7815
7815
|
var oe = /* @__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))(oe || {});
|
|
7816
7816
|
const Vt = /* @__PURE__ */ new Map([
|
|
@@ -7954,7 +7954,7 @@ class Mt {
|
|
|
7954
7954
|
return a instanceof ie ? r = a.getToken() : r = a, new qe(r);
|
|
7955
7955
|
}
|
|
7956
7956
|
}
|
|
7957
|
-
class
|
|
7957
|
+
class sa extends qe {
|
|
7958
7958
|
get nodeType() {
|
|
7959
7959
|
return oe.ROOT;
|
|
7960
7960
|
}
|
|
@@ -7976,12 +7976,12 @@ class tu extends Mt {
|
|
|
7976
7976
|
if (!(a instanceof ie))
|
|
7977
7977
|
return;
|
|
7978
7978
|
if (a.getToken() === Bt)
|
|
7979
|
-
return new
|
|
7979
|
+
return new sa(Bt);
|
|
7980
7980
|
}
|
|
7981
7981
|
}
|
|
7982
|
-
const Wm = 5e3,
|
|
7982
|
+
const Wm = 5e3, Gr = new jt(Wm);
|
|
7983
7983
|
function Ii(i, a, e, t, r) {
|
|
7984
|
-
let n =
|
|
7984
|
+
let n = Gr.get(`${i}${a}`);
|
|
7985
7985
|
if (n && !ru(n, r))
|
|
7986
7986
|
return n;
|
|
7987
7987
|
const s = e.treeBuilder(a);
|
|
@@ -7989,7 +7989,7 @@ function Ii(i, a, e, t, r) {
|
|
|
7989
7989
|
return Te.create(s);
|
|
7990
7990
|
if (n = t.parse(s), n == null)
|
|
7991
7991
|
throw new Error("astNode is null");
|
|
7992
|
-
return
|
|
7992
|
+
return Gr.set(`${i}${a}`, n), n;
|
|
7993
7993
|
}
|
|
7994
7994
|
function ru(i, a) {
|
|
7995
7995
|
const e = a.getDirtyDefinedNameMap(), t = a.getExecuteUnitId();
|
|
@@ -8065,9 +8065,9 @@ class qm extends De {
|
|
|
8065
8065
|
}
|
|
8066
8066
|
}
|
|
8067
8067
|
deleteFormulaAstCacheKey(...e) {
|
|
8068
|
-
|
|
8068
|
+
Gr.forEach((t, r) => {
|
|
8069
8069
|
e.forEach((n) => {
|
|
8070
|
-
r.includes(n) &&
|
|
8070
|
+
r.includes(n) && Gr.delete(r);
|
|
8071
8071
|
});
|
|
8072
8072
|
});
|
|
8073
8073
|
}
|
|
@@ -8077,7 +8077,7 @@ var ke = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED",
|
|
|
8077
8077
|
(s = i[n]) && (r = s(r) || r);
|
|
8078
8078
|
return r;
|
|
8079
8079
|
}, Fi = (i, a) => (e, t) => a(e, t, i);
|
|
8080
|
-
class
|
|
8080
|
+
class Un extends qe {
|
|
8081
8081
|
constructor(a, e, t) {
|
|
8082
8082
|
super(e), this._runtimeService = a, this._operatorString = e, this._functionExecutor = t;
|
|
8083
8083
|
}
|
|
@@ -8103,7 +8103,7 @@ class jn extends qe {
|
|
|
8103
8103
|
return l !== u && c !== o || o === c && u === l ? g.create(h.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(h.VALUE);
|
|
8104
8104
|
}
|
|
8105
8105
|
}
|
|
8106
|
-
let
|
|
8106
|
+
let Tn = class extends Mt {
|
|
8107
8107
|
constructor(i, a) {
|
|
8108
8108
|
super(), this._functionService = i, this._runtimeService = a;
|
|
8109
8109
|
}
|
|
@@ -8119,23 +8119,23 @@ let Un = class extends Mt {
|
|
|
8119
8119
|
let t = "";
|
|
8120
8120
|
if (e === Le.MINUS)
|
|
8121
8121
|
t = ke.MINUS;
|
|
8122
|
-
else return e === Le.AT ? new
|
|
8122
|
+
else return e === Le.AT ? new Un(this._runtimeService, e) : void 0;
|
|
8123
8123
|
const r = this._functionService.getExecutor(t);
|
|
8124
|
-
return r ? new
|
|
8124
|
+
return r ? new Un(this._runtimeService, e, r) : (console.error(`No function ${a}`), Te.create(h.NAME));
|
|
8125
8125
|
}
|
|
8126
8126
|
};
|
|
8127
|
-
|
|
8127
|
+
Tn = Km([
|
|
8128
8128
|
Fi(0, Xt),
|
|
8129
8129
|
Fi(1, Nt)
|
|
8130
|
-
],
|
|
8130
|
+
], Tn);
|
|
8131
8131
|
function nu(i, a, e) {
|
|
8132
8132
|
let t, r, n = i;
|
|
8133
8133
|
const s = n[0];
|
|
8134
8134
|
let o = 0;
|
|
8135
8135
|
if (s === Le.MINUS) {
|
|
8136
8136
|
const u = a.getExecutor(ke.MINUS);
|
|
8137
|
-
t = new
|
|
8138
|
-
} else s === Le.AT && (r = new
|
|
8137
|
+
t = new Un(e, Le.MINUS, u), o++;
|
|
8138
|
+
} else s === Le.AT && (r = new Un(e, Le.AT), t && r.setParent(t), o++);
|
|
8139
8139
|
return o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
|
|
8140
8140
|
}
|
|
8141
8141
|
var Zm = Object.getOwnPropertyDescriptor, zm = (i, a, e, t) => {
|
|
@@ -8314,7 +8314,7 @@ class eh extends qe {
|
|
|
8314
8314
|
this.setValue(g.create(h.NAME));
|
|
8315
8315
|
}
|
|
8316
8316
|
}
|
|
8317
|
-
let
|
|
8317
|
+
let vn = class extends Mt {
|
|
8318
8318
|
constructor(i, a, e, t, r, n) {
|
|
8319
8319
|
super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
|
|
8320
8320
|
}
|
|
@@ -8349,20 +8349,20 @@ let Tn = class extends Mt {
|
|
|
8349
8349
|
return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken()) === X.COLON;
|
|
8350
8350
|
}
|
|
8351
8351
|
};
|
|
8352
|
-
|
|
8352
|
+
vn = zm([
|
|
8353
8353
|
mr(0, Xt),
|
|
8354
8354
|
mr(1, Wt),
|
|
8355
8355
|
mr(2, Nt),
|
|
8356
|
-
mr(3,
|
|
8356
|
+
mr(3, Pr),
|
|
8357
8357
|
mr(4, ye(lo)),
|
|
8358
|
-
mr(5, ye(
|
|
8359
|
-
],
|
|
8358
|
+
mr(5, ye(br))
|
|
8359
|
+
], vn);
|
|
8360
8360
|
var th = Object.getOwnPropertyDescriptor, rh = (i, a, e, t) => {
|
|
8361
8361
|
for (var r = t > 1 ? void 0 : t ? th(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8362
8362
|
(s = i[n]) && (r = s(r) || r);
|
|
8363
8363
|
return r;
|
|
8364
8364
|
}, nh = (i, a) => (e, t) => a(e, t, i);
|
|
8365
|
-
let
|
|
8365
|
+
let Vr = class extends De {
|
|
8366
8366
|
constructor(i) {
|
|
8367
8367
|
super(), this._runtimeService = i;
|
|
8368
8368
|
}
|
|
@@ -8408,7 +8408,7 @@ let Nr = class extends De {
|
|
|
8408
8408
|
const t = i.getChildren(), r = t.length;
|
|
8409
8409
|
for (let n = 0; n < r; n++) {
|
|
8410
8410
|
const s = t[n];
|
|
8411
|
-
if (s.getToken().toUpperCase() ===
|
|
8411
|
+
if (s.getToken().toUpperCase() === Br && s.isEmptyParamFunction()) {
|
|
8412
8412
|
s.execute();
|
|
8413
8413
|
continue;
|
|
8414
8414
|
}
|
|
@@ -8422,7 +8422,7 @@ let Nr = class extends De {
|
|
|
8422
8422
|
const t = i.getChildren(), r = t.length;
|
|
8423
8423
|
for (let n = 0; n < r; n++) {
|
|
8424
8424
|
const s = t[n];
|
|
8425
|
-
if (s.getToken().toUpperCase() ===
|
|
8425
|
+
if (s.getToken().toUpperCase() === Br && s.isEmptyParamFunction()) {
|
|
8426
8426
|
s.execute();
|
|
8427
8427
|
continue;
|
|
8428
8428
|
}
|
|
@@ -8431,11 +8431,11 @@ let Nr = class extends De {
|
|
|
8431
8431
|
return i.nodeType === oe.REFERENCE && i.setRefOffset(a, e), i.execute(), It.SUCCESS;
|
|
8432
8432
|
}
|
|
8433
8433
|
};
|
|
8434
|
-
|
|
8434
|
+
Vr = rh([
|
|
8435
8435
|
nh(0, Nt)
|
|
8436
|
-
],
|
|
8436
|
+
], Vr);
|
|
8437
8437
|
function su(i) {
|
|
8438
|
-
return i instanceof ie ? i.getToken() ===
|
|
8438
|
+
return i instanceof ie ? i.getToken() === Rr : !1;
|
|
8439
8439
|
}
|
|
8440
8440
|
function sh(i) {
|
|
8441
8441
|
return i instanceof ie ? i.getToken() === yo : !1;
|
|
@@ -8451,7 +8451,7 @@ function Pa(i, a, e) {
|
|
|
8451
8451
|
const u = o.trim();
|
|
8452
8452
|
if (e.has(u)) {
|
|
8453
8453
|
const c = new ie();
|
|
8454
|
-
c.setToken(
|
|
8454
|
+
c.setToken(Kr), c.setLambdaId(a), c.setLambdaPrivacyVar(e), c.setLambdaParameter(u), t[s] = c;
|
|
8455
8455
|
}
|
|
8456
8456
|
}
|
|
8457
8457
|
}
|
|
@@ -8472,7 +8472,7 @@ function Bi(i, a = 0, e = 0) {
|
|
|
8472
8472
|
function au(i) {
|
|
8473
8473
|
if (!i)
|
|
8474
8474
|
return;
|
|
8475
|
-
if (i.getToken() !==
|
|
8475
|
+
if (i.getToken() !== Kr)
|
|
8476
8476
|
return i;
|
|
8477
8477
|
const a = i, e = a.getCurrentLambdaPrivacyVar(), t = a.getLambdaParameter();
|
|
8478
8478
|
if (!e)
|
|
@@ -8523,7 +8523,7 @@ class xa extends Qt {
|
|
|
8523
8523
|
const t = e.getChildren(), r = t.length;
|
|
8524
8524
|
for (let n = 0; n < r; n++) {
|
|
8525
8525
|
const s = t[n];
|
|
8526
|
-
if (s.getToken() ===
|
|
8526
|
+
if (s.getToken() === Kr) {
|
|
8527
8527
|
const u = s.getLambdaParameter(), c = this._lambdaPrivacyValueMap.get(u);
|
|
8528
8528
|
if (c)
|
|
8529
8529
|
s.setValue(c);
|
|
@@ -8592,7 +8592,7 @@ class uh extends qe {
|
|
|
8592
8592
|
// return Promise.resolve(AstNodePromiseType.SUCCESS);
|
|
8593
8593
|
// }
|
|
8594
8594
|
}
|
|
8595
|
-
let
|
|
8595
|
+
let In = class extends Mt {
|
|
8596
8596
|
constructor(i, a) {
|
|
8597
8597
|
super(), this._runtimeService = i, this._interpreter = a;
|
|
8598
8598
|
}
|
|
@@ -8605,7 +8605,7 @@ let vn = class extends Mt {
|
|
|
8605
8605
|
const r = a[a.length - 1];
|
|
8606
8606
|
if (!(e instanceof ie && r instanceof ie))
|
|
8607
8607
|
return Te.create(h.NAME);
|
|
8608
|
-
if (e.getToken() ===
|
|
8608
|
+
if (e.getToken() === Rr) {
|
|
8609
8609
|
const o = e.getChildren();
|
|
8610
8610
|
if (t.length !== o.length)
|
|
8611
8611
|
return Te.create(h.VALUE);
|
|
@@ -8623,21 +8623,21 @@ let vn = class extends Mt {
|
|
|
8623
8623
|
return this._runtimeService.registerFunctionDefinitionPrivacyVar(n, s), this._updateLambdaStatement(r, n, s), new uh(i.getToken(), n, this._interpreter, [...s.keys()], this._runtimeService);
|
|
8624
8624
|
}
|
|
8625
8625
|
checkAndCreateNodeType(i) {
|
|
8626
|
-
if (!(!(i instanceof ie) || i.getToken().trim().toUpperCase() !==
|
|
8626
|
+
if (!(!(i instanceof ie) || i.getToken().trim().toUpperCase() !== Br))
|
|
8627
8627
|
return this.create(i);
|
|
8628
8628
|
}
|
|
8629
8629
|
_updateLambdaStatement(i, a, e) {
|
|
8630
8630
|
Pa(i, a, e);
|
|
8631
8631
|
}
|
|
8632
8632
|
};
|
|
8633
|
-
|
|
8633
|
+
In = oh([
|
|
8634
8634
|
ki(0, Nt),
|
|
8635
|
-
ki(1, ye(
|
|
8636
|
-
],
|
|
8635
|
+
ki(1, ye(Vr))
|
|
8636
|
+
], In);
|
|
8637
8637
|
function iu(i) {
|
|
8638
8638
|
if (!i)
|
|
8639
8639
|
return;
|
|
8640
|
-
if (i.getToken() !==
|
|
8640
|
+
if (i.getToken() !== Kr)
|
|
8641
8641
|
return i;
|
|
8642
8642
|
const a = i, e = a.getCurrentLambdaPrivacyVar(), t = a.getLambdaParameter();
|
|
8643
8643
|
if (e)
|
|
@@ -8675,7 +8675,7 @@ class ou extends Mt {
|
|
|
8675
8675
|
return e ? new ch(a.getToken(), t, e) : new Te(h.NAME);
|
|
8676
8676
|
}
|
|
8677
8677
|
checkAndCreateNodeType(a) {
|
|
8678
|
-
if (!(!(a instanceof ie) || a.getToken().trim() !==
|
|
8678
|
+
if (!(!(a instanceof ie) || a.getToken().trim() !== Kr))
|
|
8679
8679
|
return this.create(a);
|
|
8680
8680
|
}
|
|
8681
8681
|
}
|
|
@@ -8729,7 +8729,7 @@ class hh extends qe {
|
|
|
8729
8729
|
e <= 1 && t <= 1 || this._runtimeService.setUnitArrayFormulaEmbeddedMap();
|
|
8730
8730
|
}
|
|
8731
8731
|
}
|
|
8732
|
-
let
|
|
8732
|
+
let Fn = class extends Mt {
|
|
8733
8733
|
constructor(i, a) {
|
|
8734
8734
|
super(), this._functionService = i, this._runtimeService = a;
|
|
8735
8735
|
}
|
|
@@ -8751,11 +8751,11 @@ let In = class extends Mt {
|
|
|
8751
8751
|
return this.create(a);
|
|
8752
8752
|
}
|
|
8753
8753
|
};
|
|
8754
|
-
|
|
8754
|
+
Fn = mh([
|
|
8755
8755
|
$i(0, Xt),
|
|
8756
8756
|
$i(1, Nt)
|
|
8757
|
-
],
|
|
8758
|
-
class gh extends
|
|
8757
|
+
], Fn);
|
|
8758
|
+
class gh extends jr {
|
|
8759
8759
|
constructor(e, t, r, n) {
|
|
8760
8760
|
super(e);
|
|
8761
8761
|
A(this, "_isCurrentRowForRange", !1);
|
|
@@ -8943,7 +8943,7 @@ var dh = Object.getOwnPropertyDescriptor, Ch = (i, a, e, t) => {
|
|
|
8943
8943
|
for (var r = t > 1 ? void 0 : t ? dh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8944
8944
|
(s = i[n]) && (r = s(r) || r);
|
|
8945
8945
|
return r;
|
|
8946
|
-
},
|
|
8946
|
+
}, ln = (i, a) => (e, t) => a(e, t, i);
|
|
8947
8947
|
class Yi extends qe {
|
|
8948
8948
|
constructor(e, t, r, n, s = !1, o) {
|
|
8949
8949
|
super(r);
|
|
@@ -8972,7 +8972,7 @@ class Yi extends qe {
|
|
|
8972
8972
|
};
|
|
8973
8973
|
}
|
|
8974
8974
|
}
|
|
8975
|
-
let
|
|
8975
|
+
let Bn = class extends Mt {
|
|
8976
8976
|
constructor(i, a, e, t) {
|
|
8977
8977
|
super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e, this._superTableService = t;
|
|
8978
8978
|
}
|
|
@@ -9000,10 +9000,10 @@ let Fn = class extends Mt {
|
|
|
9000
9000
|
const r = this._currentConfigService, n = this._formulaRuntimeService, s = (_) => new Yi(r, n, i, _, e), o = this._getTableMap();
|
|
9001
9001
|
if ((d = o == null ? void 0 : o.has(i)) != null ? d : !1)
|
|
9002
9002
|
return this._getTableReferenceNode(i, a, e, !0);
|
|
9003
|
-
if (
|
|
9004
|
-
return s(
|
|
9003
|
+
if (Xr(i))
|
|
9004
|
+
return s(vr.CELL);
|
|
9005
9005
|
const l = a && this._checkParentIsUnionOperator(t);
|
|
9006
|
-
return l && Ao(i) ? s(
|
|
9006
|
+
return l && Ao(i) ? s(vr.ROW) : l && Eo(i) ? s(vr.COLUMN) : this._getTableReferenceNode(i, a, e, !1);
|
|
9007
9007
|
}
|
|
9008
9008
|
_getTableReferenceNode(i, a, e, t = !1) {
|
|
9009
9009
|
if (!this._checkTokenIsTableReference(i) && !t)
|
|
@@ -9015,7 +9015,7 @@ let Fn = class extends Mt {
|
|
|
9015
9015
|
this._currentConfigService,
|
|
9016
9016
|
this._formulaRuntimeService,
|
|
9017
9017
|
i,
|
|
9018
|
-
|
|
9018
|
+
vr.COLUMN,
|
|
9019
9019
|
e,
|
|
9020
9020
|
new gh(i, u, o, c)
|
|
9021
9021
|
);
|
|
@@ -9029,17 +9029,17 @@ let Fn = class extends Mt {
|
|
|
9029
9029
|
return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken().trim()) === X.COLON;
|
|
9030
9030
|
}
|
|
9031
9031
|
};
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
],
|
|
9032
|
+
Bn = Ch([
|
|
9033
|
+
ln(0, Wt),
|
|
9034
|
+
ln(1, Nt),
|
|
9035
|
+
ln(2, Xt),
|
|
9036
|
+
ln(3, Zr)
|
|
9037
|
+
], Bn);
|
|
9038
9038
|
var _h = Object.getOwnPropertyDescriptor, Ah = (i, a, e, t) => {
|
|
9039
9039
|
for (var r = t > 1 ? void 0 : t ? _h(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
9040
9040
|
(s = i[n]) && (r = s(r) || r);
|
|
9041
9041
|
return r;
|
|
9042
|
-
},
|
|
9042
|
+
}, Ms = (i, a) => (e, t) => a(e, t, i);
|
|
9043
9043
|
class Hi extends qe {
|
|
9044
9044
|
constructor(a, e, t, r) {
|
|
9045
9045
|
super(t), this._currentConfigService = a, this._lexer = e, this._operatorString = t, this._functionExecutor = r;
|
|
@@ -9073,7 +9073,7 @@ class Hi extends qe {
|
|
|
9073
9073
|
return o && this._lexer.treeBuilder(o), g.create(h.VALUE);
|
|
9074
9074
|
}
|
|
9075
9075
|
}
|
|
9076
|
-
let
|
|
9076
|
+
let kn = class extends Mt {
|
|
9077
9077
|
constructor(i, a, e) {
|
|
9078
9078
|
super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
|
|
9079
9079
|
}
|
|
@@ -9094,11 +9094,11 @@ let Bn = class extends Mt {
|
|
|
9094
9094
|
return t ? new Hi(this._currentConfigService, this._lexer, a, t) : (console.error(`No function ${i}`), Te.create(h.NAME));
|
|
9095
9095
|
}
|
|
9096
9096
|
};
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
],
|
|
9097
|
+
kn = Ah([
|
|
9098
|
+
Ms(0, Xt),
|
|
9099
|
+
Ms(1, ye(pr)),
|
|
9100
|
+
Ms(2, Wt)
|
|
9101
|
+
], kn);
|
|
9102
9102
|
var Eh = Object.getOwnPropertyDescriptor, Rh = (i, a, e, t) => {
|
|
9103
9103
|
for (var r = t > 1 ? void 0 : t ? Eh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
9104
9104
|
(s = i[n]) && (r = s(r) || r);
|
|
@@ -9122,7 +9122,7 @@ class bh extends qe {
|
|
|
9122
9122
|
return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(h.REF) : (a = a, e = e, Bm(a, e));
|
|
9123
9123
|
}
|
|
9124
9124
|
}
|
|
9125
|
-
let
|
|
9125
|
+
let $n = class extends Mt {
|
|
9126
9126
|
constructor(i) {
|
|
9127
9127
|
super(), this._functionService = i;
|
|
9128
9128
|
}
|
|
@@ -9140,9 +9140,9 @@ let kn = class extends Mt {
|
|
|
9140
9140
|
return this.create(e);
|
|
9141
9141
|
}
|
|
9142
9142
|
};
|
|
9143
|
-
|
|
9143
|
+
$n = Rh([
|
|
9144
9144
|
yh(0, Xt)
|
|
9145
|
-
],
|
|
9145
|
+
], $n);
|
|
9146
9146
|
class ph extends qe {
|
|
9147
9147
|
constructor(a) {
|
|
9148
9148
|
super(a);
|
|
@@ -9188,7 +9188,7 @@ var Nh = Object.getOwnPropertyDescriptor, Vh = (i, a, e, t) => {
|
|
|
9188
9188
|
(s = i[n]) && (r = s(r) || r);
|
|
9189
9189
|
return r;
|
|
9190
9190
|
}, lt = (i, a) => (e, t) => a(e, t, i);
|
|
9191
|
-
let
|
|
9191
|
+
let Wr = class extends De {
|
|
9192
9192
|
constructor(a, e, t, r, n, s, o, u, c, l, f) {
|
|
9193
9193
|
super();
|
|
9194
9194
|
A(this, "_astNodeFactoryList", []);
|
|
@@ -9200,13 +9200,13 @@ let Gr = class extends De {
|
|
|
9200
9200
|
}), this._astNodeFactoryList = [];
|
|
9201
9201
|
}
|
|
9202
9202
|
parse(a) {
|
|
9203
|
-
const e = new
|
|
9203
|
+
const e = new sa(Bt), t = this._parse(a, e);
|
|
9204
9204
|
return a.hasDefinedNames() && (t == null || t.setDefinedNames(a.getDefinedNames())), t;
|
|
9205
9205
|
}
|
|
9206
9206
|
_lambdaParameterHandler(a, e) {
|
|
9207
9207
|
if (e.getLambdaId == null)
|
|
9208
9208
|
return Te.create(h.VALUE);
|
|
9209
|
-
const t = e.getLambdaId(), r = new
|
|
9209
|
+
const t = e.getLambdaId(), r = new sa(Bt), n = this._runtimeService.getFunctionDefinitionPrivacyVar(t);
|
|
9210
9210
|
if (!n)
|
|
9211
9211
|
return !1;
|
|
9212
9212
|
const s = [...n.keys()], o = a.getChildren(), u = o.length;
|
|
@@ -9226,9 +9226,9 @@ let Gr = class extends De {
|
|
|
9226
9226
|
if (t % 2 !== 1 || t === 0)
|
|
9227
9227
|
return;
|
|
9228
9228
|
const r = new ie();
|
|
9229
|
-
r.setToken(
|
|
9229
|
+
r.setToken(Br);
|
|
9230
9230
|
const n = new ie();
|
|
9231
|
-
n.setToken(
|
|
9231
|
+
n.setToken(Rr);
|
|
9232
9232
|
const s = [...e];
|
|
9233
9233
|
for (let u = 0; u < t; u++) {
|
|
9234
9234
|
const c = s[u];
|
|
@@ -9254,7 +9254,7 @@ let Gr = class extends De {
|
|
|
9254
9254
|
if (s = e, r === 0)
|
|
9255
9255
|
return new lh(Bt).setParent(e), s;
|
|
9256
9256
|
} else {
|
|
9257
|
-
if (o ===
|
|
9257
|
+
if (o === Rr) {
|
|
9258
9258
|
let f = this._lambdaParameterHandler(a, e);
|
|
9259
9259
|
return f === !1 && (f = Te.create(h.ERROR)), f;
|
|
9260
9260
|
}
|
|
@@ -9360,19 +9360,19 @@ let Gr = class extends De {
|
|
|
9360
9360
|
].sort($c);
|
|
9361
9361
|
}
|
|
9362
9362
|
};
|
|
9363
|
-
|
|
9363
|
+
Wr = Vh([
|
|
9364
9364
|
lt(0, Nt),
|
|
9365
9365
|
lt(1, ye(tu)),
|
|
9366
|
-
lt(2, ye(
|
|
9367
|
-
lt(3, ye(
|
|
9366
|
+
lt(2, ye(vn)),
|
|
9367
|
+
lt(3, ye(In)),
|
|
9368
9368
|
lt(4, ye(ou)),
|
|
9369
|
-
lt(5, ye(
|
|
9370
|
-
lt(6, ye(
|
|
9371
|
-
lt(7, ye(
|
|
9372
|
-
lt(8, ye(
|
|
9373
|
-
lt(9, ye(
|
|
9369
|
+
lt(5, ye(Fn)),
|
|
9370
|
+
lt(6, ye(Tn)),
|
|
9371
|
+
lt(7, ye(Bn)),
|
|
9372
|
+
lt(8, ye(kn)),
|
|
9373
|
+
lt(9, ye($n)),
|
|
9374
9374
|
lt(10, ye(uu))
|
|
9375
|
-
],
|
|
9375
|
+
], Wr);
|
|
9376
9376
|
class Oh extends De {
|
|
9377
9377
|
constructor() {
|
|
9378
9378
|
super(...arguments);
|
|
@@ -9385,7 +9385,7 @@ class Oh extends De {
|
|
|
9385
9385
|
A(this, "_definedNameMap", /* @__PURE__ */ new Map());
|
|
9386
9386
|
// unitId -> definedName -> treeId
|
|
9387
9387
|
A(this, "_otherFormulaDataMainData", /* @__PURE__ */ new Set());
|
|
9388
|
-
A(this, "_dependencyRTreeCache", new
|
|
9388
|
+
A(this, "_dependencyRTreeCache", new js());
|
|
9389
9389
|
A(this, "_dependencyTreeIdLast", 0);
|
|
9390
9390
|
}
|
|
9391
9391
|
buildDependencyTree(e, t) {
|
|
@@ -9717,7 +9717,7 @@ class Mh extends Oh {
|
|
|
9717
9717
|
this._allTreeMap.set(e.treeId, e);
|
|
9718
9718
|
}
|
|
9719
9719
|
}
|
|
9720
|
-
const
|
|
9720
|
+
const cs = Je(
|
|
9721
9721
|
"univer.formula.dependency-manager.service"
|
|
9722
9722
|
);
|
|
9723
9723
|
class Sh extends De {
|
|
@@ -9763,7 +9763,7 @@ class Sh extends De {
|
|
|
9763
9763
|
return this._referenceExecutorMap;
|
|
9764
9764
|
}
|
|
9765
9765
|
}
|
|
9766
|
-
const
|
|
9766
|
+
const Qr = Je(
|
|
9767
9767
|
"univer.formula.feature-calculation-manager.service"
|
|
9768
9768
|
);
|
|
9769
9769
|
class Dh extends De {
|
|
@@ -9842,10 +9842,11 @@ class Dh extends De {
|
|
|
9842
9842
|
const ja = Je(
|
|
9843
9843
|
"univer.formula.other-formula-manager.service"
|
|
9844
9844
|
);
|
|
9845
|
-
var
|
|
9845
|
+
var gr = /* @__PURE__ */ ((i) => (i[i.NORMAL_FORMULA = 0] = "NORMAL_FORMULA", i[i.OTHER_FORMULA = 1] = "OTHER_FORMULA", i[i.FEATURE_FORMULA = 2] = "FEATURE_FORMULA", i))(gr || {});
|
|
9846
9846
|
class cu {
|
|
9847
9847
|
constructor() {
|
|
9848
9848
|
A(this, "_state", 0);
|
|
9849
|
+
A(this, "type", 0);
|
|
9849
9850
|
A(this, "treeId");
|
|
9850
9851
|
A(this, "children", /* @__PURE__ */ new Set());
|
|
9851
9852
|
A(this, "parents", /* @__PURE__ */ new Set());
|
|
@@ -9982,7 +9983,7 @@ class Gi extends cu {
|
|
|
9982
9983
|
return this.refTree == null ? "" : this.refTree.formulaId;
|
|
9983
9984
|
}
|
|
9984
9985
|
}
|
|
9985
|
-
class
|
|
9986
|
+
class Ss extends cu {
|
|
9986
9987
|
constructor(e) {
|
|
9987
9988
|
super();
|
|
9988
9989
|
A(this, "isCache", !1);
|
|
@@ -9990,7 +9991,6 @@ class Ms extends cu {
|
|
|
9990
9991
|
A(this, "featureDirtyRanges", []);
|
|
9991
9992
|
A(this, "refOffsetX", 0);
|
|
9992
9993
|
A(this, "refOffsetY", 0);
|
|
9993
|
-
A(this, "type", 0);
|
|
9994
9994
|
A(this, "formulaId");
|
|
9995
9995
|
A(this, "subUnitId", "");
|
|
9996
9996
|
A(this, "unitId", "");
|
|
@@ -10133,8 +10133,11 @@ class wh {
|
|
|
10133
10133
|
A(this, "subUnitId", "");
|
|
10134
10134
|
A(this, "rangeList", []);
|
|
10135
10135
|
A(this, "refTreeId");
|
|
10136
|
-
|
|
10137
|
-
this
|
|
10136
|
+
A(this, "formulaId");
|
|
10137
|
+
A(this, "featureId");
|
|
10138
|
+
A(this, "type");
|
|
10139
|
+
var e, t, r, n;
|
|
10140
|
+
this.treeId = a.treeId, this.row = a.row, this.column = a.column, this.unitId = a.unitId, this.subUnitId = a.subUnitId, this.refOffsetX = a.refOffsetX, this.refOffsetY = a.refOffsetY, this.rangeList = a.rangeList, a.isVirtual ? this.refTreeId = (t = (e = a.refTree) == null ? void 0 : e.treeId) != null ? t : -1 : (this.formula = a.formula, this.formulaId = (r = a.formulaId) != null ? r : void 0, this.featureId = (n = a.featureId) != null ? n : void 0, this.type = a.type);
|
|
10138
10141
|
}
|
|
10139
10142
|
toJson() {
|
|
10140
10143
|
return {
|
|
@@ -10149,7 +10152,10 @@ class wh {
|
|
|
10149
10152
|
refOffsetX: this.refOffsetX,
|
|
10150
10153
|
refOffsetY: this.refOffsetY,
|
|
10151
10154
|
rangeList: this.rangeList,
|
|
10152
|
-
refTreeId: this.refTreeId
|
|
10155
|
+
refTreeId: this.refTreeId,
|
|
10156
|
+
formulaId: this.formulaId,
|
|
10157
|
+
featureId: this.featureId,
|
|
10158
|
+
type: this.type
|
|
10153
10159
|
};
|
|
10154
10160
|
}
|
|
10155
10161
|
toFullJson() {
|
|
@@ -10165,7 +10171,10 @@ class wh {
|
|
|
10165
10171
|
refOffsetX: this.refOffsetX,
|
|
10166
10172
|
refOffsetY: this.refOffsetY,
|
|
10167
10173
|
rangeList: this.rangeList,
|
|
10168
|
-
refTreeId: this.refTreeId
|
|
10174
|
+
refTreeId: this.refTreeId,
|
|
10175
|
+
formulaId: this.formulaId,
|
|
10176
|
+
featureId: this.featureId,
|
|
10177
|
+
type: this.type
|
|
10169
10178
|
};
|
|
10170
10179
|
}
|
|
10171
10180
|
addParent(a) {
|
|
@@ -10188,13 +10197,13 @@ let ia = class extends De {
|
|
|
10188
10197
|
constructor(a, e, t, r, n, s, o, u, c) {
|
|
10189
10198
|
super();
|
|
10190
10199
|
A(this, "_updateRangeFlattenCache", /* @__PURE__ */ new Map());
|
|
10191
|
-
A(this, "_dependencyRTreeCacheForAddressFunction", new
|
|
10200
|
+
A(this, "_dependencyRTreeCacheForAddressFunction", new js());
|
|
10192
10201
|
A(this, "_executedAddressFunctionNodeIds", /* @__PURE__ */ new Set());
|
|
10193
10202
|
A(this, "_formulaDependencyTreeModel", /* @__PURE__ */ new Map());
|
|
10194
10203
|
this._currentConfigService = a, this._runtimeService = e, this._otherFormulaManagerService = t, this._featureCalculationManagerService = r, this._interpreter = n, this._astTreeBuilder = s, this._lexer = o, this._dependencyManagerService = u, this._lexerTreeBuilder = c;
|
|
10195
10204
|
}
|
|
10196
10205
|
dispose() {
|
|
10197
|
-
this._updateRangeFlattenCache.clear(), this._dependencyRTreeCacheForAddressFunction.clear(),
|
|
10206
|
+
this._updateRangeFlattenCache.clear(), this._dependencyRTreeCacheForAddressFunction.clear(), Gr.clear();
|
|
10198
10207
|
}
|
|
10199
10208
|
async generate(a = !1) {
|
|
10200
10209
|
this._updateRangeFlatten();
|
|
@@ -10374,10 +10383,10 @@ let ia = class extends De {
|
|
|
10374
10383
|
});
|
|
10375
10384
|
}
|
|
10376
10385
|
_getFeatureFormulaTree(a, e, t) {
|
|
10377
|
-
const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || hr(this._dependencyManagerService), c = new
|
|
10386
|
+
const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || hr(this._dependencyManagerService), c = new Ss(u);
|
|
10378
10387
|
c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
|
|
10379
10388
|
const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
|
|
10380
|
-
return c.featureDirtyRanges = f, c.featureId = a, c.type =
|
|
10389
|
+
return c.featureDirtyRanges = f, c.featureId = a, c.type = gr.FEATURE_FORMULA, this._dependencyManagerService.addFeatureFormulaDependency(r, n, a, c), this._dependencyManagerService.getFeatureFormulaDependency(t.unitId, t.subUnitId, a) && (c.isCache = !0), c;
|
|
10381
10390
|
}
|
|
10382
10391
|
_registerOtherFormulas(a, e, t) {
|
|
10383
10392
|
for (const r of e) {
|
|
@@ -10394,18 +10403,18 @@ let ia = class extends De {
|
|
|
10394
10403
|
const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), m = u[l], { f: d, ranges: _ } = m;
|
|
10395
10404
|
let C = !1;
|
|
10396
10405
|
f && (C = !0);
|
|
10397
|
-
const E = Ii(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: R, firstColumn: y } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), V = (p == null ? void 0 : p.getValue(0, 0)) || hr(this._dependencyManagerService), M = new
|
|
10406
|
+
const E = Ii(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: R, firstColumn: y } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), V = (p == null ? void 0 : p.getValue(0, 0)) || hr(this._dependencyManagerService), M = new Ss(V);
|
|
10398
10407
|
for (let S = 0; S < _.length; S++) {
|
|
10399
10408
|
const D = _[S], { startRow: w, startColumn: L, endRow: T, endColumn: j } = D;
|
|
10400
10409
|
for (let k = w; k <= T; k++)
|
|
10401
10410
|
for (let G = L; G <= j; G++) {
|
|
10402
10411
|
const ne = G - y, z = k - R;
|
|
10403
10412
|
if (ne === 0 && z === 0) {
|
|
10404
|
-
M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type =
|
|
10413
|
+
M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type = gr.OTHER_FORMULA, M.isCache = C, t.push(M), this._dependencyManagerService.addOtherFormulaDependency(r, o, l, M), this._dependencyManagerService.addFormulaDependencyByDefinedName(M);
|
|
10405
10414
|
continue;
|
|
10406
10415
|
}
|
|
10407
10416
|
const $ = new Gi();
|
|
10408
|
-
$.treeId = (p == null ? void 0 : p.getValue(ne, z)) || hr(this._dependencyManagerService), $.refTree = M, $.refOffsetX = ne, $.refOffsetY = z, $.isCache = C, this._dependencyManagerService.addOtherFormulaDependency(r, o, l, $), this._dependencyManagerService.addFormulaDependencyByDefinedName($), t.push($);
|
|
10417
|
+
$.treeId = (p == null ? void 0 : p.getValue(ne, z)) || hr(this._dependencyManagerService), $.refTree = M, $.refOffsetX = ne, $.refOffsetY = z, $.isCache = C, $.type = gr.OTHER_FORMULA, this._dependencyManagerService.addOtherFormulaDependency(r, o, l, $), this._dependencyManagerService.addFormulaDependencyByDefinedName($), t.push($);
|
|
10409
10418
|
}
|
|
10410
10419
|
}
|
|
10411
10420
|
this._dependencyManagerService.addOtherFormulaDependencyMainData(l);
|
|
@@ -10455,7 +10464,7 @@ let ia = class extends De {
|
|
|
10455
10464
|
}
|
|
10456
10465
|
}
|
|
10457
10466
|
_createFDtree(a, e, t, r, n, s) {
|
|
10458
|
-
const { f: o, x: u = 0, y: c = 0 } = s, l = new
|
|
10467
|
+
const { f: o, x: u = 0, y: c = 0 } = s, l = new Ss(hr(this._dependencyManagerService)), f = n[a][e], m = Ii(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
|
|
10459
10468
|
return l.node = m, l.formula = o, l.unitId = a, l.subUnitId = e, l.row = t, l.column = r, l.rowCount = f.rowCount, l.columnCount = f.columnCount, l;
|
|
10460
10469
|
}
|
|
10461
10470
|
_createVirtualFDtree(a, e) {
|
|
@@ -10551,7 +10560,7 @@ let ia = class extends De {
|
|
|
10551
10560
|
u.length !== 0 && await this._calculateAddressFunctionRuntimeData(a, u);
|
|
10552
10561
|
}
|
|
10553
10562
|
async _calculateListByFunctionRefNode(a) {
|
|
10554
|
-
const e = new
|
|
10563
|
+
const e = new js();
|
|
10555
10564
|
for (let t = 0, r = a.length; t < r; t++) {
|
|
10556
10565
|
const n = a[t];
|
|
10557
10566
|
e.insert({
|
|
@@ -10820,12 +10829,15 @@ let ia = class extends De {
|
|
|
10820
10829
|
this._startFormulaDependencyTreeModel();
|
|
10821
10830
|
const e = [];
|
|
10822
10831
|
for (const r of a) {
|
|
10823
|
-
const n =
|
|
10824
|
-
|
|
10832
|
+
const n = r.type;
|
|
10833
|
+
if (r.isVirtual && (n === gr.FEATURE_FORMULA || n === gr.OTHER_FORMULA))
|
|
10834
|
+
continue;
|
|
10835
|
+
const s = this._getFormulaDependencyTreeModel(r);
|
|
10836
|
+
e.push(s);
|
|
10825
10837
|
}
|
|
10826
10838
|
const t = [];
|
|
10827
10839
|
for (const r of e)
|
|
10828
|
-
|
|
10840
|
+
t.push(r.toJson());
|
|
10829
10841
|
return this._endFormulaDependencyTreeModel(), t;
|
|
10830
10842
|
}
|
|
10831
10843
|
async getAllDependencyJson() {
|
|
@@ -10906,12 +10918,12 @@ ia = Ph([
|
|
|
10906
10918
|
St(0, Wt),
|
|
10907
10919
|
St(1, Nt),
|
|
10908
10920
|
St(2, ja),
|
|
10909
|
-
St(3,
|
|
10910
|
-
St(4, ye(
|
|
10911
|
-
St(5, ye(
|
|
10912
|
-
St(6, ye(
|
|
10913
|
-
St(7,
|
|
10914
|
-
St(8, ye(
|
|
10921
|
+
St(3, Qr),
|
|
10922
|
+
St(4, ye(Vr)),
|
|
10923
|
+
St(5, ye(Wr)),
|
|
10924
|
+
St(6, ye(pr)),
|
|
10925
|
+
St(7, cs),
|
|
10926
|
+
St(8, ye($r))
|
|
10915
10927
|
], ia);
|
|
10916
10928
|
var xh = Object.getOwnPropertyDescriptor, jh = (i, a, e, t) => {
|
|
10917
10929
|
for (var r = t > 1 ? void 0 : t ? xh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -10931,7 +10943,7 @@ let ua = class extends De {
|
|
|
10931
10943
|
this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
|
|
10932
10944
|
}
|
|
10933
10945
|
dispose() {
|
|
10934
|
-
super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(),
|
|
10946
|
+
super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), _r.clear(), Ke.clear(), Xs.clear(), ea.clear();
|
|
10935
10947
|
}
|
|
10936
10948
|
/**
|
|
10937
10949
|
* Stop the execution of the formula.
|
|
@@ -10956,7 +10968,7 @@ let ua = class extends De {
|
|
|
10956
10968
|
this._runtimeService.setFormulaExecuteStage(tt.START), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._currentConfigService.load(a), this._runtimeService.reset();
|
|
10957
10969
|
const e = a.maxIteration || Io;
|
|
10958
10970
|
this._isCalculateTreeModel = a.isCalculateTreeModel || !1, this._executeLock.acquire("FORMULA_EXECUTION_LOCK", async () => {
|
|
10959
|
-
for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._executeStep(),
|
|
10971
|
+
for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._executeStep(), _r.clear(), !!this._runtimeService.isCycleDependency()); t++)
|
|
10960
10972
|
;
|
|
10961
10973
|
this._runtimeService.setFormulaExecuteStage(tt.CALCULATION_COMPLETED), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData()), Ke.clear(), this._runtimeService.reset();
|
|
10962
10974
|
});
|
|
@@ -10969,7 +10981,7 @@ let ua = class extends De {
|
|
|
10969
10981
|
e,
|
|
10970
10982
|
t
|
|
10971
10983
|
);
|
|
10972
|
-
return r == null || r.length === 0 || (
|
|
10984
|
+
return r == null || r.length === 0 || (_r.clear(), this._currentConfigService.loadDirtyRangesAndExcludedCell(r, n), await this._apply(!0)), !0;
|
|
10973
10985
|
}
|
|
10974
10986
|
_getArrayFormulaDirtyRangeAndExcludedRange(a, e) {
|
|
10975
10987
|
const t = [], r = {};
|
|
@@ -11143,19 +11155,19 @@ let ua = class extends De {
|
|
|
11143
11155
|
};
|
|
11144
11156
|
ua = jh([
|
|
11145
11157
|
Zt(0, Ca),
|
|
11146
|
-
Zt(1, ye(
|
|
11158
|
+
Zt(1, ye(pr)),
|
|
11147
11159
|
Zt(2, Wt),
|
|
11148
11160
|
Zt(3, Nt),
|
|
11149
11161
|
Zt(4, aa),
|
|
11150
|
-
Zt(5, ye(
|
|
11151
|
-
Zt(6, ye(
|
|
11162
|
+
Zt(5, ye(Vr)),
|
|
11163
|
+
Zt(6, ye(Wr))
|
|
11152
11164
|
], ua);
|
|
11153
11165
|
var Th = Object.getOwnPropertyDescriptor, vh = (i, a, e, t) => {
|
|
11154
11166
|
for (var r = t > 1 ? void 0 : t ? Th(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
11155
11167
|
(s = i[n]) && (r = s(r) || r);
|
|
11156
11168
|
return r;
|
|
11157
|
-
},
|
|
11158
|
-
let
|
|
11169
|
+
}, Ds = (i, a) => (e, t) => a(e, t, i);
|
|
11170
|
+
let Yn = class extends De {
|
|
11159
11171
|
constructor(i, a, e) {
|
|
11160
11172
|
super(), this._commandService = i, this._calculateFormulaService = a, this._formulaDataModel = e, this._initialize();
|
|
11161
11173
|
}
|
|
@@ -11169,7 +11181,7 @@ let $n = class extends De {
|
|
|
11169
11181
|
this._calculateFormulaService.stopFormulaExecution();
|
|
11170
11182
|
else if (i.id === Vo.id)
|
|
11171
11183
|
this._calculate(i.params);
|
|
11172
|
-
else if (i.id ===
|
|
11184
|
+
else if (i.id === Ts.id) {
|
|
11173
11185
|
const a = i.params;
|
|
11174
11186
|
if (a == null)
|
|
11175
11187
|
return;
|
|
@@ -11222,7 +11234,7 @@ let $n = class extends De {
|
|
|
11222
11234
|
async _generateAllDependencyTreeJson() {
|
|
11223
11235
|
const i = await this._calculateFormulaService.getAllDependencyJson();
|
|
11224
11236
|
this._commandService.executeCommand(
|
|
11225
|
-
|
|
11237
|
+
ks.id,
|
|
11226
11238
|
{
|
|
11227
11239
|
result: i
|
|
11228
11240
|
},
|
|
@@ -11262,18 +11274,18 @@ let $n = class extends De {
|
|
|
11262
11274
|
this._calculateFormulaService.executionCompleteListener$.subscribe((i) => {
|
|
11263
11275
|
const a = i.functionsExecutedState;
|
|
11264
11276
|
switch (a) {
|
|
11265
|
-
case
|
|
11277
|
+
case Ir.NOT_EXECUTED:
|
|
11266
11278
|
break;
|
|
11267
|
-
case
|
|
11279
|
+
case Ir.STOP_EXECUTION:
|
|
11268
11280
|
break;
|
|
11269
|
-
case
|
|
11281
|
+
case Ir.SUCCESS:
|
|
11270
11282
|
this._applyResult(i);
|
|
11271
11283
|
break;
|
|
11272
|
-
case
|
|
11284
|
+
case Ir.INITIAL:
|
|
11273
11285
|
break;
|
|
11274
11286
|
}
|
|
11275
11287
|
this._commandService.executeCommand(
|
|
11276
|
-
|
|
11288
|
+
Dn.id,
|
|
11277
11289
|
{
|
|
11278
11290
|
functionsExecutedState: a
|
|
11279
11291
|
},
|
|
@@ -11283,7 +11295,7 @@ let $n = class extends De {
|
|
|
11283
11295
|
);
|
|
11284
11296
|
}), this._calculateFormulaService.executionInProgressListener$.subscribe((i) => {
|
|
11285
11297
|
this._commandService.executeCommand(
|
|
11286
|
-
|
|
11298
|
+
Dn.id,
|
|
11287
11299
|
{
|
|
11288
11300
|
stageInfo: i
|
|
11289
11301
|
},
|
|
@@ -11300,7 +11312,7 @@ let $n = class extends De {
|
|
|
11300
11312
|
return;
|
|
11301
11313
|
}
|
|
11302
11314
|
(t || s) && (this._formulaDataModel.clearPreviousArrayFormulaCellData(n), this._formulaDataModel.mergeArrayFormulaCellData(r), this._formulaDataModel.mergeArrayFormulaRange(t), this._commandService.executeCommand(
|
|
11303
|
-
|
|
11315
|
+
Ts.id,
|
|
11304
11316
|
{
|
|
11305
11317
|
arrayFormulaRange: this._formulaDataModel.getArrayFormulaRange(),
|
|
11306
11318
|
arrayFormulaCellData: this._formulaDataModel.getArrayFormulaCellData(),
|
|
@@ -11318,7 +11330,7 @@ let $n = class extends De {
|
|
|
11318
11330
|
onlyLocal: !0
|
|
11319
11331
|
}
|
|
11320
11332
|
), u.length > 0 && this._commandService.executeCommand(
|
|
11321
|
-
|
|
11333
|
+
ks.id,
|
|
11322
11334
|
{
|
|
11323
11335
|
result: u
|
|
11324
11336
|
},
|
|
@@ -11337,11 +11349,11 @@ let $n = class extends De {
|
|
|
11337
11349
|
);
|
|
11338
11350
|
}
|
|
11339
11351
|
};
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
],
|
|
11352
|
+
Yn = vh([
|
|
11353
|
+
Ds(0, Dr),
|
|
11354
|
+
Ds(1, oa),
|
|
11355
|
+
Ds(2, ye(br))
|
|
11356
|
+
], Yn);
|
|
11345
11357
|
const Wi = /[\[\]]/g;
|
|
11346
11358
|
function Qi(i, a) {
|
|
11347
11359
|
if (Wi.test(i)) {
|
|
@@ -11350,7 +11362,7 @@ function Qi(i, a) {
|
|
|
11350
11362
|
}
|
|
11351
11363
|
return Number(i) - 1;
|
|
11352
11364
|
}
|
|
11353
|
-
function
|
|
11365
|
+
function ws(i, a = 0, e = 0) {
|
|
11354
11366
|
i = i.toLocaleUpperCase();
|
|
11355
11367
|
const t = i.split(/[RC]/), r = t[1], n = t[2], s = Qi(r, a), o = Qi(n, e);
|
|
11356
11368
|
return {
|
|
@@ -11362,7 +11374,7 @@ function Ds(i, a = 0, e = 0) {
|
|
|
11362
11374
|
function Ih(i, a = 0, e = 0) {
|
|
11363
11375
|
const { refBody: t, sheetName: r, unitId: n } = _a(i), s = t.indexOf(":");
|
|
11364
11376
|
if (s === -1) {
|
|
11365
|
-
const C =
|
|
11377
|
+
const C = ws(t, a, e), E = C.row, R = C.column, y = C.absoluteRefType;
|
|
11366
11378
|
return {
|
|
11367
11379
|
unitId: n,
|
|
11368
11380
|
sheetName: r,
|
|
@@ -11376,7 +11388,7 @@ function Ih(i, a = 0, e = 0) {
|
|
|
11376
11388
|
}
|
|
11377
11389
|
};
|
|
11378
11390
|
}
|
|
11379
|
-
const o = t.substring(0, s), u = t.substring(s + 1), c =
|
|
11391
|
+
const o = t.substring(0, s), u = t.substring(s + 1), c = ws(o, a, e), l = ws(u, a, e), f = c.row, m = c.column, d = l.row, _ = l.column;
|
|
11380
11392
|
return {
|
|
11381
11393
|
unitId: n,
|
|
11382
11394
|
sheetName: r,
|
|
@@ -11391,10 +11403,10 @@ function Ih(i, a = 0, e = 0) {
|
|
|
11391
11403
|
};
|
|
11392
11404
|
}
|
|
11393
11405
|
function Fh(i) {
|
|
11394
|
-
const a =
|
|
11406
|
+
const a = fn(i.startRow, i.startAbsoluteRefType, !0), e = fn(i.startColumn, i.startAbsoluteRefType, !1), t = fn(i.endRow, i.endAbsoluteRefType, !0), r = fn(i.endColumn, i.endAbsoluteRefType, !1);
|
|
11395
11407
|
return a === t && e === r ? `R${a}C${e}` : `R${a}C${e}:R${t}C${r}`;
|
|
11396
11408
|
}
|
|
11397
|
-
function
|
|
11409
|
+
function fn(i, a = Pe.ALL, e) {
|
|
11398
11410
|
switch (i += 1, a) {
|
|
11399
11411
|
case Pe.ALL:
|
|
11400
11412
|
return `${i}`;
|
|
@@ -11416,7 +11428,7 @@ function rr(i) {
|
|
|
11416
11428
|
}
|
|
11417
11429
|
return a.isError(), a;
|
|
11418
11430
|
}
|
|
11419
|
-
function
|
|
11431
|
+
function en(...i) {
|
|
11420
11432
|
for (let a = 0; a < i.length; a++) {
|
|
11421
11433
|
const e = rr(i[a]);
|
|
11422
11434
|
if (e.isError())
|
|
@@ -11765,13 +11777,13 @@ class N {
|
|
|
11765
11777
|
return a;
|
|
11766
11778
|
}
|
|
11767
11779
|
createReferenceObject(a, e) {
|
|
11768
|
-
const t = a.getForcedUnitId() || a.getDefaultUnitId() || "", r = a.getForcedSheetId() || a.getDefaultUnitId() || "", n = a.getForcedSheetName(), o =
|
|
11780
|
+
const t = a.getForcedUnitId() || a.getDefaultUnitId() || "", r = a.getForcedSheetId() || a.getDefaultUnitId() || "", n = a.getForcedSheetName(), o = vs({
|
|
11769
11781
|
unitId: t,
|
|
11770
11782
|
sheetName: n,
|
|
11771
11783
|
range: e
|
|
11772
11784
|
});
|
|
11773
11785
|
let u;
|
|
11774
|
-
return
|
|
11786
|
+
return Xr(o) ? u = new Sa(o) : Ao(o) ? u = new wa(o) : Eo(o) ? u = new Da(o) : u = new jn(e, r, t), this._setReferenceDefault(a, u);
|
|
11775
11787
|
}
|
|
11776
11788
|
_setReferenceDefault(a, e) {
|
|
11777
11789
|
if (this.unitId == null || this.subUnitId == null)
|
|
@@ -11792,7 +11804,7 @@ class Bh extends N {
|
|
|
11792
11804
|
calculate(e, t, r) {
|
|
11793
11805
|
if (e.isError())
|
|
11794
11806
|
return e;
|
|
11795
|
-
const { isError: n, errorObject: s, variants: o } =
|
|
11807
|
+
const { isError: n, errorObject: s, variants: o } = en(t, r);
|
|
11796
11808
|
if (n)
|
|
11797
11809
|
return s;
|
|
11798
11810
|
const { isError: u, errorObject: c, variants: l } = I(...o);
|
|
@@ -11842,7 +11854,7 @@ const $h = [
|
|
|
11842
11854
|
[Bh, ca.ARRAY_CONSTRAIN],
|
|
11843
11855
|
[kh, ca.FLATTEN]
|
|
11844
11856
|
];
|
|
11845
|
-
var
|
|
11857
|
+
var Or;
|
|
11846
11858
|
((i) => {
|
|
11847
11859
|
const a = 0.636619772;
|
|
11848
11860
|
function e(n, s) {
|
|
@@ -11981,7 +11993,7 @@ var Vr;
|
|
|
11981
11993
|
}
|
|
11982
11994
|
return r(o, l, 2, 1);
|
|
11983
11995
|
})();
|
|
11984
|
-
})(
|
|
11996
|
+
})(Or || (Or = {}));
|
|
11985
11997
|
function Ua(i) {
|
|
11986
11998
|
return /^[01]{1,10}$/.test(i);
|
|
11987
11999
|
}
|
|
@@ -12050,7 +12062,7 @@ function Yh(i) {
|
|
|
12050
12062
|
}
|
|
12051
12063
|
return i < 1 ? t : -t;
|
|
12052
12064
|
}
|
|
12053
|
-
function
|
|
12065
|
+
function Ar(i, a = 1) {
|
|
12054
12066
|
let e = Math.floor(i);
|
|
12055
12067
|
if (i < 0)
|
|
12056
12068
|
return Number.NaN;
|
|
@@ -12108,7 +12120,7 @@ function Wh(i) {
|
|
|
12108
12120
|
}
|
|
12109
12121
|
return e;
|
|
12110
12122
|
}
|
|
12111
|
-
function
|
|
12123
|
+
function Er(i, a) {
|
|
12112
12124
|
return i.map((e) => a[0].map(
|
|
12113
12125
|
(t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
|
|
12114
12126
|
));
|
|
@@ -12202,7 +12214,7 @@ function Xh(i) {
|
|
|
12202
12214
|
const { matrixU: e, matrixS: t, matrixV: r } = a, n = Et(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];
|
|
12203
12215
|
for (let u = 0; u < t.length; u++)
|
|
12204
12216
|
Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
|
|
12205
|
-
return
|
|
12217
|
+
return Er(r, Er(s, n));
|
|
12206
12218
|
}
|
|
12207
12219
|
function Kh(i) {
|
|
12208
12220
|
const a = Et(i), e = a.length, t = a[0].length;
|
|
@@ -12211,14 +12223,14 @@ function Kh(i) {
|
|
|
12211
12223
|
const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
|
|
12212
12224
|
let o = Number.EPSILON, u = 0, c = 0, l = 0;
|
|
12213
12225
|
for (let C = 0; C < t; C++) {
|
|
12214
|
-
if (r[C] = u, c =
|
|
12226
|
+
if (r[C] = u, c = Ls(a, C, e, C, C), c <= 1e-64 / o)
|
|
12215
12227
|
u = 0;
|
|
12216
12228
|
else {
|
|
12217
12229
|
u = Math.sqrt(c), a[C][C] >= 0 && (u = -u);
|
|
12218
12230
|
const R = a[C][C] * u - c;
|
|
12219
12231
|
a[C][C] -= u;
|
|
12220
12232
|
for (let y = C + 1; y < t; y++) {
|
|
12221
|
-
c =
|
|
12233
|
+
c = Ls(a, C, e, C, y);
|
|
12222
12234
|
for (let p = C; p < e; p++)
|
|
12223
12235
|
a[p][y] += c / R * a[p][C];
|
|
12224
12236
|
}
|
|
@@ -12263,7 +12275,7 @@ function Kh(i) {
|
|
|
12263
12275
|
a[C][E] = 0;
|
|
12264
12276
|
if (u !== 0) {
|
|
12265
12277
|
for (let E = C + 1; E < t; E++) {
|
|
12266
|
-
c =
|
|
12278
|
+
c = Ls(a, C + 1, e, C, E);
|
|
12267
12279
|
for (let R = C; R < e; R++)
|
|
12268
12280
|
a[R][E] += c / (a[C][C] * u) * a[R][C];
|
|
12269
12281
|
}
|
|
@@ -12290,7 +12302,7 @@ function Kh(i) {
|
|
|
12290
12302
|
if (!R) {
|
|
12291
12303
|
let S = 0, D = 1;
|
|
12292
12304
|
for (let w = y; w < C + 1 && (m = D * r[w], d = n[w], r[w] *= S, !(Math.abs(m) <= o)); w++) {
|
|
12293
|
-
_ =
|
|
12305
|
+
_ = mn(m, d), n[w] = _, S = d / _, D = -m / _;
|
|
12294
12306
|
for (let L = 0; L < e; L++) {
|
|
12295
12307
|
const T = a[L][y - 1], j = a[L][w];
|
|
12296
12308
|
a[L][y - 1] = T * S + j * D, a[L][w] = -T * D + j * S;
|
|
@@ -12308,16 +12320,16 @@ function Kh(i) {
|
|
|
12308
12320
|
if (E >= 49)
|
|
12309
12321
|
return null;
|
|
12310
12322
|
let p = n[y];
|
|
12311
|
-
m = ((n[C - 1] - n[C]) * (n[C - 1] + n[C]) + (r[C - 1] - r[C]) * (r[C - 1] + r[C])) / (2 * r[C] * n[C - 1]), _ =
|
|
12323
|
+
m = ((n[C - 1] - n[C]) * (n[C - 1] + n[C]) + (r[C - 1] - r[C]) * (r[C - 1] + r[C])) / (2 * r[C] * n[C - 1]), _ = mn(m, 1), m < 0 ? m = ((p - n[C]) * (p + n[C]) + r[C] * (n[C - 1] / (m - _) - r[C])) / p : m = ((p - n[C]) * (p + n[C]) + r[C] * (n[C - 1] / (m + _) - r[C])) / p;
|
|
12312
12324
|
let V = 1, M = 1;
|
|
12313
12325
|
for (let S = y + 1; S < C + 1; S++) {
|
|
12314
12326
|
let D = r[S], w = n[S];
|
|
12315
|
-
d = M * D, D *= V, _ =
|
|
12327
|
+
d = M * D, D *= V, _ = mn(m, d), r[S - 1] = _, V = m / _, M = d / _, m = p * V + D * M, d = w * M, D = -p * M + D * V, w *= V;
|
|
12316
12328
|
for (let L = 0; L < t; L++) {
|
|
12317
12329
|
const T = s[L][S - 1], j = s[L][S];
|
|
12318
12330
|
s[L][S - 1] = T * V + j * M, s[L][S] = -T * M + j * V;
|
|
12319
12331
|
}
|
|
12320
|
-
_ =
|
|
12332
|
+
_ = mn(m, d), n[S - 1] = _, V = m / _, M = d / _, m = V * D + M * w, p = -M * D + V * w;
|
|
12321
12333
|
for (let L = 0; L < e; L++) {
|
|
12322
12334
|
const T = a[L][S - 1], j = a[L][S];
|
|
12323
12335
|
a[L][S - 1] = T * V + j * M, a[L][S] = -T * M + j * V;
|
|
@@ -12348,11 +12360,11 @@ function Kh(i) {
|
|
|
12348
12360
|
matrixV: s
|
|
12349
12361
|
};
|
|
12350
12362
|
}
|
|
12351
|
-
function
|
|
12363
|
+
function mn(i, a) {
|
|
12352
12364
|
let e = 0;
|
|
12353
12365
|
return Math.abs(i) > Math.abs(a) ? (e = a / i, Math.abs(i) * Math.sqrt(1 + e * e)) : a !== 0 ? (e = i / a, Math.abs(a) * Math.sqrt(1 + e * e)) : 0;
|
|
12354
12366
|
}
|
|
12355
|
-
function
|
|
12367
|
+
function Ls(i, a, e, t, r) {
|
|
12356
12368
|
let n = 0;
|
|
12357
12369
|
for (let s = a; s < e; s++)
|
|
12358
12370
|
n += i[s][t] * i[s][r];
|
|
@@ -12364,7 +12376,7 @@ function Xi(i, a, e, t, r) {
|
|
|
12364
12376
|
n += i[t][s] * i[r][s];
|
|
12365
12377
|
return n;
|
|
12366
12378
|
}
|
|
12367
|
-
const
|
|
12379
|
+
const hn = /* @__PURE__ */ new Map([
|
|
12368
12380
|
["I", 1],
|
|
12369
12381
|
["V", 5],
|
|
12370
12382
|
["X", 10],
|
|
@@ -12406,7 +12418,7 @@ const mn = /* @__PURE__ */ new Map([
|
|
|
12406
12418
|
[1, 4, 5, 9, 10, 40, 45, 49, 50, 90, 95, 99, 100, 400, 450, 490, 495, 499, 500, 900, 950, 990, 995, 999, 1e3, 4e3]
|
|
12407
12419
|
];
|
|
12408
12420
|
function fu(i, a, e) {
|
|
12409
|
-
return i <= 0 ? 0 : i >= 1 ? 1 :
|
|
12421
|
+
return i <= 0 ? 0 : i >= 1 ? 1 : ls(i, a, e);
|
|
12410
12422
|
}
|
|
12411
12423
|
function Jh(i, a, e) {
|
|
12412
12424
|
return i <= 0 || i >= 1 ? 0 : a === 1 && e === 1 ? 1 : a < 512 && e < 512 ? i ** (a - 1) * (1 - i) ** (e - 1) / ka(a, e) : Math.exp((a - 1) * Math.log(i) + (e - 1) * Math.log(1 - i) - $a(a, e));
|
|
@@ -12432,12 +12444,12 @@ function Ba(i, a, e) {
|
|
|
12432
12444
|
for (let c = 0; c < 10; c++) {
|
|
12433
12445
|
if (r === 0 || r === 1)
|
|
12434
12446
|
return r;
|
|
12435
|
-
if (s =
|
|
12447
|
+
if (s = ls(r, a, e) - i, o = Math.exp((a - 1) * Math.log(r) + (e - 1) * Math.log(1 - r) + n), u = s / o, r -= o = u / (1 - 0.5 * Math.min(1, u * ((a - 1) / r - (e - 1) / (1 - r)))), r <= 0 && (r = 0.5 * (r + o)), r >= 1 && (r = 0.5 * (r + o + 1)), Math.abs(o) < t * r && c > 0)
|
|
12436
12448
|
break;
|
|
12437
12449
|
}
|
|
12438
12450
|
return r;
|
|
12439
12451
|
}
|
|
12440
|
-
function
|
|
12452
|
+
function ls(i, a, e) {
|
|
12441
12453
|
const t = i === 0 || i === 1 ? 0 : Math.exp(gt(a + e) - gt(a) - gt(e) + a * Math.log(i) + e * Math.log(1 - i));
|
|
12442
12454
|
return i < (a + 1) / (a + e + 2) ? t * Ki(i, a, e) / a : 1 - t * Ki(1 - i, e, a) / e;
|
|
12443
12455
|
}
|
|
@@ -12453,7 +12465,7 @@ function Ki(i, a, e) {
|
|
|
12453
12465
|
return o;
|
|
12454
12466
|
}
|
|
12455
12467
|
function ka(i, a) {
|
|
12456
|
-
return i + a > 170 ? Math.exp($a(i, a)) :
|
|
12468
|
+
return i + a > 170 ? Math.exp($a(i, a)) : Nn(i) * Nn(a) / Nn(i + a);
|
|
12457
12469
|
}
|
|
12458
12470
|
function $a(i, a) {
|
|
12459
12471
|
return gt(i) + gt(a) - gt(i + a);
|
|
@@ -12483,7 +12495,7 @@ function hu(i, a) {
|
|
|
12483
12495
|
return i <= 0 ? 0 : i >= 1 ? 1 / 0 : 2 * Cu(i, a / 2);
|
|
12484
12496
|
}
|
|
12485
12497
|
function Ga(i, a, e) {
|
|
12486
|
-
return i < 0 ? 0 :
|
|
12498
|
+
return i < 0 ? 0 : ls(a * i / (a * i + e), a / 2, e / 2);
|
|
12487
12499
|
}
|
|
12488
12500
|
function tg(i, a, e) {
|
|
12489
12501
|
if (i < 0)
|
|
@@ -12518,7 +12530,7 @@ function du(i, a, e) {
|
|
|
12518
12530
|
const l = u / c;
|
|
12519
12531
|
return s - l * o + l * i;
|
|
12520
12532
|
}
|
|
12521
|
-
function
|
|
12533
|
+
function Nn(i) {
|
|
12522
12534
|
const a = [
|
|
12523
12535
|
-1.716185138865495,
|
|
12524
12536
|
24.76565080557592,
|
|
@@ -12651,7 +12663,7 @@ function ug(i, a, e) {
|
|
|
12651
12663
|
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));
|
|
12652
12664
|
}
|
|
12653
12665
|
function cg(i, a, e) {
|
|
12654
|
-
return Math.exp(
|
|
12666
|
+
return Math.exp(fs(i, a, e));
|
|
12655
12667
|
}
|
|
12656
12668
|
function lg(i, a, e) {
|
|
12657
12669
|
if (i < 0)
|
|
@@ -12664,13 +12676,13 @@ function lg(i, a, e) {
|
|
|
12664
12676
|
function qa(i, a, e) {
|
|
12665
12677
|
return i < 0 ? 0 : sr(i + a - 1, a - 1) * e ** a * (1 - e) ** i;
|
|
12666
12678
|
}
|
|
12667
|
-
function
|
|
12679
|
+
function tn(i, a, e) {
|
|
12668
12680
|
return 0.5 * (1 + nr((i - a) / Math.sqrt(2 * e * e)));
|
|
12669
12681
|
}
|
|
12670
12682
|
function Au(i, a, e) {
|
|
12671
12683
|
return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(e) - (i - a) ** 2 / (2 * e * e));
|
|
12672
12684
|
}
|
|
12673
|
-
function
|
|
12685
|
+
function fs(i, a, e) {
|
|
12674
12686
|
return -1.4142135623730951 * e * Yh(2 * i) + a;
|
|
12675
12687
|
}
|
|
12676
12688
|
function fg(i, a) {
|
|
@@ -12680,17 +12692,17 @@ function fg(i, a) {
|
|
|
12680
12692
|
return e;
|
|
12681
12693
|
}
|
|
12682
12694
|
function Eu(i, a) {
|
|
12683
|
-
return Math.exp(-a) * a ** i /
|
|
12695
|
+
return Math.exp(-a) * a ** i / Ar(i);
|
|
12684
12696
|
}
|
|
12685
|
-
function
|
|
12686
|
-
const e = 0.5 *
|
|
12697
|
+
function rn(i, a) {
|
|
12698
|
+
const e = 0.5 * ls(a / (i ** 2 + a), a / 2, 0.5);
|
|
12687
12699
|
return i < 0 ? e : 1 - e;
|
|
12688
12700
|
}
|
|
12689
12701
|
function mg(i, a) {
|
|
12690
12702
|
const e = (1 + i ** 2 / a) ** (-(a + 1) / 2);
|
|
12691
12703
|
return 1 / (Math.sqrt(a) * ka(0.5, a / 2)) * e;
|
|
12692
12704
|
}
|
|
12693
|
-
function
|
|
12705
|
+
function ms(i, a) {
|
|
12694
12706
|
let e = Ba(2 * Math.min(i, 1 - i), 0.5 * a, 0.5);
|
|
12695
12707
|
return e = Math.sqrt(a * (1 - e) / e), i > 0.5 ? e : -e;
|
|
12696
12708
|
}
|
|
@@ -12728,7 +12740,7 @@ function st(i, a, e, t, r) {
|
|
|
12728
12740
|
noCalculate: o
|
|
12729
12741
|
};
|
|
12730
12742
|
}
|
|
12731
|
-
function
|
|
12743
|
+
function hs(i, a, e) {
|
|
12732
12744
|
const t = i.isArray() ? i.getRowCount() : 1, r = i.isArray() ? i.getColumnCount() : 1;
|
|
12733
12745
|
let n = t, s = r;
|
|
12734
12746
|
if (a && !a.isNull() && (n = a.isArray() ? a.getRowCount() : 1, s = a.isArray() ? a.getColumnCount() : 1, t === 1 && s !== r || r === 1 && n !== t || t !== 1 && r !== 1 && (n !== t || s !== r)))
|
|
@@ -12762,7 +12774,7 @@ function bt(i) {
|
|
|
12762
12774
|
}
|
|
12763
12775
|
return t;
|
|
12764
12776
|
}
|
|
12765
|
-
function
|
|
12777
|
+
function gs(i, a) {
|
|
12766
12778
|
const e = [];
|
|
12767
12779
|
let t = 1;
|
|
12768
12780
|
for (let r = 0; r < i; r++) {
|
|
@@ -12772,7 +12784,7 @@ function hs(i, a) {
|
|
|
12772
12784
|
}
|
|
12773
12785
|
return e;
|
|
12774
12786
|
}
|
|
12775
|
-
function
|
|
12787
|
+
function ds(i, a, e, t) {
|
|
12776
12788
|
let r = a;
|
|
12777
12789
|
t && (r = a.map((o) => Math.log(o)));
|
|
12778
12790
|
let n, s;
|
|
@@ -12834,17 +12846,17 @@ function gg(i, a) {
|
|
|
12834
12846
|
intercept: 0
|
|
12835
12847
|
};
|
|
12836
12848
|
}
|
|
12837
|
-
function
|
|
12849
|
+
function Cs(i, a, e, t, r) {
|
|
12838
12850
|
const n = i.length === 1 && i[0].length > 1;
|
|
12839
12851
|
let s = i;
|
|
12840
12852
|
r && (s = i.map((C) => C.map((E) => Math.log(E))));
|
|
12841
12853
|
let o = a, u = e;
|
|
12842
12854
|
n && (s = Et(s), o = Et(o), u = Et(u)), t && (o = o.map((C) => [...C, 1]));
|
|
12843
|
-
const c = Et(o), l =
|
|
12855
|
+
const c = Et(o), l = Er(c, o), f = Er(c, s);
|
|
12844
12856
|
let m = Qh(l);
|
|
12845
12857
|
if (!m && (m = Xh(l), !m))
|
|
12846
12858
|
return g.create(h.NA);
|
|
12847
|
-
let d =
|
|
12859
|
+
let d = Er(m, f);
|
|
12848
12860
|
t || d.push([0]), d = Et(d);
|
|
12849
12861
|
const _ = d[0].pop();
|
|
12850
12862
|
if (d[0].reverse(), d[0].push(_), r)
|
|
@@ -13321,7 +13333,7 @@ class Iu extends N {
|
|
|
13321
13333
|
const [p, V, M] = y, S = +p.getValue(), D = +V.getValue(), w = Math.floor(+M.getValue());
|
|
13322
13334
|
if (S <= 0 || S >= 1 || D <= 0 || w < 1)
|
|
13323
13335
|
return g.create(h.NUM);
|
|
13324
|
-
const L = Math.abs(
|
|
13336
|
+
const L = Math.abs(fs(S / 2, 0, 1) * D / Math.sqrt(w));
|
|
13325
13337
|
return b.create(L);
|
|
13326
13338
|
});
|
|
13327
13339
|
return n === 1 && s === 1 ? l.get(0, 0) : l;
|
|
@@ -13724,7 +13736,7 @@ class qu extends N {
|
|
|
13724
13736
|
if (C <= 0)
|
|
13725
13737
|
return g.create(h.NUM);
|
|
13726
13738
|
let R;
|
|
13727
|
-
return E ? R =
|
|
13739
|
+
return E ? R = tn(d, _, C) : R = Au(d, _, C), b.create(R);
|
|
13728
13740
|
}
|
|
13729
13741
|
}
|
|
13730
13742
|
class Xu extends N {
|
|
@@ -13755,7 +13767,7 @@ class Xu extends N {
|
|
|
13755
13767
|
const [u, c, l] = o, f = +u.getValue(), m = +c.getValue(), d = +l.getValue();
|
|
13756
13768
|
if (f <= 0 || f >= 1 || d <= 0)
|
|
13757
13769
|
return g.create(h.NUM);
|
|
13758
|
-
const _ =
|
|
13770
|
+
const _ = fs(f, m, d);
|
|
13759
13771
|
return b.create(_);
|
|
13760
13772
|
}
|
|
13761
13773
|
}
|
|
@@ -13779,7 +13791,7 @@ class Ku extends N {
|
|
|
13779
13791
|
const [s] = n, o = +s.getValue();
|
|
13780
13792
|
if (o <= 0 || o >= 1)
|
|
13781
13793
|
return g.create(h.NUM);
|
|
13782
|
-
const u =
|
|
13794
|
+
const u = fs(o, 0, 1);
|
|
13783
13795
|
return b.create(u);
|
|
13784
13796
|
}
|
|
13785
13797
|
}
|
|
@@ -13964,7 +13976,7 @@ class nc extends N {
|
|
|
13964
13976
|
const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
|
|
13965
13977
|
if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
|
|
13966
13978
|
return g.create(h.NUM);
|
|
13967
|
-
const f = Math.abs(
|
|
13979
|
+
const f = Math.abs(ms(c / 2, l));
|
|
13968
13980
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
13969
13981
|
}
|
|
13970
13982
|
}
|
|
@@ -14011,7 +14023,7 @@ class sc extends N {
|
|
|
14011
14023
|
const { isError: s, errorObject: o, x: u, degFreedom: c } = this._getTDistParamByArrayValues(e, t, n);
|
|
14012
14024
|
if (s)
|
|
14013
14025
|
return o;
|
|
14014
|
-
let l =
|
|
14026
|
+
let l = rn(-u, c);
|
|
14015
14027
|
return r === 2 && (l *= 2), Number.isNaN(l) || !Number.isFinite(l) ? g.create(h.NUM) : b.create(l);
|
|
14016
14028
|
}
|
|
14017
14029
|
_getArrayValues(e) {
|
|
@@ -14264,7 +14276,7 @@ class uc extends N {
|
|
|
14264
14276
|
}
|
|
14265
14277
|
if (d <= 0)
|
|
14266
14278
|
return g.create(h.NUM);
|
|
14267
|
-
const _ = (f / l - c) / (d / Math.sqrt(l)), C = 1 -
|
|
14279
|
+
const _ = (f / l - c) / (d / Math.sqrt(l)), C = 1 - tn(_, 0, 1);
|
|
14268
14280
|
return Number.isNaN(C) || !Number.isFinite(C) ? g.create(h.NUM) : b.create(C);
|
|
14269
14281
|
}
|
|
14270
14282
|
_getArrayValues(e) {
|
|
@@ -14446,7 +14458,7 @@ class Eg extends N {
|
|
|
14446
14458
|
const { isError: t, errorObject: r, variants: n } = I(e);
|
|
14447
14459
|
if (t)
|
|
14448
14460
|
return r;
|
|
14449
|
-
const [s] = n, o = +s.getValue(), u =
|
|
14461
|
+
const [s] = n, o = +s.getValue(), u = tn(o, 0, 1);
|
|
14450
14462
|
return b.create(u);
|
|
14451
14463
|
}
|
|
14452
14464
|
}
|
|
@@ -14537,7 +14549,7 @@ class yg extends N {
|
|
|
14537
14549
|
const [u, c, l] = o, f = +u.getValue(), m = Math.floor(+c.getValue()), d = Math.floor(+l.getValue());
|
|
14538
14550
|
if (f < 0 || m < 1 || m > 10 ** 10 || d < 1 || d > 2)
|
|
14539
14551
|
return g.create(h.NUM);
|
|
14540
|
-
let _ =
|
|
14552
|
+
let _ = rn(-f, m);
|
|
14541
14553
|
return d === 2 && (_ *= 2), Number.isNaN(_) || !Number.isFinite(_) ? g.create(h.NUM) : b.create(_);
|
|
14542
14554
|
}
|
|
14543
14555
|
}
|
|
@@ -15084,7 +15096,7 @@ function pe(i) {
|
|
|
15084
15096
|
let r = (t - a.getTime()) / (1e3 * 3600 * 24);
|
|
15085
15097
|
return t > e.getTime() && (r += 1), Math.floor(r) + 1;
|
|
15086
15098
|
}
|
|
15087
|
-
function
|
|
15099
|
+
function nn(i) {
|
|
15088
15100
|
const a = new Date(Date.UTC(1900, 0, 1, 0, 0, 0)), e = new Date(Date.UTC(1900, 1, 28, 0, 0, 0));
|
|
15089
15101
|
let r = (i.getTime() - a.getTime()) / (1e3 * 3600 * 24);
|
|
15090
15102
|
return i > e && (r += 1), r + 1;
|
|
@@ -15108,10 +15120,10 @@ function Za(i) {
|
|
|
15108
15120
|
const r = t.getFullYear(), n = (t.getMonth() + 1).toString().padStart(2, "0"), s = t.getDate().toString().padStart(2, "0"), o = `${r}-${n}-${s}`;
|
|
15109
15121
|
return i.replace(/\//g, "-").split("-").map((c) => c.padStart(2, "0")).join("-") === o;
|
|
15110
15122
|
}
|
|
15111
|
-
function
|
|
15123
|
+
function Hn(i) {
|
|
15112
15124
|
return yt.parseDate(i);
|
|
15113
15125
|
}
|
|
15114
|
-
function
|
|
15126
|
+
function Gn(i) {
|
|
15115
15127
|
return yt.parseTime(i);
|
|
15116
15128
|
}
|
|
15117
15129
|
function za(i) {
|
|
@@ -15147,11 +15159,11 @@ const cc = {
|
|
|
15147
15159
|
17: [6]
|
|
15148
15160
|
// Saturday only
|
|
15149
15161
|
};
|
|
15150
|
-
function
|
|
15162
|
+
function qr(i) {
|
|
15151
15163
|
return !!(typeof i == "string" && /^[0|1]{7}/.test(i) || cc[Number(i)]);
|
|
15152
15164
|
}
|
|
15153
15165
|
function lc(i) {
|
|
15154
|
-
if (!
|
|
15166
|
+
if (!qr(i))
|
|
15155
15167
|
return [];
|
|
15156
15168
|
if (typeof i == "string" && /^[0|1]{7}/.test(i)) {
|
|
15157
15169
|
const a = [];
|
|
@@ -15161,7 +15173,7 @@ function lc(i) {
|
|
|
15161
15173
|
}
|
|
15162
15174
|
return cc[Number(i)] || [];
|
|
15163
15175
|
}
|
|
15164
|
-
function
|
|
15176
|
+
function Wn(i, a, e = 1, t) {
|
|
15165
15177
|
const r = lc(e), n = Math.floor(i), s = Math.floor(a), o = s > n ? n : s;
|
|
15166
15178
|
let u = 0;
|
|
15167
15179
|
const c = Math.abs(Math.floor(a) - Math.floor(i)) + 1;
|
|
@@ -15174,7 +15186,7 @@ function Gn(i, a, e = 1, t) {
|
|
|
15174
15186
|
}
|
|
15175
15187
|
return s >= n ? u : -u;
|
|
15176
15188
|
}
|
|
15177
|
-
function
|
|
15189
|
+
function Qn(i, a, e = 1, t) {
|
|
15178
15190
|
const r = lc(e), n = Math.floor(i);
|
|
15179
15191
|
let s = n, o = Math.abs(a);
|
|
15180
15192
|
for (let u = 1; u <= o; u++) {
|
|
@@ -15200,15 +15212,15 @@ function H(i) {
|
|
|
15200
15212
|
const a = i.getValue();
|
|
15201
15213
|
if (i.isString()) {
|
|
15202
15214
|
let e;
|
|
15203
|
-
if (
|
|
15204
|
-
e = Yn(`${a}`).v;
|
|
15205
|
-
else if (Hn(`${a}`))
|
|
15215
|
+
if (Hn(`${a}`))
|
|
15206
15216
|
e = Hn(`${a}`).v;
|
|
15217
|
+
else if (Gn(`${a}`))
|
|
15218
|
+
e = Gn(`${a}`).v;
|
|
15207
15219
|
else if (q(a))
|
|
15208
15220
|
e = +a;
|
|
15209
15221
|
else
|
|
15210
15222
|
return g.create(h.VALUE);
|
|
15211
|
-
return e instanceof Date && (e =
|
|
15223
|
+
return e instanceof Date && (e = nn(e)), +e < 0 || +e > 2958465 ? g.create(h.NUM) : +e;
|
|
15212
15224
|
} else {
|
|
15213
15225
|
const e = +i.getValue();
|
|
15214
15226
|
return e < 0 || e > 2958465 ? g.create(h.NUM) : e;
|
|
@@ -15289,10 +15301,10 @@ function Gg(i) {
|
|
|
15289
15301
|
return i % 4 === 0 && i % 100 !== 0 || i % 400 === 0 || i === 1900;
|
|
15290
15302
|
}
|
|
15291
15303
|
const Wg = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Qg = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
15292
|
-
function
|
|
15304
|
+
function sn(i, a) {
|
|
15293
15305
|
return Hg(i) ? Wg[a] : Qg[a];
|
|
15294
15306
|
}
|
|
15295
|
-
function
|
|
15307
|
+
function _s(i) {
|
|
15296
15308
|
return Gg(i) ? 366 : 365;
|
|
15297
15309
|
}
|
|
15298
15310
|
function fc(i, a) {
|
|
@@ -15302,20 +15314,20 @@ function fc(i, a) {
|
|
|
15302
15314
|
case 4:
|
|
15303
15315
|
return 360;
|
|
15304
15316
|
case 1:
|
|
15305
|
-
return
|
|
15317
|
+
return _s(ae(i).getUTCFullYear());
|
|
15306
15318
|
case 3:
|
|
15307
15319
|
return 365;
|
|
15308
15320
|
default:
|
|
15309
15321
|
return -1;
|
|
15310
15322
|
}
|
|
15311
15323
|
}
|
|
15312
|
-
function
|
|
15313
|
-
return
|
|
15324
|
+
function Mr(i, a, e) {
|
|
15325
|
+
return sn(i, a) === e;
|
|
15314
15326
|
}
|
|
15315
|
-
function
|
|
15327
|
+
function Sr(i, a) {
|
|
15316
15328
|
let e = i.getUTCFullYear(), t = i.getUTCMonth();
|
|
15317
15329
|
const r = i.getUTCDate();
|
|
15318
|
-
return
|
|
15330
|
+
return Mr(e, t, r) ? (i.setUTCDate(1), i.setUTCMonth(i.getUTCMonth() + a), e = i.getUTCFullYear(), t = i.getUTCMonth(), i.setUTCDate(sn(e, t))) : i.setUTCMonth(i.getUTCMonth() + a), i;
|
|
15319
15331
|
}
|
|
15320
15332
|
class qg extends N {
|
|
15321
15333
|
constructor() {
|
|
@@ -15389,7 +15401,7 @@ class Xg extends N {
|
|
|
15389
15401
|
_ = Math.floor(t) - Math.floor(e);
|
|
15390
15402
|
break;
|
|
15391
15403
|
case "MD":
|
|
15392
|
-
_ = m - u, m < u && (C = new Date(Date.UTC(l, f - 1, 0)), _ +=
|
|
15404
|
+
_ = m - u, m < u && (C = new Date(Date.UTC(l, f - 1, 0)), _ += sn(C.getUTCFullYear(), C.getUTCMonth()));
|
|
15393
15405
|
break;
|
|
15394
15406
|
case "YM":
|
|
15395
15407
|
_ = f - o, (f < o || f === o && m < u) && (_ += 12), m < u && (_ -= 1);
|
|
@@ -15420,11 +15432,11 @@ class Kg extends N {
|
|
|
15420
15432
|
return e;
|
|
15421
15433
|
if (e.isString()) {
|
|
15422
15434
|
const t = `${e.getValue()}`;
|
|
15423
|
-
let r =
|
|
15424
|
-
if (r === null && (r =
|
|
15435
|
+
let r = Hn(t);
|
|
15436
|
+
if (r === null && (r = Gn(t)), r) {
|
|
15425
15437
|
let { v: n, z: s } = r;
|
|
15426
15438
|
if (s && za(s))
|
|
15427
|
-
return n instanceof Date && (n =
|
|
15439
|
+
return n instanceof Date && (n = nn(n)), b.create(Math.trunc(+n));
|
|
15428
15440
|
}
|
|
15429
15441
|
}
|
|
15430
15442
|
return g.create(h.VALUE);
|
|
@@ -15632,7 +15644,7 @@ class r1 extends N {
|
|
|
15632
15644
|
const R = 25569 + l / 864e5;
|
|
15633
15645
|
return b.create(R);
|
|
15634
15646
|
} else {
|
|
15635
|
-
const R =
|
|
15647
|
+
const R = nn(E);
|
|
15636
15648
|
return b.create(R, "yyyy-MM-dd AM/PM hh:mm:ss");
|
|
15637
15649
|
}
|
|
15638
15650
|
}
|
|
@@ -15801,7 +15813,7 @@ class o1 extends N {
|
|
|
15801
15813
|
return u;
|
|
15802
15814
|
if (r)
|
|
15803
15815
|
return this._getResultByHolidays(o, u, r);
|
|
15804
|
-
const c =
|
|
15816
|
+
const c = Wn(o, u);
|
|
15805
15817
|
return b.create(c);
|
|
15806
15818
|
}
|
|
15807
15819
|
_getResultByHolidays(e, t, r) {
|
|
@@ -15826,7 +15838,7 @@ class o1 extends N {
|
|
|
15826
15838
|
return o;
|
|
15827
15839
|
n.push(o);
|
|
15828
15840
|
}
|
|
15829
|
-
const s =
|
|
15841
|
+
const s = Wn(e, t, 1, n);
|
|
15830
15842
|
return b.create(s);
|
|
15831
15843
|
}
|
|
15832
15844
|
}
|
|
@@ -15859,9 +15871,9 @@ class u1 extends N {
|
|
|
15859
15871
|
return o;
|
|
15860
15872
|
let u = 1;
|
|
15861
15873
|
if (r) {
|
|
15862
|
-
if (u = r.getValue(), r.isBoolean() && (u = +u), r.isString() && !
|
|
15874
|
+
if (u = r.getValue(), r.isBoolean() && (u = +u), r.isString() && !qr(u))
|
|
15863
15875
|
return g.create(h.VALUE);
|
|
15864
|
-
if (!
|
|
15876
|
+
if (!qr(u))
|
|
15865
15877
|
return g.create(h.NUM);
|
|
15866
15878
|
}
|
|
15867
15879
|
if (s.isBoolean() || o.isBoolean())
|
|
@@ -15874,7 +15886,7 @@ class u1 extends N {
|
|
|
15874
15886
|
return l;
|
|
15875
15887
|
if (n)
|
|
15876
15888
|
return this._getResultByHolidays(c, l, u, n);
|
|
15877
|
-
const f =
|
|
15889
|
+
const f = Wn(c, l, u);
|
|
15878
15890
|
return b.create(f);
|
|
15879
15891
|
}
|
|
15880
15892
|
_getResultByHolidays(e, t, r, n) {
|
|
@@ -15899,7 +15911,7 @@ class u1 extends N {
|
|
|
15899
15911
|
return u;
|
|
15900
15912
|
s.push(u);
|
|
15901
15913
|
}
|
|
15902
|
-
const o =
|
|
15914
|
+
const o = Wn(e, t, r, s);
|
|
15903
15915
|
return b.create(o);
|
|
15904
15916
|
}
|
|
15905
15917
|
}
|
|
@@ -15910,7 +15922,7 @@ class c1 extends N {
|
|
|
15910
15922
|
A(this, "maxParams", 0);
|
|
15911
15923
|
}
|
|
15912
15924
|
calculate() {
|
|
15913
|
-
const e = /* @__PURE__ */ new Date(), t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds())), r =
|
|
15925
|
+
const e = /* @__PURE__ */ new Date(), t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds())), r = nn(t);
|
|
15914
15926
|
return b.create(r, Fg);
|
|
15915
15927
|
}
|
|
15916
15928
|
}
|
|
@@ -15993,7 +16005,7 @@ class m1 extends N {
|
|
|
15993
16005
|
if (r) {
|
|
15994
16006
|
let { v: n, z: s } = r;
|
|
15995
16007
|
if (s && za(s))
|
|
15996
|
-
return n instanceof Date && (n =
|
|
16008
|
+
return n instanceof Date && (n = nn(n)), b.create(Vm(+n));
|
|
15997
16009
|
}
|
|
15998
16010
|
}
|
|
15999
16011
|
return g.create(h.VALUE);
|
|
@@ -16191,7 +16203,7 @@ class _1 extends N {
|
|
|
16191
16203
|
return g.create(h.VALUE);
|
|
16192
16204
|
if (r)
|
|
16193
16205
|
return this._getResultByHolidays(o, u, r);
|
|
16194
|
-
const c =
|
|
16206
|
+
const c = Qn(o, u);
|
|
16195
16207
|
return typeof c != "number" ? c : b.create(c);
|
|
16196
16208
|
}
|
|
16197
16209
|
_getResultByHolidays(e, t, r) {
|
|
@@ -16216,7 +16228,7 @@ class _1 extends N {
|
|
|
16216
16228
|
return o;
|
|
16217
16229
|
n.push(o);
|
|
16218
16230
|
}
|
|
16219
|
-
const s =
|
|
16231
|
+
const s = Qn(e, t, 1, n);
|
|
16220
16232
|
return typeof s != "number" ? s : b.create(s);
|
|
16221
16233
|
}
|
|
16222
16234
|
}
|
|
@@ -16245,13 +16257,13 @@ class A1 extends N {
|
|
|
16245
16257
|
if (Number.isNaN(l))
|
|
16246
16258
|
return g.create(h.VALUE);
|
|
16247
16259
|
let f = s.getValue();
|
|
16248
|
-
if (s.isBoolean() && (f = +f), s.isString() && (!
|
|
16260
|
+
if (s.isBoolean() && (f = +f), s.isString() && (!qr(f) || f === "1111111"))
|
|
16249
16261
|
return g.create(h.VALUE);
|
|
16250
|
-
if (!
|
|
16262
|
+
if (!qr(f))
|
|
16251
16263
|
return g.create(h.NUM);
|
|
16252
16264
|
if (n)
|
|
16253
16265
|
return this._getResultByHolidays(c, l, f, n);
|
|
16254
|
-
const m =
|
|
16266
|
+
const m = Qn(c, l, f);
|
|
16255
16267
|
return typeof m != "number" ? m : b.create(m);
|
|
16256
16268
|
}
|
|
16257
16269
|
_checkArrayError(e) {
|
|
@@ -16286,7 +16298,7 @@ class A1 extends N {
|
|
|
16286
16298
|
return u;
|
|
16287
16299
|
s.push(u);
|
|
16288
16300
|
}
|
|
16289
|
-
const o =
|
|
16301
|
+
const o = Qn(e, t, r, s);
|
|
16290
16302
|
return typeof o != "number" ? o : b.create(o);
|
|
16291
16303
|
}
|
|
16292
16304
|
}
|
|
@@ -16399,7 +16411,7 @@ class b1 extends N {
|
|
|
16399
16411
|
return g.create(h.VALUE);
|
|
16400
16412
|
if (l < 0)
|
|
16401
16413
|
return g.create(h.NUM);
|
|
16402
|
-
const f =
|
|
16414
|
+
const f = Or.besseli(c, l);
|
|
16403
16415
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
16404
16416
|
}
|
|
16405
16417
|
}
|
|
@@ -16420,7 +16432,7 @@ class p1 extends N {
|
|
|
16420
16432
|
return g.create(h.VALUE);
|
|
16421
16433
|
if (l < 0)
|
|
16422
16434
|
return g.create(h.NUM);
|
|
16423
|
-
const f =
|
|
16435
|
+
const f = Or.besselj(c, l);
|
|
16424
16436
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
16425
16437
|
}
|
|
16426
16438
|
}
|
|
@@ -16441,7 +16453,7 @@ class N1 extends N {
|
|
|
16441
16453
|
return g.create(h.VALUE);
|
|
16442
16454
|
if (l < 0)
|
|
16443
16455
|
return g.create(h.NUM);
|
|
16444
|
-
const f =
|
|
16456
|
+
const f = Or.besselk(c, l);
|
|
16445
16457
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
16446
16458
|
}
|
|
16447
16459
|
}
|
|
@@ -16462,7 +16474,7 @@ class V1 extends N {
|
|
|
16462
16474
|
return g.create(h.VALUE);
|
|
16463
16475
|
if (l < 0)
|
|
16464
16476
|
return g.create(h.NUM);
|
|
16465
|
-
const f =
|
|
16477
|
+
const f = Or.bessely(c, l);
|
|
16466
16478
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
16467
16479
|
}
|
|
16468
16480
|
}
|
|
@@ -18415,7 +18427,7 @@ const Vd = [
|
|
|
18415
18427
|
[Nd, Q.OCT2HEX]
|
|
18416
18428
|
];
|
|
18417
18429
|
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 || {});
|
|
18418
|
-
function
|
|
18430
|
+
function As(i, a, e, t) {
|
|
18419
18431
|
const r = Gt(i, a, e), { days: n } = _e(r, i, t);
|
|
18420
18432
|
return n;
|
|
18421
18433
|
}
|
|
@@ -18424,7 +18436,7 @@ function ze(i, a, e, t) {
|
|
|
18424
18436
|
if (t === 1) {
|
|
18425
18437
|
const n = Gt(i, a, e);
|
|
18426
18438
|
let s = ae(n);
|
|
18427
|
-
s =
|
|
18439
|
+
s = Sr(s, 12 / e);
|
|
18428
18440
|
const o = pe(s);
|
|
18429
18441
|
n < 0 && e === 1 ? r = 365 : r = o - n;
|
|
18430
18442
|
} else t === 3 ? r = 365 / e : r = 360 / e;
|
|
@@ -18434,26 +18446,26 @@ function mc(i, a, e) {
|
|
|
18434
18446
|
const t = ae(i);
|
|
18435
18447
|
let r = ae(a);
|
|
18436
18448
|
for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
|
|
18437
|
-
r =
|
|
18438
|
-
return r =
|
|
18449
|
+
r = Sr(r, -12 / e);
|
|
18450
|
+
return r = Sr(r, 12 / e), pe(r);
|
|
18439
18451
|
}
|
|
18440
18452
|
function ur(i, a, e) {
|
|
18441
18453
|
let t = 0;
|
|
18442
18454
|
const r = ae(i);
|
|
18443
18455
|
let n = ae(a);
|
|
18444
18456
|
for (; n > r; )
|
|
18445
|
-
n =
|
|
18457
|
+
n = Sr(n, -12 / e), t++;
|
|
18446
18458
|
return t;
|
|
18447
18459
|
}
|
|
18448
18460
|
function Gt(i, a, e) {
|
|
18449
18461
|
const t = ae(i);
|
|
18450
18462
|
let r = ae(a);
|
|
18451
18463
|
for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
|
|
18452
|
-
r =
|
|
18464
|
+
r = Sr(r, -12 / e);
|
|
18453
18465
|
return pe(r);
|
|
18454
18466
|
}
|
|
18455
18467
|
function hc(i, a, e, t, r, n) {
|
|
18456
|
-
const s =
|
|
18468
|
+
const s = As(i, a, r, n), o = ze(i, a, r, n), u = ur(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
|
|
18457
18469
|
let m = 0, d = 0;
|
|
18458
18470
|
for (let E = 1; E <= u; E++) {
|
|
18459
18471
|
const R = E + c, y = f / l ** R;
|
|
@@ -18462,7 +18474,7 @@ function hc(i, a, e, t, r, n) {
|
|
|
18462
18474
|
const _ = u + c, C = 100 / l ** _;
|
|
18463
18475
|
return m += _ * C, d += C, m / d / r;
|
|
18464
18476
|
}
|
|
18465
|
-
function
|
|
18477
|
+
function an(i, a, e, t, r) {
|
|
18466
18478
|
let n;
|
|
18467
18479
|
if (i === 0)
|
|
18468
18480
|
n = (e + t) / a;
|
|
@@ -18485,7 +18497,7 @@ function cr(i, a, e, t, r) {
|
|
|
18485
18497
|
return -n;
|
|
18486
18498
|
}
|
|
18487
18499
|
function gc(i, a, e, t, r, n) {
|
|
18488
|
-
const s =
|
|
18500
|
+
const s = an(i, e, t, r, n);
|
|
18489
18501
|
return (a === 1 ? n === 1 ? 0 : -t : n === 1 ? cr(i, a - 2, s, t, 1) - s : cr(i, a - 1, s, t, 0)) * i;
|
|
18490
18502
|
}
|
|
18491
18503
|
function dc(i, a) {
|
|
@@ -18560,22 +18572,22 @@ function er(i, a, e) {
|
|
|
18560
18572
|
return i < a ? t : 0;
|
|
18561
18573
|
}
|
|
18562
18574
|
function _c(i, a, e) {
|
|
18563
|
-
const t = ae(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o =
|
|
18575
|
+
const t = ae(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o = Mr(r, n, s), u = ae(a), c = u.getUTCFullYear(), l = u.getUTCMonth(), f = u.getUTCDate(), m = Mr(c, l, f);
|
|
18564
18576
|
return !(s !== f && !(o && m) || Math.abs((c - r) * 12 + (l - n)) % (12 / e) !== 0);
|
|
18565
18577
|
}
|
|
18566
|
-
function
|
|
18578
|
+
function Ur(i, a, e) {
|
|
18567
18579
|
return Gt(i, a, e) >= 0;
|
|
18568
18580
|
}
|
|
18569
18581
|
function ar(i, a, e) {
|
|
18570
18582
|
let t = ae(i);
|
|
18571
|
-
if (t =
|
|
18572
|
-
const r = t.getUTCFullYear(), n = t.getUTCMonth(), s =
|
|
18583
|
+
if (t = Sr(t, a), e) {
|
|
18584
|
+
const r = t.getUTCFullYear(), n = t.getUTCMonth(), s = sn(r, n);
|
|
18573
18585
|
t.setUTCDate(s);
|
|
18574
18586
|
}
|
|
18575
18587
|
return pe(t);
|
|
18576
18588
|
}
|
|
18577
18589
|
function Sd(i, a, e, t) {
|
|
18578
|
-
const r = ae(i), n = ae(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), m =
|
|
18590
|
+
const r = ae(i), n = ae(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), m = Mr(s, o, u), d = !m && o !== 1 && u > 28 && u < sn(s, o) ? Mr(c, l, f) : m, _ = ar(a, 0, d);
|
|
18579
18591
|
let C = 1 + +(a < _), E = ar(_, e, d);
|
|
18580
18592
|
for (; !(e > 0 ? E >= a : E <= a); )
|
|
18581
18593
|
E = ar(E, e, d), C++;
|
|
@@ -18617,8 +18629,8 @@ function Dd(i, a) {
|
|
|
18617
18629
|
while (Math.abs(_) > 1e-7 && f < 60);
|
|
18618
18630
|
return C;
|
|
18619
18631
|
}
|
|
18620
|
-
function
|
|
18621
|
-
const o = ur(i, a, n), u = ze(i, a, n, s), c =
|
|
18632
|
+
function Vn(i, a, e, t, r, n, s) {
|
|
18633
|
+
const o = ur(i, a, n), u = ze(i, a, n, s), c = As(i, a, n, s);
|
|
18622
18634
|
if (o === 1) {
|
|
18623
18635
|
const m = u - c, d = 100 * e / n + r, _ = t / n * m / u + 1, C = 100 * e / n * c / u;
|
|
18624
18636
|
return d / _ - C;
|
|
@@ -18663,7 +18675,7 @@ class wd extends N {
|
|
|
18663
18675
|
if (l <= 0)
|
|
18664
18676
|
return b.create(0);
|
|
18665
18677
|
l = Gt(r, t, o);
|
|
18666
|
-
const f = 12 / o, m = ae(t), d = m.getUTCFullYear(), _ = m.getUTCMonth(), C = m.getUTCDate(), E =
|
|
18678
|
+
const f = 12 / o, m = ae(t), d = m.getUTCFullYear(), _ = m.getUTCMonth(), C = m.getUTCDate(), E = Mr(d, _, C);
|
|
18667
18679
|
let R = ar(t, -f, E);
|
|
18668
18680
|
if (r > t && c)
|
|
18669
18681
|
for (R = t; R < r; )
|
|
@@ -18769,7 +18781,7 @@ class xd extends N {
|
|
|
18769
18781
|
return g.create(h.VALUE);
|
|
18770
18782
|
if (![1, 2, 4].includes(E) || R < 0 || R > 4 || Math.floor(_) >= Math.floor(C))
|
|
18771
18783
|
return g.create(h.NUM);
|
|
18772
|
-
const y =
|
|
18784
|
+
const y = As(_, C, E, R);
|
|
18773
18785
|
return b.create(y);
|
|
18774
18786
|
}
|
|
18775
18787
|
}
|
|
@@ -18916,7 +18928,7 @@ class Fd extends N {
|
|
|
18916
18928
|
return Number.isNaN(R) || Number.isNaN(y) || Number.isNaN(p) || Number.isNaN(V) || Number.isNaN(M) || Number.isNaN(S) ? g.create(h.VALUE) : R <= 0 || y <= 0 || p <= 0 || V < 1 || M < 1 || V > M || V > y || M > y || ![0, 1].includes(S) ? g.create(h.NUM) : Math.trunc(V) !== V && Math.trunc(M) !== M && Math.trunc(V) === Math.trunc(M) ? b.create(0) : this._getResult(R, y, p, V, M, S);
|
|
18917
18929
|
}
|
|
18918
18930
|
_getResult(e, t, r, n, s, o) {
|
|
18919
|
-
const u =
|
|
18931
|
+
const u = an(e, t, r, 0, o);
|
|
18920
18932
|
let c = 0, l = Math.ceil(n);
|
|
18921
18933
|
l === 1 && (o === 0 && (c = -r), l++);
|
|
18922
18934
|
let f = !1;
|
|
@@ -18945,7 +18957,7 @@ class Bd extends N {
|
|
|
18945
18957
|
return Number.isNaN(R) || Number.isNaN(y) || Number.isNaN(p) || Number.isNaN(V) || Number.isNaN(M) || Number.isNaN(S) ? g.create(h.VALUE) : R <= 0 || y <= 0 || p <= 0 || V < 1 || M < 1 || V > M || ![0, 1].includes(S) ? g.create(h.NUM) : Math.trunc(V) !== V && Math.trunc(M) !== M && Math.trunc(V) === Math.trunc(M) ? b.create(0) : this._getResult(R, y, p, V, M, S);
|
|
18946
18958
|
}
|
|
18947
18959
|
_getResult(e, t, r, n, s, o) {
|
|
18948
|
-
const u =
|
|
18960
|
+
const u = an(e, t, r, 0, o);
|
|
18949
18961
|
let c = 0, l = Math.ceil(n);
|
|
18950
18962
|
l === 1 && (c = o === 0 ? u + r * e : u, l++);
|
|
18951
18963
|
for (let f = l; f <= s; f++)
|
|
@@ -19639,7 +19651,7 @@ class a0 extends N {
|
|
|
19639
19651
|
return b.create(ge);
|
|
19640
19652
|
}
|
|
19641
19653
|
_validDate(e, t, r, n, s) {
|
|
19642
|
-
return this._getDateCorrectOrder(e, t, r, n) && _c(e, t, s) &&
|
|
19654
|
+
return this._getDateCorrectOrder(e, t, r, n) && _c(e, t, s) && Ur(n, e, s);
|
|
19643
19655
|
}
|
|
19644
19656
|
_getDateCorrectOrder(e, t, r, n) {
|
|
19645
19657
|
return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Math.floor(r) > Math.floor(n);
|
|
@@ -19673,7 +19685,7 @@ class i0 extends N {
|
|
|
19673
19685
|
return Number.isNaN(k) || Number.isNaN(G) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN($) ? g.create(h.VALUE) : k < 0 || G <= 0 || ne <= 0 || ![1, 2, 4].includes(z) || $ < 0 || $ > 4 || !this._validDate(L, j, w, T, z) ? g.create(h.NUM) : this._getResult(w, L, T, j, k, G, ne, z, $);
|
|
19674
19686
|
}
|
|
19675
19687
|
_validDate(e, t, r, n, s) {
|
|
19676
|
-
return this._getDateCorrectOrder(e, t, r, n) && _c(e, t, s) &&
|
|
19688
|
+
return this._getDateCorrectOrder(e, t, r, n) && _c(e, t, s) && Ur(n, e, s);
|
|
19677
19689
|
}
|
|
19678
19690
|
_getDateCorrectOrder(e, t, r, n) {
|
|
19679
19691
|
return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Math.floor(r) > Math.floor(n);
|
|
@@ -19717,7 +19729,7 @@ class o0 extends N {
|
|
|
19717
19729
|
return b.create(ne);
|
|
19718
19730
|
}
|
|
19719
19731
|
_validDate(e, t, r, n) {
|
|
19720
|
-
return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) &&
|
|
19732
|
+
return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Ur(r, e, n);
|
|
19721
19733
|
}
|
|
19722
19734
|
_getResult(e, t, r, n, s, o, u, c) {
|
|
19723
19735
|
const l = this._getCoupDate(t, r, u), f = this._getFrac(r, e, l, u, c), m = this._getFrac(r, t, l, u, c), d = this._getFrac(e, t, l, u, c);
|
|
@@ -19780,7 +19792,7 @@ class u0 extends N {
|
|
|
19780
19792
|
return b.create(ne);
|
|
19781
19793
|
}
|
|
19782
19794
|
_validDate(e, t, r, n) {
|
|
19783
|
-
return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) &&
|
|
19795
|
+
return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Ur(r, e, n);
|
|
19784
19796
|
}
|
|
19785
19797
|
_getResult(e, t, r, n, s, o, u, c) {
|
|
19786
19798
|
const l = this._getCoupDate(t, r, u), f = this._getFrac(r, e, l, u, c), m = this._getFrac(r, t, l, u, c), d = this._getFrac(e, t, l, u, c);
|
|
@@ -19868,7 +19880,7 @@ class l0 extends N {
|
|
|
19868
19880
|
const [j, k, G, ne, z] = T, $ = +j.getValue(), ge = +k.getValue(), Ce = +G.getValue(), be = +ne.getValue(), Ne = +z.getValue();
|
|
19869
19881
|
if ($ <= -1)
|
|
19870
19882
|
return g.create(h.NUM);
|
|
19871
|
-
const he =
|
|
19883
|
+
const he = an($, ge, Ce, be, Ne ? 1 : 0);
|
|
19872
19884
|
return Number.isNaN(he) || !Number.isFinite(he) ? g.create(h.NUM) : y === 0 && p === 0 ? b.create(he, et(this.getLocale())) : b.create(he);
|
|
19873
19885
|
});
|
|
19874
19886
|
return c === 1 && l === 1 ? E.get(0, 0) : E;
|
|
@@ -19903,7 +19915,7 @@ class f0 extends N {
|
|
|
19903
19915
|
const [ne, z, $, ge, Ce, be] = G, Ne = +ne.getValue(), he = +z.getValue(), Fe = +$.getValue(), dt = +ge.getValue(), Ut = +Ce.getValue(), Tt = +be.getValue();
|
|
19904
19916
|
if (he < 1 || Math.floor(he) > Math.ceil(Fe) || he - Fe >= 1)
|
|
19905
19917
|
return g.create(h.NUM);
|
|
19906
|
-
const ct =
|
|
19918
|
+
const ct = an(Ne, Fe, dt, Ut, Tt ? 1 : 0) - gc(Ne, he, Fe, dt, Ut, Tt ? 1 : 0);
|
|
19907
19919
|
return Number.isNaN(ct) || !Number.isFinite(ct) ? g.create(h.NUM) : V === 0 && M === 0 ? b.create(ct, et(this.getLocale())) : b.create(ct);
|
|
19908
19920
|
});
|
|
19909
19921
|
return l === 1 && f === 1 ? y.get(0, 0) : y;
|
|
@@ -19930,9 +19942,9 @@ class m0 extends N {
|
|
|
19930
19942
|
const S = +C.getValue(), D = +E.getValue(), w = +R.getValue(), L = Math.floor(+y.getValue()), T = Math.floor(+p.getValue());
|
|
19931
19943
|
if (Number.isNaN(S) || Number.isNaN(D) || Number.isNaN(w) || Number.isNaN(L) || Number.isNaN(T))
|
|
19932
19944
|
return g.create(h.VALUE);
|
|
19933
|
-
if (S < 0 || D < 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !
|
|
19945
|
+
if (S < 0 || D < 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !Ur(V, M, L))
|
|
19934
19946
|
return g.create(h.NUM);
|
|
19935
|
-
const j =
|
|
19947
|
+
const j = Vn(V, M, S, D, w, L, T);
|
|
19936
19948
|
return b.create(j);
|
|
19937
19949
|
}
|
|
19938
19950
|
}
|
|
@@ -20258,7 +20270,7 @@ class y0 extends N {
|
|
|
20258
20270
|
return g.create(h.VALUE);
|
|
20259
20271
|
if (d <= 0 || f >= m)
|
|
20260
20272
|
return g.create(h.NUM);
|
|
20261
|
-
const _ = Math.floor(m) - Math.floor(f), E = ae(f).getUTCFullYear(), R =
|
|
20273
|
+
const _ = Math.floor(m) - Math.floor(f), E = ae(f).getUTCFullYear(), R = _s(E);
|
|
20262
20274
|
if (_ > R)
|
|
20263
20275
|
return g.create(h.NUM);
|
|
20264
20276
|
let y = 365 * d / (360 - d * _);
|
|
@@ -20292,7 +20304,7 @@ class b0 extends N {
|
|
|
20292
20304
|
return g.create(h.VALUE);
|
|
20293
20305
|
if (d <= 0 || f >= m)
|
|
20294
20306
|
return g.create(h.NUM);
|
|
20295
|
-
const _ = Math.floor(m) - Math.floor(f), E = ae(f).getUTCFullYear(), R =
|
|
20307
|
+
const _ = Math.floor(m) - Math.floor(f), E = ae(f).getUTCFullYear(), R = _s(E);
|
|
20296
20308
|
if (_ > R)
|
|
20297
20309
|
return g.create(h.NUM);
|
|
20298
20310
|
const y = 100 * (1 - d * _ / 360);
|
|
@@ -20320,7 +20332,7 @@ class p0 extends N {
|
|
|
20320
20332
|
return g.create(h.VALUE);
|
|
20321
20333
|
if (d <= 0 || f >= m)
|
|
20322
20334
|
return g.create(h.NUM);
|
|
20323
|
-
const _ = Math.floor(m) - Math.floor(f), E = ae(f).getUTCFullYear(), R =
|
|
20335
|
+
const _ = Math.floor(m) - Math.floor(f), E = ae(f).getUTCFullYear(), R = _s(E);
|
|
20324
20336
|
if (_ > R)
|
|
20325
20337
|
return g.create(h.NUM);
|
|
20326
20338
|
const y = (100 - d) / d * 360 / _;
|
|
@@ -20724,19 +20736,19 @@ class M0 extends N {
|
|
|
20724
20736
|
const S = +C.getValue(), D = +E.getValue(), w = +R.getValue(), L = Math.floor(+y.getValue()), T = Math.floor(+p.getValue());
|
|
20725
20737
|
if (Number.isNaN(S) || Number.isNaN(D) || Number.isNaN(w) || Number.isNaN(L) || Number.isNaN(T))
|
|
20726
20738
|
return g.create(h.VALUE);
|
|
20727
|
-
if (S < 0 || D <= 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !
|
|
20739
|
+
if (S < 0 || D <= 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !Ur(V, M, L))
|
|
20728
20740
|
return g.create(h.NUM);
|
|
20729
20741
|
const j = this._getResult(V, M, S, D, w, L, T);
|
|
20730
20742
|
return b.create(j);
|
|
20731
20743
|
}
|
|
20732
20744
|
_getResult(e, t, r, n, s, o, u) {
|
|
20733
20745
|
if (ur(e, t, o) > 1) {
|
|
20734
|
-
let E = r || 0.01, R =
|
|
20746
|
+
let E = r || 0.01, R = Vn(e, t, r, E, s, o, u), y = R - n;
|
|
20735
20747
|
for (let p = 0; p < 100 && Math.abs(y) > 1e-7; p++)
|
|
20736
|
-
R =
|
|
20748
|
+
R = Vn(e, t, r, 1.01 * E, s, o, u), E += -y / (R - n - y) * E * 0.01, y = Vn(e, t, r, E, s, o, u) - n;
|
|
20737
20749
|
return E;
|
|
20738
20750
|
}
|
|
20739
|
-
const l =
|
|
20751
|
+
const l = As(e, t, o, u), f = ze(e, t, o, u), { days: m } = _e(e, t, u), d = n / 100 + l / f * r / o;
|
|
20740
20752
|
return (s / 100 + r / o - d) / d * o * f / m;
|
|
20741
20753
|
}
|
|
20742
20754
|
}
|
|
@@ -20961,7 +20973,7 @@ class x0 extends N {
|
|
|
20961
20973
|
A(this, "maxParams", 5);
|
|
20962
20974
|
}
|
|
20963
20975
|
calculate(e, t, r, n, s) {
|
|
20964
|
-
const o = n != null ? n : v.create(!0), u = s != null ? s : v.create(!0), { isError: c, errorObject: l, variants: f } =
|
|
20976
|
+
const o = n != null ? n : v.create(!0), u = s != null ? s : v.create(!0), { isError: c, errorObject: l, variants: f } = en(e, t, r, o, u);
|
|
20965
20977
|
if (c)
|
|
20966
20978
|
return l;
|
|
20967
20979
|
const [m, d, _, C, E] = f;
|
|
@@ -20997,7 +21009,7 @@ class U0 extends N {
|
|
|
20997
21009
|
return g.create(h.VALUE);
|
|
20998
21010
|
t = t.get(0, 0);
|
|
20999
21011
|
}
|
|
21000
|
-
return t.isError() ? t : t.isNumber() && t.getPattern() !== "" ? v.create(za(t.getPattern())) : t.isString() && (
|
|
21012
|
+
return t.isError() ? t : t.isNumber() && t.getPattern() !== "" ? v.create(za(t.getPattern())) : t.isString() && (Hn(`${t.getValue()}`) || Gn(`${t.getValue()}`)) ? v.create(!0) : v.create(!1);
|
|
21001
21013
|
}
|
|
21002
21014
|
}
|
|
21003
21015
|
class T0 extends N {
|
|
@@ -22790,19 +22802,19 @@ class IC extends N {
|
|
|
22790
22802
|
return g.create(h.REF);
|
|
22791
22803
|
const n = this._convertToDefinedName(r);
|
|
22792
22804
|
if (t === 0) {
|
|
22793
|
-
const f = Ih(n), { range: m, sheetName: d, unitId: _ } = f, C = new
|
|
22805
|
+
const f = Ih(n), { range: m, sheetName: d, unitId: _ } = f, C = new jn(m);
|
|
22794
22806
|
return C.setForcedUnitIdDirect(_), C.setForcedSheetName(d), this._setDefault(C);
|
|
22795
22807
|
}
|
|
22796
|
-
if (
|
|
22808
|
+
if (Xr(n))
|
|
22797
22809
|
return this._setDefault(new Sa(n));
|
|
22798
22810
|
if (Co(n))
|
|
22799
22811
|
return this._setDefault(new wa(n));
|
|
22800
22812
|
if (_o(n))
|
|
22801
22813
|
return this._setDefault(new Da(n));
|
|
22802
|
-
const s =
|
|
22814
|
+
const s = yr(n), { range: o, sheetName: u, unitId: c } = s;
|
|
22803
22815
|
if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
|
|
22804
22816
|
return g.create(h.REF);
|
|
22805
|
-
const l = new
|
|
22817
|
+
const l = new jn(o);
|
|
22806
22818
|
return l.setForcedUnitIdDirect(c), l.setForcedSheetName(u), this._setDefault(l);
|
|
22807
22819
|
}
|
|
22808
22820
|
_setDefault(e) {
|
|
@@ -22893,7 +22905,7 @@ class BC extends N {
|
|
|
22893
22905
|
}
|
|
22894
22906
|
}
|
|
22895
22907
|
}
|
|
22896
|
-
class kC extends
|
|
22908
|
+
class kC extends jr {
|
|
22897
22909
|
constructor(e, t = []) {
|
|
22898
22910
|
super(e);
|
|
22899
22911
|
/**
|
|
@@ -23347,7 +23359,7 @@ class GC extends N {
|
|
|
23347
23359
|
}
|
|
23348
23360
|
}
|
|
23349
23361
|
_sort(e, t = 1) {
|
|
23350
|
-
const r =
|
|
23362
|
+
const r = wn();
|
|
23351
23363
|
return t === 1 ? this._sortAsc(e, r) : this._sortDesc(e, r);
|
|
23352
23364
|
}
|
|
23353
23365
|
_sortAsc(e, t) {
|
|
@@ -23512,7 +23524,7 @@ class WC extends N {
|
|
|
23512
23524
|
return n;
|
|
23513
23525
|
}
|
|
23514
23526
|
_sort(e, t) {
|
|
23515
|
-
const r =
|
|
23527
|
+
const r = wn();
|
|
23516
23528
|
return (n, s) => {
|
|
23517
23529
|
let o = n[e], u = s[e], c = this._compare(o, u, t[0], r);
|
|
23518
23530
|
if (c === 0 && t.length > 1) {
|
|
@@ -24125,8 +24137,8 @@ class r_ extends N {
|
|
|
24125
24137
|
const E = this.getIndexNumValue(l);
|
|
24126
24138
|
return E instanceof g ? E : this._getResult(
|
|
24127
24139
|
e,
|
|
24128
|
-
|
|
24129
|
-
|
|
24140
|
+
ta(t),
|
|
24141
|
+
ta(r),
|
|
24130
24142
|
u,
|
|
24131
24143
|
C,
|
|
24132
24144
|
E,
|
|
@@ -24163,7 +24175,7 @@ class r_ extends N {
|
|
|
24163
24175
|
}
|
|
24164
24176
|
_handleExpandObject(e, t, r, n, s, o = 0) {
|
|
24165
24177
|
if ((s === 2 || s === -2) && n !== 2) {
|
|
24166
|
-
const u =
|
|
24178
|
+
const u = Qs(s), c = Ws(n);
|
|
24167
24179
|
return this.binarySearchExpand(
|
|
24168
24180
|
e,
|
|
24169
24181
|
t,
|
|
@@ -24184,7 +24196,7 @@ class r_ extends N {
|
|
|
24184
24196
|
}
|
|
24185
24197
|
_handleSingleObject(e, t, r, n, s) {
|
|
24186
24198
|
if ((s === 2 || s === -2) && n !== 2) {
|
|
24187
|
-
const o =
|
|
24199
|
+
const o = Qs(s), u = Ws(n);
|
|
24188
24200
|
return this.binarySearch(e, t, r, o, u);
|
|
24189
24201
|
}
|
|
24190
24202
|
return n === 2 ? this.fuzzySearch(e, t, r, s !== -1) : n === -1 || n === 1 ? this.orderSearch(
|
|
@@ -24246,10 +24258,10 @@ class n_ extends N {
|
|
|
24246
24258
|
return ![-1, 0, 1, 2].includes(l) || ![-1, 1, 2].includes(f) ? g.create(h.VALUE) : this._getResult(e, t, l, f);
|
|
24247
24259
|
}
|
|
24248
24260
|
_getResult(e, t, r, n) {
|
|
24249
|
-
const s =
|
|
24261
|
+
const s = ta(t);
|
|
24250
24262
|
let o;
|
|
24251
24263
|
if ((n === 2 || n === -2) && r !== 2) {
|
|
24252
|
-
const u =
|
|
24264
|
+
const u = Qs(n), c = Ws(r);
|
|
24253
24265
|
o = s.binarySearch(e, u, c);
|
|
24254
24266
|
} else if (r === 2) {
|
|
24255
24267
|
const u = s.compare(e, Y.EQUALS);
|
|
@@ -24565,7 +24577,7 @@ class m_ extends N {
|
|
|
24565
24577
|
r && (t = t.slice(1));
|
|
24566
24578
|
let n = 0;
|
|
24567
24579
|
for (let s = 0; s < t.length; s++) {
|
|
24568
|
-
const o =
|
|
24580
|
+
const o = hn.get(t[s]) || 0, u = hn.get(t[s + 1]) || 0, c = hn.get(t[s + 2]) || 0, l = hn.get(t[s + 3]) || 0;
|
|
24569
24581
|
if (!o || c >= u && c > o || o === u && o === c && o === l || o === u / 2)
|
|
24570
24582
|
return g.create(h.VALUE);
|
|
24571
24583
|
o < u ? n -= o : n += o;
|
|
@@ -25031,7 +25043,7 @@ class j_ extends N {
|
|
|
25031
25043
|
let t = e;
|
|
25032
25044
|
if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
|
|
25033
25045
|
return t;
|
|
25034
|
-
const r = Math.floor(+t.getValue()), n =
|
|
25046
|
+
const r = Math.floor(+t.getValue()), n = Ar(r);
|
|
25035
25047
|
return Number.isNaN(n) || !Number.isFinite(n) ? g.create(h.NUM) : b.create(n);
|
|
25036
25048
|
}
|
|
25037
25049
|
}
|
|
@@ -25055,7 +25067,7 @@ class U_ extends N {
|
|
|
25055
25067
|
let t = e;
|
|
25056
25068
|
if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
|
|
25057
25069
|
return t;
|
|
25058
|
-
const r = Math.floor(+t.getValue()), n =
|
|
25070
|
+
const r = Math.floor(+t.getValue()), n = Ar(r, 2);
|
|
25059
25071
|
return Number.isNaN(n) || !Number.isFinite(n) ? g.create(h.NUM) : b.create(n);
|
|
25060
25072
|
}
|
|
25061
25073
|
}
|
|
@@ -25422,7 +25434,7 @@ class Q_ extends N {
|
|
|
25422
25434
|
return u;
|
|
25423
25435
|
if (c instanceof g)
|
|
25424
25436
|
return c;
|
|
25425
|
-
const l =
|
|
25437
|
+
const l = Er(u, c);
|
|
25426
25438
|
return K.createByArray(l);
|
|
25427
25439
|
}
|
|
25428
25440
|
_getMatrix(e, t, r) {
|
|
@@ -25518,7 +25530,7 @@ class K_ extends N {
|
|
|
25518
25530
|
return u = !0, c = m, !1;
|
|
25519
25531
|
if (t += d, t > 170)
|
|
25520
25532
|
return u = !0, c = g.create(h.NUM), !1;
|
|
25521
|
-
r *=
|
|
25533
|
+
r *= Ar(d);
|
|
25522
25534
|
}), u)
|
|
25523
25535
|
return c;
|
|
25524
25536
|
} else {
|
|
@@ -25527,10 +25539,10 @@ class K_ extends N {
|
|
|
25527
25539
|
return c;
|
|
25528
25540
|
if (t += l, t > 170)
|
|
25529
25541
|
return g.create(h.NUM);
|
|
25530
|
-
r *=
|
|
25542
|
+
r *= Ar(l);
|
|
25531
25543
|
}
|
|
25532
25544
|
}
|
|
25533
|
-
const n =
|
|
25545
|
+
const n = Ar(t) / r;
|
|
25534
25546
|
return b.create(n);
|
|
25535
25547
|
}
|
|
25536
25548
|
_handleSingleObject(e) {
|
|
@@ -26384,8 +26396,8 @@ class NA extends N {
|
|
|
26384
26396
|
}
|
|
26385
26397
|
_handleSingleObject(e, t, r) {
|
|
26386
26398
|
const n = e.toArrayValueObject();
|
|
26387
|
-
let s =
|
|
26388
|
-
s =
|
|
26399
|
+
let s = os(n, t);
|
|
26400
|
+
s = us(s, n, t);
|
|
26389
26401
|
const o = n.getRowCount(), u = n.getColumnCount();
|
|
26390
26402
|
let c = n;
|
|
26391
26403
|
if (r) {
|
|
@@ -26415,12 +26427,12 @@ class VA extends N {
|
|
|
26415
26427
|
criteriaMaxColumnLength: u,
|
|
26416
26428
|
targetRange: c,
|
|
26417
26429
|
variants: l
|
|
26418
|
-
} =
|
|
26430
|
+
} = zr(t, e);
|
|
26419
26431
|
if (r)
|
|
26420
26432
|
return n;
|
|
26421
26433
|
if (s)
|
|
26422
26434
|
return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
|
|
26423
|
-
const f =
|
|
26435
|
+
const f = Jr(l, o, u, !0);
|
|
26424
26436
|
return this._aggregateResults(c, f);
|
|
26425
26437
|
}
|
|
26426
26438
|
_aggregateResults(e, t) {
|
|
@@ -26758,7 +26770,7 @@ class xA extends N {
|
|
|
26758
26770
|
return _;
|
|
26759
26771
|
if (d.isString() && (d = d.convertToNumberObjectValue()), d.isError())
|
|
26760
26772
|
return d;
|
|
26761
|
-
const C = +_.getValue(), E = +d.getValue(), R = 10 ** Math.trunc(E), y =
|
|
26773
|
+
const C = +_.getValue(), E = +d.getValue(), R = 10 ** Math.trunc(E), y = as(C, R), p = Math.trunc(xr(C, R) + y) / R;
|
|
26762
26774
|
return b.create(p);
|
|
26763
26775
|
});
|
|
26764
26776
|
return n === 1 && s === 1 ? c.get(0, 0) : c;
|
|
@@ -27314,8 +27326,8 @@ class QA extends N {
|
|
|
27314
27326
|
}
|
|
27315
27327
|
_handleSingleObject(e, t, r) {
|
|
27316
27328
|
const n = e.toArrayValueObject();
|
|
27317
|
-
let s =
|
|
27318
|
-
s =
|
|
27329
|
+
let s = os(n, t);
|
|
27330
|
+
s = us(s, n, t);
|
|
27319
27331
|
const o = n.getRowCount(), u = n.getColumnCount();
|
|
27320
27332
|
let c = n;
|
|
27321
27333
|
if (r) {
|
|
@@ -27346,12 +27358,12 @@ class qA extends N {
|
|
|
27346
27358
|
criteriaMaxColumnLength: u,
|
|
27347
27359
|
targetRange: c,
|
|
27348
27360
|
variants: l
|
|
27349
|
-
} =
|
|
27361
|
+
} = zr(t, e);
|
|
27350
27362
|
if (r)
|
|
27351
27363
|
return n;
|
|
27352
27364
|
if (s)
|
|
27353
27365
|
return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
|
|
27354
|
-
const f =
|
|
27366
|
+
const f = Jr(l, o, u, !0);
|
|
27355
27367
|
return this._aggregateResults(c, f);
|
|
27356
27368
|
}
|
|
27357
27369
|
_aggregateResults(e, t) {
|
|
@@ -27553,7 +27565,7 @@ class JA extends N {
|
|
|
27553
27565
|
return g.create(h.NUM);
|
|
27554
27566
|
if (w === 1)
|
|
27555
27567
|
return g.create(h.DIV_BY_ZERO);
|
|
27556
|
-
const L = Math.abs(
|
|
27568
|
+
const L = Math.abs(ms(S / 2, w - 1) * D / Math.sqrt(w));
|
|
27557
27569
|
return b.create(L);
|
|
27558
27570
|
});
|
|
27559
27571
|
return n === 1 && s === 1 ? l.get(0, 0) : l;
|
|
@@ -27670,8 +27682,8 @@ class sE extends N {
|
|
|
27670
27682
|
}
|
|
27671
27683
|
_handleSingleObject(e, t) {
|
|
27672
27684
|
const r = e.toArrayValueObject();
|
|
27673
|
-
let n =
|
|
27674
|
-
n =
|
|
27685
|
+
let n = os(r, t);
|
|
27686
|
+
n = us(n, r, t);
|
|
27675
27687
|
const s = r.pick(n);
|
|
27676
27688
|
return this._countA(s);
|
|
27677
27689
|
}
|
|
@@ -27699,12 +27711,12 @@ class aE extends N {
|
|
|
27699
27711
|
criteriaMaxRowLength: s,
|
|
27700
27712
|
criteriaMaxColumnLength: o,
|
|
27701
27713
|
variants: u
|
|
27702
|
-
} =
|
|
27714
|
+
} = zr(e);
|
|
27703
27715
|
if (t)
|
|
27704
27716
|
return r;
|
|
27705
27717
|
if (n)
|
|
27706
27718
|
return s === 1 && o === 1 ? g.create(h.VALUE) : O(s, o, g.create(h.VALUE));
|
|
27707
|
-
const c =
|
|
27719
|
+
const c = Jr(u, s, o, !0);
|
|
27708
27720
|
return this._aggregateResults(c);
|
|
27709
27721
|
}
|
|
27710
27722
|
_aggregateResults(e) {
|
|
@@ -28070,7 +28082,7 @@ class gE extends N {
|
|
|
28070
28082
|
const [s] = n, o = +s.getValue();
|
|
28071
28083
|
if (o === 0 || o < 0 && o % 1 === 0)
|
|
28072
28084
|
return g.create(h.NUM);
|
|
28073
|
-
const u =
|
|
28085
|
+
const u = Nn(o);
|
|
28074
28086
|
return Number.isNaN(u) || !Number.isFinite(u) ? g.create(h.NUM) : b.create(u);
|
|
28075
28087
|
}
|
|
28076
28088
|
}
|
|
@@ -28115,7 +28127,7 @@ class dE extends N {
|
|
|
28115
28127
|
const { isError: t, errorObject: r, variants: n } = I(e);
|
|
28116
28128
|
if (t)
|
|
28117
28129
|
return r;
|
|
28118
|
-
const [s] = n, o = +s.getValue(), u =
|
|
28130
|
+
const [s] = n, o = +s.getValue(), u = tn(o, 0, 1) - 0.5;
|
|
28119
28131
|
return b.create(u);
|
|
28120
28132
|
}
|
|
28121
28133
|
}
|
|
@@ -28171,7 +28183,7 @@ class _E extends N {
|
|
|
28171
28183
|
A(this, "maxParams", 4);
|
|
28172
28184
|
}
|
|
28173
28185
|
calculate(e, t, r, n) {
|
|
28174
|
-
const { isError: s, errorObject: o } =
|
|
28186
|
+
const { isError: s, errorObject: o } = hs(e, t, r);
|
|
28175
28187
|
if (s)
|
|
28176
28188
|
return o;
|
|
28177
28189
|
const u = bt(e);
|
|
@@ -28193,7 +28205,7 @@ class _E extends N {
|
|
|
28193
28205
|
return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(h.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
|
|
28194
28206
|
}
|
|
28195
28207
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
28196
|
-
const s = e.length === 1 && e[0].length > 1, o =
|
|
28208
|
+
const s = e.length === 1 && e[0].length > 1, o = Cs(e, t, r, n, !0);
|
|
28197
28209
|
if (o instanceof g)
|
|
28198
28210
|
return o;
|
|
28199
28211
|
const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
|
|
@@ -28208,11 +28220,11 @@ class _E extends N {
|
|
|
28208
28220
|
return s && (m = Et(m)), K.createByArray(m);
|
|
28209
28221
|
}
|
|
28210
28222
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
28211
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } =
|
|
28223
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ds(o, s, n, !0), l = r.map((f) => f.map((m) => c * u ** m));
|
|
28212
28224
|
return K.createByArray(l);
|
|
28213
28225
|
}
|
|
28214
28226
|
_getKnownXsValues(e, t) {
|
|
28215
|
-
return !t || t.isNull() ?
|
|
28227
|
+
return !t || t.isNull() ? gs(e.length, e[0].length) : bt(t);
|
|
28216
28228
|
}
|
|
28217
28229
|
_getNewXsValues(e, t) {
|
|
28218
28230
|
return !t || t.isNull() ? e : bt(t);
|
|
@@ -28417,7 +28429,7 @@ class pE extends N {
|
|
|
28417
28429
|
A(this, "maxParams", 4);
|
|
28418
28430
|
}
|
|
28419
28431
|
calculate(e, t, r, n) {
|
|
28420
|
-
const { isError: s, errorObject: o } =
|
|
28432
|
+
const { isError: s, errorObject: o } = hs(e, t);
|
|
28421
28433
|
if (s)
|
|
28422
28434
|
return o;
|
|
28423
28435
|
const u = bt(e);
|
|
@@ -28440,7 +28452,7 @@ class pE extends N {
|
|
|
28440
28452
|
return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (r ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (r ? t[0].length + 1 : t[0].length) > e.length ? g.create(h.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
|
|
28441
28453
|
}
|
|
28442
28454
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
28443
|
-
const s =
|
|
28455
|
+
const s = Cs(e, t, t, r, !1);
|
|
28444
28456
|
if (s instanceof g)
|
|
28445
28457
|
return s;
|
|
28446
28458
|
const { coefficients: o, X: u, XTXInverse: c } = s;
|
|
@@ -28487,7 +28499,7 @@ class pE extends N {
|
|
|
28487
28499
|
return K.createByArray(l);
|
|
28488
28500
|
}
|
|
28489
28501
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
28490
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } =
|
|
28502
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ds(o, s, r, !1);
|
|
28491
28503
|
if (Number.isNaN(u))
|
|
28492
28504
|
return g.create(h.NA);
|
|
28493
28505
|
let l = [];
|
|
@@ -28527,7 +28539,7 @@ class pE extends N {
|
|
|
28527
28539
|
return K.createByArray(l);
|
|
28528
28540
|
}
|
|
28529
28541
|
_getKnownXsValues(e, t) {
|
|
28530
|
-
return !t || t.isNull() ?
|
|
28542
|
+
return !t || t.isNull() ? gs(e.length, e[0].length) : bt(t);
|
|
28531
28543
|
}
|
|
28532
28544
|
}
|
|
28533
28545
|
class NE extends N {
|
|
@@ -28537,7 +28549,7 @@ class NE extends N {
|
|
|
28537
28549
|
A(this, "maxParams", 4);
|
|
28538
28550
|
}
|
|
28539
28551
|
calculate(e, t, r, n) {
|
|
28540
|
-
const { isError: s, errorObject: o } =
|
|
28552
|
+
const { isError: s, errorObject: o } = hs(e, t);
|
|
28541
28553
|
if (s)
|
|
28542
28554
|
return o;
|
|
28543
28555
|
const u = bt(e);
|
|
@@ -28561,7 +28573,7 @@ class NE extends N {
|
|
|
28561
28573
|
}
|
|
28562
28574
|
// eslint-disable-next-line max-lines-per-function
|
|
28563
28575
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
28564
|
-
const s =
|
|
28576
|
+
const s = Cs(e, t, t, r, !0);
|
|
28565
28577
|
if (s instanceof g)
|
|
28566
28578
|
return s;
|
|
28567
28579
|
const { coefficients: o, Y: u, X: c, XTXInverse: l } = s;
|
|
@@ -28609,7 +28621,7 @@ class NE extends N {
|
|
|
28609
28621
|
return K.createByArray(f);
|
|
28610
28622
|
}
|
|
28611
28623
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
28612
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } =
|
|
28624
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } = ds(o, s, r, !0);
|
|
28613
28625
|
if (Number.isNaN(u))
|
|
28614
28626
|
return g.create(h.NA);
|
|
28615
28627
|
let f = [];
|
|
@@ -28647,7 +28659,7 @@ class NE extends N {
|
|
|
28647
28659
|
return K.createByArray(f);
|
|
28648
28660
|
}
|
|
28649
28661
|
_getKnownXsValues(e, t) {
|
|
28650
|
-
return !t || t.isNull() ?
|
|
28662
|
+
return !t || t.isNull() ? gs(e.length, e[0].length) : bt(t);
|
|
28651
28663
|
}
|
|
28652
28664
|
}
|
|
28653
28665
|
class VE extends N {
|
|
@@ -28708,7 +28720,7 @@ class OE extends N {
|
|
|
28708
28720
|
const f = 1 - l, m = r.length, d = r.reduce((R, y) => R + y, 0) / m, _ = r.reduce((R, y) => R + (y - d) ** 2, 0) / (m - 1), C = Math.sqrt(_);
|
|
28709
28721
|
if (C <= 0)
|
|
28710
28722
|
return g.create(h.NUM);
|
|
28711
|
-
const E = Math.abs(
|
|
28723
|
+
const E = Math.abs(ms(f / 2, m - 1) * C / Math.sqrt(m));
|
|
28712
28724
|
return b.create(E);
|
|
28713
28725
|
}
|
|
28714
28726
|
_getRangeValues(e) {
|
|
@@ -28794,12 +28806,12 @@ class DE extends N {
|
|
|
28794
28806
|
criteriaMaxColumnLength: u,
|
|
28795
28807
|
targetRange: c,
|
|
28796
28808
|
variants: l
|
|
28797
|
-
} =
|
|
28809
|
+
} = zr(t, e);
|
|
28798
28810
|
if (r)
|
|
28799
28811
|
return n;
|
|
28800
28812
|
if (s)
|
|
28801
28813
|
return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
|
|
28802
|
-
const f =
|
|
28814
|
+
const f = Jr(l, o, u, !0);
|
|
28803
28815
|
return this._aggregateResults(c, f);
|
|
28804
28816
|
}
|
|
28805
28817
|
_aggregateResults(e, t) {
|
|
@@ -28931,12 +28943,12 @@ class xE extends N {
|
|
|
28931
28943
|
criteriaMaxColumnLength: u,
|
|
28932
28944
|
targetRange: c,
|
|
28933
28945
|
variants: l
|
|
28934
|
-
} =
|
|
28946
|
+
} = zr(t, e);
|
|
28935
28947
|
if (r)
|
|
28936
28948
|
return n;
|
|
28937
28949
|
if (s)
|
|
28938
28950
|
return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
|
|
28939
|
-
const f =
|
|
28951
|
+
const f = Jr(l, o, u, !0);
|
|
28940
28952
|
return this._aggregateResults(c, f);
|
|
28941
28953
|
}
|
|
28942
28954
|
_aggregateResults(e, t) {
|
|
@@ -29051,7 +29063,7 @@ class TE extends N {
|
|
|
29051
29063
|
return n;
|
|
29052
29064
|
const [o, u] = s, c = +o.getValue(), l = +u.getValue();
|
|
29053
29065
|
let f;
|
|
29054
|
-
return l ? f =
|
|
29066
|
+
return l ? f = tn(c, 0, 1) : f = Au(c, 0, 1), b.create(f);
|
|
29055
29067
|
}
|
|
29056
29068
|
}
|
|
29057
29069
|
class vE extends N {
|
|
@@ -29865,7 +29877,7 @@ class rR extends N {
|
|
|
29865
29877
|
if (m < 1)
|
|
29866
29878
|
return g.create(h.NUM);
|
|
29867
29879
|
let _;
|
|
29868
|
-
return d ? _ =
|
|
29880
|
+
return d ? _ = rn(f, m) : _ = mg(f, m), Number.isNaN(_) || !Number.isFinite(_) ? g.create(h.NUM) : b.create(_);
|
|
29869
29881
|
}
|
|
29870
29882
|
}
|
|
29871
29883
|
class nR extends N {
|
|
@@ -29894,7 +29906,7 @@ class nR extends N {
|
|
|
29894
29906
|
const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
|
|
29895
29907
|
if (c < 0 || l < 1 || l > 10 ** 10)
|
|
29896
29908
|
return g.create(h.NUM);
|
|
29897
|
-
const f =
|
|
29909
|
+
const f = rn(-c, l) * 2;
|
|
29898
29910
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
29899
29911
|
}
|
|
29900
29912
|
}
|
|
@@ -29924,7 +29936,7 @@ class sR extends N {
|
|
|
29924
29936
|
const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
|
|
29925
29937
|
if (l < 1 || l > 10 ** 10)
|
|
29926
29938
|
return g.create(h.NUM);
|
|
29927
|
-
const f =
|
|
29939
|
+
const f = rn(-c, l);
|
|
29928
29940
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
29929
29941
|
}
|
|
29930
29942
|
}
|
|
@@ -29954,7 +29966,7 @@ class aR extends N {
|
|
|
29954
29966
|
const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
|
|
29955
29967
|
if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
|
|
29956
29968
|
return g.create(h.NUM);
|
|
29957
|
-
const f =
|
|
29969
|
+
const f = ms(c, l);
|
|
29958
29970
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
|
|
29959
29971
|
}
|
|
29960
29972
|
}
|
|
@@ -29965,7 +29977,7 @@ class iR extends N {
|
|
|
29965
29977
|
A(this, "maxParams", 4);
|
|
29966
29978
|
}
|
|
29967
29979
|
calculate(e, t, r, n) {
|
|
29968
|
-
const { isError: s, errorObject: o } =
|
|
29980
|
+
const { isError: s, errorObject: o } = hs(e, t, r);
|
|
29969
29981
|
if (s)
|
|
29970
29982
|
return o;
|
|
29971
29983
|
const u = bt(e);
|
|
@@ -29987,7 +29999,7 @@ class iR extends N {
|
|
|
29987
29999
|
return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(h.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
|
|
29988
30000
|
}
|
|
29989
30001
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
29990
|
-
const s = e.length === 1 && e[0].length > 1, o =
|
|
30002
|
+
const s = e.length === 1 && e[0].length > 1, o = Cs(e, t, r, n, !1);
|
|
29991
30003
|
if (o instanceof g)
|
|
29992
30004
|
return o;
|
|
29993
30005
|
const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
|
|
@@ -30002,14 +30014,14 @@ class iR extends N {
|
|
|
30002
30014
|
return s && (m = Et(m)), K.createByArray(m);
|
|
30003
30015
|
}
|
|
30004
30016
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
30005
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } =
|
|
30017
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ds(o, s, n, !1);
|
|
30006
30018
|
if (Number.isNaN(u))
|
|
30007
30019
|
return g.create(h.NA);
|
|
30008
30020
|
const l = r.map((f) => f.map((m) => u * m + c));
|
|
30009
30021
|
return K.createByArray(l);
|
|
30010
30022
|
}
|
|
30011
30023
|
_getKnownXsValues(e, t) {
|
|
30012
|
-
return !t || t.isNull() ?
|
|
30024
|
+
return !t || t.isNull() ? gs(e.length, e[0].length) : bt(t);
|
|
30013
30025
|
}
|
|
30014
30026
|
_getNewXsValues(e, t) {
|
|
30015
30027
|
return !t || t.isNull() ? e : bt(t);
|
|
@@ -30572,10 +30584,10 @@ class pR extends N {
|
|
|
30572
30584
|
function ni(i) {
|
|
30573
30585
|
let a = 0;
|
|
30574
30586
|
for (let e = 0; e < i.length; e++)
|
|
30575
|
-
a +=
|
|
30587
|
+
a += on(i, e);
|
|
30576
30588
|
return a;
|
|
30577
30589
|
}
|
|
30578
|
-
function
|
|
30590
|
+
function on(i, a, e = "ltr") {
|
|
30579
30591
|
return NR(i, a, e) > 255 ? 2 : 1;
|
|
30580
30592
|
}
|
|
30581
30593
|
function to(i) {
|
|
@@ -30744,7 +30756,7 @@ class SR extends N {
|
|
|
30744
30756
|
return U.create("");
|
|
30745
30757
|
let l = 0, f = 0, m = "";
|
|
30746
30758
|
for (; f < c && l < r.length; )
|
|
30747
|
-
f +=
|
|
30759
|
+
f += on(r, l), m += r.charAt(l), l++;
|
|
30748
30760
|
return U.create(m);
|
|
30749
30761
|
}
|
|
30750
30762
|
}
|
|
@@ -30878,11 +30890,11 @@ class xR extends N {
|
|
|
30878
30890
|
n = n.substring(f - 1);
|
|
30879
30891
|
let d = 0, _ = 0, C = "";
|
|
30880
30892
|
for (; _ < m && d < n.length; )
|
|
30881
|
-
_ +=
|
|
30893
|
+
_ += on(n, d), C += n.charAt(d), d++;
|
|
30882
30894
|
return U.create(C);
|
|
30883
30895
|
}
|
|
30884
30896
|
}
|
|
30885
|
-
const
|
|
30897
|
+
const Tr = ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], gn = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], jR = ["", "十", "百", "千"], UR = ["", "拾", "佰", "仟"], TR = ["", "万", "亿", "兆"];
|
|
30886
30898
|
class vR extends N {
|
|
30887
30899
|
constructor() {
|
|
30888
30900
|
super(...arguments);
|
|
@@ -30920,19 +30932,19 @@ class vR extends N {
|
|
|
30920
30932
|
for (let m = 0; m < c; m++) {
|
|
30921
30933
|
const d = Number(u[m]);
|
|
30922
30934
|
if (c === 1 && d === 0) {
|
|
30923
|
-
l += o === 2 ?
|
|
30935
|
+
l += o === 2 ? gn[0] : Tr[0];
|
|
30924
30936
|
break;
|
|
30925
30937
|
}
|
|
30926
30938
|
if (o === 3) {
|
|
30927
|
-
l +=
|
|
30939
|
+
l += Tr[d];
|
|
30928
30940
|
continue;
|
|
30929
30941
|
}
|
|
30930
30942
|
const _ = c - m - 1, C = _ % 4, E = Math.trunc(_ / 4);
|
|
30931
30943
|
if (c >= 17 && E > 2) {
|
|
30932
|
-
if (l += o === 1 ?
|
|
30944
|
+
if (l += o === 1 ? Tr[d] : gn[d], E > 3)
|
|
30933
30945
|
continue;
|
|
30934
30946
|
} else
|
|
30935
|
-
d === 0 ? f = C !== 0 : (f && (l += o === 1 ?
|
|
30947
|
+
d === 0 ? f = C !== 0 : (f && (l += o === 1 ? Tr[0] : gn[0], f = !1), l += o === 1 ? Tr[d] + jR[C] : gn[d] + UR[C]);
|
|
30936
30948
|
C === 0 && E > 0 && u.slice(Math.max(0, m - 3), m + 1) !== "0000" && (l += TR[E]);
|
|
30937
30949
|
}
|
|
30938
30950
|
return U.create(l);
|
|
@@ -31467,7 +31479,7 @@ class QR extends N {
|
|
|
31467
31479
|
A(this, "maxParams", 2);
|
|
31468
31480
|
}
|
|
31469
31481
|
calculate(e, t) {
|
|
31470
|
-
const { isError: r, errorObject: n, variants: s } =
|
|
31482
|
+
const { isError: r, errorObject: n, variants: s } = en(e, t);
|
|
31471
31483
|
if (r)
|
|
31472
31484
|
return n;
|
|
31473
31485
|
const [o, u] = s;
|
|
@@ -31503,7 +31515,7 @@ class qR extends N {
|
|
|
31503
31515
|
A(this, "maxParams", 2);
|
|
31504
31516
|
}
|
|
31505
31517
|
calculate(e, t) {
|
|
31506
|
-
const { isError: r, errorObject: n, variants: s } =
|
|
31518
|
+
const { isError: r, errorObject: n, variants: s } = en(e, t);
|
|
31507
31519
|
if (r)
|
|
31508
31520
|
return n;
|
|
31509
31521
|
const [o, u] = s;
|
|
@@ -31522,7 +31534,7 @@ class XR extends N {
|
|
|
31522
31534
|
A(this, "maxParams", 3);
|
|
31523
31535
|
}
|
|
31524
31536
|
calculate(e, t, r) {
|
|
31525
|
-
const { isError: n, errorObject: s, variants: o } =
|
|
31537
|
+
const { isError: n, errorObject: s, variants: o } = en(e, t, r);
|
|
31526
31538
|
if (n)
|
|
31527
31539
|
return s;
|
|
31528
31540
|
const [u, c, l] = o;
|
|
@@ -31609,7 +31621,7 @@ class ZR extends N {
|
|
|
31609
31621
|
d = d.substring(f - 1);
|
|
31610
31622
|
let E = 0, R = 0;
|
|
31611
31623
|
for (; R < m && E < d.length; )
|
|
31612
|
-
R +=
|
|
31624
|
+
R += on(d, E), E++;
|
|
31613
31625
|
return C += _ + d.substring(E), U.create(C);
|
|
31614
31626
|
}
|
|
31615
31627
|
}
|
|
@@ -31710,7 +31722,7 @@ class ey extends N {
|
|
|
31710
31722
|
return U.create("");
|
|
31711
31723
|
let l = r.length - 1, f = 0, m = "";
|
|
31712
31724
|
for (; f < c && l >= 0; )
|
|
31713
|
-
f +=
|
|
31725
|
+
f += on(r, l, "rtl"), m = r.charAt(l) + m, l--;
|
|
31714
31726
|
return U.create(m);
|
|
31715
31727
|
}
|
|
31716
31728
|
}
|
|
@@ -32590,7 +32602,7 @@ let ha = class extends De {
|
|
|
32590
32602
|
super();
|
|
32591
32603
|
A(this, "_computingCompleted$", new Zc((a) => {
|
|
32592
32604
|
this._commandService.onCommandExecuted((e) => {
|
|
32593
|
-
if (e.id !==
|
|
32605
|
+
if (e.id !== Dn.id) return;
|
|
32594
32606
|
const t = e.params;
|
|
32595
32607
|
if (t.stageInfo)
|
|
32596
32608
|
return a.next(
|
|
@@ -32607,15 +32619,15 @@ let ha = class extends De {
|
|
|
32607
32619
|
}
|
|
32608
32620
|
};
|
|
32609
32621
|
ha = py([
|
|
32610
|
-
ao(0,
|
|
32622
|
+
ao(0, Dr),
|
|
32611
32623
|
ao(1, ye(Mc))
|
|
32612
32624
|
], ha);
|
|
32613
32625
|
var Ny = Object.getOwnPropertyDescriptor, Vy = (i, a, e, t) => {
|
|
32614
32626
|
for (var r = t > 1 ? void 0 : t ? Ny(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
32615
32627
|
(s = i[n]) && (r = s(r) || r);
|
|
32616
32628
|
return r;
|
|
32617
|
-
},
|
|
32618
|
-
let
|
|
32629
|
+
}, dn = (i, a) => (e, t) => a(e, t, i);
|
|
32630
|
+
let qn = class extends De {
|
|
32619
32631
|
constructor(i, a, e, t) {
|
|
32620
32632
|
super(), this._commandService = i, this._functionService = a, this._configService = e, this._dataSyncPrimaryController = t, this._initialize();
|
|
32621
32633
|
}
|
|
@@ -32625,7 +32637,7 @@ let Qn = class extends De {
|
|
|
32625
32637
|
_registerCommands() {
|
|
32626
32638
|
[
|
|
32627
32639
|
Uo,
|
|
32628
|
-
|
|
32640
|
+
Ts,
|
|
32629
32641
|
To,
|
|
32630
32642
|
Vo,
|
|
32631
32643
|
Oo,
|
|
@@ -32633,10 +32645,10 @@ let Qn = class extends De {
|
|
|
32633
32645
|
xo,
|
|
32634
32646
|
jo,
|
|
32635
32647
|
So,
|
|
32636
|
-
|
|
32648
|
+
Dn,
|
|
32637
32649
|
Do,
|
|
32638
32650
|
wo,
|
|
32639
|
-
|
|
32651
|
+
ks,
|
|
32640
32652
|
Lo,
|
|
32641
32653
|
Po,
|
|
32642
32654
|
No,
|
|
@@ -32680,18 +32692,18 @@ let Qn = class extends De {
|
|
|
32680
32692
|
this._functionService.registerExecutors(...a);
|
|
32681
32693
|
}
|
|
32682
32694
|
};
|
|
32683
|
-
|
|
32684
|
-
|
|
32685
|
-
|
|
32686
|
-
|
|
32687
|
-
|
|
32688
|
-
],
|
|
32695
|
+
qn = Vy([
|
|
32696
|
+
dn(0, Dr),
|
|
32697
|
+
dn(1, Xt),
|
|
32698
|
+
dn(2, Ca),
|
|
32699
|
+
dn(3, Wc(Jc))
|
|
32700
|
+
], qn);
|
|
32689
32701
|
var Oy = Object.getOwnPropertyDescriptor, My = (i, a, e, t) => {
|
|
32690
32702
|
for (var r = t > 1 ? void 0 : t ? Oy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
32691
32703
|
(s = i[n]) && (r = s(r) || r);
|
|
32692
32704
|
return r;
|
|
32693
|
-
},
|
|
32694
|
-
let
|
|
32705
|
+
}, Cn = (i, a) => (e, t) => a(e, t, i);
|
|
32706
|
+
let Xn = class extends De {
|
|
32695
32707
|
constructor(i, a, e) {
|
|
32696
32708
|
super(), this._commandService = i, this._dependencyManagerService = a, this._featureCalculationManagerService = e, this._initialize();
|
|
32697
32709
|
}
|
|
@@ -32767,18 +32779,18 @@ let qn = class extends De {
|
|
|
32767
32779
|
this._dependencyManagerService.removeFormulaDependencyByDefinedName(e, t);
|
|
32768
32780
|
}
|
|
32769
32781
|
};
|
|
32770
|
-
|
|
32771
|
-
|
|
32772
|
-
|
|
32773
|
-
|
|
32774
|
-
|
|
32775
|
-
],
|
|
32782
|
+
Xn = My([
|
|
32783
|
+
Cn(0, Dr),
|
|
32784
|
+
Cn(1, Qr),
|
|
32785
|
+
Cn(1, cs),
|
|
32786
|
+
Cn(2, Qr)
|
|
32787
|
+
], Xn);
|
|
32776
32788
|
var Sy = Object.getOwnPropertyDescriptor, Dy = (i, a, e, t) => {
|
|
32777
32789
|
for (var r = t > 1 ? void 0 : t ? Sy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
32778
32790
|
(s = i[n]) && (r = s(r) || r);
|
|
32779
32791
|
return r;
|
|
32780
32792
|
}, io = (i, a) => (e, t) => a(e, t, i);
|
|
32781
|
-
let
|
|
32793
|
+
let Kn = class extends De {
|
|
32782
32794
|
constructor(i, a) {
|
|
32783
32795
|
super(), this._commandService = i, this._featureCalculationManagerService = a, this._initialize();
|
|
32784
32796
|
}
|
|
@@ -32805,16 +32817,16 @@ let Xn = class extends De {
|
|
|
32805
32817
|
);
|
|
32806
32818
|
}
|
|
32807
32819
|
};
|
|
32808
|
-
|
|
32809
|
-
io(0,
|
|
32810
|
-
io(1,
|
|
32811
|
-
],
|
|
32820
|
+
Kn = Dy([
|
|
32821
|
+
io(0, Dr),
|
|
32822
|
+
io(1, Qr)
|
|
32823
|
+
], Kn);
|
|
32812
32824
|
var wy = Object.getOwnPropertyDescriptor, Ly = (i, a, e, t) => {
|
|
32813
32825
|
for (var r = t > 1 ? void 0 : t ? wy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
32814
32826
|
(s = i[n]) && (r = s(r) || r);
|
|
32815
32827
|
return r;
|
|
32816
|
-
},
|
|
32817
|
-
let
|
|
32828
|
+
}, Ps = (i, a) => (e, t) => a(e, t, i);
|
|
32829
|
+
let Zn = class extends De {
|
|
32818
32830
|
constructor(i, a, e) {
|
|
32819
32831
|
super(), this._commandService = i, this._otherFormulaManagerService = a, this._dependencyManagerService = e, this._initialize();
|
|
32820
32832
|
}
|
|
@@ -32843,11 +32855,11 @@ let Kn = class extends De {
|
|
|
32843
32855
|
);
|
|
32844
32856
|
}
|
|
32845
32857
|
};
|
|
32846
|
-
|
|
32847
|
-
|
|
32848
|
-
|
|
32849
|
-
|
|
32850
|
-
],
|
|
32858
|
+
Zn = Ly([
|
|
32859
|
+
Ps(0, Dr),
|
|
32860
|
+
Ps(1, ja),
|
|
32861
|
+
Ps(2, cs)
|
|
32862
|
+
], Zn);
|
|
32851
32863
|
class Py extends De {
|
|
32852
32864
|
constructor() {
|
|
32853
32865
|
super(...arguments);
|
|
@@ -32881,8 +32893,8 @@ var jy = Object.getOwnPropertyDescriptor, Uy = (i, a, e, t) => {
|
|
|
32881
32893
|
return r;
|
|
32882
32894
|
}, oo = (i, a) => (e, t) => a(e, t, i);
|
|
32883
32895
|
const Ty = "UNIVER_ENGINE_FORMULA_PLUGIN";
|
|
32884
|
-
var
|
|
32885
|
-
let uo = (
|
|
32896
|
+
var xs;
|
|
32897
|
+
let uo = (xs = class extends Qc {
|
|
32886
32898
|
constructor(i = Oi, a, e) {
|
|
32887
32899
|
super(), this._config = i, this._injector = a, this._configService = e;
|
|
32888
32900
|
const { ...t } = qc(
|
|
@@ -32897,19 +32909,19 @@ let uo = (Ps = class extends Qc {
|
|
|
32897
32909
|
}
|
|
32898
32910
|
onReady() {
|
|
32899
32911
|
var i;
|
|
32900
|
-
|
|
32901
|
-
[
|
|
32912
|
+
Es(this._injector, [
|
|
32913
|
+
[qn]
|
|
32902
32914
|
// [SetSuperTableController],
|
|
32903
|
-
]), (i = this._config) != null && i.notExecuteFormula ||
|
|
32915
|
+
]), (i = this._config) != null && i.notExecuteFormula || Es(this._injector, [
|
|
32916
|
+
[Zn],
|
|
32904
32917
|
[Kn],
|
|
32905
32918
|
[Xn],
|
|
32906
|
-
[
|
|
32907
|
-
[$n]
|
|
32919
|
+
[Yn]
|
|
32908
32920
|
]);
|
|
32909
32921
|
}
|
|
32910
32922
|
onRendered() {
|
|
32911
32923
|
var i;
|
|
32912
|
-
(i = this._config) != null && i.notExecuteFormula ||
|
|
32924
|
+
(i = this._config) != null && i.notExecuteFormula || Es(this._injector, [
|
|
32913
32925
|
[oa],
|
|
32914
32926
|
[aa]
|
|
32915
32927
|
]);
|
|
@@ -32918,56 +32930,56 @@ let uo = (Ps = class extends Qc {
|
|
|
32918
32930
|
const i = !this._config.notExecuteFormula, a = [
|
|
32919
32931
|
// Services
|
|
32920
32932
|
[Xt, { useClass: qm }],
|
|
32921
|
-
[
|
|
32933
|
+
[Pr, { useClass: Bs }],
|
|
32922
32934
|
[xy, { useClass: Py }],
|
|
32923
|
-
[eu, { useClass:
|
|
32935
|
+
[eu, { useClass: ra }],
|
|
32924
32936
|
[Fo, { useClass: nf }],
|
|
32925
|
-
[
|
|
32937
|
+
[Zr, { useClass: Wl }],
|
|
32926
32938
|
[Mc],
|
|
32927
32939
|
// Models
|
|
32928
|
-
[
|
|
32940
|
+
[br],
|
|
32929
32941
|
//Controllers
|
|
32930
|
-
[
|
|
32942
|
+
[qn],
|
|
32931
32943
|
// [SetSuperTableController],
|
|
32932
32944
|
[ha]
|
|
32933
32945
|
];
|
|
32934
32946
|
i && a.push(
|
|
32935
32947
|
// Services
|
|
32936
32948
|
[ja, { useClass: Dh }],
|
|
32937
|
-
[Nt, { useClass:
|
|
32938
|
-
[Wt, { useClass:
|
|
32939
|
-
[
|
|
32949
|
+
[Nt, { useClass: na }],
|
|
32950
|
+
[Wt, { useClass: Gs }],
|
|
32951
|
+
[Qr, { useClass: Sh }],
|
|
32940
32952
|
//Controller
|
|
32941
|
-
[
|
|
32942
|
-
[
|
|
32943
|
-
[qn],
|
|
32953
|
+
[Yn],
|
|
32954
|
+
[Zn],
|
|
32944
32955
|
[Xn],
|
|
32956
|
+
[Kn],
|
|
32945
32957
|
// Calculation engine
|
|
32946
|
-
[
|
|
32947
|
-
[
|
|
32948
|
-
[
|
|
32958
|
+
[Vr],
|
|
32959
|
+
[Wr],
|
|
32960
|
+
[pr],
|
|
32949
32961
|
// AstNode factory
|
|
32950
32962
|
[tu],
|
|
32951
|
-
[Tn],
|
|
32952
32963
|
[vn],
|
|
32953
|
-
[ou],
|
|
32954
32964
|
[In],
|
|
32955
|
-
[
|
|
32965
|
+
[ou],
|
|
32956
32966
|
[Fn],
|
|
32967
|
+
[Tn],
|
|
32957
32968
|
[Bn],
|
|
32958
32969
|
[kn],
|
|
32970
|
+
[$n],
|
|
32959
32971
|
[uu]
|
|
32960
32972
|
), a.forEach((e) => this._injector.add(e));
|
|
32961
32973
|
}
|
|
32962
32974
|
_initializeWithOverride() {
|
|
32963
32975
|
var i;
|
|
32964
|
-
this._injector.add([
|
|
32976
|
+
this._injector.add([$r, { useClass: $r }]), (i = this._config) != null && i.notExecuteFormula || [
|
|
32965
32977
|
[oa, { useClass: ua }],
|
|
32966
|
-
[
|
|
32978
|
+
[cs, { useClass: Mh }],
|
|
32967
32979
|
[aa, { useClass: ia }]
|
|
32968
32980
|
].forEach((e) => this._injector.add(e));
|
|
32969
32981
|
}
|
|
32970
|
-
}, A(
|
|
32982
|
+
}, A(xs, "pluginName", Ty), xs);
|
|
32971
32983
|
uo = Uy([
|
|
32972
32984
|
oo(1, ye(lo)),
|
|
32973
32985
|
oo(2, Ca)
|
|
@@ -32976,25 +32988,25 @@ export {
|
|
|
32976
32988
|
Py as ActiveDirtyManagerService,
|
|
32977
32989
|
K as ArrayValueObject,
|
|
32978
32990
|
tu as AstRootNodeFactory,
|
|
32979
|
-
|
|
32991
|
+
Wr as AstTreeBuilder,
|
|
32980
32992
|
xm as AsyncArrayObject,
|
|
32981
32993
|
Ky as AsyncCustomFunction,
|
|
32982
32994
|
Pm as AsyncObject,
|
|
32983
32995
|
N as BaseFunction,
|
|
32984
|
-
|
|
32996
|
+
jr as BaseReferenceObject,
|
|
32985
32997
|
Qt as BaseValueObject,
|
|
32986
32998
|
ir as BooleanValue,
|
|
32987
32999
|
v as BooleanValueObject,
|
|
32988
|
-
|
|
33000
|
+
Yn as CalculateController,
|
|
32989
33001
|
ua as CalculateFormulaService,
|
|
32990
33002
|
Vg as CustomFunction,
|
|
32991
33003
|
Uh as DEFAULT_INTERVAL_COUNT,
|
|
32992
|
-
|
|
33004
|
+
Br as DEFAULT_TOKEN_LAMBDA_FUNCTION_NAME,
|
|
32993
33005
|
Sl as DEFAULT_TOKEN_LET_FUNCTION_NAME,
|
|
32994
|
-
|
|
33006
|
+
Rr as DEFAULT_TOKEN_TYPE_LAMBDA_PARAMETER,
|
|
32995
33007
|
_t as DEFAULT_TOKEN_TYPE_PARAMETER,
|
|
32996
33008
|
Bt as DEFAULT_TOKEN_TYPE_ROOT,
|
|
32997
|
-
|
|
33009
|
+
Bs as DefinedNamesService,
|
|
32998
33010
|
Oh as DependencyManagerBaseService,
|
|
32999
33011
|
Mh as DependencyManagerService,
|
|
33000
33012
|
Wy as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
|
|
@@ -33019,26 +33031,26 @@ export {
|
|
|
33019
33031
|
Ey as FUNCTION_NAMES_UNIVER,
|
|
33020
33032
|
ti as FUNCTION_NAMES_WEB,
|
|
33021
33033
|
Sh as FeatureCalculationManagerService,
|
|
33022
|
-
|
|
33023
|
-
|
|
33034
|
+
Gs as FormulaCurrentConfigService,
|
|
33035
|
+
br as FormulaDataModel,
|
|
33024
33036
|
ia as FormulaDependencyGenerator,
|
|
33025
|
-
|
|
33037
|
+
Ss as FormulaDependencyTree,
|
|
33026
33038
|
wh as FormulaDependencyTreeModel,
|
|
33027
|
-
|
|
33039
|
+
gr as FormulaDependencyTreeType,
|
|
33028
33040
|
Gi as FormulaDependencyTreeVirtual,
|
|
33029
33041
|
tt as FormulaExecuteStageType,
|
|
33030
|
-
|
|
33031
|
-
|
|
33032
|
-
|
|
33042
|
+
Ir as FormulaExecutedStateType,
|
|
33043
|
+
na as FormulaRuntimeService,
|
|
33044
|
+
vn as FunctionNodeFactory,
|
|
33033
33045
|
qm as FunctionService,
|
|
33034
33046
|
tl as FunctionType,
|
|
33035
33047
|
Mc as GlobalComputingStatusService,
|
|
33036
|
-
|
|
33048
|
+
ra as HyperlinkEngineFormulaService,
|
|
33037
33049
|
xy as IActiveDirtyManagerService,
|
|
33038
33050
|
oa as ICalculateFormulaService,
|
|
33039
|
-
|
|
33040
|
-
|
|
33041
|
-
|
|
33051
|
+
Pr as IDefinedNamesService,
|
|
33052
|
+
cs as IDependencyManagerService,
|
|
33053
|
+
Qr as IFeatureCalculationManagerService,
|
|
33042
33054
|
Wt as IFormulaCurrentConfigService,
|
|
33043
33055
|
aa as IFormulaDependencyGenerator,
|
|
33044
33056
|
Nt as IFormulaRuntimeService,
|
|
@@ -33046,42 +33058,42 @@ export {
|
|
|
33046
33058
|
eu as IHyperlinkEngineFormulaService,
|
|
33047
33059
|
ja as IOtherFormulaManagerService,
|
|
33048
33060
|
Fo as ISheetRowFilteredService,
|
|
33049
|
-
|
|
33050
|
-
|
|
33051
|
-
|
|
33061
|
+
Zr as ISuperTableService,
|
|
33062
|
+
Vr as Interpreter,
|
|
33063
|
+
In as LambdaNodeFactory,
|
|
33052
33064
|
ou as LambdaParameterNodeFactory,
|
|
33053
33065
|
xa as LambdaValueObjectObject,
|
|
33054
|
-
|
|
33066
|
+
pr as Lexer,
|
|
33055
33067
|
ie as LexerNode,
|
|
33056
|
-
|
|
33068
|
+
$r as LexerTreeBuilder,
|
|
33057
33069
|
zy as NEW_EXCEL_FUNCTIONS,
|
|
33058
33070
|
ce as NullValueObject,
|
|
33059
33071
|
b as NumberValueObject,
|
|
33060
33072
|
Dt as OPERATOR_TOKEN_SET,
|
|
33061
|
-
|
|
33073
|
+
Fn as OperatorNodeFactory,
|
|
33062
33074
|
Dh as OtherFormulaManagerService,
|
|
33063
|
-
|
|
33064
|
-
|
|
33065
|
-
|
|
33075
|
+
Tn as PrefixNodeFactory,
|
|
33076
|
+
jn as RangeReferenceObject,
|
|
33077
|
+
Bn as ReferenceNodeFactory,
|
|
33066
33078
|
Ll as RegisterFunctionMutation,
|
|
33067
33079
|
Gl as RemoveDefinedNameMutation,
|
|
33068
33080
|
Ea as RemoveFeatureCalculationMutation,
|
|
33069
33081
|
ya as RemoveOtherFormulaMutation,
|
|
33070
33082
|
ql as RemoveSuperTableMutation,
|
|
33071
|
-
|
|
33072
|
-
|
|
33083
|
+
Rs as SUFFIX_TOKEN_SET,
|
|
33084
|
+
Ts as SetArrayFormulaDataMutation,
|
|
33073
33085
|
Lo as SetCellFormulaDependencyCalculationMutation,
|
|
33074
33086
|
Po as SetCellFormulaDependencyCalculationResultMutation,
|
|
33075
33087
|
No as SetDefinedNameMutation,
|
|
33076
33088
|
Gy as SetDefinedNameMutationFactory,
|
|
33077
33089
|
Aa as SetFeatureCalculationMutation,
|
|
33078
|
-
|
|
33090
|
+
Dn as SetFormulaCalculationNotificationMutation,
|
|
33079
33091
|
Do as SetFormulaCalculationResultMutation,
|
|
33080
33092
|
Vo as SetFormulaCalculationStartMutation,
|
|
33081
33093
|
So as SetFormulaCalculationStopMutation,
|
|
33082
33094
|
Uo as SetFormulaDataMutation,
|
|
33083
33095
|
wo as SetFormulaDependencyCalculationMutation,
|
|
33084
|
-
|
|
33096
|
+
ks as SetFormulaDependencyCalculationResultMutation,
|
|
33085
33097
|
Oo as SetFormulaStringBatchCalculationMutation,
|
|
33086
33098
|
Mo as SetFormulaStringBatchCalculationResultMutation,
|
|
33087
33099
|
To as SetImageFormulaDataMutation,
|
|
@@ -33092,17 +33104,17 @@ export {
|
|
|
33092
33104
|
Xl as SetSuperTableOptionMutation,
|
|
33093
33105
|
nf as SheetRowFilteredService,
|
|
33094
33106
|
U as StringValueObject,
|
|
33095
|
-
|
|
33107
|
+
kn as SuffixNodeFactory,
|
|
33096
33108
|
Wl as SuperTableService,
|
|
33097
|
-
|
|
33109
|
+
$n as UnionNodeFactory,
|
|
33098
33110
|
uo as UniverFormulaEnginePlugin,
|
|
33099
33111
|
uu as ValueNodeFactory,
|
|
33100
33112
|
xt as ValueObjectFactory,
|
|
33101
33113
|
Y as compareToken,
|
|
33102
33114
|
Ri as convertUnitDataToRuntime,
|
|
33103
33115
|
Ih as deserializeRangeForR1C1,
|
|
33104
|
-
|
|
33105
|
-
|
|
33116
|
+
kr as deserializeRangeWithSheet,
|
|
33117
|
+
yr as deserializeRangeWithSheetWithCache,
|
|
33106
33118
|
qy as extractFormulaError,
|
|
33107
33119
|
$h as functionArray,
|
|
33108
33120
|
bg as functionCompatibility,
|
|
@@ -33125,31 +33137,31 @@ export {
|
|
|
33125
33137
|
hr as generateRandomDependencyTreeId,
|
|
33126
33138
|
pi as generateStringWithSequence,
|
|
33127
33139
|
Yy as getAbsoluteRefTypeWitString,
|
|
33128
|
-
|
|
33140
|
+
En as getAbsoluteRefTypeWithSingleString,
|
|
33129
33141
|
Jy as getObjectValue,
|
|
33130
33142
|
Hy as getRangeWithRefsString,
|
|
33131
33143
|
Xy as handleNumfmtInCell,
|
|
33132
33144
|
_a as handleRefStringInfo,
|
|
33133
33145
|
sl as includeFormulaLexerToken,
|
|
33134
33146
|
Vi as initSheetFormulaData,
|
|
33135
|
-
|
|
33147
|
+
An as isFormulaLexerToken,
|
|
33136
33148
|
el as isInDirtyRange,
|
|
33137
33149
|
Ro as isReferenceString,
|
|
33138
|
-
|
|
33150
|
+
Rn as isReferenceStringWithEffectiveColumn,
|
|
33139
33151
|
vl as isReferenceStrings,
|
|
33140
33152
|
$y as matchRefDrawToken,
|
|
33141
33153
|
X as matchToken,
|
|
33142
|
-
|
|
33154
|
+
Is as needsQuoting,
|
|
33143
33155
|
ky as normalizeSheetName,
|
|
33144
33156
|
Z as operatorToken,
|
|
33145
33157
|
Le as prefixToken,
|
|
33146
|
-
|
|
33158
|
+
Fs as quoteSheetName,
|
|
33147
33159
|
He as sequenceNodeType,
|
|
33148
33160
|
Yt as serializeRange,
|
|
33149
|
-
|
|
33161
|
+
vs as serializeRangeToRefString,
|
|
33150
33162
|
jl as serializeRangeWithSheet,
|
|
33151
33163
|
Ul as serializeRangeWithSpreadsheet,
|
|
33152
|
-
|
|
33164
|
+
ys as singleReferenceToGrid,
|
|
33153
33165
|
kl as splitTableStructuredRef,
|
|
33154
33166
|
Ui as strip,
|
|
33155
33167
|
Ma as stripErrorMargin,
|