@univerjs/sheets-formula 0.1.0-beta.0 → 0.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,20 +1,20 @@
1
- var Gn = Object.defineProperty;
2
- var Xn = (i, e, t) => e in i ? Gn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var k = (i, e, t) => (Xn(i, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { Disposable as H, ObjectMatrix as x, Dimension as X, OnLifecycle as K, LifecycleStages as Y, IUniverInstanceService as ge, ICommandService as Q, isFormulaString as Ee, isFormulaId as Lt, Tools as G, Direction as M, CommandType as oe, toDisposable as w, ColorKit as an, ThemeService as sn, deserializeRangeWithSheet as Re, AbsoluteRefType as F, serializeRange as Et, Rectangle as Ue, getCellValueType as Kn, CellValueType as Yn, LocaleService as _e, IContextService as kt, FOCUSING_FORMULA_EDITOR as on, UniverInstanceType as Qn, FOCUSING_EDITOR_INPUT_FORMULA as Oe, DisposableCollection as Jn, serializeRangeToRefString as Ve, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as st, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ot, RANGE_TYPE as he, Plugin as Zn, PluginType as er } from "@univerjs/core";
5
- import { createIdentifier as Ze, Inject as y, Injector as et } from "@wendellhu/redi";
6
- import { FormulaDataModel as tt, SetArrayFormulaDataMutation as Rt, LexerTreeBuilder as Ie, SetFormulaCalculationResultMutation as tr, sequenceNodeType as W, matchToken as j, FUNCTION_NAMES_MATH as zt, FunctionType as ne, FUNCTION_NAMES_STATISTICAL as Pe, IFunctionService as nr, isFormulaLexerToken as rr, normalizeSheetName as ir, includeFormulaLexerToken as ar, generateStringWithSequence as cn, SetFormulaCalculationStartMutation as Ut, SetFormulaCalculationNotificationMutation as sr, FormulaExecutedStateType as xe, SetFormulaDataMutation as we, initSheetFormulaData as or } from "@univerjs/engine-formula";
7
- import { SetRangeValuesMutation as ie, SetStyleCommand as Ct, MoveRangeMutation as Vt, MoveRowsMutation as qt, MoveColsMutation as Ht, DeleteRangeMutation as $t, InsertRangeMutation as jt, RemoveRowMutation as Wt, RemoveColMutation as Gt, RemoveSheetMutation as gt, InsertSheetMutation as It, INTERCEPTOR_POINT as un, SheetInterceptorService as _t, SetRangeValuesUndoMutationFactory as mn, SetRangeValuesCommand as cr, SelectionManagerService as Dt, getCellAtRowCol as ur, SetSelectionsOperation as mr, NORMAL_SELECTION_PLUGIN_NAME as Be, convertSelectionDataToRange as ct, getNormalSelectionStyle as fr, SetBorderCommand as fn, DeleteRangeMoveLeftCommand as ln, DeleteRangeMoveUpCommand as dn, RemoveColCommand as bn, RemoveRowCommand as pn, InsertRangeMoveDownCommand as hn, InsertRangeMoveRightCommand as En, InsertColCommand as Rn, InsertRowCommand as gn, MoveColsCommand as In, MoveRowsCommand as vn, MoveRangeCommand as Pn, handleInsertRangeMutation as nt, handleDeleteRangeMutation as rt, SetWorksheetNameCommand as lr, handleMoveRange as dr, EffectRefRangId as J, runRefRangeMutations as Z, handleInsertRow as br, handleInsertCol as pr, handleIRemoveRow as hr, handleIRemoveCol as Er, handleDeleteRangeMoveLeft as Rr, handleDeleteRangeMoveUp as gr, handleInsertRangeMoveDown as Ir, handleInsertRangeMoveRight as vr } from "@univerjs/sheets";
8
- import { DATA_TYPE as Xt, APPLY_TYPE as Pr, IAutoFillService as Sr, SheetPasteCommand as Br, ISheetClipboardService as kr, COPY_TYPE as Cr, SelectionShape as _r, IEditorBridgeService as yt, SheetSkeletonManagerService as Sn, ISelectionRenderService as Bn, getEditorObject as vt, ICellEditorManagerService as Tt, IFormulaEditorManagerService as kn, RangeSelector as Dr, PASTE_SPECIAL_MENU_ID as yr, whenEditorInputFormulaActivated as De, SetEditorResizeOperation as Tr, MoveSelectionCommand as Fe, JumpOver as Kt, ExpandSelectionCommand as Yt } from "@univerjs/sheets-ui";
9
- import { IRenderManagerService as At, DeviceInputEventType as ae, ITextSelectionRenderManager as Cn, getCellInfoInMergeData as Ar } from "@univerjs/engine-render";
10
- import { TextSelectionManagerService as _n, ReplaceContentCommand as Nr, MoveCursorOperation as Mr, DocViewModelManagerService as Or } from "@univerjs/docs";
11
- import { KeyCode as O, ISidebarService as Dn, MenuGroup as xr, MenuItemType as Nt, MenuPosition as wr, getMenuHiddenObservable as Fr, MetaKeys as se, ComponentManager as Lr, IMenuService as zr, IShortcutService as Ur, IUIController as Vr } from "@univerjs/ui";
1
+ var Kn = Object.defineProperty;
2
+ var Yn = (i, e, t) => e in i ? Kn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var k = (i, e, t) => (Yn(i, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { Disposable as $, ObjectMatrix as x, Dimension as Y, OnLifecycle as X, LifecycleStages as Q, IUniverInstanceService as Ie, ICommandService as J, isFormulaString as Re, isFormulaId as Ut, Tools as K, Direction as M, CommandType as oe, toDisposable as w, ColorKit as sn, ThemeService as on, deserializeRangeWithSheet as ge, AbsoluteRefType as L, serializeRange as gt, Rectangle as Ve, getCellValueType as Xn, CellValueType as Qn, LocaleService as De, IContextService as _t, FOCUSING_FORMULA_EDITOR as cn, UniverInstanceType as Jn, FOCUSING_EDITOR_INPUT_FORMULA as xe, DisposableCollection as Zn, serializeRangeToRefString as qe, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as ot, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ct, RANGE_TYPE as Ee, Plugin as er, PluginType as tr } from "@univerjs/core";
5
+ import { createIdentifier as et, Inject as y, Injector as tt } from "@wendellhu/redi";
6
+ import { FormulaDataModel as nt, SetArrayFormulaDataMutation as It, LexerTreeBuilder as ve, ErrorType as nr, SetFormulaCalculationResultMutation as rr, sequenceNodeType as G, matchToken as W, FUNCTION_NAMES_ARRAY as ir, FunctionType as q, FUNCTION_NAMES_MATH as pe, FUNCTION_NAMES_STATISTICAL as Se, IFunctionService as ar, isFormulaLexerToken as sr, normalizeSheetName as or, includeFormulaLexerToken as cr, generateStringWithSequence as un, SetFormulaCalculationStartMutation as Vt, SetFormulaCalculationNotificationMutation as ur, FormulaExecutedStateType as we, SetFormulaDataMutation as Le, initSheetFormulaData as mr } from "@univerjs/engine-formula";
7
+ import { SetRangeValuesMutation as ie, SetStyleCommand as Dt, MoveRangeMutation as qt, MoveRowsMutation as Ht, MoveColsMutation as $t, DeleteRangeMutation as jt, InsertRangeMutation as Wt, RemoveRowMutation as Gt, RemoveColMutation as Kt, RemoveSheetMutation as vt, InsertSheetMutation as Pt, INTERCEPTOR_POINT as mn, SheetInterceptorService as yt, SetRangeValuesUndoMutationFactory as fn, SetRangeValuesCommand as fr, SelectionManagerService as Tt, getCellAtRowCol as lr, SetSelectionsOperation as dr, NORMAL_SELECTION_PLUGIN_NAME as Ce, convertSelectionDataToRange as ut, getNormalSelectionStyle as br, SetBorderCommand as ln, DeleteRangeMoveLeftCommand as dn, DeleteRangeMoveUpCommand as bn, RemoveColCommand as pn, RemoveRowCommand as hn, InsertRangeMoveDownCommand as En, InsertRangeMoveRightCommand as Rn, InsertColCommand as gn, InsertRowCommand as In, MoveColsCommand as vn, MoveRowsCommand as Pn, MoveRangeCommand as Sn, handleInsertRangeMutation as rt, handleDeleteRangeMutation as it, SetWorksheetNameCommand as pr, handleMoveRange as hr, EffectRefRangId as Z, runRefRangeMutations as ee, handleInsertRow as Er, handleInsertCol as Rr, handleIRemoveRow as gr, handleIRemoveCol as Ir, handleDeleteRangeMoveLeft as vr, handleDeleteRangeMoveUp as Pr, handleInsertRangeMoveDown as Sr, handleInsertRangeMoveRight as Br } from "@univerjs/sheets";
8
+ import { DATA_TYPE as Yt, APPLY_TYPE as Cr, IAutoFillService as kr, SheetPasteCommand as _r, ISheetClipboardService as Dr, COPY_TYPE as yr, SelectionShape as Tr, IEditorBridgeService as At, SheetSkeletonManagerService as Bn, ISelectionRenderService as Cn, getEditorObject as St, ICellEditorManagerService as Nt, IFormulaEditorManagerService as kn, RangeSelector as Ar, PASTE_SPECIAL_MENU_ID as Nr, whenEditorInputFormulaActivated as ye, SetEditorResizeOperation as Mr, MoveSelectionCommand as Fe, JumpOver as Xt, ExpandSelectionCommand as Qt } from "@univerjs/sheets-ui";
9
+ import { IRenderManagerService as Mt, DeviceInputEventType as ae, ITextSelectionRenderManager as _n, getCellInfoInMergeData as Or } from "@univerjs/engine-render";
10
+ import { TextSelectionManagerService as Dn, ReplaceContentCommand as xr, MoveCursorOperation as wr, DocViewModelManagerService as Lr } from "@univerjs/docs";
11
+ import { KeyCode as O, ISidebarService as yn, MenuGroup as Fr, MenuItemType as Ot, MenuPosition as zr, getMenuHiddenObservable as Ur, MetaKeys as se, ComponentManager as Vr, IMenuService as qr, IShortcutService as Hr, IUIController as $r } from "@univerjs/ui";
12
12
  import { Subject as re } from "rxjs";
13
- import { useDependency as z, connectInjector as qr } from "@wendellhu/redi/react-bindings";
14
- import Hr, { useState as A, useEffect as Ce, forwardRef as ye, useRef as $r, createElement as Te } from "react";
15
- import { Popup as yn, Select as jr, Input as Wr, Button as ut } from "@univerjs/design";
16
- const Tn = "formula-ui";
17
- class Gr extends H {
13
+ import { useDependency as z, connectInjector as jr } from "@wendellhu/redi/react-bindings";
14
+ import Wr, { useState as N, useEffect as _e, forwardRef as Te, useRef as Gr, createElement as Ae } from "react";
15
+ import { Popup as Tn, Select as Kr, Input as Yr, Button as mt } from "@univerjs/design";
16
+ const An = "formula-ui";
17
+ class Xr extends $ {
18
18
  constructor() {
19
19
  super(...arguments);
20
20
  k(this, "_dirtyConversionMap", /* @__PURE__ */ new Map());
@@ -38,15 +38,15 @@ class Gr extends H {
38
38
  return this._dirtyConversionMap;
39
39
  }
40
40
  }
41
- const Mt = Ze(
41
+ const xt = et(
42
42
  "univer.formula.active-dirty-manager.service"
43
43
  );
44
- var Xr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, Yr = (i, e, t, n) => {
45
- for (var r = n > 1 ? void 0 : n ? Kr(e, t) : e, a = i.length - 1, s; a >= 0; a--)
44
+ var Qr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Zr = (i, e, t, n) => {
45
+ for (var r = n > 1 ? void 0 : n ? Jr(e, t) : e, a = i.length - 1, s; a >= 0; a--)
46
46
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
47
- return n && r && Xr(e, t, r), r;
48
- }, mt = (i, e) => (t, n) => e(t, n, i);
49
- let qe = class extends H {
47
+ return n && r && Qr(e, t, r), r;
48
+ }, ft = (i, e) => (t, n) => e(t, n, i);
49
+ let He = class extends $ {
50
50
  constructor(i, e, t) {
51
51
  super(), this._activeDirtyManagerService = i, this._currentUniverService = e, this._formulaDataModel = t, this._initialize();
52
52
  }
@@ -58,24 +58,16 @@ let qe = class extends H {
58
58
  commandId: ie.id,
59
59
  getDirtyData: (i) => {
60
60
  const e = i.params;
61
- return e.trigger === Ct.id ? {} : {
61
+ return e.trigger === Dt.id ? {} : {
62
62
  dirtyRanges: this._getSetRangeValuesMutationDirtyRange(e)
63
63
  };
64
64
  }
65
- }), this._activeDirtyManagerService.register(Vt.id, {
66
- commandId: Vt.id,
67
- getDirtyData: (i) => {
68
- const e = i.params;
69
- return {
70
- dirtyRanges: this._getMoveRangeMutationDirtyRange(e)
71
- };
72
- }
73
65
  }), this._activeDirtyManagerService.register(qt.id, {
74
66
  commandId: qt.id,
75
67
  getDirtyData: (i) => {
76
68
  const e = i.params;
77
69
  return {
78
- dirtyRanges: this._getMoveRowsMutationDirtyRange(e)
70
+ dirtyRanges: this._getMoveRangeMutationDirtyRange(e)
79
71
  };
80
72
  }
81
73
  }), this._activeDirtyManagerService.register(Ht.id, {
@@ -91,7 +83,7 @@ let qe = class extends H {
91
83
  getDirtyData: (i) => {
92
84
  const e = i.params;
93
85
  return {
94
- dirtyRanges: this._getDeleteRangeMutationDirtyRange(e)
86
+ dirtyRanges: this._getMoveRowsMutationDirtyRange(e)
95
87
  };
96
88
  }
97
89
  }), this._activeDirtyManagerService.register(jt.id, {
@@ -107,25 +99,33 @@ let qe = class extends H {
107
99
  getDirtyData: (i) => {
108
100
  const e = i.params;
109
101
  return {
110
- dirtyRanges: this._getRemoveRowOrColumnMutation(e, !0)
102
+ dirtyRanges: this._getDeleteRangeMutationDirtyRange(e)
111
103
  };
112
104
  }
113
105
  }), this._activeDirtyManagerService.register(Gt.id, {
114
106
  commandId: Gt.id,
107
+ getDirtyData: (i) => {
108
+ const e = i.params;
109
+ return {
110
+ dirtyRanges: this._getRemoveRowOrColumnMutation(e, !0)
111
+ };
112
+ }
113
+ }), this._activeDirtyManagerService.register(Kt.id, {
114
+ commandId: Kt.id,
115
115
  getDirtyData: (i) => {
116
116
  const e = i.params;
117
117
  return {
118
118
  dirtyRanges: this._getRemoveRowOrColumnMutation(e, !1)
119
119
  };
120
120
  }
121
- }), this._activeDirtyManagerService.register(gt.id, {
122
- commandId: gt.id,
121
+ }), this._activeDirtyManagerService.register(vt.id, {
122
+ commandId: vt.id,
123
123
  getDirtyData: (i) => {
124
124
  const e = i.params;
125
125
  return { dirtyNameMap: this._getRemoveSheetMutation(e) };
126
126
  }
127
- }), this._activeDirtyManagerService.register(It.id, {
128
- commandId: It.id,
127
+ }), this._activeDirtyManagerService.register(Pt.id, {
128
+ commandId: Pt.id,
129
129
  getDirtyData: (i) => {
130
130
  const e = i.params;
131
131
  return { dirtyNameMap: this._getInsertSheetMutation(e) };
@@ -147,13 +147,13 @@ let qe = class extends H {
147
147
  _getDeleteRangeMutationDirtyRange(i) {
148
148
  const { subUnitId: e, unitId: t, range: n, shiftDimension: r } = i, a = [], s = this._currentUniverService.getUniverSheetInstance(t), o = s == null ? void 0 : s.getSheetBySheetId(e), c = (o == null ? void 0 : o.getLastRowWithContent()) || 0, u = (o == null ? void 0 : o.getLastColumnWithContent()) || 0, l = new x();
149
149
  let d = null;
150
- const { startRow: m, startColumn: b, endRow: h, endColumn: I } = n;
151
- r === X.ROWS ? d = this._rangeToMatrix({
150
+ const { startRow: m, startColumn: b, endRow: h, endColumn: g } = n;
151
+ r === Y.ROWS ? d = this._rangeToMatrix({
152
152
  startRow: m,
153
153
  startColumn: b,
154
154
  endRow: c,
155
- endColumn: I
156
- }) : r === X.COLUMNS && (d = this._rangeToMatrix({
155
+ endColumn: g
156
+ }) : r === Y.COLUMNS && (d = this._rangeToMatrix({
157
157
  startRow: m,
158
158
  startColumn: b,
159
159
  endRow: h,
@@ -165,7 +165,7 @@ let qe = class extends H {
165
165
  _getRemoveRowOrColumnMutation(i, e = !0) {
166
166
  const { subUnitId: t, unitId: n, range: r } = i, a = [], s = this._currentUniverService.getUniverSheetInstance(n), o = s == null ? void 0 : s.getSheetBySheetId(t), c = (o == null ? void 0 : o.getRowCount()) || 0, u = (o == null ? void 0 : o.getColumnCount()) || 0, l = new x();
167
167
  let d = null;
168
- const { startRow: m, endRow: b, startColumn: h, endColumn: I } = r;
168
+ const { startRow: m, endRow: b, startColumn: h, endColumn: g } = r;
169
169
  e === !0 ? d = this._rangeToMatrix({
170
170
  startRow: m,
171
171
  startColumn: 0,
@@ -175,7 +175,7 @@ let qe = class extends H {
175
175
  startRow: 0,
176
176
  startColumn: h,
177
177
  endRow: c,
178
- endColumn: I
178
+ endColumn: g
179
179
  }), d != null && l.merge(d);
180
180
  const f = l.getData();
181
181
  return a.push(...this._getDirtyRangesByCellValue(n, t, f)), a.push(...this._getDirtyRangesForArrayFormula(n, t, f)), a;
@@ -217,15 +217,15 @@ let qe = class extends H {
217
217
  c.forValue((d, m, b) => {
218
218
  if (b == null)
219
219
  return !0;
220
- const { startRow: h, startColumn: I, endRow: f, endColumn: R } = b;
221
- u >= h && u <= f && l >= I && l <= R && n.push({
220
+ const { startRow: h, startColumn: g, endRow: f, endColumn: R } = b;
221
+ u >= h && u <= f && l >= g && l <= R && n.push({
222
222
  unitId: i,
223
223
  sheetId: e,
224
224
  range: {
225
225
  startRow: h,
226
- startColumn: I,
226
+ startColumn: g,
227
227
  endRow: h,
228
- endColumn: I
228
+ endColumn: g
229
229
  }
230
230
  });
231
231
  });
@@ -234,18 +234,18 @@ let qe = class extends H {
234
234
  return n;
235
235
  }
236
236
  };
237
- qe = Yr([
238
- K(Y.Ready, qe),
239
- mt(0, Mt),
240
- mt(1, ge),
241
- mt(2, y(tt))
242
- ], qe);
243
- var Qr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Zr = (i, e, t, n) => {
244
- for (var r = n > 1 ? void 0 : n ? Jr(e, t) : e, a = i.length - 1, s; a >= 0; a--)
237
+ He = Zr([
238
+ X(Q.Ready, He),
239
+ ft(0, xt),
240
+ ft(1, Ie),
241
+ ft(2, y(nt))
242
+ ], He);
243
+ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ni = (i, e, t, n) => {
244
+ for (var r = n > 1 ? void 0 : n ? ti(e, t) : e, a = i.length - 1, s; a >= 0; a--)
245
245
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
246
- return n && r && Qr(e, t, r), r;
247
- }, ft = (i, e) => (t, n) => e(t, n, i);
248
- let He = class extends H {
246
+ return n && r && ei(e, t, r), r;
247
+ }, lt = (i, e) => (t, n) => e(t, n, i);
248
+ let $e = class extends $ {
249
249
  constructor(i, e, t) {
250
250
  super(), this._commandService = i, this._sheetInterceptorService = e, this._formulaDataModel = t, this._initialize();
251
251
  }
@@ -255,7 +255,7 @@ let He = class extends H {
255
255
  _commandExecutedListener() {
256
256
  this.disposeWithMe(
257
257
  this._commandService.onCommandExecuted((i) => {
258
- if (i.id !== Rt.id)
258
+ if (i.id !== It.id)
259
259
  return;
260
260
  const e = i.params;
261
261
  if (e == null)
@@ -267,29 +267,29 @@ let He = class extends H {
267
267
  }
268
268
  _initInterceptorCellContent() {
269
269
  this.disposeWithMe(
270
- this._sheetInterceptorService.intercept(un.CELL_CONTENT, {
270
+ this._sheetInterceptorService.intercept(mn.CELL_CONTENT, {
271
271
  priority: 100,
272
272
  handler: (i, e, t) => {
273
- var d, m, b, h, I, f;
274
- const { unitId: n, subUnitId: r, row: a, col: s } = e, o = this._formulaDataModel.getArrayFormulaCellData(), c = this._formulaDataModel.getArrayFormulaRange(), u = (b = (m = (d = o == null ? void 0 : o[n]) == null ? void 0 : d[r]) == null ? void 0 : m[a]) == null ? void 0 : b[s], l = (f = (I = (h = c == null ? void 0 : c[n]) == null ? void 0 : h[r]) == null ? void 0 : I[a]) == null ? void 0 : f[s];
273
+ var d, m, b, h, g, f;
274
+ const { unitId: n, subUnitId: r, row: a, col: s } = e, o = this._formulaDataModel.getArrayFormulaCellData(), c = this._formulaDataModel.getArrayFormulaRange(), u = (b = (m = (d = o == null ? void 0 : o[n]) == null ? void 0 : d[r]) == null ? void 0 : m[a]) == null ? void 0 : b[s], l = (f = (g = (h = c == null ? void 0 : c[n]) == null ? void 0 : h[r]) == null ? void 0 : g[a]) == null ? void 0 : f[s];
275
275
  return u == null || l != null && l.startRow === a && l.startColumn === s ? t(i) : t({ ...i, ...u });
276
276
  }
277
277
  })
278
278
  );
279
279
  }
280
280
  };
281
- He = Zr([
282
- K(Y.Ready, He),
283
- ft(0, Q),
284
- ft(1, y(_t)),
285
- ft(2, y(tt))
286
- ], He);
287
- var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ni = (i, e, t, n) => {
288
- for (var r = n > 1 ? void 0 : n ? ti(e, t) : e, a = i.length - 1, s; a >= 0; a--)
281
+ $e = ni([
282
+ X(Q.Ready, $e),
283
+ lt(0, J),
284
+ lt(1, y(yt)),
285
+ lt(2, y(nt))
286
+ ], $e);
287
+ var ri = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, ai = (i, e, t, n) => {
288
+ for (var r = n > 1 ? void 0 : n ? ii(e, t) : e, a = i.length - 1, s; a >= 0; a--)
289
289
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
290
- return n && r && ei(e, t, r), r;
291
- }, Qt = (i, e) => (t, n) => e(t, n, i);
292
- let $e = class extends H {
290
+ return n && r && ri(e, t, r), r;
291
+ }, Jt = (i, e) => (t, n) => e(t, n, i);
292
+ let je = class extends $ {
293
293
  constructor(i, e) {
294
294
  super(), this._autoFillService = i, this._lexerTreeBuilder = e, this._initialize();
295
295
  }
@@ -298,12 +298,12 @@ let $e = class extends H {
298
298
  }
299
299
  _registerAutoFill() {
300
300
  const i = {
301
- type: Xt.FORMULA,
301
+ type: Yt.FORMULA,
302
302
  priority: 1001,
303
- match: (e) => Ee(e == null ? void 0 : e.f) || Lt(e == null ? void 0 : e.si),
304
- isContinue: (e, t) => e.type === Xt.FORMULA,
303
+ match: (e) => Re(e == null ? void 0 : e.f) || Ut(e == null ? void 0 : e.si),
304
+ isContinue: (e, t) => e.type === Yt.FORMULA,
305
305
  applyFunctions: {
306
- [Pr.COPY]: (e, t, n, r) => {
306
+ [Cr.COPY]: (e, t, n, r) => {
307
307
  const { data: a, index: s } = e;
308
308
  return this._fillCopyFormula(a, t, n, s, r);
309
309
  }
@@ -313,23 +313,23 @@ let $e = class extends H {
313
313
  }
314
314
  _fillCopyFormula(i, e, t, n, r) {
315
315
  var c, u;
316
- const a = ii(r), s = [], o = /* @__PURE__ */ new Map();
316
+ const a = oi(r), s = [], o = /* @__PURE__ */ new Map();
317
317
  for (let l = 1; l <= e; l++) {
318
- const d = (l - 1) % i.length, m = G.deepClone(i[d]);
318
+ const d = (l - 1) % i.length, m = K.deepClone(i[d]);
319
319
  if (m) {
320
- const b = ((c = i[d]) == null ? void 0 : c.f) || "", h = ((u = i[d]) == null ? void 0 : u.si) || "", I = Ee(b);
321
- if (Lt(h))
320
+ const b = ((c = i[d]) == null ? void 0 : c.f) || "", h = ((u = i[d]) == null ? void 0 : u.si) || "", g = Re(b);
321
+ if (Ut(h))
322
322
  m.si = h, m.f = null, m.v = null, m.p = null, t === M.DOWN || t === M.RIGHT ? s.push(m) : s.unshift(m);
323
- else if (I) {
323
+ else if (g) {
324
324
  let R = o.get(d);
325
325
  if (R)
326
326
  m.si = R, m.f = null, m.v = null, m.p = null;
327
327
  else {
328
- R = G.generateRandomId(6), o.set(d, R);
329
- const { offsetX: p, offsetY: g } = ri(a, t), C = this._lexerTreeBuilder.moveFormulaRefOffset(
328
+ R = K.generateRandomId(6), o.set(d, R);
329
+ const { offsetX: p, offsetY: I } = si(a, t), C = this._lexerTreeBuilder.moveFormulaRefOffset(
330
330
  b,
331
331
  p,
332
- g
332
+ I
333
333
  );
334
334
  m.si = R, m.f = C, m.v = null, m.p = null;
335
335
  }
@@ -340,12 +340,12 @@ let $e = class extends H {
340
340
  return s;
341
341
  }
342
342
  };
343
- $e = ni([
344
- K(Y.Ready, $e),
345
- Qt(0, Sr),
346
- Qt(1, y(Ie))
347
- ], $e);
348
- function ri(i, e) {
343
+ je = ai([
344
+ X(Q.Ready, je),
345
+ Jt(0, kr),
346
+ Jt(1, y(ve))
347
+ ], je);
348
+ function si(i, e) {
349
349
  let t = 0, n = 0;
350
350
  switch (e) {
351
351
  case M.UP:
@@ -363,7 +363,7 @@ function ri(i, e) {
363
363
  }
364
364
  return { offsetX: t, offsetY: n };
365
365
  }
366
- function ii(i) {
366
+ function oi(i) {
367
367
  let e = 0;
368
368
  for (const t in i)
369
369
  i[t].forEach((n) => {
@@ -371,20 +371,20 @@ function ii(i) {
371
371
  });
372
372
  return e;
373
373
  }
374
- const An = "special-paste-formula", Nn = {
374
+ const Nn = "special-paste-formula", Mn = {
375
375
  id: "sheet.command.paste-formula",
376
376
  type: oe.COMMAND,
377
- handler: async (i) => i.get(Q).executeCommand(Br.id, {
378
- value: An
377
+ handler: async (i) => i.get(J).executeCommand(_r.id, {
378
+ value: Nn
379
379
  })
380
380
  };
381
- var ai = Object.defineProperty, si = Object.getOwnPropertyDescriptor, oi = (i, e, t, n) => {
382
- for (var r = n > 1 ? void 0 : n ? si(e, t) : e, a = i.length - 1, s; a >= 0; a--)
381
+ var ci = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, mi = (i, e, t, n) => {
382
+ for (var r = n > 1 ? void 0 : n ? ui(e, t) : e, a = i.length - 1, s; a >= 0; a--)
383
383
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
384
- return n && r && ai(e, t, r), r;
385
- }, Le = (i, e) => (t, n) => e(t, n, i);
386
- const ci = "default-paste-formula";
387
- let je = class extends H {
384
+ return n && r && ci(e, t, r), r;
385
+ }, ze = (i, e) => (t, n) => e(t, n, i);
386
+ const fi = "default-paste-formula";
387
+ let We = class extends $ {
388
388
  constructor(i, e, t, n) {
389
389
  super(), this._currentUniverSheet = i, this._lexerTreeBuilder = e, this._sheetClipboardService = t, this._injector = n, this._initialize();
390
390
  }
@@ -396,14 +396,14 @@ let je = class extends H {
396
396
  }
397
397
  _pasteFormulaHook() {
398
398
  return {
399
- hookName: An,
399
+ hookName: Nn,
400
400
  specialPasteInfo: {
401
401
  label: "specialPaste.formula"
402
402
  },
403
403
  onPasteCells: (e, t, n, r) => {
404
404
  const a = this._currentUniverSheet.getCurrentUniverSheetInstance(), s = a.getUnitId(), o = a.getActiveSheet().getSheetId();
405
405
  return this._injector.invoke(
406
- (c) => Jt(
406
+ (c) => Zt(
407
407
  s,
408
408
  o,
409
409
  e,
@@ -419,11 +419,11 @@ let je = class extends H {
419
419
  }
420
420
  _pasteWithFormulaHook() {
421
421
  return {
422
- hookName: ci,
422
+ hookName: fi,
423
423
  onPasteCells: (e, t, n, r) => {
424
424
  const a = this._currentUniverSheet.getCurrentUniverSheetInstance(), s = a.getUnitId(), o = a.getActiveSheet().getSheetId();
425
425
  return this._injector.invoke(
426
- (c) => Jt(
426
+ (c) => Zt(
427
427
  s,
428
428
  o,
429
429
  e,
@@ -437,30 +437,30 @@ let je = class extends H {
437
437
  };
438
438
  }
439
439
  };
440
- je = oi([
441
- K(Y.Ready, je),
442
- Le(0, ge),
443
- Le(1, y(Ie)),
444
- Le(2, kr),
445
- Le(3, y(et))
446
- ], je);
447
- function Jt(i, e, t, n, r, a, s, o = !1) {
440
+ We = mi([
441
+ X(Q.Ready, We),
442
+ ze(0, Ie),
443
+ ze(1, y(ve)),
444
+ ze(2, Dr),
445
+ ze(3, y(tt))
446
+ ], We);
447
+ function Zt(i, e, t, n, r, a, s, o = !1) {
448
448
  const c = [], u = [], { startColumn: l, startRow: d } = t, m = new x(), b = /* @__PURE__ */ new Map();
449
- let h = 0, I = 0, f = 0, R = 0;
449
+ let h = 0, g = 0, f = 0, R = 0;
450
450
  if (a) {
451
451
  const { copyType: C, copyRange: S } = a;
452
- C === Cr.COPY && S && (f = S.startRow, R = S.startColumn, h = S.endRow - f + 1, I = S.endColumn - R + 1);
452
+ C === yr.COPY && S && (f = S.startRow, R = S.startColumn, h = S.endRow - f + 1, g = S.endColumn - R + 1);
453
453
  }
454
454
  n.forValue((C, S, v) => {
455
- const P = v.f || "", _ = {};
456
- if (o && (_.v = v.v), Ee(P) && h && I) {
457
- const N = C % h, B = S % I, T = `${N}_${B}`;
455
+ const B = v.f || "", _ = {};
456
+ if (o && (_.v = v.v), Re(B) && h && g) {
457
+ const A = C % h, P = S % g, T = `${A}_${P}`;
458
458
  let D = b.get(T);
459
459
  if (D)
460
460
  _.si = D, _.f = null, _.v = null, _.p = null;
461
461
  else {
462
- D = G.generateRandomId(6), b.set(T, D);
463
- const $ = S + l - (R + B), U = C + d - (f + N), ce = s.moveFormulaRefOffset(P, $, U);
462
+ D = K.generateRandomId(6), b.set(T, D);
463
+ const j = S + l - (R + P), U = C + d - (f + A), ce = s.moveFormulaRefOffset(B, j, U);
464
464
  _.si = D, _.f = ce, _.v = null, _.p = null;
465
465
  }
466
466
  }
@@ -475,24 +475,24 @@ function Jt(i, e, t, n, r, a, s, o = !1) {
475
475
  id: ie.id,
476
476
  params: p
477
477
  });
478
- const g = mn(
478
+ const I = fn(
479
479
  r,
480
480
  p
481
481
  );
482
482
  return u.push({
483
483
  id: ie.id,
484
- params: g
484
+ params: I
485
485
  }), {
486
486
  undos: u,
487
487
  redos: c
488
488
  };
489
489
  }
490
- var ui = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, fi = (i, e, t, n) => {
491
- for (var r = n > 1 ? void 0 : n ? mi(e, t) : e, a = i.length - 1, s; a >= 0; a--)
490
+ var li = Object.defineProperty, di = Object.getOwnPropertyDescriptor, bi = (i, e, t, n) => {
491
+ for (var r = n > 1 ? void 0 : n ? di(e, t) : e, a = i.length - 1, s; a >= 0; a--)
492
492
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
493
- return n && r && ui(e, t, r), r;
494
- }, ee = (i, e) => (t, n) => e(t, n, i);
495
- let We = class extends H {
493
+ return n && r && li(e, t, r), r;
494
+ }, te = (i, e) => (t, n) => e(t, n, i);
495
+ let Ge = class extends $ {
496
496
  constructor(e, t, n, r, a, s, o, c, u) {
497
497
  super();
498
498
  k(this, "_previousShape");
@@ -505,62 +505,65 @@ let We = class extends H {
505
505
  this._editorBridgeService.interceptor.getInterceptPoints().BEFORE_CELL_EDIT,
506
506
  {
507
507
  handler: (e, t, n) => {
508
- var b, h, I, f;
509
- const { row: r, col: a, unitId: s, subUnitId: o } = t, c = this._formulaDataModel.getArrayFormulaRange(), u = this._formulaDataModel.getArrayFormulaCellData();
508
+ var h, g, f, R;
509
+ const { row: r, col: a, unitId: s, subUnitId: o, worksheet: c } = t, u = this._formulaDataModel.getArrayFormulaRange(), l = this._formulaDataModel.getArrayFormulaCellData();
510
510
  if (this._removeArrayFormulaRangeShape(), e == null)
511
511
  return n(e);
512
- let l = null;
513
- const d = this._formulaDataModel.getFormulaDataItem(
512
+ let d = null;
513
+ const m = this._formulaDataModel.getFormulaDataItem(
514
514
  r,
515
515
  a,
516
516
  o,
517
517
  s
518
518
  );
519
- if (d != null) {
520
- const { f: R, si: p, x: g = 0, y: C = 0 } = d;
521
- if (p != null && (g > 0 || C > 0)) {
522
- let S = "";
523
- if (R.length > 0)
524
- S = R;
519
+ if (m != null) {
520
+ const { f: p, si: I, x: C = 0, y: S = 0 } = m;
521
+ if (I != null && (C > 0 || S > 0)) {
522
+ let v = "";
523
+ if (p.length > 0)
524
+ v = p;
525
525
  else {
526
- const P = this._formulaDataModel.getFormulaItemBySId(
527
- p,
526
+ const _ = this._formulaDataModel.getFormulaItemBySId(
527
+ I,
528
528
  o,
529
529
  s
530
530
  );
531
- if (P == null || P.f.length === 0)
531
+ if (_ == null || _.f.length === 0)
532
532
  return n(e);
533
- S = P.f;
533
+ v = _.f;
534
534
  }
535
- l = { f: this._lexerTreeBuilder.moveFormulaRefOffset(
536
- S,
537
- g,
538
- C
535
+ d = { f: this._lexerTreeBuilder.moveFormulaRefOffset(
536
+ v,
537
+ C,
538
+ S
539
539
  ) };
540
540
  }
541
541
  }
542
- if (e.v != null && e.v !== "" && ((I = (h = (b = u[s]) == null ? void 0 : b[o]) == null ? void 0 : h[r]) == null ? void 0 : I[a]) == null)
543
- return l || n(e);
544
- const m = (f = c == null ? void 0 : c[s]) == null ? void 0 : f[o];
545
- return m != null && new x(m).forValue((R, p, g) => {
546
- if (g == null)
542
+ if (e.v != null && e.v !== "" && ((f = (g = (h = l[s]) == null ? void 0 : h[o]) == null ? void 0 : g[r]) == null ? void 0 : f[a]) == null)
543
+ return d || n(e);
544
+ const b = (R = u == null ? void 0 : u[s]) == null ? void 0 : R[o];
545
+ return b != null && new x(b).forValue((p, I, C) => {
546
+ if (C == null)
547
547
  return !0;
548
- const { startRow: C, startColumn: S, endRow: v, endColumn: P } = g;
549
- if (R === r && p === a)
550
- return this._createArrayFormulaRangeShape(g, s), !1;
551
- if (r >= C && r <= v && a >= S && a <= P) {
552
- const _ = this._formulaDataModel.getFormulaDataItem(
553
- R,
548
+ const { startRow: S, startColumn: v, endRow: B, endColumn: _ } = C;
549
+ if (p === r && I === a)
550
+ return this._createArrayFormulaRangeShape(C, s), !1;
551
+ if (r >= S && r <= B && a >= v && a <= _) {
552
+ const A = c.getCell(S, v);
553
+ if ((A == null ? void 0 : A.v) === nr.SPILL)
554
+ return;
555
+ const P = this._formulaDataModel.getFormulaDataItem(
554
556
  p,
557
+ I,
555
558
  o,
556
559
  s
557
560
  );
558
- return _ == null || _.f == null ? !0 : (l == null && (l = {
559
- f: _.f,
561
+ return P == null || P.f == null ? !0 : (d == null && (d = {
562
+ f: P.f,
560
563
  isInArrayFormulaRange: !0
561
- }), this._createArrayFormulaRangeShape(g, s), !1);
564
+ }), this._createArrayFormulaRangeShape(C, s), !1);
562
565
  }
563
- }), l || n(e);
566
+ }), d || n(e);
564
567
  }
565
568
  }
566
569
  )
@@ -569,7 +572,7 @@ let We = class extends H {
569
572
  }
570
573
  _initInterceptorCell() {
571
574
  this.disposeWithMe(
572
- this._sheetInterceptorService.intercept(un.CELL_CONTENT, {
575
+ this._sheetInterceptorService.intercept(mn.CELL_CONTENT, {
573
576
  handler: (e, t, n) => {
574
577
  var l, d, m;
575
578
  const { row: r, col: a, unitId: s, subUnitId: o } = t, c = this._formulaDataModel.getArrayFormulaCellData(), u = (m = (d = (l = c == null ? void 0 : c[s]) == null ? void 0 : l[o]) == null ? void 0 : d[r]) == null ? void 0 : m[a];
@@ -581,13 +584,13 @@ let We = class extends H {
581
584
  _commandExecutedListener() {
582
585
  this.disposeWithMe(
583
586
  this._commandService.onCommandExecuted((e) => {
584
- e.id === tr.id && this._removeArrayFormulaRangeShape();
587
+ e.id === rr.id && this._removeArrayFormulaRangeShape();
585
588
  })
586
589
  );
587
590
  }
588
591
  _createArrayFormulaRangeShape(e, t) {
589
592
  var b;
590
- const n = this._themeService.getCurrentTheme(), r = new an(n.colorWhite).setAlpha(0).toString(), a = {
593
+ const n = this._themeService.getCurrentTheme(), r = new sn(n.colorWhite).setAlpha(0).toString(), a = {
591
594
  strokeWidth: 1,
592
595
  stroke: n.hyacinth700,
593
596
  fill: r,
@@ -602,31 +605,31 @@ let We = class extends H {
602
605
  }), u = (b = this._sheetSkeletonManagerService.getCurrent()) == null ? void 0 : b.skeleton;
603
606
  if (!s || !u)
604
607
  return;
605
- const { rowHeaderWidth: l, columnHeaderHeight: d } = u, m = new _r(s, 100, !1, this._themeService);
608
+ const { rowHeaderWidth: l, columnHeaderHeight: d } = u, m = new Tr(s, 100, !1, this._themeService);
606
609
  m.update(o, l, d, a, c), this._previousShape = m;
607
610
  }
608
611
  _removeArrayFormulaRangeShape() {
609
612
  this._previousShape != null && (this._previousShape.dispose(), this._previousShape = null);
610
613
  }
611
614
  };
612
- We = fi([
613
- K(Y.Rendered, We),
614
- ee(0, y(yt)),
615
- ee(1, y(tt)),
616
- ee(2, y(Ie)),
617
- ee(3, y(sn)),
618
- ee(4, At),
619
- ee(5, Bn),
620
- ee(6, y(Sn)),
621
- ee(7, Q),
622
- ee(8, y(_t))
623
- ], We);
624
- const Ot = {
615
+ Ge = bi([
616
+ X(Q.Rendered, Ge),
617
+ te(0, y(At)),
618
+ te(1, y(nt)),
619
+ te(2, y(ve)),
620
+ te(3, y(on)),
621
+ te(4, Mt),
622
+ te(5, Cn),
623
+ te(6, y(Bn)),
624
+ te(7, J),
625
+ te(8, y(yt))
626
+ ], Ge);
627
+ const wt = {
625
628
  id: "formula-ui.operation.change-ref-to-absolute",
626
629
  type: oe.OPERATION,
627
630
  handler: async (i) => !0
628
631
  };
629
- class li {
632
+ class pi {
630
633
  constructor() {
631
634
  k(this, "_sequenceNodes", []);
632
635
  k(this, "_isSelectionMoving", !1);
@@ -692,7 +695,7 @@ class li {
692
695
  */
693
696
  updateSequenceRef(e, t) {
694
697
  const n = this._sequenceNodes[e];
695
- if (typeof n == "string" || n.nodeType !== W.REFERENCE)
698
+ if (typeof n == "string" || n.nodeType !== G.REFERENCE)
696
699
  return;
697
700
  const r = t.length - n.token.length, a = { ...n };
698
701
  a.token = t, a.endIndex += r, this._sequenceNodes[e] = a;
@@ -717,7 +720,7 @@ class li {
717
720
  token: t,
718
721
  startIndex: e,
719
722
  endIndex: e + n - 1,
720
- nodeType: W.REFERENCE
723
+ nodeType: G.REFERENCE
721
724
  });
722
725
  for (let a = r + 1, s = this._sequenceNodes.length; a < s; a++) {
723
726
  const o = this._sequenceNodes[a];
@@ -775,13 +778,13 @@ class li {
775
778
  return this._isLockedOnSelectionInsertRefString;
776
779
  }
777
780
  }
778
- const Ae = Ze("formula-ui.input-service");
779
- var di = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, pi = (i, e, t, n) => {
780
- for (var r = n > 1 ? void 0 : n ? bi(e, t) : e, a = i.length - 1, s; a >= 0; a--)
781
+ const Ne = et("formula-ui.input-service");
782
+ var hi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Ri = (i, e, t, n) => {
783
+ for (var r = n > 1 ? void 0 : n ? Ei(e, t) : e, a = i.length - 1, s; a >= 0; a--)
781
784
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
782
- return n && r && di(e, t, r), r;
785
+ return n && r && hi(e, t, r), r;
783
786
  }, me = (i, e) => (t, n) => e(t, n, i);
784
- let Ge = class extends H {
787
+ let Ke = class extends $ {
785
788
  constructor(e, t, n, r, a, s, o) {
786
789
  super();
787
790
  k(this, "_userCursorMove", !1);
@@ -832,7 +835,7 @@ let Ge = class extends H {
832
835
  if (e == null)
833
836
  return;
834
837
  const { startOffset: t } = e, n = t - 2, r = this._formulaInputService.getCurrentSequenceNodeIndex(n), a = this._formulaInputService.getCurrentSequenceNodeByIndex(r);
835
- if (a == null || typeof a == "string" || a.nodeType !== W.REFERENCE)
838
+ if (a == null || typeof a == "string" || a.nodeType !== G.REFERENCE)
836
839
  return;
837
840
  const s = a.token.split("!");
838
841
  let o = a.token;
@@ -841,12 +844,12 @@ let Ge = class extends H {
841
844
  for (let d = 0, m = s.length; d < m - 1; d++)
842
845
  c += s[d];
843
846
  let u = o;
844
- if (o.indexOf(j.COLON) > -1)
847
+ if (o.indexOf(W.COLON) > -1)
845
848
  if (!this._userCursorMove)
846
849
  u = this._changeRangeRef(o);
847
850
  else {
848
- const d = o.split(j.COLON), m = d[0], b = d[1];
849
- n - a.startIndex <= m.length ? u = this._changeSingleRef(m) + j.COLON + b : u = m + j.COLON + this._changeSingleRef(b);
851
+ const d = o.split(W.COLON), m = d[0], b = d[1];
852
+ n - a.startIndex <= m.length ? u = this._changeSingleRef(m) + W.COLON + b : u = m + W.COLON + this._changeSingleRef(b);
850
853
  }
851
854
  else
852
855
  u = this._changeSingleRef(o);
@@ -855,17 +858,17 @@ let Ge = class extends H {
855
858
  this._formulaInputService.updateSequenceRef(r, u), this._formulaInputService.syncToEditor(n + l + 1);
856
859
  }
857
860
  _changeRangeRef(e) {
858
- const t = Re(e).range;
861
+ const t = ge(e).range;
859
862
  let n = "";
860
- return t.startAbsoluteRefType === F.NONE || t.startAbsoluteRefType == null ? (t.startAbsoluteRefType = F.ALL, t.endAbsoluteRefType = F.ALL) : (t.startAbsoluteRefType = F.NONE, t.endAbsoluteRefType = F.NONE), n = Et(t), n;
863
+ return t.startAbsoluteRefType === L.NONE || t.startAbsoluteRefType == null ? (t.startAbsoluteRefType = L.ALL, t.endAbsoluteRefType = L.ALL) : (t.startAbsoluteRefType = L.NONE, t.endAbsoluteRefType = L.NONE), n = gt(t), n;
861
864
  }
862
865
  _changeSingleRef(e) {
863
- const t = Re(e).range, n = t.startAbsoluteRefType;
866
+ const t = ge(e).range, n = t.startAbsoluteRefType;
864
867
  let r = "";
865
- return n === F.NONE || n == null ? (t.startAbsoluteRefType = F.ALL, t.endAbsoluteRefType = F.ALL) : n === F.ALL ? (t.startAbsoluteRefType = F.ROW, t.endAbsoluteRefType = F.ROW) : n === F.ROW ? (t.startAbsoluteRefType = F.COLUMN, t.endAbsoluteRefType = F.COLUMN) : (t.startAbsoluteRefType = F.NONE, t.endAbsoluteRefType = F.NONE), r = Et(t), r;
868
+ return n === L.NONE || n == null ? (t.startAbsoluteRefType = L.ALL, t.endAbsoluteRefType = L.ALL) : n === L.ALL ? (t.startAbsoluteRefType = L.ROW, t.endAbsoluteRefType = L.ROW) : n === L.ROW ? (t.startAbsoluteRefType = L.COLUMN, t.endAbsoluteRefType = L.COLUMN) : (t.startAbsoluteRefType = L.NONE, t.endAbsoluteRefType = L.NONE), r = gt(t), r;
866
869
  }
867
870
  _commandExecutedListener() {
868
- const e = [Ot.id];
871
+ const e = [wt.id];
869
872
  this.disposeWithMe(
870
873
  this._commandService.onCommandExecuted((t) => {
871
874
  e.includes(t.id) && this._changeRefString();
@@ -873,32 +876,32 @@ let Ge = class extends H {
873
876
  );
874
877
  }
875
878
  _getEditorObject() {
876
- return vt(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
879
+ return St(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
877
880
  }
878
881
  };
879
- Ge = pi([
880
- K(Y.Steady, Ge),
881
- me(0, Q),
882
- me(1, Cn),
883
- me(2, y(yt)),
884
- me(3, y(Ie)),
885
- me(4, At),
886
- me(5, Ae),
887
- me(6, y(_n))
888
- ], Ge);
889
- const Mn = {
882
+ Ke = Ri([
883
+ X(Q.Steady, Ke),
884
+ me(0, J),
885
+ me(1, _n),
886
+ me(2, y(At)),
887
+ me(3, y(ve)),
888
+ me(4, Mt),
889
+ me(5, Ne),
890
+ me(6, y(Dn))
891
+ ], Ke);
892
+ const On = {
890
893
  id: "formula-ui.command.insert-function",
891
894
  type: oe.COMMAND,
892
895
  handler: async (i, e) => {
893
- const { list: t } = e, n = i.get(Q), r = new x();
896
+ const { list: t } = e, n = i.get(J), r = new x();
894
897
  t.forEach((s) => {
895
- const { range: o, primary: c, formula: u } = s, { row: l, column: d } = c, m = G.generateRandomId(6);
898
+ const { range: o, primary: c, formula: u } = s, { row: l, column: d } = c, m = K.generateRandomId(6);
896
899
  r.setValue(l, d, {
897
900
  f: u,
898
901
  si: m
899
902
  });
900
- const { startRow: b, startColumn: h, endRow: I, endColumn: f } = o;
901
- for (let R = b; R <= I; R++)
903
+ const { startRow: b, startColumn: h, endRow: g, endColumn: f } = o;
904
+ for (let R = b; R <= g; R++)
902
905
  for (let p = h; p <= f; p++)
903
906
  (R !== l || p !== d) && r.setValue(R, p, {
904
907
  si: m
@@ -907,9 +910,9 @@ const Mn = {
907
910
  const a = {
908
911
  value: r.getData()
909
912
  };
910
- return n.executeCommand(cr.id, a);
913
+ return n.executeCommand(fr.id, a);
911
914
  }
912
- }, ve = {
915
+ }, Pe = {
913
916
  id: "formula-ui.operation.select-editor-formula",
914
917
  type: oe.OPERATION,
915
918
  handler: (i, e) => (
@@ -941,8 +944,8 @@ const Mn = {
941
944
  // }
942
945
  !0
943
946
  )
944
- }, de = Ze("formula-ui.prompt-service");
945
- class hi {
947
+ }, de = et("formula-ui.prompt-service");
948
+ class gi {
946
949
  constructor() {
947
950
  k(this, "_search$", new re());
948
951
  k(this, "_help$", new re());
@@ -983,62 +986,62 @@ class hi {
983
986
  this._acceptFormulaName$.next(e);
984
987
  }
985
988
  }
986
- const Pt = {
989
+ const Bt = {
987
990
  id: "formula-ui.operation.help-function",
988
991
  type: oe.OPERATION,
989
992
  handler: async (i, e) => (i.get(de).help(e), !0)
990
- }, xt = {
993
+ }, Lt = {
991
994
  id: "formula-ui.operation.insert-function",
992
995
  type: oe.OPERATION,
993
996
  handler: async (i, e) => {
994
- const t = i.get(Dt), n = i.get(Ae), r = t.getSelections();
997
+ const t = i.get(Tt), n = i.get(Ne), r = t.getSelections();
995
998
  if (!r || !r.length)
996
999
  return !1;
997
- const a = i.get(ge).getCurrentUniverSheetInstance(), s = a.getActiveSheet(), o = a.getUnitId(), c = s.getSheetId(), u = s.getCellMatrix(), { value: l } = e, d = i.get(Q), m = [];
998
- let b = null, h = 0, I = 0;
1000
+ const a = i.get(Ie).getCurrentUniverSheetInstance(), s = a.getActiveSheet(), o = a.getUnitId(), c = s.getSheetId(), u = s.getCellMatrix(), { value: l } = e, d = i.get(J), m = [];
1001
+ let b = null, h = 0, g = 0;
999
1002
  if (r.some((f) => {
1000
- const { range: R, primary: p } = f, g = (p == null ? void 0 : p.actualRow) ?? R.startRow, C = (p == null ? void 0 : p.actualColumn) ?? R.startColumn, S = Ei(u, g, C);
1003
+ const { range: R, primary: p } = f, I = (p == null ? void 0 : p.actualRow) ?? R.startRow, C = (p == null ? void 0 : p.actualColumn) ?? R.startColumn, S = Ii(u, I, C);
1001
1004
  if (!S)
1002
- return b = R, h = g, I = C, !0;
1003
- const v = Et(S), P = `=${l}(${v})`;
1005
+ return b = R, h = I, g = C, !0;
1006
+ const v = gt(S), B = `=${l}(${v})`;
1004
1007
  return m.push({
1005
1008
  range: R,
1006
1009
  primary: {
1007
- row: g,
1010
+ row: I,
1008
1011
  column: C
1009
1012
  },
1010
- formula: P
1013
+ formula: B
1011
1014
  }), !1;
1012
1015
  }), b) {
1013
- const f = ur(h, I, s), R = {
1014
- range: Ue.clone(b),
1016
+ const f = lr(h, g, s), R = {
1017
+ range: Ve.clone(b),
1015
1018
  primary: {
1016
1019
  startRow: f.startRow,
1017
1020
  startColumn: f.startColumn,
1018
1021
  endRow: f.endRow,
1019
1022
  endColumn: f.endColumn,
1020
1023
  actualRow: h,
1021
- actualColumn: I,
1024
+ actualColumn: g,
1022
1025
  isMerged: f.isMerged,
1023
- isMergedMainCell: f.startRow === h && f.startColumn === I
1026
+ isMergedMainCell: f.startRow === h && f.startColumn === g
1024
1027
  }
1025
1028
  }, p = {
1026
1029
  unitId: o,
1027
1030
  sheetId: c,
1028
- pluginName: Be,
1031
+ pluginName: Ce,
1029
1032
  selections: [R]
1030
1033
  };
1031
- await d.executeCommand(mr.id, p), setTimeout(() => {
1034
+ await d.executeCommand(dr.id, p), setTimeout(() => {
1032
1035
  n.inputFormula(`=${l}(`);
1033
1036
  }, 0);
1034
1037
  }
1035
- return m.length === 0 ? !1 : d.executeCommand(Mn.id, {
1038
+ return m.length === 0 ? !1 : d.executeCommand(On.id, {
1036
1039
  list: m
1037
1040
  });
1038
1041
  }
1039
1042
  };
1040
- function Ei(i, e, t) {
1041
- const n = Ri(i, e, t);
1043
+ function Ii(i, e, t) {
1044
+ const n = vi(i, e, t);
1042
1045
  if (n !== e)
1043
1046
  return {
1044
1047
  startRow: n,
@@ -1046,7 +1049,7 @@ function Ei(i, e, t) {
1046
1049
  startColumn: t,
1047
1050
  endColumn: t
1048
1051
  };
1049
- const r = gi(i, e, t);
1052
+ const r = Pi(i, e, t);
1050
1053
  return r !== t ? {
1051
1054
  startRow: e,
1052
1055
  endRow: e,
@@ -1054,18 +1057,18 @@ function Ei(i, e, t) {
1054
1057
  endColumn: t - 1
1055
1058
  } : null;
1056
1059
  }
1057
- function Ri(i, e, t) {
1060
+ function vi(i, e, t) {
1058
1061
  let n = !1;
1059
1062
  if (e === 0)
1060
1063
  return e;
1061
1064
  for (let r = e - 1; r >= 0; r--) {
1062
1065
  const a = i.getValue(r, t);
1063
- if (Je(a) && !n) {
1066
+ if (Ze(a) && !n) {
1064
1067
  if (r === 0)
1065
1068
  return 0;
1066
1069
  n = !0;
1067
1070
  } else {
1068
- if (n && !Je(a))
1071
+ if (n && !Ze(a))
1069
1072
  return r + 1;
1070
1073
  if (n && r === 0)
1071
1074
  return 0;
@@ -1073,18 +1076,18 @@ function Ri(i, e, t) {
1073
1076
  }
1074
1077
  return e;
1075
1078
  }
1076
- function gi(i, e, t) {
1079
+ function Pi(i, e, t) {
1077
1080
  let n = !1;
1078
1081
  if (t === 0)
1079
1082
  return t;
1080
1083
  for (let r = t - 1; r >= 0; r--) {
1081
1084
  const a = i.getValue(e, r);
1082
- if (Je(a) && !n) {
1085
+ if (Ze(a) && !n) {
1083
1086
  if (r === 0)
1084
1087
  return 0;
1085
1088
  n = !0;
1086
1089
  } else {
1087
- if (n && !Je(a))
1090
+ if (n && !Ze(a))
1088
1091
  return r + 1;
1089
1092
  if (n && r === 0)
1090
1093
  return 0;
@@ -1092,22 +1095,22 @@ function gi(i, e, t) {
1092
1095
  }
1093
1096
  return t;
1094
1097
  }
1095
- function Je(i) {
1096
- return i && (G.isStringNumber(i.v) || Kn(i) === Yn.NUMBER);
1098
+ function Ze(i) {
1099
+ return i && (K.isStringNumber(i.v) || Xn(i) === Qn.NUMBER);
1097
1100
  }
1098
- const On = `${Tn}_MORE_FUNCTIONS_COMPONENT`, xn = {
1101
+ const xn = `${An}_MORE_FUNCTIONS_COMPONENT`, wn = {
1099
1102
  id: "formula-ui.operation.more-functions",
1100
1103
  type: oe.OPERATION,
1101
- handler: async (i) => (i.get(Dn).open({
1104
+ handler: async (i) => (i.get(yn).open({
1102
1105
  header: { title: "formula.insert.tooltip" },
1103
- children: { label: On }
1106
+ children: { label: xn }
1104
1107
  }), !0)
1105
- }, St = {
1108
+ }, Ct = {
1106
1109
  id: "formula-ui.operation.search-function",
1107
1110
  type: oe.OPERATION,
1108
1111
  handler: async (i, e) => (i.get(de).search(e), !0)
1109
1112
  };
1110
- var wn = { exports: {} }, it = {};
1113
+ var Ln = { exports: {} }, at = {};
1111
1114
  /**
1112
1115
  * @license React
1113
1116
  * react-jsx-runtime.production.min.js
@@ -1117,28 +1120,28 @@ var wn = { exports: {} }, it = {};
1117
1120
  * This source code is licensed under the MIT license found in the
1118
1121
  * LICENSE file in the root directory of this source tree.
1119
1122
  */
1120
- var Ii = Hr, vi = Symbol.for("react.element"), Pi = Symbol.for("react.fragment"), Si = Object.prototype.hasOwnProperty, Bi = Ii.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, ki = { key: !0, ref: !0, __self: !0, __source: !0 };
1123
+ var Si = Wr, Bi = Symbol.for("react.element"), Ci = Symbol.for("react.fragment"), ki = Object.prototype.hasOwnProperty, _i = Si.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Di = { key: !0, ref: !0, __self: !0, __source: !0 };
1121
1124
  function Fn(i, e, t) {
1122
1125
  var n, r = {}, a = null, s = null;
1123
1126
  t !== void 0 && (a = "" + t), e.key !== void 0 && (a = "" + e.key), e.ref !== void 0 && (s = e.ref);
1124
1127
  for (n in e)
1125
- Si.call(e, n) && !ki.hasOwnProperty(n) && (r[n] = e[n]);
1128
+ ki.call(e, n) && !Di.hasOwnProperty(n) && (r[n] = e[n]);
1126
1129
  if (i && i.defaultProps)
1127
1130
  for (n in e = i.defaultProps, e)
1128
1131
  r[n] === void 0 && (r[n] = e[n]);
1129
- return { $$typeof: vi, type: i, key: a, ref: s, props: r, _owner: Bi.current };
1132
+ return { $$typeof: Bi, type: i, key: a, ref: s, props: r, _owner: _i.current };
1130
1133
  }
1131
- it.Fragment = Pi;
1132
- it.jsx = Fn;
1133
- it.jsxs = Fn;
1134
- wn.exports = it;
1135
- var E = wn.exports;
1136
- const Ci = "univer-formula-error-function", _i = {
1137
- formulaErrorFunction: Ci
1134
+ at.Fragment = Ci;
1135
+ at.jsx = Fn;
1136
+ at.jsxs = Fn;
1137
+ Ln.exports = at;
1138
+ var E = Ln.exports;
1139
+ const yi = "univer-formula-error-function", Ti = {
1140
+ formulaErrorFunction: yi
1138
1141
  };
1139
- function Di() {
1140
- const [i, e] = A(!1), [t, n] = A({ left: 0, top: 0 }), r = z(de), a = z(Tt);
1141
- return Ce(() => {
1142
+ function Ai() {
1143
+ const [i, e] = N(!1), [t, n] = N({ left: 0, top: 0 }), r = z(de), a = z(Nt);
1144
+ return _e(() => {
1142
1145
  const s = r.help$.subscribe((o) => {
1143
1146
  const c = a.getState();
1144
1147
  if (!c)
@@ -1154,18 +1157,18 @@ function Di() {
1154
1157
  return () => {
1155
1158
  s == null || s.unsubscribe();
1156
1159
  };
1157
- }, []), i ? /* @__PURE__ */ E.jsx("div", { className: _i.formulaErrorFunction, style: { left: t.left, top: t.top } }) : null;
1160
+ }, []), i ? /* @__PURE__ */ E.jsx("div", { className: Ti.formulaErrorFunction, style: { left: t.left, top: t.top } }) : null;
1158
1161
  }
1159
- var q = function() {
1160
- return q = Object.assign || function(i) {
1162
+ var H = function() {
1163
+ return H = Object.assign || function(i) {
1161
1164
  for (var e, t = 1, n = arguments.length; t < n; t++) {
1162
1165
  e = arguments[t];
1163
1166
  for (var r in e)
1164
1167
  Object.prototype.hasOwnProperty.call(e, r) && (i[r] = e[r]);
1165
1168
  }
1166
1169
  return i;
1167
- }, q.apply(this, arguments);
1168
- }, yi = function(i, e) {
1170
+ }, H.apply(this, arguments);
1171
+ }, Ni = function(i, e) {
1169
1172
  var t = {};
1170
1173
  for (var n in i)
1171
1174
  Object.prototype.hasOwnProperty.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
@@ -1173,17 +1176,17 @@ var q = function() {
1173
1176
  for (var r = 0, n = Object.getOwnPropertySymbols(i); r < n.length; r++)
1174
1177
  e.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, n[r]) && (t[n[r]] = i[n[r]]);
1175
1178
  return t;
1176
- }, Ne = ye(function(i, e) {
1177
- var t = i.icon, n = i.id, r = i.className, a = i.extend, s = yi(i, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = $r("_".concat(Ni()));
1178
- return Ln(t, "".concat(n), { defIds: t.defIds, idSuffix: c.current }, q({ ref: e, className: o }, s), a);
1179
+ }, Me = Te(function(i, e) {
1180
+ var t = i.icon, n = i.id, r = i.className, a = i.extend, s = Ni(i, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = Gr("_".concat(xi()));
1181
+ return zn(t, "".concat(n), { defIds: t.defIds, idSuffix: c.current }, H({ ref: e, className: o }, s), a);
1179
1182
  });
1180
- function Ln(i, e, t, n, r) {
1181
- return Te(i.tag, q(q({ key: e }, Ti(i, t, r)), n), (Ai(i, t).children || []).map(function(a, s) {
1182
- return Ln(a, "".concat(e, "-").concat(i.tag, "-").concat(s), t, void 0, r);
1183
+ function zn(i, e, t, n, r) {
1184
+ return Ae(i.tag, H(H({ key: e }, Mi(i, t, r)), n), (Oi(i, t).children || []).map(function(a, s) {
1185
+ return zn(a, "".concat(e, "-").concat(i.tag, "-").concat(s), t, void 0, r);
1183
1186
  }));
1184
1187
  }
1185
- function Ti(i, e, t) {
1186
- var n = q({}, i.attrs);
1188
+ function Mi(i, e, t) {
1189
+ var n = H({}, i.attrs);
1187
1190
  t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1);
1188
1191
  var r = e.defIds;
1189
1192
  return !r || r.length === 0 || (i.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(a) {
@@ -1191,17 +1194,17 @@ function Ti(i, e, t) {
1191
1194
  typeof o == "string" && (n[s] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
1192
1195
  })), n;
1193
1196
  }
1194
- function Ai(i, e) {
1197
+ function Oi(i, e) {
1195
1198
  var t, n = e.defIds;
1196
- return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? q(q({}, i), { children: i.children.map(function(r) {
1197
- return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? q(q({}, r), { attrs: q(q({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
1199
+ return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? H(H({}, i), { children: i.children.map(function(r) {
1200
+ return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? H(H({}, r), { attrs: H(H({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
1198
1201
  }) }) : i;
1199
1202
  }
1200
- function Ni() {
1203
+ function xi() {
1201
1204
  return Math.random().toString(36).substring(2, 8);
1202
1205
  }
1203
- Ne.displayName = "UniverIcon";
1204
- var Mi = {
1206
+ Me.displayName = "UniverIcon";
1207
+ var wi = {
1205
1208
  tag: "svg",
1206
1209
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1207
1210
  children: [
@@ -1215,16 +1218,16 @@ var Mi = {
1215
1218
  }
1216
1219
  }
1217
1220
  ]
1218
- }, zn = ye(function(i, e) {
1219
- return Te(Ne, Object.assign({}, i, {
1221
+ }, Un = Te(function(i, e) {
1222
+ return Ae(Me, Object.assign({}, i, {
1220
1223
  id: "check-mark-single",
1221
1224
  ref: e,
1222
- icon: Mi
1225
+ icon: wi
1223
1226
  }));
1224
1227
  });
1225
- zn.displayName = "CheckMarkSingle";
1226
- const Oi = zn;
1227
- var xi = {
1228
+ Un.displayName = "CheckMarkSingle";
1229
+ const Li = Un;
1230
+ var Fi = {
1228
1231
  tag: "svg",
1229
1232
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1230
1233
  children: [
@@ -1236,16 +1239,16 @@ var xi = {
1236
1239
  }
1237
1240
  }
1238
1241
  ]
1239
- }, Un = ye(function(i, e) {
1240
- return Te(Ne, Object.assign({}, i, {
1242
+ }, Vn = Te(function(i, e) {
1243
+ return Ae(Me, Object.assign({}, i, {
1241
1244
  id: "close-single",
1242
1245
  ref: e,
1243
- icon: xi
1246
+ icon: Fi
1244
1247
  }));
1245
1248
  });
1246
- Un.displayName = "CloseSingle";
1247
- const wi = Un;
1248
- var Fi = {
1249
+ Vn.displayName = "CloseSingle";
1250
+ const zi = Vn;
1251
+ var Ui = {
1249
1252
  tag: "svg",
1250
1253
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1251
1254
  children: [
@@ -1288,16 +1291,16 @@ var Fi = {
1288
1291
  ]
1289
1292
  }
1290
1293
  ]
1291
- }, Vn = ye(function(i, e) {
1292
- return Te(Ne, Object.assign({}, i, {
1294
+ }, qn = Te(function(i, e) {
1295
+ return Ae(Me, Object.assign({}, i, {
1293
1296
  id: "details-single",
1294
1297
  ref: e,
1295
- icon: Fi
1298
+ icon: Ui
1296
1299
  }));
1297
1300
  });
1298
- Vn.displayName = "DetailsSingle";
1299
- const Li = Vn;
1300
- var zi = {
1301
+ qn.displayName = "DetailsSingle";
1302
+ const Vi = qn;
1303
+ var qi = {
1301
1304
  tag: "svg",
1302
1305
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1303
1306
  children: [
@@ -1311,45 +1314,45 @@ var zi = {
1311
1314
  }
1312
1315
  }
1313
1316
  ]
1314
- }, qn = ye(function(i, e) {
1315
- return Te(Ne, Object.assign({}, i, {
1317
+ }, Hn = Te(function(i, e) {
1318
+ return Ae(Me, Object.assign({}, i, {
1316
1319
  id: "more-single",
1317
1320
  ref: e,
1318
- icon: zi
1321
+ icon: qi
1319
1322
  }));
1320
1323
  });
1321
- qn.displayName = "MoreSingle";
1322
- const Ui = qn, Vi = "univer-formula-help-function", qi = "univer-formula-help-function-title", Hi = "univer-formula-help-function-title-icons", $i = "univer-formula-help-function-title-icon", ji = "univer-formula-help-function-content", Wi = "univer-formula-help-function-content-inner", Gi = "univer-formula-help-function-content-params", Xi = "univer-formula-help-function-content-params-title", Ki = "univer-formula-help-function-content-params-detail", Yi = "univer-formula-help-function-active", Qi = "univer-formula-help-decorator", V = {
1323
- formulaHelpFunction: Vi,
1324
- formulaHelpFunctionTitle: qi,
1325
- formulaHelpFunctionTitleIcons: Hi,
1326
- formulaHelpFunctionTitleIcon: $i,
1327
- formulaHelpFunctionContent: ji,
1328
- formulaHelpFunctionContentInner: Wi,
1329
- formulaHelpFunctionContentParams: Gi,
1330
- formulaHelpFunctionContentParamsTitle: Xi,
1331
- formulaHelpFunctionContentParamsDetail: Ki,
1332
- formulaHelpFunctionActive: Yi,
1333
- formulaHelpDecorator: Qi
1324
+ Hn.displayName = "MoreSingle";
1325
+ const Hi = Hn, $i = "univer-formula-help-function", ji = "univer-formula-help-function-title", Wi = "univer-formula-help-function-title-icons", Gi = "univer-formula-help-function-title-icon", Ki = "univer-formula-help-function-content", Yi = "univer-formula-help-function-content-inner", Xi = "univer-formula-help-function-content-params", Qi = "univer-formula-help-function-content-params-title", Ji = "univer-formula-help-function-content-params-detail", Zi = "univer-formula-help-function-active", ea = "univer-formula-help-decorator", V = {
1326
+ formulaHelpFunction: $i,
1327
+ formulaHelpFunctionTitle: ji,
1328
+ formulaHelpFunctionTitleIcons: Wi,
1329
+ formulaHelpFunctionTitleIcon: Gi,
1330
+ formulaHelpFunctionContent: Ki,
1331
+ formulaHelpFunctionContentInner: Yi,
1332
+ formulaHelpFunctionContentParams: Xi,
1333
+ formulaHelpFunctionContentParamsTitle: Qi,
1334
+ formulaHelpFunctionContentParamsDetail: Ji,
1335
+ formulaHelpFunctionActive: Zi,
1336
+ formulaHelpDecorator: ea
1334
1337
  };
1335
- function Ji() {
1336
- const [i, e] = A(!1), [t, n] = A(!0), [r, a] = A(!0), [s, o] = A(0), [c, u] = A([0, 0]), [l, d] = A({ left: 0, top: 0 }), [m, b] = A(null), h = z(de), I = z(Tt), f = z(_e), R = z(kn), p = z(kt), g = f.t("formula.prompt.required"), C = f.t("formula.prompt.optional");
1337
- Ce(() => {
1338
- const v = h.help$.subscribe((P) => {
1339
- const { visible: _, paramIndex: N, functionInfo: B } = P;
1338
+ function ta() {
1339
+ const [i, e] = N(!1), [t, n] = N(!0), [r, a] = N(!0), [s, o] = N(0), [c, u] = N([0, 0]), [l, d] = N({ left: 0, top: 0 }), [m, b] = N(null), h = z(de), g = z(Nt), f = z(De), R = z(kn), p = z(_t), I = f.t("formula.prompt.required"), C = f.t("formula.prompt.optional");
1340
+ _e(() => {
1341
+ const v = h.help$.subscribe((B) => {
1342
+ const { visible: _, paramIndex: A, functionInfo: P } = B;
1340
1343
  if (!_) {
1341
1344
  e(_);
1342
1345
  return;
1343
1346
  }
1344
- const D = p.getContextValue(on) ? R.getPosition() : I.getRect();
1347
+ const D = p.getContextValue(cn) ? R.getPosition() : g.getRect();
1345
1348
  if (D == null)
1346
1349
  return;
1347
- const { left: $, top: U, height: ce } = D, be = {
1348
- functionName: B.functionName,
1349
- functionType: B.functionType,
1350
- description: f.t(B.description),
1351
- abstract: f.t(B.abstract),
1352
- functionParameter: B.functionParameter.map((ue) => ({
1350
+ const { left: j, top: U, height: ce } = D, be = {
1351
+ functionName: P.functionName,
1352
+ functionType: P.functionType,
1353
+ description: f.t(P.description),
1354
+ abstract: f.t(P.abstract),
1355
+ functionParameter: P.functionParameter.map((ue) => ({
1353
1356
  name: f.t(ue.name),
1354
1357
  detail: f.t(ue.detail),
1355
1358
  example: ue.example,
@@ -1357,7 +1360,7 @@ function Ji() {
1357
1360
  repeat: ue.repeat
1358
1361
  }))
1359
1362
  };
1360
- u([$, U + ce]), o(N), b(be), d({ left: $, top: U }), e(_);
1363
+ u([j, U + ce]), o(A), b(be), d({ left: j, top: U }), e(_);
1361
1364
  });
1362
1365
  return () => {
1363
1366
  v == null || v.unsubscribe();
@@ -1366,10 +1369,10 @@ function Ji() {
1366
1369
  function S(v) {
1367
1370
  o(v);
1368
1371
  }
1369
- return /* @__PURE__ */ E.jsx(E.Fragment, { children: r ? /* @__PURE__ */ E.jsx(yn, { visible: i, offset: c, children: m ? /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunction, children: [
1372
+ return /* @__PURE__ */ E.jsx(E.Fragment, { children: r ? /* @__PURE__ */ E.jsx(Tn, { visible: i, offset: c, children: m ? /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunction, children: [
1370
1373
  /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionTitle, children: [
1371
1374
  /* @__PURE__ */ E.jsx(
1372
- Zi,
1375
+ na,
1373
1376
  {
1374
1377
  prefix: m.functionName,
1375
1378
  value: m.functionParameter,
@@ -1384,7 +1387,7 @@ function Ji() {
1384
1387
  className: V.formulaHelpFunctionTitleIcon,
1385
1388
  style: { transform: t ? "rotateZ(-90deg)" : "rotateZ(90deg)" },
1386
1389
  onClick: () => n(!t),
1387
- children: /* @__PURE__ */ E.jsx(Ui, {})
1390
+ children: /* @__PURE__ */ E.jsx(Hi, {})
1388
1391
  }
1389
1392
  ),
1390
1393
  /* @__PURE__ */ E.jsx(
@@ -1392,7 +1395,7 @@ function Ji() {
1392
1395
  {
1393
1396
  className: V.formulaHelpFunctionTitleIcon,
1394
1397
  onClick: () => a(!r),
1395
- children: /* @__PURE__ */ E.jsx(wi, {})
1398
+ children: /* @__PURE__ */ E.jsx(zi, {})
1396
1399
  }
1397
1400
  )
1398
1401
  ] })
@@ -1407,27 +1410,27 @@ function Ji() {
1407
1410
  },
1408
1411
  children: /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionContentInner, children: [
1409
1412
  /* @__PURE__ */ E.jsx(
1410
- lt,
1413
+ dt,
1411
1414
  {
1412
1415
  title: f.t("formula.prompt.helpExample"),
1413
1416
  value: `${m.functionName}(${m.functionParameter.map((v) => v.example).join(",")})`
1414
1417
  }
1415
1418
  ),
1416
1419
  /* @__PURE__ */ E.jsx(
1417
- lt,
1420
+ dt,
1418
1421
  {
1419
1422
  title: f.t("formula.prompt.helpAbstract"),
1420
1423
  value: m.description
1421
1424
  }
1422
1425
  ),
1423
- m && m.functionParameter && m.functionParameter.map((v, P) => /* @__PURE__ */ E.jsx(
1424
- lt,
1426
+ m && m.functionParameter && m.functionParameter.map((v, B) => /* @__PURE__ */ E.jsx(
1427
+ dt,
1425
1428
  {
1426
- className: s === P ? V.formulaHelpFunctionActive : "",
1429
+ className: s === B ? V.formulaHelpFunctionActive : "",
1427
1430
  title: v.name,
1428
- value: `${v.require ? g : C} ${v.detail}`
1431
+ value: `${v.require ? I : C} ${v.detail}`
1429
1432
  },
1430
- P
1433
+ B
1431
1434
  ))
1432
1435
  ] })
1433
1436
  }
@@ -1438,14 +1441,14 @@ function Ji() {
1438
1441
  className: V.formulaHelpDecorator,
1439
1442
  onClick: () => a(!r),
1440
1443
  style: { left: l.left - 24, top: l.top },
1441
- children: /* @__PURE__ */ E.jsx(Li, {})
1444
+ children: /* @__PURE__ */ E.jsx(Vi, {})
1442
1445
  }
1443
1446
  ) : /* @__PURE__ */ E.jsx(E.Fragment, {}) });
1444
1447
  }
1445
- const lt = (i) => /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionContentParams, children: [
1448
+ const dt = (i) => /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionContentParams, children: [
1446
1449
  /* @__PURE__ */ E.jsx("div", { className: `${V.formulaHelpFunctionContentParamsTitle} ${i.className}`, children: i.title }),
1447
1450
  /* @__PURE__ */ E.jsx("div", { className: V.formulaHelpFunctionContentParamsDetail, children: i.value })
1448
- ] }), Zi = (i) => {
1451
+ ] }), na = (i) => {
1449
1452
  const { prefix: e, value: t, active: n, onClick: r } = i;
1450
1453
  return /* @__PURE__ */ E.jsxs("div", { children: [
1451
1454
  /* @__PURE__ */ E.jsxs("span", { children: [
@@ -1468,58 +1471,58 @@ const lt = (i) => /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFuncti
1468
1471
  )),
1469
1472
  ")"
1470
1473
  ] });
1471
- }, ea = "univer-formula-search-function", ta = "univer-formula-search-function-item", na = "univer-formula-search-function-item-name", ra = "univer-formula-search-function-item-name-light", ia = "univer-formula-search-function-item-desc", aa = "univer-formula-search-function-item-active", fe = {
1472
- formulaSearchFunction: ea,
1473
- formulaSearchFunctionItem: ta,
1474
- formulaSearchFunctionItemName: na,
1475
- formulaSearchFunctionItemNameLight: ra,
1476
- formulaSearchFunctionItemDesc: ia,
1477
- formulaSearchFunctionItemActive: aa
1474
+ }, ra = "univer-formula-search-function", ia = "univer-formula-search-function-item", aa = "univer-formula-search-function-item-name", sa = "univer-formula-search-function-item-name-light", oa = "univer-formula-search-function-item-desc", ca = "univer-formula-search-function-item-active", fe = {
1475
+ formulaSearchFunction: ra,
1476
+ formulaSearchFunctionItem: ia,
1477
+ formulaSearchFunctionItemName: aa,
1478
+ formulaSearchFunctionItemNameLight: sa,
1479
+ formulaSearchFunctionItemDesc: oa,
1480
+ formulaSearchFunctionItemActive: ca
1478
1481
  };
1479
- function sa() {
1480
- const [i, e] = A(!1), [t, n] = A(0), [r, a] = A([0, 0]), [s, o] = A([]), [c, u] = A(""), l = z(de), d = z(Tt), m = z(kn), b = z(kt);
1481
- Ce(() => {
1482
+ function ua() {
1483
+ const [i, e] = N(!1), [t, n] = N(0), [r, a] = N([0, 0]), [s, o] = N([]), [c, u] = N(""), l = z(de), d = z(Nt), m = z(kn), b = z(_t);
1484
+ _e(() => {
1482
1485
  let f = [], R = 0;
1483
1486
  const p = l.search$.subscribe((S) => {
1484
- const { visible: v, searchText: P, searchList: _ } = S;
1487
+ const { visible: v, searchText: B, searchList: _ } = S;
1485
1488
  if (!v) {
1486
1489
  e(v);
1487
1490
  return;
1488
1491
  }
1489
- const B = b.getContextValue(on) ? m.getPosition() : d.getRect();
1490
- if (B == null)
1492
+ const P = b.getContextValue(cn) ? m.getPosition() : d.getRect();
1493
+ if (P == null)
1491
1494
  return;
1492
- const { left: T, top: D, height: $ } = B;
1493
- u(P), o(_), f = _, a([T, D + $]), e(v), n(0), R = 0;
1494
- }), g = l.navigate$.subscribe((S) => {
1495
+ const { left: T, top: D, height: j } = P;
1496
+ u(B), o(_), f = _, a([T, D + j]), e(v), n(0), R = 0;
1497
+ }), I = l.navigate$.subscribe((S) => {
1495
1498
  const { direction: v } = S;
1496
1499
  if (v === M.UP) {
1497
- let P = R - 1;
1498
- P = P < 0 ? f.length - 1 : P, n(P), R = P;
1500
+ let B = R - 1;
1501
+ B = B < 0 ? f.length - 1 : B, n(B), R = B;
1499
1502
  } else if (v === M.DOWN) {
1500
- let P = R + 1;
1501
- P = P >= f.length ? 0 : P, n(P), R = P;
1503
+ let B = R + 1;
1504
+ B = B >= f.length ? 0 : B, n(B), R = B;
1502
1505
  }
1503
1506
  }), C = l.accept$.subscribe((S) => {
1504
1507
  const v = f[R].name;
1505
1508
  l.acceptFormulaName(v);
1506
1509
  });
1507
1510
  return () => {
1508
- p == null || p.unsubscribe(), g == null || g.unsubscribe(), C == null || C.unsubscribe();
1511
+ p == null || p.unsubscribe(), I == null || I.unsubscribe(), C == null || C.unsubscribe();
1509
1512
  };
1510
1513
  }, []);
1511
1514
  function h(f) {
1512
1515
  n(f);
1513
1516
  }
1514
- function I() {
1517
+ function g() {
1515
1518
  n(-1);
1516
1519
  }
1517
- return /* @__PURE__ */ E.jsx(yn, { visible: i, offset: r, children: /* @__PURE__ */ E.jsx("ul", { className: fe.formulaSearchFunction, children: s.map((f, R) => /* @__PURE__ */ E.jsxs(
1520
+ return /* @__PURE__ */ E.jsx(Tn, { visible: i, offset: r, children: /* @__PURE__ */ E.jsx("ul", { className: fe.formulaSearchFunction, children: s.map((f, R) => /* @__PURE__ */ E.jsxs(
1518
1521
  "li",
1519
1522
  {
1520
1523
  className: t === R ? `${fe.formulaSearchFunctionItem} ${fe.formulaSearchFunctionItemActive}` : fe.formulaSearchFunctionItem,
1521
1524
  onMouseEnter: () => h(R),
1522
- onMouseLeave: I,
1525
+ onMouseLeave: g,
1523
1526
  onClick: () => l.acceptFormulaName(f.name),
1524
1527
  children: [
1525
1528
  /* @__PURE__ */ E.jsxs("span", { className: fe.formulaSearchFunctionItemName, children: [
@@ -1532,18 +1535,18 @@ function sa() {
1532
1535
  R
1533
1536
  )) }) });
1534
1537
  }
1535
- function oa() {
1538
+ function ma() {
1536
1539
  return /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
1537
- /* @__PURE__ */ E.jsx(sa, {}),
1538
- /* @__PURE__ */ E.jsx(Ji, {}),
1539
- /* @__PURE__ */ E.jsx(Di, {})
1540
+ /* @__PURE__ */ E.jsx(ua, {}),
1541
+ /* @__PURE__ */ E.jsx(ta, {}),
1542
+ /* @__PURE__ */ E.jsx(Ai, {})
1540
1543
  ] });
1541
1544
  }
1542
- const ca = "univer-formula-more-functions", ua = "univer-formula-more-functions-operation", Zt = {
1543
- formulaMoreFunctions: ca,
1544
- formulaMoreFunctionsOperation: ua
1545
+ const fa = "univer-formula-more-functions", la = "univer-formula-more-functions-operation", en = {
1546
+ formulaMoreFunctions: fa,
1547
+ formulaMoreFunctionsOperation: la
1545
1548
  };
1546
- function Hn(i) {
1549
+ function $n(i) {
1547
1550
  const { prefix: e, value: t } = i;
1548
1551
  return /* @__PURE__ */ E.jsxs("div", { children: [
1549
1552
  /* @__PURE__ */ E.jsxs("span", { children: [
@@ -1557,28 +1560,28 @@ function Hn(i) {
1557
1560
  ")"
1558
1561
  ] });
1559
1562
  }
1560
- const ma = "univer-formula-function-params", fa = "univer-formula-function-params-title", la = "univer-formula-function-params-detail", dt = {
1561
- formulaFunctionParams: ma,
1562
- formulaFunctionParamsTitle: fa,
1563
- formulaFunctionParamsDetail: la
1563
+ const da = "univer-formula-function-params", ba = "univer-formula-function-params-title", pa = "univer-formula-function-params-detail", bt = {
1564
+ formulaFunctionParams: da,
1565
+ formulaFunctionParamsTitle: ba,
1566
+ formulaFunctionParamsDetail: pa
1564
1567
  };
1565
1568
  function ke(i) {
1566
1569
  const { className: e, value: t, title: n } = i;
1567
- return /* @__PURE__ */ E.jsxs("div", { className: dt.formulaFunctionParams, children: [
1568
- /* @__PURE__ */ E.jsx("div", { className: `${dt.formulaFunctionParamsTitle} ${e}`, children: n }),
1569
- /* @__PURE__ */ E.jsx("div", { className: dt.formulaFunctionParamsDetail, children: t })
1570
+ return /* @__PURE__ */ E.jsxs("div", { className: bt.formulaFunctionParams, children: [
1571
+ /* @__PURE__ */ E.jsx("div", { className: `${bt.formulaFunctionParamsTitle} ${e}`, children: n }),
1572
+ /* @__PURE__ */ E.jsx("div", { className: bt.formulaFunctionParamsDetail, children: t })
1570
1573
  ] });
1571
1574
  }
1572
- const da = "univer-formula-input-params-list", ba = "univer-formula-input-params-list-item-name", pa = "univer-formula-input-params-list-item-selector", Se = {
1573
- formulaInputParamsList: da,
1574
- formulaInputParamsListItemName: ba,
1575
- formulaInputParamsListItemSelector: pa
1575
+ const ha = "univer-formula-input-params-list", Ea = "univer-formula-input-params-list-item-name", Ra = "univer-formula-input-params-list-item-selector", Be = {
1576
+ formulaInputParamsList: ha,
1577
+ formulaInputParamsListItemName: Ea,
1578
+ formulaInputParamsListItemSelector: Ra
1576
1579
  };
1577
- function ha(i) {
1580
+ function ga(i) {
1578
1581
  const { functionInfo: e, onChange: t } = i;
1579
1582
  if (!e)
1580
1583
  return null;
1581
- const [n, r] = A([]), [a, s] = A(e.functionParameter), [o, c] = A(-1);
1584
+ const [n, r] = N([]), [a, s] = N(e.functionParameter), [o, c] = N(-1);
1582
1585
  function u(d, m) {
1583
1586
  const b = [...n];
1584
1587
  b[m] = d, r(b), t(b);
@@ -1590,31 +1593,122 @@ function ha(i) {
1590
1593
  }
1591
1594
  c(d);
1592
1595
  }
1593
- return /* @__PURE__ */ E.jsxs("div", { className: Se.formulaInputParams, children: [
1594
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsList, children: a.map((d, m) => /* @__PURE__ */ E.jsxs("div", { children: [
1595
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsListItemName, children: d.name }),
1596
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsListItemSelector, children: /* @__PURE__ */ E.jsx(
1597
- Dr,
1596
+ return /* @__PURE__ */ E.jsxs("div", { className: Be.formulaInputParams, children: [
1597
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsList, children: a.map((d, m) => /* @__PURE__ */ E.jsxs("div", { children: [
1598
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsListItemName, children: d.name }),
1599
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsListItemSelector, children: /* @__PURE__ */ E.jsx(
1600
+ Ar,
1598
1601
  {
1599
1602
  onChange: (b) => u(b, m),
1600
1603
  onActive: () => l(m)
1601
1604
  }
1602
1605
  ) })
1603
1606
  ] }, m)) }),
1604
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsInfo, children: /* @__PURE__ */ E.jsx(
1607
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsInfo, children: /* @__PURE__ */ E.jsx(
1605
1608
  ke,
1606
1609
  {
1607
- title: o === -1 ? /* @__PURE__ */ E.jsx(Hn, { prefix: e.functionName, value: a }) : a[o].name,
1610
+ title: o === -1 ? /* @__PURE__ */ E.jsx($n, { prefix: e.functionName, value: a }) : a[o].name,
1608
1611
  value: o === -1 ? e.description : a[o].detail
1609
1612
  }
1610
1613
  ) })
1611
1614
  ] });
1612
1615
  }
1613
- const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka = [], Ca = [], _a = [
1616
+ const Ia = [
1617
+ {
1618
+ functionName: ir.MAKEARRAY,
1619
+ aliasFunctionName: "formula.functionList.MAKEARRAY.aliasFunctionName",
1620
+ functionType: q.Array,
1621
+ description: "formula.functionList.MAKEARRAY.description",
1622
+ abstract: "formula.functionList.MAKEARRAY.abstract",
1623
+ functionParameter: [
1624
+ {
1625
+ name: "formula.functionList.MAKEARRAY.functionParameter.number1.name",
1626
+ detail: "formula.functionList.MAKEARRAY.functionParameter.number1.detail",
1627
+ example: "8",
1628
+ require: 1,
1629
+ repeat: 0
1630
+ },
1631
+ {
1632
+ name: "formula.functionList.MAKEARRAY.functionParameter.number2.name",
1633
+ detail: "formula.functionList.MAKEARRAY.functionParameter.number2.detail",
1634
+ example: "7",
1635
+ require: 1,
1636
+ repeat: 0
1637
+ },
1638
+ {
1639
+ name: "formula.functionList.MAKEARRAY.functionParameter.value3.name",
1640
+ detail: "formula.functionList.MAKEARRAY.functionParameter.value3.detail",
1641
+ example: "LAMBDA(r,c, r*c)",
1642
+ require: 1,
1643
+ repeat: 0
1644
+ }
1645
+ ]
1646
+ }
1647
+ ], va = [], Pa = [], Sa = [], Ba = [], Ca = [], ka = [], _a = [], Da = [], ya = [], Ta = [
1648
+ {
1649
+ functionName: pe.ABS,
1650
+ functionType: q.Math,
1651
+ description: "formula.functionList.ABS.description",
1652
+ abstract: "formula.functionList.ABS.abstract",
1653
+ functionParameter: [
1654
+ {
1655
+ name: "formula.functionList.ABS.functionParameter.number.name",
1656
+ detail: "formula.functionList.ABS.functionParameter.number.detail",
1657
+ example: "A1:A20",
1658
+ require: 1,
1659
+ repeat: 0
1660
+ }
1661
+ ]
1662
+ },
1614
1663
  {
1615
- functionName: zt.SUM,
1664
+ functionName: pe.ACOS,
1665
+ functionType: q.Math,
1666
+ description: "formula.functionList.ACOS.description",
1667
+ abstract: "formula.functionList.ACOS.abstract",
1668
+ functionParameter: [
1669
+ {
1670
+ name: "formula.functionList.ACOS.functionParameter.number.name",
1671
+ detail: "formula.functionList.ACOS.functionParameter.number.detail",
1672
+ example: "A1:A20",
1673
+ require: 1,
1674
+ repeat: 0
1675
+ }
1676
+ ]
1677
+ },
1678
+ {
1679
+ functionName: pe.ACOSH,
1680
+ functionType: q.Math,
1681
+ description: "formula.functionList.ACOSH.description",
1682
+ abstract: "formula.functionList.ACOSH.abstract",
1683
+ functionParameter: [
1684
+ {
1685
+ name: "formula.functionList.ACOSH.functionParameter.number.name",
1686
+ detail: "formula.functionList.ACOSH.functionParameter.number.detail",
1687
+ example: "A1:A20",
1688
+ require: 1,
1689
+ repeat: 0
1690
+ }
1691
+ ]
1692
+ },
1693
+ {
1694
+ functionName: pe.ACOT,
1695
+ functionType: q.Math,
1696
+ description: "formula.functionList.ACOT.description",
1697
+ abstract: "formula.functionList.ACOT.abstract",
1698
+ functionParameter: [
1699
+ {
1700
+ name: "formula.functionList.ACOT.functionParameter.number.name",
1701
+ detail: "formula.functionList.ACOT.functionParameter.number.detail",
1702
+ example: "A1:A20",
1703
+ require: 1,
1704
+ repeat: 0
1705
+ }
1706
+ ]
1707
+ },
1708
+ {
1709
+ functionName: pe.SUM,
1616
1710
  aliasFunctionName: "formula.functionList.SUM.aliasFunctionName",
1617
- functionType: ne.Math,
1711
+ functionType: q.Math,
1618
1712
  description: "formula.functionList.SUM.description",
1619
1713
  abstract: "formula.functionList.SUM.abstract",
1620
1714
  functionParameter: [
@@ -1635,9 +1729,9 @@ const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka
1635
1729
  ]
1636
1730
  },
1637
1731
  {
1638
- functionName: zt.SUMIF,
1732
+ functionName: pe.SUMIF,
1639
1733
  aliasFunctionName: "formula.functionList.SUMIF.aliasFunctionName",
1640
- functionType: ne.Math,
1734
+ functionType: q.Math,
1641
1735
  description: "formula.functionList.SUMIF.description",
1642
1736
  abstract: "formula.functionList.SUMIF.abstract",
1643
1737
  functionParameter: [
@@ -1664,11 +1758,11 @@ const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka
1664
1758
  }
1665
1759
  ]
1666
1760
  }
1667
- ], Da = [
1761
+ ], Aa = [
1668
1762
  {
1669
- functionName: Pe.AVERAGE,
1763
+ functionName: Se.AVERAGE,
1670
1764
  aliasFunctionName: "formula.functionList.AVERAGE.aliasFunctionName",
1671
- functionType: ne.Statistical,
1765
+ functionType: q.Statistical,
1672
1766
  description: "formula.functionList.AVERAGE.description",
1673
1767
  abstract: "formula.functionList.AVERAGE.abstract",
1674
1768
  functionParameter: [
@@ -1689,9 +1783,9 @@ const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka
1689
1783
  ]
1690
1784
  },
1691
1785
  {
1692
- functionName: Pe.MAX,
1786
+ functionName: Se.MAX,
1693
1787
  aliasFunctionName: "formula.functionList.MAX.aliasFunctionName",
1694
- functionType: ne.Statistical,
1788
+ functionType: q.Statistical,
1695
1789
  description: "formula.functionList.MAX.description",
1696
1790
  abstract: "formula.functionList.MAX.abstract",
1697
1791
  functionParameter: [
@@ -1712,9 +1806,9 @@ const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka
1712
1806
  ]
1713
1807
  },
1714
1808
  {
1715
- functionName: Pe.COUNT,
1809
+ functionName: Se.COUNT,
1716
1810
  aliasFunctionName: "formula.functionList.COUNT.aliasFunctionName",
1717
- functionType: ne.Statistical,
1811
+ functionType: q.Statistical,
1718
1812
  description: "formula.functionList.COUNT.description",
1719
1813
  abstract: "formula.functionList.COUNT.abstract",
1720
1814
  functionParameter: [
@@ -1735,9 +1829,9 @@ const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka
1735
1829
  ]
1736
1830
  },
1737
1831
  {
1738
- functionName: Pe.MIN,
1832
+ functionName: Se.MIN,
1739
1833
  aliasFunctionName: "formula.functionList.MIN.aliasFunctionName",
1740
- functionType: ne.Statistical,
1834
+ functionType: q.Statistical,
1741
1835
  description: "formula.functionList.MIN.description",
1742
1836
  abstract: "formula.functionList.MIN.abstract",
1743
1837
  functionParameter: [
@@ -1758,9 +1852,9 @@ const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka
1758
1852
  ]
1759
1853
  },
1760
1854
  {
1761
- functionName: Pe.COUNTA,
1855
+ functionName: Se.COUNTA,
1762
1856
  aliasFunctionName: "formula.functionList.COUNTA.aliasFunctionName",
1763
- functionType: ne.Statistical,
1857
+ functionType: q.Statistical,
1764
1858
  description: "formula.functionList.COUNT_A.description",
1765
1859
  abstract: "formula.functionList.COUNT_A.abstract",
1766
1860
  functionParameter: [
@@ -1780,40 +1874,40 @@ const Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka
1780
1874
  }
1781
1875
  ]
1782
1876
  }
1783
- ], ya = [], Ta = [], Aa = [], Na = [
1877
+ ], Na = [], Ma = [], Oa = [], xa = [
1878
+ ...ka,
1879
+ ...Ba,
1880
+ ...Ta,
1881
+ ...Aa,
1882
+ ...ya,
1784
1883
  ...Sa,
1785
- ...va,
1786
- ..._a,
1884
+ ...Na,
1787
1885
  ...Da,
1886
+ ..._a,
1788
1887
  ...Ca,
1789
- ...Ia,
1790
- ...ya,
1791
- ...ka,
1792
- ...Ba,
1793
1888
  ...Pa,
1794
- ...ga,
1795
- ...Ra,
1796
- ...Aa,
1797
- ...Ea,
1798
- ...Ta
1889
+ ...va,
1890
+ ...Oa,
1891
+ ...Ia,
1892
+ ...Ma
1799
1893
  ];
1800
- function Ma(i, e) {
1894
+ function wa(i, e) {
1801
1895
  return Object.keys(i).filter((t) => isNaN(Number(t))).map((t) => ({
1802
1896
  label: e.t(`formula.functionType.${t.toLocaleLowerCase()}`),
1803
1897
  value: `${i[t]}`
1804
1898
  }));
1805
1899
  }
1806
- function Oa(i, e) {
1900
+ function La(i, e) {
1807
1901
  let t = "";
1808
1902
  return i.aliasFunctionName ? (t = e.t(i.aliasFunctionName), t === i.aliasFunctionName && (t = i.functionName)) : t = i.functionName, t;
1809
1903
  }
1810
- var xa = Object.defineProperty, wa = Object.getOwnPropertyDescriptor, Fa = (i, e, t, n) => {
1811
- for (var r = n > 1 ? void 0 : n ? wa(e, t) : e, a = i.length - 1, s; a >= 0; a--)
1904
+ var Fa = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Ua = (i, e, t, n) => {
1905
+ for (var r = n > 1 ? void 0 : n ? za(e, t) : e, a = i.length - 1, s; a >= 0; a--)
1812
1906
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
1813
- return n && r && xa(e, t, r), r;
1814
- }, en = (i, e) => (t, n) => e(t, n, i);
1815
- const wt = Ze("formula-ui.description-service");
1816
- let Bt = class {
1907
+ return n && r && Fa(e, t, r), r;
1908
+ }, tn = (i, e) => (t, n) => e(t, n, i);
1909
+ const Ft = et("formula-ui.description-service");
1910
+ let kt = class {
1817
1911
  constructor(i, e, t) {
1818
1912
  this._description = i, this._functionService = e, this._localeService = t, this._initialize(), this._registerDescription();
1819
1913
  }
@@ -1836,6 +1930,13 @@ let Bt = class {
1836
1930
  r.indexOf(i) > -1 && e.push({ name: r, desc: a });
1837
1931
  }), e;
1838
1932
  }
1933
+ getSearchListByNameFirstLetter(i) {
1934
+ const e = [], t = this._functionService.getDescriptions();
1935
+ return i = i.toLocaleUpperCase(), t.forEach((n) => {
1936
+ const { functionName: r, abstract: a } = n;
1937
+ r.indexOf(i) === 0 && e.push({ name: r, desc: a });
1938
+ }), e;
1939
+ }
1839
1940
  getSearchListByType(i) {
1840
1941
  const e = [];
1841
1942
  return this._functionService.getDescriptions().forEach((n) => {
@@ -1849,8 +1950,8 @@ let Bt = class {
1849
1950
  });
1850
1951
  }
1851
1952
  _registerDescription() {
1852
- const i = this._localeService, t = Na.concat(this._description || []).map((n) => ({
1853
- functionName: Oa(n, i),
1953
+ const i = this._localeService, t = xa.concat(this._description || []).map((n) => ({
1954
+ functionName: La(n, i),
1854
1955
  functionType: n.functionType,
1855
1956
  description: i.t(n.description),
1856
1957
  abstract: i.t(n.abstract),
@@ -1865,43 +1966,43 @@ let Bt = class {
1865
1966
  this._functionService.registerDescriptions(...t);
1866
1967
  }
1867
1968
  };
1868
- Bt = Fa([
1869
- en(1, nr),
1870
- en(2, y(_e))
1871
- ], Bt);
1872
- const La = "univer-formula-select-function-select", za = "univer-formula-select-function-result", Ua = "univer-formula-select-function-result-item", Va = "univer-formula-select-function-result-item-name-light", qa = "univer-formula-select-function-result-item-selected", Ha = "univer-formula-select-function-result-item-active", $a = "univer-formula-select-function-content", te = {
1873
- formulaSelectFunctionSelect: La,
1874
- formulaSelectFunctionResult: za,
1875
- formulaSelectFunctionResultItem: Ua,
1876
- formulaSelectFunctionResultItemNameLight: Va,
1877
- formulaSelectFunctionResultItemSelected: qa,
1878
- formulaSelectFunctionResultItemActive: Ha,
1879
- formulaSelectFunctionContent: $a
1969
+ kt = Ua([
1970
+ tn(1, ar),
1971
+ tn(2, y(De))
1972
+ ], kt);
1973
+ const Va = "univer-formula-select-function-select", qa = "univer-formula-select-function-result", Ha = "univer-formula-select-function-result-item", $a = "univer-formula-select-function-result-item-name-light", ja = "univer-formula-select-function-result-item-selected", Wa = "univer-formula-select-function-result-item-active", Ga = "univer-formula-select-function-content", ne = {
1974
+ formulaSelectFunctionSelect: Va,
1975
+ formulaSelectFunctionResult: qa,
1976
+ formulaSelectFunctionResultItem: Ha,
1977
+ formulaSelectFunctionResultItemNameLight: $a,
1978
+ formulaSelectFunctionResultItemSelected: ja,
1979
+ formulaSelectFunctionResultItemActive: Wa,
1980
+ formulaSelectFunctionContent: Ga
1880
1981
  };
1881
- function ja(i) {
1882
- const { onChange: e } = i, t = "-1", [n, r] = A(""), [a, s] = A([]), [o, c] = A(0), [u, l] = A(t), [d, m] = A(0), [b, h] = A(null), I = z(wt), f = z(_e), R = Ma(ne, f);
1982
+ function Ka(i) {
1983
+ const { onChange: e } = i, t = "-1", [n, r] = N(""), [a, s] = N([]), [o, c] = N(0), [u, l] = N(t), [d, m] = N(0), [b, h] = N(null), g = z(Ft), f = z(De), R = wa(q, f);
1883
1984
  R.unshift({
1884
1985
  label: f.t("formula.moreFunctions.allFunctions"),
1885
1986
  value: t
1886
1987
  });
1887
- const p = f.t("formula.prompt.required"), g = f.t("formula.prompt.optional");
1888
- Ce(() => {
1988
+ const p = f.t("formula.prompt.required"), I = f.t("formula.prompt.optional");
1989
+ _e(() => {
1889
1990
  v(t);
1890
- }, []), Ce(() => {
1991
+ }, []), _e(() => {
1891
1992
  S(0);
1892
1993
  }, [a]);
1893
1994
  const C = (T) => {
1894
1995
  if (n.trim() === "")
1895
1996
  return T;
1896
1997
  const D = new RegExp(`(${n.toLocaleUpperCase()})`);
1897
- return T.split(D).filter(Boolean).map((U, ce) => U.match(D) ? /* @__PURE__ */ E.jsx("span", { className: te.formulaSelectFunctionResultItemNameLight, children: U }, ce) : U);
1998
+ return T.split(D).filter(Boolean).map((U, ce) => U.match(D) ? /* @__PURE__ */ E.jsx("span", { className: ne.formulaSelectFunctionResultItemNameLight, children: U }, ce) : U);
1898
1999
  }, S = (T) => {
1899
2000
  if (a.length === 0) {
1900
2001
  h(null);
1901
2002
  return;
1902
2003
  }
1903
2004
  m(T);
1904
- const D = I.getFunctionInfo(a[T].name);
2005
+ const D = g.getFunctionInfo(a[T].name);
1905
2006
  if (!D) {
1906
2007
  h(null);
1907
2008
  return;
@@ -1910,12 +2011,12 @@ function ja(i) {
1910
2011
  };
1911
2012
  function v(T) {
1912
2013
  l(T);
1913
- const D = I.getSearchListByType(+T);
2014
+ const D = g.getSearchListByType(+T);
1914
2015
  s(D);
1915
2016
  }
1916
- function P(T) {
2017
+ function B(T) {
1917
2018
  r(T);
1918
- const D = I.getSearchListByName(T);
2019
+ const D = g.getSearchListByName(T);
1919
2020
  s(D);
1920
2021
  }
1921
2022
  function _(T) {
@@ -1928,47 +2029,47 @@ function ja(i) {
1928
2029
  } else
1929
2030
  T.key === "Enter" && S(o);
1930
2031
  }
1931
- const N = (T) => {
2032
+ const A = (T) => {
1932
2033
  c(T);
1933
- }, B = () => {
2034
+ }, P = () => {
1934
2035
  c(-1);
1935
2036
  };
1936
2037
  return /* @__PURE__ */ E.jsxs("div", { children: [
1937
- /* @__PURE__ */ E.jsxs("div", { className: te.formulaSelectFunctionSelect, children: [
1938
- /* @__PURE__ */ E.jsx(jr, { value: u, options: R, onChange: v }),
2038
+ /* @__PURE__ */ E.jsxs("div", { className: ne.formulaSelectFunctionSelect, children: [
2039
+ /* @__PURE__ */ E.jsx(Kr, { value: u, options: R, onChange: v }),
1939
2040
  /* @__PURE__ */ E.jsx(
1940
- Wr,
2041
+ Yr,
1941
2042
  {
1942
2043
  placeholder: f.t("formula.moreFunctions.searchFunctionPlaceholder"),
1943
2044
  onKeyDown: _,
1944
2045
  value: n,
1945
- onChange: P,
2046
+ onChange: B,
1946
2047
  size: "large",
1947
2048
  allowClear: !0
1948
2049
  }
1949
2050
  )
1950
2051
  ] }),
1951
- /* @__PURE__ */ E.jsx("ul", { className: te.formulaSelectFunctionResult, onKeyDown: _, tabIndex: -1, children: a.map(({ name: T }, D) => /* @__PURE__ */ E.jsxs(
2052
+ /* @__PURE__ */ E.jsx("ul", { className: ne.formulaSelectFunctionResult, onKeyDown: _, tabIndex: -1, children: a.map(({ name: T }, D) => /* @__PURE__ */ E.jsxs(
1952
2053
  "li",
1953
2054
  {
1954
- className: o === D ? `${te.formulaSelectFunctionResultItem} ${te.formulaSelectFunctionResultItemActive}` : te.formulaSelectFunctionResultItem,
1955
- onMouseEnter: () => N(D),
1956
- onMouseLeave: B,
2055
+ className: o === D ? `${ne.formulaSelectFunctionResultItem} ${ne.formulaSelectFunctionResultItemActive}` : ne.formulaSelectFunctionResultItem,
2056
+ onMouseEnter: () => A(D),
2057
+ onMouseLeave: P,
1957
2058
  onClick: () => S(D),
1958
2059
  children: [
1959
- d === D && /* @__PURE__ */ E.jsx(Oi, { className: te.formulaSelectFunctionResultItemSelected }),
1960
- /* @__PURE__ */ E.jsx("span", { className: te.formulaSelectFunctionResultItemName, children: C(T) })
2060
+ d === D && /* @__PURE__ */ E.jsx(Li, { className: ne.formulaSelectFunctionResultItemSelected }),
2061
+ /* @__PURE__ */ E.jsx("span", { className: ne.formulaSelectFunctionResultItemName, children: C(T) })
1961
2062
  ]
1962
2063
  },
1963
2064
  D
1964
2065
  )) }),
1965
- b && /* @__PURE__ */ E.jsxs("div", { className: te.formulaSelectFunctionContent, children: [
2066
+ b && /* @__PURE__ */ E.jsxs("div", { className: ne.formulaSelectFunctionContent, children: [
1966
2067
  /* @__PURE__ */ E.jsx(ke, { title: b.functionName, value: b.description }),
1967
2068
  /* @__PURE__ */ E.jsx(
1968
2069
  ke,
1969
2070
  {
1970
2071
  title: f.t("formula.moreFunctions.syntax"),
1971
- value: /* @__PURE__ */ E.jsx(Hn, { prefix: b.functionName, value: b.functionParameter })
2072
+ value: /* @__PURE__ */ E.jsx($n, { prefix: b.functionName, value: b.functionParameter })
1972
2073
  }
1973
2074
  ),
1974
2075
  /* @__PURE__ */ E.jsx(
@@ -1982,41 +2083,41 @@ function ja(i) {
1982
2083
  ke,
1983
2084
  {
1984
2085
  title: T.name,
1985
- value: `${T.require ? p : g} ${T.detail}`
2086
+ value: `${T.require ? p : I} ${T.detail}`
1986
2087
  },
1987
2088
  D
1988
2089
  ))
1989
2090
  ] })
1990
2091
  ] });
1991
2092
  }
1992
- function Wa() {
1993
- const [i, e] = A(!0), [t, n] = A(!1), [r, a] = A([]), [s, o] = A(null), c = z(_e);
1994
- z(Dn);
1995
- const u = z(Ae);
2093
+ function Ya() {
2094
+ const [i, e] = N(!0), [t, n] = N(!1), [r, a] = N([]), [s, o] = N(null), c = z(De);
2095
+ z(yn);
2096
+ const u = z(Ne);
1996
2097
  function l() {
1997
2098
  e(!i), n(!t);
1998
2099
  }
1999
2100
  function d() {
2000
2101
  u.inputFormula(`=${s == null ? void 0 : s.functionName}(`);
2001
2102
  }
2002
- return /* @__PURE__ */ E.jsxs("div", { className: Zt.formulaMoreFunctions, children: [
2003
- i && /* @__PURE__ */ E.jsx(ja, { onChange: o }),
2004
- t && /* @__PURE__ */ E.jsx(ha, { functionInfo: s, onChange: a }),
2005
- /* @__PURE__ */ E.jsxs("div", { className: Zt.formulaMoreFunctionsOperation, children: [
2006
- t && /* @__PURE__ */ E.jsx(ut, { type: "primary", size: "small", onClick: l, children: c.t("formula.moreFunctions.next") }),
2007
- t && /* @__PURE__ */ E.jsx(ut, { size: "small", onClick: l, children: c.t("formula.moreFunctions.prev") }),
2008
- i && /* @__PURE__ */ E.jsx(ut, { type: "primary", size: "small", onClick: d, children: c.t("formula.moreFunctions.confirm") })
2103
+ return /* @__PURE__ */ E.jsxs("div", { className: en.formulaMoreFunctions, children: [
2104
+ i && /* @__PURE__ */ E.jsx(Ka, { onChange: o }),
2105
+ t && /* @__PURE__ */ E.jsx(ga, { functionInfo: s, onChange: a }),
2106
+ /* @__PURE__ */ E.jsxs("div", { className: en.formulaMoreFunctionsOperation, children: [
2107
+ t && /* @__PURE__ */ E.jsx(mt, { type: "primary", size: "small", onClick: l, children: c.t("formula.moreFunctions.next") }),
2108
+ t && /* @__PURE__ */ E.jsx(mt, { size: "small", onClick: l, children: c.t("formula.moreFunctions.prev") }),
2109
+ i && /* @__PURE__ */ E.jsx(mt, { type: "primary", size: "small", onClick: d, children: c.t("formula.moreFunctions.confirm") })
2009
2110
  ] })
2010
2111
  ] });
2011
2112
  }
2012
- function Ga(i) {
2113
+ function Xa(i) {
2013
2114
  return {
2014
- id: xt.id,
2115
+ id: Lt.id,
2015
2116
  icon: "FunctionSingle",
2016
2117
  tooltip: "formula.insert.tooltip",
2017
- group: xr.TOOLBAR_FORMULAS_INSERT,
2018
- type: Nt.SELECTOR,
2019
- positions: [wr.TOOLBAR_START],
2118
+ group: Fr.TOOLBAR_FORMULAS_INSERT,
2119
+ type: Ot.SELECTOR,
2120
+ positions: [zr.TOOLBAR_START],
2020
2121
  selections: [
2021
2122
  {
2022
2123
  label: "SUM",
@@ -2044,38 +2145,38 @@ function Ga(i) {
2044
2145
  icon: "MinSingle"
2045
2146
  }
2046
2147
  ],
2047
- hidden$: Fr(i, Qn.SHEET)
2148
+ hidden$: Ur(i, Jn.SHEET)
2048
2149
  };
2049
2150
  }
2050
- function Xa(i) {
2151
+ function Qa(i) {
2051
2152
  return {
2052
- id: xn.id,
2153
+ id: wn.id,
2053
2154
  title: "formula.insert.more",
2054
- positions: xt.id,
2055
- type: Nt.BUTTON
2155
+ positions: Lt.id,
2156
+ type: Ot.BUTTON
2056
2157
  };
2057
2158
  }
2058
- function Ka(i) {
2159
+ function Ja(i) {
2059
2160
  return {
2060
- id: Nn.id,
2061
- type: Nt.BUTTON,
2161
+ id: Mn.id,
2162
+ type: Ot.BUTTON,
2062
2163
  title: "formula.operation.pasteFormula",
2063
- positions: [yr]
2164
+ positions: [Nr]
2064
2165
  };
2065
2166
  }
2066
- const $n = "meta_key_ctrl_And_Shift", at = [
2167
+ const jn = "meta_key_ctrl_And_Shift", st = [
2067
2168
  O.ARROW_DOWN,
2068
2169
  O.ARROW_UP,
2069
2170
  O.ARROW_LEFT,
2070
2171
  O.ARROW_RIGHT
2071
- ], Ya = [...at, O.ENTER, O.TAB];
2072
- function Qa() {
2172
+ ], Za = [...st, O.ENTER, O.TAB];
2173
+ function es() {
2073
2174
  const i = [];
2074
- for (const e of Ya)
2175
+ for (const e of Za)
2075
2176
  i.push({
2076
- id: ve.id,
2177
+ id: Pe.id,
2077
2178
  binding: e,
2078
- preconditions: (t) => De(t),
2179
+ preconditions: (t) => ye(t),
2079
2180
  staticParameters: {
2080
2181
  eventType: ae.Keyboard,
2081
2182
  keycode: e
@@ -2083,13 +2184,13 @@ function Qa() {
2083
2184
  });
2084
2185
  return i;
2085
2186
  }
2086
- function Ja() {
2187
+ function ts() {
2087
2188
  const i = [];
2088
- for (const e of at)
2189
+ for (const e of st)
2089
2190
  i.push({
2090
- id: ve.id,
2191
+ id: Pe.id,
2091
2192
  binding: e | se.SHIFT,
2092
- preconditions: (t) => De(t),
2193
+ preconditions: (t) => ye(t),
2093
2194
  staticParameters: {
2094
2195
  eventType: ae.Keyboard,
2095
2196
  keycode: e,
@@ -2098,13 +2199,13 @@ function Ja() {
2098
2199
  });
2099
2200
  return i;
2100
2201
  }
2101
- function Za() {
2202
+ function ns() {
2102
2203
  const i = [];
2103
- for (const e of at)
2204
+ for (const e of st)
2104
2205
  i.push({
2105
- id: ve.id,
2206
+ id: Pe.id,
2106
2207
  binding: e | se.CTRL_COMMAND,
2107
- preconditions: (t) => De(t),
2208
+ preconditions: (t) => ye(t),
2108
2209
  staticParameters: {
2109
2210
  eventType: ae.Keyboard,
2110
2211
  keycode: e,
@@ -2113,32 +2214,32 @@ function Za() {
2113
2214
  });
2114
2215
  return i;
2115
2216
  }
2116
- function es() {
2217
+ function rs() {
2117
2218
  const i = [];
2118
- for (const e of at)
2219
+ for (const e of st)
2119
2220
  i.push({
2120
- id: ve.id,
2221
+ id: Pe.id,
2121
2222
  binding: e | se.SHIFT | se.CTRL_COMMAND,
2122
- preconditions: (t) => De(t),
2223
+ preconditions: (t) => ye(t),
2123
2224
  staticParameters: {
2124
2225
  eventType: ae.Keyboard,
2125
2226
  keycode: e,
2126
- metaKey: $n
2227
+ metaKey: jn
2127
2228
  }
2128
2229
  });
2129
2230
  return i;
2130
2231
  }
2131
- const ts = {
2132
- id: Ot.id,
2232
+ const is = {
2233
+ id: wt.id,
2133
2234
  binding: O.F4,
2134
- preconditions: (i) => De(i)
2235
+ preconditions: (i) => ye(i)
2135
2236
  };
2136
- var ns = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, is = (i, e, t, n) => {
2137
- for (var r = n > 1 ? void 0 : n ? rs(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2237
+ var as = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, os = (i, e, t, n) => {
2238
+ for (var r = n > 1 ? void 0 : n ? ss(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2138
2239
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
2139
- return n && r && ns(e, t, r), r;
2140
- }, pe = (i, e) => (t, n) => e(t, n, i);
2141
- let Xe = class extends H {
2240
+ return n && r && as(e, t, r), r;
2241
+ }, he = (i, e) => (t, n) => e(t, n, i);
2242
+ let Ye = class extends $ {
2142
2243
  constructor(i, e, t, n, r, a) {
2143
2244
  super(), this._injector = i, this._menuService = e, this._commandService = t, this._shortcutService = n, this._uiController = r, this._componentManager = a, this._initialize();
2144
2245
  }
@@ -2146,7 +2247,7 @@ let Xe = class extends H {
2146
2247
  this._registerCommands(), this._registerMenus(), this._registerShortcuts(), this._registerComponents();
2147
2248
  }
2148
2249
  _registerMenus() {
2149
- [Ga, Xa, Ka].forEach(
2250
+ [Xa, Qa, Ja].forEach(
2150
2251
  (i) => {
2151
2252
  this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(i)));
2152
2253
  }
@@ -2154,23 +2255,23 @@ let Xe = class extends H {
2154
2255
  }
2155
2256
  _registerCommands() {
2156
2257
  [
2258
+ On,
2157
2259
  Mn,
2158
- Nn,
2159
- xt,
2160
- xn,
2161
- St,
2162
- Pt,
2163
- ve,
2164
- Ot
2260
+ Lt,
2261
+ wn,
2262
+ Ct,
2263
+ Bt,
2264
+ Pe,
2265
+ wt
2165
2266
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
2166
2267
  }
2167
2268
  _registerShortcuts() {
2168
2269
  [
2169
- ...Qa(),
2170
- ...Ja(),
2171
- ...Za(),
2172
2270
  ...es(),
2173
- ts
2271
+ ...ts(),
2272
+ ...ns(),
2273
+ ...rs(),
2274
+ is
2174
2275
  ].forEach((i) => {
2175
2276
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
2176
2277
  });
@@ -2178,23 +2279,23 @@ let Xe = class extends H {
2178
2279
  _registerComponents() {
2179
2280
  this.disposeWithMe(
2180
2281
  this._uiController.registerContentComponent(
2181
- () => qr(oa, this._injector)
2282
+ () => jr(ma, this._injector)
2182
2283
  )
2183
- ), this._componentManager.register(On, Wa);
2284
+ ), this._componentManager.register(xn, Ya);
2184
2285
  }
2185
2286
  };
2186
- Xe = is([
2187
- K(Y.Ready, Xe),
2188
- pe(0, y(et)),
2189
- pe(1, zr),
2190
- pe(2, Q),
2191
- pe(3, Ur),
2192
- pe(4, Vr),
2193
- pe(5, y(Lr))
2194
- ], Xe);
2195
- const tn = "formula_reference_selection_plugin_name";
2196
- function bt(i, e, t) {
2197
- const n = i.getCurrentTheme(), r = new an(e).setAlpha(0.05).toRgbString();
2287
+ Ye = os([
2288
+ X(Q.Ready, Ye),
2289
+ he(0, y(tt)),
2290
+ he(1, qr),
2291
+ he(2, J),
2292
+ he(3, Hr),
2293
+ he(4, $r),
2294
+ he(5, y(Vr))
2295
+ ], Ye);
2296
+ const nn = "formula_reference_selection_plugin_name";
2297
+ function pt(i, e, t) {
2298
+ const n = i.getCurrentTheme(), r = new sn(e).setAlpha(0.05).toRgbString();
2198
2299
  return {
2199
2300
  id: t,
2200
2301
  strokeWidth: 1.5,
@@ -2210,13 +2311,13 @@ function bt(i, e, t) {
2210
2311
  hasColumnHeader: !1
2211
2312
  };
2212
2313
  }
2213
- var as = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, os = (i, e, t, n) => {
2214
- for (var r = n > 1 ? void 0 : n ? ss(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2314
+ var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, ms = (i, e, t, n) => {
2315
+ for (var r = n > 1 ? void 0 : n ? us(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2215
2316
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
2216
- return n && r && as(e, t, r), r;
2217
- }, L = (i, e) => (t, n) => e(t, n, i);
2218
- let Ke = class extends H {
2219
- constructor(e, t, n, r, a, s, o, c, u, l, d, m, b, h, I, f) {
2317
+ return n && r && cs(e, t, r), r;
2318
+ }, F = (i, e) => (t, n) => e(t, n, i);
2319
+ let Xe = class extends $ {
2320
+ constructor(e, t, n, r, a, s, o, c, u, l, d, m, b, h, g, f) {
2220
2321
  super();
2221
2322
  k(this, "_formulaRefColors", []);
2222
2323
  k(this, "_previousSequenceNodes");
@@ -2231,7 +2332,7 @@ let Ke = class extends H {
2231
2332
  k(this, "_numberColor", "");
2232
2333
  k(this, "_insertSelections", []);
2233
2334
  k(this, "_inputPanelState", 0);
2234
- this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = r, this._formulaPromptService = a, this._lexerTreeBuilder = s, this._renderManagerService = o, this._themeService = c, this._selectionManagerService = u, this._sheetSkeletonManagerService = l, this._currentUniverService = d, this._selectionRenderService = m, this._descriptionService = b, this._textSelectionManagerService = h, this._formulaInputService = I, this._docViewModelManagerService = f, this._initialize();
2335
+ this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = r, this._formulaPromptService = a, this._lexerTreeBuilder = s, this._renderManagerService = o, this._themeService = c, this._selectionManagerService = u, this._sheetSkeletonManagerService = l, this._currentUniverService = d, this._selectionRenderService = m, this._descriptionService = b, this._textSelectionManagerService = h, this._formulaInputService = g, this._docViewModelManagerService = f, this._initialize();
2235
2336
  }
2236
2337
  dispose() {
2237
2338
  this._formulaRefColors = [], this._resetTemp();
@@ -2263,7 +2364,7 @@ let Ke = class extends H {
2263
2364
  this.disposeWithMe(
2264
2365
  w(
2265
2366
  this._textSelectionManagerService.textSelection$.subscribe((e) => {
2266
- if (this._editorBridgeService.isVisible().visible === !1 || this._formulaInputService.isSelectionMoving() || (e == null ? void 0 : e.unitId) == null || ![st, ot].includes(e.unitId))
2367
+ if (this._editorBridgeService.isVisible().visible === !1 || this._formulaInputService.isSelectionMoving() || (e == null ? void 0 : e.unitId) == null || ![ot, ct].includes(e.unitId))
2267
2368
  return;
2268
2369
  const n = this._getCurrentBody(), r = (n == null ? void 0 : n.dataStream) || "";
2269
2370
  this._contextSwitch(r), this._changeKeepVisibleHideState(), this._switchSelectionPlugin(), !this._formulaInputService.isLockedSelectionChange() && (this._highlightFormula(), this._changeFunctionPanelState());
@@ -2294,24 +2395,24 @@ let Ke = class extends H {
2294
2395
  return;
2295
2396
  }
2296
2397
  const t = this._selectionManagerService.getCurrent();
2297
- if ((t == null ? void 0 : t.pluginName) === Be) {
2398
+ if ((t == null ? void 0 : t.pluginName) === Ce) {
2298
2399
  this._disableForceKeepVisible();
2299
2400
  return;
2300
2401
  }
2301
- this._selectionManagerService.clear(), this._selectionManagerService.changePlugin(Be), this._updateEditorModel(`\r
2302
- `, []), this._contextService.setContextValue(Oe, !1), this._disableForceKeepVisible(), this._selectionRenderService.resetStyle(), this._resetTemp(), this._hideFunctionPanel();
2402
+ this._selectionManagerService.clear(), this._selectionManagerService.changePlugin(Ce), this._updateEditorModel(`\r
2403
+ `, []), this._contextService.setContextValue(xe, !1), this._disableForceKeepVisible(), this._selectionRenderService.resetStyle(), this._resetTemp(), this._hideFunctionPanel();
2303
2404
  })
2304
2405
  )
2305
2406
  );
2306
2407
  }
2307
2408
  _initialRefSelectionUpdateEvent() {
2308
- const e = new Jn();
2409
+ const e = new Zn();
2309
2410
  this.disposeWithMe(
2310
2411
  w(
2311
2412
  this._selectionManagerService.selectionMoveEnd$.subscribe(() => {
2312
2413
  e.dispose();
2313
2414
  const t = this._selectionManagerService.getCurrent();
2314
- if (this._formulaInputService.disableSelectionMoving(), (t == null ? void 0 : t.pluginName) !== tn)
2415
+ if (this._formulaInputService.disableSelectionMoving(), (t == null ? void 0 : t.pluginName) !== nn)
2315
2416
  return;
2316
2417
  this._updateRefSelectionStyle(this._isSelectionMovingRefSelections), this._selectionRenderService.getCurrentControls().forEach((r) => {
2317
2418
  r.disableHelperSelection(), e.add(
@@ -2366,7 +2467,7 @@ let Ke = class extends H {
2366
2467
  this._selectionRenderService.selectionMoving$.subscribe((e) => {
2367
2468
  this._selectionChanging(
2368
2469
  e.map(
2369
- (t) => ct(t)
2470
+ (t) => ut(t)
2370
2471
  )
2371
2472
  );
2372
2473
  })
@@ -2376,7 +2477,7 @@ let Ke = class extends H {
2376
2477
  this._selectionRenderService.selectionMoveStart$.subscribe((e) => {
2377
2478
  this._selectionChanging(
2378
2479
  e.map(
2379
- (t) => ct(t)
2480
+ (t) => ut(t)
2380
2481
  ),
2381
2482
  !0
2382
2483
  );
@@ -2399,7 +2500,7 @@ let Ke = class extends H {
2399
2500
  return;
2400
2501
  }
2401
2502
  const o = e.length - s.token.length, c = { ...s };
2402
- c.token = e, c.endIndex += o, r[a] = c, r.splice(a + 1, 0, j.OPEN_BRACKET);
2503
+ c.token = e, c.endIndex += o, r[a] = c, r.splice(a + 1, 0, W.OPEN_BRACKET);
2403
2504
  const u = e.length + 1;
2404
2505
  for (let l = a + 2, d = r.length; l < d; l++) {
2405
2506
  const m = r[l];
@@ -2424,13 +2525,13 @@ let Ke = class extends H {
2424
2525
  this._hideFunctionPanel();
2425
2526
  return;
2426
2527
  }
2427
- if (typeof n != "string" && n.nodeType === W.FUNCTION) {
2528
+ if (typeof n != "string" && n.nodeType === G.FUNCTION) {
2428
2529
  const u = n.token.toUpperCase();
2429
2530
  if (this._inputPanelState === 1) {
2430
- const l = this._descriptionService.getSearchListByName(u);
2531
+ const l = this._descriptionService.getSearchListByNameFirstLetter(u);
2431
2532
  if (this._hideFunctionPanel(), l == null || l.length === 0)
2432
2533
  return;
2433
- this._commandService.executeCommand(St.id, {
2534
+ this._commandService.executeCommand(Ct.id, {
2434
2535
  visible: !0,
2435
2536
  searchText: u,
2436
2537
  searchList: l
@@ -2449,17 +2550,17 @@ let Ke = class extends H {
2449
2550
  }
2450
2551
  _changeHelpFunctionPanelState(e, t) {
2451
2552
  const n = this._descriptionService.getFunctionInfo(e);
2452
- this._hideFunctionPanel(), n != null && this._commandService.executeCommand(Pt.id, {
2553
+ this._hideFunctionPanel(), n != null && this._commandService.executeCommand(Bt.id, {
2453
2554
  visible: !0,
2454
2555
  paramIndex: t,
2455
2556
  functionInfo: n
2456
2557
  });
2457
2558
  }
2458
2559
  _hideFunctionPanel() {
2459
- this._commandService.executeCommand(St.id, {
2560
+ this._commandService.executeCommand(Ct.id, {
2460
2561
  visible: !1,
2461
2562
  searchText: ""
2462
- }), this._commandService.executeCommand(Pt.id, {
2563
+ }), this._commandService.executeCommand(Bt.id, {
2463
2564
  visible: !1,
2464
2565
  paramIndex: -1
2465
2566
  });
@@ -2487,7 +2588,7 @@ let Ke = class extends H {
2487
2588
  * @returns
2488
2589
  */
2489
2590
  _matchRefDrawToken(e) {
2490
- return rr(e) && e !== j.CLOSE_BRACES && e !== j.CLOSE_BRACKET && e !== j.SINGLE_QUOTATION && e !== j.DOUBLE_QUOTATION || e === " ";
2591
+ return sr(e) && e !== W.CLOSE_BRACES && e !== W.CLOSE_BRACKET && e !== W.SINGLE_QUOTATION && e !== W.DOUBLE_QUOTATION || e === " ";
2491
2592
  }
2492
2593
  /**
2493
2594
  *
@@ -2516,7 +2617,7 @@ let Ke = class extends H {
2516
2617
  return (n = t == null ? void 0 : t.snapshot) == null ? void 0 : n.body;
2517
2618
  }
2518
2619
  _getFormulaAndCellEditorBody() {
2519
- return [st, ot].map((t) => {
2620
+ return [ot, ct].map((t) => {
2520
2621
  const n = this._currentUniverService.getUniverDocInstance(t);
2521
2622
  return n == null ? void 0 : n.getBody();
2522
2623
  });
@@ -2529,8 +2630,8 @@ let Ke = class extends H {
2529
2630
  * @returns
2530
2631
  */
2531
2632
  _contextSwitch(e) {
2532
- if (Ee(e)) {
2533
- this._contextService.setContextValue(Oe, !0);
2633
+ if (Re(e)) {
2634
+ this._contextService.setContextValue(xe, !0);
2534
2635
  const t = this._lexerTreeBuilder.sequenceNodesBuilder(e.replace(/\r/g, "").replace(/\n/g, "")) || [];
2535
2636
  this._formulaInputService.setSequenceNodes(t);
2536
2637
  const n = this._textSelectionManagerService.getActiveRange();
@@ -2539,21 +2640,21 @@ let Ke = class extends H {
2539
2640
  const { startOffset: r } = n;
2540
2641
  this._currentInsertRefStringIndex = r - 1;
2541
2642
  } else
2542
- this._contextService.setContextValue(Oe, !1), this._formulaInputService.disableLockedSelectionChange(), this._formulaInputService.disableLockedSelectionInsert(), this._formulaInputService.clearSequenceNodes(), this._hideFunctionPanel();
2643
+ this._contextService.setContextValue(xe, !1), this._formulaInputService.disableLockedSelectionChange(), this._formulaInputService.disableLockedSelectionInsert(), this._formulaInputService.clearSequenceNodes(), this._hideFunctionPanel();
2543
2644
  }
2544
2645
  _getContextState() {
2545
- return this._contextService.getContextValue(Oe);
2646
+ return this._contextService.getContextValue(xe);
2546
2647
  }
2547
2648
  /**
2548
2649
  * Switch from formula selection state to regular selection state.
2549
2650
  */
2550
2651
  _switchSelectionPlugin() {
2551
2652
  if (this._getContextState() === !0) {
2552
- this._selectionManagerService.changePluginNoRefresh(tn);
2553
- const e = fr(this._themeService);
2653
+ this._selectionManagerService.changePluginNoRefresh(nn);
2654
+ const e = br(this._themeService);
2554
2655
  e.strokeDash = 8, e.hasAutoFill = !1, e.hasRowHeader = !1, e.hasColumnHeader = !1, this._selectionRenderService.setStyle(e);
2555
2656
  } else
2556
- this._selectionManagerService.changePluginNoRefresh(Be), this._selectionRenderService.resetStyle();
2657
+ this._selectionManagerService.changePluginNoRefresh(Ce), this._selectionRenderService.resetStyle();
2557
2658
  }
2558
2659
  /**
2559
2660
  * Highlight cell editor and formula bar editor.
@@ -2585,7 +2686,7 @@ let Ke = class extends H {
2585
2686
  continue;
2586
2687
  const { startIndex: c, endIndex: u, nodeType: l, token: d } = o;
2587
2688
  let m = "";
2588
- if (l === W.REFERENCE) {
2689
+ if (l === G.REFERENCE) {
2589
2690
  const b = r % this._formulaRefColors.length;
2590
2691
  m = this._formulaRefColors[b], n.push({
2591
2692
  refIndex: a,
@@ -2593,7 +2694,7 @@ let Ke = class extends H {
2593
2694
  token: d
2594
2695
  }), r++;
2595
2696
  } else
2596
- l === W.NUMBER ? m = this._numberColor : l === W.STRING ? m = this._stringColor : l === W.ARRAY && (m = this._stringColor);
2697
+ l === G.NUMBER ? m = this._numberColor : l === G.STRING ? m = this._stringColor : l === G.ARRAY && (m = this._stringColor);
2597
2698
  m && m.length > 0 && t.push({
2598
2699
  st: c + 1,
2599
2700
  ed: u + 2,
@@ -2618,36 +2719,36 @@ let Ke = class extends H {
2618
2719
  return;
2619
2720
  let o = null;
2620
2721
  for (let u = 0, l = e.length; u < l; u++) {
2621
- const d = e[u], { themeColor: m, token: b, refIndex: h } = d, I = Re(b), { unitId: f, sheetName: R, range: p } = I;
2722
+ const d = e[u], { themeColor: m, token: b, refIndex: h } = d, g = ge(b), { unitId: f, sheetName: R, range: p } = g;
2622
2723
  if (f != null && f.length > 0 && t !== f)
2623
2724
  continue;
2624
- const g = this._getSheetIdByName(t, R.trim());
2625
- if (R.length !== 0 && g !== n)
2725
+ const I = this._getSheetIdByName(t, R.trim());
2726
+ if (R.length !== 0 && I !== n)
2626
2727
  continue;
2627
2728
  const C = (c = this._insertSelections.find((S) => {
2628
- const { startRow: v, startColumn: P, endRow: _, endColumn: N } = S.range;
2629
- return v === p.startRow && P === p.startColumn && _ === p.endRow && N === p.endColumn || v === p.startRow && P === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn;
2729
+ const { startRow: v, startColumn: B, endRow: _, endColumn: A } = S.range;
2730
+ return v === p.startRow && B === p.startColumn && _ === p.endRow && A === p.endColumn || v === p.startRow && B === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn;
2630
2731
  })) == null ? void 0 : c.primary;
2631
2732
  if (C != null) {
2632
2733
  const {
2633
2734
  isMerged: S,
2634
2735
  isMergedMainCell: v,
2635
- startRow: P,
2736
+ startRow: B,
2636
2737
  endRow: _,
2637
- startColumn: N,
2638
- endColumn: B
2738
+ startColumn: A,
2739
+ endColumn: P
2639
2740
  } = C;
2640
- (S || v) && P === p.startRow && N === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn && (p.endRow = _, p.endColumn = B), o = {
2741
+ (S || v) && B === p.startRow && A === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn && (p.endRow = _, p.endColumn = P), o = {
2641
2742
  range: p,
2642
2743
  primary: C,
2643
- style: bt(this._themeService, m, h.toString())
2744
+ style: pt(this._themeService, m, h.toString())
2644
2745
  };
2645
2746
  continue;
2646
2747
  }
2647
2748
  r.push({
2648
2749
  range: p,
2649
2750
  primary: C,
2650
- style: bt(this._themeService, m, h.toString())
2751
+ style: pt(this._themeService, m, h.toString())
2651
2752
  });
2652
2753
  }
2653
2754
  o && r.push(o), r.length !== 0 && this._selectionManagerService.add(r);
@@ -2655,13 +2756,13 @@ let Ke = class extends H {
2655
2756
  _getSheetIdByName(e, t) {
2656
2757
  var r;
2657
2758
  const n = this._currentUniverService.getUniverSheetInstance(e);
2658
- return (r = n == null ? void 0 : n.getSheetBySheetName(ir(t))) == null ? void 0 : r.getSheetId();
2759
+ return (r = n == null ? void 0 : n.getSheetBySheetName(or(t))) == null ? void 0 : r.getSheetId();
2659
2760
  }
2660
2761
  _getSheetNameById(e, t) {
2661
2762
  var a;
2662
2763
  const n = this._currentUniverService.getUniverSheetInstance(e);
2663
2764
  let r = ((a = n == null ? void 0 : n.getSheetBySheetId(t)) == null ? void 0 : a.getName()) || "";
2664
- return r.length > 0 && ar(r) && (r = `'${r}'`), r;
2765
+ return r.length > 0 && cr(r) && (r = `'${r}'`), r;
2665
2766
  }
2666
2767
  _getCurrentUnitIdAndSheetId() {
2667
2768
  const e = this._sheetSkeletonManagerService.getCurrent();
@@ -2695,13 +2796,13 @@ let Ke = class extends H {
2695
2796
  isMerged: m,
2696
2797
  isMergedMainCell: b,
2697
2798
  startRow: h,
2698
- endRow: I,
2799
+ endRow: g,
2699
2800
  startColumn: f,
2700
2801
  endColumn: R
2701
2802
  } = o;
2702
- (m || b) && h === c && f === l && I === u && R === d && (c = h, l = f, u = h, d = f);
2803
+ (m || b) && h === c && f === l && g === u && R === d && (c = h, l = f, u = h, d = f);
2703
2804
  }
2704
- return Ve({
2805
+ return qe({
2705
2806
  sheetName: a,
2706
2807
  unitId: r,
2707
2808
  range: {
@@ -2719,13 +2820,13 @@ let Ke = class extends H {
2719
2820
  * @returns
2720
2821
  */
2721
2822
  async _syncToEditor(e, t, n = !0) {
2722
- const r = cn(e), { textRuns: a, refSelections: s } = this._buildTextRuns(e);
2823
+ const r = un(e), { textRuns: a, refSelections: s } = this._buildTextRuns(e);
2723
2824
  this._isSelectionMovingRefSelections = s;
2724
2825
  const o = this._textSelectionManagerService.getActiveRange();
2725
2826
  if (o == null)
2726
2827
  return;
2727
2828
  const { collapsed: c, style: u } = o;
2728
- this._currentInsertRefStringIndex = t, await this._fitEditorSize(), n ? this._commandService.executeCommand(Nr.id, {
2829
+ this._currentInsertRefStringIndex = t, await this._fitEditorSize(), n ? this._commandService.executeCommand(xr.id, {
2729
2830
  unitId: this._editorBridgeService.getCurrentEditorId(),
2730
2831
  body: {
2731
2832
  dataStream: `=${r}`,
@@ -2747,11 +2848,13 @@ let Ke = class extends H {
2747
2848
  endOffset: t + 1,
2748
2849
  style: u
2749
2850
  }
2750
- ]));
2851
+ ])), setTimeout(() => {
2852
+ this._textSelectionRenderManager.focus();
2853
+ }, 0);
2751
2854
  }
2752
2855
  async _fitEditorSize() {
2753
2856
  const e = this._editorBridgeService.getCurrentEditorId();
2754
- e != null && await this._commandService.syncExecuteCommand(Tr.id, {
2857
+ e != null && await this._commandService.syncExecuteCommand(Mr.id, {
2755
2858
  unitId: e
2756
2859
  });
2757
2860
  }
@@ -2779,14 +2882,14 @@ let Ke = class extends H {
2779
2882
  }
2780
2883
  _inertControlSelectionReplace(e) {
2781
2884
  this._previousSequenceNodes == null && (this._previousSequenceNodes = this._formulaInputService.getSequenceNodes()), this._previousInsertRefStringIndex == null && (this._previousInsertRefStringIndex = this._currentInsertRefStringIndex);
2782
- const t = G.deepClone(this._previousSequenceNodes);
2885
+ const t = K.deepClone(this._previousSequenceNodes);
2783
2886
  if (t == null)
2784
2887
  return;
2785
2888
  const n = this._getRefString(e);
2786
2889
  this._formulaInputService.setSequenceNodes(t), this._formulaInputService.insertSequenceRef(this._previousInsertRefStringIndex, n), this._syncToEditor(t, this._previousInsertRefStringIndex + n.length);
2787
2890
  const r = this._selectionRenderService.getSelectionDataWithStyle();
2788
2891
  this._insertSelections = [], r.forEach((a) => {
2789
- const s = ct(a);
2892
+ const s = ut(a);
2790
2893
  this._insertSelections.push(s);
2791
2894
  });
2792
2895
  }
@@ -2801,7 +2904,7 @@ let Ke = class extends H {
2801
2904
  const r = this._getCurrentChar();
2802
2905
  if (r == null)
2803
2906
  return;
2804
- this._previousInsertRefStringIndex = this._currentInsertRefStringIndex, this._matchRefDrawToken(r) || (this._formulaInputService.insertSequenceString(this._currentInsertRefStringIndex, j.COMMA), n = this._formulaInputService.getSequenceNodes(), this._previousInsertRefStringIndex += 1), this._previousSequenceNodes = G.deepClone(n);
2907
+ this._previousInsertRefStringIndex = this._currentInsertRefStringIndex, this._matchRefDrawToken(r) || (this._formulaInputService.insertSequenceString(this._currentInsertRefStringIndex, W.COMMA), n = this._formulaInputService.getSequenceNodes(), this._previousInsertRefStringIndex += 1), this._previousSequenceNodes = K.deepClone(n);
2805
2908
  const a = this._getRefString(t);
2806
2909
  this._formulaInputService.setSequenceNodes(n), this._formulaInputService.insertSequenceRef(this._previousInsertRefStringIndex, a), this._selectionRenderService.disableSkipRemainLast();
2807
2910
  }
@@ -2810,19 +2913,19 @@ let Ke = class extends H {
2810
2913
  _updateRefSelectionStyle(e) {
2811
2914
  const t = this._selectionRenderService.getCurrentControls(), { unitId: n, sheetId: r } = this._getCurrentUnitIdAndSheetId();
2812
2915
  for (let a = 0, s = e.length; a < s; a++) {
2813
- const o = e[a], { refIndex: c, themeColor: u, token: l } = o, d = Re(l), { unitId: m, sheetName: b, range: h } = d;
2916
+ const o = e[a], { refIndex: c, themeColor: u, token: l } = o, d = ge(l), { unitId: m, sheetName: b, range: h } = d;
2814
2917
  if (m != null && m.length > 0 && n !== m)
2815
2918
  continue;
2816
- const I = this._getSheetIdByName(n, b.trim());
2817
- if (I != null && I !== r)
2919
+ const g = this._getSheetIdByName(n, b.trim());
2920
+ if (g != null && g !== r)
2818
2921
  continue;
2819
2922
  const f = t.find((p) => {
2820
- const { startRow: g, startColumn: C, endRow: S, endColumn: v } = p.getRange();
2821
- return g === h.startRow && C === h.startColumn && S === h.endRow && v === h.endColumn || g === h.startRow && C === h.startColumn && h.startRow === h.endRow && h.startColumn === h.endColumn;
2923
+ const { startRow: I, startColumn: C, endRow: S, endColumn: v } = p.getRange();
2924
+ return I === h.startRow && C === h.startColumn && S === h.endRow && v === h.endColumn || I === h.startRow && C === h.startColumn && h.startRow === h.endRow && h.startColumn === h.endColumn;
2822
2925
  });
2823
2926
  if (f == null)
2824
2927
  continue;
2825
- const R = bt(this._themeService, u, c.toString());
2928
+ const R = pt(this._themeService, u, c.toString());
2826
2929
  f.updateStyle(R);
2827
2930
  }
2828
2931
  }
@@ -2833,20 +2936,20 @@ let Ke = class extends H {
2833
2936
  const { unitId: n, sheetId: r, skeleton: a } = this._getCurrentUnitIdAndSheetId();
2834
2937
  this._formulaInputService.enableLockedSelectionChange();
2835
2938
  const s = (f = t.selectionStyle) == null ? void 0 : f.id;
2836
- if (s == null || !G.isStringNumber(s))
2939
+ if (s == null || !K.isStringNumber(s))
2837
2940
  return;
2838
2941
  let { startRow: o, endRow: c, startColumn: u, endColumn: l } = e;
2839
- const d = Ar(o, u, a == null ? void 0 : a.mergeData);
2942
+ const d = Or(o, u, a == null ? void 0 : a.mergeData);
2840
2943
  if (d) {
2841
2944
  const {
2842
2945
  isMerged: R,
2843
2946
  isMergedMainCell: p,
2844
- startRow: g,
2947
+ startRow: I,
2845
2948
  endRow: C,
2846
2949
  startColumn: S,
2847
2950
  endColumn: v
2848
2951
  } = d;
2849
- (R || p) && g === o && S === u && C === c && v === l && (o = g, u = S, c = g, l = S);
2952
+ (R || p) && I === o && S === u && C === c && v === l && (o = I, u = S, c = I, l = S);
2850
2953
  }
2851
2954
  const m = this._getRefString({
2852
2955
  range: {
@@ -2859,14 +2962,20 @@ let Ke = class extends H {
2859
2962
  style: null
2860
2963
  }), b = Number(s);
2861
2964
  this._formulaInputService.updateSequenceRef(b, m);
2862
- const h = this._formulaInputService.getSequenceNodes(), I = h[b];
2863
- typeof I != "string" && (this._syncToEditor(h, I.endIndex + 1), t.update(e));
2965
+ const h = this._formulaInputService.getSequenceNodes(), g = h[b];
2966
+ typeof g != "string" && (this._syncToEditor(h, g.endIndex + 1), t.update(
2967
+ e,
2968
+ void 0,
2969
+ void 0,
2970
+ void 0,
2971
+ this._selectionRenderService.convertCellRangeToInfo(d)
2972
+ ));
2864
2973
  }
2865
2974
  _refreshFormulaAndCellEditor() {
2866
2975
  var t;
2867
- const e = [st, ot];
2976
+ const e = [ot, ct];
2868
2977
  for (const n of e) {
2869
- const r = vt(n, this._renderManagerService), a = r == null ? void 0 : r.document;
2978
+ const r = St(n, this._renderManagerService), a = r == null ? void 0 : r.document;
2870
2979
  a != null && ((t = a.getSkeleton()) == null || t.calculate(), a.makeDirty());
2871
2980
  }
2872
2981
  }
@@ -2884,7 +2993,7 @@ let Ke = class extends H {
2884
2993
  );
2885
2994
  }
2886
2995
  _commandExecutedListener() {
2887
- const e = [ve.id];
2996
+ const e = [Pe.id];
2888
2997
  this.disposeWithMe(
2889
2998
  this._commandService.onCommandExecuted((t) => {
2890
2999
  if (e.includes(t.id)) {
@@ -2940,21 +3049,21 @@ let Ke = class extends H {
2940
3049
  return;
2941
3050
  }
2942
3051
  if (this._arrowMoveActionState === 2 && (this._arrowMoveActionState = 3), (this._selectionManagerService.getSelectionRanges() || []).length === 0) {
2943
- const l = this._selectionManagerService.getLastByPlugin(Be);
3052
+ const l = this._selectionManagerService.getLastByPlugin(Ce);
2944
3053
  if (l != null) {
2945
- const d = G.deepClone(l);
3054
+ const d = K.deepClone(l);
2946
3055
  this._selectionManagerService.add([d]);
2947
3056
  }
2948
3057
  }
2949
3058
  let o = M.DOWN;
2950
3059
  r === O.ARROW_DOWN ? o = M.DOWN : r === O.ARROW_UP ? o = M.UP : r === O.ARROW_LEFT ? o = M.LEFT : r === O.ARROW_RIGHT && (o = M.RIGHT), a === se.CTRL_COMMAND ? this._commandService.executeCommand(Fe.id, {
2951
3060
  direction: o,
2952
- jumpOver: Kt.moveGap
2953
- }) : a === se.SHIFT ? this._commandService.executeCommand(Yt.id, {
3061
+ jumpOver: Xt.moveGap
3062
+ }) : a === se.SHIFT ? this._commandService.executeCommand(Qt.id, {
2954
3063
  direction: o
2955
- }) : a === $n ? this._commandService.executeCommand(Yt.id, {
3064
+ }) : a === jn ? this._commandService.executeCommand(Qt.id, {
2956
3065
  direction: o,
2957
- jumpOver: Kt.moveGap
3066
+ jumpOver: Xt.moveGap
2958
3067
  }) : this._commandService.executeCommand(Fe.id, {
2959
3068
  direction: o
2960
3069
  });
@@ -2968,39 +3077,39 @@ let Ke = class extends H {
2968
3077
  if (e == null)
2969
3078
  return;
2970
3079
  let t = M.LEFT;
2971
- e === O.ARROW_DOWN ? t = M.DOWN : e === O.ARROW_UP ? t = M.UP : e === O.ARROW_RIGHT && (t = M.RIGHT), this._commandService.executeCommand(Mr.id, {
3080
+ e === O.ARROW_DOWN ? t = M.DOWN : e === O.ARROW_UP ? t = M.UP : e === O.ARROW_RIGHT && (t = M.RIGHT), this._commandService.executeCommand(wr.id, {
2972
3081
  direction: t
2973
3082
  });
2974
3083
  }
2975
3084
  _getEditorObject() {
2976
- return vt(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
3085
+ return St(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
2977
3086
  }
2978
3087
  };
2979
- Ke = os([
2980
- K(Y.Steady, Ke),
2981
- L(0, Q),
2982
- L(1, kt),
2983
- L(2, Cn),
2984
- L(3, y(yt)),
2985
- L(4, y(de)),
2986
- L(5, y(Ie)),
2987
- L(6, At),
2988
- L(7, y(sn)),
2989
- L(8, y(Dt)),
2990
- L(9, y(Sn)),
2991
- L(10, ge),
2992
- L(11, y(Bn)),
2993
- L(12, y(wt)),
2994
- L(13, y(_n)),
2995
- L(14, Ae),
2996
- L(15, y(Or))
2997
- ], Ke);
2998
- var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, ms = (i, e, t, n) => {
2999
- for (var r = n > 1 ? void 0 : n ? us(e, t) : e, a = i.length - 1, s; a >= 0; a--)
3088
+ Xe = ms([
3089
+ X(Q.Steady, Xe),
3090
+ F(0, J),
3091
+ F(1, _t),
3092
+ F(2, _n),
3093
+ F(3, y(At)),
3094
+ F(4, y(de)),
3095
+ F(5, y(ve)),
3096
+ F(6, Mt),
3097
+ F(7, y(on)),
3098
+ F(8, y(Tt)),
3099
+ F(9, y(Bn)),
3100
+ F(10, Ie),
3101
+ F(11, y(Cn)),
3102
+ F(12, y(Ft)),
3103
+ F(13, y(Dn)),
3104
+ F(14, Ne),
3105
+ F(15, y(Lr))
3106
+ ], Xe);
3107
+ var fs = Object.defineProperty, ls = Object.getOwnPropertyDescriptor, ds = (i, e, t, n) => {
3108
+ for (var r = n > 1 ? void 0 : n ? ls(e, t) : e, a = i.length - 1, s; a >= 0; a--)
3000
3109
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
3001
- return n && r && cs(e, t, r), r;
3002
- }, nn = (i, e) => (t, n) => e(t, n, i);
3003
- let Ye = class extends H {
3110
+ return n && r && fs(e, t, r), r;
3111
+ }, rn = (i, e) => (t, n) => e(t, n, i);
3112
+ let Qe = class extends $ {
3004
3113
  constructor(e, t) {
3005
3114
  super();
3006
3115
  k(this, "_waitingCommandQueue", []);
@@ -3018,12 +3127,12 @@ let Ye = class extends H {
3018
3127
  if (this._activeDirtyManagerService.get(e.id)) {
3019
3128
  if (e.id === ie.id) {
3020
3129
  const n = e.params;
3021
- if (t && t.onlyLocal === !0 || n.trigger === Ct.id || n.trigger === fn.id)
3130
+ if (t && t.onlyLocal === !0 || n.trigger === Dt.id || n.trigger === ln.id)
3022
3131
  return;
3023
3132
  }
3024
3133
  this._waitingCommandQueue.push(e), clearTimeout(this._setTimeoutKey), this._setTimeoutKey = setTimeout(() => {
3025
3134
  this._commandService.executeCommand(
3026
- Ut.id,
3135
+ Vt.id,
3027
3136
  {
3028
3137
  ...this._generateDirty(this._waitingCommandQueue)
3029
3138
  },
@@ -3070,7 +3179,7 @@ let Ye = class extends H {
3070
3179
  _initialExecuteFormulaProcessListener() {
3071
3180
  this.disposeWithMe(
3072
3181
  this._commandService.onCommandExecuted((e) => {
3073
- if (e.id !== sr.id)
3182
+ if (e.id !== ur.id)
3074
3183
  return;
3075
3184
  const t = e.params;
3076
3185
  if (t.stageInfo != null) {
@@ -3090,16 +3199,16 @@ let Ye = class extends H {
3090
3199
  const n = t.functionsExecutedState;
3091
3200
  let r = "";
3092
3201
  switch (n) {
3093
- case xe.NOT_EXECUTED:
3202
+ case we.NOT_EXECUTED:
3094
3203
  r = "No tasks are being executed anymore", this._waitingCommandQueue.unshift(...this._executingCommandQueue), this._executingCommandQueue = [];
3095
3204
  break;
3096
- case xe.STOP_EXECUTION:
3205
+ case we.STOP_EXECUTION:
3097
3206
  r = "The execution of the formula has been stopped", this._waitingCommandQueue.unshift(...this._executingCommandQueue), this._executingCommandQueue = [];
3098
3207
  break;
3099
- case xe.SUCCESS:
3208
+ case we.SUCCESS:
3100
3209
  r = `Formula calculation succeeded, Total time consumed: ${performance.now() - this._startExecutionTime} ms`, this._executingCommandQueue = [];
3101
3210
  break;
3102
- case xe.INITIAL:
3211
+ case we.INITIAL:
3103
3212
  r = "Waiting for calculation", this._executingCommandQueue = [];
3104
3213
  break;
3105
3214
  }
@@ -3110,7 +3219,7 @@ let Ye = class extends H {
3110
3219
  }
3111
3220
  _initialExecuteFormula() {
3112
3221
  this._commandService.executeCommand(
3113
- Ut.id,
3222
+ Vt.id,
3114
3223
  {
3115
3224
  commands: [],
3116
3225
  forceCalculation: !0
@@ -3121,54 +3230,54 @@ let Ye = class extends H {
3121
3230
  );
3122
3231
  }
3123
3232
  };
3124
- Ye = ms([
3125
- K(Y.Ready, Ye),
3126
- nn(0, Q),
3127
- nn(1, Mt)
3128
- ], Ye);
3129
- function ze(i, e, t, n, r) {
3233
+ Qe = ds([
3234
+ X(Q.Ready, Qe),
3235
+ rn(0, J),
3236
+ rn(1, xt)
3237
+ ], Qe);
3238
+ function Ue(i, e, t, n, r) {
3130
3239
  const { id: a } = e;
3131
- if (jn(i, t, n))
3240
+ if (Wn(i, t, n))
3132
3241
  return i;
3133
3242
  const s = new x(i[t][n]);
3134
3243
  switch (a) {
3244
+ case Sn.id:
3245
+ bs(s, e);
3246
+ break;
3135
3247
  case Pn.id:
3136
- fs(s, e);
3248
+ ps(s, e, r);
3137
3249
  break;
3138
3250
  case vn.id:
3139
- ls(s, e, r);
3251
+ hs(s, e, r);
3140
3252
  break;
3141
3253
  case In.id:
3142
- ds(s, e, r);
3254
+ Es(s, e);
3143
3255
  break;
3144
3256
  case gn.id:
3145
- bs(s, e);
3257
+ Rs(s, e);
3146
3258
  break;
3147
3259
  case Rn.id:
3148
- ps(s, e);
3260
+ gs(s, e);
3149
3261
  break;
3150
3262
  case En.id:
3151
- hs(s, e);
3263
+ Is(s, e);
3152
3264
  break;
3153
3265
  case hn.id:
3154
- Es(s, e);
3266
+ vs(s, e);
3155
3267
  break;
3156
3268
  case pn.id:
3157
- Rs(s, e);
3269
+ Ps(s, e);
3158
3270
  break;
3159
3271
  case bn.id:
3160
- gs(s, e);
3272
+ Ss(s, e);
3161
3273
  break;
3162
3274
  case dn.id:
3163
- Is(s, e);
3164
- break;
3165
- case ln.id:
3166
- vs(s, e);
3275
+ Bs(s, e);
3167
3276
  break;
3168
3277
  }
3169
3278
  return i;
3170
3279
  }
3171
- function fs(i, e) {
3280
+ function bs(i, e) {
3172
3281
  const { params: t } = e;
3173
3282
  if (!t)
3174
3283
  return;
@@ -3179,98 +3288,98 @@ function fs(i, e) {
3179
3288
  endColumn: c
3180
3289
  } = n, { startRow: u, endRow: l, startColumn: d, endColumn: m } = r, b = new x();
3181
3290
  for (let h = a; h <= s; h++)
3182
- for (let I = o; I <= c; I++) {
3183
- const f = i.getValue(h, I);
3184
- b.setValue(h - a, I - o, f), i.setValue(h, I, null);
3291
+ for (let g = o; g <= c; g++) {
3292
+ const f = i.getValue(h, g);
3293
+ b.setValue(h - a, g - o, f), i.setValue(h, g, null);
3185
3294
  }
3186
3295
  for (let h = u; h <= l; h++)
3187
- for (let I = d; I <= m; I++) {
3188
- const f = b.getValue(h - u, I - d);
3189
- i.setValue(h, I, f);
3296
+ for (let g = d; g <= m; g++) {
3297
+ const f = b.getValue(h - u, g - d);
3298
+ i.setValue(h, g, f);
3190
3299
  }
3191
3300
  }
3192
- function ls(i, e, t) {
3301
+ function ps(i, e, t) {
3193
3302
  const { params: n } = e;
3194
3303
  if (!n)
3195
3304
  return;
3196
3305
  const { fromRow: r, toRow: a } = n, s = t == null ? void 0 : t.filter(
3197
- (l) => l.range.rangeType === he.ROW && l.range.startRow <= r && r <= l.range.endRow
3306
+ (l) => l.range.rangeType === Ee.ROW && l.range.startRow <= r && r <= l.range.endRow
3198
3307
  );
3199
3308
  if ((s == null ? void 0 : s.length) !== 1)
3200
3309
  return;
3201
3310
  const o = s[0].range, c = o.startRow, u = o.endRow - o.startRow + 1;
3202
3311
  i.moveRows(c, u, a);
3203
3312
  }
3204
- function ds(i, e, t) {
3313
+ function hs(i, e, t) {
3205
3314
  const { params: n } = e;
3206
3315
  if (!n)
3207
3316
  return;
3208
3317
  const { fromCol: r, toCol: a } = n, s = t == null ? void 0 : t.filter(
3209
- (l) => l.range.rangeType === he.COLUMN && l.range.startColumn <= r && r <= l.range.endColumn
3318
+ (l) => l.range.rangeType === Ee.COLUMN && l.range.startColumn <= r && r <= l.range.endColumn
3210
3319
  );
3211
3320
  if ((s == null ? void 0 : s.length) !== 1)
3212
3321
  return;
3213
3322
  const o = s[0].range, c = o.startColumn, u = o.endColumn - o.startColumn + 1;
3214
3323
  i.moveColumns(c, u, a);
3215
3324
  }
3216
- function bs(i, e) {
3325
+ function Es(i, e) {
3217
3326
  const { params: t } = e;
3218
3327
  if (!t)
3219
3328
  return;
3220
3329
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3221
- nt(i, n, r, a, X.ROWS);
3330
+ rt(i, n, r, a, Y.ROWS);
3222
3331
  }
3223
- function ps(i, e) {
3332
+ function Rs(i, e) {
3224
3333
  const { params: t } = e;
3225
3334
  if (!t)
3226
3335
  return;
3227
3336
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3228
- nt(i, n, r, a, X.COLUMNS);
3337
+ rt(i, n, r, a, Y.COLUMNS);
3229
3338
  }
3230
- function hs(i, e) {
3339
+ function gs(i, e) {
3231
3340
  const { params: t } = e;
3232
3341
  if (!t)
3233
3342
  return;
3234
3343
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3235
- nt(i, n, r, a, X.COLUMNS);
3344
+ rt(i, n, r, a, Y.COLUMNS);
3236
3345
  }
3237
- function Es(i, e) {
3346
+ function Is(i, e) {
3238
3347
  const { params: t } = e;
3239
3348
  if (!t)
3240
3349
  return;
3241
3350
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3242
- nt(i, n, r, a, X.ROWS);
3351
+ rt(i, n, r, a, Y.ROWS);
3243
3352
  }
3244
- function Rs(i, e) {
3353
+ function vs(i, e) {
3245
3354
  const { params: t } = e;
3246
3355
  if (!t)
3247
3356
  return;
3248
3357
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3249
- rt(i, n, r, a, X.ROWS);
3358
+ it(i, n, r, a, Y.ROWS);
3250
3359
  }
3251
- function gs(i, e) {
3360
+ function Ps(i, e) {
3252
3361
  const { params: t } = e;
3253
3362
  if (!t)
3254
3363
  return;
3255
3364
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3256
- rt(i, n, r, a, X.COLUMNS);
3365
+ it(i, n, r, a, Y.COLUMNS);
3257
3366
  }
3258
- function Is(i, e) {
3367
+ function Ss(i, e) {
3259
3368
  const { params: t } = e;
3260
3369
  if (!t)
3261
3370
  return;
3262
3371
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3263
- rt(i, n, r, a, X.ROWS);
3372
+ it(i, n, r, a, Y.ROWS);
3264
3373
  }
3265
- function vs(i, e) {
3374
+ function Bs(i, e) {
3266
3375
  const { params: t } = e;
3267
3376
  if (!t)
3268
3377
  return;
3269
3378
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3270
- rt(i, n, r, a, X.COLUMNS);
3379
+ it(i, n, r, a, Y.COLUMNS);
3271
3380
  }
3272
- function Ps(i, e, t) {
3273
- if (jn(i, e, t))
3381
+ function Cs(i, e, t) {
3382
+ if (Wn(i, e, t))
3274
3383
  return i;
3275
3384
  const n = new x(i[e][t]);
3276
3385
  return n.forValue((r, a, s) => {
@@ -3286,15 +3395,18 @@ function Ps(i, e, t) {
3286
3395
  n.setValue(r, a, b);
3287
3396
  }), i;
3288
3397
  }
3289
- function jn(i, e, t) {
3398
+ function Wn(i, e, t) {
3290
3399
  return i == null || i[e] == null || i[e][t] == null;
3291
3400
  }
3292
- var Ss = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, ks = (i, e, t, n) => {
3293
- for (var r = n > 1 ? void 0 : n ? Bs(e, t) : e, a = i.length - 1, s; a >= 0; a--)
3401
+ function ht(i, e, t) {
3402
+ i && i[e] && i[e][t] && delete i[e][t];
3403
+ }
3404
+ var ks = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ds = (i, e, t, n) => {
3405
+ for (var r = n > 1 ? void 0 : n ? _s(e, t) : e, a = i.length - 1, s; a >= 0; a--)
3294
3406
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
3295
- return n && r && Ss(e, t, r), r;
3407
+ return n && r && ks(e, t, r), r;
3296
3408
  }, le = (i, e) => (t, n) => e(t, n, i);
3297
- let Qe = class extends H {
3409
+ let Je = class extends $ {
3298
3410
  constructor(i, e, t, n, r, a, s) {
3299
3411
  super(), this._currentUniverService = i, this._commandService = e, this._lexerTreeBuilder = t, this._formulaDataModel = n, this._sheetInterceptorService = r, this._selectionManagerService = a, this._injector = s, this._initialize();
3300
3412
  }
@@ -3311,18 +3423,18 @@ let Qe = class extends H {
3311
3423
  if (i.params)
3312
3424
  if (i.id === ie.id) {
3313
3425
  const t = i.params;
3314
- if (e && e.onlyLocal === !0 || t.trigger === Ct.id || t.trigger === fn.id)
3426
+ if (e && e.onlyLocal === !0 || t.trigger === Dt.id || t.trigger === ln.id)
3315
3427
  return;
3316
3428
  this._handleSetRangeValuesMutation(t, e);
3317
3429
  } else
3318
- i.id === gt.id ? this._handleRemoveSheetMutation(i.params) : i.id === It.id && this._handleInsertSheetMutation(i.params);
3430
+ i.id === vt.id ? this._handleRemoveSheetMutation(i.params) : i.id === Pt.id && this._handleInsertSheetMutation(i.params);
3319
3431
  })
3320
3432
  );
3321
3433
  }
3322
3434
  _handleSetRangeValuesMutation(i, e) {
3323
3435
  const { subUnitId: t, unitId: n, cellValue: r } = i;
3324
3436
  e && e.onlyLocal === !0 || r == null || (this._formulaDataModel.updateFormulaData(n, t, r), this._commandService.executeCommand(
3325
- we.id,
3437
+ Le.id,
3326
3438
  {
3327
3439
  formulaData: this._formulaDataModel.getFormulaData()
3328
3440
  },
@@ -3333,20 +3445,20 @@ let Qe = class extends H {
3333
3445
  }
3334
3446
  _handleRemoveSheetMutation(i) {
3335
3447
  const { subUnitId: e, unitId: t } = i, n = this._formulaDataModel.getFormulaData();
3336
- delete n[t][e];
3448
+ ht(n, t, e);
3337
3449
  const r = this._formulaDataModel.getArrayFormulaRange();
3338
- delete r[t][e];
3450
+ ht(r, t, e);
3339
3451
  const a = this._formulaDataModel.getArrayFormulaCellData();
3340
- delete a[t][e], this._commandService.executeCommand(we.id, {
3452
+ ht(a, t, e), this._commandService.executeCommand(Le.id, {
3341
3453
  formulaData: n
3342
- }), this._commandService.executeCommand(Rt.id, {
3454
+ }), this._commandService.executeCommand(It.id, {
3343
3455
  arrayFormulaRange: r,
3344
3456
  arrayFormulaCellData: a
3345
3457
  });
3346
3458
  }
3347
3459
  _handleInsertSheetMutation(i) {
3348
3460
  const { sheet: e, unitId: t } = i, n = this._formulaDataModel.getFormulaData(), { id: r, cellData: a } = e, s = new x(a);
3349
- or(n, t, r, s), this._commandService.executeCommand(we.id, {
3461
+ mr(n, t, r, s), this._commandService.executeCommand(Le.id, {
3350
3462
  formulaData: n
3351
3463
  });
3352
3464
  }
@@ -3354,40 +3466,40 @@ let Qe = class extends H {
3354
3466
  const { id: e } = i;
3355
3467
  let t = null;
3356
3468
  switch (e) {
3357
- case Pn.id:
3469
+ case Sn.id:
3358
3470
  t = this._handleMoveRange(i);
3359
3471
  break;
3360
- case vn.id:
3472
+ case Pn.id:
3361
3473
  t = this._handleMoveRows(i);
3362
3474
  break;
3363
- case In.id:
3475
+ case vn.id:
3364
3476
  t = this._handleMoveCols(i);
3365
3477
  break;
3366
- case gn.id:
3478
+ case In.id:
3367
3479
  t = this._handleInsertRow(i);
3368
3480
  break;
3369
- case Rn.id:
3481
+ case gn.id:
3370
3482
  t = this._handleInsertCol(i);
3371
3483
  break;
3372
- case En.id:
3484
+ case Rn.id:
3373
3485
  t = this._handleInsertRangeMoveRight(i);
3374
3486
  break;
3375
- case hn.id:
3487
+ case En.id:
3376
3488
  t = this._handleInsertRangeMoveDown(i);
3377
3489
  break;
3378
- case pn.id:
3490
+ case hn.id:
3379
3491
  t = this._handleRemoveRow(i);
3380
3492
  break;
3381
- case bn.id:
3493
+ case pn.id:
3382
3494
  t = this._handleRemoveCol(i);
3383
3495
  break;
3384
- case dn.id:
3496
+ case bn.id:
3385
3497
  t = this._handleDeleteRangeMoveUp(i);
3386
3498
  break;
3387
- case ln.id:
3499
+ case dn.id:
3388
3500
  t = this._handleDeleteRangeMoveLeft(i);
3389
3501
  break;
3390
- case lr.id:
3502
+ case pr.id:
3391
3503
  t = this._handleSetWorksheetName(i);
3392
3504
  break;
3393
3505
  }
@@ -3395,9 +3507,9 @@ let Qe = class extends H {
3395
3507
  const { unitSheetNameMap: n } = this._formulaDataModel.getCalculateData();
3396
3508
  let r = this._formulaDataModel.getFormulaData();
3397
3509
  const a = this._getFormulaReferenceMoveInfo(r, n, t), s = this._currentUniverService.getCurrentUniverSheetInstance(), o = s.getUnitId(), c = s.getActiveSheet().getSheetId(), u = this._selectionManagerService.getSelections(), l = this._formulaDataModel.getArrayFormulaRange(), d = this._formulaDataModel.getArrayFormulaCellData();
3398
- let m = ze(l, i, o, c, u);
3399
- m = Ps(m, o, c);
3400
- const b = ze(
3510
+ let m = Ue(l, i, o, c, u);
3511
+ m = Cs(m, o, c);
3512
+ const b = Ue(
3401
3513
  d,
3402
3514
  i,
3403
3515
  o,
@@ -3405,7 +3517,7 @@ let Qe = class extends H {
3405
3517
  u
3406
3518
  );
3407
3519
  this._commandService.executeCommand(
3408
- Rt.id,
3520
+ It.id,
3409
3521
  {
3410
3522
  arrayFormulaRange: m,
3411
3523
  arrayFormulaCellData: b
@@ -3413,9 +3525,9 @@ let Qe = class extends H {
3413
3525
  {
3414
3526
  local: !0
3415
3527
  }
3416
- ), r = ze(r, i, o, c, u);
3417
- const h = ze(a, i, o, c, u);
3418
- return this._commandService.executeCommand(we.id, {
3528
+ ), r = Ue(r, i, o, c, u);
3529
+ const h = Ue(a, i, o, c, u);
3530
+ return this._commandService.executeCommand(Le.id, {
3419
3531
  formulaData: this._formulaDataModel.getFormulaData()
3420
3532
  }), this._getUpdateFormulaMutations(r, h);
3421
3533
  }
@@ -3449,13 +3561,13 @@ let Qe = class extends H {
3449
3561
  startColumn: 0,
3450
3562
  endRow: t,
3451
3563
  endColumn: s.getColumnCount() - 1,
3452
- rangeType: he.ROW
3564
+ rangeType: Ee.ROW
3453
3565
  }, u = {
3454
3566
  startRow: n,
3455
3567
  startColumn: 0,
3456
3568
  endRow: n,
3457
3569
  endColumn: s.getColumnCount() - 1,
3458
- rangeType: he.ROW
3570
+ rangeType: Ee.ROW
3459
3571
  };
3460
3572
  return {
3461
3573
  type: 0,
@@ -3474,13 +3586,13 @@ let Qe = class extends H {
3474
3586
  startColumn: t,
3475
3587
  endRow: s.getRowCount() - 1,
3476
3588
  endColumn: t,
3477
- rangeType: he.COLUMN
3589
+ rangeType: Ee.COLUMN
3478
3590
  }, u = {
3479
3591
  startRow: 0,
3480
3592
  startColumn: n,
3481
3593
  endRow: s.getRowCount() - 1,
3482
3594
  endColumn: n,
3483
- rangeType: he.COLUMN
3595
+ rangeType: Ee.COLUMN
3484
3596
  };
3485
3597
  return {
3486
3598
  type: 0,
@@ -3608,11 +3720,11 @@ let Qe = class extends H {
3608
3720
  const l = new x(i[s][u]), d = new x(o[u]), m = new x();
3609
3721
  d.forValue((f, R, p) => {
3610
3722
  var S;
3611
- const g = (p == null ? void 0 : p.f) || "", C = ((S = l.getValue(f, R)) == null ? void 0 : S.f) || "";
3612
- Ee(g) && (Ee(C) && g !== C ? m.setValue(f, R, { f: g }) : m.setValue(f, R, { f: g, si: null }));
3723
+ const I = (p == null ? void 0 : p.f) || "", C = ((S = l.getValue(f, R)) == null ? void 0 : S.f) || "";
3724
+ Re(I) && (Re(C) && I !== C ? m.setValue(f, R, { f: I }) : m.setValue(f, R, { f: I, si: null }));
3613
3725
  });
3614
3726
  const b = m.getData();
3615
- if (G.isEmptyObject(b))
3727
+ if (K.isEmptyObject(b))
3616
3728
  continue;
3617
3729
  const h = {
3618
3730
  subUnitId: u,
@@ -3623,10 +3735,10 @@ let Qe = class extends H {
3623
3735
  id: ie.id,
3624
3736
  params: h
3625
3737
  });
3626
- const I = mn(r, h);
3738
+ const g = fn(r, h);
3627
3739
  n.push({
3628
3740
  id: ie.id,
3629
- params: I
3741
+ params: g
3630
3742
  });
3631
3743
  }
3632
3744
  }
@@ -3636,7 +3748,12 @@ let Qe = class extends H {
3636
3748
  };
3637
3749
  }
3638
3750
  _getFormulaReferenceMoveInfo(i, e, t) {
3639
- const n = Object.keys(i), r = {};
3751
+ if (i == null)
3752
+ return {};
3753
+ const n = Object.keys(i);
3754
+ if (n.length === 0)
3755
+ return {};
3756
+ const r = {};
3640
3757
  for (const a of n) {
3641
3758
  const s = i[a], o = Object.keys(s);
3642
3759
  r[a] == null && (r[a] = {});
@@ -3646,55 +3763,55 @@ let Qe = class extends H {
3646
3763
  var v;
3647
3764
  if (!b)
3648
3765
  return !0;
3649
- const { f: h, x: I, y: f, si: R } = b, p = this._lexerTreeBuilder.sequenceNodesBuilder(h);
3766
+ const { f: h, x: g, y: f, si: R } = b, p = this._lexerTreeBuilder.sequenceNodesBuilder(h);
3650
3767
  if (p == null)
3651
3768
  return !0;
3652
- let g = !1;
3769
+ let I = !1;
3653
3770
  const C = [];
3654
- for (let P = 0, _ = p.length; P < _; P++) {
3655
- const N = p[P];
3656
- if (typeof N == "string" || N.nodeType !== W.REFERENCE)
3771
+ for (let B = 0, _ = p.length; B < _; B++) {
3772
+ const A = p[B];
3773
+ if (typeof A == "string" || A.nodeType !== G.REFERENCE)
3657
3774
  continue;
3658
- const { token: B } = N, T = Re(B), { range: D, sheetName: $, unitId: U } = T, ce = U == null || U.length === 0 ? a : U, be = (v = e == null ? void 0 : e[ce]) == null ? void 0 : v[$], ue = {
3775
+ const { token: P } = A, T = ge(P), { range: D, sheetName: j, unitId: U } = T, ce = U == null || U.length === 0 ? a : U, be = (v = e == null ? void 0 : e[ce]) == null ? void 0 : v[j], ue = {
3659
3776
  range: D,
3660
3777
  sheetId: be,
3661
3778
  unitId: U,
3662
- sheetName: $,
3663
- refOffsetX: I || 0,
3779
+ sheetName: j,
3780
+ refOffsetX: g || 0,
3664
3781
  refOffsetY: f || 0
3665
3782
  };
3666
- let Me = null;
3783
+ let Oe = null;
3667
3784
  if (t.type === 9) {
3668
3785
  const {
3669
- unitId: so,
3670
- sheetId: Wn,
3671
- sheetName: Ft
3786
+ unitId: uo,
3787
+ sheetId: Gn,
3788
+ sheetName: zt
3672
3789
  } = t;
3673
- if (Ft == null || be == null || be.length === 0 || Wn !== be)
3790
+ if (zt == null || be == null || be.length === 0 || Gn !== be)
3674
3791
  continue;
3675
- Me = Ve({
3792
+ Oe = qe({
3676
3793
  range: D,
3677
- sheetName: Ft,
3794
+ sheetName: zt,
3678
3795
  unitId: U
3679
3796
  });
3680
3797
  } else
3681
- Me = this._getNewRangeByMoveParam(
3798
+ Oe = this._getNewRangeByMoveParam(
3682
3799
  ue,
3683
3800
  t,
3684
3801
  a,
3685
3802
  c
3686
3803
  );
3687
- Me != null && (p[P] = {
3688
- ...N,
3689
- token: Me
3690
- }, g = !0, C.push(P));
3804
+ Oe != null && (p[B] = {
3805
+ ...A,
3806
+ token: Oe
3807
+ }, I = !0, C.push(B));
3691
3808
  }
3692
- if (!g)
3809
+ if (!I)
3693
3810
  return !0;
3694
- const S = this._updateRefOffset(p, C, I, f);
3811
+ const S = this._updateRefOffset(p, C, g, f);
3695
3812
  l.setValue(d, m, {
3696
- f: `=${cn(S)}`,
3697
- x: I,
3813
+ f: `=${un(S)}`,
3814
+ x: g,
3698
3815
  y: f,
3699
3816
  si: R
3700
3817
  });
@@ -3710,7 +3827,7 @@ let Qe = class extends H {
3710
3827
  unitId: m,
3711
3828
  sheetName: b,
3712
3829
  refOffsetX: h,
3713
- refOffsetY: I
3830
+ refOffsetY: g
3714
3831
  } = i;
3715
3832
  if (!this._checkIsSameUnitAndSheet(
3716
3833
  a,
@@ -3721,139 +3838,139 @@ let Qe = class extends H {
3721
3838
  d
3722
3839
  ))
3723
3840
  return;
3724
- const f = Ue.moveOffset(l, h, I);
3841
+ const f = Ve.moveOffset(l, h, g);
3725
3842
  let R = null;
3726
3843
  if (r === 0) {
3727
3844
  if (c == null || u == null)
3728
3845
  return;
3729
- const p = this._checkMoveEdge(f, c), g = Ue.getIntersects(f, c);
3730
- if (g == null)
3846
+ const p = this._checkMoveEdge(f, c), I = Ve.getIntersects(f, c);
3847
+ if (I == null)
3731
3848
  return;
3732
- const C = dr(
3733
- { id: J.MoveRangeCommandId, params: { toRange: u, fromRange: c } },
3734
- g
3735
- ), S = Z(C, g);
3849
+ const C = hr(
3850
+ { id: Z.MoveRangeCommandId, params: { toRange: u, fromRange: c } },
3851
+ I
3852
+ ), S = ee(C, I);
3736
3853
  if (S == null)
3737
3854
  return;
3738
- R = this._getMoveNewRange(p, S, c, u, f, g);
3855
+ R = this._getMoveNewRange(p, S, c, u, f, I);
3739
3856
  }
3740
3857
  if (o != null) {
3741
3858
  if (r === 1) {
3742
- const p = br(
3859
+ const p = Er(
3743
3860
  {
3744
- id: J.InsertRowCommandId,
3861
+ id: Z.InsertRowCommandId,
3745
3862
  params: { range: o, unitId: "", subUnitId: "", direction: M.DOWN }
3746
3863
  },
3747
3864
  f
3748
- ), g = Z(p, f);
3749
- if (g == null)
3865
+ ), I = ee(p, f);
3866
+ if (I == null)
3750
3867
  return;
3751
3868
  R = {
3752
3869
  ...f,
3753
- ...g
3870
+ ...I
3754
3871
  };
3755
3872
  } else if (r === 2) {
3756
- const p = pr(
3873
+ const p = Rr(
3757
3874
  {
3758
- id: J.InsertColCommandId,
3875
+ id: Z.InsertColCommandId,
3759
3876
  params: { range: o, unitId: "", subUnitId: "", direction: M.RIGHT }
3760
3877
  },
3761
3878
  f
3762
- ), g = Z(p, f);
3763
- if (g == null)
3879
+ ), I = ee(p, f);
3880
+ if (I == null)
3764
3881
  return;
3765
3882
  R = {
3766
3883
  ...f,
3767
- ...g
3884
+ ...I
3768
3885
  };
3769
3886
  } else if (r === 3) {
3770
- const p = hr(
3887
+ const p = gr(
3771
3888
  {
3772
- id: J.RemoveRowCommandId,
3889
+ id: Z.RemoveRowCommandId,
3773
3890
  params: { range: o }
3774
3891
  },
3775
3892
  f
3776
- ), g = Z(p, f);
3777
- if (g == null)
3893
+ ), I = ee(p, f);
3894
+ if (I == null)
3778
3895
  return;
3779
3896
  R = {
3780
3897
  ...f,
3781
- ...g
3898
+ ...I
3782
3899
  };
3783
3900
  } else if (r === 4) {
3784
- const p = Er(
3901
+ const p = Ir(
3785
3902
  {
3786
- id: J.RemoveColCommandId,
3903
+ id: Z.RemoveColCommandId,
3787
3904
  params: { range: o }
3788
3905
  },
3789
3906
  f
3790
- ), g = Z(p, f);
3791
- if (g == null)
3907
+ ), I = ee(p, f);
3908
+ if (I == null)
3792
3909
  return;
3793
3910
  R = {
3794
3911
  ...f,
3795
- ...g
3912
+ ...I
3796
3913
  };
3797
3914
  } else if (r === 5) {
3798
- const p = Rr(
3915
+ const p = vr(
3799
3916
  {
3800
- id: J.DeleteRangeMoveLeftCommandId,
3917
+ id: Z.DeleteRangeMoveLeftCommandId,
3801
3918
  params: { range: o }
3802
3919
  },
3803
3920
  f
3804
- ), g = Z(p, f);
3805
- if (g == null)
3921
+ ), I = ee(p, f);
3922
+ if (I == null)
3806
3923
  return;
3807
3924
  R = {
3808
3925
  ...f,
3809
- ...g
3926
+ ...I
3810
3927
  };
3811
3928
  } else if (r === 6) {
3812
- const p = gr(
3929
+ const p = Pr(
3813
3930
  {
3814
- id: J.DeleteRangeMoveUpCommandId,
3931
+ id: Z.DeleteRangeMoveUpCommandId,
3815
3932
  params: { range: o }
3816
3933
  },
3817
3934
  f
3818
- ), g = Z(p, f);
3819
- if (g == null)
3935
+ ), I = ee(p, f);
3936
+ if (I == null)
3820
3937
  return;
3821
3938
  R = {
3822
3939
  ...f,
3823
- ...g
3940
+ ...I
3824
3941
  };
3825
3942
  } else if (r === 7) {
3826
- const p = Ir(
3943
+ const p = Sr(
3827
3944
  {
3828
- id: J.InsertRangeMoveDownCommandId,
3945
+ id: Z.InsertRangeMoveDownCommandId,
3829
3946
  params: { range: o }
3830
3947
  },
3831
3948
  f
3832
- ), g = Z(p, f);
3833
- if (g == null)
3949
+ ), I = ee(p, f);
3950
+ if (I == null)
3834
3951
  return;
3835
3952
  R = {
3836
3953
  ...f,
3837
- ...g
3954
+ ...I
3838
3955
  };
3839
3956
  } else if (r === 8) {
3840
- const p = vr(
3957
+ const p = Br(
3841
3958
  {
3842
- id: J.InsertRangeMoveRightCommandId,
3959
+ id: Z.InsertRangeMoveRightCommandId,
3843
3960
  params: { range: o }
3844
3961
  },
3845
3962
  f
3846
- ), g = Z(p, f);
3847
- if (g == null)
3963
+ ), I = ee(p, f);
3964
+ if (I == null)
3848
3965
  return;
3849
3966
  R = {
3850
3967
  ...f,
3851
- ...g
3968
+ ...I
3852
3969
  };
3853
3970
  }
3854
3971
  }
3855
3972
  if (R != null)
3856
- return Ve({
3973
+ return qe({
3857
3974
  range: R,
3858
3975
  sheetName: b,
3859
3976
  unitId: m
@@ -3874,14 +3991,14 @@ let Qe = class extends H {
3874
3991
  const r = [];
3875
3992
  for (let a = 0, s = i.length; a < s; a++) {
3876
3993
  const o = i[a];
3877
- if (typeof o == "string" || o.nodeType !== W.REFERENCE || e.includes(a)) {
3994
+ if (typeof o == "string" || o.nodeType !== G.REFERENCE || e.includes(a)) {
3878
3995
  r.push(o);
3879
3996
  continue;
3880
3997
  }
3881
- const { token: c } = o, u = Re(c), { range: l, sheetName: d, unitId: m } = u, b = Ue.moveOffset(l, t, n);
3998
+ const { token: c } = o, u = ge(c), { range: l, sheetName: d, unitId: m } = u, b = Ve.moveOffset(l, t, n);
3882
3999
  r.push({
3883
4000
  ...o,
3884
- token: Ve({
4001
+ token: qe({
3885
4002
  range: b,
3886
4003
  unitId: m,
3887
4004
  sheetName: d
@@ -3930,68 +4047,68 @@ let Qe = class extends H {
3930
4047
  startColumn: d,
3931
4048
  endRow: m,
3932
4049
  endColumn: b
3933
- } = t, { startRow: h, startColumn: I, endRow: f, endColumn: R } = n, {
4050
+ } = t, { startRow: h, startColumn: g, endRow: f, endColumn: R } = n, {
3934
4051
  startRow: p,
3935
- endRow: g,
4052
+ endRow: I,
3936
4053
  startColumn: C,
3937
4054
  endColumn: S
3938
4055
  } = a, {
3939
4056
  startRow: v,
3940
- endRow: P,
4057
+ endRow: B,
3941
4058
  startColumn: _,
3942
- endColumn: N
3943
- } = r, B = { ...r };
4059
+ endColumn: A
4060
+ } = r, P = { ...r };
3944
4061
  if (i === 0)
3945
- if (c === _ && u === N)
4062
+ if (c === _ && u === A)
3946
4063
  if (s < v)
3947
- B.startRow = s;
3948
- else if (o < P)
3949
- B.startRow = s;
3950
- else if (o >= P && h <= P)
3951
- B.startRow = m + 1, B.endRow = o;
4064
+ P.startRow = s;
4065
+ else if (o < B)
4066
+ P.startRow = s;
4067
+ else if (o >= B && h <= B)
4068
+ P.startRow = m + 1, P.endRow = o;
3952
4069
  else
3953
4070
  return;
3954
4071
  else
3955
4072
  return;
3956
4073
  else if (i === 1)
3957
- if (c === _ && u === N)
3958
- if (o > P)
3959
- B.endRow = o;
4074
+ if (c === _ && u === A)
4075
+ if (o > B)
4076
+ P.endRow = o;
3960
4077
  else if (s > v)
3961
- B.endRow = o;
4078
+ P.endRow = o;
3962
4079
  else if (s <= v && f >= v)
3963
- B.endRow = l + 1, B.startRow = s;
4080
+ P.endRow = l + 1, P.startRow = s;
3964
4081
  else
3965
4082
  return;
3966
4083
  else
3967
4084
  return;
3968
4085
  else if (i === 2)
3969
- if (s === v && o === P)
4086
+ if (s === v && o === B)
3970
4087
  if (c < _)
3971
- B.startColumn = c;
3972
- else if (u < N)
3973
- B.startColumn = c;
3974
- else if (u >= N && I <= N)
3975
- B.startColumn = b + 1, B.endColumn = u;
4088
+ P.startColumn = c;
4089
+ else if (u < A)
4090
+ P.startColumn = c;
4091
+ else if (u >= A && g <= A)
4092
+ P.startColumn = b + 1, P.endColumn = u;
3976
4093
  else
3977
4094
  return;
3978
4095
  else
3979
4096
  return;
3980
4097
  else if (i === 3)
3981
- if (s === v && o === P)
3982
- if (u > N)
3983
- B.endColumn = u;
4098
+ if (s === v && o === B)
4099
+ if (u > A)
4100
+ P.endColumn = u;
3984
4101
  else if (c > _)
3985
- B.endColumn = u;
4102
+ P.endColumn = u;
3986
4103
  else if (c <= _ && R >= _)
3987
- B.endColumn = d + 1, B.startColumn = c;
4104
+ P.endColumn = d + 1, P.startColumn = c;
3988
4105
  else
3989
4106
  return;
3990
4107
  else
3991
4108
  return;
3992
4109
  else
3993
- (i === 4 || (I <= S + 1 && R >= N || I <= _ && R >= C - 1) && h <= v && f >= P || (h <= g + 1 && f >= P || h <= v && f >= p - 1) && I <= _ && R >= N) && (B.startRow = s, B.startColumn = c, B.endRow = o, B.endColumn = u);
3994
- return B;
4110
+ (i === 4 || (g <= S + 1 && R >= A || g <= _ && R >= C - 1) && h <= v && f >= B || (h <= I + 1 && f >= B || h <= v && f >= p - 1) && g <= _ && R >= A) && (P.startRow = s, P.startColumn = c, P.endRow = o, P.endColumn = u);
4111
+ return P;
3995
4112
  }
3996
4113
  _getInsertNewRange() {
3997
4114
  }
@@ -4003,17 +4120,17 @@ let Qe = class extends H {
4003
4120
  };
4004
4121
  }
4005
4122
  };
4006
- Qe = ks([
4007
- K(Y.Ready, Qe),
4008
- le(0, ge),
4009
- le(1, Q),
4010
- le(2, y(Ie)),
4011
- le(3, y(tt)),
4012
- le(4, y(_t)),
4013
- le(5, y(Dt)),
4014
- le(6, y(et))
4015
- ], Qe);
4016
- const Cs = {}, _s = {
4123
+ Je = Ds([
4124
+ X(Q.Ready, Je),
4125
+ le(0, Ie),
4126
+ le(1, J),
4127
+ le(2, y(ve)),
4128
+ le(3, y(nt)),
4129
+ le(4, y(yt)),
4130
+ le(5, y(Tt)),
4131
+ le(6, y(tt))
4132
+ ], Je);
4133
+ const ys = {}, Ts = {
4017
4134
  BETADIST: {
4018
4135
  description: "Returns the beta cumulative distribution function",
4019
4136
  abstract: "Returns the beta cumulative distribution function",
@@ -4588,7 +4705,7 @@ const Cs = {}, _s = {
4588
4705
  number2: { name: "number2", detail: "second" }
4589
4706
  }
4590
4707
  }
4591
- }, Ds = {
4708
+ }, As = {
4592
4709
  CUBEKPIMEMBER: {
4593
4710
  description: "Returns a key performance indicator (KPI) property and displays the KPI name in the cell. A KPI is a quantifiable measurement, such as monthly gross profit or quarterly employee turnover, that is used to monitor an organization's performance.",
4594
4711
  abstract: "Returns a key performance indicator (KPI) property and displays the KPI name in the cell. A KPI is a quantifiable measurement, such as monthly gross profit or quarterly employee turnover, that is used to monitor an organization's performance.",
@@ -4687,7 +4804,7 @@ const Cs = {}, _s = {
4687
4804
  number2: { name: "number2", detail: "second" }
4688
4805
  }
4689
4806
  }
4690
- }, ys = {
4807
+ }, Ns = {
4691
4808
  DAVERAGE: {
4692
4809
  description: "Returns the average of selected database entries",
4693
4810
  abstract: "Returns the average of selected database entries",
@@ -4856,7 +4973,7 @@ const Cs = {}, _s = {
4856
4973
  number2: { name: "number2", detail: "second" }
4857
4974
  }
4858
4975
  }
4859
- }, Ts = {
4976
+ }, Ms = {
4860
4977
  DATE: {
4861
4978
  description: "Returns the serial number of a particular date",
4862
4979
  abstract: "Returns the serial number of a particular date",
@@ -5207,7 +5324,7 @@ const Cs = {}, _s = {
5207
5324
  number2: { name: "number2", detail: "second" }
5208
5325
  }
5209
5326
  }
5210
- }, As = {
5327
+ }, Os = {
5211
5328
  BESSELI: {
5212
5329
  description: "Returns the modified Bessel function In(x)",
5213
5330
  abstract: "Returns the modified Bessel function In(x)",
@@ -5964,7 +6081,7 @@ const Cs = {}, _s = {
5964
6081
  number2: { name: "number2", detail: "second" }
5965
6082
  }
5966
6083
  }
5967
- }, Ns = {
6084
+ }, xs = {
5968
6085
  ACCRINT: {
5969
6086
  description: "Returns the accrued interest for a security that pays periodic interest",
5970
6087
  abstract: "Returns the accrued interest for a security that pays periodic interest",
@@ -6735,7 +6852,7 @@ const Cs = {}, _s = {
6735
6852
  number2: { name: "number2", detail: "second" }
6736
6853
  }
6737
6854
  }
6738
- }, Ms = {
6855
+ }, ws = {
6739
6856
  CELL: {
6740
6857
  description: "Returns information about the formatting, location, or contents of a cell",
6741
6858
  abstract: "Returns information about the formatting, location, or contents of a cell",
@@ -7030,7 +7147,7 @@ const Cs = {}, _s = {
7030
7147
  number2: { name: "number2", detail: "second" }
7031
7148
  }
7032
7149
  }
7033
- }, Os = {
7150
+ }, Ls = {
7034
7151
  AND: {
7035
7152
  description: "Returns TRUE if all of its arguments are TRUE",
7036
7153
  abstract: "Returns TRUE if all of its arguments are TRUE",
@@ -7181,8 +7298,12 @@ const Cs = {}, _s = {
7181
7298
  }
7182
7299
  ],
7183
7300
  functionParameter: {
7184
- number1: { name: "number1", detail: "first" },
7185
- number2: { name: "number2", detail: "second" }
7301
+ number1: { name: "rows", detail: "The number of rows in the array. Must be greater than zero." },
7302
+ number2: { name: "cols", detail: "The number of columns in the array. Must be greater than zero." },
7303
+ value3: {
7304
+ name: "lambda",
7305
+ detail: " A LAMBDA that is called to create the array. The LAMBDA takes two parameters: row (The row index of the array), col (The column index of the array)."
7306
+ }
7186
7307
  }
7187
7308
  },
7188
7309
  MAP: {
@@ -7297,7 +7418,7 @@ const Cs = {}, _s = {
7297
7418
  number2: { name: "number2", detail: "second" }
7298
7419
  }
7299
7420
  }
7300
- }, xs = {
7421
+ }, Fs = {
7301
7422
  ADDRESS: {
7302
7423
  description: "Returns a reference as text to a single cell in a worksheet",
7303
7424
  abstract: "Returns a reference as text to a single cell in a worksheet",
@@ -7816,9 +7937,9 @@ const Cs = {}, _s = {
7816
7937
  number2: { name: "number2", detail: "second" }
7817
7938
  }
7818
7939
  }
7819
- }, ws = {
7940
+ }, zs = {
7820
7941
  ABS: {
7821
- description: "Returns the absolute value of a number",
7942
+ description: "Returns the absolute value of a number. The absolute value of a number is the number without its sign.",
7822
7943
  abstract: "Returns the absolute value of a number",
7823
7944
  links: [
7824
7945
  {
@@ -7827,12 +7948,11 @@ const Cs = {}, _s = {
7827
7948
  }
7828
7949
  ],
7829
7950
  functionParameter: {
7830
- number1: { name: "number1", detail: "first" },
7831
- number2: { name: "number2", detail: "second" }
7951
+ number: { name: "number", detail: "The real number of which you want the absolute value." }
7832
7952
  }
7833
7953
  },
7834
7954
  ACOS: {
7835
- description: "Returns the arccosine of a number",
7955
+ description: "Returns the arccosine, or inverse cosine, of a number. The arccosine is the angle whose cosine is number. The returned angle is given in radians in the range 0 (zero) to pi.",
7836
7956
  abstract: "Returns the arccosine of a number",
7837
7957
  links: [
7838
7958
  {
@@ -7841,12 +7961,11 @@ const Cs = {}, _s = {
7841
7961
  }
7842
7962
  ],
7843
7963
  functionParameter: {
7844
- number1: { name: "number1", detail: "first" },
7845
- number2: { name: "number2", detail: "second" }
7964
+ number: { name: "number", detail: "The cosine of the angle you want and must be from -1 to 1." }
7846
7965
  }
7847
7966
  },
7848
7967
  ACOSH: {
7849
- description: "Returns the inverse hyperbolic cosine of a number",
7968
+ description: "Returns the inverse hyperbolic cosine of a number. The number must be greater than or equal to 1. The inverse hyperbolic cosine is the value whose hyperbolic cosine is number, so ACOSH(COSH(number)) equals number.",
7850
7969
  abstract: "Returns the inverse hyperbolic cosine of a number",
7851
7970
  links: [
7852
7971
  {
@@ -7855,12 +7974,11 @@ const Cs = {}, _s = {
7855
7974
  }
7856
7975
  ],
7857
7976
  functionParameter: {
7858
- number1: { name: "number1", detail: "first" },
7859
- number2: { name: "number2", detail: "second" }
7977
+ number: { name: "number", detail: "Any real number equal to or greater than 1." }
7860
7978
  }
7861
7979
  },
7862
7980
  ACOT: {
7863
- description: "Returns the arccotangent of a number",
7981
+ description: "Returns the principal value of the arccotangent, or inverse cotangent, of a number.",
7864
7982
  abstract: "Returns the arccotangent of a number",
7865
7983
  links: [
7866
7984
  {
@@ -7869,8 +7987,10 @@ const Cs = {}, _s = {
7869
7987
  }
7870
7988
  ],
7871
7989
  functionParameter: {
7872
- number1: { name: "number1", detail: "first" },
7873
- number2: { name: "number2", detail: "second" }
7990
+ number: {
7991
+ name: "number",
7992
+ detail: "Number is the cotangent of the angle you want. This must be a real number."
7993
+ }
7874
7994
  }
7875
7995
  },
7876
7996
  ACOTH: {
@@ -8981,7 +9101,7 @@ const Cs = {}, _s = {
8981
9101
  number2: { name: "number2", detail: "second" }
8982
9102
  }
8983
9103
  }
8984
- }, Fs = {
9104
+ }, Us = {
8985
9105
  AVEDEV: {
8986
9106
  description: "Returns the average of the absolute deviations of data points from their mean",
8987
9107
  abstract: "Returns the average of the absolute deviations of data points from their mean",
@@ -10567,7 +10687,7 @@ const Cs = {}, _s = {
10567
10687
  number2: { name: "number2", detail: "second" }
10568
10688
  }
10569
10689
  }
10570
- }, Ls = {
10690
+ }, Vs = {
10571
10691
  ASC: {
10572
10692
  description: "Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters",
10573
10693
  abstract: "Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters",
@@ -11226,7 +11346,7 @@ const Cs = {}, _s = {
11226
11346
  number2: { name: "number2", detail: "second" }
11227
11347
  }
11228
11348
  }
11229
- }, zs = {}, Us = {
11349
+ }, qs = {}, Hs = {
11230
11350
  ENCODEURL: {
11231
11351
  description: "Returns a URL-encoded string",
11232
11352
  abstract: "Returns a URL-encoded string",
@@ -11269,7 +11389,7 @@ const Cs = {}, _s = {
11269
11389
  number2: { name: "number2", detail: "second" }
11270
11390
  }
11271
11391
  }
11272
- }, vo = {
11392
+ }, Bo = {
11273
11393
  formula: {
11274
11394
  insert: {
11275
11395
  tooltip: "Functions",
@@ -11281,21 +11401,21 @@ const Cs = {}, _s = {
11281
11401
  more: "More Functions..."
11282
11402
  },
11283
11403
  functionList: {
11284
- ...Ns,
11285
- ...Ts,
11286
- ...ws,
11287
- ...Fs,
11288
11404
  ...xs,
11289
- ...ys,
11405
+ ...Ms,
11406
+ ...zs,
11407
+ ...Us,
11408
+ ...Fs,
11409
+ ...Ns,
11410
+ ...Vs,
11290
11411
  ...Ls,
11412
+ ...ws,
11291
11413
  ...Os,
11292
- ...Ms,
11293
11414
  ...As,
11294
- ...Ds,
11295
- ..._s,
11296
- ...Us,
11297
- ...Cs,
11298
- ...zs
11415
+ ...Ts,
11416
+ ...Hs,
11417
+ ...ys,
11418
+ ...qs
11299
11419
  },
11300
11420
  prompt: {
11301
11421
  helpExample: "EXAMPLE",
@@ -11332,7 +11452,7 @@ const Cs = {}, _s = {
11332
11452
  pasteFormula: "Paste Formula"
11333
11453
  }
11334
11454
  }
11335
- }, Vs = {}, qs = {
11455
+ }, $s = {}, js = {
11336
11456
  BETADIST: {
11337
11457
  description: "返回 beta 累积分布函数",
11338
11458
  abstract: "返回 beta 累积分布函数",
@@ -11907,7 +12027,7 @@ const Cs = {}, _s = {
11907
12027
  number2: { name: "number2", detail: "second" }
11908
12028
  }
11909
12029
  }
11910
- }, Hs = {
12030
+ }, Ws = {
11911
12031
  CUBEKPIMEMBER: {
11912
12032
  description: "返回重要性能指示器 (KPI) 属性,并在单元格中显示 KPI 名称。 KPI 是一种用于监控单位绩效的可计量度量值,如每月总利润或季度员工调整。",
11913
12033
  abstract: "返回重要性能指示器 (KPI) 属性,并在单元格中显示 KPI 名称。 KPI 是一种用于监控单位绩效的可计量度量值,如每月总利润或季度员工调整。",
@@ -12006,7 +12126,7 @@ const Cs = {}, _s = {
12006
12126
  number2: { name: "number2", detail: "second" }
12007
12127
  }
12008
12128
  }
12009
- }, $s = {
12129
+ }, Gs = {
12010
12130
  DAVERAGE: {
12011
12131
  description: "返回所选数据库条目的平均值",
12012
12132
  abstract: "返回所选数据库条目的平均值",
@@ -12175,7 +12295,7 @@ const Cs = {}, _s = {
12175
12295
  number2: { name: "number2", detail: "second" }
12176
12296
  }
12177
12297
  }
12178
- }, js = {
12298
+ }, Ks = {
12179
12299
  DATE: {
12180
12300
  description: "返回特定日期的序列号",
12181
12301
  abstract: "返回特定日期的序列号",
@@ -12526,7 +12646,7 @@ const Cs = {}, _s = {
12526
12646
  number2: { name: "number2", detail: "second" }
12527
12647
  }
12528
12648
  }
12529
- }, Ws = {
12649
+ }, Ys = {
12530
12650
  BESSELI: {
12531
12651
  description: "返回修正的贝赛耳函数 In(x)",
12532
12652
  abstract: "返回修正的贝赛耳函数 In(x)",
@@ -13283,7 +13403,7 @@ const Cs = {}, _s = {
13283
13403
  number2: { name: "number2", detail: "second" }
13284
13404
  }
13285
13405
  }
13286
- }, Gs = {
13406
+ }, Xs = {
13287
13407
  ACCRINT: {
13288
13408
  description: "返回定期支付利息的债券的应计利息",
13289
13409
  abstract: "返回定期支付利息的债券的应计利息",
@@ -14054,7 +14174,7 @@ const Cs = {}, _s = {
14054
14174
  number2: { name: "number2", detail: "second" }
14055
14175
  }
14056
14176
  }
14057
- }, Xs = {
14177
+ }, Qs = {
14058
14178
  CELL: {
14059
14179
  description: "返回有关单元格格式、位置或内容的信息",
14060
14180
  abstract: "返回有关单元格格式、位置或内容的信息",
@@ -14349,7 +14469,7 @@ const Cs = {}, _s = {
14349
14469
  number2: { name: "number2", detail: "second" }
14350
14470
  }
14351
14471
  }
14352
- }, Ks = {
14472
+ }, Js = {
14353
14473
  AND: {
14354
14474
  description: "如果其所有参数均为 TRUE,则返回 TRUE",
14355
14475
  abstract: "如果其所有参数均为 TRUE,则返回 TRUE",
@@ -14500,8 +14620,12 @@ const Cs = {}, _s = {
14500
14620
  }
14501
14621
  ],
14502
14622
  functionParameter: {
14503
- number1: { name: "number1", detail: "first" },
14504
- number2: { name: "number2", detail: "second" }
14623
+ number1: { name: "rows", detail: "数组中的行数。 必须大于零" },
14624
+ number2: { name: "cols", detail: "数组中的列数。 必须大于零" },
14625
+ value3: {
14626
+ name: "lambda",
14627
+ detail: "调用 LAMBDA 来创建数组。 LAMBDA 接受两个参数:row数组的行索引, col数组的列索引"
14628
+ }
14505
14629
  }
14506
14630
  },
14507
14631
  MAP: {
@@ -14616,7 +14740,7 @@ const Cs = {}, _s = {
14616
14740
  number2: { name: "number2", detail: "second" }
14617
14741
  }
14618
14742
  }
14619
- }, Ys = {
14743
+ }, Zs = {
14620
14744
  ADDRESS: {
14621
14745
  description: "以文本形式将引用值返回到工作表的单个单元格",
14622
14746
  abstract: "以文本形式将引用值返回到工作表的单个单元格",
@@ -15135,9 +15259,9 @@ const Cs = {}, _s = {
15135
15259
  number2: { name: "number2", detail: "second" }
15136
15260
  }
15137
15261
  }
15138
- }, Qs = {
15262
+ }, eo = {
15139
15263
  ABS: {
15140
- description: "返回数字的绝对值",
15264
+ description: "返回数字的绝对值。一个数字的绝对值是该数字不带其符号的形式。",
15141
15265
  abstract: "返回数字的绝对值",
15142
15266
  links: [
15143
15267
  {
@@ -15146,12 +15270,11 @@ const Cs = {}, _s = {
15146
15270
  }
15147
15271
  ],
15148
15272
  functionParameter: {
15149
- number1: { name: "number1", detail: "first" },
15150
- number2: { name: "number2", detail: "second" }
15273
+ number: { name: "数值", detail: "需要计算其绝对值的实数。" }
15151
15274
  }
15152
15275
  },
15153
15276
  ACOS: {
15154
- description: "返回数字的反余弦值",
15277
+ description: "返回数字的反余弦值。 反余弦值是指余弦值为 number 的角度。 返回的角度以弧度表示,弧度值在 0(零)到 pi 之间。",
15155
15278
  abstract: "返回数字的反余弦值",
15156
15279
  links: [
15157
15280
  {
@@ -15160,12 +15283,11 @@ const Cs = {}, _s = {
15160
15283
  }
15161
15284
  ],
15162
15285
  functionParameter: {
15163
- number1: { name: "number1", detail: "first" },
15164
- number2: { name: "number2", detail: "second" }
15286
+ number: { name: "数值", detail: "所求角度的余弦值,必须介于 -1 到 1 之间。" }
15165
15287
  }
15166
15288
  },
15167
15289
  ACOSH: {
15168
- description: "返回数字的反双曲余弦值",
15290
+ description: "返回数字的反双曲余弦值。 该数字必须大于或等于 1。 反双曲余弦值是指双曲余弦值为 number 的值,因此 ACOSH(COSH(number)) 等于 number。",
15169
15291
  abstract: "返回数字的反双曲余弦值",
15170
15292
  links: [
15171
15293
  {
@@ -15174,12 +15296,11 @@ const Cs = {}, _s = {
15174
15296
  }
15175
15297
  ],
15176
15298
  functionParameter: {
15177
- number1: { name: "number1", detail: "first" },
15178
- number2: { name: "number2", detail: "second" }
15299
+ number: { name: "数值", detail: "大于或等于 1 的任意实数。" }
15179
15300
  }
15180
15301
  },
15181
15302
  ACOT: {
15182
- description: "返回一个数的反余切值",
15303
+ description: "返回数字的反余切值的主值。",
15183
15304
  abstract: "返回一个数的反余切值",
15184
15305
  links: [
15185
15306
  {
@@ -15188,8 +15309,7 @@ const Cs = {}, _s = {
15188
15309
  }
15189
15310
  ],
15190
15311
  functionParameter: {
15191
- number1: { name: "number1", detail: "first" },
15192
- number2: { name: "number2", detail: "second" }
15312
+ number: { name: "数值", detail: "Number 是需要的角度的正切值。 这必须是实数。" }
15193
15313
  }
15194
15314
  },
15195
15315
  ACOTH: {
@@ -16300,7 +16420,7 @@ const Cs = {}, _s = {
16300
16420
  number2: { name: "number2", detail: "second" }
16301
16421
  }
16302
16422
  }
16303
- }, Js = {
16423
+ }, to = {
16304
16424
  AVEDEV: {
16305
16425
  description: "返回数据点与它们的平均值的绝对偏差平均值",
16306
16426
  abstract: "返回数据点与它们的平均值的绝对偏差平均值",
@@ -17886,7 +18006,7 @@ const Cs = {}, _s = {
17886
18006
  number2: { name: "number2", detail: "second" }
17887
18007
  }
17888
18008
  }
17889
- }, Zs = {
18009
+ }, no = {
17890
18010
  ASC: {
17891
18011
  description: "将字符串中的全角(双字节)英文字母或片假名更改为半角(单字节)字符",
17892
18012
  abstract: "将字符串中的全角(双字节)英文字母或片假名更改为半角(单字节)字符",
@@ -18545,7 +18665,7 @@ const Cs = {}, _s = {
18545
18665
  number2: { name: "number2", detail: "second" }
18546
18666
  }
18547
18667
  }
18548
- }, eo = {}, to = {
18668
+ }, ro = {}, io = {
18549
18669
  ENCODEURL: {
18550
18670
  description: "返回 URL 编码的字符串",
18551
18671
  abstract: "返回 URL 编码的字符串",
@@ -18588,7 +18708,7 @@ const Cs = {}, _s = {
18588
18708
  number2: { name: "number2", detail: "second" }
18589
18709
  }
18590
18710
  }
18591
- }, no = {
18711
+ }, ao = {
18592
18712
  formula: {
18593
18713
  insert: {
18594
18714
  tooltip: "函数",
@@ -18600,21 +18720,21 @@ const Cs = {}, _s = {
18600
18720
  more: "更多函数..."
18601
18721
  },
18602
18722
  functionList: {
18723
+ ...Xs,
18724
+ ...Ks,
18725
+ ...eo,
18726
+ ...to,
18727
+ ...Zs,
18603
18728
  ...Gs,
18604
- ...js,
18605
- ...Qs,
18729
+ ...no,
18606
18730
  ...Js,
18731
+ ...Qs,
18607
18732
  ...Ys,
18608
- ...$s,
18609
- ...Zs,
18610
- ...Ks,
18611
- ...Xs,
18612
18733
  ...Ws,
18613
- ...Hs,
18614
- ...qs,
18615
- ...to,
18616
- ...Vs,
18617
- ...eo
18734
+ ...js,
18735
+ ...io,
18736
+ ...$s,
18737
+ ...ro
18618
18738
  },
18619
18739
  prompt: {
18620
18740
  helpExample: "示例",
@@ -18652,57 +18772,57 @@ const Cs = {}, _s = {
18652
18772
  }
18653
18773
  }
18654
18774
  };
18655
- var ro = Object.defineProperty, io = Object.getOwnPropertyDescriptor, ao = (i, e, t, n) => {
18656
- for (var r = n > 1 ? void 0 : n ? io(e, t) : e, a = i.length - 1, s; a >= 0; a--)
18775
+ var so = Object.defineProperty, oo = Object.getOwnPropertyDescriptor, co = (i, e, t, n) => {
18776
+ for (var r = n > 1 ? void 0 : n ? oo(e, t) : e, a = i.length - 1, s; a >= 0; a--)
18657
18777
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
18658
- return n && r && ro(e, t, r), r;
18659
- }, pt = (i, e) => (t, n) => e(t, n, i), ht;
18660
- let rn = (ht = class extends Zn {
18778
+ return n && r && so(e, t, r), r;
18779
+ }, Et = (i, e) => (t, n) => e(t, n, i), Rt;
18780
+ let an = (Rt = class extends er {
18661
18781
  constructor(i, e, t, n) {
18662
- super(Tn), this._config = i, this._injector = e, this._localeService = t, this._currentUniverService = n;
18782
+ super(An), this._config = i, this._injector = e, this._localeService = t, this._currentUniverService = n;
18663
18783
  }
18664
18784
  initialize() {
18665
18785
  this._localeService.load({
18666
- zhCN: no
18786
+ zhCN: ao
18667
18787
  }), [
18668
18788
  // services
18669
- [de, { useClass: hi }],
18670
- [Ae, { useClass: li }],
18789
+ [de, { useClass: gi }],
18790
+ [Ne, { useClass: pi }],
18671
18791
  [
18672
- wt,
18792
+ Ft,
18673
18793
  {
18674
18794
  useFactory: () => {
18675
18795
  var e;
18676
- return this._injector.createInstance(Bt, ((e = this._config) == null ? void 0 : e.description) || []);
18796
+ return this._injector.createInstance(kt, ((e = this._config) == null ? void 0 : e.description) || []);
18677
18797
  }
18678
18798
  // TODO@Dusuhir: initialize config with asynchronous method?
18679
18799
  }
18680
18800
  ],
18681
- [Mt, { useClass: Gr }],
18801
+ [xt, { useClass: Xr }],
18682
18802
  // controllers
18803
+ [Ye],
18683
18804
  [Xe],
18684
18805
  [Ke],
18685
- [Ge],
18686
- [$e],
18687
18806
  [je],
18688
- [He],
18689
- [Ye],
18690
- [Qe],
18691
18807
  [We],
18692
- [qe]
18808
+ [$e],
18809
+ [Qe],
18810
+ [Je],
18811
+ [Ge],
18812
+ [He]
18693
18813
  ].forEach((e) => this._injector.add(e));
18694
18814
  }
18695
18815
  onReady() {
18696
18816
  this.initialize();
18697
18817
  }
18698
- }, k(ht, "type", er.Sheet), ht);
18699
- rn = ao([
18700
- pt(1, y(et)),
18701
- pt(2, y(_e)),
18702
- pt(3, ge)
18703
- ], rn);
18818
+ }, k(Rt, "type", tr.Sheet), Rt);
18819
+ an = co([
18820
+ Et(1, y(tt)),
18821
+ Et(2, y(De)),
18822
+ Et(3, Ie)
18823
+ ], an);
18704
18824
  export {
18705
- rn as UniverSheetsFormulaPlugin,
18706
- vo as enUS,
18707
- no as zhCN
18825
+ an as UniverSheetsFormulaPlugin,
18826
+ Bo as enUS,
18827
+ ao as zhCN
18708
18828
  };