@univerjs/sheets-conditional-formatting-ui 0.7.0-nightly.202505071607 → 0.7.0-nightly.202505101606

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,26 +1,26 @@
1
- var nr = Object.defineProperty;
2
- var rr = (t, e, r) => e in t ? nr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var ye = (t, e, r) => rr(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { CommandType as he, ICommandService as ee, IUniverInstanceService as z, ColorKit as gn, BooleanNumber as ae, LocaleService as ne, UniverInstanceType as $, Tools as Bt, get as ir, set as sr, createInterceptorKey as fn, InterceptorManager as or, Inject as O, Disposable as ce, Injector as ve, Rectangle as fe, generateRandomId as ar, ObjectMatrix as Ee, Range as pe, toDisposable as pn, InterceptorEffectEnum as lr, DependentOn as Cn, IConfigService as yn, Plugin as bn, merge as Sn, registerDependencies as cr, touchDependencies as kt } from "@univerjs/core";
5
- import { ConditionalFormattingRuleModel as J, CFSubRuleType as F, CFRuleType as U, AddConditionalRuleMutation as se, CFNumberOperator as P, getColorScaleFromValue as ur, iconMap as we, DEFAULT_BG_COLOR as dr, DEFAULT_FONT_COLOR as hr, defaultDataBarPositiveColor as Ye, defaultDataBarNativeColor as Ke, CFValueType as A, createDefaultValueByValueType as Xe, removeUndefinedAttr as vr, createDefaultValue as mt, CFTextOperator as j, CFTimePeriodOperator as ue, iconGroup as mr, getOppositeOperator as jt, compareWithNumber as gr, EMPTY_ICON_TYPE as fr, SetCfCommand as pr, AddCfCommand as In, SetConditionalRuleMutation as be, DeleteConditionalRuleMutation as Se, MoveConditionalRuleMutation as _n, ClearWorksheetCfCommand as Tn, DeleteCfCommand as Yt, MoveCfCommand as Cr, ClearRangeCfCommand as yr, createDefaultRule as Te, ConditionalFormattingViewModel as rt, SHEET_CONDITIONAL_FORMATTING_PLUGIN as it, DeleteConditionalRuleMutationUndoFactory as Le, AddConditionalRuleMutationUndoFactory as Rn, setConditionalRuleMutationUndoFactory as Ae, isRangesEqual as br, ConditionalFormattingService as xn, DEFAULT_PADDING as Sr, DEFAULT_WIDTH as Ir, UniverSheetsConditionalFormattingPlugin as En, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as _r } from "@univerjs/sheets-conditional-formatting";
6
- import { getSheetCommandTarget as Ce, SheetsSelectionsService as $e, RemoveSheetMutation as Tr, SetWorksheetActiveOperation as Wt, setEndForRange as Rr, SetSelectionsOperation as xr, checkRangesEditablePermission as gt, rangeToDiscreteRange as Er, findAllRectangle as ft, createTopMatrixFromMatrix as pt, SheetPermissionCheckController as wr, WorksheetEditPermission as wn, WorksheetSetCellStylePermission as Nn, RangeProtectionPermissionEditPoint as Mn, WorkbookEditablePermission as Vn, RefRangeService as Nr, handleDefaultRangeChangeWithEffectRefCommands as Mr, SheetInterceptorService as qt, INTERCEPTOR_POINT as Vr, ClearSelectionFormatCommand as kr, ClearSelectionAllCommand as Fr, RangeMergeUtil as Ur, AFTER_CELL_EDIT as Pr } from "@univerjs/sheets";
7
- import { useDependency as W, ComponentManager as Gt, useSidebarClick as wt, ILayoutService as Or, useScrollYOverContainer as Lr, ISidebarService as kn, useObservable as Ar, getMenuHiddenObservable as Dr, MenuItemType as $r, RibbonStartGroup as jr, IMenuManagerService as Hr } from "@univerjs/ui";
8
- import { jsx as c, jsxs as k, Fragment as Ht } from "react/jsx-runtime";
9
- import { forwardRef as Ve, useRef as de, createElement as je, useMemo as X, useState as N, useEffect as K } from "react";
10
- import { Dropdown as zt, clsx as ie, ColorPicker as Br, Select as le, InputNumber as Ne, RadioGroup as Wr, Radio as Kt, Checkbox as Ct, Input as qr, Button as Xt, Tooltip as Jt, ReactGridLayout as Gr } from "@univerjs/design";
11
- import { serializeRange as Fn, deserializeRangeWithSheet as zr } from "@univerjs/engine-formula";
12
- import { FormulaEditor as Nt, RangeSelector as Zr } from "@univerjs/sheets-formula-ui";
13
- import { useHighlightRange as Yr, ISheetClipboardService as Kr, COPY_TYPE as Qt, PREDEFINED_HOOK_NAME as Ft, virtualizeDiscreteRanges as Un, getRepeatRange as Xr, SheetSkeletonManagerService as Pn, IAutoFillService as Jr, APPLY_TYPE as Ut, getAutoFillRepeatRange as Qr, getCurrentRangeDisable$ as ei, IFormatPainterService as ti, FormatPainterStatus as Pt } from "@univerjs/sheets-ui";
14
- import { Observable as xe, debounceTime as en, merge as On } from "rxjs";
15
- import { IRenderManagerService as Ln } from "@univerjs/engine-render";
16
- import { bufferTime as ni, filter as tn, debounceTime as nn } from "rxjs/operators";
17
- const An = {
1
+ var rr = Object.defineProperty;
2
+ var ir = (t, e, r) => e in t ? rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var ye = (t, e, r) => ir(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { CommandType as he, ICommandService as te, IUniverInstanceService as z, ColorKit as fn, BooleanNumber as ae, LocaleService as re, UniverInstanceType as $, Tools as Wt, get as sr, set as or, createInterceptorKey as pn, InterceptorManager as ar, Inject as O, Disposable as ce, Injector as ve, Rectangle as fe, generateRandomId as lr, ObjectMatrix as we, Range as pe, toDisposable as Cn, InterceptorEffectEnum as cr, DependentOn as yn, IConfigService as bn, Plugin as Sn, merge as In, registerDependencies as ur, touchDependencies as Ft } from "@univerjs/core";
5
+ import { ConditionalFormattingRuleModel as Q, CFSubRuleType as F, CFRuleType as U, AddConditionalRuleMutation as se, CFNumberOperator as P, getColorScaleFromValue as dr, iconMap as Ee, DEFAULT_BG_COLOR as hr, DEFAULT_FONT_COLOR as vr, defaultDataBarPositiveColor as Ke, defaultDataBarNativeColor as Xe, CFValueType as A, createDefaultValueByValueType as Je, removeUndefinedAttr as gr, createDefaultValue as mt, CFTextOperator as j, CFTimePeriodOperator as ue, iconGroup as mr, getOppositeOperator as Ht, compareWithNumber as fr, EMPTY_ICON_TYPE as pr, SetCfCommand as Cr, AddCfCommand as _n, SetConditionalRuleMutation as be, DeleteConditionalRuleMutation as Se, MoveConditionalRuleMutation as Tn, ClearWorksheetCfCommand as Rn, DeleteCfCommand as Kt, MoveCfCommand as yr, ClearRangeCfCommand as br, createDefaultRule as Te, ConditionalFormattingViewModel as it, SHEET_CONDITIONAL_FORMATTING_PLUGIN as st, DeleteConditionalRuleMutationUndoFactory as Le, AddConditionalRuleMutationUndoFactory as xn, setConditionalRuleMutationUndoFactory as Ae, isRangesEqual as Sr, ConditionalFormattingService as wn, DEFAULT_PADDING as Ir, DEFAULT_WIDTH as _r, UniverSheetsConditionalFormattingPlugin as En, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as Tr } from "@univerjs/sheets-conditional-formatting";
6
+ import { getSheetCommandTarget as Ce, SheetsSelectionsService as $e, RemoveSheetMutation as Rr, SetWorksheetActiveOperation as qt, setEndForRange as xr, SetSelectionsOperation as wr, checkRangesEditablePermission as ft, rangeToDiscreteRange as Er, findAllRectangle as pt, createTopMatrixFromMatrix as Ct, SheetPermissionCheckController as Nr, WorksheetEditPermission as Nn, WorksheetSetCellStylePermission as Mn, RangeProtectionPermissionEditPoint as Vn, WorkbookEditablePermission as kn, RefRangeService as Mr, handleDefaultRangeChangeWithEffectRefCommands as Vr, SheetInterceptorService as Gt, INTERCEPTOR_POINT as kr, ClearSelectionFormatCommand as Fr, ClearSelectionAllCommand as Ur, RangeMergeUtil as Pr, AFTER_CELL_EDIT as Or } from "@univerjs/sheets";
7
+ import { useDependency as W, ComponentManager as zt, useSidebarClick as Nt, ILayoutService as Lr, useScrollYOverContainer as Ar, ISidebarService as Fn, useObservable as Dr, getMenuHiddenObservable as $r, MenuItemType as jr, RibbonStartGroup as Hr, IMenuManagerService as Br } from "@univerjs/ui";
8
+ import { jsx as c, jsxs as k, Fragment as Bt } from "react/jsx-runtime";
9
+ import { forwardRef as Ve, useRef as de, createElement as je, useMemo as J, useState as N, useEffect as K } from "react";
10
+ import { Dropdown as Zt, clsx as X, ColorPicker as Wr, borderClassName as He, Select as le, InputNumber as Ne, RadioGroup as qr, Radio as Xt, Checkbox as yt, Input as Gr, Button as Jt, Tooltip as Qt, ReactGridLayout as zr } from "@univerjs/design";
11
+ import { serializeRange as Un, deserializeRangeWithSheet as Zr } from "@univerjs/engine-formula";
12
+ import { FormulaEditor as Mt, RangeSelector as Yr } from "@univerjs/sheets-formula-ui";
13
+ import { useHighlightRange as Kr, ISheetClipboardService as Xr, COPY_TYPE as en, PREDEFINED_HOOK_NAME as Ut, virtualizeDiscreteRanges as Pn, getRepeatRange as Jr, SheetSkeletonManagerService as On, IAutoFillService as Qr, APPLY_TYPE as Pt, getAutoFillRepeatRange as ei, getCurrentRangeDisable$ as ti, IFormatPainterService as ni, FormatPainterStatus as Ot } from "@univerjs/sheets-ui";
14
+ import { Observable as xe, debounceTime as tn, merge as Ln } from "rxjs";
15
+ import { IRenderManagerService as An } from "@univerjs/engine-render";
16
+ import { bufferTime as ri, filter as nn, debounceTime as rn } from "rxjs/operators";
17
+ const Dn = {
18
18
  type: he.COMMAND,
19
19
  id: "sheet.command.add-average-conditional-rule",
20
20
  handler(t, e) {
21
21
  if (!e)
22
22
  return !1;
23
- const { ranges: r, style: n, stopIfTrue: i, operator: s } = e, o = t.get(J), d = t.get(ee), a = t.get(z), u = Ce(a);
23
+ const { ranges: r, style: n, stopIfTrue: i, operator: s } = e, o = t.get(Q), d = t.get(te), a = t.get(z), u = Ce(a);
24
24
  if (!u) return !1;
25
25
  const { unitId: l, subUnitId: h } = u, v = o.createCfId(l, h), f = {
26
26
  ranges: r,
@@ -35,13 +35,13 @@ const An = {
35
35
  };
36
36
  return d.executeCommand(se.id, { unitId: l, subUnitId: h, rule: f });
37
37
  }
38
- }, Dn = {
38
+ }, $n = {
39
39
  type: he.COMMAND,
40
40
  id: "sheet.command.add-color-scale-conditional-rule",
41
41
  handler(t, e) {
42
42
  if (!e)
43
43
  return !1;
44
- const { ranges: r, config: n, stopIfTrue: i } = e, s = t.get(J), o = t.get(ee), d = t.get(z), a = Ce(d);
44
+ const { ranges: r, config: n, stopIfTrue: i } = e, s = t.get(Q), o = t.get(te), d = t.get(z), a = Ce(d);
45
45
  if (!a) return !1;
46
46
  const { unitId: u, subUnitId: l } = a, h = s.createCfId(u, l), v = {
47
47
  ranges: r,
@@ -54,15 +54,15 @@ const An = {
54
54
  };
55
55
  return o.executeCommand(se.id, { unitId: u, subUnitId: l, rule: v });
56
56
  }
57
- }, $n = {
57
+ }, jn = {
58
58
  type: he.COMMAND,
59
59
  id: "sheet.command.add-data-bar-conditional-rule",
60
60
  handler(t, e) {
61
61
  if (!e)
62
62
  return !1;
63
- const { ranges: r, min: n, max: i, nativeColor: s, positiveColor: o, isGradient: d, stopIfTrue: a, isShowValue: u } = e, l = t.get(J), h = t.get(z), v = Ce(h);
63
+ const { ranges: r, min: n, max: i, nativeColor: s, positiveColor: o, isGradient: d, stopIfTrue: a, isShowValue: u } = e, l = t.get(Q), h = t.get(z), v = Ce(h);
64
64
  if (!v) return !1;
65
- const { unitId: f, subUnitId: S } = v, p = t.get(ee), T = l.createCfId(f, S), _ = {
65
+ const { unitId: f, subUnitId: S } = v, p = t.get(te), T = l.createCfId(f, S), _ = {
66
66
  ranges: r,
67
67
  cfId: T,
68
68
  stopIfTrue: !!a,
@@ -80,13 +80,13 @@ const An = {
80
80
  };
81
81
  return p.executeCommand(se.id, { unitId: f, subUnitId: S, rule: _ });
82
82
  }
83
- }, jn = {
83
+ }, Hn = {
84
84
  type: he.COMMAND,
85
85
  id: "sheet.command.add-duplicate-values-conditional-rule",
86
86
  handler(t, e) {
87
87
  if (!e)
88
88
  return !1;
89
- const { ranges: r, style: n, stopIfTrue: i } = e, s = t.get(J), o = t.get(ee), d = t.get(z), a = Ce(d);
89
+ const { ranges: r, style: n, stopIfTrue: i } = e, s = t.get(Q), o = t.get(te), d = t.get(z), a = Ce(d);
90
90
  if (!a) return !1;
91
91
  const { unitId: u, subUnitId: l } = a, h = s.createCfId(u, l), v = {
92
92
  ranges: r,
@@ -100,13 +100,13 @@ const An = {
100
100
  };
101
101
  return o.executeCommand(se.id, { unitId: u, subUnitId: l, rule: v });
102
102
  }
103
- }, Hn = {
103
+ }, Bn = {
104
104
  type: he.COMMAND,
105
105
  id: "sheet.command.add-number-conditional-rule",
106
106
  handler(t, e) {
107
107
  if (!e)
108
108
  return !1;
109
- const { ranges: r, style: n, stopIfTrue: i, operator: s, value: o } = e, d = t.get(J), a = t.get(ee), u = t.get(z), l = Ce(u);
109
+ const { ranges: r, style: n, stopIfTrue: i, operator: s, value: o } = e, d = t.get(Q), a = t.get(te), u = t.get(z), l = Ce(u);
110
110
  if (!l) return !1;
111
111
  const { unitId: h, subUnitId: v } = l, f = d.createCfId(h, v);
112
112
  let S;
@@ -145,13 +145,13 @@ const An = {
145
145
  }
146
146
  return a.executeCommand(se.id, { unitId: h, subUnitId: v, rule: S });
147
147
  }
148
- }, Bn = {
148
+ }, Wn = {
149
149
  type: he.COMMAND,
150
150
  id: "sheet.command.add-rank-conditional-rule",
151
151
  handler(t, e) {
152
152
  if (!e)
153
153
  return !1;
154
- const { ranges: r, style: n, stopIfTrue: i, isPercent: s, isBottom: o, value: d } = e, a = t.get(J), u = t.get(z), l = t.get(ee), h = Ce(u);
154
+ const { ranges: r, style: n, stopIfTrue: i, isPercent: s, isBottom: o, value: d } = e, a = t.get(Q), u = t.get(z), l = t.get(te), h = Ce(u);
155
155
  if (!h) return !1;
156
156
  const { unitId: v, subUnitId: f } = h, S = a.createCfId(v, f), p = {
157
157
  ranges: r,
@@ -168,15 +168,15 @@ const An = {
168
168
  };
169
169
  return l.executeCommand(se.id, { unitId: v, subUnitId: f, rule: p });
170
170
  }
171
- }, Wn = {
171
+ }, qn = {
172
172
  type: he.COMMAND,
173
173
  id: "sheet.command.add-text-conditional-rule",
174
174
  handler(t, e) {
175
175
  if (!e)
176
176
  return !1;
177
- const { ranges: r, style: n, stopIfTrue: i, operator: s, value: o } = e, d = t.get(J), a = t.get(z), u = Ce(a);
177
+ const { ranges: r, style: n, stopIfTrue: i, operator: s, value: o } = e, d = t.get(Q), a = t.get(z), u = Ce(a);
178
178
  if (!u) return !1;
179
- const { unitId: l, subUnitId: h } = u, v = t.get(ee), f = d.createCfId(l, h), S = {
179
+ const { unitId: l, subUnitId: h } = u, v = t.get(te), f = d.createCfId(l, h), S = {
180
180
  ranges: r,
181
181
  cfId: f,
182
182
  stopIfTrue: !!i,
@@ -190,13 +190,13 @@ const An = {
190
190
  };
191
191
  return v.executeCommand(se.id, { unitId: l, subUnitId: h, rule: S });
192
192
  }
193
- }, qn = {
193
+ }, Gn = {
194
194
  type: he.COMMAND,
195
195
  id: "sheet.command.add-time-period-conditional-rule",
196
196
  handler(t, e) {
197
197
  if (!e)
198
198
  return !1;
199
- const { ranges: r, style: n, stopIfTrue: i, operator: s } = e, o = t.get(J), d = t.get(z), a = t.get(ee), u = Ce(d);
199
+ const { ranges: r, style: n, stopIfTrue: i, operator: s } = e, o = t.get(Q), d = t.get(z), a = t.get(te), u = Ce(d);
200
200
  if (!u) return !1;
201
201
  const { unitId: l, subUnitId: h } = u, v = o.createCfId(l, h), f = {
202
202
  ranges: r,
@@ -211,13 +211,13 @@ const An = {
211
211
  };
212
212
  return a.executeCommand(se.id, { unitId: l, subUnitId: h, rule: f });
213
213
  }
214
- }, Gn = {
214
+ }, zn = {
215
215
  type: he.COMMAND,
216
216
  id: "sheet.command.add-uniqueValues-conditional-rule",
217
217
  handler(t, e) {
218
218
  if (!e)
219
219
  return !1;
220
- const { ranges: r, style: n, stopIfTrue: i } = e, s = t.get(J), o = t.get(z), d = t.get(ee), a = Ce(o);
220
+ const { ranges: r, style: n, stopIfTrue: i } = e, s = t.get(Q), o = t.get(z), d = t.get(te), a = Ce(o);
221
221
  if (!a) return !1;
222
222
  const { unitId: u, subUnitId: l } = a, h = s.createCfId(u, l), v = {
223
223
  ranges: r,
@@ -240,23 +240,23 @@ var oe = function() {
240
240
  }
241
241
  return t;
242
242
  }, oe.apply(this, arguments);
243
- }, ri = function(t, e) {
243
+ }, ii = function(t, e) {
244
244
  var r = {};
245
245
  for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]);
246
246
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
247
247
  for (var i = 0, n = Object.getOwnPropertySymbols(t); i < n.length; i++)
248
248
  e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[i]) && (r[n[i]] = t[n[i]]);
249
249
  return r;
250
- }, He = Ve(function(t, e) {
251
- var r = t.icon, n = t.id, i = t.className, s = t.extend, o = ri(t, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), a = de("_".concat(oi()));
252
- return zn(r, "".concat(n), { defIds: r.defIds, idSuffix: a.current }, oe({ ref: e, className: d }, o), s);
250
+ }, Be = Ve(function(t, e) {
251
+ var r = t.icon, n = t.id, i = t.className, s = t.extend, o = ii(t, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), a = de("_".concat(ai()));
252
+ return Zn(r, "".concat(n), { defIds: r.defIds, idSuffix: a.current }, oe({ ref: e, className: d }, o), s);
253
253
  });
254
- function zn(t, e, r, n, i) {
255
- return je(t.tag, oe(oe({ key: e }, ii(t, r, i)), n), (si(t, r).children || []).map(function(s, o) {
256
- return zn(s, "".concat(e, "-").concat(t.tag, "-").concat(o), r, void 0, i);
254
+ function Zn(t, e, r, n, i) {
255
+ return je(t.tag, oe(oe({ key: e }, si(t, r, i)), n), (oi(t, r).children || []).map(function(s, o) {
256
+ return Zn(s, "".concat(e, "-").concat(t.tag, "-").concat(o), r, void 0, i);
257
257
  }));
258
258
  }
259
- function ii(t, e, r) {
259
+ function si(t, e, r) {
260
260
  var n = oe({}, t.attrs);
261
261
  r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), t.tag === "mask" && n.id && (n.id = n.id + e.idSuffix), Object.entries(n).forEach(function(s) {
262
262
  var o = s[0], d = s[1];
@@ -268,75 +268,75 @@ function ii(t, e, r) {
268
268
  typeof d == "string" && (n[o] = d.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
269
269
  })), n;
270
270
  }
271
- function si(t, e) {
271
+ function oi(t, e) {
272
272
  var r, n = e.defIds;
273
273
  return !n || n.length === 0 ? t : t.tag === "defs" && (!((r = t.children) === null || r === void 0) && r.length) ? oe(oe({}, t), { children: t.children.map(function(i) {
274
274
  return typeof i.attrs.id == "string" && n && n.indexOf(i.attrs.id) > -1 ? oe(oe({}, i), { attrs: oe(oe({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
275
275
  }) }) : t;
276
276
  }
277
- function oi() {
277
+ function ai() {
278
278
  return Math.random().toString(36).substring(2, 8);
279
279
  }
280
- He.displayName = "UniverIcon";
281
- var ai = { 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" } }] }, vt = Ve(function(t, e) {
282
- return je(He, Object.assign({}, t, {
280
+ Be.displayName = "UniverIcon";
281
+ 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" } }] }, gt = Ve(function(t, e) {
282
+ return je(Be, Object.assign({}, t, {
283
283
  id: "delete-single",
284
284
  ref: e,
285
- icon: ai
285
+ icon: li
286
286
  }));
287
287
  });
288
- vt.displayName = "DeleteSingle";
289
- var li = { 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" } }] }, Zn = Ve(function(t, e) {
290
- return je(He, Object.assign({}, t, {
288
+ gt.displayName = "DeleteSingle";
289
+ var ci = { 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" } }] }, Yn = Ve(function(t, e) {
290
+ return je(Be, Object.assign({}, t, {
291
291
  id: "increase-single",
292
292
  ref: e,
293
- icon: li
293
+ icon: ci
294
294
  }));
295
295
  });
296
- Zn.displayName = "IncreaseSingle";
297
- 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" } }] }, Mt = Ve(function(t, e) {
298
- return je(He, Object.assign({}, t, {
296
+ Yn.displayName = "IncreaseSingle";
297
+ var ui = { 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" } }] }, Vt = Ve(function(t, e) {
298
+ return je(Be, Object.assign({}, t, {
299
299
  id: "more-down-single",
300
300
  ref: e,
301
- icon: ci
301
+ icon: ui
302
302
  }));
303
303
  });
304
- Mt.displayName = "MoreDownSingle";
305
- var ui = { 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" } }] }] }, Yn = Ve(function(t, e) {
306
- return je(He, Object.assign({}, t, {
304
+ Vt.displayName = "MoreDownSingle";
305
+ var di = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Kn = Ve(function(t, e) {
306
+ return je(Be, Object.assign({}, t, {
307
307
  id: "sequence-single",
308
308
  ref: e,
309
- icon: ui
309
+ icon: di
310
310
  }));
311
311
  });
312
- Yn.displayName = "SequenceSingle";
313
- var di = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_436_41", style: { maskType: "alpha" }, width: 17, height: 17, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0.35 0.48H16.35V16.48H0.35z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_436_41)", fillRule: "evenodd", clipRule: "evenodd" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z" } }, { tag: "path", attrs: { fill: "#E5E5E5", d: "M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z" } }] }] }, st = Ve(function(t, e) {
314
- return je(He, Object.assign({}, t, {
312
+ Kn.displayName = "SequenceSingle";
313
+ var hi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_436_41", style: { maskType: "alpha" }, width: 17, height: 17, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0.35 0.48H16.35V16.48H0.35z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_436_41)", fillRule: "evenodd", clipRule: "evenodd" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z" } }, { tag: "path", attrs: { fill: "#E5E5E5", d: "M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z" } }] }] }, ot = Ve(function(t, e) {
314
+ return je(Be, Object.assign({}, t, {
315
315
  id: "slash-single",
316
316
  ref: e,
317
- icon: di
317
+ icon: hi
318
318
  }));
319
319
  });
320
- st.displayName = "SlashSingle";
320
+ ot.displayName = "SlashSingle";
321
321
  const Me = (t) => {
322
- const { color: e, onChange: r, disable: n = !1, iconId: i = "PaintBucket", className: s, isNeedDropdownIcon: o = !0 } = t, d = W(Gt), a = X(() => new gn(e), [e]), u = d.get(i);
323
- return u ? n ? /* @__PURE__ */ c(u, { className: ie("univer-fill-primary-600", s), extend: { colorChannel1: a.isValid ? e : "" } }) : /* @__PURE__ */ c(
324
- zt,
322
+ const { color: e, onChange: r, disable: n = !1, iconId: i = "PaintBucket", className: s, isNeedDropdownIcon: o = !0 } = t, d = W(zt), a = J(() => new fn(e), [e]), u = d.get(i);
323
+ return u ? n ? /* @__PURE__ */ c(u, { className: X("univer-fill-primary-600", s), extend: { colorChannel1: a.isValid ? e : "" } }) : /* @__PURE__ */ c(
324
+ Zt,
325
325
  {
326
- overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(Br, { value: e, onChange: r }) }),
326
+ overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(Wr, { value: e, onChange: r }) }),
327
327
  children: /* @__PURE__ */ k(
328
328
  "span",
329
329
  {
330
- className: ie(`
330
+ className: X(`
331
331
  univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1
332
332
  hover:univer-bg-gray-100
333
333
  `, s),
334
334
  children: [
335
335
  /* @__PURE__ */ c(u, { className: "univer-fill-primary-600", extend: { colorChannel1: a.isValid ? e : "" } }),
336
336
  o && /* @__PURE__ */ c(
337
- Mt,
337
+ Vt,
338
338
  {
339
- className: "univer-ml-1.5 univer-text-[10px] univer-text-gray-400"
339
+ className: "univer-ml-1.5 univer-text-gray-400"
340
340
  }
341
341
  )
342
342
  ]
@@ -344,27 +344,27 @@ const Me = (t) => {
344
344
  )
345
345
  }
346
346
  ) : null;
347
- }, Be = (t) => {
347
+ }, We = (t) => {
348
348
  var s, o, d;
349
349
  const e = t.rule;
350
350
  if (!e) return null;
351
- const r = X(() => {
351
+ const r = J(() => {
352
352
  if (e.type === U.colorScale) {
353
- const a = e.config.map((h, v) => ({ color: new gn(h.color), value: v })), u = a.length - 1;
354
- return new Array(5).fill("").map((h, v, f) => v * u / (f.length - 1)).map((h) => ur(a, h));
353
+ const a = e.config.map((h, v) => ({ color: new fn(h.color), value: v })), u = a.length - 1;
354
+ return new Array(5).fill("").map((h, v, f) => v * u / (f.length - 1)).map((h) => dr(a, h));
355
355
  }
356
356
  return null;
357
- }, [e]), n = X(() => {
357
+ }, [e]), n = J(() => {
358
358
  if (e.type === U.iconSet)
359
359
  return e.config.map((a) => {
360
- const u = we[a.iconType];
360
+ const u = Ee[a.iconType];
361
361
  return u && u[Number(a.iconId)];
362
362
  });
363
363
  }, [e]), i = `univer-pointer-events-none univer-flex univer-h-5 univer-min-w-[72px] univer-items-center
364
364
  univer-justify-center univer-text-xs`;
365
365
  switch (e.type) {
366
366
  case U.dataBar: {
367
- const { isGradient: a } = e.config, u = a ? `linear-gradient(to right, ${e.config.positiveColor || Ye}, rgb(255 255 255))` : e.config.positiveColor, l = a ? `linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor || Ke})` : e.config.nativeColor;
367
+ const { isGradient: a } = e.config, u = a ? `linear-gradient(to right, ${e.config.positiveColor || Ke}, rgb(255 255 255))` : e.config.positiveColor, l = a ? `linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor || Xe})` : e.config.nativeColor;
368
368
  return /* @__PURE__ */ k("div", { className: i, children: [
369
369
  /* @__PURE__ */ c(
370
370
  "div",
@@ -372,7 +372,7 @@ const Me = (t) => {
372
372
  className: "univer-h-full univer-w-1/2",
373
373
  style: {
374
374
  background: l,
375
- border: `1px solid ${e.config.nativeColor || Ke}`
375
+ border: `1px solid ${e.config.nativeColor || Xe}`
376
376
  }
377
377
  }
378
378
  ),
@@ -382,7 +382,7 @@ const Me = (t) => {
382
382
  className: "univer-h-full univer-w-1/2",
383
383
  style: {
384
384
  background: u,
385
- border: `1px solid ${e.config.positiveColor || Ye}`
385
+ border: `1px solid ${e.config.positiveColor || Ke}`
386
386
  }
387
387
  }
388
388
  )
@@ -391,17 +391,17 @@ const Me = (t) => {
391
391
  case U.colorScale:
392
392
  return r && /* @__PURE__ */ c("div", { className: i, children: r.map((a, u) => /* @__PURE__ */ c("div", { className: "univer-h-full", style: { width: `${100 / r.length}%`, background: a } }, u)) });
393
393
  case U.iconSet:
394
- return n && /* @__PURE__ */ c("div", { className: i, children: n.map((a, u) => a ? /* @__PURE__ */ c("img", { className: "univer-h-full", src: a, draggable: !1 }, u) : /* @__PURE__ */ c(st, {}, u)) });
394
+ return n && /* @__PURE__ */ c("div", { className: i, children: n.map((a, u) => a ? /* @__PURE__ */ c("img", { className: "univer-h-full", src: a, draggable: !1 }, u) : /* @__PURE__ */ c(ot, {}, u)) });
395
395
  case U.highlightCell: {
396
- const { ul: a, st: u, it: l, bl: h, bg: v, cl: f } = e.style, S = (a == null ? void 0 : a.s) === ae.TRUE, p = (u == null ? void 0 : u.s) === ae.TRUE, T = l === ae.TRUE, _ = h === ae.TRUE, R = (s = v == null ? void 0 : v.rgb) != null ? s : dr, E = (o = f == null ? void 0 : f.rgb) != null ? o : hr, x = {
396
+ const { ul: a, st: u, it: l, bl: h, bg: v, cl: f } = e.style, S = (a == null ? void 0 : a.s) === ae.TRUE, p = (u == null ? void 0 : u.s) === ae.TRUE, T = l === ae.TRUE, _ = h === ae.TRUE, R = (s = v == null ? void 0 : v.rgb) != null ? s : hr, w = (o = f == null ? void 0 : f.rgb) != null ? o : vr, x = {
397
397
  textDecoration: (d = `${S ? "underline" : ""} ${p ? "line-through" : ""}`.replace(/^ /, "")) != null ? d : void 0,
398
398
  backgroundColor: R,
399
- color: E
399
+ color: w
400
400
  };
401
401
  return /* @__PURE__ */ c(
402
402
  "div",
403
403
  {
404
- className: ie(i, {
404
+ className: X(i, {
405
405
  "univer-font-bold": _,
406
406
  "univer-italic": T
407
407
  }),
@@ -411,31 +411,30 @@ const Me = (t) => {
411
411
  );
412
412
  }
413
413
  }
414
- }, ot = "univer-mt-5 univer-px-1 univer-py-2 univer-border univer-border-solid univer-border-gray-200 univer-rounded", Re = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Ot = (t) => {
414
+ }, at = X("univer-mt-5 univer-px-1 univer-py-2 univer-rounded", He), Re = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Lt = (t) => {
415
415
  var S;
416
- const { type: e, className: r, onChange: n, id: i, value: s } = t, o = W(z), d = o.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), a = (S = o.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : S.getSheetId(), u = X(() => String(s).startsWith("=") ? String(s) : "=", [s]), l = X(() => [A.max, A.min, "none"].includes(e) ? { disabled: !0 } : [A.percent, A.percentile].includes(e) ? {
416
+ const { type: e, className: r, onChange: n, id: i, value: s } = t, o = W(z), d = o.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), a = (S = o.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : S.getSheetId(), u = J(() => String(s).startsWith("=") ? String(s) : "=", [s]), l = J(() => [A.max, A.min, "none"].includes(e) ? { disabled: !0 } : [A.percent, A.percentile].includes(e) ? {
417
417
  min: 0,
418
418
  max: 100
419
419
  } : {
420
420
  min: Number.MIN_SAFE_INTEGER,
421
421
  max: Number.MAX_SAFE_INTEGER
422
422
  }, [e]), h = de(null), [v, f] = N(!1);
423
- return wt((p) => {
423
+ return Nt((p) => {
424
424
  var _;
425
425
  ((_ = h.current) == null ? void 0 : _.isClickOutSide(p)) && f(!1);
426
426
  }), e === A.formula ? /* @__PURE__ */ c("div", { className: "univer-ml-1 univer-w-full", children: /* @__PURE__ */ c(
427
- Nt,
427
+ Mt,
428
428
  {
429
429
  ref: h,
430
- className: `
430
+ className: X(`
431
431
  univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
432
- univer-rounded-lg univer-border univer-border-solid univer-border-gray-200 univer-bg-white
433
- univer-pt-2 univer-transition-colors
432
+ univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
434
433
  [&>div:first-child]:univer-px-2.5
435
434
  [&>div]:univer-h-5 [&>div]:univer-ring-transparent
436
- dark:univer-border-gray-600 dark:univer-bg-gray-700 dark:univer-text-white
435
+ dark:univer-bg-gray-700 dark:univer-text-white
437
436
  hover:univer-border-primary-600
438
- `,
437
+ `, He),
439
438
  initValue: u,
440
439
  unitId: d,
441
440
  subUnitId: a,
@@ -446,20 +445,20 @@ const Me = (t) => {
446
445
  onFocus: () => f(!0)
447
446
  }
448
447
  ) }) : /* @__PURE__ */ c(Ne, { className: r, value: Number(t.value) || 0, onChange: (p) => t.onChange(p || 0), ...l });
449
- }, hi = (t) => {
448
+ }, vi = (t) => {
450
449
  var L;
451
- const { interceptorManager: e } = t, r = W(ne), n = ((L = t.rule) == null ? void 0 : L.type) === U.colorScale ? t.rule : void 0, i = [Re(A.num, r), Re(A.percent, r), Re(A.percentile, r), Re(A.formula, r)], s = [Re(A.min, r), ...i], o = [Re("none", r), ...i], d = [Re(A.max, r), ...i], [a, u] = N(() => {
450
+ const { interceptorManager: e } = t, r = W(re), n = ((L = t.rule) == null ? void 0 : L.type) === U.colorScale ? t.rule : void 0, i = [Re(A.num, r), Re(A.percent, r), Re(A.percentile, r), Re(A.formula, r)], s = [Re(A.min, r), ...i], o = [Re("none", r), ...i], d = [Re(A.max, r), ...i], [a, u] = N(() => {
452
451
  var I;
453
- const g = A.min;
454
- return n && ((I = n.config[0]) == null ? void 0 : I.value.type) || g;
452
+ const m = A.min;
453
+ return n && ((I = n.config[0]) == null ? void 0 : I.value.type) || m;
455
454
  }), [l, h] = N(() => {
456
455
  var I;
457
- const g = "none";
458
- return !n || n.config.length !== 3 ? g : ((I = n.config[1]) == null ? void 0 : I.value.type) || g;
456
+ const m = "none";
457
+ return !n || n.config.length !== 3 ? m : ((I = n.config[1]) == null ? void 0 : I.value.type) || m;
459
458
  }), [v, f] = N(() => {
460
459
  var I;
461
- const g = A.max;
462
- return n && ((I = n.config[n.config.length - 1]) == null ? void 0 : I.value.type) || g;
460
+ const m = A.max;
461
+ return n && ((I = n.config[n.config.length - 1]) == null ? void 0 : I.value.type) || m;
463
462
  }), [S, p] = N(() => {
464
463
  if (!n)
465
464
  return 10;
@@ -471,40 +470,58 @@ const Me = (t) => {
471
470
  return 50;
472
471
  const I = (H = n.config[1]) == null ? void 0 : H.value.value;
473
472
  return I === void 0 ? 50 : I;
474
- }), [R, E] = N(() => {
473
+ }), [R, w] = N(() => {
475
474
  var H;
476
475
  if (!n)
477
476
  return 90;
478
477
  const I = (H = n.config[n.config.length - 1]) == null ? void 0 : H.value.value;
479
478
  return I === void 0 ? 90 : I;
480
- }), [x, m] = N(() => {
479
+ }), [x, g] = N(() => {
481
480
  var I;
482
- const g = "#d0d9fb";
483
- return n && ((I = n.config[0]) == null ? void 0 : I.color) || g;
481
+ const m = "#d0d9fb";
482
+ return n && ((I = n.config[0]) == null ? void 0 : I.color) || m;
484
483
  }), [C, b] = N(() => {
485
484
  var I;
486
- const g = "#7790f3";
487
- return !n || n.config.length !== 3 ? g : ((I = n.config[1]) == null ? void 0 : I.color) || g;
485
+ const m = "#7790f3";
486
+ return !n || n.config.length !== 3 ? m : ((I = n.config[1]) == null ? void 0 : I.color) || m;
488
487
  }), [y, M] = N(() => {
489
488
  var I;
490
- const g = "#2e55ef";
491
- return n && ((I = n.config[n.config.length - 1]) == null ? void 0 : I.color) || g;
492
- }), w = X(() => (g) => {
493
- const { minType: I, medianType: H, maxType: Y, minValue: me, medianValue: ge, maxValue: ke, minColor: Fe, medianColor: D, maxColor: B } = g, G = [];
494
- return G.push({ color: Fe, value: { type: I, value: me } }), H !== "none" && G.push({ color: D, value: { type: H, value: ge } }), G.push({ color: B, value: { type: Y, value: ke } }), { config: G.map((Q, te) => ({ ...Q, index: te })), type: U.colorScale };
489
+ const m = "#2e55ef";
490
+ return n && ((I = n.config[n.config.length - 1]) == null ? void 0 : I.color) || m;
491
+ }), E = J(() => (m) => {
492
+ const { minType: I, medianType: H, maxType: Y, minValue: ge, medianValue: me, maxValue: ke, minColor: Fe, medianColor: D, maxColor: B } = m, G = [];
493
+ return G.push({ color: Fe, value: { type: I, value: ge } }), H !== "none" && G.push({ color: D, value: { type: H, value: me } }), G.push({ color: B, value: { type: Y, value: ke } }), { config: G.map((ee, ne) => ({ ...ee, index: ne })), type: U.colorScale };
495
494
  }, []);
496
495
  K(() => e.intercept(e.getInterceptPoints().submit, {
497
496
  handler() {
498
- return w({ minType: a, medianType: l, maxType: v, minValue: S, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y });
497
+ return E({ minType: a, medianType: l, maxType: v, minValue: S, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y });
499
498
  }
500
- }), [w, a, l, v, S, T, R, x, C, y, e]);
501
- const V = (g) => {
502
- t.onChange(w(g));
499
+ }), [E, a, l, v, S, T, R, x, C, y, e]);
500
+ const V = (m) => {
501
+ t.onChange(E(m));
503
502
  };
504
503
  return /* @__PURE__ */ k("div", { children: [
505
- /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.styleRule") }),
506
- /* @__PURE__ */ c("div", { className: ot, children: /* @__PURE__ */ c(Be, { rule: w({ minType: a, medianType: l, maxType: v, minValue: S, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y }) }) }),
507
- /* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-xs univer-text-gray-600", children: r.t("sheet.cf.valueType.min") }),
504
+ /* @__PURE__ */ c(
505
+ "div",
506
+ {
507
+ className: `
508
+ univer-mt-4 univer-text-sm univer-text-gray-600
509
+ dark:univer-text-gray-200
510
+ `,
511
+ children: r.t("sheet.cf.panel.styleRule")
512
+ }
513
+ ),
514
+ /* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: E({ minType: a, medianType: l, maxType: v, minValue: S, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y }) }) }),
515
+ /* @__PURE__ */ c(
516
+ "div",
517
+ {
518
+ className: `
519
+ univer-mt-3 univer-text-xs univer-text-gray-600
520
+ dark:univer-text-gray-200
521
+ `,
522
+ children: r.t("sheet.cf.valueType.min")
523
+ }
524
+ ),
508
525
  /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
509
526
  /* @__PURE__ */ c(
510
527
  le,
@@ -512,22 +529,42 @@ const Me = (t) => {
512
529
  className: "univer-flex-shrink-0",
513
530
  options: s,
514
531
  value: a,
515
- onChange: (g) => {
516
- u(g);
517
- const I = Xe(g, 10);
518
- p(I), V({ minType: g, medianType: l, maxType: v, minValue: I, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y });
532
+ onChange: (m) => {
533
+ u(m);
534
+ const I = Je(m, 10);
535
+ p(I), V({
536
+ minType: m,
537
+ medianType: l,
538
+ maxType: v,
539
+ minValue: I,
540
+ medianValue: T,
541
+ maxValue: R,
542
+ minColor: x,
543
+ medianColor: C,
544
+ maxColor: y
545
+ });
519
546
  }
520
547
  }
521
548
  ),
522
549
  /* @__PURE__ */ c(
523
- Ot,
550
+ Lt,
524
551
  {
525
552
  id: "min",
526
553
  className: "univer-ml-1",
527
554
  value: S,
528
555
  type: a,
529
- onChange: (g) => {
530
- p(g), V({ minType: a, medianType: l, maxType: v, minValue: g, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y });
556
+ onChange: (m) => {
557
+ p(m), V({
558
+ minType: a,
559
+ medianType: l,
560
+ maxType: v,
561
+ minValue: m,
562
+ medianValue: T,
563
+ maxValue: R,
564
+ minColor: x,
565
+ medianColor: C,
566
+ maxColor: y
567
+ });
531
568
  }
532
569
  }
533
570
  ),
@@ -536,13 +573,32 @@ const Me = (t) => {
536
573
  {
537
574
  className: "univer-ml-1",
538
575
  color: x,
539
- onChange: (g) => {
540
- m(g), V({ minType: a, medianType: l, maxType: v, minValue: S, medianValue: T, maxValue: R, minColor: g, medianColor: C, maxColor: y });
576
+ onChange: (m) => {
577
+ g(m), V({
578
+ minType: a,
579
+ medianType: l,
580
+ maxType: v,
581
+ minValue: S,
582
+ medianValue: T,
583
+ maxValue: R,
584
+ minColor: m,
585
+ medianColor: C,
586
+ maxColor: y
587
+ });
541
588
  }
542
589
  }
543
590
  )
544
591
  ] }),
545
- /* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-xs univer-text-gray-600", children: r.t("sheet.cf.panel.medianValue") }),
592
+ /* @__PURE__ */ c(
593
+ "div",
594
+ {
595
+ className: `
596
+ univer-mt-3 univer-text-xs
597
+ univer-text-gray-600dark:univer-text-gray-200
598
+ `,
599
+ children: r.t("sheet.cf.panel.medianValue")
600
+ }
601
+ ),
546
602
  /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
547
603
  /* @__PURE__ */ c(
548
604
  le,
@@ -550,12 +606,12 @@ const Me = (t) => {
550
606
  className: "univer-flex-shrink-0",
551
607
  options: o,
552
608
  value: l,
553
- onChange: (g) => {
554
- h(g);
555
- const I = Xe(g, 50);
609
+ onChange: (m) => {
610
+ h(m);
611
+ const I = Je(m, 50);
556
612
  _(I), V({
557
613
  minType: a,
558
- medianType: g,
614
+ medianType: m,
559
615
  maxType: v,
560
616
  minValue: S,
561
617
  medianValue: I,
@@ -568,19 +624,19 @@ const Me = (t) => {
568
624
  }
569
625
  ),
570
626
  /* @__PURE__ */ c(
571
- Ot,
627
+ Lt,
572
628
  {
573
629
  id: "median",
574
630
  className: "univer-ml-1",
575
631
  value: T,
576
632
  type: l,
577
- onChange: (g) => {
578
- _(g), V({
633
+ onChange: (m) => {
634
+ _(m), V({
579
635
  minType: a,
580
636
  medianType: l,
581
637
  maxType: v,
582
638
  minValue: S,
583
- medianValue: g,
639
+ medianValue: m,
584
640
  maxValue: R,
585
641
  minColor: x,
586
642
  medianColor: C,
@@ -594,8 +650,8 @@ const Me = (t) => {
594
650
  {
595
651
  className: "univer-ml-1",
596
652
  color: C,
597
- onChange: (g) => {
598
- b(g), V({
653
+ onChange: (m) => {
654
+ b(m), V({
599
655
  minType: a,
600
656
  medianType: l,
601
657
  maxType: v,
@@ -603,14 +659,23 @@ const Me = (t) => {
603
659
  medianValue: T,
604
660
  maxValue: R,
605
661
  minColor: x,
606
- medianColor: g,
662
+ medianColor: m,
607
663
  maxColor: y
608
664
  });
609
665
  }
610
666
  }
611
667
  )
612
668
  ] }),
613
- /* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-xs univer-text-gray-600", children: r.t("sheet.cf.valueType.max") }),
669
+ /* @__PURE__ */ c(
670
+ "div",
671
+ {
672
+ className: `
673
+ univer-mt-3 univer-text-xs univer-text-gray-600
674
+ dark:univer-text-gray-200
675
+ `,
676
+ children: r.t("sheet.cf.valueType.max")
677
+ }
678
+ ),
614
679
  /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
615
680
  /* @__PURE__ */ c(
616
681
  le,
@@ -618,13 +683,13 @@ const Me = (t) => {
618
683
  className: "univer-flex-shrink-0",
619
684
  options: d,
620
685
  value: v,
621
- onChange: (g) => {
622
- f(g);
623
- const I = Xe(g, 90);
624
- E(I), V({
686
+ onChange: (m) => {
687
+ f(m);
688
+ const I = Je(m, 90);
689
+ w(I), V({
625
690
  minType: a,
626
691
  medianType: l,
627
- maxType: g,
692
+ maxType: m,
628
693
  minValue: S,
629
694
  medianValue: T,
630
695
  maxValue: I,
@@ -636,20 +701,20 @@ const Me = (t) => {
636
701
  }
637
702
  ),
638
703
  /* @__PURE__ */ c(
639
- Ot,
704
+ Lt,
640
705
  {
641
706
  id: "max",
642
707
  className: "univer-ml-1",
643
708
  value: R,
644
709
  type: v,
645
- onChange: (g) => {
646
- E(g), V({
710
+ onChange: (m) => {
711
+ w(m), V({
647
712
  minType: a,
648
713
  medianType: l,
649
714
  maxType: v,
650
715
  minValue: S,
651
716
  medianValue: T,
652
- maxValue: g,
717
+ maxValue: m,
653
718
  minColor: x,
654
719
  medianColor: C,
655
720
  maxColor: y
@@ -662,8 +727,8 @@ const Me = (t) => {
662
727
  {
663
728
  className: "univer-ml-1",
664
729
  color: y,
665
- onChange: (g) => {
666
- M(g), V({
730
+ onChange: (m) => {
731
+ M(m), V({
667
732
  minType: a,
668
733
  medianType: l,
669
734
  maxType: v,
@@ -672,21 +737,21 @@ const Me = (t) => {
672
737
  maxValue: R,
673
738
  minColor: x,
674
739
  medianColor: C,
675
- maxColor: g
740
+ maxColor: m
676
741
  });
677
742
  }
678
743
  }
679
744
  )
680
745
  ] })
681
746
  ] });
682
- }, Ue = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), rn = (t) => {
747
+ }, Ue = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), sn = (t) => {
683
748
  var p;
684
749
  const { onChange: e, className: r, value: n, type: i, id: s, disabled: o = !1 } = t, d = W(z), a = d.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), u = (p = d.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : p.getSheetId(), l = de(null), [h, v] = N(!1);
685
- wt((T) => {
750
+ Nt((T) => {
686
751
  var R;
687
752
  ((R = l.current) == null ? void 0 : R.isClickOutSide(T)) && v(!1);
688
753
  });
689
- const f = de(n), S = X(() => [A.percentile, A.percent].includes(i) ? {
754
+ const f = de(n), S = J(() => [A.percentile, A.percent].includes(i) ? {
690
755
  max: 100,
691
756
  min: 0
692
757
  } : {
@@ -696,18 +761,17 @@ const Me = (t) => {
696
761
  if (i === A.formula) {
697
762
  const T = String(f.current).startsWith("=") ? String(f.current) || "" : "=";
698
763
  return /* @__PURE__ */ c("div", { className: "univer-ml-3 univer-w-full", children: /* @__PURE__ */ c(
699
- Nt,
764
+ Mt,
700
765
  {
701
766
  ref: l,
702
- className: `
767
+ className: X(`
703
768
  univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
704
- univer-rounded-lg univer-border univer-border-solid univer-border-gray-200 univer-bg-white
705
- univer-pt-2 univer-transition-colors
769
+ univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
706
770
  [&>div:first-child]:univer-px-2.5
707
771
  [&>div]:univer-h-5 [&>div]:univer-ring-transparent
708
- dark:univer-border-gray-600 dark:univer-bg-gray-700 dark:univer-text-white
772
+ dark:univer-bg-gray-700 dark:univer-text-white
709
773
  hover:univer-border-primary-600
710
- `,
774
+ `, He),
711
775
  initValue: T,
712
776
  unitId: a,
713
777
  subUnitId: u,
@@ -731,105 +795,150 @@ const Me = (t) => {
731
795
  ...S
732
796
  }
733
797
  );
734
- }, vi = (t) => {
798
+ }, gi = (t) => {
735
799
  var L;
736
- const { interceptorManager: e } = t, r = W(ne), n = ((L = t.rule) == null ? void 0 : L.type) === U.dataBar ? t.rule : void 0, [i, s] = N(() => {
800
+ const { interceptorManager: e } = t, r = W(re), n = ((L = t.rule) == null ? void 0 : L.type) === U.dataBar ? t.rule : void 0, [i, s] = N(() => {
737
801
  var I;
738
- const g = "0";
739
- return n ? (I = n.config) != null && I.isGradient ? "1" : "0" : g;
802
+ const m = "0";
803
+ return n ? (I = n.config) != null && I.isGradient ? "1" : "0" : m;
740
804
  }), [o, d] = N(() => {
741
- var g;
742
- return n ? ((g = n.config) == null ? void 0 : g.positiveColor) || Ye : Ye;
805
+ var m;
806
+ return n ? ((m = n.config) == null ? void 0 : m.positiveColor) || Ke : Ke;
743
807
  }), [a, u] = N(() => {
744
- var g;
745
- return n ? ((g = n.config) == null ? void 0 : g.nativeColor) || Ke : Ke;
808
+ var m;
809
+ return n ? ((m = n.config) == null ? void 0 : m.nativeColor) || Xe : Xe;
746
810
  }), l = [Ue(A.num, r), Ue(A.percent, r), Ue(A.percentile, r), Ue(A.formula, r)], h = [Ue(A.min, r), ...l], v = [Ue(A.max, r), ...l], [f, S] = N(() => {
747
811
  var I;
748
- const g = h[0].value;
749
- return n && ((I = n.config) == null ? void 0 : I.min.type) || g;
812
+ const m = h[0].value;
813
+ return n && ((I = n.config) == null ? void 0 : I.min.type) || m;
750
814
  }), [p, T] = N(() => {
751
815
  var I;
752
- const g = v[0].value;
753
- return n && ((I = n.config) == null ? void 0 : I.max.type) || g;
816
+ const m = v[0].value;
817
+ return n && ((I = n.config) == null ? void 0 : I.max.type) || m;
754
818
  }), [_, R] = N(() => {
755
819
  var H;
756
820
  if (!n)
757
821
  return 0;
758
822
  const I = ((H = n.config) == null ? void 0 : H.min) || {};
759
823
  return I.type === A.formula ? I.value || "=" : I.value || 0;
760
- }), [E, x] = N(() => {
824
+ }), [w, x] = N(() => {
761
825
  var H;
762
826
  if (!n)
763
827
  return 100;
764
828
  const I = ((H = n.config) == null ? void 0 : H.max) || {};
765
829
  return I.type === A.formula ? I.value || "=" : I.value === void 0 ? 100 : I.value;
766
- }), [m, C] = N(() => n ? n.isShowValue === void 0 ? !0 : !!n.isShowValue : !0), b = (g) => ({ config: {
767
- min: { type: g.minValueType, value: g.minValue },
768
- max: { type: g.maxValueType, value: g.maxValue },
769
- isGradient: g.isGradient === "1",
770
- positiveColor: g.positiveColor || Ye,
771
- nativeColor: g.nativeColor || Ke
772
- }, type: U.dataBar, isShowValue: g.isShowValue });
830
+ }), [g, C] = N(() => n ? n.isShowValue === void 0 ? !0 : !!n.isShowValue : !0), b = (m) => ({ config: {
831
+ min: { type: m.minValueType, value: m.minValue },
832
+ max: { type: m.maxValueType, value: m.maxValue },
833
+ isGradient: m.isGradient === "1",
834
+ positiveColor: m.positiveColor || Ke,
835
+ nativeColor: m.nativeColor || Xe
836
+ }, type: U.dataBar, isShowValue: m.isShowValue });
773
837
  K(() => e.intercept(e.getInterceptPoints().submit, {
774
838
  handler() {
775
- return b({ isGradient: i, minValue: _, minValueType: f, maxValue: E, maxValueType: p, positiveColor: o, nativeColor: a, isShowValue: m });
839
+ return b({ isGradient: i, minValue: _, minValueType: f, maxValue: w, maxValueType: p, positiveColor: o, nativeColor: a, isShowValue: g });
776
840
  }
777
- }), [i, _, f, E, p, o, a, e, m]);
778
- const y = (g) => {
779
- t.onChange(b(g));
780
- }, M = (g) => {
781
- d(g), y({ isGradient: i, minValue: _, minValueType: f, maxValue: E, maxValueType: p, positiveColor: g, nativeColor: a, isShowValue: m });
782
- }, w = (g) => {
783
- u(g), y({ isGradient: i, minValue: _, minValueType: f, maxValue: E, maxValueType: p, positiveColor: o, nativeColor: g, isShowValue: m });
784
- }, V = (g) => l.map((I) => I.value).includes(g);
841
+ }), [i, _, f, w, p, o, a, e, g]);
842
+ const y = (m) => {
843
+ t.onChange(b(m));
844
+ }, M = (m) => {
845
+ d(m), y({
846
+ isGradient: i,
847
+ minValue: _,
848
+ minValueType: f,
849
+ maxValue: w,
850
+ maxValueType: p,
851
+ positiveColor: m,
852
+ nativeColor: a,
853
+ isShowValue: g
854
+ });
855
+ }, E = (m) => {
856
+ u(m), y({
857
+ isGradient: i,
858
+ minValue: _,
859
+ minValueType: f,
860
+ maxValue: w,
861
+ maxValueType: p,
862
+ positiveColor: o,
863
+ nativeColor: m,
864
+ isShowValue: g
865
+ });
866
+ }, V = (m) => l.map((I) => I.value).includes(m);
785
867
  return /* @__PURE__ */ k("div", { children: [
786
- /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.styleRule") }),
787
- /* @__PURE__ */ c("div", { className: ot, children: /* @__PURE__ */ c(
788
- Be,
868
+ /* @__PURE__ */ c(
869
+ "div",
870
+ {
871
+ className: `
872
+ univer-mt-4 univer-text-sm univer-text-gray-600
873
+ dark:univer-text-gray-200
874
+ `,
875
+ children: r.t("sheet.cf.panel.styleRule")
876
+ }
877
+ ),
878
+ /* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(
879
+ We,
789
880
  {
790
881
  rule: b({
791
882
  isGradient: i,
792
883
  minValue: _,
793
884
  minValueType: f,
794
- maxValue: E,
885
+ maxValue: w,
795
886
  maxValueType: p,
796
887
  positiveColor: o,
797
888
  nativeColor: a,
798
- isShowValue: m
889
+ isShowValue: g
799
890
  })
800
891
  }
801
892
  ) }),
802
893
  /* @__PURE__ */ k("div", { children: [
803
- /* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.fillType") }),
894
+ /* @__PURE__ */ c(
895
+ "div",
896
+ {
897
+ className: `
898
+ univer-mt-3 univer-text-sm univer-text-gray-600
899
+ dark:univer-text-gray-200
900
+ `,
901
+ children: r.t("sheet.cf.panel.fillType")
902
+ }
903
+ ),
804
904
  /* @__PURE__ */ k("div", { className: "univer-ml-1 univer-mt-3 univer-flex univer-items-center", children: [
805
905
  /* @__PURE__ */ k(
806
- Wr,
906
+ qr,
807
907
  {
808
908
  value: i,
809
- onChange: (g) => {
810
- s(g), y({ isGradient: g, minValue: _, minValueType: f, maxValue: E, maxValueType: p, positiveColor: o, nativeColor: a, isShowValue: m });
909
+ onChange: (m) => {
910
+ s(m), y({
911
+ isGradient: m,
912
+ minValue: _,
913
+ minValueType: f,
914
+ maxValue: w,
915
+ maxValueType: p,
916
+ positiveColor: o,
917
+ nativeColor: a,
918
+ isShowValue: g
919
+ });
811
920
  },
812
921
  children: [
813
- /* @__PURE__ */ c(Kt, { value: "0", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: r.t("sheet.cf.panel.pureColor") }) }),
814
- /* @__PURE__ */ c(Kt, { value: "1", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: r.t("sheet.cf.panel.gradient") }) })
922
+ /* @__PURE__ */ c(Xt, { value: "0", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: r.t("sheet.cf.panel.pureColor") }) }),
923
+ /* @__PURE__ */ c(Xt, { value: "1", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: r.t("sheet.cf.panel.gradient") }) })
815
924
  ]
816
925
  }
817
926
  ),
818
927
  /* @__PURE__ */ k("div", { className: "univer-ml-6 univer-flex univer-items-center univer-text-xs", children: [
819
928
  /* @__PURE__ */ c(
820
- Ct,
929
+ yt,
821
930
  {
822
- checked: !m,
823
- onChange: (g) => {
824
- C(!g), y({
825
- isGradient: g,
931
+ checked: !g,
932
+ onChange: (m) => {
933
+ C(!m), y({
934
+ isGradient: m,
826
935
  minValue: _,
827
936
  minValueType: f,
828
- maxValue: E,
937
+ maxValue: w,
829
938
  maxValueType: p,
830
939
  positiveColor: o,
831
940
  nativeColor: a,
832
- isShowValue: !g
941
+ isShowValue: !m
833
942
  });
834
943
  }
835
944
  }
@@ -839,7 +948,16 @@ const Me = (t) => {
839
948
  ] })
840
949
  ] }),
841
950
  /* @__PURE__ */ k("div", { children: [
842
- /* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.colorSet") }),
951
+ /* @__PURE__ */ c(
952
+ "div",
953
+ {
954
+ className: `
955
+ univer-mt-3 univer-text-sm univer-text-gray-600
956
+ dark:univer-text-gray-200
957
+ `,
958
+ children: r.t("sheet.cf.panel.colorSet")
959
+ }
960
+ ),
843
961
  /* @__PURE__ */ k("div", { className: "univer-ml-1 univer-mt-3 univer-flex univer-items-center", children: [
844
962
  /* @__PURE__ */ k("div", { className: "univer-flex univer-items-center", children: [
845
963
  /* @__PURE__ */ c("div", { className: "univer-text-xs", children: r.t("sheet.cf.panel.native") }),
@@ -847,7 +965,7 @@ const Me = (t) => {
847
965
  Me,
848
966
  {
849
967
  color: a,
850
- onChange: w
968
+ onChange: E
851
969
  }
852
970
  )
853
971
  ] }),
@@ -864,7 +982,16 @@ const Me = (t) => {
864
982
  ] })
865
983
  ] }),
866
984
  /* @__PURE__ */ k("div", { children: [
867
- /* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.valueType.min") }),
985
+ /* @__PURE__ */ c(
986
+ "div",
987
+ {
988
+ className: `
989
+ univer-mt-3 univer-text-sm univer-text-gray-600
990
+ dark:univer-text-gray-200
991
+ `,
992
+ children: r.t("sheet.cf.valueType.min")
993
+ }
994
+ ),
868
995
  /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
869
996
  /* @__PURE__ */ c(
870
997
  le,
@@ -872,46 +999,55 @@ const Me = (t) => {
872
999
  className: "univer-w-1/2 univer-flex-shrink-0",
873
1000
  options: h,
874
1001
  value: f,
875
- onChange: (g) => {
876
- S(g);
877
- const I = Xe(g, 10);
1002
+ onChange: (m) => {
1003
+ S(m);
1004
+ const I = Je(m, 10);
878
1005
  R(I), y({
879
1006
  isGradient: i,
880
1007
  minValue: I,
881
- minValueType: g,
882
- maxValue: E,
1008
+ minValueType: m,
1009
+ maxValue: w,
883
1010
  maxValueType: p,
884
1011
  positiveColor: o,
885
1012
  nativeColor: a,
886
- isShowValue: m
1013
+ isShowValue: g
887
1014
  });
888
1015
  }
889
1016
  }
890
1017
  ),
891
1018
  /* @__PURE__ */ c(
892
- rn,
1019
+ sn,
893
1020
  {
894
1021
  id: "min",
895
1022
  className: "univer-ml-3",
896
1023
  disabled: !V(f),
897
1024
  type: f,
898
1025
  value: _,
899
- onChange: (g) => {
900
- R(g || 0), y({
1026
+ onChange: (m) => {
1027
+ R(m || 0), y({
901
1028
  isGradient: i,
902
- minValue: g || 0,
1029
+ minValue: m || 0,
903
1030
  minValueType: f,
904
- maxValue: E,
1031
+ maxValue: w,
905
1032
  maxValueType: p,
906
1033
  positiveColor: o,
907
1034
  nativeColor: a,
908
- isShowValue: m
1035
+ isShowValue: g
909
1036
  });
910
1037
  }
911
1038
  }
912
1039
  )
913
1040
  ] }),
914
- /* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.valueType.max") }),
1041
+ /* @__PURE__ */ c(
1042
+ "div",
1043
+ {
1044
+ className: `
1045
+ univer-mt-3 univer-text-sm univer-text-gray-600
1046
+ dark:univer-text-gray-200
1047
+ `,
1048
+ children: r.t("sheet.cf.valueType.max")
1049
+ }
1050
+ ),
915
1051
  /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
916
1052
  /* @__PURE__ */ c(
917
1053
  le,
@@ -919,40 +1055,40 @@ const Me = (t) => {
919
1055
  className: "univer-w-1/2 univer-flex-shrink-0",
920
1056
  options: v,
921
1057
  value: p,
922
- onChange: (g) => {
923
- T(g);
924
- const I = Xe(g, 90);
1058
+ onChange: (m) => {
1059
+ T(m);
1060
+ const I = Je(m, 90);
925
1061
  x(I), y({
926
1062
  isGradient: i,
927
1063
  minValue: _,
928
1064
  minValueType: f,
929
1065
  maxValue: I,
930
- maxValueType: g,
1066
+ maxValueType: m,
931
1067
  positiveColor: o,
932
1068
  nativeColor: a,
933
- isShowValue: m
1069
+ isShowValue: g
934
1070
  });
935
1071
  }
936
1072
  }
937
1073
  ),
938
1074
  /* @__PURE__ */ c(
939
- rn,
1075
+ sn,
940
1076
  {
941
1077
  className: "univer-ml-3",
942
1078
  disabled: !V(p),
943
1079
  id: "max",
944
1080
  type: p,
945
- value: E,
946
- onChange: (g) => {
947
- x(g || 0), y({
1081
+ value: w,
1082
+ onChange: (m) => {
1083
+ x(m || 0), y({
948
1084
  isGradient: i,
949
1085
  minValue: _,
950
1086
  minValueType: f,
951
- maxValue: g || 0,
1087
+ maxValue: m || 0,
952
1088
  maxValueType: p,
953
1089
  positiveColor: o,
954
1090
  nativeColor: a,
955
- isShowValue: m
1091
+ isShowValue: g
956
1092
  });
957
1093
  }
958
1094
  }
@@ -960,8 +1096,8 @@ const Me = (t) => {
960
1096
  ] })
961
1097
  ] })
962
1098
  ] });
963
- }, lt = (t) => [ae.FALSE, void 0].includes(t) ? ae.TRUE : ae.FALSE, ct = (t) => t !== ae.FALSE, Zt = (t) => {
964
- const { style: e, onChange: r, className: n } = t, i = W(Gt), [s, o] = N(() => {
1099
+ }, ct = (t) => [ae.FALSE, void 0].includes(t) ? ae.TRUE : ae.FALSE, ut = (t) => t !== ae.FALSE, Yt = (t) => {
1100
+ const { style: e, onChange: r, className: n } = t, i = W(zt), [s, o] = N(() => {
965
1101
  if (e != null && e.bl)
966
1102
  return e.bl;
967
1103
  }), [d, a] = N(() => {
@@ -981,53 +1117,53 @@ const Me = (t) => {
981
1117
  var b;
982
1118
  const C = "#e8ecfc";
983
1119
  return (b = e == null ? void 0 : e.bg) != null && b.rgb ? e.bg.rgb : C;
984
- }), _ = i.get("BoldSingle"), R = i.get("ItalicSingle"), E = i.get("UnderlineSingle"), x = i.get("StrikethroughSingle");
1120
+ }), _ = i.get("BoldSingle"), R = i.get("ItalicSingle"), w = i.get("UnderlineSingle"), x = i.get("StrikethroughSingle");
985
1121
  K(() => {
986
1122
  const C = {
987
1123
  bl: s,
988
1124
  it: d
989
1125
  };
990
- f !== void 0 && (C.cl = { rgb: f }), p !== void 0 && (C.bg = { rgb: p }), h !== void 0 && (C.st = { s: h }), u !== void 0 && (C.ul = { s: u }), r(vr(C));
1126
+ f !== void 0 && (C.cl = { rgb: f }), p !== void 0 && (C.bg = { rgb: p }), h !== void 0 && (C.st = { s: h }), u !== void 0 && (C.ul = { s: u }), r(gr(C));
991
1127
  }, [s, d, u, h, f, p]);
992
- const m = "univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-px-1";
993
- return /* @__PURE__ */ k("div", { className: ie("univer-my-2.5 univer-flex univer-justify-between", n), children: [
1128
+ const g = "univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-px-1";
1129
+ return /* @__PURE__ */ k("div", { className: X("univer-my-2.5 univer-flex univer-justify-between", n), children: [
994
1130
  _ && /* @__PURE__ */ c(
995
1131
  "div",
996
1132
  {
997
- className: ie(m, {
998
- "univer-bg-gray-100": ct(s || ae.FALSE)
1133
+ className: X(g, {
1134
+ "univer-bg-gray-100": ut(s || ae.FALSE)
999
1135
  }),
1000
- onClick: () => o(lt(s)),
1136
+ onClick: () => o(ct(s)),
1001
1137
  children: /* @__PURE__ */ c(_, {})
1002
1138
  }
1003
1139
  ),
1004
1140
  R && /* @__PURE__ */ c(
1005
1141
  "div",
1006
1142
  {
1007
- className: ie(m, {
1008
- "univer-bg-gray-100": ct(d || ae.FALSE)
1143
+ className: X(g, {
1144
+ "univer-bg-gray-100": ut(d || ae.FALSE)
1009
1145
  }),
1010
- onClick: () => a(lt(d)),
1146
+ onClick: () => a(ct(d)),
1011
1147
  children: /* @__PURE__ */ c(R, {})
1012
1148
  }
1013
1149
  ),
1014
- E && /* @__PURE__ */ c(
1150
+ w && /* @__PURE__ */ c(
1015
1151
  "div",
1016
1152
  {
1017
- className: ie(m, {
1018
- "univer-bg-gray-100": ct(u || ae.FALSE)
1153
+ className: X(g, {
1154
+ "univer-bg-gray-100": ut(u || ae.FALSE)
1019
1155
  }),
1020
- onClick: () => l(lt(u)),
1021
- children: /* @__PURE__ */ c(E, {})
1156
+ onClick: () => l(ct(u)),
1157
+ children: /* @__PURE__ */ c(w, {})
1022
1158
  }
1023
1159
  ),
1024
1160
  x && /* @__PURE__ */ c(
1025
1161
  "div",
1026
1162
  {
1027
- className: ie(m, {
1028
- "univer-bg-gray-100": ct(h || ae.FALSE)
1163
+ className: X(g, {
1164
+ "univer-bg-gray-100": ut(h || ae.FALSE)
1029
1165
  }),
1030
- onClick: () => v(lt(h)),
1166
+ onClick: () => v(ct(h)),
1031
1167
  children: /* @__PURE__ */ c(x, {})
1032
1168
  }
1033
1169
  ),
@@ -1036,8 +1172,8 @@ const Me = (t) => {
1036
1172
  ] });
1037
1173
  }, mi = (t) => {
1038
1174
  var x;
1039
- const { onChange: e, interceptorManager: r } = t, n = W(ne), s = W(z).getCurrentUnitForType($.UNIVER_SHEET), o = s.getActiveSheet(), d = ((x = t.rule) == null ? void 0 : x.type) === U.highlightCell ? t.rule : void 0, a = de(null), [u, l] = N(!1), h = de(null), [v, f] = N({}), [S, p] = N(() => (d == null ? void 0 : d.subType) === F.formula ? d.value : "="), [T, _] = N(void 0), R = (m) => ({
1040
- style: m.style,
1175
+ const { onChange: e, interceptorManager: r } = t, n = W(re), s = W(z).getCurrentUnitForType($.UNIVER_SHEET), o = s.getActiveSheet(), d = ((x = t.rule) == null ? void 0 : x.type) === U.highlightCell ? t.rule : void 0, a = de(null), [u, l] = N(!1), h = de(null), [v, f] = N({}), [S, p] = N(() => (d == null ? void 0 : d.subType) === F.formula ? d.value : "="), [T, _] = N(void 0), R = (g) => ({
1176
+ style: g.style,
1041
1177
  value: S,
1042
1178
  type: U.highlightCell,
1043
1179
  subType: F.formula
@@ -1049,27 +1185,35 @@ const Me = (t) => {
1049
1185
  }), [v, S, r]), K(() => r.intercept(r.getInterceptPoints().beforeSubmit, {
1050
1186
  handler: (C, b, y) => T || S.length === 1 || !S.startsWith("=") ? (_(n.t("sheet.cf.errorMessage.formulaError")), !1) : y(C)
1051
1187
  }), [T, S]);
1052
- const E = (m) => {
1053
- e(R(m));
1188
+ const w = (g) => {
1189
+ e(R(g));
1054
1190
  };
1055
- return wt((m) => {
1191
+ return Nt((g) => {
1056
1192
  var b;
1057
- ((b = h.current) == null ? void 0 : b.isClickOutSide(m)) && l(!1);
1193
+ ((b = h.current) == null ? void 0 : b.isClickOutSide(g)) && l(!1);
1058
1194
  }), /* @__PURE__ */ k("div", { ref: a, children: [
1059
- /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
1195
+ /* @__PURE__ */ c(
1196
+ "div",
1197
+ {
1198
+ className: `
1199
+ univer-mt-4 univer-text-sm univer-text-gray-600
1200
+ dark:univer-text-gray-200
1201
+ `,
1202
+ children: n.t("sheet.cf.panel.styleRule")
1203
+ }
1204
+ ),
1060
1205
  /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
1061
- Nt,
1206
+ Mt,
1062
1207
  {
1063
1208
  ref: h,
1064
- className: `
1209
+ className: X(`
1065
1210
  univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
1066
- univer-rounded-lg univer-border univer-border-solid univer-border-gray-200 univer-bg-white
1067
- univer-pt-2 univer-transition-colors
1211
+ univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
1068
1212
  [&>div:first-child]:univer-px-2.5
1069
1213
  [&>div]:univer-h-5 [&>div]:univer-ring-transparent
1070
- dark:univer-border-gray-600 dark:univer-bg-gray-700 dark:univer-text-white
1214
+ dark:univer-bg-gray-700 dark:univer-text-white
1071
1215
  hover:univer-border-primary-600
1072
- `,
1216
+ `, He),
1073
1217
  errorText: T,
1074
1218
  isFocus: u,
1075
1219
  initValue: S,
@@ -1078,27 +1222,27 @@ const Me = (t) => {
1078
1222
  onFocus: () => {
1079
1223
  l(!0);
1080
1224
  },
1081
- onChange: (m) => {
1082
- p(m), E({ style: v });
1225
+ onChange: (g) => {
1226
+ p(g), w({ style: v });
1083
1227
  },
1084
- onVerify: (m, C) => {
1085
- !m || C.length === 1 ? _(n.t("sheet.cf.errorMessage.formulaError")) : _(void 0);
1228
+ onVerify: (g, C) => {
1229
+ !g || C.length === 1 ? _(n.t("sheet.cf.errorMessage.formulaError")) : _(void 0);
1086
1230
  }
1087
1231
  }
1088
1232
  ) }),
1089
- /* @__PURE__ */ c("div", { className: ot, children: /* @__PURE__ */ c(Be, { rule: R({ style: v }) }) }),
1233
+ /* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: R({ style: v }) }) }),
1090
1234
  /* @__PURE__ */ c(
1091
- Zt,
1235
+ Yt,
1092
1236
  {
1093
1237
  style: d == null ? void 0 : d.style,
1094
1238
  className: "univer-mt-3",
1095
- onChange: (m) => {
1096
- f(m), E({ style: m });
1239
+ onChange: (g) => {
1240
+ f(g), w({ style: g });
1097
1241
  }
1098
1242
  }
1099
1243
  )
1100
1244
  ] });
1101
- }, ut = (t) => /* @__PURE__ */ k("div", { style: { position: "relative" }, children: [
1245
+ }, dt = (t) => /* @__PURE__ */ k("div", { style: { position: "relative" }, children: [
1102
1246
  /* @__PURE__ */ c(
1103
1247
  "div",
1104
1248
  {
@@ -1113,8 +1257,8 @@ const Me = (t) => {
1113
1257
  }
1114
1258
  ),
1115
1259
  t.children
1116
- ] }), q = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }), gi = (t) => {
1117
- const { type: e, operator: r, onChange: n, value: i, interceptorManager: s } = t, o = W(ne), [d, a] = N(() => typeof i == "number" ? i : 0), [u, l] = N(""), [h, v] = N(() => typeof i == "string" ? i : ""), [f, S] = N(""), [p, T] = N(() => Array.isArray(i) ? i[0] === void 0 ? 0 : i[0] : 0), [_, R] = N(""), [E, x] = N(() => Array.isArray(i) ? i[1] === void 0 ? 100 : i[1] : 100), [m, C] = N("");
1260
+ ] }), q = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }), fi = (t) => {
1261
+ const { type: e, operator: r, onChange: n, value: i, interceptorManager: s } = t, o = W(re), [d, a] = N(() => typeof i == "number" ? i : 0), [u, l] = N(""), [h, v] = N(() => typeof i == "string" ? i : ""), [f, S] = N(""), [p, T] = N(() => Array.isArray(i) ? i[0] === void 0 ? 0 : i[0] : 0), [_, R] = N(""), [w, x] = N(() => Array.isArray(i) ? i[1] === void 0 ? 100 : i[1] : 100), [g, C] = N("");
1118
1262
  switch (K(() => {
1119
1263
  switch (e) {
1120
1264
  case F.text: {
@@ -1122,19 +1266,19 @@ const Me = (t) => {
1122
1266
  break;
1123
1267
  }
1124
1268
  case F.number: {
1125
- [P.equal, P.notEqual, P.greaterThan, P.greaterThanOrEqual, P.lessThan, P.lessThanOrEqual].includes(r) && n(d), [P.between, P.notBetween].includes(r) && n([p, E]);
1269
+ [P.equal, P.notEqual, P.greaterThan, P.greaterThanOrEqual, P.lessThan, P.lessThanOrEqual].includes(r) && n(d), [P.between, P.notBetween].includes(r) && n([p, w]);
1126
1270
  break;
1127
1271
  }
1128
1272
  }
1129
1273
  }, [e]), K(() => {
1130
1274
  const b = s.intercept(s.getInterceptPoints().beforeSubmit, {
1131
- handler: (y, M, w) => {
1275
+ handler: (y, M, E) => {
1132
1276
  switch (e) {
1133
1277
  case F.text:
1134
1278
  if ([j.beginsWith, j.containsText, j.endsWith, j.notEqual, j.notContainsText, j.equal].includes(r))
1135
- return h ? w(y) : (S(o.t("sheet.cf.errorMessage.notBlank")), !1);
1279
+ return h ? E(y) : (S(o.t("sheet.cf.errorMessage.notBlank")), !1);
1136
1280
  }
1137
- return w(y);
1281
+ return E(y);
1138
1282
  }
1139
1283
  });
1140
1284
  return () => {
@@ -1146,8 +1290,8 @@ const Me = (t) => {
1146
1290
  const b = (y) => {
1147
1291
  v(y), n(y);
1148
1292
  };
1149
- return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(ut, { errorText: f, children: /* @__PURE__ */ c(
1150
- qr,
1293
+ return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(dt, { errorText: f, children: /* @__PURE__ */ c(
1294
+ Gr,
1151
1295
  {
1152
1296
  value: h,
1153
1297
  onChange: (y) => {
@@ -1163,7 +1307,7 @@ const Me = (t) => {
1163
1307
  const b = (y) => {
1164
1308
  a(y || 0), n(y || 0), l("");
1165
1309
  };
1166
- return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(ut, { errorText: u, children: /* @__PURE__ */ c(
1310
+ return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(dt, { errorText: u, children: /* @__PURE__ */ c(
1167
1311
  Ne,
1168
1312
  {
1169
1313
  className: "univer-w-full",
@@ -1176,19 +1320,19 @@ const Me = (t) => {
1176
1320
  }
1177
1321
  if ([P.between, P.notBetween].includes(r)) {
1178
1322
  const b = (M) => {
1179
- T(M || 0), n([M || 0, E]), R("");
1323
+ T(M || 0), n([M || 0, w]), R("");
1180
1324
  }, y = (M) => {
1181
1325
  x(M || 0), n([p, M || 0]), C("");
1182
1326
  };
1183
1327
  return /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
1184
- /* @__PURE__ */ c(ut, { errorText: _, children: /* @__PURE__ */ c(Ne, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, value: p, onChange: b }) }),
1185
- /* @__PURE__ */ c(ut, { errorText: m, children: /* @__PURE__ */ c(
1328
+ /* @__PURE__ */ c(dt, { errorText: _, children: /* @__PURE__ */ c(Ne, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, value: p, onChange: b }) }),
1329
+ /* @__PURE__ */ c(dt, { errorText: g, children: /* @__PURE__ */ c(
1186
1330
  Ne,
1187
1331
  {
1188
1332
  className: "univer-ml-3",
1189
1333
  min: Number.MIN_SAFE_INTEGER,
1190
1334
  max: Number.MAX_SAFE_INTEGER,
1191
- value: E,
1335
+ value: w,
1192
1336
  onChange: y
1193
1337
  }
1194
1338
  ) })
@@ -1197,7 +1341,7 @@ const Me = (t) => {
1197
1341
  }
1198
1342
  }
1199
1343
  return null;
1200
- }, sn = (t, e) => {
1344
+ }, on = (t, e) => {
1201
1345
  switch (t) {
1202
1346
  case F.text:
1203
1347
  return [
@@ -1237,11 +1381,11 @@ const Me = (t) => {
1237
1381
  q(ue.nextMonth, e)
1238
1382
  ];
1239
1383
  }
1240
- }, on = (t) => {
1384
+ }, an = (t) => {
1241
1385
  var x;
1242
- const { interceptorManager: e, onChange: r } = t, n = W(ne), i = ((x = t.rule) == null ? void 0 : x.type) === U.highlightCell ? t.rule : void 0, [s, o] = N(() => {
1243
- const m = F.text;
1244
- return i && i.subType || m;
1386
+ const { interceptorManager: e, onChange: r } = t, n = W(re), i = ((x = t.rule) == null ? void 0 : x.type) === U.highlightCell ? t.rule : void 0, [s, o] = N(() => {
1387
+ const g = F.text;
1388
+ return i && i.subType || g;
1245
1389
  }), d = [{
1246
1390
  value: F.text,
1247
1391
  label: n.t("sheet.cf.subRuleType.text")
@@ -1257,24 +1401,24 @@ const Me = (t) => {
1257
1401
  }, {
1258
1402
  value: F.uniqueValues,
1259
1403
  label: n.t("sheet.cf.subRuleType.uniqueValues")
1260
- }], a = X(() => sn(s, n), [s]), [u, l] = N(() => {
1261
- const m = a ? a[0].value : void 0;
1262
- return i && i.operator || m;
1404
+ }], a = J(() => on(s, n), [s]), [u, l] = N(() => {
1405
+ const g = a ? a[0].value : void 0;
1406
+ return i && i.operator || g;
1263
1407
  }), [h, v] = N(() => {
1264
1408
  var b;
1265
- const m = "";
1266
- return i ? (b = i.value) != null ? b : mt(i.subType, i.operator) : m;
1267
- }), [f, S] = N({}), p = X(() => (m) => {
1268
- var C, b, y, M, w, V, L, g, I, H, Y, me, ge, ke, Fe;
1269
- switch (m.subType || s) {
1409
+ const g = "";
1410
+ return i ? (b = i.value) != null ? b : mt(i.subType, i.operator) : g;
1411
+ }), [f, S] = N({}), p = J(() => (g) => {
1412
+ var C, b, y, M, E, V, L, m, I, H, Y, ge, me, ke, Fe;
1413
+ switch (g.subType || s) {
1270
1414
  case F.text: {
1271
1415
  if ([j.beginsWith, j.endsWith, j.containsText, j.notContainsText, j.equal, j.notEqual].includes(u))
1272
1416
  return {
1273
1417
  type: U.highlightCell,
1274
- subType: (C = m.subType) != null ? C : s,
1275
- operator: (b = m.operator) != null ? b : u,
1276
- style: (y = m.style) != null ? y : f,
1277
- value: (M = m.value) != null ? M : h
1418
+ subType: (C = g.subType) != null ? C : s,
1419
+ operator: (b = g.operator) != null ? b : u,
1420
+ style: (y = g.style) != null ? y : f,
1421
+ value: (M = g.value) != null ? M : h
1278
1422
  };
1279
1423
  break;
1280
1424
  }
@@ -1282,27 +1426,27 @@ const Me = (t) => {
1282
1426
  if ([P.equal, P.notEqual, P.greaterThan, P.greaterThanOrEqual, P.lessThan, P.lessThanOrEqual].includes(u))
1283
1427
  return {
1284
1428
  type: U.highlightCell,
1285
- subType: (w = m.subType) != null ? w : s,
1286
- operator: (V = m.operator) != null ? V : u,
1287
- style: (L = m.style) != null ? L : f,
1288
- value: (g = m.value) != null ? g : h
1429
+ subType: (E = g.subType) != null ? E : s,
1430
+ operator: (V = g.operator) != null ? V : u,
1431
+ style: (L = g.style) != null ? L : f,
1432
+ value: (m = g.value) != null ? m : h
1289
1433
  };
1290
1434
  if ([P.between, P.notBetween].includes(u))
1291
1435
  return {
1292
1436
  type: U.highlightCell,
1293
- subType: (I = m.subType) != null ? I : s,
1294
- operator: (H = m.operator) != null ? H : u,
1295
- style: (Y = m.style) != null ? Y : f,
1296
- value: (me = m.value) != null ? me : h
1437
+ subType: (I = g.subType) != null ? I : s,
1438
+ operator: (H = g.operator) != null ? H : u,
1439
+ style: (Y = g.style) != null ? Y : f,
1440
+ value: (ge = g.value) != null ? ge : h
1297
1441
  };
1298
1442
  break;
1299
1443
  }
1300
1444
  }
1301
1445
  return {
1302
1446
  type: U.highlightCell,
1303
- subType: (ge = m.subType) != null ? ge : s,
1304
- operator: (ke = m.operator) != null ? ke : u,
1305
- style: (Fe = m.style) != null ? Fe : f
1447
+ subType: (me = g.subType) != null ? me : s,
1448
+ operator: (ke = g.operator) != null ? ke : u,
1449
+ style: (Fe = g.style) != null ? Fe : f
1306
1450
  };
1307
1451
  }, [s, u, h, f]);
1308
1452
  K(() => e.intercept(e.getInterceptPoints().submit, {
@@ -1310,19 +1454,28 @@ const Me = (t) => {
1310
1454
  return p({});
1311
1455
  }
1312
1456
  }), [p, e]), K(() => {
1313
- d.some((m) => m.value === s) || o(d[0].value);
1457
+ d.some((g) => g.value === s) || o(d[0].value);
1314
1458
  }, [d]);
1315
- const T = (m) => {
1316
- const C = m, b = sn(C, n), y = b && b[0].value;
1459
+ const T = (g) => {
1460
+ const C = g, b = on(C, n), y = b && b[0].value;
1317
1461
  o(C), l(y), y && v(mt(C, y)), r(p({ subType: C, operator: y }));
1318
- }, _ = (m) => {
1319
- const C = m;
1462
+ }, _ = (g) => {
1463
+ const C = g;
1320
1464
  l(C), r(p({ operator: C }));
1321
- }, R = (m) => {
1322
- v(m), r(p({ value: m }));
1323
- }, E = X(() => `${s}_${u}_${Math.random()}`, [s, u]);
1465
+ }, R = (g) => {
1466
+ v(g), r(p({ value: g }));
1467
+ }, w = J(() => `${s}_${u}_${Math.random()}`, [s, u]);
1324
1468
  return /* @__PURE__ */ k("div", { children: [
1325
- /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
1469
+ /* @__PURE__ */ c(
1470
+ "div",
1471
+ {
1472
+ className: `
1473
+ univer-mt-4 univer-text-sm univer-text-gray-600
1474
+ dark:univer-text-gray-200
1475
+ `,
1476
+ children: n.t("sheet.cf.panel.styleRule")
1477
+ }
1478
+ ),
1326
1479
  /* @__PURE__ */ k("div", { className: "univer-flex univer-justify-between univer-gap-4", children: [
1327
1480
  /* @__PURE__ */ c(
1328
1481
  le,
@@ -1344,7 +1497,7 @@ const Me = (t) => {
1344
1497
  )
1345
1498
  ] }),
1346
1499
  /* @__PURE__ */ c(
1347
- gi,
1500
+ fi,
1348
1501
  {
1349
1502
  value: h,
1350
1503
  interceptorManager: e,
@@ -1353,31 +1506,31 @@ const Me = (t) => {
1353
1506
  rule: i,
1354
1507
  onChange: R
1355
1508
  },
1356
- E
1509
+ w
1357
1510
  ),
1358
- /* @__PURE__ */ c("div", { className: ot, children: /* @__PURE__ */ c(Be, { rule: p({}) }) }),
1511
+ /* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: p({}) }) }),
1359
1512
  /* @__PURE__ */ c(
1360
- Zt,
1513
+ Yt,
1361
1514
  {
1362
1515
  style: i == null ? void 0 : i.style,
1363
1516
  className: "univer-ml-1",
1364
- onChange: (m) => {
1365
- S(m), r(p({ style: m }));
1517
+ onChange: (g) => {
1518
+ S(g), r(p({ style: g }));
1366
1519
  }
1367
1520
  }
1368
1521
  )
1369
1522
  ] });
1370
- }, Kn = (t, e) => (we[t] || [])[Number(e)] || "", fi = (t) => {
1523
+ }, Xn = (t, e) => (Ee[t] || [])[Number(e)] || "", pi = (t) => {
1371
1524
  var l;
1372
1525
  const { error: e, type: r, onChange: n } = t, i = W(z), s = i.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), o = (l = i.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : l.getSheetId(), d = de(null), [a, u] = N(!1);
1373
- return wt((h) => {
1526
+ return Nt((h) => {
1374
1527
  var f;
1375
1528
  ((f = d.current) == null ? void 0 : f.isClickOutSide(h)) && u(!1);
1376
- }), /* @__PURE__ */ c("div", { className: "univer-relative", children: r !== A.formula ? /* @__PURE__ */ k(Ht, { children: [
1529
+ }), /* @__PURE__ */ c("div", { className: "univer-relative", children: r !== A.formula ? /* @__PURE__ */ k(Bt, { children: [
1377
1530
  /* @__PURE__ */ c(
1378
1531
  Ne,
1379
1532
  {
1380
- className: ie({
1533
+ className: X({
1381
1534
  "univer-border-red-500": e
1382
1535
  }),
1383
1536
  value: Number(t.value) || 0,
@@ -1386,7 +1539,7 @@ const Me = (t) => {
1386
1539
  ),
1387
1540
  e && /* @__PURE__ */ c("div", { className: "univer-absolute univer-text-xs univer-text-red-500", children: e })
1388
1541
  ] }) : /* @__PURE__ */ c("div", { className: "univer-w-full", children: /* @__PURE__ */ c(
1389
- Nt,
1542
+ Mt,
1390
1543
  {
1391
1544
  ref: d,
1392
1545
  initValue: String(t.value),
@@ -1399,13 +1552,13 @@ const Me = (t) => {
1399
1552
  onFocus: () => u(!0)
1400
1553
  }
1401
1554
  ) }) });
1402
- }, an = (t, e, r) => ({
1555
+ }, ln = (t, e, r) => ({
1403
1556
  operator: P.greaterThan,
1404
1557
  value: { type: A.num, value: (r.length - 1 - e) * 10 },
1405
1558
  iconType: t,
1406
1559
  iconId: String(e)
1407
- }), pi = Ve((t, e) => {
1408
- const { onClick: r } = t, n = W(ne), i = (s) => {
1560
+ }), Ci = Ve((t, e) => {
1561
+ const { onClick: r } = t, n = W(re), i = (s) => {
1409
1562
  r(s);
1410
1563
  };
1411
1564
  return /* @__PURE__ */ c("div", { ref: e, className: "univer-w-80", children: mr.map((s, o) => /* @__PURE__ */ k("div", { className: "univer-mb-3", children: [
@@ -1439,11 +1592,11 @@ const Me = (t) => {
1439
1592
  d.name
1440
1593
  )) })
1441
1594
  ] }, o)) });
1442
- }), Ci = (t) => {
1443
- const { onClick: e } = t, r = X(() => {
1595
+ }), yi = (t) => {
1596
+ const { onClick: e } = t, r = J(() => {
1444
1597
  const i = [];
1445
- for (const s in we) {
1446
- const o = we[s], d = s;
1598
+ for (const s in Ee) {
1599
+ const o = Ee[s], d = s;
1447
1600
  o.forEach((a, u) => {
1448
1601
  i.push({
1449
1602
  iconType: d,
@@ -1461,9 +1614,9 @@ const Me = (t) => {
1461
1614
  "div",
1462
1615
  {
1463
1616
  className: "univer-mb-2.5 univer-flex univer-cursor-pointer univer-items-center univer-pl-1",
1464
- onClick: () => n({ iconType: fr, iconId: "" }),
1617
+ onClick: () => n({ iconType: pr, iconId: "" }),
1465
1618
  children: [
1466
- /* @__PURE__ */ c(st, { className: "univer-size-5" }),
1619
+ /* @__PURE__ */ c(ot, { className: "univer-size-5" }),
1467
1620
  /* @__PURE__ */ c("span", { className: "univer-ml-2", children: "无单元格图标" })
1468
1621
  ]
1469
1622
  }
@@ -1489,8 +1642,8 @@ const Me = (t) => {
1489
1642
  `${i.iconType}_${i.iconId}`
1490
1643
  )) })
1491
1644
  ] });
1492
- }, yi = (t) => {
1493
- const { onChange: e, configList: r, errorMap: n = {} } = t, i = W(ne), s = [{ label: i.t(`sheet.cf.symbol.${P.greaterThan}`), value: P.greaterThan }, { label: i.t(`sheet.cf.symbol.${P.greaterThanOrEqual}`), value: P.greaterThanOrEqual }], o = [
1645
+ }, bi = (t) => {
1646
+ const { onChange: e, configList: r, errorMap: n = {} } = t, i = W(re), s = [{ label: i.t(`sheet.cf.symbol.${P.greaterThan}`), value: P.greaterThan }, { label: i.t(`sheet.cf.symbol.${P.greaterThanOrEqual}`), value: P.greaterThanOrEqual }], o = [
1494
1647
  { label: i.t(`sheet.cf.valueType.${A.num}`), value: A.num },
1495
1648
  { label: i.t(`sheet.cf.valueType.${A.percent}`), value: A.percent },
1496
1649
  { label: i.t(`sheet.cf.valueType.${A.percentile}`), value: A.percentile },
@@ -1506,9 +1659,9 @@ const Me = (t) => {
1506
1659
  const f = r[v], S = mt(F.number, f.operator);
1507
1660
  d(S, v);
1508
1661
  };
1509
- return X(() => r.map((h, v) => {
1510
- const f = n[v], S = Kn(h.iconType, h.iconId), p = v === r.length - 1, T = v === 0, _ = r[v - 1], R = (_ == null ? void 0 : _.value.type) === A.formula ? i.t("sheet.cf.valueType.formula") : _ == null ? void 0 : _.value.value, E = (x, m) => {
1511
- const C = { ...h, iconId: m, iconType: x };
1662
+ return J(() => r.map((h, v) => {
1663
+ const f = n[v], S = Xn(h.iconType, h.iconId), p = v === r.length - 1, T = v === 0, _ = r[v - 1], R = (_ == null ? void 0 : _.value.type) === A.formula ? i.t("sheet.cf.valueType.formula") : _ == null ? void 0 : _.value.value, w = (x, g) => {
1664
+ const C = { ...h, iconId: g, iconType: x };
1512
1665
  e([String(v)], C);
1513
1666
  };
1514
1667
  return /* @__PURE__ */ k(
@@ -1522,6 +1675,7 @@ const Me = (t) => {
1522
1675
  className: `
1523
1676
  univer-mt-3 univer-flex univer-items-center univer-justify-between univer-text-sm
1524
1677
  univer-text-gray-600
1678
+ dark:univer-text-gray-200
1525
1679
  `,
1526
1680
  children: [
1527
1681
  /* @__PURE__ */ k(
@@ -1534,57 +1688,75 @@ const Me = (t) => {
1534
1688
  ]
1535
1689
  }
1536
1690
  ),
1537
- /* @__PURE__ */ c("div", { className: "univer-w-[45%]", children: /* @__PURE__ */ k(Ht, { children: [
1691
+ /* @__PURE__ */ c("div", { className: "univer-w-[45%]", children: /* @__PURE__ */ k(Bt, { children: [
1538
1692
  !T && !p && i.t("sheet.cf.iconSet.rule"),
1539
- !T && !p && /* @__PURE__ */ k("span", { className: "univer-font-medium univer-text-gray-600", children: [
1540
- "(",
1541
- i.t("sheet.cf.iconSet.when"),
1542
- i.t(`sheet.cf.symbol.${jt(_.operator)}`),
1543
- R,
1544
- p ? "" : ` ${i.t("sheet.cf.iconSet.and")} `,
1545
- ")"
1546
- ] })
1693
+ !T && !p && /* @__PURE__ */ k(
1694
+ "span",
1695
+ {
1696
+ className: `
1697
+ univer-font-medium univer-text-gray-600
1698
+ dark:univer-text-gray-200
1699
+ `,
1700
+ children: [
1701
+ "(",
1702
+ i.t("sheet.cf.iconSet.when"),
1703
+ i.t(`sheet.cf.symbol.${Ht(_.operator)}`),
1704
+ R,
1705
+ p ? "" : ` ${i.t("sheet.cf.iconSet.and")} `,
1706
+ ")"
1707
+ ]
1708
+ }
1709
+ )
1547
1710
  ] }) })
1548
1711
  ]
1549
1712
  }
1550
1713
  ),
1551
1714
  /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center univer-justify-between univer-gap-4", children: [
1552
1715
  /* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: /* @__PURE__ */ c(
1553
- zt,
1716
+ Zt,
1554
1717
  {
1555
- overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(Ci, { onClick: E, iconId: h.iconId, iconType: h.iconType }) }),
1718
+ overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(yi, { onClick: w, iconId: h.iconId, iconType: h.iconType }) }),
1556
1719
  children: /* @__PURE__ */ k(
1557
1720
  "div",
1558
1721
  {
1559
- className: `
1722
+ className: X(`
1560
1723
  univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center
1561
- univer-justify-between univer-rounded-md univer-border univer-border-solid
1562
- univer-border-gray-200 univer-bg-white univer-px-4 univer-py-2 univer-text-xs
1563
- univer-text-gray-600 univer-transition-all
1724
+ univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2
1725
+ univer-text-xs univer-text-gray-600 univer-transition-all
1726
+ dark:univer-text-gray-200
1564
1727
  hover:univer-border-primary-600
1565
- `,
1728
+ `, He),
1566
1729
  children: [
1567
1730
  S ? /* @__PURE__ */ c("img", { src: S, className: "univer-size-4", draggable: !1 }) : /* @__PURE__ */ c(
1568
- st,
1731
+ ot,
1569
1732
  {
1570
1733
  className: "univer-size-4"
1571
1734
  }
1572
1735
  ),
1573
- /* @__PURE__ */ c(Mt, {})
1736
+ /* @__PURE__ */ c(Vt, {})
1574
1737
  ]
1575
1738
  }
1576
1739
  )
1577
1740
  }
1578
1741
  ) }),
1579
- p ? /* @__PURE__ */ k("div", { className: "univer-mt-0 univer-w-[45%] univer-text-sm univer-text-gray-600", children: [
1580
- i.t("sheet.cf.iconSet.rule"),
1581
- /* @__PURE__ */ k("span", { className: "univer-font-medium univer-text-gray-600", children: [
1582
- i.t("sheet.cf.iconSet.when"),
1583
- i.t(`sheet.cf.symbol.${jt(_.operator)}`),
1584
- R,
1585
- p ? "" : ` ${i.t("sheet.cf.iconSet.and")} `
1586
- ] })
1587
- ] }) : /* @__PURE__ */ c(
1742
+ p ? /* @__PURE__ */ k(
1743
+ "div",
1744
+ {
1745
+ className: `
1746
+ univer-mt-0 univer-w-[45%] univer-text-sm univer-text-gray-600
1747
+ dark:univer-text-gray-200
1748
+ `,
1749
+ children: [
1750
+ i.t("sheet.cf.iconSet.rule"),
1751
+ /* @__PURE__ */ k("span", { className: "univer-font-medium", children: [
1752
+ i.t("sheet.cf.iconSet.when"),
1753
+ i.t(`sheet.cf.symbol.${Ht(_.operator)}`),
1754
+ R,
1755
+ p ? "" : ` ${i.t("sheet.cf.iconSet.and")} `
1756
+ ] })
1757
+ ]
1758
+ }
1759
+ ) : /* @__PURE__ */ c(
1588
1760
  le,
1589
1761
  {
1590
1762
  options: s,
@@ -1595,13 +1767,14 @@ const Me = (t) => {
1595
1767
  }
1596
1768
  )
1597
1769
  ] }),
1598
- p ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ k(Ht, { children: [
1770
+ p ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ k(Bt, { children: [
1599
1771
  /* @__PURE__ */ k(
1600
1772
  "div",
1601
1773
  {
1602
1774
  className: `
1603
1775
  univer-mt-3 univer-flex univer-items-center univer-justify-between univer-gap-4
1604
1776
  univer-text-sm univer-text-gray-600
1777
+ dark:univer-text-gray-200
1605
1778
  `,
1606
1779
  children: [
1607
1780
  /* @__PURE__ */ c("div", { children: i.t("sheet.cf.iconSet.type") }),
@@ -1628,7 +1801,7 @@ const Me = (t) => {
1628
1801
  }
1629
1802
  ),
1630
1803
  /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
1631
- fi,
1804
+ pi,
1632
1805
  {
1633
1806
  id: v,
1634
1807
  type: h.value.type,
@@ -1648,38 +1821,38 @@ const Me = (t) => {
1648
1821
  v
1649
1822
  );
1650
1823
  }), [r, n]);
1651
- }, bi = (t) => {
1824
+ }, Si = (t) => {
1652
1825
  var x;
1653
- const { interceptorManager: e } = t, r = ((x = t.rule) == null ? void 0 : x.type) === U.iconSet ? t.rule : void 0, n = W(ne), [i, s] = N({}), [o, d] = N(() => {
1654
- const m = Object.keys(we)[0];
1826
+ const { interceptorManager: e } = t, r = ((x = t.rule) == null ? void 0 : x.type) === U.iconSet ? t.rule : void 0, n = W(re), [i, s] = N({}), [o, d] = N(() => {
1827
+ const g = Object.keys(Ee)[0];
1655
1828
  if (r && r.config.length) {
1656
1829
  const C = r.config[0].iconType;
1657
1830
  if (!r.config.some((y) => y.iconType !== C))
1658
1831
  return C;
1659
1832
  }
1660
- return m;
1833
+ return g;
1661
1834
  }), [a, u] = N(() => {
1662
1835
  if (r && r.config.length)
1663
- return Bt.deepClone(r == null ? void 0 : r.config);
1664
- const m = we[o] || [];
1665
- return new Array(m.length).fill("").map((C, b, y) => b === y.length - 1 ? {
1836
+ return Wt.deepClone(r == null ? void 0 : r.config);
1837
+ const g = Ee[o] || [];
1838
+ return new Array(g.length).fill("").map((C, b, y) => b === y.length - 1 ? {
1666
1839
  operator: P.lessThanOrEqual,
1667
1840
  value: { type: A.num, value: Number.MAX_SAFE_INTEGER },
1668
1841
  iconType: o,
1669
1842
  iconId: String(b)
1670
- } : an(o, b, y));
1671
- }), [l, h] = N(() => r ? !!r.isShowValue : !0), v = X(() => {
1672
- const m = a.map((C) => Kn(C.iconType, C.iconId));
1673
- return /* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: m.map((C, b) => C ? /* @__PURE__ */ c(
1843
+ } : ln(o, b, y));
1844
+ }), [l, h] = N(() => r ? !!r.isShowValue : !0), v = J(() => {
1845
+ const g = a.map((C) => Xn(C.iconType, C.iconId));
1846
+ return /* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: g.map((C, b) => C ? /* @__PURE__ */ c(
1674
1847
  "img",
1675
1848
  {
1676
1849
  className: "univer-size-5",
1677
1850
  src: C
1678
1851
  },
1679
1852
  b
1680
- ) : /* @__PURE__ */ c(st, { className: "univer-size-5" }, b)) });
1681
- }, [a]), f = (m) => {
1682
- if (m.reduce((b, y, M) => b.preType && !b.result || m.length - 1 === M ? b : y.value.type === A.formula ? {
1853
+ ) : /* @__PURE__ */ c(ot, { className: "univer-size-5" }, b)) });
1854
+ }, [a]), f = (g) => {
1855
+ if (g.reduce((b, y, M) => b.preType && !b.result || g.length - 1 === M ? b : y.value.type === A.formula ? {
1683
1856
  preType: A.formula,
1684
1857
  result: !1
1685
1858
  } : b.preType ? {
@@ -1688,59 +1861,59 @@ const Me = (t) => {
1688
1861
  } : {
1689
1862
  result: !0,
1690
1863
  preType: y.value.type
1691
- }, { result: !0, preType: "" }).result && [A.num, A.percent, A.percentile].includes(m[0].value.type)) {
1864
+ }, { result: !0, preType: "" }).result && [A.num, A.percent, A.percentile].includes(g[0].value.type)) {
1692
1865
  const b = {};
1693
- return m.forEach((y, M, w) => {
1694
- if (M - 1 < 0 || M === w.length - 1)
1866
+ return g.forEach((y, M, E) => {
1867
+ if (M - 1 < 0 || M === E.length - 1)
1695
1868
  return;
1696
- const L = m[M - 1], g = jt(L.operator);
1697
- gr({ operator: g, value: L.value.value }, y.value.value) || (b[M] = `${n.t(`sheet.cf.form.${g}`, String(L.value.value))} `);
1869
+ const L = g[M - 1], m = Ht(L.operator);
1870
+ fr({ operator: m, value: L.value.value }, y.value.value) || (b[M] = `${n.t(`sheet.cf.form.${m}`, String(L.value.value))} `);
1698
1871
  }), b;
1699
1872
  }
1700
1873
  return {};
1701
- }, S = (m, C) => {
1702
- ir(a, m) !== C && (sr(a, m, C), u([...a]), s(f(a)));
1703
- }, p = (m) => {
1704
- d(m);
1705
- const C = we[m] || [], b = new Array(C.length).fill("").map((y, M, w) => an(m, M, w));
1874
+ }, S = (g, C) => {
1875
+ sr(a, g) !== C && (or(a, g, C), u([...a]), s(f(a)));
1876
+ }, p = (g) => {
1877
+ d(g);
1878
+ const C = Ee[g] || [], b = new Array(C.length).fill("").map((y, M, E) => ln(g, M, E));
1706
1879
  u(b), s(f(b));
1707
1880
  };
1708
1881
  K(() => {
1709
- const m = e.intercept(e.getInterceptPoints().submit, {
1882
+ const g = e.intercept(e.getInterceptPoints().submit, {
1710
1883
  handler() {
1711
1884
  return { type: U.iconSet, isShowValue: l, config: a };
1712
1885
  }
1713
1886
  });
1714
1887
  return () => {
1715
- m();
1888
+ g();
1716
1889
  };
1717
1890
  }, [l, a, e]), K(() => {
1718
- const m = e.intercept(e.getInterceptPoints().beforeSubmit, {
1891
+ const g = e.intercept(e.getInterceptPoints().beforeSubmit, {
1719
1892
  handler() {
1720
1893
  return Object.keys(i).length === 0;
1721
1894
  }
1722
1895
  });
1723
1896
  return () => {
1724
- m();
1897
+ g();
1725
1898
  };
1726
1899
  }, [l, a, e, i]);
1727
1900
  const T = () => {
1728
- const m = a.map((C) => ({ ...C }));
1901
+ const g = a.map((C) => ({ ...C }));
1729
1902
  a.forEach((C, b) => {
1730
- const y = a.length - 1 - b, M = m[y];
1903
+ const y = a.length - 1 - b, M = g[y];
1731
1904
  C.iconId = M.iconId, C.iconType = M.iconType;
1732
1905
  }), u([...a]);
1733
- }, _ = W(Or), [R, E] = N();
1734
- return Lr(R, _.rootContainerElement), /* @__PURE__ */ k("div", { children: [
1906
+ }, _ = W(Lr), [R, w] = N();
1907
+ return Ar(R, _.rootContainerElement), /* @__PURE__ */ k("div", { children: [
1735
1908
  /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
1736
1909
  /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
1737
- zt,
1910
+ Zt,
1738
1911
  {
1739
1912
  overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(
1740
- pi,
1913
+ Ci,
1741
1914
  {
1742
- ref: (m) => {
1743
- !R && m && E(m);
1915
+ ref: (g) => {
1916
+ !R && g && w(g);
1744
1917
  },
1745
1918
  iconType: o,
1746
1919
  onClick: p
@@ -1749,16 +1922,15 @@ const Me = (t) => {
1749
1922
  children: /* @__PURE__ */ k(
1750
1923
  "div",
1751
1924
  {
1752
- className: ie(`
1925
+ className: X(`
1753
1926
  univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center
1754
- univer-justify-between univer-rounded-md univer-border univer-border-solid
1755
- univer-border-gray-200 univer-bg-white univer-px-4 univer-py-2 univer-text-xs
1756
- univer-text-gray-600 univer-transition-all
1927
+ univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2
1928
+ univer-text-xs univer-text-gray-600 univer-transition-all
1757
1929
  hover:univer-border-primary-600
1758
- `),
1930
+ `, He),
1759
1931
  children: [
1760
1932
  v,
1761
- /* @__PURE__ */ c(Mt, {})
1933
+ /* @__PURE__ */ c(Vt, {})
1762
1934
  ]
1763
1935
  }
1764
1936
  )
@@ -1766,21 +1938,21 @@ const Me = (t) => {
1766
1938
  ) }),
1767
1939
  /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center univer-text-xs", children: [
1768
1940
  /* @__PURE__ */ k("div", { className: "univer-flex univer-items-center univer-text-xs", children: [
1769
- /* @__PURE__ */ c(Ct, { onChange: T }),
1941
+ /* @__PURE__ */ c(yt, { onChange: T }),
1770
1942
  n.t("sheet.cf.iconSet.reverseIconOrder")
1771
1943
  ] }),
1772
1944
  /* @__PURE__ */ k("div", { className: "univer-ml-6 univer-flex univer-items-center univer-text-xs", children: [
1773
- /* @__PURE__ */ c(Ct, { checked: !l, onChange: (m) => {
1774
- h(!m);
1945
+ /* @__PURE__ */ c(yt, { checked: !l, onChange: (g) => {
1946
+ h(!g);
1775
1947
  } }),
1776
1948
  n.t("sheet.cf.iconSet.onlyShowIcon")
1777
1949
  ] })
1778
1950
  ] }),
1779
- /* @__PURE__ */ c(yi, { errorMap: i, onChange: S, configList: a })
1951
+ /* @__PURE__ */ c(bi, { errorMap: i, onChange: S, configList: a })
1780
1952
  ] });
1781
- }, Si = (t) => {
1953
+ }, Ii = (t) => {
1782
1954
  var T;
1783
- const { onChange: e, interceptorManager: r } = t, n = W(ne), i = ((T = t.rule) == null ? void 0 : T.type) === U.highlightCell ? t.rule : void 0, s = [{ label: n.t("sheet.cf.panel.isNotBottom"), value: "isNotBottom" }, { label: n.t("sheet.cf.panel.isBottom"), value: "isBottom" }, { label: n.t("sheet.cf.panel.greaterThanAverage"), value: "greaterThanAverage" }, { label: n.t("sheet.cf.panel.lessThanAverage"), value: "lessThanAverage" }], [o, d] = N(() => {
1955
+ const { onChange: e, interceptorManager: r } = t, n = W(re), i = ((T = t.rule) == null ? void 0 : T.type) === U.highlightCell ? t.rule : void 0, s = [{ label: n.t("sheet.cf.panel.isNotBottom"), value: "isNotBottom" }, { label: n.t("sheet.cf.panel.isBottom"), value: "isBottom" }, { label: n.t("sheet.cf.panel.greaterThanAverage"), value: "greaterThanAverage" }, { label: n.t("sheet.cf.panel.lessThanAverage"), value: "lessThanAverage" }], [o, d] = N(() => {
1784
1956
  const _ = s[0].value, R = i == null ? void 0 : i.type;
1785
1957
  if (!i)
1786
1958
  return _;
@@ -1819,15 +1991,15 @@ const Me = (t) => {
1819
1991
  }
1820
1992
  return !1;
1821
1993
  }), [v, f] = N({}), S = (_) => {
1822
- const { type: R, isPercent: E, value: x, style: m } = _;
1994
+ const { type: R, isPercent: w, value: x, style: g } = _;
1823
1995
  if (R === "isNotBottom")
1824
- return { type: U.highlightCell, subType: F.rank, isPercent: E, isBottom: !1, value: x, style: m };
1996
+ return { type: U.highlightCell, subType: F.rank, isPercent: w, isBottom: !1, value: x, style: g };
1825
1997
  if (R === "isBottom")
1826
- return { type: U.highlightCell, subType: F.rank, isPercent: E, isBottom: !0, value: x, style: m };
1998
+ return { type: U.highlightCell, subType: F.rank, isPercent: w, isBottom: !0, value: x, style: g };
1827
1999
  if (R === "greaterThanAverage")
1828
- return { type: U.highlightCell, subType: F.average, operator: P.greaterThan, style: m };
2000
+ return { type: U.highlightCell, subType: F.average, operator: P.greaterThan, style: g };
1829
2001
  if (R === "lessThanAverage")
1830
- return { type: U.highlightCell, subType: F.average, operator: P.lessThan, style: m };
2002
+ return { type: U.highlightCell, subType: F.average, operator: P.lessThan, style: g };
1831
2003
  };
1832
2004
  K(() => r.intercept(r.getInterceptPoints().submit, {
1833
2005
  handler() {
@@ -1838,7 +2010,16 @@ const Me = (t) => {
1838
2010
  e(S(_));
1839
2011
  };
1840
2012
  return /* @__PURE__ */ k("div", { children: [
1841
- /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
2013
+ /* @__PURE__ */ c(
2014
+ "div",
2015
+ {
2016
+ className: `
2017
+ univer-mt-4 univer-text-sm univer-text-gray-600
2018
+ dark:univer-text-gray-200
2019
+ `,
2020
+ children: n.t("sheet.cf.panel.styleRule")
2021
+ }
2022
+ ),
1842
2023
  /* @__PURE__ */ c(
1843
2024
  le,
1844
2025
  {
@@ -1869,7 +2050,7 @@ const Me = (t) => {
1869
2050
  className: "univer-ml-3 univer-flex univer-items-center univer-text-xs",
1870
2051
  children: [
1871
2052
  /* @__PURE__ */ c(
1872
- Ct,
2053
+ yt,
1873
2054
  {
1874
2055
  checked: l,
1875
2056
  onChange: (_) => {
@@ -1882,9 +2063,9 @@ const Me = (t) => {
1882
2063
  }
1883
2064
  )
1884
2065
  ] }),
1885
- /* @__PURE__ */ c("div", { className: ot, children: /* @__PURE__ */ c(Be, { rule: S({ type: o, isPercent: l, value: a, style: v }) }) }),
2066
+ /* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: S({ type: o, isPercent: l, value: a, style: v }) }) }),
1886
2067
  /* @__PURE__ */ c(
1887
- Zt,
2068
+ Yt,
1888
2069
  {
1889
2070
  style: i == null ? void 0 : i.style,
1890
2071
  className: "univer-mt-3",
@@ -1894,16 +2075,16 @@ const Me = (t) => {
1894
2075
  }
1895
2076
  )
1896
2077
  ] });
1897
- }, Ii = fn("beforeSubmit"), _i = fn("submit"), ln = (t) => t.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), cn = (t) => {
2078
+ }, _i = pn("beforeSubmit"), Ti = pn("submit"), cn = (t) => t.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), un = (t) => {
1898
2079
  var e;
1899
2080
  return (e = t.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
1900
- }, Ti = (t) => {
2081
+ }, Ri = (t) => {
1901
2082
  var b, y, M;
1902
- const e = W(ne), r = W(ee), n = W(z), i = W(J), s = W($e), o = ln(n), d = cn(n), [a, u] = N(void 0), l = de((y = (b = t.rule) == null ? void 0 : b.ranges) != null ? y : []), h = X(() => {
1903
- var V, L, g;
1904
- let w = (V = t.rule) == null ? void 0 : V.ranges;
1905
- return w != null && w.length || (w = (g = (L = s.getCurrentSelections()) == null ? void 0 : L.map((I) => I.range)) != null ? g : []), l.current = w, w != null && w.length ? w.map((I) => {
1906
- const H = Fn(I);
2083
+ const e = W(re), r = W(te), n = W(z), i = W(Q), s = W($e), o = cn(n), d = un(n), [a, u] = N(void 0), l = de((y = (b = t.rule) == null ? void 0 : b.ranges) != null ? y : []), h = J(() => {
2084
+ var V, L, m;
2085
+ let E = (V = t.rule) == null ? void 0 : V.ranges;
2086
+ return E != null && E.length || (E = (m = (L = s.getCurrentSelections()) == null ? void 0 : L.map((I) => I.range)) != null ? m : []), l.current = E, E != null && E.length ? E.map((I) => {
2087
+ const H = Un(I);
1907
2088
  return H === "NaN" ? "" : H;
1908
2089
  }).filter((I) => !!I).join(",") : "";
1909
2090
  }, [t.rule]), v = [
@@ -1914,13 +2095,13 @@ const Me = (t) => {
1914
2095
  { label: e.t("sheet.cf.ruleType.formula"), value: "5" },
1915
2096
  { label: e.t("sheet.cf.ruleType.iconSet"), value: "6" }
1916
2097
  ], [f, S] = N(() => {
1917
- var L, g;
1918
- const w = (L = t.rule) == null ? void 0 : L.rule.type, V = v[0].value;
1919
- if (!w)
2098
+ var L, m;
2099
+ const E = (L = t.rule) == null ? void 0 : L.rule.type, V = v[0].value;
2100
+ if (!E)
1920
2101
  return V;
1921
- switch (w) {
2102
+ switch (E) {
1922
2103
  case U.highlightCell: {
1923
- switch ((g = t.rule) == null ? void 0 : g.rule.subType) {
2104
+ switch ((m = t.rule) == null ? void 0 : m.rule.subType) {
1924
2105
  case F.number:
1925
2106
  case F.text:
1926
2107
  case F.duplicateValues:
@@ -1943,86 +2124,104 @@ const Me = (t) => {
1943
2124
  return "6";
1944
2125
  }
1945
2126
  return V;
1946
- }), p = de(void 0), T = X(() => new or({ beforeSubmit: Ii, submit: _i }), []), _ = X(() => {
2127
+ }), p = de(void 0), T = J(() => new ar({ beforeSubmit: _i, submit: Ti }), []), _ = J(() => {
1947
2128
  switch (f) {
1948
2129
  case "1":
1949
- return on;
2130
+ return an;
1950
2131
  case "2":
1951
- return Si;
2132
+ return Ii;
1952
2133
  case "3":
1953
- return vi;
2134
+ return gi;
1954
2135
  case "4":
1955
- return hi;
2136
+ return vi;
1956
2137
  case "5":
1957
2138
  return mi;
1958
2139
  case "6":
1959
- return bi;
2140
+ return Si;
1960
2141
  default:
1961
- return on;
2142
+ return an;
1962
2143
  }
1963
2144
  }, [f]);
1964
2145
  K(() => {
1965
- const w = r.onCommandExecuted((V) => {
1966
- if (V.id === Tr.id) {
2146
+ const E = r.onCommandExecuted((V) => {
2147
+ if (V.id === Rr.id) {
1967
2148
  const L = V.params;
1968
2149
  L.subUnitId === d && L.unitId === o && t.onCancel();
1969
2150
  }
1970
- V.id === Wt.id && t.onCancel();
2151
+ V.id === qt.id && t.onCancel();
1971
2152
  });
1972
- return () => w.dispose();
2153
+ return () => E.dispose();
1973
2154
  }, []);
1974
- const R = (w) => {
1975
- p.current = w;
1976
- }, E = (w) => {
1977
- const V = w.split(",").filter((L) => !!L).map(zr).map((L) => L.range);
2155
+ const R = (E) => {
2156
+ p.current = E;
2157
+ }, w = (E) => {
2158
+ const V = E.split(",").filter((L) => !!L).map(Zr).map((L) => L.range);
1978
2159
  l.current = V;
1979
2160
  }, x = () => {
1980
2161
  if (a)
1981
2162
  return;
1982
2163
  const V = (() => {
1983
- const g = n.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet();
1984
- if (!g)
2164
+ const m = n.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet();
2165
+ if (!m)
1985
2166
  throw new Error("No active sheet found");
1986
- return l.current.map((Y) => Rr(Y, g.getRowCount(), g.getColumnCount())).filter((Y) => !(Number.isNaN(Y.startRow) || Number.isNaN(Y.startColumn)));
2167
+ return l.current.map((Y) => xr(Y, m.getRowCount(), m.getColumnCount())).filter((Y) => !(Number.isNaN(Y.startRow) || Number.isNaN(Y.startColumn)));
1987
2168
  })();
1988
2169
  if (T.fetchThroughInterceptors(T.getInterceptPoints().beforeSubmit)(!0, null)) {
1989
- const g = T.fetchThroughInterceptors(T.getInterceptPoints().submit)(null, null);
1990
- if (g) {
1991
- const I = ln(n), H = cn(n);
2170
+ const m = T.fetchThroughInterceptors(T.getInterceptPoints().submit)(null, null);
2171
+ if (m) {
2172
+ const I = cn(n), H = un(n);
1992
2173
  if (!I || !H)
1993
2174
  throw new Error("No active sheet found");
1994
2175
  let Y = {};
1995
- t.rule && t.rule.cfId ? (Y = { ...t.rule, ranges: V, rule: g }, r.executeCommand(pr.id, { unitId: I, subUnitId: H, rule: Y }), t.onCancel()) : (Y = { cfId: i.createCfId(I, H), ranges: V, rule: g, stopIfTrue: !1 }, r.executeCommand(In.id, { unitId: I, subUnitId: H, rule: Y }), t.onCancel());
2176
+ t.rule && t.rule.cfId ? (Y = { ...t.rule, ranges: V, rule: m }, r.executeCommand(Cr.id, { unitId: I, subUnitId: H, rule: Y }), t.onCancel()) : (Y = { cfId: i.createCfId(I, H), ranges: V, rule: m, stopIfTrue: !1 }, r.executeCommand(_n.id, { unitId: I, subUnitId: H, rule: Y }), t.onCancel());
1996
2177
  }
1997
2178
  }
1998
- }, m = () => {
2179
+ }, g = () => {
1999
2180
  t.onCancel();
2000
- }, C = (w, V) => {
2001
- w ? V.length < 1 ? u(e.t("sheet.cf.errorMessage.rangeError")) : u(void 0) : u(e.t("sheet.cf.errorMessage.rangeError"));
2181
+ }, C = (E, V) => {
2182
+ E ? V.length < 1 ? u(e.t("sheet.cf.errorMessage.rangeError")) : u(void 0) : u(e.t("sheet.cf.errorMessage.rangeError"));
2002
2183
  };
2003
2184
  return /* @__PURE__ */ k("div", { children: [
2004
- /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: e.t("sheet.cf.panel.range") }),
2185
+ /* @__PURE__ */ c(
2186
+ "div",
2187
+ {
2188
+ className: `
2189
+ univer-mt-4 univer-text-sm univer-text-gray-600
2190
+ dark:univer-text-gray-200
2191
+ `,
2192
+ children: e.t("sheet.cf.panel.range")
2193
+ }
2194
+ ),
2005
2195
  /* @__PURE__ */ k("div", { className: "univer-mt-4", children: [
2006
2196
  /* @__PURE__ */ c(
2007
- Zr,
2197
+ Yr,
2008
2198
  {
2009
2199
  unitId: o,
2010
2200
  subUnitId: d,
2011
2201
  initialValue: h,
2012
- onChange: (w, V) => E(V),
2202
+ onChange: (E, V) => w(V),
2013
2203
  onVerify: C
2014
2204
  }
2015
2205
  ),
2016
2206
  a && /* @__PURE__ */ c("div", { className: "univer-mt-1 univer-text-xs univer-text-red-500", children: a })
2017
2207
  ] }),
2018
- /* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: e.t("sheet.cf.panel.styleType") }),
2208
+ /* @__PURE__ */ c(
2209
+ "div",
2210
+ {
2211
+ className: `
2212
+ univer-mt-4 univer-text-sm univer-text-gray-600
2213
+ dark:univer-text-gray-200
2214
+ `,
2215
+ children: e.t("sheet.cf.panel.styleType")
2216
+ }
2217
+ ),
2019
2218
  /* @__PURE__ */ c(
2020
2219
  le,
2021
2220
  {
2022
2221
  className: "univer-mt-4 univer-w-full",
2023
2222
  value: f,
2024
2223
  options: v,
2025
- onChange: (w) => S(w)
2224
+ onChange: (E) => S(E)
2026
2225
  }
2027
2226
  ),
2028
2227
  /* @__PURE__ */ c(
@@ -2034,13 +2233,13 @@ const Me = (t) => {
2034
2233
  }
2035
2234
  ),
2036
2235
  /* @__PURE__ */ k("div", { className: "univer-mt-4 univer-flex univer-justify-end", children: [
2037
- /* @__PURE__ */ c(Xt, { onClick: m, children: e.t("sheet.cf.panel.cancel") }),
2038
- /* @__PURE__ */ c(Xt, { className: "univer-ml-3", variant: "primary", onClick: x, children: e.t("sheet.cf.panel.submit") })
2236
+ /* @__PURE__ */ c(Jt, { onClick: g, children: e.t("sheet.cf.panel.cancel") }),
2237
+ /* @__PURE__ */ c(Jt, { className: "univer-ml-3", variant: "primary", onClick: x, children: e.t("sheet.cf.panel.submit") })
2039
2238
  ] })
2040
2239
  ] });
2041
2240
  };
2042
- var Ri = Object.getOwnPropertyDescriptor, xi = (t, e, r, n) => {
2043
- for (var i = n > 1 ? void 0 : n ? Ri(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2241
+ var xi = Object.getOwnPropertyDescriptor, wi = (t, e, r, n) => {
2242
+ for (var i = n > 1 ? void 0 : n ? xi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2044
2243
  (o = t[s]) && (i = o(i) || i);
2045
2244
  return i;
2046
2245
  }, Ei = (t, e) => (r, n) => e(r, n, t);
@@ -2081,10 +2280,10 @@ let De = class extends ce {
2081
2280
  return [];
2082
2281
  }
2083
2282
  };
2084
- De = xi([
2085
- Ei(0, O(ne))
2283
+ De = wi([
2284
+ Ei(0, O(re))
2086
2285
  ], De);
2087
- const wi = (t, e) => {
2286
+ const Ni = (t, e) => {
2088
2287
  const r = t.rule;
2089
2288
  switch (r.type) {
2090
2289
  case U.colorScale:
@@ -2122,15 +2321,15 @@ const wi = (t, e) => {
2122
2321
  }
2123
2322
  }
2124
2323
  };
2125
- let un = 0;
2126
- const Ni = (t) => {
2127
- const { onClick: e } = t, r = W(J), n = W(z), i = W($e), s = W(ee), o = W(ne), d = W(ve), a = W(kn), u = W(De), l = Ar(() => n.getCurrentTypeOfUnit$($.UNIVER_SHEET), void 0, void 0, []), h = l.getUnitId(), v = l.getActiveSheet();
2324
+ let dn = 0;
2325
+ const Mi = (t) => {
2326
+ const { onClick: e } = t, r = W(Q), n = W(z), i = W($e), s = W(te), o = W(re), d = W(ve), a = W(Fn), u = W(De), l = Dr(() => n.getCurrentTypeOfUnit$($.UNIVER_SHEET), void 0, void 0, []), h = l.getUnitId(), v = l.getActiveSheet();
2128
2327
  if (!v)
2129
2328
  throw new Error("No active sheet found");
2130
- const f = v.getSheetId(), [S, p] = N([]), [T, _] = N("2"), [R, E] = N(0), [x, m] = N(-1), [C, b] = N(un), y = de(null), M = [
2329
+ const f = v.getSheetId(), [S, p] = N([]), [T, _] = N("2"), [R, w] = N(0), [x, g] = N(-1), [C, b] = N(dn), y = de(null), M = [
2131
2330
  { label: o.t("sheet.cf.panel.workSheet"), value: "2" },
2132
2331
  { label: o.t("sheet.cf.panel.selectedRange"), value: "1" }
2133
- ], w = () => {
2332
+ ], E = () => {
2134
2333
  const D = r.getSubunitRules(h, f);
2135
2334
  if (!D || !D.length)
2136
2335
  return [];
@@ -2139,101 +2338,101 @@ const Ni = (t) => {
2139
2338
  if (!B)
2140
2339
  return [];
2141
2340
  const G = B.range;
2142
- return D.filter((Q) => Q.ranges.some((te) => fe.intersects(te, G)));
2341
+ return D.filter((ee) => ee.ranges.some((ne) => fe.intersects(ne, G)));
2143
2342
  } else if (T === "2")
2144
2343
  return [...D];
2145
2344
  return [];
2146
- }, [V, L] = N(w);
2147
- Yr(S), K(() => {
2345
+ }, [V, L] = N(E);
2346
+ Kr(S), K(() => {
2148
2347
  const D = s.onCommandExecuted((B) => {
2149
- B.id === Wt.id && E(Math.random());
2348
+ B.id === qt.id && w(Math.random());
2150
2349
  });
2151
2350
  return () => D.dispose();
2152
2351
  }), K(() => {
2153
- L(w);
2352
+ L(E);
2154
2353
  }, [T, R, h, f]), K(() => {
2155
2354
  if (T === "2")
2156
2355
  return;
2157
2356
  const D = new xe((B) => {
2158
- const G = [xr.id, se.id, be.id, Se.id, _n.id], Z = s.onCommandExecuted((Q) => {
2159
- const { id: te, params: Ie } = Q, _e = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId();
2160
- G.includes(te) && Ie.unitId === _e && B.next(null);
2357
+ const G = [wr.id, se.id, be.id, Se.id, Tn.id], Z = s.onCommandExecuted((ee) => {
2358
+ const { id: ne, params: Ie } = ee, _e = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId();
2359
+ G.includes(ne) && Ie.unitId === _e && B.next(null);
2161
2360
  });
2162
2361
  return () => Z.dispose();
2163
- }).pipe(en(16)).subscribe(() => {
2164
- L(w);
2362
+ }).pipe(tn(16)).subscribe(() => {
2363
+ L(E);
2165
2364
  });
2166
2365
  return () => {
2167
2366
  D.unsubscribe();
2168
2367
  };
2169
2368
  }, [n, T, h, f]), K(() => {
2170
2369
  const D = r.$ruleChange.subscribe(() => {
2171
- E(Math.random());
2370
+ w(Math.random());
2172
2371
  });
2173
2372
  return () => D.unsubscribe();
2174
2373
  }, [r]), K(() => {
2175
2374
  const D = () => {
2176
- var Q, te;
2177
- const Z = Math.max(0, ((te = (Q = y.current) == null ? void 0 : Q.getBoundingClientRect().width) != null ? te : 0) - 8);
2178
- return un = Z, Z;
2375
+ var ee, ne;
2376
+ const Z = Math.max(0, ((ne = (ee = y.current) == null ? void 0 : ee.getBoundingClientRect().width) != null ? ne : 0) - 8);
2377
+ return dn = Z, Z;
2179
2378
  }, G = new xe((Z) => {
2180
- const Q = a.getContainer();
2181
- if (Q) {
2182
- let te = setTimeout(() => {
2183
- Z.next();
2379
+ const ee = a.getContainer();
2380
+ if (ee) {
2381
+ let ne = setTimeout(() => {
2382
+ Z.next(void 0);
2184
2383
  }, 150);
2185
2384
  const Ie = () => {
2186
- te && clearTimeout(te), te = null;
2187
- }, _e = (at) => {
2188
- at.propertyName === "width" && (Ie(), Z.next());
2385
+ ne && clearTimeout(ne), ne = null;
2386
+ }, _e = (lt) => {
2387
+ lt.propertyName === "width" && (Ie(), Z.next(void 0));
2189
2388
  };
2190
- return Q.addEventListener("transitionend", _e), () => {
2191
- Ie(), Q.removeEventListener("transitionend", _e);
2389
+ return ee.addEventListener("transitionend", _e), () => {
2390
+ Ie(), ee.removeEventListener("transitionend", _e);
2192
2391
  };
2193
2392
  }
2194
- }).pipe(en(16)).subscribe(() => {
2393
+ }).pipe(tn(16)).subscribe(() => {
2195
2394
  b(D());
2196
2395
  });
2197
2396
  return () => {
2198
2397
  G.unsubscribe();
2199
2398
  };
2200
2399
  }, []);
2201
- const g = (D) => {
2400
+ const m = (D) => {
2202
2401
  var Z;
2203
2402
  const B = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId(), G = (Z = n.getCurrentUnitOfType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : Z.getSheetId();
2204
2403
  if (!B || !G)
2205
2404
  throw new Error("No active sheet found");
2206
- s.executeCommand(Yt.id, { unitId: B, subUnitId: G, cfId: D.cfId });
2405
+ s.executeCommand(Kt.id, { unitId: B, subUnitId: G, cfId: D.cfId });
2207
2406
  }, I = (D, B) => {
2208
- m(B.y);
2407
+ g(B.y);
2209
2408
  }, H = (D, B, G) => {
2210
- var at;
2211
- m(-1);
2212
- const Z = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId(), Q = (at = n.getCurrentUnitOfType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : at.getSheetId();
2213
- if (!Z || !Q)
2409
+ var lt;
2410
+ g(-1);
2411
+ const Z = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId(), ee = (lt = n.getCurrentUnitOfType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : lt.getSheetId();
2412
+ if (!Z || !ee)
2214
2413
  throw new Error("No active sheet found");
2215
- const te = (er) => {
2216
- const tr = V.length;
2217
- return Math.min(tr - 1, Math.max(0, er));
2218
- }, Ie = V[te(B.y)].cfId, _e = V[te(G.y)].cfId;
2219
- Ie !== _e && s.executeCommand(Cr.id, { unitId: Z, subUnitId: Q, start: { id: Ie, type: "self" }, end: { id: _e, type: G.y > B.y ? "after" : "before" } });
2414
+ const ne = (tr) => {
2415
+ const nr = V.length;
2416
+ return Math.min(nr - 1, Math.max(0, tr));
2417
+ }, Ie = V[ne(B.y)].cfId, _e = V[ne(G.y)].cfId;
2418
+ Ie !== _e && s.executeCommand(yr.id, { unitId: Z, subUnitId: ee, start: { id: Ie, type: "self" }, end: { id: _e, type: G.y > B.y ? "after" : "before" } });
2220
2419
  }, Y = () => {
2221
2420
  t.onCreate();
2222
- }, me = () => {
2223
- T === "2" ? s.executeCommand(Tn.id) : T === "1" && V.map((B) => ({ unitId: h, subUnitId: f, cfId: B.cfId })).forEach((B) => {
2224
- s.executeCommand(Yt.id, B);
2421
+ }, ge = () => {
2422
+ T === "2" ? s.executeCommand(Rn.id) : T === "1" && V.map((B) => ({ unitId: h, subUnitId: f, cfId: B.cfId })).forEach((B) => {
2423
+ s.executeCommand(Kt.id, B);
2225
2424
  });
2226
- }, ge = X(() => {
2425
+ }, me = J(() => {
2227
2426
  const D = n.getCurrentUnitOfType($.UNIVER_SHEET), B = D.getActiveSheet();
2228
2427
  return V.filter((G) => {
2229
2428
  const Z = G.ranges;
2230
- return gt(d, D.getUnitId(), B.getSheetId(), Z);
2429
+ return ft(d, D.getUnitId(), B.getSheetId(), Z);
2231
2430
  });
2232
- }, [V]), ke = ge.map((D, B) => ({ i: D.cfId, x: 0, w: 12, y: B, h: 1, isResizable: !1 })), Fe = X(() => {
2431
+ }, [V]), ke = me.map((D, B) => ({ i: D.cfId, x: 0, w: 12, y: B, h: 1, isResizable: !1 })), Fe = J(() => {
2233
2432
  const D = n.getCurrentUnitOfType($.UNIVER_SHEET), B = D.getActiveSheet();
2234
2433
  return V.every((G) => {
2235
2434
  const Z = G.ranges;
2236
- return gt(d, D.getUnitId(), B.getSheetId(), Z);
2435
+ return ft(d, D.getUnitId(), B.getSheetId(), Z);
2237
2436
  });
2238
2437
  }, [V]);
2239
2438
  return /* @__PURE__ */ k("div", { children: [
@@ -2253,26 +2452,26 @@ const Ni = (t) => {
2253
2452
  )
2254
2453
  ).map((D, B) => /* @__PURE__ */ c("span", { children: D }, B)) }),
2255
2454
  /* @__PURE__ */ k("div", { className: "univer-flex univer-justify-end", children: [
2256
- /* @__PURE__ */ c(Jt, { title: o.t("sheet.cf.panel.createRule"), placement: "bottom", children: /* @__PURE__ */ c(
2455
+ /* @__PURE__ */ c(Qt, { title: o.t("sheet.cf.panel.createRule"), placement: "bottom", children: /* @__PURE__ */ c(
2257
2456
  "a",
2258
2457
  {
2259
2458
  className: "univer-size-5 univer-cursor-pointer",
2260
2459
  onClick: Y,
2261
- children: /* @__PURE__ */ c(Zn, {})
2460
+ children: /* @__PURE__ */ c(Yn, {})
2262
2461
  }
2263
2462
  ) }),
2264
- V.length && Fe ? /* @__PURE__ */ c(Jt, { title: o.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ c(
2463
+ V.length && Fe ? /* @__PURE__ */ c(Qt, { title: o.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ c(
2265
2464
  "a",
2266
2465
  {
2267
2466
  className: "univer-size-5 univer-cursor-pointer",
2268
- onClick: me,
2269
- children: /* @__PURE__ */ c(vt, { className: "univer-text-red-500" })
2467
+ onClick: ge,
2468
+ children: /* @__PURE__ */ c(gt, { className: "univer-text-red-500" })
2270
2469
  }
2271
- ) }) : /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(vt, { className: "univer-text-gray-300" }) })
2470
+ ) }) : /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(gt, { className: "univer-text-gray-300" }) })
2272
2471
  ] })
2273
2472
  ] }),
2274
2473
  /* @__PURE__ */ c("div", { ref: y, children: C > 0 && /* @__PURE__ */ c(
2275
- Gr,
2474
+ zr,
2276
2475
  {
2277
2476
  className: `
2278
2477
  [&_.react-grid-item]:univer-transition-none
@@ -2286,10 +2485,10 @@ const Ni = (t) => {
2286
2485
  margin: [0, 10],
2287
2486
  onDragStop: H,
2288
2487
  onDragStart: I,
2289
- children: ge == null ? void 0 : ge.map((D, B) => /* @__PURE__ */ c("div", { children: /* @__PURE__ */ k(
2488
+ children: me == null ? void 0 : me.map((D, B) => /* @__PURE__ */ c("div", { children: /* @__PURE__ */ k(
2290
2489
  "div",
2291
2490
  {
2292
- className: ie(`
2491
+ className: X(`
2293
2492
  univer-group univer-relative univer-flex univer-items-center
2294
2493
  univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8
2295
2494
  hover:univer-bg-gray-100
@@ -2307,14 +2506,14 @@ const Ni = (t) => {
2307
2506
  /* @__PURE__ */ c(
2308
2507
  "div",
2309
2508
  {
2310
- className: ie(`
2509
+ className: X(`
2311
2510
  univer-absolute univer-left-0 univer-hidden univer-size-5
2312
2511
  univer-cursor-grab univer-items-center univer-justify-center
2313
2512
  univer-rounded
2314
2513
  group-hover:univer-flex
2315
2514
  `, "draggableHandle"),
2316
2515
  onClick: (G) => G.stopPropagation(),
2317
- children: /* @__PURE__ */ c(Yn, {})
2516
+ children: /* @__PURE__ */ c(Kn, {})
2318
2517
  }
2319
2518
  ),
2320
2519
  /* @__PURE__ */ k(
@@ -2324,16 +2523,25 @@ const Ni = (t) => {
2324
2523
  univer-min-w-0 univer-max-w-full univer-flex-shrink univer-overflow-hidden
2325
2524
  `,
2326
2525
  children: [
2327
- /* @__PURE__ */ c("div", { className: "univer-text-sm univer-text-gray-900", children: wi(D, o) }),
2328
- /* @__PURE__ */ c("div", { className: "univer-text-xs univer-text-gray-400", children: D.ranges.map((G) => Fn(G)).join(",") })
2526
+ /* @__PURE__ */ c(
2527
+ "div",
2528
+ {
2529
+ className: `
2530
+ univer-text-sm univer-text-gray-900
2531
+ dark:univer-text-white
2532
+ `,
2533
+ children: Ni(D, o)
2534
+ }
2535
+ ),
2536
+ /* @__PURE__ */ c("div", { className: "univer-text-xs univer-text-gray-400", children: D.ranges.map((G) => Un(G)).join(",") })
2329
2537
  ]
2330
2538
  }
2331
2539
  ),
2332
- /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(Be, { rule: D.rule }) }),
2540
+ /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(We, { rule: D.rule }) }),
2333
2541
  /* @__PURE__ */ c(
2334
2542
  "div",
2335
2543
  {
2336
- className: ie(`
2544
+ className: X(`
2337
2545
  univer-absolute univer-right-1 univer-hidden univer-size-6
2338
2546
  univer-cursor-pointer univer-items-center univer-justify-center
2339
2547
  univer-rounded
@@ -2343,9 +2551,9 @@ const Ni = (t) => {
2343
2551
  "univer-flex univer-items-center univer-justify-center": x === B
2344
2552
  }),
2345
2553
  onClick: (G) => {
2346
- G.stopPropagation(), g(D), p([]);
2554
+ G.stopPropagation(), m(D), p([]);
2347
2555
  },
2348
- children: /* @__PURE__ */ c(vt, {})
2556
+ children: /* @__PURE__ */ c(gt, {})
2349
2557
  }
2350
2558
  )
2351
2559
  ]
@@ -2354,23 +2562,23 @@ const Ni = (t) => {
2354
2562
  }
2355
2563
  ) })
2356
2564
  ] });
2357
- }, Mi = (t) => {
2565
+ }, Vi = (t) => {
2358
2566
  const [e, r] = N(t.rule), [n, i] = N(!!t.rule);
2359
- return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between", children: n ? /* @__PURE__ */ c(Ti, { onCancel: () => {
2567
+ return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between", children: n ? /* @__PURE__ */ c(Ri, { onCancel: () => {
2360
2568
  i(!1), r(void 0);
2361
- }, rule: e }) : /* @__PURE__ */ c(Ni, { onClick: (a) => {
2569
+ }, rule: e }) : /* @__PURE__ */ c(Mi, { onClick: (a) => {
2362
2570
  r(a), i(!0);
2363
2571
  }, onCreate: () => {
2364
2572
  i(!0);
2365
2573
  } }) });
2366
2574
  };
2367
- var Vi = Object.getOwnPropertyDescriptor, ki = (t, e, r, n) => {
2368
- for (var i = n > 1 ? void 0 : n ? Vi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2575
+ var ki = Object.getOwnPropertyDescriptor, Fi = (t, e, r, n) => {
2576
+ for (var i = n > 1 ? void 0 : n ? ki(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2369
2577
  (o = t[s]) && (i = o(i) || i);
2370
2578
  return i;
2371
- }, We = (t, e) => (r, n) => e(r, n, t);
2372
- const dt = "sheet.conditional.formatting.panel";
2373
- let Je = class extends ce {
2579
+ }, qe = (t, e) => (r, n) => e(r, n, t);
2580
+ const ht = "sheet.conditional.formatting.panel";
2581
+ let Qe = class extends ce {
2374
2582
  constructor(e, r, n, i, s) {
2375
2583
  super();
2376
2584
  ye(this, "_sidebarDisposable", null);
@@ -2380,42 +2588,42 @@ let Je = class extends ce {
2380
2588
  o || (d = this._sidebarDisposable) == null || d.dispose();
2381
2589
  })
2382
2590
  ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((o) => {
2383
- o.id === dt && (o.visible || setTimeout(() => {
2591
+ o.id === ht && (o.visible || setTimeout(() => {
2384
2592
  this._sidebarService.sidebarOptions$.next({ visible: !1 });
2385
2593
  }));
2386
2594
  }));
2387
2595
  }
2388
2596
  openPanel(e) {
2389
2597
  const r = {
2390
- id: dt,
2598
+ id: ht,
2391
2599
  header: { title: this._localeService.t("sheet.cf.title") },
2392
2600
  children: {
2393
- label: dt,
2601
+ label: ht,
2394
2602
  rule: e,
2395
- key: ar(4)
2603
+ key: lr(4)
2396
2604
  },
2397
2605
  onClose: () => this._sidebarDisposable = null
2398
2606
  };
2399
2607
  this._sidebarDisposable = this._sidebarService.open(r);
2400
2608
  }
2401
2609
  _initPanel() {
2402
- this._componentManager.register(dt, Mi);
2610
+ this._componentManager.register(ht, Vi);
2403
2611
  }
2404
2612
  };
2405
- Je = ki([
2406
- We(0, z),
2407
- We(1, O(ve)),
2408
- We(2, O(Gt)),
2409
- We(3, O(kn)),
2410
- We(4, O(ne))
2411
- ], Je);
2412
- var re = /* @__PURE__ */ ((t) => (t[t.createRule = 1] = "createRule", t[t.viewRule = 2] = "viewRule", t[t.highlightCell = 3] = "highlightCell", t[t.rank = 4] = "rank", t[t.formula = 5] = "formula", t[t.colorScale = 6] = "colorScale", t[t.dataBar = 7] = "dataBar", t[t.icon = 8] = "icon", t[t.clearRangeRules = 9] = "clearRangeRules", t[t.clearWorkSheetRules = 10] = "clearWorkSheetRules", t))(re || {});
2413
- const Vt = {
2613
+ Qe = Fi([
2614
+ qe(0, z),
2615
+ qe(1, O(ve)),
2616
+ qe(2, O(zt)),
2617
+ qe(3, O(Fn)),
2618
+ qe(4, O(re))
2619
+ ], Qe);
2620
+ var ie = /* @__PURE__ */ ((t) => (t[t.createRule = 1] = "createRule", t[t.viewRule = 2] = "viewRule", t[t.highlightCell = 3] = "highlightCell", t[t.rank = 4] = "rank", t[t.formula = 5] = "formula", t[t.colorScale = 6] = "colorScale", t[t.dataBar = 7] = "dataBar", t[t.icon = 8] = "icon", t[t.clearRangeRules = 9] = "clearRangeRules", t[t.clearWorkSheetRules = 10] = "clearWorkSheetRules", t))(ie || {});
2621
+ const kt = {
2414
2622
  id: "sheet.operation.open.conditional.formatting.panel",
2415
2623
  type: he.OPERATION,
2416
2624
  handler: (t, e) => {
2417
2625
  var d;
2418
- const r = t.get(Je), n = t.get($e), i = t.get(ee), s = ((d = n.getCurrentSelections()) == null ? void 0 : d.map((a) => a.range)) || [];
2626
+ const r = t.get(Qe), n = t.get($e), i = t.get(te), s = ((d = n.getCurrentSelections()) == null ? void 0 : d.map((a) => a.range)) || [];
2419
2627
  switch (e.value) {
2420
2628
  case 3: {
2421
2629
  r.openPanel({ ...Te(), ranges: s });
@@ -2492,23 +2700,23 @@ const Vt = {
2492
2700
  break;
2493
2701
  }
2494
2702
  case 9: {
2495
- i.executeCommand(yr.id, { ranges: s });
2703
+ i.executeCommand(br.id, { ranges: s });
2496
2704
  break;
2497
2705
  }
2498
2706
  case 10: {
2499
- i.executeCommand(Tn.id);
2707
+ i.executeCommand(Rn.id);
2500
2708
  break;
2501
2709
  }
2502
2710
  }
2503
2711
  return !0;
2504
2712
  }
2505
2713
  };
2506
- var Fi = Object.getOwnPropertyDescriptor, Ui = (t, e, r, n) => {
2507
- for (var i = n > 1 ? void 0 : n ? Fi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2714
+ var Ui = Object.getOwnPropertyDescriptor, Pi = (t, e, r, n) => {
2715
+ for (var i = n > 1 ? void 0 : n ? Ui(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2508
2716
  (o = t[s]) && (i = o(i) || i);
2509
2717
  return i;
2510
- }, qe = (t, e) => (r, n) => e(r, n, t);
2511
- let Qe = class extends ce {
2718
+ }, Ge = (t, e) => (r, n) => e(r, n, t);
2719
+ let et = class extends ce {
2512
2720
  constructor(e, r, n, i, s) {
2513
2721
  super();
2514
2722
  ye(this, "_copyInfo");
@@ -2517,17 +2725,17 @@ let Qe = class extends ce {
2517
2725
  _initClipboardHook() {
2518
2726
  this.disposeWithMe(
2519
2727
  this._sheetClipboardService.addClipboardHook({
2520
- id: it,
2728
+ id: st,
2521
2729
  onBeforeCopy: (e, r, n) => this._collectConditionalRule(e, r, n),
2522
2730
  onPasteCells: (e, r, n, i) => {
2523
- const { copyType: s = Qt.COPY, pasteType: o } = i, { range: d } = e || {}, { range: a } = r;
2731
+ const { copyType: s = en.COPY, pasteType: o } = i, { range: d } = e || {}, { range: a } = r;
2524
2732
  return this._generateConditionalFormattingMutations(a, { copyType: s, pasteType: o, copyRange: d });
2525
2733
  }
2526
2734
  })
2527
2735
  );
2528
2736
  }
2529
2737
  _collectConditionalRule(e, r, n) {
2530
- const i = new Ee(), s = {};
2738
+ const i = new we(), s = {};
2531
2739
  this._copyInfo = {
2532
2740
  matrix: i,
2533
2741
  info: {
@@ -2555,43 +2763,43 @@ let Qe = class extends ce {
2555
2763
  const n = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET), i = n.getActiveSheet(), s = n.getUnitId();
2556
2764
  if (!i) return { redos: [], undos: [] };
2557
2765
  const o = i.getSheetId();
2558
- if (r.copyType === Qt.CUT)
2766
+ if (r.copyType === en.CUT)
2559
2767
  return this._copyInfo = null, { redos: [], undos: [] };
2560
2768
  if (!this._copyInfo || !r.copyRange)
2561
2769
  return { redos: [], undos: [] };
2562
2770
  if (![
2563
- Ft.SPECIAL_PASTE_FORMAT,
2564
- Ft.DEFAULT_PASTE,
2565
- Ft.SPECIAL_PASTE_BESIDES_BORDER
2771
+ Ut.SPECIAL_PASTE_FORMAT,
2772
+ Ut.DEFAULT_PASTE,
2773
+ Ut.SPECIAL_PASTE_BESIDES_BORDER
2566
2774
  ].includes(
2567
2775
  r.pasteType
2568
2776
  ))
2569
2777
  return { redos: [], undos: [] };
2570
- const { ranges: [a, u], mapFunc: l } = Un([r.copyRange, e]), h = Xr(a, u, !0), v = {};
2571
- pe.foreach(u, (m, C) => {
2572
- const { row: b, col: y } = l(m, C), M = this._conditionalFormattingViewModel.getCellCfs(s, o, b, y);
2573
- M && M.forEach((w) => {
2574
- if (!v[w.cfId]) {
2575
- const V = new Ee();
2576
- v[w.cfId] = V;
2577
- const L = this._conditionalFormattingRuleModel.getRule(s, o, w.cfId);
2578
- L == null || L.ranges.forEach((g) => {
2579
- pe.foreach(g, (I, H) => {
2778
+ const { ranges: [a, u], mapFunc: l } = Pn([r.copyRange, e]), h = Jr(a, u, !0), v = {};
2779
+ pe.foreach(u, (g, C) => {
2780
+ const { row: b, col: y } = l(g, C), M = this._conditionalFormattingViewModel.getCellCfs(s, o, b, y);
2781
+ M && M.forEach((E) => {
2782
+ if (!v[E.cfId]) {
2783
+ const V = new we();
2784
+ v[E.cfId] = V;
2785
+ const L = this._conditionalFormattingRuleModel.getRule(s, o, E.cfId);
2786
+ L == null || L.ranges.forEach((m) => {
2787
+ pe.foreach(m, (I, H) => {
2580
2788
  V.setValue(I, H, 1);
2581
2789
  });
2582
2790
  });
2583
2791
  }
2584
- v[w.cfId].realDeleteValue(b, y);
2792
+ v[E.cfId].realDeleteValue(b, y);
2585
2793
  });
2586
2794
  });
2587
2795
  const { matrix: f, info: S } = this._copyInfo, p = [];
2588
2796
  let T = this._conditionalFormattingRuleModel.createCfId(s, o);
2589
- const _ = {}, R = (m) => {
2590
- if (_[m])
2591
- return _[m];
2592
- const C = S == null ? void 0 : S.cfMap[m], b = [...this._conditionalFormattingRuleModel.getSubunitRules(s, o) || [], ...p].find((y) => Bt.diffValue(y.rule, C));
2797
+ const _ = {}, R = (g) => {
2798
+ if (_[g])
2799
+ return _[g];
2800
+ const C = S == null ? void 0 : S.cfMap[g], b = [...this._conditionalFormattingRuleModel.getSubunitRules(s, o) || [], ...p].find((y) => Wt.diffValue(y.rule, C));
2593
2801
  if (b)
2594
- return _[m] = b, b;
2802
+ return _[g] = b, b;
2595
2803
  {
2596
2804
  const y = {
2597
2805
  rule: C,
@@ -2599,10 +2807,10 @@ let Qe = class extends ce {
2599
2807
  ranges: [],
2600
2808
  stopIfTrue: !1
2601
2809
  };
2602
- return _[m] = y, p.push(y), T = `${Number(T) + 1}`, y;
2810
+ return _[g] = y, p.push(y), T = `${Number(T) + 1}`, y;
2603
2811
  }
2604
2812
  };
2605
- h.forEach((m) => {
2813
+ h.forEach((g) => {
2606
2814
  f && f.forValue((C, b, y) => {
2607
2815
  const M = fe.getPositionRange(
2608
2816
  {
@@ -2611,41 +2819,41 @@ let Qe = class extends ce {
2611
2819
  startColumn: b,
2612
2820
  endColumn: b
2613
2821
  },
2614
- m.startRange
2615
- ), { row: w, col: V } = l(M.startRow, M.startColumn);
2822
+ g.startRange
2823
+ ), { row: E, col: V } = l(M.startRow, M.startColumn);
2616
2824
  y.forEach((L) => {
2617
2825
  if (!v[L]) {
2618
- const g = R(L), I = new Ee();
2619
- v[L] = I, g.ranges.forEach((H) => {
2620
- pe.foreach(H, (Y, me) => {
2621
- I.setValue(Y, me, 1);
2826
+ const m = R(L), I = new we();
2827
+ v[L] = I, m.ranges.forEach((H) => {
2828
+ pe.foreach(H, (Y, ge) => {
2829
+ I.setValue(Y, ge, 1);
2622
2830
  });
2623
2831
  });
2624
2832
  }
2625
- v[L].setValue(w, V, 1);
2833
+ v[L].setValue(E, V, 1);
2626
2834
  });
2627
2835
  });
2628
2836
  });
2629
- const E = [], x = [];
2630
- for (const m in v) {
2631
- const C = v[m], b = ft(pt(C));
2837
+ const w = [], x = [];
2838
+ for (const g in v) {
2839
+ const C = v[g], b = pt(Ct(C));
2632
2840
  if (!b.length) {
2633
2841
  const y = {
2634
2842
  unitId: s,
2635
2843
  subUnitId: o,
2636
- cfId: m
2844
+ cfId: g
2637
2845
  };
2638
- E.push({ id: Se.id, params: y }), x.push(...Le(this._injector, y));
2846
+ w.push({ id: Se.id, params: y }), x.push(...Le(this._injector, y));
2639
2847
  }
2640
- if (p.some((y) => y.cfId === m)) {
2641
- const y = R(m), M = {
2848
+ if (p.some((y) => y.cfId === g)) {
2849
+ const y = R(g), M = {
2642
2850
  unitId: s,
2643
2851
  subUnitId: o,
2644
2852
  rule: { ...y, ranges: b }
2645
2853
  };
2646
- E.push({ id: se.id, params: M }), x.push(Rn(this._injector, M));
2854
+ w.push({ id: se.id, params: M }), x.push(xn(this._injector, M));
2647
2855
  } else {
2648
- const y = this._conditionalFormattingRuleModel.getRule(s, o, m);
2856
+ const y = this._conditionalFormattingRuleModel.getRule(s, o, g);
2649
2857
  if (!y)
2650
2858
  continue;
2651
2859
  const M = {
@@ -2653,62 +2861,62 @@ let Qe = class extends ce {
2653
2861
  subUnitId: o,
2654
2862
  rule: { ...y, ranges: b }
2655
2863
  };
2656
- E.push({ id: be.id, params: M }), x.push(...Ae(this._injector, M));
2864
+ w.push({ id: be.id, params: M }), x.push(...Ae(this._injector, M));
2657
2865
  }
2658
2866
  }
2659
2867
  return {
2660
- redos: E,
2868
+ redos: w,
2661
2869
  undos: x
2662
2870
  };
2663
2871
  }
2664
2872
  };
2665
- Qe = Ui([
2666
- qe(0, O(Kr)),
2667
- qe(1, O(J)),
2668
- qe(2, O(ve)),
2669
- qe(3, O(rt)),
2670
- qe(4, O(z))
2671
- ], Qe);
2672
- var Pi = Object.getOwnPropertyDescriptor, Oi = (t, e, r, n) => {
2673
- for (var i = n > 1 ? void 0 : n ? Pi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2873
+ et = Pi([
2874
+ Ge(0, O(Xr)),
2875
+ Ge(1, O(Q)),
2876
+ Ge(2, O(ve)),
2877
+ Ge(3, O(it)),
2878
+ Ge(4, O(z))
2879
+ ], et);
2880
+ var Oi = Object.getOwnPropertyDescriptor, Li = (t, e, r, n) => {
2881
+ for (var i = n > 1 ? void 0 : n ? Oi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2674
2882
  (o = t[s]) && (i = o(i) || i);
2675
2883
  return i;
2676
- }, Lt = (t, e) => (r, n) => e(r, n, t);
2677
- let et = class extends ce {
2884
+ }, At = (t, e) => (r, n) => e(r, n, t);
2885
+ let tt = class extends ce {
2678
2886
  constructor(t, e, r) {
2679
2887
  super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = r, this._commandExecutedListener();
2680
2888
  }
2681
2889
  _commandExecutedListener() {
2682
2890
  this.disposeWithMe(
2683
2891
  this._commandService.beforeCommandExecuted((t) => {
2684
- t.id === In.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
2685
- workbookTypes: [Vn],
2686
- rangeTypes: [Mn],
2687
- worksheetTypes: [wn, Nn]
2892
+ t.id === _n.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
2893
+ workbookTypes: [kn],
2894
+ rangeTypes: [Vn],
2895
+ worksheetTypes: [Nn, Mn]
2688
2896
  }, t.params.rule.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
2689
2897
  })
2690
2898
  );
2691
2899
  }
2692
2900
  };
2693
- et = Oi([
2694
- Lt(0, O(ne)),
2695
- Lt(1, ee),
2696
- Lt(2, O(wr))
2697
- ], et);
2698
- var Li = Object.getOwnPropertyDescriptor, Ai = (t, e, r, n) => {
2699
- for (var i = n > 1 ? void 0 : n ? Li(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2901
+ tt = Li([
2902
+ At(0, O(re)),
2903
+ At(1, te),
2904
+ At(2, O(Nr))
2905
+ ], tt);
2906
+ var Ai = Object.getOwnPropertyDescriptor, Di = (t, e, r, n) => {
2907
+ for (var i = n > 1 ? void 0 : n ? Ai(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2700
2908
  (o = t[s]) && (i = o(i) || i);
2701
2909
  return i;
2702
- }, ht = (t, e) => (r, n) => e(r, n, t);
2703
- let tt = class extends ce {
2910
+ }, vt = (t, e) => (r, n) => e(r, n, t);
2911
+ let nt = class extends ce {
2704
2912
  constructor(t, e, r, n) {
2705
2913
  super(), this._conditionalFormattingRuleModel = t, this._univerInstanceService = e, this._injector = r, this._refRangeService = n, this._initRefRange();
2706
2914
  }
2707
2915
  _initRefRange() {
2708
2916
  const t = /* @__PURE__ */ new Map(), e = (n, i, s) => `${n}_${i}_${s}`, r = (n, i, s) => {
2709
2917
  const o = (a) => {
2710
- const u = [...s.ranges], l = u.map((v) => Mr(v, a)).filter((v) => !!v);
2711
- if (br(l, u))
2918
+ const u = [...s.ranges], l = u.map((v) => Vr(v, a)).filter((v) => !!v);
2919
+ if (Sr(l, u))
2712
2920
  return { redos: [], undos: [] };
2713
2921
  if (l.length) {
2714
2922
  const v = { unitId: n, subUnitId: i, rule: { ...s, ranges: l } }, f = [{ id: be.id, params: v }], S = Ae(this._injector, v);
@@ -2741,25 +2949,25 @@ let tt = class extends ce {
2741
2949
  u && u(), r(n.unitId, n.subUnitId, n.rule);
2742
2950
  }
2743
2951
  }
2744
- })), this.disposeWithMe(pn(() => {
2952
+ })), this.disposeWithMe(Cn(() => {
2745
2953
  t.forEach((n) => {
2746
2954
  n();
2747
2955
  }), t.clear();
2748
2956
  }));
2749
2957
  }
2750
2958
  };
2751
- tt = Ai([
2752
- ht(0, O(J)),
2753
- ht(1, O(z)),
2754
- ht(2, O(ve)),
2755
- ht(3, O(Nr))
2756
- ], tt);
2757
- var Di = Object.getOwnPropertyDescriptor, $i = (t, e, r, n) => {
2758
- for (var i = n > 1 ? void 0 : n ? Di(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2959
+ nt = Di([
2960
+ vt(0, O(Q)),
2961
+ vt(1, O(z)),
2962
+ vt(2, O(ve)),
2963
+ vt(3, O(Mr))
2964
+ ], nt);
2965
+ var $i = Object.getOwnPropertyDescriptor, ji = (t, e, r, n) => {
2966
+ for (var i = n > 1 ? void 0 : n ? $i(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2759
2967
  (o = t[s]) && (i = o(i) || i);
2760
2968
  return i;
2761
2969
  }, Pe = (t, e) => (r, n) => e(r, n, t);
2762
- let nt = class extends ce {
2970
+ let rt = class extends ce {
2763
2971
  constructor(e, r, n, i, s, o) {
2764
2972
  super();
2765
2973
  /**
@@ -2774,13 +2982,13 @@ let nt = class extends ce {
2774
2982
  _markDirtySkeleton() {
2775
2983
  var r, n, i;
2776
2984
  const e = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET).getUnitId();
2777
- (r = this._renderManagerService.getRenderById(e)) == null || r.with(Pn).reCalculate(), (i = (n = this._renderManagerService.getRenderById(e)) == null ? void 0 : n.mainComponent) == null || i.makeDirty();
2985
+ (r = this._renderManagerService.getRenderById(e)) == null || r.with(On).reCalculate(), (i = (n = this._renderManagerService.getRenderById(e)) == null ? void 0 : n.mainComponent) == null || i.makeDirty();
2778
2986
  }
2779
2987
  _initSkeleton() {
2780
- this.disposeWithMe(On(this._conditionalFormattingRuleModel.$ruleChange, this._conditionalFormattingViewModel.markDirty$).pipe(
2781
- ni(16),
2782
- tn((e) => !!e.length),
2783
- tn((e) => {
2988
+ this.disposeWithMe(Ln(this._conditionalFormattingRuleModel.$ruleChange, this._conditionalFormattingViewModel.markDirty$).pipe(
2989
+ ri(16),
2990
+ nn((e) => !!e.length),
2991
+ nn((e) => {
2784
2992
  const r = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET);
2785
2993
  if (!r) return !1;
2786
2994
  const n = r.getActiveSheet();
@@ -2789,46 +2997,45 @@ let nt = class extends ce {
2789
2997
  ).subscribe(() => this._markDirtySkeleton()));
2790
2998
  }
2791
2999
  _initViewModelInterceptor() {
2792
- this.disposeWithMe(this._sheetInterceptorService.intercept(Vr.CELL_CONTENT, {
2793
- effect: lr.Style,
3000
+ this.disposeWithMe(this._sheetInterceptorService.intercept(kr.CELL_CONTENT, {
3001
+ effect: cr.Style,
2794
3002
  handler: (e, r, n) => {
2795
3003
  const i = this._conditionalFormattingService.composeStyle(r.unitId, r.subUnitId, r.row, r.col);
2796
3004
  if (!i)
2797
3005
  return n(e);
2798
3006
  const s = r.workbook.getStyles(), d = { ...(typeof (e == null ? void 0 : e.s) == "string" ? s.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {} }, a = { ...e, s: d };
2799
- return i.style && Object.assign(d, i.style), a.fontRenderExtension || (a.fontRenderExtension = {}, i.isShowValue !== void 0 && (a.fontRenderExtension.isSkip = !i.isShowValue)), i.dataBar && (a.dataBar = i.dataBar), i.iconSet && (a.iconSet = i.iconSet, a.fontRenderExtension.leftOffset = Sr + Ir), n(a);
3007
+ return i.style && Object.assign(d, i.style), a.fontRenderExtension || (a.fontRenderExtension = {}, i.isShowValue !== void 0 && (a.fontRenderExtension.isSkip = !i.isShowValue)), i.dataBar && (a.dataBar = i.dataBar), i.iconSet && (a.iconSet = i.iconSet, a.fontRenderExtension.leftOffset = Ir + _r), n(a);
2800
3008
  },
2801
3009
  priority: 10
2802
3010
  }));
2803
3011
  }
2804
3012
  };
2805
- nt = $i([
2806
- Pe(0, O(qt)),
2807
- Pe(1, O(xn)),
3013
+ rt = ji([
3014
+ Pe(0, O(Gt)),
3015
+ Pe(1, O(wn)),
2808
3016
  Pe(2, O(z)),
2809
- Pe(3, O(Ln)),
2810
- Pe(4, O(rt)),
2811
- Pe(5, O(J))
2812
- ], nt);
2813
- const Xn = "sheets-conditional-formatting-ui.config", yt = {};
2814
- var ji = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, Bi = (t, e, r) => e in t ? ji(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Wi = (t, e, r, n) => {
2815
- for (var i = n > 1 ? void 0 : n ? Hi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3017
+ Pe(3, O(An)),
3018
+ Pe(4, O(it)),
3019
+ Pe(5, O(Q))
3020
+ ], rt);
3021
+ const Jn = "sheets-conditional-formatting-ui.config", bt = {};
3022
+ var Hi = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, Wi = (t, e, r) => e in t ? Hi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, qi = (t, e, r, n) => {
3023
+ for (var i = n > 1 ? void 0 : n ? Bi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2816
3024
  (o = t[s]) && (i = o(i) || i);
2817
3025
  return i;
2818
- }, At = (t, e) => (r, n) => e(r, n, t), Jn = (t, e, r) => Bi(t, typeof e != "symbol" ? e + "" : e, r);
2819
- let bt = class extends bn {
2820
- constructor(t = yt, e, r, n) {
3026
+ }, Dt = (t, e) => (r, n) => e(r, n, t), Qn = (t, e, r) => Wi(t, typeof e != "symbol" ? e + "" : e, r);
3027
+ let St = class extends Sn {
3028
+ constructor(t = bt, e, r, n) {
2821
3029
  super(), this._config = t, this._injector = e, this._commandService = r, this._configService = n;
2822
- const { menu: i, ...s } = Sn(
3030
+ const { menu: i, ...s } = In(
2823
3031
  {},
2824
- yt,
3032
+ bt,
2825
3033
  this._config
2826
3034
  );
2827
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Xn, s), this._initCommand(), this._injector.add([nt]), this._injector.add([tt]), this._injector.add([Qe]), this._injector.add([et]), this._injector.add([De]);
3035
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Jn, s), this._initCommand(), this._injector.add([rt]), this._injector.add([nt]), this._injector.add([et]), this._injector.add([tt]), this._injector.add([De]);
2828
3036
  }
2829
3037
  _initCommand() {
2830
3038
  [
2831
- An,
2832
3039
  Dn,
2833
3040
  $n,
2834
3041
  jn,
@@ -2837,26 +3044,27 @@ let bt = class extends bn {
2837
3044
  Wn,
2838
3045
  qn,
2839
3046
  Gn,
2840
- Vt
3047
+ zn,
3048
+ kt
2841
3049
  ].forEach((t) => {
2842
3050
  this._commandService.registerCommand(t);
2843
3051
  });
2844
3052
  }
2845
3053
  };
2846
- Jn(bt, "pluginName", `${it}_MOBILE_UI_PLUGIN`);
2847
- Jn(bt, "type", $.UNIVER_SHEET);
2848
- bt = Wi([
2849
- Cn(En),
2850
- At(1, O(ve)),
2851
- At(2, O(ee)),
2852
- At(3, yn)
2853
- ], bt);
2854
- var qi = Object.getOwnPropertyDescriptor, Gi = (t, e, r, n) => {
2855
- for (var i = n > 1 ? void 0 : n ? qi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3054
+ Qn(St, "pluginName", `${st}_MOBILE_UI_PLUGIN`);
3055
+ Qn(St, "type", $.UNIVER_SHEET);
3056
+ St = qi([
3057
+ yn(En),
3058
+ Dt(1, O(ve)),
3059
+ Dt(2, O(te)),
3060
+ Dt(3, bn)
3061
+ ], St);
3062
+ var Gi = Object.getOwnPropertyDescriptor, zi = (t, e, r, n) => {
3063
+ for (var i = n > 1 ? void 0 : n ? Gi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2856
3064
  (o = t[s]) && (i = o(i) || i);
2857
3065
  return i;
2858
- }, Ge = (t, e) => (r, n) => e(r, n, t);
2859
- let St = class extends ce {
3066
+ }, ze = (t, e) => (r, n) => e(r, n, t);
3067
+ let It = class extends ce {
2860
3068
  constructor(t, e, r, n, i) {
2861
3069
  super(), this._injector = t, this._univerInstanceService = e, this._autoFillService = r, this._conditionalFormattingRuleModel = n, this._conditionalFormattingViewModel = i, this._initAutoFill();
2862
3070
  }
@@ -2895,61 +3103,61 @@ let St = class extends ce {
2895
3103
  endRow: S
2896
3104
  },
2897
3105
  v
2898
- ), { row: R, col: E } = a(T.startRow, T.startColumn), x = this._conditionalFormattingViewModel.getCellCfs(
3106
+ ), { row: R, col: w } = a(T.startRow, T.startColumn), x = this._conditionalFormattingViewModel.getCellCfs(
2899
3107
  u,
2900
3108
  l,
2901
3109
  R,
2902
- E
2903
- ), { row: m, col: C } = a(_.startRow, _.startColumn), b = this._conditionalFormattingViewModel.getCellCfs(
3110
+ w
3111
+ ), { row: g, col: C } = a(_.startRow, _.startColumn), b = this._conditionalFormattingViewModel.getCellCfs(
2904
3112
  u,
2905
3113
  l,
2906
- m,
3114
+ g,
2907
3115
  C
2908
3116
  );
2909
3117
  b && b.forEach((y) => {
2910
3118
  let M = d.get(y.cfId);
2911
3119
  if (!d.get(y.cfId)) {
2912
- const w = this._conditionalFormattingRuleModel.getRule(u, l, y.cfId);
2913
- if (!w)
3120
+ const E = this._conditionalFormattingRuleModel.getRule(u, l, y.cfId);
3121
+ if (!E)
2914
3122
  return;
2915
- M = new Ee(), w.ranges.forEach((V) => {
2916
- pe.foreach(V, (L, g) => {
2917
- M.setValue(L, g, 1);
3123
+ M = new we(), E.ranges.forEach((V) => {
3124
+ pe.foreach(V, (L, m) => {
3125
+ M.setValue(L, m, 1);
2918
3126
  });
2919
3127
  }), d.set(y.cfId, M);
2920
3128
  }
2921
- M.realDeleteValue(m, C);
3129
+ M.realDeleteValue(g, C);
2922
3130
  }), x && x.forEach((y) => {
2923
3131
  let M = d.get(y.cfId);
2924
3132
  if (!d.get(y.cfId)) {
2925
- const w = this._conditionalFormattingRuleModel.getRule(u, l, y.cfId);
2926
- if (!w)
3133
+ const E = this._conditionalFormattingRuleModel.getRule(u, l, y.cfId);
3134
+ if (!E)
2927
3135
  return;
2928
- M = new Ee(), w.ranges.forEach((V) => {
2929
- pe.foreach(V, (L, g) => {
2930
- M.setValue(L, g, 1);
3136
+ M = new we(), E.ranges.forEach((V) => {
3137
+ pe.foreach(V, (L, m) => {
3138
+ M.setValue(L, m, 1);
2931
3139
  });
2932
3140
  }), d.set(y.cfId, M);
2933
3141
  }
2934
- M.setValue(m, C, 1);
3142
+ M.setValue(g, C, 1);
2935
3143
  });
2936
3144
  });
2937
3145
  }, r = (i, s) => {
2938
- var _, R, E;
2939
- const o = (_ = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : _.getUnitId(), d = (E = (R = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : R.getActiveSheet()) == null ? void 0 : E.getSheetId(), a = /* @__PURE__ */ new Map(), u = [], l = [];
3146
+ var _, R, w;
3147
+ const o = (_ = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : _.getUnitId(), d = (w = (R = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : R.getActiveSheet()) == null ? void 0 : w.getSheetId(), a = /* @__PURE__ */ new Map(), u = [], l = [];
2940
3148
  if (!o || !d)
2941
3149
  return t();
2942
- const h = Un([i, s]), [v, f] = h.ranges, { mapFunc: S } = h, p = {
3150
+ const h = Pn([i, s]), [v, f] = h.ranges, { mapFunc: S } = h, p = {
2943
3151
  row: v.startRow,
2944
3152
  col: v.startColumn
2945
3153
  };
2946
- return Qr(v, f).forEach((x) => {
3154
+ return ei(v, f).forEach((x) => {
2947
3155
  e(p, x.repeatStartCell, x.relativeRange, a, S);
2948
- }), a.forEach((x, m) => {
2949
- const C = this._conditionalFormattingRuleModel.getRule(o, d, m);
3156
+ }), a.forEach((x, g) => {
3157
+ const C = this._conditionalFormattingRuleModel.getRule(o, d, g);
2950
3158
  if (!C)
2951
3159
  return;
2952
- const b = ft(pt(x));
3160
+ const b = pt(Ct(x));
2953
3161
  if (b.length) {
2954
3162
  const y = {
2955
3163
  unitId: o,
@@ -2970,9 +3178,9 @@ let St = class extends ce {
2970
3178
  redos: u
2971
3179
  };
2972
3180
  }, n = {
2973
- id: it,
3181
+ id: st,
2974
3182
  onFillData: (i, s, o) => {
2975
- if (o === Ut.COPY || o === Ut.ONLY_FORMAT || o === Ut.SERIES) {
3183
+ if (o === Pt.COPY || o === Pt.ONLY_FORMAT || o === Pt.SERIES) {
2976
3184
  const { source: d, target: a } = i;
2977
3185
  return r(d, a);
2978
3186
  }
@@ -2982,19 +3190,19 @@ let St = class extends ce {
2982
3190
  this.disposeWithMe(this._autoFillService.addHook(n));
2983
3191
  }
2984
3192
  };
2985
- St = Gi([
2986
- Ge(0, O(ve)),
2987
- Ge(1, O(z)),
2988
- Ge(2, O(Jr)),
2989
- Ge(3, O(J)),
2990
- Ge(4, O(rt))
2991
- ], St);
2992
- var zi = Object.getOwnPropertyDescriptor, Zi = (t, e, r, n) => {
2993
- for (var i = n > 1 ? void 0 : n ? zi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3193
+ It = zi([
3194
+ ze(0, O(ve)),
3195
+ ze(1, O(z)),
3196
+ ze(2, O(Qr)),
3197
+ ze(3, O(Q)),
3198
+ ze(4, O(it))
3199
+ ], It);
3200
+ var Zi = Object.getOwnPropertyDescriptor, Yi = (t, e, r, n) => {
3201
+ for (var i = n > 1 ? void 0 : n ? Zi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
2994
3202
  (o = t[s]) && (i = o(i) || i);
2995
3203
  return i;
2996
- }, ze = (t, e) => (r, n) => e(r, n, t);
2997
- let It = class extends ce {
3204
+ }, Ze = (t, e) => (r, n) => e(r, n, t);
3205
+ let _t = class extends ce {
2998
3206
  constructor(t, e, r, n, i) {
2999
3207
  super(), this._injector = t, this._univerInstanceService = e, this._sheetInterceptorService = r, this._selectionManagerService = n, this._conditionalFormattingRuleModel = i, this._init();
3000
3208
  }
@@ -3003,7 +3211,7 @@ let It = class extends ce {
3003
3211
  getMutations: (t) => {
3004
3212
  var i;
3005
3213
  const e = [], r = [], n = { redos: e, undos: r };
3006
- if ([kr.id, Fr.id].includes(t.id)) {
3214
+ if ([Fr.id, Ur.id].includes(t.id)) {
3007
3215
  const s = (i = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : i.map((f) => f.range);
3008
3216
  if (!s)
3009
3217
  return n;
@@ -3013,7 +3221,7 @@ let It = class extends ce {
3013
3221
  const a = o.getUnitId(), u = d.getSheetId(), l = this._conditionalFormattingRuleModel.getSubunitRules(a, u);
3014
3222
  if (!l || !l.length)
3015
3223
  return n;
3016
- const { redos: h, undos: v } = dn(this._injector, l, s, a, u);
3224
+ const { redos: h, undos: v } = hn(this._injector, l, s, a, u);
3017
3225
  e.push(...h), r.push(...v);
3018
3226
  }
3019
3227
  return n;
@@ -3026,23 +3234,23 @@ let It = class extends ce {
3026
3234
  const o = this._conditionalFormattingRuleModel.getSubunitRules(t, e);
3027
3235
  if (!o || !o.length)
3028
3236
  return s;
3029
- const { redos: d, undos: a } = dn(this._injector, o, r, t, e);
3237
+ const { redos: d, undos: a } = hn(this._injector, o, r, t, e);
3030
3238
  return n.push(...d), i.push(...a), s;
3031
3239
  }
3032
3240
  }));
3033
3241
  }
3034
3242
  };
3035
- It = Zi([
3036
- ze(0, O(ve)),
3037
- ze(1, O(z)),
3038
- ze(2, O(qt)),
3039
- ze(3, O($e)),
3040
- ze(4, O(J))
3041
- ], It);
3042
- function dn(t, e, r, n, i) {
3243
+ _t = Yi([
3244
+ Ze(0, O(ve)),
3245
+ Ze(1, O(z)),
3246
+ Ze(2, O(Gt)),
3247
+ Ze(3, O($e)),
3248
+ Ze(4, O(Q))
3249
+ ], _t);
3250
+ function hn(t, e, r, n, i) {
3043
3251
  const s = [], o = [];
3044
3252
  return e.filter((d) => r.some((a) => d.ranges.some((u) => fe.getIntersects(u, a)))).forEach((d) => {
3045
- const u = new Ur().add(...d.ranges).subtract(...r).merge();
3253
+ const u = new Pr().add(...d.ranges).subtract(...r).merge();
3046
3254
  if (u.length) {
3047
3255
  const l = {
3048
3256
  id: be.id,
@@ -3066,12 +3274,12 @@ function dn(t, e, r, n, i) {
3066
3274
  }
3067
3275
  }), { redos: s, undos: o };
3068
3276
  }
3069
- var Yi = Object.getOwnPropertyDescriptor, Ki = (t, e, r, n) => {
3070
- for (var i = n > 1 ? void 0 : n ? Yi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3277
+ var Ki = Object.getOwnPropertyDescriptor, Xi = (t, e, r, n) => {
3278
+ for (var i = n > 1 ? void 0 : n ? Ki(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3071
3279
  (o = t[s]) && (i = o(i) || i);
3072
3280
  return i;
3073
- }, hn = (t, e) => (r, n) => e(r, n, t);
3074
- let _t = class extends ce {
3281
+ }, vn = (t, e) => (r, n) => e(r, n, t);
3282
+ let Tt = class extends ce {
3075
3283
  constructor(t, e) {
3076
3284
  super(), this._sheetInterceptorService = t, this._conditionalFormattingService = e, this._initInterceptorEditorEnd();
3077
3285
  }
@@ -3082,9 +3290,9 @@ let _t = class extends ce {
3082
3290
  */
3083
3291
  _initInterceptorEditorEnd() {
3084
3292
  this.disposeWithMe(
3085
- pn(
3293
+ Cn(
3086
3294
  this._sheetInterceptorService.writeCellInterceptor.intercept(
3087
- Pr,
3295
+ Or,
3088
3296
  {
3089
3297
  handler: (t, e, r) => {
3090
3298
  var o, d, a;
@@ -3112,79 +3320,79 @@ let _t = class extends ce {
3112
3320
  );
3113
3321
  }
3114
3322
  };
3115
- _t = Ki([
3116
- hn(0, O(qt)),
3117
- hn(1, O(xn))
3118
- ], _t);
3119
- const vn = [
3120
- Wt.id,
3323
+ Tt = Xi([
3324
+ vn(0, O(Gt)),
3325
+ vn(1, O(wn))
3326
+ ], Tt);
3327
+ const gn = [
3328
+ qt.id,
3121
3329
  se.id,
3122
3330
  be.id,
3123
3331
  Se.id,
3124
- _n.id
3125
- ], Ze = [
3332
+ Tn.id
3333
+ ], Ye = [
3126
3334
  {
3127
3335
  label: {
3128
3336
  name: "sheet.cf.ruleType.highlightCell",
3129
3337
  selectable: !1
3130
3338
  },
3131
- value: re.highlightCell
3339
+ value: ie.highlightCell
3132
3340
  },
3133
3341
  {
3134
3342
  label: {
3135
3343
  name: "sheet.cf.panel.rankAndAverage",
3136
3344
  selectable: !1
3137
3345
  },
3138
- value: re.rank
3346
+ value: ie.rank
3139
3347
  },
3140
3348
  {
3141
3349
  label: {
3142
3350
  name: "sheet.cf.ruleType.formula",
3143
3351
  selectable: !1
3144
3352
  },
3145
- value: re.formula
3353
+ value: ie.formula
3146
3354
  },
3147
3355
  {
3148
3356
  label: {
3149
3357
  name: "sheet.cf.ruleType.colorScale",
3150
3358
  selectable: !1
3151
3359
  },
3152
- value: re.colorScale
3360
+ value: ie.colorScale
3153
3361
  },
3154
3362
  {
3155
3363
  label: {
3156
3364
  name: "sheet.cf.ruleType.dataBar",
3157
3365
  selectable: !1
3158
3366
  },
3159
- value: re.dataBar
3367
+ value: ie.dataBar
3160
3368
  },
3161
3369
  {
3162
3370
  label: {
3163
3371
  name: "sheet.cf.ruleType.iconSet",
3164
3372
  selectable: !1
3165
3373
  },
3166
- value: re.icon
3374
+ value: ie.icon
3167
3375
  },
3168
3376
  {
3169
3377
  label: {
3170
3378
  name: "sheet.cf.menu.manageConditionalFormatting",
3171
3379
  selectable: !1
3172
3380
  },
3173
- value: re.viewRule
3381
+ value: ie.viewRule
3174
3382
  },
3175
3383
  {
3176
3384
  label: {
3177
3385
  name: "sheet.cf.menu.createConditionalFormatting",
3178
3386
  selectable: !1
3179
3387
  },
3180
- value: re.createRule
3388
+ value: ie.createRule
3181
3389
  },
3182
3390
  {
3183
3391
  label: {
3184
3392
  name: "sheet.cf.menu.clearRangeRules",
3185
3393
  selectable: !1
3186
3394
  },
3187
- value: re.clearRangeRules,
3395
+ value: ie.clearRangeRules,
3188
3396
  disabled: !1
3189
3397
  },
3190
3398
  {
@@ -3192,37 +3400,37 @@ const vn = [
3192
3400
  name: "sheet.cf.menu.clearWorkSheetRules",
3193
3401
  selectable: !1
3194
3402
  },
3195
- value: re.clearWorkSheetRules
3403
+ value: ie.clearWorkSheetRules
3196
3404
  }
3197
- ], Xi = (t) => {
3198
- const e = t.get($e), r = t.get(ee), n = t.get(z), i = t.get(J), s = new xe((a) => On(
3405
+ ], Ji = (t) => {
3406
+ const e = t.get($e), r = t.get(te), n = t.get(z), i = t.get(Q), s = new xe((a) => Ln(
3199
3407
  e.selectionMoveEnd$,
3200
3408
  e.selectionSet$,
3201
3409
  new xe((u) => {
3202
3410
  const l = r.onCommandExecuted((h) => {
3203
3411
  var p;
3204
3412
  const { id: v, params: f } = h, S = (p = n.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : p.getUnitId();
3205
- vn.includes(v) && f.unitId === S && u.next(null);
3413
+ gn.includes(v) && f.unitId === S && u.next(null);
3206
3414
  });
3207
3415
  return () => l.dispose();
3208
3416
  })
3209
- ).pipe(nn(16)).subscribe(() => {
3417
+ ).pipe(rn(16)).subscribe(() => {
3210
3418
  var p;
3211
3419
  const u = ((p = e.getCurrentSelections()) == null ? void 0 : p.map((T) => T.range)) || [], l = n.getCurrentUnitForType($.UNIVER_SHEET);
3212
3420
  if (!l) return;
3213
3421
  const h = l.getActiveSheet();
3214
3422
  if (!h) return;
3215
- const S = (i.getSubunitRules(l.getUnitId(), h.getSheetId()) || []).filter((T) => T.ranges.some((_) => u.some((R) => fe.intersects(R, _)))).map((T) => T.ranges).every((T) => gt(t, l.getUnitId(), h.getSheetId(), T));
3423
+ const S = (i.getSubunitRules(l.getUnitId(), h.getSheetId()) || []).filter((T) => T.ranges.some((_) => u.some((R) => fe.intersects(R, _)))).map((T) => T.ranges).every((T) => ft(t, l.getUnitId(), h.getSheetId(), T));
3216
3424
  a.next(S);
3217
3425
  })), o = new xe(
3218
3426
  (a) => new xe((u) => {
3219
3427
  const l = r.onCommandExecuted((h) => {
3220
3428
  var p;
3221
3429
  const { id: v, params: f } = h, S = (p = n.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : p.getUnitId();
3222
- vn.includes(v) && f.unitId === S && u.next(null);
3430
+ gn.includes(v) && f.unitId === S && u.next(null);
3223
3431
  });
3224
3432
  return () => l.dispose();
3225
- }).pipe(nn(16)).subscribe(() => {
3433
+ }).pipe(rn(16)).subscribe(() => {
3226
3434
  const u = n.getCurrentUnitForType($.UNIVER_SHEET);
3227
3435
  if (!u) return;
3228
3436
  const l = u.getActiveSheet();
@@ -3230,57 +3438,57 @@ const vn = [
3230
3438
  const h = i.getSubunitRules(u.getUnitId(), l.getSheetId()) || [];
3231
3439
  if (!h.length)
3232
3440
  return a.next(!1), !1;
3233
- const v = h.map((f) => f.ranges).every((f) => gt(t, u.getUnitId(), l.getSheetId(), f));
3441
+ const v = h.map((f) => f.ranges).every((f) => ft(t, u.getUnitId(), l.getSheetId(), f));
3234
3442
  a.next(v);
3235
3443
  })
3236
3444
  ), d = new xe((a) => {
3237
3445
  s.subscribe((u) => {
3238
- const l = Ze.find((h) => h.value === re.clearRangeRules);
3239
- l && (l.disabled = !u, a.next(Ze));
3446
+ const l = Ye.find((h) => h.value === ie.clearRangeRules);
3447
+ l && (l.disabled = !u, a.next(Ye));
3240
3448
  }), o.subscribe((u) => {
3241
- const l = Ze.find((h) => h.value === re.clearWorkSheetRules);
3242
- l && (l.disabled = !u, a.next(Ze));
3243
- }), a.next(Ze);
3449
+ const l = Ye.find((h) => h.value === ie.clearWorkSheetRules);
3450
+ l && (l.disabled = !u, a.next(Ye));
3451
+ }), a.next(Ye);
3244
3452
  });
3245
3453
  return {
3246
- id: Vt.id,
3247
- type: $r.SELECTOR,
3454
+ id: kt.id,
3455
+ type: jr.SELECTOR,
3248
3456
  icon: "Conditions",
3249
3457
  tooltip: "sheet.cf.title",
3250
3458
  selections: d,
3251
- hidden$: Dr(t, $.UNIVER_SHEET),
3252
- disabled$: ei(t, { workbookTypes: [Vn], worksheetTypes: [Nn, wn], rangeTypes: [Mn] })
3459
+ hidden$: $r(t, $.UNIVER_SHEET),
3460
+ disabled$: ti(t, { workbookTypes: [kn], worksheetTypes: [Mn, Nn], rangeTypes: [Vn] })
3253
3461
  };
3254
- }, Ji = {
3255
- [jr.FORMULAS_INSERT]: {
3256
- [Vt.id]: {
3462
+ }, Qi = {
3463
+ [Hr.FORMULAS_INSERT]: {
3464
+ [kt.id]: {
3257
3465
  order: 0,
3258
- menuItemFactory: Xi
3466
+ menuItemFactory: Ji
3259
3467
  }
3260
3468
  }
3261
3469
  };
3262
- var Qi = Object.getOwnPropertyDescriptor, es = (t, e, r, n) => {
3263
- for (var i = n > 1 ? void 0 : n ? Qi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3470
+ var es = Object.getOwnPropertyDescriptor, ts = (t, e, r, n) => {
3471
+ for (var i = n > 1 ? void 0 : n ? es(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3264
3472
  (o = t[s]) && (i = o(i) || i);
3265
3473
  return i;
3266
3474
  }, mn = (t, e) => (r, n) => e(r, n, t);
3267
- let Tt = class extends ce {
3475
+ let Rt = class extends ce {
3268
3476
  constructor(e, r) {
3269
3477
  super();
3270
3478
  ye(this, "_sidebarDisposable", null);
3271
- this._injector = e, this._menuManagerService = r, this._menuManagerService.mergeMenu(Ji);
3479
+ this._injector = e, this._menuManagerService = r, this._menuManagerService.mergeMenu(Qi);
3272
3480
  }
3273
3481
  };
3274
- Tt = es([
3482
+ Rt = ts([
3275
3483
  mn(0, O(ve)),
3276
- mn(1, Hr)
3277
- ], Tt);
3278
- var ts = Object.getOwnPropertyDescriptor, ns = (t, e, r, n) => {
3279
- for (var i = n > 1 ? void 0 : n ? ts(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3484
+ mn(1, Br)
3485
+ ], Rt);
3486
+ var ns = Object.getOwnPropertyDescriptor, rs = (t, e, r, n) => {
3487
+ for (var i = n > 1 ? void 0 : n ? ns(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3280
3488
  (o = t[s]) && (i = o(i) || i);
3281
3489
  return i;
3282
3490
  }, Oe = (t, e) => (r, n) => e(r, n, t);
3283
- const rs = (t, e) => {
3491
+ const is = (t, e) => {
3284
3492
  const r = (l) => l.endRow - l.startRow + 1, n = (l) => l.endColumn - l.startColumn + 1, i = r(e) % r(t), s = n(e) % n(t), o = Math.floor(r(e) / r(t)), d = Math.floor(n(e) / n(t)), a = [], u = {
3285
3493
  startRow: 0,
3286
3494
  endRow: r(t) - 1,
@@ -3309,7 +3517,7 @@ const rs = (t, e) => {
3309
3517
  }
3310
3518
  return a;
3311
3519
  };
3312
- let Rt = class extends ce {
3520
+ let xt = class extends ce {
3313
3521
  constructor(e, r, n, i, s, o) {
3314
3522
  super();
3315
3523
  ye(this, "_painterConfig", null);
@@ -3338,7 +3546,7 @@ let Rt = class extends ce {
3338
3546
  endRow: T
3339
3547
  },
3340
3548
  S
3341
- ), E = fe.getPositionRange(
3549
+ ), w = fe.getPositionRange(
3342
3550
  {
3343
3551
  startRow: T,
3344
3552
  startColumn: _,
@@ -3351,28 +3559,28 @@ let Rt = class extends ce {
3351
3559
  h,
3352
3560
  R.startRow,
3353
3561
  R.startColumn
3354
- ), m = this._conditionalFormattingViewModel.getCellCfs(
3562
+ ), g = this._conditionalFormattingViewModel.getCellCfs(
3355
3563
  v,
3356
3564
  f,
3357
- E.startRow,
3358
- E.startColumn
3565
+ w.startRow,
3566
+ w.startColumn
3359
3567
  );
3360
- m && m.forEach((C) => {
3568
+ g && g.forEach((C) => {
3361
3569
  let b = a.get(C.cfId);
3362
3570
  if (!a.get(C.cfId)) {
3363
3571
  const y = this._conditionalFormattingRuleModel.getRule(v, f, C.cfId);
3364
3572
  if (!y)
3365
3573
  return;
3366
- b = new Ee(), y.ranges.forEach((M) => {
3367
- pe.foreach(M, (w, V) => {
3368
- b.setValue(w, V, 1);
3574
+ b = new we(), y.ranges.forEach((M) => {
3575
+ pe.foreach(M, (E, V) => {
3576
+ b.setValue(E, V, 1);
3369
3577
  });
3370
3578
  }), a.set(C.cfId, b);
3371
3579
  }
3372
- b.realDeleteValue(E.startRow, E.startColumn);
3580
+ b.realDeleteValue(w.startRow, w.startColumn);
3373
3581
  }), x && x.forEach((C) => {
3374
3582
  const b = a.get(C.cfId);
3375
- b && b.setValue(E.startRow, E.startColumn, 1);
3583
+ b && b.setValue(w.startRow, w.startColumn, 1);
3376
3584
  });
3377
3585
  });
3378
3586
  }, n = (s, o, d) => {
@@ -3381,39 +3589,39 @@ let Rt = class extends ce {
3381
3589
  if (!s || !o || !u || !l)
3382
3590
  return e();
3383
3591
  const p = (R = this._conditionalFormattingRuleModel.getSubunitRules(u, l)) != null ? R : [];
3384
- p == null || p.forEach((E) => {
3385
- const { ranges: x, cfId: m } = E;
3592
+ p == null || p.forEach((w) => {
3593
+ const { ranges: x, cfId: g } = w;
3386
3594
  if (x.some((C) => fe.intersects(a, C))) {
3387
- const C = new Ee();
3595
+ const C = new we();
3388
3596
  h || x.forEach((b) => {
3389
3597
  pe.foreach(b, (y, M) => {
3390
3598
  C.setValue(y, M, 1);
3391
3599
  });
3392
- }), v.set(m, C);
3600
+ }), v.set(g, C);
3393
3601
  }
3394
3602
  });
3395
3603
  const T = {
3396
3604
  row: a.startRow,
3397
3605
  col: a.startColumn
3398
3606
  };
3399
- return rs(a, d).forEach((E) => {
3400
- r(T, { row: E.startRange.startRow, col: E.startRange.startColumn }, E.repeatRelativeRange, v, { targetUnitId: s, targetSubUnitId: o });
3401
- }), v.forEach((E, x) => {
3607
+ return is(a, d).forEach((w) => {
3608
+ r(T, { row: w.startRange.startRow, col: w.startRange.startColumn }, w.repeatRelativeRange, v, { targetUnitId: s, targetSubUnitId: o });
3609
+ }), v.forEach((w, x) => {
3402
3610
  if (h) {
3403
- const m = this._conditionalFormattingRuleModel.getRule(s, o, x), C = ft(pt(E));
3404
- if (m)
3611
+ const g = this._conditionalFormattingRuleModel.getRule(s, o, x), C = pt(Ct(w));
3612
+ if (g)
3405
3613
  if (C.length) {
3406
3614
  const b = {
3407
3615
  unitId: s,
3408
3616
  subUnitId: o,
3409
- rule: { ...m, ranges: C }
3617
+ rule: { ...g, ranges: C }
3410
3618
  };
3411
3619
  f.push({ id: be.id, params: b }), S.push(...Ae(this._injector, b));
3412
3620
  } else {
3413
3621
  const b = {
3414
3622
  unitId: s,
3415
3623
  subUnitId: o,
3416
- cfId: m.cfId
3624
+ cfId: g.cfId
3417
3625
  };
3418
3626
  f.push({ id: Se.id, params: b }), S.push(...Le(this._injector, b));
3419
3627
  }
@@ -3424,31 +3632,31 @@ let Rt = class extends ce {
3424
3632
  unitId: s,
3425
3633
  subUnitId: o,
3426
3634
  rule: {
3427
- ...Bt.deepClone(b),
3635
+ ...Wt.deepClone(b),
3428
3636
  cfId: this._conditionalFormattingRuleModel.createCfId(s, o),
3429
3637
  ranges: C
3430
3638
  }
3431
3639
  };
3432
- f.push({ id: se.id, params: y }), S.push(Rn(this._injector, y));
3640
+ f.push({ id: se.id, params: y }), S.push(xn(this._injector, y));
3433
3641
  }
3434
3642
  }
3435
3643
  } else {
3436
- const m = this._conditionalFormattingRuleModel.getRule(u, l, x);
3437
- if (!m)
3644
+ const g = this._conditionalFormattingRuleModel.getRule(u, l, x);
3645
+ if (!g)
3438
3646
  return;
3439
- const C = ft(pt(E));
3647
+ const C = pt(Ct(w));
3440
3648
  if (C.length) {
3441
3649
  const b = {
3442
3650
  unitId: u,
3443
3651
  subUnitId: l,
3444
- rule: { ...m, ranges: C }
3652
+ rule: { ...g, ranges: C }
3445
3653
  };
3446
3654
  f.push({ id: be.id, params: b }), S.push(...Ae(this._injector, b));
3447
3655
  } else {
3448
3656
  const b = {
3449
3657
  unitId: u,
3450
3658
  subUnitId: l,
3451
- cfId: m.cfId
3659
+ cfId: g.cfId
3452
3660
  };
3453
3661
  f.push({ id: Se.id, params: b }), S.push(...Le(this._injector, b));
3454
3662
  }
@@ -3458,17 +3666,17 @@ let Rt = class extends ce {
3458
3666
  redos: f
3459
3667
  };
3460
3668
  }, i = {
3461
- id: it,
3669
+ id: st,
3462
3670
  onStatusChange: (s) => {
3463
3671
  var o, d, a;
3464
3672
  switch (s) {
3465
- case Pt.INFINITE:
3466
- case Pt.ONCE: {
3673
+ case Ot.INFINITE:
3674
+ case Ot.ONCE: {
3467
3675
  const u = (o = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : o.getUnitId(), l = (a = (d = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : d.getActiveSheet()) == null ? void 0 : a.getSheetId(), h = this._sheetsSelectionsService.getCurrentLastSelection(), v = h == null ? void 0 : h.range;
3468
3676
  u && l && v && (this._painterConfig = { unitId: u, subUnitId: l, range: v });
3469
3677
  break;
3470
3678
  }
3471
- case Pt.OFF: {
3679
+ case Ot.OFF: {
3472
3680
  this._painterConfig = null;
3473
3681
  break;
3474
3682
  }
@@ -3482,20 +3690,20 @@ let Rt = class extends ce {
3482
3690
  this._formatPainterService.addHook(i);
3483
3691
  }
3484
3692
  };
3485
- Rt = ns([
3693
+ xt = rs([
3486
3694
  Oe(0, O(ve)),
3487
3695
  Oe(1, O(z)),
3488
- Oe(2, O(ti)),
3696
+ Oe(2, O(ni)),
3489
3697
  Oe(3, O($e)),
3490
- Oe(4, O(J)),
3491
- Oe(5, O(rt))
3492
- ], Rt);
3493
- var is = Object.getOwnPropertyDescriptor, ss = (t, e, r, n) => {
3494
- for (var i = n > 1 ? void 0 : n ? is(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3698
+ Oe(4, O(Q)),
3699
+ Oe(5, O(it))
3700
+ ], xt);
3701
+ var ss = Object.getOwnPropertyDescriptor, os = (t, e, r, n) => {
3702
+ for (var i = n > 1 ? void 0 : n ? ss(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3495
3703
  (o = t[s]) && (i = o(i) || i);
3496
3704
  return i;
3497
- }, Dt = (t, e) => (r, n) => e(r, n, t);
3498
- let xt = class extends ce {
3705
+ }, $t = (t, e) => (r, n) => e(r, n, t);
3706
+ let wt = class extends ce {
3499
3707
  constructor(t, e, r) {
3500
3708
  super(), this._conditionalFormattingViewModel = t, this._univerInstanceService = e, this._renderManagerService = r, this._init();
3501
3709
  }
@@ -3504,10 +3712,10 @@ let xt = class extends ce {
3504
3712
  const n = r.getUnitId(), i = this._renderManagerService.getRenderById(n);
3505
3713
  if (!i)
3506
3714
  return;
3507
- const s = i.with(Pn);
3715
+ const s = i.with(On);
3508
3716
  this.disposeWithMe(s.currentSkeleton$.subscribe((o) => {
3509
3717
  if (o) {
3510
- const d = o.skeleton.rowColumnSegment, a = d.endColumn - d.startColumn + 1, l = (d.endRow - d.startRow + 1) * a * 9, h = Math.max(_r, l);
3718
+ const d = o.skeleton.rowColumnSegment, a = d.endColumn - d.startColumn + 1, l = (d.endRow - d.startRow + 1) * a * 9, h = Math.max(Tr, l);
3511
3719
  this._conditionalFormattingViewModel.setCacheLength(h);
3512
3720
  }
3513
3721
  }));
@@ -3517,66 +3725,65 @@ let xt = class extends ce {
3517
3725
  });
3518
3726
  }
3519
3727
  };
3520
- xt = ss([
3521
- Dt(0, O(rt)),
3522
- Dt(1, z),
3523
- Dt(2, Ln)
3524
- ], xt);
3525
- var os = Object.defineProperty, as = Object.getOwnPropertyDescriptor, ls = (t, e, r) => e in t ? os(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, cs = (t, e, r, n) => {
3526
- for (var i = n > 1 ? void 0 : n ? as(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3728
+ wt = os([
3729
+ $t(0, O(it)),
3730
+ $t(1, z),
3731
+ $t(2, An)
3732
+ ], wt);
3733
+ var as = Object.defineProperty, ls = Object.getOwnPropertyDescriptor, cs = (t, e, r) => e in t ? as(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, us = (t, e, r, n) => {
3734
+ for (var i = n > 1 ? void 0 : n ? ls(e, r) : e, s = t.length - 1, o; s >= 0; s--)
3527
3735
  (o = t[s]) && (i = o(i) || i);
3528
3736
  return i;
3529
- }, $t = (t, e) => (r, n) => e(r, n, t), Qn = (t, e, r) => ls(t, typeof e != "symbol" ? e + "" : e, r);
3530
- let Et = class extends bn {
3531
- constructor(t = yt, e, r, n) {
3737
+ }, jt = (t, e) => (r, n) => e(r, n, t), er = (t, e, r) => cs(t, typeof e != "symbol" ? e + "" : e, r);
3738
+ let Et = class extends Sn {
3739
+ constructor(t = bt, e, r, n) {
3532
3740
  super(), this._config = t, this._injector = e, this._commandService = r, this._configService = n;
3533
- const { menu: i, ...s } = Sn(
3741
+ const { menu: i, ...s } = In(
3534
3742
  {},
3535
- yt,
3743
+ bt,
3536
3744
  this._config
3537
3745
  );
3538
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Xn, s), this._initCommand();
3746
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Jn, s), this._initCommand();
3539
3747
  }
3540
3748
  onStarting() {
3541
- cr(this._injector, [
3749
+ ur(this._injector, [
3750
+ [rt],
3542
3751
  [nt],
3752
+ [et],
3753
+ [It],
3543
3754
  [tt],
3544
3755
  [Qe],
3545
- [St],
3546
- [et],
3547
- [Je],
3548
- [Tt],
3756
+ [Rt],
3549
3757
  [De],
3758
+ [Tt],
3550
3759
  [_t],
3551
- [It],
3552
- [Rt],
3553
- [xt]
3554
- ]), kt(this._injector, [
3555
- [nt]
3760
+ [xt],
3761
+ [wt]
3762
+ ]), Ft(this._injector, [
3763
+ [rt]
3556
3764
  ]);
3557
3765
  }
3558
3766
  onReady() {
3559
- kt(this._injector, [
3560
- [Tt],
3561
- [Je]
3767
+ Ft(this._injector, [
3768
+ [Rt],
3769
+ [Qe]
3562
3770
  ]);
3563
3771
  }
3564
3772
  onRendered() {
3565
- kt(this._injector, [
3566
- [St],
3773
+ Ft(this._injector, [
3567
3774
  [It],
3568
- [Qe],
3569
3775
  [_t],
3570
- [De],
3571
- [Rt],
3572
3776
  [et],
3777
+ [Tt],
3778
+ [De],
3779
+ [xt],
3573
3780
  [tt],
3574
- [xt]
3781
+ [nt],
3782
+ [wt]
3575
3783
  ]);
3576
3784
  }
3577
3785
  _initCommand() {
3578
3786
  [
3579
- An,
3580
3787
  Dn,
3581
3788
  $n,
3582
3789
  jn,
@@ -3585,32 +3792,33 @@ let Et = class extends bn {
3585
3792
  Wn,
3586
3793
  qn,
3587
3794
  Gn,
3588
- Vt
3795
+ zn,
3796
+ kt
3589
3797
  ].forEach((t) => {
3590
3798
  this._commandService.registerCommand(t);
3591
3799
  });
3592
3800
  }
3593
3801
  };
3594
- Qn(Et, "pluginName", `${it}_UI_PLUGIN`);
3595
- Qn(Et, "type", $.UNIVER_SHEET);
3596
- Et = cs([
3597
- Cn(En),
3598
- $t(1, O(ve)),
3599
- $t(2, O(ee)),
3600
- $t(3, yn)
3802
+ er(Et, "pluginName", `${st}_UI_PLUGIN`);
3803
+ er(Et, "type", $.UNIVER_SHEET);
3804
+ Et = us([
3805
+ yn(En),
3806
+ jt(1, O(ve)),
3807
+ jt(2, O(te)),
3808
+ jt(3, bn)
3601
3809
  ], Et);
3602
3810
  export {
3603
- An as AddAverageCfCommand,
3604
- Dn as AddColorScaleConditionalRuleCommand,
3605
- $n as AddDataBarConditionalRuleCommand,
3606
- jn as AddDuplicateValuesCfCommand,
3607
- Hn as AddNumberCfCommand,
3608
- Bn as AddRankCfCommand,
3609
- Wn as AddTextCfCommand,
3610
- qn as AddTimePeriodCfCommand,
3611
- Gn as AddUniqueValuesCfCommand,
3612
- It as ConditionalFormattingClearController,
3613
- Vt as OpenConditionalFormattingOperator,
3614
- bt as UniverSheetsConditionalFormattingMobileUIPlugin,
3811
+ Dn as AddAverageCfCommand,
3812
+ $n as AddColorScaleConditionalRuleCommand,
3813
+ jn as AddDataBarConditionalRuleCommand,
3814
+ Hn as AddDuplicateValuesCfCommand,
3815
+ Bn as AddNumberCfCommand,
3816
+ Wn as AddRankCfCommand,
3817
+ qn as AddTextCfCommand,
3818
+ Gn as AddTimePeriodCfCommand,
3819
+ zn as AddUniqueValuesCfCommand,
3820
+ _t as ConditionalFormattingClearController,
3821
+ kt as OpenConditionalFormattingOperator,
3822
+ St as UniverSheetsConditionalFormattingMobileUIPlugin,
3615
3823
  Et as UniverSheetsConditionalFormattingUIPlugin
3616
3824
  };