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

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