@univerjs/engine-formula 0.8.2-nightly.202506261607 → 0.8.3-nightly.202506271607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +357 -357
- package/lib/index.js +357 -357
- package/lib/types/basics/match-token.d.ts +1 -1
- package/lib/types/index.d.ts +21 -21
- package/lib/umd/index.js +2 -2
- package/package.json +5 -5
package/lib/es/index.js
CHANGED
|
@@ -5,24 +5,8 @@ import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as et, AbsoluteRefTyp
|
|
|
5
5
|
import { Subject as cr, BehaviorSubject as qi, distinctUntilChanged as Ki, combineLatest as lc, map as fc, Observable as hc, shareReplay as mc } from "rxjs";
|
|
6
6
|
import { isTextFormat as gc } from "@univerjs/engine-numfmt";
|
|
7
7
|
import { DataSyncPrimaryController as dc } from "@univerjs/rpc";
|
|
8
|
-
function Cc(i) {
|
|
9
|
-
let a = i;
|
|
10
|
-
for (; a != null && a.getParent(); )
|
|
11
|
-
a = a.getParent();
|
|
12
|
-
return a;
|
|
13
|
-
}
|
|
14
|
-
function Za(i, a = 0, e = 0) {
|
|
15
|
-
return {
|
|
16
|
-
node: i,
|
|
17
|
-
refOffsetX: a,
|
|
18
|
-
refOffsetY: e
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function Qb(i) {
|
|
22
|
-
return i.isError() ? i.getValue() : i.isReferenceObject() ? i.toArrayValueObject().toValue() : i.isArray() ? i.toValue() : i.getValue();
|
|
23
|
-
}
|
|
24
8
|
var er = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(er || {}), xt = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(xt || {}), ct = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ct || {});
|
|
25
|
-
function
|
|
9
|
+
function Cc(i, a, e, t, r) {
|
|
26
10
|
for (let n = 0, s = i.length; n < s; n++) {
|
|
27
11
|
const o = i[n];
|
|
28
12
|
if (a !== o.unitId || e !== o.sheetId)
|
|
@@ -34,8 +18,8 @@ function _c(i, a, e, t, r) {
|
|
|
34
18
|
return !1;
|
|
35
19
|
}
|
|
36
20
|
var m = /* @__PURE__ */ ((i) => (i.DIV_BY_ZERO = "#DIV/0!", i.NAME = "#NAME?", i.VALUE = "#VALUE!", i.NUM = "#NUM!", i.NA = "#N/A", i.CYCLE = "#CYCLE!", i.REF = "#REF!", i.SPILL = "#SPILL!", i.CALC = "#CALC!", i.ERROR = "#ERROR!", i.CONNECT = "#GETTING_DATA", i.NULL = "#NULL!", i))(m || {});
|
|
37
|
-
const yr = new Set(Object.values(m)),
|
|
38
|
-
var
|
|
21
|
+
const yr = new Set(Object.values(m)), Za = [...new Set(Object.values(m).map((i) => i.length))];
|
|
22
|
+
var _c = /* @__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))(_c || {}), X = /* @__PURE__ */ ((i) => (i.PLUS = "+", i.MINUS = "-", i.MULTIPLY = "*", i.DIVIDED = "/", i.CONCATENATE = "&", i.POWER = "^", i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(X || {}), $ = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))($ || {});
|
|
39
23
|
const nn = /* @__PURE__ */ new Map([
|
|
40
24
|
["<>", 4],
|
|
41
25
|
["<", 4],
|
|
@@ -50,7 +34,7 @@ const nn = /* @__PURE__ */ new Map([
|
|
|
50
34
|
["*", 1],
|
|
51
35
|
["^", 0]
|
|
52
36
|
// ^
|
|
53
|
-
]), Dt = new Set(nn.keys()),
|
|
37
|
+
]), Dt = new Set(nn.keys()), Ac = /* @__PURE__ */ new Set([
|
|
54
38
|
"=",
|
|
55
39
|
"<>",
|
|
56
40
|
">",
|
|
@@ -66,7 +50,7 @@ const ls = /* @__PURE__ */ new Set([
|
|
|
66
50
|
/* POUND */
|
|
67
51
|
]);
|
|
68
52
|
var Me = /* @__PURE__ */ ((i) => (i.AT = "@", i.MINUS = "-", i.PLUS = "+", i))(Me || {});
|
|
69
|
-
const
|
|
53
|
+
const Ec = " ", Xi = [
|
|
70
54
|
...Object.values($),
|
|
71
55
|
...Object.values(X),
|
|
72
56
|
...Object.values(K),
|
|
@@ -76,19 +60,19 @@ const bc = " ", Xi = [
|
|
|
76
60
|
function sn(i) {
|
|
77
61
|
return Xi.includes(i);
|
|
78
62
|
}
|
|
79
|
-
function
|
|
63
|
+
function bc(i) {
|
|
80
64
|
for (const a of Xi)
|
|
81
65
|
if (i.indexOf(a) > -1)
|
|
82
66
|
return !0;
|
|
83
67
|
return !1;
|
|
84
68
|
}
|
|
85
|
-
function
|
|
69
|
+
function Qb(i) {
|
|
86
70
|
return i[0] === "'" && i[i.length - 1] === "'" ? i.substring(1, i.length - 1) : i;
|
|
87
71
|
}
|
|
88
|
-
function
|
|
72
|
+
function Wb(i) {
|
|
89
73
|
return sn(i) && i !== K.CLOSE_BRACES && i !== K.CLOSE_BRACKET && i !== K.SINGLE_QUOTATION && i !== K.DOUBLE_QUOTATION || i === " ";
|
|
90
74
|
}
|
|
91
|
-
const
|
|
75
|
+
const yc = /* @__PURE__ */ new Set([
|
|
92
76
|
X.PLUS,
|
|
93
77
|
X.MINUS,
|
|
94
78
|
X.MULTIPLY,
|
|
@@ -107,10 +91,10 @@ const Rc = /* @__PURE__ */ new Set([
|
|
|
107
91
|
K.OPEN_BRACES,
|
|
108
92
|
K.OPEN_SQUARE_BRACKET
|
|
109
93
|
]);
|
|
110
|
-
function
|
|
111
|
-
return
|
|
94
|
+
function Rc(i) {
|
|
95
|
+
return yc.has(i);
|
|
112
96
|
}
|
|
113
|
-
const
|
|
97
|
+
const pc = /* @__PURE__ */ new Set([
|
|
114
98
|
X.PLUS,
|
|
115
99
|
X.MINUS,
|
|
116
100
|
X.MULTIPLY,
|
|
@@ -131,10 +115,35 @@ const Vc = /* @__PURE__ */ new Set([
|
|
|
131
115
|
tt.PERCENTAGE,
|
|
132
116
|
tt.POUND
|
|
133
117
|
]);
|
|
134
|
-
function
|
|
135
|
-
return
|
|
118
|
+
function Vc(i) {
|
|
119
|
+
return pc.has(i);
|
|
120
|
+
}
|
|
121
|
+
const Zi = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', za = new RegExp(Zi), Nc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", oa = "\\s*?:\\s*?", gn = "[A-Za-z]+", dn = "[1-9][0-9]*", Rr = `'?(${Zi})?(${Nc})?'?`, Ms = `\\${Tt}?${gn}\\${Tt}?${dn}`, Oc = `^(${Me.AT})?${Rr}${Ms}${oa}${Ms}$`, Ja = new RegExp(Oc), Mc = `^${Rr}\\s*?${Ms}(${tt.POUND})?$`, ei = new RegExp(Mc), wc = `^${Rr}\\${Tt}?${dn}${oa}\\${Tt}?${dn}$`, ti = new RegExp(wc), Sc = `^${Rr}\\${Tt}?${gn}${oa}\\${Tt}?${gn}$`, ri = new RegExp(Sc), Dc = `^${Rr}\\s*?\\${Tt}?${dn}$`, ni = new RegExp(Dc), Lc = `^${Rr}\\s*?\\${Tt}?${gn}$`, si = new RegExp(Lc), Pc = "{.*?}", ai = new RegExp(Pc, "g");
|
|
122
|
+
function Br(i) {
|
|
123
|
+
return ei.lastIndex = 0, ei.test(i);
|
|
124
|
+
}
|
|
125
|
+
function xc(i) {
|
|
126
|
+
return Ja.lastIndex = 0, Ja.test(i);
|
|
136
127
|
}
|
|
137
|
-
function
|
|
128
|
+
function zi(i) {
|
|
129
|
+
return ti.lastIndex = 0, ti.test(i);
|
|
130
|
+
}
|
|
131
|
+
function Ji(i) {
|
|
132
|
+
return ri.lastIndex = 0, ri.test(i);
|
|
133
|
+
}
|
|
134
|
+
function eo(i) {
|
|
135
|
+
return ni.lastIndex = 0, ni.test(i);
|
|
136
|
+
}
|
|
137
|
+
function to(i) {
|
|
138
|
+
return si.lastIndex = 0, si.test(i);
|
|
139
|
+
}
|
|
140
|
+
function jc(i) {
|
|
141
|
+
return ai.lastIndex = 0, ai.test(i);
|
|
142
|
+
}
|
|
143
|
+
function ro(i) {
|
|
144
|
+
return Br(i) || xc(i) || zi(i) || Ji(i);
|
|
145
|
+
}
|
|
146
|
+
function Uc(i) {
|
|
138
147
|
const a = {};
|
|
139
148
|
return Object.keys(i).forEach((e) => {
|
|
140
149
|
const t = i[e];
|
|
@@ -146,7 +155,7 @@ function Oc(i) {
|
|
|
146
155
|
});
|
|
147
156
|
}), a;
|
|
148
157
|
}
|
|
149
|
-
function
|
|
158
|
+
function vc(i) {
|
|
150
159
|
const a = {};
|
|
151
160
|
for (const e in i) {
|
|
152
161
|
const t = i[e];
|
|
@@ -162,32 +171,7 @@ function Mc(i) {
|
|
|
162
171
|
}
|
|
163
172
|
return a;
|
|
164
173
|
}
|
|
165
|
-
const
|
|
166
|
-
function Br(i) {
|
|
167
|
-
return ti.lastIndex = 0, ti.test(i);
|
|
168
|
-
}
|
|
169
|
-
function vc(i) {
|
|
170
|
-
return ei.lastIndex = 0, ei.test(i);
|
|
171
|
-
}
|
|
172
|
-
function zi(i) {
|
|
173
|
-
return ri.lastIndex = 0, ri.test(i);
|
|
174
|
-
}
|
|
175
|
-
function Ji(i) {
|
|
176
|
-
return ni.lastIndex = 0, ni.test(i);
|
|
177
|
-
}
|
|
178
|
-
function eo(i) {
|
|
179
|
-
return si.lastIndex = 0, si.test(i);
|
|
180
|
-
}
|
|
181
|
-
function to(i) {
|
|
182
|
-
return ai.lastIndex = 0, ai.test(i);
|
|
183
|
-
}
|
|
184
|
-
function Tc(i) {
|
|
185
|
-
return ii.lastIndex = 0, ii.test(i);
|
|
186
|
-
}
|
|
187
|
-
function ro(i) {
|
|
188
|
-
return Br(i) || vc(i) || zi(i) || Ji(i);
|
|
189
|
-
}
|
|
190
|
-
const Bc = {
|
|
174
|
+
const Tc = {
|
|
191
175
|
id: "formula.mutation.register-function",
|
|
192
176
|
type: Ie.MUTATION,
|
|
193
177
|
handler: () => !0
|
|
@@ -195,14 +179,14 @@ const Bc = {
|
|
|
195
179
|
id: "formula.mutation.set-array-formula-data",
|
|
196
180
|
type: Ie.MUTATION,
|
|
197
181
|
handler: (i, a) => !0
|
|
198
|
-
},
|
|
182
|
+
}, Bc = /[^0-9]/g, Ic = /[^A-Za-z]/g;
|
|
199
183
|
function an(i) {
|
|
200
184
|
let a = i[0] === "$";
|
|
201
185
|
const e = i.substring(1);
|
|
202
186
|
let t = e.indexOf("$") > -1;
|
|
203
187
|
return Ye.isStringNumber(e) && a && !t && (a = !1, t = !0), a && t ? we.ALL : a ? we.COLUMN : t ? we.ROW : we.NONE;
|
|
204
188
|
}
|
|
205
|
-
function
|
|
189
|
+
function qb(i) {
|
|
206
190
|
const a = i.split("!");
|
|
207
191
|
a.length > 1 && (i = a[a.length - 1]);
|
|
208
192
|
const e = i.split(":");
|
|
@@ -211,7 +195,7 @@ function Kb(i) {
|
|
|
211
195
|
endAbsoluteRefType: an(e[1])
|
|
212
196
|
} : { startAbsoluteRefType: an(e[0]) };
|
|
213
197
|
}
|
|
214
|
-
function
|
|
198
|
+
function ii(i = we.NONE) {
|
|
215
199
|
let a = "", e = "";
|
|
216
200
|
return i === we.ROW ? a = "$" : i === we.COLUMN ? e = "$" : i === we.ALL && (a = "$", e = "$"), {
|
|
217
201
|
rowAbsoluteString: a,
|
|
@@ -227,7 +211,7 @@ function Bt(i) {
|
|
|
227
211
|
startAbsoluteRefType: n,
|
|
228
212
|
endAbsoluteRefType: s,
|
|
229
213
|
rangeType: o = et.NORMAL
|
|
230
|
-
} = i, u =
|
|
214
|
+
} = i, u = ii(n), c = ii(s);
|
|
231
215
|
if (o === et.ROW || o === et.ALL) {
|
|
232
216
|
const h = `${u.rowAbsoluteString}${e + 1}`, d = `${c.rowAbsoluteString}${r + 1}`;
|
|
233
217
|
return `${h}:${d}`;
|
|
@@ -239,18 +223,18 @@ function Bt(i) {
|
|
|
239
223
|
const l = `${u.columnAbsoluteString}${Ye.chatAtABC(a)}${u.rowAbsoluteString}${e + 1}`, f = `${c.columnAbsoluteString}${Ye.chatAtABC(t)}${c.rowAbsoluteString}${r + 1}`;
|
|
240
224
|
return l === f ? l : `${l}:${f}`;
|
|
241
225
|
}
|
|
242
|
-
function
|
|
226
|
+
function Fc(i, a) {
|
|
243
227
|
return `${so(i)}!${Bt(a)}`;
|
|
244
228
|
}
|
|
245
|
-
function
|
|
229
|
+
function kc(i, a, e) {
|
|
246
230
|
return Ds(i) || Ds(a) ? `'[${Ls(i)}]${Ls(a)}'!${Bt(e)}` : `[${i}]${a}!${Bt(e)}`;
|
|
247
231
|
}
|
|
248
232
|
function Ss(i) {
|
|
249
233
|
const { unitId: a, sheetName: e, range: t } = i;
|
|
250
|
-
return a != null && a.length > 0 && e != null && e.length > 0 ?
|
|
234
|
+
return a != null && a.length > 0 && e != null && e.length > 0 ? kc(a, e, t) : e != null && e.length > 0 ? Fc(e, t) : Bt(t);
|
|
251
235
|
}
|
|
252
236
|
function fs(i) {
|
|
253
|
-
const a = Number.parseInt(i.replace(
|
|
237
|
+
const a = Number.parseInt(i.replace(Bc, "")) - 1, e = Ye.ABCatNum(i.replace(Ic, "")), t = an(i);
|
|
254
238
|
return {
|
|
255
239
|
row: a,
|
|
256
240
|
column: e,
|
|
@@ -258,12 +242,12 @@ function fs(i) {
|
|
|
258
242
|
};
|
|
259
243
|
}
|
|
260
244
|
function ua(i) {
|
|
261
|
-
const a =
|
|
245
|
+
const a = za.exec(i);
|
|
262
246
|
let e = "";
|
|
263
|
-
a != null && (e = a[0].trim(), e =
|
|
247
|
+
a != null && (e = a[0].trim(), e = oi(e.slice(1, e.length - 1)), i = i.replace(za, ""));
|
|
264
248
|
const t = i.indexOf("!");
|
|
265
249
|
let r = "", n = "";
|
|
266
|
-
return t > -1 ? (r = i.substring(0, t), r[0] === "'" && r[r.length - 1] === "'" && (r = r.substring(1, r.length - 1)), r =
|
|
250
|
+
return t > -1 ? (r = i.substring(0, t), r[0] === "'" && r[r.length - 1] === "'" && (r = r.substring(1, r.length - 1)), r = oi(r), n = i.substring(t + 1)) : n = i, {
|
|
267
251
|
refBody: n,
|
|
268
252
|
sheetName: r,
|
|
269
253
|
unitId: e
|
|
@@ -302,10 +286,10 @@ function Lr(i) {
|
|
|
302
286
|
}
|
|
303
287
|
};
|
|
304
288
|
}
|
|
305
|
-
const
|
|
289
|
+
const $c = ["LOG10"];
|
|
306
290
|
function on(i) {
|
|
307
291
|
const a = no(i);
|
|
308
|
-
if (!ro(a) ||
|
|
292
|
+
if (!ro(a) || $c.includes(a.toUpperCase().trim()))
|
|
309
293
|
return !1;
|
|
310
294
|
const { range: e } = Lr(a);
|
|
311
295
|
return !(e.endColumn >= 16384);
|
|
@@ -315,7 +299,7 @@ function no(i) {
|
|
|
315
299
|
let e = !1;
|
|
316
300
|
for (let t = 0, r = i.length; t < r; t++) {
|
|
317
301
|
const n = i[t];
|
|
318
|
-
if (n ===
|
|
302
|
+
if (n === Ec && !e)
|
|
319
303
|
a.push(n);
|
|
320
304
|
else {
|
|
321
305
|
if (!e && (n === Me.AT || n === Me.MINUS || n === Me.PLUS))
|
|
@@ -325,9 +309,9 @@ function no(i) {
|
|
|
325
309
|
}
|
|
326
310
|
return a.join("");
|
|
327
311
|
}
|
|
328
|
-
function
|
|
312
|
+
function Kb(i, a) {
|
|
329
313
|
const e = (i == null ? void 0 : i.split(",")) || [];
|
|
330
|
-
return i === "" || e.length === 0 ? [] :
|
|
314
|
+
return i === "" || e.length === 0 ? [] : Yc(i) ? e.map((n) => {
|
|
331
315
|
const s = Lr(n);
|
|
332
316
|
return {
|
|
333
317
|
unitId: s.unitId,
|
|
@@ -337,11 +321,11 @@ function Xb(i, a) {
|
|
|
337
321
|
};
|
|
338
322
|
}) : [];
|
|
339
323
|
}
|
|
340
|
-
function
|
|
324
|
+
function Yc(i) {
|
|
341
325
|
return ((i == null ? void 0 : i.split(",")) || []).every((e) => on(e.trim()));
|
|
342
326
|
}
|
|
343
327
|
function Ds(i) {
|
|
344
|
-
return i.length === 0 ? !1 : !!(
|
|
328
|
+
return i.length === 0 ? !1 : !!(bc(i) || Hc(i) || Gc(i) || Qc(i) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?()]/.test(i));
|
|
345
329
|
}
|
|
346
330
|
function so(i) {
|
|
347
331
|
return Ds(i) ? `'${Ls(i)}'` : i;
|
|
@@ -349,24 +333,24 @@ function so(i) {
|
|
|
349
333
|
function Ls(i) {
|
|
350
334
|
return i.replace(/'/g, "''");
|
|
351
335
|
}
|
|
352
|
-
function
|
|
336
|
+
function oi(i) {
|
|
353
337
|
return i.replace(/''/g, "'");
|
|
354
338
|
}
|
|
355
|
-
function
|
|
339
|
+
function Hc(i) {
|
|
356
340
|
const a = i.match(/[1-9][0-9]{0,6}/);
|
|
357
341
|
return /^[A-Z]+[1-9][0-9]{0,6}$/.test(i) && a !== null;
|
|
358
342
|
}
|
|
359
|
-
function
|
|
343
|
+
function Gc(i) {
|
|
360
344
|
return /^(R(-?[0-9]+)?C(-?[0-9]+)?|C(-?[0-9]+)?|R(-?[0-9]+)?)$/.test(i);
|
|
361
345
|
}
|
|
362
|
-
function
|
|
346
|
+
function Qc(i) {
|
|
363
347
|
return !new RegExp("^\\p{Letter}", "u").test(i.charAt(0));
|
|
364
348
|
}
|
|
365
|
-
var
|
|
366
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
349
|
+
var Wc = Object.getOwnPropertyDescriptor, qc = (i, a, e, t) => {
|
|
350
|
+
for (var r = t > 1 ? void 0 : t ? Wc(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
367
351
|
(s = i[n]) && (r = s(r) || r);
|
|
368
352
|
return r;
|
|
369
|
-
},
|
|
353
|
+
}, Kc = (i, a) => (e, t) => a(e, t, i);
|
|
370
354
|
let Ps = class extends Ne {
|
|
371
355
|
constructor(a) {
|
|
372
356
|
super();
|
|
@@ -465,10 +449,10 @@ let Ps = class extends Ne {
|
|
|
465
449
|
this._nameCacheMap[a][t.name] = t;
|
|
466
450
|
}
|
|
467
451
|
};
|
|
468
|
-
Ps =
|
|
469
|
-
|
|
452
|
+
Ps = qc([
|
|
453
|
+
Kc(0, $n)
|
|
470
454
|
], Ps);
|
|
471
|
-
const pr = Ze("univer.formula.defined-names.service"),
|
|
455
|
+
const pr = Ze("univer.formula.defined-names.service"), Xb = (i, a) => {
|
|
472
456
|
const { unitId: e, id: t } = a;
|
|
473
457
|
return {
|
|
474
458
|
...i.get(pr).getValueById(e, t),
|
|
@@ -535,11 +519,11 @@ const pr = Ze("univer.formula.defined-names.service"), Zb = (i, a) => {
|
|
|
535
519
|
id: "formula.mutation.remove-other-formula",
|
|
536
520
|
type: Ie.MUTATION,
|
|
537
521
|
handler: () => !0
|
|
538
|
-
},
|
|
522
|
+
}, Xc = {
|
|
539
523
|
id: "formula.mutation.set-super-table",
|
|
540
524
|
type: Ie.MUTATION,
|
|
541
525
|
handler: () => !0
|
|
542
|
-
},
|
|
526
|
+
}, Zc = {
|
|
543
527
|
id: "formula.mutation.remove-super-table",
|
|
544
528
|
type: Ie.MUTATION,
|
|
545
529
|
handler: () => !0
|
|
@@ -574,7 +558,7 @@ class Nt {
|
|
|
574
558
|
return a.length <= 64 ? a : Xu(a).toString();
|
|
575
559
|
}
|
|
576
560
|
}
|
|
577
|
-
const ht = "P_1", Ut = "R_1", hr = "L_1", Ir = "LR_1", fo = "LO_1",
|
|
561
|
+
const ht = "P_1", Ut = "R_1", hr = "L_1", Ir = "LR_1", fo = "LO_1", zc = "LET", Pr = "LAMBDA", Jc = "CUBE", el = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), xs = new Nt(1e5);
|
|
578
562
|
function mr(i) {
|
|
579
563
|
const a = xs.get(i);
|
|
580
564
|
if (a)
|
|
@@ -582,11 +566,11 @@ function mr(i) {
|
|
|
582
566
|
const e = Lr(i);
|
|
583
567
|
return xs.set(i, e), Lr(i);
|
|
584
568
|
}
|
|
585
|
-
function
|
|
569
|
+
function tl() {
|
|
586
570
|
xs.clear();
|
|
587
571
|
}
|
|
588
572
|
var $e = /* @__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))($e || {});
|
|
589
|
-
function
|
|
573
|
+
function ui(i) {
|
|
590
574
|
let a = "";
|
|
591
575
|
for (const e of i)
|
|
592
576
|
typeof e == "string" ? a += e : a += e.token;
|
|
@@ -842,7 +826,7 @@ class ga extends Ne {
|
|
|
842
826
|
}
|
|
843
827
|
}
|
|
844
828
|
}
|
|
845
|
-
return `${o}${
|
|
829
|
+
return `${o}${ui(s)}`;
|
|
846
830
|
}
|
|
847
831
|
moveFormulaRefOffset(e, t, r, n = !1) {
|
|
848
832
|
const s = this.sequenceNodesBuilder(e);
|
|
@@ -872,7 +856,7 @@ class ga extends Ne {
|
|
|
872
856
|
token: E
|
|
873
857
|
});
|
|
874
858
|
}
|
|
875
|
-
return `=${
|
|
859
|
+
return `=${ui(o)}`;
|
|
876
860
|
}
|
|
877
861
|
/**
|
|
878
862
|
* univer-pro/issues/1684
|
|
@@ -1254,11 +1238,11 @@ class ga extends Ne {
|
|
|
1254
1238
|
*/
|
|
1255
1239
|
_formulaErrorLastTokenCheck(e, t) {
|
|
1256
1240
|
const r = this._findPreviousToken(e, t) || "", n = e.length - 1 === t;
|
|
1257
|
-
if (!n && this._isOperatorToken(r) || n &&
|
|
1241
|
+
if (!n && this._isOperatorToken(r) || n && Rc(r))
|
|
1258
1242
|
return !0;
|
|
1259
1243
|
if (ls.has(r)) {
|
|
1260
1244
|
const s = this._findSecondLastNonSpaceToken(e, t);
|
|
1261
|
-
if (s == null ||
|
|
1245
|
+
if (s == null || Vc(s))
|
|
1262
1246
|
return !0;
|
|
1263
1247
|
}
|
|
1264
1248
|
return !1;
|
|
@@ -1326,8 +1310,8 @@ class ga extends Ne {
|
|
|
1326
1310
|
return !!this._findErrorObject(e, t);
|
|
1327
1311
|
}
|
|
1328
1312
|
_findErrorObject(e, t) {
|
|
1329
|
-
for (let r = 0; r <
|
|
1330
|
-
const n =
|
|
1313
|
+
for (let r = 0; r < Za.length; r++) {
|
|
1314
|
+
const n = Za[r], s = t.slice(e, e + n).join("").toUpperCase();
|
|
1331
1315
|
if (yr.has(s))
|
|
1332
1316
|
return s;
|
|
1333
1317
|
}
|
|
@@ -1428,7 +1412,7 @@ class ga extends Ne {
|
|
|
1428
1412
|
this._newAndPushCurrentLexerNode(ht, u);
|
|
1429
1413
|
} else {
|
|
1430
1414
|
const f = new ae();
|
|
1431
|
-
f.setToken(
|
|
1415
|
+
f.setToken(Jc);
|
|
1432
1416
|
const h = new ae();
|
|
1433
1417
|
h.setToken(ht), h.changeToParent(f);
|
|
1434
1418
|
const d = this._currentLexerNode.getParent();
|
|
@@ -1530,7 +1514,7 @@ class ga extends Ne {
|
|
|
1530
1514
|
});
|
|
1531
1515
|
}
|
|
1532
1516
|
}
|
|
1533
|
-
function
|
|
1517
|
+
function rl(i, a, e, t, r, n, s) {
|
|
1534
1518
|
const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c = yt(o), l = Pt(u), f = i.getValue(r, n), h = (f == null ? void 0 : f.f) || "", d = (f == null ? void 0 : f.si) || "";
|
|
1535
1519
|
function _() {
|
|
1536
1520
|
var C;
|
|
@@ -1554,7 +1538,7 @@ function nl(i, a, e, t, r, n, s) {
|
|
|
1554
1538
|
si: u
|
|
1555
1539
|
})) : !c && !l && i.getValue(r, n) && (_(), i.realDeleteValue(r, n), a.setValue(r, n, null));
|
|
1556
1540
|
}
|
|
1557
|
-
function
|
|
1541
|
+
function nl(i, a, e, t) {
|
|
1558
1542
|
const r = i == null ? void 0 : i.getValue(e, t);
|
|
1559
1543
|
if (r == null)
|
|
1560
1544
|
return !0;
|
|
@@ -1570,11 +1554,11 @@ function sl(i, a, e, t) {
|
|
|
1570
1554
|
n.some((_) => Xa.contains(_, d) ? (h = !0, !0) : !1), h || a.realDeleteValue(l, f);
|
|
1571
1555
|
}
|
|
1572
1556
|
}
|
|
1573
|
-
var
|
|
1574
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1557
|
+
var sl = Object.getOwnPropertyDescriptor, al = (i, a, e, t) => {
|
|
1558
|
+
for (var r = t > 1 ? void 0 : t ? sl(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
1575
1559
|
(s = i[n]) && (r = s(r) || r);
|
|
1576
1560
|
return r;
|
|
1577
|
-
},
|
|
1561
|
+
}, ci = (i, a) => (e, t) => a(e, t, i);
|
|
1578
1562
|
let gr = class extends Ne {
|
|
1579
1563
|
constructor(a, e) {
|
|
1580
1564
|
super();
|
|
@@ -1640,7 +1624,7 @@ let gr = class extends Ne {
|
|
|
1640
1624
|
const r = t.getUnitId();
|
|
1641
1625
|
a[r] = {}, t.getSheets().forEach((s) => {
|
|
1642
1626
|
const o = s.getCellMatrix(), u = s.getSheetId();
|
|
1643
|
-
|
|
1627
|
+
li(a, r, u, o);
|
|
1644
1628
|
});
|
|
1645
1629
|
}), a;
|
|
1646
1630
|
}
|
|
@@ -1653,7 +1637,7 @@ let gr = class extends Ne {
|
|
|
1653
1637
|
if (n == null)
|
|
1654
1638
|
return {};
|
|
1655
1639
|
const s = n.getCellMatrix();
|
|
1656
|
-
return
|
|
1640
|
+
return li(t, a, e, s), t[a][e];
|
|
1657
1641
|
}
|
|
1658
1642
|
getArrayFormulaRange() {
|
|
1659
1643
|
return this._arrayFormulaRange;
|
|
@@ -1743,7 +1727,7 @@ let gr = class extends Ne {
|
|
|
1743
1727
|
u[e] == null && (u[e] = {});
|
|
1744
1728
|
const c = new Ce(u[e] || {}), l = new Ce();
|
|
1745
1729
|
return r.forValue((f, h, d) => {
|
|
1746
|
-
|
|
1730
|
+
rl(c, l, n, s, f, h, d);
|
|
1747
1731
|
}), c.forValue((f, h, d) => {
|
|
1748
1732
|
const _ = (d == null ? void 0 : d.f) || "", C = (d == null ? void 0 : d.si) || "";
|
|
1749
1733
|
if (Pt(C)) {
|
|
@@ -1778,7 +1762,7 @@ let gr = class extends Ne {
|
|
|
1778
1762
|
if (!s) return;
|
|
1779
1763
|
const o = new Ce(s);
|
|
1780
1764
|
new Ce(t).forValue((f, h, d) => {
|
|
1781
|
-
|
|
1765
|
+
nl(n, o, f, h);
|
|
1782
1766
|
});
|
|
1783
1767
|
}
|
|
1784
1768
|
getFormulaStringByCell(a, e, t, r) {
|
|
@@ -1872,11 +1856,11 @@ let gr = class extends Ne {
|
|
|
1872
1856
|
}), t;
|
|
1873
1857
|
}
|
|
1874
1858
|
};
|
|
1875
|
-
gr =
|
|
1876
|
-
|
|
1877
|
-
|
|
1859
|
+
gr = al([
|
|
1860
|
+
ci(0, $n),
|
|
1861
|
+
ci(1, ye(ga))
|
|
1878
1862
|
], gr);
|
|
1879
|
-
function
|
|
1863
|
+
function li(i, a, e, t) {
|
|
1880
1864
|
i[a] || (i[a] = {}), i[a][e] || (i[a][e] = {});
|
|
1881
1865
|
const r = /* @__PURE__ */ new Map(), n = new Ce(i[a][e]);
|
|
1882
1866
|
t.forValue((o, u, c) => {
|
|
@@ -1908,7 +1892,7 @@ function fi(i, a, e, t) {
|
|
|
1908
1892
|
}
|
|
1909
1893
|
};
|
|
1910
1894
|
}
|
|
1911
|
-
const
|
|
1895
|
+
const il = class js {
|
|
1912
1896
|
/**
|
|
1913
1897
|
* Accept two comparable values and creates new instance of interval
|
|
1914
1898
|
* Predicate Interval.comparable_less(low, high) supposed to return true on these values
|
|
@@ -2004,7 +1988,7 @@ class Gt {
|
|
|
2004
1988
|
constructor(a = void 0, e = void 0, t = null, r = null, n = null, s = Ae) {
|
|
2005
1989
|
if (this.left = t, this.right = r, this.parent = n, this.color = s, this.item = { key: a, value: e }, a && a instanceof Array && a.length === 2 && !Number.isNaN(a[0]) && !Number.isNaN(a[1])) {
|
|
2006
1990
|
let [o, u] = a;
|
|
2007
|
-
o > u && ([o, u] = [u, o]), this.item.key = new
|
|
1991
|
+
o > u && ([o, u] = [u, o]), this.item.key = new il(o, u);
|
|
2008
1992
|
}
|
|
2009
1993
|
this.max = this.item.key ? this.item.key.max : void 0;
|
|
2010
1994
|
}
|
|
@@ -2296,7 +2280,7 @@ class da {
|
|
|
2296
2280
|
return e += t, e;
|
|
2297
2281
|
}
|
|
2298
2282
|
}
|
|
2299
|
-
class
|
|
2283
|
+
class ol {
|
|
2300
2284
|
constructor() {
|
|
2301
2285
|
/**
|
|
2302
2286
|
* {
|
|
@@ -2417,8 +2401,8 @@ class ul {
|
|
|
2417
2401
|
a.insert([n, s]);
|
|
2418
2402
|
}
|
|
2419
2403
|
}
|
|
2420
|
-
const qe = new
|
|
2421
|
-
class
|
|
2404
|
+
const qe = new ol(), Ca = "engine-formula.config", mo = 1, Zb = "CYCLE_REFERENCE_COUNT", fi = {};
|
|
2405
|
+
class ul extends Ne {
|
|
2422
2406
|
constructor() {
|
|
2423
2407
|
super(...arguments);
|
|
2424
2408
|
A(this, "_getRowFilteredCallback");
|
|
@@ -2434,8 +2418,8 @@ class cl extends Ne {
|
|
|
2434
2418
|
const go = Ze(
|
|
2435
2419
|
"univer.formula.sheet-row-filtered.service"
|
|
2436
2420
|
);
|
|
2437
|
-
var
|
|
2438
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2421
|
+
var cl = Object.getOwnPropertyDescriptor, ll = (i, a, e, t) => {
|
|
2422
|
+
for (var r = t > 1 ? void 0 : t ? cl(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
2439
2423
|
(s = i[n]) && (r = s(r) || r);
|
|
2440
2424
|
return r;
|
|
2441
2425
|
}, Kr = (i, a) => (e, t) => a(e, t, i);
|
|
@@ -2551,7 +2535,7 @@ let Us = class extends Ne {
|
|
|
2551
2535
|
const { allUnitData: e, unitSheetNameMap: t, unitStylesData: r } = this._loadSheetData();
|
|
2552
2536
|
this._unitData = e, this._unitStylesData = r, this._sheetNameMap = t;
|
|
2553
2537
|
}
|
|
2554
|
-
a.rowData && this._applyUnitRowData(a.rowData), this._formulaData = a.formulaData, this._arrayFormulaCellData =
|
|
2538
|
+
a.rowData && this._applyUnitRowData(a.rowData), this._formulaData = a.formulaData, this._arrayFormulaCellData = Uc(a.arrayFormulaCellData), this._arrayFormulaRange = a.arrayFormulaRange, this._forceCalculate = a.forceCalculate, this._clearDependencyTreeCache = a.clearDependencyTreeCache || {}, this._dirtyRanges = a.dirtyRanges, this._dirtyNameMap = a.dirtyNameMap, this._dirtyDefinedNameMap = a.dirtyDefinedNameMap, this._dirtyUnitFeatureMap = a.dirtyUnitFeatureMap, this._dirtyUnitOtherFormulaMap = a.dirtyUnitOtherFormulaMap, this._excludedCell = a.excludedCell, this._mergeNameMap(this._sheetNameMap, this._dirtyNameMap);
|
|
2555
2539
|
}
|
|
2556
2540
|
getDirtyData() {
|
|
2557
2541
|
return {
|
|
@@ -2662,7 +2646,7 @@ let Us = class extends Ne {
|
|
|
2662
2646
|
}), this._unitData[e][t].rowData = a[e][t]);
|
|
2663
2647
|
}
|
|
2664
2648
|
};
|
|
2665
|
-
Us =
|
|
2649
|
+
Us = ll([
|
|
2666
2650
|
Kr(0, $n),
|
|
2667
2651
|
Kr(1, ye(Ju)),
|
|
2668
2652
|
Kr(2, ye(gr)),
|
|
@@ -2671,8 +2655,8 @@ Us = fl([
|
|
|
2671
2655
|
const kt = Ze(
|
|
2672
2656
|
"univer.formula.current-data.service"
|
|
2673
2657
|
);
|
|
2674
|
-
var
|
|
2675
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2658
|
+
var fl = Object.getOwnPropertyDescriptor, hl = (i, a, e, t) => {
|
|
2659
|
+
for (var r = t > 1 ? void 0 : t ? fl(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
2676
2660
|
(s = i[n]) && (r = s(r) || r);
|
|
2677
2661
|
return r;
|
|
2678
2662
|
}, gs = (i, a) => (e, t) => a(e, t, i);
|
|
@@ -2739,7 +2723,7 @@ let dr = class extends Ne {
|
|
|
2739
2723
|
};
|
|
2740
2724
|
}
|
|
2741
2725
|
};
|
|
2742
|
-
dr =
|
|
2726
|
+
dr = hl([
|
|
2743
2727
|
gs(0, pr),
|
|
2744
2728
|
gs(1, ye(ga)),
|
|
2745
2729
|
gs(2, kt)
|
|
@@ -2762,7 +2746,7 @@ function Co(i, a, e, t, r) {
|
|
|
2762
2746
|
return l;
|
|
2763
2747
|
}
|
|
2764
2748
|
}
|
|
2765
|
-
const
|
|
2749
|
+
const ml = [
|
|
2766
2750
|
"$",
|
|
2767
2751
|
"£",
|
|
2768
2752
|
"¥",
|
|
@@ -2790,7 +2774,7 @@ const gl = [
|
|
|
2790
2774
|
"₽",
|
|
2791
2775
|
"₾",
|
|
2792
2776
|
"₿"
|
|
2793
|
-
],
|
|
2777
|
+
], gl = {
|
|
2794
2778
|
currency: 2,
|
|
2795
2779
|
date: 4,
|
|
2796
2780
|
datetime: 5,
|
|
@@ -2806,7 +2790,7 @@ const gl = [
|
|
|
2806
2790
|
unknown: 11
|
|
2807
2791
|
/* Custom */
|
|
2808
2792
|
};
|
|
2809
|
-
function
|
|
2793
|
+
function zb(i, a, e) {
|
|
2810
2794
|
var u, c;
|
|
2811
2795
|
if (i == null || a == null)
|
|
2812
2796
|
return a;
|
|
@@ -2820,34 +2804,34 @@ function Jb(i, a, e) {
|
|
|
2820
2804
|
return r.n.pattern = o, a;
|
|
2821
2805
|
}
|
|
2822
2806
|
const vs = new Nt(1e5);
|
|
2823
|
-
function
|
|
2807
|
+
function hi(i) {
|
|
2824
2808
|
const a = vs.get(i);
|
|
2825
2809
|
if (a !== void 0)
|
|
2826
2810
|
return a;
|
|
2827
|
-
const e =
|
|
2811
|
+
const e = Cl(i);
|
|
2828
2812
|
return vs.set(i, e), e;
|
|
2829
2813
|
}
|
|
2830
|
-
function
|
|
2814
|
+
function dl() {
|
|
2831
2815
|
vs.clear();
|
|
2832
2816
|
}
|
|
2833
|
-
function
|
|
2834
|
-
if (
|
|
2817
|
+
function Cl(i) {
|
|
2818
|
+
if (_l(i))
|
|
2835
2819
|
return 3;
|
|
2836
2820
|
const a = dt.getFormatInfo(i).type || "unknown";
|
|
2837
|
-
return
|
|
2821
|
+
return gl[a];
|
|
2838
2822
|
}
|
|
2839
|
-
function
|
|
2840
|
-
return !!
|
|
2823
|
+
function _l(i) {
|
|
2824
|
+
return !!ml.find((a) => i.includes(a)) && i.startsWith("_(");
|
|
2841
2825
|
}
|
|
2842
2826
|
function Xr(i, a, e) {
|
|
2843
2827
|
if (i === "")
|
|
2844
2828
|
return a;
|
|
2845
2829
|
if (a === "")
|
|
2846
2830
|
return i;
|
|
2847
|
-
const t =
|
|
2831
|
+
const t = hi(i), r = hi(a);
|
|
2848
2832
|
return e === X.PLUS || e === X.MINUS ? t === 4 && r === 4 || t === 11 && r === 11 ? "" : a : e === X.MULTIPLY || e === X.DIVIDED ? t === 6 && r === 6 || t === 7 && r === 7 || t === 8 && r === 8 || t === 9 && r === 9 ? a : "" : i || a;
|
|
2849
2833
|
}
|
|
2850
|
-
const
|
|
2834
|
+
const Al = /* @__PURE__ */ new Map([
|
|
2851
2835
|
[wr.EN_US, "$"],
|
|
2852
2836
|
// [LocaleType.JA_JP, '¥'],
|
|
2853
2837
|
[wr.RU_RU, "₽"],
|
|
@@ -2855,20 +2839,20 @@ const El = /* @__PURE__ */ new Map([
|
|
|
2855
2839
|
[wr.ZH_CN, "¥"],
|
|
2856
2840
|
[wr.ZH_TW, "NT$"]
|
|
2857
2841
|
]);
|
|
2858
|
-
function
|
|
2859
|
-
return
|
|
2842
|
+
function mi(i) {
|
|
2843
|
+
return Al.get(i) || "$";
|
|
2860
2844
|
}
|
|
2861
2845
|
function ze(i, a = 2) {
|
|
2862
2846
|
let e = a;
|
|
2863
2847
|
a > 127 && (e = 127);
|
|
2864
2848
|
let t = "";
|
|
2865
|
-
return e > 0 && (t = `.${"0".repeat(e)}`), `"${
|
|
2849
|
+
return e > 0 && (t = `.${"0".repeat(e)}`), `"${mi(i)}"#,##0${t}_);[Red]("${mi(i)}"#,##0${t})`;
|
|
2866
2850
|
}
|
|
2867
|
-
function
|
|
2851
|
+
function El(i, a, e = 2) {
|
|
2868
2852
|
return dt.format(ze(i, e), a);
|
|
2869
2853
|
}
|
|
2870
2854
|
const _a = new Nt(1e5);
|
|
2871
|
-
function
|
|
2855
|
+
function bl(i) {
|
|
2872
2856
|
let a = i;
|
|
2873
2857
|
a.startsWith('"') && a.endsWith('"') && (a = a.slice(1, -1));
|
|
2874
2858
|
const e = _a.get(a);
|
|
@@ -2899,7 +2883,7 @@ function ds(i, a, e) {
|
|
|
2899
2883
|
pattern: e
|
|
2900
2884
|
};
|
|
2901
2885
|
}
|
|
2902
|
-
function
|
|
2886
|
+
function yl() {
|
|
2903
2887
|
_a.clear();
|
|
2904
2888
|
}
|
|
2905
2889
|
class Yn {
|
|
@@ -3238,7 +3222,7 @@ class $t extends Yn {
|
|
|
3238
3222
|
return g.create(m.VALUE);
|
|
3239
3223
|
}
|
|
3240
3224
|
}
|
|
3241
|
-
const
|
|
3225
|
+
const Rl = 1e3, Ts = new Nt(Rl);
|
|
3242
3226
|
class g extends $t {
|
|
3243
3227
|
constructor(a, e = "") {
|
|
3244
3228
|
super(a), this._errorType = a, this._errorContent = e;
|
|
@@ -3266,7 +3250,7 @@ class g extends $t {
|
|
|
3266
3250
|
return !0;
|
|
3267
3251
|
}
|
|
3268
3252
|
}
|
|
3269
|
-
function
|
|
3253
|
+
function pl(i) {
|
|
3270
3254
|
var a;
|
|
3271
3255
|
if (i === null)
|
|
3272
3256
|
return 0;
|
|
@@ -3283,17 +3267,17 @@ var Wt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i)
|
|
|
3283
3267
|
function _n() {
|
|
3284
3268
|
return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
|
|
3285
3269
|
}
|
|
3286
|
-
function
|
|
3270
|
+
function Vl(i) {
|
|
3287
3271
|
return i.indexOf("*") > -1 || i.indexOf("?") > -1;
|
|
3288
3272
|
}
|
|
3289
3273
|
function Cs(i, a) {
|
|
3290
|
-
const e =
|
|
3274
|
+
const e = Ol(a).replace(/~?[*?]/g, (r) => r.startsWith("~") ? `\\${r.substring(1)}` : r === "*" ? ".*" : r === "?" ? "." : r);
|
|
3291
3275
|
return new RegExp(`^${e}$`).test(i);
|
|
3292
3276
|
}
|
|
3293
|
-
function
|
|
3277
|
+
function gi(i) {
|
|
3294
3278
|
return i.replace(/~?[*?]/g, (a) => a.startsWith("~") ? a.substring(1) : " ");
|
|
3295
3279
|
}
|
|
3296
|
-
function
|
|
3280
|
+
function Nl(i, a, e) {
|
|
3297
3281
|
let t = !1;
|
|
3298
3282
|
switch (e) {
|
|
3299
3283
|
case $.EQUALS:
|
|
@@ -3304,16 +3288,16 @@ function Ol(i, a, e) {
|
|
|
3304
3288
|
break;
|
|
3305
3289
|
case $.GREATER_THAN:
|
|
3306
3290
|
case $.GREATER_THAN_OR_EQUAL:
|
|
3307
|
-
t = Cs(i, a) || i >
|
|
3291
|
+
t = Cs(i, a) || i > gi(a);
|
|
3308
3292
|
break;
|
|
3309
3293
|
case $.LESS_THAN:
|
|
3310
3294
|
case $.LESS_THAN_OR_EQUAL:
|
|
3311
|
-
t = i <
|
|
3295
|
+
t = i < gi(a);
|
|
3312
3296
|
break;
|
|
3313
3297
|
}
|
|
3314
3298
|
return t;
|
|
3315
3299
|
}
|
|
3316
|
-
function
|
|
3300
|
+
function Ol(i) {
|
|
3317
3301
|
return i.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
3318
3302
|
}
|
|
3319
3303
|
function Bs(i) {
|
|
@@ -3420,7 +3404,7 @@ var Fs = 9e15, Yt = 1e9, ks = "0123456789abcdef", An = "2.3025850929940456840179
|
|
|
3420
3404
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
3421
3405
|
crypto: !1
|
|
3422
3406
|
// true/false
|
|
3423
|
-
}, _o, pt, oe = !0, Hn = "[DecimalError] ", It = Hn + "Invalid argument: ", Ao = Hn + "Precision limit exceeded", Eo = Hn + "crypto unavailable", bo = "[object Decimal]", Be = Math.floor, Pe = Math.pow,
|
|
3407
|
+
}, _o, pt, oe = !0, Hn = "[DecimalError] ", It = Hn + "Invalid argument: ", Ao = Hn + "Precision limit exceeded", Eo = Hn + "crypto unavailable", bo = "[object Decimal]", Be = Math.floor, Pe = Math.pow, Ml = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, wl = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Sl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, yo = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, lt = 1e7, te = 7, Dl = 9007199254740991, Ll = An.length - 1, Ys = En.length - 1, I = { toStringTag: bo };
|
|
3424
3408
|
I.absoluteValue = I.abs = function() {
|
|
3425
3409
|
var i = new this.constructor(this);
|
|
3426
3410
|
return i.s < 0 && (i.s = 1), J(i);
|
|
@@ -3447,7 +3431,7 @@ I.comparedTo = I.cmp = function(i) {
|
|
|
3447
3431
|
};
|
|
3448
3432
|
I.cosine = I.cos = function() {
|
|
3449
3433
|
var i, a, e = this, t = e.constructor;
|
|
3450
|
-
return e.d ? e.d[0] ? (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e =
|
|
3434
|
+
return e.d ? e.d[0] ? (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = Pl(t, Oo(t, e)), t.precision = i, t.rounding = a, J(pt == 2 || pt == 3 ? e.neg() : e, i, a, !0)) : new t(1) : new t(NaN);
|
|
3451
3435
|
};
|
|
3452
3436
|
I.cubeRoot = I.cbrt = function() {
|
|
3453
3437
|
var i, a, e, t, r, n, s, o, u, c, l = this, f = l.constructor;
|
|
@@ -3683,7 +3667,7 @@ I.round = function() {
|
|
|
3683
3667
|
};
|
|
3684
3668
|
I.sine = I.sin = function() {
|
|
3685
3669
|
var i, a, e = this, t = e.constructor;
|
|
3686
|
-
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e =
|
|
3670
|
+
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = jl(t, Oo(t, e)), t.precision = i, t.rounding = a, J(pt > 2 ? e.neg() : e, i, a, !0)) : new t(NaN);
|
|
3687
3671
|
};
|
|
3688
3672
|
I.squareRoot = I.sqrt = function() {
|
|
3689
3673
|
var i, a, e, t, r, n, s = this, o = s.d, u = s.e, c = s.s, l = s.constructor;
|
|
@@ -3774,7 +3758,7 @@ I.toPower = I.pow = function(i) {
|
|
|
3774
3758
|
if (!o.d || !i.d || !o.d[0] || !i.d[0]) return new u(Pe(+o, c));
|
|
3775
3759
|
if (o = new u(o), o.eq(1)) return o;
|
|
3776
3760
|
if (t = u.precision, n = u.rounding, i.eq(1)) return J(o, t, n);
|
|
3777
|
-
if (a = Be(i.e / te), a >= i.d.length - 1 && (e = c < 0 ? -c : c) <=
|
|
3761
|
+
if (a = Be(i.e / te), a >= i.d.length - 1 && (e = c < 0 ? -c : c) <= Dl)
|
|
3778
3762
|
return r = po(u, o, e, t), i.s < 0 ? new u(1).div(r) : J(r, t, n);
|
|
3779
3763
|
if (s = o.s, s < 0) {
|
|
3780
3764
|
if (a < i.d.length - 1) return new u(NaN);
|
|
@@ -3830,7 +3814,7 @@ function cn(i, a, e) {
|
|
|
3830
3814
|
}
|
|
3831
3815
|
return r.reverse();
|
|
3832
3816
|
}
|
|
3833
|
-
function
|
|
3817
|
+
function Pl(i, a) {
|
|
3834
3818
|
var e, t, r;
|
|
3835
3819
|
if (a.isZero()) return a;
|
|
3836
3820
|
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / Qn(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Cr(i, 1, a.times(r), new i(1));
|
|
@@ -3947,7 +3931,7 @@ function Gn(i, a) {
|
|
|
3947
3931
|
return a;
|
|
3948
3932
|
}
|
|
3949
3933
|
function bn(i, a, e) {
|
|
3950
|
-
if (a >
|
|
3934
|
+
if (a > Ll)
|
|
3951
3935
|
throw oe = !0, e && (i.precision = e), Error(Ao);
|
|
3952
3936
|
return J(new i(An), a, 1, !0);
|
|
3953
3937
|
}
|
|
@@ -3970,15 +3954,15 @@ function Lt(i) {
|
|
|
3970
3954
|
function po(i, a, e, t) {
|
|
3971
3955
|
var r, n = new i(1), s = Math.ceil(t / te + 4);
|
|
3972
3956
|
for (oe = !1; ; ) {
|
|
3973
|
-
if (e % 2 && (n = n.times(a),
|
|
3957
|
+
if (e % 2 && (n = n.times(a), Ci(n.d, s) && (r = !0)), e = Be(e / 2), e === 0) {
|
|
3974
3958
|
e = n.d.length - 1, r && n.d[e] === 0 && ++n.d[e];
|
|
3975
3959
|
break;
|
|
3976
3960
|
}
|
|
3977
|
-
a = a.times(a),
|
|
3961
|
+
a = a.times(a), Ci(a.d, s);
|
|
3978
3962
|
}
|
|
3979
3963
|
return oe = !0, n;
|
|
3980
3964
|
}
|
|
3981
|
-
function
|
|
3965
|
+
function di(i) {
|
|
3982
3966
|
return i.d[i.d.length - 1] & 1;
|
|
3983
3967
|
}
|
|
3984
3968
|
function Vo(i, a, e) {
|
|
@@ -4052,24 +4036,24 @@ function ln(i, a) {
|
|
|
4052
4036
|
i.e = 0, i.d = [0];
|
|
4053
4037
|
return i;
|
|
4054
4038
|
}
|
|
4055
|
-
function
|
|
4039
|
+
function xl(i, a) {
|
|
4056
4040
|
var e, t, r, n, s, o, u, c, l;
|
|
4057
4041
|
if (a.indexOf("_") > -1) {
|
|
4058
4042
|
if (a = a.replace(/(\d)_(?=\d)/g, "$1"), yo.test(a)) return ln(i, a);
|
|
4059
4043
|
} else if (a === "Infinity" || a === "NaN")
|
|
4060
4044
|
return +a || (i.s = NaN), i.e = NaN, i.d = null, i;
|
|
4061
|
-
if (
|
|
4045
|
+
if (wl.test(a))
|
|
4062
4046
|
e = 16, a = a.toLowerCase();
|
|
4063
|
-
else if (
|
|
4047
|
+
else if (Ml.test(a))
|
|
4064
4048
|
e = 2;
|
|
4065
|
-
else if (
|
|
4049
|
+
else if (Sl.test(a))
|
|
4066
4050
|
e = 8;
|
|
4067
4051
|
else
|
|
4068
4052
|
throw Error(It + a);
|
|
4069
4053
|
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 = po(t, new t(e), n, n * 2)), c = cn(a, e, lt), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
|
|
4070
4054
|
return n < 0 ? new t(i.s * 0) : (i.e = Gn(c, l), i.d = c, oe = !1, s && (i = Ve(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Pe(2, u) : P.pow(2, u))), oe = !0, i);
|
|
4071
4055
|
}
|
|
4072
|
-
function
|
|
4056
|
+
function jl(i, a) {
|
|
4073
4057
|
var e, t = a.d.length;
|
|
4074
4058
|
if (t < 3)
|
|
4075
4059
|
return a.isZero() ? a : Cr(i, 2, a, a);
|
|
@@ -4101,8 +4085,8 @@ function Oo(i, a) {
|
|
|
4101
4085
|
pt = t ? 3 : 2;
|
|
4102
4086
|
else {
|
|
4103
4087
|
if (a = a.minus(e.times(r)), a.lte(n))
|
|
4104
|
-
return pt =
|
|
4105
|
-
pt =
|
|
4088
|
+
return pt = di(e) ? t ? 2 : 3 : t ? 4 : 1, a;
|
|
4089
|
+
pt = di(e) ? t ? 1 : 4 : t ? 3 : 2;
|
|
4106
4090
|
}
|
|
4107
4091
|
return a.minus(r).abs();
|
|
4108
4092
|
}
|
|
@@ -4139,49 +4123,49 @@ function Ea(i, a, e, t) {
|
|
|
4139
4123
|
}
|
|
4140
4124
|
return i.s < 0 ? "-" + l : l;
|
|
4141
4125
|
}
|
|
4142
|
-
function
|
|
4126
|
+
function Ci(i, a) {
|
|
4143
4127
|
if (i.length > a)
|
|
4144
4128
|
return i.length = a, !0;
|
|
4145
4129
|
}
|
|
4146
|
-
function
|
|
4130
|
+
function Ul(i) {
|
|
4147
4131
|
return new this(i).abs();
|
|
4148
4132
|
}
|
|
4149
|
-
function
|
|
4133
|
+
function vl(i) {
|
|
4150
4134
|
return new this(i).acos();
|
|
4151
4135
|
}
|
|
4152
|
-
function
|
|
4136
|
+
function Tl(i) {
|
|
4153
4137
|
return new this(i).acosh();
|
|
4154
4138
|
}
|
|
4155
|
-
function
|
|
4139
|
+
function Bl(i, a) {
|
|
4156
4140
|
return new this(i).plus(a);
|
|
4157
4141
|
}
|
|
4158
|
-
function
|
|
4142
|
+
function Il(i) {
|
|
4159
4143
|
return new this(i).asin();
|
|
4160
4144
|
}
|
|
4161
|
-
function
|
|
4145
|
+
function Fl(i) {
|
|
4162
4146
|
return new this(i).asinh();
|
|
4163
4147
|
}
|
|
4164
|
-
function
|
|
4148
|
+
function kl(i) {
|
|
4165
4149
|
return new this(i).atan();
|
|
4166
4150
|
}
|
|
4167
|
-
function
|
|
4151
|
+
function $l(i) {
|
|
4168
4152
|
return new this(i).atanh();
|
|
4169
4153
|
}
|
|
4170
|
-
function
|
|
4154
|
+
function Yl(i, a) {
|
|
4171
4155
|
i = new this(i), a = new this(a);
|
|
4172
4156
|
var e, t = this.precision, r = this.rounding, n = t + 4;
|
|
4173
4157
|
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = gt(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? gt(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = gt(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(Ve(i, a, n, 1)), a = gt(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(Ve(i, a, n, 1)), e;
|
|
4174
4158
|
}
|
|
4175
|
-
function
|
|
4159
|
+
function Hl(i) {
|
|
4176
4160
|
return new this(i).cbrt();
|
|
4177
4161
|
}
|
|
4178
|
-
function
|
|
4162
|
+
function Gl(i) {
|
|
4179
4163
|
return J(i = new this(i), i.e + 1, 2);
|
|
4180
4164
|
}
|
|
4181
|
-
function
|
|
4165
|
+
function Ql(i, a, e) {
|
|
4182
4166
|
return new this(i).clamp(a, e);
|
|
4183
4167
|
}
|
|
4184
|
-
function
|
|
4168
|
+
function Wl(i) {
|
|
4185
4169
|
if (!i || typeof i != "object") throw Error(Hn + "Object expected");
|
|
4186
4170
|
var a, e, t, r = i.defaults === !0, n = [
|
|
4187
4171
|
"precision",
|
|
@@ -4223,10 +4207,10 @@ function ql(i) {
|
|
|
4223
4207
|
throw Error(It + e + ": " + t);
|
|
4224
4208
|
return this;
|
|
4225
4209
|
}
|
|
4226
|
-
function
|
|
4210
|
+
function ql(i) {
|
|
4227
4211
|
return new this(i).cos();
|
|
4228
4212
|
}
|
|
4229
|
-
function
|
|
4213
|
+
function Kl(i) {
|
|
4230
4214
|
return new this(i).cosh();
|
|
4231
4215
|
}
|
|
4232
4216
|
function Mo(i) {
|
|
@@ -4234,7 +4218,7 @@ function Mo(i) {
|
|
|
4234
4218
|
function r(n) {
|
|
4235
4219
|
var s, o, u, c = this;
|
|
4236
4220
|
if (!(c instanceof r)) return new r(n);
|
|
4237
|
-
if (c.constructor = r,
|
|
4221
|
+
if (c.constructor = r, _i(n)) {
|
|
4238
4222
|
c.s = n.s, oe ? !n.d || n.e > r.maxE ? (c.e = NaN, c.d = null) : n.e < r.minE ? (c.e = 0, c.d = [0]) : (c.e = n.e, c.d = n.d.slice()) : (c.e = n.e, c.d = n.d ? n.d.slice() : n.d);
|
|
4239
4223
|
return;
|
|
4240
4224
|
}
|
|
@@ -4255,25 +4239,25 @@ function Mo(i) {
|
|
|
4255
4239
|
return ln(c, n.toString());
|
|
4256
4240
|
}
|
|
4257
4241
|
if (u === "string")
|
|
4258
|
-
return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), yo.test(n) ? ln(c, n) :
|
|
4242
|
+
return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), yo.test(n) ? ln(c, n) : xl(c, n);
|
|
4259
4243
|
if (u === "bigint")
|
|
4260
4244
|
return n < 0 ? (n = -n, c.s = -1) : c.s = 1, ln(c, n.toString());
|
|
4261
4245
|
throw Error(It + n);
|
|
4262
4246
|
}
|
|
4263
|
-
if (r.prototype = I, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set =
|
|
4247
|
+
if (r.prototype = I, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set = Wl, r.clone = Mo, r.isDecimal = _i, r.abs = Ul, r.acos = vl, r.acosh = Tl, r.add = Bl, r.asin = Il, r.asinh = Fl, r.atan = kl, r.atanh = $l, r.atan2 = Yl, r.cbrt = Hl, r.ceil = Gl, r.clamp = Ql, r.cos = ql, r.cosh = Kl, r.div = Xl, r.exp = Zl, r.floor = zl, r.hypot = Jl, r.ln = ef, r.log = tf, r.log10 = nf, r.log2 = rf, r.max = sf, r.min = af, r.mod = of, r.mul = uf, r.pow = cf, r.random = lf, r.round = ff, r.sign = hf, r.sin = mf, r.sinh = gf, r.sqrt = df, r.sub = Cf, r.sum = _f, r.tan = Af, r.tanh = Ef, r.trunc = bf, i === void 0 && (i = {}), i && i.defaults !== !0)
|
|
4264
4248
|
for (t = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], a = 0; a < t.length; ) i.hasOwnProperty(e = t[a++]) || (i[e] = this[e]);
|
|
4265
4249
|
return r.config(i), r;
|
|
4266
4250
|
}
|
|
4267
|
-
function
|
|
4251
|
+
function Xl(i, a) {
|
|
4268
4252
|
return new this(i).div(a);
|
|
4269
4253
|
}
|
|
4270
|
-
function
|
|
4254
|
+
function Zl(i) {
|
|
4271
4255
|
return new this(i).exp();
|
|
4272
4256
|
}
|
|
4273
|
-
function
|
|
4257
|
+
function zl(i) {
|
|
4274
4258
|
return J(i = new this(i), i.e + 1, 3);
|
|
4275
4259
|
}
|
|
4276
|
-
function
|
|
4260
|
+
function Jl() {
|
|
4277
4261
|
var i, a, e = new this(0);
|
|
4278
4262
|
for (oe = !1, i = 0; i < arguments.length; )
|
|
4279
4263
|
if (a = new this(arguments[i++]), a.d)
|
|
@@ -4285,37 +4269,37 @@ function ef() {
|
|
|
4285
4269
|
}
|
|
4286
4270
|
return oe = !0, e.sqrt();
|
|
4287
4271
|
}
|
|
4288
|
-
function
|
|
4272
|
+
function _i(i) {
|
|
4289
4273
|
return i instanceof P || i && i.toStringTag === bo || !1;
|
|
4290
4274
|
}
|
|
4291
|
-
function
|
|
4275
|
+
function ef(i) {
|
|
4292
4276
|
return new this(i).ln();
|
|
4293
4277
|
}
|
|
4294
|
-
function
|
|
4278
|
+
function tf(i, a) {
|
|
4295
4279
|
return new this(i).log(a);
|
|
4296
4280
|
}
|
|
4297
|
-
function
|
|
4281
|
+
function rf(i) {
|
|
4298
4282
|
return new this(i).log(2);
|
|
4299
4283
|
}
|
|
4300
|
-
function
|
|
4284
|
+
function nf(i) {
|
|
4301
4285
|
return new this(i).log(10);
|
|
4302
4286
|
}
|
|
4303
|
-
function
|
|
4287
|
+
function sf() {
|
|
4304
4288
|
return Vo(this, arguments, -1);
|
|
4305
4289
|
}
|
|
4306
|
-
function
|
|
4290
|
+
function af() {
|
|
4307
4291
|
return Vo(this, arguments, 1);
|
|
4308
4292
|
}
|
|
4309
|
-
function
|
|
4293
|
+
function of(i, a) {
|
|
4310
4294
|
return new this(i).mod(a);
|
|
4311
4295
|
}
|
|
4312
|
-
function
|
|
4296
|
+
function uf(i, a) {
|
|
4313
4297
|
return new this(i).mul(a);
|
|
4314
4298
|
}
|
|
4315
|
-
function
|
|
4299
|
+
function cf(i, a) {
|
|
4316
4300
|
return new this(i).pow(a);
|
|
4317
4301
|
}
|
|
4318
|
-
function
|
|
4302
|
+
function lf(i) {
|
|
4319
4303
|
var a, e, t, r, n = 0, s = new this(1), o = [];
|
|
4320
4304
|
if (i === void 0 ? i = this.precision : Ge(i, 1, Yt), t = Math.ceil(i / te), this.crypto)
|
|
4321
4305
|
if (crypto.getRandomValues)
|
|
@@ -4338,36 +4322,36 @@ function ff(i) {
|
|
|
4338
4322
|
}
|
|
4339
4323
|
return s.e = e, s.d = o, s;
|
|
4340
4324
|
}
|
|
4341
|
-
function
|
|
4325
|
+
function ff(i) {
|
|
4342
4326
|
return J(i = new this(i), i.e + 1, this.rounding);
|
|
4343
4327
|
}
|
|
4344
|
-
function
|
|
4328
|
+
function hf(i) {
|
|
4345
4329
|
return i = new this(i), i.d ? i.d[0] ? i.s : 0 * i.s : i.s || NaN;
|
|
4346
4330
|
}
|
|
4347
|
-
function
|
|
4331
|
+
function mf(i) {
|
|
4348
4332
|
return new this(i).sin();
|
|
4349
4333
|
}
|
|
4350
|
-
function
|
|
4334
|
+
function gf(i) {
|
|
4351
4335
|
return new this(i).sinh();
|
|
4352
4336
|
}
|
|
4353
|
-
function
|
|
4337
|
+
function df(i) {
|
|
4354
4338
|
return new this(i).sqrt();
|
|
4355
4339
|
}
|
|
4356
|
-
function
|
|
4340
|
+
function Cf(i, a) {
|
|
4357
4341
|
return new this(i).sub(a);
|
|
4358
4342
|
}
|
|
4359
|
-
function
|
|
4343
|
+
function _f() {
|
|
4360
4344
|
var i = 0, a = arguments, e = new this(a[i]);
|
|
4361
4345
|
for (oe = !1; e.s && ++i < a.length; ) e = e.plus(a[i]);
|
|
4362
4346
|
return oe = !0, J(e, this.precision, this.rounding);
|
|
4363
4347
|
}
|
|
4364
|
-
function
|
|
4348
|
+
function Af(i) {
|
|
4365
4349
|
return new this(i).tan();
|
|
4366
4350
|
}
|
|
4367
|
-
function
|
|
4351
|
+
function Ef(i) {
|
|
4368
4352
|
return new this(i).tanh();
|
|
4369
4353
|
}
|
|
4370
|
-
function
|
|
4354
|
+
function bf(i) {
|
|
4371
4355
|
return J(i = new this(i), i.e + 1, 1);
|
|
4372
4356
|
}
|
|
4373
4357
|
I[Symbol.for("nodejs.util.inspect.custom")] = I.toString;
|
|
@@ -4375,11 +4359,11 @@ I[Symbol.toStringTag] = "Decimal";
|
|
|
4375
4359
|
var P = I.constructor = Mo($s);
|
|
4376
4360
|
An = new P(An);
|
|
4377
4361
|
En = new P(En);
|
|
4378
|
-
function
|
|
4362
|
+
function yf(i, a) {
|
|
4379
4363
|
const e = i + a;
|
|
4380
4364
|
return Number.isSafeInteger(e) ? e : new P(i).add(a).toNumber();
|
|
4381
4365
|
}
|
|
4382
|
-
function
|
|
4366
|
+
function Rf(i, a) {
|
|
4383
4367
|
const e = i - a;
|
|
4384
4368
|
return Number.isSafeInteger(e) ? e : new P(i).sub(a).toNumber();
|
|
4385
4369
|
}
|
|
@@ -4387,7 +4371,7 @@ function Vr(i, a) {
|
|
|
4387
4371
|
const e = i * a;
|
|
4388
4372
|
return Number.isSafeInteger(e) ? e : new P(i).mul(a).toNumber();
|
|
4389
4373
|
}
|
|
4390
|
-
function
|
|
4374
|
+
function pf(i, a) {
|
|
4391
4375
|
const e = i / a;
|
|
4392
4376
|
return Number.isSafeInteger(e) ? e : new P(i).div(a).toNumber();
|
|
4393
4377
|
}
|
|
@@ -4406,41 +4390,41 @@ function He(i, a) {
|
|
|
4406
4390
|
function Wn(i, a) {
|
|
4407
4391
|
return Number.EPSILON * Math.max(1, Math.abs(Vr(i, a)));
|
|
4408
4392
|
}
|
|
4409
|
-
function
|
|
4393
|
+
function Ai(i, a) {
|
|
4410
4394
|
return i - a * Math.floor(i / a);
|
|
4411
4395
|
}
|
|
4412
|
-
function
|
|
4396
|
+
function Vf(i, a) {
|
|
4413
4397
|
return i ** a;
|
|
4414
4398
|
}
|
|
4415
|
-
function
|
|
4399
|
+
function Nf(i) {
|
|
4416
4400
|
return Math.sqrt(i);
|
|
4417
4401
|
}
|
|
4418
|
-
function
|
|
4402
|
+
function Ei(i, a) {
|
|
4419
4403
|
return i === a;
|
|
4420
4404
|
}
|
|
4421
|
-
function
|
|
4405
|
+
function Of(i, a) {
|
|
4422
4406
|
return i > a;
|
|
4423
4407
|
}
|
|
4424
|
-
function
|
|
4408
|
+
function Mf(i, a) {
|
|
4425
4409
|
return i >= a;
|
|
4426
4410
|
}
|
|
4427
|
-
function
|
|
4411
|
+
function wf(i, a) {
|
|
4428
4412
|
return i < a;
|
|
4429
4413
|
}
|
|
4430
|
-
function
|
|
4414
|
+
function Sf(i, a) {
|
|
4431
4415
|
return i <= a;
|
|
4432
4416
|
}
|
|
4433
|
-
function
|
|
4417
|
+
function bi(i, a = 15) {
|
|
4434
4418
|
return Math.floor(Math.abs(i)).toString().length >= a ? i : Number.parseFloat(i.toPrecision(a));
|
|
4435
4419
|
}
|
|
4436
|
-
function
|
|
4420
|
+
function Df(i, a, e = Number.EPSILON) {
|
|
4437
4421
|
return Math.abs(i - a) < e;
|
|
4438
4422
|
}
|
|
4439
|
-
function
|
|
4440
|
-
const t =
|
|
4441
|
-
return
|
|
4423
|
+
function Lf(i, a = 12, e = 1e-10) {
|
|
4424
|
+
const t = bi(i, a);
|
|
4425
|
+
return Df(i, t, e) ? t : bi(i);
|
|
4442
4426
|
}
|
|
4443
|
-
function
|
|
4427
|
+
function Pf(i) {
|
|
4444
4428
|
return i - Math.trunc(i);
|
|
4445
4429
|
}
|
|
4446
4430
|
const kn = class kn extends $t {
|
|
@@ -4800,12 +4784,12 @@ class y extends $t {
|
|
|
4800
4784
|
return g.create(m.DIV_BY_ZERO);
|
|
4801
4785
|
if (!Number.isFinite(t) || !Number.isFinite(r) || Math.abs(r) * 11259e8 <= Math.abs(t))
|
|
4802
4786
|
return g.create(m.NUM);
|
|
4803
|
-
const n =
|
|
4787
|
+
const n = Ai(t, r);
|
|
4804
4788
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
4805
4789
|
}
|
|
4806
4790
|
if (typeof r == "boolean") {
|
|
4807
4791
|
const n = r ? 1 : 0;
|
|
4808
|
-
return n === 0 ? g.create(m.DIV_BY_ZERO) : y.create(
|
|
4792
|
+
return n === 0 ? g.create(m.DIV_BY_ZERO) : y.create(Ai(t, n));
|
|
4809
4793
|
}
|
|
4810
4794
|
return this;
|
|
4811
4795
|
}
|
|
@@ -4826,7 +4810,7 @@ class y extends $t {
|
|
|
4826
4810
|
return g.create(m.VALUE);
|
|
4827
4811
|
if (!Number.isFinite(t) || !Number.isFinite(r))
|
|
4828
4812
|
return g.create(m.NUM);
|
|
4829
|
-
const n =
|
|
4813
|
+
const n = yf(t, r);
|
|
4830
4814
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
4831
4815
|
}
|
|
4832
4816
|
minusBy(e) {
|
|
@@ -4837,7 +4821,7 @@ class y extends $t {
|
|
|
4837
4821
|
return g.create(m.VALUE);
|
|
4838
4822
|
if (!Number.isFinite(t) || !Number.isFinite(r))
|
|
4839
4823
|
return g.create(m.NUM);
|
|
4840
|
-
const n =
|
|
4824
|
+
const n = Rf(t, r);
|
|
4841
4825
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
4842
4826
|
}
|
|
4843
4827
|
multiplyBy(e) {
|
|
@@ -4861,7 +4845,7 @@ class y extends $t {
|
|
|
4861
4845
|
return g.create(m.NUM);
|
|
4862
4846
|
if (r === 0)
|
|
4863
4847
|
return g.create(m.DIV_BY_ZERO);
|
|
4864
|
-
const n =
|
|
4848
|
+
const n = pf(t, r);
|
|
4865
4849
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
4866
4850
|
}
|
|
4867
4851
|
compareBy(e, t) {
|
|
@@ -4887,17 +4871,17 @@ class y extends $t {
|
|
|
4887
4871
|
_compareFiniteNumber(e, t, r) {
|
|
4888
4872
|
switch (r) {
|
|
4889
4873
|
case $.EQUALS:
|
|
4890
|
-
return
|
|
4874
|
+
return Ei(e, t);
|
|
4891
4875
|
case $.GREATER_THAN:
|
|
4892
|
-
return
|
|
4876
|
+
return Of(e, t);
|
|
4893
4877
|
case $.GREATER_THAN_OR_EQUAL:
|
|
4894
|
-
return
|
|
4878
|
+
return Mf(e, t);
|
|
4895
4879
|
case $.LESS_THAN:
|
|
4896
|
-
return
|
|
4880
|
+
return wf(e, t);
|
|
4897
4881
|
case $.LESS_THAN_OR_EQUAL:
|
|
4898
|
-
return
|
|
4882
|
+
return Sf(e, t);
|
|
4899
4883
|
case $.NOT_EQUAL:
|
|
4900
|
-
return !
|
|
4884
|
+
return !Ei(e, t);
|
|
4901
4885
|
}
|
|
4902
4886
|
}
|
|
4903
4887
|
_compareBoolean(e) {
|
|
@@ -4928,14 +4912,14 @@ class y extends $t {
|
|
|
4928
4912
|
return g.create(m.NUM);
|
|
4929
4913
|
if (t === 0)
|
|
4930
4914
|
return n < 0 ? g.create(m.DIV_BY_ZERO) : n === 0 ? g.create(m.NUM) : y.create(0);
|
|
4931
|
-
const s =
|
|
4915
|
+
const s = Vf(t, n);
|
|
4932
4916
|
return Number.isFinite(s) ? y.create(s) : g.create(m.NUM);
|
|
4933
4917
|
}
|
|
4934
4918
|
sqrt() {
|
|
4935
4919
|
const e = this.getValue();
|
|
4936
4920
|
if (!Number.isFinite(e))
|
|
4937
4921
|
return g.create(m.NUM);
|
|
4938
|
-
const t =
|
|
4922
|
+
const t = Nf(e);
|
|
4939
4923
|
return Number.isFinite(t) ? y.create(t) : g.create(m.NUM);
|
|
4940
4924
|
}
|
|
4941
4925
|
cbrt() {
|
|
@@ -5146,7 +5130,7 @@ class y extends $t {
|
|
|
5146
5130
|
return n;
|
|
5147
5131
|
}
|
|
5148
5132
|
}
|
|
5149
|
-
const
|
|
5133
|
+
const xf = 1e5, Gs = new Nt(xf);
|
|
5150
5134
|
class j extends $t {
|
|
5151
5135
|
constructor(e) {
|
|
5152
5136
|
super(e);
|
|
@@ -5203,7 +5187,7 @@ class j extends $t {
|
|
|
5203
5187
|
let n = this.getValue(), s = !1;
|
|
5204
5188
|
if (typeof e == "string") {
|
|
5205
5189
|
let o = e;
|
|
5206
|
-
if (r || (n = n.toLocaleLowerCase(), o = o.toLocaleLowerCase()),
|
|
5190
|
+
if (r || (n = n.toLocaleLowerCase(), o = o.toLocaleLowerCase()), Vl(o))
|
|
5207
5191
|
return this._checkWildcard(o, t);
|
|
5208
5192
|
s = this._compareString(n, o, t);
|
|
5209
5193
|
} else typeof e == "number" ? s = this._compareNumber(t) : typeof e == "boolean" && (s = this._compareBoolean(t));
|
|
@@ -5256,7 +5240,7 @@ class j extends $t {
|
|
|
5256
5240
|
return T.create(!0);
|
|
5257
5241
|
}
|
|
5258
5242
|
_checkWildcard(e, t) {
|
|
5259
|
-
const r = this.getValue().toLocaleLowerCase(), n =
|
|
5243
|
+
const r = this.getValue().toLocaleLowerCase(), n = Nl(r, e, t);
|
|
5260
5244
|
return T.create(n);
|
|
5261
5245
|
}
|
|
5262
5246
|
}
|
|
@@ -5271,7 +5255,7 @@ function qn(i) {
|
|
|
5271
5255
|
i === 1 ? a = !0 : a = !1;
|
|
5272
5256
|
return T.create(a);
|
|
5273
5257
|
}
|
|
5274
|
-
function
|
|
5258
|
+
function jf(i) {
|
|
5275
5259
|
let a = i.toString();
|
|
5276
5260
|
return a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.slice(1, -1), a = a.replace(/""/g, '"')), j.create(a);
|
|
5277
5261
|
}
|
|
@@ -5287,7 +5271,7 @@ function Kn(i, a = "") {
|
|
|
5287
5271
|
}
|
|
5288
5272
|
return g.create(m.VALUE);
|
|
5289
5273
|
}
|
|
5290
|
-
function
|
|
5274
|
+
function Uf(i) {
|
|
5291
5275
|
return "";
|
|
5292
5276
|
}
|
|
5293
5277
|
function wo(i = []) {
|
|
@@ -5302,7 +5286,7 @@ function wo(i = []) {
|
|
|
5302
5286
|
}
|
|
5303
5287
|
return a;
|
|
5304
5288
|
}
|
|
5305
|
-
function
|
|
5289
|
+
function vf(i = []) {
|
|
5306
5290
|
const a = [];
|
|
5307
5291
|
for (let e = 0; e < i.length; e++) {
|
|
5308
5292
|
const t = i[e];
|
|
@@ -5316,7 +5300,7 @@ function Tf(i = []) {
|
|
|
5316
5300
|
}
|
|
5317
5301
|
class q extends $t {
|
|
5318
5302
|
constructor(e) {
|
|
5319
|
-
super(typeof e == "string" ? e :
|
|
5303
|
+
super(typeof e == "string" ? e : Uf());
|
|
5320
5304
|
A(this, "_values", []);
|
|
5321
5305
|
A(this, "_rowCount", -1);
|
|
5322
5306
|
A(this, "_columnCount", -1);
|
|
@@ -5974,7 +5958,7 @@ class q extends $t {
|
|
|
5974
5958
|
return this.map((t) => t.isError() ? t : e.ceil(t));
|
|
5975
5959
|
}
|
|
5976
5960
|
toValue() {
|
|
5977
|
-
return
|
|
5961
|
+
return vf(this._values);
|
|
5978
5962
|
}
|
|
5979
5963
|
_clearCache() {
|
|
5980
5964
|
this._flattenCache = null, this._sliceCache.clear();
|
|
@@ -6302,20 +6286,20 @@ class Vt {
|
|
|
6302
6286
|
return qn(a);
|
|
6303
6287
|
if (Q(a))
|
|
6304
6288
|
return y.create(Number(a));
|
|
6305
|
-
const { isNumberPattern: t, value: r, pattern: n } =
|
|
6289
|
+
const { isNumberPattern: t, value: r, pattern: n } = bl(a);
|
|
6306
6290
|
if (t)
|
|
6307
6291
|
return y.create(r, n);
|
|
6308
6292
|
const s = a.replace(/\n/g, "").replace(/\r/g, "");
|
|
6309
|
-
return !
|
|
6293
|
+
return !Tf(s) && jc(s) ? q.create(s) : jf(a);
|
|
6310
6294
|
}
|
|
6311
6295
|
return typeof a == "number" ? Kn(a) : g.create(m.VALUE);
|
|
6312
6296
|
}
|
|
6313
6297
|
}
|
|
6314
|
-
function
|
|
6298
|
+
function Tf(i) {
|
|
6315
6299
|
const a = i.trim();
|
|
6316
6300
|
return a.startsWith('"') && a.endsWith('"');
|
|
6317
6301
|
}
|
|
6318
|
-
const
|
|
6302
|
+
const Bf = 1e4, yn = new Nt(Bf);
|
|
6319
6303
|
class Xn extends Yn {
|
|
6320
6304
|
constructor(e) {
|
|
6321
6305
|
super();
|
|
@@ -6554,7 +6538,7 @@ class Xn extends Yn {
|
|
|
6554
6538
|
};
|
|
6555
6539
|
}
|
|
6556
6540
|
getCellValueObject(e) {
|
|
6557
|
-
const t =
|
|
6541
|
+
const t = pl(e);
|
|
6558
6542
|
if (yr.has(t))
|
|
6559
6543
|
return g.create(t);
|
|
6560
6544
|
if (e.t === Rt.NUMBER) {
|
|
@@ -6674,7 +6658,7 @@ class Xn extends Yn {
|
|
|
6674
6658
|
return q.create(e);
|
|
6675
6659
|
}
|
|
6676
6660
|
}
|
|
6677
|
-
class
|
|
6661
|
+
class If extends Yn {
|
|
6678
6662
|
constructor(a) {
|
|
6679
6663
|
super(), this._promise = a;
|
|
6680
6664
|
}
|
|
@@ -6685,7 +6669,7 @@ class Ff extends Yn {
|
|
|
6685
6669
|
return this._promise;
|
|
6686
6670
|
}
|
|
6687
6671
|
}
|
|
6688
|
-
class
|
|
6672
|
+
class Ff extends Yn {
|
|
6689
6673
|
constructor(a) {
|
|
6690
6674
|
super(), this._promiseList = a;
|
|
6691
6675
|
}
|
|
@@ -6892,22 +6876,22 @@ function Zn(i, a, e, t) {
|
|
|
6892
6876
|
e = $.EQUALS;
|
|
6893
6877
|
return i.compare(a, e, t);
|
|
6894
6878
|
}
|
|
6895
|
-
function
|
|
6879
|
+
function kf(i, a) {
|
|
6896
6880
|
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);
|
|
6897
6881
|
return r.mapValue((s, o, u) => {
|
|
6898
6882
|
const c = n.get(o, u);
|
|
6899
6883
|
return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ? qn(s.getValue() && c.getValue()) : T.create(!1);
|
|
6900
6884
|
});
|
|
6901
6885
|
}
|
|
6902
|
-
function
|
|
6886
|
+
function $f(i) {
|
|
6903
6887
|
const a = i.getValue();
|
|
6904
6888
|
let e = 0;
|
|
6905
6889
|
return a && (e = 1), y.create(e);
|
|
6906
6890
|
}
|
|
6907
|
-
function
|
|
6891
|
+
function yi(i) {
|
|
6908
6892
|
return i.isArray() && i.getRowCount() === 1 && i.getColumnCount() === 1 ? !0 : i.isReferenceObject() ? !!(i.isCell() || i.getRowCount() === 1 && i.getColumnCount() === 1) : (i = i, !!(i.isString() || i.isNumber() || i.isBoolean() || i.isError() || i.isNull()));
|
|
6909
6893
|
}
|
|
6910
|
-
function
|
|
6894
|
+
function Yf(i) {
|
|
6911
6895
|
const a = i == null ? void 0 : i.getPattern();
|
|
6912
6896
|
let e = {}, t = {};
|
|
6913
6897
|
if (a && (e = {
|
|
@@ -6993,7 +6977,7 @@ function kr(i, a, e, t = !1) {
|
|
|
6993
6977
|
r[l][f] = h;
|
|
6994
6978
|
return;
|
|
6995
6979
|
}
|
|
6996
|
-
r[l][f] =
|
|
6980
|
+
r[l][f] = kf(r[l][f], h);
|
|
6997
6981
|
});
|
|
6998
6982
|
}
|
|
6999
6983
|
return r;
|
|
@@ -7002,7 +6986,7 @@ function zn(i, a, e) {
|
|
|
7002
6986
|
const [t, r] = pa(`${e.getValue()}`);
|
|
7003
6987
|
return i.mapValue((n, s, o) => {
|
|
7004
6988
|
const u = a.get(s, o);
|
|
7005
|
-
if (u &&
|
|
6989
|
+
if (u && Hf(u, r))
|
|
7006
6990
|
return n;
|
|
7007
6991
|
if (u != null && u.isNumber()) {
|
|
7008
6992
|
if (r.isString()) {
|
|
@@ -7021,14 +7005,14 @@ function zn(i, a, e) {
|
|
|
7021
7005
|
} else return u != null && u.isError() && r.isError() && u.getValue() === r.getValue() ? T.create(!0) : T.create(!1);
|
|
7022
7006
|
});
|
|
7023
7007
|
}
|
|
7024
|
-
function
|
|
7008
|
+
function Hf(i, a) {
|
|
7025
7009
|
if (i.isNumber() && a.isNumber() || i.isBoolean() && a.isBoolean())
|
|
7026
7010
|
return !0;
|
|
7027
7011
|
const e = i.isString() && i.getValue() === "", t = a.isString() && a.getValue() === "";
|
|
7028
7012
|
return !!((e || i.isNull()) && (t || a.isNull()) || i.isString() && !e && a.isString() && !t);
|
|
7029
7013
|
}
|
|
7030
7014
|
var fn = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(fn || {});
|
|
7031
|
-
function
|
|
7015
|
+
function Gf(i, a) {
|
|
7032
7016
|
let e;
|
|
7033
7017
|
switch (a) {
|
|
7034
7018
|
case 0:
|
|
@@ -7045,15 +7029,15 @@ function Qf(i, a) {
|
|
|
7045
7029
|
}
|
|
7046
7030
|
return e;
|
|
7047
7031
|
}
|
|
7048
|
-
function
|
|
7032
|
+
function Qf(i, a) {
|
|
7049
7033
|
let e;
|
|
7050
7034
|
return i.isCell() && a.isCell() || i.isRow() && a.isRow() || i.isColumn() && a.isColumn() ? e = i.unionBy(a) : e = g.create(m.NAME), e;
|
|
7051
7035
|
}
|
|
7052
|
-
var
|
|
7053
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
7036
|
+
var Wf = Object.getOwnPropertyDescriptor, qf = (i, a, e, t) => {
|
|
7037
|
+
for (var r = t > 1 ? void 0 : t ? Wf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7054
7038
|
(s = i[n]) && (r = s(r) || r);
|
|
7055
7039
|
return r;
|
|
7056
|
-
},
|
|
7040
|
+
}, Kf = (i, a) => (e, t) => a(e, t, i);
|
|
7057
7041
|
let Qs = class extends Ne {
|
|
7058
7042
|
constructor(i) {
|
|
7059
7043
|
super(), this._univerInstanceService = i;
|
|
@@ -7079,17 +7063,17 @@ let Qs = class extends Ne {
|
|
|
7079
7063
|
};
|
|
7080
7064
|
}
|
|
7081
7065
|
};
|
|
7082
|
-
Qs =
|
|
7083
|
-
|
|
7066
|
+
Qs = qf([
|
|
7067
|
+
Kf(0, $n)
|
|
7084
7068
|
], Qs);
|
|
7085
7069
|
const So = Ze(
|
|
7086
7070
|
"univer.formula.hyperlink-engine-formula.service"
|
|
7087
7071
|
);
|
|
7088
|
-
var
|
|
7089
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
7072
|
+
var Xf = Object.getOwnPropertyDescriptor, Zf = (i, a, e, t) => {
|
|
7073
|
+
for (var r = t > 1 ? void 0 : t ? Xf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7090
7074
|
(s = i[n]) && (r = s(r) || r);
|
|
7091
7075
|
return r;
|
|
7092
|
-
},
|
|
7076
|
+
}, Ri = (i, a) => (e, t) => a(e, t, i), Je = /* @__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))(Je || {}), Dr = /* @__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))(Dr || {});
|
|
7093
7077
|
let Ws = class extends Ne {
|
|
7094
7078
|
constructor(a, e) {
|
|
7095
7079
|
super();
|
|
@@ -7211,7 +7195,7 @@ let Ws = class extends Ne {
|
|
|
7211
7195
|
this._formulaExecuteStage = 0, this._runtimeData = {}, this._runtimeOtherData = {}, this._unitArrayFormulaRange = {}, this._runtimeArrayFormulaCellData = {}, this._runtimeClearArrayFormulaCellData = {}, this._functionDefinitionPrivacyVar.clear(), this.markedAsInitialFunctionsExecuted(), this._stopState = !1, this._isCycleDependency = !1, this._totalFormulasToCalculate = 0, this._completedFormulasCount = 0, this.clearReferenceAndNumberformatCache();
|
|
7212
7196
|
}
|
|
7213
7197
|
clearReferenceAndNumberformatCache() {
|
|
7214
|
-
|
|
7198
|
+
dl(), yl(), tl();
|
|
7215
7199
|
}
|
|
7216
7200
|
setCurrent(a, e, t, r, n, s) {
|
|
7217
7201
|
this._currentRow = a, this._currentColumn = e, this._currentRowCount = t, this._currentColumnCount = r, this._currentSubUnitId = n, this._currentUnitId = s;
|
|
@@ -7338,7 +7322,7 @@ let Ws = class extends Ne {
|
|
|
7338
7322
|
return a != null && a.isString() && a.isHyperlink() ? this._hyperlinkEngineFormulaService.generateCellValue(
|
|
7339
7323
|
a.getHyperlinkUrl(),
|
|
7340
7324
|
a.getValue()
|
|
7341
|
-
) :
|
|
7325
|
+
) : Yf(a);
|
|
7342
7326
|
}
|
|
7343
7327
|
getUnitData() {
|
|
7344
7328
|
return this._runtimeData;
|
|
@@ -7450,12 +7434,12 @@ let Ws = class extends Ne {
|
|
|
7450
7434
|
}
|
|
7451
7435
|
_isInDirtyRange(a, e, t, r) {
|
|
7452
7436
|
const n = this._currentConfigService.getDirtyRanges();
|
|
7453
|
-
return n.length === 0 ? !0 :
|
|
7437
|
+
return n.length === 0 ? !0 : Cc(n, a, e, t, r);
|
|
7454
7438
|
}
|
|
7455
7439
|
};
|
|
7456
|
-
Ws =
|
|
7457
|
-
|
|
7458
|
-
|
|
7440
|
+
Ws = Zf([
|
|
7441
|
+
Ri(0, kt),
|
|
7442
|
+
Ri(1, So)
|
|
7459
7443
|
], Ws);
|
|
7460
7444
|
const Ot = Ze("univer.formula.runtime.service");
|
|
7461
7445
|
var ie = /* @__PURE__ */ ((i) => (i[i.REFERENCE = 1] = "REFERENCE", i[i.VALUE = 2] = "VALUE", i[i.OPERATOR = 3] = "OPERATOR", i[i.FUNCTION = 4] = "FUNCTION", i[i.LAMBDA = 5] = "LAMBDA", i[i.LAMBDA_PARAMETER = 6] = "LAMBDA_PARAMETER", i[i.ERROR = 7] = "ERROR", i[i.BASE = 8] = "BASE", i[i.ROOT = 9] = "ROOT", i[i.UNION = 10] = "UNION", i[i.PREFIX = 11] = "PREFIX", i[i.SUFFIX = 12] = "SUFFIX", i[i.NULL = 13] = "NULL", i))(ie || {});
|
|
@@ -7620,8 +7604,8 @@ class Do extends bt {
|
|
|
7620
7604
|
return new qs(Ut);
|
|
7621
7605
|
}
|
|
7622
7606
|
}
|
|
7623
|
-
const
|
|
7624
|
-
function
|
|
7607
|
+
const zf = 5e3, jr = new Nt(zf);
|
|
7608
|
+
function pi(i, a, e, t, r) {
|
|
7625
7609
|
let n = jr.get(`${i}${a}`);
|
|
7626
7610
|
if (n && !Lo(n, r))
|
|
7627
7611
|
return n;
|
|
@@ -7644,11 +7628,11 @@ function Lo(i, a) {
|
|
|
7644
7628
|
}
|
|
7645
7629
|
return !1;
|
|
7646
7630
|
}
|
|
7647
|
-
function
|
|
7631
|
+
function Jf(i, a, e) {
|
|
7648
7632
|
return !!(a != null && Lo(a, e));
|
|
7649
7633
|
}
|
|
7650
7634
|
const Ht = Ze("univer.formula-function.service");
|
|
7651
|
-
class
|
|
7635
|
+
class eh extends Ne {
|
|
7652
7636
|
constructor() {
|
|
7653
7637
|
super(...arguments);
|
|
7654
7638
|
A(this, "_functionExecutors", /* @__PURE__ */ new Map());
|
|
@@ -7713,11 +7697,11 @@ class th extends Ne {
|
|
|
7713
7697
|
});
|
|
7714
7698
|
}
|
|
7715
7699
|
}
|
|
7716
|
-
var Te = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED", i.MINUS = "MINUS", i.MULTIPLY = "MULTIPLY", i.PLUS = "PLUS", i.UNION = "UNION", i.CUBE = "CUBE", i))(Te || {}),
|
|
7717
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
7700
|
+
var Te = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED", i.MINUS = "MINUS", i.MULTIPLY = "MULTIPLY", i.PLUS = "PLUS", i.UNION = "UNION", i.CUBE = "CUBE", i))(Te || {}), th = Object.getOwnPropertyDescriptor, rh = (i, a, e, t) => {
|
|
7701
|
+
for (var r = t > 1 ? void 0 : t ? th(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7718
7702
|
(s = i[n]) && (r = s(r) || r);
|
|
7719
7703
|
return r;
|
|
7720
|
-
},
|
|
7704
|
+
}, Vi = (i, a) => (e, t) => a(e, t, i);
|
|
7721
7705
|
class pn extends Qe {
|
|
7722
7706
|
constructor(a, e, t) {
|
|
7723
7707
|
super(e), this._runtimeService = a, this._operatorString = e, this._functionExecutor = t;
|
|
@@ -7765,9 +7749,9 @@ let Vn = class extends bt {
|
|
|
7765
7749
|
return r ? new pn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
|
|
7766
7750
|
}
|
|
7767
7751
|
};
|
|
7768
|
-
Vn =
|
|
7769
|
-
|
|
7770
|
-
|
|
7752
|
+
Vn = rh([
|
|
7753
|
+
Vi(0, Ht),
|
|
7754
|
+
Vi(1, Ot)
|
|
7771
7755
|
], Vn);
|
|
7772
7756
|
new RegExp(Me.MINUS, "g");
|
|
7773
7757
|
new RegExp(Me.AT, "g");
|
|
@@ -7781,12 +7765,12 @@ function Po(i, a, e) {
|
|
|
7781
7765
|
}
|
|
7782
7766
|
return s[0] === Me.AT && (r = new pn(e, Me.AT), t && r.setParent(t), o++), o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
|
|
7783
7767
|
}
|
|
7784
|
-
var
|
|
7785
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
7768
|
+
var nh = Object.getOwnPropertyDescriptor, sh = (i, a, e, t) => {
|
|
7769
|
+
for (var r = t > 1 ? void 0 : t ? nh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7786
7770
|
(s = i[n]) && (r = s(r) || r);
|
|
7787
7771
|
return r;
|
|
7788
7772
|
}, ir = (i, a) => (e, t) => a(e, t, i);
|
|
7789
|
-
class
|
|
7773
|
+
class ah extends Qe {
|
|
7790
7774
|
constructor(a, e, t, r, n, s) {
|
|
7791
7775
|
super(a), this._functionExecutor = e, this._currentConfigService = t, this._runtimeService = r, this._definedNamesService = n, this._formulaDataModel = s, this._functionExecutor.isAsync() && this.setAsync(), this._functionExecutor.isAddress() && this.setAddress(), this._functionExecutor.needsLocale && this._setLocale(), this._functionExecutor.needsSheetsInfo && this._setSheetsInfo(), this._functionExecutor.needsFormulaDataModel && this._functionExecutor.setFormulaDataModel(this._formulaDataModel);
|
|
7792
7776
|
}
|
|
@@ -7931,7 +7915,7 @@ class ih extends Qe {
|
|
|
7931
7915
|
a.setFilteredOutRows(r);
|
|
7932
7916
|
}
|
|
7933
7917
|
}
|
|
7934
|
-
class
|
|
7918
|
+
class ih extends Qe {
|
|
7935
7919
|
constructor(a = "Error") {
|
|
7936
7920
|
super(a);
|
|
7937
7921
|
}
|
|
@@ -7954,7 +7938,7 @@ let Nn = class extends bt {
|
|
|
7954
7938
|
}
|
|
7955
7939
|
create(i) {
|
|
7956
7940
|
const a = this._functionService.getExecutor(i);
|
|
7957
|
-
return a ? new
|
|
7941
|
+
return a ? new ah(
|
|
7958
7942
|
i,
|
|
7959
7943
|
a,
|
|
7960
7944
|
this._currentConfigService,
|
|
@@ -7980,7 +7964,7 @@ let Nn = class extends bt {
|
|
|
7980
7964
|
return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken()) === K.COLON;
|
|
7981
7965
|
}
|
|
7982
7966
|
};
|
|
7983
|
-
Nn =
|
|
7967
|
+
Nn = sh([
|
|
7984
7968
|
ir(0, Ht),
|
|
7985
7969
|
ir(1, kt),
|
|
7986
7970
|
ir(2, Ot),
|
|
@@ -7988,11 +7972,11 @@ Nn = ah([
|
|
|
7988
7972
|
ir(4, ye(Wi)),
|
|
7989
7973
|
ir(5, ye(gr))
|
|
7990
7974
|
], Nn);
|
|
7991
|
-
var
|
|
7992
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
7975
|
+
var oh = Object.getOwnPropertyDescriptor, uh = (i, a, e, t) => {
|
|
7976
|
+
for (var r = t > 1 ? void 0 : t ? oh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7993
7977
|
(s = i[n]) && (r = s(r) || r);
|
|
7994
7978
|
return r;
|
|
7995
|
-
},
|
|
7979
|
+
}, ch = (i, a) => (e, t) => a(e, t, i);
|
|
7996
7980
|
let _r = class extends Ne {
|
|
7997
7981
|
constructor(i) {
|
|
7998
7982
|
super(), this._runtimeService = i;
|
|
@@ -8062,13 +8046,13 @@ let _r = class extends Ne {
|
|
|
8062
8046
|
return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.execute(), xt.SUCCESS;
|
|
8063
8047
|
}
|
|
8064
8048
|
};
|
|
8065
|
-
_r =
|
|
8066
|
-
|
|
8049
|
+
_r = uh([
|
|
8050
|
+
ch(0, Ot)
|
|
8067
8051
|
], _r);
|
|
8068
8052
|
function xo(i) {
|
|
8069
8053
|
return i instanceof ae ? i.getToken() === hr : !1;
|
|
8070
8054
|
}
|
|
8071
|
-
function
|
|
8055
|
+
function lh(i) {
|
|
8072
8056
|
return i instanceof ae ? i.getToken() === fo : !1;
|
|
8073
8057
|
}
|
|
8074
8058
|
function Va(i, a, e) {
|
|
@@ -8087,6 +8071,19 @@ function Va(i, a, e) {
|
|
|
8087
8071
|
}
|
|
8088
8072
|
}
|
|
8089
8073
|
}
|
|
8074
|
+
function fh(i) {
|
|
8075
|
+
let a = i;
|
|
8076
|
+
for (; a != null && a.getParent(); )
|
|
8077
|
+
a = a.getParent();
|
|
8078
|
+
return a;
|
|
8079
|
+
}
|
|
8080
|
+
function Ni(i, a = 0, e = 0) {
|
|
8081
|
+
return {
|
|
8082
|
+
node: i,
|
|
8083
|
+
refOffsetX: a,
|
|
8084
|
+
refOffsetY: e
|
|
8085
|
+
};
|
|
8086
|
+
}
|
|
8090
8087
|
function jo(i) {
|
|
8091
8088
|
if (!i)
|
|
8092
8089
|
return;
|
|
@@ -8120,9 +8117,9 @@ class Na extends $t {
|
|
|
8120
8117
|
this._setLambdaPrivacyValueMap(e), this._setLambdaNodeValue(this._lambdaNode), this._lambdaNode.setNotEmpty(!1);
|
|
8121
8118
|
let r;
|
|
8122
8119
|
if (this._interpreter.checkAsyncNode(this._lambdaNode))
|
|
8123
|
-
r = new
|
|
8120
|
+
r = new If(this._interpreter.executeAsync(Ni(this._lambdaNode)));
|
|
8124
8121
|
else {
|
|
8125
|
-
const n = this._interpreter.execute(
|
|
8122
|
+
const n = this._interpreter.execute(Ni(this._lambdaNode));
|
|
8126
8123
|
n.isReferenceObject() ? r = n.toArrayValueObject() : r = n;
|
|
8127
8124
|
}
|
|
8128
8125
|
return this._lambdaNode.setNotEmpty(!0), r;
|
|
@@ -8347,7 +8344,7 @@ let Mn = class extends bt {
|
|
|
8347
8344
|
create(i) {
|
|
8348
8345
|
let a = "";
|
|
8349
8346
|
const e = i;
|
|
8350
|
-
e === X.PLUS ? a = Te.PLUS : e === X.MINUS ? a = Te.MINUS : e === X.MULTIPLY ? a = Te.MULTIPLY : e === X.DIVIDED ? a = Te.DIVIDED : e === X.CONCATENATE ? a = se.CONCATENATE : e === X.POWER ? a = Y.POWER :
|
|
8347
|
+
e === X.PLUS ? a = Te.PLUS : e === X.MINUS ? a = Te.MINUS : e === X.MULTIPLY ? a = Te.MULTIPLY : e === X.DIVIDED ? a = Te.DIVIDED : e === X.CONCATENATE ? a = se.CONCATENATE : e === X.POWER ? a = Y.POWER : Ac.has(e) && (a = Te.COMPARE);
|
|
8351
8348
|
const t = this._functionService.getExecutor(a);
|
|
8352
8349
|
return t ? new bh(e, t) : (console.error(`No function ${i}`), xe.create(m.NAME));
|
|
8353
8350
|
}
|
|
@@ -8378,7 +8375,7 @@ class As extends Qe {
|
|
|
8378
8375
|
return ie.REFERENCE;
|
|
8379
8376
|
}
|
|
8380
8377
|
execute() {
|
|
8381
|
-
const e = this._currentConfigService, t = this._runtimeService, r =
|
|
8378
|
+
const e = this._currentConfigService, t = this._runtimeService, r = Gf(this.getToken(), this._referenceObjectType);
|
|
8382
8379
|
r.setDefaultUnitId(t.currentUnitId), r.setDefaultSheetId(t.currentSubUnitId), r.setForcedSheetId(e.getSheetNameMap()), r.setUnitData(e.getUnitData()), r.setArrayFormulaCellData(e.getArrayFormulaCellData()), r.setRuntimeData(t.getUnitData()), r.setUnitStylesData(e.getUnitStylesData()), r.setRuntimeArrayFormulaCellData(t.getRuntimeArrayFormulaCellData()), r.setRuntimeFeatureCellData(t.getRuntimeFeatureCellData());
|
|
8383
8380
|
const { x: n, y: s } = this.getRefOffset();
|
|
8384
8381
|
r.setRefOffset(n, s), !this._isPrepareMerge && r.isExceedRange() ? this.setValue(g.create(m.NAME)) : this.setValue(r);
|
|
@@ -8505,7 +8502,7 @@ class wh extends Qe {
|
|
|
8505
8502
|
this.getToken() === K.COLON ? s = this._unionFunction(r, n) : s = g.create(m.NAME), this.setValue(s);
|
|
8506
8503
|
}
|
|
8507
8504
|
_unionFunction(a, e) {
|
|
8508
|
-
return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e,
|
|
8505
|
+
return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, Qf(a, e));
|
|
8509
8506
|
}
|
|
8510
8507
|
}
|
|
8511
8508
|
let Dn = class extends bt {
|
|
@@ -8630,7 +8627,7 @@ let Ur = class extends Ne {
|
|
|
8630
8627
|
const t = a.getChildren(), r = t.length, n = [];
|
|
8631
8628
|
let s = null;
|
|
8632
8629
|
const o = a.getToken().trim().toUpperCase();
|
|
8633
|
-
if (o ===
|
|
8630
|
+
if (o === zc) {
|
|
8634
8631
|
const f = this._changeLetToLambda(a);
|
|
8635
8632
|
return f != null ? this._parse(f, e) : xe.create(m.ERROR);
|
|
8636
8633
|
}
|
|
@@ -8651,7 +8648,7 @@ let Ur = class extends Ne {
|
|
|
8651
8648
|
if (xo(u)) {
|
|
8652
8649
|
if (f !== 0 && f !== r - 1)
|
|
8653
8650
|
continue;
|
|
8654
|
-
} else if (
|
|
8651
|
+
} else if (lh(h) && f !== r - 1)
|
|
8655
8652
|
continue;
|
|
8656
8653
|
let d = null;
|
|
8657
8654
|
if (h instanceof ae) {
|
|
@@ -8666,14 +8663,14 @@ let Ur = class extends Ne {
|
|
|
8666
8663
|
d = this._checkAstNode(h);
|
|
8667
8664
|
if (d == null)
|
|
8668
8665
|
return xe.create(m.NAME);
|
|
8669
|
-
if (d =
|
|
8666
|
+
if (d = fh(d), d == null || (d == null ? void 0 : d.nodeType) === ie.ERROR)
|
|
8670
8667
|
return d;
|
|
8671
8668
|
switch (d.nodeType) {
|
|
8672
8669
|
// case NodeType.ERROR:
|
|
8673
8670
|
// return astNode;
|
|
8674
8671
|
case ie.FUNCTION: {
|
|
8675
8672
|
const _ = d.getToken().trim().toUpperCase();
|
|
8676
|
-
|
|
8673
|
+
el.has(_) && d.setForcedCalculateFunction(), n.push(d);
|
|
8677
8674
|
break;
|
|
8678
8675
|
}
|
|
8679
8676
|
case ie.LAMBDA:
|
|
@@ -8727,7 +8724,7 @@ let Ur = class extends Ne {
|
|
|
8727
8724
|
const t = this._astNodeFactoryList.length;
|
|
8728
8725
|
for (let r = 0; r < t && (e = this._astNodeFactoryList[r].checkAndCreateNodeType(a), e == null); r++)
|
|
8729
8726
|
;
|
|
8730
|
-
return e == null ? new
|
|
8727
|
+
return e == null ? new ih() : e;
|
|
8731
8728
|
}
|
|
8732
8729
|
_initializeAstNode() {
|
|
8733
8730
|
this._astNodeFactoryList = [
|
|
@@ -9717,7 +9714,7 @@ let Zs = class extends Ne {
|
|
|
9717
9714
|
const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), h = u[l], { f: d, ranges: _ } = h;
|
|
9718
9715
|
let C = !1;
|
|
9719
9716
|
f && (C = !0);
|
|
9720
|
-
const E =
|
|
9717
|
+
const E = pi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || or(this._dependencyManagerService), M = new bs(N);
|
|
9721
9718
|
for (let w = 0; w < _.length; w++) {
|
|
9722
9719
|
const S = _[w], { startRow: D, startColumn: L, endRow: U, endColumn: x } = S;
|
|
9723
9720
|
for (let F = D; F <= U; F++)
|
|
@@ -9778,7 +9775,7 @@ let Zs = class extends Ne {
|
|
|
9778
9775
|
}
|
|
9779
9776
|
}
|
|
9780
9777
|
_createFDtree(a, e, t, r, n, s) {
|
|
9781
|
-
const { f: o, x: u = 0, y: c = 0 } = s, l = new bs(or(this._dependencyManagerService)), f = n[a][e], h =
|
|
9778
|
+
const { f: o, x: u = 0, y: c = 0 } = s, l = new bs(or(this._dependencyManagerService)), f = n[a][e], h = pi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
|
|
9782
9779
|
return l.node = h, l.formula = o, l.unitId = a, l.subUnitId = e, l.row = t, l.column = r, l.rowCount = f.rowCount, l.columnCount = f.columnCount, l;
|
|
9783
9780
|
}
|
|
9784
9781
|
_createVirtualFDtree(a, e) {
|
|
@@ -10051,7 +10048,7 @@ let Zs = class extends Ne {
|
|
|
10051
10048
|
_includeTree(a, e) {
|
|
10052
10049
|
var c, l, f;
|
|
10053
10050
|
const t = a.unitId, r = a.subUnitId;
|
|
10054
|
-
if (this._detectForcedRecalculationNode(a, e) === !0 || this._includeTreeFeature(a) === !0 || this._includeOtherFormula(a) === !0 ||
|
|
10051
|
+
if (this._detectForcedRecalculationNode(a, e) === !0 || this._includeTreeFeature(a) === !0 || this._includeOtherFormula(a) === !0 || Jf(a, e, this._currentConfigService) === !0)
|
|
10055
10052
|
return !0;
|
|
10056
10053
|
const n = (l = (c = this._currentConfigService.getExcludedRange()) == null ? void 0 : c[t]) == null ? void 0 : l[r];
|
|
10057
10054
|
if ((n == null ? void 0 : n.getValue(a.row, a.column)) != null)
|
|
@@ -10352,7 +10349,7 @@ let Ln = class extends Ne {
|
|
|
10352
10349
|
)), this._commandService.executeCommand(
|
|
10353
10350
|
uo.id,
|
|
10354
10351
|
{
|
|
10355
|
-
unitData:
|
|
10352
|
+
unitData: vc(a),
|
|
10356
10353
|
unitOtherData: e
|
|
10357
10354
|
},
|
|
10358
10355
|
{
|
|
@@ -10779,7 +10776,7 @@ class V {
|
|
|
10779
10776
|
return Nr(t, 1, t[0].length);
|
|
10780
10777
|
}
|
|
10781
10778
|
_includingLogicalValuesAndText(a) {
|
|
10782
|
-
if (a.isBoolean() && (a =
|
|
10779
|
+
if (a.isBoolean() && (a = $f(a)), a.isString()) {
|
|
10783
10780
|
const e = Number(a.getValue());
|
|
10784
10781
|
a = y.create(Number.isNaN(e) ? 0 : e);
|
|
10785
10782
|
}
|
|
@@ -13434,7 +13431,7 @@ class Dm extends V {
|
|
|
13434
13431
|
return !0;
|
|
13435
13432
|
}
|
|
13436
13433
|
}
|
|
13437
|
-
class
|
|
13434
|
+
class Jb extends Dm {
|
|
13438
13435
|
isAsync() {
|
|
13439
13436
|
return !0;
|
|
13440
13437
|
}
|
|
@@ -14837,7 +14834,7 @@ class Ag extends V {
|
|
|
14837
14834
|
if (r) {
|
|
14838
14835
|
let { v: n, z: s } = r;
|
|
14839
14836
|
if (s && Ha(s))
|
|
14840
|
-
return n instanceof Date && (n = Gr(n)), y.create(
|
|
14837
|
+
return n instanceof Date && (n = Gr(n)), y.create(Pf(+n));
|
|
14841
14838
|
}
|
|
14842
14839
|
}
|
|
14843
14840
|
return g.create(m.VALUE);
|
|
@@ -20468,7 +20465,7 @@ class _d extends V {
|
|
|
20468
20465
|
c.isArray() && (c = c.get(0, 0)), s[o][u] = c;
|
|
20469
20466
|
}
|
|
20470
20467
|
}
|
|
20471
|
-
return new
|
|
20468
|
+
return new Ff(s);
|
|
20472
20469
|
}
|
|
20473
20470
|
isAsync() {
|
|
20474
20471
|
return !0;
|
|
@@ -22402,7 +22399,7 @@ class rC extends V {
|
|
|
22402
22399
|
if (n != null && n.isError())
|
|
22403
22400
|
return n;
|
|
22404
22401
|
const s = n != null ? n : T.create(!0);
|
|
22405
|
-
return
|
|
22402
|
+
return yi(e) && yi(s) && r.isArray() ? this._handleArrayColIndexNum(e, t, r, s) : this._handleNonArrayColIndexNum(e, t, r, s);
|
|
22406
22403
|
}
|
|
22407
22404
|
_handleArrayColIndexNum(e, t, r, n) {
|
|
22408
22405
|
const s = e.isArray() ? e.getFirstCell() : e, o = this.getZeroOrOneByOneDefault(n);
|
|
@@ -28802,7 +28799,7 @@ class RE extends V {
|
|
|
28802
28799
|
if (l > 127)
|
|
28803
28800
|
return g.create(m.VALUE);
|
|
28804
28801
|
l < 0 && (`${c}`.length < Math.abs(l) ? c = 0 : c = c < 0 ? -vt(Math.abs(c), l) : vt(c, l), l = 0);
|
|
28805
|
-
const f =
|
|
28802
|
+
const f = El(this.getLocale(), c, l);
|
|
28806
28803
|
return j.create(f);
|
|
28807
28804
|
}
|
|
28808
28805
|
}
|
|
@@ -28840,7 +28837,7 @@ class pE extends V {
|
|
|
28840
28837
|
}
|
|
28841
28838
|
const Wa = (i, a) => dt.format(i, a, { throws: !1 }), Se = (i) => {
|
|
28842
28839
|
let a = `${i.getValue()}`;
|
|
28843
|
-
return i.isNull() && (a = ""), i.isBoolean() && (a = a.toLocaleUpperCase()), i.isNumber() && (i.getPattern() !== "" ? a = Wa(i.getPattern(), +i.getValue()) : a = `${
|
|
28840
|
+
return i.isNull() && (a = ""), i.isBoolean() && (a = a.toLocaleUpperCase()), i.isNumber() && (i.getPattern() !== "" ? a = Wa(i.getPattern(), +i.getValue()) : a = `${Lf(+i.getValue())}`), a;
|
|
28844
28841
|
};
|
|
28845
28842
|
class VE extends V {
|
|
28846
28843
|
constructor() {
|
|
@@ -30806,6 +30803,9 @@ const Ab = [
|
|
|
30806
30803
|
[_b, se.VALUETOTEXT]
|
|
30807
30804
|
], Eb = [];
|
|
30808
30805
|
var bb = /* @__PURE__ */ ((i) => i)(bb || {});
|
|
30806
|
+
function ty(i) {
|
|
30807
|
+
return i.isError() ? i.getValue() : i.isReferenceObject() ? i.toArrayValueObject().toValue() : i.isArray() ? i.toValue() : i.getValue();
|
|
30808
|
+
}
|
|
30809
30809
|
class yb extends V {
|
|
30810
30810
|
constructor() {
|
|
30811
30811
|
super(...arguments);
|
|
@@ -30920,10 +30920,10 @@ let vn = class extends Ne {
|
|
|
30920
30920
|
fa,
|
|
30921
30921
|
ha,
|
|
30922
30922
|
ma,
|
|
30923
|
+
Xc,
|
|
30923
30924
|
Zc,
|
|
30924
|
-
zc,
|
|
30925
30925
|
lo,
|
|
30926
|
-
|
|
30926
|
+
Tc
|
|
30927
30927
|
].forEach((i) => {
|
|
30928
30928
|
var a;
|
|
30929
30929
|
this._commandService.registerCommand(i), (a = this._dataSyncPrimaryController) == null || a.registerSyncingMutations(i);
|
|
@@ -31230,11 +31230,11 @@ var Bb = Object.getOwnPropertyDescriptor, Ib = (i, a, e, t) => {
|
|
|
31230
31230
|
const Fb = "UNIVER_ENGINE_FORMULA_PLUGIN";
|
|
31231
31231
|
var Ns;
|
|
31232
31232
|
let Gi = (Ns = class extends uc {
|
|
31233
|
-
constructor(i =
|
|
31233
|
+
constructor(i = fi, a, e) {
|
|
31234
31234
|
super(), this._config = i, this._injector = a, this._configService = e;
|
|
31235
31235
|
const { ...t } = cc(
|
|
31236
31236
|
{},
|
|
31237
|
-
|
|
31237
|
+
fi,
|
|
31238
31238
|
this._config
|
|
31239
31239
|
);
|
|
31240
31240
|
this._configService.setConfig(Ca, t);
|
|
@@ -31264,11 +31264,11 @@ let Gi = (Ns = class extends uc {
|
|
|
31264
31264
|
_initialize() {
|
|
31265
31265
|
const i = !this._config.notExecuteFormula, a = [
|
|
31266
31266
|
// Services
|
|
31267
|
-
[Ht, { useClass:
|
|
31267
|
+
[Ht, { useClass: eh }],
|
|
31268
31268
|
[pr, { useClass: Ps }],
|
|
31269
31269
|
[Tb, { useClass: vb }],
|
|
31270
31270
|
[So, { useClass: Qs }],
|
|
31271
|
-
[go, { useClass:
|
|
31271
|
+
[go, { useClass: ul }],
|
|
31272
31272
|
[Qu, { useClass: xb }],
|
|
31273
31273
|
[Gu],
|
|
31274
31274
|
// Models
|
|
@@ -31326,9 +31326,9 @@ export {
|
|
|
31326
31326
|
q as ArrayValueObject,
|
|
31327
31327
|
Do as AstRootNodeFactory,
|
|
31328
31328
|
Ur as AstTreeBuilder,
|
|
31329
|
-
|
|
31330
|
-
|
|
31331
|
-
|
|
31329
|
+
Ff as AsyncArrayObject,
|
|
31330
|
+
Jb as AsyncCustomFunction,
|
|
31331
|
+
If as AsyncObject,
|
|
31332
31332
|
V as BaseFunction,
|
|
31333
31333
|
Xn as BaseReferenceObject,
|
|
31334
31334
|
$t as BaseValueObject,
|
|
@@ -31341,7 +31341,7 @@ export {
|
|
|
31341
31341
|
Ps as DefinedNamesService,
|
|
31342
31342
|
Ph as DependencyManagerBaseService,
|
|
31343
31343
|
xh as DependencyManagerService,
|
|
31344
|
-
|
|
31344
|
+
Zb as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
|
|
31345
31345
|
Ca as ENGINE_FORMULA_PLUGIN_CONFIG_KEY,
|
|
31346
31346
|
yr as ERROR_TYPE_SET,
|
|
31347
31347
|
m as ErrorType,
|
|
@@ -31372,8 +31372,8 @@ export {
|
|
|
31372
31372
|
Dr as FormulaExecutedStateType,
|
|
31373
31373
|
Ws as FormulaRuntimeService,
|
|
31374
31374
|
Nn as FunctionNodeFactory,
|
|
31375
|
-
|
|
31376
|
-
|
|
31375
|
+
eh as FunctionService,
|
|
31376
|
+
_c as FunctionType,
|
|
31377
31377
|
Gu as GlobalComputingStatusService,
|
|
31378
31378
|
Qs as HyperlinkEngineFormulaService,
|
|
31379
31379
|
Tb as IActiveDirtyManagerService,
|
|
@@ -31403,14 +31403,14 @@ export {
|
|
|
31403
31403
|
Vn as PrefixNodeFactory,
|
|
31404
31404
|
Rn as RangeReferenceObject,
|
|
31405
31405
|
wn as ReferenceNodeFactory,
|
|
31406
|
-
|
|
31406
|
+
Tc as RegisterFunctionMutation,
|
|
31407
31407
|
ao as RemoveDefinedNameMutation,
|
|
31408
31408
|
fa as RemoveFeatureCalculationMutation,
|
|
31409
31409
|
ma as RemoveOtherFormulaMutation,
|
|
31410
|
-
|
|
31410
|
+
Zc as RemoveSuperTableMutation,
|
|
31411
31411
|
ws as SetArrayFormulaDataMutation,
|
|
31412
31412
|
ca as SetDefinedNameMutation,
|
|
31413
|
-
|
|
31413
|
+
Xb as SetDefinedNameMutationFactory,
|
|
31414
31414
|
la as SetFeatureCalculationMutation,
|
|
31415
31415
|
Cn as SetFormulaCalculationNotificationMutation,
|
|
31416
31416
|
uo as SetFormulaCalculationResultMutation,
|
|
@@ -31418,9 +31418,9 @@ export {
|
|
|
31418
31418
|
oo as SetFormulaCalculationStopMutation,
|
|
31419
31419
|
co as SetFormulaDataMutation,
|
|
31420
31420
|
ha as SetOtherFormulaMutation,
|
|
31421
|
-
|
|
31421
|
+
Xc as SetSuperTableMutation,
|
|
31422
31422
|
lo as SetSuperTableOptionMutation,
|
|
31423
|
-
|
|
31423
|
+
ul as SheetRowFilteredService,
|
|
31424
31424
|
j as StringValueObject,
|
|
31425
31425
|
Sn as SuffixNodeFactory,
|
|
31426
31426
|
xb as SuperTableService,
|
|
@@ -31429,7 +31429,7 @@ export {
|
|
|
31429
31429
|
To as ValueNodeFactory,
|
|
31430
31430
|
Vt as ValueObjectFactory,
|
|
31431
31431
|
$ as compareToken,
|
|
31432
|
-
|
|
31432
|
+
Uc as convertUnitDataToRuntime,
|
|
31433
31433
|
Yh as deserializeRangeForR1C1,
|
|
31434
31434
|
Lr as deserializeRangeWithSheet,
|
|
31435
31435
|
mr as deserializeRangeWithSheetWithCache,
|
|
@@ -31449,33 +31449,33 @@ export {
|
|
|
31449
31449
|
Ab as functionText,
|
|
31450
31450
|
Eb as functionUniver,
|
|
31451
31451
|
Rb as functionWeb,
|
|
31452
|
-
|
|
31453
|
-
|
|
31452
|
+
pi as generateAstNode,
|
|
31453
|
+
Ni as generateExecuteAstNodeData,
|
|
31454
31454
|
or as generateRandomDependencyTreeId,
|
|
31455
|
-
|
|
31456
|
-
|
|
31455
|
+
ui as generateStringWithSequence,
|
|
31456
|
+
qb as getAbsoluteRefTypeWitString,
|
|
31457
31457
|
an as getAbsoluteRefTypeWithSingleString,
|
|
31458
|
-
|
|
31459
|
-
|
|
31460
|
-
|
|
31458
|
+
ty as getObjectValue,
|
|
31459
|
+
Kb as getRangeWithRefsString,
|
|
31460
|
+
zb as handleNumfmtInCell,
|
|
31461
31461
|
ua as handleRefStringInfo,
|
|
31462
|
-
|
|
31463
|
-
|
|
31462
|
+
bc as includeFormulaLexerToken,
|
|
31463
|
+
li as initSheetFormulaData,
|
|
31464
31464
|
sn as isFormulaLexerToken,
|
|
31465
|
-
|
|
31465
|
+
Cc as isInDirtyRange,
|
|
31466
31466
|
ro as isReferenceString,
|
|
31467
31467
|
on as isReferenceStringWithEffectiveColumn,
|
|
31468
|
-
|
|
31469
|
-
|
|
31468
|
+
Yc as isReferenceStrings,
|
|
31469
|
+
Wb as matchRefDrawToken,
|
|
31470
31470
|
K as matchToken,
|
|
31471
|
-
|
|
31471
|
+
Qb as normalizeSheetName,
|
|
31472
31472
|
X as operatorToken,
|
|
31473
31473
|
$e as sequenceNodeType,
|
|
31474
31474
|
Bt as serializeRange,
|
|
31475
31475
|
Ss as serializeRangeToRefString,
|
|
31476
|
-
|
|
31477
|
-
|
|
31476
|
+
Fc as serializeRangeWithSheet,
|
|
31477
|
+
kc as serializeRangeWithSpreadsheet,
|
|
31478
31478
|
fs as singleReferenceToGrid,
|
|
31479
|
-
|
|
31480
|
-
|
|
31479
|
+
bi as strip,
|
|
31480
|
+
Lf as stripErrorMargin
|
|
31481
31481
|
};
|