@univerjs/sheets-data-validation-ui 0.5.0-nightly.202411251606 → 0.5.0-nightly.202411271606

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