@univerjs/sheets-data-validation-ui 0.6.10-nightly.202504261606 → 0.6.10-nightly.202504281607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,83 +1,73 @@
1
- var Nn = Object.defineProperty;
2
- var Un = (e, t, n) => t in e ? Nn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var D = (e, t, n) => Un(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { LocaleService as le, isFormulaString as be, DataValidationType as G, Tools as Qt, Inject as y, Injector as we, Disposable as Ve, UniverInstanceType as x, toDisposable as Bn, IUniverInstanceService as de, DataValidationErrorStyle as ct, DataValidationStatus as Xe, ICommandService as Q, IConfigService as ma, DataValidationRenderMode as ie, DisposableCollection as $n, dayjs as Da, numfmt as Xa, CellValueType as Hn, CommandType as ot, ObjectMatrix as Mt, Range as Wn, Rectangle as Dt, queryObjectMatrix as ea, Optional as xn, RxDisposable as pa, InterceptorEffectEnum as za, sequenceExecute as Ka, bufferDebounceTime as jn, debounce as Yn, UndoCommand as Xn, RedoCommand as zn, isUnitRangesEqual as Kn, shallowEqual as Ea, ThemeService as Ga, ColorKit as Gn, VerticalAlign as se, HorizontalAlign as ze, DEFAULT_STYLES as oe, WrapStrategy as Re, DocumentDataModel as Zn, BooleanNumber as it, DEFAULT_EMPTY_DOCUMENT_VALUE as qn, Plugin as Za, merge as qa } from "@univerjs/core";
5
- import { DataValidationFormulaController as Jn, deserializeListOptions as Qn, serializeListOptions as Ja, CUSTOM_FORMULA_INPUT_NAME as Qa, BASE_FORMULA_INPUT_NAME as Ft, LIST_FORMULA_INPUT_NAME as ga, CHECKBOX_FORMULA_INPUT_NAME as en, SheetDataValidationModel as te, SheetsDataValidationValidatorService as eo, getDataValidationCellValue as Bt, getCellValueOrigin as ee, createDefaultNewRule as tn, AddSheetDataValidationCommand as fa, DATA_VALIDATION_PLUGIN_NAME as an, getDataValidationDiffMutations as ta, UpdateSheetDataValidationRangeCommand as nn, DataValidationCacheService as on, UpdateSheetDataValidationSettingCommand as ba, UpdateSheetDataValidationOptionsCommand as to, RemoveSheetDataValidationCommand as rn, RemoveSheetAllDataValidationCommand as ao, DataValidationFormulaService as no, CHECKBOX_FORMULA_2 as oo, CHECKBOX_FORMULA_1 as io, getFormulaResult as $t, isLegalFormulaResult as Oa, transformCheckboxValue as ro } from "@univerjs/sheets-data-validation";
6
- import { jsxs as z, Fragment as Ke, jsx as _ } from "react/jsx-runtime";
7
- import { FormLayout as K, Input as Oe, Checkbox as kt, RadioGroup as va, Radio as Te, DraggableList as so, clsx as lo, Select as aa, Button as Ge } from "@univerjs/design";
8
- import { useDependency as N, useSidebarClick as sn, useObservable as Ae, useEvent as na, ISidebarService as ln, IDialogService as co, IZenZoneService as dn, KeyCode as pt, MenuItemType as _a, getMenuHiddenObservable as uo, RibbonStartGroup as ho, IMenuManagerService as mo, ComponentManager as Sa } from "@univerjs/ui";
9
- import Ta, { useState as W, useRef as mt, forwardRef as Fe, createElement as ke, useMemo as ut, useEffect as Le } from "react";
10
- import { FormulaEditor as cn, RangeSelector as po } from "@univerjs/sheets-formula-ui";
11
- import { DataValidatorRegistryService as ye, DataValidationModel as Ca, DataValidatorDropdownType as pe, DataValidatorRegistryScope as go, TWO_FORMULA_OPERATOR_COUNT as fo, getRuleOptions as Aa, getRuleSetting as La } from "@univerjs/data-validation";
12
- import { debounceTime as un, filter as Ia, BehaviorSubject as Pa, distinctUntilChanged as vo, Subject as _o, bufferTime as hn, of as So } from "rxjs";
13
- import { DeviceInputEventType as gt, IRenderManagerService as Ne, fixLineWidthByScale as Fa, Transform as Co, CheckboxShape as Io, getCurrentTypeOfRenderer as Ze, CURSOR_TYPE as qe, FontCache as Ro, Shape as wo, Rect as mn, getFontStyleString as Ht, getDocsSkeletonPageSize as rt, Documents as Vo, DocumentViewModel as yo, DocumentSkeleton as Mo } from "@univerjs/engine-render";
14
- import { SheetInterceptorService as Ra, VALIDATE_CELL as Do, SheetsSelectionsService as pn, SetRangeValuesCommand as dt, getSheetCommandTarget as gn, rangeToDiscreteRange as Eo, SheetPermissionCheckController as bo, WorksheetEditPermission as oa, WorksheetSetCellStylePermission as ia, RangeProtectionPermissionEditPoint as ra, WorkbookEditablePermission as sa, INTERCEPTOR_POINT as fn, InterceptCellContentPriority as vn, checkRangesEditablePermission as Oo } from "@univerjs/sheets";
15
- import { getPatternType as To } from "@univerjs/sheets-numfmt";
16
- import { ISheetCellDropdownManagerService as Ao, IEditorBridgeService as _n, SetCellEditVisibleOperation as ft, HoverManagerService as Lo, CellAlertManagerService as Po, CellAlertType as Fo, IAutoFillService as ko, APPLY_TYPE as st, virtualizeDiscreteRanges as la, getAutoFillRepeatRange as No, ISheetClipboardService as Uo, COPY_TYPE as ka, PREDEFINED_HOOK_NAME as vt, getRepeatRange as Na, getCurrentRangeDisable$ as Bo, AutoHeightController as Sn, SheetSkeletonManagerService as Et, IMarkSelectionService as $o } from "@univerjs/sheets-ui";
17
- import { deserializeRangeWithSheet as Ho, serializeRange as Cn } from "@univerjs/engine-formula";
18
- const Wo = "univer-data-validation-formula", xo = "univer-data-validation-formula-and", jo = "univer-data-validation-formula-list-item", Yo = "univer-data-validation-formula-list-item-icon", Xo = "univer-data-validation-formula-list-item-drag", zo = "univer-data-validation-formula-list-add", Ko = "univer-data-validation-formula-color-select", Go = "univer-data-validation-formula-color-select-panel", Zo = "univer-data-validation-formula-color-item", J = {
19
- dataValidationFormula: Wo,
20
- dataValidationFormulaAnd: xo,
21
- dataValidationFormulaListItem: jo,
22
- dataValidationFormulaListItemIcon: Yo,
23
- dataValidationFormulaListItemDrag: Xo,
24
- dataValidationFormulaListAdd: zo,
25
- dataValidationFormulaColorSelect: Ko,
26
- dataValidationFormulaColorSelectPanel: Go,
27
- dataValidationFormulaColorItem: Zo
28
- }, qo = (e) => {
29
- const { isTwoFormula: t = !1, value: n, onChange: a, showError: o, validResult: i } = e, r = N(le), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
30
- return t ? /* @__PURE__ */ z(Ke, { children: [
1
+ var Ar = Object.defineProperty;
2
+ var Lr = (e, t, r) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var E = (e, t, r) => Lr(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { LocaleService as se, isFormulaString as De, DataValidationType as G, Tools as Kt, Inject as M, Injector as we, Disposable as Re, UniverInstanceType as W, toDisposable as kr, IUniverInstanceService as le, DataValidationErrorStyle as lt, DataValidationStatus as je, ICommandService as J, IConfigService as ln, DataValidationRenderMode as oe, DisposableCollection as Nr, dayjs as wn, numfmt as Hn, CellValueType as Ur, CommandType as nt, ObjectMatrix as wt, Range as Fr, Rectangle as Rt, queryObjectMatrix as Gt, Optional as xr, RxDisposable as cn, InterceptorEffectEnum as Wn, sequenceExecute as jn, bufferDebounceTime as $r, debounce as Br, UndoCommand as Hr, RedoCommand as Wr, isUnitRangesEqual as jr, shallowEqual as Rn, ThemeService as Yn, ColorKit as Yr, VerticalAlign as ae, HorizontalAlign as Ye, DEFAULT_STYLES as re, WrapStrategy as Ie, DocumentDataModel as Xr, BooleanNumber as rt, DEFAULT_EMPTY_DOCUMENT_VALUE as zr, Plugin as Xn, merge as zn } from "@univerjs/core";
5
+ import { DataValidationFormulaController as Kr, deserializeListOptions as Gr, serializeListOptions as Kn, CUSTOM_FORMULA_INPUT_NAME as Gn, BASE_FORMULA_INPUT_NAME as Tt, LIST_FORMULA_INPUT_NAME as dn, CHECKBOX_FORMULA_INPUT_NAME as Zn, SheetDataValidationModel as ee, SheetsDataValidationValidatorService as Zr, getDataValidationCellValue as kt, getCellValueOrigin as Q, createDefaultNewRule as qn, AddSheetDataValidationCommand as un, DATA_VALIDATION_PLUGIN_NAME as Jn, getDataValidationDiffMutations as Zt, UpdateSheetDataValidationRangeCommand as Qn, DataValidationCacheService as er, UpdateSheetDataValidationSettingCommand as yn, UpdateSheetDataValidationOptionsCommand as qr, RemoveSheetDataValidationCommand as tr, RemoveSheetAllDataValidationCommand as Jr, DataValidationFormulaService as Qr, CHECKBOX_FORMULA_2 as eo, CHECKBOX_FORMULA_1 as to, getFormulaResult as Nt, isLegalFormulaResult as Mn, transformCheckboxValue as no } from "@univerjs/sheets-data-validation";
6
+ import { jsxs as z, Fragment as Xe, jsx as _ } from "react/jsx-runtime";
7
+ import { FormLayout as K, Input as Ve, Checkbox as Pt, RadioGroup as hn, Radio as Oe, DraggableList as ro, clsx as nr, LegacySelect as oo, Button as ze, Select as bn } from "@univerjs/design";
8
+ import { useDependency as U, useSidebarClick as rr, useObservable as Te, useEvent as qt, ISidebarService as or, IDialogService as io, IZenZoneService as ir, KeyCode as ht, MenuItemType as pn, getMenuHiddenObservable as ao, RibbonStartGroup as so, IMenuManagerService as lo, ComponentManager as gn } from "@univerjs/ui";
9
+ import En, { useState as H, useRef as ut, forwardRef as Le, createElement as ke, useMemo as ct, useEffect as Pe } from "react";
10
+ import { FormulaEditor as ar, RangeSelector as co } from "@univerjs/sheets-formula-ui";
11
+ import { DataValidatorRegistryService as ye, DataValidationModel as mn, DataValidatorDropdownType as pe, DataValidatorRegistryScope as uo, TWO_FORMULA_OPERATOR_COUNT as ho, getRuleOptions as Dn, getRuleSetting as Vn } from "@univerjs/data-validation";
12
+ import { debounceTime as sr, filter as fn, BehaviorSubject as On, distinctUntilChanged as po, Subject as go, bufferTime as lr, of as mo } from "rxjs";
13
+ import { DeviceInputEventType as pt, IRenderManagerService as Ne, fixLineWidthByScale as Tn, Transform as fo, CheckboxShape as vo, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as Ge, FontCache as _o, Shape as So, Rect as cr, getFontStyleString as Ut, getDocsSkeletonPageSize as ot, Documents as Co, DocumentViewModel as Io, DocumentSkeleton as wo } from "@univerjs/engine-render";
14
+ import { SheetInterceptorService as vn, VALIDATE_CELL as Ro, SheetsSelectionsService as dr, SetRangeValuesCommand as st, getSheetCommandTarget as ur, rangeToDiscreteRange as yo, SheetPermissionCheckController as Mo, WorksheetEditPermission as Jt, WorksheetSetCellStylePermission as Qt, RangeProtectionPermissionEditPoint as en, WorkbookEditablePermission as tn, INTERCEPTOR_POINT as hr, InterceptCellContentPriority as pr, checkRangesEditablePermission as bo } from "@univerjs/sheets";
15
+ import { getPatternType as Eo } from "@univerjs/sheets-numfmt";
16
+ import { ISheetCellDropdownManagerService as Do, IEditorBridgeService as gr, SetCellEditVisibleOperation as gt, HoverManagerService as Vo, CellAlertManagerService as Oo, CellAlertType as To, IAutoFillService as Po, APPLY_TYPE as it, virtualizeDiscreteRanges as nn, getAutoFillRepeatRange as Ao, ISheetClipboardService as Lo, COPY_TYPE as Pn, PREDEFINED_HOOK_NAME as mt, getRepeatRange as An, getCurrentRangeDisable$ as ko, AutoHeightController as mr, SheetSkeletonManagerService as yt, IMarkSelectionService as No } from "@univerjs/sheets-ui";
17
+ import { deserializeRangeWithSheet as Uo, serializeRange as fr } from "@univerjs/engine-formula";
18
+ const Fo = (e) => {
19
+ const { isTwoFormula: t = !1, value: r, onChange: n, showError: o, validResult: i } = e, a = U(se), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
20
+ return t ? /* @__PURE__ */ z(Xe, { children: [
31
21
  /* @__PURE__ */ _(K, { error: l, children: /* @__PURE__ */ _(
32
- Oe,
22
+ Ve,
33
23
  {
34
- className: J.dataValidationFormula,
35
- placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
36
- value: n == null ? void 0 : n.formula1,
37
- onChange: (d) => {
38
- a == null || a({
39
- ...n,
40
- formula1: d
24
+ className: "univer-w-full",
25
+ placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
26
+ value: r == null ? void 0 : r.formula1,
27
+ onChange: (c) => {
28
+ n == null || n({
29
+ ...r,
30
+ formula1: c
41
31
  });
42
32
  }
43
33
  }
44
34
  ) }),
45
- /* @__PURE__ */ _("div", { className: J.dataValidationFormulaAnd, children: r.t("dataValidation.panel.formulaAnd") }),
35
+ /* @__PURE__ */ _("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
46
36
  /* @__PURE__ */ _(K, { error: s, children: /* @__PURE__ */ _(
47
- Oe,
37
+ Ve,
48
38
  {
49
- className: J.dataValidationFormula,
50
- placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
51
- value: n == null ? void 0 : n.formula2,
52
- onChange: (d) => {
53
- a == null || a({
54
- ...n,
55
- formula2: d
39
+ className: "univer-w-full",
40
+ placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
41
+ value: r == null ? void 0 : r.formula2,
42
+ onChange: (c) => {
43
+ n == null || n({
44
+ ...r,
45
+ formula2: c
56
46
  });
57
47
  }
58
48
  }
59
49
  ) })
60
50
  ] }) : /* @__PURE__ */ _(K, { error: l, children: /* @__PURE__ */ _(
61
- Oe,
51
+ Ve,
62
52
  {
63
- className: J.dataValidationFormula,
64
- placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
65
- value: n == null ? void 0 : n.formula1,
66
- onChange: (d) => {
67
- a == null || a({ formula1: d });
53
+ className: "univer-w-full",
54
+ placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
55
+ value: r == null ? void 0 : r.formula1,
56
+ onChange: (c) => {
57
+ n == null || n({ formula1: c });
68
58
  }
69
59
  }
70
60
  ) });
71
61
  };
72
- function Jo(e) {
73
- const { value: t, onChange: n, showError: a, validResult: o } = e, i = N(le), r = a ? o == null ? void 0 : o.formula1 : "", l = a ? 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));
74
- return /* @__PURE__ */ z(Ke, { children: [
62
+ function xo(e) {
63
+ const { value: t, onChange: r, showError: n, validResult: o } = e, i = U(se), a = n ? o == null ? void 0 : o.formula1 : "", l = n ? o == null ? void 0 : o.formula2 : "", [s, c] = H(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
64
+ return /* @__PURE__ */ z(Xe, { children: [
75
65
  /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
76
- kt,
66
+ Pt,
77
67
  {
78
68
  checked: s,
79
69
  onChange: (u) => {
80
- u ? d(!0) : (d(!1), n == null || n({
70
+ u ? c(!0) : (c(!1), r == null || r({
81
71
  ...t,
82
72
  formula1: void 0,
83
73
  formula2: void 0
@@ -86,14 +76,14 @@ function Jo(e) {
86
76
  children: i.t("dataValidation.checkbox.tips")
87
77
  }
88
78
  ) }),
89
- s ? /* @__PURE__ */ _(K, { label: i.t("dataValidation.checkbox.checked"), error: r, children: /* @__PURE__ */ _(
90
- Oe,
79
+ s ? /* @__PURE__ */ _(K, { label: i.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ _(
80
+ Ve,
91
81
  {
92
- className: J.dataValidationFormula,
82
+ className: "univer-w-full",
93
83
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
94
84
  value: t == null ? void 0 : t.formula1,
95
85
  onChange: (u) => {
96
- n == null || n({
86
+ r == null || r({
97
87
  ...t,
98
88
  formula1: u || void 0
99
89
  });
@@ -101,13 +91,13 @@ function Jo(e) {
101
91
  }
102
92
  ) }) : null,
103
93
  s ? /* @__PURE__ */ _(K, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ _(
104
- Oe,
94
+ Ve,
105
95
  {
106
- className: J.dataValidationFormula,
96
+ className: "univer-w-full",
107
97
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
108
98
  value: t == null ? void 0 : t.formula2,
109
99
  onChange: (u) => {
110
- n == null || n({
100
+ r == null || r({
111
101
  ...t,
112
102
  formula2: u || void 0
113
103
  });
@@ -116,23 +106,23 @@ function Jo(e) {
116
106
  ) }) : null
117
107
  ] });
118
108
  }
119
- function Qo(e) {
109
+ function $o(e) {
120
110
  var h;
121
- const { unitId: t, subUnitId: n, value: a, onChange: o, showError: i, validResult: r } = e, l = i ? r == null ? void 0 : r.formula1 : void 0, s = mt(null), [d, u] = W(!1);
122
- return sn((c) => {
123
- var m;
124
- ((m = s.current) == null ? void 0 : m.isClickOutSide(c)) && u(!1);
111
+ const { unitId: t, subUnitId: r, value: n, onChange: o, showError: i, validResult: a } = e, l = i ? a == null ? void 0 : a.formula1 : void 0, s = ut(null), [c, u] = H(!1);
112
+ return rr((d) => {
113
+ var p;
114
+ ((p = s.current) == null ? void 0 : p.isClickOutSide(d)) && u(!1);
125
115
  }), /* @__PURE__ */ _(
126
- cn,
116
+ ar,
127
117
  {
128
- initValue: (h = a == null ? void 0 : a.formula1) != null ? h : "=",
118
+ initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
129
119
  unitId: t,
130
- subUnitId: n,
131
- isFocus: d,
132
- onChange: (c) => {
133
- const S = (c != null ? c : "").trim();
134
- S !== (a == null ? void 0 : a.formula1) && (o == null || o({
135
- ...a,
120
+ subUnitId: r,
121
+ isFocus: c,
122
+ onChange: (d) => {
123
+ const S = (d != null ? d : "").trim();
124
+ S !== (n == null ? void 0 : n.formula1) && (o == null || o({
125
+ ...n,
136
126
  formula1: S
137
127
  }));
138
128
  },
@@ -143,101 +133,101 @@ function Qo(e) {
143
133
  }
144
134
  );
145
135
  }
146
- var re = function() {
147
- return re = Object.assign || function(e) {
148
- for (var t, n = 1, a = arguments.length; n < a; n++) {
149
- t = arguments[n];
136
+ var ie = function() {
137
+ return ie = Object.assign || function(e) {
138
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
139
+ t = arguments[r];
150
140
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
151
141
  }
152
142
  return e;
153
- }, re.apply(this, arguments);
154
- }, ei = function(e, t) {
155
- var n = {};
156
- for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
143
+ }, ie.apply(this, arguments);
144
+ }, Bo = function(e, t) {
145
+ var r = {};
146
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
157
147
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
158
- for (var o = 0, a = Object.getOwnPropertySymbols(e); o < a.length; o++)
159
- t.indexOf(a[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[o]) && (n[a[o]] = e[a[o]]);
160
- return n;
161
- }, Ue = Fe(function(e, t) {
162
- var n = e.icon, a = e.id, o = e.className, i = e.extend, r = ei(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(a, " ").concat(o || "").trim(), s = mt("_".concat(ni()));
163
- return In(n, "".concat(a), { defIds: n.defIds, idSuffix: s.current }, re({ ref: t, className: l }, r), i);
148
+ for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
149
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
150
+ return r;
151
+ }, Ue = Le(function(e, t) {
152
+ var r = e.icon, n = e.id, o = e.className, i = e.extend, a = Bo(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), s = ut("_".concat(jo()));
153
+ return vr(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, ie({ ref: t, className: l }, a), i);
164
154
  });
165
- function In(e, t, n, a, o) {
166
- return ke(e.tag, re(re({ key: t }, ti(e, n, o)), a), (ai(e, n).children || []).map(function(i, r) {
167
- return In(i, "".concat(t, "-").concat(e.tag, "-").concat(r), n, void 0, o);
155
+ function vr(e, t, r, n, o) {
156
+ return ke(e.tag, ie(ie({ key: t }, Ho(e, r, o)), n), (Wo(e, r).children || []).map(function(i, a) {
157
+ return vr(i, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, o);
168
158
  }));
169
159
  }
170
- function ti(e, t, n) {
171
- var a = re({}, e.attrs);
172
- n != null && n.colorChannel1 && a.fill === "colorChannel1" && (a.fill = n.colorChannel1), e.tag === "mask" && a.id && (a.id = a.id + t.idSuffix), Object.entries(a).forEach(function(i) {
173
- var r = i[0], l = i[1];
174
- r === "mask" && typeof l == "string" && (a[r] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
160
+ function Ho(e, t, r) {
161
+ var n = ie({}, e.attrs);
162
+ r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(i) {
163
+ var a = i[0], l = i[1];
164
+ a === "mask" && typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
175
165
  });
176
166
  var o = t.defIds;
177
- return !o || o.length === 0 || (e.tag === "use" && a["xlink:href"] && (a["xlink:href"] = a["xlink:href"] + t.idSuffix), Object.entries(a).forEach(function(i) {
178
- var r = i[0], l = i[1];
179
- typeof l == "string" && (a[r] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
180
- })), a;
167
+ return !o || o.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(i) {
168
+ var a = i[0], l = i[1];
169
+ typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
170
+ })), n;
181
171
  }
182
- function ai(e, t) {
183
- var n, a = t.defIds;
184
- return !a || a.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? re(re({}, e), { children: e.children.map(function(o) {
185
- return typeof o.attrs.id == "string" && a && a.indexOf(o.attrs.id) > -1 ? re(re({}, o), { attrs: re(re({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
172
+ function Wo(e, t) {
173
+ var r, n = t.defIds;
174
+ return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? ie(ie({}, e), { children: e.children.map(function(o) {
175
+ return typeof o.attrs.id == "string" && n && n.indexOf(o.attrs.id) > -1 ? ie(ie({}, o), { attrs: ie(ie({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
186
176
  }) }) : e;
187
177
  }
188
- function ni() {
178
+ function jo() {
189
179
  return Math.random().toString(36).substring(2, 8);
190
180
  }
191
181
  Ue.displayName = "UniverIcon";
192
- var oi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rn = Fe(function(e, t) {
182
+ var Yo = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _r = Le(function(e, t) {
193
183
  return ke(Ue, Object.assign({}, e, {
194
184
  id: "data-validation-single",
195
185
  ref: t,
196
- icon: oi
186
+ icon: Yo
197
187
  }));
198
188
  });
199
- Rn.displayName = "DataValidationSingle";
200
- var ii = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wa = Fe(function(e, t) {
189
+ _r.displayName = "DataValidationSingle";
190
+ var Xo = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _n = Le(function(e, t) {
201
191
  return ke(Ue, Object.assign({}, e, {
202
192
  id: "delete-single",
203
193
  ref: t,
204
- icon: ii
194
+ icon: Xo
205
195
  }));
206
196
  });
207
- wa.displayName = "DeleteSingle";
208
- var ri = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", 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" } }] }, wn = Fe(function(e, t) {
197
+ _n.displayName = "DeleteSingle";
198
+ var zo = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", 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" } }] }, Sr = Le(function(e, t) {
209
199
  return ke(Ue, Object.assign({}, e, {
210
200
  id: "increase-single",
211
201
  ref: t,
212
- icon: ri
202
+ icon: zo
213
203
  }));
214
204
  });
215
- wn.displayName = "IncreaseSingle";
216
- var si = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Vn = Fe(function(e, t) {
205
+ Sr.displayName = "IncreaseSingle";
206
+ var Ko = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cr = Le(function(e, t) {
217
207
  return ke(Ue, Object.assign({}, e, {
218
208
  id: "more-down-single",
219
209
  ref: t,
220
- icon: si
210
+ icon: Ko
221
211
  }));
222
212
  });
223
- Vn.displayName = "MoreDownSingle";
224
- var li = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, yn = Fe(function(e, t) {
213
+ Cr.displayName = "MoreDownSingle";
214
+ var Go = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ir = Le(function(e, t) {
225
215
  return ke(Ue, Object.assign({}, e, {
226
216
  id: "more-up-single",
227
217
  ref: t,
228
- icon: li
218
+ icon: Go
229
219
  }));
230
220
  });
231
- yn.displayName = "MoreUpSingle";
232
- var di = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Mn = Fe(function(e, t) {
221
+ Ir.displayName = "MoreUpSingle";
222
+ var Zo = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, wr = Le(function(e, t) {
233
223
  return ke(Ue, Object.assign({}, e, {
234
224
  id: "sequence-single",
235
225
  ref: t,
236
- icon: di
226
+ icon: Zo
237
227
  }));
238
228
  });
239
- Mn.displayName = "SequenceSingle";
240
- const je = "#ECECEC", ci = [
229
+ wr.displayName = "SequenceSingle";
230
+ const He = "#ECECEC", qo = [
241
231
  "#FFFFFF",
242
232
  "#FEE7E7",
243
233
  "#FEF0E6",
@@ -262,196 +252,221 @@ const je = "#ECECEC", ci = [
262
252
  "#3A60F7",
263
253
  "#9E6DE3",
264
254
  "#F248A6"
265
- ], ui = (e) => {
266
- const { value: t, onChange: n, disabled: a } = e, [o, i] = W(!1);
255
+ ], Jo = (e) => {
256
+ const { value: t, onChange: r, disabled: n } = e, [o, i] = H(!1);
267
257
  return /* @__PURE__ */ _(
268
- aa,
258
+ oo,
269
259
  {
270
- disabled: a,
260
+ disabled: n,
271
261
  open: o,
272
262
  onDropdownVisibleChange: i,
273
263
  dropdownStyle: { width: 112 },
274
264
  style: { width: 96, cursor: "pointer" },
275
- className: J.dataValidationFormulaColorSelect,
265
+ className: "univer-ml-1 univer-mr-2 univer-w-[92px]",
276
266
  value: t,
277
- onChange: n,
278
- labelRender: (r) => /* @__PURE__ */ _(
267
+ onChange: r,
268
+ labelRender: (a) => /* @__PURE__ */ _(
279
269
  "div",
280
270
  {
281
- className: J.dataValidationFormulaColorItem,
282
- style: { background: r.value, marginTop: 5 }
271
+ className: `
272
+ univer-box-border univer-h-4 univer-w-4 univer-rounded univer-border univer-border-gray-200
273
+ univer-text-base
274
+ `,
275
+ style: { background: a.value, marginTop: 5 }
283
276
  }
284
277
  ),
285
- dropdownRender: () => /* @__PURE__ */ _("div", { className: J.dataValidationFormulaColorSelectPanel, children: ci.map(
286
- (r) => /* @__PURE__ */ _(
287
- "div",
288
- {
289
- onClick: () => {
290
- n(r), i(!1);
291
- },
292
- className: J.dataValidationFormulaColorItem,
293
- style: { background: r }
294
- },
295
- r
296
- )
297
- ) })
278
+ dropdownRender: () => /* @__PURE__ */ _(
279
+ "div",
280
+ {
281
+ className: `
282
+ univer-box-border univer-flex univer-w-28 univer-flex-row univer-flex-wrap
283
+ univer-justify-between univer-p-3 univer-pl-3
284
+ `,
285
+ children: qo.map(
286
+ (a) => /* @__PURE__ */ _(
287
+ "div",
288
+ {
289
+ onClick: () => {
290
+ r(a), i(!1);
291
+ },
292
+ className: `
293
+ univer-mb-2 univer-mr-2 univer-box-border univer-box-border univer-h-4 univer-w-4
294
+ univer-cursor-pointer univer-rounded univer-border univer-border-gray-200
295
+ univer-text-base
296
+ `,
297
+ style: { background: a }
298
+ },
299
+ a
300
+ )
301
+ )
302
+ }
303
+ )
298
304
  }
299
305
  );
300
- }, Ua = (e) => {
301
- const { item: t, commonProps: n, style: a } = e, { onItemChange: o, onItemDelete: i } = n;
302
- return /* @__PURE__ */ z("div", { className: J.dataValidationFormulaListItem, style: a, children: [
303
- t.isRef ? null : /* @__PURE__ */ _("div", { className: lo(J.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ _(Mn, {}) }),
306
+ }, Ln = (e) => {
307
+ const { item: t, commonProps: r, style: n } = e, { onItemChange: o, onItemDelete: i } = r;
308
+ return /* @__PURE__ */ z("div", { className: "univer-flex univer-items-center univer-pb-0.5", style: n, children: [
309
+ t.isRef ? null : /* @__PURE__ */ _("div", { className: nr("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ _(wr, {}) }),
304
310
  /* @__PURE__ */ _(
305
- ui,
311
+ Jo,
306
312
  {
307
313
  value: t.color,
308
- onChange: (r) => {
309
- o(t.id, t.label, r);
314
+ onChange: (a) => {
315
+ o(t.id, t.label, a);
310
316
  }
311
317
  }
312
318
  ),
313
319
  /* @__PURE__ */ _(
314
- Oe,
320
+ Ve,
315
321
  {
316
322
  disabled: t.isRef,
317
323
  value: t.label,
318
- onChange: (r) => {
319
- o(t.id, r, t.color);
324
+ onChange: (a) => {
325
+ o(t.id, a, t.color);
320
326
  },
321
327
  inputStyle: { height: 28 }
322
328
  }
323
329
  ),
324
- t.isRef ? null : /* @__PURE__ */ _("div", { className: J.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ _(wa, { onClick: () => i(t.id) }) })
330
+ t.isRef ? null : /* @__PURE__ */ _(
331
+ "div",
332
+ {
333
+ className: `
334
+ univer-ml-1 univer-cursor-pointer univer-rounded univer-text-base
335
+ hover:univer-bg-gray-200
336
+ `,
337
+ children: /* @__PURE__ */ _(_n, { onClick: () => i(t.id) })
338
+ }
339
+ )
325
340
  ] });
326
341
  };
327
- function hi(e) {
328
- const { value: t, onChange: n = () => {
329
- }, unitId: a, subUnitId: o, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => be(s) ? "1" : "0"), [c, S] = W(u === "1" ? s : "="), [m, M] = W(u === "1" ? s : "="), V = N(le), p = N(ye), f = N(Ca), g = N(Jn), [I, R] = W(() => d.split(",")), C = p.getValidatorItem(G.LIST), [w, E] = W([]), [F, b] = W(""), L = r ? i == null ? void 0 : i.formula1 : "", A = ut(() => f.ruleChange$.pipe(un(16)), []), P = Ae(A), O = na(n);
330
- Le(() => {
342
+ function Qo(e) {
343
+ const { value: t, onChange: r = () => {
344
+ }, unitId: n, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, [u, h] = H(() => De(s) ? "1" : "0"), [d, S] = H(u === "1" ? s : "="), [p, b] = H(u === "1" ? s : "="), y = U(se), g = U(ye), f = U(mn), m = U(Kr), [I, w] = H(() => c.split(",")), C = g.getValidatorItem(G.LIST), [R, D] = H([]), [k, V] = H(""), A = a ? i == null ? void 0 : i.formula1 : "", P = ct(() => f.ruleChange$.pipe(sr(16)), []), L = Te(P), O = qt(r);
345
+ Pe(() => {
331
346
  (async () => {
332
347
  await new Promise((v) => {
333
348
  setTimeout(() => v(!0), 100);
334
349
  });
335
- const T = f.getRuleById(a, o, l), H = T == null ? void 0 : T.formula1;
336
- if (be(H) && C && T) {
337
- const v = await C.getListAsync(T, a, o);
338
- E(v);
350
+ const T = f.getRuleById(n, o, l), B = T == null ? void 0 : T.formula1;
351
+ if (De(B) && C && T) {
352
+ const v = await C.getListAsync(T, n, o);
353
+ D(v);
339
354
  }
340
355
  })();
341
- }, [f, P, C, l, o, a]), Le(() => {
342
- be(s) && s !== m && (S(s), M(m));
343
- }, [m, s]);
344
- const [U, B] = W(() => {
345
- const T = u !== "1" ? Qn(s) : [], H = d.split(",");
346
- return T.map((v, k) => ({
356
+ }, [f, L, C, l, o, n]), Pe(() => {
357
+ De(s) && s !== p && (S(s), b(p));
358
+ }, [p, s]);
359
+ const [F, x] = H(() => {
360
+ const T = u !== "1" ? Gr(s) : [], B = c.split(",");
361
+ return T.map((v, N) => ({
347
362
  label: v,
348
- color: H[k] || je,
363
+ color: B[N] || He,
349
364
  isRef: !1,
350
- id: Qt.generateRandomId(4)
365
+ id: Kt.generateRandomId(4)
351
366
  }));
352
- }), j = (T, H, v) => {
353
- const k = U.find(($) => $.id === T);
354
- k && (k.label = H, k.color = v, B([...U]));
367
+ }), j = (T, B, v) => {
368
+ const N = F.find(($) => $.id === T);
369
+ N && (N.label = B, N.color = v, x([...F]));
355
370
  }, Z = (T) => {
356
- const H = U.findIndex((v) => v.id === T);
357
- H !== -1 && (U.splice(H, 1), B([...U]));
358
- }, Y = d.split(","), ae = ut(() => w.map((T, H) => ({
371
+ const B = F.findIndex((v) => v.id === T);
372
+ B !== -1 && (F.splice(B, 1), x([...F]));
373
+ }, Y = c.split(","), te = ct(() => R.map((T, B) => ({
359
374
  label: T,
360
- color: Y[H] || je,
361
- id: `${H}`,
375
+ color: Y[B] || He,
376
+ id: `${B}`,
362
377
  isRef: !0
363
- })), [Y, w]), ge = (T, H, v) => {
364
- const k = [...I];
365
- k[+T] = v, R(k), O({
378
+ })), [Y, R]), ge = (T, B, v) => {
379
+ const N = [...I];
380
+ N[+T] = v, w(N), O({
366
381
  formula1: s,
367
- formula2: k.join(",")
382
+ formula2: N.join(",")
368
383
  });
369
384
  }, ce = () => {
370
- B([
371
- ...U,
385
+ x([
386
+ ...F,
372
387
  {
373
388
  label: "",
374
- color: je,
389
+ color: He,
375
390
  isRef: !1,
376
- id: Qt.generateRandomId(4)
391
+ id: Kt.generateRandomId(4)
377
392
  }
378
393
  ]);
379
394
  };
380
- Le(() => {
395
+ Pe(() => {
381
396
  if (u === "1")
382
397
  return;
383
- const T = /* @__PURE__ */ new Set(), H = [];
384
- U.map((v) => ({
398
+ const T = /* @__PURE__ */ new Set(), B = [];
399
+ F.map((v) => ({
385
400
  labelList: v.label.split(","),
386
401
  item: v
387
- })).forEach(({ item: v, labelList: k }) => {
388
- k.forEach(($) => {
389
- T.has($) || (T.add($), H.push({
402
+ })).forEach(({ item: v, labelList: N }) => {
403
+ N.forEach(($) => {
404
+ T.has($) || (T.add($), B.push({
390
405
  label: $,
391
406
  color: v.color
392
407
  }));
393
408
  });
394
409
  }), O({
395
- formula1: Ja(H.map((v) => v.label)),
396
- formula2: H.map((v) => v.color === je ? "" : v.color).join(",")
410
+ formula1: Kn(B.map((v) => v.label)),
411
+ formula2: B.map((v) => v.color === He ? "" : v.color).join(",")
397
412
  });
398
- }, [U, O, u, m, I]);
399
- const ne = na(async (T) => {
400
- if (!be(T)) {
413
+ }, [F, O, u, p, I]);
414
+ const ne = qt(async (T) => {
415
+ if (!De(T)) {
401
416
  O == null || O({
402
417
  formula1: "",
403
- formula2: d
418
+ formula2: c
404
419
  });
405
420
  return;
406
421
  }
407
- g.getFormulaRefCheck(T) ? (O == null || O({
408
- formula1: be(T) ? T : "",
409
- formula2: d
410
- }), b("")) : (O == null || O({
422
+ m.getFormulaRefCheck(T) ? (O == null || O({
423
+ formula1: De(T) ? T : "",
424
+ formula2: c
425
+ }), V("")) : (O == null || O({
411
426
  formula1: "",
412
- formula2: d
413
- }), S("="), b(V.t("dataValidation.validFail.formulaError")));
414
- }), ue = mt(null), [Ce, fe] = W(!1);
415
- return sn((T) => {
427
+ formula2: c
428
+ }), S("="), V(y.t("dataValidation.validFail.formulaError")));
429
+ }), de = ut(null), [Se, me] = H(!1);
430
+ return rr((T) => {
416
431
  var v;
417
- ((v = ue.current) == null ? void 0 : v.isClickOutSide(T)) && fe(!1);
418
- }), /* @__PURE__ */ z(Ke, { children: [
419
- /* @__PURE__ */ _(K, { label: V.t("dataValidation.list.options"), children: /* @__PURE__ */ z(
420
- va,
432
+ ((v = de.current) == null ? void 0 : v.isClickOutSide(T)) && me(!1);
433
+ }), /* @__PURE__ */ z(Xe, { children: [
434
+ /* @__PURE__ */ _(K, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ z(
435
+ hn,
421
436
  {
422
437
  value: u,
423
438
  onChange: (T) => {
424
- h(T), S(m), T === "1" && O({
425
- formula1: m === "=" ? "" : m,
439
+ h(T), S(p), T === "1" && O({
440
+ formula1: p === "=" ? "" : p,
426
441
  formula2: I.join(",")
427
442
  });
428
443
  },
429
444
  children: [
430
- /* @__PURE__ */ _(Te, { value: "0", children: V.t("dataValidation.list.customOptions") }),
431
- /* @__PURE__ */ _(Te, { value: "1", children: V.t("dataValidation.list.refOptions") })
445
+ /* @__PURE__ */ _(Oe, { value: "0", children: y.t("dataValidation.list.customOptions") }),
446
+ /* @__PURE__ */ _(Oe, { value: "1", children: y.t("dataValidation.list.refOptions") })
432
447
  ]
433
448
  }
434
449
  ) }),
435
- u === "1" ? /* @__PURE__ */ z(Ke, { children: [
450
+ u === "1" ? /* @__PURE__ */ z(Xe, { children: [
436
451
  /* @__PURE__ */ _(
437
- cn,
452
+ ar,
438
453
  {
439
- initValue: c,
440
- unitId: a,
454
+ initValue: d,
455
+ unitId: n,
441
456
  subUnitId: o,
442
- isFocus: Ce,
457
+ isFocus: Se,
443
458
  onChange: (T = "") => {
444
- const H = (T != null ? T : "").trim();
445
- M(H), ne(H);
459
+ const B = (T != null ? T : "").trim();
460
+ b(B), ne(B);
446
461
  },
447
- errorText: L || F || void 0,
448
- onFocus: () => fe(!0),
462
+ errorText: A || k || void 0,
463
+ onFocus: () => me(!0),
449
464
  isSupportAcrossSheet: !0,
450
- ref: ue
465
+ ref: de
451
466
  }
452
467
  ),
453
- ae.length > 0 && /* @__PURE__ */ _("div", { style: { marginTop: "12px" }, children: ae.map((T) => /* @__PURE__ */ _(
454
- Ua,
468
+ te.length > 0 && /* @__PURE__ */ _("div", { style: { marginTop: "12px" }, children: te.map((T) => /* @__PURE__ */ _(
469
+ Ln,
455
470
  {
456
471
  item: T,
457
472
  commonProps: { onItemChange: ge },
@@ -459,17 +474,17 @@ function hi(e) {
459
474
  },
460
475
  T.id
461
476
  )) })
462
- ] }) : /* @__PURE__ */ _(K, { error: L, children: /* @__PURE__ */ z("div", { style: { marginTop: "-12px" }, children: [
477
+ ] }) : /* @__PURE__ */ _(K, { error: A, children: /* @__PURE__ */ z("div", { style: { marginTop: "-12px" }, children: [
463
478
  /* @__PURE__ */ _(
464
- so,
479
+ ro,
465
480
  {
466
- list: U,
467
- onListChange: B,
481
+ list: F,
482
+ onListChange: x,
468
483
  rowHeight: 28,
469
484
  margin: [0, 12],
470
485
  draggableHandle: ".draggableHandle",
471
486
  itemRender: (T) => /* @__PURE__ */ _(
472
- Ua,
487
+ Ln,
473
488
  {
474
489
  item: T,
475
490
  commonProps: {
@@ -482,68 +497,79 @@ function hi(e) {
482
497
  idKey: "id"
483
498
  }
484
499
  ),
485
- /* @__PURE__ */ z("a", { className: J.dataValidationFormulaListAdd, onClick: ce, children: [
486
- /* @__PURE__ */ _(wn, {}),
487
- V.t("dataValidation.list.add")
488
- ] })
500
+ /* @__PURE__ */ z(
501
+ "a",
502
+ {
503
+ className: `
504
+ univer-flex univer-w-fit univer-cursor-pointer univer-flex-row univer-items-center
505
+ univer-rounded univer-p-1 univer-px-2 univer-text-sm univer-text-primary
506
+ hover:univer-bg-primary-600/5
507
+ `,
508
+ onClick: ce,
509
+ children: [
510
+ /* @__PURE__ */ _(Sr, { className: "univer-mr-1" }),
511
+ y.t("dataValidation.list.add")
512
+ ]
513
+ }
514
+ )
489
515
  ] }) })
490
516
  ] });
491
517
  }
492
- const mi = [
518
+ const ei = [
493
519
  [
494
- Qa,
495
- Qo
520
+ Gn,
521
+ $o
496
522
  ],
497
523
  [
498
- Ft,
499
- qo
524
+ Tt,
525
+ Fo
500
526
  ],
501
527
  [
502
- ga,
503
- hi
528
+ dn,
529
+ Qo
504
530
  ],
505
531
  [
506
- en,
507
- Jo
532
+ Zn,
533
+ xo
508
534
  ]
509
535
  ];
510
- var pi = Object.getOwnPropertyDescriptor, gi = (e, t, n, a) => {
511
- for (var o = a > 1 ? void 0 : a ? pi(t, n) : t, i = e.length - 1, r; i >= 0; i--)
512
- (r = e[i]) && (o = r(o) || o);
536
+ var ti = Object.getOwnPropertyDescriptor, ni = (e, t, r, n) => {
537
+ for (var o = n > 1 ? void 0 : n ? ti(t, r) : t, i = e.length - 1, a; i >= 0; i--)
538
+ (a = e[i]) && (o = a(o) || o);
513
539
  return o;
514
- }, fi = (e, t) => (n, a) => t(n, a, e);
515
- let _e = class {
540
+ }, ri = (e, t) => (r, n) => t(r, n, e);
541
+ let ve = class {
516
542
  constructor(e) {
517
- D(this, "canvasRender", null);
518
- D(this, "dropdownType");
519
- D(this, "optionsInput");
520
- D(this, "formulaInput", ga);
543
+ E(this, "canvasRender", null);
544
+ E(this, "dropdownType");
545
+ E(this, "optionsInput");
546
+ E(this, "formulaInput", dn);
521
547
  this.injector = e;
522
548
  }
523
549
  };
524
- _e = gi([
525
- fi(0, y(we))
526
- ], _e);
527
- var vi = Object.getOwnPropertyDescriptor, _i = (e, t, n, a) => {
528
- for (var o = a > 1 ? void 0 : a ? vi(t, n) : t, i = e.length - 1, r; i >= 0; i--)
529
- (r = e[i]) && (o = r(o) || o);
550
+ ve = ni([
551
+ ri(0, M(we))
552
+ ], ve);
553
+ var oi = Object.getOwnPropertyDescriptor, ii = (e, t, r, n) => {
554
+ for (var o = n > 1 ? void 0 : n ? oi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
555
+ (a = e[i]) && (o = a(o) || o);
530
556
  return o;
531
- }, Ba = (e, t) => (n, a) => t(n, a, e);
532
- let Se = class extends Ve {
533
- constructor(t, n) {
557
+ }, kn = (e, t) => (r, n) => t(r, n, e);
558
+ let _e = class extends Re {
559
+ constructor(t, r) {
534
560
  super();
535
- D(this, "_open$", new Pa(!1));
536
- D(this, "open$", this._open$.pipe(vo()));
537
- D(this, "_activeRule");
538
- D(this, "_activeRule$", new Pa(void 0));
539
- D(this, "activeRule$", this._activeRule$.asObservable());
540
- D(this, "_closeDisposable", null);
541
- this._univerInstanceService = t, this._sidebarService = n, this.disposeWithMe(
542
- this._univerInstanceService.getCurrentTypeOfUnit$(x.UNIVER_SHEET).pipe(Ia((a) => !a)).subscribe(() => {
561
+ E(this, "_open$", new On(!1));
562
+ E(this, "open$", this._open$.pipe(po()));
563
+ E(this, "_activeRule");
564
+ E(this, "_activeRule$", new On(void 0));
565
+ E(this, "activeRule$", this._activeRule$.asObservable());
566
+ E(this, "_closeDisposable", null);
567
+ this._univerInstanceService = t, this._sidebarService = r, this.disposeWithMe(
568
+ this._univerInstanceService.getCurrentTypeOfUnit$(W.UNIVER_SHEET).pipe(fn((n) => !n)).subscribe(() => {
543
569
  this.close();
544
570
  })
545
- ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((a) => {
546
- a.id === Ot && (a.visible || setTimeout(() => {
571
+ ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((n) => {
572
+ n.id === bt && (n.visible || setTimeout(() => {
547
573
  this._sidebarService.sidebarOptions$.next({ visible: !1 });
548
574
  }));
549
575
  }));
@@ -566,7 +592,7 @@ let Se = class extends Ve {
566
592
  this._open$.next(!1), (t = this._closeDisposable) == null || t.dispose();
567
593
  }
568
594
  setCloseDisposable(t) {
569
- this._closeDisposable = Bn(() => {
595
+ this._closeDisposable = kr(() => {
570
596
  t.dispose(), this._closeDisposable = null;
571
597
  });
572
598
  }
@@ -574,43 +600,43 @@ let Se = class extends Ve {
574
600
  this._activeRule = t, this._activeRule$.next(t);
575
601
  }
576
602
  };
577
- Se = _i([
578
- Ba(0, de),
579
- Ba(1, ln)
580
- ], Se);
581
- const Va = "sheets-data-validation-ui.config", bt = {};
582
- var Si = Object.getOwnPropertyDescriptor, Ci = (e, t, n, a) => {
583
- for (var o = a > 1 ? void 0 : a ? Si(t, n) : t, i = e.length - 1, r; i >= 0; i--)
584
- (r = e[i]) && (o = r(o) || o);
603
+ _e = ii([
604
+ kn(0, le),
605
+ kn(1, or)
606
+ ], _e);
607
+ const Sn = "sheets-data-validation-ui.config", Mt = {};
608
+ var ai = Object.getOwnPropertyDescriptor, si = (e, t, r, n) => {
609
+ for (var o = n > 1 ? void 0 : n ? ai(t, r) : t, i = e.length - 1, a; i >= 0; i--)
610
+ (a = e[i]) && (o = a(o) || o);
585
611
  return o;
586
- }, $e = (e, t) => (n, a) => t(n, a, e);
587
- let Je = class extends Ve {
588
- constructor(e, t, n, a, o, i) {
589
- super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = n, this._dialogService = a, this._localeService = o, this._sheetsDataValidationValidatorService = i, this._initEditorBridgeInterceptor();
612
+ }, xe = (e, t) => (r, n) => t(r, n, e);
613
+ let Ze = class extends Re {
614
+ constructor(e, t, r, n, o, i) {
615
+ super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = r, this._dialogService = n, this._localeService = o, this._sheetsDataValidationValidatorService = i, this._initEditorBridgeInterceptor();
590
616
  }
591
617
  _initEditorBridgeInterceptor() {
592
618
  this._sheetInterceptorService.writeCellInterceptor.intercept(
593
- Do,
619
+ Ro,
594
620
  {
595
- handler: async (e, t, n) => {
596
- const a = await e, { row: o, col: i, unitId: r, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(r, l, o, i), d = s ? this._dataValidationModel.getRuleById(r, l, s) : void 0;
597
- if (a === !1)
598
- return n(Promise.resolve(!1));
599
- if (!d || d.errorStyle !== ct.STOP)
600
- return n(Promise.resolve(!0));
601
- const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
602
- return !u || await this._sheetsDataValidationValidatorService.validatorCell(r, l, o, i) === Xe.VALID ? n(Promise.resolve(!0)) : (this._dialogService.open({
621
+ handler: async (e, t, r) => {
622
+ const n = await e, { row: o, col: i, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, o, i), c = s ? this._dataValidationModel.getRuleById(a, l, s) : void 0;
623
+ if (n === !1)
624
+ return r(Promise.resolve(!1));
625
+ if (!c || c.errorStyle !== lt.STOP)
626
+ return r(Promise.resolve(!0));
627
+ const u = this._dataValidatorRegistryService.getValidatorItem(c.type);
628
+ return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, o, i) === je.VALID ? r(Promise.resolve(!0)) : (this._dialogService.open({
603
629
  width: 368,
604
630
  title: {
605
631
  title: this._localeService.t("dataValidation.alert.title")
606
632
  },
607
633
  id: "reject-input-dialog",
608
634
  children: {
609
- title: u.getRuleFinalError(d, { row: o, col: i, unitId: r, subUnitId: l })
635
+ title: u.getRuleFinalError(c, { row: o, col: i, unitId: a, subUnitId: l })
610
636
  },
611
637
  footer: {
612
- title: Ta.createElement(
613
- Ge,
638
+ title: En.createElement(
639
+ ze,
614
640
  {
615
641
  variant: "primary",
616
642
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -621,7 +647,7 @@ let Je = class extends Ve {
621
647
  onClose: () => {
622
648
  this._dialogService.close("reject-input-dialog");
623
649
  }
624
- }), n(Promise.resolve(!1)));
650
+ }), r(Promise.resolve(!1)));
625
651
  }
626
652
  }
627
653
  );
@@ -637,8 +663,8 @@ let Je = class extends Ve {
637
663
  title: e
638
664
  },
639
665
  footer: {
640
- title: Ta.createElement(
641
- Ge,
666
+ title: En.createElement(
667
+ ze,
642
668
  {
643
669
  variant: "primary",
644
670
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -652,31 +678,31 @@ let Je = class extends Ve {
652
678
  });
653
679
  }
654
680
  };
655
- Je = Ci([
656
- $e(0, y(Ra)),
657
- $e(1, y(te)),
658
- $e(2, y(ye)),
659
- $e(3, co),
660
- $e(4, y(le)),
661
- $e(5, y(eo))
662
- ], Je);
663
- var Ii = Object.getOwnPropertyDescriptor, Ri = (e, t, n, a) => {
664
- for (var o = a > 1 ? void 0 : a ? Ii(t, n) : t, i = e.length - 1, r; i >= 0; i--)
665
- (r = e[i]) && (o = r(o) || o);
681
+ Ze = si([
682
+ xe(0, M(vn)),
683
+ xe(1, M(ee)),
684
+ xe(2, M(ye)),
685
+ xe(3, io),
686
+ xe(4, M(se)),
687
+ xe(5, M(Zr))
688
+ ], Ze);
689
+ var li = Object.getOwnPropertyDescriptor, ci = (e, t, r, n) => {
690
+ for (var o = n > 1 ? void 0 : n ? li(t, r) : t, i = e.length - 1, a; i >= 0; i--)
691
+ (a = e[i]) && (o = a(o) || o);
666
692
  return o;
667
- }, he = (e, t) => (n, a) => t(n, a, e);
668
- const Wt = (e) => {
693
+ }, ue = (e, t) => (r, n) => t(r, n, e);
694
+ const Ft = (e) => {
669
695
  if (e == null || typeof e == "boolean")
670
696
  return;
671
697
  if (typeof e == "number" || !Number.isNaN(+e))
672
- return Da(Xa.format("yyyy-MM-dd HH:mm:ss", Number(e)));
673
- const t = Da(e);
698
+ return wn(Hn.format("yyyy-MM-dd HH:mm:ss", Number(e)));
699
+ const t = wn(e);
674
700
  if (t.isValid())
675
701
  return t;
676
702
  };
677
- function wi(e, t) {
678
- const n = To(t);
679
- if (e === n)
703
+ function di(e, t) {
704
+ const r = Eo(t);
705
+ if (e === r)
680
706
  return t;
681
707
  switch (e) {
682
708
  case "datetime":
@@ -687,15 +713,15 @@ function wi(e, t) {
687
713
  return "HH:mm:ss";
688
714
  }
689
715
  }
690
- let Pe = class extends Ve {
691
- constructor(t, n, a, o, i, r, l, s, d, u, h) {
716
+ let Ae = class extends Re {
717
+ constructor(t, r, n, o, i, a, l, s, c, u, h) {
692
718
  super();
693
- D(this, "_activeDropdown");
694
- D(this, "_activeDropdown$", new _o());
695
- D(this, "_currentPopup", null);
696
- D(this, "activeDropdown$", this._activeDropdown$.asObservable());
697
- D(this, "_zenVisible", !1);
698
- this._univerInstanceService = t, this._dataValidatorRegistryService = n, this._zenZoneService = a, this._dataValidationModel = o, this._sheetsSelectionsService = i, this._cellDropdownManagerService = r, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = d, this._injector = u, this._configService = h, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
719
+ E(this, "_activeDropdown");
720
+ E(this, "_activeDropdown$", new go());
721
+ E(this, "_currentPopup", null);
722
+ E(this, "activeDropdown$", this._activeDropdown$.asObservable());
723
+ E(this, "_zenVisible", !1);
724
+ this._univerInstanceService = t, this._dataValidatorRegistryService = r, this._zenZoneService = n, this._dataValidationModel = o, this._sheetsSelectionsService = i, this._cellDropdownManagerService = a, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = c, this._injector = u, this._configService = h, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
699
725
  this._activeDropdown$.complete();
700
726
  });
701
727
  }
@@ -707,14 +733,14 @@ let Pe = class extends Ve {
707
733
  this._zenVisible = t, t && this.hideDropdown();
708
734
  }));
709
735
  }
710
- _getDropdownByCell(t, n, a, o) {
711
- const i = t ? this._univerInstanceService.getUnit(t, x.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(x.UNIVER_SHEET);
736
+ _getDropdownByCell(t, r, n, o) {
737
+ const i = t ? this._univerInstanceService.getUnit(t, W.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(W.UNIVER_SHEET);
712
738
  if (!i)
713
739
  return;
714
- const r = n ? i.getSheetBySheetId(n) : i.getActiveSheet();
715
- if (!r)
740
+ const a = r ? i.getSheetBySheetId(r) : i.getActiveSheet();
741
+ if (!a)
716
742
  return;
717
- const l = this._dataValidationModel.getRuleByLocation(i.getUnitId(), r.getSheetId(), a, o);
743
+ const l = this._dataValidationModel.getRuleByLocation(i.getUnitId(), a.getSheetId(), n, o);
718
744
  if (!l)
719
745
  return;
720
746
  const s = this._dataValidatorRegistryService.getValidatorItem(l.type);
@@ -722,76 +748,76 @@ let Pe = class extends Ve {
722
748
  }
723
749
  _initSelectionChange() {
724
750
  this.disposeWithMe(this._sheetsSelectionsService.selectionMoveEnd$.subscribe((t) => {
725
- t && t.every((n) => !(n.primary && this._getDropdownByCell(n.primary.unitId, n.primary.sheetId, n.primary.actualRow, n.primary.actualColumn))) && this.hideDropdown();
751
+ t && t.every((r) => !(r.primary && this._getDropdownByCell(r.primary.unitId, r.primary.sheetId, r.primary.actualRow, r.primary.actualColumn))) && this.hideDropdown();
726
752
  }));
727
753
  }
728
754
  // eslint-disable-next-line max-lines-per-function, complexity
729
755
  showDropdown(t) {
730
- var M, V, p, f;
731
- const { location: n } = t, { row: a, col: o, unitId: i, subUnitId: r, workbook: l, worksheet: s } = n;
756
+ var b, y, g, f;
757
+ const { location: r } = t, { row: n, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = r;
732
758
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
733
759
  return;
734
760
  this._activeDropdown = t, this._activeDropdown$.next(this._activeDropdown);
735
- const d = this._sheetDataValidationModel.getRuleByLocation(i, r, a, o);
736
- if (!d)
761
+ const c = this._sheetDataValidationModel.getRuleByLocation(i, a, n, o);
762
+ if (!c)
737
763
  return;
738
- const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
764
+ const u = this._dataValidatorRegistryService.getValidatorItem(c.type);
739
765
  if (!(u != null && u.dropdownType))
740
766
  return;
741
767
  let h;
742
- const c = async (g, I) => {
743
- var A, P, O;
744
- if (!g)
768
+ const d = async (m, I) => {
769
+ var P, L, O;
770
+ if (!m)
745
771
  return !0;
746
- const R = g, C = s.getCell(a, o), w = R.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), E = (A = Xa.parseDate(w)) == null ? void 0 : A.v, F = I === "time" ? E % 1 : E, b = l.getStyles().getStyleByCell(C), L = (O = (P = b == null ? void 0 : b.n) == null ? void 0 : P.pattern) != null ? O : "";
747
- return d.errorStyle !== ct.STOP || await u.validator({
748
- value: F,
772
+ const w = m, C = s.getCell(n, o), R = w.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), D = (P = Hn.parseDate(R)) == null ? void 0 : P.v, k = I === "time" ? D % 1 : D, V = l.getStyles().getStyleByCell(C), A = (O = (L = V == null ? void 0 : V.n) == null ? void 0 : L.pattern) != null ? O : "";
773
+ return c.errorStyle !== lt.STOP || await u.validator({
774
+ value: k,
749
775
  unitId: i,
750
- subUnitId: r,
751
- row: a,
776
+ subUnitId: a,
777
+ row: n,
752
778
  column: o,
753
779
  worksheet: s,
754
780
  workbook: l,
755
- interceptValue: w.replace("Z", "").replace("T", " "),
756
- t: Hn.NUMBER
757
- }, d) ? (await this._commandService.executeCommand(ft.id, {
781
+ interceptValue: R.replace("Z", "").replace("T", " "),
782
+ t: Ur.NUMBER
783
+ }, c) ? (await this._commandService.executeCommand(gt.id, {
758
784
  visible: !1,
759
- eventType: gt.Keyboard,
785
+ eventType: pt.Keyboard,
760
786
  unitId: i,
761
- keycode: pt.ESC
762
- }), await this._commandService.executeCommand(dt.id, {
787
+ keycode: ht.ESC
788
+ }), await this._commandService.executeCommand(st.id, {
763
789
  unitId: i,
764
- subUnitId: r,
790
+ subUnitId: a,
765
791
  range: {
766
792
  startColumn: o,
767
793
  endColumn: o,
768
- startRow: a,
769
- endRow: a
794
+ startRow: n,
795
+ endRow: n
770
796
  },
771
797
  value: {
772
- v: F,
798
+ v: k,
773
799
  t: 2,
774
800
  p: null,
775
801
  f: null,
776
802
  si: null,
777
803
  s: {
778
804
  n: {
779
- pattern: wi(I, L)
805
+ pattern: di(I, A)
780
806
  }
781
807
  }
782
808
  }
783
- }), !0) : (this._injector.has(Je) && this._injector.get(Je).showReject(u.getRuleFinalError(d, { row: a, col: o, unitId: i, subUnitId: r })), !1);
809
+ }), !0) : (this._injector.has(Ze) && this._injector.get(Ze).showReject(u.getRuleFinalError(c, { row: n, col: o, unitId: i, subUnitId: a })), !1);
784
810
  };
785
811
  let S;
786
812
  switch (u.dropdownType) {
787
813
  case pe.DATE: {
788
- const g = ee(s.getCellRaw(a, o)), I = Wt(g), R = !!((M = d.bizInfo) != null && M.showTime);
814
+ const m = Q(s.getCellRaw(n, o)), I = Ft(m), w = !!((b = c.bizInfo) != null && b.showTime);
789
815
  S = {
790
- location: n,
816
+ location: r,
791
817
  type: "datepicker",
792
818
  props: {
793
- showTime: R,
794
- onChange: (C) => c(C, R ? "datetime" : "date"),
819
+ showTime: w,
820
+ onChange: (C) => d(C, w ? "datetime" : "date"),
795
821
  defaultValue: I,
796
822
  patternType: "date"
797
823
  }
@@ -799,12 +825,12 @@ let Pe = class extends Ve {
799
825
  break;
800
826
  }
801
827
  case pe.TIME: {
802
- const g = ee(s.getCellRaw(a, o)), I = Wt(g);
828
+ const m = Q(s.getCellRaw(n, o)), I = Ft(m);
803
829
  S = {
804
- location: n,
830
+ location: r,
805
831
  type: "datepicker",
806
832
  props: {
807
- onChange: (R) => c(R, "time"),
833
+ onChange: (w) => d(w, "time"),
808
834
  defaultValue: I,
809
835
  patternType: "time"
810
836
  }
@@ -812,12 +838,12 @@ let Pe = class extends Ve {
812
838
  break;
813
839
  }
814
840
  case pe.DATETIME: {
815
- const g = ee(s.getCellRaw(a, o)), I = Wt(g);
841
+ const m = Q(s.getCellRaw(n, o)), I = Ft(m);
816
842
  S = {
817
- location: n,
843
+ location: r,
818
844
  type: "datepicker",
819
845
  props: {
820
- onChange: (R) => c(R, "datetime"),
846
+ onChange: (w) => d(w, "datetime"),
821
847
  defaultValue: I,
822
848
  patternType: "datetime"
823
849
  }
@@ -826,48 +852,48 @@ let Pe = class extends Ve {
826
852
  }
827
853
  case pe.LIST:
828
854
  case pe.MULTIPLE_LIST: {
829
- const g = u.dropdownType === pe.MULTIPLE_LIST, I = async (b) => {
830
- const L = Ja(b), A = {
855
+ const m = u.dropdownType === pe.MULTIPLE_LIST, I = async (V) => {
856
+ const A = Kn(V), P = {
831
857
  unitId: i,
832
- subUnitId: r,
858
+ subUnitId: a,
833
859
  range: {
834
860
  startColumn: o,
835
861
  endColumn: o,
836
- startRow: a,
837
- endRow: a
862
+ startRow: n,
863
+ endRow: n
838
864
  },
839
865
  value: {
840
- v: L,
866
+ v: A,
841
867
  p: null,
842
868
  f: null,
843
869
  si: null
844
870
  }
845
871
  };
846
- return this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(ft.id, {
872
+ return this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(gt.id, {
847
873
  visible: !1,
848
- eventType: gt.Keyboard,
874
+ eventType: pt.Keyboard,
849
875
  unitId: i,
850
- keycode: pt.ESC
851
- }), this._commandService.executeCommand(dt.id, A), !g;
852
- }, R = (d == null ? void 0 : d.renderMode) === ie.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, C = u.getListWithColor(d, i, r), w = Bt(s.getCellRaw(a, o)), E = () => {
853
- this._commandService.executeCommand(Be.id, {
854
- ruleId: d.uid
876
+ keycode: ht.ESC
877
+ }), this._commandService.executeCommand(st.id, P), !m;
878
+ }, w = (c == null ? void 0 : c.renderMode) === oe.CUSTOM || (c == null ? void 0 : c.renderMode) === void 0, C = u.getListWithColor(c, i, a), R = kt(s.getCellRaw(n, o)), D = () => {
879
+ this._commandService.executeCommand(Fe.id, {
880
+ ruleId: c.uid
855
881
  }), h == null || h.dispose();
856
- }, F = C.map((b) => ({
857
- label: b.label,
858
- value: b.label,
859
- color: R || b.color ? b.color : "transparent"
882
+ }, k = C.map((V) => ({
883
+ label: V.label,
884
+ value: V.label,
885
+ color: w || V.color ? V.color : "transparent"
860
886
  }));
861
887
  S = {
862
- location: n,
888
+ location: r,
863
889
  type: "list",
864
890
  props: {
865
- onChange: (b) => I(b),
866
- options: F,
867
- onEdit: E,
868
- defaultValue: w,
869
- multiple: g,
870
- showEdit: (p = (V = this._configService.getConfig(Va)) == null ? void 0 : V.showEditOnDropdown) != null ? p : !0
891
+ onChange: (V) => I(V),
892
+ options: k,
893
+ onEdit: D,
894
+ defaultValue: R,
895
+ multiple: m,
896
+ showEdit: (g = (y = this._configService.getConfig(Sn)) == null ? void 0 : y.showEditOnDropdown) != null ? g : !0
871
897
  }
872
898
  };
873
899
  break;
@@ -877,14 +903,14 @@ let Pe = class extends Ve {
877
903
  type: "cascader",
878
904
  props: {
879
905
  onChange: (I) => {
880
- const R = {
906
+ const w = {
881
907
  unitId: i,
882
- subUnitId: r,
908
+ subUnitId: a,
883
909
  range: {
884
910
  startColumn: o,
885
911
  endColumn: o,
886
- startRow: a,
887
- endRow: a
912
+ startRow: n,
913
+ endRow: n
888
914
  },
889
915
  value: {
890
916
  v: I.join("/"),
@@ -893,17 +919,17 @@ let Pe = class extends Ve {
893
919
  si: null
894
920
  }
895
921
  };
896
- return this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(ft.id, {
922
+ return this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(gt.id, {
897
923
  visible: !1,
898
- eventType: gt.Keyboard,
924
+ eventType: pt.Keyboard,
899
925
  unitId: i,
900
- keycode: pt.ESC
901
- }), this._commandService.syncExecuteCommand(dt.id, R), !0;
926
+ keycode: ht.ESC
927
+ }), this._commandService.syncExecuteCommand(st.id, w), !0;
902
928
  },
903
- defaultValue: Bt(s.getCellRaw(a, o)).split("/"),
904
- options: JSON.parse((f = d.formula1) != null ? f : "[]")
929
+ defaultValue: kt(s.getCellRaw(n, o)).split("/"),
930
+ options: JSON.parse((f = c.formula1) != null ? f : "[]")
905
931
  },
906
- location: n
932
+ location: r
907
933
  };
908
934
  break;
909
935
  }
@@ -912,14 +938,14 @@ let Pe = class extends Ve {
912
938
  type: "color",
913
939
  props: {
914
940
  onChange: (I) => {
915
- const R = {
941
+ const w = {
916
942
  unitId: i,
917
- subUnitId: r,
943
+ subUnitId: a,
918
944
  range: {
919
945
  startColumn: o,
920
946
  endColumn: o,
921
- startRow: a,
922
- endRow: a
947
+ startRow: n,
948
+ endRow: n
923
949
  },
924
950
  value: {
925
951
  v: I,
@@ -928,16 +954,16 @@ let Pe = class extends Ve {
928
954
  si: null
929
955
  }
930
956
  };
931
- return this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(ft.id, {
957
+ return this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(gt.id, {
932
958
  visible: !1,
933
- eventType: gt.Keyboard,
959
+ eventType: pt.Keyboard,
934
960
  unitId: i,
935
- keycode: pt.ESC
936
- }), this._commandService.syncExecuteCommand(dt.id, R), !0;
961
+ keycode: ht.ESC
962
+ }), this._commandService.syncExecuteCommand(st.id, w), !0;
937
963
  },
938
- defaultValue: Bt(s.getCellRaw(a, o))
964
+ defaultValue: kt(s.getCellRaw(n, o))
939
965
  },
940
- location: n
966
+ location: r
941
967
  };
942
968
  break;
943
969
  }
@@ -946,157 +972,157 @@ let Pe = class extends Ve {
946
972
  }
947
973
  if (h = this._cellDropdownManagerService.showDropdown(S), !h)
948
974
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
949
- const m = new $n();
950
- m.add(h), m.add({
975
+ const p = new Nr();
976
+ p.add(h), p.add({
951
977
  dispose: () => {
952
- var g, I;
953
- (I = (g = this._activeDropdown) == null ? void 0 : g.onHide) == null || I.call(g);
978
+ var m, I;
979
+ (I = (m = this._activeDropdown) == null ? void 0 : m.onHide) == null || I.call(m);
954
980
  }
955
- }), this._currentPopup = m;
981
+ }), this._currentPopup = p;
956
982
  }
957
983
  hideDropdown() {
958
984
  this._activeDropdown && (this._currentPopup && this._currentPopup.dispose(), this._currentPopup = null, this._activeDropdown = null, this._activeDropdown$.next(null));
959
985
  }
960
- showDataValidationDropdown(t, n, a, o, i) {
961
- const r = this._univerInstanceService.getUnit(t, x.UNIVER_SHEET);
962
- if (!r)
986
+ showDataValidationDropdown(t, r, n, o, i) {
987
+ const a = this._univerInstanceService.getUnit(t, W.UNIVER_SHEET);
988
+ if (!a)
963
989
  return;
964
- const l = r.getSheetBySheetId(n);
990
+ const l = a.getSheetBySheetId(r);
965
991
  if (!l)
966
992
  return;
967
- const s = this._dataValidationModel.getRuleByLocation(r.getUnitId(), l.getSheetId(), a, o);
993
+ const s = this._dataValidationModel.getRuleByLocation(a.getUnitId(), l.getSheetId(), n, o);
968
994
  if (!s)
969
995
  return;
970
- const d = this._dataValidatorRegistryService.getValidatorItem(s.type);
971
- if (!d || !d.dropdownType) {
996
+ const c = this._dataValidatorRegistryService.getValidatorItem(s.type);
997
+ if (!c || !c.dropdownType) {
972
998
  this.hideDropdown();
973
999
  return;
974
1000
  }
975
1001
  this.showDropdown({
976
1002
  location: {
977
- workbook: r,
1003
+ workbook: a,
978
1004
  worksheet: l,
979
- row: a,
1005
+ row: n,
980
1006
  col: o,
981
1007
  unitId: t,
982
- subUnitId: n
1008
+ subUnitId: r
983
1009
  },
984
1010
  onHide: i
985
1011
  });
986
1012
  }
987
1013
  };
988
- Pe = Ri([
989
- he(0, de),
990
- he(1, y(ye)),
991
- he(2, dn),
992
- he(3, y(te)),
993
- he(4, y(pn)),
994
- he(5, y(Ao)),
995
- he(6, y(te)),
996
- he(7, Q),
997
- he(8, _n),
998
- he(9, y(we)),
999
- he(10, ma)
1000
- ], Pe);
1001
- const Ot = "DataValidationPanel", Be = {
1014
+ Ae = ci([
1015
+ ue(0, le),
1016
+ ue(1, M(ye)),
1017
+ ue(2, ir),
1018
+ ue(3, M(ee)),
1019
+ ue(4, M(dr)),
1020
+ ue(5, M(Do)),
1021
+ ue(6, M(ee)),
1022
+ ue(7, J),
1023
+ ue(8, gr),
1024
+ ue(9, M(we)),
1025
+ ue(10, ln)
1026
+ ], Ae);
1027
+ const bt = "DataValidationPanel", Fe = {
1002
1028
  id: "data-validation.operation.open-validation-panel",
1003
- type: ot.OPERATION,
1029
+ type: nt.OPERATION,
1004
1030
  handler(e, t) {
1005
1031
  if (!t)
1006
1032
  return !1;
1007
- const { ruleId: n, isAdd: a } = t, o = e.get(Se), i = e.get(Ca), r = e.get(de), l = e.get(ln), s = gn(r);
1033
+ const { ruleId: r, isAdd: n } = t, o = e.get(_e), i = e.get(mn), a = e.get(le), l = e.get(or), s = ur(a);
1008
1034
  if (!s) return !1;
1009
- const { unitId: d, subUnitId: u } = s, h = n ? i.getRuleById(d, u, n) : void 0;
1035
+ const { unitId: c, subUnitId: u } = s, h = r ? i.getRuleById(c, u, r) : void 0;
1010
1036
  o.open(), o.setActiveRule(h && {
1011
- unitId: d,
1037
+ unitId: c,
1012
1038
  subUnitId: u,
1013
1039
  rule: h
1014
1040
  });
1015
- const c = l.open({
1016
- id: Ot,
1017
- header: { title: a ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
1018
- children: { label: Ot },
1041
+ const d = l.open({
1042
+ id: bt,
1043
+ header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
1044
+ children: { label: bt },
1019
1045
  width: 312,
1020
1046
  onClose: () => o.close()
1021
1047
  });
1022
- return o.setCloseDisposable(c), !0;
1048
+ return o.setCloseDisposable(d), !0;
1023
1049
  }
1024
- }, ya = {
1050
+ }, Cn = {
1025
1051
  id: "data-validation.operation.close-validation-panel",
1026
- type: ot.OPERATION,
1052
+ type: nt.OPERATION,
1027
1053
  handler(e) {
1028
- return e.get(Se).close(), !0;
1054
+ return e.get(_e).close(), !0;
1029
1055
  }
1030
- }, Dn = {
1056
+ }, Rr = {
1031
1057
  id: "data-validation.operation.toggle-validation-panel",
1032
- type: ot.OPERATION,
1058
+ type: nt.OPERATION,
1033
1059
  handler(e) {
1034
- const t = e.get(Q), n = e.get(Se);
1035
- return n.open(), n.isOpen ? t.executeCommand(ya.id) : t.executeCommand(Be.id), !0;
1060
+ const t = e.get(J), r = e.get(_e);
1061
+ return r.open(), r.isOpen ? t.executeCommand(Cn.id) : t.executeCommand(Fe.id), !0;
1036
1062
  }
1037
- }, Nt = {
1038
- type: ot.OPERATION,
1063
+ }, At = {
1064
+ type: nt.OPERATION,
1039
1065
  id: "sheet.operation.show-data-validation-dropdown",
1040
1066
  handler(e, t) {
1041
1067
  if (!t)
1042
1068
  return !1;
1043
- const n = e.get(Pe), { unitId: a, subUnitId: o, row: i, column: r } = t, l = n.activeDropdown, s = l == null ? void 0 : l.location;
1044
- return s && s.unitId === a && s.subUnitId === o && s.row === i && s.col === r || n.showDataValidationDropdown(
1045
- a,
1069
+ const r = e.get(Ae), { unitId: n, subUnitId: o, row: i, column: a } = t, l = r.activeDropdown, s = l == null ? void 0 : l.location;
1070
+ return s && s.unitId === n && s.subUnitId === o && s.row === i && s.col === a || r.showDataValidationDropdown(
1071
+ n,
1046
1072
  o,
1047
1073
  i,
1048
- r
1074
+ a
1049
1075
  ), !0;
1050
1076
  }
1051
- }, En = {
1052
- type: ot.OPERATION,
1077
+ }, yr = {
1078
+ type: nt.OPERATION,
1053
1079
  id: "sheet.operation.hide-data-validation-dropdown",
1054
1080
  handler(e, t) {
1055
- return t ? (e.get(Pe).hideDropdown(), !0) : !1;
1081
+ return t ? (e.get(Ae).hideDropdown(), !0) : !1;
1056
1082
  }
1057
- }, Ut = {
1058
- type: ot.COMMAND,
1083
+ }, Lt = {
1084
+ type: nt.COMMAND,
1059
1085
  id: "data-validation.command.addRuleAndOpen",
1060
1086
  handler(e) {
1061
- const t = e.get(de), n = gn(t);
1062
- if (!n) return !1;
1063
- const { workbook: a, worksheet: o } = n, i = tn(e), r = e.get(Q), l = a.getUnitId(), s = o.getSheetId(), d = {
1087
+ const t = e.get(le), r = ur(t);
1088
+ if (!r) return !1;
1089
+ const { workbook: n, worksheet: o } = r, i = qn(e), a = e.get(J), l = n.getUnitId(), s = o.getSheetId(), c = {
1064
1090
  rule: i,
1065
1091
  unitId: l,
1066
1092
  subUnitId: s
1067
1093
  };
1068
- return r.syncExecuteCommand(fa.id, d) ? (r.syncExecuteCommand(Be.id, {
1094
+ return a.syncExecuteCommand(un.id, c) ? (a.syncExecuteCommand(Fe.id, {
1069
1095
  ruleId: i.uid,
1070
1096
  isAdd: !0
1071
1097
  }), !0) : !1;
1072
1098
  }
1073
1099
  };
1074
- var Vi = Object.getOwnPropertyDescriptor, yi = (e, t, n, a) => {
1075
- for (var o = a > 1 ? void 0 : a ? Vi(t, n) : t, i = e.length - 1, r; i >= 0; i--)
1076
- (r = e[i]) && (o = r(o) || o);
1100
+ var ui = Object.getOwnPropertyDescriptor, hi = (e, t, r, n) => {
1101
+ for (var o = n > 1 ? void 0 : n ? ui(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1102
+ (a = e[i]) && (o = a(o) || o);
1077
1103
  return o;
1078
- }, He = (e, t) => (n, a) => t(n, a, e);
1104
+ }, $e = (e, t) => (r, n) => t(r, n, e);
1079
1105
  const Me = "SHEET_DATA_VALIDATION_ALERT";
1080
- let ht = class extends Ve {
1081
- constructor(e, t, n, a, o, i) {
1082
- super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = n, this._localeService = a, this._zenZoneService = o, this._dataValidationModel = i, this._init();
1106
+ let dt = class extends Re {
1107
+ constructor(e, t, r, n, o, i) {
1108
+ super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = r, this._localeService = n, this._zenZoneService = o, this._dataValidationModel = i, this._init();
1083
1109
  }
1084
1110
  _init() {
1085
1111
  this._initCellAlertPopup(), this._initZenService();
1086
1112
  }
1087
1113
  _initCellAlertPopup() {
1088
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(un(100)).subscribe((e) => {
1114
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(sr(100)).subscribe((e) => {
1089
1115
  var t;
1090
1116
  if (e) {
1091
- const n = this._univerInstanceService.getUnit(e.location.unitId, x.UNIVER_SHEET), a = n.getSheetBySheetId(e.location.subUnitId);
1092
- if (!a) return;
1117
+ const r = this._univerInstanceService.getUnit(e.location.unitId, W.UNIVER_SHEET), n = r.getSheetBySheetId(e.location.subUnitId);
1118
+ if (!n) return;
1093
1119
  const o = this._dataValidationModel.getRuleByLocation(e.location.unitId, e.location.subUnitId, e.location.row, e.location.col);
1094
1120
  if (!o) {
1095
1121
  this._cellAlertManagerService.removeAlert(Me);
1096
1122
  return;
1097
1123
  }
1098
- if (this._dataValidationModel.validator(o, { ...e.location, workbook: n, worksheet: a }) === Xe.INVALID) {
1099
- const r = this._cellAlertManagerService.currentAlert.get(Me), l = (t = r == null ? void 0 : r.alert) == null ? void 0 : t.location;
1124
+ if (this._dataValidationModel.validator(o, { ...e.location, workbook: r, worksheet: n }) === je.INVALID) {
1125
+ const a = this._cellAlertManagerService.currentAlert.get(Me), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
1100
1126
  if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
1101
1127
  this._cellAlertManagerService.removeAlert(Me);
1102
1128
  return;
@@ -1107,7 +1133,7 @@ let ht = class extends Ve {
1107
1133
  return;
1108
1134
  }
1109
1135
  this._cellAlertManagerService.showAlert({
1110
- type: Fo.ERROR,
1136
+ type: To.ERROR,
1111
1137
  title: this._localeService.t("dataValidation.error.title"),
1112
1138
  message: s == null ? void 0 : s.getRuleFinalError(o, e.location),
1113
1139
  location: e.location,
@@ -1127,341 +1153,341 @@ let ht = class extends Ve {
1127
1153
  }));
1128
1154
  }
1129
1155
  };
1130
- ht = yi([
1131
- He(0, y(Lo)),
1132
- He(1, y(Po)),
1133
- He(2, de),
1134
- He(3, y(le)),
1135
- He(4, dn),
1136
- He(5, y(te))
1137
- ], ht);
1138
- var Mi = Object.getOwnPropertyDescriptor, Di = (e, t, n, a) => {
1139
- for (var o = a > 1 ? void 0 : a ? Mi(t, n) : t, i = e.length - 1, r; i >= 0; i--)
1140
- (r = e[i]) && (o = r(o) || o);
1156
+ dt = hi([
1157
+ $e(0, M(Vo)),
1158
+ $e(1, M(Oo)),
1159
+ $e(2, le),
1160
+ $e(3, M(se)),
1161
+ $e(4, ir),
1162
+ $e(5, M(ee))
1163
+ ], dt);
1164
+ var pi = Object.getOwnPropertyDescriptor, gi = (e, t, r, n) => {
1165
+ for (var o = n > 1 ? void 0 : n ? pi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1166
+ (a = e[i]) && (o = a(o) || o);
1141
1167
  return o;
1142
- }, xt = (e, t) => (n, a) => t(n, a, e);
1143
- let Qe = class extends Ve {
1144
- constructor(e, t, n) {
1145
- super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = n, this._initAutoFill();
1168
+ }, xt = (e, t) => (r, n) => t(r, n, e);
1169
+ let qe = class extends Re {
1170
+ constructor(e, t, r) {
1171
+ super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = r, this._initAutoFill();
1146
1172
  }
1147
1173
  // eslint-disable-next-line max-lines-per-function
1148
1174
  _initAutoFill() {
1149
- const e = () => ({ redos: [], undos: [] }), t = (a, o) => {
1150
- const { source: i, target: r, unitId: l, subUnitId: s } = a, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = la([i, r]), [h, c] = u.ranges, { mapFunc: S } = u, m = {
1175
+ const e = () => ({ redos: [], undos: [] }), t = (n, o) => {
1176
+ const { source: i, target: a, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = nn([i, a]), [h, d] = u.ranges, { mapFunc: S } = u, p = {
1151
1177
  row: h.startRow,
1152
1178
  col: h.startColumn
1153
- }, M = No(h, c), V = new Mt(), p = /* @__PURE__ */ new Set();
1154
- M.forEach((C) => {
1155
- const w = C.repeatStartCell, E = C.relativeRange, F = {
1156
- startRow: m.row,
1157
- startColumn: m.col,
1158
- endColumn: m.col,
1159
- endRow: m.row
1160
- }, b = {
1161
- startRow: w.row,
1162
- startColumn: w.col,
1163
- endColumn: w.col,
1164
- endRow: w.row
1179
+ }, b = Ao(h, d), y = new wt(), g = /* @__PURE__ */ new Set();
1180
+ b.forEach((C) => {
1181
+ const R = C.repeatStartCell, D = C.relativeRange, k = {
1182
+ startRow: p.row,
1183
+ startColumn: p.col,
1184
+ endColumn: p.col,
1185
+ endRow: p.row
1186
+ }, V = {
1187
+ startRow: R.row,
1188
+ startColumn: R.col,
1189
+ endColumn: R.col,
1190
+ endRow: R.row
1165
1191
  };
1166
- Wn.foreach(E, (L, A) => {
1167
- const P = Dt.getPositionRange(
1192
+ Fr.foreach(D, (A, P) => {
1193
+ const L = Rt.getPositionRange(
1168
1194
  {
1169
- startRow: L,
1170
- startColumn: A,
1171
- endColumn: A,
1172
- endRow: L
1195
+ startRow: A,
1196
+ startColumn: P,
1197
+ endColumn: P,
1198
+ endRow: A
1173
1199
  },
1174
- F
1175
- ), { row: O, col: U } = S(P.startRow, P.startColumn), B = this._sheetDataValidationModel.getRuleIdByLocation(l, s, O, U) || "", j = Dt.getPositionRange(
1200
+ k
1201
+ ), { row: O, col: F } = S(L.startRow, L.startColumn), x = this._sheetDataValidationModel.getRuleIdByLocation(l, s, O, F) || "", j = Rt.getPositionRange(
1176
1202
  {
1177
- startRow: L,
1178
- startColumn: A,
1179
- endColumn: A,
1180
- endRow: L
1203
+ startRow: A,
1204
+ startColumn: P,
1205
+ endColumn: P,
1206
+ endRow: A
1181
1207
  },
1182
- b
1208
+ V
1183
1209
  ), { row: Z, col: Y } = S(j.startRow, j.startColumn);
1184
- V.setValue(Z, Y, B), p.add(B);
1210
+ y.setValue(Z, Y, x), g.add(x);
1185
1211
  });
1186
1212
  });
1187
- const f = Array.from(p).map((C) => ({ id: C, ranges: ea(V, (w) => w === C) }));
1188
- d.addRangeRules(f);
1189
- const g = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: R } = ta(l, s, g, this._injector, "patched", o === st.ONLY_FORMAT);
1213
+ const f = Array.from(g).map((C) => ({ id: C, ranges: Gt(y, (R) => R === C) }));
1214
+ c.addRangeRules(f);
1215
+ const m = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: w } = Zt(l, s, m, this._injector, "patched", o === it.ONLY_FORMAT);
1190
1216
  return {
1191
- undos: R,
1217
+ undos: w,
1192
1218
  redos: I
1193
1219
  };
1194
- }, n = {
1195
- id: an,
1196
- onBeforeFillData: (a) => {
1197
- const { source: o, unitId: i, subUnitId: r } = a;
1220
+ }, r = {
1221
+ id: Jn,
1222
+ onBeforeFillData: (n) => {
1223
+ const { source: o, unitId: i, subUnitId: a } = n;
1198
1224
  for (const l of o.rows)
1199
1225
  for (const s of o.cols) {
1200
- const d = this._sheetDataValidationModel.getRuleByLocation(i, r, l, s);
1201
- if (d && d.type === G.CHECKBOX) {
1202
- this._autoFillService.setDisableApplyType(st.SERIES, !0);
1226
+ const c = this._sheetDataValidationModel.getRuleByLocation(i, a, l, s);
1227
+ if (c && c.type === G.CHECKBOX) {
1228
+ this._autoFillService.setDisableApplyType(it.SERIES, !0);
1203
1229
  return;
1204
1230
  }
1205
1231
  }
1206
1232
  },
1207
- onFillData: (a, o, i) => i === st.COPY || i === st.ONLY_FORMAT || i === st.SERIES ? t(a, i) : e(),
1233
+ onFillData: (n, o, i) => i === it.COPY || i === it.ONLY_FORMAT || i === it.SERIES ? t(n, i) : e(),
1208
1234
  onAfterFillData: () => {
1209
1235
  }
1210
1236
  };
1211
- this.disposeWithMe(this._autoFillService.addHook(n));
1237
+ this.disposeWithMe(this._autoFillService.addHook(r));
1212
1238
  }
1213
1239
  };
1214
- Qe = Di([
1215
- xt(0, ko),
1216
- xt(1, y(te)),
1217
- xt(2, y(we))
1218
- ], Qe);
1219
- var Ei = Object.getOwnPropertyDescriptor, bi = (e, t, n, a) => {
1220
- for (var o = a > 1 ? void 0 : a ? Ei(t, n) : t, i = e.length - 1, r; i >= 0; i--)
1221
- (r = e[i]) && (o = r(o) || o);
1240
+ qe = gi([
1241
+ xt(0, Po),
1242
+ xt(1, M(ee)),
1243
+ xt(2, M(we))
1244
+ ], qe);
1245
+ var mi = Object.getOwnPropertyDescriptor, fi = (e, t, r, n) => {
1246
+ for (var o = n > 1 ? void 0 : n ? mi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1247
+ (a = e[i]) && (o = a(o) || o);
1222
1248
  return o;
1223
- }, jt = (e, t) => (n, a) => t(n, a, e);
1224
- let et = class extends Ve {
1225
- constructor(t, n, a) {
1249
+ }, $t = (e, t) => (r, n) => t(r, n, e);
1250
+ let Je = class extends Re {
1251
+ constructor(t, r, n) {
1226
1252
  super();
1227
- D(this, "_copyInfo");
1228
- this._sheetClipboardService = t, this._sheetDataValidationModel = n, this._injector = a, this._initCopyPaste();
1253
+ E(this, "_copyInfo");
1254
+ this._sheetClipboardService = t, this._sheetDataValidationModel = r, this._injector = n, this._initCopyPaste();
1229
1255
  }
1230
1256
  _initCopyPaste() {
1231
1257
  this._sheetClipboardService.addClipboardHook({
1232
- id: an,
1233
- onBeforeCopy: (t, n, a) => this._collect(t, n, a),
1234
- onPasteCells: (t, n, a, o) => {
1235
- const { copyType: i = ka.COPY, pasteType: r } = o, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = n;
1236
- return this._generateMutations(s, { copyType: i, pasteType: r, copyRange: l, unitId: d, subUnitId: u });
1258
+ id: Jn,
1259
+ onBeforeCopy: (t, r, n) => this._collect(t, r, n),
1260
+ onPasteCells: (t, r, n, o) => {
1261
+ const { copyType: i = Pn.COPY, pasteType: a } = o, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = r;
1262
+ return this._generateMutations(s, { copyType: i, pasteType: a, copyRange: l, unitId: c, subUnitId: u });
1237
1263
  }
1238
1264
  });
1239
1265
  }
1240
- _collect(t, n, a) {
1241
- const o = new Mt();
1266
+ _collect(t, r, n) {
1267
+ const o = new wt();
1242
1268
  this._copyInfo = {
1243
1269
  unitId: t,
1244
- subUnitId: n,
1270
+ subUnitId: r,
1245
1271
  matrix: o
1246
1272
  };
1247
- const i = this._injector.invoke((s) => Eo(a, s, t, n));
1273
+ const i = this._injector.invoke((s) => yo(n, s, t, r));
1248
1274
  if (!i)
1249
1275
  return;
1250
- const { rows: r, cols: l } = i;
1251
- r.forEach((s, d) => {
1276
+ const { rows: a, cols: l } = i;
1277
+ a.forEach((s, c) => {
1252
1278
  l.forEach((u, h) => {
1253
- const c = this._sheetDataValidationModel.getRuleIdByLocation(t, n, s, u);
1254
- o.setValue(d, h, c != null ? c : "");
1279
+ const d = this._sheetDataValidationModel.getRuleIdByLocation(t, r, s, u);
1280
+ o.setValue(c, h, d != null ? d : "");
1255
1281
  });
1256
1282
  });
1257
1283
  }
1258
1284
  // eslint-disable-next-line max-lines-per-function
1259
- _generateMutations(t, n) {
1285
+ _generateMutations(t, r) {
1260
1286
  if (!this._copyInfo)
1261
1287
  return { redos: [], undos: [] };
1262
- if (n.copyType === ka.CUT)
1288
+ if (r.copyType === Pn.CUT)
1263
1289
  return this._copyInfo = null, { redos: [], undos: [] };
1264
- if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
1290
+ if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !r.copyRange)
1265
1291
  return { redos: [], undos: [] };
1266
1292
  if ([
1267
- vt.SPECIAL_PASTE_COL_WIDTH,
1268
- vt.SPECIAL_PASTE_VALUE,
1269
- vt.SPECIAL_PASTE_FORMAT,
1270
- vt.SPECIAL_PASTE_FORMULA
1271
- ].includes(n.pasteType))
1293
+ mt.SPECIAL_PASTE_COL_WIDTH,
1294
+ mt.SPECIAL_PASTE_VALUE,
1295
+ mt.SPECIAL_PASTE_FORMAT,
1296
+ mt.SPECIAL_PASTE_FORMULA
1297
+ ].includes(r.pasteType))
1272
1298
  return { redos: [], undos: [] };
1273
1299
  const { unitId: o, subUnitId: i } = this._copyInfo;
1274
- if (n.unitId !== o || i !== n.subUnitId) {
1275
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new Mt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = la([n.copyRange, t]), c = Na(d, u, !0), S = /* @__PURE__ */ new Map();
1276
- c.forEach(({ startRange: p }) => {
1300
+ if (r.unitId !== o || i !== r.subUnitId) {
1301
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = nn([r.copyRange, t]), d = An(c, u, !0), S = /* @__PURE__ */ new Map();
1302
+ d.forEach(({ startRange: g }) => {
1277
1303
  var f;
1278
- (f = this._copyInfo) == null || f.matrix.forValue((g, I, R) => {
1279
- const C = Dt.getPositionRange(
1304
+ (f = this._copyInfo) == null || f.matrix.forValue((m, I, w) => {
1305
+ const C = Rt.getPositionRange(
1280
1306
  {
1281
- startRow: g,
1282
- endRow: g,
1307
+ startRow: m,
1308
+ endRow: m,
1283
1309
  startColumn: I,
1284
1310
  endColumn: I
1285
1311
  },
1286
- p
1287
- ), w = `${i}-${R}`, E = this._sheetDataValidationModel.getRuleById(o, i, R);
1288
- !this._sheetDataValidationModel.getRuleById(n.unitId, n.subUnitId, w) && E && S.set(w, { ...E, uid: w });
1289
- const { row: F, col: b } = h(C.startRow, C.startColumn);
1290
- s.add(w), l.setValue(F, b, w);
1312
+ g
1313
+ ), R = `${i}-${w}`, D = this._sheetDataValidationModel.getRuleById(o, i, w);
1314
+ !this._sheetDataValidationModel.getRuleById(r.unitId, r.subUnitId, R) && D && S.set(R, { ...D, uid: R });
1315
+ const { row: k, col: V } = h(C.startRow, C.startColumn);
1316
+ s.add(R), l.setValue(k, V, R);
1291
1317
  });
1292
1318
  });
1293
- const m = Array.from(s).map((p) => ({ id: p, ranges: ea(l, (f) => f === p) }));
1294
- r.addRangeRules(m);
1295
- const { redoMutations: M, undoMutations: V } = ta(
1296
- n.unitId,
1297
- n.subUnitId,
1298
- r.diffWithAddition(this._sheetDataValidationModel.getRules(n.unitId, n.subUnitId), S.values()),
1319
+ const p = Array.from(s).map((g) => ({ id: g, ranges: Gt(l, (f) => f === g) }));
1320
+ a.addRangeRules(p);
1321
+ const { redoMutations: b, undoMutations: y } = Zt(
1322
+ r.unitId,
1323
+ r.subUnitId,
1324
+ a.diffWithAddition(this._sheetDataValidationModel.getRules(r.unitId, r.subUnitId), S.values()),
1299
1325
  this._injector,
1300
1326
  "patched",
1301
1327
  !1
1302
1328
  );
1303
1329
  return {
1304
- redos: M,
1305
- undos: V
1330
+ redos: b,
1331
+ undos: y
1306
1332
  };
1307
1333
  } else {
1308
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new Mt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = la([n.copyRange, t]);
1309
- Na(d, u, !0).forEach(({ startRange: V }) => {
1310
- var p;
1311
- (p = this._copyInfo) == null || p.matrix.forValue((f, g, I) => {
1312
- const R = Dt.getPositionRange(
1334
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = nn([r.copyRange, t]);
1335
+ An(c, u, !0).forEach(({ startRange: y }) => {
1336
+ var g;
1337
+ (g = this._copyInfo) == null || g.matrix.forValue((f, m, I) => {
1338
+ const w = Rt.getPositionRange(
1313
1339
  {
1314
1340
  startRow: f,
1315
1341
  endRow: f,
1316
- startColumn: g,
1317
- endColumn: g
1342
+ startColumn: m,
1343
+ endColumn: m
1318
1344
  },
1319
- V
1320
- ), { row: C, col: w } = h(R.startRow, R.startColumn);
1321
- l.setValue(C, w, I), s.add(I);
1345
+ y
1346
+ ), { row: C, col: R } = h(w.startRow, w.startColumn);
1347
+ l.setValue(C, R, I), s.add(I);
1322
1348
  });
1323
1349
  });
1324
- const S = Array.from(s).map((V) => ({ id: V, ranges: ea(l, (p) => p === V) }));
1325
- r.addRangeRules(S);
1326
- const { redoMutations: m, undoMutations: M } = ta(
1350
+ const S = Array.from(s).map((y) => ({ id: y, ranges: Gt(l, (g) => g === y) }));
1351
+ a.addRangeRules(S);
1352
+ const { redoMutations: p, undoMutations: b } = Zt(
1327
1353
  o,
1328
1354
  i,
1329
- r.diff(this._sheetDataValidationModel.getRules(o, i)),
1355
+ a.diff(this._sheetDataValidationModel.getRules(o, i)),
1330
1356
  this._injector,
1331
1357
  "patched",
1332
1358
  !1
1333
1359
  );
1334
1360
  return {
1335
- redos: m,
1336
- undos: M
1361
+ redos: p,
1362
+ undos: b
1337
1363
  };
1338
1364
  }
1339
1365
  }
1340
1366
  };
1341
- et = bi([
1342
- jt(0, Uo),
1343
- jt(1, y(te)),
1344
- jt(2, y(we))
1345
- ], et);
1346
- var Oi = Object.getOwnPropertyDescriptor, Ti = (e, t, n, a) => {
1347
- for (var o = a > 1 ? void 0 : a ? Oi(t, n) : t, i = e.length - 1, r; i >= 0; i--)
1348
- (r = e[i]) && (o = r(o) || o);
1367
+ Je = fi([
1368
+ $t(0, Lo),
1369
+ $t(1, M(ee)),
1370
+ $t(2, M(we))
1371
+ ], Je);
1372
+ var vi = Object.getOwnPropertyDescriptor, _i = (e, t, r, n) => {
1373
+ for (var o = n > 1 ? void 0 : n ? vi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1374
+ (a = e[i]) && (o = a(o) || o);
1349
1375
  return o;
1350
- }, Yt = (e, t) => (n, a) => t(n, a, e);
1351
- let tt = class extends Ve {
1352
- constructor(e, t, n) {
1353
- super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = n, this._commandExecutedListener();
1376
+ }, Bt = (e, t) => (r, n) => t(r, n, e);
1377
+ let Qe = class extends Re {
1378
+ constructor(e, t, r) {
1379
+ super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = r, this._commandExecutedListener();
1354
1380
  }
1355
1381
  _commandExecutedListener() {
1356
1382
  this.disposeWithMe(
1357
1383
  this._commandService.beforeCommandExecuted((e) => {
1358
- e.id === fa.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1359
- workbookTypes: [sa],
1360
- rangeTypes: [ra],
1361
- worksheetTypes: [oa, ia]
1362
- }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === nn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1363
- workbookTypes: [sa],
1364
- rangeTypes: [ra],
1365
- worksheetTypes: [oa, ia]
1384
+ e.id === un.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1385
+ workbookTypes: [tn],
1386
+ rangeTypes: [en],
1387
+ worksheetTypes: [Jt, Qt]
1388
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === Qn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1389
+ workbookTypes: [tn],
1390
+ rangeTypes: [en],
1391
+ worksheetTypes: [Jt, Qt]
1366
1392
  }, e.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
1367
1393
  })
1368
1394
  );
1369
1395
  }
1370
1396
  };
1371
- tt = Ti([
1372
- Yt(0, y(le)),
1373
- Yt(1, Q),
1374
- Yt(2, y(bo))
1375
- ], tt);
1376
- const bn = "data-validation-single", On = "sheet.menu.data-validation";
1377
- function Ai(e) {
1397
+ Qe = _i([
1398
+ Bt(0, M(se)),
1399
+ Bt(1, J),
1400
+ Bt(2, M(Mo))
1401
+ ], Qe);
1402
+ const Mr = "data-validation-single", br = "sheet.menu.data-validation";
1403
+ function Si(e) {
1378
1404
  return {
1379
- id: On,
1380
- type: _a.SUBITEMS,
1381
- icon: bn,
1405
+ id: br,
1406
+ type: pn.SUBITEMS,
1407
+ icon: Mr,
1382
1408
  tooltip: "dataValidation.title",
1383
- hidden$: uo(e, x.UNIVER_SHEET),
1384
- disabled$: Bo(e, { workbookTypes: [sa], worksheetTypes: [ia, oa], rangeTypes: [ra] })
1409
+ hidden$: ao(e, W.UNIVER_SHEET),
1410
+ disabled$: ko(e, { workbookTypes: [tn], worksheetTypes: [Qt, Jt], rangeTypes: [en] })
1385
1411
  };
1386
1412
  }
1387
- function Li(e) {
1413
+ function Ci(e) {
1388
1414
  return {
1389
- id: Be.id,
1415
+ id: Fe.id,
1390
1416
  title: "dataValidation.panel.title",
1391
- type: _a.BUTTON
1417
+ type: pn.BUTTON
1392
1418
  };
1393
1419
  }
1394
- function Pi(e) {
1420
+ function Ii(e) {
1395
1421
  return {
1396
- id: Ut.id,
1422
+ id: Lt.id,
1397
1423
  title: "dataValidation.panel.add",
1398
- type: _a.BUTTON
1424
+ type: pn.BUTTON
1399
1425
  };
1400
1426
  }
1401
- const Fi = {
1402
- [ho.FORMULAS_INSERT]: {
1403
- [On]: {
1427
+ const wi = {
1428
+ [so.FORMULAS_INSERT]: {
1429
+ [br]: {
1404
1430
  order: 9,
1405
- menuItemFactory: Ai,
1406
- [Be.id]: {
1431
+ menuItemFactory: Si,
1432
+ [Fe.id]: {
1407
1433
  order: 0,
1408
- menuItemFactory: Li
1434
+ menuItemFactory: Ci
1409
1435
  },
1410
- [Ut.id]: {
1436
+ [Lt.id]: {
1411
1437
  order: 1,
1412
- menuItemFactory: Pi
1438
+ menuItemFactory: Ii
1413
1439
  }
1414
1440
  }
1415
1441
  }
1416
1442
  };
1417
- var ki = Object.getOwnPropertyDescriptor, Tn = (e, t, n, a) => {
1418
- for (var o = a > 1 ? void 0 : a ? ki(t, n) : t, i = e.length - 1, r; i >= 0; i--)
1419
- (r = e[i]) && (o = r(o) || o);
1443
+ var Ri = Object.getOwnPropertyDescriptor, Er = (e, t, r, n) => {
1444
+ for (var o = n > 1 ? void 0 : n ? Ri(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1445
+ (a = e[i]) && (o = a(o) || o);
1420
1446
  return o;
1421
- }, X = (e, t) => (n, a) => t(n, a, e);
1422
- const An = {
1447
+ }, X = (e, t) => (r, n) => t(r, n, e);
1448
+ const Dr = {
1423
1449
  tr: {
1424
1450
  size: 6,
1425
1451
  color: "#fe4b4b"
1426
1452
  }
1427
1453
  };
1428
- let at = class extends pa {
1429
- constructor(e, t, n, a, o, i, r, l, s, d, u) {
1430
- super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = n, this._univerInstanceService = a, this._autoHeightController = o, this._dropdownManagerService = i, this._sheetDataValidationModel = r, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = d, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
1454
+ let et = class extends cn {
1455
+ constructor(e, t, r, n, o, i, a, l, s, c, u) {
1456
+ super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = r, this._univerInstanceService = n, this._autoHeightController = o, this._dropdownManagerService = i, this._sheetDataValidationModel = a, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = c, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
1431
1457
  }
1432
1458
  _initMenu() {
1433
- this._menuManagerService.mergeMenu(Fi);
1459
+ this._menuManagerService.mergeMenu(wi);
1434
1460
  }
1435
1461
  _initDropdown() {
1436
1462
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
1437
- var n;
1463
+ var r;
1438
1464
  if (!e.visible) {
1439
- ((n = this._dropdownManagerService.activeDropdown) == null ? void 0 : n.trigger) === "editor-bridge" && this._dropdownManagerService.hideDropdown();
1465
+ ((r = this._dropdownManagerService.activeDropdown) == null ? void 0 : r.trigger) === "editor-bridge" && this._dropdownManagerService.hideDropdown();
1440
1466
  return;
1441
1467
  }
1442
1468
  const t = this._editorBridgeService.getEditCellState();
1443
1469
  if (t) {
1444
- const { unitId: a, sheetId: o, row: i, column: r } = t, l = this._univerInstanceService.getUniverSheetInstance(a);
1470
+ const { unitId: n, sheetId: o, row: i, column: a } = t, l = this._univerInstanceService.getUniverSheetInstance(n);
1445
1471
  if (!l)
1446
1472
  return;
1447
- const s = this._sheetDataValidationModel.getRuleByLocation(a, o, i, r);
1473
+ const s = this._sheetDataValidationModel.getRuleByLocation(n, o, i, a);
1448
1474
  if (!s)
1449
1475
  return;
1450
- const d = this._dataValidatorRegistryService.getValidatorItem(s.type);
1451
- if (!(d != null && d.dropdownType))
1476
+ const c = this._dataValidatorRegistryService.getValidatorItem(s.type);
1477
+ if (!(c != null && c.dropdownType))
1452
1478
  return;
1453
1479
  const u = l.getActiveSheet();
1454
1480
  if (!u) return;
1455
- const h = this._dropdownManagerService.activeDropdown, c = h == null ? void 0 : h.location;
1456
- if (c && c.unitId === a && c.subUnitId === o && c.row === i && c.col === r)
1481
+ const h = this._dropdownManagerService.activeDropdown, d = h == null ? void 0 : h.location;
1482
+ if (d && d.unitId === n && d.subUnitId === o && d.row === i && d.col === a)
1457
1483
  return;
1458
1484
  this._dropdownManagerService.showDropdown(
1459
1485
  {
1460
1486
  location: {
1461
- unitId: a,
1487
+ unitId: n,
1462
1488
  subUnitId: o,
1463
1489
  row: i,
1464
- col: r,
1490
+ col: a,
1465
1491
  workbook: l,
1466
1492
  worksheet: u
1467
1493
  },
@@ -1476,93 +1502,93 @@ let at = class extends pa {
1476
1502
  _initViewModelIntercept() {
1477
1503
  this.disposeWithMe(
1478
1504
  this._sheetInterceptorService.intercept(
1479
- fn.CELL_CONTENT,
1505
+ hr.CELL_CONTENT,
1480
1506
  {
1481
- effect: za.Style,
1507
+ effect: Wn.Style,
1482
1508
  // must be after numfmt
1483
- priority: vn.DATA_VALIDATION,
1509
+ priority: pr.DATA_VALIDATION,
1484
1510
  // eslint-disable-next-line max-lines-per-function, complexity
1485
- handler: (e, t, n) => {
1486
- var p, f, g, I, R;
1487
- const { row: a, col: o, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, r, a, o);
1488
- if (!d)
1489
- return n(e);
1490
- const u = this._sheetDataValidationModel.getRuleById(i, r, d);
1511
+ handler: (e, t, r) => {
1512
+ var g, f, m, I, w;
1513
+ const { row: n, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, a, n, o);
1514
+ if (!c)
1515
+ return r(e);
1516
+ const u = this._sheetDataValidationModel.getRuleById(i, a, c);
1491
1517
  if (!u)
1492
- return n(e);
1493
- const h = (p = this._dataValidationCacheService.getValue(i, r, a, o)) != null ? p : Xe.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), S = t.rawData;
1494
- let m;
1495
- const M = {
1518
+ return r(e);
1519
+ const h = (g = this._dataValidationCacheService.getValue(i, a, n, o)) != null ? g : je.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), S = t.rawData;
1520
+ let p;
1521
+ const b = {
1496
1522
  get value() {
1497
1523
  var C;
1498
- return m !== void 0 || (m = (C = ee(S)) != null ? C : null), m;
1524
+ return p !== void 0 || (p = (C = Q(S)) != null ? C : null), p;
1499
1525
  }
1500
- }, V = {
1526
+ }, y = {
1501
1527
  get value() {
1502
1528
  var C;
1503
- return `${(C = M.value) != null ? C : ""}`;
1529
+ return `${(C = b.value) != null ? C : ""}`;
1504
1530
  }
1505
1531
  };
1506
- return n({
1532
+ return r({
1507
1533
  ...e,
1508
1534
  markers: {
1509
1535
  ...e == null ? void 0 : e.markers,
1510
- ...h === Xe.INVALID ? An : null
1536
+ ...h === je.INVALID ? Dr : null
1511
1537
  },
1512
1538
  customRender: [
1513
1539
  ...(f = e == null ? void 0 : e.customRender) != null ? f : [],
1514
- ...c != null && c.canvasRender ? [c.canvasRender] : []
1540
+ ...d != null && d.canvasRender ? [d.canvasRender] : []
1515
1541
  ],
1516
1542
  fontRenderExtension: {
1517
1543
  ...e == null ? void 0 : e.fontRenderExtension,
1518
- isSkip: ((g = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : g.isSkip) || ((I = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : I.call(c, u, M.value, t))
1544
+ isSkip: ((m = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : m.isSkip) || ((I = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : I.call(d, u, b.value, t))
1519
1545
  },
1520
1546
  interceptorStyle: {
1521
1547
  ...e == null ? void 0 : e.interceptorStyle,
1522
- ...c == null ? void 0 : c.getExtraStyle(u, V.value, {
1548
+ ...d == null ? void 0 : d.getExtraStyle(u, y.value, {
1523
1549
  get style() {
1524
1550
  const C = l.getStyles();
1525
1551
  return (typeof (e == null ? void 0 : e.s) == "string" ? C.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1526
1552
  }
1527
- }, a, o)
1553
+ }, n, o)
1528
1554
  },
1529
1555
  interceptorAutoHeight: () => {
1530
- var F, b, L, A, P, O;
1531
- const C = (b = (F = this._renderManagerService.getRenderById(i)) == null ? void 0 : F.with(Et).getSkeletonParam(r)) == null ? void 0 : b.skeleton;
1556
+ var k, V, A, P, L, O;
1557
+ const C = (V = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(yt).getSkeletonParam(a)) == null ? void 0 : V.skeleton;
1532
1558
  if (!C)
1533
1559
  return;
1534
- const w = C.worksheet.getMergedCell(a, o), E = {
1560
+ const R = C.worksheet.getMergedCell(n, o), D = {
1535
1561
  data: e,
1536
1562
  style: C.getStyles().getStyleByCell(e),
1537
- primaryWithCoord: C.getCellWithCoordByIndex((L = w == null ? void 0 : w.startRow) != null ? L : a, (A = w == null ? void 0 : w.startColumn) != null ? A : o),
1563
+ primaryWithCoord: C.getCellWithCoordByIndex((A = R == null ? void 0 : R.startRow) != null ? A : n, (P = R == null ? void 0 : R.startColumn) != null ? P : o),
1538
1564
  unitId: i,
1539
- subUnitId: r,
1540
- row: a,
1565
+ subUnitId: a,
1566
+ row: n,
1541
1567
  col: o,
1542
1568
  workbook: l,
1543
1569
  worksheet: s
1544
1570
  };
1545
- return (O = (P = c == null ? void 0 : c.canvasRender) == null ? void 0 : P.calcCellAutoHeight) == null ? void 0 : O.call(P, E);
1571
+ return (O = (L = d == null ? void 0 : d.canvasRender) == null ? void 0 : L.calcCellAutoHeight) == null ? void 0 : O.call(L, D);
1546
1572
  },
1547
1573
  interceptorAutoWidth: () => {
1548
- var F, b, L, A, P, O;
1549
- const C = (b = (F = this._renderManagerService.getRenderById(i)) == null ? void 0 : F.with(Et).getSkeletonParam(r)) == null ? void 0 : b.skeleton;
1574
+ var k, V, A, P, L, O;
1575
+ const C = (V = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(yt).getSkeletonParam(a)) == null ? void 0 : V.skeleton;
1550
1576
  if (!C)
1551
1577
  return;
1552
- const w = C.worksheet.getMergedCell(a, o), E = {
1578
+ const R = C.worksheet.getMergedCell(n, o), D = {
1553
1579
  data: e,
1554
1580
  style: C.getStyles().getStyleByCell(e),
1555
- primaryWithCoord: C.getCellWithCoordByIndex((L = w == null ? void 0 : w.startRow) != null ? L : a, (A = w == null ? void 0 : w.startColumn) != null ? A : o),
1581
+ primaryWithCoord: C.getCellWithCoordByIndex((A = R == null ? void 0 : R.startRow) != null ? A : n, (P = R == null ? void 0 : R.startColumn) != null ? P : o),
1556
1582
  unitId: i,
1557
- subUnitId: r,
1558
- row: a,
1583
+ subUnitId: a,
1584
+ row: n,
1559
1585
  col: o,
1560
1586
  workbook: l,
1561
1587
  worksheet: s
1562
1588
  };
1563
- return (O = (P = c == null ? void 0 : c.canvasRender) == null ? void 0 : P.calcCellAutoWidth) == null ? void 0 : O.call(P, E);
1589
+ return (O = (L = d == null ? void 0 : d.canvasRender) == null ? void 0 : L.calcCellAutoWidth) == null ? void 0 : O.call(L, D);
1564
1590
  },
1565
- coverable: ((R = e == null ? void 0 : e.coverable) != null ? R : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
1591
+ coverable: ((w = e == null ? void 0 : e.coverable) != null ? w : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
1566
1592
  });
1567
1593
  }
1568
1594
  }
@@ -1573,97 +1599,97 @@ let at = class extends pa {
1573
1599
  this._sheetDataValidationModel.ruleChange$.pipe(
1574
1600
  // patched data-validation change don't need to re-calc row height
1575
1601
  // re-calc of row height will be triggered precisely by the origin command
1576
- Ia((e) => e.source === "command"),
1577
- hn(100)
1602
+ fn((e) => e.source === "command"),
1603
+ lr(100)
1578
1604
  ).subscribe((e) => {
1579
1605
  if (e.length === 0)
1580
1606
  return;
1581
1607
  const t = [];
1582
- if (e.forEach((n) => {
1583
- var a;
1584
- (n.rule.type === G.LIST_MULTIPLE || n.rule.type === G.LIST) && (a = n.rule) != null && a.ranges && t.push(...n.rule.ranges);
1608
+ if (e.forEach((r) => {
1609
+ var n;
1610
+ (r.rule.type === G.LIST_MULTIPLE || r.rule.type === G.LIST) && (n = r.rule) != null && n.ranges && t.push(...r.rule.ranges);
1585
1611
  }), t.length) {
1586
- const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1587
- Ka(n.redos, this._commandService);
1612
+ const r = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1613
+ jn(r.redos, this._commandService);
1588
1614
  }
1589
1615
  });
1590
1616
  }
1591
1617
  };
1592
- at = Tn([
1593
- X(0, Q),
1594
- X(1, mo),
1618
+ et = Er([
1619
+ X(0, J),
1620
+ X(1, lo),
1595
1621
  X(2, Ne),
1596
- X(3, de),
1597
- X(4, y(Sn)),
1598
- X(5, y(Pe)),
1599
- X(6, y(te)),
1600
- X(7, y(ye)),
1601
- X(8, y(Ra)),
1602
- X(9, y(on)),
1603
- X(10, xn(_n))
1604
- ], at);
1605
- let $a = class extends pa {
1606
- constructor(e, t, n, a, o, i, r) {
1607
- super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = n, this._dataValidatorRegistryService = a, this._sheetInterceptorService = o, this._sheetDataValidationModel = i, this._dataValidationCacheService = r, this._initViewModelIntercept(), this._initAutoHeight();
1622
+ X(3, le),
1623
+ X(4, M(mr)),
1624
+ X(5, M(Ae)),
1625
+ X(6, M(ee)),
1626
+ X(7, M(ye)),
1627
+ X(8, M(vn)),
1628
+ X(9, M(er)),
1629
+ X(10, xr(gr))
1630
+ ], et);
1631
+ let Nn = class extends cn {
1632
+ constructor(e, t, r, n, o, i, a) {
1633
+ super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = r, this._dataValidatorRegistryService = n, this._sheetInterceptorService = o, this._sheetDataValidationModel = i, this._dataValidationCacheService = a, this._initViewModelIntercept(), this._initAutoHeight();
1608
1634
  }
1609
1635
  _initViewModelIntercept() {
1610
1636
  this.disposeWithMe(
1611
1637
  this._sheetInterceptorService.intercept(
1612
- fn.CELL_CONTENT,
1638
+ hr.CELL_CONTENT,
1613
1639
  {
1614
- effect: za.Style,
1640
+ effect: Wn.Style,
1615
1641
  // must be after numfmt
1616
- priority: vn.DATA_VALIDATION,
1642
+ priority: pr.DATA_VALIDATION,
1617
1643
  // eslint-disable-next-line complexity
1618
- handler: (e, t, n) => {
1619
- var V, p, f, g, I;
1620
- const { row: a, col: o, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, r, a, o);
1621
- if (!d)
1622
- return n(e);
1623
- const u = this._sheetDataValidationModel.getRuleById(i, r, d);
1644
+ handler: (e, t, r) => {
1645
+ var y, g, f, m, I;
1646
+ const { row: n, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, a, n, o);
1647
+ if (!c)
1648
+ return r(e);
1649
+ const u = this._sheetDataValidationModel.getRuleById(i, a, c);
1624
1650
  if (!u)
1625
- return n(e);
1626
- const h = (V = this._dataValidationCacheService.getValue(i, r, a, o)) != null ? V : Xe.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), S = s.getCellRaw(a, o), m = ee(S), M = `${m != null ? m : ""}`;
1627
- return n({
1651
+ return r(e);
1652
+ const h = (y = this._dataValidationCacheService.getValue(i, a, n, o)) != null ? y : je.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), S = s.getCellRaw(n, o), p = Q(S), b = `${p != null ? p : ""}`;
1653
+ return r({
1628
1654
  ...e,
1629
1655
  markers: {
1630
1656
  ...e == null ? void 0 : e.markers,
1631
- ...h === Xe.INVALID ? An : null
1657
+ ...h === je.INVALID ? Dr : null
1632
1658
  },
1633
1659
  customRender: [
1634
- ...(p = e == null ? void 0 : e.customRender) != null ? p : [],
1635
- ...c != null && c.canvasRender ? [c.canvasRender] : []
1660
+ ...(g = e == null ? void 0 : e.customRender) != null ? g : [],
1661
+ ...d != null && d.canvasRender ? [d.canvasRender] : []
1636
1662
  ],
1637
1663
  fontRenderExtension: {
1638
1664
  ...e == null ? void 0 : e.fontRenderExtension,
1639
- isSkip: ((f = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : f.isSkip) || ((g = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : g.call(c, u, m, t))
1665
+ isSkip: ((f = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : f.isSkip) || ((m = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : m.call(d, u, p, t))
1640
1666
  },
1641
1667
  interceptorStyle: {
1642
1668
  ...e == null ? void 0 : e.interceptorStyle,
1643
- ...c == null ? void 0 : c.getExtraStyle(u, M, {
1669
+ ...d == null ? void 0 : d.getExtraStyle(u, b, {
1644
1670
  get style() {
1645
- const R = l.getStyles();
1646
- return (typeof (e == null ? void 0 : e.s) == "string" ? R.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1671
+ const w = l.getStyles();
1672
+ return (typeof (e == null ? void 0 : e.s) == "string" ? w.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1647
1673
  }
1648
- }, a, o)
1674
+ }, n, o)
1649
1675
  },
1650
1676
  interceptorAutoHeight: () => {
1651
- var E, F, b, L, A, P;
1652
- const R = (F = (E = this._renderManagerService.getRenderById(i)) == null ? void 0 : E.with(Et).getSkeletonParam(r)) == null ? void 0 : F.skeleton;
1653
- if (!R)
1677
+ var D, k, V, A, P, L;
1678
+ const w = (k = (D = this._renderManagerService.getRenderById(i)) == null ? void 0 : D.with(yt).getSkeletonParam(a)) == null ? void 0 : k.skeleton;
1679
+ if (!w)
1654
1680
  return;
1655
- const C = R.worksheet.getMergedCell(a, o), w = {
1681
+ const C = w.worksheet.getMergedCell(n, o), R = {
1656
1682
  data: e,
1657
- style: R.getStyles().getStyleByCell(e),
1658
- primaryWithCoord: R.getCellWithCoordByIndex((b = C == null ? void 0 : C.startRow) != null ? b : a, (L = C == null ? void 0 : C.startColumn) != null ? L : o),
1683
+ style: w.getStyles().getStyleByCell(e),
1684
+ primaryWithCoord: w.getCellWithCoordByIndex((V = C == null ? void 0 : C.startRow) != null ? V : n, (A = C == null ? void 0 : C.startColumn) != null ? A : o),
1659
1685
  unitId: i,
1660
- subUnitId: r,
1661
- row: a,
1686
+ subUnitId: a,
1687
+ row: n,
1662
1688
  col: o,
1663
1689
  workbook: l,
1664
1690
  worksheet: s
1665
1691
  };
1666
- return (P = (A = c == null ? void 0 : c.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : P.call(A, w);
1692
+ return (L = (P = d == null ? void 0 : d.canvasRender) == null ? void 0 : P.calcCellAutoHeight) == null ? void 0 : L.call(P, R);
1667
1693
  },
1668
1694
  coverable: ((I = e == null ? void 0 : e.coverable) != null ? I : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
1669
1695
  });
@@ -1674,84 +1700,89 @@ let $a = class extends pa {
1674
1700
  }
1675
1701
  _initAutoHeight() {
1676
1702
  this._sheetDataValidationModel.ruleChange$.pipe(
1677
- Ia((e) => e.source === "command"),
1678
- hn(16)
1703
+ fn((e) => e.source === "command"),
1704
+ lr(16)
1679
1705
  ).subscribe((e) => {
1680
1706
  const t = [];
1681
- if (e.forEach((n) => {
1682
- var a;
1683
- (a = n.rule) != null && a.ranges && t.push(...n.rule.ranges);
1707
+ if (e.forEach((r) => {
1708
+ var n;
1709
+ (n = r.rule) != null && n.ranges && t.push(...r.rule.ranges);
1684
1710
  }), t.length) {
1685
- const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1686
- Ka(n.redos, this._commandService);
1711
+ const r = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1712
+ jn(r.redos, this._commandService);
1687
1713
  }
1688
1714
  });
1689
1715
  }
1690
1716
  };
1691
- $a = Tn([
1692
- X(0, Q),
1717
+ Nn = Er([
1718
+ X(0, J),
1693
1719
  X(1, Ne),
1694
- X(2, y(Sn)),
1695
- X(3, y(ye)),
1696
- X(4, y(Ra)),
1697
- X(5, y(te)),
1698
- X(6, y(on))
1699
- ], $a);
1700
- var Ni = Object.getOwnPropertyDescriptor, Ui = (e, t, n, a) => {
1701
- for (var o = a > 1 ? void 0 : a ? Ni(t, n) : t, i = e.length - 1, r; i >= 0; i--)
1702
- (r = e[i]) && (o = r(o) || o);
1720
+ X(2, M(mr)),
1721
+ X(3, M(ye)),
1722
+ X(4, M(vn)),
1723
+ X(5, M(ee)),
1724
+ X(6, M(er))
1725
+ ], Nn);
1726
+ var yi = Object.getOwnPropertyDescriptor, Mi = (e, t, r, n) => {
1727
+ for (var o = n > 1 ? void 0 : n ? yi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1728
+ (a = e[i]) && (o = a(o) || o);
1703
1729
  return o;
1704
- }, Ha = (e, t) => (n, a) => t(n, a, e);
1705
- let Tt = class extends Ve {
1706
- constructor(e, t, n) {
1707
- super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = n, this._initSkeletonChange();
1730
+ }, Un = (e, t) => (r, n) => t(r, n, e);
1731
+ let Et = class extends Re {
1732
+ constructor(e, t, r) {
1733
+ super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = r, this._initSkeletonChange();
1708
1734
  }
1709
1735
  _initSkeletonChange() {
1710
1736
  const e = (t) => {
1711
- var a;
1737
+ var n;
1712
1738
  if (!t.length)
1713
1739
  return;
1714
- const n = /* @__PURE__ */ new Set();
1740
+ const r = /* @__PURE__ */ new Set();
1715
1741
  t.forEach((o) => {
1716
- n.add(o.subUnitId);
1717
- }), n.forEach((o) => {
1742
+ r.add(o.subUnitId);
1743
+ }), r.forEach((o) => {
1718
1744
  var i;
1719
1745
  (i = this._sheetSkeletonManagerService.getSkeletonParam(o)) == null || i.skeleton.makeDirty(!0);
1720
- }), (a = this._context.mainComponent) == null || a.makeForceDirty();
1746
+ }), (n = this._context.mainComponent) == null || n.makeForceDirty();
1721
1747
  };
1722
- this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(jn(16)).subscribe(e));
1748
+ this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe($r(16)).subscribe(e));
1723
1749
  }
1724
1750
  };
1725
- Tt = Ui([
1726
- Ha(1, y(te)),
1727
- Ha(2, y(Et))
1728
- ], Tt);
1729
- const Bi = "univer-data-validation-options-button", $i = "univer-data-validation-options-button-icon", Xt = {
1730
- dataValidationOptionsButton: Bi,
1731
- dataValidationOptionsButtonIcon: $i
1732
- };
1733
- function Hi(e) {
1734
- var d;
1735
- const t = N(le), n = N(Sa), { value: a, onChange: o, extraComponent: i } = e, [r, l] = W(!1), s = i ? n.get(i) : null;
1736
- return /* @__PURE__ */ z(Ke, { children: [
1737
- /* @__PURE__ */ z("div", { className: Xt.dataValidationOptionsButton, onClick: () => l(!r), children: [
1738
- t.t("dataValidation.panel.options"),
1739
- r ? /* @__PURE__ */ _(yn, { className: Xt.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ _(Vn, { className: Xt.dataValidationOptionsButtonIcon })
1740
- ] }),
1741
- r && /* @__PURE__ */ z(Ke, { children: [
1742
- s ? /* @__PURE__ */ _(s, { value: a, onChange: o }) : null,
1751
+ Et = Mi([
1752
+ Un(1, M(ee)),
1753
+ Un(2, M(yt))
1754
+ ], Et);
1755
+ function bi(e) {
1756
+ var c;
1757
+ const t = U(se), r = U(gn), { value: n, onChange: o, extraComponent: i } = e, [a, l] = H(!1), s = i ? r.get(i) : null;
1758
+ return /* @__PURE__ */ z(Xe, { children: [
1759
+ /* @__PURE__ */ z(
1760
+ "div",
1761
+ {
1762
+ className: `
1763
+ univer-mb-3 univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-text-black
1764
+ `,
1765
+ onClick: () => l(!a),
1766
+ children: [
1767
+ t.t("dataValidation.panel.options"),
1768
+ a ? /* @__PURE__ */ _(Ir, { className: "univer-ml-1 univer-text-[8px]" }) : /* @__PURE__ */ _(Cr, { className: "univer-ml-1 univer-text-[8px]" })
1769
+ ]
1770
+ }
1771
+ ),
1772
+ a && /* @__PURE__ */ z(Xe, { children: [
1773
+ s ? /* @__PURE__ */ _(s, { value: n, onChange: o }) : null,
1743
1774
  /* @__PURE__ */ _(
1744
1775
  K,
1745
1776
  {
1746
1777
  label: t.t("dataValidation.panel.invalid"),
1747
1778
  children: /* @__PURE__ */ z(
1748
- va,
1779
+ hn,
1749
1780
  {
1750
- value: `${(d = a.errorStyle) != null ? d : ct.WARNING}`,
1751
- onChange: (u) => o({ ...a, errorStyle: +u }),
1781
+ value: `${(c = n.errorStyle) != null ? c : lt.WARNING}`,
1782
+ onChange: (u) => o({ ...n, errorStyle: +u }),
1752
1783
  children: [
1753
- /* @__PURE__ */ _(Te, { value: `${ct.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1754
- /* @__PURE__ */ _(Te, { value: `${ct.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1784
+ /* @__PURE__ */ _(Oe, { value: `${lt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1785
+ /* @__PURE__ */ _(Oe, { value: `${lt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1755
1786
  ]
1756
1787
  }
1757
1788
  )
@@ -1762,140 +1793,135 @@ function Hi(e) {
1762
1793
  {
1763
1794
  label: t.t("dataValidation.panel.messageInfo"),
1764
1795
  children: /* @__PURE__ */ _(
1765
- kt,
1796
+ Pt,
1766
1797
  {
1767
- checked: a.showErrorMessage,
1798
+ checked: n.showErrorMessage,
1768
1799
  onChange: () => o({
1769
- ...a,
1770
- showErrorMessage: !a.showErrorMessage
1800
+ ...n,
1801
+ showErrorMessage: !n.showErrorMessage
1771
1802
  }),
1772
1803
  children: t.t("dataValidation.panel.showInfo")
1773
1804
  }
1774
1805
  )
1775
1806
  }
1776
1807
  ),
1777
- a.showErrorMessage ? /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(Oe, { value: a.error, onChange: (u) => o({ ...a, error: u }) }) }) : null
1808
+ n.showErrorMessage ? /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(Ve, { value: n.error, onChange: (u) => o({ ...n, error: u }) }) }) : null
1778
1809
  ] })
1779
1810
  ] });
1780
1811
  }
1781
- const Wi = "univer-data-validation-detail", xi = "univer-data-validation-detail-form-item", ji = "univer-data-validation-detail-buttons", Yi = "univer-data-validation-detail-button", We = {
1782
- dataValidationDetail: Wi,
1783
- dataValidationDetailFormItem: xi,
1784
- dataValidationDetailButtons: ji,
1785
- dataValidationDetailButton: Yi
1786
- }, Xi = (e) => Yn(
1787
- async (t, n, a, o) => {
1788
- const i = await e.executeCommand(t, n, a);
1812
+ const Ei = (e) => Br(
1813
+ async (t, r, n, o) => {
1814
+ const i = await e.executeCommand(t, r, n);
1789
1815
  o == null || o(i);
1790
1816
  },
1791
1817
  1e3
1792
1818
  );
1793
- function zi(e, t, n) {
1794
- var a, o, i, r;
1795
- return t ? ((o = (a = e.getUnit(t)) == null ? void 0 : a.getSheetBySheetName(n)) == null ? void 0 : o.getSheetId()) || "" : ((r = (i = e.getCurrentUnitForType(x.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(n)) == null ? void 0 : r.getSheetId()) || "";
1819
+ function Di(e, t, r) {
1820
+ var n, o, i, a;
1821
+ return t ? ((o = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(r)) == null ? void 0 : o.getSheetId()) || "" : ((a = (i = e.getCurrentUnitForType(W.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(r)) == null ? void 0 : a.getSheetId()) || "";
1796
1822
  }
1797
- function Ki() {
1798
- var T, H;
1799
- const [e, t] = W(0), n = N(Se), a = Ae(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: r } = a || {}, l = r.uid, s = N(ye), d = N(de), u = N(Sa), h = N(Q), c = N(Ca), S = N(le), [m, M] = W(r), V = s.getValidatorItem(m.type), [p, f] = W(!1), g = s.getValidatorsByScope(go.SHEET), [I, R] = W(() => m.ranges.map((v) => ({ unitId: "", sheetId: "", range: v }))), C = ut(() => Xi(h), [h]), [w, E] = W(!1), [F, b] = W(!1), L = mt(null), A = N(pn);
1800
- if (Le(() => () => {
1801
- const v = A.getCurrentLastSelection();
1802
- v && A.setSelections([v]);
1803
- }, [A]), Le(() => {
1823
+ function Vi() {
1824
+ var T, B;
1825
+ const [e, t] = H(0), r = U(_e), n = Te(r.activeRule$, r.activeRule), { unitId: o, subUnitId: i, rule: a } = n || {}, l = a.uid, s = U(ye), c = U(le), u = U(gn), h = U(J), d = U(mn), S = U(se), [p, b] = H(a), y = s.getValidatorItem(p.type), [g, f] = H(!1), m = s.getValidatorsByScope(uo.SHEET), [I, w] = H(() => p.ranges.map((v) => ({ unitId: "", sheetId: "", range: v }))), C = ct(() => Ei(h), [h]), [R, D] = H(!1), [k, V] = H(!1), A = ut(null), P = U(dr);
1826
+ if (Pe(() => () => {
1827
+ const v = P.getCurrentLastSelection();
1828
+ v && P.setSelections([v]);
1829
+ }, [P]), Pe(() => {
1804
1830
  h.onCommandExecuted((v) => {
1805
- (v.id === Xn.id || v.id === zn.id) && setTimeout(() => {
1806
- const k = c.getRuleById(o, i, l);
1807
- t(($) => $ + 1), k && (M(k), R(k.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
1831
+ (v.id === Hr.id || v.id === Wr.id) && setTimeout(() => {
1832
+ const N = d.getRuleById(o, i, l);
1833
+ t(($) => $ + 1), N && (b(N), w(N.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
1808
1834
  }, 20);
1809
1835
  });
1810
- }, [h, c, l, i, o]), !V)
1836
+ }, [h, d, l, i, o]), !y)
1811
1837
  return null;
1812
- const P = V.operators, O = V.operatorNames, U = m.operator ? fo.includes(m.operator) : !1, B = () => {
1813
- var v, k, $;
1814
- (k = (v = L.current) == null ? void 0 : v.editor) != null && k.isFocus() && j(($ = L.current) == null ? void 0 : $.getValue()), !(!m.ranges.length || w) && (V.validatorFormula(m, o, i).success ? n.setActiveRule(null) : f(!0));
1815
- }, j = na((v) => {
1816
- const k = v.split(",").filter(Boolean).map(Ho).map((q) => {
1817
- const Ma = q.sheetName;
1818
- if (Ma) {
1819
- const kn = zi(d, q.unitId, Ma);
1820
- return { ...q, sheetId: kn };
1838
+ const L = y.operators, O = y.operatorNames, F = p.operator ? ho.includes(p.operator) : !1, x = () => {
1839
+ var v, N, $;
1840
+ (N = (v = A.current) == null ? void 0 : v.editor) != null && N.isFocus() && j(($ = A.current) == null ? void 0 : $.getValue()), !(!p.ranges.length || R) && (y.validatorFormula(p, o, i).success ? r.setActiveRule(null) : f(!0));
1841
+ }, j = qt((v) => {
1842
+ const N = v.split(",").filter(Boolean).map(Uo).map((q) => {
1843
+ const In = q.sheetName;
1844
+ if (In) {
1845
+ const Pr = Di(c, q.unitId, In);
1846
+ return { ...q, sheetId: Pr };
1821
1847
  }
1822
1848
  return {
1823
1849
  ...q,
1824
1850
  sheetId: ""
1825
1851
  };
1826
1852
  });
1827
- if (Kn(k, I))
1853
+ if (jr(N, I))
1828
1854
  return;
1829
- R(k);
1830
- const $ = k.filter((q) => (!q.unitId || q.unitId === o) && (!q.sheetId || q.sheetId === i)).map((q) => q.range);
1831
- if (M({
1832
- ...m,
1855
+ w(N);
1856
+ const $ = N.filter((q) => (!q.unitId || q.unitId === o) && (!q.sheetId || q.sheetId === i)).map((q) => q.range);
1857
+ if (b({
1858
+ ...p,
1833
1859
  ranges: $
1834
1860
  }), $.length === 0)
1835
1861
  return;
1836
- const Ie = {
1862
+ const Ce = {
1837
1863
  unitId: o,
1838
1864
  subUnitId: i,
1839
1865
  ruleId: l,
1840
1866
  ranges: $
1841
1867
  };
1842
- C(nn.id, Ie);
1868
+ C(Qn.id, Ce);
1843
1869
  }), Z = (v) => {
1844
- if (Ea(v, La(m)))
1870
+ if (Rn(v, Vn(p)))
1845
1871
  return;
1846
- M({
1847
- ...m,
1872
+ b({
1873
+ ...p,
1848
1874
  ...v
1849
1875
  });
1850
- const k = {
1876
+ const N = {
1851
1877
  unitId: o,
1852
1878
  subUnitId: i,
1853
1879
  ruleId: l,
1854
1880
  setting: v
1855
1881
  };
1856
1882
  C(
1857
- ba.id,
1858
- k,
1883
+ yn.id,
1884
+ N,
1859
1885
  void 0
1860
1886
  );
1861
1887
  }, Y = async () => {
1862
- await h.executeCommand(rn.id, {
1888
+ await h.executeCommand(tr.id, {
1863
1889
  ruleId: l,
1864
1890
  unitId: o,
1865
1891
  subUnitId: i
1866
- }), n.setActiveRule(null);
1867
- }, ae = {
1868
- type: m.type,
1869
- operator: m.operator,
1870
- formula1: m.formula1,
1871
- formula2: m.formula2,
1872
- allowBlank: m.allowBlank
1892
+ }), r.setActiveRule(null);
1893
+ }, te = {
1894
+ type: p.type,
1895
+ operator: p.operator,
1896
+ formula1: p.formula1,
1897
+ formula2: p.formula2,
1898
+ allowBlank: p.allowBlank
1873
1899
  }, ge = (v) => {
1874
- const k = s.getValidatorItem(v);
1875
- if (!k)
1900
+ const N = s.getValidatorItem(v);
1901
+ if (!N)
1876
1902
  return;
1877
- const $ = k.operators, Ie = c.getRuleById(o, i, l), q = v === (Ie == null ? void 0 : Ie.type) || v.includes("list") && (Ie != null && Ie.type.includes("list")) ? {
1878
- ...Ie,
1903
+ const $ = N.operators, Ce = d.getRuleById(o, i, l), q = v === (Ce == null ? void 0 : Ce.type) || v.includes("list") && (Ce != null && Ce.type.includes("list")) ? {
1904
+ ...Ce,
1879
1905
  type: v
1880
1906
  } : {
1881
- ...m,
1907
+ ...p,
1882
1908
  type: v,
1883
1909
  operator: $[0],
1884
1910
  formula1: void 0,
1885
1911
  formula2: void 0
1886
1912
  };
1887
- M(q), h.executeCommand(ba.id, {
1913
+ b(q), h.executeCommand(yn.id, {
1888
1914
  unitId: o,
1889
1915
  subUnitId: i,
1890
- ruleId: m.uid,
1891
- setting: La(q)
1916
+ ruleId: p.uid,
1917
+ setting: Vn(q)
1892
1918
  });
1893
- }, ce = u.get(V.formulaInput), ne = ut(() => I.map((v) => Cn(v.range)).join(","), []), ue = Aa(m), Ce = (v) => {
1894
- Ea(v, Aa(m)) || (M({
1895
- ...m,
1919
+ }, ce = u.get(y.formulaInput), ne = ct(() => I.map((v) => fr(v.range)).join(","), []), de = Dn(p), Se = (v) => {
1920
+ Rn(v, Dn(p)) || (b({
1921
+ ...p,
1896
1922
  ...v
1897
1923
  }), C(
1898
- to.id,
1924
+ qr.id,
1899
1925
  {
1900
1926
  unitId: o,
1901
1927
  subUnitId: i,
@@ -1903,256 +1929,285 @@ function Ki() {
1903
1929
  options: v
1904
1930
  }
1905
1931
  ));
1906
- }, fe = P.length && !m.operator;
1907
- return /* @__PURE__ */ z("div", { className: We.dataValidationDetail, children: [
1932
+ }, me = L.length && !p.operator;
1933
+ return /* @__PURE__ */ z("div", { className: "univer-py-4", children: [
1908
1934
  /* @__PURE__ */ _(
1909
1935
  K,
1910
1936
  {
1911
1937
  label: S.t("dataValidation.panel.range"),
1912
- error: !m.ranges.length || w ? S.t("dataValidation.panel.rangeError") : "",
1938
+ error: !p.ranges.length || R ? S.t("dataValidation.panel.rangeError") : "",
1913
1939
  children: /* @__PURE__ */ _(
1914
- po,
1940
+ co,
1915
1941
  {
1916
- selectorRef: L,
1942
+ selectorRef: A,
1917
1943
  unitId: o,
1918
1944
  subUnitId: i,
1919
1945
  initialValue: ne,
1920
- onChange: (v, k) => {
1946
+ onChange: (v, N) => {
1921
1947
  var $;
1922
- !F && (($ = L.current) != null && $.verify()) && j(k);
1948
+ !k && (($ = A.current) != null && $.verify()) && j(N);
1923
1949
  },
1924
- onFocusChange: (v, k) => {
1950
+ onFocusChange: (v, N) => {
1925
1951
  var $;
1926
- b(v), !v && k && (($ = L.current) != null && $.verify()) && j(k);
1952
+ V(v), !v && N && (($ = A.current) != null && $.verify()) && j(N);
1927
1953
  },
1928
- onVerify: (v) => E(!v)
1954
+ onVerify: (v) => D(!v)
1929
1955
  }
1930
1956
  )
1931
1957
  }
1932
1958
  ),
1933
1959
  /* @__PURE__ */ _(K, { label: S.t("dataValidation.panel.type"), children: /* @__PURE__ */ _(
1934
- aa,
1960
+ bn,
1935
1961
  {
1936
- options: (T = g == null ? void 0 : g.sort((v, k) => v.order - k.order)) == null ? void 0 : T.map((v) => ({
1962
+ className: "univer-w-full",
1963
+ value: p.type,
1964
+ options: (T = m == null ? void 0 : m.sort((v, N) => v.order - N.order)) == null ? void 0 : T.map((v) => ({
1937
1965
  label: S.t(v.title),
1938
1966
  value: v.id
1939
1967
  })),
1940
- value: m.type,
1941
- onChange: ge,
1942
- className: We.dataValidationDetailFormItem
1968
+ onChange: ge
1943
1969
  }
1944
1970
  ) }),
1945
- P != null && P.length ? /* @__PURE__ */ _(K, { label: S.t("dataValidation.panel.operator"), children: /* @__PURE__ */ _(
1946
- aa,
1971
+ L != null && L.length ? /* @__PURE__ */ _(K, { label: S.t("dataValidation.panel.operator"), children: /* @__PURE__ */ _(
1972
+ bn,
1947
1973
  {
1974
+ className: "univer-w-full",
1975
+ value: `${p.operator}`,
1948
1976
  options: [
1949
1977
  {
1950
1978
  value: "",
1951
1979
  label: S.t("dataValidation.operators.legal")
1952
1980
  },
1953
- ...P.map((v, k) => ({
1981
+ ...L.map((v, N) => ({
1954
1982
  value: `${v}`,
1955
- label: O[k]
1983
+ label: O[N]
1956
1984
  }))
1957
1985
  ],
1958
- value: `${m.operator}`,
1959
1986
  onChange: (v) => {
1960
1987
  Z({
1961
- ...ae,
1988
+ ...te,
1962
1989
  operator: v
1963
1990
  });
1964
- },
1965
- className: We.dataValidationDetailFormItem
1991
+ }
1966
1992
  }
1967
1993
  ) }) : null,
1968
- ce && !fe ? /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
1994
+ ce && !me ? /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
1969
1995
  ce,
1970
1996
  {
1971
- isTwoFormula: U,
1997
+ isTwoFormula: F,
1972
1998
  value: {
1973
- formula1: m.formula1,
1974
- formula2: m.formula2
1999
+ formula1: p.formula1,
2000
+ formula2: p.formula2
1975
2001
  },
1976
2002
  onChange: (v) => {
1977
2003
  Z({
1978
- ...ae,
2004
+ ...te,
1979
2005
  ...v
1980
2006
  });
1981
2007
  },
1982
- showError: p,
1983
- validResult: V.validatorFormula(m, o, i),
2008
+ showError: g,
2009
+ validResult: y.validatorFormula(p, o, i),
1984
2010
  unitId: o,
1985
2011
  subUnitId: i,
1986
2012
  ruleId: l
1987
2013
  },
1988
- e + m.type
2014
+ e + p.type
1989
2015
  ) }) : null,
1990
2016
  /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
1991
- kt,
2017
+ Pt,
1992
2018
  {
1993
- checked: (H = m.allowBlank) != null ? H : !0,
2019
+ checked: (B = p.allowBlank) != null ? B : !0,
1994
2020
  onChange: () => {
1995
2021
  var v;
1996
2022
  return Z({
1997
- ...ae,
1998
- allowBlank: !((v = m.allowBlank) == null || v)
2023
+ ...te,
2024
+ allowBlank: !((v = p.allowBlank) == null || v)
1999
2025
  });
2000
2026
  },
2001
2027
  children: S.t("dataValidation.panel.allowBlank")
2002
2028
  }
2003
2029
  ) }),
2004
- /* @__PURE__ */ _(Hi, { value: ue, onChange: Ce, extraComponent: V.optionsInput }),
2005
- /* @__PURE__ */ z("div", { className: We.dataValidationDetailButtons, children: [
2006
- /* @__PURE__ */ _(Ge, { className: We.dataValidationDetailButton, onClick: Y, children: S.t("dataValidation.panel.removeRule") }),
2007
- /* @__PURE__ */ _(Ge, { className: We.dataValidationDetailButton, variant: "primary", onClick: B, children: S.t("dataValidation.panel.done") })
2030
+ /* @__PURE__ */ _(bi, { value: de, onChange: Se, extraComponent: y.optionsInput }),
2031
+ /* @__PURE__ */ z("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
2032
+ /* @__PURE__ */ _(ze, { className: "univer-ml-3", onClick: Y, children: S.t("dataValidation.panel.removeRule") }),
2033
+ /* @__PURE__ */ _(ze, { className: "univer-ml-3", variant: "primary", onClick: x, children: S.t("dataValidation.panel.done") })
2008
2034
  ] })
2009
2035
  ] });
2010
2036
  }
2011
- const Gi = "univer-data-validation-item-container", Zi = "univer-data-validation-item-title", qi = "univer-data-validation-item-content", Ji = "univer-data-validation-item-icon", _t = {
2012
- dataValidationItemContainer: Gi,
2013
- dataValidationItemTitle: Zi,
2014
- dataValidationItemContent: qi,
2015
- dataValidationItemIcon: Ji
2016
- }, Qi = (e) => {
2017
- const { rule: t, onClick: n, unitId: a, subUnitId: o, disable: i } = e, r = N(ye), l = N(Q), s = N($o), d = r.getValidatorItem(t.type), u = mt(void 0), [h, c] = W(!1), S = N(Ga), m = Ae(S.currentTheme$), M = ut(() => {
2018
- var g;
2019
- const p = (g = m == null ? void 0 : m.loopColor2) != null ? g : "#49B811", f = new Gn(p).toRgb();
2037
+ const Oi = (e) => {
2038
+ const { rule: t, onClick: r, unitId: n, subUnitId: o, disable: i } = e, a = U(ye), l = U(J), s = U(No), c = a.getValidatorItem(t.type), u = ut(void 0), [h, d] = H(!1), S = U(Yn), p = Te(S.currentTheme$), b = ct(() => {
2039
+ var m;
2040
+ const g = (m = p == null ? void 0 : p.loopColor2) != null ? m : "#49B811", f = new Yr(g).toRgb();
2020
2041
  return {
2021
2042
  fill: `rgba(${f.r}, ${f.g}, ${f.b}, 0.1)`,
2022
- stroke: p
2043
+ stroke: g
2023
2044
  };
2024
- }, [m]), V = (p) => {
2025
- l.executeCommand(rn.id, {
2045
+ }, [p]), y = (g) => {
2046
+ l.executeCommand(tr.id, {
2026
2047
  ruleId: t.uid,
2027
- unitId: a,
2048
+ unitId: n,
2028
2049
  subUnitId: o
2029
- }), p.stopPropagation();
2050
+ }), g.stopPropagation();
2030
2051
  };
2031
- return Le(() => () => {
2032
- var p;
2033
- u.current && ((p = u.current) == null || p.forEach((f) => {
2052
+ return Pe(() => () => {
2053
+ var g;
2054
+ u.current && ((g = u.current) == null || g.forEach((f) => {
2034
2055
  f && s.removeShape(f);
2035
2056
  }));
2036
2057
  }, [s]), /* @__PURE__ */ z(
2037
2058
  "div",
2038
2059
  {
2039
- className: _t.dataValidationItemContainer,
2040
- onClick: n,
2060
+ className: nr(
2061
+ `
2062
+ univer-rounded-md univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border
2063
+ univer-flex univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between
2064
+ univer-overflow-hidden univer-rounded-lg univer-p-2 univer-pr-9
2065
+ `,
2066
+ {
2067
+ "hover:univer-bg-gray-50": !i,
2068
+ "univer-opacity-50": i
2069
+ }
2070
+ ),
2071
+ onClick: r,
2041
2072
  onMouseEnter: () => {
2042
- i || (c(!0), u.current = t.ranges.map((p) => s.addShape({
2043
- range: p,
2044
- style: M,
2073
+ i || (d(!0), u.current = t.ranges.map((g) => s.addShape({
2074
+ range: g,
2075
+ style: b,
2045
2076
  primary: null
2046
2077
  })));
2047
2078
  },
2048
2079
  onMouseLeave: () => {
2049
- var p;
2050
- c(!1), (p = u.current) == null || p.forEach((f) => {
2080
+ var g;
2081
+ d(!1), (g = u.current) == null || g.forEach((f) => {
2051
2082
  f && s.removeShape(f);
2052
2083
  }), u.current = void 0;
2053
2084
  },
2054
2085
  children: [
2055
- /* @__PURE__ */ _("div", { className: _t.dataValidationItemTitle, children: d == null ? void 0 : d.generateRuleName(t) }),
2056
- /* @__PURE__ */ _("div", { className: _t.dataValidationItemContent, children: t.ranges.map((p) => Cn(p)).join(",") }),
2057
- h ? /* @__PURE__ */ _("div", { className: _t.dataValidationItemIcon, onClick: V, children: /* @__PURE__ */ _(wa, {}) }) : null
2086
+ /* @__PURE__ */ _(
2087
+ "div",
2088
+ {
2089
+ className: `
2090
+ univer-overflow-hidden univer-text-ellipsis univer-text-sm univer-font-medium univer-leading-[22px]
2091
+ univer-text-black
2092
+ `,
2093
+ children: c == null ? void 0 : c.generateRuleName(t)
2094
+ }
2095
+ ),
2096
+ /* @__PURE__ */ _(
2097
+ "div",
2098
+ {
2099
+ className: `
2100
+ univer-text-secondary univer-overflow-hidden univer-text-ellipsis univer-text-xs univer-leading-[18px]
2101
+ `,
2102
+ children: t.ranges.map((g) => fr(g)).join(",")
2103
+ }
2104
+ ),
2105
+ h ? /* @__PURE__ */ _(
2106
+ "div",
2107
+ {
2108
+ className: `
2109
+ univer-absolute univer-right-2 univer-top-[19px] univer-flex univer-h-5 univer-w-5
2110
+ univer-items-center univer-justify-center univer-rounded
2111
+ hover:univer-bg-gray-200
2112
+ `,
2113
+ onClick: y,
2114
+ children: /* @__PURE__ */ _(_n, {})
2115
+ }
2116
+ ) : null
2058
2117
  ]
2059
2118
  }
2060
2119
  );
2061
- }, er = "univer-data-validation-list", tr = "univer-data-validation-list-buttons", ar = "univer-data-validation-list-button", St = {
2062
- dataValidationList: er,
2063
- dataValidationListButtons: tr,
2064
- dataValidationListButton: ar
2065
2120
  };
2066
- function nr(e) {
2067
- const t = N(te), n = N(de), a = N(Q), o = N(we), i = N(Se), r = N(le), [l, s] = W([]), { workbook: d } = e, u = Ae(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
2068
- Le(() => {
2069
- s(t.getRules(h, c));
2070
- const f = t.ruleChange$.subscribe((g) => {
2071
- g.unitId === h && g.subUnitId === c && s(t.getRules(h, c));
2121
+ function Ti(e) {
2122
+ const t = U(ee), r = U(le), n = U(J), o = U(we), i = U(_e), a = U(se), [l, s] = H([]), { workbook: c } = e, u = Te(c.activeSheet$, void 0, !0), h = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
2123
+ Pe(() => {
2124
+ s(t.getRules(h, d));
2125
+ const f = t.ruleChange$.subscribe((m) => {
2126
+ m.unitId === h && m.subUnitId === d && s(t.getRules(h, d));
2072
2127
  });
2073
2128
  return () => {
2074
2129
  f.unsubscribe();
2075
2130
  };
2076
- }, [h, c, t]);
2131
+ }, [h, d, t]);
2077
2132
  const S = async () => {
2078
- const f = tn(o), g = {
2133
+ const f = qn(o), m = {
2079
2134
  unitId: h,
2080
- subUnitId: c,
2135
+ subUnitId: d,
2081
2136
  rule: f
2082
2137
  };
2083
- await a.executeCommand(fa.id, g), i.setActiveRule({
2138
+ await n.executeCommand(un.id, m), i.setActiveRule({
2084
2139
  unitId: h,
2085
- subUnitId: c,
2140
+ subUnitId: d,
2086
2141
  rule: f
2087
2142
  });
2088
- }, m = () => {
2089
- a.executeCommand(ao.id, {
2143
+ }, p = () => {
2144
+ n.executeCommand(Jr.id, {
2090
2145
  unitId: h,
2091
- subUnitId: c
2146
+ subUnitId: d
2092
2147
  });
2093
- }, V = ((f) => {
2094
- const g = n.getCurrentUnitForType(x.UNIVER_SHEET), I = g.getActiveSheet(), R = g.getUnitId(), C = I.getSheetId();
2095
- return f.map((E) => Oo(o, R, C, E.ranges) ? { ...E } : { ...E, disable: !0 });
2096
- })(l), p = V == null ? void 0 : V.some((f) => f.disable);
2097
- return /* @__PURE__ */ z("div", { className: St.dataValidationList, children: [
2098
- V == null ? void 0 : V.map((f) => {
2099
- var g;
2148
+ }, y = ((f) => {
2149
+ const m = r.getCurrentUnitForType(W.UNIVER_SHEET), I = m.getActiveSheet(), w = m.getUnitId(), C = I.getSheetId();
2150
+ return f.map((D) => bo(o, w, C, D.ranges) ? { ...D } : { ...D, disable: !0 });
2151
+ })(l), g = y == null ? void 0 : y.some((f) => f.disable);
2152
+ return /* @__PURE__ */ z("div", { className: "univer-pb-4", children: [
2153
+ y == null ? void 0 : y.map((f) => {
2154
+ var m;
2100
2155
  return /* @__PURE__ */ _(
2101
- Qi,
2156
+ Oi,
2102
2157
  {
2103
2158
  unitId: h,
2104
- subUnitId: c,
2159
+ subUnitId: d,
2105
2160
  onClick: () => {
2106
2161
  f.disable || i.setActiveRule({
2107
2162
  unitId: h,
2108
- subUnitId: c,
2163
+ subUnitId: d,
2109
2164
  rule: f
2110
2165
  });
2111
2166
  },
2112
2167
  rule: f,
2113
- disable: (g = f.disable) != null ? g : !1
2168
+ disable: (m = f.disable) != null ? m : !1
2114
2169
  },
2115
2170
  f.uid
2116
2171
  );
2117
2172
  }),
2118
- /* @__PURE__ */ z("div", { className: St.dataValidationListButtons, children: [
2119
- l.length && !p ? /* @__PURE__ */ _(Ge, { className: St.dataValidationListButton, onClick: m, children: r.t("dataValidation.panel.removeAll") }) : null,
2120
- /* @__PURE__ */ _(Ge, { className: St.dataValidationListButton, variant: "primary", onClick: S, children: r.t("dataValidation.panel.add") })
2173
+ /* @__PURE__ */ z("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
2174
+ l.length && !g ? /* @__PURE__ */ _(ze, { onClick: p, children: a.t("dataValidation.panel.removeAll") }) : null,
2175
+ /* @__PURE__ */ _(ze, { variant: "primary", onClick: S, children: a.t("dataValidation.panel.add") })
2121
2176
  ] })
2122
2177
  ] });
2123
2178
  }
2124
- const or = () => {
2125
- const e = N(Se), t = Ae(e.activeRule$, e.activeRule), n = N(de), a = Ae(
2126
- () => n.getCurrentTypeOfUnit$(x.UNIVER_SHEET),
2179
+ const Pi = () => {
2180
+ const e = U(_e), t = Te(e.activeRule$, e.activeRule), r = U(le), n = Te(
2181
+ () => r.getCurrentTypeOfUnit$(W.UNIVER_SHEET),
2127
2182
  void 0,
2128
2183
  void 0,
2129
2184
  []
2130
- ), o = Ae(() => {
2185
+ ), o = Te(() => {
2131
2186
  var i;
2132
- return (i = a == null ? void 0 : a.activeSheet$) != null ? i : So(null);
2187
+ return (i = n == null ? void 0 : n.activeSheet$) != null ? i : mo(null);
2133
2188
  }, void 0, void 0, []);
2134
- return !a || !o ? null : t && t.subUnitId === o.getSheetId() ? /* @__PURE__ */ _(Ki, {}, t.rule.uid) : /* @__PURE__ */ _(nr, { workbook: a });
2135
- }, ir = "LIST_RENDER_MODE_OPTION_INPUT";
2136
- function At(e) {
2189
+ return !n || !o ? null : t && t.subUnitId === o.getSheetId() ? /* @__PURE__ */ _(Vi, {}, t.rule.uid) : /* @__PURE__ */ _(Ti, { workbook: n });
2190
+ }, Ai = "LIST_RENDER_MODE_OPTION_INPUT";
2191
+ function Dt(e) {
2137
2192
  var o;
2138
- const { value: t, onChange: n } = e, a = N(le);
2139
- return /* @__PURE__ */ _(K, { label: a.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ z(va, { value: `${(o = t.renderMode) != null ? o : ie.CUSTOM}`, onChange: (i) => n({ ...t, renderMode: +i }), children: [
2140
- /* @__PURE__ */ _(Te, { value: `${ie.CUSTOM}`, children: a.t("dataValidation.renderMode.chip") }),
2141
- /* @__PURE__ */ _(Te, { value: `${ie.ARROW}`, children: a.t("dataValidation.renderMode.arrow") }),
2142
- /* @__PURE__ */ _(Te, { value: `${ie.TEXT}`, children: a.t("dataValidation.renderMode.text") })
2193
+ const { value: t, onChange: r } = e, n = U(se);
2194
+ return /* @__PURE__ */ _(K, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ z(hn, { value: `${(o = t.renderMode) != null ? o : oe.CUSTOM}`, onChange: (i) => r({ ...t, renderMode: +i }), children: [
2195
+ /* @__PURE__ */ _(Oe, { value: `${oe.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2196
+ /* @__PURE__ */ _(Oe, { value: `${oe.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2197
+ /* @__PURE__ */ _(Oe, { value: `${oe.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2143
2198
  ] }) });
2144
2199
  }
2145
- At.componentKey = ir;
2146
- const rr = "DATE_SHOW_TIME_OPTION";
2147
- function Lt(e) {
2200
+ Dt.componentKey = Ai;
2201
+ const Li = "DATE_SHOW_TIME_OPTION";
2202
+ function Vt(e) {
2148
2203
  var o;
2149
- const { value: t, onChange: n } = e, a = N(le);
2204
+ const { value: t, onChange: r } = e, n = U(se);
2150
2205
  return /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
2151
- kt,
2206
+ Pt,
2152
2207
  {
2153
2208
  checked: (o = t.bizInfo) == null ? void 0 : o.showTime,
2154
2209
  onChange: (i) => {
2155
- n({
2210
+ r({
2156
2211
  ...t,
2157
2212
  bizInfo: {
2158
2213
  ...t.bizInfo,
@@ -2160,45 +2215,45 @@ function Lt(e) {
2160
2215
  }
2161
2216
  });
2162
2217
  },
2163
- children: a.t("dataValidation.showTime.label")
2218
+ children: n.t("dataValidation.showTime.label")
2164
2219
  }
2165
2220
  ) });
2166
2221
  }
2167
- Lt.componentKey = rr;
2168
- var sr = Object.getOwnPropertyDescriptor, lr = (e, t, n, a) => {
2169
- for (var o = a > 1 ? void 0 : a ? sr(t, n) : t, i = e.length - 1, r; i >= 0; i--)
2170
- (r = e[i]) && (o = r(o) || o);
2222
+ Vt.componentKey = Li;
2223
+ var ki = Object.getOwnPropertyDescriptor, Ni = (e, t, r, n) => {
2224
+ for (var o = n > 1 ? void 0 : n ? ki(t, r) : t, i = e.length - 1, a; i >= 0; i--)
2225
+ (a = e[i]) && (o = a(o) || o);
2171
2226
  return o;
2172
- }, xe = (e, t) => (n, a) => t(n, a, e);
2173
- const Ct = 6;
2174
- let da = class {
2175
- constructor(e, t, n, a, o, i) {
2176
- this._commandService = e, this._univerInstanceService = t, this._formulaService = n, this._themeService = a, this._renderManagerService = o, this._dataValidationModel = i;
2227
+ }, Be = (e, t) => (r, n) => t(r, n, e);
2228
+ const ft = 6;
2229
+ let rn = class {
2230
+ constructor(e, t, r, n, o, i) {
2231
+ this._commandService = e, this._univerInstanceService = t, this._formulaService = r, this._themeService = n, this._renderManagerService = o, this._dataValidationModel = i;
2177
2232
  }
2178
2233
  _calc(e, t) {
2179
- var d, u, h;
2180
- const { vt: n, ht: a } = t || {}, o = e.endX - e.startX - Ct * 2, i = e.endY - e.startY, r = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
2234
+ var c, u, h;
2235
+ const { vt: r, ht: n } = t || {}, o = e.endX - e.startX - ft * 2, i = e.endY - e.startY, a = ((c = t == null ? void 0 : t.fs) != null ? c : 10) * 1.6;
2181
2236
  let l = 0, s = 0;
2182
- switch (n) {
2183
- case se.TOP:
2237
+ switch (r) {
2238
+ case ae.TOP:
2184
2239
  s = 0;
2185
2240
  break;
2186
- case se.BOTTOM:
2187
- s = 0 + (i - r);
2241
+ case ae.BOTTOM:
2242
+ s = 0 + (i - a);
2188
2243
  break;
2189
2244
  default:
2190
- s = 0 + (i - r) / 2;
2245
+ s = 0 + (i - a) / 2;
2191
2246
  break;
2192
2247
  }
2193
- switch (a) {
2194
- case ze.LEFT:
2195
- l = Ct;
2248
+ switch (n) {
2249
+ case Ye.LEFT:
2250
+ l = ft;
2196
2251
  break;
2197
- case ze.RIGHT:
2198
- l = Ct + (o - r);
2252
+ case Ye.RIGHT:
2253
+ l = ft + (o - a);
2199
2254
  break;
2200
2255
  default:
2201
- l = Ct + (o - r) / 2;
2256
+ l = ft + (o - a) / 2;
2202
2257
  break;
2203
2258
  }
2204
2259
  return {
@@ -2209,37 +2264,37 @@ let da = class {
2209
2264
  };
2210
2265
  }
2211
2266
  calcCellAutoHeight(e) {
2212
- var n;
2267
+ var r;
2213
2268
  const { style: t } = e;
2214
- return ((n = t == null ? void 0 : t.fs) != null ? n : 10) * 1.6;
2269
+ return ((r = t == null ? void 0 : t.fs) != null ? r : 10) * 1.6;
2215
2270
  }
2216
2271
  calcCellAutoWidth(e) {
2217
- var n;
2272
+ var r;
2218
2273
  const { style: t } = e;
2219
- return ((n = t == null ? void 0 : t.fs) != null ? n : 10) * 1.6;
2274
+ return ((r = t == null ? void 0 : t.fs) != null ? r : 10) * 1.6;
2220
2275
  }
2221
- async _parseFormula(e, t, n) {
2222
- var d, u, h, c, S, m, M, V, p;
2223
- const { formula1: a = io, formula2: o = oo } = e, i = await this._formulaService.getRuleFormulaResult(t, n, e.uid), r = $t((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 = $t((m = (S = (c = i == null ? void 0 : i[1]) == null ? void 0 : c.result) == null ? void 0 : S[0]) == null ? void 0 : m[0]), s = Oa(String(r)) && Oa(String(l));
2276
+ async _parseFormula(e, t, r) {
2277
+ var c, u, h, d, S, p, b, y, g;
2278
+ const { formula1: n = to, formula2: o = eo } = e, i = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Nt((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Nt((p = (S = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : S[0]) == null ? void 0 : p[0]), s = Mn(String(a)) && Mn(String(l));
2224
2279
  return {
2225
- formula1: be(a) ? $t((p = (V = (M = i == null ? void 0 : i[0]) == null ? void 0 : M.result) == null ? void 0 : V[0]) == null ? void 0 : p[0]) : a,
2226
- formula2: be(o) ? l : o,
2280
+ formula1: De(n) ? Nt((g = (y = (b = i == null ? void 0 : i[0]) == null ? void 0 : b.result) == null ? void 0 : y[0]) == null ? void 0 : g[0]) : n,
2281
+ formula2: De(o) ? l : o,
2227
2282
  isFormulaValid: s
2228
2283
  };
2229
2284
  }
2230
2285
  drawWith(e, t) {
2231
- var A, P, O, U;
2232
- const { style: n, primaryWithCoord: a, unitId: o, subUnitId: i, worksheet: r, row: l, col: s } = t, d = a.isMergedMainCell ? a.mergeInfo : a, u = ee(r.getCellRaw(l, s)), h = this._dataValidationModel.getRuleByLocation(o, i, l, s);
2286
+ var P, L, O, F;
2287
+ const { style: r, primaryWithCoord: n, unitId: o, subUnitId: i, worksheet: a, row: l, col: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = Q(a.getCellRaw(l, s)), h = this._dataValidationModel.getRuleByLocation(o, i, l, s);
2233
2288
  if (!h)
2234
2289
  return;
2235
- const c = this._dataValidationModel.getValidator(h.type);
2236
- if (!c)
2290
+ const d = this._dataValidationModel.getValidator(h.type);
2291
+ if (!d)
2237
2292
  return;
2238
2293
  const S = this._themeService.getCurrentTheme();
2239
- if (!((A = c.skipDefaultFontRender) != null && A.call(c, h, u, { unitId: o, subUnitId: i, row: l, column: s })))
2294
+ if (!((P = d.skipDefaultFontRender) != null && P.call(d, h, u, { unitId: o, subUnitId: i, row: l, column: s })))
2240
2295
  return;
2241
- const m = c.parseFormulaSync(h, o, i), { formula1: M } = m, V = this._calc(d, n), { a: p, d: f } = e.getTransform(), g = Fa(V.left, p), I = Fa(V.top, f), R = Co.create().composeMatrix({
2242
- left: g,
2296
+ const p = d.parseFormulaSync(h, o, i), { formula1: b } = p, y = this._calc(c, r), { a: g, d: f } = e.getTransform(), m = Tn(y.left, g), I = Tn(y.top, f), w = fo.create().composeMatrix({
2297
+ left: m,
2243
2298
  top: I,
2244
2299
  scaleX: 1,
2245
2300
  scaleY: 1,
@@ -2248,163 +2303,163 @@ let da = class {
2248
2303
  skewY: 0,
2249
2304
  flipX: !1,
2250
2305
  flipY: !1
2251
- }), C = d.endX - d.startX, w = d.endY - d.startY;
2252
- e.save(), e.beginPath(), e.rect(d.startX, d.startY, C, w), e.clip();
2253
- const E = R.getMatrix();
2254
- e.transform(E[0], E[1], E[2], E[3], E[4], E[5]);
2255
- const F = ((P = n == null ? void 0 : n.fs) != null ? P : 10) * 1.6, b = String(u) === String(M), L = S.hyacinth500;
2256
- Io.drawWith(e, {
2257
- checked: b,
2258
- width: F,
2259
- height: F,
2260
- fill: (U = (O = n == null ? void 0 : n.cl) == null ? void 0 : O.rgb) != null ? U : L
2306
+ }), C = c.endX - c.startX, R = c.endY - c.startY;
2307
+ e.save(), e.beginPath(), e.rect(c.startX, c.startY, C, R), e.clip();
2308
+ const D = w.getMatrix();
2309
+ e.transform(D[0], D[1], D[2], D[3], D[4], D[5]);
2310
+ const k = ((L = r == null ? void 0 : r.fs) != null ? L : 10) * 1.6, V = String(u) === String(b), A = S.hyacinth500;
2311
+ vo.drawWith(e, {
2312
+ checked: V,
2313
+ width: k,
2314
+ height: k,
2315
+ fill: (F = (O = r == null ? void 0 : r.cl) == null ? void 0 : O.rgb) != null ? F : A
2261
2316
  }), e.restore();
2262
2317
  }
2263
2318
  isHit(e, t) {
2264
- const n = t.primaryWithCoord.isMergedMainCell ? t.primaryWithCoord.mergeInfo : t.primaryWithCoord, a = this._calc(n, t.style), o = a.top, i = a.top + a.height, r = a.left, l = a.left + a.width, { x: s, y: d } = e;
2265
- return s <= l && s >= r && d <= i && d >= o;
2319
+ const r = t.primaryWithCoord.isMergedMainCell ? t.primaryWithCoord.mergeInfo : t.primaryWithCoord, n = this._calc(r, t.style), o = n.top, i = n.top + n.height, a = n.left, l = n.left + n.width, { x: s, y: c } = e;
2320
+ return s <= l && s >= a && c <= i && c >= o;
2266
2321
  }
2267
2322
  async onPointerDown(e, t) {
2268
- var m;
2323
+ var p;
2269
2324
  if (t.button === 2)
2270
2325
  return;
2271
- const { primaryWithCoord: n, unitId: a, subUnitId: o, worksheet: i, row: r, col: l } = e, s = ee(i.getCellRaw(r, l)), d = this._dataValidationModel.getRuleByLocation(a, o, r, l);
2272
- if (!d)
2326
+ const { primaryWithCoord: r, unitId: n, subUnitId: o, worksheet: i, row: a, col: l } = e, s = Q(i.getCellRaw(a, l)), c = this._dataValidationModel.getRuleByLocation(n, o, a, l);
2327
+ if (!c)
2273
2328
  return;
2274
- const u = this._dataValidationModel.getValidator(d.type);
2275
- if (!u || !((m = u.skipDefaultFontRender) != null && m.call(u, d, s, { unitId: a, subUnitId: o, row: r, column: l })))
2329
+ const u = this._dataValidationModel.getValidator(c.type);
2330
+ if (!u || !((p = u.skipDefaultFontRender) != null && p.call(u, c, s, { unitId: n, subUnitId: o, row: a, column: l })))
2276
2331
  return;
2277
- const { formula1: h, formula2: c } = await this._parseFormula(d, a, o), S = {
2332
+ const { formula1: h, formula2: d } = await this._parseFormula(c, n, o), S = {
2278
2333
  range: {
2279
- startColumn: n.actualColumn,
2280
- endColumn: n.actualColumn,
2281
- startRow: n.actualRow,
2282
- endRow: n.actualRow
2334
+ startColumn: r.actualColumn,
2335
+ endColumn: r.actualColumn,
2336
+ startRow: r.actualRow,
2337
+ endRow: r.actualRow
2283
2338
  },
2284
2339
  value: {
2285
- v: String(s) === ro(String(h)) ? c : h,
2340
+ v: String(s) === no(String(h)) ? d : h,
2286
2341
  p: null
2287
2342
  }
2288
2343
  };
2289
2344
  this._commandService.executeCommand(
2290
- dt.id,
2345
+ st.id,
2291
2346
  S
2292
2347
  );
2293
2348
  }
2294
2349
  onPointerEnter(e, t) {
2295
- var n, a;
2296
- (a = (n = Ze(x.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || a.setCursor(qe.POINTER);
2350
+ var r, n;
2351
+ (n = (r = Ke(W.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.POINTER);
2297
2352
  }
2298
2353
  onPointerLeave(e, t) {
2299
- var n, a;
2300
- (a = (n = Ze(x.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || a.setCursor(qe.DEFAULT);
2354
+ var r, n;
2355
+ (n = (r = Ke(W.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.DEFAULT);
2301
2356
  }
2302
2357
  };
2303
- da = lr([
2304
- xe(0, Q),
2305
- xe(1, de),
2306
- xe(2, y(no)),
2307
- xe(3, y(Ga)),
2308
- xe(4, y(Ne)),
2309
- xe(5, y(te))
2310
- ], da);
2311
- class dr extends _e {
2358
+ rn = Ni([
2359
+ Be(0, J),
2360
+ Be(1, le),
2361
+ Be(2, M(Qr)),
2362
+ Be(3, M(Yn)),
2363
+ Be(4, M(Ne)),
2364
+ Be(5, M(ee))
2365
+ ], rn);
2366
+ class Ui extends ve {
2312
2367
  constructor() {
2313
2368
  super(...arguments);
2314
- D(this, "id", G.CHECKBOX);
2315
- D(this, "canvasRender", this.injector.createInstance(da));
2316
- D(this, "formulaInput", en);
2369
+ E(this, "id", G.CHECKBOX);
2370
+ E(this, "canvasRender", this.injector.createInstance(rn));
2371
+ E(this, "formulaInput", Zn);
2317
2372
  }
2318
2373
  }
2319
- class cr extends _e {
2374
+ class Fi extends ve {
2320
2375
  constructor() {
2321
2376
  super(...arguments);
2322
- D(this, "id", G.CUSTOM);
2323
- D(this, "formulaInput", Qa);
2377
+ E(this, "id", G.CUSTOM);
2378
+ E(this, "formulaInput", Gn);
2324
2379
  }
2325
2380
  }
2326
- const ur = "data-validation.formula-input";
2327
- class hr extends _e {
2381
+ const xi = "data-validation.formula-input";
2382
+ class $i extends ve {
2328
2383
  constructor() {
2329
2384
  super(...arguments);
2330
- D(this, "id", G.DATE);
2331
- D(this, "formulaInput", ur);
2332
- D(this, "optionsInput", Lt.componentKey);
2333
- D(this, "dropdownType", pe.DATE);
2385
+ E(this, "id", G.DATE);
2386
+ E(this, "formulaInput", xi);
2387
+ E(this, "optionsInput", Vt.componentKey);
2388
+ E(this, "dropdownType", pe.DATE);
2334
2389
  }
2335
2390
  }
2336
- class mr extends _e {
2391
+ class Bi extends ve {
2337
2392
  constructor() {
2338
2393
  super(...arguments);
2339
- D(this, "id", G.DECIMAL);
2340
- D(this, "formulaInput", Ft);
2394
+ E(this, "id", G.DECIMAL);
2395
+ E(this, "formulaInput", Tt);
2341
2396
  }
2342
2397
  }
2343
- const Ln = 4, pr = 0, zt = 4, Pn = 4, ca = 6, Pt = 6, Ee = 14;
2344
- function gr(e, t) {
2345
- const n = Ro.getTextSize(e, t), a = n.width + Ln * 2, { ba: o, bd: i } = n, r = o + i;
2398
+ const Vr = 4, Hi = 0, Ht = 4, Or = 4, on = 6, Ot = 6, Ee = 14;
2399
+ function Wi(e, t) {
2400
+ const r = _o.getTextSize(e, t), n = r.width + Vr * 2, { ba: o, bd: i } = r, a = o + i;
2346
2401
  return {
2347
- width: a,
2348
- height: r + pr * 2,
2402
+ width: n,
2403
+ height: a + Hi * 2,
2349
2404
  ba: o
2350
2405
  };
2351
2406
  }
2352
- function Kt(e, t, n, a) {
2353
- const o = Ee + ca * 2, i = n - o, r = a - Pt * 2, l = e.map((c) => ({
2354
- layout: gr(c, t),
2355
- text: c
2407
+ function Wt(e, t, r, n) {
2408
+ const o = Ee + on * 2, i = r - o, a = n - Ot * 2, l = e.map((d) => ({
2409
+ layout: Wi(d, t),
2410
+ text: d
2356
2411
  }));
2357
2412
  let s;
2358
- const d = [];
2359
- l.forEach((c) => {
2360
- const { layout: S } = c, { width: m, height: M } = S;
2361
- !s || s.width + m + zt > i ? (s = {
2362
- width: m,
2363
- height: M,
2413
+ const c = [];
2414
+ l.forEach((d) => {
2415
+ const { layout: S } = d, { width: p, height: b } = S;
2416
+ !s || s.width + p + Ht > i ? (s = {
2417
+ width: p,
2418
+ height: b,
2364
2419
  items: [{
2365
- ...c,
2420
+ ...d,
2366
2421
  left: 0
2367
2422
  }]
2368
- }, d.push(s)) : (s.items.push({
2369
- ...c,
2370
- left: s.width + zt
2371
- }), s.width = s.width + m + zt);
2423
+ }, c.push(s)) : (s.items.push({
2424
+ ...d,
2425
+ left: s.width + Ht
2426
+ }), s.width = s.width + p + Ht);
2372
2427
  });
2373
2428
  let u = 0, h = 0;
2374
- return d.forEach((c, S) => {
2375
- h = Math.max(h, c.width), S === d.length - 1 ? u += c.height : u += c.height + Pn;
2429
+ return c.forEach((d, S) => {
2430
+ h = Math.max(h, d.width), S === c.length - 1 ? u += d.height : u += d.height + Or;
2376
2431
  }), {
2377
- lines: d,
2432
+ lines: c,
2378
2433
  totalHeight: u,
2379
2434
  contentWidth: i,
2380
- contentHeight: r,
2381
- cellAutoHeight: u + Pt * 2,
2435
+ contentHeight: a,
2436
+ cellAutoHeight: u + Ot * 2,
2382
2437
  calcAutoWidth: h + o
2383
2438
  };
2384
2439
  }
2385
- const fr = 8;
2386
- class vr extends wo {
2387
- static drawWith(t, n) {
2388
- const { fontString: a, info: o, fill: i, color: r } = n, { layout: l, text: s } = o;
2389
- t.save(), mn.drawWith(t, {
2440
+ const ji = 8;
2441
+ class Yi extends So {
2442
+ static drawWith(t, r) {
2443
+ const { fontString: n, info: o, fill: i, color: a } = r, { layout: l, text: s } = o;
2444
+ t.save(), cr.drawWith(t, {
2390
2445
  width: l.width,
2391
2446
  height: l.height,
2392
- radius: fr,
2393
- fill: i || je
2394
- }), t.translateWithPrecision(Ln, l.ba), t.font = a, t.fillStyle = r, t.fillText(s, 0, 0), t.restore();
2447
+ radius: ji,
2448
+ fill: i || He
2449
+ }), t.translateWithPrecision(Vr, l.ba), t.font = n, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
2395
2450
  }
2396
2451
  }
2397
- var _r = Object.getOwnPropertyDescriptor, Sr = (e, t, n, a) => {
2398
- for (var o = a > 1 ? void 0 : a ? _r(t, n) : t, i = e.length - 1, r; i >= 0; i--)
2399
- (r = e[i]) && (o = r(o) || o);
2452
+ var Xi = Object.getOwnPropertyDescriptor, zi = (e, t, r, n) => {
2453
+ for (var o = n > 1 ? void 0 : n ? Xi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
2454
+ (a = e[i]) && (o = a(o) || o);
2400
2455
  return o;
2401
- }, It = (e, t) => (n, a) => t(n, a, e);
2402
- const Cr = 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");
2403
- let ua = class {
2404
- constructor(e, t, n, a) {
2405
- D(this, "zIndex");
2406
- D(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2407
- this._commandService = e, this._univerInstanceService = t, this._renderManagerService = n, this._dataValidationModel = a;
2456
+ }, vt = (e, t) => (r, n) => t(r, n, e);
2457
+ const Ki = 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");
2458
+ let an = class {
2459
+ constructor(e, t, r, n) {
2460
+ E(this, "zIndex");
2461
+ E(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2462
+ this._commandService = e, this._univerInstanceService = t, this._renderManagerService = r, this._dataValidationModel = n;
2408
2463
  }
2409
2464
  _ensureMap(e) {
2410
2465
  let t = this._dropdownInfoMap.get(e);
@@ -2413,168 +2468,168 @@ let ua = class {
2413
2468
  _generateKey(e, t) {
2414
2469
  return `${e}.${t}`;
2415
2470
  }
2416
- _drawDownIcon(e, t, n, a, o) {
2417
- const i = n - Ee + 4;
2418
- let r = 4;
2471
+ _drawDownIcon(e, t, r, n, o) {
2472
+ const i = r - Ee + 4;
2473
+ let a = 4;
2419
2474
  switch (o) {
2420
- case se.MIDDLE:
2421
- r = (a - Ee) / 2 + 4;
2475
+ case ae.MIDDLE:
2476
+ a = (n - Ee) / 2 + 4;
2422
2477
  break;
2423
- case se.BOTTOM:
2424
- r = a - Ee + 4;
2478
+ case ae.BOTTOM:
2479
+ a = n - Ee + 4;
2425
2480
  break;
2426
2481
  }
2427
- e.save(), e.translateWithPrecision(t.startX + i, t.startY + r), e.fillStyle = "#565656", e.fill(Cr), e.restore();
2482
+ e.save(), e.translateWithPrecision(t.startX + i, t.startY + a), e.fillStyle = "#565656", e.fill(Ki), e.restore();
2428
2483
  }
2429
2484
  // eslint-disable-next-line max-lines-per-function
2430
- drawWith(e, t, n, a) {
2485
+ drawWith(e, t, r, n) {
2431
2486
  var Z, Y;
2432
- const { primaryWithCoord: o, row: i, col: r, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: S = 0, topOffset: m = 0, downOffset: M = 0 } = h || {}, V = this._ensureMap(d), p = this._generateKey(i, r), f = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2487
+ const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: c } = t, u = o.isMergedMainCell ? o.mergeInfo : o, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: S = 0, topOffset: p = 0, downOffset: b = 0 } = h || {}, y = this._ensureMap(c), g = this._generateKey(i, a), f = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, a);
2433
2488
  if (!f)
2434
2489
  return;
2435
- const g = this._dataValidationModel.getValidator(f.type);
2436
- if (!g)
2490
+ const m = this._dataValidationModel.getValidator(f.type);
2491
+ if (!m)
2437
2492
  return;
2438
2493
  const I = {
2439
- startX: u.startX + c,
2494
+ startX: u.startX + d,
2440
2495
  endX: u.endX - S,
2441
- startY: u.startY + m,
2442
- endY: u.endY - M
2443
- }, R = I.endX - I.startX, C = I.endY - I.startY, { cl: w } = l || {}, E = (Z = typeof w == "object" ? w == null ? void 0 : w.rgb : w) != null ? Z : "#000", F = Ht(l != null ? l : void 0), { vt: b, ht: L } = l || {}, A = b != null ? b : se.MIDDLE, P = (Y = ee(s)) != null ? Y : "", O = g.parseCellValue(P), U = g.getListWithColorMap(f), B = Kt(O, F, R, C);
2444
- this._drawDownIcon(e, I, R, C, A), e.save(), e.translateWithPrecision(I.startX, I.startY), e.beginPath(), e.rect(0, 0, R - Ee, C), e.clip(), e.translateWithPrecision(ca, Pt);
2496
+ startY: u.startY + p,
2497
+ endY: u.endY - b
2498
+ }, w = I.endX - I.startX, C = I.endY - I.startY, { cl: R } = l || {}, D = (Z = typeof R == "object" ? R == null ? void 0 : R.rgb : R) != null ? Z : "#000", k = Ut(l != null ? l : void 0), { vt: V, ht: A } = l || {}, P = V != null ? V : ae.MIDDLE, L = (Y = Q(s)) != null ? Y : "", O = m.parseCellValue(L), F = m.getListWithColorMap(f), x = Wt(O, k, w, C);
2499
+ this._drawDownIcon(e, I, w, C, P), e.save(), e.translateWithPrecision(I.startX, I.startY), e.beginPath(), e.rect(0, 0, w - Ee, C), e.clip(), e.translateWithPrecision(on, Ot);
2445
2500
  let j = 0;
2446
- switch (A) {
2447
- case se.MIDDLE:
2448
- j = (B.contentHeight - B.totalHeight) / 2;
2501
+ switch (P) {
2502
+ case ae.MIDDLE:
2503
+ j = (x.contentHeight - x.totalHeight) / 2;
2449
2504
  break;
2450
- case se.BOTTOM:
2451
- j = B.contentHeight - B.totalHeight;
2505
+ case ae.BOTTOM:
2506
+ j = x.contentHeight - x.totalHeight;
2452
2507
  break;
2453
2508
  }
2454
- e.translateWithPrecision(0, j), B.lines.forEach((ae, ge) => {
2509
+ e.translateWithPrecision(0, j), x.lines.forEach((te, ge) => {
2455
2510
  e.save();
2456
- const { width: ce, height: ne, items: ue } = ae;
2457
- let Ce = 0;
2458
- switch (L) {
2459
- case ze.RIGHT:
2460
- Ce = B.contentWidth - ce;
2511
+ const { width: ce, height: ne, items: de } = te;
2512
+ let Se = 0;
2513
+ switch (A) {
2514
+ case Ye.RIGHT:
2515
+ Se = x.contentWidth - ce;
2461
2516
  break;
2462
- case ze.CENTER:
2463
- Ce = (B.contentWidth - ce) / 2;
2517
+ case Ye.CENTER:
2518
+ Se = (x.contentWidth - ce) / 2;
2464
2519
  break;
2465
2520
  }
2466
- e.translate(Ce, ge * (ne + Pn)), ue.forEach((fe) => {
2467
- e.save(), e.translateWithPrecision(fe.left, 0), vr.drawWith(e, {
2468
- ...F,
2469
- info: fe,
2470
- color: E,
2471
- fill: U[fe.text]
2521
+ e.translate(Se, ge * (ne + Or)), de.forEach((me) => {
2522
+ e.save(), e.translateWithPrecision(me.left, 0), Yi.drawWith(e, {
2523
+ ...k,
2524
+ info: me,
2525
+ color: D,
2526
+ fill: F[me.text]
2472
2527
  }), e.restore();
2473
2528
  }), e.restore();
2474
- }), e.restore(), V.set(p, {
2529
+ }), e.restore(), y.set(g, {
2475
2530
  left: I.startX,
2476
2531
  top: I.startY,
2477
- width: B.contentWidth + ca + Ee,
2478
- height: B.contentHeight + Pt * 2
2532
+ width: x.contentWidth + on + Ee,
2533
+ height: x.contentHeight + Ot * 2
2479
2534
  });
2480
2535
  }
2481
2536
  calcCellAutoHeight(e) {
2482
- var R;
2483
- const { primaryWithCoord: t, style: n, data: a, row: o, col: i } = e, r = a == null ? void 0 : a.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = r || {}, h = t.isMergedMainCell ? t.mergeInfo : t, c = {
2537
+ var w;
2538
+ const { primaryWithCoord: t, style: r, data: n, row: o, col: i } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = a || {}, h = t.isMergedMainCell ? t.mergeInfo : t, d = {
2484
2539
  startX: h.startX + l,
2485
2540
  endX: h.endX - s,
2486
- startY: h.startY + d,
2541
+ startY: h.startY + c,
2487
2542
  endY: h.endY - u
2488
2543
  }, S = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2489
2544
  if (!S)
2490
2545
  return;
2491
- const m = this._dataValidationModel.getValidator(S.type);
2492
- if (!m)
2546
+ const p = this._dataValidationModel.getValidator(S.type);
2547
+ if (!p)
2493
2548
  return;
2494
- const M = c.endX - c.startX, V = c.endY - c.startY, p = (R = ee(a)) != null ? R : "", f = m.parseCellValue(p), g = Ht(n != null ? n : void 0);
2495
- return Kt(f, g, M, V).cellAutoHeight;
2549
+ const b = d.endX - d.startX, y = d.endY - d.startY, g = (w = Q(n)) != null ? w : "", f = p.parseCellValue(g), m = Ut(r != null ? r : void 0);
2550
+ return Wt(f, m, b, y).cellAutoHeight;
2496
2551
  }
2497
2552
  calcCellAutoWidth(e) {
2498
- var R;
2499
- const { primaryWithCoord: t, style: n, data: a, row: o, col: i } = e, r = a == null ? void 0 : a.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = r || {}, h = t.isMergedMainCell ? t.mergeInfo : t, c = {
2553
+ var w;
2554
+ const { primaryWithCoord: t, style: r, data: n, row: o, col: i } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = a || {}, h = t.isMergedMainCell ? t.mergeInfo : t, d = {
2500
2555
  startX: h.startX + l,
2501
2556
  endX: h.endX - s,
2502
- startY: h.startY + d,
2557
+ startY: h.startY + c,
2503
2558
  endY: h.endY - u
2504
2559
  }, S = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2505
2560
  if (!S)
2506
2561
  return;
2507
- const m = this._dataValidationModel.getValidator(S.type);
2508
- if (!m)
2562
+ const p = this._dataValidationModel.getValidator(S.type);
2563
+ if (!p)
2509
2564
  return;
2510
- const M = c.endX - c.startX, V = c.endY - c.startY, p = (R = ee(a)) != null ? R : "", f = m.parseCellValue(p), g = Ht(n != null ? n : void 0);
2511
- return Kt(f, g, M, V).calcAutoWidth;
2565
+ const b = d.endX - d.startX, y = d.endY - d.startY, g = (w = Q(n)) != null ? w : "", f = p.parseCellValue(g), m = Ut(r != null ? r : void 0);
2566
+ return Wt(f, m, b, y).calcAutoWidth;
2512
2567
  }
2513
2568
  isHit(e, t) {
2514
- const { primaryWithCoord: n } = t, a = n.isMergedMainCell ? n.mergeInfo : n, { endX: o } = a, { x: i } = e;
2569
+ const { primaryWithCoord: r } = t, n = r.isMergedMainCell ? r.mergeInfo : r, { endX: o } = n, { x: i } = e;
2515
2570
  return i >= o - Ee && i <= o;
2516
2571
  }
2517
2572
  onPointerDown(e, t) {
2518
2573
  if (t.button === 2)
2519
2574
  return;
2520
- const { unitId: n, subUnitId: a, row: o, col: i } = e, r = {
2521
- unitId: n,
2522
- subUnitId: a,
2575
+ const { unitId: r, subUnitId: n, row: o, col: i } = e, a = {
2576
+ unitId: r,
2577
+ subUnitId: n,
2523
2578
  row: o,
2524
2579
  column: i
2525
2580
  };
2526
- this._commandService.executeCommand(Nt.id, r);
2581
+ this._commandService.executeCommand(At.id, a);
2527
2582
  }
2528
2583
  onPointerEnter(e, t) {
2529
- var n, a;
2530
- return (a = (n = Ze(x.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : a.setCursor(qe.POINTER);
2584
+ var r, n;
2585
+ return (n = (r = Ke(W.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(Ge.POINTER);
2531
2586
  }
2532
2587
  onPointerLeave(e, t) {
2533
- var n, a;
2534
- return (a = (n = Ze(x.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : a.setCursor(qe.DEFAULT);
2588
+ var r, n;
2589
+ return (n = (r = Ke(W.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(Ge.DEFAULT);
2535
2590
  }
2536
2591
  };
2537
- ua = Sr([
2538
- It(0, Q),
2539
- It(1, de),
2540
- It(2, y(Ne)),
2541
- It(3, y(te))
2542
- ], ua);
2543
- class Ir extends _e {
2592
+ an = zi([
2593
+ vt(0, J),
2594
+ vt(1, le),
2595
+ vt(2, M(Ne)),
2596
+ vt(3, M(ee))
2597
+ ], an);
2598
+ class Gi extends ve {
2544
2599
  constructor() {
2545
2600
  super(...arguments);
2546
- D(this, "id", G.LIST_MULTIPLE);
2547
- D(this, "canvasRender", this.injector.createInstance(ua));
2548
- D(this, "dropdownType", pe.MULTIPLE_LIST);
2601
+ E(this, "id", G.LIST_MULTIPLE);
2602
+ E(this, "canvasRender", this.injector.createInstance(an));
2603
+ E(this, "dropdownType", pe.MULTIPLE_LIST);
2549
2604
  }
2550
2605
  }
2551
- var Rr = Object.getOwnPropertyDescriptor, wr = (e, t, n, a) => {
2552
- for (var o = a > 1 ? void 0 : a ? Rr(t, n) : t, i = e.length - 1, r; i >= 0; i--)
2553
- (r = e[i]) && (o = r(o) || o);
2606
+ var Zi = Object.getOwnPropertyDescriptor, qi = (e, t, r, n) => {
2607
+ for (var o = n > 1 ? void 0 : n ? Zi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
2608
+ (a = e[i]) && (o = a(o) || o);
2554
2609
  return o;
2555
- }, lt = (e, t) => (n, a) => t(n, a, e);
2556
- const De = 4, Rt = 4, me = 14, ve = 6, Ye = 4, Gt = 8, Vr = "#565656", Wa = 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");
2557
- function yr(e, t) {
2558
- const n = e.length;
2610
+ }, at = (e, t) => (r, n) => t(r, n, e);
2611
+ const be = 4, _t = 4, he = 14, fe = 6, We = 4, jt = 8, Ji = "#565656", Fn = 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");
2612
+ function Qi(e, t) {
2613
+ const r = e.length;
2559
2614
  return {
2560
2615
  id: "d",
2561
2616
  body: {
2562
- dataStream: `${e}${qn}`,
2617
+ dataStream: `${e}${zr}`,
2563
2618
  textRuns: [
2564
2619
  {
2565
2620
  ts: {
2566
2621
  fs: 11,
2567
2622
  ff: void 0,
2568
- it: it.FALSE,
2569
- bl: it.FALSE,
2623
+ it: rt.FALSE,
2624
+ bl: rt.FALSE,
2570
2625
  ul: {
2571
- s: it.FALSE
2626
+ s: rt.FALSE
2572
2627
  },
2573
2628
  st: {
2574
- s: it.FALSE
2629
+ s: rt.FALSE
2575
2630
  },
2576
2631
  ol: {
2577
- s: it.FALSE
2632
+ s: rt.FALSE
2578
2633
  },
2579
2634
  cl: void 0,
2580
2635
  ...t,
@@ -2582,7 +2637,7 @@ function yr(e, t) {
2582
2637
  bd: void 0
2583
2638
  },
2584
2639
  st: 0,
2585
- ed: n
2640
+ ed: r
2586
2641
  }
2587
2642
  ]
2588
2643
  },
@@ -2594,64 +2649,64 @@ function yr(e, t) {
2594
2649
  }
2595
2650
  };
2596
2651
  }
2597
- function Fn(e, t, n) {
2598
- const a = yr(e, n), o = new Zn(a), i = new yo(o);
2652
+ function Tr(e, t, r) {
2653
+ const n = Qi(e, r), o = new Xr(n), i = new Io(o);
2599
2654
  return {
2600
- documentSkeleton: Mo.create(i, t),
2655
+ documentSkeleton: wo.create(i, t),
2601
2656
  docModel: o,
2602
2657
  docViewModel: i
2603
2658
  };
2604
2659
  }
2605
- function wt(e, t, n) {
2660
+ function St(e, t, r) {
2606
2661
  const {
2607
- documentSkeleton: a,
2662
+ documentSkeleton: n,
2608
2663
  docModel: o,
2609
2664
  docViewModel: i
2610
- } = Fn(e, t, n);
2665
+ } = Tr(e, t, r);
2611
2666
  return {
2612
- documents: new Vo(`DOCUMENTS_${Qt.generateRandomId()}`, a, {
2667
+ documents: new Co(`DOCUMENTS_${Kt.generateRandomId()}`, n, {
2613
2668
  pageMarginLeft: 0,
2614
2669
  pageMarginTop: 0
2615
2670
  }),
2616
- documentSkeleton: a,
2671
+ documentSkeleton: n,
2617
2672
  docModel: o,
2618
2673
  docViewModel: i
2619
2674
  };
2620
2675
  }
2621
- function xa(e, t, n, a, o, i, r = !0) {
2676
+ function xn(e, t, r, n, o, i, a = !0) {
2622
2677
  let l = 0;
2623
- const s = r ? Ye : 0;
2678
+ const s = a ? We : 0;
2624
2679
  switch (o) {
2625
- case se.BOTTOM:
2626
- l = t - a - s;
2680
+ case ae.BOTTOM:
2681
+ l = t - n - s;
2627
2682
  break;
2628
- case se.MIDDLE:
2629
- l = (t - a) / 2;
2683
+ case ae.MIDDLE:
2684
+ l = (t - n) / 2;
2630
2685
  break;
2631
2686
  default:
2632
2687
  l = s;
2633
2688
  break;
2634
2689
  }
2635
- l = Math.max(Ye, l);
2636
- let d = 0;
2690
+ l = Math.max(We, l);
2691
+ let c = 0;
2637
2692
  switch (i) {
2638
- case ze.CENTER:
2639
- d = (e - n) / 2;
2693
+ case Ye.CENTER:
2694
+ c = (e - r) / 2;
2640
2695
  break;
2641
- case ze.RIGHT:
2642
- d = e - n;
2696
+ case Ye.RIGHT:
2697
+ c = e - r;
2643
2698
  break;
2644
2699
  }
2645
- return d = Math.max(ve, d), {
2646
- paddingLeft: d,
2700
+ return c = Math.max(fe, c), {
2701
+ paddingLeft: c,
2647
2702
  paddingTop: l
2648
2703
  };
2649
2704
  }
2650
- let ha = class {
2651
- constructor(e, t, n, a, o) {
2652
- D(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2653
- D(this, "zIndex");
2654
- this._univerInstanceService = e, this._localeService = t, this._commandService = n, this._renderManagerService = a, this._dataValidationModel = o;
2705
+ let sn = class {
2706
+ constructor(e, t, r, n, o) {
2707
+ E(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2708
+ E(this, "zIndex");
2709
+ this._univerInstanceService = e, this._localeService = t, this._commandService = r, this._renderManagerService = n, this._dataValidationModel = o;
2655
2710
  }
2656
2711
  _ensureMap(e) {
2657
2712
  let t = this._dropdownInfoMap.get(e);
@@ -2660,198 +2715,198 @@ let ha = class {
2660
2715
  _generateKey(e, t) {
2661
2716
  return `${e}.${t}`;
2662
2717
  }
2663
- _drawDownIcon(e, t, n, a, o, i, r) {
2664
- const { t: l = oe.pd.t, b: s = oe.pd.b } = r, d = n - me;
2718
+ _drawDownIcon(e, t, r, n, o, i, a) {
2719
+ const { t: l = re.pd.t, b: s = re.pd.b } = a, c = r - he;
2665
2720
  let u;
2666
2721
  switch (i) {
2667
- case se.MIDDLE:
2668
- u = (a - Rt) / 2;
2722
+ case ae.MIDDLE:
2723
+ u = (n - _t) / 2;
2669
2724
  break;
2670
- case se.BOTTOM:
2671
- u = a - s - o - Ye + (o / 2 - Rt / 2);
2725
+ case ae.BOTTOM:
2726
+ u = n - s - o - We + (o / 2 - _t / 2);
2672
2727
  break;
2673
2728
  default:
2674
- u = l + Ye + (o / 2 - Rt / 2);
2729
+ u = l + We + (o / 2 - _t / 2);
2675
2730
  break;
2676
2731
  }
2677
- e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(Wa), e.restore();
2732
+ e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(Fn), e.restore();
2678
2733
  }
2679
2734
  // eslint-disable-next-line max-lines-per-function, complexity
2680
- drawWith(e, t, n) {
2681
- const { primaryWithCoord: a, row: o, col: i, style: r, data: l, subUnitId: s } = t, d = a.isMergedMainCell ? a.mergeInfo : a, u = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, o, i);
2735
+ drawWith(e, t, r) {
2736
+ const { primaryWithCoord: n, row: o, col: i, style: a, data: l, subUnitId: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, o, i);
2682
2737
  if (!u)
2683
2738
  return;
2684
2739
  const h = this._dataValidationModel.getValidator(u.type);
2685
2740
  if (!h)
2686
2741
  return;
2687
- const c = l == null ? void 0 : l.fontRenderExtension, { leftOffset: S = 0, rightOffset: m = 0, topOffset: M = 0, downOffset: V = 0 } = c || {};
2742
+ const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: S = 0, rightOffset: p = 0, topOffset: b = 0, downOffset: y = 0 } = d || {};
2688
2743
  if (!u || !h || !h || h.id.indexOf(G.LIST) !== 0 || !h.skipDefaultFontRender(u))
2689
2744
  return;
2690
- const p = {
2691
- startX: d.startX + S,
2692
- endX: d.endX - m,
2693
- startY: d.startY + M,
2694
- endY: d.endY - V
2695
- }, f = p.endX - p.startX, g = p.endY - p.startY, I = this._ensureMap(s), R = this._generateKey(o, i), C = h.getListWithColor(u), w = ee(l), E = `${w != null ? w : ""}`, F = C.find((O) => O.label === E);
2696
- let { tb: b, vt: L, ht: A, pd: P } = r || {};
2697
- if (b = b != null ? b : Re.WRAP, L = L != null ? L : se.BOTTOM, A = A != null ? A : oe.ht, P = P != null ? P : oe.pd, u.renderMode === ie.ARROW) {
2698
- const { l: O = oe.pd.l, t: U = oe.pd.t, r: B = oe.pd.r, b: j = oe.pd.b } = P, Z = f - O - B - me - 4, { documentSkeleton: Y, documents: ae, docModel: ge } = wt(E, this._localeService, r);
2699
- b === Re.WRAP && ge.updateDocumentDataPageSize(Math.max(Z, 1)), Y.calculate(), Y.getActualSize();
2700
- const ce = rt(Y), { height: ne, width: ue } = ce, { paddingTop: Ce, paddingLeft: fe } = xa(Z, g - U - j, ue, ne, L, A, !0);
2701
- this._drawDownIcon(e, p, f, g, ne, L, P), e.save(), e.translateWithPrecision(p.startX + O, p.startY + U), e.beginPath(), e.rect(0, 0, f - O - B, g - U - j), e.clip(), e.translateWithPrecision(0, Ce), e.save(), e.translateWithPrecision(De, 0), e.beginPath(), e.rect(0, 0, Z, ne), e.clip(), ae.render(e), e.translateWithPrecision(fe, 0), e.restore(), e.restore(), I.set(R, {
2702
- left: p.endX + O + n.rowHeaderWidth - me,
2703
- top: p.startY + U + n.columnHeaderHeight,
2704
- width: me,
2705
- height: g - U - j
2745
+ const g = {
2746
+ startX: c.startX + S,
2747
+ endX: c.endX - p,
2748
+ startY: c.startY + b,
2749
+ endY: c.endY - y
2750
+ }, f = g.endX - g.startX, m = g.endY - g.startY, I = this._ensureMap(s), w = this._generateKey(o, i), C = h.getListWithColor(u), R = Q(l), D = `${R != null ? R : ""}`, k = C.find((O) => O.label === D);
2751
+ let { tb: V, vt: A, ht: P, pd: L } = a || {};
2752
+ if (V = V != null ? V : Ie.WRAP, A = A != null ? A : ae.BOTTOM, P = P != null ? P : re.ht, L = L != null ? L : re.pd, u.renderMode === oe.ARROW) {
2753
+ const { l: O = re.pd.l, t: F = re.pd.t, r: x = re.pd.r, b: j = re.pd.b } = L, Z = f - O - x - he - 4, { documentSkeleton: Y, documents: te, docModel: ge } = St(D, this._localeService, a);
2754
+ V === Ie.WRAP && ge.updateDocumentDataPageSize(Math.max(Z, 1)), Y.calculate(), Y.getActualSize();
2755
+ const ce = ot(Y), { height: ne, width: de } = ce, { paddingTop: Se, paddingLeft: me } = xn(Z, m - F - j, de, ne, A, P, !0);
2756
+ this._drawDownIcon(e, g, f, m, ne, A, L), e.save(), e.translateWithPrecision(g.startX + O, g.startY + F), e.beginPath(), e.rect(0, 0, f - O - x, m - F - j), e.clip(), e.translateWithPrecision(0, Se), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, Z, ne), e.clip(), te.render(e), e.translateWithPrecision(me, 0), e.restore(), e.restore(), I.set(w, {
2757
+ left: g.endX + O + r.rowHeaderWidth - he,
2758
+ top: g.startY + F + r.columnHeaderHeight,
2759
+ width: he,
2760
+ height: m - F - j
2706
2761
  });
2707
2762
  } else {
2708
- e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, f, g), e.clip();
2709
- const O = f - ve * 2 - De - me - 4, { documentSkeleton: U, documents: B, docModel: j } = wt(E, this._localeService, r);
2710
- b === Re.WRAP && j.updateDocumentDataPageSize(Math.max(O, 1)), U.calculate();
2711
- const Z = rt(U), { height: Y, width: ae } = Z, { paddingTop: ge, paddingLeft: ce } = xa(O, g, ae, Y, L, A);
2712
- e.translateWithPrecision(ve, ge);
2713
- const ne = Math.max(f - ve * 2, 1), ue = Y;
2714
- mn.drawWith(e, {
2763
+ e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, f, m), e.clip();
2764
+ const O = f - fe * 2 - be - he - 4, { documentSkeleton: F, documents: x, docModel: j } = St(D, this._localeService, a);
2765
+ V === Ie.WRAP && j.updateDocumentDataPageSize(Math.max(O, 1)), F.calculate();
2766
+ const Z = ot(F), { height: Y, width: te } = Z, { paddingTop: ge, paddingLeft: ce } = xn(O, m, te, Y, A, P);
2767
+ e.translateWithPrecision(fe, ge);
2768
+ const ne = Math.max(f - fe * 2, 1), de = Y;
2769
+ cr.drawWith(e, {
2715
2770
  width: ne,
2716
- height: ue,
2717
- fill: (F == null ? void 0 : F.color) || je,
2718
- radius: Gt
2719
- }), e.save(), e.translateWithPrecision(De, 0), e.beginPath(), e.rect(0, 0, O, Y), e.clip(), e.translateWithPrecision(ce, 0), B.render(e), e.restore(), e.translateWithPrecision(O + De + 4, (Y - Rt) / 2), e.fillStyle = Vr, e.fill(Wa), e.restore(), I.set(R, {
2720
- left: p.startX + ve + n.rowHeaderWidth,
2721
- top: p.startY + ge + n.columnHeaderHeight,
2771
+ height: de,
2772
+ fill: (k == null ? void 0 : k.color) || He,
2773
+ radius: jt
2774
+ }), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, O, Y), e.clip(), e.translateWithPrecision(ce, 0), x.render(e), e.restore(), e.translateWithPrecision(O + be + 4, (Y - _t) / 2), e.fillStyle = Ji, e.fill(Fn), e.restore(), I.set(w, {
2775
+ left: g.startX + fe + r.rowHeaderWidth,
2776
+ top: g.startY + ge + r.columnHeaderHeight,
2722
2777
  width: ne,
2723
- height: ue
2778
+ height: de
2724
2779
  });
2725
2780
  }
2726
2781
  }
2727
2782
  calcCellAutoHeight(e) {
2728
- const { primaryWithCoord: t, style: n, data: a, row: o, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = a == null ? void 0 : a.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2729
- if (!c || c.renderMode === ie.TEXT)
2783
+ const { primaryWithCoord: t, style: r, data: n, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2784
+ if (!d || d.renderMode === oe.TEXT)
2730
2785
  return;
2731
2786
  const S = {
2732
- startX: r.startX + s,
2733
- endX: r.endX - d,
2734
- startY: r.startY + u,
2735
- endY: r.endY - h
2736
- }, m = S.endX - S.startX, M = ee(a), V = `${M != null ? M : ""}`;
2737
- let { tb: p, pd: f } = n || {};
2738
- const { t: g = oe.pd.t, b: I = oe.pd.b } = f != null ? f : {};
2739
- if (p = p != null ? p : Re.WRAP, c.renderMode === ie.ARROW) {
2740
- const R = m - me, { documentSkeleton: C, docModel: w } = wt(V, this._localeService, n);
2741
- p === Re.WRAP && w.updateDocumentDataPageSize(Math.max(R, 1)), C.calculate(), C.getActualSize();
2742
- const E = rt(C), { height: F } = E;
2743
- return F + g + I + Ye * 2;
2787
+ startX: a.startX + s,
2788
+ endX: a.endX - c,
2789
+ startY: a.startY + u,
2790
+ endY: a.endY - h
2791
+ }, p = S.endX - S.startX, b = Q(n), y = `${b != null ? b : ""}`;
2792
+ let { tb: g, pd: f } = r || {};
2793
+ const { t: m = re.pd.t, b: I = re.pd.b } = f != null ? f : {};
2794
+ if (g = g != null ? g : Ie.WRAP, d.renderMode === oe.ARROW) {
2795
+ const w = p - he, { documentSkeleton: C, docModel: R } = St(y, this._localeService, r);
2796
+ g === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), C.calculate(), C.getActualSize();
2797
+ const D = ot(C), { height: k } = D;
2798
+ return k + m + I + We * 2;
2744
2799
  } else {
2745
- const R = m - ve * 2 - De - me, { documentSkeleton: C, docModel: w } = Fn(V, this._localeService, n);
2746
- p === Re.WRAP && w.updateDocumentDataPageSize(Math.max(R, 1)), C.calculate();
2747
- const E = rt(C), {
2748
- height: F
2749
- } = E;
2750
- return F + Ye * 2;
2800
+ const w = p - fe * 2 - be - he, { documentSkeleton: C, docModel: R } = Tr(y, this._localeService, r);
2801
+ g === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), C.calculate();
2802
+ const D = ot(C), {
2803
+ height: k
2804
+ } = D;
2805
+ return k + We * 2;
2751
2806
  }
2752
2807
  }
2753
2808
  calcCellAutoWidth(e) {
2754
- const { primaryWithCoord: t, style: n, data: a, row: o, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = a == null ? void 0 : a.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2755
- if (!c || c.renderMode === ie.TEXT)
2809
+ const { primaryWithCoord: t, style: r, data: n, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2810
+ if (!d || d.renderMode === oe.TEXT)
2756
2811
  return;
2757
2812
  const S = {
2758
- startX: r.startX + s,
2759
- endX: r.endX - d,
2760
- startY: r.startY + u,
2761
- endY: r.endY - h
2762
- }, m = S.endX - S.startX, M = ee(a), V = `${M != null ? M : ""}`;
2763
- let { tb: p, pd: f } = n || {};
2764
- const { l: g = oe.pd.l, r: I = oe.pd.r } = f != null ? f : {};
2765
- p = p != null ? p : Re.WRAP;
2766
- let R = ve * 2 + me;
2767
- switch (c.renderMode) {
2768
- case ie.ARROW:
2769
- R = me + ve * 2 + I + g;
2813
+ startX: a.startX + s,
2814
+ endX: a.endX - c,
2815
+ startY: a.startY + u,
2816
+ endY: a.endY - h
2817
+ }, p = S.endX - S.startX, b = Q(n), y = `${b != null ? b : ""}`;
2818
+ let { tb: g, pd: f } = r || {};
2819
+ const { l: m = re.pd.l, r: I = re.pd.r } = f != null ? f : {};
2820
+ g = g != null ? g : Ie.WRAP;
2821
+ let w = fe * 2 + he;
2822
+ switch (d.renderMode) {
2823
+ case oe.ARROW:
2824
+ w = he + fe * 2 + I + m;
2770
2825
  break;
2771
- case ie.CUSTOM:
2772
- R = me + ve * 2 + De * 2 + I + g + Gt / 2 + 1;
2826
+ case oe.CUSTOM:
2827
+ w = he + fe * 2 + be * 2 + I + m + jt / 2 + 1;
2773
2828
  break;
2774
2829
  // default is CUSTOM
2775
2830
  default:
2776
- R = me + ve * 2 + De * 2 + I + g + Gt / 2 + 1;
2831
+ w = he + fe * 2 + be * 2 + I + m + jt / 2 + 1;
2777
2832
  }
2778
- const C = m - R, { documentSkeleton: w, docModel: E } = wt(V, this._localeService, n);
2779
- return p === Re.WRAP && E.updateDocumentDataPageSize(Math.max(C, 1)), w.calculate(), w.getActualSize(), rt(w).width + R;
2833
+ const C = p - w, { documentSkeleton: R, docModel: D } = St(y, this._localeService, r);
2834
+ return g === Ie.WRAP && D.updateDocumentDataPageSize(Math.max(C, 1)), R.calculate(), R.getActualSize(), ot(R).width + w;
2780
2835
  }
2781
2836
  isHit(e, t) {
2782
- const { subUnitId: n, row: a, col: o } = t, r = this._ensureMap(n).get(this._generateKey(a, o)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, o);
2783
- if (!l || !r || l.renderMode === ie.TEXT)
2837
+ const { subUnitId: r, row: n, col: o } = t, a = this._ensureMap(r).get(this._generateKey(n, o)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, n, o);
2838
+ if (!l || !a || l.renderMode === oe.TEXT)
2784
2839
  return !1;
2785
- const { top: s, left: d, width: u, height: h } = r, { x: c, y: S } = e;
2786
- return c >= d && c <= d + u && S >= s && S <= s + h;
2840
+ const { top: s, left: c, width: u, height: h } = a, { x: d, y: S } = e;
2841
+ return d >= c && d <= c + u && S >= s && S <= s + h;
2787
2842
  }
2788
2843
  onPointerDown(e, t) {
2789
2844
  if (t.button === 2)
2790
2845
  return;
2791
- const { unitId: n, subUnitId: a, row: o, col: i } = e, r = {
2792
- unitId: n,
2793
- subUnitId: a,
2846
+ const { unitId: r, subUnitId: n, row: o, col: i } = e, a = {
2847
+ unitId: r,
2848
+ subUnitId: n,
2794
2849
  row: o,
2795
2850
  column: i
2796
2851
  };
2797
- this._commandService.executeCommand(Nt.id, r);
2852
+ this._commandService.executeCommand(At.id, a);
2798
2853
  }
2799
2854
  onPointerEnter(e, t) {
2800
- var n, a;
2801
- (a = (n = Ze(x.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || a.setCursor(qe.POINTER);
2855
+ var r, n;
2856
+ (n = (r = Ke(W.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.POINTER);
2802
2857
  }
2803
2858
  onPointerLeave(e, t) {
2804
- var n, a;
2805
- (a = (n = Ze(x.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || a.setCursor(qe.DEFAULT);
2859
+ var r, n;
2860
+ (n = (r = Ke(W.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.DEFAULT);
2806
2861
  }
2807
2862
  };
2808
- ha = wr([
2809
- lt(0, de),
2810
- lt(1, y(le)),
2811
- lt(2, Q),
2812
- lt(3, y(Ne)),
2813
- lt(4, y(te))
2814
- ], ha);
2815
- class Mr extends _e {
2863
+ sn = qi([
2864
+ at(0, le),
2865
+ at(1, M(se)),
2866
+ at(2, J),
2867
+ at(3, M(Ne)),
2868
+ at(4, M(ee))
2869
+ ], sn);
2870
+ class ea extends ve {
2816
2871
  constructor() {
2817
2872
  super(...arguments);
2818
- D(this, "id", G.LIST);
2819
- D(this, "canvasRender", this.injector.createInstance(ha));
2820
- D(this, "dropdownType", pe.LIST);
2821
- D(this, "optionsInput", At.componentKey);
2822
- D(this, "formulaInput", ga);
2873
+ E(this, "id", G.LIST);
2874
+ E(this, "canvasRender", this.injector.createInstance(sn));
2875
+ E(this, "dropdownType", pe.LIST);
2876
+ E(this, "optionsInput", Dt.componentKey);
2877
+ E(this, "formulaInput", dn);
2823
2878
  }
2824
2879
  }
2825
- class Dr extends _e {
2880
+ class ta extends ve {
2826
2881
  constructor() {
2827
2882
  super(...arguments);
2828
- D(this, "id", G.TEXT_LENGTH);
2829
- D(this, "formulaInput", Ft);
2883
+ E(this, "id", G.TEXT_LENGTH);
2884
+ E(this, "formulaInput", Tt);
2830
2885
  }
2831
2886
  }
2832
- class Er extends _e {
2887
+ class na extends ve {
2833
2888
  constructor() {
2834
2889
  super(...arguments);
2835
- D(this, "id", G.WHOLE);
2836
- D(this, "formulaInput", Ft);
2890
+ E(this, "id", G.WHOLE);
2891
+ E(this, "formulaInput", Tt);
2837
2892
  }
2838
2893
  }
2839
- var br = Object.getOwnPropertyDescriptor, Or = (e, t, n, a) => {
2840
- for (var o = a > 1 ? void 0 : a ? br(t, n) : t, i = e.length - 1, r; i >= 0; i--)
2841
- (r = e[i]) && (o = r(o) || o);
2894
+ var ra = Object.getOwnPropertyDescriptor, oa = (e, t, r, n) => {
2895
+ for (var o = n > 1 ? void 0 : n ? ra(t, r) : t, i = e.length - 1, a; i >= 0; i--)
2896
+ (a = e[i]) && (o = a(o) || o);
2842
2897
  return o;
2843
- }, Zt = (e, t) => (n, a) => t(n, a, e);
2844
- let nt = class extends pa {
2845
- constructor(e, t, n) {
2846
- super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = n, this._initComponents(), this._registerValidatorViews();
2898
+ }, Yt = (e, t) => (r, n) => t(r, n, e);
2899
+ let tt = class extends cn {
2900
+ constructor(e, t, r) {
2901
+ super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = r, this._initComponents(), this._registerValidatorViews();
2847
2902
  }
2848
2903
  _initComponents() {
2849
2904
  [
2850
- [bn, Rn],
2851
- [Ot, or],
2852
- [At.componentKey, At],
2853
- [Lt.componentKey, Lt],
2854
- ...mi
2905
+ [Mr, _r],
2906
+ [bt, Pi],
2907
+ [Dt.componentKey, Dt],
2908
+ [Vt.componentKey, Vt],
2909
+ ...ei
2855
2910
  ].forEach(([e, t]) => {
2856
2911
  this.disposeWithMe(this._componentManger.register(
2857
2912
  e,
@@ -2861,144 +2916,144 @@ let nt = class extends pa {
2861
2916
  }
2862
2917
  _registerValidatorViews() {
2863
2918
  [
2864
- mr,
2865
- Er,
2866
- Dr,
2867
- hr,
2868
- dr,
2869
- Mr,
2870
- Ir,
2871
- cr
2919
+ Bi,
2920
+ na,
2921
+ ta,
2922
+ $i,
2923
+ Ui,
2924
+ ea,
2925
+ Gi,
2926
+ Fi
2872
2927
  ].forEach((e) => {
2873
- const t = this._injector.createInstance(e), n = this._dataValidatorRegistryService.getValidatorItem(t.id);
2874
- n && (n.formulaInput = t.formulaInput, n.canvasRender = t.canvasRender, n.dropdownType = t.dropdownType, n.optionsInput = t.optionsInput);
2928
+ const t = this._injector.createInstance(e), r = this._dataValidatorRegistryService.getValidatorItem(t.id);
2929
+ r && (r.formulaInput = t.formulaInput, r.canvasRender = t.canvasRender, r.dropdownType = t.dropdownType, r.optionsInput = t.optionsInput);
2875
2930
  });
2876
2931
  }
2877
2932
  };
2878
- nt = Or([
2879
- Zt(0, y(we)),
2880
- Zt(1, y(Sa)),
2881
- Zt(2, y(ye))
2882
- ], nt);
2883
- var Tr = Object.getOwnPropertyDescriptor, Ar = (e, t, n, a) => {
2884
- for (var o = a > 1 ? void 0 : a ? Tr(t, n) : t, i = e.length - 1, r; i >= 0; i--)
2885
- (r = e[i]) && (o = r(o) || o);
2933
+ tt = oa([
2934
+ Yt(0, M(we)),
2935
+ Yt(1, M(gn)),
2936
+ Yt(2, M(ye))
2937
+ ], tt);
2938
+ var ia = Object.getOwnPropertyDescriptor, aa = (e, t, r, n) => {
2939
+ for (var o = n > 1 ? void 0 : n ? ia(t, r) : t, i = e.length - 1, a; i >= 0; i--)
2940
+ (a = e[i]) && (o = a(o) || o);
2886
2941
  return o;
2887
- }, qt = (e, t) => (n, a) => t(n, a, e);
2888
- const Lr = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2889
- var Vt;
2890
- let ja = (Vt = class extends Za {
2891
- constructor(e = bt, t, n, a) {
2892
- super(), this._config = e, this._injector = t, this._commandService = n, this._configService = a;
2893
- const { menu: o, ...i } = qa(
2942
+ }, Xt = (e, t) => (r, n) => t(r, n, e);
2943
+ const sa = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2944
+ var Ct;
2945
+ let $n = (Ct = class extends Xn {
2946
+ constructor(e = Mt, t, r, n) {
2947
+ super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
2948
+ const { menu: o, ...i } = zn(
2894
2949
  {},
2895
- bt,
2950
+ Mt,
2896
2951
  this._config
2897
2952
  );
2898
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Va, i);
2953
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Sn, i);
2899
2954
  }
2900
2955
  onStarting() {
2901
2956
  [
2902
- [Se],
2903
- [Pe],
2904
- [ht],
2905
- [Qe],
2906
- [at],
2907
- [tt],
2957
+ [_e],
2958
+ [Ae],
2959
+ [dt],
2960
+ [qe],
2908
2961
  [et],
2962
+ [Qe],
2909
2963
  [Je],
2910
- [nt]
2964
+ [Ze],
2965
+ [tt]
2911
2966
  ].forEach((e) => {
2912
2967
  this._injector.add(e);
2913
2968
  }), [
2914
- Ut,
2915
- Nt,
2916
- En,
2917
- ya,
2918
- Be,
2919
- Dn
2969
+ Lt,
2970
+ At,
2971
+ yr,
2972
+ Cn,
2973
+ Fe,
2974
+ Rr
2920
2975
  ].forEach((e) => {
2921
2976
  this._commandService.registerCommand(e);
2922
2977
  });
2923
2978
  }
2924
2979
  onReady() {
2925
- this._injector.get(et), this._injector.get(tt), this._injector.get(Je), this._injector.get(ht), this._injector.get(Ne).registerRenderModule(
2926
- x.UNIVER_SHEET,
2927
- [Tt]
2980
+ this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ze), this._injector.get(dt), this._injector.get(Ne).registerRenderModule(
2981
+ W.UNIVER_SHEET,
2982
+ [Et]
2928
2983
  );
2929
2984
  }
2930
2985
  onRendered() {
2931
- this._injector.get(nt), this._injector.get(at);
2986
+ this._injector.get(tt), this._injector.get(et);
2932
2987
  }
2933
2988
  onSteady() {
2934
- this._injector.get(Qe);
2935
- }
2936
- }, D(Vt, "pluginName", Lr), D(Vt, "type", x.UNIVER_SHEET), Vt);
2937
- ja = Ar([
2938
- qt(1, y(we)),
2939
- qt(2, Q),
2940
- qt(3, ma)
2941
- ], ja);
2942
- var Pr = Object.getOwnPropertyDescriptor, Fr = (e, t, n, a) => {
2943
- for (var o = a > 1 ? void 0 : a ? Pr(t, n) : t, i = e.length - 1, r; i >= 0; i--)
2944
- (r = e[i]) && (o = r(o) || o);
2989
+ this._injector.get(qe);
2990
+ }
2991
+ }, E(Ct, "pluginName", sa), E(Ct, "type", W.UNIVER_SHEET), Ct);
2992
+ $n = aa([
2993
+ Xt(1, M(we)),
2994
+ Xt(2, J),
2995
+ Xt(3, ln)
2996
+ ], $n);
2997
+ var la = Object.getOwnPropertyDescriptor, ca = (e, t, r, n) => {
2998
+ for (var o = n > 1 ? void 0 : n ? la(t, r) : t, i = e.length - 1, a; i >= 0; i--)
2999
+ (a = e[i]) && (o = a(o) || o);
2945
3000
  return o;
2946
- }, Jt = (e, t) => (n, a) => t(n, a, e);
2947
- const kr = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2948
- var yt;
2949
- let Ya = (yt = class extends Za {
2950
- constructor(e = bt, t, n, a) {
2951
- super(), this._config = e, this._injector = t, this._commandService = n, this._configService = a;
2952
- const { menu: o, ...i } = qa(
3001
+ }, zt = (e, t) => (r, n) => t(r, n, e);
3002
+ const da = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3003
+ var It;
3004
+ let Bn = (It = class extends Xn {
3005
+ constructor(e = Mt, t, r, n) {
3006
+ super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
3007
+ const { menu: o, ...i } = zn(
2953
3008
  {},
2954
- bt,
3009
+ Mt,
2955
3010
  this._config
2956
3011
  );
2957
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Va, i);
3012
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Sn, i);
2958
3013
  }
2959
3014
  onStarting() {
2960
3015
  [
2961
- [Se],
2962
- [Pe],
2963
- [ht],
2964
- [Qe],
2965
- [at],
2966
- [tt],
3016
+ [_e],
3017
+ [Ae],
3018
+ [dt],
3019
+ [qe],
2967
3020
  [et],
2968
- [nt]
3021
+ [Qe],
3022
+ [Je],
3023
+ [tt]
2969
3024
  ].forEach((e) => {
2970
3025
  this._injector.add(e);
2971
3026
  }), [
2972
- Ut,
2973
- Nt,
2974
- En,
2975
- ya,
2976
- Be,
2977
- Dn
3027
+ Lt,
3028
+ At,
3029
+ yr,
3030
+ Cn,
3031
+ Fe,
3032
+ Rr
2978
3033
  ].forEach((e) => {
2979
3034
  this._commandService.registerCommand(e);
2980
3035
  });
2981
3036
  }
2982
3037
  onReady() {
2983
- this._injector.get(et), this._injector.get(tt), this._injector.get(Ne).registerRenderModule(
2984
- x.UNIVER_SHEET,
2985
- [Tt]
3038
+ this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ne).registerRenderModule(
3039
+ W.UNIVER_SHEET,
3040
+ [Et]
2986
3041
  );
2987
3042
  }
2988
3043
  onRendered() {
2989
- this._injector.get(nt), this._injector.get(at);
3044
+ this._injector.get(tt), this._injector.get(et);
2990
3045
  }
2991
3046
  onSteady() {
2992
- this._injector.get(Qe);
2993
- }
2994
- }, D(yt, "pluginName", kr), D(yt, "type", x.UNIVER_SHEET), yt);
2995
- Ya = Fr([
2996
- Jt(1, y(we)),
2997
- Jt(2, Q),
2998
- Jt(3, ma)
2999
- ], Ya);
3047
+ this._injector.get(qe);
3048
+ }
3049
+ }, E(It, "pluginName", da), E(It, "type", W.UNIVER_SHEET), It);
3050
+ Bn = ca([
3051
+ zt(1, M(we)),
3052
+ zt(2, J),
3053
+ zt(3, ln)
3054
+ ], Bn);
3000
3055
  export {
3001
- _e as BaseSheetDataValidatorView,
3002
- Ya as UniverSheetsDataValidationMobileUIPlugin,
3003
- ja as UniverSheetsDataValidationUIPlugin
3056
+ ve as BaseSheetDataValidatorView,
3057
+ Bn as UniverSheetsDataValidationMobileUIPlugin,
3058
+ $n as UniverSheetsDataValidationUIPlugin
3004
3059
  };