@univerjs/sheets-data-validation-ui 0.16.1 → 0.17.0

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,42 +1,46 @@
1
- var Lr = Object.defineProperty;
2
- var kr = (e, t, n) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var V = (e, t, n) => kr(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { Disposable as De, UniverInstanceType as H, toDisposable as Nr, IUniverInstanceService as pe, Inject as E, LocaleService as ge, DataValidationErrorStyle as ct, DataValidationStatus as ze, ICommandService as oe, Injector as Ve, IConfigService as hn, DataValidationRenderMode as ue, DisposableCollection as Ur, dayjs as $t, numfmt as Yn, CellValueType as Fr, CommandType as ot, DataValidationType as X, ObjectMatrix as yt, Range as $r, Rectangle as Mt, queryObjectMatrix as Qt, Optional as xr, RxDisposable as pn, InterceptorEffectEnum as Xn, sequenceExecute as Zn, bufferDebounceTime as Br, debounce as Wr, UndoCommand as Hr, RedoCommand as jr, isUnitRangesEqual as Yr, shallowEqual as bn, ThemeService as zn, ColorKit as Xr, isFormulaString as Pe, generateRandomId as En, VerticalAlign as he, HorizontalAlign as Ee, DEFAULT_STYLES as re, WrapStrategy as Se, Plugin as Kn, merge as Gn, DependentOn as Zr } from "@univerjs/core";
5
- import { DeviceInputEventType as mt, IRenderManagerService as xe, fixLineWidthByScale as Dn, Transform as zr, CheckboxShape as Kr, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as Ge, FontCache as Gr, Shape as qr, Rect as qn, getFontStyleString as Le, DocSimpleSkeleton as at, Text as Vn } from "@univerjs/engine-render";
6
- import { SheetInterceptorService as gn, VALIDATE_CELL as Jr, SheetsSelectionsService as Jn, SetRangeValuesCommand as dt, getSheetCommandTarget as Qn, IAutoFillService as Qr, AUTO_FILL_APPLY_TYPE as st, AutoFillTools as eo, rangeToDiscreteRange as to, SheetPermissionCheckController as no, WorksheetEditPermission as en, WorksheetSetCellStylePermission as tn, RangeProtectionPermissionEditPoint as nn, WorkbookEditablePermission as rn, INTERCEPTOR_POINT as er, InterceptCellContentPriority as tr, SetWorksheetActiveOperation as ro, checkRangesEditablePermission as oo } from "@univerjs/sheets";
7
- import { SheetDataValidationModel as ae, SheetsDataValidationValidatorService as io, getDataValidationCellValue as xt, getCellValueOrigin as ie, serializeListOptions as nr, createDefaultNewRule as rr, AddSheetDataValidationCommand as vn, DATA_VALIDATION_PLUGIN_NAME as or, getDataValidationDiffMutations as on, UpdateSheetDataValidationRangeCommand as ir, DataValidationCacheService as ar, UpdateSheetDataValidationSettingCommand as Tn, UpdateSheetDataValidationOptionsCommand as ao, RemoveSheetDataValidationCommand as sr, RemoveSheetAllDataValidationCommand as so, DataValidationFormulaController as lo, deserializeListOptions as co, CUSTOM_FORMULA_INPUT_NAME as lr, BASE_FORMULA_INPUT_NAME as kt, LIST_FORMULA_INPUT_NAME as mn, CHECKBOX_FORMULA_INPUT_NAME as dr, DataValidationFormulaService as uo, CHECKBOX_FORMULA_2 as ho, CHECKBOX_FORMULA_1 as po, getFormulaResult as Bt, isLegalFormulaResult as On, transformCheckboxValue as go, UniverSheetsDataValidationPlugin as vo } from "@univerjs/sheets-data-validation";
8
- import { DataValidatorRegistryService as Te, DataValidatorDropdownType as fe, DataValidationModel as fn, DataValidatorRegistryScope as mo, TWO_FORMULA_OPERATOR_COUNT as fo, getRuleOptions as An, getRuleSetting as Pn } from "@univerjs/data-validation";
9
- import { ISidebarService as cr, IDialogService as _o, IZenZoneService as ur, KeyCode as ft, MenuItemType as _n, getMenuHiddenObservable as So, RibbonDataGroup as Co, IMenuManagerService as Io, useDependency as F, ComponentManager as Sn, useObservable as Re, useEvent as an, useSidebarClick as hr } from "@univerjs/ui";
10
- import { filter as Cn, BehaviorSubject as Ln, distinctUntilChanged as wo, Subject as Ro, debounceTime as pr, bufferTime as gr, of as vr } from "rxjs";
11
- import { getPatternType as yo } from "@univerjs/sheets-numfmt";
12
- import { ISheetCellDropdownManagerService as Mo, IEditorBridgeService as mr, SetCellEditVisibleOperation as _t, HoverManagerService as bo, CellAlertManagerService as Eo, CellAlertType as Do, virtualizeDiscreteRanges as sn, ISheetClipboardService as Vo, COPY_TYPE as kn, PREDEFINED_HOOK_NAME_PASTE as St, getRepeatRange as Nn, getCurrentRangeDisable$ as To, AutoHeightController as fr, SheetSkeletonManagerService as ut, IMarkSelectionService as Oo } from "@univerjs/sheets-ui";
13
- import { Button as qe, FormLayout as Z, RadioGroup as In, Radio as Ne, Checkbox as Nt, Input as Ue, Select as Un, clsx as Fe, borderClassName as bt, DraggableList as Ao, Dropdown as Po } from "@univerjs/design";
14
- import { createElement as ye, useRef as vt, forwardRef as it, useState as W, useMemo as ht, useEffect as be } from "react";
15
- import { jsxs as Y, Fragment as pt, jsx as S } from "react/jsx-runtime";
16
- import { deserializeRangeWithSheet as Lo, serializeRange as _r } from "@univerjs/engine-formula";
17
- import { RangeSelector as ko, FormulaEditor as Sr } from "@univerjs/sheets-formula-ui";
18
- var No = Object.getOwnPropertyDescriptor, Uo = (e, t, n, r) => {
19
- for (var o = r > 1 ? void 0 : r ? No(t, n) : t, i = e.length - 1, a; i >= 0; i--)
1
+ var kr = Object.defineProperty;
2
+ var Nr = (e, t, n) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var E = (e, t, n) => Nr(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { Disposable as De, UniverInstanceType as H, toDisposable as Ur, IUniverInstanceService as pe, Inject as D, LocaleService as ge, DataValidationErrorStyle as ht, DataValidationStatus as Ke, ICommandService as oe, Injector as Ve, IConfigService as gn, DataValidationRenderMode as ue, DisposableCollection as Fr, dayjs as Bt, numfmt as Zn, CellValueType as $r, CommandType as at, DataValidationType as X, ObjectMatrix as bt, Range as xr, Rectangle as Mt, queryObjectMatrix as tn, Optional as Br, RxDisposable as vn, InterceptorEffectEnum as zn, sequenceExecute as Kn, bufferDebounceTime as Wr, debounce as Hr, UndoCommand as jr, RedoCommand as Yr, isUnitRangesEqual as Xr, shallowEqual as Dn, ThemeService as Gn, ColorKit as Zr, isFormulaString as Pe, generateRandomId as Vn, VerticalAlign as he, HorizontalAlign as Ee, DEFAULT_STYLES as re, WrapStrategy as Se, Plugin as qn, merge as Jn, DependentOn as zr } from "@univerjs/core";
5
+ import { DeviceInputEventType as _t, IRenderManagerService as xe, fixLineWidthByScale as Tn, Transform as Kr, CheckboxShape as Gr, getCurrentTypeOfRenderer as Ge, CURSOR_TYPE as qe, FontCache as qr, Shape as Jr, Rect as Qn, getFontStyleString as Le, DocSimpleSkeleton as lt, Text as On } from "@univerjs/engine-render";
6
+ import { SheetInterceptorService as mn, VALIDATE_CELL as Qr, SheetsSelectionsService as er, SetRangeValuesCommand as ut, getSheetCommandTarget as tr, IAutoFillService as eo, AUTO_FILL_APPLY_TYPE as dt, AutoFillTools as to, rangeToDiscreteRange as no, SheetPermissionCheckController as ro, WorksheetEditPermission as nn, WorksheetSetCellStylePermission as rn, RangeProtectionPermissionEditPoint as on, WorkbookEditablePermission as an, INTERCEPTOR_POINT as nr, InterceptCellContentPriority as rr, SetWorksheetActiveOperation as oo, checkRangesEditablePermission as io } from "@univerjs/sheets";
7
+ import { SheetDataValidationModel as ae, SheetsDataValidationValidatorService as ao, getDataValidationCellValue as Wt, getCellValueOrigin as ie, serializeListOptions as or, createDefaultNewRule as ir, AddSheetDataValidationCommand as fn, DATA_VALIDATION_PLUGIN_NAME as ar, getDataValidationDiffMutations as sn, UpdateSheetDataValidationRangeCommand as sr, DataValidationCacheService as lr, UpdateSheetDataValidationSettingCommand as An, UpdateSheetDataValidationOptionsCommand as so, RemoveSheetDataValidationCommand as dr, RemoveSheetAllDataValidationCommand as lo, DataValidationFormulaController as co, deserializeListOptions as uo, CUSTOM_FORMULA_INPUT_NAME as cr, BASE_FORMULA_INPUT_NAME as Nt, LIST_FORMULA_INPUT_NAME as _n, CHECKBOX_FORMULA_INPUT_NAME as ur, DataValidationFormulaService as ho, CHECKBOX_FORMULA_2 as po, CHECKBOX_FORMULA_1 as go, getFormulaResult as Ht, isLegalFormulaResult as Pn, transformCheckboxValue as vo, UniverSheetsDataValidationPlugin as mo } from "@univerjs/sheets-data-validation";
8
+ import { DataValidatorRegistryService as Te, DataValidatorDropdownType as fe, DataValidationModel as Sn, DataValidatorRegistryScope as fo, TWO_FORMULA_OPERATOR_COUNT as _o, getRuleOptions as Ln, getRuleSetting as kn } from "@univerjs/data-validation";
9
+ import { ISidebarService as hr, IDialogService as So, IZenZoneService as pr, KeyCode as St, MenuItemType as Cn, getMenuHiddenObservable as Co, RibbonDataGroup as Io, IMenuManagerService as wo, useDependency as F, ComponentManager as In, useObservable as Re, useEvent as ln, useSidebarClick as gr } from "@univerjs/ui";
10
+ import { filter as wn, BehaviorSubject as Nn, distinctUntilChanged as Ro, Subject as yo, debounceTime as vr, bufferTime as mr, of as fr } from "rxjs";
11
+ import { getPatternType as bo } from "@univerjs/sheets-numfmt";
12
+ import { ISheetCellDropdownManagerService as Mo, IEditorBridgeService as _r, SetCellEditVisibleOperation as Ct, HoverManagerService as Eo, CellAlertManagerService as Do, CellAlertType as Vo, virtualizeDiscreteRanges as dn, ISheetClipboardService as To, COPY_TYPE as Un, PREDEFINED_HOOK_NAME_PASTE as It, getRepeatRange as Fn, getCurrentRangeDisable$ as Oo, AutoHeightController as Sr, SheetSkeletonManagerService as pt, IMarkSelectionService as Ao } from "@univerjs/sheets-ui";
13
+ import { Button as Je, FormLayout as Z, RadioGroup as Rn, Radio as Ne, Checkbox as Ut, Input as Ue, Select as $n, clsx as Fe, borderClassName as Et, DraggableList as Po, Dropdown as Lo } from "@univerjs/design";
14
+ import { createElement as ye, useRef as ft, forwardRef as st, useState as W, useMemo as gt, useEffect as Me } from "react";
15
+ import { jsxs as Y, Fragment as vt, jsx as S } from "react/jsx-runtime";
16
+ import { deserializeRangeWithSheet as ko, serializeRange as Cr } from "@univerjs/engine-formula";
17
+ import { RangeSelector as No, FormulaEditor as Ir } from "@univerjs/sheets-formula-ui";
18
+ const Uo = "@univerjs/sheets-data-validation-ui", Fo = "0.17.0", Dt = {
19
+ name: Uo,
20
+ version: Fo
21
+ };
22
+ var $o = Object.getOwnPropertyDescriptor, xo = (e, t, n, r) => {
23
+ for (var o = r > 1 ? void 0 : r ? $o(t, n) : t, i = e.length - 1, a; i >= 0; i--)
20
24
  (a = e[i]) && (o = a(o) || o);
21
25
  return o;
22
- }, Fn = (e, t) => (n, r) => t(n, r, e);
26
+ }, xn = (e, t) => (n, r) => t(n, r, e);
23
27
  let _e = class extends De {
24
28
  constructor(t, n) {
25
29
  super();
26
- V(this, "_open$", new Ln(!1));
27
- V(this, "open$", this._open$.pipe(wo()));
28
- V(this, "_activeRule");
29
- V(this, "_activeRule$", new Ln(void 0));
30
- V(this, "activeRule$", this._activeRule$.asObservable());
31
- V(this, "_closeDisposable", null);
30
+ E(this, "_open$", new Nn(!1));
31
+ E(this, "open$", this._open$.pipe(Ro()));
32
+ E(this, "_activeRule");
33
+ E(this, "_activeRule$", new Nn(void 0));
34
+ E(this, "activeRule$", this._activeRule$.asObservable());
35
+ E(this, "_closeDisposable", null);
32
36
  // Record the worksheet to which the rule using the range selector belongs, so that the rule list is not switched when making cross-sheet selections
33
- V(this, "_focusFormulaEditorActiveRuleSubUnitId", null);
37
+ E(this, "_focusFormulaEditorActiveRuleSubUnitId", null);
34
38
  this._univerInstanceService = t, this._sidebarService = n, this.disposeWithMe(
35
- this._univerInstanceService.getCurrentTypeOfUnit$(H.UNIVER_SHEET).pipe(Cn((r) => !r)).subscribe(() => {
39
+ this._univerInstanceService.getCurrentTypeOfUnit$(H.UNIVER_SHEET).pipe(wn((r) => !r)).subscribe(() => {
36
40
  this.close();
37
41
  })
38
42
  ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((r) => {
39
- r.id === Vt && (r.visible || setTimeout(() => {
43
+ r.id === Ot && (r.visible || setTimeout(() => {
40
44
  this._sidebarService.sidebarOptions$.next({ visible: !1 });
41
45
  }));
42
46
  }));
@@ -59,7 +63,7 @@ let _e = class extends De {
59
63
  this._open$.next(!1), (t = this._closeDisposable) == null || t.dispose();
60
64
  }
61
65
  setCloseDisposable(t) {
62
- this._closeDisposable = Nr(() => {
66
+ this._closeDisposable = Ur(() => {
63
67
  t.dispose(), this._closeDisposable = null;
64
68
  });
65
69
  }
@@ -73,32 +77,32 @@ let _e = class extends De {
73
77
  return this._focusFormulaEditorActiveRuleSubUnitId;
74
78
  }
75
79
  };
76
- _e = Uo([
77
- Fn(0, pe),
78
- Fn(1, cr)
80
+ _e = xo([
81
+ xn(0, pe),
82
+ xn(1, hr)
79
83
  ], _e);
80
- const ke = "#ECECEC", Et = "sheets-data-validation-ui.config", Dt = {};
81
- var Fo = Object.getOwnPropertyDescriptor, $o = (e, t, n, r) => {
82
- for (var o = r > 1 ? void 0 : r ? Fo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
84
+ const Vt = "sheets-data-validation-ui.config", Tt = {}, ke = "#ECECEC";
85
+ var Bo = Object.getOwnPropertyDescriptor, Wo = (e, t, n, r) => {
86
+ for (var o = r > 1 ? void 0 : r ? Bo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
83
87
  (a = e[i]) && (o = a(o) || o);
84
88
  return o;
85
89
  }, He = (e, t) => (n, r) => t(n, r, e);
86
- let Je = class extends De {
90
+ let Qe = class extends De {
87
91
  constructor(e, t, n, r, o, i) {
88
92
  super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = n, this._dialogService = r, this._localeService = o, this._sheetsDataValidationValidatorService = i, this._initEditorBridgeInterceptor();
89
93
  }
90
94
  _initEditorBridgeInterceptor() {
91
95
  this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(
92
- Jr,
96
+ Qr,
93
97
  {
94
98
  handler: async (e, t, n) => {
95
99
  const r = await e, { row: o, col: i, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, o, i), d = s ? this._dataValidationModel.getRuleById(a, l, s) : void 0;
96
100
  if (r === !1)
97
101
  return n(Promise.resolve(!1));
98
- if (!d || d.errorStyle !== ct.STOP)
102
+ if (!d || d.errorStyle !== ht.STOP)
99
103
  return n(Promise.resolve(!0));
100
104
  const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
101
- return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, o, i) === ze.VALID ? n(Promise.resolve(!0)) : (this._dialogService.open({
105
+ return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, o, i) === Ke.VALID ? n(Promise.resolve(!0)) : (this._dialogService.open({
102
106
  width: 368,
103
107
  title: {
104
108
  title: this._localeService.t("dataValidation.alert.title")
@@ -109,7 +113,7 @@ let Je = class extends De {
109
113
  },
110
114
  footer: {
111
115
  title: ye(
112
- qe,
116
+ Je,
113
117
  {
114
118
  variant: "primary",
115
119
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -137,7 +141,7 @@ let Je = class extends De {
137
141
  },
138
142
  footer: {
139
143
  title: ye(
140
- qe,
144
+ Je,
141
145
  {
142
146
  variant: "primary",
143
147
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -151,31 +155,31 @@ let Je = class extends De {
151
155
  });
152
156
  }
153
157
  };
154
- Je = $o([
155
- He(0, E(gn)),
156
- He(1, E(ae)),
157
- He(2, E(Te)),
158
- He(3, _o),
159
- He(4, E(ge)),
160
- He(5, E(io))
161
- ], Je);
162
- var xo = Object.getOwnPropertyDescriptor, Bo = (e, t, n, r) => {
163
- for (var o = r > 1 ? void 0 : r ? xo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
158
+ Qe = Wo([
159
+ He(0, D(mn)),
160
+ He(1, D(ae)),
161
+ He(2, D(Te)),
162
+ He(3, So),
163
+ He(4, D(ge)),
164
+ He(5, D(ao))
165
+ ], Qe);
166
+ var Ho = Object.getOwnPropertyDescriptor, jo = (e, t, n, r) => {
167
+ for (var o = r > 1 ? void 0 : r ? Ho(t, n) : t, i = e.length - 1, a; i >= 0; i--)
164
168
  (a = e[i]) && (o = a(o) || o);
165
169
  return o;
166
170
  }, ve = (e, t) => (n, r) => t(n, r, e);
167
- const Wt = (e) => {
171
+ const jt = (e) => {
168
172
  if (e == null || typeof e == "boolean")
169
173
  return;
170
- if (e === "") return $t();
174
+ if (e === "") return Bt();
171
175
  if (typeof e == "number" || !Number.isNaN(+e))
172
- return $t(Yn.format("yyyy-MM-dd HH:mm:ss", Number(e)));
173
- const t = $t(e);
176
+ return Bt(Zn.format("yyyy-MM-dd HH:mm:ss", Number(e)));
177
+ const t = Bt(e);
174
178
  if (t.isValid())
175
179
  return t;
176
180
  };
177
- function Wo(e, t) {
178
- const n = yo(t);
181
+ function Yo(e, t) {
182
+ const n = bo(t);
179
183
  if (e === n)
180
184
  return t;
181
185
  switch (e) {
@@ -190,11 +194,11 @@ function Wo(e, t) {
190
194
  let $e = class extends De {
191
195
  constructor(t, n, r, o, i, a, l, s, d, u, h) {
192
196
  super();
193
- V(this, "_activeDropdown");
194
- V(this, "_activeDropdown$", new Ro());
195
- V(this, "_currentPopup", null);
196
- V(this, "activeDropdown$", this._activeDropdown$.asObservable());
197
- V(this, "_zenVisible", !1);
197
+ E(this, "_activeDropdown");
198
+ E(this, "_activeDropdown$", new yo());
199
+ E(this, "_currentPopup", null);
200
+ E(this, "activeDropdown$", this._activeDropdown$.asObservable());
201
+ E(this, "_zenVisible", !1);
198
202
  this._univerInstanceService = t, this._dataValidatorRegistryService = n, this._zenZoneService = r, this._dataValidationModel = o, this._sheetsSelectionsService = i, this._cellDropdownManagerService = a, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = d, this._injector = u, this._configService = h, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
199
203
  this._activeDropdown$.complete();
200
204
  });
@@ -227,7 +231,7 @@ let $e = class extends De {
227
231
  }
228
232
  // eslint-disable-next-line max-lines-per-function, complexity
229
233
  showDropdown(t) {
230
- var D, v, C, f, w, b;
234
+ var V, v, C, f, w, M;
231
235
  const { location: n } = t, { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = n;
232
236
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
233
237
  return;
@@ -243,8 +247,8 @@ let $e = class extends De {
243
247
  var U, k, x;
244
248
  if (!g)
245
249
  return !0;
246
- const _ = g, T = s.getCell(r, o), A = _.format(p === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), P = (U = Yn.parseDate(A)) == null ? void 0 : U.v, L = p === "time" ? P % 1 : P, y = l.getStyles().getStyleByCell(T), O = (x = (k = y == null ? void 0 : y.n) == null ? void 0 : k.pattern) != null ? x : "";
247
- return d.errorStyle !== ct.STOP || await u.validator({
250
+ const _ = g, T = s.getCell(r, o), A = _.format(p === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), P = (U = Zn.parseDate(A)) == null ? void 0 : U.v, L = p === "time" ? P % 1 : P, y = l.getStyles().getStyleByCell(T), O = (x = (k = y == null ? void 0 : y.n) == null ? void 0 : k.pattern) != null ? x : "";
251
+ return d.errorStyle !== ht.STOP || await u.validator({
248
252
  value: L,
249
253
  unitId: i,
250
254
  subUnitId: a,
@@ -253,8 +257,8 @@ let $e = class extends De {
253
257
  worksheet: s,
254
258
  workbook: l,
255
259
  interceptValue: A.replace("Z", "").replace("T", " "),
256
- t: Fr.NUMBER
257
- }, d) ? (await this._commandService.executeCommand(dt.id, {
260
+ t: $r.NUMBER
261
+ }, d) ? (await this._commandService.executeCommand(ut.id, {
258
262
  unitId: i,
259
263
  subUnitId: a,
260
264
  range: {
@@ -271,21 +275,21 @@ let $e = class extends De {
271
275
  si: null,
272
276
  s: {
273
277
  n: {
274
- pattern: Wo(p, O)
278
+ pattern: Yo(p, O)
275
279
  }
276
280
  }
277
281
  }
278
- }), await this._commandService.executeCommand(_t.id, {
282
+ }), await this._commandService.executeCommand(Ct.id, {
279
283
  visible: !1,
280
- eventType: mt.Keyboard,
284
+ eventType: _t.Keyboard,
281
285
  unitId: i,
282
- keycode: ft.ESC
283
- }), !0) : (this._injector.has(Je) && this._injector.get(Je).showReject(u.getRuleFinalError(d, { row: r, col: o, unitId: i, subUnitId: a })), !1);
286
+ keycode: St.ESC
287
+ }), !0) : (this._injector.has(Qe) && this._injector.get(Qe).showReject(u.getRuleFinalError(d, { row: r, col: o, unitId: i, subUnitId: a })), !1);
284
288
  };
285
289
  let m;
286
290
  switch (u.dropdownType) {
287
291
  case fe.DATE: {
288
- const g = ie(s.getCellRaw(r, o)), p = Wt(g), _ = !!((D = d.bizInfo) != null && D.showTime);
292
+ const g = ie(s.getCellRaw(r, o)), p = jt(g), _ = !!((V = d.bizInfo) != null && V.showTime);
289
293
  m = {
290
294
  location: n,
291
295
  type: "datepicker",
@@ -299,7 +303,7 @@ let $e = class extends De {
299
303
  break;
300
304
  }
301
305
  case fe.TIME: {
302
- const g = ie(s.getCellRaw(r, o)), p = Wt(g);
306
+ const g = ie(s.getCellRaw(r, o)), p = jt(g);
303
307
  m = {
304
308
  location: n,
305
309
  type: "datepicker",
@@ -312,7 +316,7 @@ let $e = class extends De {
312
316
  break;
313
317
  }
314
318
  case fe.DATETIME: {
315
- const g = ie(s.getCellRaw(r, o)), p = Wt(g);
319
+ const g = ie(s.getCellRaw(r, o)), p = jt(g);
316
320
  m = {
317
321
  location: n,
318
322
  type: "datepicker",
@@ -327,7 +331,7 @@ let $e = class extends De {
327
331
  case fe.LIST:
328
332
  case fe.MULTIPLE_LIST: {
329
333
  const g = u.dropdownType === fe.MULTIPLE_LIST, p = async (y) => {
330
- const O = nr(y), U = {
334
+ const O = or(y), U = {
331
335
  unitId: i,
332
336
  subUnitId: a,
333
337
  range: {
@@ -343,13 +347,13 @@ let $e = class extends De {
343
347
  si: null
344
348
  }
345
349
  };
346
- return this._commandService.executeCommand(dt.id, U), this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(_t.id, {
350
+ return this._commandService.executeCommand(ut.id, U), this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(Ct.id, {
347
351
  visible: !1,
348
- eventType: mt.Keyboard,
352
+ eventType: _t.Keyboard,
349
353
  unitId: i,
350
- keycode: ft.ESC
354
+ keycode: St.ESC
351
355
  }), !g;
352
- }, _ = (d == null ? void 0 : d.renderMode) === ue.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, T = u.getListWithColor(d, i, a), A = xt(s.getCellRaw(r, o)), P = () => {
356
+ }, _ = (d == null ? void 0 : d.renderMode) === ue.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, T = u.getListWithColor(d, i, a), A = Wt(s.getCellRaw(r, o)), P = () => {
353
357
  this._commandService.executeCommand(Be.id, {
354
358
  ruleId: d.uid
355
359
  }), h == null || h.dispose();
@@ -367,8 +371,8 @@ let $e = class extends De {
367
371
  onEdit: P,
368
372
  defaultValue: A,
369
373
  multiple: g,
370
- showEdit: (C = (v = this._configService.getConfig(Et)) == null ? void 0 : v.showEditOnDropdown) != null ? C : !0,
371
- showSearch: (w = (f = this._configService.getConfig(Et)) == null ? void 0 : f.showSearchOnDropdown) != null ? w : !0
374
+ showEdit: (C = (v = this._configService.getConfig(Vt)) == null ? void 0 : v.showEditOnDropdown) != null ? C : !0,
375
+ showSearch: (w = (f = this._configService.getConfig(Vt)) == null ? void 0 : f.showSearchOnDropdown) != null ? w : !0
372
376
  }
373
377
  };
374
378
  break;
@@ -394,15 +398,15 @@ let $e = class extends De {
394
398
  si: null
395
399
  }
396
400
  };
397
- return this._commandService.syncExecuteCommand(dt.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(_t.id, {
401
+ return this._commandService.syncExecuteCommand(ut.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(Ct.id, {
398
402
  visible: !1,
399
- eventType: mt.Keyboard,
403
+ eventType: _t.Keyboard,
400
404
  unitId: i,
401
- keycode: ft.ESC
405
+ keycode: St.ESC
402
406
  }), !0;
403
407
  },
404
- defaultValue: xt(s.getCellRaw(r, o)).split("/"),
405
- options: JSON.parse((b = d.formula1) != null ? b : "[]")
408
+ defaultValue: Wt(s.getCellRaw(r, o)).split("/"),
409
+ options: JSON.parse((M = d.formula1) != null ? M : "[]")
406
410
  },
407
411
  location: n
408
412
  };
@@ -429,14 +433,14 @@ let $e = class extends De {
429
433
  si: null
430
434
  }
431
435
  };
432
- return this._commandService.syncExecuteCommand(dt.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(_t.id, {
436
+ return this._commandService.syncExecuteCommand(ut.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(Ct.id, {
433
437
  visible: !1,
434
- eventType: mt.Keyboard,
438
+ eventType: _t.Keyboard,
435
439
  unitId: i,
436
- keycode: ft.ESC
440
+ keycode: St.ESC
437
441
  }), !0;
438
442
  },
439
- defaultValue: xt(s.getCellRaw(r, o))
443
+ defaultValue: Wt(s.getCellRaw(r, o))
440
444
  },
441
445
  location: n
442
446
  };
@@ -452,7 +456,7 @@ let $e = class extends De {
452
456
  }
453
457
  }), !h)
454
458
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
455
- const I = new Ur();
459
+ const I = new Fr();
456
460
  I.add(h), I.add({
457
461
  dispose: () => {
458
462
  var g, p;
@@ -491,26 +495,26 @@ let $e = class extends De {
491
495
  });
492
496
  }
493
497
  };
494
- $e = Bo([
498
+ $e = jo([
495
499
  ve(0, pe),
496
- ve(1, E(Te)),
497
- ve(2, ur),
498
- ve(3, E(ae)),
499
- ve(4, E(Jn)),
500
- ve(5, E(Mo)),
501
- ve(6, E(ae)),
500
+ ve(1, D(Te)),
501
+ ve(2, pr),
502
+ ve(3, D(ae)),
503
+ ve(4, D(er)),
504
+ ve(5, D(Mo)),
505
+ ve(6, D(ae)),
502
506
  ve(7, oe),
503
- ve(8, mr),
504
- ve(9, E(Ve)),
505
- ve(10, hn)
507
+ ve(8, _r),
508
+ ve(9, D(Ve)),
509
+ ve(10, gn)
506
510
  ], $e);
507
- const Vt = "DataValidationPanel", Be = {
511
+ const Ot = "DataValidationPanel", Be = {
508
512
  id: "data-validation.operation.open-validation-panel",
509
- type: ot.OPERATION,
513
+ type: at.OPERATION,
510
514
  handler(e, t) {
511
515
  if (!t)
512
516
  return !1;
513
- const { ruleId: n, isAdd: r } = t, o = e.get(_e), i = e.get(fn), a = e.get(pe), l = e.get(cr), s = Qn(a);
517
+ const { ruleId: n, isAdd: r } = t, o = e.get(_e), i = e.get(Sn), a = e.get(pe), l = e.get(hr), s = tr(a);
514
518
  if (!s) return !1;
515
519
  const { unitId: d, subUnitId: u } = s, h = n ? i.getRuleById(d, u, n) : void 0;
516
520
  o.open(), o.setActiveRule(h && {
@@ -519,29 +523,29 @@ const Vt = "DataValidationPanel", Be = {
519
523
  rule: h
520
524
  });
521
525
  const c = l.open({
522
- id: Vt,
526
+ id: Ot,
523
527
  header: { title: r ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
524
- children: { label: Vt },
528
+ children: { label: Ot },
525
529
  width: 312,
526
530
  onClose: () => o.close()
527
531
  });
528
532
  return o.setCloseDisposable(c), !0;
529
533
  }
530
- }, wn = {
534
+ }, yn = {
531
535
  id: "data-validation.operation.close-validation-panel",
532
- type: ot.OPERATION,
536
+ type: at.OPERATION,
533
537
  handler(e) {
534
538
  return e.get(_e).close(), !0;
535
539
  }
536
- }, Cr = {
540
+ }, wr = {
537
541
  id: "data-validation.operation.toggle-validation-panel",
538
- type: ot.OPERATION,
542
+ type: at.OPERATION,
539
543
  handler(e) {
540
544
  const t = e.get(oe), n = e.get(_e);
541
- return n.open(), n.isOpen ? t.executeCommand(wn.id) : t.executeCommand(Be.id), !0;
545
+ return n.open(), n.isOpen ? t.executeCommand(yn.id) : t.executeCommand(Be.id), !0;
542
546
  }
543
- }, Ut = {
544
- type: ot.OPERATION,
547
+ }, Ft = {
548
+ type: at.OPERATION,
545
549
  id: "sheet.operation.show-data-validation-dropdown",
546
550
  handler(e, t) {
547
551
  if (!t)
@@ -554,36 +558,36 @@ const Vt = "DataValidationPanel", Be = {
554
558
  a
555
559
  ), !0;
556
560
  }
557
- }, Ir = {
558
- type: ot.OPERATION,
561
+ }, Rr = {
562
+ type: at.OPERATION,
559
563
  id: "sheet.operation.hide-data-validation-dropdown",
560
564
  handler(e, t) {
561
565
  return t ? (e.get($e).hideDropdown(), !0) : !1;
562
566
  }
563
- }, Ft = {
564
- type: ot.COMMAND,
567
+ }, $t = {
568
+ type: at.COMMAND,
565
569
  id: "data-validation.command.addRuleAndOpen",
566
570
  handler(e) {
567
- const t = e.get(pe), n = Qn(t);
571
+ const t = e.get(pe), n = tr(t);
568
572
  if (!n) return !1;
569
- const { workbook: r, worksheet: o } = n, i = rr(e), a = e.get(oe), l = r.getUnitId(), s = o.getSheetId(), d = {
573
+ const { workbook: r, worksheet: o } = n, i = ir(e), a = e.get(oe), l = r.getUnitId(), s = o.getSheetId(), d = {
570
574
  rule: i,
571
575
  unitId: l,
572
576
  subUnitId: s
573
577
  };
574
- return a.syncExecuteCommand(vn.id, d) ? (a.syncExecuteCommand(Be.id, {
578
+ return a.syncExecuteCommand(fn.id, d) ? (a.syncExecuteCommand(Be.id, {
575
579
  ruleId: i.uid,
576
580
  isAdd: !0
577
581
  }), !0) : !1;
578
582
  }
579
583
  };
580
- var Ho = Object.getOwnPropertyDescriptor, jo = (e, t, n, r) => {
581
- for (var o = r > 1 ? void 0 : r ? Ho(t, n) : t, i = e.length - 1, a; i >= 0; i--)
584
+ var Xo = Object.getOwnPropertyDescriptor, Zo = (e, t, n, r) => {
585
+ for (var o = r > 1 ? void 0 : r ? Xo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
582
586
  (a = e[i]) && (o = a(o) || o);
583
587
  return o;
584
588
  }, je = (e, t) => (n, r) => t(n, r, e);
585
589
  const Oe = "SHEET_DATA_VALIDATION_ALERT";
586
- let gt = class extends De {
590
+ let mt = class extends De {
587
591
  constructor(e, t, n, r, o, i) {
588
592
  super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = n, this._localeService = r, this._zenZoneService = o, this._dataValidationModel = i, this._init();
589
593
  }
@@ -591,7 +595,7 @@ let gt = class extends De {
591
595
  this._initCellAlertPopup(), this._initZenService();
592
596
  }
593
597
  _initCellAlertPopup() {
594
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(pr(100)).subscribe((e) => {
598
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(vr(100)).subscribe((e) => {
595
599
  var t;
596
600
  if (e) {
597
601
  const n = this._univerInstanceService.getUnit(e.location.unitId, H.UNIVER_SHEET), r = n.getSheetBySheetId(e.location.subUnitId);
@@ -601,7 +605,7 @@ let gt = class extends De {
601
605
  this._cellAlertManagerService.removeAlert(Oe);
602
606
  return;
603
607
  }
604
- if (this._dataValidationModel.validator(o, { ...e.location, workbook: n, worksheet: r }) === ze.INVALID) {
608
+ if (this._dataValidationModel.validator(o, { ...e.location, workbook: n, worksheet: r }) === Ke.INVALID) {
605
609
  const a = this._cellAlertManagerService.currentAlert.get(Oe), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
606
610
  if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
607
611
  this._cellAlertManagerService.removeAlert(Oe);
@@ -613,7 +617,7 @@ let gt = class extends De {
613
617
  return;
614
618
  }
615
619
  this._cellAlertManagerService.showAlert({
616
- type: Do.ERROR,
620
+ type: Vo.ERROR,
617
621
  title: this._localeService.t("dataValidation.error.title"),
618
622
  message: s == null ? void 0 : s.getRuleFinalError(o, e.location),
619
623
  location: e.location,
@@ -633,31 +637,31 @@ let gt = class extends De {
633
637
  }));
634
638
  }
635
639
  };
636
- gt = jo([
637
- je(0, E(bo)),
638
- je(1, E(Eo)),
640
+ mt = Zo([
641
+ je(0, D(Eo)),
642
+ je(1, D(Do)),
639
643
  je(2, pe),
640
- je(3, E(ge)),
641
- je(4, ur),
642
- je(5, E(ae))
643
- ], gt);
644
- var Yo = Object.getOwnPropertyDescriptor, Xo = (e, t, n, r) => {
645
- for (var o = r > 1 ? void 0 : r ? Yo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
644
+ je(3, D(ge)),
645
+ je(4, pr),
646
+ je(5, D(ae))
647
+ ], mt);
648
+ var zo = Object.getOwnPropertyDescriptor, Ko = (e, t, n, r) => {
649
+ for (var o = r > 1 ? void 0 : r ? zo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
646
650
  (a = e[i]) && (o = a(o) || o);
647
651
  return o;
648
- }, Ht = (e, t) => (n, r) => t(n, r, e);
649
- let Qe = class extends De {
652
+ }, Yt = (e, t) => (n, r) => t(n, r, e);
653
+ let et = class extends De {
650
654
  constructor(e, t, n) {
651
655
  super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = n, this._initAutoFill();
652
656
  }
653
657
  // eslint-disable-next-line max-lines-per-function
654
658
  _initAutoFill() {
655
659
  const e = () => ({ redos: [], undos: [] }), t = (r, o) => {
656
- const { source: i, target: a, unitId: l, subUnitId: s } = r, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = sn([i, a]), [h, c] = u.ranges, { mapFunc: m } = u, I = {
660
+ const { source: i, target: a, unitId: l, subUnitId: s } = r, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = dn([i, a]), [h, c] = u.ranges, { mapFunc: m } = u, I = {
657
661
  row: h.startRow,
658
662
  col: h.startColumn
659
- }, D = eo.getAutoFillRepeatRange(h, c), v = new yt(), C = /* @__PURE__ */ new Set();
660
- D.forEach((p) => {
663
+ }, V = to.getAutoFillRepeatRange(h, c), v = new bt(), C = /* @__PURE__ */ new Set();
664
+ V.forEach((p) => {
661
665
  const _ = p.repeatStartCell, T = p.relativeRange, A = {
662
666
  startRow: I.row,
663
667
  startColumn: I.col,
@@ -669,7 +673,7 @@ let Qe = class extends De {
669
673
  endColumn: _.col,
670
674
  endRow: _.row
671
675
  };
672
- $r.foreach(T, (L, y) => {
676
+ xr.foreach(T, (L, y) => {
673
677
  const O = Mt.getPositionRange(
674
678
  {
675
679
  startRow: L,
@@ -690,67 +694,67 @@ let Qe = class extends De {
690
694
  v.setValue(j, se, x), C.add(x);
691
695
  });
692
696
  });
693
- const f = Array.from(C).map((p) => ({ id: p, ranges: Qt(v, (_) => _ === p) }));
697
+ const f = Array.from(C).map((p) => ({ id: p, ranges: tn(v, (_) => _ === p) }));
694
698
  d.addRangeRules(f);
695
- const w = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: b, undoMutations: g } = on(l, s, w, this._injector, "patched", o === st.ONLY_FORMAT);
699
+ const w = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: M, undoMutations: g } = sn(l, s, w, this._injector, "patched", o === dt.ONLY_FORMAT);
696
700
  return {
697
701
  undos: g,
698
- redos: b
702
+ redos: M
699
703
  };
700
704
  }, n = {
701
- id: or,
705
+ id: ar,
702
706
  onBeforeFillData: (r) => {
703
707
  const { source: o, unitId: i, subUnitId: a } = r;
704
708
  for (const l of o.rows)
705
709
  for (const s of o.cols) {
706
710
  const d = this._sheetDataValidationModel.getRuleByLocation(i, a, l, s);
707
711
  if (d && d.type === X.CHECKBOX) {
708
- this._autoFillService.setDisableApplyType(st.SERIES, !0);
712
+ this._autoFillService.setDisableApplyType(dt.SERIES, !0);
709
713
  return;
710
714
  }
711
715
  }
712
716
  },
713
- onFillData: (r, o, i) => i === st.COPY || i === st.ONLY_FORMAT || i === st.SERIES ? t(r, i) : e(),
717
+ onFillData: (r, o, i) => i === dt.COPY || i === dt.ONLY_FORMAT || i === dt.SERIES ? t(r, i) : e(),
714
718
  onAfterFillData: () => {
715
719
  }
716
720
  };
717
721
  this.disposeWithMe(this._autoFillService.addHook(n));
718
722
  }
719
723
  };
720
- Qe = Xo([
721
- Ht(0, Qr),
722
- Ht(1, E(ae)),
723
- Ht(2, E(Ve))
724
- ], Qe);
725
- var Zo = Object.getOwnPropertyDescriptor, zo = (e, t, n, r) => {
726
- for (var o = r > 1 ? void 0 : r ? Zo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
724
+ et = Ko([
725
+ Yt(0, eo),
726
+ Yt(1, D(ae)),
727
+ Yt(2, D(Ve))
728
+ ], et);
729
+ var Go = Object.getOwnPropertyDescriptor, qo = (e, t, n, r) => {
730
+ for (var o = r > 1 ? void 0 : r ? Go(t, n) : t, i = e.length - 1, a; i >= 0; i--)
727
731
  (a = e[i]) && (o = a(o) || o);
728
732
  return o;
729
- }, jt = (e, t) => (n, r) => t(n, r, e);
730
- let et = class extends De {
733
+ }, Xt = (e, t) => (n, r) => t(n, r, e);
734
+ let tt = class extends De {
731
735
  constructor(t, n, r) {
732
736
  super();
733
- V(this, "_copyInfo");
737
+ E(this, "_copyInfo");
734
738
  this._sheetClipboardService = t, this._sheetDataValidationModel = n, this._injector = r, this._initCopyPaste();
735
739
  }
736
740
  _initCopyPaste() {
737
741
  this._sheetClipboardService.addClipboardHook({
738
- id: or,
742
+ id: ar,
739
743
  onBeforeCopy: (t, n, r) => this._collect(t, n, r),
740
744
  onPasteCells: (t, n, r, o) => {
741
- const { copyType: i = kn.COPY, pasteType: a } = o, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = n;
745
+ const { copyType: i = Un.COPY, pasteType: a } = o, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = n;
742
746
  return this._generateMutations(s, { copyType: i, pasteType: a, copyRange: l, unitId: d, subUnitId: u });
743
747
  }
744
748
  });
745
749
  }
746
750
  _collect(t, n, r) {
747
- const o = new yt();
751
+ const o = new bt();
748
752
  this._copyInfo = {
749
753
  unitId: t,
750
754
  subUnitId: n,
751
755
  matrix: o
752
756
  };
753
- const i = this._injector.invoke((s) => to(r, s, t, n));
757
+ const i = this._injector.invoke((s) => no(r, s, t, n));
754
758
  if (!i)
755
759
  return;
756
760
  const { rows: a, cols: l } = i;
@@ -765,29 +769,29 @@ let et = class extends De {
765
769
  _generateMutations(t, n) {
766
770
  if (!this._copyInfo)
767
771
  return { redos: [], undos: [] };
768
- if (n.copyType === kn.CUT)
772
+ if (n.copyType === Un.CUT)
769
773
  return this._copyInfo = null, { redos: [], undos: [] };
770
774
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
771
775
  return { redos: [], undos: [] };
772
776
  if ([
773
- St.SPECIAL_PASTE_COL_WIDTH,
774
- St.SPECIAL_PASTE_VALUE,
775
- St.SPECIAL_PASTE_FORMAT,
776
- St.SPECIAL_PASTE_FORMULA
777
+ It.SPECIAL_PASTE_COL_WIDTH,
778
+ It.SPECIAL_PASTE_VALUE,
779
+ It.SPECIAL_PASTE_FORMAT,
780
+ It.SPECIAL_PASTE_FORMULA
777
781
  ].includes(n.pasteType))
778
782
  return { redos: [], undos: [] };
779
783
  const { unitId: o, subUnitId: i } = this._copyInfo;
780
784
  if (n.unitId !== o || i !== n.subUnitId) {
781
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new yt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = sn([n.copyRange, t]), c = Nn(d, u, !0), m = /* @__PURE__ */ new Map();
785
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new bt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = dn([n.copyRange, t]), c = Fn(d, u, !0), m = /* @__PURE__ */ new Map();
782
786
  c.forEach(({ startRange: C }) => {
783
787
  var f;
784
- (f = this._copyInfo) == null || f.matrix.forValue((w, b, g) => {
788
+ (f = this._copyInfo) == null || f.matrix.forValue((w, M, g) => {
785
789
  const p = Mt.getPositionRange(
786
790
  {
787
791
  startRow: w,
788
792
  endRow: w,
789
- startColumn: b,
790
- endColumn: b
793
+ startColumn: M,
794
+ endColumn: M
791
795
  },
792
796
  C
793
797
  ), _ = `${i}-${g}`, T = this._sheetDataValidationModel.getRuleById(o, i, g);
@@ -796,9 +800,9 @@ let et = class extends De {
796
800
  s.add(_), l.setValue(A, P, _);
797
801
  });
798
802
  });
799
- const I = Array.from(s).map((C) => ({ id: C, ranges: Qt(l, (f) => f === C) }));
803
+ const I = Array.from(s).map((C) => ({ id: C, ranges: tn(l, (f) => f === C) }));
800
804
  a.addRangeRules(I);
801
- const { redoMutations: D, undoMutations: v } = on(
805
+ const { redoMutations: V, undoMutations: v } = sn(
802
806
  n.unitId,
803
807
  n.subUnitId,
804
808
  a.diffWithAddition(this._sheetDataValidationModel.getRules(n.unitId, n.subUnitId), m.values()),
@@ -807,14 +811,14 @@ let et = class extends De {
807
811
  !1
808
812
  );
809
813
  return {
810
- redos: D,
814
+ redos: V,
811
815
  undos: v
812
816
  };
813
817
  } else {
814
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new yt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = sn([n.copyRange, t]);
815
- Nn(d, u, !0).forEach(({ startRange: v }) => {
818
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new bt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = dn([n.copyRange, t]);
819
+ Fn(d, u, !0).forEach(({ startRange: v }) => {
816
820
  var C;
817
- (C = this._copyInfo) == null || C.matrix.forValue((f, w, b) => {
821
+ (C = this._copyInfo) == null || C.matrix.forValue((f, w, M) => {
818
822
  const g = Mt.getPositionRange(
819
823
  {
820
824
  startRow: f,
@@ -824,12 +828,12 @@ let et = class extends De {
824
828
  },
825
829
  v
826
830
  ), { row: p, col: _ } = h(g.startRow, g.startColumn);
827
- l.setValue(p, _, b), s.add(b);
831
+ l.setValue(p, _, M), s.add(M);
828
832
  });
829
833
  });
830
- const m = Array.from(s).map((v) => ({ id: v, ranges: Qt(l, (C) => C === v) }));
834
+ const m = Array.from(s).map((v) => ({ id: v, ranges: tn(l, (C) => C === v) }));
831
835
  a.addRangeRules(m);
832
- const { redoMutations: I, undoMutations: D } = on(
836
+ const { redoMutations: I, undoMutations: V } = sn(
833
837
  o,
834
838
  i,
835
839
  a.diff(this._sheetDataValidationModel.getRules(o, i)),
@@ -839,111 +843,111 @@ let et = class extends De {
839
843
  );
840
844
  return {
841
845
  redos: I,
842
- undos: D
846
+ undos: V
843
847
  };
844
848
  }
845
849
  }
846
850
  };
847
- et = zo([
848
- jt(0, Vo),
849
- jt(1, E(ae)),
850
- jt(2, E(Ve))
851
- ], et);
852
- var Ko = Object.getOwnPropertyDescriptor, Go = (e, t, n, r) => {
853
- for (var o = r > 1 ? void 0 : r ? Ko(t, n) : t, i = e.length - 1, a; i >= 0; i--)
851
+ tt = qo([
852
+ Xt(0, To),
853
+ Xt(1, D(ae)),
854
+ Xt(2, D(Ve))
855
+ ], tt);
856
+ var Jo = Object.getOwnPropertyDescriptor, Qo = (e, t, n, r) => {
857
+ for (var o = r > 1 ? void 0 : r ? Jo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
854
858
  (a = e[i]) && (o = a(o) || o);
855
859
  return o;
856
- }, Yt = (e, t) => (n, r) => t(n, r, e);
857
- let tt = class extends De {
860
+ }, Zt = (e, t) => (n, r) => t(n, r, e);
861
+ let nt = class extends De {
858
862
  constructor(e, t, n) {
859
863
  super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = n, this._commandExecutedListener();
860
864
  }
861
865
  _commandExecutedListener() {
862
866
  this.disposeWithMe(
863
867
  this._commandService.beforeCommandExecuted((e) => {
864
- if (e.id === vn.id) {
868
+ if (e.id === fn.id) {
865
869
  const { unitId: t, subUnitId: n, rule: { ranges: r } } = e.params;
866
870
  this._sheetPermissionCheckController.permissionCheckWithRanges({
867
- workbookTypes: [rn],
868
- rangeTypes: [nn],
869
- worksheetTypes: [en, tn]
871
+ workbookTypes: [an],
872
+ rangeTypes: [on],
873
+ worksheetTypes: [nn, rn]
870
874
  }, r, t, n) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"));
871
875
  }
872
- if (e.id === ir.id) {
876
+ if (e.id === sr.id) {
873
877
  const { unitId: t, subUnitId: n, ranges: r } = e.params;
874
878
  this._sheetPermissionCheckController.permissionCheckWithRanges({
875
- workbookTypes: [rn],
876
- rangeTypes: [nn],
877
- worksheetTypes: [en, tn]
879
+ workbookTypes: [an],
880
+ rangeTypes: [on],
881
+ worksheetTypes: [nn, rn]
878
882
  }, r, t, n) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"));
879
883
  }
880
884
  })
881
885
  );
882
886
  }
883
887
  };
884
- tt = Go([
885
- Yt(0, E(ge)),
886
- Yt(1, oe),
887
- Yt(2, E(no))
888
- ], tt);
889
- const wr = "sheet.menu.data-validation";
890
- function qo(e) {
888
+ nt = Qo([
889
+ Zt(0, D(ge)),
890
+ Zt(1, oe),
891
+ Zt(2, D(ro))
892
+ ], nt);
893
+ const yr = "sheet.menu.data-validation";
894
+ function ei(e) {
891
895
  return {
892
- id: wr,
893
- type: _n.SUBITEMS,
896
+ id: yr,
897
+ type: Cn.SUBITEMS,
894
898
  icon: "DataValidationIcon",
895
899
  tooltip: "dataValidation.title",
896
- hidden$: So(e, H.UNIVER_SHEET),
897
- disabled$: To(e, { workbookTypes: [rn], worksheetTypes: [tn, en], rangeTypes: [nn] })
900
+ hidden$: Co(e, H.UNIVER_SHEET),
901
+ disabled$: Oo(e, { workbookTypes: [an], worksheetTypes: [rn, nn], rangeTypes: [on] })
898
902
  };
899
903
  }
900
- function Jo(e) {
904
+ function ti(e) {
901
905
  return {
902
906
  id: Be.id,
903
907
  title: "dataValidation.panel.title",
904
- type: _n.BUTTON
908
+ type: Cn.BUTTON
905
909
  };
906
910
  }
907
- function Qo(e) {
911
+ function ni(e) {
908
912
  return {
909
- id: Ft.id,
913
+ id: $t.id,
910
914
  title: "dataValidation.panel.add",
911
- type: _n.BUTTON
915
+ type: Cn.BUTTON
912
916
  };
913
917
  }
914
- const ei = {
915
- [Co.RULES]: {
916
- [wr]: {
918
+ const ri = {
919
+ [Io.RULES]: {
920
+ [yr]: {
917
921
  order: 0,
918
- menuItemFactory: qo,
922
+ menuItemFactory: ei,
919
923
  [Be.id]: {
920
924
  order: 0,
921
- menuItemFactory: Jo
925
+ menuItemFactory: ti
922
926
  },
923
- [Ft.id]: {
927
+ [$t.id]: {
924
928
  order: 1,
925
- menuItemFactory: Qo
929
+ menuItemFactory: ni
926
930
  }
927
931
  }
928
932
  }
929
933
  };
930
- var ti = Object.getOwnPropertyDescriptor, Rr = (e, t, n, r) => {
931
- for (var o = r > 1 ? void 0 : r ? ti(t, n) : t, i = e.length - 1, a; i >= 0; i--)
934
+ var oi = Object.getOwnPropertyDescriptor, br = (e, t, n, r) => {
935
+ for (var o = r > 1 ? void 0 : r ? oi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
932
936
  (a = e[i]) && (o = a(o) || o);
933
937
  return o;
934
938
  }, K = (e, t) => (n, r) => t(n, r, e);
935
- const yr = {
939
+ const Mr = {
936
940
  tr: {
937
941
  size: 6,
938
942
  color: "#fe4b4b"
939
943
  }
940
944
  };
941
- let nt = class extends pn {
945
+ let rt = class extends vn {
942
946
  constructor(e, t, n, r, o, i, a, l, s, d, u) {
943
947
  super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = n, this._univerInstanceService = r, this._autoHeightController = o, this._dropdownManagerService = i, this._sheetDataValidationModel = a, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = d, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
944
948
  }
945
949
  _initMenu() {
946
- this._menuManagerService.mergeMenu(ei);
950
+ this._menuManagerService.mergeMenu(ri);
947
951
  }
948
952
  _initDropdown() {
949
953
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
@@ -989,23 +993,23 @@ let nt = class extends pn {
989
993
  _initViewModelIntercept() {
990
994
  this.disposeWithMe(
991
995
  this._sheetInterceptorService.intercept(
992
- er.CELL_CONTENT,
996
+ nr.CELL_CONTENT,
993
997
  {
994
- effect: Xn.Style,
998
+ effect: zn.Style,
995
999
  // must be after numfmt
996
- priority: tr.DATA_VALIDATION,
1000
+ priority: rr.DATA_VALIDATION,
997
1001
  // eslint-disable-next-line max-lines-per-function, complexity
998
1002
  handler: (e, t, n) => {
999
- var C, f, w, b, g;
1003
+ var C, f, w, M, g;
1000
1004
  const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
1001
1005
  if (!d)
1002
1006
  return n(e);
1003
1007
  const u = this._sheetDataValidationModel.getRuleById(i, a, d);
1004
1008
  if (!u)
1005
1009
  return n(e);
1006
- const h = (C = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? C : ze.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
1010
+ const h = (C = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? C : Ke.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
1007
1011
  let I;
1008
- const D = {
1012
+ const V = {
1009
1013
  get value() {
1010
1014
  var p;
1011
1015
  return I !== void 0 || (I = (p = ie(m)) != null ? p : null), I;
@@ -1013,18 +1017,18 @@ let nt = class extends pn {
1013
1017
  }, v = {
1014
1018
  get value() {
1015
1019
  var p;
1016
- return `${(p = D.value) != null ? p : ""}`;
1020
+ return `${(p = V.value) != null ? p : ""}`;
1017
1021
  }
1018
1022
  };
1019
1023
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1020
1024
  ...e == null ? void 0 : e.markers,
1021
- ...h === ze.INVALID ? yr : null
1025
+ ...h === Ke.INVALID ? Mr : null
1022
1026
  }, e.customRender = [
1023
1027
  ...(f = e == null ? void 0 : e.customRender) != null ? f : [],
1024
1028
  ...c != null && c.canvasRender ? [c.canvasRender] : []
1025
1029
  ], e.fontRenderExtension = {
1026
1030
  ...e == null ? void 0 : e.fontRenderExtension,
1027
- isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((b = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : b.call(c, u, D.value, t))
1031
+ isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((M = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : M.call(c, u, V.value, t))
1028
1032
  }, e.interceptorStyle = {
1029
1033
  ...e == null ? void 0 : e.interceptorStyle,
1030
1034
  ...c == null ? void 0 : c.getExtraStyle(u, v.value, {
@@ -1035,7 +1039,7 @@ let nt = class extends pn {
1035
1039
  }, r, o)
1036
1040
  }, e.interceptorAutoHeight = () => {
1037
1041
  var A, P, L, y, O, U;
1038
- const p = (P = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(ut).getSkeletonParam(a)) == null ? void 0 : P.skeleton;
1042
+ const p = (P = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(pt).getSkeletonParam(a)) == null ? void 0 : P.skeleton;
1039
1043
  if (!p)
1040
1044
  return;
1041
1045
  const _ = p.worksheet.getMergedCell(r, o), T = {
@@ -1052,7 +1056,7 @@ let nt = class extends pn {
1052
1056
  return (U = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoHeight) == null ? void 0 : U.call(O, T);
1053
1057
  }, e.interceptorAutoWidth = () => {
1054
1058
  var A, P, L, y, O, U;
1055
- const p = (P = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(ut).getSkeletonParam(a)) == null ? void 0 : P.skeleton;
1059
+ const p = (P = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(pt).getSkeletonParam(a)) == null ? void 0 : P.skeleton;
1056
1060
  if (!p)
1057
1061
  return;
1058
1062
  const _ = p.worksheet.getMergedCell(r, o), T = {
@@ -1077,8 +1081,8 @@ let nt = class extends pn {
1077
1081
  this._sheetDataValidationModel.ruleChange$.pipe(
1078
1082
  // patched data-validation change don't need to re-calc row height
1079
1083
  // re-calc of row height will be triggered precisely by the origin command
1080
- Cn((e) => e.source === "command"),
1081
- gr(100)
1084
+ wn((e) => e.source === "command"),
1085
+ mr(100)
1082
1086
  ).subscribe((e) => {
1083
1087
  if (e.length === 0)
1084
1088
  return;
@@ -1088,25 +1092,25 @@ let nt = class extends pn {
1088
1092
  (n.rule.type === X.LIST_MULTIPLE || n.rule.type === X.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1089
1093
  }), t.length) {
1090
1094
  const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1091
- Zn(n.redos, this._commandService);
1095
+ Kn(n.redos, this._commandService);
1092
1096
  }
1093
1097
  });
1094
1098
  }
1095
1099
  };
1096
- nt = Rr([
1100
+ rt = br([
1097
1101
  K(0, oe),
1098
- K(1, Io),
1102
+ K(1, wo),
1099
1103
  K(2, xe),
1100
1104
  K(3, pe),
1101
- K(4, E(fr)),
1102
- K(5, E($e)),
1103
- K(6, E(ae)),
1104
- K(7, E(Te)),
1105
- K(8, E(gn)),
1106
- K(9, E(ar)),
1107
- K(10, xr(mr))
1108
- ], nt);
1109
- let $n = class extends pn {
1105
+ K(4, D(Sr)),
1106
+ K(5, D($e)),
1107
+ K(6, D(ae)),
1108
+ K(7, D(Te)),
1109
+ K(8, D(mn)),
1110
+ K(9, D(lr)),
1111
+ K(10, Br(_r))
1112
+ ], rt);
1113
+ let Bn = class extends vn {
1110
1114
  constructor(e, t, n, r, o, i, a) {
1111
1115
  super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = n, this._dataValidatorRegistryService = r, this._sheetInterceptorService = o, this._sheetDataValidationModel = i, this._dataValidationCacheService = a, this._initViewModelIntercept(), this._initAutoHeight();
1112
1116
  }
@@ -1114,24 +1118,24 @@ let $n = class extends pn {
1114
1118
  _initViewModelIntercept() {
1115
1119
  this.disposeWithMe(
1116
1120
  this._sheetInterceptorService.intercept(
1117
- er.CELL_CONTENT,
1121
+ nr.CELL_CONTENT,
1118
1122
  {
1119
- effect: Xn.Style,
1123
+ effect: zn.Style,
1120
1124
  // must be after numfmt
1121
- priority: tr.DATA_VALIDATION,
1125
+ priority: rr.DATA_VALIDATION,
1122
1126
  // eslint-disable-next-line complexity, max-lines-per-function
1123
1127
  handler: (e, t, n) => {
1124
- var v, C, f, w, b;
1128
+ var v, C, f, w, M;
1125
1129
  const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
1126
1130
  if (!d)
1127
1131
  return n(e);
1128
1132
  const u = this._sheetDataValidationModel.getRuleById(i, a, d);
1129
1133
  if (!u)
1130
1134
  return n(e);
1131
- const h = (v = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? v : ze.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(r, o), I = ie(m), D = `${I != null ? I : ""}`;
1135
+ const h = (v = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? v : Ke.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(r, o), I = ie(m), V = `${I != null ? I : ""}`;
1132
1136
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1133
1137
  ...e == null ? void 0 : e.markers,
1134
- ...h === ze.INVALID ? yr : null
1138
+ ...h === Ke.INVALID ? Mr : null
1135
1139
  }, e.customRender = [
1136
1140
  ...(C = e == null ? void 0 : e.customRender) != null ? C : [],
1137
1141
  ...c != null && c.canvasRender ? [c.canvasRender] : []
@@ -1140,7 +1144,7 @@ let $n = class extends pn {
1140
1144
  isSkip: ((f = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : f.isSkip) || ((w = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : w.call(c, u, I, t))
1141
1145
  }, e.interceptorStyle = {
1142
1146
  ...e == null ? void 0 : e.interceptorStyle,
1143
- ...c == null ? void 0 : c.getExtraStyle(u, D, {
1147
+ ...c == null ? void 0 : c.getExtraStyle(u, V, {
1144
1148
  get style() {
1145
1149
  const g = l.getStyles();
1146
1150
  return (typeof (e == null ? void 0 : e.s) == "string" ? g.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
@@ -1148,7 +1152,7 @@ let $n = class extends pn {
1148
1152
  }, r, o)
1149
1153
  }, e.interceptorAutoHeight = () => {
1150
1154
  var T, A, P, L, y, O;
1151
- const g = (A = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(ut).getSkeletonParam(a)) == null ? void 0 : A.skeleton;
1155
+ const g = (A = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(pt).getSkeletonParam(a)) == null ? void 0 : A.skeleton;
1152
1156
  if (!g)
1153
1157
  return;
1154
1158
  const p = g.worksheet.getMergedCell(r, o), _ = {
@@ -1165,7 +1169,7 @@ let $n = class extends pn {
1165
1169
  return (O = (y = c == null ? void 0 : c.canvasRender) == null ? void 0 : y.calcCellAutoHeight) == null ? void 0 : O.call(y, _);
1166
1170
  }, e.interceptorAutoWidth = () => {
1167
1171
  var T, A, P, L, y, O;
1168
- const g = (A = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(ut).getSkeletonParam(a)) == null ? void 0 : A.skeleton;
1172
+ const g = (A = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(pt).getSkeletonParam(a)) == null ? void 0 : A.skeleton;
1169
1173
  if (!g)
1170
1174
  return;
1171
1175
  const p = g.worksheet.getMergedCell(r, o), _ = {
@@ -1180,7 +1184,7 @@ let $n = class extends pn {
1180
1184
  worksheet: s
1181
1185
  };
1182
1186
  return (O = (y = c == null ? void 0 : c.canvasRender) == null ? void 0 : y.calcCellAutoWidth) == null ? void 0 : O.call(y, _);
1183
- }, e.coverable = ((b = e == null ? void 0 : e.coverable) != null ? b : !0) && !(u.type === X.LIST || u.type === X.LIST_MULTIPLE), n(e);
1187
+ }, e.coverable = ((M = e == null ? void 0 : e.coverable) != null ? M : !0) && !(u.type === X.LIST || u.type === X.LIST_MULTIPLE), n(e);
1184
1188
  }
1185
1189
  }
1186
1190
  )
@@ -1188,8 +1192,8 @@ let $n = class extends pn {
1188
1192
  }
1189
1193
  _initAutoHeight() {
1190
1194
  this._sheetDataValidationModel.ruleChange$.pipe(
1191
- Cn((e) => e.source === "command"),
1192
- gr(16)
1195
+ wn((e) => e.source === "command"),
1196
+ mr(16)
1193
1197
  ).subscribe((e) => {
1194
1198
  const t = [];
1195
1199
  if (e.forEach((n) => {
@@ -1197,26 +1201,26 @@ let $n = class extends pn {
1197
1201
  (n.rule.type === X.LIST_MULTIPLE || n.rule.type === X.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1198
1202
  }), t.length) {
1199
1203
  const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1200
- Zn(n.redos, this._commandService);
1204
+ Kn(n.redos, this._commandService);
1201
1205
  }
1202
1206
  });
1203
1207
  }
1204
1208
  };
1205
- $n = Rr([
1209
+ Bn = br([
1206
1210
  K(0, oe),
1207
1211
  K(1, xe),
1208
- K(2, E(fr)),
1209
- K(3, E(Te)),
1210
- K(4, E(gn)),
1211
- K(5, E(ae)),
1212
- K(6, E(ar))
1213
- ], $n);
1214
- var ni = Object.getOwnPropertyDescriptor, ri = (e, t, n, r) => {
1215
- for (var o = r > 1 ? void 0 : r ? ni(t, n) : t, i = e.length - 1, a; i >= 0; i--)
1212
+ K(2, D(Sr)),
1213
+ K(3, D(Te)),
1214
+ K(4, D(mn)),
1215
+ K(5, D(ae)),
1216
+ K(6, D(lr))
1217
+ ], Bn);
1218
+ var ii = Object.getOwnPropertyDescriptor, ai = (e, t, n, r) => {
1219
+ for (var o = r > 1 ? void 0 : r ? ii(t, n) : t, i = e.length - 1, a; i >= 0; i--)
1216
1220
  (a = e[i]) && (o = a(o) || o);
1217
1221
  return o;
1218
- }, xn = (e, t) => (n, r) => t(n, r, e);
1219
- let Tt = class extends De {
1222
+ }, Wn = (e, t) => (n, r) => t(n, r, e);
1223
+ let At = class extends De {
1220
1224
  constructor(e, t, n) {
1221
1225
  super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = n, this._initSkeletonChange();
1222
1226
  }
@@ -1233,16 +1237,16 @@ let Tt = class extends De {
1233
1237
  (i = this._sheetSkeletonManagerService.getSkeletonParam(o)) == null || i.skeleton.makeDirty(!0);
1234
1238
  }), (r = this._context.mainComponent) == null || r.makeForceDirty();
1235
1239
  };
1236
- this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Br(16)).subscribe(e));
1240
+ this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Wr(16)).subscribe(e));
1237
1241
  }
1238
1242
  };
1239
- Tt = ri([
1240
- xn(1, E(ae)),
1241
- xn(2, E(ut))
1242
- ], Tt);
1243
+ At = ai([
1244
+ Wn(1, D(ae)),
1245
+ Wn(2, D(pt))
1246
+ ], At);
1243
1247
  function We({ ref: e, ...t }) {
1244
- const { icon: n, id: r, className: o, extend: i, ...a } = t, l = `univerjs-icon univerjs-icon-${r} ${o || ""}`.trim(), s = vt(`_${ai()}`);
1245
- return Mr(n, `${r}`, {
1248
+ const { icon: n, id: r, className: o, extend: i, ...a } = t, l = `univerjs-icon univerjs-icon-${r} ${o || ""}`.trim(), s = ft(`_${di()}`);
1249
+ return Er(n, `${r}`, {
1246
1250
  defIds: n.defIds,
1247
1251
  idSuffix: s.current
1248
1252
  }, {
@@ -1251,14 +1255,14 @@ function We({ ref: e, ...t }) {
1251
1255
  ...a
1252
1256
  }, i);
1253
1257
  }
1254
- function Mr(e, t, n, r, o) {
1258
+ function Er(e, t, n, r, o) {
1255
1259
  return ye(e.tag, {
1256
1260
  key: t,
1257
- ...oi(e, n, o),
1261
+ ...si(e, n, o),
1258
1262
  ...r
1259
- }, (ii(e, n).children || []).map((i, a) => Mr(i, `${t}-${e.tag}-${a}`, n, void 0, o)));
1263
+ }, (li(e, n).children || []).map((i, a) => Er(i, `${t}-${e.tag}-${a}`, n, void 0, o)));
1260
1264
  }
1261
- function oi(e, t, n) {
1265
+ function si(e, t, n) {
1262
1266
  const r = { ...e.attrs };
1263
1267
  n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), e.tag === "mask" && r.id && (r.id = r.id + t.idSuffix), Object.entries(r).forEach(([i, a]) => {
1264
1268
  i === "mask" && typeof a == "string" && (r[i] = a.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
@@ -1268,7 +1272,7 @@ function oi(e, t, n) {
1268
1272
  typeof a == "string" && (r[i] = a.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
1269
1273
  })), r;
1270
1274
  }
1271
- function ii(e, t) {
1275
+ function li(e, t) {
1272
1276
  var r;
1273
1277
  const { defIds: n } = t;
1274
1278
  return !n || n.length === 0 ? e : e.tag === "defs" && ((r = e.children) != null && r.length) ? {
@@ -1282,11 +1286,11 @@ function ii(e, t) {
1282
1286
  } : o)
1283
1287
  } : e;
1284
1288
  }
1285
- function ai() {
1289
+ function di() {
1286
1290
  return Math.random().toString(36).substring(2, 8);
1287
1291
  }
1288
1292
  We.displayName = "UniverIcon";
1289
- const si = {
1293
+ const ci = {
1290
1294
  tag: "svg",
1291
1295
  attrs: {
1292
1296
  xmlns: "http://www.w3.org/2000/svg",
@@ -1329,15 +1333,15 @@ const si = {
1329
1333
  }
1330
1334
  }
1331
1335
  ]
1332
- }, br = it(function(t, n) {
1336
+ }, Dr = st(function(t, n) {
1333
1337
  return ye(We, Object.assign({}, t, {
1334
1338
  id: "data-validation-icon",
1335
1339
  ref: n,
1336
- icon: si
1340
+ icon: ci
1337
1341
  }));
1338
1342
  });
1339
- br.displayName = "DataValidationIcon";
1340
- const li = {
1343
+ Dr.displayName = "DataValidationIcon";
1344
+ const ui = {
1341
1345
  tag: "svg",
1342
1346
  attrs: {
1343
1347
  xmlns: "http://www.w3.org/2000/svg",
@@ -1378,15 +1382,15 @@ const li = {
1378
1382
  }
1379
1383
  }
1380
1384
  ]
1381
- }, Rn = it(function(t, n) {
1385
+ }, bn = st(function(t, n) {
1382
1386
  return ye(We, Object.assign({}, t, {
1383
1387
  id: "delete-icon",
1384
1388
  ref: n,
1385
- icon: li
1389
+ icon: ui
1386
1390
  }));
1387
1391
  });
1388
- Rn.displayName = "DeleteIcon";
1389
- const di = {
1392
+ bn.displayName = "DeleteIcon";
1393
+ const hi = {
1390
1394
  tag: "svg",
1391
1395
  attrs: {
1392
1396
  xmlns: "http://www.w3.org/2000/svg",
@@ -1402,15 +1406,15 @@ const di = {
1402
1406
  d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"
1403
1407
  }
1404
1408
  }]
1405
- }, Er = it(function(t, n) {
1409
+ }, Vr = st(function(t, n) {
1406
1410
  return ye(We, Object.assign({}, t, {
1407
1411
  id: "increase-icon",
1408
1412
  ref: n,
1409
- icon: di
1413
+ icon: hi
1410
1414
  }));
1411
1415
  });
1412
- Er.displayName = "IncreaseIcon";
1413
- const ci = {
1416
+ Vr.displayName = "IncreaseIcon";
1417
+ const pi = {
1414
1418
  tag: "svg",
1415
1419
  attrs: {
1416
1420
  xmlns: "http://www.w3.org/2000/svg",
@@ -1428,15 +1432,15 @@ const ci = {
1428
1432
  clipRule: "evenodd"
1429
1433
  }
1430
1434
  }]
1431
- }, yn = it(function(t, n) {
1435
+ }, Mn = st(function(t, n) {
1432
1436
  return ye(We, Object.assign({}, t, {
1433
1437
  id: "more-down-icon",
1434
1438
  ref: n,
1435
- icon: ci
1439
+ icon: pi
1436
1440
  }));
1437
1441
  });
1438
- yn.displayName = "MoreDownIcon";
1439
- const ui = {
1442
+ Mn.displayName = "MoreDownIcon";
1443
+ const gi = {
1440
1444
  tag: "svg",
1441
1445
  attrs: {
1442
1446
  xmlns: "http://www.w3.org/2000/svg",
@@ -1454,15 +1458,15 @@ const ui = {
1454
1458
  clipRule: "evenodd"
1455
1459
  }
1456
1460
  }]
1457
- }, Dr = it(function(t, n) {
1461
+ }, Tr = st(function(t, n) {
1458
1462
  return ye(We, Object.assign({}, t, {
1459
1463
  id: "more-up-icon",
1460
1464
  ref: n,
1461
- icon: ui
1465
+ icon: gi
1462
1466
  }));
1463
1467
  });
1464
- Dr.displayName = "MoreUpIcon";
1465
- const hi = {
1468
+ Tr.displayName = "MoreUpIcon";
1469
+ const vi = {
1466
1470
  tag: "svg",
1467
1471
  attrs: {
1468
1472
  xmlns: "http://www.w3.org/2000/svg",
@@ -1515,18 +1519,18 @@ const hi = {
1515
1519
  }
1516
1520
  }
1517
1521
  ]
1518
- }, Vr = it(function(t, n) {
1522
+ }, Or = st(function(t, n) {
1519
1523
  return ye(We, Object.assign({}, t, {
1520
1524
  id: "sequence-icon",
1521
1525
  ref: n,
1522
- icon: hi
1526
+ icon: vi
1523
1527
  }));
1524
1528
  });
1525
- Vr.displayName = "SequenceIcon";
1526
- function pi(e) {
1529
+ Or.displayName = "SequenceIcon";
1530
+ function mi(e) {
1527
1531
  var d;
1528
- const t = F(ge), n = F(Sn), { value: r, onChange: o, extraComponent: i } = e, [a, l] = W(!1), s = i ? n.get(i) : null;
1529
- return /* @__PURE__ */ Y(pt, { children: [
1532
+ const t = F(ge), n = F(In), { value: r, onChange: o, extraComponent: i } = e, [a, l] = W(!1), s = i ? n.get(i) : null;
1533
+ return /* @__PURE__ */ Y(vt, { children: [
1530
1534
  /* @__PURE__ */ Y(
1531
1535
  "div",
1532
1536
  {
@@ -1534,24 +1538,24 @@ function pi(e) {
1534
1538
  onClick: () => l(!a),
1535
1539
  children: [
1536
1540
  t.t("dataValidation.panel.options"),
1537
- a ? /* @__PURE__ */ S(Dr, { className: "univer-ml-1" }) : /* @__PURE__ */ S(yn, { className: "univer-ml-1" })
1541
+ a ? /* @__PURE__ */ S(Tr, { className: "univer-ml-1" }) : /* @__PURE__ */ S(Mn, { className: "univer-ml-1" })
1538
1542
  ]
1539
1543
  }
1540
1544
  ),
1541
- a && /* @__PURE__ */ Y(pt, { children: [
1545
+ a && /* @__PURE__ */ Y(vt, { children: [
1542
1546
  s ? /* @__PURE__ */ S(s, { value: r, onChange: o }) : null,
1543
1547
  /* @__PURE__ */ S(
1544
1548
  Z,
1545
1549
  {
1546
1550
  label: t.t("dataValidation.panel.invalid"),
1547
1551
  children: /* @__PURE__ */ Y(
1548
- In,
1552
+ Rn,
1549
1553
  {
1550
- value: `${(d = r.errorStyle) != null ? d : ct.WARNING}`,
1554
+ value: `${(d = r.errorStyle) != null ? d : ht.WARNING}`,
1551
1555
  onChange: (u) => o({ ...r, errorStyle: +u }),
1552
1556
  children: [
1553
- /* @__PURE__ */ S(Ne, { value: `${ct.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1554
- /* @__PURE__ */ S(Ne, { value: `${ct.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1557
+ /* @__PURE__ */ S(Ne, { value: `${ht.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1558
+ /* @__PURE__ */ S(Ne, { value: `${ht.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1555
1559
  ]
1556
1560
  }
1557
1561
  )
@@ -1562,7 +1566,7 @@ function pi(e) {
1562
1566
  {
1563
1567
  label: t.t("dataValidation.panel.messageInfo"),
1564
1568
  children: /* @__PURE__ */ S(
1565
- Nt,
1569
+ Ut,
1566
1570
  {
1567
1571
  checked: r.showErrorMessage,
1568
1572
  onChange: () => o({
@@ -1578,61 +1582,61 @@ function pi(e) {
1578
1582
  ] })
1579
1583
  ] });
1580
1584
  }
1581
- const gi = (e) => Wr(
1585
+ const fi = (e) => Hr(
1582
1586
  async (t, n, r, o) => {
1583
1587
  const i = await e.executeCommand(t, n, r);
1584
1588
  o == null || o(i);
1585
1589
  },
1586
1590
  1e3
1587
1591
  );
1588
- function vi(e, t, n) {
1592
+ function _i(e, t, n) {
1589
1593
  var r, o, i, a;
1590
1594
  return t ? ((o = (r = e.getUnit(t)) == null ? void 0 : r.getSheetBySheetName(n)) == null ? void 0 : o.getSheetId()) || "" : ((a = (i = e.getCurrentUnitForType(H.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(n)) == null ? void 0 : a.getSheetId()) || "";
1591
1595
  }
1592
- function mi() {
1596
+ function Si() {
1593
1597
  var N, J;
1594
- const [e, t] = W(0), n = F(_e), r = Re(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: a } = r || {}, l = a.uid, s = F(Te), d = F(pe), u = F(Sn), h = F(oe), c = F(fn), m = F(ge), I = Re(
1598
+ const [e, t] = W(0), n = F(_e), r = Re(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: a } = r || {}, l = a.uid, s = F(Te), d = F(pe), u = F(In), h = F(oe), c = F(Sn), m = F(ge), I = Re(
1595
1599
  () => d.getCurrentTypeOfUnit$(H.UNIVER_SHEET),
1596
1600
  void 0,
1597
1601
  void 0,
1598
1602
  []
1599
- ), D = Re(() => {
1603
+ ), V = Re(() => {
1600
1604
  var R;
1601
- return (R = I == null ? void 0 : I.activeSheet$) != null ? R : vr(null);
1602
- }, void 0, void 0, []), [v, C] = W(a), f = s.getValidatorItem(v.type), [w, b] = W(!1), g = s.getValidatorsByScope(mo.SHEET), [p, _] = W(() => v.ranges.map((R) => ({ unitId: "", sheetId: "", range: R }))), T = ht(() => gi(h), [h]), [A, P] = W(!1), [L, y] = W(!1), O = vt(null), U = F(Jn);
1603
- if (be(() => () => {
1605
+ return (R = I == null ? void 0 : I.activeSheet$) != null ? R : fr(null);
1606
+ }, void 0, void 0, []), [v, C] = W(a), f = s.getValidatorItem(v.type), [w, M] = W(!1), g = s.getValidatorsByScope(fo.SHEET), [p, _] = W(() => v.ranges.map((R) => ({ unitId: "", sheetId: "", range: R }))), T = gt(() => fi(h), [h]), [A, P] = W(!1), [L, y] = W(!1), O = ft(null), U = F(er);
1607
+ if (Me(() => () => {
1604
1608
  const R = U.getCurrentLastSelection();
1605
1609
  R && U.setSelections([R]);
1606
- }, [U]), be(() => {
1610
+ }, [U]), Me(() => {
1607
1611
  h.onCommandExecuted((R) => {
1608
- (R.id === Hr.id || R.id === jr.id) && setTimeout(() => {
1612
+ (R.id === jr.id || R.id === Yr.id) && setTimeout(() => {
1609
1613
  const B = c.getRuleById(o, i, l);
1610
1614
  t((z) => z + 1), B && (C(B), _(B.ranges.map((z) => ({ unitId: "", sheetId: "", range: z }))));
1611
1615
  }, 20);
1612
1616
  });
1613
1617
  }, [h, c, l, i, o]), !f)
1614
1618
  return null;
1615
- const k = f.operators, x = f.operatorNames, te = v.operator ? fo.includes(v.operator) : !1, j = () => {
1616
- (D == null ? void 0 : D.getSheetId()) !== i && h.syncExecuteCommand(ro.id, {
1619
+ const k = f.operators, x = f.operatorNames, te = v.operator ? _o.includes(v.operator) : !1, j = () => {
1620
+ (V == null ? void 0 : V.getSheetId()) !== i && h.syncExecuteCommand(oo.id, {
1617
1621
  unitId: o,
1618
1622
  subUnitId: i
1619
1623
  });
1620
1624
  }, se = () => {
1621
1625
  var R, B, z;
1622
- (B = (R = O.current) == null ? void 0 : R.editor) != null && B.isFocus() && le((z = O.current) == null ? void 0 : z.getValue()), !(!v.ranges.length || A) && (f.validatorFormula(v, o, i).success ? n.setActiveRule(null) : b(!0), j());
1623
- }, le = an((R) => {
1624
- const B = R.split(",").filter(Boolean).map(Lo).map((ne) => {
1625
- const Mn = ne.sheetName;
1626
- if (Mn) {
1627
- const Pr = vi(d, ne.unitId, Mn);
1628
- return { ...ne, sheetId: Pr };
1626
+ (B = (R = O.current) == null ? void 0 : R.editor) != null && B.isFocus() && le((z = O.current) == null ? void 0 : z.getValue()), !(!v.ranges.length || A) && (f.validatorFormula(v, o, i).success ? n.setActiveRule(null) : M(!0), j());
1627
+ }, le = ln((R) => {
1628
+ const B = R.split(",").filter(Boolean).map(ko).map((ne) => {
1629
+ const En = ne.sheetName;
1630
+ if (En) {
1631
+ const Lr = _i(d, ne.unitId, En);
1632
+ return { ...ne, sheetId: Lr };
1629
1633
  }
1630
1634
  return {
1631
1635
  ...ne,
1632
1636
  sheetId: ""
1633
1637
  };
1634
1638
  });
1635
- if (Yr(B, p))
1639
+ if (Xr(B, p))
1636
1640
  return;
1637
1641
  _(B);
1638
1642
  const z = B.filter((ne) => (!ne.unitId || ne.unitId === o) && (!ne.sheetId || ne.sheetId === i)).map((ne) => ne.range);
@@ -1647,9 +1651,9 @@ function mi() {
1647
1651
  ruleId: l,
1648
1652
  ranges: z
1649
1653
  };
1650
- T(ir.id, Ie);
1654
+ T(sr.id, Ie);
1651
1655
  }), de = (R) => {
1652
- if (bn(R, Pn(v)))
1656
+ if (Dn(R, kn(v)))
1653
1657
  return;
1654
1658
  C({
1655
1659
  ...v,
@@ -1662,12 +1666,12 @@ function mi() {
1662
1666
  setting: R
1663
1667
  };
1664
1668
  T(
1665
- Tn.id,
1669
+ An.id,
1666
1670
  B,
1667
1671
  void 0
1668
1672
  );
1669
- }, Me = async () => {
1670
- await h.executeCommand(sr.id, {
1673
+ }, be = async () => {
1674
+ await h.executeCommand(dr.id, {
1671
1675
  ruleId: l,
1672
1676
  unitId: o,
1673
1677
  subUnitId: i
@@ -1692,18 +1696,18 @@ function mi() {
1692
1696
  formula1: void 0,
1693
1697
  formula2: void 0
1694
1698
  };
1695
- C(ne), h.executeCommand(Tn.id, {
1699
+ C(ne), h.executeCommand(An.id, {
1696
1700
  unitId: o,
1697
1701
  subUnitId: i,
1698
1702
  ruleId: v.uid,
1699
- setting: Pn(ne)
1703
+ setting: kn(ne)
1700
1704
  });
1701
- }, ce = u.get(f.formulaInput), ee = ht(() => p.map((R) => _r(R.range)).join(","), []), q = An(v), M = (R) => {
1702
- bn(R, An(v)) || (C({
1705
+ }, ce = u.get(f.formulaInput), ee = gt(() => p.map((R) => Cr(R.range)).join(","), []), q = Ln(v), b = (R) => {
1706
+ Dn(R, Ln(v)) || (C({
1703
1707
  ...v,
1704
1708
  ...R
1705
1709
  }), T(
1706
- ao.id,
1710
+ so.id,
1707
1711
  {
1708
1712
  unitId: o,
1709
1713
  subUnitId: i,
@@ -1719,7 +1723,7 @@ function mi() {
1719
1723
  label: m.t("dataValidation.panel.range"),
1720
1724
  error: !v.ranges.length || A ? m.t("dataValidation.panel.rangeError") : "",
1721
1725
  children: /* @__PURE__ */ S(
1722
- ko,
1726
+ No,
1723
1727
  {
1724
1728
  selectorRef: O,
1725
1729
  unitId: o,
@@ -1739,7 +1743,7 @@ function mi() {
1739
1743
  }
1740
1744
  ),
1741
1745
  /* @__PURE__ */ S(Z, { label: m.t("dataValidation.panel.type"), children: /* @__PURE__ */ S(
1742
- Un,
1746
+ $n,
1743
1747
  {
1744
1748
  className: "univer-w-full",
1745
1749
  value: v.type,
@@ -1751,7 +1755,7 @@ function mi() {
1751
1755
  }
1752
1756
  ) }),
1753
1757
  k != null && k.length ? /* @__PURE__ */ S(Z, { label: m.t("dataValidation.panel.operator"), children: /* @__PURE__ */ S(
1754
- Un,
1758
+ $n,
1755
1759
  {
1756
1760
  className: "univer-w-full",
1757
1761
  value: `${v.operator}`,
@@ -1796,7 +1800,7 @@ function mi() {
1796
1800
  e + v.type
1797
1801
  ) : null,
1798
1802
  /* @__PURE__ */ S(Z, { children: /* @__PURE__ */ S(
1799
- Nt,
1803
+ Ut,
1800
1804
  {
1801
1805
  checked: (J = v.allowBlank) != null ? J : !0,
1802
1806
  onChange: () => {
@@ -1809,29 +1813,29 @@ function mi() {
1809
1813
  children: m.t("dataValidation.panel.allowBlank")
1810
1814
  }
1811
1815
  ) }),
1812
- /* @__PURE__ */ S(pi, { value: q, onChange: M, extraComponent: f.optionsInput }),
1816
+ /* @__PURE__ */ S(mi, { value: q, onChange: b, extraComponent: f.optionsInput }),
1813
1817
  /* @__PURE__ */ Y("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
1814
- /* @__PURE__ */ S(qe, { className: "univer-ml-3", onClick: Me, children: m.t("dataValidation.panel.removeRule") }),
1815
- /* @__PURE__ */ S(qe, { className: "univer-ml-3", variant: "primary", onClick: se, children: m.t("dataValidation.panel.done") })
1818
+ /* @__PURE__ */ S(Je, { className: "univer-ml-3", onClick: be, children: m.t("dataValidation.panel.removeRule") }),
1819
+ /* @__PURE__ */ S(Je, { className: "univer-ml-3", variant: "primary", onClick: se, children: m.t("dataValidation.panel.done") })
1816
1820
  ] })
1817
1821
  ] });
1818
1822
  }
1819
- const fi = (e) => {
1820
- const { rule: t, onClick: n, unitId: r, subUnitId: o, disable: i } = e, a = F(Te), l = F(oe), s = F(Oo), d = a.getValidatorItem(t.type), u = vt(void 0), [h, c] = W(!1), m = F(zn), I = Re(m.currentTheme$), D = ht(() => {
1823
+ const Ci = (e) => {
1824
+ const { rule: t, onClick: n, unitId: r, subUnitId: o, disable: i } = e, a = F(Te), l = F(oe), s = F(Ao), d = a.getValidatorItem(t.type), u = ft(void 0), [h, c] = W(!1), m = F(Gn), I = Re(m.currentTheme$), V = gt(() => {
1821
1825
  var g;
1822
- const C = m.getColorFromTheme("primary.600"), f = m.getColorFromTheme("loop-color.2"), w = (g = m.getColorFromTheme(f)) != null ? g : C, b = new Xr(w).toRgb();
1826
+ const C = m.getColorFromTheme("primary.600"), f = m.getColorFromTheme("loop-color.2"), w = (g = m.getColorFromTheme(f)) != null ? g : C, M = new Zr(w).toRgb();
1823
1827
  return {
1824
- fill: `rgba(${b.r}, ${b.g}, ${b.b}, 0.1)`,
1828
+ fill: `rgba(${M.r}, ${M.g}, ${M.b}, 0.1)`,
1825
1829
  stroke: w
1826
1830
  };
1827
1831
  }, [I]), v = (C) => {
1828
- l.executeCommand(sr.id, {
1832
+ l.executeCommand(dr.id, {
1829
1833
  ruleId: t.uid,
1830
1834
  unitId: r,
1831
1835
  subUnitId: o
1832
1836
  }), C.stopPropagation();
1833
1837
  };
1834
- return be(() => () => {
1838
+ return Me(() => () => {
1835
1839
  var C;
1836
1840
  u.current && ((C = u.current) == null || C.forEach((f) => {
1837
1841
  f && s.removeShape(f);
@@ -1854,7 +1858,7 @@ const fi = (e) => {
1854
1858
  onMouseEnter: () => {
1855
1859
  i || (c(!0), u.current = t.ranges.map((C) => s.addShape({
1856
1860
  range: C,
1857
- style: D,
1861
+ style: V,
1858
1862
  primary: null
1859
1863
  })));
1860
1864
  },
@@ -1876,7 +1880,7 @@ const fi = (e) => {
1876
1880
  "div",
1877
1881
  {
1878
1882
  className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
1879
- children: t.ranges.map((C) => _r(C)).join(",")
1883
+ children: t.ranges.map((C) => Cr(C)).join(",")
1880
1884
  }
1881
1885
  ),
1882
1886
  h ? /* @__PURE__ */ S(
@@ -1884,16 +1888,16 @@ const fi = (e) => {
1884
1888
  {
1885
1889
  className: "univer-absolute univer-right-2 univer-top-[19px] univer-flex univer-size-5 univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 dark:!univer-text-gray-300 dark:hover:!univer-bg-gray-700",
1886
1890
  onClick: v,
1887
- children: /* @__PURE__ */ S(Rn, {})
1891
+ children: /* @__PURE__ */ S(bn, {})
1888
1892
  }
1889
1893
  ) : null
1890
1894
  ]
1891
1895
  }
1892
1896
  );
1893
1897
  };
1894
- function _i(e) {
1898
+ function Ii(e) {
1895
1899
  const t = F(ae), n = F(pe), r = F(oe), o = F(Ve), i = F(_e), a = F(ge), [l, s] = W([]), { workbook: d } = e, u = Re(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
1896
- be(() => {
1900
+ Me(() => {
1897
1901
  s(t.getRules(h, c));
1898
1902
  const f = t.ruleChange$.subscribe((w) => {
1899
1903
  w.unitId === h && w.subUnitId === c && s(t.getRules(h, c));
@@ -1903,30 +1907,30 @@ function _i(e) {
1903
1907
  };
1904
1908
  }, [h, c, t]);
1905
1909
  const m = async () => {
1906
- const f = rr(o), w = {
1910
+ const f = ir(o), w = {
1907
1911
  unitId: h,
1908
1912
  subUnitId: c,
1909
1913
  rule: f
1910
1914
  };
1911
- await r.executeCommand(vn.id, w), i.setActiveRule({
1915
+ await r.executeCommand(fn.id, w), i.setActiveRule({
1912
1916
  unitId: h,
1913
1917
  subUnitId: c,
1914
1918
  rule: f
1915
1919
  });
1916
1920
  }, I = () => {
1917
- r.executeCommand(so.id, {
1921
+ r.executeCommand(lo.id, {
1918
1922
  unitId: h,
1919
1923
  subUnitId: c
1920
1924
  });
1921
1925
  }, v = ((f) => {
1922
- const w = n.getCurrentUnitForType(H.UNIVER_SHEET), b = w.getActiveSheet(), g = w.getUnitId(), p = b.getSheetId();
1923
- return f.map((T) => oo(o, g, p, T.ranges) ? { ...T } : { ...T, disable: !0 });
1926
+ const w = n.getCurrentUnitForType(H.UNIVER_SHEET), M = w.getActiveSheet(), g = w.getUnitId(), p = M.getSheetId();
1927
+ return f.map((T) => io(o, g, p, T.ranges) ? { ...T } : { ...T, disable: !0 });
1924
1928
  })(l), C = v == null ? void 0 : v.some((f) => f.disable);
1925
1929
  return /* @__PURE__ */ Y("div", { className: "univer-pb-4", children: [
1926
1930
  v == null ? void 0 : v.map((f) => {
1927
1931
  var w;
1928
1932
  return /* @__PURE__ */ S(
1929
- fi,
1933
+ Ci,
1930
1934
  {
1931
1935
  unitId: h,
1932
1936
  subUnitId: c,
@@ -1944,12 +1948,12 @@ function _i(e) {
1944
1948
  );
1945
1949
  }),
1946
1950
  /* @__PURE__ */ Y("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1947
- l.length && !C ? /* @__PURE__ */ S(qe, { onClick: I, children: a.t("dataValidation.panel.removeAll") }) : null,
1948
- /* @__PURE__ */ S(qe, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1951
+ l.length && !C ? /* @__PURE__ */ S(Je, { onClick: I, children: a.t("dataValidation.panel.removeAll") }) : null,
1952
+ /* @__PURE__ */ S(Je, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1949
1953
  ] })
1950
1954
  ] });
1951
1955
  }
1952
- const Si = () => {
1956
+ const wi = () => {
1953
1957
  const e = F(_e), t = Re(e.activeRule$, e.activeRule), n = F(pe), r = Re(
1954
1958
  () => n.getCurrentTypeOfUnit$(H.UNIVER_SHEET),
1955
1959
  void 0,
@@ -1957,12 +1961,12 @@ const Si = () => {
1957
1961
  []
1958
1962
  ), o = Re(() => {
1959
1963
  var i;
1960
- return (i = r == null ? void 0 : r.activeSheet$) != null ? i : vr(null);
1964
+ return (i = r == null ? void 0 : r.activeSheet$) != null ? i : fr(null);
1961
1965
  }, void 0, void 0, []);
1962
- return !r || !o ? null : t && (t.subUnitId === o.getSheetId() || t.subUnitId === e.getFocusFormulaEditorActiveRuleSubUnitId()) ? /* @__PURE__ */ S(mi, {}, t.rule.uid) : /* @__PURE__ */ S(_i, { workbook: r });
1963
- }, Ci = (e) => {
1966
+ return !r || !o ? null : t && (t.subUnitId === o.getSheetId() || t.subUnitId === e.getFocusFormulaEditorActiveRuleSubUnitId()) ? /* @__PURE__ */ S(Si, {}, t.rule.uid) : /* @__PURE__ */ S(Ii, { workbook: r });
1967
+ }, Ri = (e) => {
1964
1968
  const { isTwoFormula: t = !1, value: n, onChange: r, showError: o, validResult: i } = e, a = F(ge), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
1965
- return t ? /* @__PURE__ */ Y(pt, { children: [
1969
+ return t ? /* @__PURE__ */ Y(vt, { children: [
1966
1970
  /* @__PURE__ */ S(Z, { error: l, children: /* @__PURE__ */ S(
1967
1971
  Ue,
1968
1972
  {
@@ -2004,11 +2008,11 @@ const Si = () => {
2004
2008
  }
2005
2009
  ) });
2006
2010
  };
2007
- function Ii(e) {
2011
+ function yi(e) {
2008
2012
  const { value: t, onChange: n, showError: r, validResult: o } = e, i = F(ge), a = r ? o == null ? void 0 : o.formula1 : "", l = r ? o == null ? void 0 : o.formula2 : "", [s, d] = W(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
2009
- return /* @__PURE__ */ Y(pt, { children: [
2013
+ return /* @__PURE__ */ Y(vt, { children: [
2010
2014
  /* @__PURE__ */ S(Z, { children: /* @__PURE__ */ S(
2011
- Nt,
2015
+ Ut,
2012
2016
  {
2013
2017
  checked: s,
2014
2018
  onChange: (u) => {
@@ -2051,17 +2055,17 @@ function Ii(e) {
2051
2055
  ) }) : null
2052
2056
  ] });
2053
2057
  }
2054
- function wi(e) {
2058
+ function bi(e) {
2055
2059
  var h;
2056
- const { unitId: t, subUnitId: n, value: r, onChange: o, showError: i, validResult: a } = e, l = i ? a == null ? void 0 : a.formula1 : void 0, s = vt(null), [d, u] = W(!1);
2057
- return hr((c) => {
2060
+ const { unitId: t, subUnitId: n, value: r, onChange: o, showError: i, validResult: a } = e, l = i ? a == null ? void 0 : a.formula1 : void 0, s = ft(null), [d, u] = W(!1);
2061
+ return gr((c) => {
2058
2062
  var I;
2059
2063
  (I = s.current) != null && I.isClickOutSide(c) && u(!1);
2060
2064
  }), /* @__PURE__ */ S(Z, { error: l, children: /* @__PURE__ */ S(
2061
- Sr,
2065
+ Ir,
2062
2066
  {
2063
2067
  ref: s,
2064
- className: Fe("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", bt),
2068
+ className: Fe("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Et),
2065
2069
  initValue: (h = r == null ? void 0 : r.formula1) != null ? h : "=",
2066
2070
  unitId: t,
2067
2071
  subUnitId: n,
@@ -2078,7 +2082,7 @@ function wi(e) {
2078
2082
  }
2079
2083
  ) });
2080
2084
  }
2081
- const Ri = [
2085
+ const Mi = [
2082
2086
  "#FFFFFF",
2083
2087
  "#FEE7E7",
2084
2088
  "#FEF0E6",
@@ -2103,10 +2107,10 @@ const Ri = [
2103
2107
  "#3A60F7",
2104
2108
  "#9E6DE3",
2105
2109
  "#F248A6"
2106
- ], yi = (e) => {
2110
+ ], Ei = (e) => {
2107
2111
  const { value: t, onChange: n, disabled: r } = e, [o, i] = W(!1);
2108
2112
  return /* @__PURE__ */ S(
2109
- Po,
2113
+ Lo,
2110
2114
  {
2111
2115
  align: "start",
2112
2116
  disabled: r,
@@ -2116,11 +2120,11 @@ const Ri = [
2116
2120
  "div",
2117
2121
  {
2118
2122
  className: "univer-box-border univer-grid univer-w-fit univer-grid-cols-6 univer-flex-wrap univer-gap-2 univer-p-1.5",
2119
- children: Ri.map(
2123
+ children: Mi.map(
2120
2124
  (a) => /* @__PURE__ */ S(
2121
2125
  "div",
2122
2126
  {
2123
- className: Fe("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", bt),
2127
+ className: Fe("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", Et),
2124
2128
  style: { background: a },
2125
2129
  onClick: () => {
2126
2130
  n(a), i(!1);
@@ -2134,7 +2138,7 @@ const Ri = [
2134
2138
  children: /* @__PURE__ */ Y(
2135
2139
  "div",
2136
2140
  {
2137
- className: Fe("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", bt),
2141
+ className: Fe("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", Et),
2138
2142
  children: [
2139
2143
  /* @__PURE__ */ S(
2140
2144
  "div",
@@ -2143,18 +2147,18 @@ const Ri = [
2143
2147
  style: { background: t }
2144
2148
  }
2145
2149
  ),
2146
- /* @__PURE__ */ S(yn, {})
2150
+ /* @__PURE__ */ S(Mn, {})
2147
2151
  ]
2148
2152
  }
2149
2153
  )
2150
2154
  }
2151
2155
  );
2152
- }, Bn = (e) => {
2156
+ }, Hn = (e) => {
2153
2157
  const { item: t, commonProps: n, className: r } = e, { onItemChange: o, onItemDelete: i } = n;
2154
2158
  return /* @__PURE__ */ Y("div", { className: Fe("univer-flex univer-items-center univer-gap-2", r), children: [
2155
- !t.isRef && /* @__PURE__ */ S("div", { className: Fe("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(Vr, {}) }),
2159
+ !t.isRef && /* @__PURE__ */ S("div", { className: Fe("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(Or, {}) }),
2156
2160
  /* @__PURE__ */ S(
2157
- yi,
2161
+ Ei,
2158
2162
  {
2159
2163
  value: t.color,
2160
2164
  onChange: (a) => {
@@ -2176,50 +2180,50 @@ const Ri = [
2176
2180
  "div",
2177
2181
  {
2178
2182
  className: "univer-ml-1 univer-cursor-pointer univer-rounded univer-text-base hover:univer-bg-gray-200",
2179
- children: /* @__PURE__ */ S(Rn, { onClick: () => i(t.id) })
2183
+ children: /* @__PURE__ */ S(bn, { onClick: () => i(t.id) })
2180
2184
  }
2181
2185
  )
2182
2186
  ] });
2183
2187
  };
2184
- function Mi(e) {
2188
+ function Di(e) {
2185
2189
  const { value: t, onChange: n = () => {
2186
- }, unitId: r, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => Pe(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [I, D] = W(u === "1" ? s : "="), v = F(ge), C = F(Te), f = F(fn), w = F(lo), b = F(_e), [g, p] = W(() => d.split(",")), _ = C.getValidatorItem(X.LIST), [T, A] = W([]), [P, L] = W(""), y = a ? i == null ? void 0 : i.formula1 : "", O = ht(() => f.ruleChange$.pipe(pr(16)), []), U = Re(O), k = an(n);
2187
- be(() => {
2190
+ }, unitId: r, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => Pe(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [I, V] = W(u === "1" ? s : "="), v = F(ge), C = F(Te), f = F(Sn), w = F(co), M = F(_e), [g, p] = W(() => d.split(",")), _ = C.getValidatorItem(X.LIST), [T, A] = W([]), [P, L] = W(""), y = a ? i == null ? void 0 : i.formula1 : "", O = gt(() => f.ruleChange$.pipe(vr(16)), []), U = Re(O), k = ln(n);
2191
+ Me(() => {
2188
2192
  (async () => {
2189
2193
  await new Promise((N) => {
2190
2194
  setTimeout(() => N(!0), 100);
2191
2195
  });
2192
- const M = f.getRuleById(r, o, l), $ = M == null ? void 0 : M.formula1;
2193
- if (Pe($) && _ && M) {
2194
- const N = await _.getListAsync(M, r, o);
2196
+ const b = f.getRuleById(r, o, l), $ = b == null ? void 0 : b.formula1;
2197
+ if (Pe($) && _ && b) {
2198
+ const N = await _.getListAsync(b, r, o);
2195
2199
  A(N);
2196
2200
  }
2197
2201
  })();
2198
- }, [f, U, _, l, o, r]), be(() => {
2199
- Pe(s) && s !== I && (m(s), D(I));
2202
+ }, [f, U, _, l, o, r]), Me(() => {
2203
+ Pe(s) && s !== I && (m(s), V(I));
2200
2204
  }, [I, s]);
2201
2205
  const [x, te] = W(() => {
2202
- const M = u !== "1" ? co(s) : [], $ = d.split(",");
2203
- return M.map((N, J) => ({
2206
+ const b = u !== "1" ? uo(s) : [], $ = d.split(",");
2207
+ return b.map((N, J) => ({
2204
2208
  label: N,
2205
2209
  color: $[J] || ke,
2206
2210
  isRef: !1,
2207
- id: En(4)
2211
+ id: Vn(4)
2208
2212
  }));
2209
- }), j = (M, $, N) => {
2210
- const J = x.find((R) => R.id === M);
2213
+ }), j = (b, $, N) => {
2214
+ const J = x.find((R) => R.id === b);
2211
2215
  J && (J.label = $, J.color = N, te([...x]));
2212
- }, se = (M) => {
2213
- const $ = x.findIndex((N) => N.id === M);
2216
+ }, se = (b) => {
2217
+ const $ = x.findIndex((N) => N.id === b);
2214
2218
  $ !== -1 && (x.splice($, 1), te([...x]));
2215
- }, le = d.split(","), de = ht(() => T.map((M, $) => ({
2216
- label: M,
2219
+ }, le = d.split(","), de = gt(() => T.map((b, $) => ({
2220
+ label: b,
2217
2221
  color: le[$] || ke,
2218
2222
  id: `${$}`,
2219
2223
  isRef: !0
2220
- })), [le, T]), Me = (M, $, N) => {
2224
+ })), [le, T]), be = (b, $, N) => {
2221
2225
  const J = [...g];
2222
- J[+M] = N, p(J), k({
2226
+ J[+b] = N, p(J), k({
2223
2227
  formula1: s,
2224
2228
  formula2: J.join(",")
2225
2229
  });
@@ -2230,57 +2234,57 @@ function Mi(e) {
2230
2234
  label: "",
2231
2235
  color: ke,
2232
2236
  isRef: !1,
2233
- id: En(4)
2237
+ id: Vn(4)
2234
2238
  }
2235
2239
  ]);
2236
2240
  };
2237
- be(() => {
2241
+ Me(() => {
2238
2242
  if (u === "1")
2239
2243
  return;
2240
- const M = /* @__PURE__ */ new Set(), $ = [];
2244
+ const b = /* @__PURE__ */ new Set(), $ = [];
2241
2245
  x.map((N) => ({
2242
2246
  labelList: N.label.split(","),
2243
2247
  item: N
2244
2248
  })).forEach(({ item: N, labelList: J }) => {
2245
2249
  J.forEach((R) => {
2246
- M.has(R) || (M.add(R), $.push({
2250
+ b.has(R) || (b.add(R), $.push({
2247
2251
  label: R,
2248
2252
  color: N.color
2249
2253
  }));
2250
2254
  });
2251
2255
  }), k({
2252
- formula1: nr($.map((N) => N.label)),
2256
+ formula1: or($.map((N) => N.label)),
2253
2257
  formula2: $.map((N) => N.color === ke ? "" : N.color).join(",")
2254
2258
  });
2255
2259
  }, [x, k, u, I, g]);
2256
- const G = an(async (M) => {
2257
- if (!Pe(M)) {
2260
+ const G = ln(async (b) => {
2261
+ if (!Pe(b)) {
2258
2262
  k == null || k({
2259
2263
  formula1: "",
2260
2264
  formula2: d
2261
2265
  });
2262
2266
  return;
2263
2267
  }
2264
- w.getFormulaRefCheck(M) ? (k == null || k({
2265
- formula1: Pe(M) ? M : "",
2268
+ w.getFormulaRefCheck(b) ? (k == null || k({
2269
+ formula1: Pe(b) ? b : "",
2266
2270
  formula2: d
2267
2271
  }), L("")) : (k == null || k({
2268
2272
  formula1: "",
2269
2273
  formula2: d
2270
2274
  }), m("="), L(v.t("dataValidation.validFail.formulaError")));
2271
- }), ce = vt(null), [ee, q] = W(!1);
2272
- return hr((M) => {
2275
+ }), ce = ft(null), [ee, q] = W(!1);
2276
+ return gr((b) => {
2273
2277
  var N;
2274
- (N = ce.current) != null && N.isClickOutSide(M) && q(!1);
2275
- }), be(() => {
2276
- ee ? b.setFocusFormulaEditorActiveRuleSubUnitId(o) : b.setFocusFormulaEditorActiveRuleSubUnitId(null);
2277
- }, [ee, o, b]), /* @__PURE__ */ Y(pt, { children: [
2278
+ (N = ce.current) != null && N.isClickOutSide(b) && q(!1);
2279
+ }), Me(() => {
2280
+ ee ? M.setFocusFormulaEditorActiveRuleSubUnitId(o) : M.setFocusFormulaEditorActiveRuleSubUnitId(null);
2281
+ }, [ee, o, M]), /* @__PURE__ */ Y(vt, { children: [
2278
2282
  /* @__PURE__ */ S(Z, { label: v.t("dataValidation.list.options"), children: /* @__PURE__ */ Y(
2279
- In,
2283
+ Rn,
2280
2284
  {
2281
2285
  value: u,
2282
- onChange: (M) => {
2283
- h(M), m(I), M === "1" && k({
2286
+ onChange: (b) => {
2287
+ h(b), m(I), b === "1" && k({
2284
2288
  formula1: I === "=" ? "" : I,
2285
2289
  formula2: g.join(",")
2286
2290
  });
@@ -2293,50 +2297,50 @@ function Mi(e) {
2293
2297
  ) }),
2294
2298
  u === "1" ? /* @__PURE__ */ Y(Z, { error: y || P || void 0, children: [
2295
2299
  /* @__PURE__ */ S(
2296
- Sr,
2300
+ Ir,
2297
2301
  {
2298
2302
  ref: ce,
2299
- className: Fe("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", bt),
2303
+ className: Fe("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Et),
2300
2304
  initValue: c,
2301
2305
  unitId: r,
2302
2306
  subUnitId: o,
2303
2307
  isFocus: ee,
2304
2308
  isSupportAcrossSheet: !0,
2305
2309
  onFocus: () => q(!0),
2306
- onChange: (M = "") => {
2307
- const $ = (M != null ? M : "").trim();
2308
- D($), G($);
2310
+ onChange: (b = "") => {
2311
+ const $ = (b != null ? b : "").trim();
2312
+ V($), G($);
2309
2313
  }
2310
2314
  }
2311
2315
  ),
2312
- de.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: de.map((M) => /* @__PURE__ */ S(
2313
- Bn,
2316
+ de.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: de.map((b) => /* @__PURE__ */ S(
2317
+ Hn,
2314
2318
  {
2315
2319
  className: "univer-mb-3",
2316
- item: M,
2317
- commonProps: { onItemChange: Me }
2320
+ item: b,
2321
+ commonProps: { onItemChange: be }
2318
2322
  },
2319
- M.id
2323
+ b.id
2320
2324
  )) })
2321
2325
  ] }) : /* @__PURE__ */ S(Z, { error: y, children: /* @__PURE__ */ Y("div", { className: "-univer-mt-3", children: [
2322
2326
  /* @__PURE__ */ S(
2323
- Ao,
2327
+ Po,
2324
2328
  {
2325
2329
  list: x,
2326
2330
  onListChange: te,
2327
2331
  rowHeight: 28,
2328
2332
  margin: [0, 12],
2329
2333
  draggableHandle: ".draggableHandle",
2330
- itemRender: (M) => /* @__PURE__ */ S(
2331
- Bn,
2334
+ itemRender: (b) => /* @__PURE__ */ S(
2335
+ Hn,
2332
2336
  {
2333
- item: M,
2337
+ item: b,
2334
2338
  commonProps: {
2335
2339
  onItemChange: j,
2336
2340
  onItemDelete: se
2337
2341
  }
2338
2342
  },
2339
- M.id
2343
+ b.id
2340
2344
  ),
2341
2345
  idKey: "id"
2342
2346
  }
@@ -2347,7 +2351,7 @@ function Mi(e) {
2347
2351
  className: "univer-text-primary univer-flex univer-w-fit univer-cursor-pointer univer-flex-row univer-items-center univer-rounded univer-p-1 univer-px-2 univer-text-sm hover:univer-bg-primary-50 dark:hover:!univer-bg-gray-800",
2348
2352
  onClick: Q,
2349
2353
  children: [
2350
- /* @__PURE__ */ S(Er, { className: "univer-mr-1" }),
2354
+ /* @__PURE__ */ S(Vr, { className: "univer-mr-1" }),
2351
2355
  v.t("dataValidation.list.add")
2352
2356
  ]
2353
2357
  }
@@ -2355,40 +2359,40 @@ function Mi(e) {
2355
2359
  ] }) })
2356
2360
  ] });
2357
2361
  }
2358
- const bi = [
2362
+ const Vi = [
2359
2363
  [
2360
- lr,
2361
- wi
2364
+ cr,
2365
+ bi
2362
2366
  ],
2363
2367
  [
2364
- kt,
2365
- Ci
2368
+ Nt,
2369
+ Ri
2366
2370
  ],
2367
2371
  [
2368
- mn,
2369
- Mi
2372
+ _n,
2373
+ Di
2370
2374
  ],
2371
2375
  [
2372
- dr,
2373
- Ii
2376
+ ur,
2377
+ yi
2374
2378
  ]
2375
- ], Ei = "LIST_RENDER_MODE_OPTION_INPUT";
2376
- function Ot(e) {
2379
+ ], Ti = "LIST_RENDER_MODE_OPTION_INPUT";
2380
+ function Pt(e) {
2377
2381
  var o;
2378
2382
  const { value: t, onChange: n } = e, r = F(ge);
2379
- return /* @__PURE__ */ S(Z, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ Y(In, { value: `${(o = t.renderMode) != null ? o : ue.CUSTOM}`, onChange: (i) => n({ ...t, renderMode: +i }), children: [
2383
+ return /* @__PURE__ */ S(Z, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ Y(Rn, { value: `${(o = t.renderMode) != null ? o : ue.CUSTOM}`, onChange: (i) => n({ ...t, renderMode: +i }), children: [
2380
2384
  /* @__PURE__ */ S(Ne, { value: `${ue.CUSTOM}`, children: r.t("dataValidation.renderMode.chip") }),
2381
2385
  /* @__PURE__ */ S(Ne, { value: `${ue.ARROW}`, children: r.t("dataValidation.renderMode.arrow") }),
2382
2386
  /* @__PURE__ */ S(Ne, { value: `${ue.TEXT}`, children: r.t("dataValidation.renderMode.text") })
2383
2387
  ] }) });
2384
2388
  }
2385
- Ot.componentKey = Ei;
2386
- const Di = "DATE_SHOW_TIME_OPTION";
2387
- function At(e) {
2389
+ Pt.componentKey = Ti;
2390
+ const Oi = "DATE_SHOW_TIME_OPTION";
2391
+ function Lt(e) {
2388
2392
  var o;
2389
2393
  const { value: t, onChange: n } = e, r = F(ge);
2390
2394
  return /* @__PURE__ */ S(Z, { children: /* @__PURE__ */ S(
2391
- Nt,
2395
+ Ut,
2392
2396
  {
2393
2397
  checked: (o = t.bizInfo) == null ? void 0 : o.showTime,
2394
2398
  onChange: (i) => {
@@ -2404,20 +2408,20 @@ function At(e) {
2404
2408
  }
2405
2409
  ) });
2406
2410
  }
2407
- At.componentKey = Di;
2408
- var Vi = Object.getOwnPropertyDescriptor, Ti = (e, t, n, r) => {
2409
- for (var o = r > 1 ? void 0 : r ? Vi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2411
+ Lt.componentKey = Oi;
2412
+ var Ai = Object.getOwnPropertyDescriptor, Pi = (e, t, n, r) => {
2413
+ for (var o = r > 1 ? void 0 : r ? Ai(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2410
2414
  (a = e[i]) && (o = a(o) || o);
2411
2415
  return o;
2412
2416
  }, Ye = (e, t) => (n, r) => t(n, r, e);
2413
- const Ct = 6;
2414
- let ln = class {
2417
+ const wt = 6;
2418
+ let cn = class {
2415
2419
  constructor(e, t, n, r, o, i) {
2416
2420
  this._commandService = e, this._univerInstanceService = t, this._formulaService = n, this._themeService = r, this._renderManagerService = o, this._dataValidationModel = i;
2417
2421
  }
2418
2422
  _calc(e, t) {
2419
2423
  var d, u, h;
2420
- const { vt: n, ht: r } = t || {}, o = e.endX - e.startX - Ct * 2, i = e.endY - e.startY, a = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
2424
+ const { vt: n, ht: r } = t || {}, o = e.endX - e.startX - wt * 2, i = e.endY - e.startY, a = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
2421
2425
  let l = 0, s = 0;
2422
2426
  switch (n) {
2423
2427
  case he.TOP:
@@ -2432,13 +2436,13 @@ let ln = class {
2432
2436
  }
2433
2437
  switch (r) {
2434
2438
  case Ee.LEFT:
2435
- l = Ct;
2439
+ l = wt;
2436
2440
  break;
2437
2441
  case Ee.RIGHT:
2438
- l = Ct + (o - a);
2442
+ l = wt + (o - a);
2439
2443
  break;
2440
2444
  default:
2441
- l = Ct + (o - a) / 2;
2445
+ l = wt + (o - a) / 2;
2442
2446
  break;
2443
2447
  }
2444
2448
  return {
@@ -2459,10 +2463,10 @@ let ln = class {
2459
2463
  return ((n = t == null ? void 0 : t.fs) != null ? n : 10) * 1.6;
2460
2464
  }
2461
2465
  async _parseFormula(e, t, n) {
2462
- var d, u, h, c, m, I, D, v, C;
2463
- const { formula1: r = po, formula2: o = ho } = e, i = await this._formulaService.getRuleFormulaResult(t, n, e.uid), a = Bt((h = (u = (d = i == null ? void 0 : i[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Bt((I = (m = (c = i == null ? void 0 : i[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : I[0]), s = On(String(a)) && On(String(l));
2466
+ var d, u, h, c, m, I, V, v, C;
2467
+ const { formula1: r = go, formula2: o = po } = e, i = await this._formulaService.getRuleFormulaResult(t, n, e.uid), a = Ht((h = (u = (d = i == null ? void 0 : i[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Ht((I = (m = (c = i == null ? void 0 : i[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : I[0]), s = Pn(String(a)) && Pn(String(l));
2464
2468
  return {
2465
- formula1: Pe(r) ? Bt((C = (v = (D = i == null ? void 0 : i[0]) == null ? void 0 : D.result) == null ? void 0 : v[0]) == null ? void 0 : C[0]) : r,
2469
+ formula1: Pe(r) ? Ht((C = (v = (V = i == null ? void 0 : i[0]) == null ? void 0 : V.result) == null ? void 0 : v[0]) == null ? void 0 : C[0]) : r,
2466
2470
  formula2: Pe(o) ? l : o,
2467
2471
  isFormulaValid: s
2468
2472
  };
@@ -2475,7 +2479,7 @@ let ln = class {
2475
2479
  const c = this._dataValidationModel.getValidator(h.type);
2476
2480
  if (!c || !((L = c.skipDefaultFontRender) != null && L.call(c, h, u, { unitId: o, subUnitId: i, row: l, column: s })))
2477
2481
  return;
2478
- const m = c.parseFormulaSync(h, o, i), { formula1: I } = m, D = this._calc(d, n), { a: v, d: C } = e.getTransform(), f = Dn(D.left, v), w = Dn(D.top, C), b = zr.create().composeMatrix({
2482
+ const m = c.parseFormulaSync(h, o, i), { formula1: I } = m, V = this._calc(d, n), { a: v, d: C } = e.getTransform(), f = Tn(V.left, v), w = Tn(V.top, C), M = Kr.create().composeMatrix({
2479
2483
  left: f,
2480
2484
  top: w,
2481
2485
  scaleX: 1,
@@ -2487,10 +2491,10 @@ let ln = class {
2487
2491
  flipY: !1
2488
2492
  }), g = d.endX - d.startX, p = d.endY - d.startY;
2489
2493
  e.save(), e.beginPath(), e.rect(d.startX, d.startY, g, p), e.clip();
2490
- const _ = b.getMatrix();
2494
+ const _ = M.getMatrix();
2491
2495
  e.transform(_[0], _[1], _[2], _[3], _[4], _[5]);
2492
2496
  const T = ((y = n == null ? void 0 : n.fs) != null ? y : 10) * 1.6, A = String(u) === String(I), P = this._themeService.getColorFromTheme("primary.600");
2493
- Kr.drawWith(e, {
2497
+ Gr.drawWith(e, {
2494
2498
  checked: A,
2495
2499
  width: T,
2496
2500
  height: T,
@@ -2519,145 +2523,145 @@ let ln = class {
2519
2523
  endRow: n.actualRow
2520
2524
  },
2521
2525
  value: {
2522
- v: String(s) === go(String(h)) ? c : h,
2526
+ v: String(s) === vo(String(h)) ? c : h,
2523
2527
  p: null
2524
2528
  }
2525
2529
  };
2526
2530
  this._commandService.executeCommand(
2527
- dt.id,
2531
+ ut.id,
2528
2532
  m
2529
2533
  );
2530
2534
  }
2531
2535
  onPointerEnter(e, t) {
2532
2536
  var n, r;
2533
- (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.POINTER);
2537
+ (r = (n = Ge(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(qe.POINTER);
2534
2538
  }
2535
2539
  onPointerLeave(e, t) {
2536
2540
  var n, r;
2537
- (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.DEFAULT);
2541
+ (r = (n = Ge(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(qe.DEFAULT);
2538
2542
  }
2539
2543
  };
2540
- ln = Ti([
2544
+ cn = Pi([
2541
2545
  Ye(0, oe),
2542
2546
  Ye(1, pe),
2543
- Ye(2, E(uo)),
2544
- Ye(3, E(zn)),
2545
- Ye(4, E(xe)),
2546
- Ye(5, E(ae))
2547
- ], ln);
2548
- var Oi = Object.getOwnPropertyDescriptor, Ai = (e, t, n, r) => {
2549
- for (var o = r > 1 ? void 0 : r ? Oi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2547
+ Ye(2, D(ho)),
2548
+ Ye(3, D(Gn)),
2549
+ Ye(4, D(xe)),
2550
+ Ye(5, D(ae))
2551
+ ], cn);
2552
+ var Li = Object.getOwnPropertyDescriptor, ki = (e, t, n, r) => {
2553
+ for (var o = r > 1 ? void 0 : r ? Li(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2550
2554
  (a = e[i]) && (o = a(o) || o);
2551
2555
  return o;
2552
- }, Pi = (e, t) => (n, r) => t(n, r, e);
2556
+ }, Ni = (e, t) => (n, r) => t(n, r, e);
2553
2557
  let Ce = class {
2554
2558
  constructor(e) {
2555
- V(this, "canvasRender", null);
2556
- V(this, "dropdownType");
2557
- V(this, "optionsInput");
2558
- V(this, "formulaInput", mn);
2559
+ E(this, "canvasRender", null);
2560
+ E(this, "dropdownType");
2561
+ E(this, "optionsInput");
2562
+ E(this, "formulaInput", _n);
2559
2563
  this.injector = e;
2560
2564
  }
2561
2565
  };
2562
- Ce = Ai([
2563
- Pi(0, E(Ve))
2566
+ Ce = ki([
2567
+ Ni(0, D(Ve))
2564
2568
  ], Ce);
2565
- class Li extends Ce {
2569
+ class Ui extends Ce {
2566
2570
  constructor() {
2567
2571
  super(...arguments);
2568
- V(this, "id", X.CHECKBOX);
2569
- V(this, "canvasRender", this.injector.createInstance(ln));
2570
- V(this, "formulaInput", dr);
2572
+ E(this, "id", X.CHECKBOX);
2573
+ E(this, "canvasRender", this.injector.createInstance(cn));
2574
+ E(this, "formulaInput", ur);
2571
2575
  }
2572
2576
  }
2573
- class ki extends Ce {
2577
+ class Fi extends Ce {
2574
2578
  constructor() {
2575
2579
  super(...arguments);
2576
- V(this, "id", X.CUSTOM);
2577
- V(this, "formulaInput", lr);
2580
+ E(this, "id", X.CUSTOM);
2581
+ E(this, "formulaInput", cr);
2578
2582
  }
2579
2583
  }
2580
- const Ni = "data-validation.formula-input";
2581
- class Ui extends Ce {
2584
+ const $i = "data-validation.formula-input";
2585
+ class xi extends Ce {
2582
2586
  constructor() {
2583
2587
  super(...arguments);
2584
- V(this, "id", X.DATE);
2585
- V(this, "formulaInput", Ni);
2586
- V(this, "optionsInput", At.componentKey);
2587
- V(this, "dropdownType", fe.DATE);
2588
+ E(this, "id", X.DATE);
2589
+ E(this, "formulaInput", $i);
2590
+ E(this, "optionsInput", Lt.componentKey);
2591
+ E(this, "dropdownType", fe.DATE);
2588
2592
  }
2589
2593
  }
2590
- class Fi extends Ce {
2594
+ class Bi extends Ce {
2591
2595
  constructor() {
2592
2596
  super(...arguments);
2593
- V(this, "id", X.DECIMAL);
2594
- V(this, "formulaInput", kt);
2597
+ E(this, "id", X.DECIMAL);
2598
+ E(this, "formulaInput", Nt);
2595
2599
  }
2596
2600
  }
2597
- const Tr = 4, $i = 0, Xt = 4, Or = 4, dn = 6, Pt = 6, Ae = 14;
2598
- function xi(e, t) {
2599
- const n = Gr.getTextSize(e, t), r = n.width + Tr * 2, { ba: o, bd: i } = n, a = o + i;
2601
+ const Ar = 4, Wi = 0, zt = 4, Pr = 4, un = 6, kt = 6, Ae = 14;
2602
+ function Hi(e, t) {
2603
+ const n = qr.getTextSize(e, t), r = n.width + Ar * 2, { ba: o, bd: i } = n, a = o + i;
2600
2604
  return {
2601
2605
  width: r,
2602
- height: a + $i * 2,
2606
+ height: a + Wi * 2,
2603
2607
  ba: o
2604
2608
  };
2605
2609
  }
2606
- function Zt(e, t, n, r) {
2607
- const o = Ae + dn * 2, i = n - o, a = r - Pt * 2, l = e.map((c) => ({
2608
- layout: xi(c, t),
2610
+ function Kt(e, t, n, r) {
2611
+ const o = Ae + un * 2, i = n - o, a = r - kt * 2, l = e.map((c) => ({
2612
+ layout: Hi(c, t),
2609
2613
  text: c
2610
2614
  }));
2611
2615
  let s;
2612
2616
  const d = [];
2613
2617
  l.forEach((c) => {
2614
- const { layout: m } = c, { width: I, height: D } = m;
2615
- !s || s.width + I + Xt > i ? (s = {
2618
+ const { layout: m } = c, { width: I, height: V } = m;
2619
+ !s || s.width + I + zt > i ? (s = {
2616
2620
  width: I,
2617
- height: D,
2621
+ height: V,
2618
2622
  items: [{
2619
2623
  ...c,
2620
2624
  left: 0
2621
2625
  }]
2622
2626
  }, d.push(s)) : (s.items.push({
2623
2627
  ...c,
2624
- left: s.width + Xt
2625
- }), s.width = s.width + I + Xt);
2628
+ left: s.width + zt
2629
+ }), s.width = s.width + I + zt);
2626
2630
  });
2627
2631
  let u = 0, h = 0;
2628
2632
  return d.forEach((c, m) => {
2629
- h = Math.max(h, c.width), m === d.length - 1 ? u += c.height : u += c.height + Or;
2633
+ h = Math.max(h, c.width), m === d.length - 1 ? u += c.height : u += c.height + Pr;
2630
2634
  }), {
2631
2635
  lines: d,
2632
2636
  totalHeight: u,
2633
2637
  contentWidth: i,
2634
2638
  contentHeight: a,
2635
- cellAutoHeight: u + Pt * 2,
2639
+ cellAutoHeight: u + kt * 2,
2636
2640
  calcAutoWidth: h + o
2637
2641
  };
2638
2642
  }
2639
- const Bi = 8;
2640
- class Wi extends qr {
2643
+ const ji = 8;
2644
+ class Yi extends Jr {
2641
2645
  static drawWith(t, n) {
2642
2646
  const { fontString: r, info: o, fill: i, color: a } = n, { layout: l, text: s } = o;
2643
- t.save(), qn.drawWith(t, {
2647
+ t.save(), Qn.drawWith(t, {
2644
2648
  width: l.width,
2645
2649
  height: l.height,
2646
- radius: Bi,
2650
+ radius: ji,
2647
2651
  fill: i || ke
2648
- }), t.translateWithPrecision(Tr, l.ba), t.font = r, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
2652
+ }), t.translateWithPrecision(Ar, l.ba), t.font = r, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
2649
2653
  }
2650
2654
  }
2651
- var Hi = Object.getOwnPropertyDescriptor, ji = (e, t, n, r) => {
2652
- for (var o = r > 1 ? void 0 : r ? Hi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2655
+ var Xi = Object.getOwnPropertyDescriptor, Zi = (e, t, n, r) => {
2656
+ for (var o = r > 1 ? void 0 : r ? Xi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2653
2657
  (a = e[i]) && (o = a(o) || o);
2654
2658
  return o;
2655
- }, It = (e, t) => (n, r) => t(n, r, e);
2656
- const Yi = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2657
- let cn = class {
2659
+ }, Rt = (e, t) => (n, r) => t(n, r, e);
2660
+ const zi = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2661
+ let hn = class {
2658
2662
  constructor(e, t, n, r) {
2659
- V(this, "zIndex");
2660
- V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2663
+ E(this, "zIndex");
2664
+ E(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2661
2665
  this._commandService = e, this._univerInstanceService = t, this._renderManagerService = n, this._dataValidationModel = r;
2662
2666
  }
2663
2667
  _ensureMap(e) {
@@ -2678,24 +2682,24 @@ let cn = class {
2678
2682
  a = r - Ae + 4;
2679
2683
  break;
2680
2684
  }
2681
- e.save(), e.translateWithPrecision(t.startX + i, t.startY + a), e.fillStyle = "#565656", e.fill(Yi), e.restore();
2685
+ e.save(), e.translateWithPrecision(t.startX + i, t.startY + a), e.fillStyle = "#565656", e.fill(zi), e.restore();
2682
2686
  }
2683
2687
  // eslint-disable-next-line max-lines-per-function
2684
2688
  drawWith(e, t, n, r) {
2685
2689
  var le, de;
2686
- const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: I = 0, downOffset: D = 0 } = h || {}, v = this._ensureMap(d), C = this._generateKey(i, a), f = o.isMergedMainCell ? o.mergeInfo.startRow : i, w = o.isMergedMainCell ? o.mergeInfo.startColumn : a, b = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, f, w);
2687
- if (!b)
2690
+ const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: I = 0, downOffset: V = 0 } = h || {}, v = this._ensureMap(d), C = this._generateKey(i, a), f = o.isMergedMainCell ? o.mergeInfo.startRow : i, w = o.isMergedMainCell ? o.mergeInfo.startColumn : a, M = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, f, w);
2691
+ if (!M)
2688
2692
  return;
2689
- const g = this._dataValidationModel.getValidator(b.type);
2693
+ const g = this._dataValidationModel.getValidator(M.type);
2690
2694
  if (!g)
2691
2695
  return;
2692
2696
  const p = {
2693
2697
  startX: u.startX + c,
2694
2698
  endX: u.endX - m,
2695
2699
  startY: u.startY + I,
2696
- endY: u.endY - D
2697
- }, _ = p.endX - p.startX, T = p.endY - p.startY, { cl: A } = l || {}, P = (le = typeof A == "object" ? A == null ? void 0 : A.rgb : A) != null ? le : "#000", L = Le(l != null ? l : void 0), { vt: y, ht: O } = l || {}, U = y != null ? y : he.MIDDLE, k = (de = ie(s)) != null ? de : "", x = g.parseCellValue(k), te = g.getListWithColorMap(b), j = Zt(x, L, _, T);
2698
- this._drawDownIcon(e, p, _, T, U), e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, _ - Ae, T), e.clip(), e.translateWithPrecision(dn, Pt);
2700
+ endY: u.endY - V
2701
+ }, _ = p.endX - p.startX, T = p.endY - p.startY, { cl: A } = l || {}, P = (le = typeof A == "object" ? A == null ? void 0 : A.rgb : A) != null ? le : "#000", L = Le(l != null ? l : void 0), { vt: y, ht: O } = l || {}, U = y != null ? y : he.MIDDLE, k = (de = ie(s)) != null ? de : "", x = g.parseCellValue(k), te = g.getListWithColorMap(M), j = Kt(x, L, _, T);
2702
+ this._drawDownIcon(e, p, _, T, U), e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, _ - Ae, T), e.clip(), e.translateWithPrecision(un, kt);
2699
2703
  let se = 0;
2700
2704
  switch (U) {
2701
2705
  case he.MIDDLE:
@@ -2705,9 +2709,9 @@ let cn = class {
2705
2709
  se = j.contentHeight - j.totalHeight;
2706
2710
  break;
2707
2711
  }
2708
- e.translateWithPrecision(0, se), j.lines.forEach((Me, Q) => {
2712
+ e.translateWithPrecision(0, se), j.lines.forEach((be, Q) => {
2709
2713
  e.save();
2710
- const { width: G, height: ce, items: ee } = Me;
2714
+ const { width: G, height: ce, items: ee } = be;
2711
2715
  let q = 0;
2712
2716
  switch (O) {
2713
2717
  case Ee.RIGHT:
@@ -2717,19 +2721,19 @@ let cn = class {
2717
2721
  q = (j.contentWidth - G) / 2;
2718
2722
  break;
2719
2723
  }
2720
- e.translate(q, Q * (ce + Or)), ee.forEach((M) => {
2721
- e.save(), e.translateWithPrecision(M.left, 0), Wi.drawWith(e, {
2724
+ e.translate(q, Q * (ce + Pr)), ee.forEach((b) => {
2725
+ e.save(), e.translateWithPrecision(b.left, 0), Yi.drawWith(e, {
2722
2726
  ...L,
2723
- info: M,
2727
+ info: b,
2724
2728
  color: P,
2725
- fill: te[M.text]
2729
+ fill: te[b.text]
2726
2730
  }), e.restore();
2727
2731
  }), e.restore();
2728
2732
  }), e.restore(), v.set(C, {
2729
2733
  left: p.startX,
2730
2734
  top: p.startY,
2731
- width: j.contentWidth + dn + Ae,
2732
- height: j.contentHeight + Pt * 2
2735
+ width: j.contentWidth + un + Ae,
2736
+ height: j.contentHeight + kt * 2
2733
2737
  });
2734
2738
  }
2735
2739
  calcCellAutoHeight(e) {
@@ -2745,8 +2749,8 @@ let cn = class {
2745
2749
  const I = this._dataValidationModel.getValidator(m.type);
2746
2750
  if (!I)
2747
2751
  return;
2748
- const D = c.endX - c.startX, v = c.endY - c.startY, C = (g = ie(r)) != null ? g : "", f = I.parseCellValue(C), w = Le(n != null ? n : void 0);
2749
- return Zt(f, w, D, v).cellAutoHeight;
2752
+ const V = c.endX - c.startX, v = c.endY - c.startY, C = (g = ie(r)) != null ? g : "", f = I.parseCellValue(C), w = Le(n != null ? n : void 0);
2753
+ return Kt(f, w, V, v).cellAutoHeight;
2750
2754
  }
2751
2755
  calcCellAutoWidth(e) {
2752
2756
  var g;
@@ -2761,8 +2765,8 @@ let cn = class {
2761
2765
  const I = this._dataValidationModel.getValidator(m.type);
2762
2766
  if (!I)
2763
2767
  return;
2764
- const D = c.endX - c.startX, v = c.endY - c.startY, C = (g = ie(r)) != null ? g : "", f = I.parseCellValue(C), w = Le(n != null ? n : void 0);
2765
- return Zt(f, w, D, v).calcAutoWidth;
2768
+ const V = c.endX - c.startX, v = c.endY - c.startY, C = (g = ie(r)) != null ? g : "", f = I.parseCellValue(C), w = Le(n != null ? n : void 0);
2769
+ return Kt(f, w, V, v).calcAutoWidth;
2766
2770
  }
2767
2771
  isHit(e, t) {
2768
2772
  const { primaryWithCoord: n } = t, r = n.isMergedMainCell ? n.mergeInfo : n, { endX: o } = r, { x: i } = e;
@@ -2777,40 +2781,40 @@ let cn = class {
2777
2781
  row: o,
2778
2782
  column: i
2779
2783
  };
2780
- this._commandService.executeCommand(Ut.id, a);
2784
+ this._commandService.executeCommand(Ft.id, a);
2781
2785
  }
2782
2786
  onPointerEnter(e, t) {
2783
2787
  var n, r;
2784
- return (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ge.POINTER);
2788
+ return (r = (n = Ge(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(qe.POINTER);
2785
2789
  }
2786
2790
  onPointerLeave(e, t) {
2787
2791
  var n, r;
2788
- return (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ge.DEFAULT);
2792
+ return (r = (n = Ge(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(qe.DEFAULT);
2789
2793
  }
2790
2794
  };
2791
- cn = ji([
2792
- It(0, oe),
2793
- It(1, pe),
2794
- It(2, E(xe)),
2795
- It(3, E(ae))
2796
- ], cn);
2797
- class Xi extends Ce {
2795
+ hn = Zi([
2796
+ Rt(0, oe),
2797
+ Rt(1, pe),
2798
+ Rt(2, D(xe)),
2799
+ Rt(3, D(ae))
2800
+ ], hn);
2801
+ class Ki extends Ce {
2798
2802
  constructor() {
2799
2803
  super(...arguments);
2800
- V(this, "id", X.LIST_MULTIPLE);
2801
- V(this, "canvasRender", this.injector.createInstance(cn));
2802
- V(this, "dropdownType", fe.MULTIPLE_LIST);
2804
+ E(this, "id", X.LIST_MULTIPLE);
2805
+ E(this, "canvasRender", this.injector.createInstance(hn));
2806
+ E(this, "dropdownType", fe.MULTIPLE_LIST);
2803
2807
  }
2804
2808
  }
2805
- var Zi = Object.getOwnPropertyDescriptor, zi = (e, t, n, r) => {
2806
- for (var o = r > 1 ? void 0 : r ? Zi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2809
+ var Gi = Object.getOwnPropertyDescriptor, qi = (e, t, n, r) => {
2810
+ for (var o = r > 1 ? void 0 : r ? Gi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2807
2811
  (a = e[i]) && (o = a(o) || o);
2808
2812
  return o;
2809
- }, lt = (e, t) => (n, r) => t(n, r, e);
2810
- const Xe = 4, wt = 4, me = 14, zt = 1, we = 6, Ze = 3, Kt = 8, Ki = "#565656", Wn = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2811
- function Hn(e, t, n, r, o, i, a = !0) {
2813
+ }, ct = (e, t) => (n, r) => t(n, r, e);
2814
+ const Xe = 4, yt = 4, me = 14, Gt = 1, we = 6, ze = 3, qt = 8, Ji = "#565656", jn = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2815
+ function Yn(e, t, n, r, o, i, a = !0) {
2812
2816
  let l = 0;
2813
- const s = a ? Ze : 0;
2817
+ const s = a ? ze : 0;
2814
2818
  switch (o) {
2815
2819
  case he.BOTTOM:
2816
2820
  l = t - r - s;
@@ -2822,7 +2826,7 @@ function Hn(e, t, n, r, o, i, a = !0) {
2822
2826
  l = s;
2823
2827
  break;
2824
2828
  }
2825
- l = Math.max(Ze, l);
2829
+ l = Math.max(ze, l);
2826
2830
  let d = 0;
2827
2831
  switch (i) {
2828
2832
  case Ee.CENTER:
@@ -2837,10 +2841,10 @@ function Hn(e, t, n, r, o, i, a = !0) {
2837
2841
  paddingTop: l
2838
2842
  };
2839
2843
  }
2840
- let un = class {
2844
+ let pn = class {
2841
2845
  constructor(e, t, n, r, o) {
2842
- V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2843
- V(this, "zIndex");
2846
+ E(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2847
+ E(this, "zIndex");
2844
2848
  this._univerInstanceService = e, this._localeService = t, this._commandService = n, this._renderManagerService = r, this._dataValidationModel = o;
2845
2849
  }
2846
2850
  _ensureMap(e) {
@@ -2855,49 +2859,49 @@ let un = class {
2855
2859
  let u;
2856
2860
  switch (i) {
2857
2861
  case he.MIDDLE:
2858
- u = (r - wt) / 2;
2862
+ u = (r - yt) / 2;
2859
2863
  break;
2860
2864
  case he.BOTTOM:
2861
- u = r - s - o - Ze + (o / 2 - wt / 2);
2865
+ u = r - s - o - ze + (o / 2 - yt / 2);
2862
2866
  break;
2863
2867
  default:
2864
- u = l + Ze + (o / 2 - wt / 2);
2868
+ u = l + ze + (o / 2 - yt / 2);
2865
2869
  break;
2866
2870
  }
2867
- e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(Wn), e.restore();
2871
+ e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(jn), e.restore();
2868
2872
  }
2869
2873
  // eslint-disable-next-line max-lines-per-function, complexity
2870
2874
  drawWith(e, t, n) {
2871
- var te, j, se, le, de, Me;
2875
+ var te, j, se, le, de, be;
2872
2876
  const { primaryWithCoord: r, row: o, col: i, style: a, data: l, subUnitId: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = r.isMergedMainCell ? r.mergeInfo.startRow : o, h = r.isMergedMainCell ? r.mergeInfo.startColumn : i, c = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, u, h);
2873
2877
  if (!c)
2874
2878
  return;
2875
2879
  const m = this._dataValidationModel.getValidator(c.type);
2876
2880
  if (!m)
2877
2881
  return;
2878
- const I = l == null ? void 0 : l.fontRenderExtension, { leftOffset: D = 0, rightOffset: v = 0, topOffset: C = 0, downOffset: f = 0 } = I || {};
2882
+ const I = l == null ? void 0 : l.fontRenderExtension, { leftOffset: V = 0, rightOffset: v = 0, topOffset: C = 0, downOffset: f = 0 } = I || {};
2879
2883
  if (!c || !m || !m || m.id.indexOf(X.LIST) !== 0 || !m.skipDefaultFontRender(c))
2880
2884
  return;
2881
2885
  const w = {
2882
- startX: d.startX + D,
2886
+ startX: d.startX + V,
2883
2887
  endX: d.endX - v,
2884
2888
  startY: d.startY + C,
2885
2889
  endY: d.endY - f
2886
- }, b = w.endX - w.startX, g = w.endY - w.startY, p = this._ensureMap(s), _ = this._generateKey(o, i), T = m.getListWithColorMap(c), A = ie(l), P = `${A != null ? A : ""}`, L = T[P];
2890
+ }, M = w.endX - w.startX, g = w.endY - w.startY, p = this._ensureMap(s), _ = this._generateKey(o, i), T = m.getListWithColorMap(c), A = ie(l), P = `${A != null ? A : ""}`, L = T[P];
2887
2891
  let { tb: y, vt: O, ht: U, pd: k } = a || {};
2888
2892
  y = y != null ? y : Se.WRAP, O = O != null ? O : he.BOTTOM, U = U != null ? U : re.ht, k = k != null ? k : re.pd;
2889
2893
  const x = Le(a).fontCache;
2890
2894
  if (c.renderMode === ue.ARROW) {
2891
- const { l: Q = re.pd.l, t: G = re.pd.t, r: ce = re.pd.r, b: ee = re.pd.b } = k, q = b - Q - ce - me - 4, M = new at(
2895
+ const { l: Q = re.pd.l, t: G = re.pd.t, r: ce = re.pd.r, b: ee = re.pd.b } = k, q = M - Q - ce - me - 4, b = new lt(
2892
2896
  P,
2893
2897
  x,
2894
2898
  y === Se.WRAP,
2895
2899
  q,
2896
2900
  1 / 0
2897
2901
  );
2898
- M.calculate();
2899
- const $ = M.getTotalWidth(), N = M.getTotalHeight(), { paddingTop: J, paddingLeft: R } = Hn(q, g - G - ee, $, N, O, U, !0);
2900
- this._drawDownIcon(e, w, b, g, N, O, k), e.save(), e.translateWithPrecision(w.startX + Q, w.startY + G), e.beginPath(), e.rect(0, 0, b - Q - ce, g - G - ee), e.clip(), e.translateWithPrecision(0, J), e.save(), e.translateWithPrecision(R, 0), e.beginPath(), e.rect(0, 0, q, N), e.clip(), Vn.drawWith(e, {
2902
+ b.calculate();
2903
+ const $ = b.getTotalWidth(), N = b.getTotalHeight(), { paddingTop: J, paddingLeft: R } = Yn(q, g - G - ee, $, N, O, U, !0);
2904
+ this._drawDownIcon(e, w, M, g, N, O, k), e.save(), e.translateWithPrecision(w.startX + Q, w.startY + G), e.beginPath(), e.rect(0, 0, M - Q - ce, g - G - ee), e.clip(), e.translateWithPrecision(0, J), e.save(), e.translateWithPrecision(R, 0), e.beginPath(), e.rect(0, 0, q, N), e.clip(), On.drawWith(e, {
2901
2905
  text: P,
2902
2906
  fontStyle: x,
2903
2907
  width: q,
@@ -2907,15 +2911,15 @@ let un = class {
2907
2911
  underline: !!((se = a == null ? void 0 : a.ul) != null && se.s),
2908
2912
  warp: y === Se.WRAP,
2909
2913
  hAlign: Ee.LEFT
2910
- }, M), e.restore(), e.restore(), p.set(_, {
2914
+ }, b), e.restore(), e.restore(), p.set(_, {
2911
2915
  left: w.endX - me + n.rowHeaderWidth,
2912
2916
  top: w.startY + G + n.columnHeaderHeight,
2913
2917
  width: me,
2914
2918
  height: g - G - ee
2915
2919
  });
2916
2920
  } else {
2917
- e.save(), e.translateWithPrecision(w.startX, w.startY), e.beginPath(), e.rect(0, 0, b, g), e.clip();
2918
- const Q = b - we * 2 - Xe - me - 4, G = new at(
2921
+ e.save(), e.translateWithPrecision(w.startX, w.startY), e.beginPath(), e.rect(0, 0, M, g), e.clip();
2922
+ const Q = M - we * 2 - Xe - me - 4, G = new lt(
2919
2923
  P,
2920
2924
  x,
2921
2925
  y === Se.WRAP,
@@ -2923,26 +2927,26 @@ let un = class {
2923
2927
  1 / 0
2924
2928
  );
2925
2929
  G.calculate();
2926
- const ce = G.getTotalWidth(), ee = G.getTotalHeight(), q = ee + zt * 2, M = Math.max(b - we * 2, 1), { paddingTop: $ } = Hn(M, g, ce, q, O, U);
2927
- e.translateWithPrecision(we, $), qn.drawWith(e, {
2928
- width: M,
2930
+ const ce = G.getTotalWidth(), ee = G.getTotalHeight(), q = ee + Gt * 2, b = Math.max(M - we * 2, 1), { paddingTop: $ } = Yn(b, g, ce, q, O, U);
2931
+ e.translateWithPrecision(we, $), Qn.drawWith(e, {
2932
+ width: b,
2929
2933
  height: q,
2930
2934
  fill: L || ke,
2931
- radius: Kt
2932
- }), e.save(), e.translateWithPrecision(Xe, zt), e.beginPath(), e.rect(0, 0, Q, ee), e.clip(), Vn.drawWith(e, {
2935
+ radius: qt
2936
+ }), e.save(), e.translateWithPrecision(Xe, Gt), e.beginPath(), e.rect(0, 0, Q, ee), e.clip(), On.drawWith(e, {
2933
2937
  text: P,
2934
2938
  fontStyle: x,
2935
2939
  width: Q,
2936
2940
  height: ee,
2937
2941
  color: (le = a == null ? void 0 : a.cl) == null ? void 0 : le.rgb,
2938
2942
  strokeLine: !!((de = a == null ? void 0 : a.st) != null && de.s),
2939
- underline: !!((Me = a == null ? void 0 : a.ul) != null && Me.s),
2943
+ underline: !!((be = a == null ? void 0 : a.ul) != null && be.s),
2940
2944
  warp: y === Se.WRAP,
2941
2945
  hAlign: Ee.LEFT
2942
- }, G), e.restore(), e.translateWithPrecision(Q + Xe + 4, (ee - wt) / 2), e.fillStyle = Ki, e.fill(Wn), e.restore(), p.set(_, {
2946
+ }, G), e.restore(), e.translateWithPrecision(Q + Xe + 4, (ee - yt) / 2), e.fillStyle = Ji, e.fill(jn), e.restore(), p.set(_, {
2943
2947
  left: w.startX + we + n.rowHeaderWidth,
2944
2948
  top: w.startY + $ + n.columnHeaderHeight,
2945
- width: M,
2949
+ width: b,
2946
2950
  height: q
2947
2951
  });
2948
2952
  }
@@ -2956,27 +2960,27 @@ let un = class {
2956
2960
  endX: a.endX - d,
2957
2961
  startY: a.startY + u,
2958
2962
  endY: a.endY - h
2959
- }, I = m.endX - m.startX, D = ie(r), v = `${D != null ? D : ""}`;
2963
+ }, I = m.endX - m.startX, V = ie(r), v = `${V != null ? V : ""}`;
2960
2964
  let { tb: C, pd: f } = n || {};
2961
- const { t: w = re.pd.t, b = re.pd.b } = f != null ? f : {};
2965
+ const { t: w = re.pd.t, b: M = re.pd.b } = f != null ? f : {};
2962
2966
  if (C = C != null ? C : Se.WRAP, c.renderMode === ue.ARROW) {
2963
- const { l: g = re.pd.l, r: p = re.pd.r } = f != null ? f : {}, _ = I - g - p - me - 4, T = new at(
2967
+ const { l: g = re.pd.l, r: p = re.pd.r } = f != null ? f : {}, _ = I - g - p - me - 4, T = new lt(
2964
2968
  v,
2965
2969
  Le(n).fontCache,
2966
2970
  C === Se.WRAP,
2967
2971
  _,
2968
2972
  1 / 0
2969
2973
  );
2970
- return T.calculate(), T.getTotalHeight() + w + b + Ze * 2;
2974
+ return T.calculate(), T.getTotalHeight() + w + M + ze * 2;
2971
2975
  } else {
2972
- const g = Math.max(I - we * 2 - Xe - me - 4, 10), p = new at(
2976
+ const g = Math.max(I - we * 2 - Xe - me - 4, 10), p = new lt(
2973
2977
  v,
2974
2978
  Le(n).fontCache,
2975
2979
  C === Se.WRAP,
2976
2980
  g,
2977
2981
  1 / 0
2978
2982
  );
2979
- return p.calculate(), p.getTotalHeight() + Ze * 2 + zt * 2;
2983
+ return p.calculate(), p.getTotalHeight() + ze * 2 + Gt * 2;
2980
2984
  }
2981
2985
  }
2982
2986
  calcCellAutoWidth(e) {
@@ -2988,23 +2992,23 @@ let un = class {
2988
2992
  endX: a.endX - d,
2989
2993
  startY: a.startY + u,
2990
2994
  endY: a.endY - h
2991
- }, I = m.endX - m.startX, D = ie(r), v = `${D != null ? D : ""}`;
2995
+ }, I = m.endX - m.startX, V = ie(r), v = `${V != null ? V : ""}`;
2992
2996
  let { tb: C, pd: f } = n || {};
2993
- const { l: w = re.pd.l, r: b = re.pd.r } = f != null ? f : {};
2997
+ const { l: w = re.pd.l, r: M = re.pd.r } = f != null ? f : {};
2994
2998
  C = C != null ? C : Se.WRAP;
2995
2999
  let g = we * 2 + me;
2996
3000
  switch (c.renderMode) {
2997
3001
  case ue.ARROW:
2998
- g = me + 4 + b + w;
3002
+ g = me + 4 + M + w;
2999
3003
  break;
3000
3004
  case ue.CUSTOM:
3001
- g = me + we * 2 + Xe * 2 + b + w + Kt / 2 + 1;
3005
+ g = me + we * 2 + Xe * 2 + M + w + qt / 2 + 1;
3002
3006
  break;
3003
3007
  // default is CUSTOM
3004
3008
  default:
3005
- g = me + we * 2 + Xe * 2 + b + w + Kt / 2 + 1;
3009
+ g = me + we * 2 + Xe * 2 + M + w + qt / 2 + 1;
3006
3010
  }
3007
- const p = I - g, _ = new at(
3011
+ const p = I - g, _ = new lt(
3008
3012
  v,
3009
3013
  Le(n).fontCache,
3010
3014
  C === Se.WRAP,
@@ -3029,64 +3033,64 @@ let un = class {
3029
3033
  row: o,
3030
3034
  column: i
3031
3035
  };
3032
- this._commandService.executeCommand(Ut.id, a);
3036
+ this._commandService.executeCommand(Ft.id, a);
3033
3037
  }
3034
3038
  onPointerEnter(e, t) {
3035
3039
  var n, r;
3036
- (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.POINTER);
3040
+ (r = (n = Ge(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(qe.POINTER);
3037
3041
  }
3038
3042
  onPointerLeave(e, t) {
3039
3043
  var n, r;
3040
- (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.DEFAULT);
3044
+ (r = (n = Ge(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(qe.DEFAULT);
3041
3045
  }
3042
3046
  };
3043
- un = zi([
3044
- lt(0, pe),
3045
- lt(1, E(ge)),
3046
- lt(2, oe),
3047
- lt(3, E(xe)),
3048
- lt(4, E(ae))
3049
- ], un);
3050
- class Gi extends Ce {
3047
+ pn = qi([
3048
+ ct(0, pe),
3049
+ ct(1, D(ge)),
3050
+ ct(2, oe),
3051
+ ct(3, D(xe)),
3052
+ ct(4, D(ae))
3053
+ ], pn);
3054
+ class Qi extends Ce {
3051
3055
  constructor() {
3052
3056
  super(...arguments);
3053
- V(this, "id", X.LIST);
3054
- V(this, "canvasRender", this.injector.createInstance(un));
3055
- V(this, "dropdownType", fe.LIST);
3056
- V(this, "optionsInput", Ot.componentKey);
3057
- V(this, "formulaInput", mn);
3057
+ E(this, "id", X.LIST);
3058
+ E(this, "canvasRender", this.injector.createInstance(pn));
3059
+ E(this, "dropdownType", fe.LIST);
3060
+ E(this, "optionsInput", Pt.componentKey);
3061
+ E(this, "formulaInput", _n);
3058
3062
  }
3059
3063
  }
3060
- class qi extends Ce {
3064
+ class ea extends Ce {
3061
3065
  constructor() {
3062
3066
  super(...arguments);
3063
- V(this, "id", X.TEXT_LENGTH);
3064
- V(this, "formulaInput", kt);
3067
+ E(this, "id", X.TEXT_LENGTH);
3068
+ E(this, "formulaInput", Nt);
3065
3069
  }
3066
3070
  }
3067
- class Ji extends Ce {
3071
+ class ta extends Ce {
3068
3072
  constructor() {
3069
3073
  super(...arguments);
3070
- V(this, "id", X.WHOLE);
3071
- V(this, "formulaInput", kt);
3074
+ E(this, "id", X.WHOLE);
3075
+ E(this, "formulaInput", Nt);
3072
3076
  }
3073
3077
  }
3074
- var Qi = Object.getOwnPropertyDescriptor, ea = (e, t, n, r) => {
3075
- for (var o = r > 1 ? void 0 : r ? Qi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3078
+ var na = Object.getOwnPropertyDescriptor, ra = (e, t, n, r) => {
3079
+ for (var o = r > 1 ? void 0 : r ? na(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3076
3080
  (a = e[i]) && (o = a(o) || o);
3077
3081
  return o;
3078
- }, Gt = (e, t) => (n, r) => t(n, r, e);
3079
- let rt = class extends pn {
3082
+ }, Jt = (e, t) => (n, r) => t(n, r, e);
3083
+ let ot = class extends vn {
3080
3084
  constructor(e, t, n) {
3081
3085
  super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = n, this._initComponents(), this._registerValidatorViews();
3082
3086
  }
3083
3087
  _initComponents() {
3084
3088
  [
3085
- ["DataValidationIcon", br],
3086
- [Vt, Si],
3087
- [Ot.componentKey, Ot],
3088
- [At.componentKey, At],
3089
- ...bi
3089
+ ["DataValidationIcon", Dr],
3090
+ [Ot, wi],
3091
+ [Pt.componentKey, Pt],
3092
+ [Lt.componentKey, Lt],
3093
+ ...Vi
3090
3094
  ].forEach(([e, t]) => {
3091
3095
  this.disposeWithMe(this._componentManger.register(
3092
3096
  e,
@@ -3096,146 +3100,145 @@ let rt = class extends pn {
3096
3100
  }
3097
3101
  _registerValidatorViews() {
3098
3102
  [
3099
- Fi,
3100
- Ji,
3101
- qi,
3103
+ Bi,
3104
+ ta,
3105
+ ea,
3106
+ xi,
3102
3107
  Ui,
3103
- Li,
3104
- Gi,
3105
- Xi,
3106
- ki
3108
+ Qi,
3109
+ Ki,
3110
+ Fi
3107
3111
  ].forEach((e) => {
3108
3112
  const t = this._injector.createInstance(e), n = this._dataValidatorRegistryService.getValidatorItem(t.id);
3109
3113
  n && (n.formulaInput = t.formulaInput, n.canvasRender = t.canvasRender, n.dropdownType = t.dropdownType, n.optionsInput = t.optionsInput);
3110
3114
  });
3111
3115
  }
3112
3116
  };
3113
- rt = ea([
3114
- Gt(0, E(Ve)),
3115
- Gt(1, E(Sn)),
3116
- Gt(2, E(Te))
3117
- ], rt);
3118
- var ta = Object.getOwnPropertyDescriptor, na = (e, t, n, r) => {
3119
- for (var o = r > 1 ? void 0 : r ? ta(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3117
+ ot = ra([
3118
+ Jt(0, D(Ve)),
3119
+ Jt(1, D(In)),
3120
+ Jt(2, D(Te))
3121
+ ], ot);
3122
+ var oa = Object.getOwnPropertyDescriptor, ia = (e, t, n, r) => {
3123
+ for (var o = r > 1 ? void 0 : r ? oa(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3120
3124
  (a = e[i]) && (o = a(o) || o);
3121
3125
  return o;
3122
- }, qt = (e, t) => (n, r) => t(n, r, e);
3123
- const ra = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3124
- var Rt;
3125
- let jn = (Rt = class extends Kn {
3126
- constructor(e = Dt, t, n, r) {
3126
+ }, Qt = (e, t) => (n, r) => t(n, r, e), Ze;
3127
+ let Xn = (Ze = class extends qn {
3128
+ constructor(e = Tt, t, n, r) {
3127
3129
  super(), this._config = e, this._injector = t, this._commandService = n, this._configService = r;
3128
- const { menu: o, ...i } = Gn(
3130
+ const { menu: o, ...i } = Jn(
3129
3131
  {},
3130
- Dt,
3132
+ Tt,
3131
3133
  this._config
3132
3134
  );
3133
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Et, i);
3135
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Vt, i);
3134
3136
  }
3135
3137
  onStarting() {
3136
3138
  [
3137
3139
  [_e],
3138
3140
  [$e],
3139
- [gt],
3140
- [Qe],
3141
+ [mt],
3142
+ [et],
3143
+ [rt],
3141
3144
  [nt],
3142
3145
  [tt],
3143
- [et],
3144
- [rt]
3146
+ [ot]
3145
3147
  ].forEach((e) => {
3146
3148
  this._injector.add(e);
3147
3149
  }), [
3150
+ $t,
3148
3151
  Ft,
3149
- Ut,
3150
- Ir,
3151
- wn,
3152
+ Rr,
3153
+ yn,
3152
3154
  Be,
3153
- Cr
3155
+ wr
3154
3156
  ].forEach((e) => {
3155
3157
  this._commandService.registerCommand(e);
3156
3158
  });
3157
3159
  }
3158
3160
  onReady() {
3159
- this._injector.get(et), this._injector.get(tt), this._injector.get(xe).registerRenderModule(
3161
+ this._injector.get(tt), this._injector.get(nt), this._injector.get(xe).registerRenderModule(
3160
3162
  H.UNIVER_SHEET,
3161
- [Tt]
3163
+ [At]
3162
3164
  );
3163
3165
  }
3164
3166
  onRendered() {
3165
- this._injector.get(rt), this._injector.get(nt);
3167
+ this._injector.get(ot), this._injector.get(rt);
3166
3168
  }
3167
3169
  onSteady() {
3168
- this._injector.get(Qe);
3169
- }
3170
- }, V(Rt, "pluginName", ra), V(Rt, "type", H.UNIVER_SHEET), Rt);
3171
- jn = na([
3172
- qt(1, E(Ve)),
3173
- qt(2, oe),
3174
- qt(3, hn)
3175
- ], jn);
3176
- var oa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, aa = (e, t, n) => t in e ? oa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t, n, r) => {
3177
- for (var o = r > 1 ? void 0 : r ? ia(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3170
+ this._injector.get(et);
3171
+ }
3172
+ }, E(Ze, "pluginName", "SHEET_DATA_VALIDATION_UI_PLUGIN"), E(Ze, "packageName", Dt.name), E(Ze, "version", Dt.version), E(Ze, "type", H.UNIVER_SHEET), Ze);
3173
+ Xn = ia([
3174
+ Qt(1, D(Ve)),
3175
+ Qt(2, oe),
3176
+ Qt(3, gn)
3177
+ ], Xn);
3178
+ var aa = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, la = (e, t, n) => t in e ? aa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, da = (e, t, n, r) => {
3179
+ for (var o = r > 1 ? void 0 : r ? sa(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3178
3180
  (a = e[i]) && (o = a(o) || o);
3179
3181
  return o;
3180
- }, Jt = (e, t) => (n, r) => t(n, r, e), Ar = (e, t, n) => aa(e, typeof t != "symbol" ? t + "" : t, n);
3181
- const la = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3182
- let Lt = class extends Kn {
3183
- constructor(e = Dt, t, n, r) {
3182
+ }, en = (e, t) => (n, r) => t(n, r, e), xt = (e, t, n) => la(e, typeof t != "symbol" ? t + "" : t, n);
3183
+ let it = class extends qn {
3184
+ constructor(e = Tt, t, n, r) {
3184
3185
  super(), this._config = e, this._injector = t, this._commandService = n, this._configService = r;
3185
- const { menu: o, ...i } = Gn(
3186
+ const { menu: o, ...i } = Jn(
3186
3187
  {},
3187
- Dt,
3188
+ Tt,
3188
3189
  this._config
3189
3190
  );
3190
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Et, i);
3191
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Vt, i);
3191
3192
  }
3192
3193
  onStarting() {
3193
3194
  [
3194
3195
  [_e],
3195
3196
  [$e],
3196
- [gt],
3197
- [Qe],
3197
+ [mt],
3198
+ [et],
3199
+ [rt],
3198
3200
  [nt],
3199
3201
  [tt],
3200
- [et],
3201
- [Je],
3202
- [rt]
3202
+ [Qe],
3203
+ [ot]
3203
3204
  ].forEach((e) => {
3204
3205
  this._injector.add(e);
3205
3206
  }), [
3207
+ $t,
3206
3208
  Ft,
3207
- Ut,
3208
- Ir,
3209
- wn,
3209
+ Rr,
3210
+ yn,
3210
3211
  Be,
3211
- Cr
3212
+ wr
3212
3213
  ].forEach((e) => {
3213
3214
  this._commandService.registerCommand(e);
3214
3215
  });
3215
3216
  }
3216
3217
  onReady() {
3217
- this._injector.get(et), this._injector.get(tt), this._injector.get(Je), this._injector.get(gt), this._injector.get(xe).registerRenderModule(
3218
+ this._injector.get(tt), this._injector.get(nt), this._injector.get(Qe), this._injector.get(mt), this._injector.get(xe).registerRenderModule(
3218
3219
  H.UNIVER_SHEET,
3219
- [Tt]
3220
+ [At]
3220
3221
  );
3221
3222
  }
3222
3223
  onRendered() {
3223
- this._injector.get(rt), this._injector.get(nt);
3224
+ this._injector.get(ot), this._injector.get(rt);
3224
3225
  }
3225
3226
  onSteady() {
3226
- this._injector.get(Qe);
3227
+ this._injector.get(et);
3227
3228
  }
3228
3229
  };
3229
- Ar(Lt, "pluginName", la);
3230
- Ar(Lt, "type", H.UNIVER_SHEET);
3231
- Lt = sa([
3232
- Zr(vo),
3233
- Jt(1, E(Ve)),
3234
- Jt(2, oe),
3235
- Jt(3, hn)
3236
- ], Lt);
3230
+ xt(it, "pluginName", "SHEET_DATA_VALIDATION_UI_PLUGIN");
3231
+ xt(it, "packageName", Dt.name);
3232
+ xt(it, "version", Dt.version);
3233
+ xt(it, "type", H.UNIVER_SHEET);
3234
+ it = da([
3235
+ zr(mo),
3236
+ en(1, D(Ve)),
3237
+ en(2, oe),
3238
+ en(3, gn)
3239
+ ], it);
3237
3240
  export {
3238
3241
  Ce as BaseSheetDataValidatorView,
3239
- jn as UniverSheetsDataValidationMobileUIPlugin,
3240
- Lt as UniverSheetsDataValidationUIPlugin
3242
+ Xn as UniverSheetsDataValidationMobileUIPlugin,
3243
+ it as UniverSheetsDataValidationUIPlugin
3241
3244
  };