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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var Ar = Object.defineProperty;
2
2
  var Lr = (e, t, r) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var E = (e, t, r) => Lr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { LocaleService as se, isFormulaString as De, DataValidationType as G, Tools as Kt, Inject as M, Injector as we, Disposable as Re, UniverInstanceType as W, toDisposable as kr, IUniverInstanceService as le, DataValidationErrorStyle as lt, DataValidationStatus as je, ICommandService as J, IConfigService as ln, DataValidationRenderMode as oe, DisposableCollection as Nr, dayjs as wn, numfmt as Hn, CellValueType as Ur, CommandType as nt, ObjectMatrix as wt, Range as Fr, Rectangle as Rt, queryObjectMatrix as Gt, Optional as xr, RxDisposable as cn, InterceptorEffectEnum as Wn, sequenceExecute as jn, bufferDebounceTime as $r, debounce as Br, UndoCommand as Hr, RedoCommand as Wr, isUnitRangesEqual as jr, shallowEqual as Rn, ThemeService as Yn, ColorKit as Yr, VerticalAlign as ae, HorizontalAlign as Ye, DEFAULT_STYLES as re, WrapStrategy as Ie, DocumentDataModel as Xr, BooleanNumber as rt, DEFAULT_EMPTY_DOCUMENT_VALUE as zr, Plugin as Xn, merge as zn } from "@univerjs/core";
4
+ import { LocaleService as se, isFormulaString as De, DataValidationType as G, Tools as Kt, Inject as b, Injector as we, Disposable as Re, UniverInstanceType as W, toDisposable as kr, IUniverInstanceService as le, DataValidationErrorStyle as lt, DataValidationStatus as je, ICommandService as J, IConfigService as ln, DataValidationRenderMode as oe, DisposableCollection as Nr, dayjs as wn, numfmt as Hn, CellValueType as Ur, CommandType as nt, ObjectMatrix as wt, Range as Fr, Rectangle as Rt, queryObjectMatrix as Gt, Optional as xr, RxDisposable as cn, InterceptorEffectEnum as Wn, sequenceExecute as jn, bufferDebounceTime as $r, debounce as Br, UndoCommand as Hr, RedoCommand as Wr, isUnitRangesEqual as jr, shallowEqual as Rn, ThemeService as Yn, ColorKit as Yr, VerticalAlign as ae, HorizontalAlign as Ye, DEFAULT_STYLES as re, WrapStrategy as Ie, DocumentDataModel as Xr, BooleanNumber as rt, DEFAULT_EMPTY_DOCUMENT_VALUE as zr, Plugin as Xn, merge as zn } from "@univerjs/core";
5
5
  import { DataValidationFormulaController as Kr, deserializeListOptions as Gr, serializeListOptions as Kn, CUSTOM_FORMULA_INPUT_NAME as Gn, BASE_FORMULA_INPUT_NAME as Tt, LIST_FORMULA_INPUT_NAME as dn, CHECKBOX_FORMULA_INPUT_NAME as Zn, SheetDataValidationModel as ee, SheetsDataValidationValidatorService as Zr, getDataValidationCellValue as kt, getCellValueOrigin as Q, createDefaultNewRule as qn, AddSheetDataValidationCommand as un, DATA_VALIDATION_PLUGIN_NAME as Jn, getDataValidationDiffMutations as Zt, UpdateSheetDataValidationRangeCommand as Qn, DataValidationCacheService as er, UpdateSheetDataValidationSettingCommand as yn, UpdateSheetDataValidationOptionsCommand as qr, RemoveSheetDataValidationCommand as tr, RemoveSheetAllDataValidationCommand as Jr, DataValidationFormulaService as Qr, CHECKBOX_FORMULA_2 as eo, CHECKBOX_FORMULA_1 as to, getFormulaResult as Nt, isLegalFormulaResult as Mn, transformCheckboxValue as no } from "@univerjs/sheets-data-validation";
6
- import { jsxs as z, Fragment as Xe, jsx as _ } from "react/jsx-runtime";
6
+ import { jsxs as z, Fragment as Xe, jsx as S } from "react/jsx-runtime";
7
7
  import { FormLayout as K, Input as Ve, Checkbox as Pt, RadioGroup as hn, Radio as Oe, DraggableList as ro, clsx as nr, LegacySelect as oo, Button as ze, Select as bn } from "@univerjs/design";
8
8
  import { useDependency as U, useSidebarClick as rr, useObservable as Te, useEvent as qt, ISidebarService as or, IDialogService as io, IZenZoneService as ir, KeyCode as ht, MenuItemType as pn, getMenuHiddenObservable as ao, RibbonStartGroup as so, IMenuManagerService as lo, ComponentManager as gn } from "@univerjs/ui";
9
9
  import En, { useState as H, useRef as ut, forwardRef as Le, createElement as ke, useMemo as ct, useEffect as Pe } from "react";
@@ -18,7 +18,7 @@ import { deserializeRangeWithSheet as Uo, serializeRange as fr } from "@univerjs
18
18
  const Fo = (e) => {
19
19
  const { isTwoFormula: t = !1, value: r, onChange: n, showError: o, validResult: i } = e, a = U(se), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
20
20
  return t ? /* @__PURE__ */ z(Xe, { children: [
21
- /* @__PURE__ */ _(K, { error: l, children: /* @__PURE__ */ _(
21
+ /* @__PURE__ */ S(K, { error: l, children: /* @__PURE__ */ S(
22
22
  Ve,
23
23
  {
24
24
  className: "univer-w-full",
@@ -32,8 +32,8 @@ const Fo = (e) => {
32
32
  }
33
33
  }
34
34
  ) }),
35
- /* @__PURE__ */ _("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
36
- /* @__PURE__ */ _(K, { error: s, children: /* @__PURE__ */ _(
35
+ /* @__PURE__ */ S("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
36
+ /* @__PURE__ */ S(K, { error: s, children: /* @__PURE__ */ S(
37
37
  Ve,
38
38
  {
39
39
  className: "univer-w-full",
@@ -47,7 +47,7 @@ const Fo = (e) => {
47
47
  }
48
48
  }
49
49
  ) })
50
- ] }) : /* @__PURE__ */ _(K, { error: l, children: /* @__PURE__ */ _(
50
+ ] }) : /* @__PURE__ */ S(K, { error: l, children: /* @__PURE__ */ S(
51
51
  Ve,
52
52
  {
53
53
  className: "univer-w-full",
@@ -62,7 +62,7 @@ const Fo = (e) => {
62
62
  function xo(e) {
63
63
  const { value: t, onChange: r, showError: n, validResult: o } = e, i = U(se), a = n ? o == null ? void 0 : o.formula1 : "", l = n ? o == null ? void 0 : o.formula2 : "", [s, c] = H(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
64
64
  return /* @__PURE__ */ z(Xe, { children: [
65
- /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
65
+ /* @__PURE__ */ S(K, { children: /* @__PURE__ */ S(
66
66
  Pt,
67
67
  {
68
68
  checked: s,
@@ -76,7 +76,7 @@ function xo(e) {
76
76
  children: i.t("dataValidation.checkbox.tips")
77
77
  }
78
78
  ) }),
79
- s ? /* @__PURE__ */ _(K, { label: i.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ _(
79
+ s ? /* @__PURE__ */ S(K, { label: i.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ S(
80
80
  Ve,
81
81
  {
82
82
  className: "univer-w-full",
@@ -90,7 +90,7 @@ function xo(e) {
90
90
  }
91
91
  }
92
92
  ) }) : null,
93
- s ? /* @__PURE__ */ _(K, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ _(
93
+ s ? /* @__PURE__ */ S(K, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ S(
94
94
  Ve,
95
95
  {
96
96
  className: "univer-w-full",
@@ -112,7 +112,7 @@ function $o(e) {
112
112
  return rr((d) => {
113
113
  var p;
114
114
  ((p = s.current) == null ? void 0 : p.isClickOutSide(d)) && u(!1);
115
- }), /* @__PURE__ */ _(
115
+ }), /* @__PURE__ */ S(
116
116
  ar,
117
117
  {
118
118
  initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
@@ -120,10 +120,10 @@ function $o(e) {
120
120
  subUnitId: r,
121
121
  isFocus: c,
122
122
  onChange: (d) => {
123
- const S = (d != null ? d : "").trim();
124
- S !== (n == null ? void 0 : n.formula1) && (o == null || o({
123
+ const f = (d != null ? d : "").trim();
124
+ f !== (n == null ? void 0 : n.formula1) && (o == null || o({
125
125
  ...n,
126
- formula1: S
126
+ formula1: f
127
127
  }));
128
128
  },
129
129
  errorText: l,
@@ -254,7 +254,7 @@ const He = "#ECECEC", qo = [
254
254
  "#F248A6"
255
255
  ], Jo = (e) => {
256
256
  const { value: t, onChange: r, disabled: n } = e, [o, i] = H(!1);
257
- return /* @__PURE__ */ _(
257
+ return /* @__PURE__ */ S(
258
258
  oo,
259
259
  {
260
260
  disabled: n,
@@ -265,7 +265,7 @@ const He = "#ECECEC", qo = [
265
265
  className: "univer-ml-1 univer-mr-2 univer-w-[92px]",
266
266
  value: t,
267
267
  onChange: r,
268
- labelRender: (a) => /* @__PURE__ */ _(
268
+ labelRender: (a) => /* @__PURE__ */ S(
269
269
  "div",
270
270
  {
271
271
  className: `
@@ -275,7 +275,7 @@ const He = "#ECECEC", qo = [
275
275
  style: { background: a.value, marginTop: 5 }
276
276
  }
277
277
  ),
278
- dropdownRender: () => /* @__PURE__ */ _(
278
+ dropdownRender: () => /* @__PURE__ */ S(
279
279
  "div",
280
280
  {
281
281
  className: `
@@ -283,7 +283,7 @@ const He = "#ECECEC", qo = [
283
283
  univer-justify-between univer-p-3 univer-pl-3
284
284
  `,
285
285
  children: qo.map(
286
- (a) => /* @__PURE__ */ _(
286
+ (a) => /* @__PURE__ */ S(
287
287
  "div",
288
288
  {
289
289
  onClick: () => {
@@ -306,8 +306,8 @@ const He = "#ECECEC", qo = [
306
306
  }, Ln = (e) => {
307
307
  const { item: t, commonProps: r, style: n } = e, { onItemChange: o, onItemDelete: i } = r;
308
308
  return /* @__PURE__ */ z("div", { className: "univer-flex univer-items-center univer-pb-0.5", style: n, children: [
309
- t.isRef ? null : /* @__PURE__ */ _("div", { className: nr("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ _(wr, {}) }),
310
- /* @__PURE__ */ _(
309
+ t.isRef ? null : /* @__PURE__ */ S("div", { className: nr("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(wr, {}) }),
310
+ /* @__PURE__ */ S(
311
311
  Jo,
312
312
  {
313
313
  value: t.color,
@@ -316,7 +316,7 @@ const He = "#ECECEC", qo = [
316
316
  }
317
317
  }
318
318
  ),
319
- /* @__PURE__ */ _(
319
+ /* @__PURE__ */ S(
320
320
  Ve,
321
321
  {
322
322
  disabled: t.isRef,
@@ -327,59 +327,59 @@ const He = "#ECECEC", qo = [
327
327
  inputStyle: { height: 28 }
328
328
  }
329
329
  ),
330
- t.isRef ? null : /* @__PURE__ */ _(
330
+ t.isRef ? null : /* @__PURE__ */ S(
331
331
  "div",
332
332
  {
333
333
  className: `
334
334
  univer-ml-1 univer-cursor-pointer univer-rounded univer-text-base
335
335
  hover:univer-bg-gray-200
336
336
  `,
337
- children: /* @__PURE__ */ _(_n, { onClick: () => i(t.id) })
337
+ children: /* @__PURE__ */ S(_n, { onClick: () => i(t.id) })
338
338
  }
339
339
  )
340
340
  ] });
341
341
  };
342
342
  function Qo(e) {
343
343
  const { value: t, onChange: r = () => {
344
- }, unitId: n, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, [u, h] = H(() => De(s) ? "1" : "0"), [d, S] = H(u === "1" ? s : "="), [p, b] = H(u === "1" ? s : "="), y = U(se), g = U(ye), f = U(mn), m = U(Kr), [I, w] = H(() => c.split(",")), C = g.getValidatorItem(G.LIST), [R, D] = H([]), [k, V] = H(""), A = a ? i == null ? void 0 : i.formula1 : "", P = ct(() => f.ruleChange$.pipe(sr(16)), []), L = Te(P), O = qt(r);
344
+ }, unitId: n, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, [u, h] = H(() => De(s) ? "1" : "0"), [d, f] = H(u === "1" ? s : "="), [p, M] = H(u === "1" ? s : "="), y = U(se), g = U(ye), _ = U(mn), m = U(Kr), [C, w] = H(() => c.split(",")), I = g.getValidatorItem(G.LIST), [R, T] = H([]), [N, D] = H(""), P = a ? i == null ? void 0 : i.formula1 : "", A = ct(() => _.ruleChange$.pipe(sr(16)), []), L = Te(A), V = qt(r);
345
345
  Pe(() => {
346
346
  (async () => {
347
347
  await new Promise((v) => {
348
348
  setTimeout(() => v(!0), 100);
349
349
  });
350
- const T = f.getRuleById(n, o, l), B = T == null ? void 0 : T.formula1;
351
- if (De(B) && C && T) {
352
- const v = await C.getListAsync(T, n, o);
353
- D(v);
350
+ const O = _.getRuleById(n, o, l), B = O == null ? void 0 : O.formula1;
351
+ if (De(B) && I && O) {
352
+ const v = await I.getListAsync(O, n, o);
353
+ T(v);
354
354
  }
355
355
  })();
356
- }, [f, L, C, l, o, n]), Pe(() => {
357
- De(s) && s !== p && (S(s), b(p));
356
+ }, [_, L, I, l, o, n]), Pe(() => {
357
+ De(s) && s !== p && (f(s), M(p));
358
358
  }, [p, s]);
359
359
  const [F, x] = H(() => {
360
- const T = u !== "1" ? Gr(s) : [], B = c.split(",");
361
- return T.map((v, N) => ({
360
+ const O = u !== "1" ? Gr(s) : [], B = c.split(",");
361
+ return O.map((v, k) => ({
362
362
  label: v,
363
- color: B[N] || He,
363
+ color: B[k] || He,
364
364
  isRef: !1,
365
365
  id: Kt.generateRandomId(4)
366
366
  }));
367
- }), j = (T, B, v) => {
368
- const N = F.find(($) => $.id === T);
369
- N && (N.label = B, N.color = v, x([...F]));
370
- }, Z = (T) => {
371
- const B = F.findIndex((v) => v.id === T);
367
+ }), j = (O, B, v) => {
368
+ const k = F.find(($) => $.id === O);
369
+ k && (k.label = B, k.color = v, x([...F]));
370
+ }, Z = (O) => {
371
+ const B = F.findIndex((v) => v.id === O);
372
372
  B !== -1 && (F.splice(B, 1), x([...F]));
373
- }, Y = c.split(","), te = ct(() => R.map((T, B) => ({
374
- label: T,
373
+ }, Y = c.split(","), te = ct(() => R.map((O, B) => ({
374
+ label: O,
375
375
  color: Y[B] || He,
376
376
  id: `${B}`,
377
377
  isRef: !0
378
- })), [Y, R]), ge = (T, B, v) => {
379
- const N = [...I];
380
- N[+T] = v, w(N), O({
378
+ })), [Y, R]), ge = (O, B, v) => {
379
+ const k = [...C];
380
+ k[+O] = v, w(k), V({
381
381
  formula1: s,
382
- formula2: N.join(",")
382
+ formula2: k.join(",")
383
383
  });
384
384
  }, ce = () => {
385
385
  x([
@@ -395,87 +395,87 @@ function Qo(e) {
395
395
  Pe(() => {
396
396
  if (u === "1")
397
397
  return;
398
- const T = /* @__PURE__ */ new Set(), B = [];
398
+ const O = /* @__PURE__ */ new Set(), B = [];
399
399
  F.map((v) => ({
400
400
  labelList: v.label.split(","),
401
401
  item: v
402
- })).forEach(({ item: v, labelList: N }) => {
403
- N.forEach(($) => {
404
- T.has($) || (T.add($), B.push({
402
+ })).forEach(({ item: v, labelList: k }) => {
403
+ k.forEach(($) => {
404
+ O.has($) || (O.add($), B.push({
405
405
  label: $,
406
406
  color: v.color
407
407
  }));
408
408
  });
409
- }), O({
409
+ }), V({
410
410
  formula1: Kn(B.map((v) => v.label)),
411
411
  formula2: B.map((v) => v.color === He ? "" : v.color).join(",")
412
412
  });
413
- }, [F, O, u, p, I]);
414
- const ne = qt(async (T) => {
415
- if (!De(T)) {
416
- O == null || O({
413
+ }, [F, V, u, p, C]);
414
+ const ne = qt(async (O) => {
415
+ if (!De(O)) {
416
+ V == null || V({
417
417
  formula1: "",
418
418
  formula2: c
419
419
  });
420
420
  return;
421
421
  }
422
- m.getFormulaRefCheck(T) ? (O == null || O({
423
- formula1: De(T) ? T : "",
422
+ m.getFormulaRefCheck(O) ? (V == null || V({
423
+ formula1: De(O) ? O : "",
424
424
  formula2: c
425
- }), V("")) : (O == null || O({
425
+ }), D("")) : (V == null || V({
426
426
  formula1: "",
427
427
  formula2: c
428
- }), S("="), V(y.t("dataValidation.validFail.formulaError")));
428
+ }), f("="), D(y.t("dataValidation.validFail.formulaError")));
429
429
  }), de = ut(null), [Se, me] = H(!1);
430
- return rr((T) => {
430
+ return rr((O) => {
431
431
  var v;
432
- ((v = de.current) == null ? void 0 : v.isClickOutSide(T)) && me(!1);
432
+ ((v = de.current) == null ? void 0 : v.isClickOutSide(O)) && me(!1);
433
433
  }), /* @__PURE__ */ z(Xe, { children: [
434
- /* @__PURE__ */ _(K, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ z(
434
+ /* @__PURE__ */ S(K, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ z(
435
435
  hn,
436
436
  {
437
437
  value: u,
438
- onChange: (T) => {
439
- h(T), S(p), T === "1" && O({
438
+ onChange: (O) => {
439
+ h(O), f(p), O === "1" && V({
440
440
  formula1: p === "=" ? "" : p,
441
- formula2: I.join(",")
441
+ formula2: C.join(",")
442
442
  });
443
443
  },
444
444
  children: [
445
- /* @__PURE__ */ _(Oe, { value: "0", children: y.t("dataValidation.list.customOptions") }),
446
- /* @__PURE__ */ _(Oe, { value: "1", children: y.t("dataValidation.list.refOptions") })
445
+ /* @__PURE__ */ S(Oe, { value: "0", children: y.t("dataValidation.list.customOptions") }),
446
+ /* @__PURE__ */ S(Oe, { value: "1", children: y.t("dataValidation.list.refOptions") })
447
447
  ]
448
448
  }
449
449
  ) }),
450
450
  u === "1" ? /* @__PURE__ */ z(Xe, { children: [
451
- /* @__PURE__ */ _(
451
+ /* @__PURE__ */ S(
452
452
  ar,
453
453
  {
454
454
  initValue: d,
455
455
  unitId: n,
456
456
  subUnitId: o,
457
457
  isFocus: Se,
458
- onChange: (T = "") => {
459
- const B = (T != null ? T : "").trim();
460
- b(B), ne(B);
458
+ onChange: (O = "") => {
459
+ const B = (O != null ? O : "").trim();
460
+ M(B), ne(B);
461
461
  },
462
- errorText: A || k || void 0,
462
+ errorText: P || N || void 0,
463
463
  onFocus: () => me(!0),
464
464
  isSupportAcrossSheet: !0,
465
465
  ref: de
466
466
  }
467
467
  ),
468
- te.length > 0 && /* @__PURE__ */ _("div", { style: { marginTop: "12px" }, children: te.map((T) => /* @__PURE__ */ _(
468
+ te.length > 0 && /* @__PURE__ */ S("div", { style: { marginTop: "12px" }, children: te.map((O) => /* @__PURE__ */ S(
469
469
  Ln,
470
470
  {
471
- item: T,
471
+ item: O,
472
472
  commonProps: { onItemChange: ge },
473
473
  style: { marginBottom: 12 }
474
474
  },
475
- T.id
475
+ O.id
476
476
  )) })
477
- ] }) : /* @__PURE__ */ _(K, { error: A, children: /* @__PURE__ */ z("div", { style: { marginTop: "-12px" }, children: [
478
- /* @__PURE__ */ _(
477
+ ] }) : /* @__PURE__ */ S(K, { error: P, children: /* @__PURE__ */ z("div", { style: { marginTop: "-12px" }, children: [
478
+ /* @__PURE__ */ S(
479
479
  ro,
480
480
  {
481
481
  list: F,
@@ -483,16 +483,16 @@ function Qo(e) {
483
483
  rowHeight: 28,
484
484
  margin: [0, 12],
485
485
  draggableHandle: ".draggableHandle",
486
- itemRender: (T) => /* @__PURE__ */ _(
486
+ itemRender: (O) => /* @__PURE__ */ S(
487
487
  Ln,
488
488
  {
489
- item: T,
489
+ item: O,
490
490
  commonProps: {
491
491
  onItemChange: j,
492
492
  onItemDelete: Z
493
493
  }
494
494
  },
495
- T.id
495
+ O.id
496
496
  ),
497
497
  idKey: "id"
498
498
  }
@@ -507,7 +507,7 @@ function Qo(e) {
507
507
  `,
508
508
  onClick: ce,
509
509
  children: [
510
- /* @__PURE__ */ _(Sr, { className: "univer-mr-1" }),
510
+ /* @__PURE__ */ S(Sr, { className: "univer-mr-1" }),
511
511
  y.t("dataValidation.list.add")
512
512
  ]
513
513
  }
@@ -548,7 +548,7 @@ let ve = class {
548
548
  }
549
549
  };
550
550
  ve = ni([
551
- ri(0, M(we))
551
+ ri(0, b(we))
552
552
  ], ve);
553
553
  var oi = Object.getOwnPropertyDescriptor, ii = (e, t, r, n) => {
554
554
  for (var o = n > 1 ? void 0 : n ? oi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
@@ -679,12 +679,12 @@ let Ze = class extends Re {
679
679
  }
680
680
  };
681
681
  Ze = si([
682
- xe(0, M(vn)),
683
- xe(1, M(ee)),
684
- xe(2, M(ye)),
682
+ xe(0, b(vn)),
683
+ xe(1, b(ee)),
684
+ xe(2, b(ye)),
685
685
  xe(3, io),
686
- xe(4, M(se)),
687
- xe(5, M(Zr))
686
+ xe(4, b(se)),
687
+ xe(5, b(Zr))
688
688
  ], Ze);
689
689
  var li = Object.getOwnPropertyDescriptor, ci = (e, t, r, n) => {
690
690
  for (var o = n > 1 ? void 0 : n ? li(t, r) : t, i = e.length - 1, a; i >= 0; i--)
@@ -753,7 +753,7 @@ let Ae = class extends Re {
753
753
  }
754
754
  // eslint-disable-next-line max-lines-per-function, complexity
755
755
  showDropdown(t) {
756
- var b, y, g, f;
756
+ var M, y, g, _;
757
757
  const { location: r } = t, { row: n, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = r;
758
758
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
759
759
  return;
@@ -765,13 +765,13 @@ let Ae = class extends Re {
765
765
  if (!(u != null && u.dropdownType))
766
766
  return;
767
767
  let h;
768
- const d = async (m, I) => {
769
- var P, L, O;
768
+ const d = async (m, C) => {
769
+ var A, L, V;
770
770
  if (!m)
771
771
  return !0;
772
- const w = m, C = s.getCell(n, o), R = w.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), D = (P = Hn.parseDate(R)) == null ? void 0 : P.v, k = I === "time" ? D % 1 : D, V = l.getStyles().getStyleByCell(C), A = (O = (L = V == null ? void 0 : V.n) == null ? void 0 : L.pattern) != null ? O : "";
772
+ const w = m, I = s.getCell(n, o), R = w.format(C === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), T = (A = Hn.parseDate(R)) == null ? void 0 : A.v, N = C === "time" ? T % 1 : T, D = l.getStyles().getStyleByCell(I), P = (V = (L = D == null ? void 0 : D.n) == null ? void 0 : L.pattern) != null ? V : "";
773
773
  return c.errorStyle !== lt.STOP || await u.validator({
774
- value: k,
774
+ value: N,
775
775
  unitId: i,
776
776
  subUnitId: a,
777
777
  row: n,
@@ -795,56 +795,56 @@ let Ae = class extends Re {
795
795
  endRow: n
796
796
  },
797
797
  value: {
798
- v: k,
798
+ v: N,
799
799
  t: 2,
800
800
  p: null,
801
801
  f: null,
802
802
  si: null,
803
803
  s: {
804
804
  n: {
805
- pattern: di(I, A)
805
+ pattern: di(C, P)
806
806
  }
807
807
  }
808
808
  }
809
809
  }), !0) : (this._injector.has(Ze) && this._injector.get(Ze).showReject(u.getRuleFinalError(c, { row: n, col: o, unitId: i, subUnitId: a })), !1);
810
810
  };
811
- let S;
811
+ let f;
812
812
  switch (u.dropdownType) {
813
813
  case pe.DATE: {
814
- const m = Q(s.getCellRaw(n, o)), I = Ft(m), w = !!((b = c.bizInfo) != null && b.showTime);
815
- S = {
814
+ const m = Q(s.getCellRaw(n, o)), C = Ft(m), w = !!((M = c.bizInfo) != null && M.showTime);
815
+ f = {
816
816
  location: r,
817
817
  type: "datepicker",
818
818
  props: {
819
819
  showTime: w,
820
- onChange: (C) => d(C, w ? "datetime" : "date"),
821
- defaultValue: I,
820
+ onChange: (I) => d(I, w ? "datetime" : "date"),
821
+ defaultValue: C,
822
822
  patternType: "date"
823
823
  }
824
824
  };
825
825
  break;
826
826
  }
827
827
  case pe.TIME: {
828
- const m = Q(s.getCellRaw(n, o)), I = Ft(m);
829
- S = {
828
+ const m = Q(s.getCellRaw(n, o)), C = Ft(m);
829
+ f = {
830
830
  location: r,
831
831
  type: "datepicker",
832
832
  props: {
833
833
  onChange: (w) => d(w, "time"),
834
- defaultValue: I,
834
+ defaultValue: C,
835
835
  patternType: "time"
836
836
  }
837
837
  };
838
838
  break;
839
839
  }
840
840
  case pe.DATETIME: {
841
- const m = Q(s.getCellRaw(n, o)), I = Ft(m);
842
- S = {
841
+ const m = Q(s.getCellRaw(n, o)), C = Ft(m);
842
+ f = {
843
843
  location: r,
844
844
  type: "datepicker",
845
845
  props: {
846
846
  onChange: (w) => d(w, "datetime"),
847
- defaultValue: I,
847
+ defaultValue: C,
848
848
  patternType: "datetime"
849
849
  }
850
850
  };
@@ -852,8 +852,8 @@ let Ae = class extends Re {
852
852
  }
853
853
  case pe.LIST:
854
854
  case pe.MULTIPLE_LIST: {
855
- const m = u.dropdownType === pe.MULTIPLE_LIST, I = async (V) => {
856
- const A = Kn(V), P = {
855
+ const m = u.dropdownType === pe.MULTIPLE_LIST, C = async (D) => {
856
+ const P = Kn(D), A = {
857
857
  unitId: i,
858
858
  subUnitId: a,
859
859
  range: {
@@ -863,7 +863,7 @@ let Ae = class extends Re {
863
863
  endRow: n
864
864
  },
865
865
  value: {
866
- v: A,
866
+ v: P,
867
867
  p: null,
868
868
  f: null,
869
869
  si: null
@@ -874,23 +874,23 @@ let Ae = class extends Re {
874
874
  eventType: pt.Keyboard,
875
875
  unitId: i,
876
876
  keycode: ht.ESC
877
- }), this._commandService.executeCommand(st.id, P), !m;
878
- }, w = (c == null ? void 0 : c.renderMode) === oe.CUSTOM || (c == null ? void 0 : c.renderMode) === void 0, C = u.getListWithColor(c, i, a), R = kt(s.getCellRaw(n, o)), D = () => {
877
+ }), this._commandService.executeCommand(st.id, A), !m;
878
+ }, w = (c == null ? void 0 : c.renderMode) === oe.CUSTOM || (c == null ? void 0 : c.renderMode) === void 0, I = u.getListWithColor(c, i, a), R = kt(s.getCellRaw(n, o)), T = () => {
879
879
  this._commandService.executeCommand(Fe.id, {
880
880
  ruleId: c.uid
881
881
  }), h == null || h.dispose();
882
- }, k = C.map((V) => ({
883
- label: V.label,
884
- value: V.label,
885
- color: w || V.color ? V.color : "transparent"
882
+ }, N = I.map((D) => ({
883
+ label: D.label,
884
+ value: D.label,
885
+ color: w || D.color ? D.color : "transparent"
886
886
  }));
887
- S = {
887
+ f = {
888
888
  location: r,
889
889
  type: "list",
890
890
  props: {
891
- onChange: (V) => I(V),
892
- options: k,
893
- onEdit: D,
891
+ onChange: (D) => C(D),
892
+ options: N,
893
+ onEdit: T,
894
894
  defaultValue: R,
895
895
  multiple: m,
896
896
  showEdit: (g = (y = this._configService.getConfig(Sn)) == null ? void 0 : y.showEditOnDropdown) != null ? g : !0
@@ -899,10 +899,10 @@ let Ae = class extends Re {
899
899
  break;
900
900
  }
901
901
  case pe.CASCADE: {
902
- S = {
902
+ f = {
903
903
  type: "cascader",
904
904
  props: {
905
- onChange: (I) => {
905
+ onChange: (C) => {
906
906
  const w = {
907
907
  unitId: i,
908
908
  subUnitId: a,
@@ -913,7 +913,7 @@ let Ae = class extends Re {
913
913
  endRow: n
914
914
  },
915
915
  value: {
916
- v: I.join("/"),
916
+ v: C.join("/"),
917
917
  p: null,
918
918
  f: null,
919
919
  si: null
@@ -927,17 +927,17 @@ let Ae = class extends Re {
927
927
  }), this._commandService.syncExecuteCommand(st.id, w), !0;
928
928
  },
929
929
  defaultValue: kt(s.getCellRaw(n, o)).split("/"),
930
- options: JSON.parse((f = c.formula1) != null ? f : "[]")
930
+ options: JSON.parse((_ = c.formula1) != null ? _ : "[]")
931
931
  },
932
932
  location: r
933
933
  };
934
934
  break;
935
935
  }
936
936
  case pe.COLOR: {
937
- S = {
937
+ f = {
938
938
  type: "color",
939
939
  props: {
940
- onChange: (I) => {
940
+ onChange: (C) => {
941
941
  const w = {
942
942
  unitId: i,
943
943
  subUnitId: a,
@@ -948,7 +948,7 @@ let Ae = class extends Re {
948
948
  endRow: n
949
949
  },
950
950
  value: {
951
- v: I,
951
+ v: C,
952
952
  p: null,
953
953
  f: null,
954
954
  si: null
@@ -970,13 +970,13 @@ let Ae = class extends Re {
970
970
  default:
971
971
  throw new Error("[DataValidationDropdownManagerService]: unknown type!");
972
972
  }
973
- if (h = this._cellDropdownManagerService.showDropdown(S), !h)
973
+ if (h = this._cellDropdownManagerService.showDropdown(f), !h)
974
974
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
975
975
  const p = new Nr();
976
976
  p.add(h), p.add({
977
977
  dispose: () => {
978
- var m, I;
979
- (I = (m = this._activeDropdown) == null ? void 0 : m.onHide) == null || I.call(m);
978
+ var m, C;
979
+ (C = (m = this._activeDropdown) == null ? void 0 : m.onHide) == null || C.call(m);
980
980
  }
981
981
  }), this._currentPopup = p;
982
982
  }
@@ -1013,15 +1013,15 @@ let Ae = class extends Re {
1013
1013
  };
1014
1014
  Ae = ci([
1015
1015
  ue(0, le),
1016
- ue(1, M(ye)),
1016
+ ue(1, b(ye)),
1017
1017
  ue(2, ir),
1018
- ue(3, M(ee)),
1019
- ue(4, M(dr)),
1020
- ue(5, M(Do)),
1021
- ue(6, M(ee)),
1018
+ ue(3, b(ee)),
1019
+ ue(4, b(dr)),
1020
+ ue(5, b(Do)),
1021
+ ue(6, b(ee)),
1022
1022
  ue(7, J),
1023
1023
  ue(8, gr),
1024
- ue(9, M(we)),
1024
+ ue(9, b(we)),
1025
1025
  ue(10, ln)
1026
1026
  ], Ae);
1027
1027
  const bt = "DataValidationPanel", Fe = {
@@ -1154,12 +1154,12 @@ let dt = class extends Re {
1154
1154
  }
1155
1155
  };
1156
1156
  dt = hi([
1157
- $e(0, M(Vo)),
1158
- $e(1, M(Oo)),
1157
+ $e(0, b(Vo)),
1158
+ $e(1, b(Oo)),
1159
1159
  $e(2, le),
1160
- $e(3, M(se)),
1160
+ $e(3, b(se)),
1161
1161
  $e(4, ir),
1162
- $e(5, M(ee))
1162
+ $e(5, b(ee))
1163
1163
  ], dt);
1164
1164
  var pi = Object.getOwnPropertyDescriptor, gi = (e, t, r, n) => {
1165
1165
  for (var o = n > 1 ? void 0 : n ? pi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
@@ -1173,49 +1173,49 @@ let qe = class extends Re {
1173
1173
  // eslint-disable-next-line max-lines-per-function
1174
1174
  _initAutoFill() {
1175
1175
  const e = () => ({ redos: [], undos: [] }), t = (n, o) => {
1176
- const { source: i, target: a, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = nn([i, a]), [h, d] = u.ranges, { mapFunc: S } = u, p = {
1176
+ const { source: i, target: a, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = nn([i, a]), [h, d] = u.ranges, { mapFunc: f } = u, p = {
1177
1177
  row: h.startRow,
1178
1178
  col: h.startColumn
1179
- }, b = Ao(h, d), y = new wt(), g = /* @__PURE__ */ new Set();
1180
- b.forEach((C) => {
1181
- const R = C.repeatStartCell, D = C.relativeRange, k = {
1179
+ }, M = Ao(h, d), y = new wt(), g = /* @__PURE__ */ new Set();
1180
+ M.forEach((I) => {
1181
+ const R = I.repeatStartCell, T = I.relativeRange, N = {
1182
1182
  startRow: p.row,
1183
1183
  startColumn: p.col,
1184
1184
  endColumn: p.col,
1185
1185
  endRow: p.row
1186
- }, V = {
1186
+ }, D = {
1187
1187
  startRow: R.row,
1188
1188
  startColumn: R.col,
1189
1189
  endColumn: R.col,
1190
1190
  endRow: R.row
1191
1191
  };
1192
- Fr.foreach(D, (A, P) => {
1192
+ Fr.foreach(T, (P, A) => {
1193
1193
  const L = Rt.getPositionRange(
1194
1194
  {
1195
- startRow: A,
1196
- startColumn: P,
1197
- endColumn: P,
1198
- endRow: A
1195
+ startRow: P,
1196
+ startColumn: A,
1197
+ endColumn: A,
1198
+ endRow: P
1199
1199
  },
1200
- k
1201
- ), { row: O, col: F } = S(L.startRow, L.startColumn), x = this._sheetDataValidationModel.getRuleIdByLocation(l, s, O, F) || "", j = Rt.getPositionRange(
1200
+ N
1201
+ ), { row: V, col: F } = f(L.startRow, L.startColumn), x = this._sheetDataValidationModel.getRuleIdByLocation(l, s, V, F) || "", j = Rt.getPositionRange(
1202
1202
  {
1203
- startRow: A,
1204
- startColumn: P,
1205
- endColumn: P,
1206
- endRow: A
1203
+ startRow: P,
1204
+ startColumn: A,
1205
+ endColumn: A,
1206
+ endRow: P
1207
1207
  },
1208
- V
1209
- ), { row: Z, col: Y } = S(j.startRow, j.startColumn);
1208
+ D
1209
+ ), { row: Z, col: Y } = f(j.startRow, j.startColumn);
1210
1210
  y.setValue(Z, Y, x), g.add(x);
1211
1211
  });
1212
1212
  });
1213
- const f = Array.from(g).map((C) => ({ id: C, ranges: Gt(y, (R) => R === C) }));
1214
- c.addRangeRules(f);
1215
- const m = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: w } = Zt(l, s, m, this._injector, "patched", o === it.ONLY_FORMAT);
1213
+ const _ = Array.from(g).map((I) => ({ id: I, ranges: Gt(y, (R) => R === I) }));
1214
+ c.addRangeRules(_);
1215
+ const m = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: C, undoMutations: w } = Zt(l, s, m, this._injector, "patched", o === it.ONLY_FORMAT);
1216
1216
  return {
1217
1217
  undos: w,
1218
- redos: I
1218
+ redos: C
1219
1219
  };
1220
1220
  }, r = {
1221
1221
  id: Jn,
@@ -1239,8 +1239,8 @@ let qe = class extends Re {
1239
1239
  };
1240
1240
  qe = gi([
1241
1241
  xt(0, Po),
1242
- xt(1, M(ee)),
1243
- xt(2, M(we))
1242
+ xt(1, b(ee)),
1243
+ xt(2, b(we))
1244
1244
  ], qe);
1245
1245
  var mi = Object.getOwnPropertyDescriptor, fi = (e, t, r, n) => {
1246
1246
  for (var o = n > 1 ? void 0 : n ? mi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
@@ -1298,58 +1298,58 @@ let Je = class extends Re {
1298
1298
  return { redos: [], undos: [] };
1299
1299
  const { unitId: o, subUnitId: i } = this._copyInfo;
1300
1300
  if (r.unitId !== o || i !== r.subUnitId) {
1301
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = nn([r.copyRange, t]), d = An(c, u, !0), S = /* @__PURE__ */ new Map();
1301
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = nn([r.copyRange, t]), d = An(c, u, !0), f = /* @__PURE__ */ new Map();
1302
1302
  d.forEach(({ startRange: g }) => {
1303
- var f;
1304
- (f = this._copyInfo) == null || f.matrix.forValue((m, I, w) => {
1305
- const C = Rt.getPositionRange(
1303
+ var _;
1304
+ (_ = this._copyInfo) == null || _.matrix.forValue((m, C, w) => {
1305
+ const I = Rt.getPositionRange(
1306
1306
  {
1307
1307
  startRow: m,
1308
1308
  endRow: m,
1309
- startColumn: I,
1310
- endColumn: I
1309
+ startColumn: C,
1310
+ endColumn: C
1311
1311
  },
1312
1312
  g
1313
- ), R = `${i}-${w}`, D = this._sheetDataValidationModel.getRuleById(o, i, w);
1314
- !this._sheetDataValidationModel.getRuleById(r.unitId, r.subUnitId, R) && D && S.set(R, { ...D, uid: R });
1315
- const { row: k, col: V } = h(C.startRow, C.startColumn);
1316
- s.add(R), l.setValue(k, V, R);
1313
+ ), R = `${i}-${w}`, T = this._sheetDataValidationModel.getRuleById(o, i, w);
1314
+ !this._sheetDataValidationModel.getRuleById(r.unitId, r.subUnitId, R) && T && f.set(R, { ...T, uid: R });
1315
+ const { row: N, col: D } = h(I.startRow, I.startColumn);
1316
+ s.add(R), l.setValue(N, D, R);
1317
1317
  });
1318
1318
  });
1319
- const p = Array.from(s).map((g) => ({ id: g, ranges: Gt(l, (f) => f === g) }));
1319
+ const p = Array.from(s).map((g) => ({ id: g, ranges: Gt(l, (_) => _ === g) }));
1320
1320
  a.addRangeRules(p);
1321
- const { redoMutations: b, undoMutations: y } = Zt(
1321
+ const { redoMutations: M, undoMutations: y } = Zt(
1322
1322
  r.unitId,
1323
1323
  r.subUnitId,
1324
- a.diffWithAddition(this._sheetDataValidationModel.getRules(r.unitId, r.subUnitId), S.values()),
1324
+ a.diffWithAddition(this._sheetDataValidationModel.getRules(r.unitId, r.subUnitId), f.values()),
1325
1325
  this._injector,
1326
1326
  "patched",
1327
1327
  !1
1328
1328
  );
1329
1329
  return {
1330
- redos: b,
1330
+ redos: M,
1331
1331
  undos: y
1332
1332
  };
1333
1333
  } else {
1334
1334
  const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = nn([r.copyRange, t]);
1335
1335
  An(c, u, !0).forEach(({ startRange: y }) => {
1336
1336
  var g;
1337
- (g = this._copyInfo) == null || g.matrix.forValue((f, m, I) => {
1337
+ (g = this._copyInfo) == null || g.matrix.forValue((_, m, C) => {
1338
1338
  const w = Rt.getPositionRange(
1339
1339
  {
1340
- startRow: f,
1341
- endRow: f,
1340
+ startRow: _,
1341
+ endRow: _,
1342
1342
  startColumn: m,
1343
1343
  endColumn: m
1344
1344
  },
1345
1345
  y
1346
- ), { row: C, col: R } = h(w.startRow, w.startColumn);
1347
- l.setValue(C, R, I), s.add(I);
1346
+ ), { row: I, col: R } = h(w.startRow, w.startColumn);
1347
+ l.setValue(I, R, C), s.add(C);
1348
1348
  });
1349
1349
  });
1350
- const S = Array.from(s).map((y) => ({ id: y, ranges: Gt(l, (g) => g === y) }));
1351
- a.addRangeRules(S);
1352
- const { redoMutations: p, undoMutations: b } = Zt(
1350
+ const f = Array.from(s).map((y) => ({ id: y, ranges: Gt(l, (g) => g === y) }));
1351
+ a.addRangeRules(f);
1352
+ const { redoMutations: p, undoMutations: M } = Zt(
1353
1353
  o,
1354
1354
  i,
1355
1355
  a.diff(this._sheetDataValidationModel.getRules(o, i)),
@@ -1359,15 +1359,15 @@ let Je = class extends Re {
1359
1359
  );
1360
1360
  return {
1361
1361
  redos: p,
1362
- undos: b
1362
+ undos: M
1363
1363
  };
1364
1364
  }
1365
1365
  }
1366
1366
  };
1367
1367
  Je = fi([
1368
1368
  $t(0, Lo),
1369
- $t(1, M(ee)),
1370
- $t(2, M(we))
1369
+ $t(1, b(ee)),
1370
+ $t(2, b(we))
1371
1371
  ], Je);
1372
1372
  var vi = Object.getOwnPropertyDescriptor, _i = (e, t, r, n) => {
1373
1373
  for (var o = n > 1 ? void 0 : n ? vi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
@@ -1395,9 +1395,9 @@ let Qe = class extends Re {
1395
1395
  }
1396
1396
  };
1397
1397
  Qe = _i([
1398
- Bt(0, M(se)),
1398
+ Bt(0, b(se)),
1399
1399
  Bt(1, J),
1400
- Bt(2, M(Mo))
1400
+ Bt(2, b(Mo))
1401
1401
  ], Qe);
1402
1402
  const Mr = "data-validation-single", br = "sheet.menu.data-validation";
1403
1403
  function Si(e) {
@@ -1509,24 +1509,24 @@ let et = class extends cn {
1509
1509
  priority: pr.DATA_VALIDATION,
1510
1510
  // eslint-disable-next-line max-lines-per-function, complexity
1511
1511
  handler: (e, t, r) => {
1512
- var g, f, m, I, w;
1512
+ var g, _, m, C, w;
1513
1513
  const { row: n, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, a, n, o);
1514
1514
  if (!c)
1515
1515
  return r(e);
1516
1516
  const u = this._sheetDataValidationModel.getRuleById(i, a, c);
1517
1517
  if (!u)
1518
1518
  return r(e);
1519
- const h = (g = this._dataValidationCacheService.getValue(i, a, n, o)) != null ? g : je.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), S = t.rawData;
1519
+ const h = (g = this._dataValidationCacheService.getValue(i, a, n, o)) != null ? g : je.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), f = t.rawData;
1520
1520
  let p;
1521
- const b = {
1521
+ const M = {
1522
1522
  get value() {
1523
- var C;
1524
- return p !== void 0 || (p = (C = Q(S)) != null ? C : null), p;
1523
+ var I;
1524
+ return p !== void 0 || (p = (I = Q(f)) != null ? I : null), p;
1525
1525
  }
1526
1526
  }, y = {
1527
1527
  get value() {
1528
- var C;
1529
- return `${(C = b.value) != null ? C : ""}`;
1528
+ var I;
1529
+ return `${(I = M.value) != null ? I : ""}`;
1530
1530
  }
1531
1531
  };
1532
1532
  return r({
@@ -1536,31 +1536,31 @@ let et = class extends cn {
1536
1536
  ...h === je.INVALID ? Dr : null
1537
1537
  },
1538
1538
  customRender: [
1539
- ...(f = e == null ? void 0 : e.customRender) != null ? f : [],
1539
+ ...(_ = e == null ? void 0 : e.customRender) != null ? _ : [],
1540
1540
  ...d != null && d.canvasRender ? [d.canvasRender] : []
1541
1541
  ],
1542
1542
  fontRenderExtension: {
1543
1543
  ...e == null ? void 0 : e.fontRenderExtension,
1544
- isSkip: ((m = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : m.isSkip) || ((I = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : I.call(d, u, b.value, t))
1544
+ isSkip: ((m = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : m.isSkip) || ((C = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : C.call(d, u, M.value, t))
1545
1545
  },
1546
1546
  interceptorStyle: {
1547
1547
  ...e == null ? void 0 : e.interceptorStyle,
1548
1548
  ...d == null ? void 0 : d.getExtraStyle(u, y.value, {
1549
1549
  get style() {
1550
- const C = l.getStyles();
1551
- return (typeof (e == null ? void 0 : e.s) == "string" ? C.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1550
+ const I = l.getStyles();
1551
+ return (typeof (e == null ? void 0 : e.s) == "string" ? I.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1552
1552
  }
1553
1553
  }, n, o)
1554
1554
  },
1555
1555
  interceptorAutoHeight: () => {
1556
- var k, V, A, P, L, O;
1557
- const C = (V = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(yt).getSkeletonParam(a)) == null ? void 0 : V.skeleton;
1558
- if (!C)
1556
+ var N, D, P, A, L, V;
1557
+ const I = (D = (N = this._renderManagerService.getRenderById(i)) == null ? void 0 : N.with(yt).getSkeletonParam(a)) == null ? void 0 : D.skeleton;
1558
+ if (!I)
1559
1559
  return;
1560
- const R = C.worksheet.getMergedCell(n, o), D = {
1560
+ const R = I.worksheet.getMergedCell(n, o), T = {
1561
1561
  data: e,
1562
- style: C.getStyles().getStyleByCell(e),
1563
- primaryWithCoord: C.getCellWithCoordByIndex((A = R == null ? void 0 : R.startRow) != null ? A : n, (P = R == null ? void 0 : R.startColumn) != null ? P : o),
1562
+ style: I.getStyles().getStyleByCell(e),
1563
+ primaryWithCoord: I.getCellWithCoordByIndex((P = R == null ? void 0 : R.startRow) != null ? P : n, (A = R == null ? void 0 : R.startColumn) != null ? A : o),
1564
1564
  unitId: i,
1565
1565
  subUnitId: a,
1566
1566
  row: n,
@@ -1568,17 +1568,17 @@ let et = class extends cn {
1568
1568
  workbook: l,
1569
1569
  worksheet: s
1570
1570
  };
1571
- return (O = (L = d == null ? void 0 : d.canvasRender) == null ? void 0 : L.calcCellAutoHeight) == null ? void 0 : O.call(L, D);
1571
+ return (V = (L = d == null ? void 0 : d.canvasRender) == null ? void 0 : L.calcCellAutoHeight) == null ? void 0 : V.call(L, T);
1572
1572
  },
1573
1573
  interceptorAutoWidth: () => {
1574
- var k, V, A, P, L, O;
1575
- const C = (V = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(yt).getSkeletonParam(a)) == null ? void 0 : V.skeleton;
1576
- if (!C)
1574
+ var N, D, P, A, L, V;
1575
+ const I = (D = (N = this._renderManagerService.getRenderById(i)) == null ? void 0 : N.with(yt).getSkeletonParam(a)) == null ? void 0 : D.skeleton;
1576
+ if (!I)
1577
1577
  return;
1578
- const R = C.worksheet.getMergedCell(n, o), D = {
1578
+ const R = I.worksheet.getMergedCell(n, o), T = {
1579
1579
  data: e,
1580
- style: C.getStyles().getStyleByCell(e),
1581
- primaryWithCoord: C.getCellWithCoordByIndex((A = R == null ? void 0 : R.startRow) != null ? A : n, (P = R == null ? void 0 : R.startColumn) != null ? P : o),
1580
+ style: I.getStyles().getStyleByCell(e),
1581
+ primaryWithCoord: I.getCellWithCoordByIndex((P = R == null ? void 0 : R.startRow) != null ? P : n, (A = R == null ? void 0 : R.startColumn) != null ? A : o),
1582
1582
  unitId: i,
1583
1583
  subUnitId: a,
1584
1584
  row: n,
@@ -1586,7 +1586,7 @@ let et = class extends cn {
1586
1586
  workbook: l,
1587
1587
  worksheet: s
1588
1588
  };
1589
- return (O = (L = d == null ? void 0 : d.canvasRender) == null ? void 0 : L.calcCellAutoWidth) == null ? void 0 : O.call(L, D);
1589
+ return (V = (L = d == null ? void 0 : d.canvasRender) == null ? void 0 : L.calcCellAutoWidth) == null ? void 0 : V.call(L, T);
1590
1590
  },
1591
1591
  coverable: ((w = e == null ? void 0 : e.coverable) != null ? w : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
1592
1592
  });
@@ -1620,12 +1620,12 @@ et = Er([
1620
1620
  X(1, lo),
1621
1621
  X(2, Ne),
1622
1622
  X(3, le),
1623
- X(4, M(mr)),
1624
- X(5, M(Ae)),
1625
- X(6, M(ee)),
1626
- X(7, M(ye)),
1627
- X(8, M(vn)),
1628
- X(9, M(er)),
1623
+ X(4, b(mr)),
1624
+ X(5, b(Ae)),
1625
+ X(6, b(ee)),
1626
+ X(7, b(ye)),
1627
+ X(8, b(vn)),
1628
+ X(9, b(er)),
1629
1629
  X(10, xr(gr))
1630
1630
  ], et);
1631
1631
  let Nn = class extends cn {
@@ -1642,14 +1642,14 @@ let Nn = class extends cn {
1642
1642
  priority: pr.DATA_VALIDATION,
1643
1643
  // eslint-disable-next-line complexity
1644
1644
  handler: (e, t, r) => {
1645
- var y, g, f, m, I;
1645
+ var y, g, _, m, C;
1646
1646
  const { row: n, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, a, n, o);
1647
1647
  if (!c)
1648
1648
  return r(e);
1649
1649
  const u = this._sheetDataValidationModel.getRuleById(i, a, c);
1650
1650
  if (!u)
1651
1651
  return r(e);
1652
- const h = (y = this._dataValidationCacheService.getValue(i, a, n, o)) != null ? y : je.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), S = s.getCellRaw(n, o), p = Q(S), b = `${p != null ? p : ""}`;
1652
+ const h = (y = this._dataValidationCacheService.getValue(i, a, n, o)) != null ? y : je.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), f = s.getCellRaw(n, o), p = Q(f), M = `${p != null ? p : ""}`;
1653
1653
  return r({
1654
1654
  ...e,
1655
1655
  markers: {
@@ -1662,11 +1662,11 @@ let Nn = class extends cn {
1662
1662
  ],
1663
1663
  fontRenderExtension: {
1664
1664
  ...e == null ? void 0 : e.fontRenderExtension,
1665
- isSkip: ((f = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : f.isSkip) || ((m = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : m.call(d, u, p, t))
1665
+ isSkip: ((_ = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : _.isSkip) || ((m = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : m.call(d, u, p, t))
1666
1666
  },
1667
1667
  interceptorStyle: {
1668
1668
  ...e == null ? void 0 : e.interceptorStyle,
1669
- ...d == null ? void 0 : d.getExtraStyle(u, b, {
1669
+ ...d == null ? void 0 : d.getExtraStyle(u, M, {
1670
1670
  get style() {
1671
1671
  const w = l.getStyles();
1672
1672
  return (typeof (e == null ? void 0 : e.s) == "string" ? w.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
@@ -1674,14 +1674,14 @@ let Nn = class extends cn {
1674
1674
  }, n, o)
1675
1675
  },
1676
1676
  interceptorAutoHeight: () => {
1677
- var D, k, V, A, P, L;
1678
- const w = (k = (D = this._renderManagerService.getRenderById(i)) == null ? void 0 : D.with(yt).getSkeletonParam(a)) == null ? void 0 : k.skeleton;
1677
+ var T, N, D, P, A, L;
1678
+ const w = (N = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(yt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1679
1679
  if (!w)
1680
1680
  return;
1681
- const C = w.worksheet.getMergedCell(n, o), R = {
1681
+ const I = w.worksheet.getMergedCell(n, o), R = {
1682
1682
  data: e,
1683
1683
  style: w.getStyles().getStyleByCell(e),
1684
- primaryWithCoord: w.getCellWithCoordByIndex((V = C == null ? void 0 : C.startRow) != null ? V : n, (A = C == null ? void 0 : C.startColumn) != null ? A : o),
1684
+ primaryWithCoord: w.getCellWithCoordByIndex((D = I == null ? void 0 : I.startRow) != null ? D : n, (P = I == null ? void 0 : I.startColumn) != null ? P : o),
1685
1685
  unitId: i,
1686
1686
  subUnitId: a,
1687
1687
  row: n,
@@ -1689,9 +1689,9 @@ let Nn = class extends cn {
1689
1689
  workbook: l,
1690
1690
  worksheet: s
1691
1691
  };
1692
- return (L = (P = d == null ? void 0 : d.canvasRender) == null ? void 0 : P.calcCellAutoHeight) == null ? void 0 : L.call(P, R);
1692
+ return (L = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : L.call(A, R);
1693
1693
  },
1694
- coverable: ((I = e == null ? void 0 : e.coverable) != null ? I : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
1694
+ coverable: ((C = e == null ? void 0 : e.coverable) != null ? C : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
1695
1695
  });
1696
1696
  }
1697
1697
  }
@@ -1717,11 +1717,11 @@ let Nn = class extends cn {
1717
1717
  Nn = Er([
1718
1718
  X(0, J),
1719
1719
  X(1, Ne),
1720
- X(2, M(mr)),
1721
- X(3, M(ye)),
1722
- X(4, M(vn)),
1723
- X(5, M(ee)),
1724
- X(6, M(er))
1720
+ X(2, b(mr)),
1721
+ X(3, b(ye)),
1722
+ X(4, b(vn)),
1723
+ X(5, b(ee)),
1724
+ X(6, b(er))
1725
1725
  ], Nn);
1726
1726
  var yi = Object.getOwnPropertyDescriptor, Mi = (e, t, r, n) => {
1727
1727
  for (var o = n > 1 ? void 0 : n ? yi(t, r) : t, i = e.length - 1, a; i >= 0; i--)
@@ -1749,8 +1749,8 @@ let Et = class extends Re {
1749
1749
  }
1750
1750
  };
1751
1751
  Et = Mi([
1752
- Un(1, M(ee)),
1753
- Un(2, M(yt))
1752
+ Un(1, b(ee)),
1753
+ Un(2, b(yt))
1754
1754
  ], Et);
1755
1755
  function bi(e) {
1756
1756
  var c;
@@ -1765,13 +1765,13 @@ function bi(e) {
1765
1765
  onClick: () => l(!a),
1766
1766
  children: [
1767
1767
  t.t("dataValidation.panel.options"),
1768
- a ? /* @__PURE__ */ _(Ir, { className: "univer-ml-1 univer-text-[8px]" }) : /* @__PURE__ */ _(Cr, { className: "univer-ml-1 univer-text-[8px]" })
1768
+ a ? /* @__PURE__ */ S(Ir, { className: "univer-ml-1 univer-text-[8px]" }) : /* @__PURE__ */ S(Cr, { className: "univer-ml-1 univer-text-[8px]" })
1769
1769
  ]
1770
1770
  }
1771
1771
  ),
1772
1772
  a && /* @__PURE__ */ z(Xe, { children: [
1773
- s ? /* @__PURE__ */ _(s, { value: n, onChange: o }) : null,
1774
- /* @__PURE__ */ _(
1773
+ s ? /* @__PURE__ */ S(s, { value: n, onChange: o }) : null,
1774
+ /* @__PURE__ */ S(
1775
1775
  K,
1776
1776
  {
1777
1777
  label: t.t("dataValidation.panel.invalid"),
@@ -1781,18 +1781,18 @@ function bi(e) {
1781
1781
  value: `${(c = n.errorStyle) != null ? c : lt.WARNING}`,
1782
1782
  onChange: (u) => o({ ...n, errorStyle: +u }),
1783
1783
  children: [
1784
- /* @__PURE__ */ _(Oe, { value: `${lt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1785
- /* @__PURE__ */ _(Oe, { value: `${lt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1784
+ /* @__PURE__ */ S(Oe, { value: `${lt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1785
+ /* @__PURE__ */ S(Oe, { value: `${lt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1786
1786
  ]
1787
1787
  }
1788
1788
  )
1789
1789
  }
1790
1790
  ),
1791
- /* @__PURE__ */ _(
1791
+ /* @__PURE__ */ S(
1792
1792
  K,
1793
1793
  {
1794
1794
  label: t.t("dataValidation.panel.messageInfo"),
1795
- children: /* @__PURE__ */ _(
1795
+ children: /* @__PURE__ */ S(
1796
1796
  Pt,
1797
1797
  {
1798
1798
  checked: n.showErrorMessage,
@@ -1805,7 +1805,7 @@ function bi(e) {
1805
1805
  )
1806
1806
  }
1807
1807
  ),
1808
- n.showErrorMessage ? /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(Ve, { value: n.error, onChange: (u) => o({ ...n, error: u }) }) }) : null
1808
+ n.showErrorMessage ? /* @__PURE__ */ S(K, { children: /* @__PURE__ */ S(Ve, { value: n.error, onChange: (u) => o({ ...n, error: u }) }) }) : null
1809
1809
  ] })
1810
1810
  ] });
1811
1811
  }
@@ -1821,25 +1821,25 @@ function Di(e, t, r) {
1821
1821
  return t ? ((o = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(r)) == null ? void 0 : o.getSheetId()) || "" : ((a = (i = e.getCurrentUnitForType(W.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(r)) == null ? void 0 : a.getSheetId()) || "";
1822
1822
  }
1823
1823
  function Vi() {
1824
- var T, B;
1825
- const [e, t] = H(0), r = U(_e), n = Te(r.activeRule$, r.activeRule), { unitId: o, subUnitId: i, rule: a } = n || {}, l = a.uid, s = U(ye), c = U(le), u = U(gn), h = U(J), d = U(mn), S = U(se), [p, b] = H(a), y = s.getValidatorItem(p.type), [g, f] = H(!1), m = s.getValidatorsByScope(uo.SHEET), [I, w] = H(() => p.ranges.map((v) => ({ unitId: "", sheetId: "", range: v }))), C = ct(() => Ei(h), [h]), [R, D] = H(!1), [k, V] = H(!1), A = ut(null), P = U(dr);
1824
+ var O, B;
1825
+ const [e, t] = H(0), r = U(_e), n = Te(r.activeRule$, r.activeRule), { unitId: o, subUnitId: i, rule: a } = n || {}, l = a.uid, s = U(ye), c = U(le), u = U(gn), h = U(J), d = U(mn), f = U(se), [p, M] = H(a), y = s.getValidatorItem(p.type), [g, _] = H(!1), m = s.getValidatorsByScope(uo.SHEET), [C, w] = H(() => p.ranges.map((v) => ({ unitId: "", sheetId: "", range: v }))), I = ct(() => Ei(h), [h]), [R, T] = H(!1), [N, D] = H(!1), P = ut(null), A = U(dr);
1826
1826
  if (Pe(() => () => {
1827
- const v = P.getCurrentLastSelection();
1828
- v && P.setSelections([v]);
1829
- }, [P]), Pe(() => {
1827
+ const v = A.getCurrentLastSelection();
1828
+ v && A.setSelections([v]);
1829
+ }, [A]), Pe(() => {
1830
1830
  h.onCommandExecuted((v) => {
1831
1831
  (v.id === Hr.id || v.id === Wr.id) && setTimeout(() => {
1832
- const N = d.getRuleById(o, i, l);
1833
- t(($) => $ + 1), N && (b(N), w(N.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
1832
+ const k = d.getRuleById(o, i, l);
1833
+ t(($) => $ + 1), k && (M(k), w(k.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
1834
1834
  }, 20);
1835
1835
  });
1836
1836
  }, [h, d, l, i, o]), !y)
1837
1837
  return null;
1838
- const L = y.operators, O = y.operatorNames, F = p.operator ? ho.includes(p.operator) : !1, x = () => {
1839
- var v, N, $;
1840
- (N = (v = A.current) == null ? void 0 : v.editor) != null && N.isFocus() && j(($ = A.current) == null ? void 0 : $.getValue()), !(!p.ranges.length || R) && (y.validatorFormula(p, o, i).success ? r.setActiveRule(null) : f(!0));
1838
+ const L = y.operators, V = y.operatorNames, F = p.operator ? ho.includes(p.operator) : !1, x = () => {
1839
+ var v, k, $;
1840
+ (k = (v = P.current) == null ? void 0 : v.editor) != null && k.isFocus() && j(($ = P.current) == null ? void 0 : $.getValue()), !(!p.ranges.length || R) && (y.validatorFormula(p, o, i).success ? r.setActiveRule(null) : _(!0));
1841
1841
  }, j = qt((v) => {
1842
- const N = v.split(",").filter(Boolean).map(Uo).map((q) => {
1842
+ const k = v.split(",").filter(Boolean).map(Uo).map((q) => {
1843
1843
  const In = q.sheetName;
1844
1844
  if (In) {
1845
1845
  const Pr = Di(c, q.unitId, In);
@@ -1850,11 +1850,11 @@ function Vi() {
1850
1850
  sheetId: ""
1851
1851
  };
1852
1852
  });
1853
- if (jr(N, I))
1853
+ if (jr(k, C))
1854
1854
  return;
1855
- w(N);
1856
- const $ = N.filter((q) => (!q.unitId || q.unitId === o) && (!q.sheetId || q.sheetId === i)).map((q) => q.range);
1857
- if (b({
1855
+ w(k);
1856
+ const $ = k.filter((q) => (!q.unitId || q.unitId === o) && (!q.sheetId || q.sheetId === i)).map((q) => q.range);
1857
+ if (M({
1858
1858
  ...p,
1859
1859
  ranges: $
1860
1860
  }), $.length === 0)
@@ -1865,23 +1865,23 @@ function Vi() {
1865
1865
  ruleId: l,
1866
1866
  ranges: $
1867
1867
  };
1868
- C(Qn.id, Ce);
1868
+ I(Qn.id, Ce);
1869
1869
  }), Z = (v) => {
1870
1870
  if (Rn(v, Vn(p)))
1871
1871
  return;
1872
- b({
1872
+ M({
1873
1873
  ...p,
1874
1874
  ...v
1875
1875
  });
1876
- const N = {
1876
+ const k = {
1877
1877
  unitId: o,
1878
1878
  subUnitId: i,
1879
1879
  ruleId: l,
1880
1880
  setting: v
1881
1881
  };
1882
- C(
1882
+ I(
1883
1883
  yn.id,
1884
- N,
1884
+ k,
1885
1885
  void 0
1886
1886
  );
1887
1887
  }, Y = async () => {
@@ -1897,10 +1897,10 @@ function Vi() {
1897
1897
  formula2: p.formula2,
1898
1898
  allowBlank: p.allowBlank
1899
1899
  }, ge = (v) => {
1900
- const N = s.getValidatorItem(v);
1901
- if (!N)
1900
+ const k = s.getValidatorItem(v);
1901
+ if (!k)
1902
1902
  return;
1903
- const $ = N.operators, Ce = d.getRuleById(o, i, l), q = v === (Ce == null ? void 0 : Ce.type) || v.includes("list") && (Ce != null && Ce.type.includes("list")) ? {
1903
+ const $ = k.operators, Ce = d.getRuleById(o, i, l), q = v === (Ce == null ? void 0 : Ce.type) || v.includes("list") && (Ce != null && Ce.type.includes("list")) ? {
1904
1904
  ...Ce,
1905
1905
  type: v
1906
1906
  } : {
@@ -1910,17 +1910,17 @@ function Vi() {
1910
1910
  formula1: void 0,
1911
1911
  formula2: void 0
1912
1912
  };
1913
- b(q), h.executeCommand(yn.id, {
1913
+ M(q), h.executeCommand(yn.id, {
1914
1914
  unitId: o,
1915
1915
  subUnitId: i,
1916
1916
  ruleId: p.uid,
1917
1917
  setting: Vn(q)
1918
1918
  });
1919
- }, ce = u.get(y.formulaInput), ne = ct(() => I.map((v) => fr(v.range)).join(","), []), de = Dn(p), Se = (v) => {
1920
- Rn(v, Dn(p)) || (b({
1919
+ }, ce = u.get(y.formulaInput), ne = ct(() => C.map((v) => fr(v.range)).join(","), []), de = Dn(p), Se = (v) => {
1920
+ Rn(v, Dn(p)) || (M({
1921
1921
  ...p,
1922
1922
  ...v
1923
- }), C(
1923
+ }), I(
1924
1924
  qr.id,
1925
1925
  {
1926
1926
  unitId: o,
@@ -1931,44 +1931,44 @@ function Vi() {
1931
1931
  ));
1932
1932
  }, me = L.length && !p.operator;
1933
1933
  return /* @__PURE__ */ z("div", { className: "univer-py-4", children: [
1934
- /* @__PURE__ */ _(
1934
+ /* @__PURE__ */ S(
1935
1935
  K,
1936
1936
  {
1937
- label: S.t("dataValidation.panel.range"),
1938
- error: !p.ranges.length || R ? S.t("dataValidation.panel.rangeError") : "",
1939
- children: /* @__PURE__ */ _(
1937
+ label: f.t("dataValidation.panel.range"),
1938
+ error: !p.ranges.length || R ? f.t("dataValidation.panel.rangeError") : "",
1939
+ children: /* @__PURE__ */ S(
1940
1940
  co,
1941
1941
  {
1942
- selectorRef: A,
1942
+ selectorRef: P,
1943
1943
  unitId: o,
1944
1944
  subUnitId: i,
1945
1945
  initialValue: ne,
1946
- onChange: (v, N) => {
1946
+ onChange: (v, k) => {
1947
1947
  var $;
1948
- !k && (($ = A.current) != null && $.verify()) && j(N);
1948
+ !N && (($ = P.current) != null && $.verify()) && j(k);
1949
1949
  },
1950
- onFocusChange: (v, N) => {
1950
+ onFocusChange: (v, k) => {
1951
1951
  var $;
1952
- V(v), !v && N && (($ = A.current) != null && $.verify()) && j(N);
1952
+ D(v), !v && k && (($ = P.current) != null && $.verify()) && j(k);
1953
1953
  },
1954
- onVerify: (v) => D(!v)
1954
+ onVerify: (v) => T(!v)
1955
1955
  }
1956
1956
  )
1957
1957
  }
1958
1958
  ),
1959
- /* @__PURE__ */ _(K, { label: S.t("dataValidation.panel.type"), children: /* @__PURE__ */ _(
1959
+ /* @__PURE__ */ S(K, { label: f.t("dataValidation.panel.type"), children: /* @__PURE__ */ S(
1960
1960
  bn,
1961
1961
  {
1962
1962
  className: "univer-w-full",
1963
1963
  value: p.type,
1964
- options: (T = m == null ? void 0 : m.sort((v, N) => v.order - N.order)) == null ? void 0 : T.map((v) => ({
1965
- label: S.t(v.title),
1964
+ options: (O = m == null ? void 0 : m.sort((v, k) => v.order - k.order)) == null ? void 0 : O.map((v) => ({
1965
+ label: f.t(v.title),
1966
1966
  value: v.id
1967
1967
  })),
1968
1968
  onChange: ge
1969
1969
  }
1970
1970
  ) }),
1971
- L != null && L.length ? /* @__PURE__ */ _(K, { label: S.t("dataValidation.panel.operator"), children: /* @__PURE__ */ _(
1971
+ L != null && L.length ? /* @__PURE__ */ S(K, { label: f.t("dataValidation.panel.operator"), children: /* @__PURE__ */ S(
1972
1972
  bn,
1973
1973
  {
1974
1974
  className: "univer-w-full",
@@ -1976,11 +1976,11 @@ function Vi() {
1976
1976
  options: [
1977
1977
  {
1978
1978
  value: "",
1979
- label: S.t("dataValidation.operators.legal")
1979
+ label: f.t("dataValidation.operators.legal")
1980
1980
  },
1981
- ...L.map((v, N) => ({
1981
+ ...L.map((v, k) => ({
1982
1982
  value: `${v}`,
1983
- label: O[N]
1983
+ label: V[k]
1984
1984
  }))
1985
1985
  ],
1986
1986
  onChange: (v) => {
@@ -1991,7 +1991,7 @@ function Vi() {
1991
1991
  }
1992
1992
  }
1993
1993
  ) }) : null,
1994
- ce && !me ? /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
1994
+ ce && !me ? /* @__PURE__ */ S(K, { children: /* @__PURE__ */ S(
1995
1995
  ce,
1996
1996
  {
1997
1997
  isTwoFormula: F,
@@ -2013,7 +2013,7 @@ function Vi() {
2013
2013
  },
2014
2014
  e + p.type
2015
2015
  ) }) : null,
2016
- /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
2016
+ /* @__PURE__ */ S(K, { children: /* @__PURE__ */ S(
2017
2017
  Pt,
2018
2018
  {
2019
2019
  checked: (B = p.allowBlank) != null ? B : !0,
@@ -2024,23 +2024,23 @@ function Vi() {
2024
2024
  allowBlank: !((v = p.allowBlank) == null || v)
2025
2025
  });
2026
2026
  },
2027
- children: S.t("dataValidation.panel.allowBlank")
2027
+ children: f.t("dataValidation.panel.allowBlank")
2028
2028
  }
2029
2029
  ) }),
2030
- /* @__PURE__ */ _(bi, { value: de, onChange: Se, extraComponent: y.optionsInput }),
2030
+ /* @__PURE__ */ S(bi, { value: de, onChange: Se, extraComponent: y.optionsInput }),
2031
2031
  /* @__PURE__ */ z("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
2032
- /* @__PURE__ */ _(ze, { className: "univer-ml-3", onClick: Y, children: S.t("dataValidation.panel.removeRule") }),
2033
- /* @__PURE__ */ _(ze, { className: "univer-ml-3", variant: "primary", onClick: x, children: S.t("dataValidation.panel.done") })
2032
+ /* @__PURE__ */ S(ze, { className: "univer-ml-3", onClick: Y, children: f.t("dataValidation.panel.removeRule") }),
2033
+ /* @__PURE__ */ S(ze, { className: "univer-ml-3", variant: "primary", onClick: x, children: f.t("dataValidation.panel.done") })
2034
2034
  ] })
2035
2035
  ] });
2036
2036
  }
2037
2037
  const Oi = (e) => {
2038
- const { rule: t, onClick: r, unitId: n, subUnitId: o, disable: i } = e, a = U(ye), l = U(J), s = U(No), c = a.getValidatorItem(t.type), u = ut(void 0), [h, d] = H(!1), S = U(Yn), p = Te(S.currentTheme$), b = ct(() => {
2039
- var m;
2040
- const g = (m = p == null ? void 0 : p.loopColor2) != null ? m : "#49B811", f = new Yr(g).toRgb();
2038
+ const { rule: t, onClick: r, unitId: n, subUnitId: o, disable: i } = e, a = U(ye), l = U(J), s = U(No), c = a.getValidatorItem(t.type), u = ut(void 0), [h, d] = H(!1), f = U(Yn), p = Te(f.currentTheme$), M = ct(() => {
2039
+ var w;
2040
+ const g = f.getColorFromTheme("primary.600"), _ = f.getColorFromTheme("loop-color.2"), m = (w = f.getColorFromTheme(_)) != null ? w : g, C = new Yr(m).toRgb();
2041
2041
  return {
2042
- fill: `rgba(${f.r}, ${f.g}, ${f.b}, 0.1)`,
2043
- stroke: g
2042
+ fill: `rgba(${C.r}, ${C.g}, ${C.b}, 0.1)`,
2043
+ stroke: m
2044
2044
  };
2045
2045
  }, [p]), y = (g) => {
2046
2046
  l.executeCommand(tr.id, {
@@ -2051,8 +2051,8 @@ const Oi = (e) => {
2051
2051
  };
2052
2052
  return Pe(() => () => {
2053
2053
  var g;
2054
- u.current && ((g = u.current) == null || g.forEach((f) => {
2055
- f && s.removeShape(f);
2054
+ u.current && ((g = u.current) == null || g.forEach((_) => {
2055
+ _ && s.removeShape(_);
2056
2056
  }));
2057
2057
  }, [s]), /* @__PURE__ */ z(
2058
2058
  "div",
@@ -2072,18 +2072,18 @@ const Oi = (e) => {
2072
2072
  onMouseEnter: () => {
2073
2073
  i || (d(!0), u.current = t.ranges.map((g) => s.addShape({
2074
2074
  range: g,
2075
- style: b,
2075
+ style: M,
2076
2076
  primary: null
2077
2077
  })));
2078
2078
  },
2079
2079
  onMouseLeave: () => {
2080
2080
  var g;
2081
- d(!1), (g = u.current) == null || g.forEach((f) => {
2082
- f && s.removeShape(f);
2081
+ d(!1), (g = u.current) == null || g.forEach((_) => {
2082
+ _ && s.removeShape(_);
2083
2083
  }), u.current = void 0;
2084
2084
  },
2085
2085
  children: [
2086
- /* @__PURE__ */ _(
2086
+ /* @__PURE__ */ S(
2087
2087
  "div",
2088
2088
  {
2089
2089
  className: `
@@ -2093,7 +2093,7 @@ const Oi = (e) => {
2093
2093
  children: c == null ? void 0 : c.generateRuleName(t)
2094
2094
  }
2095
2095
  ),
2096
- /* @__PURE__ */ _(
2096
+ /* @__PURE__ */ S(
2097
2097
  "div",
2098
2098
  {
2099
2099
  className: `
@@ -2102,7 +2102,7 @@ const Oi = (e) => {
2102
2102
  children: t.ranges.map((g) => fr(g)).join(",")
2103
2103
  }
2104
2104
  ),
2105
- h ? /* @__PURE__ */ _(
2105
+ h ? /* @__PURE__ */ S(
2106
2106
  "div",
2107
2107
  {
2108
2108
  className: `
@@ -2111,7 +2111,7 @@ const Oi = (e) => {
2111
2111
  hover:univer-bg-gray-200
2112
2112
  `,
2113
2113
  onClick: y,
2114
- children: /* @__PURE__ */ _(_n, {})
2114
+ children: /* @__PURE__ */ S(_n, {})
2115
2115
  }
2116
2116
  ) : null
2117
2117
  ]
@@ -2122,57 +2122,57 @@ function Ti(e) {
2122
2122
  const t = U(ee), r = U(le), n = U(J), o = U(we), i = U(_e), a = U(se), [l, s] = H([]), { workbook: c } = e, u = Te(c.activeSheet$, void 0, !0), h = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
2123
2123
  Pe(() => {
2124
2124
  s(t.getRules(h, d));
2125
- const f = t.ruleChange$.subscribe((m) => {
2125
+ const _ = t.ruleChange$.subscribe((m) => {
2126
2126
  m.unitId === h && m.subUnitId === d && s(t.getRules(h, d));
2127
2127
  });
2128
2128
  return () => {
2129
- f.unsubscribe();
2129
+ _.unsubscribe();
2130
2130
  };
2131
2131
  }, [h, d, t]);
2132
- const S = async () => {
2133
- const f = qn(o), m = {
2132
+ const f = async () => {
2133
+ const _ = qn(o), m = {
2134
2134
  unitId: h,
2135
2135
  subUnitId: d,
2136
- rule: f
2136
+ rule: _
2137
2137
  };
2138
2138
  await n.executeCommand(un.id, m), i.setActiveRule({
2139
2139
  unitId: h,
2140
2140
  subUnitId: d,
2141
- rule: f
2141
+ rule: _
2142
2142
  });
2143
2143
  }, p = () => {
2144
2144
  n.executeCommand(Jr.id, {
2145
2145
  unitId: h,
2146
2146
  subUnitId: d
2147
2147
  });
2148
- }, y = ((f) => {
2149
- const m = r.getCurrentUnitForType(W.UNIVER_SHEET), I = m.getActiveSheet(), w = m.getUnitId(), C = I.getSheetId();
2150
- return f.map((D) => bo(o, w, C, D.ranges) ? { ...D } : { ...D, disable: !0 });
2151
- })(l), g = y == null ? void 0 : y.some((f) => f.disable);
2148
+ }, y = ((_) => {
2149
+ const m = r.getCurrentUnitForType(W.UNIVER_SHEET), C = m.getActiveSheet(), w = m.getUnitId(), I = C.getSheetId();
2150
+ return _.map((T) => bo(o, w, I, T.ranges) ? { ...T } : { ...T, disable: !0 });
2151
+ })(l), g = y == null ? void 0 : y.some((_) => _.disable);
2152
2152
  return /* @__PURE__ */ z("div", { className: "univer-pb-4", children: [
2153
- y == null ? void 0 : y.map((f) => {
2153
+ y == null ? void 0 : y.map((_) => {
2154
2154
  var m;
2155
- return /* @__PURE__ */ _(
2155
+ return /* @__PURE__ */ S(
2156
2156
  Oi,
2157
2157
  {
2158
2158
  unitId: h,
2159
2159
  subUnitId: d,
2160
2160
  onClick: () => {
2161
- f.disable || i.setActiveRule({
2161
+ _.disable || i.setActiveRule({
2162
2162
  unitId: h,
2163
2163
  subUnitId: d,
2164
- rule: f
2164
+ rule: _
2165
2165
  });
2166
2166
  },
2167
- rule: f,
2168
- disable: (m = f.disable) != null ? m : !1
2167
+ rule: _,
2168
+ disable: (m = _.disable) != null ? m : !1
2169
2169
  },
2170
- f.uid
2170
+ _.uid
2171
2171
  );
2172
2172
  }),
2173
2173
  /* @__PURE__ */ z("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
2174
- l.length && !g ? /* @__PURE__ */ _(ze, { onClick: p, children: a.t("dataValidation.panel.removeAll") }) : null,
2175
- /* @__PURE__ */ _(ze, { variant: "primary", onClick: S, children: a.t("dataValidation.panel.add") })
2174
+ l.length && !g ? /* @__PURE__ */ S(ze, { onClick: p, children: a.t("dataValidation.panel.removeAll") }) : null,
2175
+ /* @__PURE__ */ S(ze, { variant: "primary", onClick: f, children: a.t("dataValidation.panel.add") })
2176
2176
  ] })
2177
2177
  ] });
2178
2178
  }
@@ -2186,15 +2186,15 @@ const Pi = () => {
2186
2186
  var i;
2187
2187
  return (i = n == null ? void 0 : n.activeSheet$) != null ? i : mo(null);
2188
2188
  }, void 0, void 0, []);
2189
- return !n || !o ? null : t && t.subUnitId === o.getSheetId() ? /* @__PURE__ */ _(Vi, {}, t.rule.uid) : /* @__PURE__ */ _(Ti, { workbook: n });
2189
+ return !n || !o ? null : t && t.subUnitId === o.getSheetId() ? /* @__PURE__ */ S(Vi, {}, t.rule.uid) : /* @__PURE__ */ S(Ti, { workbook: n });
2190
2190
  }, Ai = "LIST_RENDER_MODE_OPTION_INPUT";
2191
2191
  function Dt(e) {
2192
2192
  var o;
2193
2193
  const { value: t, onChange: r } = e, n = U(se);
2194
- return /* @__PURE__ */ _(K, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ z(hn, { value: `${(o = t.renderMode) != null ? o : oe.CUSTOM}`, onChange: (i) => r({ ...t, renderMode: +i }), children: [
2195
- /* @__PURE__ */ _(Oe, { value: `${oe.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2196
- /* @__PURE__ */ _(Oe, { value: `${oe.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2197
- /* @__PURE__ */ _(Oe, { value: `${oe.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2194
+ return /* @__PURE__ */ S(K, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ z(hn, { value: `${(o = t.renderMode) != null ? o : oe.CUSTOM}`, onChange: (i) => r({ ...t, renderMode: +i }), children: [
2195
+ /* @__PURE__ */ S(Oe, { value: `${oe.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2196
+ /* @__PURE__ */ S(Oe, { value: `${oe.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2197
+ /* @__PURE__ */ S(Oe, { value: `${oe.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2198
2198
  ] }) });
2199
2199
  }
2200
2200
  Dt.componentKey = Ai;
@@ -2202,7 +2202,7 @@ const Li = "DATE_SHOW_TIME_OPTION";
2202
2202
  function Vt(e) {
2203
2203
  var o;
2204
2204
  const { value: t, onChange: r } = e, n = U(se);
2205
- return /* @__PURE__ */ _(K, { children: /* @__PURE__ */ _(
2205
+ return /* @__PURE__ */ S(K, { children: /* @__PURE__ */ S(
2206
2206
  Pt,
2207
2207
  {
2208
2208
  checked: (o = t.bizInfo) == null ? void 0 : o.showTime,
@@ -2274,28 +2274,25 @@ let rn = class {
2274
2274
  return ((r = t == null ? void 0 : t.fs) != null ? r : 10) * 1.6;
2275
2275
  }
2276
2276
  async _parseFormula(e, t, r) {
2277
- var c, u, h, d, S, p, b, y, g;
2278
- const { formula1: n = to, formula2: o = eo } = e, i = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Nt((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Nt((p = (S = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : S[0]) == null ? void 0 : p[0]), s = Mn(String(a)) && Mn(String(l));
2277
+ var c, u, h, d, f, p, M, y, g;
2278
+ const { formula1: n = to, formula2: o = eo } = e, i = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Nt((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Nt((p = (f = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : f[0]) == null ? void 0 : p[0]), s = Mn(String(a)) && Mn(String(l));
2279
2279
  return {
2280
- formula1: De(n) ? Nt((g = (y = (b = i == null ? void 0 : i[0]) == null ? void 0 : b.result) == null ? void 0 : y[0]) == null ? void 0 : g[0]) : n,
2280
+ formula1: De(n) ? Nt((g = (y = (M = i == null ? void 0 : i[0]) == null ? void 0 : M.result) == null ? void 0 : y[0]) == null ? void 0 : g[0]) : n,
2281
2281
  formula2: De(o) ? l : o,
2282
2282
  isFormulaValid: s
2283
2283
  };
2284
2284
  }
2285
2285
  drawWith(e, t) {
2286
- var P, L, O, F;
2286
+ var P, A, L, V;
2287
2287
  const { style: r, primaryWithCoord: n, unitId: o, subUnitId: i, worksheet: a, row: l, col: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = Q(a.getCellRaw(l, s)), h = this._dataValidationModel.getRuleByLocation(o, i, l, s);
2288
2288
  if (!h)
2289
2289
  return;
2290
2290
  const d = this._dataValidationModel.getValidator(h.type);
2291
- if (!d)
2292
- return;
2293
- const S = this._themeService.getCurrentTheme();
2294
- if (!((P = d.skipDefaultFontRender) != null && P.call(d, h, u, { unitId: o, subUnitId: i, row: l, column: s })))
2291
+ if (!d || !((P = d.skipDefaultFontRender) != null && P.call(d, h, u, { unitId: o, subUnitId: i, row: l, column: s })))
2295
2292
  return;
2296
- const p = d.parseFormulaSync(h, o, i), { formula1: b } = p, y = this._calc(c, r), { a: g, d: f } = e.getTransform(), m = Tn(y.left, g), I = Tn(y.top, f), w = fo.create().composeMatrix({
2297
- left: m,
2298
- top: I,
2293
+ const f = d.parseFormulaSync(h, o, i), { formula1: p } = f, M = this._calc(c, r), { a: y, d: g } = e.getTransform(), _ = Tn(M.left, y), m = Tn(M.top, g), C = fo.create().composeMatrix({
2294
+ left: _,
2295
+ top: m,
2299
2296
  scaleX: 1,
2300
2297
  scaleY: 1,
2301
2298
  angle: 0,
@@ -2303,16 +2300,16 @@ let rn = class {
2303
2300
  skewY: 0,
2304
2301
  flipX: !1,
2305
2302
  flipY: !1
2306
- }), C = c.endX - c.startX, R = c.endY - c.startY;
2307
- e.save(), e.beginPath(), e.rect(c.startX, c.startY, C, R), e.clip();
2308
- const D = w.getMatrix();
2309
- e.transform(D[0], D[1], D[2], D[3], D[4], D[5]);
2310
- const k = ((L = r == null ? void 0 : r.fs) != null ? L : 10) * 1.6, V = String(u) === String(b), A = S.hyacinth500;
2303
+ }), w = c.endX - c.startX, I = c.endY - c.startY;
2304
+ e.save(), e.beginPath(), e.rect(c.startX, c.startY, w, I), e.clip();
2305
+ const R = C.getMatrix();
2306
+ e.transform(R[0], R[1], R[2], R[3], R[4], R[5]);
2307
+ const T = ((A = r == null ? void 0 : r.fs) != null ? A : 10) * 1.6, N = String(u) === String(p), D = this._themeService.getColorFromTheme("primary.600");
2311
2308
  vo.drawWith(e, {
2312
- checked: V,
2313
- width: k,
2314
- height: k,
2315
- fill: (F = (O = r == null ? void 0 : r.cl) == null ? void 0 : O.rgb) != null ? F : A
2309
+ checked: N,
2310
+ width: T,
2311
+ height: T,
2312
+ fill: (V = (L = r == null ? void 0 : r.cl) == null ? void 0 : L.rgb) != null ? V : D
2316
2313
  }), e.restore();
2317
2314
  }
2318
2315
  isHit(e, t) {
@@ -2329,7 +2326,7 @@ let rn = class {
2329
2326
  const u = this._dataValidationModel.getValidator(c.type);
2330
2327
  if (!u || !((p = u.skipDefaultFontRender) != null && p.call(u, c, s, { unitId: n, subUnitId: o, row: a, column: l })))
2331
2328
  return;
2332
- const { formula1: h, formula2: d } = await this._parseFormula(c, n, o), S = {
2329
+ const { formula1: h, formula2: d } = await this._parseFormula(c, n, o), f = {
2333
2330
  range: {
2334
2331
  startColumn: r.actualColumn,
2335
2332
  endColumn: r.actualColumn,
@@ -2343,7 +2340,7 @@ let rn = class {
2343
2340
  };
2344
2341
  this._commandService.executeCommand(
2345
2342
  st.id,
2346
- S
2343
+ f
2347
2344
  );
2348
2345
  }
2349
2346
  onPointerEnter(e, t) {
@@ -2358,10 +2355,10 @@ let rn = class {
2358
2355
  rn = Ni([
2359
2356
  Be(0, J),
2360
2357
  Be(1, le),
2361
- Be(2, M(Qr)),
2362
- Be(3, M(Yn)),
2363
- Be(4, M(Ne)),
2364
- Be(5, M(ee))
2358
+ Be(2, b(Qr)),
2359
+ Be(3, b(Yn)),
2360
+ Be(4, b(Ne)),
2361
+ Be(5, b(ee))
2365
2362
  ], rn);
2366
2363
  class Ui extends ve {
2367
2364
  constructor() {
@@ -2412,10 +2409,10 @@ function Wt(e, t, r, n) {
2412
2409
  let s;
2413
2410
  const c = [];
2414
2411
  l.forEach((d) => {
2415
- const { layout: S } = d, { width: p, height: b } = S;
2412
+ const { layout: f } = d, { width: p, height: M } = f;
2416
2413
  !s || s.width + p + Ht > i ? (s = {
2417
2414
  width: p,
2418
- height: b,
2415
+ height: M,
2419
2416
  items: [{
2420
2417
  ...d,
2421
2418
  left: 0
@@ -2426,8 +2423,8 @@ function Wt(e, t, r, n) {
2426
2423
  }), s.width = s.width + p + Ht);
2427
2424
  });
2428
2425
  let u = 0, h = 0;
2429
- return c.forEach((d, S) => {
2430
- h = Math.max(h, d.width), S === c.length - 1 ? u += d.height : u += d.height + Or;
2426
+ return c.forEach((d, f) => {
2427
+ h = Math.max(h, d.width), f === c.length - 1 ? u += d.height : u += d.height + Or;
2431
2428
  }), {
2432
2429
  lines: c,
2433
2430
  totalHeight: u,
@@ -2484,21 +2481,21 @@ let an = class {
2484
2481
  // eslint-disable-next-line max-lines-per-function
2485
2482
  drawWith(e, t, r, n) {
2486
2483
  var Z, Y;
2487
- const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: c } = t, u = o.isMergedMainCell ? o.mergeInfo : o, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: S = 0, topOffset: p = 0, downOffset: b = 0 } = h || {}, y = this._ensureMap(c), g = this._generateKey(i, a), f = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, a);
2488
- if (!f)
2484
+ const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: c } = t, u = o.isMergedMainCell ? o.mergeInfo : o, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: f = 0, topOffset: p = 0, downOffset: M = 0 } = h || {}, y = this._ensureMap(c), g = this._generateKey(i, a), _ = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, a);
2485
+ if (!_)
2489
2486
  return;
2490
- const m = this._dataValidationModel.getValidator(f.type);
2487
+ const m = this._dataValidationModel.getValidator(_.type);
2491
2488
  if (!m)
2492
2489
  return;
2493
- const I = {
2490
+ const C = {
2494
2491
  startX: u.startX + d,
2495
- endX: u.endX - S,
2492
+ endX: u.endX - f,
2496
2493
  startY: u.startY + p,
2497
- endY: u.endY - b
2498
- }, w = I.endX - I.startX, C = I.endY - I.startY, { cl: R } = l || {}, D = (Z = typeof R == "object" ? R == null ? void 0 : R.rgb : R) != null ? Z : "#000", k = Ut(l != null ? l : void 0), { vt: V, ht: A } = l || {}, P = V != null ? V : ae.MIDDLE, L = (Y = Q(s)) != null ? Y : "", O = m.parseCellValue(L), F = m.getListWithColorMap(f), x = Wt(O, k, w, C);
2499
- this._drawDownIcon(e, I, w, C, P), e.save(), e.translateWithPrecision(I.startX, I.startY), e.beginPath(), e.rect(0, 0, w - Ee, C), e.clip(), e.translateWithPrecision(on, Ot);
2494
+ endY: u.endY - M
2495
+ }, w = C.endX - C.startX, I = C.endY - C.startY, { cl: R } = l || {}, T = (Z = typeof R == "object" ? R == null ? void 0 : R.rgb : R) != null ? Z : "#000", N = Ut(l != null ? l : void 0), { vt: D, ht: P } = l || {}, A = D != null ? D : ae.MIDDLE, L = (Y = Q(s)) != null ? Y : "", V = m.parseCellValue(L), F = m.getListWithColorMap(_), x = Wt(V, N, w, I);
2496
+ this._drawDownIcon(e, C, w, I, A), e.save(), e.translateWithPrecision(C.startX, C.startY), e.beginPath(), e.rect(0, 0, w - Ee, I), e.clip(), e.translateWithPrecision(on, Ot);
2500
2497
  let j = 0;
2501
- switch (P) {
2498
+ switch (A) {
2502
2499
  case ae.MIDDLE:
2503
2500
  j = (x.contentHeight - x.totalHeight) / 2;
2504
2501
  break;
@@ -2510,7 +2507,7 @@ let an = class {
2510
2507
  e.save();
2511
2508
  const { width: ce, height: ne, items: de } = te;
2512
2509
  let Se = 0;
2513
- switch (A) {
2510
+ switch (P) {
2514
2511
  case Ye.RIGHT:
2515
2512
  Se = x.contentWidth - ce;
2516
2513
  break;
@@ -2520,15 +2517,15 @@ let an = class {
2520
2517
  }
2521
2518
  e.translate(Se, ge * (ne + Or)), de.forEach((me) => {
2522
2519
  e.save(), e.translateWithPrecision(me.left, 0), Yi.drawWith(e, {
2523
- ...k,
2520
+ ...N,
2524
2521
  info: me,
2525
- color: D,
2522
+ color: T,
2526
2523
  fill: F[me.text]
2527
2524
  }), e.restore();
2528
2525
  }), e.restore();
2529
2526
  }), e.restore(), y.set(g, {
2530
- left: I.startX,
2531
- top: I.startY,
2527
+ left: C.startX,
2528
+ top: C.startY,
2532
2529
  width: x.contentWidth + on + Ee,
2533
2530
  height: x.contentHeight + Ot * 2
2534
2531
  });
@@ -2540,14 +2537,14 @@ let an = class {
2540
2537
  endX: h.endX - s,
2541
2538
  startY: h.startY + c,
2542
2539
  endY: h.endY - u
2543
- }, S = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2544
- if (!S)
2540
+ }, f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2541
+ if (!f)
2545
2542
  return;
2546
- const p = this._dataValidationModel.getValidator(S.type);
2543
+ const p = this._dataValidationModel.getValidator(f.type);
2547
2544
  if (!p)
2548
2545
  return;
2549
- const b = d.endX - d.startX, y = d.endY - d.startY, g = (w = Q(n)) != null ? w : "", f = p.parseCellValue(g), m = Ut(r != null ? r : void 0);
2550
- return Wt(f, m, b, y).cellAutoHeight;
2546
+ const M = d.endX - d.startX, y = d.endY - d.startY, g = (w = Q(n)) != null ? w : "", _ = p.parseCellValue(g), m = Ut(r != null ? r : void 0);
2547
+ return Wt(_, m, M, y).cellAutoHeight;
2551
2548
  }
2552
2549
  calcCellAutoWidth(e) {
2553
2550
  var w;
@@ -2556,14 +2553,14 @@ let an = class {
2556
2553
  endX: h.endX - s,
2557
2554
  startY: h.startY + c,
2558
2555
  endY: h.endY - u
2559
- }, S = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2560
- if (!S)
2556
+ }, f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2557
+ if (!f)
2561
2558
  return;
2562
- const p = this._dataValidationModel.getValidator(S.type);
2559
+ const p = this._dataValidationModel.getValidator(f.type);
2563
2560
  if (!p)
2564
2561
  return;
2565
- const b = d.endX - d.startX, y = d.endY - d.startY, g = (w = Q(n)) != null ? w : "", f = p.parseCellValue(g), m = Ut(r != null ? r : void 0);
2566
- return Wt(f, m, b, y).calcAutoWidth;
2562
+ const M = d.endX - d.startX, y = d.endY - d.startY, g = (w = Q(n)) != null ? w : "", _ = p.parseCellValue(g), m = Ut(r != null ? r : void 0);
2563
+ return Wt(_, m, M, y).calcAutoWidth;
2567
2564
  }
2568
2565
  isHit(e, t) {
2569
2566
  const { primaryWithCoord: r } = t, n = r.isMergedMainCell ? r.mergeInfo : r, { endX: o } = n, { x: i } = e;
@@ -2592,8 +2589,8 @@ let an = class {
2592
2589
  an = zi([
2593
2590
  vt(0, J),
2594
2591
  vt(1, le),
2595
- vt(2, M(Ne)),
2596
- vt(3, M(ee))
2592
+ vt(2, b(Ne)),
2593
+ vt(3, b(ee))
2597
2594
  ], an);
2598
2595
  class Gi extends ve {
2599
2596
  constructor() {
@@ -2739,39 +2736,39 @@ let sn = class {
2739
2736
  const h = this._dataValidationModel.getValidator(u.type);
2740
2737
  if (!h)
2741
2738
  return;
2742
- const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: S = 0, rightOffset: p = 0, topOffset: b = 0, downOffset: y = 0 } = d || {};
2739
+ const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: f = 0, rightOffset: p = 0, topOffset: M = 0, downOffset: y = 0 } = d || {};
2743
2740
  if (!u || !h || !h || h.id.indexOf(G.LIST) !== 0 || !h.skipDefaultFontRender(u))
2744
2741
  return;
2745
2742
  const g = {
2746
- startX: c.startX + S,
2743
+ startX: c.startX + f,
2747
2744
  endX: c.endX - p,
2748
- startY: c.startY + b,
2745
+ startY: c.startY + M,
2749
2746
  endY: c.endY - y
2750
- }, f = g.endX - g.startX, m = g.endY - g.startY, I = this._ensureMap(s), w = this._generateKey(o, i), C = h.getListWithColor(u), R = Q(l), D = `${R != null ? R : ""}`, k = C.find((O) => O.label === D);
2751
- let { tb: V, vt: A, ht: P, pd: L } = a || {};
2752
- if (V = V != null ? V : Ie.WRAP, A = A != null ? A : ae.BOTTOM, P = P != null ? P : re.ht, L = L != null ? L : re.pd, u.renderMode === oe.ARROW) {
2753
- const { l: O = re.pd.l, t: F = re.pd.t, r: x = re.pd.r, b: j = re.pd.b } = L, Z = f - O - x - he - 4, { documentSkeleton: Y, documents: te, docModel: ge } = St(D, this._localeService, a);
2754
- V === Ie.WRAP && ge.updateDocumentDataPageSize(Math.max(Z, 1)), Y.calculate(), Y.getActualSize();
2755
- const ce = ot(Y), { height: ne, width: de } = ce, { paddingTop: Se, paddingLeft: me } = xn(Z, m - F - j, de, ne, A, P, !0);
2756
- this._drawDownIcon(e, g, f, m, ne, A, L), e.save(), e.translateWithPrecision(g.startX + O, g.startY + F), e.beginPath(), e.rect(0, 0, f - O - x, m - F - j), e.clip(), e.translateWithPrecision(0, Se), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, Z, ne), e.clip(), te.render(e), e.translateWithPrecision(me, 0), e.restore(), e.restore(), I.set(w, {
2757
- left: g.endX + O + r.rowHeaderWidth - he,
2747
+ }, _ = g.endX - g.startX, m = g.endY - g.startY, C = this._ensureMap(s), w = this._generateKey(o, i), I = h.getListWithColor(u), R = Q(l), T = `${R != null ? R : ""}`, N = I.find((V) => V.label === T);
2748
+ let { tb: D, vt: P, ht: A, pd: L } = a || {};
2749
+ if (D = D != null ? D : Ie.WRAP, P = P != null ? P : ae.BOTTOM, A = A != null ? A : re.ht, L = L != null ? L : re.pd, u.renderMode === oe.ARROW) {
2750
+ const { l: V = re.pd.l, t: F = re.pd.t, r: x = re.pd.r, b: j = re.pd.b } = L, Z = _ - V - x - he - 4, { documentSkeleton: Y, documents: te, docModel: ge } = St(T, this._localeService, a);
2751
+ D === Ie.WRAP && ge.updateDocumentDataPageSize(Math.max(Z, 1)), Y.calculate(), Y.getActualSize();
2752
+ const ce = ot(Y), { height: ne, width: de } = ce, { paddingTop: Se, paddingLeft: me } = xn(Z, m - F - j, de, ne, P, A, !0);
2753
+ this._drawDownIcon(e, g, _, m, ne, P, L), e.save(), e.translateWithPrecision(g.startX + V, g.startY + F), e.beginPath(), e.rect(0, 0, _ - V - x, m - F - j), e.clip(), e.translateWithPrecision(0, Se), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, Z, ne), e.clip(), te.render(e), e.translateWithPrecision(me, 0), e.restore(), e.restore(), C.set(w, {
2754
+ left: g.endX + V + r.rowHeaderWidth - he,
2758
2755
  top: g.startY + F + r.columnHeaderHeight,
2759
2756
  width: he,
2760
2757
  height: m - F - j
2761
2758
  });
2762
2759
  } else {
2763
- e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, f, m), e.clip();
2764
- const O = f - fe * 2 - be - he - 4, { documentSkeleton: F, documents: x, docModel: j } = St(D, this._localeService, a);
2765
- V === Ie.WRAP && j.updateDocumentDataPageSize(Math.max(O, 1)), F.calculate();
2766
- const Z = ot(F), { height: Y, width: te } = Z, { paddingTop: ge, paddingLeft: ce } = xn(O, m, te, Y, A, P);
2760
+ e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, _, m), e.clip();
2761
+ const V = _ - fe * 2 - be - he - 4, { documentSkeleton: F, documents: x, docModel: j } = St(T, this._localeService, a);
2762
+ D === Ie.WRAP && j.updateDocumentDataPageSize(Math.max(V, 1)), F.calculate();
2763
+ const Z = ot(F), { height: Y, width: te } = Z, { paddingTop: ge, paddingLeft: ce } = xn(V, m, te, Y, P, A);
2767
2764
  e.translateWithPrecision(fe, ge);
2768
- const ne = Math.max(f - fe * 2, 1), de = Y;
2765
+ const ne = Math.max(_ - fe * 2, 1), de = Y;
2769
2766
  cr.drawWith(e, {
2770
2767
  width: ne,
2771
2768
  height: de,
2772
- fill: (k == null ? void 0 : k.color) || He,
2769
+ fill: (N == null ? void 0 : N.color) || He,
2773
2770
  radius: jt
2774
- }), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, O, Y), e.clip(), e.translateWithPrecision(ce, 0), x.render(e), e.restore(), e.translateWithPrecision(O + be + 4, (Y - _t) / 2), e.fillStyle = Ji, e.fill(Fn), e.restore(), I.set(w, {
2771
+ }), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, V, Y), e.clip(), e.translateWithPrecision(ce, 0), x.render(e), e.restore(), e.translateWithPrecision(V + be + 4, (Y - _t) / 2), e.fillStyle = Ji, e.fill(Fn), e.restore(), C.set(w, {
2775
2772
  left: g.startX + fe + r.rowHeaderWidth,
2776
2773
  top: g.startY + ge + r.columnHeaderHeight,
2777
2774
  width: ne,
@@ -2783,62 +2780,62 @@ let sn = class {
2783
2780
  const { primaryWithCoord: t, style: r, data: n, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2784
2781
  if (!d || d.renderMode === oe.TEXT)
2785
2782
  return;
2786
- const S = {
2783
+ const f = {
2787
2784
  startX: a.startX + s,
2788
2785
  endX: a.endX - c,
2789
2786
  startY: a.startY + u,
2790
2787
  endY: a.endY - h
2791
- }, p = S.endX - S.startX, b = Q(n), y = `${b != null ? b : ""}`;
2792
- let { tb: g, pd: f } = r || {};
2793
- const { t: m = re.pd.t, b: I = re.pd.b } = f != null ? f : {};
2788
+ }, p = f.endX - f.startX, M = Q(n), y = `${M != null ? M : ""}`;
2789
+ let { tb: g, pd: _ } = r || {};
2790
+ const { t: m = re.pd.t, b: C = re.pd.b } = _ != null ? _ : {};
2794
2791
  if (g = g != null ? g : Ie.WRAP, d.renderMode === oe.ARROW) {
2795
- const w = p - he, { documentSkeleton: C, docModel: R } = St(y, this._localeService, r);
2796
- g === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), C.calculate(), C.getActualSize();
2797
- const D = ot(C), { height: k } = D;
2798
- return k + m + I + We * 2;
2792
+ const w = p - he, { documentSkeleton: I, docModel: R } = St(y, this._localeService, r);
2793
+ g === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), I.calculate(), I.getActualSize();
2794
+ const T = ot(I), { height: N } = T;
2795
+ return N + m + C + We * 2;
2799
2796
  } else {
2800
- const w = p - fe * 2 - be - he, { documentSkeleton: C, docModel: R } = Tr(y, this._localeService, r);
2801
- g === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), C.calculate();
2802
- const D = ot(C), {
2803
- height: k
2804
- } = D;
2805
- return k + We * 2;
2797
+ const w = p - fe * 2 - be - he, { documentSkeleton: I, docModel: R } = Tr(y, this._localeService, r);
2798
+ g === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), I.calculate();
2799
+ const T = ot(I), {
2800
+ height: N
2801
+ } = T;
2802
+ return N + We * 2;
2806
2803
  }
2807
2804
  }
2808
2805
  calcCellAutoWidth(e) {
2809
2806
  const { primaryWithCoord: t, style: r, data: n, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2810
2807
  if (!d || d.renderMode === oe.TEXT)
2811
2808
  return;
2812
- const S = {
2809
+ const f = {
2813
2810
  startX: a.startX + s,
2814
2811
  endX: a.endX - c,
2815
2812
  startY: a.startY + u,
2816
2813
  endY: a.endY - h
2817
- }, p = S.endX - S.startX, b = Q(n), y = `${b != null ? b : ""}`;
2818
- let { tb: g, pd: f } = r || {};
2819
- const { l: m = re.pd.l, r: I = re.pd.r } = f != null ? f : {};
2814
+ }, p = f.endX - f.startX, M = Q(n), y = `${M != null ? M : ""}`;
2815
+ let { tb: g, pd: _ } = r || {};
2816
+ const { l: m = re.pd.l, r: C = re.pd.r } = _ != null ? _ : {};
2820
2817
  g = g != null ? g : Ie.WRAP;
2821
2818
  let w = fe * 2 + he;
2822
2819
  switch (d.renderMode) {
2823
2820
  case oe.ARROW:
2824
- w = he + fe * 2 + I + m;
2821
+ w = he + fe * 2 + C + m;
2825
2822
  break;
2826
2823
  case oe.CUSTOM:
2827
- w = he + fe * 2 + be * 2 + I + m + jt / 2 + 1;
2824
+ w = he + fe * 2 + be * 2 + C + m + jt / 2 + 1;
2828
2825
  break;
2829
2826
  // default is CUSTOM
2830
2827
  default:
2831
- w = he + fe * 2 + be * 2 + I + m + jt / 2 + 1;
2828
+ w = he + fe * 2 + be * 2 + C + m + jt / 2 + 1;
2832
2829
  }
2833
- const C = p - w, { documentSkeleton: R, docModel: D } = St(y, this._localeService, r);
2834
- return g === Ie.WRAP && D.updateDocumentDataPageSize(Math.max(C, 1)), R.calculate(), R.getActualSize(), ot(R).width + w;
2830
+ const I = p - w, { documentSkeleton: R, docModel: T } = St(y, this._localeService, r);
2831
+ return g === Ie.WRAP && T.updateDocumentDataPageSize(Math.max(I, 1)), R.calculate(), R.getActualSize(), ot(R).width + w;
2835
2832
  }
2836
2833
  isHit(e, t) {
2837
2834
  const { subUnitId: r, row: n, col: o } = t, a = this._ensureMap(r).get(this._generateKey(n, o)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, n, o);
2838
2835
  if (!l || !a || l.renderMode === oe.TEXT)
2839
2836
  return !1;
2840
- const { top: s, left: c, width: u, height: h } = a, { x: d, y: S } = e;
2841
- return d >= c && d <= c + u && S >= s && S <= s + h;
2837
+ const { top: s, left: c, width: u, height: h } = a, { x: d, y: f } = e;
2838
+ return d >= c && d <= c + u && f >= s && f <= s + h;
2842
2839
  }
2843
2840
  onPointerDown(e, t) {
2844
2841
  if (t.button === 2)
@@ -2862,10 +2859,10 @@ let sn = class {
2862
2859
  };
2863
2860
  sn = qi([
2864
2861
  at(0, le),
2865
- at(1, M(se)),
2862
+ at(1, b(se)),
2866
2863
  at(2, J),
2867
- at(3, M(Ne)),
2868
- at(4, M(ee))
2864
+ at(3, b(Ne)),
2865
+ at(4, b(ee))
2869
2866
  ], sn);
2870
2867
  class ea extends ve {
2871
2868
  constructor() {
@@ -2931,9 +2928,9 @@ let tt = class extends cn {
2931
2928
  }
2932
2929
  };
2933
2930
  tt = oa([
2934
- Yt(0, M(we)),
2935
- Yt(1, M(gn)),
2936
- Yt(2, M(ye))
2931
+ Yt(0, b(we)),
2932
+ Yt(1, b(gn)),
2933
+ Yt(2, b(ye))
2937
2934
  ], tt);
2938
2935
  var ia = Object.getOwnPropertyDescriptor, aa = (e, t, r, n) => {
2939
2936
  for (var o = n > 1 ? void 0 : n ? ia(t, r) : t, i = e.length - 1, a; i >= 0; i--)
@@ -2990,7 +2987,7 @@ let $n = (Ct = class extends Xn {
2990
2987
  }
2991
2988
  }, E(Ct, "pluginName", sa), E(Ct, "type", W.UNIVER_SHEET), Ct);
2992
2989
  $n = aa([
2993
- Xt(1, M(we)),
2990
+ Xt(1, b(we)),
2994
2991
  Xt(2, J),
2995
2992
  Xt(3, ln)
2996
2993
  ], $n);
@@ -3048,7 +3045,7 @@ let Bn = (It = class extends Xn {
3048
3045
  }
3049
3046
  }, E(It, "pluginName", da), E(It, "type", W.UNIVER_SHEET), It);
3050
3047
  Bn = ca([
3051
- zt(1, M(we)),
3048
+ zt(1, b(we)),
3052
3049
  zt(2, J),
3053
3050
  zt(3, ln)
3054
3051
  ], Bn);