@univerjs/sheets-table 0.10.9 → 0.10.10-experimental.20251016-33b0941

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/index.js CHANGED
@@ -1,48 +1,48 @@
1
1
  var Ze = Object.defineProperty;
2
2
  var et = (t, e, n) => e in t ? Ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var b = (t, e, n) => et(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { CellValueType as V, BorderStyleTypes as tt, generateRandomId as q, IUniverInstanceService as E, Inject as C, LocaleService as de, Disposable as k, CommandType as y, IUndoRedoService as A, ICommandService as x, sequenceExecute as L, IResourceManagerService as nt, Rectangle as pe, RTree as rt, InterceptorEffectEnum as st, UniverInstanceType as he, customNameCharacterCheck as at, ILogService as ot, Injector as Ae, IConfigService as Le, Plugin as it, merge as lt, registerDependencies as ut, touchDependencies as Ie } from "@univerjs/core";
5
- import { getSheetCommandTarget as $, SheetInterceptorService as Ce, INTERCEPTOR_POINT as Be, AddRangeThemeMutation as Ee, RemoveRangeThemeMutation as We, SheetRangeThemeModel as He, SheetsSelectionsService as ge, InsertRowMutation as Pe, RemoveRowMutation as Ve, getMoveRangeUndoRedoMutations as me, InsertColMutation as qe, RemoveColMutation as ke, IExclusiveRangeService as ct, RefRangeService as dt, RemoveColCommand as ht, RemoveRowCommand as gt, InsertColCommand as mt, InsertRowCommand as bt, SheetRangeThemeService as wt, RangeThemeStyle as Rt } from "@univerjs/sheets";
6
- import { Subject as J, BehaviorSubject as Je, filter as be, switchMap as Me } from "rxjs";
7
- var M = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(M || {}), D = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(D || {}), Qe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Qe || {}), Z = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(Z || {}), O = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(O || {}), F = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.GreaterThan = "greaterThan", t.GreaterThanOrEqual = "greaterThanOrEqual", t.LessThan = "lessThan", t.LessThanOrEqual = "lessThanOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Above = "above", t.Below = "below", t.TopN = "topN", t))(F || {}), H = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(H || {}), g = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.After = "after", t.AfterOrEqual = "afterOrEqual", t.Before = "before", t.BeforeOrEqual = "beforeOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Today = "today", t.Yesterday = "yesterday", t.Tomorrow = "tomorrow", t.ThisWeek = "thisWeek", t.LastWeek = "lastWeek", t.NextWeek = "nextWeek", t.ThisMonth = "thisMonth", t.LastMonth = "lastMonth", t.NextMonth = "nextMonth", t.ThisQuarter = "thisQuarter", t.LastQuarter = "lastQuarter", t.NextQuarter = "nextQuarter", t.ThisYear = "thisYear", t.LastYear = "lastYear", t.NextYear = "nextYear", t.YearToDate = "yearToDate", t.Quarter = "quarter", t.Month = "month", t.M1 = "m1", t.M2 = "m2", t.M3 = "m3", t.M4 = "m4", t.M5 = "m5", t.M6 = "m6", t.M7 = "m7", t.M8 = "m8", t.M9 = "m9", t.M10 = "m10", t.M11 = "m11", t.M12 = "m12", t.Q1 = "q1", t.Q2 = "q2", t.Q3 = "q3", t.Q4 = "q4", t))(g || {}), P = /* @__PURE__ */ ((t) => (t[t.FilteredSortNone = 1] = "FilteredSortNone", t[t.FilteredSortAsc = 2] = "FilteredSortAsc", t[t.FilteredSortDesc = 3] = "FilteredSortDesc", t[t.FilterNoneSortNone = 4] = "FilterNoneSortNone", t[t.FilterNoneSortAsc = 5] = "FilterNoneSortAsc", t[t.FilterNoneSortDesc = 6] = "FilterNoneSortDesc", t))(P || {}), Q = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(Q || {});
4
+ import { CellValueType as P, BorderStyleTypes as tt, createREGEXFromWildChar as j, generateRandomId as q, IUniverInstanceService as E, Inject as p, LocaleService as he, Disposable as k, CommandType as y, IUndoRedoService as A, ICommandService as x, sequenceExecute as L, IResourceManagerService as nt, Rectangle as Ce, RTree as rt, InterceptorEffectEnum as st, UniverInstanceType as ge, customNameCharacterCheck as at, ILogService as ot, Injector as Ae, IConfigService as Le, Plugin as it, merge as lt, registerDependencies as ut, touchDependencies as Ie } from "@univerjs/core";
5
+ import { getSheetCommandTarget as $, SheetInterceptorService as pe, INTERCEPTOR_POINT as Be, AddRangeThemeMutation as Ee, RemoveRangeThemeMutation as We, SheetRangeThemeModel as He, SheetsSelectionsService as me, InsertRowMutation as Ve, RemoveRowMutation as Pe, getMoveRangeUndoRedoMutations as be, InsertColMutation as qe, RemoveColMutation as ke, IExclusiveRangeService as ct, RefRangeService as dt, RemoveColCommand as ht, RemoveRowCommand as gt, InsertColCommand as mt, InsertRowCommand as bt, SheetRangeThemeService as wt, RangeThemeStyle as ft, ZebraCrossingCacheController as Rt } from "@univerjs/sheets";
6
+ import { Subject as J, BehaviorSubject as Je, filter as we, switchMap as Me } from "rxjs";
7
+ var M = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(M || {}), D = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(D || {}), Qe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Qe || {}), Z = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(Z || {}), O = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(O || {}), F = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.GreaterThan = "greaterThan", t.GreaterThanOrEqual = "greaterThanOrEqual", t.LessThan = "lessThan", t.LessThanOrEqual = "lessThanOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Above = "above", t.Below = "below", t.TopN = "topN", t))(F || {}), H = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(H || {}), g = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.After = "after", t.AfterOrEqual = "afterOrEqual", t.Before = "before", t.BeforeOrEqual = "beforeOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Today = "today", t.Yesterday = "yesterday", t.Tomorrow = "tomorrow", t.ThisWeek = "thisWeek", t.LastWeek = "lastWeek", t.NextWeek = "nextWeek", t.ThisMonth = "thisMonth", t.LastMonth = "lastMonth", t.NextMonth = "nextMonth", t.ThisQuarter = "thisQuarter", t.LastQuarter = "lastQuarter", t.NextQuarter = "nextQuarter", t.ThisYear = "thisYear", t.LastYear = "lastYear", t.NextYear = "nextYear", t.YearToDate = "yearToDate", t.Quarter = "quarter", t.Month = "month", t.M1 = "m1", t.M2 = "m2", t.M3 = "m3", t.M4 = "m4", t.M5 = "m5", t.M6 = "m6", t.M7 = "m7", t.M8 = "m8", t.M9 = "m9", t.M10 = "m10", t.M11 = "m11", t.M12 = "m12", t.Q1 = "q1", t.Q2 = "q2", t.Q3 = "q3", t.Q4 = "q4", t))(g || {}), V = /* @__PURE__ */ ((t) => (t[t.FilteredSortNone = 1] = "FilteredSortNone", t[t.FilteredSortAsc = 2] = "FilteredSortAsc", t[t.FilteredSortDesc = 3] = "FilteredSortDesc", t[t.FilterNoneSortNone = 4] = "FilterNoneSortNone", t[t.FilterNoneSortAsc = 5] = "FilterNoneSortAsc", t[t.FilterNoneSortDesc = 6] = "FilterNoneSortDesc", t))(V || {}), Q = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(Q || {});
8
8
  function X(t, e) {
9
9
  return `${e} ${t}`;
10
10
  }
11
- const ve = "TRUE", Fe = "FALSE", ft = (t) => {
11
+ const ve = "TRUE", Fe = "FALSE", Ct = (t) => {
12
12
  var n;
13
13
  return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
14
14
  };
15
15
  function Ye(t) {
16
16
  if (t) {
17
17
  const { v: e, t: n, p: r } = t;
18
- return r ? ft(r) : (n === V.FORCE_STRING || n === V.STRING) && e !== void 0 && e !== null ? String(e) : n === V.BOOLEAN ? e ? ve : Fe : n === V.NUMBER ? String(e) : typeof e === "boolean" ? e ? ve : Fe : e == null ? "" : String(e);
18
+ return r ? Ct(r) : (n === P.FORCE_STRING || n === P.STRING) && e !== void 0 && e !== null ? String(e) : n === P.BOOLEAN ? e ? ve : Fe : n === P.NUMBER ? String(e) : typeof e === "boolean" ? e ? ve : Fe : e == null ? "" : String(e);
19
19
  }
20
20
  return "";
21
21
  }
22
- function pt(t, e) {
22
+ function St(t, e) {
23
23
  if (t != null)
24
24
  switch (e) {
25
25
  case Q.Asc:
26
- return P.FilteredSortAsc;
26
+ return V.FilteredSortAsc;
27
27
  case Q.Desc:
28
- return P.FilteredSortDesc;
28
+ return V.FilteredSortDesc;
29
29
  default:
30
- return P.FilteredSortNone;
30
+ return V.FilteredSortNone;
31
31
  }
32
32
  else
33
33
  switch (e) {
34
34
  case Q.Asc:
35
- return P.FilterNoneSortAsc;
35
+ return V.FilterNoneSortAsc;
36
36
  case Q.Desc:
37
- return P.FilterNoneSortDesc;
37
+ return V.FilterNoneSortDesc;
38
38
  default:
39
- return P.FilterNoneSortNone;
39
+ return V.FilterNoneSortNone;
40
40
  }
41
41
  }
42
- function St(t) {
42
+ function pt(t) {
43
43
  return t ? t.filterType === Z.condition : !1;
44
44
  }
45
- function tr(t) {
45
+ function nr(t) {
46
46
  return t ? t.filterType === Z.manual : !1;
47
47
  }
48
48
  const N = {
@@ -50,7 +50,7 @@ const N = {
50
50
  cl: {
51
51
  rgb: "rgb(95, 101, 116)"
52
52
  }
53
- }, Ge = "sheets-table.config", De = {}, nr = {
53
+ }, Ge = "sheets-table.config", De = {}, rr = {
54
54
  headerRowStyle: {
55
55
  bd: {
56
56
  t: N
@@ -71,7 +71,7 @@ const N = {
71
71
  b: N
72
72
  }
73
73
  }
74
- }, rr = (t, e) => {
74
+ }, sr = (t, e) => {
75
75
  if (t === "headerRowStyle") {
76
76
  if (!e.bd)
77
77
  return {
@@ -104,14 +104,14 @@ const N = {
104
104
  }
105
105
  };
106
106
  return e;
107
- }, Ct = [
107
+ }, _t = [
108
108
  [["#6280F9", "#FFFFFF", "#BAC6F8", "#D2DAFA"], ["#fff"]],
109
109
  [["#16BDCA", "#FFFFFF", "#EDFAFA", "#AFECEF"], ["#000"]],
110
110
  [["#31C48D", "#FFFFFF", "#F3FAF7", "#BCF0DA"], ["#fff"]],
111
111
  [["#AC94FA", "#FFFFFF", "#F6F5FF", "#EDEBFE"], ["#fff"]],
112
112
  [["#F17EBB", "#FFFFFF", "#FDF2F8", "#FCE8F3"], ["#fff"]],
113
113
  [["#F98080", "#FFFFFF", "#FDF2F2", "#FDE8E8"], ["#fff"]]
114
- ], je = Ct.map((t, e) => {
114
+ ], ze = _t.map((t, e) => {
115
115
  const [n, r] = t, [s, a, o, u] = n, [l] = r;
116
116
  return {
117
117
  name: `table-default-${e}`,
@@ -191,45 +191,45 @@ class Y {
191
191
  this.id = e.id, this.displayName = e.displayName, this.dataType = e.dataType, this.formula = e.formula, this.meta = e.meta, this.style = e.style;
192
192
  }
193
193
  }
194
- const _t = (t) => t.getMonth() <= 2, Tt = (t) => {
194
+ const Tt = (t) => t.getMonth() <= 2, It = (t) => {
195
195
  const e = t.getMonth();
196
196
  return e > 2 && e <= 5;
197
- }, It = (t) => {
197
+ }, Mt = (t) => {
198
198
  const e = t.getMonth();
199
199
  return e > 5 && e <= 8;
200
- }, Mt = (t) => {
200
+ }, vt = (t) => {
201
201
  const e = t.getMonth();
202
202
  return e > 8 && e <= 11;
203
- }, vt = (t) => t.getMonth() === 0, Ft = (t) => t.getMonth() === 1, Dt = (t) => t.getMonth() === 2, yt = (t) => t.getMonth() === 3, Nt = (t) => t.getMonth() === 4, xt = (t) => t.getMonth() === 5, Ot = (t) => t.getMonth() === 6, Ut = (t) => t.getMonth() === 7, $t = (t) => t.getMonth() === 8, At = (t) => t.getMonth() === 9, Lt = (t) => t.getMonth() === 10, Bt = (t) => t.getMonth() === 11, Et = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Wt = (t, e = /* @__PURE__ */ new Date()) => {
203
+ }, Ft = (t) => t.getMonth() === 0, Dt = (t) => t.getMonth() === 1, yt = (t) => t.getMonth() === 2, Nt = (t) => t.getMonth() === 3, xt = (t) => t.getMonth() === 4, Ot = (t) => t.getMonth() === 5, Ut = (t) => t.getMonth() === 6, $t = (t) => t.getMonth() === 7, At = (t) => t.getMonth() === 8, Lt = (t) => t.getMonth() === 9, Bt = (t) => t.getMonth() === 10, Et = (t) => t.getMonth() === 11, Wt = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Ht = (t, e = /* @__PURE__ */ new Date()) => {
204
204
  const n = new Date(e);
205
205
  return n.setDate(n.getDate() + 1), t.toDateString() === n.toDateString();
206
- }, Ht = (t, e = /* @__PURE__ */ new Date()) => {
206
+ }, Vt = (t, e = /* @__PURE__ */ new Date()) => {
207
207
  const n = new Date(e);
208
208
  return n.setDate(n.getDate() - 1), t.toDateString() === n.toDateString();
209
209
  }, G = (t) => {
210
210
  const e = t.getDay(), n = t.getDate() - e + (e === 0 ? -6 : 1), r = new Date(t);
211
211
  return r.setDate(n), r;
212
- }, ze = 10080 * 60 * 1e3, Pt = (t, e = /* @__PURE__ */ new Date()) => {
212
+ }, je = 10080 * 60 * 1e3, Pt = (t, e = /* @__PURE__ */ new Date()) => {
213
213
  const n = G(t), r = G(e);
214
214
  return n.toDateString() === r.toDateString();
215
- }, Vt = (t, e = /* @__PURE__ */ new Date()) => {
216
- const n = G(t), r = new Date(G(e).getTime() + ze);
217
- return n.toDateString() === r.toDateString();
218
215
  }, qt = (t, e = /* @__PURE__ */ new Date()) => {
219
- const n = G(t), r = new Date(G(e).getTime() - ze);
216
+ const n = G(t), r = new Date(G(e).getTime() + je);
220
217
  return n.toDateString() === r.toDateString();
221
- }, kt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth(), Jt = (t) => {
218
+ }, kt = (t, e = /* @__PURE__ */ new Date()) => {
219
+ const n = G(t), r = new Date(G(e).getTime() - je);
220
+ return n.toDateString() === r.toDateString();
221
+ }, Jt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth(), Qt = (t) => {
222
222
  const e = new Date(t);
223
223
  return e.setHours(0, 0, 0, 0), e.setDate(1), e;
224
- }, Qt = (t, e = /* @__PURE__ */ new Date()) => {
224
+ }, Yt = (t, e = /* @__PURE__ */ new Date()) => {
225
225
  const n = new Date(e);
226
226
  n.setHours(0, 0, 0, 0), n.setMonth(n.getMonth() + 1, 1);
227
227
  const r = new Date(n);
228
228
  r.setMonth(r.getMonth() + 1, 0);
229
229
  const s = t.getTime();
230
230
  return s >= n.getTime() && s < r.getTime();
231
- }, Yt = (t, e = /* @__PURE__ */ new Date()) => {
232
- const n = Jt(e), r = new Date(n);
231
+ }, Gt = (t, e = /* @__PURE__ */ new Date()) => {
232
+ const n = Qt(e), r = new Date(n);
233
233
  r.setMonth(r.getMonth() + 1, 0);
234
234
  const s = t.getTime();
235
235
  return s >= n.getTime() && s < r.getTime();
@@ -238,7 +238,7 @@ const _t = (t) => t.getMonth() <= 2, Tt = (t) => {
238
238
  e.setHours(0, 0, 0, 0), e.setDate(1);
239
239
  const n = e.getMonth();
240
240
  return e.setMonth(n - n % 3), e;
241
- }, Gt = (t, e = /* @__PURE__ */ new Date()) => {
241
+ }, zt = (t, e = /* @__PURE__ */ new Date()) => {
242
242
  const n = _e(e), r = new Date(n);
243
243
  r.setMonth(r.getMonth() + 3);
244
244
  const s = t.getTime();
@@ -250,20 +250,20 @@ const _t = (t) => t.getMonth() <= 2, Tt = (t) => {
250
250
  s.setMonth(s.getMonth() + 3, 0);
251
251
  const a = t.getTime();
252
252
  return a >= r.getTime() && a < s.getTime();
253
- }, zt = (t, e = /* @__PURE__ */ new Date()) => {
253
+ }, Kt = (t, e = /* @__PURE__ */ new Date()) => {
254
254
  const n = _e(e), r = new Date(n);
255
255
  r.setMonth(r.getMonth() - 3);
256
256
  const s = new Date(n);
257
257
  s.setDate(0);
258
258
  const a = t.getTime();
259
259
  return a >= r.getTime() && a < s.getTime();
260
- }, Kt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear(), Xt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() + 1, Zt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() - 1, en = (t, e = /* @__PURE__ */ new Date()) => {
260
+ }, Xt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear(), Zt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() + 1, en = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() - 1, tn = (t, e = /* @__PURE__ */ new Date()) => {
261
261
  const n = new Date(e);
262
262
  n.setHours(0, 0, 0, 0), n.setMonth(0, 1);
263
263
  const r = t.getTime();
264
264
  return r >= n.getTime() && r < e.getTime();
265
265
  };
266
- function tn(t) {
266
+ function nn(t) {
267
267
  switch (t.compareType) {
268
268
  case g.Equal: {
269
269
  const e = new Date(t.expectedValue);
@@ -301,15 +301,15 @@ function tn(t) {
301
301
  };
302
302
  case g.Today: {
303
303
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
304
- return (n) => Et(n, e);
304
+ return (n) => Wt(n, e);
305
305
  }
306
306
  case g.Yesterday: {
307
307
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
308
- return (n) => Ht(n, e);
308
+ return (n) => Vt(n, e);
309
309
  }
310
310
  case g.Tomorrow: {
311
311
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
312
- return (n) => Wt(n, e);
312
+ return (n) => Ht(n, e);
313
313
  }
314
314
  case g.ThisWeek: {
315
315
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
@@ -317,31 +317,31 @@ function tn(t) {
317
317
  }
318
318
  case g.LastWeek: {
319
319
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
320
- return (n) => qt(n, e);
320
+ return (n) => kt(n, e);
321
321
  }
322
322
  case g.NextWeek: {
323
323
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
324
- return (n) => Vt(n, e);
324
+ return (n) => qt(n, e);
325
325
  }
326
326
  case g.ThisMonth: {
327
327
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
328
- return (n) => kt(n, e);
328
+ return (n) => Jt(n, e);
329
329
  }
330
330
  case g.LastMonth: {
331
331
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
332
- return (n) => Yt(n, e);
332
+ return (n) => Gt(n, e);
333
333
  }
334
334
  case g.NextMonth: {
335
335
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
336
- return (n) => Qt(n, e);
336
+ return (n) => Yt(n, e);
337
337
  }
338
338
  case g.ThisQuarter: {
339
339
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
340
- return (n) => Gt(n, e);
340
+ return (n) => zt(n, e);
341
341
  }
342
342
  case g.LastQuarter: {
343
343
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
344
- return (n) => zt(n, e);
344
+ return (n) => Kt(n, e);
345
345
  }
346
346
  case g.NextQuarter: {
347
347
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
@@ -349,57 +349,57 @@ function tn(t) {
349
349
  }
350
350
  case g.ThisYear: {
351
351
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
352
- return (n) => Kt(n, e);
352
+ return (n) => Xt(n, e);
353
353
  }
354
354
  case g.LastYear: {
355
355
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
356
- return (n) => Zt(n, e);
356
+ return (n) => en(n, e);
357
357
  }
358
358
  case g.NextYear: {
359
359
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
360
- return (n) => Xt(n, e);
360
+ return (n) => Zt(n, e);
361
361
  }
362
362
  case g.YearToDate: {
363
363
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
364
- return (n) => en(n, e);
364
+ return (n) => tn(n, e);
365
365
  }
366
366
  case g.M1:
367
- return vt;
368
- case g.M2:
369
367
  return Ft;
370
- case g.M3:
368
+ case g.M2:
371
369
  return Dt;
372
- case g.M4:
370
+ case g.M3:
373
371
  return yt;
374
- case g.M5:
372
+ case g.M4:
375
373
  return Nt;
376
- case g.M6:
374
+ case g.M5:
377
375
  return xt;
378
- case g.M7:
376
+ case g.M6:
379
377
  return Ot;
380
- case g.M8:
378
+ case g.M7:
381
379
  return Ut;
382
- case g.M9:
380
+ case g.M8:
383
381
  return $t;
384
- case g.M10:
382
+ case g.M9:
385
383
  return At;
386
- case g.M11:
384
+ case g.M10:
387
385
  return Lt;
388
- case g.M12:
386
+ case g.M11:
389
387
  return Bt;
388
+ case g.M12:
389
+ return Et;
390
390
  case g.Q1:
391
- return _t;
392
- case g.Q2:
393
391
  return Tt;
394
- case g.Q3:
392
+ case g.Q2:
395
393
  return It;
396
- case g.Q4:
394
+ case g.Q3:
397
395
  return Mt;
396
+ case g.Q4:
397
+ return vt;
398
398
  default:
399
399
  throw new Error("Unsupported compare type");
400
400
  }
401
401
  }
402
- class nn {
402
+ class rn {
403
403
  /**
404
404
  * Initializes a new instance of the Heap class.
405
405
  */
@@ -463,7 +463,7 @@ class nn {
463
463
  return this.heap.includes(e);
464
464
  }
465
465
  }
466
- class rn extends nn {
466
+ class sn extends rn {
467
467
  /**
468
468
  * Initializes a new instance of the MinHeap class.
469
469
  */
@@ -502,13 +502,13 @@ class rn extends nn {
502
502
  this.heap[0] = this.heap.pop(), this.shiftDown(0);
503
503
  }
504
504
  }
505
- const sn = (t, e) => {
506
- const n = new rn();
505
+ const an = (t, e) => {
506
+ const n = new sn();
507
507
  for (const r of t)
508
508
  n.insert(r), n.size() > e && n.pop();
509
509
  return n.heap;
510
- }, an = (t, e) => t > e, on = (t, e) => t < e, ln = (t, e, n) => sn(t, e).includes(n);
511
- function un(t, e) {
510
+ }, on = (t, e) => t > e, ln = (t, e) => t < e, un = (t, e, n) => an(t, e).includes(n);
511
+ function cn(t, e) {
512
512
  switch (t.compareType) {
513
513
  case F.Equal: {
514
514
  const n = Number(t.expectedValue);
@@ -544,36 +544,33 @@ function un(t, e) {
544
544
  }
545
545
  case F.Above: {
546
546
  const n = e.average;
547
- return (r) => an(r, n);
547
+ return (r) => on(r, n);
548
548
  }
549
549
  case F.Below: {
550
550
  const n = e.average;
551
- return (r) => on(r, n);
551
+ return (r) => ln(r, n);
552
552
  }
553
553
  case F.TopN: {
554
554
  const n = e.list, r = Number(t.expectedValue);
555
- return (s) => ln(n, r, s);
555
+ return (s) => un(n, r, s);
556
556
  }
557
557
  }
558
558
  }
559
- const z = (t) => {
560
- const n = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\\\*/g, ".*").replace(/\\\?/g, ".");
561
- return new RegExp(`^${n}$`);
562
- }, cn = (t, e) => z(e).test(t), dn = (t, e) => !z(e).test(t), hn = (t, e) => z(`*${e}*`).test(t), gn = (t, e) => !z(`*${e}*`).test(t), mn = (t, e) => z(`${e}*`).test(t), bn = (t, e) => z(`*${e}`).test(t);
563
- function wn(t) {
559
+ const dn = (t, e) => j(e).test(t), hn = (t, e) => !j(e).test(t), gn = (t, e) => j(`*${e}*`).test(t), mn = (t, e) => !j(`*${e}*`).test(t), bn = (t, e) => j(`${e}*`).test(t), wn = (t, e) => j(`*${e}`).test(t);
560
+ function fn(t) {
564
561
  switch (t.compareType) {
565
562
  case H.Equal:
566
- return (e) => cn(e, t.expectedValue);
567
- case H.NotEqual:
568
563
  return (e) => dn(e, t.expectedValue);
569
- case H.Contains:
564
+ case H.NotEqual:
570
565
  return (e) => hn(e, t.expectedValue);
571
- case H.NotContains:
566
+ case H.Contains:
572
567
  return (e) => gn(e, t.expectedValue);
573
- case H.StartsWith:
568
+ case H.NotContains:
574
569
  return (e) => mn(e, t.expectedValue);
575
- case H.EndsWith:
570
+ case H.StartsWith:
576
571
  return (e) => bn(e, t.expectedValue);
572
+ case H.EndsWith:
573
+ return (e) => wn(e, t.expectedValue);
577
574
  default:
578
575
  return console.error(`Unknown filter operator: ${t.compareType}`), (e) => !0;
579
576
  }
@@ -587,48 +584,48 @@ g.Today, g.Yesterday, g.Tomorrow, g.ThisWeek, g.LastWeek, g.NextWeek, g.ThisMont
587
584
  function Ke(t) {
588
585
  return Rn.has(t);
589
586
  }
590
- function fn(t, e) {
587
+ function Cn(t, e) {
591
588
  if (Ke(t.filterInfo.compareType))
592
589
  return (n) => !0;
593
590
  switch (t.filterInfo.conditionType) {
594
591
  case O.Date:
595
- return tn(t.filterInfo);
592
+ return nn(t.filterInfo);
596
593
  case O.Number:
597
- return un(t.filterInfo, e);
594
+ return cn(t.filterInfo, e);
598
595
  case O.String:
599
- return wn(t.filterInfo);
596
+ return fn(t.filterInfo);
600
597
  case O.Logic:
601
598
  default:
602
599
  return (n) => !0;
603
600
  }
604
601
  }
605
- function oe(t, e, n, r) {
602
+ function ie(t, e, n, r) {
606
603
  switch (r) {
607
604
  case O.Date: {
608
605
  const s = ye(t, e, n);
609
- return s ? Cn(s) : null;
606
+ return s ? _n(s) : null;
610
607
  }
611
608
  case O.Number:
612
609
  return ye(t, e, n);
613
610
  case O.String:
614
611
  default:
615
- return Sn(t, e, n);
612
+ return pn(t, e, n);
616
613
  }
617
614
  }
618
- const pn = (t) => {
615
+ const Sn = (t) => {
619
616
  var n;
620
617
  return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
621
618
  };
622
- function Sn(t, e, n) {
619
+ function pn(t, e, n) {
623
620
  const r = t.getCell(e, n);
624
621
  if (!r) return null;
625
622
  const { v: s, t: a, p: o } = r;
626
623
  if (o)
627
- return pn(o);
624
+ return Sn(o);
628
625
  if (typeof s == "string")
629
- return a === V.BOOLEAN ? s.toUpperCase() : s;
626
+ return a === P.BOOLEAN ? s.toUpperCase() : s;
630
627
  if (typeof s == "number")
631
- return a === V.BOOLEAN ? s ? "TRUE" : "FALSE" : s;
628
+ return a === P.BOOLEAN ? s ? "TRUE" : "FALSE" : s;
632
629
  if (typeof s == "boolean") return s ? "TRUE" : "FALSE";
633
630
  if (s !== void 0)
634
631
  return String(s);
@@ -637,9 +634,9 @@ function ye(t, e, n) {
637
634
  const r = t.getCell(e, n);
638
635
  if (!r) return null;
639
636
  const { v: s, t: a, p: o } = r;
640
- return o ? null : typeof s == "string" && a === V.NUMBER ? Number(t.getCellRaw(e, n).v) : Number(s);
637
+ return o ? null : typeof s == "string" && a === P.NUMBER ? Number(t.getCellRaw(e, n).v) : Number(s);
641
638
  }
642
- function Cn(t) {
639
+ function _n(t) {
643
640
  const e = new Date(Date.UTC(1900, 0, 1, 0, 0, 0)), n = new Date(Date.UTC(1900, 1, 28, 0, 0, 0));
644
641
  let r = t - 1;
645
642
  return r > (n.getTime() - e.getTime()) / (1e3 * 3600 * 24) && (r -= 1), r < 0 && (r = t), new Date(e.getTime() + r * (1e3 * 3600 * 24));
@@ -663,7 +660,7 @@ class Ne {
663
660
  getFilterState(e) {
664
661
  var r;
665
662
  const n = ((r = this._tableSortInfo) == null ? void 0 : r.columnIndex) === e ? this._tableSortInfo.sortState : Q.None;
666
- return pt(this._tableColumnFilterList[e], n);
663
+ return St(this._tableColumnFilterList[e], n);
667
664
  }
668
665
  getSortState() {
669
666
  var e;
@@ -689,8 +686,8 @@ class Ne {
689
686
  if (a && e) {
690
687
  const { startRow: o, endRow: u, startColumn: l } = n, i = l + r, h = this.getExecuteFunc(e, n, r, a);
691
688
  for (let d = o; d <= u; d++) {
692
- const c = St(a) ? a.filterInfo.conditionType : O.String;
693
- oe(e, d, i, c) === null ? s.add(d) : h(oe(e, d, i, c)) || s.add(d);
689
+ const c = pt(a) ? a.filterInfo.conditionType : O.String;
690
+ ie(e, d, i, c) === null ? s.add(d) : h(ie(e, d, i, c)) || s.add(d);
694
691
  }
695
692
  }
696
693
  }
@@ -698,7 +695,7 @@ class Ne {
698
695
  const { startRow: s, endRow: a, startColumn: o } = n, u = o + r, l = [];
699
696
  let i = 0, h = 0;
700
697
  for (let d = s; d <= a; d++) {
701
- const c = oe(e, d, u, O.Number);
698
+ const c = ie(e, d, u, O.Number);
702
699
  c !== null && (l.push(c), i++, h += c);
703
700
  }
704
701
  return {
@@ -712,7 +709,7 @@ class Ne {
712
709
  return (o) => a.has(o);
713
710
  } else if (s.filterType === Z.condition) {
714
711
  const o = Ke(s.filterInfo.compareType) ? this._getNumberCalculatedOptions(e, n, r) : void 0;
715
- return fn(s, o);
712
+ return Cn(s, o);
716
713
  } else
717
714
  return (a) => !0;
718
715
  }
@@ -844,7 +841,7 @@ class xe {
844
841
  }
845
842
  getTableStyleId() {
846
843
  var e;
847
- return (e = this._tableStyleId) != null ? e : je[0].name;
844
+ return (e = this._tableStyleId) != null ? e : ze[0].name;
848
845
  }
849
846
  setTableStyleId(e) {
850
847
  this._tableStyleId = e;
@@ -915,8 +912,8 @@ class xe {
915
912
  this._id = "", this._name = "", this._tableStyleId = "", this._showHeader = !0, this._showFooter = !0, delete this._range, this._columns.clear(), this._columnOrder = [];
916
913
  }
917
914
  }
918
- var _n = Object.getOwnPropertyDescriptor, Tn = (t, e, n, r) => {
919
- for (var s = r > 1 ? void 0 : r ? _n(e, n) : e, a = t.length - 1, o; a >= 0; a--)
915
+ var Tn = Object.getOwnPropertyDescriptor, In = (t, e, n, r) => {
916
+ for (var s = r > 1 ? void 0 : r ? Tn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
920
917
  (o = t[a]) && (s = o(s) || s);
921
918
  return s;
922
919
  }, Oe = (t, e) => (n, r) => e(n, r, t);
@@ -1219,16 +1216,16 @@ let T = class extends k {
1219
1216
  }), this._tableMap.clear();
1220
1217
  }
1221
1218
  };
1222
- T = Tn([
1219
+ T = In([
1223
1220
  Oe(0, E),
1224
- Oe(1, C(de))
1221
+ Oe(1, p(he))
1225
1222
  ], T);
1226
- var In = Object.getOwnPropertyDescriptor, Mn = (t, e, n, r) => {
1227
- for (var s = r > 1 ? void 0 : r ? In(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1223
+ var Mn = Object.getOwnPropertyDescriptor, vn = (t, e, n, r) => {
1224
+ for (var s = r > 1 ? void 0 : r ? Mn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1228
1225
  (o = t[a]) && (s = o(s) || s);
1229
1226
  return s;
1230
- }, vn = (t, e) => (n, r) => e(n, r, t);
1231
- let j = class extends k {
1227
+ }, Fn = (t, e) => (n, r) => e(n, r, t);
1228
+ let z = class extends k {
1232
1229
  constructor(t) {
1233
1230
  super(), this._tableManager = t;
1234
1231
  }
@@ -1269,38 +1266,38 @@ let j = class extends k {
1269
1266
  this._tableManager.addFilter(t, e, n, r);
1270
1267
  }
1271
1268
  getCellValueWithConditionType(t, e, n, r = O.String) {
1272
- return oe(t, e, n, r);
1269
+ return ie(t, e, n, r);
1273
1270
  }
1274
1271
  };
1275
- j = Mn([
1276
- vn(0, C(T))
1277
- ], j);
1272
+ z = vn([
1273
+ Fn(0, p(T))
1274
+ ], z);
1278
1275
  const ee = {
1279
1276
  id: "sheet.mutation.add-table",
1280
1277
  type: y.MUTATION,
1281
1278
  handler: (t, e) => {
1282
1279
  const { tableId: n, unitId: r, subUnitId: s, name: a, range: o, header: u, options: l } = e;
1283
- return t.get(j).addTable(r, s, a, o, u, n, l), !0;
1280
+ return t.get(z).addTable(r, s, a, o, u, n, l), !0;
1284
1281
  }
1285
1282
  }, te = {
1286
1283
  id: "sheet.mutation.delete-table",
1287
1284
  type: y.MUTATION,
1288
1285
  handler: (t, e) => {
1289
1286
  const { unitId: n, subUnitId: r, tableId: s } = e;
1290
- return t.get(j).deleteTable(n, r, s), !0;
1287
+ return t.get(z).deleteTable(n, r, s), !0;
1291
1288
  }
1292
- }, Fn = {
1289
+ }, Dn = {
1293
1290
  id: "sheet.command.add-table",
1294
1291
  type: y.COMMAND,
1295
1292
  handler: (t, e) => {
1296
1293
  var w;
1297
1294
  if (!e)
1298
1295
  return !1;
1299
- const n = t.get(A), r = t.get(x), s = t.get(de), a = (w = e.id) != null ? w : q();
1296
+ const n = t.get(A), r = t.get(x), s = t.get(he), a = (w = e.id) != null ? w : q();
1300
1297
  let o = e.name;
1301
1298
  if (!o) {
1302
- const R = t.get(T).getTableList(e.unitId).length;
1303
- o = `${s.t("sheets-table.tablePrefix")}${R + 1}`;
1299
+ const f = t.get(T).getTableList(e.unitId).length;
1300
+ o = `${s.t("sheets-table.tablePrefix")}${f + 1}`;
1304
1301
  }
1305
1302
  const u = [], l = [], i = t.get(T), { unitId: h, subUnitId: d, range: c } = e, m = i.getColumnHeader(h, d, c, s.t("sheets-table.columnPrefix"));
1306
1303
  return u.push({ id: ee.id, params: { ...e, tableId: a, name: o, header: m } }), l.push({ id: te.id, params: { tableId: a, unitId: e.unitId } }), L(u, r) && n.pushUndoRedo({
@@ -1309,7 +1306,7 @@ const ee = {
1309
1306
  redoMutations: u
1310
1307
  }), !0;
1311
1308
  }
1312
- }, Dn = {
1309
+ }, yn = {
1313
1310
  id: "sheet.command.delete-table",
1314
1311
  type: y.COMMAND,
1315
1312
  handler: (t, e) => {
@@ -1341,7 +1338,7 @@ const ee = {
1341
1338
  const { tableId: n, unitId: r, column: s, tableFilter: a } = e;
1342
1339
  return t.get(T).addFilter(r, n, s, a), !0;
1343
1340
  }
1344
- }, yn = {
1341
+ }, Nn = {
1345
1342
  id: "sheet.command.set-table-filter",
1346
1343
  type: y.COMMAND,
1347
1344
  handler: (t, e) => {
@@ -1354,12 +1351,12 @@ const ee = {
1354
1351
  redoMutations: a
1355
1352
  }), !0;
1356
1353
  }
1357
- }, Xe = "SHEET_TABLE_PLUGIN", re = "SHEET_TABLE", Nn = "table-custom";
1358
- var xn = Object.getOwnPropertyDescriptor, On = (t, e, n, r) => {
1359
- for (var s = r > 1 ? void 0 : r ? xn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1354
+ }, Xe = "SHEET_TABLE_PLUGIN", re = "SHEET_TABLE", xn = "table-custom";
1355
+ var On = Object.getOwnPropertyDescriptor, Un = (t, e, n, r) => {
1356
+ for (var s = r > 1 ? void 0 : r ? On(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1360
1357
  (o = t[a]) && (s = o(s) || s);
1361
1358
  return s;
1362
- }, we = (t, e) => (n, r) => e(n, r, t);
1359
+ }, fe = (t, e) => (n, r) => e(n, r, t);
1363
1360
  let B = class extends k {
1364
1361
  constructor(e, n, r) {
1365
1362
  super();
@@ -1369,7 +1366,7 @@ let B = class extends k {
1369
1366
  getContainerTableWithRange(e, n, r) {
1370
1367
  const s = this._ensureTableRangeRTree(e), o = Array.from(s.bulkSearch([{ unitId: e, sheetId: n, range: r }])).find((u) => {
1371
1368
  const l = this._tableManager.getTable(e, String(u));
1372
- return l ? pe.contains(l.getRange(), r) : !1;
1369
+ return l ? Ce.contains(l.getRange(), r) : !1;
1373
1370
  });
1374
1371
  if (o)
1375
1372
  return this._tableManager.getTable(e, String(o));
@@ -1460,7 +1457,7 @@ let B = class extends k {
1460
1457
  return {};
1461
1458
  }
1462
1459
  },
1463
- businesses: [he.UNIVER_SHEET],
1460
+ businesses: [ge.UNIVER_SHEET],
1464
1461
  pluginName: Xe,
1465
1462
  onLoad: (e, n) => {
1466
1463
  this._fromJSON(e, n);
@@ -1474,12 +1471,12 @@ let B = class extends k {
1474
1471
  super.dispose(), this._tableRangeRTree.clear();
1475
1472
  }
1476
1473
  };
1477
- B = On([
1478
- we(0, C(Ce)),
1479
- we(1, C(T)),
1480
- we(2, C(nt))
1474
+ B = Un([
1475
+ fe(0, p(pe)),
1476
+ fe(1, p(T)),
1477
+ fe(2, p(nt))
1481
1478
  ], B);
1482
- const p = {
1479
+ const C = {
1483
1480
  id: "sheet.mutation.set-sheet-table",
1484
1481
  type: y.MUTATION,
1485
1482
  handler: (t, e) => {
@@ -1488,7 +1485,7 @@ const p = {
1488
1485
  const { unitId: n, tableId: r, config: s } = e;
1489
1486
  return t.get(T).setTableByConfig(n, r, s), !0;
1490
1487
  }
1491
- }, Un = {
1488
+ }, $n = {
1492
1489
  id: "sheet.command.add-table-theme",
1493
1490
  type: y.COMMAND,
1494
1491
  handler: (t, e) => {
@@ -1505,7 +1502,7 @@ const p = {
1505
1502
  styleJSON: a.toJson()
1506
1503
  }
1507
1504
  }), o.push({
1508
- id: p.id,
1505
+ id: C.id,
1509
1506
  params: {
1510
1507
  unitId: r,
1511
1508
  subUnitId: i,
@@ -1515,7 +1512,7 @@ const p = {
1515
1512
  }
1516
1513
  }
1517
1514
  }), u.push({
1518
- id: p.id,
1515
+ id: C.id,
1519
1516
  params: {
1520
1517
  unitId: r,
1521
1518
  subUnitId: i,
@@ -1539,7 +1536,7 @@ const p = {
1539
1536
  redoMutations: o
1540
1537
  }), !0;
1541
1538
  }
1542
- }, $n = {
1539
+ }, An = {
1543
1540
  id: "sheet.command.remove-table-theme",
1544
1541
  type: y.COMMAND,
1545
1542
  handler: (t, e) => {
@@ -1547,11 +1544,11 @@ const p = {
1547
1544
  return !1;
1548
1545
  const { unitId: n, tableId: r, themeName: s } = e, a = t.get(T), o = t.get(He), u = a.getTableById(n, r);
1549
1546
  if (!u) return !1;
1550
- const l = u.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith("table-default"));
1551
- let m = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith(Nn)).find((R) => R !== s);
1552
- m || (m = d[0]), i.push({ id: p.id, params: { unitId: n, subUnitId: l, tableId: r, config: { theme: m } } }), i.push({ id: We.id, params: { unitId: n, subUnitId: l, styleName: s } });
1547
+ const l = u.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((f) => f == null ? void 0 : f.startsWith("table-default"));
1548
+ let m = o.getRegisteredRangeThemes().filter((f) => f == null ? void 0 : f.startsWith(xn)).find((f) => f !== s);
1549
+ m || (m = d[0]), i.push({ id: C.id, params: { unitId: n, subUnitId: l, tableId: r, config: { theme: m } } }), i.push({ id: We.id, params: { unitId: n, subUnitId: l, styleName: s } });
1553
1550
  const S = o.getDefaultRangeThemeStyle(s);
1554
- S && (h.push({ id: Ee.id, params: { unitId: n, subUnitId: l, styleJSON: S.toJson() } }), h.push({ id: p.id, params: { unitId: n, subUnitId: l, tableId: r, config: { theme: s } } }));
1551
+ S && (h.push({ id: Ee.id, params: { unitId: n, subUnitId: l, styleJSON: S.toJson() } }), h.push({ id: C.id, params: { unitId: n, subUnitId: l, tableId: r, config: { theme: s } } }));
1555
1552
  const w = t.get(x);
1556
1553
  return L(i, w) && t.get(A).pushUndoRedo({
1557
1554
  unitID: n,
@@ -1559,7 +1556,7 @@ const p = {
1559
1556
  undoMutations: h
1560
1557
  }), !0;
1561
1558
  }
1562
- }, An = {
1559
+ }, Ln = {
1563
1560
  id: "sheet.command.set-table-config",
1564
1561
  type: y.COMMAND,
1565
1562
  // eslint-disable-next-line max-lines-per-function
@@ -1568,7 +1565,7 @@ const p = {
1568
1565
  return !1;
1569
1566
  const { unitId: n, tableId: r, name: s, updateRange: a, rowColOperation: o, theme: u } = e, l = t.get(T), i = l.getTableById(n, r);
1570
1567
  if (!i) return !1;
1571
- const h = {}, d = {}, c = t.get(de), S = t.get(E).getCurrentUnitOfType(he.UNIVER_SHEET), w = /* @__PURE__ */ new Set();
1568
+ const h = {}, d = {}, c = t.get(he), S = t.get(E).getCurrentUnitOfType(ge.UNIVER_SHEET), w = /* @__PURE__ */ new Set();
1572
1569
  if (S && (S.getSheets().forEach((_) => {
1573
1570
  w.add(_.getName());
1574
1571
  }), l.getTableList(n).forEach((_) => {
@@ -1586,17 +1583,17 @@ const p = {
1586
1583
  }, d.rowColOperation = o), a && (h.updateRange = {
1587
1584
  newRange: i.getRange()
1588
1585
  }, d.updateRange = a), u && (h.theme = i.getTableStyleId(), d.theme = u);
1589
- const f = {
1586
+ const R = {
1590
1587
  unitId: n,
1591
1588
  subUnitId: i.getSubunitId(),
1592
1589
  tableId: r,
1593
1590
  config: d
1594
1591
  };
1595
- return t.get(x).executeCommand(p.id, f), t.get(A).pushUndoRedo({
1592
+ return t.get(x).executeCommand(C.id, R), t.get(A).pushUndoRedo({
1596
1593
  unitID: n,
1597
1594
  undoMutations: [
1598
1595
  {
1599
- id: p.id,
1596
+ id: C.id,
1600
1597
  params: {
1601
1598
  unitId: n,
1602
1599
  subUnitId: i.getSubunitId(),
@@ -1607,36 +1604,36 @@ const p = {
1607
1604
  ],
1608
1605
  redoMutations: [
1609
1606
  {
1610
- id: p.id,
1611
- params: f
1607
+ id: C.id,
1608
+ params: R
1612
1609
  }
1613
1610
  ]
1614
1611
  }), !0;
1615
1612
  }
1616
- }, Ln = {
1613
+ }, Bn = {
1617
1614
  id: "sheet.command.table-insert-row",
1618
1615
  type: y.COMMAND,
1619
1616
  handler: (t) => {
1620
1617
  const e = t.get(E), n = $(e);
1621
1618
  if (!n)
1622
1619
  return !1;
1623
- const { workbook: r, worksheet: s, unitId: a, subUnitId: o } = n, l = t.get(ge).getCurrentSelections();
1620
+ const { workbook: r, worksheet: s, unitId: a, subUnitId: o } = n, l = t.get(me).getCurrentSelections();
1624
1621
  if (!l.length || l.length > 1)
1625
1622
  return !1;
1626
1623
  t.get(T);
1627
1624
  const h = l[0].range, c = t.get(B).getContainerTableWithRange(a, o, h);
1628
1625
  if (!c) return !1;
1629
- const m = h.endRow - h.startRow + 1, w = s.getRowCount() - 1, f = s.getCellMatrix().getDataRange().endRow, R = [], I = [];
1630
- if (w - f < m)
1631
- R.push({
1632
- id: Pe.id,
1626
+ const m = h.endRow - h.startRow + 1, w = s.getRowCount() - 1, R = s.getCellMatrix().getDataRange().endRow, f = [], I = [];
1627
+ if (w - R < m)
1628
+ f.push({
1629
+ id: Ve.id,
1633
1630
  params: {
1634
1631
  unitId: a,
1635
1632
  subUnitId: o,
1636
1633
  range: { ...h }
1637
1634
  }
1638
- }), R.push({
1639
- id: p.id,
1635
+ }), f.push({
1636
+ id: C.id,
1640
1637
  params: {
1641
1638
  unitId: a,
1642
1639
  subUnitId: o,
@@ -1651,7 +1648,7 @@ const p = {
1651
1648
  }
1652
1649
  }
1653
1650
  }), I.push({
1654
- id: p.id,
1651
+ id: C.id,
1655
1652
  params: {
1656
1653
  unitId: a,
1657
1654
  subUnitId: o,
@@ -1663,7 +1660,7 @@ const p = {
1663
1660
  }
1664
1661
  }
1665
1662
  }), I.push({
1666
- id: Ve.id,
1663
+ id: Pe.id,
1667
1664
  params: {
1668
1665
  unitId: a,
1669
1666
  subUnitId: o,
@@ -1672,8 +1669,8 @@ const p = {
1672
1669
  });
1673
1670
  else {
1674
1671
  const v = { ...c.getRange() };
1675
- R.push({
1676
- id: p.id,
1672
+ f.push({
1673
+ id: C.id,
1677
1674
  params: {
1678
1675
  unitId: a,
1679
1676
  subUnitId: o,
@@ -1688,7 +1685,7 @@ const p = {
1688
1685
  }
1689
1686
  }
1690
1687
  }), I.push({
1691
- id: p.id,
1688
+ id: C.id,
1692
1689
  params: {
1693
1690
  unitId: a,
1694
1691
  subUnitId: o,
@@ -1700,14 +1697,14 @@ const p = {
1700
1697
  }
1701
1698
  }
1702
1699
  });
1703
- const K = me(
1700
+ const K = be(
1704
1701
  t,
1705
1702
  {
1706
1703
  unitId: a,
1707
1704
  subUnitId: o,
1708
1705
  range: {
1709
1706
  startRow: h.startRow,
1710
- endRow: f,
1707
+ endRow: R,
1711
1708
  startColumn: v.startColumn,
1712
1709
  endColumn: v.endColumn
1713
1710
  }
@@ -1717,44 +1714,44 @@ const p = {
1717
1714
  subUnitId: o,
1718
1715
  range: {
1719
1716
  startRow: h.startRow + m,
1720
- endRow: f + m,
1717
+ endRow: R + m,
1721
1718
  startColumn: v.startColumn,
1722
1719
  endColumn: v.endColumn
1723
1720
  }
1724
1721
  }
1725
1722
  );
1726
- K && (R.push(...K.redos), I.push(...K.undos));
1723
+ K && (f.push(...K.redos), I.push(...K.undos));
1727
1724
  }
1728
1725
  const U = t.get(x);
1729
- return L(R, U) && t.get(A).pushUndoRedo({
1726
+ return L(f, U) && t.get(A).pushUndoRedo({
1730
1727
  unitID: a,
1731
1728
  undoMutations: I,
1732
- redoMutations: R
1729
+ redoMutations: f
1733
1730
  }), !0;
1734
1731
  }
1735
- }, Bn = {
1732
+ }, En = {
1736
1733
  id: "sheet.command.table-insert-col",
1737
1734
  type: y.COMMAND,
1738
1735
  handler: (t) => {
1739
1736
  const e = t.get(E), n = $(e);
1740
1737
  if (!n)
1741
1738
  return !1;
1742
- const { worksheet: r, unitId: s, subUnitId: a } = n, u = t.get(ge).getCurrentSelections();
1739
+ const { worksheet: r, unitId: s, subUnitId: a } = n, u = t.get(me).getCurrentSelections();
1743
1740
  if (!u.length || u.length > 1)
1744
1741
  return !1;
1745
1742
  const i = u[0].range, d = t.get(B).getContainerTableWithRange(s, a, i);
1746
1743
  if (!d) return !1;
1747
- const c = i.endColumn - i.startColumn + 1, S = r.getColumnCount() - 1, w = r.getCellMatrix().getDataRange().endColumn, f = [], R = [];
1744
+ const c = i.endColumn - i.startColumn + 1, S = r.getColumnCount() - 1, w = r.getCellMatrix().getDataRange().endColumn, R = [], f = [];
1748
1745
  if (S - w < c)
1749
- f.push({
1746
+ R.push({
1750
1747
  id: qe.id,
1751
1748
  params: {
1752
1749
  unitId: s,
1753
1750
  subUnitId: a,
1754
1751
  range: { ...i }
1755
1752
  }
1756
- }), f.push({
1757
- id: p.id,
1753
+ }), R.push({
1754
+ id: C.id,
1758
1755
  params: {
1759
1756
  unitId: s,
1760
1757
  subUnitId: a,
@@ -1768,8 +1765,8 @@ const p = {
1768
1765
  }
1769
1766
  }
1770
1767
  }
1771
- }), R.push({
1772
- id: p.id,
1768
+ }), f.push({
1769
+ id: C.id,
1773
1770
  params: {
1774
1771
  unitId: s,
1775
1772
  subUnitId: a,
@@ -1783,7 +1780,7 @@ const p = {
1783
1780
  }
1784
1781
  }
1785
1782
  }
1786
- }), R.push({
1783
+ }), f.push({
1787
1784
  id: ke.id,
1788
1785
  params: {
1789
1786
  unitId: s,
@@ -1793,8 +1790,8 @@ const p = {
1793
1790
  });
1794
1791
  else {
1795
1792
  const _ = d.getRange();
1796
- f.push({
1797
- id: p.id,
1793
+ R.push({
1794
+ id: C.id,
1798
1795
  params: {
1799
1796
  unitId: s,
1800
1797
  subUnitId: a,
@@ -1808,8 +1805,8 @@ const p = {
1808
1805
  }
1809
1806
  }
1810
1807
  }
1811
- }), R.push({
1812
- id: p.id,
1808
+ }), f.push({
1809
+ id: C.id,
1813
1810
  params: {
1814
1811
  unitId: s,
1815
1812
  subUnitId: a,
@@ -1824,7 +1821,7 @@ const p = {
1824
1821
  }
1825
1822
  }
1826
1823
  });
1827
- const v = me(
1824
+ const v = be(
1828
1825
  t,
1829
1826
  {
1830
1827
  unitId: s,
@@ -1847,16 +1844,16 @@ const p = {
1847
1844
  }
1848
1845
  }
1849
1846
  );
1850
- v && (f.push(...v.redos), R.push(...v.undos));
1847
+ v && (R.push(...v.redos), f.push(...v.undos));
1851
1848
  }
1852
1849
  const I = t.get(x);
1853
- return L(f, I) && t.get(A).pushUndoRedo({
1850
+ return L(R, I) && t.get(A).pushUndoRedo({
1854
1851
  unitID: s,
1855
- undoMutations: R,
1856
- redoMutations: f
1852
+ undoMutations: f,
1853
+ redoMutations: R
1857
1854
  }), !0;
1858
1855
  }
1859
- }, En = {
1856
+ }, Wn = {
1860
1857
  id: "sheet.command.table-remove-row",
1861
1858
  type: y.COMMAND,
1862
1859
  handler: (t, e) => {
@@ -1865,14 +1862,14 @@ const p = {
1865
1862
  const n = t.get(E), r = $(n);
1866
1863
  if (!r)
1867
1864
  return !1;
1868
- const { unitId: s, subUnitId: a } = r, u = t.get(ge).getCurrentSelections();
1865
+ const { unitId: s, subUnitId: a } = r, u = t.get(me).getCurrentSelections();
1869
1866
  if (!u.length || u.length > 1)
1870
1867
  return !1;
1871
1868
  const i = u[0].range, d = t.get(B).getContainerTableWithRange(s, a, i);
1872
1869
  if (!d) return !1;
1873
1870
  const c = i.endRow - i.startRow + 1, m = [], S = [], w = d.getRange();
1874
1871
  m.push({
1875
- id: p.id,
1872
+ id: C.id,
1876
1873
  params: {
1877
1874
  unitId: s,
1878
1875
  subUnitId: a,
@@ -1887,7 +1884,7 @@ const p = {
1887
1884
  }
1888
1885
  }
1889
1886
  }), S.push({
1890
- id: p.id,
1887
+ id: C.id,
1891
1888
  params: {
1892
1889
  unitId: s,
1893
1890
  subUnitId: a,
@@ -1899,14 +1896,14 @@ const p = {
1899
1896
  }
1900
1897
  }
1901
1898
  });
1902
- const R = r.worksheet.getCellMatrix().getDataRange().endRow, I = me(
1899
+ const f = r.worksheet.getCellMatrix().getDataRange().endRow, I = be(
1903
1900
  t,
1904
1901
  {
1905
1902
  unitId: s,
1906
1903
  subUnitId: a,
1907
1904
  range: {
1908
1905
  startRow: i.endRow + 1,
1909
- endRow: R,
1906
+ endRow: f,
1910
1907
  startColumn: w.startColumn,
1911
1908
  endColumn: w.endColumn
1912
1909
  }
@@ -1916,7 +1913,7 @@ const p = {
1916
1913
  subUnitId: a,
1917
1914
  range: {
1918
1915
  startRow: i.startRow,
1919
- endRow: R - c,
1916
+ endRow: f - c,
1920
1917
  startColumn: w.startColumn,
1921
1918
  endColumn: w.endColumn
1922
1919
  }
@@ -1930,7 +1927,7 @@ const p = {
1930
1927
  redoMutations: m
1931
1928
  }), !0;
1932
1929
  }
1933
- }, Wn = {
1930
+ }, Hn = {
1934
1931
  id: "sheet.command.table-remove-col",
1935
1932
  type: y.COMMAND,
1936
1933
  handler: (t, e) => {
@@ -1941,14 +1938,14 @@ const p = {
1941
1938
  return !1;
1942
1939
  const { workbook: s, unitId: a, subUnitId: o } = r;
1943
1940
  t.get(T);
1944
- const l = t.get(ge).getCurrentSelections();
1941
+ const l = t.get(me).getCurrentSelections();
1945
1942
  if (!l.length || l.length > 1)
1946
1943
  return !1;
1947
1944
  const h = l[0].range, c = t.get(B).getContainerTableWithRange(a, o, h);
1948
1945
  if (!c) return !1;
1949
- const m = h.endColumn - h.startColumn + 1, S = [], w = [], f = c.getRange();
1946
+ const m = h.endColumn - h.startColumn + 1, S = [], w = [], R = c.getRange();
1950
1947
  S.push({
1951
- id: p.id,
1948
+ id: C.id,
1952
1949
  params: {
1953
1950
  unitId: a,
1954
1951
  subUnitId: o,
@@ -1963,13 +1960,13 @@ const p = {
1963
1960
  }
1964
1961
  }
1965
1962
  });
1966
- const R = [], I = h.startColumn - f.startColumn;
1963
+ const f = [], I = h.startColumn - R.startColumn;
1967
1964
  for (let ne = 0; ne < m; ne++) {
1968
1965
  const Te = c.getTableInfo().columns[I + ne];
1969
- Te && R.push(Te);
1966
+ Te && f.push(Te);
1970
1967
  }
1971
1968
  w.push({
1972
- id: p.id,
1969
+ id: C.id,
1973
1970
  params: {
1974
1971
  unitId: a,
1975
1972
  subUnitId: o,
@@ -1980,19 +1977,19 @@ const p = {
1980
1977
  rowColType: D.Col,
1981
1978
  index: h.startColumn,
1982
1979
  count: m,
1983
- columnsJson: R
1980
+ columnsJson: f
1984
1981
  }
1985
1982
  }
1986
1983
  }
1987
1984
  });
1988
- const _ = r.worksheet.getCellMatrix().getDataRange().endColumn, v = me(
1985
+ const _ = r.worksheet.getCellMatrix().getDataRange().endColumn, v = be(
1989
1986
  t,
1990
1987
  {
1991
1988
  unitId: a,
1992
1989
  subUnitId: o,
1993
1990
  range: {
1994
- startRow: f.startRow,
1995
- endRow: f.endRow,
1991
+ startRow: R.startRow,
1992
+ endRow: R.endRow,
1996
1993
  startColumn: h.endColumn + 1,
1997
1994
  endColumn: _
1998
1995
  }
@@ -2001,8 +1998,8 @@ const p = {
2001
1998
  unitId: a,
2002
1999
  subUnitId: o,
2003
2000
  range: {
2004
- startRow: f.startRow,
2005
- endRow: f.endRow,
2001
+ startRow: R.startRow,
2002
+ endRow: R.endRow,
2006
2003
  startColumn: h.startColumn,
2007
2004
  endColumn: _ - m
2008
2005
  }
@@ -2017,12 +2014,12 @@ const p = {
2017
2014
  }), !0;
2018
2015
  }
2019
2016
  };
2020
- var Hn = Object.getOwnPropertyDescriptor, Pn = (t, e, n, r) => {
2021
- for (var s = r > 1 ? void 0 : r ? Hn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2017
+ var Vn = Object.getOwnPropertyDescriptor, Pn = (t, e, n, r) => {
2018
+ for (var s = r > 1 ? void 0 : r ? Vn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2022
2019
  (o = t[a]) && (s = o(s) || s);
2023
2020
  return s;
2024
2021
  }, Ue = (t, e) => (n, r) => e(n, r, t);
2025
- let ie = class extends k {
2022
+ let le = class extends k {
2026
2023
  constructor(t, e) {
2027
2024
  super(), this._tableManager = t, this._exclusiveRangeService = e, this._initRangeListener();
2028
2025
  }
@@ -2051,16 +2048,16 @@ let ie = class extends k {
2051
2048
  );
2052
2049
  }
2053
2050
  };
2054
- ie = Pn([
2055
- Ue(0, C(T)),
2056
- Ue(1, C(ct))
2057
- ], ie);
2058
- var Vn = Object.getOwnPropertyDescriptor, qn = (t, e, n, r) => {
2059
- for (var s = r > 1 ? void 0 : r ? Vn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2051
+ le = Pn([
2052
+ Ue(0, p(T)),
2053
+ Ue(1, p(ct))
2054
+ ], le);
2055
+ var qn = Object.getOwnPropertyDescriptor, kn = (t, e, n, r) => {
2056
+ for (var s = r > 1 ? void 0 : r ? qn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2060
2057
  (o = t[a]) && (s = o(s) || s);
2061
2058
  return s;
2062
2059
  }, W = (t, e) => (n, r) => e(n, r, t);
2063
- let le = class extends k {
2060
+ let ue = class extends k {
2064
2061
  constructor(t, e, n, r, s, a, o) {
2065
2062
  super(), this._commandService = t, this._refRangeService = e, this._univerInstanceService = n, this._injector = r, this._sheetInterceptorService = s, this._tableManager = a, this._localeService = o, this._initCommandInterceptor(), this._initCommandListener();
2066
2063
  }
@@ -2096,7 +2093,7 @@ let le = class extends k {
2096
2093
  if (u.startRow > i.startRow && u.startRow <= i.endRow) {
2097
2094
  const h = u.endRow - u.startRow + 1;
2098
2095
  n.push({
2099
- id: p.id,
2096
+ id: C.id,
2100
2097
  params: {
2101
2098
  unitId: s,
2102
2099
  subUnitId: a,
@@ -2111,7 +2108,7 @@ let le = class extends k {
2111
2108
  }
2112
2109
  }
2113
2110
  }), e.push({
2114
- id: p.id,
2111
+ id: C.id,
2115
2112
  params: {
2116
2113
  unitId: s,
2117
2114
  subUnitId: a,
@@ -2141,7 +2138,7 @@ let le = class extends k {
2141
2138
  if (u.startColumn > i.startColumn && u.startColumn <= i.endColumn) {
2142
2139
  const h = u.endColumn - u.startColumn + 1;
2143
2140
  n.push({
2144
- id: p.id,
2141
+ id: C.id,
2145
2142
  params: {
2146
2143
  unitId: s,
2147
2144
  subUnitId: a,
@@ -2156,7 +2153,7 @@ let le = class extends k {
2156
2153
  }
2157
2154
  }
2158
2155
  }), e.push({
2159
- id: p.id,
2156
+ id: C.id,
2160
2157
  params: {
2161
2158
  unitId: s,
2162
2159
  subUnitId: a,
@@ -2184,7 +2181,7 @@ let le = class extends k {
2184
2181
  const { range: i } = t, h = i.endRow - i.startRow + 1;
2185
2182
  return l.forEach((d) => {
2186
2183
  const c = d.getRange();
2187
- if (pe.intersects(c, i))
2184
+ if (Ce.intersects(c, i))
2188
2185
  if (i.startRow <= c.startRow && i.endRow >= c.startRow) {
2189
2186
  r.push({
2190
2187
  id: te.id,
@@ -2207,7 +2204,7 @@ let le = class extends k {
2207
2204
  }
2208
2205
  });
2209
2206
  } else i.startRow > c.startRow && i.startRow <= c.endRow ? (n.push({
2210
- id: p.id,
2207
+ id: C.id,
2211
2208
  params: {
2212
2209
  unitId: o,
2213
2210
  subUnitId: u,
@@ -2222,7 +2219,7 @@ let le = class extends k {
2222
2219
  }
2223
2220
  }
2224
2221
  }), e.push({
2225
- id: p.id,
2222
+ id: C.id,
2226
2223
  params: {
2227
2224
  unitId: o,
2228
2225
  subUnitId: u,
@@ -2236,7 +2233,7 @@ let le = class extends k {
2236
2233
  }
2237
2234
  }
2238
2235
  })) : i.startRow < c.endRow && i.endRow >= c.endRow && (n.push({
2239
- id: p.id,
2236
+ id: C.id,
2240
2237
  params: {
2241
2238
  unitId: o,
2242
2239
  subUnitId: u,
@@ -2251,7 +2248,7 @@ let le = class extends k {
2251
2248
  }
2252
2249
  }
2253
2250
  }), e.push({
2254
- id: p.id,
2251
+ id: C.id,
2255
2252
  params: {
2256
2253
  unitId: o,
2257
2254
  subUnitId: u,
@@ -2277,7 +2274,7 @@ let le = class extends k {
2277
2274
  const { range: i } = t, h = i.endColumn - i.startColumn + 1;
2278
2275
  return l.forEach((d) => {
2279
2276
  const c = d.getRange();
2280
- if (pe.intersects(c, i)) {
2277
+ if (Ce.intersects(c, i)) {
2281
2278
  if (i.startColumn <= c.startColumn && i.endColumn >= c.endColumn) {
2282
2279
  r.push({
2283
2280
  id: te.id,
@@ -2287,11 +2284,11 @@ let le = class extends k {
2287
2284
  tableId: d.getId()
2288
2285
  }
2289
2286
  });
2290
- const m = d.toJSON(), { startRow: S, startColumn: w, endColumn: f } = m.range, R = this._univerInstanceService.getUnit(o), I = R == null ? void 0 : R.getSheetBySheetId(u);
2287
+ const m = d.toJSON(), { startRow: S, startColumn: w, endColumn: R } = m.range, f = this._univerInstanceService.getUnit(o), I = f == null ? void 0 : f.getSheetBySheetId(u);
2291
2288
  if (!I)
2292
2289
  return { undos: e, redos: n, preRedos: r, preUndos: s };
2293
2290
  const U = [];
2294
- for (let _ = w; _ <= f; _++)
2291
+ for (let _ = w; _ <= R; _++)
2295
2292
  U.push(Ye(I == null ? void 0 : I.getCell(S, _)) || X(_ - w + 1, this._localeService.t("sheets-table.columnPrefix")));
2296
2293
  e.push({
2297
2294
  id: ee.id,
@@ -2308,7 +2305,7 @@ let le = class extends k {
2308
2305
  } else if (i.startColumn <= c.startColumn && i.endColumn >= c.startColumn) {
2309
2306
  const m = i.endColumn - c.startColumn + 1;
2310
2307
  n.push({
2311
- id: p.id,
2308
+ id: C.id,
2312
2309
  params: {
2313
2310
  unitId: o,
2314
2311
  subUnitId: u,
@@ -2325,11 +2322,11 @@ let le = class extends k {
2325
2322
  });
2326
2323
  const S = [];
2327
2324
  for (let w = 0; w < m; w++) {
2328
- const f = d.getTableColumnByIndex(w);
2329
- f && S.push(f.toJSON());
2325
+ const R = d.getTableColumnByIndex(w);
2326
+ R && S.push(R.toJSON());
2330
2327
  }
2331
2328
  e.push({
2332
- id: p.id,
2329
+ id: C.id,
2333
2330
  params: {
2334
2331
  unitId: o,
2335
2332
  subUnitId: u,
@@ -2348,7 +2345,7 @@ let le = class extends k {
2348
2345
  } else if (i.startColumn > c.startColumn && i.endColumn > c.endColumn) {
2349
2346
  const m = c.endColumn - i.startColumn + 1;
2350
2347
  n.push({
2351
- id: p.id,
2348
+ id: C.id,
2352
2349
  params: {
2353
2350
  unitId: o,
2354
2351
  subUnitId: u,
@@ -2364,12 +2361,12 @@ let le = class extends k {
2364
2361
  }
2365
2362
  });
2366
2363
  const S = [], w = i.startColumn - c.startColumn;
2367
- for (let f = 0; f < m; f++) {
2368
- const R = d.getTableColumnByIndex(f + w);
2369
- R && S.push(R.toJSON());
2364
+ for (let R = 0; R < m; R++) {
2365
+ const f = d.getTableColumnByIndex(R + w);
2366
+ f && S.push(f.toJSON());
2370
2367
  }
2371
2368
  e.push({
2372
- id: p.id,
2369
+ id: C.id,
2373
2370
  params: {
2374
2371
  unitId: o,
2375
2372
  subUnitId: u,
@@ -2387,7 +2384,7 @@ let le = class extends k {
2387
2384
  });
2388
2385
  } else if (i.startColumn > c.startColumn && i.endColumn <= c.endColumn) {
2389
2386
  n.push({
2390
- id: p.id,
2387
+ id: C.id,
2391
2388
  params: {
2392
2389
  unitId: o,
2393
2390
  subUnitId: u,
@@ -2404,11 +2401,11 @@ let le = class extends k {
2404
2401
  });
2405
2402
  const m = [], S = i.startColumn - c.startColumn;
2406
2403
  for (let w = 0; w < h; w++) {
2407
- const f = d.getTableColumnByIndex(w + S);
2408
- f && m.push(f.toJSON());
2404
+ const R = d.getTableColumnByIndex(w + S);
2405
+ R && m.push(R.toJSON());
2409
2406
  }
2410
2407
  e.push({
2411
- id: p.id,
2408
+ id: C.id,
2412
2409
  params: {
2413
2410
  unitId: o,
2414
2411
  subUnitId: u,
@@ -2430,7 +2427,7 @@ let le = class extends k {
2430
2427
  }
2431
2428
  _initCommandListener() {
2432
2429
  this._commandService.onCommandExecuted((t) => {
2433
- if (t.id === Pe.id) {
2430
+ if (t.id === Ve.id) {
2434
2431
  const e = t.params, { unitId: n, subUnitId: r, range: s } = e, a = s.endRow - s.startRow + 1;
2435
2432
  this._tableManager.getTablesBySubunitId(n, r).forEach((u) => {
2436
2433
  const l = u.getRange();
@@ -2454,7 +2451,7 @@ let le = class extends k {
2454
2451
  }
2455
2452
  });
2456
2453
  });
2457
- } else if (t.id === Ve.id) {
2454
+ } else if (t.id === Pe.id) {
2458
2455
  const e = t.params, { unitId: n, subUnitId: r, range: s } = e, a = s.endRow - s.startRow + 1;
2459
2456
  this._tableManager.getTablesBySubunitId(n, r).forEach((u) => {
2460
2457
  const l = u.getRange();
@@ -2482,21 +2479,21 @@ let le = class extends k {
2482
2479
  });
2483
2480
  }
2484
2481
  };
2485
- le = qn([
2486
- W(0, C(x)),
2487
- W(1, C(dt)),
2488
- W(2, C(E)),
2489
- W(3, C(Ae)),
2490
- W(4, C(Ce)),
2491
- W(5, C(T)),
2492
- W(6, C(de))
2493
- ], le);
2494
- var kn = Object.getOwnPropertyDescriptor, Jn = (t, e, n, r) => {
2495
- for (var s = r > 1 ? void 0 : r ? kn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2482
+ ue = kn([
2483
+ W(0, p(x)),
2484
+ W(1, p(dt)),
2485
+ W(2, p(E)),
2486
+ W(3, p(Ae)),
2487
+ W(4, p(pe)),
2488
+ W(5, p(T)),
2489
+ W(6, p(he))
2490
+ ], ue);
2491
+ var Jn = Object.getOwnPropertyDescriptor, Qn = (t, e, n, r) => {
2492
+ for (var s = r > 1 ? void 0 : r ? Jn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2496
2493
  (o = t[a]) && (s = o(s) || s);
2497
2494
  return s;
2498
2495
  }, se = (t, e) => (n, r) => e(n, r, t);
2499
- let ue = class extends k {
2496
+ let ce = class extends k {
2500
2497
  constructor(e, n, r, s) {
2501
2498
  super();
2502
2499
  b(this, "_defaultThemeIndex", 0);
@@ -2553,11 +2550,11 @@ let ue = class extends k {
2553
2550
  }
2554
2551
  _initUserTableTheme() {
2555
2552
  const e = this._configService.getConfig(Ge) || {}, n = e.defaultThemeIndex || 0, r = e.userThemes || [];
2556
- this._defaultThemeIndex = n, this._allThemes = r.concat(je);
2553
+ this._defaultThemeIndex = n, this._allThemes = r.concat(ze);
2557
2554
  }
2558
2555
  _initDefaultTableTheme() {
2559
2556
  for (let e = 0; e < this._allThemes.length; e++) {
2560
- const { name: n, style: r } = this._allThemes[e], s = new Rt(n, r);
2557
+ const { name: n, style: r } = this._allThemes[e], s = new ft(n, r);
2561
2558
  this._sheetRangeThemeModel.registerDefaultRangeTheme(s);
2562
2559
  }
2563
2560
  }
@@ -2565,24 +2562,24 @@ let ue = class extends k {
2565
2562
  super.dispose(), this._allThemes = [], this._defaultThemeIndex = 0;
2566
2563
  }
2567
2564
  };
2568
- ue = Jn([
2569
- se(0, C(T)),
2570
- se(1, C(wt)),
2571
- se(2, C(He)),
2565
+ ce = Qn([
2566
+ se(0, p(T)),
2567
+ se(1, p(wt)),
2568
+ se(2, p(He)),
2572
2569
  se(3, Le)
2573
- ], ue);
2574
- var Qn = Object.getOwnPropertyDescriptor, Yn = (t, e, n, r) => {
2575
- for (var s = r > 1 ? void 0 : r ? Qn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2570
+ ], ce);
2571
+ var Yn = Object.getOwnPropertyDescriptor, Gn = (t, e, n, r) => {
2572
+ for (var s = r > 1 ? void 0 : r ? Yn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2576
2573
  (o = t[a]) && (s = o(s) || s);
2577
2574
  return s;
2578
- }, Re = (t, e) => (n, r) => e(n, r, t);
2579
- let ce = class extends k {
2580
- constructor(e, n, r) {
2575
+ }, ae = (t, e) => (n, r) => e(n, r, t);
2576
+ let de = class extends k {
2577
+ constructor(e, n, r, s) {
2581
2578
  super();
2582
2579
  b(this, "_tableFilteredOutRows$", new Je(/* @__PURE__ */ new Set()));
2583
2580
  b(this, "tableFilteredOutRows$", this._tableFilteredOutRows$.asObservable());
2584
2581
  b(this, "_subscription", null);
2585
- this._tableManager = e, this._sheetInterceptorService = n, this._univerInstanceService = r, this.registerFilterChangeEvent(), this.initTableHiddenRowIntercept(), this._initFilteredOutRows();
2582
+ this._tableManager = e, this._sheetInterceptorService = n, this._univerInstanceService = r, this._zebraCrossingCacheController = s, this.registerFilterChangeEvent(), this.initTableHiddenRowIntercept(), this._initFilteredOutRows();
2586
2583
  }
2587
2584
  get tableFilteredOutRows() {
2588
2585
  return this._tableFilteredOutRows$.value;
@@ -2603,11 +2600,11 @@ let ce = class extends k {
2603
2600
  }
2604
2601
  _initFilteredOutRows() {
2605
2602
  this._tableManager.tableInitStatus$.pipe(
2606
- be((e) => e),
2607
- Me(() => this._univerInstanceService.getCurrentTypeOfUnit$(he.UNIVER_SHEET)),
2608
- be((e) => e != null),
2603
+ we((e) => e),
2604
+ Me(() => this._univerInstanceService.getCurrentTypeOfUnit$(ge.UNIVER_SHEET)),
2605
+ we((e) => e != null),
2609
2606
  Me((e) => e.activeSheet$),
2610
- be((e) => e != null)
2607
+ we((e) => e != null)
2611
2608
  ).subscribe(() => {
2612
2609
  const e = $(this._univerInstanceService);
2613
2610
  if (!e)
@@ -2633,7 +2630,7 @@ let ce = class extends k {
2633
2630
  if (d)
2634
2631
  for (const c of d)
2635
2632
  this.tableFilteredOutRows.add(c);
2636
- });
2633
+ }), this._zebraCrossingCacheController.updateZebraCrossingCache(n, r);
2637
2634
  })
2638
2635
  );
2639
2636
  }
@@ -2642,17 +2639,18 @@ let ce = class extends k {
2642
2639
  super.dispose(), (e = this._subscription) == null || e.unsubscribe();
2643
2640
  }
2644
2641
  };
2645
- ce = Yn([
2646
- Re(0, C(T)),
2647
- Re(1, C(Ce)),
2648
- Re(2, C(E))
2649
- ], ce);
2650
- var Gn = Object.getOwnPropertyDescriptor, jn = (t, e, n, r) => {
2651
- for (var s = r > 1 ? void 0 : r ? Gn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2642
+ de = Gn([
2643
+ ae(0, p(T)),
2644
+ ae(1, p(pe)),
2645
+ ae(2, p(E)),
2646
+ ae(3, p(Rt))
2647
+ ], de);
2648
+ var zn = Object.getOwnPropertyDescriptor, jn = (t, e, n, r) => {
2649
+ for (var s = r > 1 ? void 0 : r ? zn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2652
2650
  (o = t[a]) && (s = o(s) || s);
2653
2651
  return s;
2654
- }, fe = (t, e) => (n, r) => e(n, r, t), ae;
2655
- let $e = (ae = class extends it {
2652
+ }, Re = (t, e) => (n, r) => e(n, r, t), oe;
2653
+ let $e = (oe = class extends it {
2656
2654
  constructor(t = De, e, n, r) {
2657
2655
  super(), this._config = t, this._injector = e, this._configService = n, this._commandService = r;
2658
2656
  const { ...s } = lt(
@@ -2665,19 +2663,19 @@ let $e = (ae = class extends it {
2665
2663
  onStarting() {
2666
2664
  ut(this._injector, [
2667
2665
  [T],
2668
- [ue],
2669
- [B],
2670
- [j],
2671
2666
  [ce],
2672
- [ie],
2673
- [le]
2667
+ [B],
2668
+ [z],
2669
+ [de],
2670
+ [le],
2671
+ [ue]
2674
2672
  ]), Ie(this._injector, [
2675
- [ie],
2676
2673
  [le],
2677
2674
  [ue],
2675
+ [ce],
2678
2676
  [B],
2679
- [j],
2680
- [ce]
2677
+ [z],
2678
+ [de]
2681
2679
  ]);
2682
2680
  }
2683
2681
  onReady() {
@@ -2687,46 +2685,46 @@ let $e = (ae = class extends it {
2687
2685
  }
2688
2686
  _initRegisterCommand() {
2689
2687
  [
2690
- Fn,
2691
- ee,
2692
2688
  Dn,
2689
+ ee,
2690
+ yn,
2693
2691
  te,
2694
2692
  Se,
2695
- yn,
2696
- An,
2697
- p,
2698
- Un,
2699
- $n,
2693
+ Nn,
2700
2694
  Ln,
2695
+ C,
2696
+ $n,
2697
+ An,
2701
2698
  Bn,
2702
2699
  En,
2703
- Wn
2700
+ Wn,
2701
+ Hn
2704
2702
  ].forEach((t) => this._commandService.registerCommand(t));
2705
2703
  }
2706
- }, b(ae, "pluginName", Xe), b(ae, "type", he.UNIVER_SHEET), ae);
2704
+ }, b(oe, "pluginName", Xe), b(oe, "type", ge.UNIVER_SHEET), oe);
2707
2705
  $e = jn([
2708
- fe(1, C(Ae)),
2709
- fe(2, Le),
2710
- fe(3, C(x))
2706
+ Re(1, p(Ae)),
2707
+ Re(2, Le),
2708
+ Re(3, p(x))
2711
2709
  ], $e);
2712
2710
  export {
2713
- Fn as AddSheetTableCommand,
2711
+ Dn as AddSheetTableCommand,
2714
2712
  ee as AddSheetTableMutation,
2715
- Un as AddTableThemeCommand,
2716
- Dn as DeleteSheetTableCommand,
2713
+ $n as AddTableThemeCommand,
2714
+ yn as DeleteSheetTableCommand,
2717
2715
  te as DeleteSheetTableMutation,
2718
- $n as RemoveTableThemeCommand,
2719
- Nn as SHEET_TABLE_CUSTOM_THEME_PREFIX,
2720
- An as SetSheetTableCommand,
2721
- yn as SetSheetTableFilterCommand,
2716
+ An as RemoveTableThemeCommand,
2717
+ xn as SHEET_TABLE_CUSTOM_THEME_PREFIX,
2718
+ Ln as SetSheetTableCommand,
2719
+ Nn as SetSheetTableFilterCommand,
2722
2720
  Se as SetSheetTableFilterMutation,
2723
- p as SetSheetTableMutation,
2724
- Bn as SheetTableInsertColCommand,
2725
- Ln as SheetTableInsertRowCommand,
2726
- Wn as SheetTableRemoveColCommand,
2727
- En as SheetTableRemoveRowCommand,
2728
- j as SheetTableService,
2729
- P as SheetsTableButtonStateEnum,
2721
+ C as SetSheetTableMutation,
2722
+ En as SheetTableInsertColCommand,
2723
+ Bn as SheetTableInsertRowCommand,
2724
+ Hn as SheetTableRemoveColCommand,
2725
+ Wn as SheetTableRemoveRowCommand,
2726
+ z as SheetTableService,
2727
+ V as SheetsTableButtonStateEnum,
2730
2728
  B as SheetsTableController,
2731
2729
  Q as SheetsTableSortStateEnum,
2732
2730
  Qe as TableColumnDataTypeEnum,
@@ -2737,8 +2735,8 @@ export {
2737
2735
  F as TableNumberCompareTypeEnum,
2738
2736
  H as TableStringCompareTypeEnum,
2739
2737
  $e as UniverSheetsTablePlugin,
2740
- nr as customEmptyThemeWithBorderStyle,
2741
- St as isConditionFilter,
2742
- tr as isManualFilter,
2743
- rr as processStyleWithBorderStyle
2738
+ rr as customEmptyThemeWithBorderStyle,
2739
+ pt as isConditionFilter,
2740
+ nr as isManualFilter,
2741
+ sr as processStyleWithBorderStyle
2744
2742
  };