@univerjs/sheets-formula 0.8.1-nightly.202506191607 → 0.8.2-nightly.202506201607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var Ya = Object.defineProperty;
2
2
  var Xa = (a, e, n) => e in a ? Ya(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n;
3
3
  var W = (a, e, n) => Xa(a, typeof e != "symbol" ? e + "" : e, n);
4
- import { CommandType as xt, ICommandService as ce, ObjectMatrix as G, Tools as Ae, IUniverInstanceService as Ce, Rectangle as fe, sequenceExecuteAsync as Wa, isFormulaString as xe, isFormulaId as la, cellToRange as sa, Direction as Xe, getIntersectRange as Ye, RANGE_TYPE as Y, Inject as X, Disposable as ae, UniverInstanceType as te, LifecycleService as Ka, ILogService as ka, IConfigService as De, LocaleService as _t, Injector as rt, createIdentifier as yt, toDisposable as ie, moveRangeByOffset as Nt, DisposableCollection as We, AbsoluteRefType as Ke, Optional as Qa, InterceptorEffectEnum as $a, CellValueType as Gt, isRealNum as ja, DependentOn as da, Plugin as pa, merge as La, touchDependencies as Ue, isNodeEnv as Ht } from "@univerjs/core";
4
+ import { CommandType as xt, ICommandService as ce, ObjectMatrix as G, Tools as Me, IUniverInstanceService as Ae, Rectangle as fe, sequenceExecuteAsync as Wa, isFormulaString as xe, isFormulaId as la, cellToRange as sa, Direction as We, getIntersectRange as Xe, RANGE_TYPE as Y, Inject as X, Disposable as ae, UniverInstanceType as te, LifecycleService as Ka, ILogService as ka, IConfigService as Ce, LocaleService as _t, Injector as ot, createIdentifier as yt, toDisposable as ie, moveRangeByOffset as Nt, DisposableCollection as Ke, AbsoluteRefType as ke, Optional as Qa, InterceptorEffectEnum as $a, CellValueType as Gt, isRealNum as ja, DependentOn as da, Plugin as pa, merge as La, touchDependencies as Fe, isNodeEnv as Ht } from "@univerjs/core";
5
5
  import { SetRangeValuesCommand as Pa, SheetsSelectionsService as za, getSheetCommandTarget as Za, findFirstNonEmptyCell as Ja, alignToMergedCellsBorders as ct, expandToContinuousRange as en, SetSelectionsOperation as tn, SetRangeValuesMutation as Z, handleMoveCols as Ta, EffectRefRangId as H, runRefRangeMutations as w, handleMoveRows as Ea, handleMoveRange as Ia, handleInsertRangeMoveRight as Na, handleInsertRangeMoveDown as Ra, handleDeleteRangeMoveUp as Sa, handleDeleteRangeMoveLeft as Aa, handleIRemoveCol as Ca, handleIRemoveRow as Da, handleInsertCol as ba, handleInsertRow as Oa, RemoveDefinedNameCommand as Ma, SetDefinedNameCommand as xa, RemoveSheetCommand as an, SetWorksheetNameCommand as nn, DeleteRangeMoveLeftCommand as rn, DeleteRangeMoveUpCommand as on, RemoveColCommand as un, RemoveRowCommand as mn, InsertRangeMoveDownCommand as fn, InsertRangeMoveRightCommand as cn, InsertColCommand as ln, InsertRowCommand as sn, MoveColsCommand as dn, MoveRowsCommand as pn, MoveRangeCommand as Ln, SheetInterceptorService as qt, SetStyleCommand as gt, SetBorderCommand as _a, ClearSelectionFormatCommand as ya, RemoveSheetMutation as Rt, InsertSheetMutation as St, RefRangeService as Pn, handleDefaultRangeChangeWithEffectRefCommands as wt, getSeparateEffectedRangesOnCommand as Tn, handleCommonDefaultRangeChangeWithEffectRefCommands as En, MoveRangeMutation as Yt, MoveRowsMutation as Xt, MoveColsMutation as Wt, ReorderRangeMutation as Kt, RemoveRowMutation as kt, RemoveColMutation as Qt, InsertColMutation as $t, InsertRowMutation as jt, SetRowHiddenMutation as zt, SetRowVisibleMutation as Zt, INTERCEPTOR_POINT as In, SetWorksheetActiveOperation as Nn, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as lt, UniverSheetsPlugin as Rn } from "@univerjs/sheets";
6
- import { serializeRange as ye, sequenceNodeType as ee, deserializeRangeWithSheetWithCache as pe, serializeRangeToRefString as ot, ErrorType as j, IDefinedNamesService as ht, LexerTreeBuilder as Ut, generateStringWithSequence as ke, SetDefinedNameMutation as qe, IActiveDirtyManagerService as Ft, SetFormulaCalculationResultMutation as Sn, RemoveOtherFormulaMutation as An, SetOtherFormulaMutation as Cn, FormulaDataModel as ut, SetFormulaCalculationStartMutation as Ie, SetFormulaCalculationStopMutation as Jt, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as ea, SetFormulaCalculationNotificationMutation as Dn, FormulaExecuteStageType as Fe, FormulaExecutedStateType as be, IFormulaCurrentConfigService as bn, Lexer as On, AstTreeBuilder as Mn, Interpreter as xn, generateExecuteAstNodeData as _n, getObjectValue as yn, SetFormulaDataMutation as Be, SetArrayFormulaDataMutation as At, initSheetFormulaData as ta, FunctionType as t, FUNCTION_NAMES_ARRAY as aa, FUNCTION_NAMES_COMPATIBILITY as x, FUNCTION_NAMES_CUBE as se, FUNCTION_NAMES_DATABASE as $, FUNCTION_NAMES_DATE as F, FUNCTION_NAMES_ENGINEERING as A, FUNCTION_NAMES_FINANCIAL as C, FUNCTION_NAMES_INFORMATION as v, FUNCTION_NAMES_LOGICAL as K, FUNCTION_NAMES_LOOKUP as _, FUNCTION_NAMES_MATH as P, FUNCTION_NAMES_STATISTICAL as l, FUNCTION_NAMES_TEXT as b, FUNCTION_NAMES_WEB as st, IFunctionService as Bt, isReferenceStrings as qn, functionArray as gn, functionCompatibility as hn, functionCube as Un, functionDatabase as Fn, functionDate as Bn, functionEngineering as vn, functionFinancial as Vn, functionInformation as Gn, functionLogical as Hn, functionLookup as wn, functionMath as Yn, functionMeta as Xn, functionStatistical as Wn, functionText as Kn, functionUniver as kn, functionWeb as Qn, serializeRangeWithSpreadsheet as na, serializeRangeWithSheet as ia, CustomFunction as Ct, AsyncCustomFunction as qa, RemoveDefinedNameMutation as Dt, stripErrorMargin as $n, UniverFormulaEnginePlugin as ga } from "@univerjs/engine-formula";
6
+ import { serializeRange as ye, sequenceNodeType as ee, deserializeRangeWithSheetWithCache as pe, serializeRangeToRefString as ut, ErrorType as j, IDefinedNamesService as ht, LexerTreeBuilder as Ut, generateStringWithSequence as Qe, SetDefinedNameMutation as qe, IActiveDirtyManagerService as Ft, SetFormulaCalculationResultMutation as Sn, RemoveOtherFormulaMutation as An, SetOtherFormulaMutation as Cn, FormulaDataModel as mt, SetFormulaCalculationStartMutation as Ie, SetFormulaCalculationStopMutation as Jt, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as ea, SetFormulaCalculationNotificationMutation as Dn, FormulaExecuteStageType as Be, FormulaExecutedStateType as De, IFormulaCurrentConfigService as bn, Lexer as On, AstTreeBuilder as Mn, Interpreter as xn, generateExecuteAstNodeData as _n, getObjectValue as yn, SetFormulaDataMutation as ve, SetArrayFormulaDataMutation as At, initSheetFormulaData as ta, FunctionType as t, FUNCTION_NAMES_ARRAY as aa, FUNCTION_NAMES_COMPATIBILITY as x, FUNCTION_NAMES_CUBE as se, FUNCTION_NAMES_DATABASE as $, FUNCTION_NAMES_DATE as F, FUNCTION_NAMES_ENGINEERING as A, FUNCTION_NAMES_FINANCIAL as C, FUNCTION_NAMES_INFORMATION as v, FUNCTION_NAMES_LOGICAL as K, FUNCTION_NAMES_LOOKUP as _, FUNCTION_NAMES_MATH as L, FUNCTION_NAMES_STATISTICAL as l, FUNCTION_NAMES_TEXT as b, FUNCTION_NAMES_WEB as st, IFunctionService as Bt, isReferenceStrings as qn, functionArray as gn, functionCompatibility as hn, functionCube as Un, functionDatabase as Fn, functionDate as Bn, functionEngineering as vn, functionFinancial as Vn, functionInformation as Gn, functionLogical as Hn, functionLookup as wn, functionMath as Yn, functionMeta as Xn, functionStatistical as Wn, functionText as Kn, functionUniver as kn, functionWeb as Qn, serializeRangeWithSpreadsheet as na, serializeRangeWithSheet as ia, CustomFunction as Ct, AsyncCustomFunction as qa, RemoveDefinedNameMutation as Dt, stripErrorMargin as $n, UniverFormulaEnginePlugin as ga } from "@univerjs/engine-formula";
7
7
  import { Subject as ra, BehaviorSubject as ha, bufferWhen as jn, filter as oa, map as zn } from "rxjs";
8
8
  import { IRPCChannelService as Ua, fromModule as Zn, toModule as Jn } from "@univerjs/rpc";
9
9
  const ei = {
@@ -12,15 +12,15 @@ const ei = {
12
12
  handler: async (a, e) => {
13
13
  const { list: n, listOfRangeHasNumber: i } = e, r = a.get(ce), o = new G();
14
14
  n.forEach((f) => {
15
- const { range: m, primary: c, formula: s } = f, { row: L, column: E } = c, p = Ae.generateRandomId(6);
16
- o.setValue(L, E, {
15
+ const { range: m, primary: c, formula: s } = f, { row: P, column: E } = c, p = Me.generateRandomId(6);
16
+ o.setValue(P, E, {
17
17
  f: s,
18
18
  si: p
19
19
  });
20
20
  const { startRow: R, startColumn: S, endRow: N, endColumn: d } = m;
21
21
  for (let D = R; D <= N; D++)
22
22
  for (let I = S; I <= d; I++)
23
- (D !== L || I !== E) && o.setValue(D, I, {
23
+ (D !== P || I !== E) && o.setValue(D, I, {
24
24
  si: p
25
25
  });
26
26
  }), i && i.length > 0 && i.forEach((f) => {
@@ -40,7 +40,7 @@ const ei = {
40
40
  handler: async (a) => {
41
41
  const n = a.get(za).getCurrentLastSelection();
42
42
  if (!n) return !1;
43
- const i = a.get(Ce), r = Za(i);
43
+ const i = a.get(Ae), r = Za(i);
44
44
  if (!r) return !1;
45
45
  const o = n.range, { worksheet: u } = r;
46
46
  let f = Ja(o, u);
@@ -67,14 +67,14 @@ const ei = {
67
67
  endRow: p.row - 1
68
68
  })})`
69
69
  });
70
- const L = ct({
70
+ const P = ct({
71
71
  startRow: m.startRow,
72
72
  startColumn: m.endColumn,
73
73
  endRow: m.endRow,
74
74
  endColumn: m.endColumn
75
75
  }, u);
76
- if (!fe.equals(L, m))
77
- for (const p of u.iterateByRow(L))
76
+ if (!fe.equals(P, m))
77
+ for (const p of u.iterateByRow(P))
78
78
  (!p.value || !u.cellHasValue(p.value)) && c.setValue(p.row, p.col, {
79
79
  f: `=SUM(${ye({
80
80
  startColumn: m.startColumn,
@@ -106,7 +106,7 @@ const ei = {
106
106
  }
107
107
  ], E)).result;
108
108
  }
109
- }, Me = {
109
+ }, Oe = {
110
110
  type: xt.MUTATION,
111
111
  id: "sheet.mutation.data-validation-formula-mark-dirty",
112
112
  handler() {
@@ -150,12 +150,12 @@ function ri(a, e) {
150
150
  if (o == null || u == null)
151
151
  return !0;
152
152
  Object.keys(o).forEach((f) => {
153
- const m = new G(o[f] || {}), c = new G(u[f] || {}), s = new G(), L = new G();
153
+ const m = new G(o[f] || {}), c = new G(u[f] || {}), s = new G(), P = new G();
154
154
  if (m.forValue((N, d, D) => {
155
155
  if (D == null)
156
156
  return !0;
157
- const I = mt(D);
158
- I !== null && (s.setValue(N, d, I), L.setValue(N, d, c.getValue(N, d)));
157
+ const I = ge(D);
158
+ I !== null && (s.setValue(N, d, I), P.setValue(N, d, c.getValue(N, d)));
159
159
  }), s.getSizeOf() === 0)
160
160
  return;
161
161
  const E = {
@@ -170,7 +170,7 @@ function ri(a, e) {
170
170
  const R = {
171
171
  subUnitId: f,
172
172
  unitId: r,
173
- cellValue: L.getMatrix()
173
+ cellValue: P.getMatrix()
174
174
  }, S = {
175
175
  id: Z.id,
176
176
  params: R
@@ -183,13 +183,7 @@ function ri(a, e) {
183
183
  };
184
184
  }
185
185
  function oi(a, e, n) {
186
- const { redoFormulaData: i, undoFormulaData: r } = ui(a, e, n);
187
- if (Ae.diffValue(i, r))
188
- return {
189
- undos: [],
190
- redos: []
191
- };
192
- const o = [], u = [];
186
+ const { redoFormulaData: i, undoFormulaData: r } = ui(a, e, n), o = [], u = [];
193
187
  return Object.keys(i).forEach((f) => {
194
188
  Object.keys(i[f]).forEach((m) => {
195
189
  if (Object.keys(i[f][m]).length !== 0) {
@@ -233,7 +227,7 @@ function ui(a, e, n) {
233
227
  ...Object.keys(e[m] || {})
234
228
  ])).forEach((s) => {
235
229
  var D, I;
236
- const L = (D = a[m]) == null ? void 0 : D[s], E = (I = e[m]) == null ? void 0 : I[s], p = new G(L || {}), R = new G(E || {});
230
+ const P = (D = a[m]) == null ? void 0 : D[s], E = (I = e[m]) == null ? void 0 : I[s], p = new G(P || {}), R = new G(E || {});
237
231
  let S = [];
238
232
  m !== o || s !== u ? S = fi(R) : S = mi(p, n);
239
233
  const N = Ai(S, p, R), d = Ci(S, p);
@@ -255,19 +249,19 @@ function mi(a, e) {
255
249
  return a.forValue((f, m, c) => {
256
250
  if (c == null || !Fa(c)) return !0;
257
251
  const s = sa(f, m);
258
- let L = null, E = !1;
252
+ let P = null, E = !1;
259
253
  if ([
260
254
  0,
261
255
  1,
262
256
  2
263
257
  /* MoveCols */
264
258
  ].includes(n))
265
- L = ci(n, i, r, s);
259
+ P = ci(n, i, r, s);
266
260
  else if (o != null) {
267
261
  const p = li(s, e);
268
- L = p.newCell, E = p.isReverse;
262
+ P = p.newCell, E = p.isReverse;
269
263
  }
270
- E ? u.unshift({ oldCell: s, newCell: L }) : u.push({ oldCell: s, newCell: L });
264
+ E ? u.unshift({ oldCell: s, newCell: P }) : u.push({ oldCell: s, newCell: P });
271
265
  }), u;
272
266
  }
273
267
  function fi(a) {
@@ -357,7 +351,7 @@ function Li(a, e) {
357
351
  const n = Oa(
358
352
  {
359
353
  id: H.InsertRowCommandId,
360
- params: { range: a, unitId: "", subUnitId: "", direction: Xe.DOWN }
354
+ params: { range: a, unitId: "", subUnitId: "", direction: We.DOWN }
361
355
  },
362
356
  e
363
357
  );
@@ -367,7 +361,7 @@ function Pi(a, e) {
367
361
  const n = ba(
368
362
  {
369
363
  id: H.InsertColCommandId,
370
- params: { range: a, unitId: "", subUnitId: "", direction: Xe.RIGHT }
364
+ params: { range: a, unitId: "", subUnitId: "", direction: We.RIGHT }
371
365
  },
372
366
  e
373
367
  );
@@ -435,27 +429,29 @@ function Si(a, e) {
435
429
  return w(n, e);
436
430
  }
437
431
  function Ai(a, e, n) {
432
+ var r, o, u;
438
433
  const i = new G({});
439
- return a.forEach((r) => {
440
- const { oldCell: o, newCell: u } = r, { startRow: f, startColumn: m } = o, c = n.getValue(f, m) || e.getValue(f, m), s = mt(c);
441
- if (i.setValue(f, m, { f: null, si: null }), u) {
442
- const { startRow: L, startColumn: E } = u;
443
- i.setValue(L, E, s);
434
+ for (let f = 0; f < a.length; f++) {
435
+ const { oldCell: m, newCell: c } = a[f];
436
+ if ((r = i.getValue(m.startRow, m.startColumn)) != null && r.f || (o = i.getValue(m.startRow, m.startColumn)) != null && o.si || i.setValue(m.startRow, m.startColumn, { f: null, si: null }), c) {
437
+ const s = (u = n.getValue(m.startRow, m.startColumn)) != null ? u : e.getValue(m.startRow, m.startColumn), P = ge(s);
438
+ i.setValue(c.startRow, c.startColumn, P);
444
439
  }
445
- }), i.getMatrix();
440
+ }
441
+ return i.getMatrix();
446
442
  }
447
443
  function Ci(a, e) {
448
444
  const n = new G({});
449
- return a.reverse().forEach((i) => {
450
- const { oldCell: r, newCell: o } = i, { startRow: u, startColumn: f } = r, m = e.getValue(u, f), c = mt(m);
451
- if (o) {
452
- const { startRow: s, startColumn: L } = o;
453
- n.setValue(s, L, { f: null, si: null });
445
+ for (let i = a.length - 1; i >= 0; i--) {
446
+ const { oldCell: r, newCell: o } = a[i], u = e.getValue(r.startRow, r.startColumn), f = ge(u);
447
+ if (n.setValue(r.startRow, r.startColumn, f), o) {
448
+ const m = e.getValue(o.startRow, o.startColumn), c = ge(m);
449
+ n.setValue(o.startRow, o.startColumn, c != null ? c : { f: null, si: null });
454
450
  }
455
- n.setValue(u, f, c);
456
- }), n.getMatrix();
451
+ }
452
+ return n.getMatrix();
457
453
  }
458
- function mt(a) {
454
+ function ge(a) {
459
455
  if (a == null)
460
456
  return;
461
457
  const { f: e, si: n, x: i = 0, y: r = 0 } = a, o = xe(e), u = la(n);
@@ -470,7 +466,7 @@ function mt(a) {
470
466
  function Di(a) {
471
467
  const e = new G({});
472
468
  return new G(a).forValue((i, r, o) => {
473
- const u = mt(o);
469
+ const u = ge(o);
474
470
  u && e.setValue(i, r, u);
475
471
  }), e.getMatrix();
476
472
  }
@@ -494,13 +490,13 @@ function va(a, e, n = 0, i = 0) {
494
490
  r.push(f);
495
491
  continue;
496
492
  }
497
- const { token: m } = f, c = pe(m), { range: s, sheetName: L, unitId: E } = c, p = fe.moveOffset(s, n, i);
493
+ const { token: m } = f, c = pe(m), { range: s, sheetName: P, unitId: E } = c, p = fe.moveOffset(s, n, i);
498
494
  r.push({
499
495
  ...f,
500
- token: ot({
496
+ token: ut({
501
497
  range: p,
502
498
  unitId: E,
503
- sheetName: L
499
+ sheetName: P
504
500
  })
505
501
  });
506
502
  }
@@ -508,7 +504,7 @@ function va(a, e, n = 0, i = 0) {
508
504
  }
509
505
  function Va(a, e, n, i) {
510
506
  const { type: r, unitId: o, sheetId: u, range: f, from: m, to: c, rangeFilteredRows: s } = e, {
511
- range: L,
507
+ range: P,
512
508
  sheetId: E,
513
509
  unitId: p,
514
510
  sheetName: R,
@@ -524,12 +520,12 @@ function Va(a, e, n, i) {
524
520
  E
525
521
  ))
526
522
  return;
527
- const d = fe.moveOffset(L, S, N);
523
+ const d = fe.moveOffset(P, S, N);
528
524
  let D = null;
529
525
  if (r === y.MoveRange) {
530
526
  if (m == null || c == null)
531
527
  return;
532
- const I = Lt(d, m), T = Ye(d, m);
528
+ const I = Lt(d, m), T = Xe(d, m);
533
529
  if (T == null || I !== 4)
534
530
  return;
535
531
  const g = Ia(
@@ -543,8 +539,8 @@ function Va(a, e, n, i) {
543
539
  if (m == null || c == null)
544
540
  return;
545
541
  const I = Lt(d, m);
546
- let T = Ye(d, m);
547
- if (T == null && (m.endRow < d.startRow && c.endRow < d.startRow || m.startRow > d.endRow && c.startRow > d.endRow))
542
+ let T = Xe(d, m);
543
+ if (T == null && (m.endRow < d.startRow && c.endRow <= d.startRow || m.startRow > d.endRow && c.startRow > d.endRow))
548
544
  return;
549
545
  T == null && (T = {
550
546
  startRow: d.startRow,
@@ -564,8 +560,8 @@ function Va(a, e, n, i) {
564
560
  if (m == null || c == null)
565
561
  return;
566
562
  const I = Lt(d, m);
567
- let T = Ye(d, m);
568
- if (T == null && (m.endColumn < d.startColumn && c.endColumn < d.startColumn || m.startColumn > d.endColumn && c.startColumn > d.endColumn))
563
+ let T = Xe(d, m);
564
+ if (T == null && (m.endColumn < d.startColumn && c.endColumn <= d.startColumn || m.startColumn > d.endColumn && c.startColumn > d.endColumn))
569
565
  return;
570
566
  T == null && (T = {
571
567
  startRow: d.startRow,
@@ -587,7 +583,7 @@ function Va(a, e, n, i) {
587
583
  const I = Oa(
588
584
  {
589
585
  id: H.InsertRowCommandId,
590
- params: { range: f, unitId: "", subUnitId: "", direction: Xe.DOWN }
586
+ params: { range: f, unitId: "", subUnitId: "", direction: We.DOWN }
591
587
  },
592
588
  d
593
589
  ), T = w(I, d);
@@ -601,7 +597,7 @@ function Va(a, e, n, i) {
601
597
  const I = ba(
602
598
  {
603
599
  id: H.InsertColCommandId,
604
- params: { range: f, unitId: "", subUnitId: "", direction: Xe.RIGHT }
600
+ params: { range: f, unitId: "", subUnitId: "", direction: We.RIGHT }
605
601
  },
606
602
  d
607
603
  ), T = w(I, d);
@@ -699,31 +695,31 @@ function Va(a, e, n, i) {
699
695
  }
700
696
  }
701
697
  if (D != null)
702
- return ot({
698
+ return ut({
703
699
  range: D,
704
700
  sheetName: R,
705
701
  unitId: p
706
702
  });
707
703
  }
708
704
  function pt(a, e, n, i, r, o) {
709
- const { startRow: u, endRow: f, startColumn: m, endColumn: c, rangeType: s } = Oe(e), {
710
- startRow: L,
705
+ const { startRow: u, endRow: f, startColumn: m, endColumn: c, rangeType: s } = be(e), {
706
+ startRow: P,
711
707
  startColumn: E,
712
708
  endRow: p,
713
709
  endColumn: R,
714
710
  rangeType: S = Y.NORMAL
715
- } = Oe(n), { startRow: N, startColumn: d, endRow: D, endColumn: I } = Oe(i), {
711
+ } = be(n), { startRow: N, startColumn: d, endRow: D, endColumn: I } = be(i), {
716
712
  startRow: T,
717
713
  endRow: g,
718
714
  startColumn: h,
719
715
  endColumn: B
720
- } = Oe(o), {
716
+ } = be(o), {
721
717
  startRow: q,
722
718
  endRow: M,
723
719
  startColumn: U,
724
720
  endColumn: V,
725
721
  rangeType: Q = Y.NORMAL
726
- } = Oe(r), O = { ...r };
722
+ } = be(r), O = { ...r };
727
723
  function Pe() {
728
724
  return s === Y.COLUMN && Q === Y.COLUMN ? !0 : m >= U && c <= V;
729
725
  }
@@ -745,7 +741,7 @@ function pt(a, e, n, i, r, o) {
745
741
  if (f > M)
746
742
  O.endRow = f;
747
743
  else if (f <= q)
748
- O.startRow += M - L + 1;
744
+ O.startRow += M - P + 1;
749
745
  else
750
746
  return;
751
747
  else
@@ -770,7 +766,7 @@ function pt(a, e, n, i, r, o) {
770
766
  return;
771
767
  else
772
768
  return;
773
- else a === 4 ? (O.startRow = u, O.startColumn = m, O.endRow = f, O.endColumn = c) : E <= U && R >= V || S === Y.ROW && Q === Y.ROW ? n.endRow < q ? (N >= q && (O.startRow -= p - L + 1), N >= M && (O.endRow -= p - L + 1)) : n.startRow > M ? (D <= M && (O.endRow += p - L + 1), D <= q && (O.startRow += p - L + 1)) : n.startRow >= q && n.endRow <= M && (N <= q ? O.startRow += p - L + 1 : N >= M && (O.endRow -= p - L + 1)) : L <= q && p >= M || S === Y.COLUMN && Q === Y.COLUMN ? n.endColumn < U ? (d >= U && (O.startColumn -= R - E + 1), d >= V && (O.endColumn -= R - E + 1)) : n.startColumn > V ? (I <= V && (O.endColumn += R - E + 1), I <= U && (O.startColumn += R - E + 1)) : n.startColumn >= U && n.endColumn <= V && (d <= U ? O.startColumn += R - E + 1 : d >= V && (O.endColumn -= R - E + 1)) : ((d <= B + 1 && I >= V || d <= U && I >= h - 1) && N <= q && D >= M || (N <= g + 1 && D >= M || N <= q && D >= T - 1) && d <= U && I >= V, O.startRow = u, O.startColumn = m, O.endRow = f, O.endColumn = c);
769
+ else a === 4 ? (O.startRow = u, O.startColumn = m, O.endRow = f, O.endColumn = c) : E <= U && R >= V || S === Y.ROW && Q === Y.ROW ? n.endRow < q ? (N >= q && (O.startRow -= p - P + 1), N >= M && (O.endRow -= p - P + 1)) : n.startRow > M ? (D <= M && (O.endRow += p - P + 1), D <= q && (O.startRow += p - P + 1)) : n.startRow >= q && n.endRow <= M && (N <= q ? O.startRow += p - P + 1 : N >= M && (O.endRow -= p - P + 1)) : P <= q && p >= M || S === Y.COLUMN && Q === Y.COLUMN ? n.endColumn < U ? (d >= U && (O.startColumn -= R - E + 1), d >= V && (O.endColumn -= R - E + 1)) : n.startColumn > V ? (I <= V && (O.endColumn += R - E + 1), I <= U && (O.startColumn += R - E + 1)) : n.startColumn >= U && n.endColumn <= V && (d <= U ? O.startColumn += R - E + 1 : d >= V && (O.endColumn -= R - E + 1)) : ((d <= B + 1 && I >= V || d <= U && I >= h - 1) && N <= q && D >= M || (N <= g + 1 && D >= M || N <= q && D >= T - 1) && d <= U && I >= V, O.startRow = u, O.startColumn = m, O.endRow = f, O.endColumn = c);
774
770
  return O;
775
771
  }
776
772
  function Lt(a, e) {
@@ -778,13 +774,13 @@ function Lt(a, e) {
778
774
  function s() {
779
775
  return a.rangeType === Y.COLUMN && e.rangeType === Y.COLUMN ? !0 : n >= u && i <= f;
780
776
  }
781
- function L() {
777
+ function P() {
782
778
  return a.rangeType === Y.ROW && e.rangeType === Y.ROW ? !0 : r >= m && o <= c;
783
779
  }
784
780
  function E() {
785
781
  return a.rangeType === Y.ALL && e.rangeType === Y.ALL;
786
782
  }
787
- return s() && L() || E() ? 4 : L() && n >= u && n <= f && i > f ? 0 : L() && i >= u && i <= f && n < u ? 1 : s() && r >= m && r <= c && o > c ? 2 : s() && o >= m && o <= c && r < m ? 3 : null;
783
+ return s() && P() || E() ? 4 : P() && n >= u && n <= f && i > f ? 0 : P() && i >= u && i <= f && n < u ? 1 : s() && r >= m && r <= c && o > c ? 2 : s() && o >= m && o <= c && r < m ? 3 : null;
788
784
  }
789
785
  function Re(a) {
790
786
  return isNaN(a) ? -1 / 0 : a;
@@ -792,7 +788,7 @@ function Re(a) {
792
788
  function Se(a) {
793
789
  return isNaN(a) ? 1 / 0 : a;
794
790
  }
795
- function Oe(a) {
791
+ function be(a) {
796
792
  const { startRow: e, endRow: n, startColumn: i, endColumn: r } = a;
797
793
  return {
798
794
  ...a,
@@ -890,7 +886,7 @@ function Oi(a, e) {
890
886
  endRow: r,
891
887
  endColumn: m.getColumnCount() - 1,
892
888
  rangeType: Y.ROW
893
- }, L = {
889
+ }, P = {
894
890
  startRow: o,
895
891
  startColumn: 0,
896
892
  endRow: u,
@@ -900,7 +896,7 @@ function Oi(a, e) {
900
896
  return {
901
897
  type: y.MoveRows,
902
898
  from: s,
903
- to: L,
899
+ to: P,
904
900
  unitId: f,
905
901
  sheetId: c
906
902
  };
@@ -919,7 +915,7 @@ function Mi(a, e) {
919
915
  endRow: m.getRowCount() - 1,
920
916
  endColumn: r,
921
917
  rangeType: Y.COLUMN
922
- }, L = {
918
+ }, P = {
923
919
  startRow: 0,
924
920
  startColumn: o,
925
921
  endRow: m.getRowCount() - 1,
@@ -929,7 +925,7 @@ function Mi(a, e) {
929
925
  return {
930
926
  type: y.MoveCols,
931
927
  from: s,
932
- to: L,
928
+ to: P,
933
929
  unitId: f,
934
930
  sheetId: c
935
931
  };
@@ -1073,8 +1069,8 @@ var Hi = Object.getOwnPropertyDescriptor, wi = (a, e, n, i) => {
1073
1069
  for (var r = i > 1 ? void 0 : i ? Hi(e, n) : e, o = a.length - 1, u; o >= 0; o--)
1074
1070
  (u = a[o]) && (r = u(r) || r);
1075
1071
  return r;
1076
- }, ve = (a, e) => (n, i) => e(n, i, a);
1077
- let Qe = class extends ae {
1072
+ }, Ve = (a, e) => (n, i) => e(n, i, a);
1073
+ let $e = class extends ae {
1078
1074
  constructor(a, e, n, i) {
1079
1075
  super(), this._definedNamesService = a, this._univerInstanceService = e, this._sheetInterceptorService = n, this._lexerTreeBuilder = i, this._initialize();
1080
1076
  }
@@ -1119,7 +1115,7 @@ let Qe = class extends ae {
1119
1115
  const { formulaOrRefString: c } = m, s = this._lexerTreeBuilder.sequenceNodesBuilder(c);
1120
1116
  if (s == null)
1121
1117
  return !0;
1122
- let L = !1;
1118
+ let P = !1;
1123
1119
  const E = [];
1124
1120
  for (let d = 0, D = s.length; d < D; d++) {
1125
1121
  const I = s[d];
@@ -1143,7 +1139,7 @@ let Qe = class extends ae {
1143
1139
  } = e;
1144
1140
  if (O == null || M == null || M.length === 0 || Q !== M)
1145
1141
  continue;
1146
- V = ot({
1142
+ V = ut({
1147
1143
  range: h,
1148
1144
  sheetName: O,
1149
1145
  unitId: q
@@ -1158,11 +1154,11 @@ let Qe = class extends ae {
1158
1154
  V != null && (s[d] = {
1159
1155
  ...I,
1160
1156
  token: V
1161
- }, L = !0, E.push(d));
1157
+ }, P = !0, E.push(d));
1162
1158
  }
1163
- if (!L)
1159
+ if (!P)
1164
1160
  return !0;
1165
- const p = ke(va(s, E)), R = {
1161
+ const p = Qe(va(s, E)), R = {
1166
1162
  id: qe.id,
1167
1163
  params: {
1168
1164
  unitId: i,
@@ -1190,18 +1186,18 @@ let Qe = class extends ae {
1190
1186
  return ((o = this._definedNamesService.getWorksheetByRef(e, i)) == null ? void 0 : o.getSheetId()) === n ? j.REF : null;
1191
1187
  }
1192
1188
  };
1193
- Qe = wi([
1194
- ve(0, ht),
1195
- ve(1, Ce),
1196
- ve(2, X(qt)),
1197
- ve(3, X(Ut))
1198
- ], Qe);
1189
+ $e = wi([
1190
+ Ve(0, ht),
1191
+ Ve(1, Ae),
1192
+ Ve(2, X(qt)),
1193
+ Ve(3, X(Ut))
1194
+ ], $e);
1199
1195
  var Ne = /* @__PURE__ */ ((a) => (a[a.NOT_REGISTER = 1] = "NOT_REGISTER", a[a.SUCCESS = 2] = "SUCCESS", a[a.WAIT = 3] = "WAIT", a[a.ERROR = 4] = "ERROR", a))(Ne || {}), Yi = Object.getOwnPropertyDescriptor, Xi = (a, e, n, i) => {
1200
1196
  for (var r = i > 1 ? void 0 : i ? Yi(e, n) : e, o = a.length - 1, u; o >= 0; o--)
1201
1197
  (u = a[o]) && (r = u(r) || r);
1202
1198
  return r;
1203
1199
  }, Pt = (a, e) => (n, i) => e(n, i, a);
1204
- let $e = class extends ae {
1200
+ let je = class extends ae {
1205
1201
  constructor(e, n, i) {
1206
1202
  super();
1207
1203
  W(this, "_formulaCacheMap", /* @__PURE__ */ new Map());
@@ -1223,13 +1219,13 @@ let $e = class extends ae {
1223
1219
  return r || (r = /* @__PURE__ */ new Map(), i.set(n, r)), r;
1224
1220
  }
1225
1221
  _createFormulaId(e, n) {
1226
- return `formula.${e}_${n}_${Ae.generateRandomId(8)}`;
1222
+ return `formula.${e}_${n}_${Me.generateRandomId(8)}`;
1227
1223
  }
1228
1224
  _initFormulaRegister() {
1229
1225
  this._activeDirtyManagerService.register(
1230
- Me.id,
1226
+ Oe.id,
1231
1227
  {
1232
- commandId: Me.id,
1228
+ commandId: Oe.id,
1233
1229
  getDirtyData(n) {
1234
1230
  return {
1235
1231
  dirtyUnitOtherFormulaMap: n.params
@@ -1253,7 +1249,7 @@ let $e = class extends ae {
1253
1249
  };
1254
1250
  this._commandService.executeCommand(Cn.id, c).then(() => {
1255
1251
  this._commandService.executeCommand(
1256
- Me.id,
1252
+ Oe.id,
1257
1253
  { [i]: { [r]: { [u]: !0 } } }
1258
1254
  );
1259
1255
  });
@@ -1272,8 +1268,8 @@ let $e = class extends ae {
1272
1268
  const u = i[o], f = {};
1273
1269
  r[o] = f;
1274
1270
  for (const m in u) {
1275
- const c = this._ensureCacheMap(o, m), s = u[m], L = [];
1276
- f[m] = L;
1271
+ const c = this._ensureCacheMap(o, m), s = u[m], P = [];
1272
+ f[m] = P;
1277
1273
  for (const E in s) {
1278
1274
  const p = s[E];
1279
1275
  if (c.has(E)) {
@@ -1286,7 +1282,7 @@ let $e = class extends ae {
1286
1282
  N.setValue(d, D, I);
1287
1283
  }), R.status = Ne.SUCCESS, R.callbacks.forEach((d) => {
1288
1284
  d(p);
1289
- }), R.callbacks.clear(), L.push(R);
1285
+ }), R.callbacks.clear(), P.push(R);
1290
1286
  }
1291
1287
  }
1292
1288
  }
@@ -1335,17 +1331,17 @@ let $e = class extends ae {
1335
1331
  markFormulaDirty(e, n, i) {
1336
1332
  const r = this.getFormulaValueSync(e, n, i);
1337
1333
  r && (r.status = Ne.WAIT, this._commandService.executeCommand(
1338
- Me.id,
1334
+ Oe.id,
1339
1335
  { [e]: { [n]: { [i]: !0 } } }
1340
1336
  ));
1341
1337
  }
1342
1338
  };
1343
- $e = Xi([
1339
+ je = Xi([
1344
1340
  Pt(0, ce),
1345
1341
  Pt(1, Ft),
1346
1342
  Pt(2, X(Ka))
1347
- ], $e);
1348
- const ge = "sheets-formula.base.config";
1343
+ ], je);
1344
+ const he = "sheets-formula.base.config";
1349
1345
  var Le = /* @__PURE__ */ ((a) => (a[a.FORCED = 0] = "FORCED", a[a.WHEN_EMPTY = 1] = "WHEN_EMPTY", a[a.NO_CALCULATION = 2] = "NO_CALCULATION", a))(Le || {});
1350
1346
  const ua = {}, Wi = "sheets-formula.remote.config", ma = {};
1351
1347
  var Ki = Object.getOwnPropertyDescriptor, ki = (a, e, n, i) => {
@@ -1410,7 +1406,7 @@ let _e = class extends ae {
1410
1406
  }
1411
1407
  _getCalculationMode() {
1412
1408
  var n;
1413
- const e = this._configService.getConfig(ge);
1409
+ const e = this._configService.getConfig(he);
1414
1410
  return (n = e == null ? void 0 : e.initialFormulaComputing) != null ? n : Le.WHEN_EMPTY;
1415
1411
  }
1416
1412
  _commandExecutedListener() {
@@ -1443,8 +1439,8 @@ let _e = class extends ae {
1443
1439
  const c = this._activeDirtyManagerService.get(m.id);
1444
1440
  if (c == null)
1445
1441
  continue;
1446
- const s = c.getDirtyData(m), { dirtyRanges: L, dirtyNameMap: E, dirtyDefinedNameMap: p, dirtyUnitFeatureMap: R, dirtyUnitOtherFormulaMap: S, clearDependencyTreeCache: N } = s;
1447
- L != null && this._mergeDirtyRanges(n, L), E != null && this._mergeDirtyNameMap(i, E), p != null && this._mergeDirtyNameMap(r, p), R != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(o, R), S != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(u, S), N != null && this._mergeDirtyNameMap(f, N);
1442
+ const s = c.getDirtyData(m), { dirtyRanges: P, dirtyNameMap: E, dirtyDefinedNameMap: p, dirtyUnitFeatureMap: R, dirtyUnitOtherFormulaMap: S, clearDependencyTreeCache: N } = s;
1443
+ P != null && this._mergeDirtyRanges(n, P), E != null && this._mergeDirtyNameMap(i, E), p != null && this._mergeDirtyNameMap(r, p), R != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(o, R), S != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(u, S), N != null && this._mergeDirtyNameMap(f, N);
1448
1444
  }
1449
1445
  return {
1450
1446
  dirtyRanges: n,
@@ -1483,8 +1479,8 @@ let _e = class extends ae {
1483
1479
  let r = !1;
1484
1480
  for (const o of e)
1485
1481
  if (i.unitId === o.unitId && i.sheetId === o.sheetId) {
1486
- const { startRow: u, startColumn: f, endRow: m, endColumn: c } = i.range, { startRow: s, startColumn: L, endRow: E, endColumn: p } = o.range;
1487
- if (u === s && f === L && m === E && c === p) {
1482
+ const { startRow: u, startColumn: f, endRow: m, endColumn: c } = i.range, { startRow: s, startColumn: P, endRow: E, endColumn: p } = o.range;
1483
+ if (u === s && f === P && m === E && c === p) {
1488
1484
  r = !0;
1489
1485
  break;
1490
1486
  }
@@ -1526,21 +1522,21 @@ let _e = class extends ae {
1526
1522
  const {
1527
1523
  stage: o
1528
1524
  } = r.stageInfo;
1529
- if (o === Fe.START)
1525
+ if (o === Be.START)
1530
1526
  n === 0 && (this._startExecutionTime = performance.now()), n++, e !== null && (clearTimeout(e), e = null), e = setTimeout(() => {
1531
1527
  e = null, this._startProgress();
1532
1528
  }, 1e3);
1533
- else if (o === Fe.CURRENTLY_CALCULATING) {
1529
+ else if (o === Be.CURRENTLY_CALCULATING) {
1534
1530
  if (this._executionInProgressParams = r.stageInfo, e === null) {
1535
1531
  const u = this._localeService.t("formula.progress.calculating");
1536
1532
  this._calculateProgress(u);
1537
1533
  }
1538
- } else if (o === Fe.START_DEPENDENCY_ARRAY_FORMULA) {
1534
+ } else if (o === Be.START_DEPENDENCY_ARRAY_FORMULA) {
1539
1535
  if (this._executionInProgressParams = r.stageInfo, e === null) {
1540
1536
  const u = this._localeService.t("formula.progress.array-analysis");
1541
1537
  this._calculateProgress(u);
1542
1538
  }
1543
- } else if (o === Fe.CURRENTLY_CALCULATING_ARRAY_FORMULA && (this._executionInProgressParams = r.stageInfo, e === null)) {
1539
+ } else if (o === Be.CURRENTLY_CALCULATING_ARRAY_FORMULA && (this._executionInProgressParams = r.stageInfo, e === null)) {
1544
1540
  const u = this._localeService.t("formula.progress.array-calculation");
1545
1541
  this._calculateProgress(u);
1546
1542
  }
@@ -1548,20 +1544,20 @@ let _e = class extends ae {
1548
1544
  const o = r.functionsExecutedState;
1549
1545
  let u = "";
1550
1546
  switch (n--, o) {
1551
- case be.NOT_EXECUTED:
1547
+ case De.NOT_EXECUTED:
1552
1548
  u = "No tasks are being executed anymore", this._resetExecutingDirtyData();
1553
1549
  break;
1554
- case be.STOP_EXECUTION:
1550
+ case De.STOP_EXECUTION:
1555
1551
  u = "The execution of the formula has been stopped", n = 0;
1556
1552
  break;
1557
- case be.SUCCESS:
1553
+ case De.SUCCESS:
1558
1554
  u = "Formula calculation succeeded", (n === 0 || n === -1) && (u += `. Total time consumed: ${performance.now() - this._startExecutionTime} ms`), this._resetExecutingDirtyData();
1559
1555
  break;
1560
- case be.INITIAL:
1556
+ case De.INITIAL:
1561
1557
  u = "Waiting for calculation", this._resetExecutingDirtyData();
1562
1558
  break;
1563
1559
  }
1564
- (n === 0 || n === -1) && (e ? (clearTimeout(e), e = null, this.clearProgress()) : this._completeProgress(), n = 0, this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._forceCalculating = !1), o === be.STOP_EXECUTION && this._restartCalculation ? (this._restartCalculation = !1, this._commandService.executeCommand(
1560
+ (n === 0 || n === -1) && (e ? (clearTimeout(e), e = null, this.clearProgress()) : this._completeProgress(), n = 0, this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._forceCalculating = !1), o === De.STOP_EXECUTION && this._restartCalculation ? (this._restartCalculation = !1, this._commandService.executeCommand(
1565
1561
  Ie.id,
1566
1562
  {
1567
1563
  ...this._executingDirtyData
@@ -1605,10 +1601,10 @@ _e = ki([
1605
1601
  de(0, ce),
1606
1602
  de(1, Ft),
1607
1603
  de(2, ka),
1608
- de(3, De),
1609
- de(4, X(ut)),
1604
+ de(3, Ce),
1605
+ de(4, X(mt)),
1610
1606
  de(5, X(_t)),
1611
- de(6, X($e))
1607
+ de(6, X(je))
1612
1608
  ], _e);
1613
1609
  function Xr(a, e, n, i) {
1614
1610
  const r = a.get(bn), o = a.get(On), u = a.get(Mn), f = a.get(xn);
@@ -1635,7 +1631,7 @@ var Qi = Object.getOwnPropertyDescriptor, $i = (a, e, n, i) => {
1635
1631
  (u = a[o]) && (r = u(r) || r);
1636
1632
  return r;
1637
1633
  }, me = (a, e) => (n, i) => e(n, i, a);
1638
- let je = class extends ae {
1634
+ let ze = class extends ae {
1639
1635
  constructor(a, e, n, i, r, o, u, f) {
1640
1636
  super(), this._univerInstanceService = a, this._commandService = e, this._lexerTreeBuilder = n, this._formulaDataModel = i, this._sheetInterceptorService = r, this._definedNamesService = o, this._configService = u, this._injector = f, this._commandExecutedListener();
1641
1637
  }
@@ -1682,7 +1678,7 @@ let je = class extends ae {
1682
1678
  fromFormula: !0
1683
1679
  }
1684
1680
  ), this._formulaDataModel.updateArrayFormulaCellData(n, e, i), this._formulaDataModel.updateArrayFormulaRange(n, e, i), this._commandService.executeCommand(
1685
- Be.id,
1681
+ ve.id,
1686
1682
  {
1687
1683
  formulaData: o
1688
1684
  },
@@ -1705,7 +1701,7 @@ let je = class extends ae {
1705
1701
  _handleWorkbookDisposed(a, e) {
1706
1702
  const n = this._formulaDataModel.getFormulaData(), i = dt(n, a, e), r = this._formulaDataModel.getArrayFormulaRange(), o = dt(r, a, e), u = this._formulaDataModel.getArrayFormulaCellData(), f = dt(u, a, e);
1707
1703
  i && this._commandService.executeCommand(
1708
- Be.id,
1704
+ ve.id,
1709
1705
  {
1710
1706
  formulaData: i
1711
1707
  },
@@ -1726,7 +1722,7 @@ let je = class extends ae {
1726
1722
  _handleInsertSheetMutation(a) {
1727
1723
  const { sheet: e, unitId: n } = a, i = this._formulaDataModel.getFormulaData(), { id: r, cellData: o } = e, u = new G(o), f = ta(i, n, r, u);
1728
1724
  this._commandService.executeCommand(
1729
- Be.id,
1725
+ ve.id,
1730
1726
  {
1731
1727
  formulaData: f
1732
1728
  },
@@ -1740,10 +1736,10 @@ let je = class extends ae {
1740
1736
  const e = {}, n = a.getUnitId(), i = { [n]: {} };
1741
1737
  a.getSheets().forEach((c) => {
1742
1738
  var p;
1743
- const s = c.getCellMatrix(), L = c.getSheetId(), E = ta(e, n, L, s);
1744
- i[n][L] = (p = E[n]) == null ? void 0 : p[L];
1745
- }), this._commandService.executeCommand(Be.id, { formulaData: i }, { onlyLocal: !0 });
1746
- const o = this._configService.getConfig(ge), u = (m = o == null ? void 0 : o.initialFormulaComputing) != null ? m : Le.WHEN_EMPTY, f = this._getDirtyDataByCalculationMode(u);
1739
+ const s = c.getCellMatrix(), P = c.getSheetId(), E = ta(e, n, P, s);
1740
+ i[n][P] = (p = E[n]) == null ? void 0 : p[P];
1741
+ }), this._commandService.executeCommand(ve.id, { formulaData: i }, { onlyLocal: !0 });
1742
+ const o = this._configService.getConfig(he), u = (m = o == null ? void 0 : o.initialFormulaComputing) != null ? m : Le.WHEN_EMPTY, f = this._getDirtyDataByCalculationMode(u);
1747
1743
  this._commandService.executeCommand(Ie.id, f, { onlyLocal: !0 });
1748
1744
  }
1749
1745
  _getDirtyDataByCalculationMode(a) {
@@ -1784,7 +1780,7 @@ let je = class extends ae {
1784
1780
  }
1785
1781
  // eslint-disable-next-line max-lines-per-function
1786
1782
  _getFormulaReferenceMoveInfo(a, e, n) {
1787
- if (!Ae.isDefine(a)) return { newFormulaData: {}, oldFormulaData: {} };
1783
+ if (!Me.isDefine(a)) return { newFormulaData: {}, oldFormulaData: {} };
1788
1784
  const i = Object.keys(a);
1789
1785
  if (i.length === 0) return { newFormulaData: {}, oldFormulaData: {} };
1790
1786
  const r = {}, o = {};
@@ -1793,9 +1789,9 @@ let je = class extends ae {
1793
1789
  if (f == null)
1794
1790
  continue;
1795
1791
  const m = Object.keys(f);
1796
- Ae.isDefine(r[u]) || (r[u] = {}), Ae.isDefine(o[u]) || (o[u] = {});
1792
+ Me.isDefine(r[u]) || (r[u] = {}), Me.isDefine(o[u]) || (o[u] = {});
1797
1793
  for (const c of m) {
1798
- const s = new G(f[c] || {}), L = new G();
1794
+ const s = new G(f[c] || {}), P = new G();
1799
1795
  s.forValue((E, p, R) => {
1800
1796
  var B;
1801
1797
  if (!R) return !0;
@@ -1833,7 +1829,7 @@ let je = class extends ae {
1833
1829
  z
1834
1830
  ))
1835
1831
  continue;
1836
- const he = {
1832
+ const Ue = {
1837
1833
  range: ne,
1838
1834
  sheetId: z,
1839
1835
  unitId: k,
@@ -1850,7 +1846,7 @@ let je = class extends ae {
1850
1846
  } = n;
1851
1847
  if (le == null || z == null || z.length === 0 || Ee !== z)
1852
1848
  continue;
1853
- ue = ot({
1849
+ ue = ut({
1854
1850
  range: ne,
1855
1851
  sheetName: le,
1856
1852
  unitId: k
@@ -1865,38 +1861,38 @@ let je = class extends ae {
1865
1861
  continue;
1866
1862
  ue = j.REF;
1867
1863
  } else O !== y.SetDefinedName && (ue = Va(
1868
- he,
1864
+ Ue,
1869
1865
  n,
1870
1866
  u,
1871
1867
  c
1872
1868
  ));
1873
- ue != null && (I[q] = {
1869
+ ue != null ? (I[q] = {
1874
1870
  ...U,
1875
1871
  token: ue
1876
- }, T = !0, g.push(q));
1872
+ }, T = !0, g.push(q)) : O === y.MoveRange && D && (T = !0);
1877
1873
  }
1878
1874
  if (!T)
1879
1875
  return !0;
1880
1876
  const h = va(I, g, N, d);
1881
- L.setValue(E, p, {
1882
- f: `=${ke(h)}`
1877
+ P.setValue(E, p, {
1878
+ f: `=${Qe(h)}`
1883
1879
  });
1884
- }), o[u] && (o[u][c] = L.getData());
1880
+ }), o[u] && (o[u][c] = P.getData());
1885
1881
  }
1886
1882
  }
1887
1883
  return { newFormulaData: o };
1888
1884
  }
1889
1885
  };
1890
- je = $i([
1891
- me(0, Ce),
1886
+ ze = $i([
1887
+ me(0, Ae),
1892
1888
  me(1, ce),
1893
1889
  me(2, X(Ut)),
1894
- me(3, X(ut)),
1890
+ me(3, X(mt)),
1895
1891
  me(4, X(qt)),
1896
1892
  me(5, ht),
1897
- me(6, De),
1898
- me(7, X(rt))
1899
- ], je);
1893
+ me(6, Ce),
1894
+ me(7, X(ot))
1895
+ ], ze);
1900
1896
  const ji = [
1901
1897
  {
1902
1898
  functionName: aa.ARRAY_CONSTRAIN,
@@ -9330,7 +9326,7 @@ const ji = [
9330
9326
  }
9331
9327
  ], or = [
9332
9328
  {
9333
- functionName: P.ABS,
9329
+ functionName: L.ABS,
9334
9330
  functionType: t.Math,
9335
9331
  description: "formula.functionList.ABS.description",
9336
9332
  abstract: "formula.functionList.ABS.abstract",
@@ -9345,7 +9341,7 @@ const ji = [
9345
9341
  ]
9346
9342
  },
9347
9343
  {
9348
- functionName: P.ACOS,
9344
+ functionName: L.ACOS,
9349
9345
  functionType: t.Math,
9350
9346
  description: "formula.functionList.ACOS.description",
9351
9347
  abstract: "formula.functionList.ACOS.abstract",
@@ -9360,7 +9356,7 @@ const ji = [
9360
9356
  ]
9361
9357
  },
9362
9358
  {
9363
- functionName: P.ACOSH,
9359
+ functionName: L.ACOSH,
9364
9360
  functionType: t.Math,
9365
9361
  description: "formula.functionList.ACOSH.description",
9366
9362
  abstract: "formula.functionList.ACOSH.abstract",
@@ -9375,7 +9371,7 @@ const ji = [
9375
9371
  ]
9376
9372
  },
9377
9373
  {
9378
- functionName: P.ACOT,
9374
+ functionName: L.ACOT,
9379
9375
  functionType: t.Math,
9380
9376
  description: "formula.functionList.ACOT.description",
9381
9377
  abstract: "formula.functionList.ACOT.abstract",
@@ -9390,7 +9386,7 @@ const ji = [
9390
9386
  ]
9391
9387
  },
9392
9388
  {
9393
- functionName: P.ACOTH,
9389
+ functionName: L.ACOTH,
9394
9390
  functionType: t.Math,
9395
9391
  description: "formula.functionList.ACOTH.description",
9396
9392
  abstract: "formula.functionList.ACOTH.abstract",
@@ -9405,7 +9401,7 @@ const ji = [
9405
9401
  ]
9406
9402
  },
9407
9403
  {
9408
- functionName: P.AGGREGATE,
9404
+ functionName: L.AGGREGATE,
9409
9405
  functionType: t.Math,
9410
9406
  description: "formula.functionList.AGGREGATE.description",
9411
9407
  abstract: "formula.functionList.AGGREGATE.abstract",
@@ -9427,7 +9423,7 @@ const ji = [
9427
9423
  ]
9428
9424
  },
9429
9425
  {
9430
- functionName: P.ARABIC,
9426
+ functionName: L.ARABIC,
9431
9427
  functionType: t.Math,
9432
9428
  description: "formula.functionList.ARABIC.description",
9433
9429
  abstract: "formula.functionList.ARABIC.abstract",
@@ -9442,7 +9438,7 @@ const ji = [
9442
9438
  ]
9443
9439
  },
9444
9440
  {
9445
- functionName: P.ASIN,
9441
+ functionName: L.ASIN,
9446
9442
  functionType: t.Math,
9447
9443
  description: "formula.functionList.ASIN.description",
9448
9444
  abstract: "formula.functionList.ASIN.abstract",
@@ -9457,7 +9453,7 @@ const ji = [
9457
9453
  ]
9458
9454
  },
9459
9455
  {
9460
- functionName: P.ASINH,
9456
+ functionName: L.ASINH,
9461
9457
  functionType: t.Math,
9462
9458
  description: "formula.functionList.ASINH.description",
9463
9459
  abstract: "formula.functionList.ASINH.abstract",
@@ -9472,7 +9468,7 @@ const ji = [
9472
9468
  ]
9473
9469
  },
9474
9470
  {
9475
- functionName: P.ATAN,
9471
+ functionName: L.ATAN,
9476
9472
  functionType: t.Math,
9477
9473
  description: "formula.functionList.ATAN.description",
9478
9474
  abstract: "formula.functionList.ATAN.abstract",
@@ -9487,7 +9483,7 @@ const ji = [
9487
9483
  ]
9488
9484
  },
9489
9485
  {
9490
- functionName: P.ATAN2,
9486
+ functionName: L.ATAN2,
9491
9487
  functionType: t.Math,
9492
9488
  description: "formula.functionList.ATAN2.description",
9493
9489
  abstract: "formula.functionList.ATAN2.abstract",
@@ -9509,7 +9505,7 @@ const ji = [
9509
9505
  ]
9510
9506
  },
9511
9507
  {
9512
- functionName: P.ATANH,
9508
+ functionName: L.ATANH,
9513
9509
  functionType: t.Math,
9514
9510
  description: "formula.functionList.ATANH.description",
9515
9511
  abstract: "formula.functionList.ATANH.abstract",
@@ -9524,7 +9520,7 @@ const ji = [
9524
9520
  ]
9525
9521
  },
9526
9522
  {
9527
- functionName: P.BASE,
9523
+ functionName: L.BASE,
9528
9524
  functionType: t.Math,
9529
9525
  description: "formula.functionList.BASE.description",
9530
9526
  abstract: "formula.functionList.BASE.abstract",
@@ -9553,7 +9549,7 @@ const ji = [
9553
9549
  ]
9554
9550
  },
9555
9551
  {
9556
- functionName: P.CEILING,
9552
+ functionName: L.CEILING,
9557
9553
  functionType: t.Math,
9558
9554
  description: "formula.functionList.CEILING.description",
9559
9555
  abstract: "formula.functionList.CEILING.abstract",
@@ -9575,7 +9571,7 @@ const ji = [
9575
9571
  ]
9576
9572
  },
9577
9573
  {
9578
- functionName: P.CEILING_MATH,
9574
+ functionName: L.CEILING_MATH,
9579
9575
  functionType: t.Math,
9580
9576
  description: "formula.functionList.CEILING_MATH.description",
9581
9577
  abstract: "formula.functionList.CEILING_MATH.abstract",
@@ -9604,7 +9600,7 @@ const ji = [
9604
9600
  ]
9605
9601
  },
9606
9602
  {
9607
- functionName: P.CEILING_PRECISE,
9603
+ functionName: L.CEILING_PRECISE,
9608
9604
  functionType: t.Math,
9609
9605
  description: "formula.functionList.CEILING_PRECISE.description",
9610
9606
  abstract: "formula.functionList.CEILING_PRECISE.abstract",
@@ -9626,7 +9622,7 @@ const ji = [
9626
9622
  ]
9627
9623
  },
9628
9624
  {
9629
- functionName: P.COMBIN,
9625
+ functionName: L.COMBIN,
9630
9626
  functionType: t.Math,
9631
9627
  description: "formula.functionList.COMBIN.description",
9632
9628
  abstract: "formula.functionList.COMBIN.abstract",
@@ -9648,7 +9644,7 @@ const ji = [
9648
9644
  ]
9649
9645
  },
9650
9646
  {
9651
- functionName: P.COMBINA,
9647
+ functionName: L.COMBINA,
9652
9648
  functionType: t.Math,
9653
9649
  description: "formula.functionList.COMBINA.description",
9654
9650
  abstract: "formula.functionList.COMBINA.abstract",
@@ -9670,7 +9666,7 @@ const ji = [
9670
9666
  ]
9671
9667
  },
9672
9668
  {
9673
- functionName: P.COS,
9669
+ functionName: L.COS,
9674
9670
  functionType: t.Math,
9675
9671
  description: "formula.functionList.COS.description",
9676
9672
  abstract: "formula.functionList.COS.abstract",
@@ -9685,7 +9681,7 @@ const ji = [
9685
9681
  ]
9686
9682
  },
9687
9683
  {
9688
- functionName: P.COSH,
9684
+ functionName: L.COSH,
9689
9685
  functionType: t.Math,
9690
9686
  description: "formula.functionList.COSH.description",
9691
9687
  abstract: "formula.functionList.COSH.abstract",
@@ -9700,7 +9696,7 @@ const ji = [
9700
9696
  ]
9701
9697
  },
9702
9698
  {
9703
- functionName: P.COT,
9699
+ functionName: L.COT,
9704
9700
  functionType: t.Math,
9705
9701
  description: "formula.functionList.COT.description",
9706
9702
  abstract: "formula.functionList.COT.abstract",
@@ -9715,7 +9711,7 @@ const ji = [
9715
9711
  ]
9716
9712
  },
9717
9713
  {
9718
- functionName: P.COTH,
9714
+ functionName: L.COTH,
9719
9715
  functionType: t.Math,
9720
9716
  description: "formula.functionList.COTH.description",
9721
9717
  abstract: "formula.functionList.COTH.abstract",
@@ -9730,7 +9726,7 @@ const ji = [
9730
9726
  ]
9731
9727
  },
9732
9728
  {
9733
- functionName: P.CSC,
9729
+ functionName: L.CSC,
9734
9730
  functionType: t.Math,
9735
9731
  description: "formula.functionList.CSC.description",
9736
9732
  abstract: "formula.functionList.CSC.abstract",
@@ -9745,7 +9741,7 @@ const ji = [
9745
9741
  ]
9746
9742
  },
9747
9743
  {
9748
- functionName: P.CSCH,
9744
+ functionName: L.CSCH,
9749
9745
  functionType: t.Math,
9750
9746
  description: "formula.functionList.CSCH.description",
9751
9747
  abstract: "formula.functionList.CSCH.abstract",
@@ -9760,7 +9756,7 @@ const ji = [
9760
9756
  ]
9761
9757
  },
9762
9758
  {
9763
- functionName: P.DECIMAL,
9759
+ functionName: L.DECIMAL,
9764
9760
  functionType: t.Math,
9765
9761
  description: "formula.functionList.DECIMAL.description",
9766
9762
  abstract: "formula.functionList.DECIMAL.abstract",
@@ -9782,7 +9778,7 @@ const ji = [
9782
9778
  ]
9783
9779
  },
9784
9780
  {
9785
- functionName: P.DEGREES,
9781
+ functionName: L.DEGREES,
9786
9782
  functionType: t.Math,
9787
9783
  description: "formula.functionList.DEGREES.description",
9788
9784
  abstract: "formula.functionList.DEGREES.abstract",
@@ -9797,7 +9793,7 @@ const ji = [
9797
9793
  ]
9798
9794
  },
9799
9795
  {
9800
- functionName: P.EVEN,
9796
+ functionName: L.EVEN,
9801
9797
  functionType: t.Math,
9802
9798
  description: "formula.functionList.EVEN.description",
9803
9799
  abstract: "formula.functionList.EVEN.abstract",
@@ -9812,7 +9808,7 @@ const ji = [
9812
9808
  ]
9813
9809
  },
9814
9810
  {
9815
- functionName: P.EXP,
9811
+ functionName: L.EXP,
9816
9812
  functionType: t.Math,
9817
9813
  description: "formula.functionList.EXP.description",
9818
9814
  abstract: "formula.functionList.EXP.abstract",
@@ -9827,7 +9823,7 @@ const ji = [
9827
9823
  ]
9828
9824
  },
9829
9825
  {
9830
- functionName: P.FACT,
9826
+ functionName: L.FACT,
9831
9827
  functionType: t.Math,
9832
9828
  description: "formula.functionList.FACT.description",
9833
9829
  abstract: "formula.functionList.FACT.abstract",
@@ -9842,7 +9838,7 @@ const ji = [
9842
9838
  ]
9843
9839
  },
9844
9840
  {
9845
- functionName: P.FACTDOUBLE,
9841
+ functionName: L.FACTDOUBLE,
9846
9842
  functionType: t.Math,
9847
9843
  description: "formula.functionList.FACTDOUBLE.description",
9848
9844
  abstract: "formula.functionList.FACTDOUBLE.abstract",
@@ -9857,7 +9853,7 @@ const ji = [
9857
9853
  ]
9858
9854
  },
9859
9855
  {
9860
- functionName: P.FLOOR,
9856
+ functionName: L.FLOOR,
9861
9857
  functionType: t.Math,
9862
9858
  description: "formula.functionList.FLOOR.description",
9863
9859
  abstract: "formula.functionList.FLOOR.abstract",
@@ -9879,7 +9875,7 @@ const ji = [
9879
9875
  ]
9880
9876
  },
9881
9877
  {
9882
- functionName: P.FLOOR_MATH,
9878
+ functionName: L.FLOOR_MATH,
9883
9879
  functionType: t.Math,
9884
9880
  description: "formula.functionList.FLOOR_MATH.description",
9885
9881
  abstract: "formula.functionList.FLOOR_MATH.abstract",
@@ -9908,7 +9904,7 @@ const ji = [
9908
9904
  ]
9909
9905
  },
9910
9906
  {
9911
- functionName: P.FLOOR_PRECISE,
9907
+ functionName: L.FLOOR_PRECISE,
9912
9908
  functionType: t.Math,
9913
9909
  description: "formula.functionList.FLOOR_PRECISE.description",
9914
9910
  abstract: "formula.functionList.FLOOR_PRECISE.abstract",
@@ -9930,7 +9926,7 @@ const ji = [
9930
9926
  ]
9931
9927
  },
9932
9928
  {
9933
- functionName: P.GCD,
9929
+ functionName: L.GCD,
9934
9930
  functionType: t.Math,
9935
9931
  description: "formula.functionList.GCD.description",
9936
9932
  abstract: "formula.functionList.GCD.abstract",
@@ -9952,7 +9948,7 @@ const ji = [
9952
9948
  ]
9953
9949
  },
9954
9950
  {
9955
- functionName: P.INT,
9951
+ functionName: L.INT,
9956
9952
  functionType: t.Math,
9957
9953
  description: "formula.functionList.INT.description",
9958
9954
  abstract: "formula.functionList.INT.abstract",
@@ -9967,7 +9963,7 @@ const ji = [
9967
9963
  ]
9968
9964
  },
9969
9965
  {
9970
- functionName: P.ISO_CEILING,
9966
+ functionName: L.ISO_CEILING,
9971
9967
  functionType: t.Math,
9972
9968
  description: "formula.functionList.ISO_CEILING.description",
9973
9969
  abstract: "formula.functionList.ISO_CEILING.abstract",
@@ -9989,7 +9985,7 @@ const ji = [
9989
9985
  ]
9990
9986
  },
9991
9987
  {
9992
- functionName: P.LCM,
9988
+ functionName: L.LCM,
9993
9989
  functionType: t.Math,
9994
9990
  description: "formula.functionList.LCM.description",
9995
9991
  abstract: "formula.functionList.LCM.abstract",
@@ -10011,7 +10007,7 @@ const ji = [
10011
10007
  ]
10012
10008
  },
10013
10009
  {
10014
- functionName: P.LET,
10010
+ functionName: L.LET,
10015
10011
  functionType: t.Math,
10016
10012
  description: "formula.functionList.LET.description",
10017
10013
  abstract: "formula.functionList.LET.abstract",
@@ -10033,7 +10029,7 @@ const ji = [
10033
10029
  ]
10034
10030
  },
10035
10031
  {
10036
- functionName: P.LN,
10032
+ functionName: L.LN,
10037
10033
  functionType: t.Math,
10038
10034
  description: "formula.functionList.LN.description",
10039
10035
  abstract: "formula.functionList.LN.abstract",
@@ -10048,7 +10044,7 @@ const ji = [
10048
10044
  ]
10049
10045
  },
10050
10046
  {
10051
- functionName: P.LOG,
10047
+ functionName: L.LOG,
10052
10048
  functionType: t.Math,
10053
10049
  description: "formula.functionList.LOG.description",
10054
10050
  abstract: "formula.functionList.LOG.abstract",
@@ -10070,7 +10066,7 @@ const ji = [
10070
10066
  ]
10071
10067
  },
10072
10068
  {
10073
- functionName: P.LOG10,
10069
+ functionName: L.LOG10,
10074
10070
  functionType: t.Math,
10075
10071
  description: "formula.functionList.LOG10.description",
10076
10072
  abstract: "formula.functionList.LOG10.abstract",
@@ -10085,7 +10081,7 @@ const ji = [
10085
10081
  ]
10086
10082
  },
10087
10083
  {
10088
- functionName: P.MDETERM,
10084
+ functionName: L.MDETERM,
10089
10085
  functionType: t.Math,
10090
10086
  description: "formula.functionList.MDETERM.description",
10091
10087
  abstract: "formula.functionList.MDETERM.abstract",
@@ -10100,7 +10096,7 @@ const ji = [
10100
10096
  ]
10101
10097
  },
10102
10098
  {
10103
- functionName: P.MINVERSE,
10099
+ functionName: L.MINVERSE,
10104
10100
  functionType: t.Math,
10105
10101
  description: "formula.functionList.MINVERSE.description",
10106
10102
  abstract: "formula.functionList.MINVERSE.abstract",
@@ -10115,7 +10111,7 @@ const ji = [
10115
10111
  ]
10116
10112
  },
10117
10113
  {
10118
- functionName: P.MMULT,
10114
+ functionName: L.MMULT,
10119
10115
  functionType: t.Math,
10120
10116
  description: "formula.functionList.MMULT.description",
10121
10117
  abstract: "formula.functionList.MMULT.abstract",
@@ -10137,7 +10133,7 @@ const ji = [
10137
10133
  ]
10138
10134
  },
10139
10135
  {
10140
- functionName: P.MOD,
10136
+ functionName: L.MOD,
10141
10137
  functionType: t.Math,
10142
10138
  description: "formula.functionList.MOD.description",
10143
10139
  abstract: "formula.functionList.MOD.abstract",
@@ -10159,7 +10155,7 @@ const ji = [
10159
10155
  ]
10160
10156
  },
10161
10157
  {
10162
- functionName: P.MROUND,
10158
+ functionName: L.MROUND,
10163
10159
  functionType: t.Math,
10164
10160
  description: "formula.functionList.MROUND.description",
10165
10161
  abstract: "formula.functionList.MROUND.abstract",
@@ -10181,7 +10177,7 @@ const ji = [
10181
10177
  ]
10182
10178
  },
10183
10179
  {
10184
- functionName: P.MULTINOMIAL,
10180
+ functionName: L.MULTINOMIAL,
10185
10181
  functionType: t.Math,
10186
10182
  description: "formula.functionList.MULTINOMIAL.description",
10187
10183
  abstract: "formula.functionList.MULTINOMIAL.abstract",
@@ -10203,7 +10199,7 @@ const ji = [
10203
10199
  ]
10204
10200
  },
10205
10201
  {
10206
- functionName: P.MUNIT,
10202
+ functionName: L.MUNIT,
10207
10203
  functionType: t.Math,
10208
10204
  description: "formula.functionList.MUNIT.description",
10209
10205
  abstract: "formula.functionList.MUNIT.abstract",
@@ -10218,7 +10214,7 @@ const ji = [
10218
10214
  ]
10219
10215
  },
10220
10216
  {
10221
- functionName: P.ODD,
10217
+ functionName: L.ODD,
10222
10218
  functionType: t.Math,
10223
10219
  description: "formula.functionList.ODD.description",
10224
10220
  abstract: "formula.functionList.ODD.abstract",
@@ -10233,14 +10229,14 @@ const ji = [
10233
10229
  ]
10234
10230
  },
10235
10231
  {
10236
- functionName: P.PI,
10232
+ functionName: L.PI,
10237
10233
  functionType: t.Math,
10238
10234
  description: "formula.functionList.PI.description",
10239
10235
  abstract: "formula.functionList.PI.abstract",
10240
10236
  functionParameter: []
10241
10237
  },
10242
10238
  {
10243
- functionName: P.POWER,
10239
+ functionName: L.POWER,
10244
10240
  functionType: t.Math,
10245
10241
  description: "formula.functionList.POWER.description",
10246
10242
  abstract: "formula.functionList.POWER.abstract",
@@ -10262,7 +10258,7 @@ const ji = [
10262
10258
  ]
10263
10259
  },
10264
10260
  {
10265
- functionName: P.PRODUCT,
10261
+ functionName: L.PRODUCT,
10266
10262
  functionType: t.Math,
10267
10263
  description: "formula.functionList.PRODUCT.description",
10268
10264
  abstract: "formula.functionList.PRODUCT.abstract",
@@ -10284,7 +10280,7 @@ const ji = [
10284
10280
  ]
10285
10281
  },
10286
10282
  {
10287
- functionName: P.QUOTIENT,
10283
+ functionName: L.QUOTIENT,
10288
10284
  functionType: t.Math,
10289
10285
  description: "formula.functionList.QUOTIENT.description",
10290
10286
  abstract: "formula.functionList.QUOTIENT.abstract",
@@ -10306,7 +10302,7 @@ const ji = [
10306
10302
  ]
10307
10303
  },
10308
10304
  {
10309
- functionName: P.RADIANS,
10305
+ functionName: L.RADIANS,
10310
10306
  functionType: t.Math,
10311
10307
  description: "formula.functionList.RADIANS.description",
10312
10308
  abstract: "formula.functionList.RADIANS.abstract",
@@ -10321,14 +10317,14 @@ const ji = [
10321
10317
  ]
10322
10318
  },
10323
10319
  {
10324
- functionName: P.RAND,
10320
+ functionName: L.RAND,
10325
10321
  functionType: t.Math,
10326
10322
  description: "formula.functionList.RAND.description",
10327
10323
  abstract: "formula.functionList.RAND.abstract",
10328
10324
  functionParameter: []
10329
10325
  },
10330
10326
  {
10331
- functionName: P.RANDARRAY,
10327
+ functionName: L.RANDARRAY,
10332
10328
  functionType: t.Math,
10333
10329
  description: "formula.functionList.RANDARRAY.description",
10334
10330
  abstract: "formula.functionList.RANDARRAY.abstract",
@@ -10371,7 +10367,7 @@ const ji = [
10371
10367
  ]
10372
10368
  },
10373
10369
  {
10374
- functionName: P.RANDBETWEEN,
10370
+ functionName: L.RANDBETWEEN,
10375
10371
  functionType: t.Math,
10376
10372
  description: "formula.functionList.RANDBETWEEN.description",
10377
10373
  abstract: "formula.functionList.RANDBETWEEN.abstract",
@@ -10393,7 +10389,7 @@ const ji = [
10393
10389
  ]
10394
10390
  },
10395
10391
  {
10396
- functionName: P.ROMAN,
10392
+ functionName: L.ROMAN,
10397
10393
  functionType: t.Math,
10398
10394
  description: "formula.functionList.ROMAN.description",
10399
10395
  abstract: "formula.functionList.ROMAN.abstract",
@@ -10415,7 +10411,7 @@ const ji = [
10415
10411
  ]
10416
10412
  },
10417
10413
  {
10418
- functionName: P.ROUND,
10414
+ functionName: L.ROUND,
10419
10415
  functionType: t.Math,
10420
10416
  description: "formula.functionList.ROUND.description",
10421
10417
  abstract: "formula.functionList.ROUND.abstract",
@@ -10437,7 +10433,7 @@ const ji = [
10437
10433
  ]
10438
10434
  },
10439
10435
  {
10440
- functionName: P.ROUNDBANK,
10436
+ functionName: L.ROUNDBANK,
10441
10437
  functionType: t.Math,
10442
10438
  description: "formula.functionList.ROUNDBANK.description",
10443
10439
  abstract: "formula.functionList.ROUNDBANK.abstract",
@@ -10459,7 +10455,7 @@ const ji = [
10459
10455
  ]
10460
10456
  },
10461
10457
  {
10462
- functionName: P.ROUNDDOWN,
10458
+ functionName: L.ROUNDDOWN,
10463
10459
  functionType: t.Math,
10464
10460
  description: "formula.functionList.ROUNDDOWN.description",
10465
10461
  abstract: "formula.functionList.ROUNDDOWN.abstract",
@@ -10481,7 +10477,7 @@ const ji = [
10481
10477
  ]
10482
10478
  },
10483
10479
  {
10484
- functionName: P.ROUNDUP,
10480
+ functionName: L.ROUNDUP,
10485
10481
  functionType: t.Math,
10486
10482
  description: "formula.functionList.ROUNDUP.description",
10487
10483
  abstract: "formula.functionList.ROUNDUP.abstract",
@@ -10503,7 +10499,7 @@ const ji = [
10503
10499
  ]
10504
10500
  },
10505
10501
  {
10506
- functionName: P.SEC,
10502
+ functionName: L.SEC,
10507
10503
  functionType: t.Math,
10508
10504
  description: "formula.functionList.SEC.description",
10509
10505
  abstract: "formula.functionList.SEC.abstract",
@@ -10518,7 +10514,7 @@ const ji = [
10518
10514
  ]
10519
10515
  },
10520
10516
  {
10521
- functionName: P.SECH,
10517
+ functionName: L.SECH,
10522
10518
  functionType: t.Math,
10523
10519
  description: "formula.functionList.SECH.description",
10524
10520
  abstract: "formula.functionList.SECH.abstract",
@@ -10533,7 +10529,7 @@ const ji = [
10533
10529
  ]
10534
10530
  },
10535
10531
  {
10536
- functionName: P.SERIESSUM,
10532
+ functionName: L.SERIESSUM,
10537
10533
  functionType: t.Math,
10538
10534
  description: "formula.functionList.SERIESSUM.description",
10539
10535
  abstract: "formula.functionList.SERIESSUM.abstract",
@@ -10569,7 +10565,7 @@ const ji = [
10569
10565
  ]
10570
10566
  },
10571
10567
  {
10572
- functionName: P.SEQUENCE,
10568
+ functionName: L.SEQUENCE,
10573
10569
  functionType: t.Math,
10574
10570
  description: "formula.functionList.SEQUENCE.description",
10575
10571
  abstract: "formula.functionList.SEQUENCE.abstract",
@@ -10605,7 +10601,7 @@ const ji = [
10605
10601
  ]
10606
10602
  },
10607
10603
  {
10608
- functionName: P.SIGN,
10604
+ functionName: L.SIGN,
10609
10605
  functionType: t.Math,
10610
10606
  description: "formula.functionList.SIGN.description",
10611
10607
  abstract: "formula.functionList.SIGN.abstract",
@@ -10620,7 +10616,7 @@ const ji = [
10620
10616
  ]
10621
10617
  },
10622
10618
  {
10623
- functionName: P.SIN,
10619
+ functionName: L.SIN,
10624
10620
  functionType: t.Math,
10625
10621
  description: "formula.functionList.SIN.description",
10626
10622
  abstract: "formula.functionList.SIN.abstract",
@@ -10635,7 +10631,7 @@ const ji = [
10635
10631
  ]
10636
10632
  },
10637
10633
  {
10638
- functionName: P.SINH,
10634
+ functionName: L.SINH,
10639
10635
  functionType: t.Math,
10640
10636
  description: "formula.functionList.SINH.description",
10641
10637
  abstract: "formula.functionList.SINH.abstract",
@@ -10650,7 +10646,7 @@ const ji = [
10650
10646
  ]
10651
10647
  },
10652
10648
  {
10653
- functionName: P.SQRT,
10649
+ functionName: L.SQRT,
10654
10650
  functionType: t.Math,
10655
10651
  description: "formula.functionList.SQRT.description",
10656
10652
  abstract: "formula.functionList.SQRT.abstract",
@@ -10665,7 +10661,7 @@ const ji = [
10665
10661
  ]
10666
10662
  },
10667
10663
  {
10668
- functionName: P.SQRTPI,
10664
+ functionName: L.SQRTPI,
10669
10665
  functionType: t.Math,
10670
10666
  description: "formula.functionList.SQRTPI.description",
10671
10667
  abstract: "formula.functionList.SQRTPI.abstract",
@@ -10680,7 +10676,7 @@ const ji = [
10680
10676
  ]
10681
10677
  },
10682
10678
  {
10683
- functionName: P.SUBTOTAL,
10679
+ functionName: L.SUBTOTAL,
10684
10680
  functionType: t.Math,
10685
10681
  description: "formula.functionList.SUBTOTAL.description",
10686
10682
  abstract: "formula.functionList.SUBTOTAL.abstract",
@@ -10709,7 +10705,7 @@ const ji = [
10709
10705
  ]
10710
10706
  },
10711
10707
  {
10712
- functionName: P.SUM,
10708
+ functionName: L.SUM,
10713
10709
  aliasFunctionName: "formula.functionList.SUM.aliasFunctionName",
10714
10710
  functionType: t.Math,
10715
10711
  description: "formula.functionList.SUM.description",
@@ -10732,7 +10728,7 @@ const ji = [
10732
10728
  ]
10733
10729
  },
10734
10730
  {
10735
- functionName: P.SUMIF,
10731
+ functionName: L.SUMIF,
10736
10732
  aliasFunctionName: "formula.functionList.SUMIF.aliasFunctionName",
10737
10733
  functionType: t.Math,
10738
10734
  description: "formula.functionList.SUMIF.description",
@@ -10762,7 +10758,7 @@ const ji = [
10762
10758
  ]
10763
10759
  },
10764
10760
  {
10765
- functionName: P.SUMIFS,
10761
+ functionName: L.SUMIFS,
10766
10762
  functionType: t.Math,
10767
10763
  description: "formula.functionList.SUMIFS.description",
10768
10764
  abstract: "formula.functionList.SUMIFS.abstract",
@@ -10805,7 +10801,7 @@ const ji = [
10805
10801
  ]
10806
10802
  },
10807
10803
  {
10808
- functionName: P.SUMPRODUCT,
10804
+ functionName: L.SUMPRODUCT,
10809
10805
  functionType: t.Math,
10810
10806
  description: "formula.functionList.SUMPRODUCT.description",
10811
10807
  abstract: "formula.functionList.SUMPRODUCT.abstract",
@@ -10827,7 +10823,7 @@ const ji = [
10827
10823
  ]
10828
10824
  },
10829
10825
  {
10830
- functionName: P.SUMSQ,
10826
+ functionName: L.SUMSQ,
10831
10827
  functionType: t.Math,
10832
10828
  description: "formula.functionList.SUMSQ.description",
10833
10829
  abstract: "formula.functionList.SUMSQ.abstract",
@@ -10849,7 +10845,7 @@ const ji = [
10849
10845
  ]
10850
10846
  },
10851
10847
  {
10852
- functionName: P.SUMX2MY2,
10848
+ functionName: L.SUMX2MY2,
10853
10849
  functionType: t.Math,
10854
10850
  description: "formula.functionList.SUMX2MY2.description",
10855
10851
  abstract: "formula.functionList.SUMX2MY2.abstract",
@@ -10871,7 +10867,7 @@ const ji = [
10871
10867
  ]
10872
10868
  },
10873
10869
  {
10874
- functionName: P.SUMX2PY2,
10870
+ functionName: L.SUMX2PY2,
10875
10871
  functionType: t.Math,
10876
10872
  description: "formula.functionList.SUMX2PY2.description",
10877
10873
  abstract: "formula.functionList.SUMX2PY2.abstract",
@@ -10893,7 +10889,7 @@ const ji = [
10893
10889
  ]
10894
10890
  },
10895
10891
  {
10896
- functionName: P.SUMXMY2,
10892
+ functionName: L.SUMXMY2,
10897
10893
  functionType: t.Math,
10898
10894
  description: "formula.functionList.SUMXMY2.description",
10899
10895
  abstract: "formula.functionList.SUMXMY2.abstract",
@@ -10915,7 +10911,7 @@ const ji = [
10915
10911
  ]
10916
10912
  },
10917
10913
  {
10918
- functionName: P.TAN,
10914
+ functionName: L.TAN,
10919
10915
  functionType: t.Math,
10920
10916
  description: "formula.functionList.TAN.description",
10921
10917
  abstract: "formula.functionList.TAN.abstract",
@@ -10930,7 +10926,7 @@ const ji = [
10930
10926
  ]
10931
10927
  },
10932
10928
  {
10933
- functionName: P.TANH,
10929
+ functionName: L.TANH,
10934
10930
  functionType: t.Math,
10935
10931
  description: "formula.functionList.TANH.description",
10936
10932
  abstract: "formula.functionList.TANH.abstract",
@@ -10945,7 +10941,7 @@ const ji = [
10945
10941
  ]
10946
10942
  },
10947
10943
  {
10948
- functionName: P.TRUNC,
10944
+ functionName: L.TRUNC,
10949
10945
  functionType: t.Math,
10950
10946
  description: "formula.functionList.TRUNC.description",
10951
10947
  abstract: "formula.functionList.TRUNC.abstract",
@@ -15293,7 +15289,7 @@ let bt = class {
15293
15289
  ...Kn,
15294
15290
  ...kn,
15295
15291
  ...Qn
15296
- ].map((r) => r[1]), e = lr.filter((r) => a.includes(r.functionName)), n = this._configService.getConfig(ge);
15292
+ ].map((r) => r[1]), e = lr.filter((r) => a.includes(r.functionName)), n = this._configService.getConfig(he);
15297
15293
  this._descriptions = e.concat((i = n == null ? void 0 : n.description) != null ? i : []);
15298
15294
  }
15299
15295
  _registerDescriptions() {
@@ -15316,13 +15312,13 @@ let bt = class {
15316
15312
  bt = pr([
15317
15313
  Et(0, Bt),
15318
15314
  Et(1, X(_t)),
15319
- Et(2, De)
15315
+ Et(2, Ce)
15320
15316
  ], bt);
15321
15317
  var Lr = Object.getOwnPropertyDescriptor, Pr = (a, e, n, i) => {
15322
15318
  for (var r = i > 1 ? void 0 : i ? Lr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
15323
15319
  (u = a[o]) && (r = u(r) || r);
15324
15320
  return r;
15325
- }, Ve = (a, e) => (n, i) => e(n, i, a);
15321
+ }, Ge = (a, e) => (n, i) => e(n, i, a);
15326
15322
  function ca(a, e, n, i) {
15327
15323
  const r = a.sequenceNodesBuilder(e);
15328
15324
  if (r == null)
@@ -15332,11 +15328,11 @@ function ca(a, e, n, i) {
15332
15328
  const m = r[u];
15333
15329
  if (typeof m == "string" || m.nodeType !== ee.REFERENCE)
15334
15330
  continue;
15335
- const { token: c } = m, s = pe(c), { sheetName: L, unitId: E } = s;
15331
+ const { token: c } = m, s = pe(c), { sheetName: P, unitId: E } = s;
15336
15332
  let p = s.range;
15337
- p.startAbsoluteRefType === Ke.ALL && p.endAbsoluteRefType === Ke.ALL || (p = Nt(p, n, i), o.push({
15333
+ p.startAbsoluteRefType === ke.ALL && p.endAbsoluteRefType === ke.ALL || (p = Nt(p, n, i), o.push({
15338
15334
  unitId: E,
15339
- sheetName: L,
15335
+ sheetName: P,
15340
15336
  range: p
15341
15337
  }));
15342
15338
  }
@@ -15349,7 +15345,7 @@ let Ot = class extends ae {
15349
15345
  transformFormulaByEffectCommand(a, e, n, i) {
15350
15346
  const r = this._lexerTreeBuilder.sequenceNodesBuilder(n), o = this._univerInstanceService.getCurrentUnitForType(te.UNIVER_SHEET), u = o.getActiveSheet(), f = o.getUnitId(), m = u.getSheetId(), c = r == null ? void 0 : r.map((s) => {
15351
15347
  if (typeof s == "object" && s.nodeType === ee.REFERENCE) {
15352
- const L = pe(s.token), { range: E, unitId: p, sheetName: R } = L, S = this._univerInstanceService.getUnit(p || a), N = R ? S == null ? void 0 : S.getSheetBySheetName(R) : S == null ? void 0 : S.getSheetBySheetId(e);
15348
+ const P = pe(s.token), { range: E, unitId: p, sheetName: R } = P, S = this._univerInstanceService.getUnit(p || a), N = R ? S == null ? void 0 : S.getSheetBySheetName(R) : S == null ? void 0 : S.getSheetBySheetId(e);
15353
15349
  if (!N)
15354
15350
  throw new Error("Sheet not found");
15355
15351
  const d = S.getUnitId(), D = N.getSheetId();
@@ -15369,14 +15365,14 @@ let Ot = class extends ae {
15369
15365
  } else
15370
15366
  return s;
15371
15367
  });
15372
- return c ? `=${ke(c)}` : "";
15368
+ return c ? `=${Qe(c)}` : "";
15373
15369
  }
15374
15370
  registerFormula(a, e, n, i) {
15375
- const r = /* @__PURE__ */ new Map(), o = this._lexerTreeBuilder.sequenceNodesBuilder(n), u = new We(), f = (m) => {
15376
- const c = this._univerInstanceService.getCurrentUnitForType(te.UNIVER_SHEET), s = c.getActiveSheet(), L = c.getUnitId(), E = s.getSheetId(), p = o == null ? void 0 : o.map((S) => {
15371
+ const r = /* @__PURE__ */ new Map(), o = this._lexerTreeBuilder.sequenceNodesBuilder(n), u = new Ke(), f = (m) => {
15372
+ const c = this._univerInstanceService.getCurrentUnitForType(te.UNIVER_SHEET), s = c.getActiveSheet(), P = c.getUnitId(), E = s.getSheetId(), p = o == null ? void 0 : o.map((S) => {
15377
15373
  if (typeof S == "object" && S.nodeType === ee.REFERENCE) {
15378
15374
  const N = r.get(S.token);
15379
- if (N.unitId !== L || N.subUnitId !== E)
15375
+ if (N.unitId !== P || N.subUnitId !== E)
15380
15376
  return S;
15381
15377
  const d = wt(N.range, m);
15382
15378
  let D = "";
@@ -15391,12 +15387,12 @@ let Ot = class extends ae {
15391
15387
  };
15392
15388
  } else
15393
15389
  return S;
15394
- }), R = p && ke(p);
15390
+ }), R = p && Qe(p);
15395
15391
  return i(`=${R}`);
15396
15392
  };
15397
15393
  return o == null || o.forEach((m) => {
15398
15394
  if (typeof m == "object" && m.nodeType === ee.REFERENCE) {
15399
- const c = pe(m.token), { range: s, unitId: L, sheetName: E } = c, p = this._univerInstanceService.getUnit(L || a), R = E ? p == null ? void 0 : p.getSheetBySheetName(E) : p == null ? void 0 : p.getSheetBySheetId(e);
15395
+ const c = pe(m.token), { range: s, unitId: P, sheetName: E } = c, p = this._univerInstanceService.getUnit(P || a), R = E ? p == null ? void 0 : p.getSheetBySheetName(E) : p == null ? void 0 : p.getSheetBySheetId(e);
15400
15396
  if (!R)
15401
15397
  return;
15402
15398
  const S = p.getUnitId(), N = R.getSheetId(), d = {
@@ -15414,12 +15410,12 @@ let Ot = class extends ae {
15414
15410
  return r == null || r.forEach((u) => {
15415
15411
  if (typeof u == "object" && u.nodeType === ee.REFERENCE) {
15416
15412
  const f = pe(u.token), { range: m, unitId: c, sheetName: s } = f;
15417
- if (m.startAbsoluteRefType === Ke.ALL && m.endAbsoluteRefType === Ke.ALL)
15413
+ if (m.startAbsoluteRefType === ke.ALL && m.endAbsoluteRefType === ke.ALL)
15418
15414
  return;
15419
- const L = this._univerInstanceService.getUnit(c || a), E = s ? L == null ? void 0 : L.getSheetBySheetName(s) : L == null ? void 0 : L.getSheetBySheetId(e);
15415
+ const P = this._univerInstanceService.getUnit(c || a), E = s ? P == null ? void 0 : P.getSheetBySheetName(s) : P == null ? void 0 : P.getSheetBySheetId(e);
15420
15416
  if (!E)
15421
15417
  return;
15422
- const p = L.getUnitId(), R = E.getSheetId(), S = i[0].startRow, N = i[0].startColumn, d = m.startRow, D = m.startColumn, I = i.map((T) => ({
15418
+ const p = P.getUnitId(), R = E.getSheetId(), S = i[0].startRow, N = i[0].startColumn, d = m.startRow, D = m.startColumn, I = i.map((T) => ({
15423
15419
  startRow: T.startRow - S + d,
15424
15420
  endRow: T.endRow - S + d,
15425
15421
  startColumn: T.startColumn - N + D,
@@ -15435,13 +15431,13 @@ let Ot = class extends ae {
15435
15431
  }
15436
15432
  // eslint-disable-next-line max-lines-per-function
15437
15433
  registerRangeFormula(a, e, n, i, r) {
15438
- const o = new We(), u = i.map((m) => this._getFormulaDependcy(a, e, m, n)), f = (m) => {
15439
- const c = n[0].startRow, s = n[0].startColumn, L = [{ unitId: a, subUnitId: e, ranges: n }, ...u.flat()], E = [], p = Tn(this._injector, m);
15440
- for (const { unitId: R, subUnitId: S, ranges: N } of L)
15434
+ const o = new Ke(), u = i.map((m) => this._getFormulaDependcy(a, e, m, n)), f = (m) => {
15435
+ const c = n[0].startRow, s = n[0].startColumn, P = [{ unitId: a, subUnitId: e, ranges: n }, ...u.flat()], E = [], p = Tn(this._injector, m);
15436
+ for (const { unitId: R, subUnitId: S, ranges: N } of P)
15441
15437
  if (R === p.unitId && S === p.subUnitId) {
15442
15438
  const d = [], D = N[0].startRow, I = N[0].startColumn, T = D - c, g = I - s;
15443
15439
  for (const h of p.ranges) {
15444
- const B = N.map((q) => Ye(h, q)).filter(Boolean);
15440
+ const B = N.map((q) => Xe(h, q)).filter(Boolean);
15445
15441
  B.length > 0 && d.push(...B);
15446
15442
  }
15447
15443
  d.length > 0 && E.push(
@@ -15463,7 +15459,7 @@ let Ot = class extends ae {
15463
15459
  continue;
15464
15460
  const V = U[0].startRow, Q = U[0].startColumn, O = V - c, Pe = Q - s, ne = [];
15465
15461
  for (let k = 0; k < i.length; k++) {
15466
- const oe = i[k], z = xe(oe), he = z ? this._lexerTreeBuilder.moveFormulaRefOffset(oe, M, q) : oe, ue = z ? this.transformFormulaByEffectCommand(a, e, he, m) : he, Te = ca(this._lexerTreeBuilder, ue, -Pe, -O);
15462
+ const oe = i[k], z = xe(oe), Ue = z ? this._lexerTreeBuilder.moveFormulaRefOffset(oe, M, q) : oe, ue = z ? this.transformFormulaByEffectCommand(a, e, Ue, m) : Ue, Te = ca(this._lexerTreeBuilder, ue, -Pe, -O);
15467
15463
  ne.push({
15468
15464
  newFormula: ue,
15469
15465
  orginFormula: Te
@@ -15515,18 +15511,18 @@ let Ot = class extends ae {
15515
15511
  const c = this._refRangeService.registerRefRange(m, f, a, e);
15516
15512
  o.add(c);
15517
15513
  }), [...u.flat()].forEach(({ unitId: m, subUnitId: c, ranges: s }) => {
15518
- s.forEach((L) => {
15519
- const E = this._refRangeService.registerRefRange(L, f, m, c);
15514
+ s.forEach((P) => {
15515
+ const E = this._refRangeService.registerRefRange(P, f, m, c);
15520
15516
  o.add(E);
15521
15517
  });
15522
15518
  }), o;
15523
15519
  }
15524
15520
  };
15525
15521
  Ot = Pr([
15526
- Ve(0, X(Pn)),
15527
- Ve(1, X(Ut)),
15528
- Ve(2, Ce),
15529
- Ve(3, X(rt))
15522
+ Ge(0, X(Pn)),
15523
+ Ge(1, X(Ut)),
15524
+ Ge(2, Ae),
15525
+ Ge(3, X(ot))
15530
15526
  ], Ot);
15531
15527
  var Tr = Object.getOwnPropertyDescriptor, Er = (a, e, n, i) => {
15532
15528
  for (var r = i > 1 ? void 0 : i ? Tr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
@@ -15534,7 +15530,7 @@ var Tr = Object.getOwnPropertyDescriptor, Er = (a, e, n, i) => {
15534
15530
  return r;
15535
15531
  }, Ir = (a, e) => (n, i) => e(n, i, a);
15536
15532
  const Vt = "sheets-formula.remote-register-function.service", Ha = yt(Vt);
15537
- let ze = class {
15533
+ let Ze = class {
15538
15534
  constructor(a) {
15539
15535
  this._functionService = a;
15540
15536
  }
@@ -15550,9 +15546,9 @@ let ze = class {
15550
15546
  this._functionService.unregisterExecutors(...a), this._functionService.unregisterDescriptions(...a), this._functionService.deleteFormulaAstCacheKey(...a);
15551
15547
  }
15552
15548
  };
15553
- ze = Er([
15549
+ Ze = Er([
15554
15550
  Ir(0, Bt)
15555
- ], ze);
15551
+ ], Ze);
15556
15552
  function Nr(a, e) {
15557
15553
  const n = new Ct(e), i = new Function(`return ${a}`)();
15558
15554
  return n.calculateCustom = i, n;
@@ -15565,7 +15561,7 @@ var Sr = Object.getOwnPropertyDescriptor, Ar = (a, e, n, i) => {
15565
15561
  for (var r = i > 1 ? void 0 : i ? Sr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
15566
15562
  (u = a[o]) && (r = u(r) || r);
15567
15563
  return r;
15568
- }, Ge = (a, e) => (n, i) => e(n, i, a);
15564
+ }, He = (a, e) => (n, i) => e(n, i, a);
15569
15565
  const Cr = yt(
15570
15566
  "sheets-formula.register-function-service"
15571
15567
  );
@@ -15582,7 +15578,7 @@ let Mt = class extends ae {
15582
15578
  registerFunctions(a) {
15583
15579
  const { locales: e, description: n, calculate: i } = a;
15584
15580
  e && this._localeService.load(e);
15585
- const r = new We();
15581
+ const r = new Ke();
15586
15582
  if (n)
15587
15583
  r.add(this._descriptionService.registerDescriptions(n));
15588
15584
  else {
@@ -15598,7 +15594,7 @@ let Mt = class extends ae {
15598
15594
  return r.add(this._registerLocalExecutors(i)), this._remoteRegisterFunctionService && r.add(this._registerRemoteExecutors(i)), r;
15599
15595
  }
15600
15596
  _registerSingleFunction(a) {
15601
- const { name: e, func: n, description: i, locales: r, async: o = !1 } = a, u = new We();
15597
+ const { name: e, func: n, description: i, locales: r, async: o = !1 } = a, u = new Ke();
15602
15598
  if (r && this._localeService.load(r), typeof i == "string") {
15603
15599
  const m = {
15604
15600
  functionName: e,
@@ -15628,10 +15624,10 @@ let Mt = class extends ae {
15628
15624
  }
15629
15625
  };
15630
15626
  Mt = Ar([
15631
- Ge(0, X(_t)),
15632
- Ge(1, X(vt)),
15633
- Ge(2, Bt),
15634
- Ge(3, Qa(Ha))
15627
+ He(0, X(_t)),
15628
+ He(1, X(vt)),
15629
+ He(2, Bt),
15630
+ He(3, Qa(Ha))
15635
15631
  ], Mt);
15636
15632
  const Dr = "SHEETS_FORMULA_PLUGIN";
15637
15633
  var br = Object.getOwnPropertyDescriptor, Or = (a, e, n, i) => {
@@ -15639,7 +15635,7 @@ var br = Object.getOwnPropertyDescriptor, Or = (a, e, n, i) => {
15639
15635
  (u = a[o]) && (r = u(r) || r);
15640
15636
  return r;
15641
15637
  }, It = (a, e) => (n, i) => e(n, i, a);
15642
- let Ze = class extends ae {
15638
+ let Je = class extends ae {
15643
15639
  constructor(a, e, n) {
15644
15640
  super(), this._activeDirtyManagerService = a, this._univerInstanceService = e, this._formulaDataModel = n, this._initialize();
15645
15641
  }
@@ -15857,9 +15853,9 @@ let Ze = class extends ae {
15857
15853
  _getRemoveRowOrColumnMutation(a, e = !0) {
15858
15854
  const { subUnitId: n, unitId: i, range: r } = a, o = [], u = this._univerInstanceService.getUniverSheetInstance(i), f = u == null ? void 0 : u.getSheetBySheetId(n), m = (f == null ? void 0 : f.getRowCount()) || 0, c = (f == null ? void 0 : f.getColumnCount()) || 0;
15859
15855
  let s = null;
15860
- const { startRow: L, endRow: E, startColumn: p, endColumn: R } = r;
15856
+ const { startRow: P, endRow: E, startColumn: p, endColumn: R } = r;
15861
15857
  e === !0 ? s = this._rangeToMatrix({
15862
- startRow: L,
15858
+ startRow: P,
15863
15859
  startColumn: 0,
15864
15860
  endRow: E,
15865
15861
  endColumn: c - 1
@@ -15913,7 +15909,7 @@ let Ze = class extends ae {
15913
15909
  if ((u = o == null ? void 0 : o[a]) != null && u[e]) {
15914
15910
  const m = new G((f = o == null ? void 0 : o[a]) == null ? void 0 : f[e]);
15915
15911
  r.forValue((c, s) => {
15916
- m.forValue((L, E, p) => {
15912
+ m.forValue((P, E, p) => {
15917
15913
  if (p == null)
15918
15914
  return !0;
15919
15915
  const { startRow: R, startColumn: S, endRow: N, endColumn: d } = p;
@@ -15933,17 +15929,17 @@ let Ze = class extends ae {
15933
15929
  return i;
15934
15930
  }
15935
15931
  };
15936
- Ze = Or([
15932
+ Je = Or([
15937
15933
  It(0, Ft),
15938
- It(1, Ce),
15939
- It(2, X(ut))
15940
- ], Ze);
15934
+ It(1, Ae),
15935
+ It(2, X(mt))
15936
+ ], Je);
15941
15937
  var Mr = Object.getOwnPropertyDescriptor, xr = (a, e, n, i) => {
15942
15938
  for (var r = i > 1 ? void 0 : i ? Mr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
15943
15939
  (u = a[o]) && (r = u(r) || r);
15944
15940
  return r;
15945
- }, He = (a, e) => (n, i) => e(n, i, a);
15946
- let Je = class extends ae {
15941
+ }, we = (a, e) => (n, i) => e(n, i, a);
15942
+ let et = class extends ae {
15947
15943
  constructor(a, e, n, i) {
15948
15944
  super(), this._commandService = a, this._configService = e, this._sheetInterceptorService = n, this._formulaDataModel = i, this._initialize();
15949
15945
  }
@@ -15960,7 +15956,7 @@ let Je = class extends ae {
15960
15956
  if (e == null)
15961
15957
  return;
15962
15958
  const { arrayFormulaRange: n, arrayFormulaCellData: i } = e;
15963
- this._formulaDataModel.setArrayFormulaRange(n), this._formulaDataModel.setArrayFormulaCellData(i), (r = this._configService.getConfig(ge)) != null && r.writeArrayFormulaToSnapshot && this._writeArrayFormulaToSnapshot(n, i);
15959
+ this._formulaDataModel.setArrayFormulaRange(n), this._formulaDataModel.setArrayFormulaCellData(i), (r = this._configService.getConfig(he)) != null && r.writeArrayFormulaToSnapshot && this._writeArrayFormulaToSnapshot(n, i);
15964
15960
  })
15965
15961
  );
15966
15962
  }
@@ -15992,27 +15988,27 @@ let Je = class extends ae {
15992
15988
  priority: 100,
15993
15989
  effect: $a.Value,
15994
15990
  handler: (a, e, n) => {
15995
- var s, L, E;
15991
+ var s, P, E;
15996
15992
  let i = a;
15997
- const { unitId: r, subUnitId: o, row: u, col: f } = e, m = this._formulaDataModel.getArrayFormulaCellData(), c = (E = (L = (s = m == null ? void 0 : m[r]) == null ? void 0 : s[o]) == null ? void 0 : L[u]) == null ? void 0 : E[f];
15993
+ const { unitId: r, subUnitId: o, row: u, col: f } = e, m = this._formulaDataModel.getArrayFormulaCellData(), c = (E = (P = (s = m == null ? void 0 : m[r]) == null ? void 0 : s[o]) == null ? void 0 : P[u]) == null ? void 0 : E[f];
15998
15994
  return c == null ? n(i) : ((!i || i === e.rawData) && (i = { ...e.rawData }), c.v == null && c.t == null ? (i.v = 0, i.t = Gt.NUMBER, n(i)) : (i == null ? void 0 : i.t) === Gt.NUMBER && i.v !== void 0 && i.v !== null && ja(i.v) ? (i.v = $n(Number(i.v)), n(i)) : (i.v = c.v, i.t = c.t, n(i)));
15999
15995
  }
16000
15996
  })
16001
15997
  );
16002
15998
  }
16003
15999
  };
16004
- Je = xr([
16005
- He(0, ce),
16006
- He(1, De),
16007
- He(2, X(qt)),
16008
- He(3, X(ut))
16009
- ], Je);
16000
+ et = xr([
16001
+ we(0, ce),
16002
+ we(1, Ce),
16003
+ we(2, X(qt)),
16004
+ we(3, X(mt))
16005
+ ], et);
16010
16006
  var _r = Object.getOwnPropertyDescriptor, yr = (a, e, n, i) => {
16011
16007
  for (var r = i > 1 ? void 0 : i ? _r(e, n) : e, o = a.length - 1, u; o >= 0; o--)
16012
16008
  (u = a[o]) && (r = u(r) || r);
16013
16009
  return r;
16014
- }, we = (a, e) => (n, i) => e(n, i, a);
16015
- let et = class extends ae {
16010
+ }, Ye = (a, e) => (n, i) => e(n, i, a);
16011
+ let tt = class extends ae {
16016
16012
  constructor(e, n, i, r) {
16017
16013
  super();
16018
16014
  W(this, "_preUnitId", null);
@@ -16124,35 +16120,35 @@ let et = class extends ae {
16124
16120
  }), this._descriptionService.unregisterDescriptions(r);
16125
16121
  }
16126
16122
  };
16127
- et = yr([
16128
- we(0, vt),
16129
- we(1, ht),
16130
- we(2, Ce),
16131
- we(3, ce)
16132
- ], et);
16123
+ tt = yr([
16124
+ Ye(0, vt),
16125
+ Ye(1, ht),
16126
+ Ye(2, Ae),
16127
+ Ye(3, ce)
16128
+ ], tt);
16133
16129
  var qr = Object.getOwnPropertyDescriptor, gr = (a, e, n, i) => {
16134
16130
  for (var r = i > 1 ? void 0 : i ? qr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
16135
16131
  (u = a[o]) && (r = u(r) || r);
16136
16132
  return r;
16137
16133
  }, hr = (a, e) => (n, i) => e(n, i, a);
16138
- let tt = class extends ae {
16134
+ let at = class extends ae {
16139
16135
  constructor(a) {
16140
16136
  super(), this._commandService = a, [
16141
16137
  ei,
16142
16138
  ti,
16143
- Me
16139
+ Oe
16144
16140
  ].forEach((e) => this._commandService.registerCommand(e));
16145
16141
  }
16146
16142
  };
16147
- tt = gr([
16143
+ at = gr([
16148
16144
  hr(0, ce)
16149
- ], tt);
16145
+ ], at);
16150
16146
  var Ur = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, Br = (a, e, n) => e in a ? Ur(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n, wa = (a, e, n, i) => {
16151
16147
  for (var r = i > 1 ? void 0 : i ? Fr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
16152
16148
  (u = a[o]) && (r = u(r) || r);
16153
16149
  return r;
16154
- }, at = (a, e) => (n, i) => e(n, i, a), ft = (a, e, n) => Br(a, typeof e != "symbol" ? e + "" : e, n);
16155
- let nt = class extends pa {
16150
+ }, nt = (a, e) => (n, i) => e(n, i, a), ft = (a, e, n) => Br(a, typeof e != "symbol" ? e + "" : e, n);
16151
+ let it = class extends pa {
16156
16152
  constructor(a = ma, e, n) {
16157
16153
  super(), this._config = a, this._injector = e, this._configService = n;
16158
16154
  const { ...i } = La(
@@ -16163,20 +16159,20 @@ let nt = class extends pa {
16163
16159
  this._configService.setConfig(Wi, i);
16164
16160
  }
16165
16161
  onStarting() {
16166
- this._injector.add([ze]), this._injector.get(Ua).registerChannel(
16162
+ this._injector.add([Ze]), this._injector.get(Ua).registerChannel(
16167
16163
  Vt,
16168
- Zn(this._injector.get(ze))
16164
+ Zn(this._injector.get(Ze))
16169
16165
  );
16170
16166
  }
16171
16167
  };
16172
- ft(nt, "pluginName", "SHEET_FORMULA_REMOTE_PLUGIN");
16173
- ft(nt, "type", te.UNIVER_SHEET);
16174
- nt = wa([
16168
+ ft(it, "pluginName", "SHEET_FORMULA_REMOTE_PLUGIN");
16169
+ ft(it, "type", te.UNIVER_SHEET);
16170
+ it = wa([
16175
16171
  da(ga),
16176
- at(1, X(rt)),
16177
- at(2, De)
16178
- ], nt);
16179
- let it = class extends pa {
16172
+ nt(1, X(ot)),
16173
+ nt(2, Ce)
16174
+ ], it);
16175
+ let rt = class extends pa {
16180
16176
  constructor(a = ua, e, n) {
16181
16177
  super(), this._config = a, this._injector = e, this._configService = n;
16182
16178
  const { ...i } = La(
@@ -16184,21 +16180,21 @@ let it = class extends pa {
16184
16180
  ua,
16185
16181
  this._config
16186
16182
  );
16187
- this._configService.setConfig(ge, i, { merge: !0 });
16183
+ this._configService.setConfig(he, i, { merge: !0 });
16188
16184
  }
16189
16185
  onStarting() {
16190
16186
  const a = this._injector, e = [
16191
16187
  [Cr, { useClass: Mt }],
16192
16188
  [vt, { useClass: bt }],
16193
- [tt],
16189
+ [at],
16194
16190
  [Ot],
16195
- [$e],
16196
- [Je],
16197
- [_e],
16198
16191
  [je],
16199
- [Ze],
16200
16192
  [et],
16201
- [Qe]
16193
+ [_e],
16194
+ [ze],
16195
+ [Je],
16196
+ [tt],
16197
+ [$e]
16202
16198
  ];
16203
16199
  if (this._config.notExecuteFormula) {
16204
16200
  const n = a.get(Ua);
@@ -16209,31 +16205,31 @@ let it = class extends pa {
16209
16205
  e.forEach((n) => a.add(n));
16210
16206
  }
16211
16207
  onReady() {
16212
- Ue(this._injector, [
16213
- [tt],
16214
- [Ze],
16208
+ Fe(this._injector, [
16209
+ [at],
16215
16210
  [Je],
16216
- [je],
16217
- [Qe]
16218
- ]), Ht() && Ue(this._injector, [
16211
+ [et],
16212
+ [ze],
16213
+ [$e]
16214
+ ]), Ht() && Fe(this._injector, [
16219
16215
  [_e]
16220
16216
  ]);
16221
16217
  }
16222
16218
  onRendered() {
16223
- Ue(this._injector, [
16224
- [et]
16225
- ]), Ht() || Ue(this._injector, [
16219
+ Fe(this._injector, [
16220
+ [tt]
16221
+ ]), Ht() || Fe(this._injector, [
16226
16222
  [_e]
16227
16223
  ]);
16228
16224
  }
16229
16225
  };
16230
- ft(it, "pluginName", Dr);
16231
- ft(it, "type", te.UNIVER_SHEET);
16232
- it = wa([
16226
+ ft(rt, "pluginName", Dr);
16227
+ ft(rt, "type", te.UNIVER_SHEET);
16228
+ rt = wa([
16233
16229
  da(ga, Rn),
16234
- at(1, X(rt)),
16235
- at(2, De)
16236
- ], it);
16230
+ nt(1, X(ot)),
16231
+ nt(2, Ce)
16232
+ ], rt);
16237
16233
  export {
16238
16234
  Le as CalculationMode,
16239
16235
  bt as DescriptionService,
@@ -16242,16 +16238,16 @@ export {
16242
16238
  Cr as IRegisterFunctionService,
16243
16239
  Ha as IRemoteRegisterFunctionService,
16244
16240
  ei as InsertFunctionCommand,
16245
- Me as OtherFormulaMarkDirty,
16246
- ge as PLUGIN_CONFIG_KEY_BASE,
16241
+ Oe as OtherFormulaMarkDirty,
16242
+ he as PLUGIN_CONFIG_KEY_BASE,
16247
16243
  ti as QuickSumCommand,
16248
16244
  Mt as RegisterFunctionService,
16249
- $e as RegisterOtherFormulaService,
16250
- ze as RemoteRegisterFunctionService,
16245
+ je as RegisterOtherFormulaService,
16246
+ Ze as RemoteRegisterFunctionService,
16251
16247
  _e as TriggerCalculationController,
16252
- nt as UniverRemoteSheetsFormulaPlugin,
16253
- it as UniverSheetsFormulaPlugin,
16254
- Qe as UpdateDefinedNameController,
16255
- je as UpdateFormulaController,
16248
+ it as UniverRemoteSheetsFormulaPlugin,
16249
+ rt as UniverSheetsFormulaPlugin,
16250
+ $e as UpdateDefinedNameController,
16251
+ ze as UpdateFormulaController,
16256
16252
  Xr as calculateFormula
16257
16253
  };