@univerjs/sheets-data-validation-ui 0.7.0-nightly.202505061607 → 0.7.0-nightly.202505091607

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