@univerjs/sheets-conditional-formatting-ui 0.2.4 → 0.2.5

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,9 +1,8 @@
1
1
  var ra = Object.defineProperty;
2
2
  var oa = (e, t, n) => t in e ? ra(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Qt = (e, t, n) => oa(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { CommandType as Re, ICommandService as ue, IUniverInstanceService as re, IUndoRedoService as qt, ObjectMatrix as Vt, Range as ut, sequenceExecute as yi, UniverInstanceType as G, Rectangle as At, ColorKit as bi, BooleanNumber as He, Disposable as rt, OnLifecycle as ot, LifecycleStages as it, LocaleService as $e, createInterceptorKey as Si, createInternalEditorID as yn, Tools as bn, InterceptorManager as ia, toDisposable as Ci, Plugin as _i, DependentOn as wi } from "@univerjs/core";
5
- import { Inject as q, Injector as Rt } from "@wendellhu/redi";
6
- import { ConditionalFormattingRuleModel as he, CFRuleType as L, CFSubRuleType as j, AddConditionalRuleMutation as De, CFNumberOperator as F, setConditionalRuleMutationUndoFactory as Bt, SetConditionalRuleMutation as nt, DeleteConditionalRuleMutationUndoFactory as It, DeleteConditionalRuleMutation as Ye, MoveConditionalRuleMutation as Ln, transformSupportSymmetryAnchor as sa, MoveConditionalRuleMutationUndoFactory as aa, getColorScaleFromValue as la, iconMap as bt, DEFAULT_BG_COLOR as ca, DEFAULT_FONT_COLOR as ua, AddConditionalRuleMutationUndoFactory as xi, CFValueType as A, createDefaultValueByValueType as cn, SHEET_CONDITIONAL_FORMATTING_PLUGIN as st, removeUndefinedAttr as da, createDefaultValue as Pr, CFTextOperator as X, CFTimePeriodOperator as Ge, iconGroup as fa, getOppositeOperator as Dr, compareWithNumber as ha, EMPTY_ICON_TYPE as pa, createDefaultRule as ft, DEFAULT_PADDING as ga, DEFAULT_WIDTH as ma, ConditionalFormattingService as Ri, ConditionalFormattingViewModel as Ar, isRangesEqual as va, UniverSheetsConditionalFormattingPlugin as Ii, getStringFromDataStream as ya } from "@univerjs/sheets-conditional-formatting";
4
+ import { CommandType as Re, ICommandService as ue, IUniverInstanceService as re, IUndoRedoService as qt, ObjectMatrix as Vt, Range as ut, sequenceExecute as yi, UniverInstanceType as G, Rectangle as At, ColorKit as bi, BooleanNumber as He, Disposable as rt, OnLifecycle as ot, LifecycleStages as it, Inject as q, LocaleService as $e, useDependency as oe, createInterceptorKey as Si, createInternalEditorID as yn, Tools as bn, InterceptorManager as ia, Injector as Rt, toDisposable as Ci, Plugin as _i, DependentOn as wi } from "@univerjs/core";
5
+ import { ConditionalFormattingRuleModel as he, CFRuleType as j, CFSubRuleType as N, AddConditionalRuleMutation as De, CFNumberOperator as F, setConditionalRuleMutationUndoFactory as Bt, SetConditionalRuleMutation as nt, DeleteConditionalRuleMutationUndoFactory as It, DeleteConditionalRuleMutation as Ye, MoveConditionalRuleMutation as Ln, transformSupportSymmetryAnchor as sa, MoveConditionalRuleMutationUndoFactory as aa, getColorScaleFromValue as la, iconMap as bt, DEFAULT_BG_COLOR as ca, DEFAULT_FONT_COLOR as ua, AddConditionalRuleMutationUndoFactory as xi, CFValueType as A, createDefaultValueByValueType as cn, SHEET_CONDITIONAL_FORMATTING_PLUGIN as st, removeUndefinedAttr as da, createDefaultValue as Pr, CFTextOperator as X, CFTimePeriodOperator as Ge, iconGroup as fa, getOppositeOperator as Dr, compareWithNumber as ha, EMPTY_ICON_TYPE as pa, createDefaultRule as ft, DEFAULT_PADDING as ga, DEFAULT_WIDTH as ma, ConditionalFormattingService as Ri, ConditionalFormattingViewModel as Ar, isRangesEqual as va, UniverSheetsConditionalFormattingPlugin as Ii, getStringFromDataStream as ya } from "@univerjs/sheets-conditional-formatting";
7
6
  import { getSheetCommandTarget as Te, SheetsSelectionsService as Gt, findAllRectangle as kr, createTopMatrixFromMatrix as qr, SetWorksheetActiveOperation as Br, WorkbookEditablePermission as Ti, WorksheetSetCellStylePermission as Oi, WorksheetEditPermission as Ei, RangeProtectionPermissionEditPoint as Pi, SetSelectionsOperation as ba, RemoveSheetMutation as Sa, setEndForRange as Ca, INTERCEPTOR_POINT as _a, SheetInterceptorService as Di, RefRangeService as wa, handleDefaultRangeChangeWithEffectRefCommands as xa, ClearSelectionFormatCommand as Ra, ClearSelectionAllCommand as Ia, RangeMergeUtil as Ta } from "@univerjs/sheets";
8
7
  import { MenuItemType as Oa, MenuGroup as Ea, MenuPosition as Pa, getMenuHiddenObservable as Da, useObservable as $a, ComponentManager as Gr, TextEditor as Bn, ILayoutService as Ma, useScrollYOverContainer as Na, RangeSelector as ja, IMenuService as La, ISidebarService as za } from "@univerjs/ui";
9
8
  import { Observable as mt, merge as Mo, debounceTime as No } from "rxjs";
@@ -11,7 +10,6 @@ import { debounceTime as jo, bufferTime as pr, filter as gr } from "rxjs/operato
11
10
  import { getCurrentRangeDisable$ as Ha, useHighlightRange as Va, SheetSkeletonManagerService as Fa, COPY_TYPE as Lo, rangeToDiscreteRange as Wa, PREDEFINED_HOOK_NAME as mr, virtualizeDiscreteRanges as $i, getRepeatRange as Ua, ISheetClipboardService as Aa, SheetPermissionInterceptorBaseController as ka, IAutoFillService as qa, APPLY_TYPE as vr, getAutoFillRepeatRange as Ba, IEditorBridgeService as Ga } from "@univerjs/sheets-ui";
12
11
  import Fe, { forwardRef as Tt, useRef as pn, createElement as Xt, useMemo as be, useState as M, useEffect as ve } from "react";
13
12
  import { Select as Ve, Tooltip as zo, Dropdown as Xr, ColorPicker as Xa, InputNumber as St, RadioGroup as Ya, Radio as Ho, Checkbox as zn, Input as Ka, Button as Vo } from "@univerjs/design";
14
- import { useDependency as oe } from "@wendellhu/redi/react-bindings";
15
13
  import { serializeRange as Mi } from "@univerjs/engine-formula";
16
14
  import ct from "clsx";
17
15
  import Ni from "react-dom";
@@ -29,8 +27,8 @@ const ji = {
29
27
  cfId: f,
30
28
  stopIfTrue: !!o,
31
29
  rule: {
32
- type: L.highlightCell,
33
- subType: j.average,
30
+ type: j.highlightCell,
31
+ subType: N.average,
34
32
  operator: i,
35
33
  style: r
36
34
  }
@@ -50,7 +48,7 @@ const ji = {
50
48
  cfId: h,
51
49
  stopIfTrue: !!o,
52
50
  rule: {
53
- type: L.colorScale,
51
+ type: j.colorScale,
54
52
  config: r
55
53
  }
56
54
  };
@@ -64,12 +62,12 @@ const ji = {
64
62
  return !1;
65
63
  const { ranges: n, min: r, max: o, nativeColor: i, positiveColor: s, isGradient: l, stopIfTrue: a, isShowValue: c } = t, u = e.get(he), h = e.get(re), f = Te(h);
66
64
  if (!f) return !1;
67
- const { unitId: g, subUnitId: m } = f, S = e.get(ue), I = u.createCfId(g, m), v = {
65
+ const { unitId: g, subUnitId: m } = f, S = e.get(ue), I = u.createCfId(g, m), y = {
68
66
  ranges: n,
69
67
  cfId: I,
70
68
  stopIfTrue: !!a,
71
69
  rule: {
72
- type: L.dataBar,
70
+ type: j.dataBar,
73
71
  isShowValue: c,
74
72
  config: {
75
73
  min: r,
@@ -80,7 +78,7 @@ const ji = {
80
78
  }
81
79
  }
82
80
  };
83
- return S.executeCommand(De.id, { unitId: g, subUnitId: m, rule: v });
81
+ return S.executeCommand(De.id, { unitId: g, subUnitId: m, rule: y });
84
82
  }
85
83
  }, Hi = {
86
84
  type: Re.COMMAND,
@@ -95,8 +93,8 @@ const ji = {
95
93
  cfId: h,
96
94
  stopIfTrue: !!o,
97
95
  rule: {
98
- type: L.highlightCell,
99
- subType: j.duplicateValues,
96
+ type: j.highlightCell,
97
+ subType: N.duplicateValues,
100
98
  style: r
101
99
  }
102
100
  };
@@ -121,8 +119,8 @@ const ji = {
121
119
  cfId: g,
122
120
  stopIfTrue: !!o,
123
121
  rule: {
124
- type: L.highlightCell,
125
- subType: j.number,
122
+ type: j.highlightCell,
123
+ subType: N.number,
126
124
  operator: i,
127
125
  style: r,
128
126
  value: S
@@ -137,8 +135,8 @@ const ji = {
137
135
  cfId: g,
138
136
  stopIfTrue: !!o,
139
137
  rule: {
140
- type: L.highlightCell,
141
- subType: j.number,
138
+ type: j.highlightCell,
139
+ subType: N.number,
142
140
  operator: i,
143
141
  style: r,
144
142
  value: S
@@ -160,8 +158,8 @@ const ji = {
160
158
  cfId: m,
161
159
  stopIfTrue: !!o,
162
160
  rule: {
163
- type: L.highlightCell,
164
- subType: j.rank,
161
+ type: j.highlightCell,
162
+ subType: N.rank,
165
163
  isPercent: i,
166
164
  isBottom: s,
167
165
  style: r,
@@ -183,8 +181,8 @@ const ji = {
183
181
  cfId: g,
184
182
  stopIfTrue: !!o,
185
183
  rule: {
186
- type: L.highlightCell,
187
- subType: j.text,
184
+ type: j.highlightCell,
185
+ subType: N.text,
188
186
  operator: i,
189
187
  style: r,
190
188
  value: s
@@ -205,8 +203,8 @@ const ji = {
205
203
  cfId: f,
206
204
  stopIfTrue: !!o,
207
205
  rule: {
208
- type: L.highlightCell,
209
- subType: j.timePeriod,
206
+ type: j.highlightCell,
207
+ subType: N.timePeriod,
210
208
  operator: i,
211
209
  style: r
212
210
  }
@@ -226,8 +224,8 @@ const ji = {
226
224
  cfId: h,
227
225
  stopIfTrue: !!o,
228
226
  rule: {
229
- type: L.highlightCell,
230
- subType: j.uniqueValues,
227
+ type: j.highlightCell,
228
+ subType: N.uniqueValues,
231
229
  style: r
232
230
  }
233
231
  };
@@ -247,23 +245,23 @@ const ji = {
247
245
  return !1;
248
246
  const f = [], g = [];
249
247
  h.forEach((I) => {
250
- const v = new Vt();
248
+ const y = new Vt();
251
249
  I.ranges.forEach((C) => {
252
- ut.foreach(C, (w, p) => {
253
- v.setValue(w, p, 1);
250
+ ut.foreach(C, (x, p) => {
251
+ y.setValue(x, p, 1);
254
252
  });
255
253
  }), u.forEach((C) => {
256
- ut.foreach(C, (w, p) => {
257
- v.realDeleteValue(w, p);
254
+ ut.foreach(C, (x, p) => {
255
+ y.realDeleteValue(x, p);
258
256
  });
259
257
  });
260
- const _ = kr(qr(v));
261
- if (_.length) {
262
- const C = { ...I, ranges: _ }, w = { unitId: a, subUnitId: c, rule: C }, p = Bt(e, w);
263
- f.push({ id: nt.id, params: w }), g.push(...p);
258
+ const w = kr(qr(y));
259
+ if (w.length) {
260
+ const C = { ...I, ranges: w }, x = { unitId: a, subUnitId: c, rule: C }, p = Bt(e, x);
261
+ f.push({ id: nt.id, params: x }), g.push(...p);
264
262
  } else {
265
- const C = { unitId: a, subUnitId: c, cfId: I.cfId }, w = It(e, C);
266
- f.push({ id: Ye.id, params: C }), g.push(...w);
263
+ const C = { unitId: a, subUnitId: c, cfId: I.cfId }, x = It(e, C);
264
+ f.push({ id: Ye.id, params: C }), g.push(...x);
267
265
  }
268
266
  });
269
267
  const m = yi(f, o).result;
@@ -350,7 +348,7 @@ const Fo = [Br.id, De.id, nt.id, Ye.id, Ln.id], Ja = (e) => {
350
348
  if (!h) return;
351
349
  const f = h.getActiveSheet();
352
350
  if (!f) return;
353
- const m = (i.getSubunitRules(h.getUnitId(), f.getSheetId()) || []).filter((I) => I.ranges.some((v) => u.some((_) => At.intersects(_, v))));
351
+ const m = (i.getSubunitRules(h.getUnitId(), f.getSheetId()) || []).filter((I) => I.ranges.some((y) => u.some((w) => At.intersects(w, y))));
354
352
  c.next(!!m.length);
355
353
  })), l = new mt(
356
354
  (c) => Mo(
@@ -372,11 +370,11 @@ const Fo = [Br.id, De.id, nt.id, Ye.id, Ln.id], Ja = (e) => {
372
370
  if (!f.length)
373
371
  return c.next(!1), !1;
374
372
  const g = f.some((m) => m.ranges.some((I) => {
375
- var p, x;
376
- const { startRow: v, startColumn: _, endRow: C, endColumn: w } = I;
377
- for (let R = v; R <= C; R++)
378
- for (let y = _; y <= w; y++) {
379
- const E = (x = (p = h.getCell(R, y)) == null ? void 0 : p.selectionProtection) == null ? void 0 : x[0];
373
+ var p, R;
374
+ const { startRow: y, startColumn: w, endRow: C, endColumn: x } = I;
375
+ for (let _ = y; _ <= C; _++)
376
+ for (let b = w; b <= x; b++) {
377
+ const E = (R = (p = h.getCell(_, b)) == null ? void 0 : p.selectionProtection) == null ? void 0 : R[0];
380
378
  if ((E == null ? void 0 : E[gn.Edit]) === !1 || (E == null ? void 0 : E[gn.View]) === !1)
381
379
  return !0;
382
380
  }
@@ -592,7 +590,7 @@ var Yi = { exports: {} }, Cn = {}, $r = { exports: {} };
592
590
  function a(P, z) {
593
591
  return P === z || P !== P && z !== z;
594
592
  }
595
- var c = "[object Arguments]", u = "[object Boolean]", h = "[object Date]", f = "[object RegExp]", g = "[object Map]", m = "[object Number]", S = "[object Object]", I = "[object Set]", v = "[object String]", _ = Object.prototype.toString;
593
+ var c = "[object Arguments]", u = "[object Boolean]", h = "[object Date]", f = "[object RegExp]", g = "[object Map]", m = "[object Number]", S = "[object Object]", I = "[object Set]", y = "[object String]", w = Object.prototype.toString;
596
594
  function C(P) {
597
595
  var z = P.areArraysEqual, K = P.areDatesEqual, Z = P.areMapsEqual, Y = P.areObjectsEqual, se = P.areRegExpsEqual, ce = P.areSetsEqual, _e = P.createIsNestedEqual, te = _e(ke);
598
596
  function ke(ae, fe, qe) {
@@ -605,12 +603,12 @@ var Yi = { exports: {} }, Cn = {}, $r = { exports: {} };
605
603
  var Do = Array.isArray(ae), $o = Array.isArray(fe);
606
604
  if (Do || $o)
607
605
  return Do === $o && z(ae, fe, te, qe);
608
- var Be = _.call(ae);
609
- return Be !== _.call(fe) ? !1 : Be === h ? K(ae, fe, te, qe) : Be === f ? se(ae, fe, te, qe) : Be === g ? Z(ae, fe, te, qe) : Be === I ? ce(ae, fe, te, qe) : Be === S || Be === c ? l(ae) || l(fe) ? !1 : Y(ae, fe, te, qe) : Be === u || Be === m || Be === v ? a(ae.valueOf(), fe.valueOf()) : !1;
606
+ var Be = w.call(ae);
607
+ return Be !== w.call(fe) ? !1 : Be === h ? K(ae, fe, te, qe) : Be === f ? se(ae, fe, te, qe) : Be === g ? Z(ae, fe, te, qe) : Be === I ? ce(ae, fe, te, qe) : Be === S || Be === c ? l(ae) || l(fe) ? !1 : Y(ae, fe, te, qe) : Be === u || Be === m || Be === y ? a(ae.valueOf(), fe.valueOf()) : !1;
610
608
  }
611
609
  return ke;
612
610
  }
613
- function w(P, z, K, Z) {
611
+ function x(P, z, K, Z) {
614
612
  var Y = P.length;
615
613
  if (z.length !== Y)
616
614
  return !1;
@@ -619,11 +617,11 @@ var Yi = { exports: {} }, Cn = {}, $r = { exports: {} };
619
617
  return !1;
620
618
  return !0;
621
619
  }
622
- var p = o(w);
623
- function x(P, z) {
620
+ var p = o(x);
621
+ function R(P, z) {
624
622
  return a(P.valueOf(), z.valueOf());
625
623
  }
626
- function R(P, z, K, Z) {
624
+ function _(P, z, K, Z) {
627
625
  var Y = P.size === z.size;
628
626
  if (!Y)
629
627
  return !1;
@@ -639,8 +637,8 @@ var Yi = { exports: {} }, Cn = {}, $r = { exports: {} };
639
637
  }
640
638
  }), Y;
641
639
  }
642
- var y = o(R), E = "_owner", $ = Object.prototype.hasOwnProperty;
643
- function N(P, z, K, Z) {
640
+ var b = o(_), E = "_owner", D = Object.prototype.hasOwnProperty;
641
+ function L(P, z, K, Z) {
644
642
  var Y = Object.keys(P), se = Y.length;
645
643
  if (Object.keys(z).length !== se)
646
644
  return !1;
@@ -650,13 +648,13 @@ var Yi = { exports: {} }, Cn = {}, $r = { exports: {} };
650
648
  if ((_e || te) && _e !== te)
651
649
  return !1;
652
650
  }
653
- if (!$.call(z, ce) || !K(P[ce], z[ce], ce, ce, P, z, Z))
651
+ if (!D.call(z, ce) || !K(P[ce], z[ce], ce, ce, P, z, Z))
654
652
  return !1;
655
653
  }
656
654
  return !0;
657
655
  }
658
- var W = o(N);
659
- function b(P, z) {
656
+ var W = o(L);
657
+ function v(P, z) {
660
658
  return P.source === z.source && P.flags === z.flags;
661
659
  }
662
660
  function T(P, z, K, Z) {
@@ -676,19 +674,19 @@ var Yi = { exports: {} }, Cn = {}, $r = { exports: {} };
676
674
  }), Y;
677
675
  }
678
676
  var ee = o(T), Oe = Object.freeze({
679
- areArraysEqual: w,
680
- areDatesEqual: x,
681
- areMapsEqual: R,
682
- areObjectsEqual: N,
683
- areRegExpsEqual: b,
677
+ areArraysEqual: x,
678
+ areDatesEqual: R,
679
+ areMapsEqual: _,
680
+ areObjectsEqual: L,
681
+ areRegExpsEqual: v,
684
682
  areSetsEqual: T,
685
683
  createIsNestedEqual: r
686
684
  }), Se = Object.freeze({
687
685
  areArraysEqual: p,
688
- areDatesEqual: x,
689
- areMapsEqual: y,
686
+ areDatesEqual: R,
687
+ areMapsEqual: b,
690
688
  areObjectsEqual: W,
691
- areRegExpsEqual: b,
689
+ areRegExpsEqual: v,
692
690
  areSetsEqual: ee,
693
691
  createIsNestedEqual: r
694
692
  }), Ce = C(Oe);
@@ -894,8 +892,8 @@ function an(e, t, n, r, o, i, s, l, a) {
894
892
  if (m && i)
895
893
  return `${t.i}`, t.x = c, t.y = u, t.moved = !1, e;
896
894
  for (let S = 0, I = g.length; S < I; S++) {
897
- const v = g[S];
898
- `${t.i}${t.x}${t.y}${v.i}${v.x}${v.y}`, !v.moved && (v.static ? e = Nr(e, v, t, o, s) : e = Nr(e, t, v, o, s));
895
+ const y = g[S];
896
+ `${t.i}${t.x}${t.y}${y.i}${y.x}${y.y}`, !y.moved && (y.static ? e = Nr(e, y, t, o, s) : e = Nr(e, t, y, o, s));
899
897
  }
900
898
  return e;
901
899
  }
@@ -1828,71 +1826,71 @@ Ie(nr, "defaultProps", {
1828
1826
  }
1829
1827
  }), e.default = void 0;
1830
1828
  var t = f(Fe), n = u(dt), r = u(Ni), o = u(ct), i = de, s = Je, l = Ze, a = u(er), c = u(tr);
1831
- function u(_) {
1832
- return _ && _.__esModule ? _ : { default: _ };
1829
+ function u(w) {
1830
+ return w && w.__esModule ? w : { default: w };
1833
1831
  }
1834
- function h(_) {
1832
+ function h(w) {
1835
1833
  if (typeof WeakMap != "function") return null;
1836
- var C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
1834
+ var C = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
1837
1835
  return (h = function(p) {
1838
- return p ? w : C;
1839
- })(_);
1840
- }
1841
- function f(_, C) {
1842
- if (_ && _.__esModule)
1843
- return _;
1844
- if (_ === null || typeof _ != "object" && typeof _ != "function")
1845
- return { default: _ };
1846
- var w = h(C);
1847
- if (w && w.has(_))
1848
- return w.get(_);
1849
- var p = {}, x = Object.defineProperty && Object.getOwnPropertyDescriptor;
1850
- for (var R in _)
1851
- if (R !== "default" && Object.prototype.hasOwnProperty.call(_, R)) {
1852
- var y = x ? Object.getOwnPropertyDescriptor(_, R) : null;
1853
- y && (y.get || y.set) ? Object.defineProperty(p, R, y) : p[R] = _[R];
1836
+ return p ? x : C;
1837
+ })(w);
1838
+ }
1839
+ function f(w, C) {
1840
+ if (w && w.__esModule)
1841
+ return w;
1842
+ if (w === null || typeof w != "object" && typeof w != "function")
1843
+ return { default: w };
1844
+ var x = h(C);
1845
+ if (x && x.has(w))
1846
+ return x.get(w);
1847
+ var p = {}, R = Object.defineProperty && Object.getOwnPropertyDescriptor;
1848
+ for (var _ in w)
1849
+ if (_ !== "default" && Object.prototype.hasOwnProperty.call(w, _)) {
1850
+ var b = R ? Object.getOwnPropertyDescriptor(w, _) : null;
1851
+ b && (b.get || b.set) ? Object.defineProperty(p, _, b) : p[_] = w[_];
1854
1852
  }
1855
- return p.default = _, w && w.set(_, p), p;
1853
+ return p.default = w, x && x.set(w, p), p;
1856
1854
  }
1857
1855
  function g() {
1858
- return g = Object.assign ? Object.assign.bind() : function(_) {
1856
+ return g = Object.assign ? Object.assign.bind() : function(w) {
1859
1857
  for (var C = 1; C < arguments.length; C++) {
1860
- var w = arguments[C];
1861
- for (var p in w)
1862
- Object.prototype.hasOwnProperty.call(w, p) && (_[p] = w[p]);
1858
+ var x = arguments[C];
1859
+ for (var p in x)
1860
+ Object.prototype.hasOwnProperty.call(x, p) && (w[p] = x[p]);
1863
1861
  }
1864
- return _;
1862
+ return w;
1865
1863
  }, g.apply(this, arguments);
1866
1864
  }
1867
- function m(_, C, w) {
1868
- return C = S(C), C in _ ? Object.defineProperty(_, C, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : _[C] = w, _;
1865
+ function m(w, C, x) {
1866
+ return C = S(C), C in w ? Object.defineProperty(w, C, { value: x, enumerable: !0, configurable: !0, writable: !0 }) : w[C] = x, w;
1869
1867
  }
1870
- function S(_) {
1871
- var C = I(_, "string");
1868
+ function S(w) {
1869
+ var C = I(w, "string");
1872
1870
  return typeof C == "symbol" ? C : String(C);
1873
1871
  }
1874
- function I(_, C) {
1875
- if (typeof _ != "object" || _ === null) return _;
1876
- var w = _[Symbol.toPrimitive];
1877
- if (w !== void 0) {
1878
- var p = w.call(_, C || "default");
1872
+ function I(w, C) {
1873
+ if (typeof w != "object" || w === null) return w;
1874
+ var x = w[Symbol.toPrimitive];
1875
+ if (x !== void 0) {
1876
+ var p = x.call(w, C || "default");
1879
1877
  if (typeof p != "object") return p;
1880
1878
  throw new TypeError("@@toPrimitive must return a primitive value.");
1881
1879
  }
1882
- return (C === "string" ? String : Number)(_);
1880
+ return (C === "string" ? String : Number)(w);
1883
1881
  }
1884
- class v extends t.Component {
1882
+ class y extends t.Component {
1885
1883
  // React 16.3+
1886
1884
  // Arity (props, state)
1887
- static getDerivedStateFromProps(C, w) {
1885
+ static getDerivedStateFromProps(C, x) {
1888
1886
  let {
1889
1887
  position: p
1890
1888
  } = C, {
1891
- prevPropsPosition: x
1892
- } = w;
1893
- return p && (!x || p.x !== x.x || p.y !== x.y) ? ((0, c.default)("Draggable: getDerivedStateFromProps %j", {
1889
+ prevPropsPosition: R
1890
+ } = x;
1891
+ return p && (!R || p.x !== R.x || p.y !== R.y) ? ((0, c.default)("Draggable: getDerivedStateFromProps %j", {
1894
1892
  position: p,
1895
- prevPropsPosition: x
1893
+ prevPropsPosition: R
1896
1894
  }), {
1897
1895
  x: p.x,
1898
1896
  y: p.y,
@@ -1902,36 +1900,36 @@ Ie(nr, "defaultProps", {
1902
1900
  }) : null;
1903
1901
  }
1904
1902
  constructor(C) {
1905
- super(C), m(this, "onDragStart", (w, p) => {
1906
- if ((0, c.default)("Draggable: onDragStart: %j", p), this.props.onStart(w, (0, s.createDraggableData)(this, p)) === !1) return !1;
1903
+ super(C), m(this, "onDragStart", (x, p) => {
1904
+ if ((0, c.default)("Draggable: onDragStart: %j", p), this.props.onStart(x, (0, s.createDraggableData)(this, p)) === !1) return !1;
1907
1905
  this.setState({
1908
1906
  dragging: !0,
1909
1907
  dragged: !0
1910
1908
  });
1911
- }), m(this, "onDrag", (w, p) => {
1909
+ }), m(this, "onDrag", (x, p) => {
1912
1910
  if (!this.state.dragging) return !1;
1913
1911
  (0, c.default)("Draggable: onDrag: %j", p);
1914
- const x = (0, s.createDraggableData)(this, p), R = {
1915
- x: x.x,
1916
- y: x.y,
1912
+ const R = (0, s.createDraggableData)(this, p), _ = {
1913
+ x: R.x,
1914
+ y: R.y,
1917
1915
  slackX: 0,
1918
1916
  slackY: 0
1919
1917
  };
1920
1918
  if (this.props.bounds) {
1921
1919
  const {
1922
1920
  x: E,
1923
- y: $
1924
- } = R;
1925
- R.x += this.state.slackX, R.y += this.state.slackY;
1926
- const [N, W] = (0, s.getBoundPosition)(this, R.x, R.y);
1927
- R.x = N, R.y = W, R.slackX = this.state.slackX + (E - R.x), R.slackY = this.state.slackY + ($ - R.y), x.x = R.x, x.y = R.y, x.deltaX = R.x - this.state.x, x.deltaY = R.y - this.state.y;
1921
+ y: D
1922
+ } = _;
1923
+ _.x += this.state.slackX, _.y += this.state.slackY;
1924
+ const [L, W] = (0, s.getBoundPosition)(this, _.x, _.y);
1925
+ _.x = L, _.y = W, _.slackX = this.state.slackX + (E - _.x), _.slackY = this.state.slackY + (D - _.y), R.x = _.x, R.y = _.y, R.deltaX = _.x - this.state.x, R.deltaY = _.y - this.state.y;
1928
1926
  }
1929
- if (this.props.onDrag(w, x) === !1) return !1;
1930
- this.setState(R);
1931
- }), m(this, "onDragStop", (w, p) => {
1932
- if (!this.state.dragging || this.props.onStop(w, (0, s.createDraggableData)(this, p)) === !1) return !1;
1927
+ if (this.props.onDrag(x, R) === !1) return !1;
1928
+ this.setState(_);
1929
+ }), m(this, "onDragStop", (x, p) => {
1930
+ if (!this.state.dragging || this.props.onStop(x, (0, s.createDraggableData)(this, p)) === !1) return !1;
1933
1931
  (0, c.default)("Draggable: onDragStop: %j", p);
1934
- const R = {
1932
+ const _ = {
1935
1933
  dragging: !1,
1936
1934
  slackX: 0,
1937
1935
  slackY: 0
@@ -1939,11 +1937,11 @@ Ie(nr, "defaultProps", {
1939
1937
  if (!!this.props.position) {
1940
1938
  const {
1941
1939
  x: E,
1942
- y: $
1940
+ y: D
1943
1941
  } = this.props.position;
1944
- R.x = E, R.y = $;
1942
+ _.x = E, _.y = D;
1945
1943
  }
1946
- this.setState(R);
1944
+ this.setState(_);
1947
1945
  }), this.state = {
1948
1946
  // Whether or not we are currently dragging.
1949
1947
  dragging: !1,
@@ -1975,36 +1973,36 @@ Ie(nr, "defaultProps", {
1975
1973
  // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
1976
1974
  // the underlying DOM node ourselves. See the README for more information.
1977
1975
  findDOMNode() {
1978
- var C, w;
1979
- return (C = (w = this.props) === null || w === void 0 || (w = w.nodeRef) === null || w === void 0 ? void 0 : w.current) !== null && C !== void 0 ? C : r.default.findDOMNode(this);
1976
+ var C, x;
1977
+ return (C = (x = this.props) === null || x === void 0 || (x = x.nodeRef) === null || x === void 0 ? void 0 : x.current) !== null && C !== void 0 ? C : r.default.findDOMNode(this);
1980
1978
  }
1981
1979
  render() {
1982
1980
  const {
1983
1981
  axis: C,
1984
- bounds: w,
1982
+ bounds: x,
1985
1983
  children: p,
1986
- defaultPosition: x,
1987
- defaultClassName: R,
1988
- defaultClassNameDragging: y,
1984
+ defaultPosition: R,
1985
+ defaultClassName: _,
1986
+ defaultClassNameDragging: b,
1989
1987
  defaultClassNameDragged: E,
1990
- position: $,
1991
- positionOffset: N,
1988
+ position: D,
1989
+ positionOffset: L,
1992
1990
  scale: W,
1993
- ...b
1991
+ ...v
1994
1992
  } = this.props;
1995
1993
  let T = {}, ee = null;
1996
- const Se = !!!$ || this.state.dragging, Ce = $ || x, We = {
1994
+ const Se = !!!D || this.state.dragging, Ce = D || R, We = {
1997
1995
  // Set left if horizontal drag is enabled
1998
1996
  x: (0, s.canDragX)(this) && Se ? this.state.x : Ce.x,
1999
1997
  // Set top if vertical drag is enabled
2000
1998
  y: (0, s.canDragY)(this) && Se ? this.state.y : Ce.y
2001
1999
  };
2002
- this.state.isElementSVG ? ee = (0, i.createSVGTransform)(We, N) : T = (0, i.createCSSTransform)(We, N);
2003
- const H = (0, o.default)(p.props.className || "", R, {
2004
- [y]: this.state.dragging,
2000
+ this.state.isElementSVG ? ee = (0, i.createSVGTransform)(We, L) : T = (0, i.createCSSTransform)(We, L);
2001
+ const H = (0, o.default)(p.props.className || "", _, {
2002
+ [b]: this.state.dragging,
2005
2003
  [E]: this.state.dragged
2006
2004
  });
2007
- return /* @__PURE__ */ t.createElement(a.default, g({}, b, {
2005
+ return /* @__PURE__ */ t.createElement(a.default, g({}, v, {
2008
2006
  onStart: this.onDragStart,
2009
2007
  onDrag: this.onDrag,
2010
2008
  onStop: this.onDragStop
@@ -2018,7 +2016,7 @@ Ie(nr, "defaultProps", {
2018
2016
  }));
2019
2017
  }
2020
2018
  }
2021
- e.default = v, m(v, "displayName", "Draggable"), m(v, "propTypes", {
2019
+ e.default = y, m(y, "displayName", "Draggable"), m(y, "propTypes", {
2022
2020
  // Accepts all props <DraggableCore> accepts.
2023
2021
  ...a.default.propTypes,
2024
2022
  /**
@@ -2125,7 +2123,7 @@ Ie(nr, "defaultProps", {
2125
2123
  className: l.dontSetMe,
2126
2124
  style: l.dontSetMe,
2127
2125
  transform: l.dontSetMe
2128
- }), m(v, "defaultProps", {
2126
+ }), m(y, "defaultProps", {
2129
2127
  ...a.default.defaultProps,
2130
2128
  axis: "both",
2131
2129
  bounds: !1,
@@ -2415,8 +2413,8 @@ var fo = /* @__PURE__ */ function(e) {
2415
2413
  var u = this.props.width / this.props.height, h = o - this.props.width, f = i - this.props.height;
2416
2414
  Math.abs(h) > Math.abs(f * u) ? i = o / u : o = i * u;
2417
2415
  }
2418
- var g = o, m = i, S = this.slack || [0, 0], I = S[0], v = S[1];
2419
- return o += I, i += v, l && (o = Math.max(l[0], o), i = Math.max(l[1], i)), a && (o = Math.min(a[0], o), i = Math.min(a[1], i)), this.slack = [I + (g - o), v + (m - i)], [o, i];
2416
+ var g = o, m = i, S = this.slack || [0, 0], I = S[0], y = S[1];
2417
+ return o += I, i += y, l && (o = Math.max(l[0], o), i = Math.max(l[1], i)), a && (o = Math.min(a[0], o), i = Math.min(a[1], i)), this.slack = [I + (g - o), y + (m - i)], [o, i];
2420
2418
  }, n.resizeHandler = function(o, i) {
2421
2419
  var s = this;
2422
2420
  return function(l, a) {
@@ -2427,23 +2425,23 @@ var fo = /* @__PURE__ */ function(e) {
2427
2425
  var m = i[0], S = i[i.length - 1], I = c.getBoundingClientRect();
2428
2426
  if (s.lastHandleRect != null) {
2429
2427
  if (S === "w") {
2430
- var v = I.left - s.lastHandleRect.left;
2431
- u += v;
2428
+ var y = I.left - s.lastHandleRect.left;
2429
+ u += y;
2432
2430
  }
2433
2431
  if (m === "n") {
2434
- var _ = I.top - s.lastHandleRect.top;
2435
- h += _;
2432
+ var w = I.top - s.lastHandleRect.top;
2433
+ h += w;
2436
2434
  }
2437
2435
  }
2438
2436
  s.lastHandleRect = I, S === "w" && (u = -u), m === "n" && (h = -h);
2439
- var C = s.props.width + (f ? u / s.props.transformScale : 0), w = s.props.height + (g ? h / s.props.transformScale : 0), p = s.runConstraints(C, w);
2440
- C = p[0], w = p[1];
2441
- var x = C !== s.props.width || w !== s.props.height, R = typeof s.props[o] == "function" ? s.props[o] : null, y = o === "onResize" && !x;
2442
- R && !y && (l.persist == null || l.persist(), R(l, {
2437
+ var C = s.props.width + (f ? u / s.props.transformScale : 0), x = s.props.height + (g ? h / s.props.transformScale : 0), p = s.runConstraints(C, x);
2438
+ C = p[0], x = p[1];
2439
+ var R = C !== s.props.width || x !== s.props.height, _ = typeof s.props[o] == "function" ? s.props[o] : null, b = o === "onResize" && !R;
2440
+ _ && !b && (l.persist == null || l.persist(), _(l, {
2443
2441
  node: c,
2444
2442
  size: {
2445
2443
  width: C,
2446
- height: w
2444
+ height: x
2447
2445
  },
2448
2446
  handle: i
2449
2447
  })), o === "onResizeStop" && s.resetData();
@@ -2620,7 +2618,7 @@ var ws = /* @__PURE__ */ function(e) {
2620
2618
  o.onResize;
2621
2619
  var l = o.onResizeStart, a = o.onResizeStop, c = o.draggableOpts, u = o.minConstraints, h = o.maxConstraints, f = o.lockAspectRatio, g = o.axis;
2622
2620
  o.width, o.height;
2623
- var m = o.resizeHandles, S = o.style, I = o.transformScale, v = fu(o, au);
2621
+ var m = o.resizeHandles, S = o.style, I = o.transformScale, y = fu(o, au);
2624
2622
  return /* @__PURE__ */ _r.createElement(iu.default, {
2625
2623
  axis: g,
2626
2624
  draggableOpts: c,
@@ -2636,7 +2634,7 @@ var ws = /* @__PURE__ */ function(e) {
2636
2634
  resizeHandles: m,
2637
2635
  transformScale: I,
2638
2636
  width: this.state.width
2639
- }, /* @__PURE__ */ _r.createElement("div", Hr({}, v, {
2637
+ }, /* @__PURE__ */ _r.createElement("div", Hr({}, y, {
2640
2638
  style: Hn(Hn({}, S), {}, {
2641
2639
  width: this.state.width + "px",
2642
2640
  height: this.state.height + "px"
@@ -2855,13 +2853,13 @@ class po extends $t.default.Component {
2855
2853
  } = r;
2856
2854
  if (C) {
2857
2855
  const {
2858
- margin: w,
2856
+ margin: x,
2859
2857
  rowHeight: p,
2860
- containerPadding: x
2861
- } = this.props, R = C.clientHeight - (0, ye.calcGridItemWHPx)(f, p, w[1]);
2862
- l = (0, ye.clamp)(l - x[1], 0, R);
2863
- const y = (0, ye.calcGridColWidth)(m), E = g - (0, ye.calcGridItemWHPx)(h, y, w[0]);
2864
- a = (0, ye.clamp)(a - x[0], 0, E);
2858
+ containerPadding: R
2859
+ } = this.props, _ = C.clientHeight - (0, ye.calcGridItemWHPx)(f, p, x[1]);
2860
+ l = (0, ye.clamp)(l - R[1], 0, _);
2861
+ const b = (0, ye.calcGridColWidth)(m), E = g - (0, ye.calcGridItemWHPx)(h, b, x[0]);
2862
+ a = (0, ye.clamp)(a - R[0], 0, E);
2865
2863
  }
2866
2864
  }
2867
2865
  const S = {
@@ -2874,10 +2872,10 @@ class po extends $t.default.Component {
2874
2872
  const {
2875
2873
  containerPadding: I
2876
2874
  } = this.props, {
2877
- x: v,
2878
- y: _
2875
+ x: y,
2876
+ y: w
2879
2877
  } = (0, ye.calcXY)(m, l - I[1], a - I[0], h, f);
2880
- return s.call(this, u, v, _, {
2878
+ return s.call(this, u, y, w, {
2881
2879
  e: t,
2882
2880
  node: r,
2883
2881
  newPosition: S
@@ -3032,7 +3030,7 @@ class po extends $t.default.Component {
3032
3030
  transformScale: c,
3033
3031
  resizeHandles: u,
3034
3032
  resizeHandle: h
3035
- } = this.props, f = this.getPositionParams(), g = (0, ye.calcGridItemPosition)(f, 0, 0, o, 0).width, m = (0, ye.calcGridItemPosition)(f, 0, 0, i, s), S = (0, ye.calcGridItemPosition)(f, 0, 0, l, a), I = [m.width, m.height], v = [Math.min(S.width, g), Math.min(S.height, 1 / 0)];
3033
+ } = this.props, f = this.getPositionParams(), g = (0, ye.calcGridItemPosition)(f, 0, 0, o, 0).width, m = (0, ye.calcGridItemPosition)(f, 0, 0, i, s), S = (0, ye.calcGridItemPosition)(f, 0, 0, l, a), I = [m.width, m.height], y = [Math.min(S.width, g), Math.min(S.height, 1 / 0)];
3036
3034
  return /* @__PURE__ */ $t.default.createElement(
3037
3035
  bu.Resizable,
3038
3036
  {
@@ -3043,7 +3041,7 @@ class po extends $t.default.Component {
3043
3041
  width: n.width,
3044
3042
  height: n.height,
3045
3043
  minConstraints: I,
3046
- maxConstraints: v,
3044
+ maxConstraints: y,
3047
3045
  onResizeStop: this.curryResizeHandler(n, this.onResizeStop),
3048
3046
  onResizeStart: this.curryResizeHandler(n, this.onResizeStart),
3049
3047
  onResize: this.curryResizeHandler(n, this.onResize),
@@ -3076,18 +3074,18 @@ class po extends $t.default.Component {
3076
3074
  minW: S,
3077
3075
  maxW: I
3078
3076
  } = this.props;
3079
- let v = s;
3080
- i && (v = (0, Mt.resizeItemInDirection)(l, r, s, m), this.setState({
3081
- resizing: o === "onResizeStop" ? null : v
3077
+ let y = s;
3078
+ i && (y = (0, Mt.resizeItemInDirection)(l, r, s, m), this.setState({
3079
+ resizing: o === "onResizeStop" ? null : y
3082
3080
  }));
3083
3081
  let {
3084
- w: _,
3082
+ w,
3085
3083
  h: C
3086
- } = (0, ye.calcWH)(this.getPositionParams(), v.width, v.height, c, u, l);
3087
- _ = (0, ye.clamp)(_, Math.max(S, 1), I), C = (0, ye.clamp)(C, g, f), a.call(this, h, _, C, {
3084
+ } = (0, ye.calcWH)(this.getPositionParams(), y.width, y.height, c, u, l);
3085
+ w = (0, ye.clamp)(w, Math.max(S, 1), I), C = (0, ye.clamp)(C, g, f), a.call(this, h, w, C, {
3088
3086
  e: t,
3089
3087
  node: i,
3090
- size: v,
3088
+ size: y,
3091
3089
  handle: l
3092
3090
  });
3093
3091
  }
@@ -3381,20 +3379,20 @@ class ir extends ht.Component {
3381
3379
  preventCollision: f,
3382
3380
  allowOverlap: g
3383
3381
  } = this.props;
3384
- let m = !1, S, I, v;
3385
- const [_, C] = (0, V.withLayoutItem)(u, t, (p) => {
3386
- let x;
3387
- return I = p.x, v = p.y, ["sw", "w", "nw", "n", "ne"].indexOf(a) !== -1 && (["sw", "nw", "w"].indexOf(a) !== -1 && (I = p.x + (p.w - n), n = p.x !== I && I < 0 ? p.w : n, I = I < 0 ? 0 : I), ["ne", "n", "nw"].indexOf(a) !== -1 && (v = p.y + (p.h - r), r = p.y !== v && v < 0 ? p.h : r, v = v < 0 ? 0 : v), m = !0), f && !g && (x = (0, V.getAllCollisions)(u, {
3382
+ let m = !1, S, I, y;
3383
+ const [w, C] = (0, V.withLayoutItem)(u, t, (p) => {
3384
+ let R;
3385
+ return I = p.x, y = p.y, ["sw", "w", "nw", "n", "ne"].indexOf(a) !== -1 && (["sw", "nw", "w"].indexOf(a) !== -1 && (I = p.x + (p.w - n), n = p.x !== I && I < 0 ? p.w : n, I = I < 0 ? 0 : I), ["ne", "n", "nw"].indexOf(a) !== -1 && (y = p.y + (p.h - r), r = p.y !== y && y < 0 ? p.h : r, y = y < 0 ? 0 : y), m = !0), f && !g && (R = (0, V.getAllCollisions)(u, {
3388
3386
  ...p,
3389
3387
  w: n,
3390
3388
  h: r,
3391
3389
  x: I,
3392
- y: v
3393
- }).filter((y) => y.i !== p.i).length > 0, x && (v = p.y, r = p.h, I = p.x, n = p.w, m = !1)), p.w = n, p.h = r, p;
3390
+ y
3391
+ }).filter((b) => b.i !== p.i).length > 0, R && (y = p.y, r = p.h, I = p.x, n = p.w, m = !1)), p.w = n, p.h = r, p;
3394
3392
  });
3395
3393
  if (!C) return;
3396
- S = _, m && (S = (0, V.moveElement)(_, C, I, v, !0, this.props.preventCollision, (0, V.compactType)(this.props), h, g));
3397
- const w = {
3394
+ S = w, m && (S = (0, V.moveElement)(w, C, I, y, !0, this.props.preventCollision, (0, V.compactType)(this.props), h, g));
3395
+ const x = {
3398
3396
  w: C.w,
3399
3397
  h: C.h,
3400
3398
  x: C.x,
@@ -3402,9 +3400,9 @@ class ir extends ht.Component {
3402
3400
  static: !0,
3403
3401
  i: t
3404
3402
  };
3405
- this.props.onResize(S, c, C, w, i, s), this.setState({
3403
+ this.props.onResize(S, c, C, x, i, s), this.setState({
3406
3404
  layout: g ? S : (0, V.compact)(S, (0, V.compactType)(this.props), h),
3407
- activeDrag: w
3405
+ activeDrag: x
3408
3406
  });
3409
3407
  }), xe(this, "onResizeStop", (t, n, r, o) => {
3410
3408
  let {
@@ -3430,9 +3428,9 @@ class ir extends ht.Component {
3430
3428
  resizing: !1
3431
3429
  }), this.onLayoutMaybeChanged(f, g);
3432
3430
  }), xe(this, "onDragOver", (t) => {
3433
- var _;
3431
+ var w;
3434
3432
  if (t.preventDefault(), t.stopPropagation(), Is && // $FlowIgnore can't figure this out
3435
- !((_ = t.nativeEvent.target) != null && _.classList.contains(Yo)))
3433
+ !((w = t.nativeEvent.target) != null && w.classList.contains(Yo)))
3436
3434
  return !1;
3437
3435
  const {
3438
3436
  droppingItem: n,
@@ -3452,7 +3450,7 @@ class ir extends ht.Component {
3452
3450
  ...h
3453
3451
  }, {
3454
3452
  layout: g
3455
- } = this.state, m = t.currentTarget.getBoundingClientRect(), S = t.clientX - m.left, I = t.clientY - m.top, v = {
3453
+ } = this.state, m = t.currentTarget.getBoundingClientRect(), S = t.clientX - m.left, I = t.clientY - m.top, y = {
3456
3454
  left: S / u,
3457
3455
  top: I / u,
3458
3456
  e: t
@@ -3461,10 +3459,10 @@ class ir extends ht.Component {
3461
3459
  if (this.state.droppingPosition) {
3462
3460
  const {
3463
3461
  left: C,
3464
- top: w
3462
+ top: x
3465
3463
  } = this.state.droppingPosition;
3466
- (C != S || w != I) && this.setState({
3467
- droppingPosition: v
3464
+ (C != S || x != I) && this.setState({
3465
+ droppingPosition: y
3468
3466
  });
3469
3467
  }
3470
3468
  } else {
@@ -3475,16 +3473,16 @@ class ir extends ht.Component {
3475
3473
  rowHeight: s,
3476
3474
  containerWidth: a,
3477
3475
  containerPadding: c || o
3478
- }, w = (0, xu.calcXY)(C, I, S, f.w, f.h);
3476
+ }, x = (0, xu.calcXY)(C, I, S, f.w, f.h);
3479
3477
  this.setState({
3480
3478
  droppingDOMNode: /* @__PURE__ */ ht.createElement("div", {
3481
3479
  key: f.i
3482
3480
  }),
3483
- droppingPosition: v,
3481
+ droppingPosition: y,
3484
3482
  layout: [...g, {
3485
3483
  ...f,
3486
- x: w.x,
3487
- y: w.y,
3484
+ x: x.x,
3485
+ y: x.y,
3488
3486
  static: !1,
3489
3487
  isDraggable: !0
3490
3488
  }]
@@ -3621,12 +3619,12 @@ class ir extends ht.Component {
3621
3619
  transformScale: m,
3622
3620
  draggableCancel: S,
3623
3621
  draggableHandle: I,
3624
- resizeHandles: v,
3625
- resizeHandle: _
3622
+ resizeHandles: y,
3623
+ resizeHandle: w
3626
3624
  } = this.props, {
3627
3625
  mounted: C,
3628
- droppingPosition: w
3629
- } = this.state, p = typeof r.isDraggable == "boolean" ? r.isDraggable : !r.static && u, x = typeof r.isResizable == "boolean" ? r.isResizable : !r.static && h, R = r.resizeHandles || v, y = p && f && r.isBounded !== !1;
3626
+ droppingPosition: x
3627
+ } = this.state, p = typeof r.isDraggable == "boolean" ? r.isDraggable : !r.static && u, R = typeof r.isResizable == "boolean" ? r.isResizable : !r.static && h, _ = r.resizeHandles || y, b = p && f && r.isBounded !== !1;
3630
3628
  return /* @__PURE__ */ ht.createElement(Xo.default, {
3631
3629
  containerWidth: o,
3632
3630
  cols: i,
@@ -3643,8 +3641,8 @@ class ir extends ht.Component {
3643
3641
  onResize: this.onResize,
3644
3642
  onResizeStop: this.onResizeStop,
3645
3643
  isDraggable: p,
3646
- isResizable: x,
3647
- isBounded: y,
3644
+ isResizable: R,
3645
+ isBounded: b,
3648
3646
  useCSSTransforms: g && C,
3649
3647
  usePercentages: !C,
3650
3648
  transformScale: m,
@@ -3658,9 +3656,9 @@ class ir extends ht.Component {
3658
3656
  maxH: r.maxH,
3659
3657
  maxW: r.maxW,
3660
3658
  static: r.static,
3661
- droppingPosition: n ? w : void 0,
3662
- resizeHandles: R,
3663
- resizeHandle: _
3659
+ droppingPosition: n ? x : void 0,
3660
+ resizeHandles: _,
3661
+ resizeHandle: w
3664
3662
  }, t);
3665
3663
  }
3666
3664
  render() {
@@ -4423,39 +4421,39 @@ const dd = /* @__PURE__ */ Kr(ud), Un = {
4423
4421
  if (!t)
4424
4422
  return null;
4425
4423
  const n = be(() => {
4426
- if (t.type === L.colorScale) {
4424
+ if (t.type === j.colorScale) {
4427
4425
  const s = t.config.map((c, u) => ({ color: new bi(c.color), value: u })), l = s.length - 1;
4428
4426
  return new Array(5).fill("").map((c, u, h) => u * l / (h.length - 1)).map((c) => la(s, c));
4429
4427
  }
4430
4428
  return null;
4431
4429
  }, [t]), r = be(() => {
4432
- if (t.type === L.iconSet)
4430
+ if (t.type === j.iconSet)
4433
4431
  return t.config.map((s) => {
4434
4432
  const l = bt[s.iconType];
4435
4433
  return l && l[Number(s.iconId)];
4436
4434
  });
4437
4435
  }, [t]);
4438
4436
  switch (t.type) {
4439
- case L.dataBar: {
4437
+ case j.dataBar: {
4440
4438
  const { isGradient: s } = t.config, l = { width: "50%", height: "100%" }, a = s ? `linear-gradient(to right, ${t.config.positiveColor}, rgb(255 255 255))` : t.config.positiveColor, c = s ? `linear-gradient(to right, rgb(255 255 255),${t.config.nativeColor})` : t.config.nativeColor;
4441
4439
  return /* @__PURE__ */ d.jsxs("div", { className: On.cfPreview, children: [
4442
4440
  /* @__PURE__ */ d.jsx("div", { style: { ...l, background: c, border: `1px solid ${t.config.nativeColor}` } }),
4443
4441
  /* @__PURE__ */ d.jsx("div", { style: { ...l, background: a, border: `1px solid ${t.config.positiveColor}` } })
4444
4442
  ] });
4445
4443
  }
4446
- case L.colorScale:
4444
+ case j.colorScale:
4447
4445
  return n && /* @__PURE__ */ d.jsx("div", { className: On.cfPreview, children: n.map((s, l) => /* @__PURE__ */ d.jsx("div", { style: { width: `${100 / n.length}%`, height: "100%", background: s } }, l)) });
4448
- case L.iconSet:
4446
+ case j.iconSet:
4449
4447
  return r && /* @__PURE__ */ d.jsx("div", { className: On.cfPreview, children: r.map((s, l) => s ? /* @__PURE__ */ d.jsx("img", { style: { height: "100%" }, src: s }, l) : /* @__PURE__ */ d.jsx(Sn, {}, l)) });
4450
- case L.highlightCell: {
4451
- const { ul: s, st: l, it: a, bl: c, bg: u, cl: h } = t.style, f = (s == null ? void 0 : s.s) === He.TRUE, g = (l == null ? void 0 : l.s) === He.TRUE, m = a === He.TRUE, S = c === He.TRUE, I = (o = u == null ? void 0 : u.rgb) != null ? o : ca, v = (i = h == null ? void 0 : h.rgb) != null ? i : ua, _ = {
4448
+ case j.highlightCell: {
4449
+ const { ul: s, st: l, it: a, bl: c, bg: u, cl: h } = t.style, f = (s == null ? void 0 : s.s) === He.TRUE, g = (l == null ? void 0 : l.s) === He.TRUE, m = a === He.TRUE, S = c === He.TRUE, I = (o = u == null ? void 0 : u.rgb) != null ? o : ca, y = (i = h == null ? void 0 : h.rgb) != null ? i : ua, w = {
4452
4450
  fontWeight: S ? "bold" : void 0,
4453
4451
  fontStyle: m ? "italic" : void 0,
4454
4452
  textDecoration: `${f ? "underline" : ""} ${g ? "line-through" : ""}`.replace(/^ /, "") || void 0,
4455
4453
  backgroundColor: I,
4456
- color: v
4454
+ color: y
4457
4455
  };
4458
- return /* @__PURE__ */ d.jsx("div", { style: _, className: On.cfPreview, children: "123" });
4456
+ return /* @__PURE__ */ d.jsx("div", { style: w, className: On.cfPreview, children: "123" });
4459
4457
  }
4460
4458
  }
4461
4459
  return null;
@@ -4529,50 +4527,50 @@ const vd = "univer-cf-rule-list", yd = "univer-rule-selector", bd = "univer-sele
4529
4527
  }, Ld = (e, t) => {
4530
4528
  const n = e.rule;
4531
4529
  switch (n.type) {
4532
- case L.colorScale:
4530
+ case j.colorScale:
4533
4531
  return t.t("sheet.cf.ruleType.colorScale");
4534
- case L.dataBar:
4532
+ case j.dataBar:
4535
4533
  return t.t("sheet.cf.ruleType.dataBar");
4536
- case L.iconSet:
4534
+ case j.iconSet:
4537
4535
  return t.t("sheet.cf.ruleType.iconSet");
4538
- case L.highlightCell:
4536
+ case j.highlightCell:
4539
4537
  switch (n.subType) {
4540
- case j.average: {
4538
+ case N.average: {
4541
4539
  const r = n.operator;
4542
4540
  return t.t(`sheet.cf.preview.describe.${r}`, t.t("sheet.cf.subRuleType.average"));
4543
4541
  }
4544
- case j.duplicateValues:
4542
+ case N.duplicateValues:
4545
4543
  return t.t("sheet.cf.subRuleType.duplicateValues");
4546
- case j.uniqueValues:
4544
+ case N.uniqueValues:
4547
4545
  return t.t("sheet.cf.subRuleType.uniqueValues");
4548
- case j.number: {
4546
+ case N.number: {
4549
4547
  const r = n.operator;
4550
4548
  return t.t(`sheet.cf.preview.describe.${r}`, ...Array.isArray(n.value) ? n.value.map((o) => String(o)) : [String(n.value || "")]);
4551
4549
  }
4552
- case j.text: {
4550
+ case N.text: {
4553
4551
  const r = n.operator;
4554
4552
  return t.t(`sheet.cf.preview.describe.${r}`, n.value || "");
4555
4553
  }
4556
- case j.timePeriod: {
4554
+ case N.timePeriod: {
4557
4555
  const r = n.operator;
4558
4556
  return t.t(`sheet.cf.preview.describe.${r}`);
4559
4557
  }
4560
- case j.rank:
4558
+ case N.rank:
4561
4559
  return n.isPercent ? n.isBottom ? t.t("sheet.cf.preview.describe.bottomNPercent", String(n.value)) : t.t("sheet.cf.preview.describe.topNPercent", String(n.value)) : n.isBottom ? t.t("sheet.cf.preview.describe.bottomN", String(n.value)) : t.t("sheet.cf.preview.describe.topN", String(n.value));
4562
- case j.formula:
4560
+ case N.formula:
4563
4561
  return t.t("sheet.cf.ruleType.formula");
4564
4562
  }
4565
4563
  }
4566
4564
  };
4567
4565
  let Qo = 0;
4568
4566
  const zd = (e) => {
4569
- const { onClick: t } = e, n = oe(he), r = oe(re), o = oe(Gt), i = oe(ue), s = oe($e), l = oe(Wt), a = $a(r.getCurrentTypeOfUnit$(G.UNIVER_SHEET)), c = a.getUnitId(), u = a.getActiveSheet();
4567
+ const { onClick: t } = e, n = oe(he), r = oe(re), o = oe(Gt), i = oe(ue), s = oe($e), l = oe(Wt), a = $a(() => r.getCurrentTypeOfUnit$(G.UNIVER_SHEET), void 0, void 0, []), c = a.getUnitId(), u = a.getActiveSheet();
4570
4568
  if (!u)
4571
4569
  throw new Error("No active sheet found");
4572
- const h = u.getSheetId(), [f, g] = M([]), [m, S] = M("2"), [I, v] = M(0), [_, C] = M(-1), [w, p] = M(Qo), x = pn(null), R = [
4570
+ const h = u.getSheetId(), [f, g] = M([]), [m, S] = M("2"), [I, y] = M(0), [w, C] = M(-1), [x, p] = M(Qo), R = pn(null), _ = [
4573
4571
  { label: s.t("sheet.cf.panel.workSheet"), value: "2" },
4574
4572
  { label: s.t("sheet.cf.panel.selectedRange"), value: "1" }
4575
- ], y = () => {
4573
+ ], b = () => {
4576
4574
  const H = n.getSubunitRules(c, h);
4577
4575
  if (!H || !H.length)
4578
4576
  return [];
@@ -4601,14 +4599,14 @@ const zd = (e) => {
4601
4599
  return !1;
4602
4600
  })) ? { ...pe, disable: !0 } : { ...pe };
4603
4601
  });
4604
- }, [$, N] = M(y);
4602
+ }, [D, L] = M(b);
4605
4603
  Va(f), ve(() => {
4606
4604
  const H = i.onCommandExecuted((J) => {
4607
- J.id === Br.id && v(Math.random());
4605
+ J.id === Br.id && y(Math.random());
4608
4606
  });
4609
4607
  return () => H.dispose();
4610
4608
  }), ve(() => {
4611
- N(y);
4609
+ L(b);
4612
4610
  }, [m, I, c, h]), ve(() => {
4613
4611
  if (m === "2")
4614
4612
  return;
@@ -4619,20 +4617,20 @@ const zd = (e) => {
4619
4617
  });
4620
4618
  return () => le.dispose();
4621
4619
  }).pipe(No(16)).subscribe(() => {
4622
- N(y);
4620
+ L(b);
4623
4621
  });
4624
4622
  return () => {
4625
4623
  H.unsubscribe();
4626
4624
  };
4627
4625
  }, [r, m, c, h]), ve(() => {
4628
4626
  const H = n.$ruleChange.subscribe(() => {
4629
- v(Math.random());
4627
+ y(Math.random());
4630
4628
  });
4631
4629
  return () => H.unsubscribe();
4632
4630
  }, [n]), ve(() => {
4633
4631
  const H = () => {
4634
4632
  var pe;
4635
- const le = Math.max(0, (((pe = x.current) == null ? void 0 : pe.getBoundingClientRect().width) || 0) - 8);
4633
+ const le = Math.max(0, (((pe = R.current) == null ? void 0 : pe.getBoundingClientRect().width) || 0) - 8);
4636
4634
  return Qo = le, le;
4637
4635
  }, ie = new mt((le) => {
4638
4636
  const pe = document.querySelector(".univer-sidebar");
@@ -4662,7 +4660,7 @@ const zd = (e) => {
4662
4660
  if (!J || !ie)
4663
4661
  throw new Error("No active sheet found");
4664
4662
  i.executeCommand(Un.id, { unitId: J, subUnitId: ie, cfId: H.cfId });
4665
- }, b = (H, J) => {
4663
+ }, v = (H, J) => {
4666
4664
  C(J.y);
4667
4665
  }, T = (H, J, ie) => {
4668
4666
  var P;
@@ -4671,39 +4669,39 @@ const zd = (e) => {
4671
4669
  if (!le || !pe)
4672
4670
  throw new Error("No active sheet found");
4673
4671
  const me = (z) => {
4674
- const K = $.length;
4672
+ const K = D.length;
4675
4673
  return Math.min(K - 1, Math.max(0, z));
4676
- }, Le = $[me(J.y)].cfId, Ue = $[me(ie.y)].cfId;
4674
+ }, Le = D[me(J.y)].cfId, Ue = D[me(ie.y)].cfId;
4677
4675
  Le !== Ue && i.executeCommand(So.id, { unitId: le, subUnitId: pe, start: { id: Le, type: "self" }, end: { id: Ue, type: ie.y > J.y ? "after" : "before" } });
4678
4676
  }, ee = () => {
4679
4677
  e.onCreate();
4680
4678
  }, Oe = () => {
4681
- m === "2" ? i.executeCommand(Gn.id) : m === "1" && $.map((J) => ({ unitId: c, subUnitId: h, cfId: J.cfId })).forEach((J) => {
4679
+ m === "2" ? i.executeCommand(Gn.id) : m === "1" && D.map((J) => ({ unitId: c, subUnitId: h, cfId: J.cfId })).forEach((J) => {
4682
4680
  i.executeCommand(Un.id, J);
4683
4681
  });
4684
- }, Se = $.map((H, J) => ({ i: H.cfId, x: 0, w: 12, y: J, h: 1, isResizable: !1 })), Ce = E($), We = Ce == null ? void 0 : Ce.some((H) => H.disable);
4682
+ }, Se = D.map((H, J) => ({ i: H.cfId, x: 0, w: 12, y: J, h: 1, isResizable: !1 })), Ce = E(D), We = Ce == null ? void 0 : Ce.some((H) => H.disable);
4685
4683
  return /* @__PURE__ */ d.jsxs("div", { className: ge.cfRuleList, children: [
4686
4684
  /* @__PURE__ */ d.jsxs("div", { className: ge.ruleSelector, children: [
4687
4685
  /* @__PURE__ */ d.jsx("div", { children: l.tWithReactNode(
4688
4686
  "sheet.cf.panel.managerRuleSelect",
4689
- /* @__PURE__ */ d.jsx(Ve, { className: ge.select, options: R, value: m, onChange: (H) => {
4687
+ /* @__PURE__ */ d.jsx(Ve, { className: ge.select, options: _, value: m, onChange: (H) => {
4690
4688
  S(H);
4691
4689
  } })
4692
4690
  ).map((H, J) => /* @__PURE__ */ d.jsx("span", { children: H }, J)) }),
4693
4691
  /* @__PURE__ */ d.jsxs("div", { className: ge.btnList, children: [
4694
4692
  /* @__PURE__ */ d.jsx(zo, { title: s.t("sheet.cf.panel.createRule"), placement: "bottom", children: /* @__PURE__ */ d.jsx("div", { className: `${ge.icon}`, onClick: ee, children: /* @__PURE__ */ d.jsx(Gi, {}) }) }),
4695
- $.length && !We ? /* @__PURE__ */ d.jsx(zo, { title: s.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ d.jsx("div", { className: `${ge.gap} ${ge.icon}`, onClick: Oe, children: /* @__PURE__ */ d.jsx($n, {}) }) }) : /* @__PURE__ */ d.jsx("div", { className: `${ge.gap} ${ge.disabled}`, children: /* @__PURE__ */ d.jsx($n, {}) })
4693
+ D.length && !We ? /* @__PURE__ */ d.jsx(zo, { title: s.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ d.jsx("div", { className: `${ge.gap} ${ge.icon}`, onClick: Oe, children: /* @__PURE__ */ d.jsx($n, {}) }) }) : /* @__PURE__ */ d.jsx("div", { className: `${ge.gap} ${ge.disabled}`, children: /* @__PURE__ */ d.jsx($n, {}) })
4696
4694
  ] })
4697
4695
  ] }),
4698
- /* @__PURE__ */ d.jsx("div", { ref: x, className: ge.gridLayoutWrap, children: w ? /* @__PURE__ */ d.jsx(
4696
+ /* @__PURE__ */ d.jsx("div", { ref: R, className: ge.gridLayoutWrap, children: x ? /* @__PURE__ */ d.jsx(
4699
4697
  dd,
4700
4698
  {
4701
4699
  onDragStop: T,
4702
- onDragStart: b,
4700
+ onDragStart: v,
4703
4701
  layout: Se,
4704
4702
  cols: 12,
4705
4703
  rowHeight: 60,
4706
- width: w,
4704
+ width: x,
4707
4705
  margin: [0, 10],
4708
4706
  draggableHandle: ".draggableHandle",
4709
4707
  children: Ce == null ? void 0 : Ce.map((H, J) => /* @__PURE__ */ d.jsx("div", { children: /* @__PURE__ */ d.jsxs(
@@ -4716,7 +4714,7 @@ const zd = (e) => {
4716
4714
  onClick: () => {
4717
4715
  H.disable || t(H);
4718
4716
  },
4719
- className: `${ge.ruleItem} ${_ === J ? ge.active : ""}`,
4717
+ className: `${ge.ruleItem} ${w === J ? ge.active : ""}`,
4720
4718
  children: [
4721
4719
  /* @__PURE__ */ d.jsx(
4722
4720
  "div",
@@ -4734,7 +4732,7 @@ const zd = (e) => {
4734
4732
  !H.disable && /* @__PURE__ */ d.jsx(
4735
4733
  "div",
4736
4734
  {
4737
- className: `${ge.deleteItem} ${_ === J ? ge.active : ""}`,
4735
+ className: `${ge.deleteItem} ${w === J ? ge.active : ""}`,
4738
4736
  onClick: (ie) => {
4739
4737
  ie.stopPropagation(), W(H);
4740
4738
  },
@@ -4789,7 +4787,7 @@ const zd = (e) => {
4789
4787
  ] })
4790
4788
  }
4791
4789
  ));
4792
- }, Ad = "univer-cf-rule-style-editor", kd = "univer-cf-preview-wrap", qd = "univer-text", Bd = "univer-position-relative", Gd = "univer-btn-list", Xd = "univer-util-item", Yd = "univer-icon-set", Kd = "univer-render-config", Zd = "univer-flex", Jd = "univer-width45", Qd = "univer-icon-wrap", ef = "univer-icon", tf = "univer-dropdown-icon", nf = "univer-error-input", rf = "univer-error-text", of = "univer-icon-group-list", sf = "univer-title", af = "univer-group", lf = "univer-item-content", cf = "univer-item-wrap", uf = "univer-item", df = "univer-icon-item-list-wrap", ff = "univer-none", hf = "univer-icon-item-list", pf = "univer-width100", gf = "univer-stress", D = {
4790
+ }, Ad = "univer-cf-rule-style-editor", kd = "univer-cf-preview-wrap", qd = "univer-text", Bd = "univer-position-relative", Gd = "univer-btn-list", Xd = "univer-util-item", Yd = "univer-icon-set", Kd = "univer-render-config", Zd = "univer-flex", Jd = "univer-width45", Qd = "univer-icon-wrap", ef = "univer-icon", tf = "univer-dropdown-icon", nf = "univer-error-input", rf = "univer-error-text", of = "univer-icon-group-list", sf = "univer-title", af = "univer-group", lf = "univer-item-content", cf = "univer-item-wrap", uf = "univer-item", df = "univer-icon-item-list-wrap", ff = "univer-none", hf = "univer-icon-item-list", pf = "univer-width100", gf = "univer-stress", $ = {
4793
4791
  cfRuleStyleEditor: Ad,
4794
4792
  cfPreviewWrap: kd,
4795
4793
  text: qd,
@@ -4842,48 +4840,48 @@ const zd = (e) => {
4842
4840
  ) : /* @__PURE__ */ d.jsx(St, { className: n, value: Number(e.value) || 0, onChange: (f) => e.onChange(f || 0), ...u });
4843
4841
  }, mf = (e) => {
4844
4842
  var W;
4845
- const { interceptorManager: t } = e, n = oe($e), r = ((W = e.rule) == null ? void 0 : W.type) === L.colorScale ? e.rule : void 0, o = [gt(A.num, n), gt(A.percent, n), gt(A.percentile, n), gt(A.formula, n)], i = [gt(A.min, n), ...o], s = [gt("none", n), ...o], l = [gt(A.max, n), ...o], [a, c] = M(() => {
4843
+ const { interceptorManager: t } = e, n = oe($e), r = ((W = e.rule) == null ? void 0 : W.type) === j.colorScale ? e.rule : void 0, o = [gt(A.num, n), gt(A.percent, n), gt(A.percentile, n), gt(A.formula, n)], i = [gt(A.min, n), ...o], s = [gt("none", n), ...o], l = [gt(A.max, n), ...o], [a, c] = M(() => {
4846
4844
  var T;
4847
- const b = A.min;
4848
- return r && ((T = r.config[0]) == null ? void 0 : T.value.type) || b;
4845
+ const v = A.min;
4846
+ return r && ((T = r.config[0]) == null ? void 0 : T.value.type) || v;
4849
4847
  }), [u, h] = M(() => {
4850
4848
  var T;
4851
- const b = "none";
4852
- return !r || r.config.length !== 3 ? b : ((T = r.config[1]) == null ? void 0 : T.value.type) || b;
4849
+ const v = "none";
4850
+ return !r || r.config.length !== 3 ? v : ((T = r.config[1]) == null ? void 0 : T.value.type) || v;
4853
4851
  }), [f, g] = M(() => {
4854
4852
  var T;
4855
- const b = A.max;
4856
- return r && ((T = r.config[r.config.length - 1]) == null ? void 0 : T.value.type) || b;
4853
+ const v = A.max;
4854
+ return r && ((T = r.config[r.config.length - 1]) == null ? void 0 : T.value.type) || v;
4857
4855
  }), [m, S] = M(() => {
4858
4856
  if (!r)
4859
4857
  return 10;
4860
4858
  const T = r.config[0];
4861
4859
  return (T == null ? void 0 : T.value.value) === void 0 ? 10 : T == null ? void 0 : T.value.value;
4862
- }), [I, v] = M(() => {
4860
+ }), [I, y] = M(() => {
4863
4861
  var ee;
4864
4862
  if (!r || r.config.length !== 3)
4865
4863
  return 50;
4866
4864
  const T = (ee = r.config[1]) == null ? void 0 : ee.value.value;
4867
4865
  return T === void 0 ? 50 : T;
4868
- }), [_, C] = M(() => {
4866
+ }), [w, C] = M(() => {
4869
4867
  var ee;
4870
4868
  if (!r)
4871
4869
  return 90;
4872
4870
  const T = (ee = r.config[r.config.length - 1]) == null ? void 0 : ee.value.value;
4873
4871
  return T === void 0 ? 90 : T;
4874
- }), [w, p] = M(() => {
4872
+ }), [x, p] = M(() => {
4875
4873
  var T;
4876
- const b = "#d0d9fb";
4877
- return r && ((T = r.config[0]) == null ? void 0 : T.color) || b;
4878
- }), [x, R] = M(() => {
4874
+ const v = "#d0d9fb";
4875
+ return r && ((T = r.config[0]) == null ? void 0 : T.color) || v;
4876
+ }), [R, _] = M(() => {
4879
4877
  var T;
4880
- const b = "#7790f3";
4881
- return !r || r.config.length !== 3 ? b : ((T = r.config[1]) == null ? void 0 : T.color) || b;
4882
- }), [y, E] = M(() => {
4878
+ const v = "#7790f3";
4879
+ return !r || r.config.length !== 3 ? v : ((T = r.config[1]) == null ? void 0 : T.color) || v;
4880
+ }), [b, E] = M(() => {
4883
4881
  var T;
4884
- const b = "#2e55ef";
4885
- return r && ((T = r.config[r.config.length - 1]) == null ? void 0 : T.color) || b;
4886
- }), $ = be(() => (b) => {
4882
+ const v = "#2e55ef";
4883
+ return r && ((T = r.config[r.config.length - 1]) == null ? void 0 : T.color) || v;
4884
+ }), D = be(() => (v) => {
4887
4885
  const {
4888
4886
  minType: T,
4889
4887
  medianType: ee,
@@ -4894,20 +4892,20 @@ const zd = (e) => {
4894
4892
  minColor: H,
4895
4893
  medianColor: J,
4896
4894
  maxColor: ie
4897
- } = b, le = [];
4898
- return le.push({ color: H, value: { type: T, value: Se } }), ee !== "none" && le.push({ color: J, value: { type: ee, value: Ce } }), le.push({ color: ie, value: { type: Oe, value: We } }), { config: le.map((me, Le) => ({ ...me, index: Le })), type: L.colorScale };
4895
+ } = v, le = [];
4896
+ return le.push({ color: H, value: { type: T, value: Se } }), ee !== "none" && le.push({ color: J, value: { type: ee, value: Ce } }), le.push({ color: ie, value: { type: Oe, value: We } }), { config: le.map((me, Le) => ({ ...me, index: Le })), type: j.colorScale };
4899
4897
  }, []);
4900
4898
  ve(() => t.intercept(t.getInterceptPoints().submit, {
4901
4899
  handler() {
4902
- return $({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: _, minColor: w, medianColor: x, maxColor: y });
4900
+ return D({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: w, minColor: x, medianColor: R, maxColor: b });
4903
4901
  }
4904
- }), [$, a, u, f, m, I, _, w, x, y, t]);
4905
- const N = (b) => {
4906
- e.onChange($(b));
4902
+ }), [D, a, u, f, m, I, w, x, R, b, t]);
4903
+ const L = (v) => {
4904
+ e.onChange(D(v));
4907
4905
  };
4908
4906
  return /* @__PURE__ */ d.jsxs("div", { children: [
4909
4907
  /* @__PURE__ */ d.jsx("div", { className: O.title, children: n.t("sheet.cf.panel.styleRule") }),
4910
- /* @__PURE__ */ d.jsx("div", { className: `${D.cfPreviewWrap}`, children: /* @__PURE__ */ d.jsx(Kt, { rule: $({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: _, minColor: w, medianColor: x, maxColor: y }) }) }),
4908
+ /* @__PURE__ */ d.jsx("div", { className: `${$.cfPreviewWrap}`, children: /* @__PURE__ */ d.jsx(Kt, { rule: D({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: w, minColor: x, medianColor: R, maxColor: b }) }) }),
4911
4909
  /* @__PURE__ */ d.jsx("div", { className: O.label, children: n.t("sheet.cf.valueType.min") }),
4912
4910
  /* @__PURE__ */ d.jsxs("div", { className: `${O.labelContainer} ${O.mTSm}`, children: [
4913
4911
  /* @__PURE__ */ d.jsx(
@@ -4915,10 +4913,10 @@ const zd = (e) => {
4915
4913
  {
4916
4914
  options: i,
4917
4915
  value: a,
4918
- onChange: (b) => {
4919
- c(b);
4920
- const T = cn(b, 10);
4921
- S(T), N({ minType: b, medianType: u, maxType: f, minValue: T, medianValue: I, maxValue: _, minColor: w, medianColor: x, maxColor: y });
4916
+ onChange: (v) => {
4917
+ c(v);
4918
+ const T = cn(v, 10);
4919
+ S(T), L({ minType: v, medianType: u, maxType: f, minValue: T, medianValue: I, maxValue: w, minColor: x, medianColor: R, maxColor: b });
4922
4920
  }
4923
4921
  }
4924
4922
  ),
@@ -4929,8 +4927,8 @@ const zd = (e) => {
4929
4927
  className: `${O.mLXxs}`,
4930
4928
  value: m,
4931
4929
  type: a,
4932
- onChange: (b) => {
4933
- S(b), N({ minType: a, medianType: u, maxType: f, minValue: b, medianValue: I, maxValue: _, minColor: w, medianColor: x, maxColor: y });
4930
+ onChange: (v) => {
4931
+ S(v), L({ minType: a, medianType: u, maxType: f, minValue: v, medianValue: I, maxValue: w, minColor: x, medianColor: R, maxColor: b });
4934
4932
  }
4935
4933
  }
4936
4934
  ),
@@ -4938,9 +4936,9 @@ const zd = (e) => {
4938
4936
  _t,
4939
4937
  {
4940
4938
  className: O.mLXxs,
4941
- color: w,
4942
- onChange: (b) => {
4943
- p(b), N({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: _, minColor: b, medianColor: x, maxColor: y });
4939
+ color: x,
4940
+ onChange: (v) => {
4941
+ p(v), L({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: w, minColor: v, medianColor: R, maxColor: b });
4944
4942
  }
4945
4943
  }
4946
4944
  )
@@ -4952,10 +4950,10 @@ const zd = (e) => {
4952
4950
  {
4953
4951
  options: s,
4954
4952
  value: u,
4955
- onChange: (b) => {
4956
- h(b);
4957
- const T = cn(b, 50);
4958
- v(T), N({ minType: a, medianType: b, maxType: f, minValue: m, medianValue: T, maxValue: _, minColor: w, medianColor: x, maxColor: y });
4953
+ onChange: (v) => {
4954
+ h(v);
4955
+ const T = cn(v, 50);
4956
+ y(T), L({ minType: a, medianType: v, maxType: f, minValue: m, medianValue: T, maxValue: w, minColor: x, medianColor: R, maxColor: b });
4959
4957
  }
4960
4958
  }
4961
4959
  ),
@@ -4966,8 +4964,8 @@ const zd = (e) => {
4966
4964
  className: ` ${O.mLXxs}`,
4967
4965
  value: I,
4968
4966
  type: u,
4969
- onChange: (b) => {
4970
- v(b), N({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: b, maxValue: _, minColor: w, medianColor: x, maxColor: y });
4967
+ onChange: (v) => {
4968
+ y(v), L({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: v, maxValue: w, minColor: x, medianColor: R, maxColor: b });
4971
4969
  }
4972
4970
  }
4973
4971
  ),
@@ -4975,9 +4973,9 @@ const zd = (e) => {
4975
4973
  _t,
4976
4974
  {
4977
4975
  className: O.mLXxs,
4978
- color: x,
4979
- onChange: (b) => {
4980
- R(b), N({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: _, minColor: w, medianColor: b, maxColor: y });
4976
+ color: R,
4977
+ onChange: (v) => {
4978
+ _(v), L({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: w, minColor: x, medianColor: v, maxColor: b });
4981
4979
  }
4982
4980
  }
4983
4981
  )
@@ -4989,10 +4987,10 @@ const zd = (e) => {
4989
4987
  {
4990
4988
  options: l,
4991
4989
  value: f,
4992
- onChange: (b) => {
4993
- g(b);
4994
- const T = cn(b, 90);
4995
- C(T), N({ minType: a, medianType: u, maxType: b, minValue: m, medianValue: I, maxValue: T, minColor: w, medianColor: x, maxColor: y });
4990
+ onChange: (v) => {
4991
+ g(v);
4992
+ const T = cn(v, 90);
4993
+ C(T), L({ minType: a, medianType: u, maxType: v, minValue: m, medianValue: I, maxValue: T, minColor: x, medianColor: R, maxColor: b });
4996
4994
  }
4997
4995
  }
4998
4996
  ),
@@ -5001,10 +4999,10 @@ const zd = (e) => {
5001
4999
  {
5002
5000
  id: "max",
5003
5001
  className: `${O.mLXxs}`,
5004
- value: _,
5002
+ value: w,
5005
5003
  type: f,
5006
- onChange: (b) => {
5007
- C(b), N({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: b, minColor: w, medianColor: x, maxColor: y });
5004
+ onChange: (v) => {
5005
+ C(v), L({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: v, minColor: x, medianColor: R, maxColor: b });
5008
5006
  }
5009
5007
  }
5010
5008
  ),
@@ -5012,9 +5010,9 @@ const zd = (e) => {
5012
5010
  _t,
5013
5011
  {
5014
5012
  className: O.mLXxs,
5015
- color: y,
5016
- onChange: (b) => {
5017
- E(b), N({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: _, minColor: w, medianColor: x, maxColor: b });
5013
+ color: b,
5014
+ onChange: (v) => {
5015
+ E(v), L({ minType: a, medianType: u, maxType: f, minValue: m, medianValue: I, maxValue: w, minColor: x, medianColor: R, maxColor: v });
5018
5016
  }
5019
5017
  }
5020
5018
  )
@@ -5061,60 +5059,60 @@ const zd = (e) => {
5061
5059
  );
5062
5060
  }, vf = (e) => {
5063
5061
  var W;
5064
- const { interceptorManager: t } = e, n = oe($e), r = ((W = e.rule) == null ? void 0 : W.type) === L.dataBar ? e.rule : void 0, [o, i] = M(() => {
5062
+ const { interceptorManager: t } = e, n = oe($e), r = ((W = e.rule) == null ? void 0 : W.type) === j.dataBar ? e.rule : void 0, [o, i] = M(() => {
5065
5063
  var T;
5066
- const b = "0";
5067
- return r ? (T = r.config) != null && T.isGradient ? "1" : "0" : b;
5064
+ const v = "0";
5065
+ return r ? (T = r.config) != null && T.isGradient ? "1" : "0" : v;
5068
5066
  }), [s, l] = M(() => {
5069
5067
  var T;
5070
- const b = "#abd91a";
5071
- return r && ((T = r.config) == null ? void 0 : T.positiveColor) || b;
5068
+ const v = "#abd91a";
5069
+ return r && ((T = r.config) == null ? void 0 : T.positiveColor) || v;
5072
5070
  }), [a, c] = M(() => {
5073
5071
  var T;
5074
- const b = "#ffbe38";
5075
- return r && ((T = r.config) == null ? void 0 : T.nativeColor) || b;
5072
+ const v = "#ffbe38";
5073
+ return r && ((T = r.config) == null ? void 0 : T.nativeColor) || v;
5076
5074
  }), u = [jt(A.num, n), jt(A.percent, n), jt(A.percentile, n), jt(A.formula, n)], h = [jt(A.min, n), ...u], f = [jt(A.max, n), ...u], [g, m] = M(() => {
5077
5075
  var T;
5078
- const b = h[0].value;
5079
- return r && ((T = r.config) == null ? void 0 : T.min.type) || b;
5076
+ const v = h[0].value;
5077
+ return r && ((T = r.config) == null ? void 0 : T.min.type) || v;
5080
5078
  }), [S, I] = M(() => {
5081
5079
  var T;
5082
- const b = f[0].value;
5083
- return r && ((T = r.config) == null ? void 0 : T.max.type) || b;
5084
- }), [v, _] = M(() => {
5080
+ const v = f[0].value;
5081
+ return r && ((T = r.config) == null ? void 0 : T.max.type) || v;
5082
+ }), [y, w] = M(() => {
5085
5083
  var ee;
5086
5084
  if (!r)
5087
5085
  return 0;
5088
5086
  const T = ((ee = r.config) == null ? void 0 : ee.min) || {};
5089
5087
  return T.type === A.formula ? T.value || "=" : T.value || 0;
5090
- }), [C, w] = M(() => {
5088
+ }), [C, x] = M(() => {
5091
5089
  var ee;
5092
5090
  if (!r)
5093
5091
  return 100;
5094
5092
  const T = ((ee = r.config) == null ? void 0 : ee.max) || {};
5095
5093
  return T.type === A.formula ? T.value || "=" : T.value === void 0 ? 100 : T.value;
5096
- }), [p, x] = M(() => r ? r.isShowValue === void 0 ? !0 : !!r.isShowValue : !0), R = (b) => ({ config: {
5097
- min: { type: b.minValueType, value: b.minValue },
5098
- max: { type: b.maxValueType, value: b.maxValue },
5099
- isGradient: b.isGradient === "1",
5100
- positiveColor: b.positiveColor,
5101
- nativeColor: b.nativeColor
5102
- }, type: L.dataBar, isShowValue: b.isShowValue });
5094
+ }), [p, R] = M(() => r ? r.isShowValue === void 0 ? !0 : !!r.isShowValue : !0), _ = (v) => ({ config: {
5095
+ min: { type: v.minValueType, value: v.minValue },
5096
+ max: { type: v.maxValueType, value: v.maxValue },
5097
+ isGradient: v.isGradient === "1",
5098
+ positiveColor: v.positiveColor,
5099
+ nativeColor: v.nativeColor
5100
+ }, type: j.dataBar, isShowValue: v.isShowValue });
5103
5101
  ve(() => t.intercept(t.getInterceptPoints().submit, {
5104
5102
  handler() {
5105
- return R({ isGradient: o, minValue: v, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5103
+ return _({ isGradient: o, minValue: y, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5106
5104
  }
5107
- }), [o, v, g, C, S, s, a, t, p]);
5108
- const y = (b) => {
5109
- e.onChange(R(b));
5110
- }, E = (b) => {
5111
- l(b), y({ isGradient: o, minValue: v, minValueType: g, maxValue: C, maxValueType: S, positiveColor: b, nativeColor: a, isShowValue: p });
5112
- }, $ = (b) => {
5113
- c(b), y({ isGradient: o, minValue: v, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: b, isShowValue: p });
5114
- }, N = (b) => u.map((T) => T.value).includes(b);
5105
+ }), [o, y, g, C, S, s, a, t, p]);
5106
+ const b = (v) => {
5107
+ e.onChange(_(v));
5108
+ }, E = (v) => {
5109
+ l(v), b({ isGradient: o, minValue: y, minValueType: g, maxValue: C, maxValueType: S, positiveColor: v, nativeColor: a, isShowValue: p });
5110
+ }, D = (v) => {
5111
+ c(v), b({ isGradient: o, minValue: y, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: v, isShowValue: p });
5112
+ }, L = (v) => u.map((T) => T.value).includes(v);
5115
5113
  return /* @__PURE__ */ d.jsxs("div", { children: [
5116
5114
  /* @__PURE__ */ d.jsx("div", { className: O.title, children: n.t("sheet.cf.panel.styleRule") }),
5117
- /* @__PURE__ */ d.jsx("div", { className: `${D.cfPreviewWrap}`, children: /* @__PURE__ */ d.jsx(Kt, { rule: R({ isGradient: o, minValue: v, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p }) }) }),
5115
+ /* @__PURE__ */ d.jsx("div", { className: `${$.cfPreviewWrap}`, children: /* @__PURE__ */ d.jsx(Kt, { rule: _({ isGradient: o, minValue: y, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p }) }) }),
5118
5116
  /* @__PURE__ */ d.jsxs("div", { children: [
5119
5117
  /* @__PURE__ */ d.jsx("div", { className: O.label, children: n.t("sheet.cf.panel.fillType") }),
5120
5118
  /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${O.mLXxs} ${O.labelContainer} `, children: [
@@ -5122,22 +5120,22 @@ const zd = (e) => {
5122
5120
  Ya,
5123
5121
  {
5124
5122
  value: o,
5125
- onChange: (b) => {
5126
- i(b), y({ isGradient: b, minValue: v, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5123
+ onChange: (v) => {
5124
+ i(v), b({ isGradient: v, minValue: y, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5127
5125
  },
5128
5126
  children: [
5129
- /* @__PURE__ */ d.jsx(Ho, { value: "0", children: /* @__PURE__ */ d.jsx("span", { className: D.text, children: n.t("sheet.cf.panel.pureColor") }) }),
5130
- /* @__PURE__ */ d.jsx(Ho, { value: "1", children: /* @__PURE__ */ d.jsx("span", { className: D.text, children: n.t("sheet.cf.panel.gradient") }) })
5127
+ /* @__PURE__ */ d.jsx(Ho, { value: "0", children: /* @__PURE__ */ d.jsx("span", { className: $.text, children: n.t("sheet.cf.panel.pureColor") }) }),
5128
+ /* @__PURE__ */ d.jsx(Ho, { value: "1", children: /* @__PURE__ */ d.jsx("span", { className: $.text, children: n.t("sheet.cf.panel.gradient") }) })
5131
5129
  ]
5132
5130
  }
5133
5131
  ),
5134
- /* @__PURE__ */ d.jsxs("div", { className: `${D.utilItem} ${O.mLXl}`, children: [
5132
+ /* @__PURE__ */ d.jsxs("div", { className: `${$.utilItem} ${O.mLXl}`, children: [
5135
5133
  /* @__PURE__ */ d.jsx(
5136
5134
  zn,
5137
5135
  {
5138
5136
  checked: !p,
5139
- onChange: (b) => {
5140
- x(!b), y({ isGradient: b, minValue: v, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: !b });
5137
+ onChange: (v) => {
5138
+ R(!v), b({ isGradient: v, minValue: y, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: !v });
5141
5139
  }
5142
5140
  }
5143
5141
  ),
@@ -5149,17 +5147,17 @@ const zd = (e) => {
5149
5147
  /* @__PURE__ */ d.jsx("div", { className: O.label, children: n.t("sheet.cf.panel.colorSet") }),
5150
5148
  /* @__PURE__ */ d.jsxs("div", { className: `${O.labelContainer} ${O.mTSm} ${O.mLXxs}`, children: [
5151
5149
  /* @__PURE__ */ d.jsxs("div", { className: `${O.labelContainer}`, children: [
5152
- /* @__PURE__ */ d.jsx("div", { className: `${D.text}`, children: n.t("sheet.cf.panel.native") }),
5150
+ /* @__PURE__ */ d.jsx("div", { className: `${$.text}`, children: n.t("sheet.cf.panel.native") }),
5153
5151
  /* @__PURE__ */ d.jsx(
5154
5152
  _t,
5155
5153
  {
5156
5154
  color: a,
5157
- onChange: $
5155
+ onChange: D
5158
5156
  }
5159
5157
  )
5160
5158
  ] }),
5161
5159
  /* @__PURE__ */ d.jsxs("div", { className: `${O.labelContainer} ${O.mLSm} `, children: [
5162
- /* @__PURE__ */ d.jsx("div", { className: `${D.text} `, children: n.t("sheet.cf.panel.positive") }),
5160
+ /* @__PURE__ */ d.jsx("div", { className: `${$.text} `, children: n.t("sheet.cf.panel.positive") }),
5163
5161
  /* @__PURE__ */ d.jsx(
5164
5162
  _t,
5165
5163
  {
@@ -5178,23 +5176,23 @@ const zd = (e) => {
5178
5176
  {
5179
5177
  options: h,
5180
5178
  value: g,
5181
- onChange: (b) => {
5182
- m(b);
5183
- const T = cn(b, 10);
5184
- _(T), y({ isGradient: o, minValue: T, minValueType: b, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5179
+ onChange: (v) => {
5180
+ m(v);
5181
+ const T = cn(v, 10);
5182
+ w(T), b({ isGradient: o, minValue: T, minValueType: v, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5185
5183
  }
5186
5184
  }
5187
5185
  ),
5188
5186
  /* @__PURE__ */ d.jsx(
5189
5187
  ei,
5190
5188
  {
5191
- disabled: !N(g),
5189
+ disabled: !L(g),
5192
5190
  id: "min",
5193
5191
  type: g,
5194
5192
  className: O.mLSm,
5195
- value: v,
5196
- onChange: (b) => {
5197
- _(b || 0), y({ isGradient: o, minValue: b || 0, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5193
+ value: y,
5194
+ onChange: (v) => {
5195
+ w(v || 0), b({ isGradient: o, minValue: v || 0, minValueType: g, maxValue: C, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5198
5196
  }
5199
5197
  }
5200
5198
  )
@@ -5206,23 +5204,23 @@ const zd = (e) => {
5206
5204
  {
5207
5205
  options: f,
5208
5206
  value: S,
5209
- onChange: (b) => {
5210
- I(b);
5211
- const T = cn(b, 90);
5212
- w(T), y({ isGradient: o, minValue: v, minValueType: g, maxValue: T, maxValueType: b, positiveColor: s, nativeColor: a, isShowValue: p });
5207
+ onChange: (v) => {
5208
+ I(v);
5209
+ const T = cn(v, 90);
5210
+ x(T), b({ isGradient: o, minValue: y, minValueType: g, maxValue: T, maxValueType: v, positiveColor: s, nativeColor: a, isShowValue: p });
5213
5211
  }
5214
5212
  }
5215
5213
  ),
5216
5214
  /* @__PURE__ */ d.jsx(
5217
5215
  ei,
5218
5216
  {
5219
- disabled: !N(S),
5217
+ disabled: !L(S),
5220
5218
  id: "max",
5221
5219
  type: S,
5222
5220
  className: O.mLSm,
5223
5221
  value: C,
5224
- onChange: (b) => {
5225
- w(b || 0), y({ isGradient: o, minValue: v, minValueType: g, maxValue: b || 0, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5222
+ onChange: (v) => {
5223
+ x(v || 0), b({ isGradient: o, minValue: y, minValueType: g, maxValue: v || 0, maxValueType: S, positiveColor: s, nativeColor: a, isShowValue: p });
5226
5224
  }
5227
5225
  }
5228
5226
  )
@@ -5247,14 +5245,14 @@ const zd = (e) => {
5247
5245
  if (t != null && t.st)
5248
5246
  return t.st.s;
5249
5247
  }), [g, m] = M(() => {
5250
- var x;
5248
+ var R;
5251
5249
  const p = "#2f56ef";
5252
- return (x = t == null ? void 0 : t.cl) != null && x.rgb ? t.cl.rgb : p;
5250
+ return (R = t == null ? void 0 : t.cl) != null && R.rgb ? t.cl.rgb : p;
5253
5251
  }), [S, I] = M(() => {
5254
- var x;
5252
+ var R;
5255
5253
  const p = "#e8ecfc";
5256
- return (x = t == null ? void 0 : t.bg) != null && x.rgb ? t.bg.rgb : p;
5257
- }), v = o.get("BoldSingle"), _ = o.get("ItalicSingle"), C = o.get("UnderlineSingle"), w = o.get("StrikethroughSingle");
5254
+ return (R = t == null ? void 0 : t.bg) != null && R.rgb ? t.bg.rgb : p;
5255
+ }), y = o.get("BoldSingle"), w = o.get("ItalicSingle"), C = o.get("UnderlineSingle"), x = o.get("StrikethroughSingle");
5258
5256
  return ve(() => {
5259
5257
  const p = {
5260
5258
  bl: i,
@@ -5262,87 +5260,87 @@ const zd = (e) => {
5262
5260
  };
5263
5261
  g !== void 0 && (p.cl = { rgb: g }), S !== void 0 && (p.bg = { rgb: S }), h !== void 0 && (p.st = { s: h }), c !== void 0 && (p.ul = { s: c }), n(da(p));
5264
5262
  }, [i, l, c, h, g, S]), /* @__PURE__ */ d.jsxs("div", { className: `${Qe.cfStyleEdit} ${r}`, children: [
5265
- v && /* @__PURE__ */ d.jsx("div", { className: ct({ [Qe.isActive]: Pn(i || He.FALSE) }, Qe.buttonItem), onClick: () => s(En(i)), children: /* @__PURE__ */ d.jsx(v, {}) }),
5266
- _ && /* @__PURE__ */ d.jsx("div", { className: ct({ [Qe.isActive]: Pn(l || He.FALSE) }, Qe.buttonItem), onClick: () => a(En(l)), children: /* @__PURE__ */ d.jsx(_, {}) }),
5263
+ y && /* @__PURE__ */ d.jsx("div", { className: ct({ [Qe.isActive]: Pn(i || He.FALSE) }, Qe.buttonItem), onClick: () => s(En(i)), children: /* @__PURE__ */ d.jsx(y, {}) }),
5264
+ w && /* @__PURE__ */ d.jsx("div", { className: ct({ [Qe.isActive]: Pn(l || He.FALSE) }, Qe.buttonItem), onClick: () => a(En(l)), children: /* @__PURE__ */ d.jsx(w, {}) }),
5267
5265
  C && /* @__PURE__ */ d.jsx("div", { className: ct({ [Qe.isActive]: Pn(c || He.FALSE) }, Qe.buttonItem), onClick: () => u(En(c)), children: /* @__PURE__ */ d.jsx(C, {}) }),
5268
- w && /* @__PURE__ */ d.jsx("div", { className: ct({ [Qe.isActive]: Pn(h || He.FALSE) }, Qe.buttonItem), onClick: () => f(En(h)), children: /* @__PURE__ */ d.jsx(w, {}) }),
5266
+ x && /* @__PURE__ */ d.jsx("div", { className: ct({ [Qe.isActive]: Pn(h || He.FALSE) }, Qe.buttonItem), onClick: () => f(En(h)), children: /* @__PURE__ */ d.jsx(x, {}) }),
5269
5267
  /* @__PURE__ */ d.jsx(_t, { color: g, onChange: m, iconId: "FontColor" }),
5270
5268
  /* @__PURE__ */ d.jsx(_t, { color: S, onChange: I, iconId: "PaintBucket" })
5271
5269
  ] });
5272
5270
  }, Cf = (e) => {
5273
5271
  var I;
5274
- const { onChange: t, interceptorManager: n } = e, r = oe($e), o = ((I = e.rule) == null ? void 0 : I.type) === L.highlightCell ? e.rule : void 0, i = [
5272
+ const { onChange: t, interceptorManager: n } = e, r = oe($e), o = ((I = e.rule) == null ? void 0 : I.type) === j.highlightCell ? e.rule : void 0, i = [
5275
5273
  { label: r.t("sheet.cf.panel.isNotBottom"), value: "isNotBottom" },
5276
5274
  { label: r.t("sheet.cf.panel.isBottom"), value: "isBottom" },
5277
5275
  { label: r.t("sheet.cf.panel.greaterThanAverage"), value: "greaterThanAverage" },
5278
5276
  { label: r.t("sheet.cf.panel.lessThanAverage"), value: "lessThanAverage" }
5279
5277
  ], [s, l] = M(() => {
5280
- const v = i[0].value, _ = o == null ? void 0 : o.type;
5278
+ const y = i[0].value, w = o == null ? void 0 : o.type;
5281
5279
  if (!o)
5282
- return v;
5283
- switch (_) {
5284
- case L.highlightCell:
5280
+ return y;
5281
+ switch (w) {
5282
+ case j.highlightCell:
5285
5283
  switch (o.subType) {
5286
- case j.average:
5287
- return [F.greaterThan, F.greaterThanOrEqual].includes(o.operator) ? "greaterThanAverage" : [F.lessThan, F.lessThanOrEqual].includes(o.operator) ? "lessThanAverage" : v;
5288
- case j.rank:
5284
+ case N.average:
5285
+ return [F.greaterThan, F.greaterThanOrEqual].includes(o.operator) ? "greaterThanAverage" : [F.lessThan, F.lessThanOrEqual].includes(o.operator) ? "lessThanAverage" : y;
5286
+ case N.rank:
5289
5287
  return o.isBottom ? "isBottom" : "isNotBottom";
5290
5288
  }
5291
5289
  }
5292
- return v;
5290
+ return y;
5293
5291
  }), [a, c] = M(() => {
5294
- const _ = o == null ? void 0 : o.type;
5292
+ const w = o == null ? void 0 : o.type;
5295
5293
  if (!o)
5296
5294
  return 10;
5297
- switch (_) {
5298
- case L.highlightCell:
5295
+ switch (w) {
5296
+ case j.highlightCell:
5299
5297
  switch (o.subType) {
5300
- case j.rank:
5298
+ case N.rank:
5301
5299
  return o.value || 10;
5302
5300
  }
5303
5301
  }
5304
5302
  return 10;
5305
5303
  }), [u, h] = M(() => {
5306
- const _ = o == null ? void 0 : o.type;
5304
+ const w = o == null ? void 0 : o.type;
5307
5305
  if (!o)
5308
5306
  return !1;
5309
- switch (_) {
5310
- case L.highlightCell:
5307
+ switch (w) {
5308
+ case j.highlightCell:
5311
5309
  switch (o.subType) {
5312
- case j.rank:
5310
+ case N.rank:
5313
5311
  return o.isPercent || !1;
5314
5312
  }
5315
5313
  }
5316
5314
  return !1;
5317
- }), [f, g] = M({}), m = (v) => {
5318
- const { type: _, isPercent: C, value: w, style: p } = v;
5319
- if (_ === "isNotBottom")
5320
- return { type: L.highlightCell, subType: j.rank, isPercent: C, isBottom: !1, value: w, style: p };
5321
- if (_ === "isBottom")
5322
- return { type: L.highlightCell, subType: j.rank, isPercent: C, isBottom: !0, value: w, style: p };
5323
- if (_ === "greaterThanAverage")
5324
- return { type: L.highlightCell, subType: j.average, operator: F.greaterThan, style: p };
5325
- if (_ === "lessThanAverage")
5326
- return { type: L.highlightCell, subType: j.average, operator: F.lessThan, style: p };
5315
+ }), [f, g] = M({}), m = (y) => {
5316
+ const { type: w, isPercent: C, value: x, style: p } = y;
5317
+ if (w === "isNotBottom")
5318
+ return { type: j.highlightCell, subType: N.rank, isPercent: C, isBottom: !1, value: x, style: p };
5319
+ if (w === "isBottom")
5320
+ return { type: j.highlightCell, subType: N.rank, isPercent: C, isBottom: !0, value: x, style: p };
5321
+ if (w === "greaterThanAverage")
5322
+ return { type: j.highlightCell, subType: N.average, operator: F.greaterThan, style: p };
5323
+ if (w === "lessThanAverage")
5324
+ return { type: j.highlightCell, subType: N.average, operator: F.lessThan, style: p };
5327
5325
  };
5328
5326
  ve(() => n.intercept(n.getInterceptPoints().submit, {
5329
5327
  handler() {
5330
5328
  return m({ type: s, isPercent: u, value: a, style: f });
5331
5329
  }
5332
5330
  }), [s, u, a, f, n]);
5333
- const S = (v) => {
5334
- t(m(v));
5331
+ const S = (y) => {
5332
+ t(m(y));
5335
5333
  };
5336
5334
  return /* @__PURE__ */ d.jsxs("div", { children: [
5337
5335
  /* @__PURE__ */ d.jsx("div", { className: `${O.title} ${O.mTBase}`, children: r.t("sheet.cf.panel.styleRule") }),
5338
5336
  /* @__PURE__ */ d.jsx(
5339
5337
  Ve,
5340
5338
  {
5341
- className: `${D.width100} ${O.mTSm}`,
5339
+ className: `${$.width100} ${O.mTSm}`,
5342
5340
  value: s,
5343
5341
  options: i,
5344
- onChange: (v) => {
5345
- l(v), S({ type: v, isPercent: u, value: a, style: f });
5342
+ onChange: (y) => {
5343
+ l(y), S({ type: y, isPercent: u, value: a, style: f });
5346
5344
  }
5347
5345
  }
5348
5346
  ),
@@ -5353,33 +5351,33 @@ const zd = (e) => {
5353
5351
  min: 1,
5354
5352
  max: 1e3,
5355
5353
  value: a,
5356
- onChange: (v) => {
5357
- const _ = v || 0;
5358
- c(_), S({ type: s, isPercent: u, value: _, style: f });
5354
+ onChange: (y) => {
5355
+ const w = y || 0;
5356
+ c(w), S({ type: s, isPercent: u, value: w, style: f });
5359
5357
  }
5360
5358
  }
5361
5359
  ),
5362
- /* @__PURE__ */ d.jsxs("div", { className: `${O.mLSm} ${O.labelContainer} ${D.text}`, children: [
5360
+ /* @__PURE__ */ d.jsxs("div", { className: `${O.mLSm} ${O.labelContainer} ${$.text}`, children: [
5363
5361
  /* @__PURE__ */ d.jsx(
5364
5362
  zn,
5365
5363
  {
5366
5364
  checked: u,
5367
- onChange: (v) => {
5368
- h(!!v), S({ type: s, isPercent: !!v, value: a, style: f });
5365
+ onChange: (y) => {
5366
+ h(!!y), S({ type: s, isPercent: !!y, value: a, style: f });
5369
5367
  }
5370
5368
  }
5371
5369
  ),
5372
5370
  r.t("sheet.cf.valueType.percent")
5373
5371
  ] })
5374
5372
  ] }),
5375
- /* @__PURE__ */ d.jsx("div", { className: `${D.cfPreviewWrap} `, children: /* @__PURE__ */ d.jsx(Kt, { rule: m({ type: s, isPercent: u, value: a, style: f }) }) }),
5373
+ /* @__PURE__ */ d.jsx("div", { className: `${$.cfPreviewWrap} `, children: /* @__PURE__ */ d.jsx(Kt, { rule: m({ type: s, isPercent: u, value: a, style: f }) }) }),
5376
5374
  /* @__PURE__ */ d.jsx(
5377
5375
  _o,
5378
5376
  {
5379
5377
  style: o == null ? void 0 : o.style,
5380
5378
  className: `${O.mTSm} `,
5381
- onChange: (v) => {
5382
- g(v), S({ type: s, isPercent: u, value: a, style: v });
5379
+ onChange: (y) => {
5380
+ g(y), S({ type: s, isPercent: u, value: a, style: y });
5383
5381
  }
5384
5382
  }
5385
5383
  )
@@ -5400,10 +5398,10 @@ const zd = (e) => {
5400
5398
  ),
5401
5399
  e.children
5402
5400
  ] }), ne = (e, t) => ({ label: t.t(`sheet.cf.operator.${e}`), value: e }), _f = (e) => {
5403
- const { type: t, operator: n, onChange: r, value: o, interceptorManager: i } = e, s = oe($e), [l, a] = M(() => typeof o == "number" ? o : 0), [c, u] = M(""), [h, f] = M(() => typeof o == "string" ? o : ""), [g, m] = M(""), [S, I] = M(() => Array.isArray(o) ? o[0] === void 0 ? 0 : o[0] : 0), [v, _] = M(""), [C, w] = M(() => Array.isArray(o) ? o[1] === void 0 ? 100 : o[1] : 100), [p, x] = M("");
5401
+ const { type: t, operator: n, onChange: r, value: o, interceptorManager: i } = e, s = oe($e), [l, a] = M(() => typeof o == "number" ? o : 0), [c, u] = M(""), [h, f] = M(() => typeof o == "string" ? o : ""), [g, m] = M(""), [S, I] = M(() => Array.isArray(o) ? o[0] === void 0 ? 0 : o[0] : 0), [y, w] = M(""), [C, x] = M(() => Array.isArray(o) ? o[1] === void 0 ? 100 : o[1] : 100), [p, R] = M("");
5404
5402
  switch (ve(() => {
5405
5403
  switch (t) {
5406
- case j.text: {
5404
+ case N.text: {
5407
5405
  [
5408
5406
  X.beginsWith,
5409
5407
  X.endsWith,
@@ -5414,7 +5412,7 @@ const zd = (e) => {
5414
5412
  ].includes(n) && r(h);
5415
5413
  break;
5416
5414
  }
5417
- case j.number: {
5415
+ case N.number: {
5418
5416
  [
5419
5417
  F.equal,
5420
5418
  F.notEqual,
@@ -5427,20 +5425,20 @@ const zd = (e) => {
5427
5425
  }
5428
5426
  }
5429
5427
  }, [t]), ve(() => {
5430
- const R = i.intercept(i.getInterceptPoints().beforeSubmit, {
5431
- handler: (y, E, $) => {
5428
+ const _ = i.intercept(i.getInterceptPoints().beforeSubmit, {
5429
+ handler: (b, E, D) => {
5432
5430
  switch (t) {
5433
- case j.text:
5434
- return X.beginsWith, X.containsText, X.endsWith, X.notEqual, X.notContainsText, X.equal, h ? $(y) : (m(s.t("sheet.cf.errorMessage.notBlank")), !1);
5431
+ case N.text:
5432
+ return X.beginsWith, X.containsText, X.endsWith, X.notEqual, X.notContainsText, X.equal, h ? D(b) : (m(s.t("sheet.cf.errorMessage.notBlank")), !1);
5435
5433
  }
5436
- return $(y);
5434
+ return D(b);
5437
5435
  }
5438
5436
  });
5439
5437
  return () => {
5440
- R();
5438
+ _();
5441
5439
  };
5442
5440
  }, [t, l, h, S, C]), t) {
5443
- case j.text: {
5441
+ case N.text: {
5444
5442
  if ([
5445
5443
  X.beginsWith,
5446
5444
  X.endsWith,
@@ -5449,23 +5447,23 @@ const zd = (e) => {
5449
5447
  X.equal,
5450
5448
  X.notEqual
5451
5449
  ].includes(n)) {
5452
- const R = (y) => {
5453
- f(y), r(y);
5450
+ const _ = (b) => {
5451
+ f(b), r(b);
5454
5452
  };
5455
5453
  return /* @__PURE__ */ d.jsx("div", { className: `${O.mTSm}`, children: /* @__PURE__ */ d.jsx(ln, { errorText: g, children: /* @__PURE__ */ d.jsx(
5456
5454
  Ka,
5457
5455
  {
5458
- className: D.width100,
5456
+ className: $.width100,
5459
5457
  value: h,
5460
- onChange: (y) => {
5461
- m(""), R(y);
5458
+ onChange: (b) => {
5459
+ m(""), _(b);
5462
5460
  }
5463
5461
  }
5464
5462
  ) }) });
5465
5463
  }
5466
5464
  break;
5467
5465
  }
5468
- case j.number: {
5466
+ case N.number: {
5469
5467
  if ([
5470
5468
  F.equal,
5471
5469
  F.notEqual,
@@ -5474,20 +5472,20 @@ const zd = (e) => {
5474
5472
  F.lessThan,
5475
5473
  F.lessThanOrEqual
5476
5474
  ].includes(n)) {
5477
- const R = (y) => {
5478
- a(y || 0), r(y || 0), u("");
5475
+ const _ = (b) => {
5476
+ a(b || 0), r(b || 0), u("");
5479
5477
  };
5480
- return /* @__PURE__ */ d.jsx("div", { className: `${O.mTSm}`, children: /* @__PURE__ */ d.jsx(ln, { errorText: c, children: /* @__PURE__ */ d.jsx(St, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, className: D.width100, value: l, onChange: R }) }) });
5478
+ return /* @__PURE__ */ d.jsx("div", { className: `${O.mTSm}`, children: /* @__PURE__ */ d.jsx(ln, { errorText: c, children: /* @__PURE__ */ d.jsx(St, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, className: $.width100, value: l, onChange: _ }) }) });
5481
5479
  }
5482
5480
  if ([F.between, F.notBetween].includes(n)) {
5483
- const R = (E) => {
5484
- I(E || 0), r([E || 0, C]), _("");
5485
- }, y = (E) => {
5486
- w(E || 0), r([S, E || 0]), x("");
5481
+ const _ = (E) => {
5482
+ I(E || 0), r([E || 0, C]), w("");
5483
+ }, b = (E) => {
5484
+ x(E || 0), r([S, E || 0]), R("");
5487
5485
  };
5488
5486
  return /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${O.labelContainer} `, children: [
5489
- /* @__PURE__ */ d.jsx(ln, { errorText: v, children: /* @__PURE__ */ d.jsx(St, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, value: S, onChange: R }) }),
5490
- /* @__PURE__ */ d.jsx(ln, { errorText: p, children: /* @__PURE__ */ d.jsx(St, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, className: `${O.mLSm}`, value: C, onChange: y }) })
5487
+ /* @__PURE__ */ d.jsx(ln, { errorText: y, children: /* @__PURE__ */ d.jsx(St, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, value: S, onChange: _ }) }),
5488
+ /* @__PURE__ */ d.jsx(ln, { errorText: p, children: /* @__PURE__ */ d.jsx(St, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, className: `${O.mLSm}`, value: C, onChange: b }) })
5491
5489
  ] });
5492
5490
  }
5493
5491
  }
@@ -5495,7 +5493,7 @@ const zd = (e) => {
5495
5493
  return null;
5496
5494
  }, ti = (e, t) => {
5497
5495
  switch (e) {
5498
- case j.text:
5496
+ case N.text:
5499
5497
  return [
5500
5498
  ne(X.containsText, t),
5501
5499
  ne(X.notContainsText, t),
@@ -5508,7 +5506,7 @@ const zd = (e) => {
5508
5506
  ne(X.containsErrors, t),
5509
5507
  ne(X.notContainsErrors, t)
5510
5508
  ];
5511
- case j.number:
5509
+ case N.number:
5512
5510
  return [
5513
5511
  ne(F.between, t),
5514
5512
  ne(F.notBetween, t),
@@ -5519,7 +5517,7 @@ const zd = (e) => {
5519
5517
  ne(F.lessThan, t),
5520
5518
  ne(F.lessThanOrEqual, t)
5521
5519
  ];
5522
- case j.timePeriod:
5520
+ case N.timePeriod:
5523
5521
  return [
5524
5522
  ne(Ge.yesterday, t),
5525
5523
  ne(Ge.today, t),
@@ -5534,42 +5532,42 @@ const zd = (e) => {
5534
5532
  ];
5535
5533
  }
5536
5534
  }, ni = (e) => {
5537
- var w;
5538
- const { interceptorManager: t, onChange: n } = e, r = oe($e), o = ((w = e.rule) == null ? void 0 : w.type) === L.highlightCell ? e.rule : void 0, [i, s] = M(() => {
5539
- const p = j.text;
5535
+ var x;
5536
+ const { interceptorManager: t, onChange: n } = e, r = oe($e), o = ((x = e.rule) == null ? void 0 : x.type) === j.highlightCell ? e.rule : void 0, [i, s] = M(() => {
5537
+ const p = N.text;
5540
5538
  return o && o.subType || p;
5541
5539
  }), l = [
5542
5540
  {
5543
- value: j.text,
5541
+ value: N.text,
5544
5542
  label: r.t("sheet.cf.subRuleType.text")
5545
5543
  },
5546
5544
  {
5547
- value: j.number,
5545
+ value: N.number,
5548
5546
  label: r.t("sheet.cf.subRuleType.number")
5549
5547
  },
5550
5548
  {
5551
- value: j.timePeriod,
5549
+ value: N.timePeriod,
5552
5550
  label: r.t("sheet.cf.subRuleType.timePeriod")
5553
5551
  },
5554
5552
  {
5555
- value: j.duplicateValues,
5553
+ value: N.duplicateValues,
5556
5554
  label: r.t("sheet.cf.subRuleType.duplicateValues")
5557
5555
  },
5558
5556
  {
5559
- value: j.uniqueValues,
5557
+ value: N.uniqueValues,
5560
5558
  label: r.t("sheet.cf.subRuleType.uniqueValues")
5561
5559
  }
5562
5560
  ], a = be(() => ti(i, r), [i]), [c, u] = M(() => {
5563
5561
  const p = a ? a[0].value : void 0;
5564
5562
  return o && o.operator || p;
5565
5563
  }), [h, f] = M(() => {
5566
- var R;
5564
+ var _;
5567
5565
  const p = "";
5568
- return o ? (R = o.value) != null ? R : Pr(o.subType, o.operator) : p;
5566
+ return o ? (_ = o.value) != null ? _ : Pr(o.subType, o.operator) : p;
5569
5567
  }), [g, m] = M({}), S = be(() => (p) => {
5570
- var x, R, y, E, $, N, W, b, T, ee, Oe, Se, Ce, We, H;
5568
+ var R, _, b, E, D, L, W, v, T, ee, Oe, Se, Ce, We, H;
5571
5569
  switch (p.subType || i) {
5572
- case j.text: {
5570
+ case N.text: {
5573
5571
  if ([
5574
5572
  X.beginsWith,
5575
5573
  X.endsWith,
@@ -5579,15 +5577,15 @@ const zd = (e) => {
5579
5577
  X.notEqual
5580
5578
  ].includes(c))
5581
5579
  return {
5582
- type: L.highlightCell,
5583
- subType: (x = p.subType) != null ? x : i,
5584
- operator: (R = p.operator) != null ? R : c,
5585
- style: (y = p.style) != null ? y : g,
5580
+ type: j.highlightCell,
5581
+ subType: (R = p.subType) != null ? R : i,
5582
+ operator: (_ = p.operator) != null ? _ : c,
5583
+ style: (b = p.style) != null ? b : g,
5586
5584
  value: (E = p.value) != null ? E : h
5587
5585
  };
5588
5586
  break;
5589
5587
  }
5590
- case j.number: {
5588
+ case N.number: {
5591
5589
  if ([
5592
5590
  F.equal,
5593
5591
  F.notEqual,
@@ -5597,15 +5595,15 @@ const zd = (e) => {
5597
5595
  F.lessThanOrEqual
5598
5596
  ].includes(c))
5599
5597
  return {
5600
- type: L.highlightCell,
5601
- subType: ($ = p.subType) != null ? $ : i,
5602
- operator: (N = p.operator) != null ? N : c,
5598
+ type: j.highlightCell,
5599
+ subType: (D = p.subType) != null ? D : i,
5600
+ operator: (L = p.operator) != null ? L : c,
5603
5601
  style: (W = p.style) != null ? W : g,
5604
- value: (b = p.value) != null ? b : h
5602
+ value: (v = p.value) != null ? v : h
5605
5603
  };
5606
5604
  if ([F.between, F.notBetween].includes(c))
5607
5605
  return {
5608
- type: L.highlightCell,
5606
+ type: j.highlightCell,
5609
5607
  subType: (T = p.subType) != null ? T : i,
5610
5608
  operator: (ee = p.operator) != null ? ee : c,
5611
5609
  style: (Oe = p.style) != null ? Oe : g,
@@ -5615,7 +5613,7 @@ const zd = (e) => {
5615
5613
  }
5616
5614
  }
5617
5615
  return {
5618
- type: L.highlightCell,
5616
+ type: j.highlightCell,
5619
5617
  subType: (Ce = p.subType) != null ? Ce : i,
5620
5618
  operator: (We = p.operator) != null ? We : c,
5621
5619
  style: (H = p.style) != null ? H : g
@@ -5629,20 +5627,20 @@ const zd = (e) => {
5629
5627
  l.some((p) => p.value === i) || s(l[0].value);
5630
5628
  }, [l]);
5631
5629
  const I = (p) => {
5632
- const x = p, R = ti(x, r), y = R && R[0].value;
5633
- s(x), u(y), y && f(Pr(x, y)), n(S({ subType: x, operator: y }));
5634
- }, v = (p) => {
5635
- const x = p;
5636
- u(x), n(S({ operator: x }));
5637
- }, _ = (p) => {
5630
+ const R = p, _ = ti(R, r), b = _ && _[0].value;
5631
+ s(R), u(b), b && f(Pr(R, b)), n(S({ subType: R, operator: b }));
5632
+ }, y = (p) => {
5633
+ const R = p;
5634
+ u(R), n(S({ operator: R }));
5635
+ }, w = (p) => {
5638
5636
  f(p), n(S({ value: p }));
5639
5637
  }, C = be(() => `${i}_${c}_${Math.random()}`, [i, c]);
5640
5638
  return /* @__PURE__ */ d.jsxs("div", { children: [
5641
5639
  /* @__PURE__ */ d.jsx("div", { className: `${O.title} ${O.mTBase}`, children: r.t("sheet.cf.panel.styleRule") }),
5642
- /* @__PURE__ */ d.jsx(Ve, { className: `${O.mTSm} ${D.width100}`, onChange: I, value: i, options: l }),
5643
- (a == null ? void 0 : a.length) && /* @__PURE__ */ d.jsx(Ve, { className: `${O.mTSm} ${D.width100}`, onChange: v, value: c || "", options: a }),
5644
- /* @__PURE__ */ d.jsx(_f, { value: h, interceptorManager: t, type: i, operator: c, rule: o, onChange: _ }, C),
5645
- /* @__PURE__ */ d.jsx("div", { className: `${D.cfPreviewWrap}`, children: /* @__PURE__ */ d.jsx(Kt, { rule: S({}) }) }),
5640
+ /* @__PURE__ */ d.jsx(Ve, { className: `${O.mTSm} ${$.width100}`, onChange: I, value: i, options: l }),
5641
+ (a == null ? void 0 : a.length) && /* @__PURE__ */ d.jsx(Ve, { className: `${O.mTSm} ${$.width100}`, onChange: y, value: c || "", options: a }),
5642
+ /* @__PURE__ */ d.jsx(_f, { value: h, interceptorManager: t, type: i, operator: c, rule: o, onChange: w }, C),
5643
+ /* @__PURE__ */ d.jsx("div", { className: `${$.cfPreviewWrap}`, children: /* @__PURE__ */ d.jsx(Kt, { rule: S({}) }) }),
5646
5644
  /* @__PURE__ */ d.jsx(
5647
5645
  _o,
5648
5646
  {
@@ -5656,11 +5654,11 @@ const zd = (e) => {
5656
5654
  ] });
5657
5655
  }, wf = (e) => {
5658
5656
  var I;
5659
- const { onChange: t, interceptorManager: n } = e, r = oe($e), i = oe(re).getCurrentUnitForType(G.UNIVER_SHEET), s = i.getActiveSheet(), l = ((I = e.rule) == null ? void 0 : I.type) === L.highlightCell ? e.rule : void 0, [a, c] = M({}), [u, h] = M(() => (l == null ? void 0 : l.subType) === j.formula ? l.value : "="), [f, g] = M(""), m = (v) => ({
5660
- style: v.style,
5657
+ const { onChange: t, interceptorManager: n } = e, r = oe($e), i = oe(re).getCurrentUnitForType(G.UNIVER_SHEET), s = i.getActiveSheet(), l = ((I = e.rule) == null ? void 0 : I.type) === j.highlightCell ? e.rule : void 0, [a, c] = M({}), [u, h] = M(() => (l == null ? void 0 : l.subType) === N.formula ? l.value : "="), [f, g] = M(""), m = (y) => ({
5658
+ style: y.style,
5661
5659
  value: u,
5662
- type: L.highlightCell,
5663
- subType: j.formula
5660
+ type: j.highlightCell,
5661
+ subType: N.formula
5664
5662
  });
5665
5663
  ve(() => n.intercept(n.getInterceptPoints().submit, {
5666
5664
  handler() {
@@ -5668,11 +5666,11 @@ const zd = (e) => {
5668
5666
  }
5669
5667
  }), [a, u, n]), ve(() => {
5670
5668
  n.intercept(n.getInterceptPoints().beforeSubmit, {
5671
- handler: (v, _, C) => !u || u.length === 1 || !f.startsWith("=") ? (g(r.t("sheet.cf.errorMessage.formulaError")), !1) : C(v)
5669
+ handler: (y, w, C) => !u || u.length === 1 || !f.startsWith("=") ? (g(r.t("sheet.cf.errorMessage.formulaError")), !1) : C(y)
5672
5670
  });
5673
5671
  }, [u]);
5674
- const S = (v) => {
5675
- t(m(v));
5672
+ const S = (y) => {
5673
+ t(m(y));
5676
5674
  };
5677
5675
  return /* @__PURE__ */ d.jsxs("div", { children: [
5678
5676
  /* @__PURE__ */ d.jsx("div", { className: `${O.title} ${O.mTBase}`, children: r.t("sheet.cf.panel.styleRule") }),
@@ -5685,20 +5683,20 @@ const zd = (e) => {
5685
5683
  value: u,
5686
5684
  canvasStyle: { fontSize: 10 },
5687
5685
  onlyInputFormula: !0,
5688
- onChange: (v = "") => {
5689
- const _ = v || "";
5690
- h(_), S({ style: a, formula: _ }), g("");
5686
+ onChange: (y = "") => {
5687
+ const w = y || "";
5688
+ h(w), S({ style: a, formula: w }), g("");
5691
5689
  }
5692
5690
  }
5693
5691
  ) }) }),
5694
- /* @__PURE__ */ d.jsx("div", { className: `${D.cfPreviewWrap} `, children: /* @__PURE__ */ d.jsx(Kt, { rule: m({ style: a, formula: u }) }) }),
5692
+ /* @__PURE__ */ d.jsx("div", { className: `${$.cfPreviewWrap} `, children: /* @__PURE__ */ d.jsx(Kt, { rule: m({ style: a, formula: u }) }) }),
5695
5693
  /* @__PURE__ */ d.jsx(
5696
5694
  _o,
5697
5695
  {
5698
5696
  style: l == null ? void 0 : l.style,
5699
5697
  className: `${O.mTSm} `,
5700
- onChange: (v) => {
5701
- c(v), S({ style: v, formula: u });
5698
+ onChange: (y) => {
5699
+ c(y), S({ style: y, formula: u });
5702
5700
  }
5703
5701
  }
5704
5702
  )
@@ -6185,10 +6183,10 @@ function Sp(e, t, n) {
6185
6183
  var Cp = Sp;
6186
6184
  const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || "", wp = (e) => {
6187
6185
  var i;
6188
- const t = oe(re), n = t.getCurrentUnitForType(G.UNIVER_SHEET).getUnitId(), r = (i = t.getCurrentUnitForType(G.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : i.getSheetId(), o = be(() => e.error ? D.errorInput : "", [e.error]);
6189
- return /* @__PURE__ */ d.jsx("div", { className: D.positionRelative, children: e.type !== A.formula ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
6186
+ const t = oe(re), n = t.getCurrentUnitForType(G.UNIVER_SHEET).getUnitId(), r = (i = t.getCurrentUnitForType(G.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : i.getSheetId(), o = be(() => e.error ? $.errorInput : "", [e.error]);
6187
+ return /* @__PURE__ */ d.jsx("div", { className: $.positionRelative, children: e.type !== A.formula ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
6190
6188
  /* @__PURE__ */ d.jsx(St, { className: o, value: Number(e.value) || 0, onChange: (s) => e.onChange(s != null ? s : 0) }),
6191
- e.error && /* @__PURE__ */ d.jsx("div", { className: D.errorText, children: e.error })
6189
+ e.error && /* @__PURE__ */ d.jsx("div", { className: $.errorText, children: e.error })
6192
6190
  ] }) : /* @__PURE__ */ d.jsx(
6193
6191
  Bn,
6194
6192
  {
@@ -6213,11 +6211,11 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6213
6211
  const n = oe($e), r = (o) => {
6214
6212
  e.onClick(o);
6215
6213
  };
6216
- return /* @__PURE__ */ d.jsx("div", { ref: t, className: D.iconGroupList, children: fa.map((o, i) => /* @__PURE__ */ d.jsxs("div", { className: D.group, children: [
6217
- /* @__PURE__ */ d.jsx("div", { className: D.title, children: n.t(o.title) }),
6218
- /* @__PURE__ */ d.jsx("div", { className: D.itemContent, children: o.group.map((s) => /* @__PURE__ */ d.jsx("div", { className: D.itemWrap, onClick: () => {
6214
+ return /* @__PURE__ */ d.jsx("div", { ref: t, className: $.iconGroupList, children: fa.map((o, i) => /* @__PURE__ */ d.jsxs("div", { className: $.group, children: [
6215
+ /* @__PURE__ */ d.jsx("div", { className: $.title, children: n.t(o.title) }),
6216
+ /* @__PURE__ */ d.jsx("div", { className: $.itemContent, children: o.group.map((s) => /* @__PURE__ */ d.jsx("div", { className: $.itemWrap, onClick: () => {
6219
6217
  r(s.name);
6220
- }, children: /* @__PURE__ */ d.jsx("div", { className: D.item, children: s.list.map((l, a) => /* @__PURE__ */ d.jsx("img", { className: D.icon, src: l }, a)) }) }, s.name)) })
6218
+ }, children: /* @__PURE__ */ d.jsx("div", { className: $.item, children: s.list.map((l, a) => /* @__PURE__ */ d.jsx("img", { className: $.icon, src: l }, a)) }) }, s.name)) })
6221
6219
  ] }, i)) });
6222
6220
  }), Rp = (e) => {
6223
6221
  const t = be(() => {
@@ -6236,12 +6234,12 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6236
6234
  }, []), n = (r) => {
6237
6235
  e.onClick(r.iconType, r.iconId);
6238
6236
  };
6239
- return /* @__PURE__ */ d.jsxs("div", { className: D.iconItemListWrap, children: [
6240
- /* @__PURE__ */ d.jsxs("div", { className: D.none, onClick: () => n({ iconType: pa, iconId: "", base64: "" }), children: [
6241
- /* @__PURE__ */ d.jsx(Sn, { className: D.icon }),
6237
+ return /* @__PURE__ */ d.jsxs("div", { className: $.iconItemListWrap, children: [
6238
+ /* @__PURE__ */ d.jsxs("div", { className: $.none, onClick: () => n({ iconType: pa, iconId: "", base64: "" }), children: [
6239
+ /* @__PURE__ */ d.jsx(Sn, { className: $.icon }),
6242
6240
  /* @__PURE__ */ d.jsx("span", { children: "无单元格图标" })
6243
6241
  ] }),
6244
- /* @__PURE__ */ d.jsx("div", { className: D.iconItemList, children: t.map((r) => /* @__PURE__ */ d.jsx("div", { className: D.item, children: /* @__PURE__ */ d.jsx("img", { onClick: () => n(r), className: `${D.icon}`, src: r.base64 }) }, `${r.iconType}_${r.iconId}`)) })
6242
+ /* @__PURE__ */ d.jsx("div", { className: $.iconItemList, children: t.map((r) => /* @__PURE__ */ d.jsx("div", { className: $.item, children: /* @__PURE__ */ d.jsx("img", { onClick: () => n(r), className: `${$.icon}`, src: r.base64 }) }, `${r.iconType}_${r.iconId}`)) })
6245
6243
  ] });
6246
6244
  }, Ip = (e) => {
6247
6245
  const { onChange: t, configList: n, errorMap: r = {} } = e, o = oe($e), i = [
@@ -6256,120 +6254,120 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6256
6254
  t([String(f), "value", "value"], h);
6257
6255
  }, a = (h, f) => {
6258
6256
  t([String(f), "operator"], h);
6259
- const g = Pr(j.number, h);
6257
+ const g = Pr(N.number, h);
6260
6258
  l(g, f);
6261
6259
  }, c = (h, f) => {
6262
6260
  t([String(f), "value", "type"], h);
6263
6261
  };
6264
6262
  return be(() => n.map((h, f) => {
6265
- const g = r[f], m = Zs(h.iconType, h.iconId), S = f === n.length - 1, I = f === 0, v = n[f - 1], _ = (v == null ? void 0 : v.value.type) === A.formula ? o.t("sheet.cf.valueType.formula") : v == null ? void 0 : v.value.value, C = (w, p) => {
6266
- const x = { ...h, iconId: p, iconType: w };
6267
- t([String(f)], x);
6263
+ const g = r[f], m = Zs(h.iconType, h.iconId), S = f === n.length - 1, I = f === 0, y = n[f - 1], w = (y == null ? void 0 : y.value.type) === A.formula ? o.t("sheet.cf.valueType.formula") : y == null ? void 0 : y.value.value, C = (x, p) => {
6264
+ const R = { ...h, iconId: p, iconType: x };
6265
+ t([String(f)], R);
6268
6266
  };
6269
6267
  return /* @__PURE__ */ d.jsxs("div", { className: `${f ? O.mTXl : O.mTSm}`, children: [
6270
- /* @__PURE__ */ d.jsxs("div", { className: `${O.label} ${D.flex}`, children: [
6271
- /* @__PURE__ */ d.jsxs("div", { className: `${D.width45}`, children: [
6268
+ /* @__PURE__ */ d.jsxs("div", { className: `${O.label} ${$.flex}`, children: [
6269
+ /* @__PURE__ */ d.jsxs("div", { className: `${$.width45}`, children: [
6272
6270
  o.t("sheet.cf.iconSet.icon"),
6273
6271
  f + 1
6274
6272
  ] }),
6275
- /* @__PURE__ */ d.jsx("div", { className: `${D.width45}`, children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
6273
+ /* @__PURE__ */ d.jsx("div", { className: `${$.width45}`, children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
6276
6274
  !I && !S && o.t("sheet.cf.iconSet.rule"),
6277
- !I && !S && /* @__PURE__ */ d.jsxs("span", { className: D.stress, children: [
6275
+ !I && !S && /* @__PURE__ */ d.jsxs("span", { className: $.stress, children: [
6278
6276
  "(",
6279
6277
  o.t("sheet.cf.iconSet.when"),
6280
- o.t(`sheet.cf.symbol.${Dr(v.operator)}`),
6281
- _,
6278
+ o.t(`sheet.cf.symbol.${Dr(y.operator)}`),
6279
+ w,
6282
6280
  S ? "" : ` ${o.t("sheet.cf.iconSet.and")} `,
6283
6281
  ")"
6284
6282
  ] })
6285
6283
  ] }) })
6286
6284
  ] }),
6287
- /* @__PURE__ */ d.jsxs("div", { className: `${D.flex} ${O.mTSm}`, children: [
6288
- /* @__PURE__ */ d.jsx("div", { className: `${D.iconWrap} ${D.width45}`, children: /* @__PURE__ */ d.jsx(Xr, { overlay: /* @__PURE__ */ d.jsx(Rp, { onClick: C, iconId: h.iconId, iconType: h.iconType }), children: /* @__PURE__ */ d.jsxs("div", { className: D.dropdownIcon, children: [
6289
- m ? /* @__PURE__ */ d.jsx("img", { src: m, className: D.icon }) : /* @__PURE__ */ d.jsx(Sn, { className: D.icon }),
6285
+ /* @__PURE__ */ d.jsxs("div", { className: `${$.flex} ${O.mTSm}`, children: [
6286
+ /* @__PURE__ */ d.jsx("div", { className: `${$.iconWrap} ${$.width45}`, children: /* @__PURE__ */ d.jsx(Xr, { overlay: /* @__PURE__ */ d.jsx(Rp, { onClick: C, iconId: h.iconId, iconType: h.iconType }), children: /* @__PURE__ */ d.jsxs("div", { className: $.dropdownIcon, children: [
6287
+ m ? /* @__PURE__ */ d.jsx("img", { src: m, className: $.icon }) : /* @__PURE__ */ d.jsx(Sn, { className: $.icon }),
6290
6288
  /* @__PURE__ */ d.jsx(Yn, {})
6291
6289
  ] }) }) }),
6292
- S ? /* @__PURE__ */ d.jsxs("div", { className: `${D.width45} ${O.label}`, style: { marginTop: 0 }, children: [
6290
+ S ? /* @__PURE__ */ d.jsxs("div", { className: `${$.width45} ${O.label}`, style: { marginTop: 0 }, children: [
6293
6291
  o.t("sheet.cf.iconSet.rule"),
6294
- /* @__PURE__ */ d.jsxs("span", { className: D.stress, children: [
6292
+ /* @__PURE__ */ d.jsxs("span", { className: $.stress, children: [
6295
6293
  "(",
6296
6294
  o.t("sheet.cf.iconSet.when"),
6297
- o.t(`sheet.cf.symbol.${Dr(v.operator)}`),
6298
- _,
6295
+ o.t(`sheet.cf.symbol.${Dr(y.operator)}`),
6296
+ w,
6299
6297
  S ? "" : ` ${o.t("sheet.cf.iconSet.and")} `,
6300
6298
  ")"
6301
6299
  ] })
6302
- ] }) : /* @__PURE__ */ d.jsx(Ve, { className: `${O.mL0} ${D.width45} ${O.mR0}`, options: i, value: h.operator, onChange: (w) => {
6303
- a(w, f);
6300
+ ] }) : /* @__PURE__ */ d.jsx(Ve, { className: `${O.mL0} ${$.width45} ${O.mR0}`, options: i, value: h.operator, onChange: (x) => {
6301
+ a(x, f);
6304
6302
  } })
6305
6303
  ] }),
6306
6304
  S ? /* @__PURE__ */ d.jsx("div", {}) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
6307
- /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${O.label} ${D.flex}`, children: [
6308
- /* @__PURE__ */ d.jsx("div", { className: `${D.width45}`, children: o.t("sheet.cf.iconSet.type") }),
6309
- /* @__PURE__ */ d.jsx("div", { className: `${D.width45}`, children: o.t("sheet.cf.iconSet.value") })
6305
+ /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${O.label} ${$.flex}`, children: [
6306
+ /* @__PURE__ */ d.jsx("div", { className: `${$.width45}`, children: o.t("sheet.cf.iconSet.type") }),
6307
+ /* @__PURE__ */ d.jsx("div", { className: `${$.width45}`, children: o.t("sheet.cf.iconSet.value") })
6310
6308
  ] }),
6311
- /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${D.flex}`, children: [
6312
- /* @__PURE__ */ d.jsx(Ve, { className: `${D.width45} ${O.mL0}`, options: s, value: h.value.type, onChange: (w) => {
6313
- c(w, f);
6309
+ /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${$.flex}`, children: [
6310
+ /* @__PURE__ */ d.jsx(Ve, { className: `${$.width45} ${O.mL0}`, options: s, value: h.value.type, onChange: (x) => {
6311
+ c(x, f);
6314
6312
  } }),
6315
- /* @__PURE__ */ d.jsx("div", { className: `${O.mL0} ${D.width45}`, children: /* @__PURE__ */ d.jsx(wp, { id: f, type: h.value.type, error: g, value: h.value.value || "", onChange: (w) => l(w, f) }) })
6313
+ /* @__PURE__ */ d.jsx("div", { className: `${O.mL0} ${$.width45}`, children: /* @__PURE__ */ d.jsx(wp, { id: f, type: h.value.type, error: g, value: h.value.value || "", onChange: (x) => l(x, f) }) })
6316
6314
  ] })
6317
6315
  ] })
6318
6316
  ] }, f);
6319
6317
  }), [n, r]);
6320
6318
  }, Tp = (e) => {
6321
- var w;
6322
- const { interceptorManager: t } = e, n = ((w = e.rule) == null ? void 0 : w.type) === L.iconSet ? e.rule : void 0, r = oe($e), [o, i] = M({}), [s, l] = M(() => {
6319
+ var x;
6320
+ const { interceptorManager: t } = e, n = ((x = e.rule) == null ? void 0 : x.type) === j.iconSet ? e.rule : void 0, r = oe($e), [o, i] = M({}), [s, l] = M(() => {
6323
6321
  const p = Object.keys(bt)[0];
6324
6322
  if (n && n.config.length) {
6325
- const x = n.config[0].iconType;
6326
- if (!n.config.some((y) => y.iconType !== x))
6327
- return x;
6323
+ const R = n.config[0].iconType;
6324
+ if (!n.config.some((b) => b.iconType !== R))
6325
+ return R;
6328
6326
  }
6329
6327
  return p;
6330
6328
  }), [a, c] = M(() => {
6331
6329
  if (n && n.config.length)
6332
6330
  return bn.deepClone(n == null ? void 0 : n.config);
6333
6331
  const p = bt[s] || [];
6334
- return new Array(p.length).fill("").map((x, R, y) => R === y.length - 1 ? {
6332
+ return new Array(p.length).fill("").map((R, _, b) => _ === b.length - 1 ? {
6335
6333
  operator: F.lessThanOrEqual,
6336
6334
  value: { type: A.num, value: Number.MAX_SAFE_INTEGER },
6337
6335
  iconType: s,
6338
- iconId: String(R)
6339
- } : di(s, R, y));
6336
+ iconId: String(_)
6337
+ } : di(s, _, b));
6340
6338
  }), [u, h] = M(() => n ? !!n.isShowValue : !0), f = be(() => {
6341
- const p = a.map((x) => Zs(x.iconType, x.iconId));
6342
- return /* @__PURE__ */ d.jsx("div", { className: D.iconWrap, children: p.map((x, R) => x ? /* @__PURE__ */ d.jsx("img", { className: D.icon, src: x }, R) : /* @__PURE__ */ d.jsx(Sn, { className: D.icon }, R)) });
6339
+ const p = a.map((R) => Zs(R.iconType, R.iconId));
6340
+ return /* @__PURE__ */ d.jsx("div", { className: $.iconWrap, children: p.map((R, _) => R ? /* @__PURE__ */ d.jsx("img", { className: $.icon, src: R }, _) : /* @__PURE__ */ d.jsx(Sn, { className: $.icon }, _)) });
6343
6341
  }, [a]), g = (p) => {
6344
- if (p.reduce((R, y, E) => R.preType && !R.result || p.length - 1 === E ? R : y.value.type === A.formula ? {
6342
+ if (p.reduce((_, b, E) => _.preType && !_.result || p.length - 1 === E ? _ : b.value.type === A.formula ? {
6345
6343
  preType: A.formula,
6346
6344
  result: !1
6347
- } : R.preType ? {
6348
- result: R.preType === y.value.type,
6349
- preType: y.value.type
6345
+ } : _.preType ? {
6346
+ result: _.preType === b.value.type,
6347
+ preType: b.value.type
6350
6348
  } : {
6351
6349
  result: !0,
6352
- preType: y.value.type
6350
+ preType: b.value.type
6353
6351
  }, { result: !0, preType: "" }).result && [A.num, A.percent, A.percentile].includes(p[0].value.type)) {
6354
- const R = {};
6355
- return p.forEach((y, E, $) => {
6356
- if (E - 1 < 0 || E === $.length - 1)
6352
+ const _ = {};
6353
+ return p.forEach((b, E, D) => {
6354
+ if (E - 1 < 0 || E === D.length - 1)
6357
6355
  return;
6358
- const W = p[E - 1], b = Dr(W.operator);
6359
- ha({ operator: b, value: W.value.value }, y.value.value) || (R[E] = `${r.t(`sheet.cf.form.${b}`, String(W.value.value))} `);
6360
- }), R;
6356
+ const W = p[E - 1], v = Dr(W.operator);
6357
+ ha({ operator: v, value: W.value.value }, b.value.value) || (_[E] = `${r.t(`sheet.cf.form.${v}`, String(W.value.value))} `);
6358
+ }), _;
6361
6359
  }
6362
6360
  return {};
6363
- }, m = (p, x) => {
6364
- _p(a, p) !== x && (xh(a, p, x), c([...a]), i(g(a)));
6361
+ }, m = (p, R) => {
6362
+ _p(a, p) !== R && (xh(a, p, R), c([...a]), i(g(a)));
6365
6363
  }, S = (p) => {
6366
6364
  l(p);
6367
- const x = bt[p] || [], R = new Array(x.length).fill("").map((y, E, $) => di(p, E, $));
6368
- c(R), i(g(R));
6365
+ const R = bt[p] || [], _ = new Array(R.length).fill("").map((b, E, D) => di(p, E, D));
6366
+ c(_), i(g(_));
6369
6367
  };
6370
6368
  ve(() => {
6371
6369
  const p = t.intercept(t.getInterceptPoints().submit, { handler() {
6372
- return { type: L.iconSet, isShowValue: u, config: a };
6370
+ return { type: j.iconSet, isShowValue: u, config: a };
6373
6371
  } });
6374
6372
  return () => {
6375
6373
  p();
@@ -6383,24 +6381,24 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6383
6381
  };
6384
6382
  }, [u, a, t, o]);
6385
6383
  const I = () => {
6386
- const p = a.map((x) => ({ ...x }));
6387
- a.forEach((x, R) => {
6388
- const y = a.length - 1 - R, E = p[y];
6389
- x.iconId = E.iconId, x.iconType = E.iconType;
6384
+ const p = a.map((R) => ({ ...R }));
6385
+ a.forEach((R, _) => {
6386
+ const b = a.length - 1 - _, E = p[b];
6387
+ R.iconId = E.iconId, R.iconType = E.iconType;
6390
6388
  }), c([...a]);
6391
- }, v = oe(Ma), [_, C] = M();
6392
- return Na(_, v.rootContainerElement), /* @__PURE__ */ d.jsxs("div", { className: D.iconSet, children: [
6389
+ }, y = oe(Ma), [w, C] = M();
6390
+ return Na(w, y.rootContainerElement), /* @__PURE__ */ d.jsxs("div", { className: $.iconSet, children: [
6393
6391
  /* @__PURE__ */ d.jsx("div", { className: O.title, children: r.t("sheet.cf.panel.styleRule") }),
6394
- /* @__PURE__ */ d.jsx("div", { className: `${O.mTSm}`, children: /* @__PURE__ */ d.jsx(Xr, { placement: "bottomLeft", overlay: /* @__PURE__ */ d.jsx(xp, { ref: (p) => !_ && p && C(p), iconType: s, onClick: S }), children: /* @__PURE__ */ d.jsxs("div", { className: D.dropdownIcon, style: { width: "unset" }, children: [
6392
+ /* @__PURE__ */ d.jsx("div", { className: `${O.mTSm}`, children: /* @__PURE__ */ d.jsx(Xr, { placement: "bottomLeft", overlay: /* @__PURE__ */ d.jsx(xp, { ref: (p) => !w && p && C(p), iconType: s, onClick: S }), children: /* @__PURE__ */ d.jsxs("div", { className: $.dropdownIcon, style: { width: "unset" }, children: [
6395
6393
  f,
6396
6394
  /* @__PURE__ */ d.jsx(Yn, {})
6397
6395
  ] }) }) }),
6398
- /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${D.renderConfig}`, children: [
6399
- /* @__PURE__ */ d.jsxs("div", { className: D.utilItem, children: [
6396
+ /* @__PURE__ */ d.jsxs("div", { className: `${O.mTSm} ${$.renderConfig}`, children: [
6397
+ /* @__PURE__ */ d.jsxs("div", { className: $.utilItem, children: [
6400
6398
  /* @__PURE__ */ d.jsx(zn, { onChange: I }),
6401
6399
  r.t("sheet.cf.iconSet.reverseIconOrder")
6402
6400
  ] }),
6403
- /* @__PURE__ */ d.jsxs("div", { className: `${D.utilItem} ${O.mLXl}`, children: [
6401
+ /* @__PURE__ */ d.jsxs("div", { className: `${$.utilItem} ${O.mLXl}`, children: [
6404
6402
  /* @__PURE__ */ d.jsx(zn, { checked: !u, onChange: (p) => {
6405
6403
  h(!p);
6406
6404
  } }),
@@ -6413,14 +6411,14 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6413
6411
  var t;
6414
6412
  return (t = e.getCurrentUnitForType(G.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : t.getSheetId();
6415
6413
  }, Op = (e) => {
6416
- var w, p, x, R;
6417
- const t = oe($e), n = oe(ue), r = oe(re), o = oe(he), i = oe(Gt), s = fi(r), l = hi(r), a = pn((p = (w = e.rule) == null ? void 0 : w.ranges) != null ? p : []), c = be(() => {
6418
- var E, $, N;
6419
- let y = (E = e.rule) == null ? void 0 : E.ranges;
6420
- return y != null && y.length || (y = (N = ($ = i.getCurrentSelections()) == null ? void 0 : $.map((W) => W.range)) != null ? N : []), a.current = y, y != null && y.length ? y.map((W) => {
6421
- const b = Mi(W);
6422
- return b === "NaN" ? "" : b;
6423
- }).filter((W) => !!W).join(",") : "";
6414
+ var x, p, R;
6415
+ const t = oe($e), n = oe(ue), r = oe(re), o = oe(he), i = oe(Gt), s = fi(r), l = hi(r), a = pn((p = (x = e.rule) == null ? void 0 : x.ranges) != null ? p : []), c = be(() => {
6416
+ var b, E, D;
6417
+ let _ = (b = e.rule) == null ? void 0 : b.ranges;
6418
+ return _ != null && _.length || (_ = (D = (E = i.getCurrentSelections()) == null ? void 0 : E.map((L) => L.range)) != null ? D : []), a.current = _, _ != null && _.length ? _.map((L) => {
6419
+ const W = Mi(L);
6420
+ return W === "NaN" ? "" : W;
6421
+ }).filter((L) => !!L).join(",") : "";
6424
6422
  }, [e.rule]), u = [
6425
6423
  { label: t.t("sheet.cf.ruleType.highlightCell"), value: "1" },
6426
6424
  { label: t.t("sheet.cf.panel.rankAndAverage"), value: "2" },
@@ -6429,35 +6427,35 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6429
6427
  { label: t.t("sheet.cf.ruleType.formula"), value: "5" },
6430
6428
  { label: t.t("sheet.cf.ruleType.iconSet"), value: "6" }
6431
6429
  ], [h, f] = M(() => {
6432
- var $, N;
6433
- const y = ($ = e.rule) == null ? void 0 : $.rule.type, E = u[0].value;
6434
- if (!y)
6435
- return E;
6436
- switch (y) {
6437
- case L.highlightCell: {
6438
- switch ((N = e.rule) == null ? void 0 : N.rule.subType) {
6439
- case j.number:
6440
- case j.text:
6441
- case j.duplicateValues:
6442
- case j.uniqueValues:
6443
- case j.timePeriod:
6430
+ var E, D;
6431
+ const _ = (E = e.rule) == null ? void 0 : E.rule.type, b = u[0].value;
6432
+ if (!_)
6433
+ return b;
6434
+ switch (_) {
6435
+ case j.highlightCell: {
6436
+ switch ((D = e.rule) == null ? void 0 : D.rule.subType) {
6437
+ case N.number:
6438
+ case N.text:
6439
+ case N.duplicateValues:
6440
+ case N.uniqueValues:
6441
+ case N.timePeriod:
6444
6442
  return "1";
6445
- case j.average:
6446
- case j.rank:
6443
+ case N.average:
6444
+ case N.rank:
6447
6445
  return "2";
6448
- case j.formula:
6446
+ case N.formula:
6449
6447
  return "5";
6450
6448
  }
6451
6449
  break;
6452
6450
  }
6453
- case L.dataBar:
6451
+ case j.dataBar:
6454
6452
  return "3";
6455
- case L.colorScale:
6453
+ case j.colorScale:
6456
6454
  return "4";
6457
- case L.iconSet:
6455
+ case j.iconSet:
6458
6456
  return "6";
6459
6457
  }
6460
- return E;
6458
+ return b;
6461
6459
  }), g = pn(), m = be(() => new ia({ beforeSubmit: Hd, submit: Vd }), []), S = be(() => {
6462
6460
  switch (h) {
6463
6461
  case "1":
@@ -6477,43 +6475,40 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6477
6475
  }
6478
6476
  }, [h]);
6479
6477
  ve(() => {
6480
- var y;
6481
- if (((y = e.rule) == null ? void 0 : y.cfId) !== void 0) {
6482
- const E = n.onCommandExecuted(($) => {
6483
- if ($.id === Sa.id) {
6484
- const N = $.params;
6485
- N.subUnitId === l && N.unitId === s && e.onCancel();
6486
- }
6487
- $.id === Br.id && e.onCancel();
6488
- });
6489
- return () => E.dispose();
6490
- }
6491
- }, [(x = e.rule) == null ? void 0 : x.cfId]);
6492
- const I = (y) => {
6493
- g.current = y;
6494
- }, v = (y) => {
6495
- a.current = y.map((E) => E.range);
6496
- }, _ = () => {
6497
- const E = (() => {
6498
- const N = r.getCurrentUnitForType(G.UNIVER_SHEET).getActiveSheet();
6499
- if (!N)
6478
+ const _ = n.onCommandExecuted((b) => {
6479
+ if (b.id === Sa.id) {
6480
+ const E = b.params;
6481
+ E.subUnitId === l && E.unitId === s && e.onCancel();
6482
+ }
6483
+ b.id === Br.id && e.onCancel();
6484
+ });
6485
+ return () => _.dispose();
6486
+ }, []);
6487
+ const I = (_) => {
6488
+ g.current = _;
6489
+ }, y = (_) => {
6490
+ a.current = _.map((b) => b.range);
6491
+ }, w = () => {
6492
+ const b = (() => {
6493
+ const D = r.getCurrentUnitForType(G.UNIVER_SHEET).getActiveSheet();
6494
+ if (!D)
6500
6495
  throw new Error("No active sheet found");
6501
- return a.current.map((T) => Ca(T, N.getRowCount(), N.getColumnCount())).filter((T) => !(Number.isNaN(T.startRow) || Number.isNaN(T.startColumn)));
6496
+ return a.current.map((v) => Ca(v, D.getRowCount(), D.getColumnCount())).filter((v) => !(Number.isNaN(v.startRow) || Number.isNaN(v.startColumn)));
6502
6497
  })();
6503
6498
  if (m.fetchThroughInterceptors(m.getInterceptPoints().beforeSubmit)(!0, null)) {
6504
- const N = m.fetchThroughInterceptors(m.getInterceptPoints().submit)(null, null);
6505
- if (N) {
6506
- const W = fi(r), b = hi(r);
6507
- if (!W || !b)
6499
+ const D = m.fetchThroughInterceptors(m.getInterceptPoints().submit)(null, null);
6500
+ if (D) {
6501
+ const L = fi(r), W = hi(r);
6502
+ if (!L || !W)
6508
6503
  throw new Error("No active sheet found");
6509
- let T = {};
6510
- e.rule && e.rule.cfId ? (T = { ...e.rule, ranges: E, rule: N }, n.executeCommand(Co.id, { unitId: W, subUnitId: b, rule: T }), e.onCancel()) : (T = { cfId: o.createCfId(W, b), ranges: E, rule: N, stopIfTrue: !1 }, n.executeCommand(lr.id, { unitId: W, subUnitId: b, rule: T }), e.onCancel());
6504
+ let v = {};
6505
+ e.rule && e.rule.cfId ? (v = { ...e.rule, ranges: b, rule: D }, n.executeCommand(Co.id, { unitId: L, subUnitId: W, rule: v }), e.onCancel()) : (v = { cfId: o.createCfId(L, W), ranges: b, rule: D, stopIfTrue: !1 }, n.executeCommand(lr.id, { unitId: L, subUnitId: W, rule: v }), e.onCancel());
6511
6506
  }
6512
6507
  }
6513
6508
  }, C = () => {
6514
6509
  e.onCancel();
6515
6510
  };
6516
- return /* @__PURE__ */ d.jsxs("div", { className: D.cfRuleStyleEditor, children: [
6511
+ return /* @__PURE__ */ d.jsxs("div", { className: $.cfRuleStyleEditor, children: [
6517
6512
  /* @__PURE__ */ d.jsx("div", { className: O.title, children: t.t("sheet.cf.panel.range") }),
6518
6513
  /* @__PURE__ */ d.jsx("div", { className: `${O.mTBase}`, children: /* @__PURE__ */ d.jsx(
6519
6514
  ja,
@@ -6524,15 +6519,15 @@ const _p = /* @__PURE__ */ Kr(Cp), Zs = (e, t) => (bt[e] || [])[Number(t)] || ""
6524
6519
  openForSheetUnitId: s,
6525
6520
  value: c,
6526
6521
  id: yn(`${st}_rangeSelector`),
6527
- onChange: v
6522
+ onChange: y
6528
6523
  }
6529
6524
  ) }),
6530
6525
  /* @__PURE__ */ d.jsx("div", { className: O.title, children: t.t("sheet.cf.panel.styleType") }),
6531
- /* @__PURE__ */ d.jsx("div", { className: O.mTBase, children: /* @__PURE__ */ d.jsx(Ve, { className: D.width100, value: h, options: u, onChange: (y) => f(y) }) }),
6526
+ /* @__PURE__ */ d.jsx("div", { className: O.mTBase, children: /* @__PURE__ */ d.jsx(Ve, { className: $.width100, value: h, options: u, onChange: (_) => f(_) }) }),
6532
6527
  /* @__PURE__ */ d.jsx(S, { interceptorManager: m, rule: (R = e.rule) == null ? void 0 : R.rule, onChange: I }),
6533
- /* @__PURE__ */ d.jsxs("div", { className: `${O.mTBase} ${D.btnList}`, children: [
6528
+ /* @__PURE__ */ d.jsxs("div", { className: `${O.mTBase} ${$.btnList}`, children: [
6534
6529
  /* @__PURE__ */ d.jsx(Vo, { size: "small", onClick: C, children: t.t("sheet.cf.panel.cancel") }),
6535
- /* @__PURE__ */ d.jsx(Vo, { className: O.mLSm, size: "small", type: "primary", onClick: _, children: t.t("sheet.cf.panel.submit") })
6530
+ /* @__PURE__ */ d.jsx(Vo, { className: O.mLSm, size: "small", type: "primary", onClick: w, children: t.t("sheet.cf.panel.submit") })
6536
6531
  ] })
6537
6532
  ] });
6538
6533
  }, Ep = (e) => {
@@ -6608,8 +6603,8 @@ const Po = {
6608
6603
  ...ft,
6609
6604
  ranges: i,
6610
6605
  rule: {
6611
- type: L.highlightCell,
6612
- subType: j.rank
6606
+ type: j.highlightCell,
6607
+ subType: N.rank
6613
6608
  }
6614
6609
  };
6615
6610
  n.openPanel(a);
@@ -6620,8 +6615,8 @@ const Po = {
6620
6615
  ...ft,
6621
6616
  ranges: i,
6622
6617
  rule: {
6623
- type: L.highlightCell,
6624
- subType: j.formula,
6618
+ type: j.highlightCell,
6619
+ subType: N.formula,
6625
6620
  value: "="
6626
6621
  }
6627
6622
  };
@@ -6633,7 +6628,7 @@ const Po = {
6633
6628
  ...ft,
6634
6629
  ranges: i,
6635
6630
  rule: {
6636
- type: L.colorScale,
6631
+ type: j.colorScale,
6637
6632
  config: []
6638
6633
  }
6639
6634
  };
@@ -6645,7 +6640,7 @@ const Po = {
6645
6640
  ...ft,
6646
6641
  ranges: i,
6647
6642
  rule: {
6648
- type: L.dataBar,
6643
+ type: j.dataBar,
6649
6644
  isShowValue: !0
6650
6645
  }
6651
6646
  };
@@ -6657,7 +6652,7 @@ const Po = {
6657
6652
  ...ft,
6658
6653
  ranges: i,
6659
6654
  rule: {
6660
- type: L.iconSet,
6655
+ type: j.iconSet,
6661
6656
  config: [],
6662
6657
  isShowValue: !0
6663
6658
  }
@@ -6784,7 +6779,7 @@ let dn = class extends rt {
6784
6779
  c.forEach((f, g) => {
6785
6780
  u.forEach((m, S) => {
6786
6781
  const I = this._conditionalFormattingViewModel.getCellCf(t, n, f, m, s);
6787
- I && (I.cfList.forEach((v) => h.add(v.cfId)), o.setValue(g, S, I.cfList.map((v) => v.cfId)));
6782
+ I && (I.cfList.forEach((y) => h.add(y.cfId)), o.setValue(g, S, I.cfList.map((y) => y.cfId)));
6788
6783
  });
6789
6784
  }), h.forEach((f) => {
6790
6785
  const g = this._conditionalFormattingRuleModel.getRule(t, n, f);
@@ -6805,97 +6800,97 @@ let dn = class extends rt {
6805
6800
  ))
6806
6801
  return { redos: [], undos: [] };
6807
6802
  const { ranges: [l, a], mapFunc: c } = $i([n.copyRange, t]), u = Ua(l, a, !0), h = this._conditionalFormattingViewModel.getMatrix(i, s), f = {};
6808
- ut.foreach(a, (p, x) => {
6809
- const { row: R, col: y } = c(p, x), E = this._conditionalFormattingViewModel.getCellCf(i, s, R, y, h);
6810
- E && E.cfList.forEach(($) => {
6811
- if (!f[$.cfId]) {
6812
- const N = new Vt();
6813
- f[$.cfId] = N;
6814
- const W = this._conditionalFormattingRuleModel.getRule(i, s, $.cfId);
6815
- W == null || W.ranges.forEach((b) => {
6816
- ut.foreach(b, (T, ee) => {
6817
- N.setValue(T, ee, 1);
6803
+ ut.foreach(a, (p, R) => {
6804
+ const { row: _, col: b } = c(p, R), E = this._conditionalFormattingViewModel.getCellCf(i, s, _, b, h);
6805
+ E && E.cfList.forEach((D) => {
6806
+ if (!f[D.cfId]) {
6807
+ const L = new Vt();
6808
+ f[D.cfId] = L;
6809
+ const W = this._conditionalFormattingRuleModel.getRule(i, s, D.cfId);
6810
+ W == null || W.ranges.forEach((v) => {
6811
+ ut.foreach(v, (T, ee) => {
6812
+ L.setValue(T, ee, 1);
6818
6813
  });
6819
6814
  });
6820
6815
  }
6821
- f[$.cfId].realDeleteValue(R, y);
6816
+ f[D.cfId].realDeleteValue(_, b);
6822
6817
  });
6823
6818
  });
6824
6819
  const { matrix: g, info: m } = this._copyInfo, S = [];
6825
6820
  let I = this._conditionalFormattingRuleModel.createCfId(i, s);
6826
- const v = {}, _ = (p) => {
6827
- if (v[p])
6828
- return v[p];
6829
- const x = m == null ? void 0 : m.cfMap[p], R = [...this._conditionalFormattingRuleModel.getSubunitRules(i, s) || [], ...S].find((y) => bn.diffValue(y.rule, x));
6830
- if (R)
6831
- return v[p] = R, R;
6821
+ const y = {}, w = (p) => {
6822
+ if (y[p])
6823
+ return y[p];
6824
+ const R = m == null ? void 0 : m.cfMap[p], _ = [...this._conditionalFormattingRuleModel.getSubunitRules(i, s) || [], ...S].find((b) => bn.diffValue(b.rule, R));
6825
+ if (_)
6826
+ return y[p] = _, _;
6832
6827
  {
6833
- const y = {
6834
- rule: x,
6828
+ const b = {
6829
+ rule: R,
6835
6830
  cfId: I,
6836
6831
  ranges: [],
6837
6832
  stopIfTrue: !1
6838
6833
  };
6839
- return v[p] = y, S.push(y), I = `${Number(I) + 1}`, y;
6834
+ return y[p] = b, S.push(b), I = `${Number(I) + 1}`, b;
6840
6835
  }
6841
6836
  };
6842
6837
  u.forEach((p) => {
6843
- g && g.forValue((x, R, y) => {
6838
+ g && g.forValue((R, _, b) => {
6844
6839
  const E = At.getPositionRange(
6845
6840
  {
6846
- startRow: x,
6847
- endRow: x,
6848
- startColumn: R,
6849
- endColumn: R
6841
+ startRow: R,
6842
+ endRow: R,
6843
+ startColumn: _,
6844
+ endColumn: _
6850
6845
  },
6851
6846
  p.startRange
6852
- ), { row: $, col: N } = c(E.startRow, E.startColumn);
6853
- y.forEach((W) => {
6847
+ ), { row: D, col: L } = c(E.startRow, E.startColumn);
6848
+ b.forEach((W) => {
6854
6849
  if (!f[W]) {
6855
- const b = _(W), T = new Vt();
6856
- f[W] = T, b.ranges.forEach((ee) => {
6850
+ const v = w(W), T = new Vt();
6851
+ f[W] = T, v.ranges.forEach((ee) => {
6857
6852
  ut.foreach(ee, (Oe, Se) => {
6858
6853
  T.setValue(Oe, Se, 1);
6859
6854
  });
6860
6855
  });
6861
6856
  }
6862
- f[W].setValue($, N, 1);
6857
+ f[W].setValue(D, L, 1);
6863
6858
  });
6864
6859
  });
6865
6860
  });
6866
- const C = [], w = [];
6861
+ const C = [], x = [];
6867
6862
  for (const p in f) {
6868
- const x = f[p], R = kr(qr(x));
6869
- if (!R.length) {
6870
- const y = {
6863
+ const R = f[p], _ = kr(qr(R));
6864
+ if (!_.length) {
6865
+ const b = {
6871
6866
  unitId: i,
6872
6867
  subUnitId: s,
6873
6868
  cfId: p
6874
6869
  };
6875
- C.push({ id: Ye.id, params: y }), w.push(...It(this._injector, y));
6870
+ C.push({ id: Ye.id, params: b }), x.push(...It(this._injector, b));
6876
6871
  }
6877
- if (S.some((y) => y.cfId === p)) {
6878
- const y = _(p), E = {
6872
+ if (S.some((b) => b.cfId === p)) {
6873
+ const b = w(p), E = {
6879
6874
  unitId: i,
6880
6875
  subUnitId: s,
6881
- rule: { ...y, ranges: R }
6876
+ rule: { ...b, ranges: _ }
6882
6877
  };
6883
- C.push({ id: De.id, params: E }), w.push(xi(this._injector, E));
6878
+ C.push({ id: De.id, params: E }), x.push(xi(this._injector, E));
6884
6879
  } else {
6885
- const y = this._conditionalFormattingRuleModel.getRule(i, s, p);
6886
- if (!y)
6880
+ const b = this._conditionalFormattingRuleModel.getRule(i, s, p);
6881
+ if (!b)
6887
6882
  continue;
6888
6883
  const E = {
6889
6884
  unitId: i,
6890
6885
  subUnitId: s,
6891
- rule: { ...y, ranges: R }
6886
+ rule: { ...b, ranges: _ }
6892
6887
  };
6893
- C.push({ id: nt.id, params: E }), w.push(...Bt(this._injector, E));
6888
+ C.push({ id: nt.id, params: E }), x.push(...Bt(this._injector, E));
6894
6889
  }
6895
6890
  }
6896
6891
  return {
6897
6892
  redos: C,
6898
- undos: w
6893
+ undos: x
6899
6894
  };
6900
6895
  }
6901
6896
  };
@@ -7069,7 +7064,7 @@ let Mn = class extends rt {
7069
7064
  endRow: m
7070
7065
  },
7071
7066
  h
7072
- ), v = At.getPositionRange(
7067
+ ), y = At.getPositionRange(
7073
7068
  {
7074
7069
  startRow: m,
7075
7070
  startColumn: S,
@@ -7077,75 +7072,75 @@ let Mn = class extends rt {
7077
7072
  endRow: m
7078
7073
  },
7079
7074
  f
7080
- ), { row: _, col: C } = a(I.startRow, I.startColumn), w = this._conditionalFormattingViewModel.getCellCf(
7075
+ ), { row: w, col: C } = a(I.startRow, I.startColumn), x = this._conditionalFormattingViewModel.getCellCf(
7081
7076
  c,
7082
7077
  u,
7083
- _,
7078
+ w,
7084
7079
  C
7085
- ), { row: p, col: x } = a(v.startRow, v.startColumn), R = this._conditionalFormattingViewModel.getCellCf(
7080
+ ), { row: p, col: R } = a(y.startRow, y.startColumn), _ = this._conditionalFormattingViewModel.getCellCf(
7086
7081
  c,
7087
7082
  u,
7088
7083
  p,
7089
- x
7084
+ R
7090
7085
  );
7091
- R && R.cfList.forEach((y) => {
7092
- let E = l.get(y.cfId);
7093
- if (!l.get(y.cfId)) {
7094
- const $ = this._conditionalFormattingRuleModel.getRule(c, u, y.cfId);
7095
- if (!$)
7086
+ _ && _.cfList.forEach((b) => {
7087
+ let E = l.get(b.cfId);
7088
+ if (!l.get(b.cfId)) {
7089
+ const D = this._conditionalFormattingRuleModel.getRule(c, u, b.cfId);
7090
+ if (!D)
7096
7091
  return;
7097
- E = new Vt(), $.ranges.forEach((N) => {
7098
- ut.foreach(N, (W, b) => {
7099
- E.setValue(W, b, 1);
7092
+ E = new Vt(), D.ranges.forEach((L) => {
7093
+ ut.foreach(L, (W, v) => {
7094
+ E.setValue(W, v, 1);
7100
7095
  });
7101
- }), l.set(y.cfId, E);
7096
+ }), l.set(b.cfId, E);
7102
7097
  }
7103
- E.realDeleteValue(p, x);
7104
- }), w && w.cfList.forEach((y) => {
7105
- let E = l.get(y.cfId);
7106
- if (!l.get(y.cfId)) {
7107
- const $ = this._conditionalFormattingRuleModel.getRule(c, u, y.cfId);
7108
- if (!$)
7098
+ E.realDeleteValue(p, R);
7099
+ }), x && x.cfList.forEach((b) => {
7100
+ let E = l.get(b.cfId);
7101
+ if (!l.get(b.cfId)) {
7102
+ const D = this._conditionalFormattingRuleModel.getRule(c, u, b.cfId);
7103
+ if (!D)
7109
7104
  return;
7110
- E = new Vt(), $.ranges.forEach((N) => {
7111
- ut.foreach(N, (W, b) => {
7112
- E.setValue(W, b, 1);
7105
+ E = new Vt(), D.ranges.forEach((L) => {
7106
+ ut.foreach(L, (W, v) => {
7107
+ E.setValue(W, v, 1);
7113
7108
  });
7114
- }), l.set(y.cfId, E);
7109
+ }), l.set(b.cfId, E);
7115
7110
  }
7116
- E.setValue(p, x, 1);
7111
+ E.setValue(p, R, 1);
7117
7112
  });
7118
7113
  });
7119
7114
  }, n = (o, i) => {
7120
- var v, _, C;
7121
- const s = (v = this._univerInstanceService.getCurrentUnitForType(G.UNIVER_SHEET)) == null ? void 0 : v.getUnitId(), l = (C = (_ = this._univerInstanceService.getCurrentUnitForType(G.UNIVER_SHEET)) == null ? void 0 : _.getActiveSheet()) == null ? void 0 : C.getSheetId(), a = /* @__PURE__ */ new Map(), c = [], u = [];
7115
+ var y, w, C;
7116
+ const s = (y = this._univerInstanceService.getCurrentUnitForType(G.UNIVER_SHEET)) == null ? void 0 : y.getUnitId(), l = (C = (w = this._univerInstanceService.getCurrentUnitForType(G.UNIVER_SHEET)) == null ? void 0 : w.getActiveSheet()) == null ? void 0 : C.getSheetId(), a = /* @__PURE__ */ new Map(), c = [], u = [];
7122
7117
  if (!s || !l)
7123
7118
  return e();
7124
7119
  const h = $i([o, i]), [f, g] = h.ranges, { mapFunc: m } = h, S = {
7125
7120
  row: f.startRow,
7126
7121
  col: f.startColumn
7127
7122
  };
7128
- return Ba(f, g).forEach((w) => {
7129
- t(S, w.repeatStartCell, w.relativeRange, a, m);
7130
- }), a.forEach((w, p) => {
7131
- const x = this._conditionalFormattingRuleModel.getRule(s, l, p);
7132
- if (!x)
7123
+ return Ba(f, g).forEach((x) => {
7124
+ t(S, x.repeatStartCell, x.relativeRange, a, m);
7125
+ }), a.forEach((x, p) => {
7126
+ const R = this._conditionalFormattingRuleModel.getRule(s, l, p);
7127
+ if (!R)
7133
7128
  return;
7134
- const R = kr(qr(w));
7135
- if (R.length) {
7136
- const y = {
7129
+ const _ = kr(qr(x));
7130
+ if (_.length) {
7131
+ const b = {
7137
7132
  unitId: s,
7138
7133
  subUnitId: l,
7139
- rule: { ...x, ranges: R }
7134
+ rule: { ...R, ranges: _ }
7140
7135
  };
7141
- c.push({ id: nt.id, params: y }), u.push(...Bt(this._injector, y));
7136
+ c.push({ id: nt.id, params: b }), u.push(...Bt(this._injector, b));
7142
7137
  } else {
7143
- const y = {
7138
+ const b = {
7144
7139
  unitId: s,
7145
7140
  subUnitId: l,
7146
- cfId: x.cfId
7141
+ cfId: R.cfId
7147
7142
  };
7148
- c.push({ id: Ye.id, params: y }), u.push(...It(this._injector, y));
7143
+ c.push({ id: Ye.id, params: b }), u.push(...It(this._injector, b));
7149
7144
  }
7150
7145
  }), {
7151
7146
  undos: u,