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