@odoo/o-spreadsheet 16.1.31 → 16.1.33

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.
@@ -909,7 +909,7 @@ function isBoolean(str) {
909
909
  function isDateTime(str) {
910
910
  return parseDateTime(str) !== null;
911
911
  }
912
- const MARKDOWN_LINK_REGEX = /^\[([^\[]+)\]\((.+)\)$/;
912
+ const MARKDOWN_LINK_REGEX = /^\[(.+)\]\((.+)\)$/;
913
913
  //link must start with http or https
914
914
  //https://stackoverflow.com/a/3809435/4760614
915
915
  const WEB_LINK_REGEX = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
@@ -2001,27 +2001,30 @@ function detectFormat(content) {
2001
2001
  }
2002
2002
  function createLargeNumberFormat(format, magnitude, postFix) {
2003
2003
  const internalFormat = parseFormat(format || "#,##0");
2004
- const largeNumberFormat = internalFormat
2005
- .map((formatPart) => {
2006
- if (formatPart.type === "NUMBER") {
2007
- return [
2008
- {
2009
- ...formatPart,
2010
- format: {
2011
- ...formatPart.format,
2012
- magnitude,
2013
- decimalPart: undefined,
2014
- },
2015
- },
2016
- {
2017
- type: "STRING",
2018
- format: postFix,
2019
- },
2020
- ];
2004
+ const largeNumberFormat = [];
2005
+ for (let i = 0; i < internalFormat.length; i++) {
2006
+ const formatPart = internalFormat[i];
2007
+ if (formatPart.type !== "NUMBER") {
2008
+ largeNumberFormat.push(formatPart);
2009
+ continue;
2021
2010
  }
2022
- return formatPart;
2023
- })
2024
- .flat();
2011
+ largeNumberFormat.push({
2012
+ ...formatPart,
2013
+ format: {
2014
+ ...formatPart.format,
2015
+ magnitude,
2016
+ decimalPart: undefined,
2017
+ },
2018
+ });
2019
+ largeNumberFormat.push({
2020
+ type: "STRING",
2021
+ format: postFix,
2022
+ });
2023
+ const nextFormatPart = internalFormat[i + 1];
2024
+ if ((nextFormatPart === null || nextFormatPart === void 0 ? void 0 : nextFormatPart.type) === "STRING" && ["k", "m", "b"].includes(nextFormatPart.format)) {
2025
+ i++;
2026
+ }
2027
+ }
2025
2028
  return convertInternalFormatToFormat(largeNumberFormat);
2026
2029
  }
2027
2030
  function changeDecimalPlaces(format, step) {
@@ -3666,64 +3669,65 @@ var CommandResult;
3666
3669
  CommandResult[CommandResult["InvalidFigureId"] = 28] = "InvalidFigureId";
3667
3670
  CommandResult[CommandResult["InputAlreadyFocused"] = 29] = "InputAlreadyFocused";
3668
3671
  CommandResult[CommandResult["MaximumRangesReached"] = 30] = "MaximumRangesReached";
3669
- CommandResult[CommandResult["InvalidChartDefinition"] = 31] = "InvalidChartDefinition";
3670
- CommandResult[CommandResult["InvalidDataSet"] = 32] = "InvalidDataSet";
3671
- CommandResult[CommandResult["InvalidLabelRange"] = 33] = "InvalidLabelRange";
3672
- CommandResult[CommandResult["InvalidScorecardKeyValue"] = 34] = "InvalidScorecardKeyValue";
3673
- CommandResult[CommandResult["InvalidScorecardBaseline"] = 35] = "InvalidScorecardBaseline";
3674
- CommandResult[CommandResult["InvalidGaugeDataRange"] = 36] = "InvalidGaugeDataRange";
3675
- CommandResult[CommandResult["EmptyGaugeRangeMin"] = 37] = "EmptyGaugeRangeMin";
3676
- CommandResult[CommandResult["GaugeRangeMinNaN"] = 38] = "GaugeRangeMinNaN";
3677
- CommandResult[CommandResult["EmptyGaugeRangeMax"] = 39] = "EmptyGaugeRangeMax";
3678
- CommandResult[CommandResult["GaugeRangeMaxNaN"] = 40] = "GaugeRangeMaxNaN";
3679
- CommandResult[CommandResult["GaugeRangeMinBiggerThanRangeMax"] = 41] = "GaugeRangeMinBiggerThanRangeMax";
3680
- CommandResult[CommandResult["GaugeLowerInflectionPointNaN"] = 42] = "GaugeLowerInflectionPointNaN";
3681
- CommandResult[CommandResult["GaugeUpperInflectionPointNaN"] = 43] = "GaugeUpperInflectionPointNaN";
3682
- CommandResult[CommandResult["GaugeLowerBiggerThanUpper"] = 44] = "GaugeLowerBiggerThanUpper";
3683
- CommandResult[CommandResult["InvalidAutofillSelection"] = 45] = "InvalidAutofillSelection";
3684
- CommandResult[CommandResult["WrongComposerSelection"] = 46] = "WrongComposerSelection";
3685
- CommandResult[CommandResult["MinBiggerThanMax"] = 47] = "MinBiggerThanMax";
3686
- CommandResult[CommandResult["LowerBiggerThanUpper"] = 48] = "LowerBiggerThanUpper";
3687
- CommandResult[CommandResult["MidBiggerThanMax"] = 49] = "MidBiggerThanMax";
3688
- CommandResult[CommandResult["MinBiggerThanMid"] = 50] = "MinBiggerThanMid";
3689
- CommandResult[CommandResult["FirstArgMissing"] = 51] = "FirstArgMissing";
3690
- CommandResult[CommandResult["SecondArgMissing"] = 52] = "SecondArgMissing";
3691
- CommandResult[CommandResult["MinNaN"] = 53] = "MinNaN";
3692
- CommandResult[CommandResult["MidNaN"] = 54] = "MidNaN";
3693
- CommandResult[CommandResult["MaxNaN"] = 55] = "MaxNaN";
3694
- CommandResult[CommandResult["ValueUpperInflectionNaN"] = 56] = "ValueUpperInflectionNaN";
3695
- CommandResult[CommandResult["ValueLowerInflectionNaN"] = 57] = "ValueLowerInflectionNaN";
3696
- CommandResult[CommandResult["MinInvalidFormula"] = 58] = "MinInvalidFormula";
3697
- CommandResult[CommandResult["MidInvalidFormula"] = 59] = "MidInvalidFormula";
3698
- CommandResult[CommandResult["MaxInvalidFormula"] = 60] = "MaxInvalidFormula";
3699
- CommandResult[CommandResult["ValueUpperInvalidFormula"] = 61] = "ValueUpperInvalidFormula";
3700
- CommandResult[CommandResult["ValueLowerInvalidFormula"] = 62] = "ValueLowerInvalidFormula";
3701
- CommandResult[CommandResult["InvalidSortZone"] = 63] = "InvalidSortZone";
3702
- CommandResult[CommandResult["WaitingSessionConfirmation"] = 64] = "WaitingSessionConfirmation";
3703
- CommandResult[CommandResult["MergeOverlap"] = 65] = "MergeOverlap";
3704
- CommandResult[CommandResult["TooManyHiddenElements"] = 66] = "TooManyHiddenElements";
3705
- CommandResult[CommandResult["Readonly"] = 67] = "Readonly";
3706
- CommandResult[CommandResult["InvalidViewportSize"] = 68] = "InvalidViewportSize";
3707
- CommandResult[CommandResult["InvalidScrollingDirection"] = 69] = "InvalidScrollingDirection";
3708
- CommandResult[CommandResult["FigureDoesNotExist"] = 70] = "FigureDoesNotExist";
3709
- CommandResult[CommandResult["InvalidConditionalFormatId"] = 71] = "InvalidConditionalFormatId";
3710
- CommandResult[CommandResult["InvalidCellPopover"] = 72] = "InvalidCellPopover";
3711
- CommandResult[CommandResult["EmptyTarget"] = 73] = "EmptyTarget";
3712
- CommandResult[CommandResult["InvalidFreezeQuantity"] = 74] = "InvalidFreezeQuantity";
3713
- CommandResult[CommandResult["FrozenPaneOverlap"] = 75] = "FrozenPaneOverlap";
3714
- CommandResult[CommandResult["ValuesNotChanged"] = 76] = "ValuesNotChanged";
3715
- CommandResult[CommandResult["InvalidFilterZone"] = 77] = "InvalidFilterZone";
3716
- CommandResult[CommandResult["FilterOverlap"] = 78] = "FilterOverlap";
3717
- CommandResult[CommandResult["FilterNotFound"] = 79] = "FilterNotFound";
3718
- CommandResult[CommandResult["MergeInFilter"] = 80] = "MergeInFilter";
3719
- CommandResult[CommandResult["NonContinuousTargets"] = 81] = "NonContinuousTargets";
3720
- CommandResult[CommandResult["DuplicatedFigureId"] = 82] = "DuplicatedFigureId";
3721
- CommandResult[CommandResult["InvalidSelectionStep"] = 83] = "InvalidSelectionStep";
3722
- CommandResult[CommandResult["DuplicatedChartId"] = 84] = "DuplicatedChartId";
3723
- CommandResult[CommandResult["ChartDoesNotExist"] = 85] = "ChartDoesNotExist";
3724
- CommandResult[CommandResult["InvalidHeaderIndex"] = 86] = "InvalidHeaderIndex";
3725
- CommandResult[CommandResult["InvalidQuantity"] = 87] = "InvalidQuantity";
3726
- CommandResult[CommandResult["NoChanges"] = 88] = "NoChanges";
3672
+ CommandResult[CommandResult["InvalidInputId"] = 31] = "InvalidInputId";
3673
+ CommandResult[CommandResult["InvalidChartDefinition"] = 32] = "InvalidChartDefinition";
3674
+ CommandResult[CommandResult["InvalidDataSet"] = 33] = "InvalidDataSet";
3675
+ CommandResult[CommandResult["InvalidLabelRange"] = 34] = "InvalidLabelRange";
3676
+ CommandResult[CommandResult["InvalidScorecardKeyValue"] = 35] = "InvalidScorecardKeyValue";
3677
+ CommandResult[CommandResult["InvalidScorecardBaseline"] = 36] = "InvalidScorecardBaseline";
3678
+ CommandResult[CommandResult["InvalidGaugeDataRange"] = 37] = "InvalidGaugeDataRange";
3679
+ CommandResult[CommandResult["EmptyGaugeRangeMin"] = 38] = "EmptyGaugeRangeMin";
3680
+ CommandResult[CommandResult["GaugeRangeMinNaN"] = 39] = "GaugeRangeMinNaN";
3681
+ CommandResult[CommandResult["EmptyGaugeRangeMax"] = 40] = "EmptyGaugeRangeMax";
3682
+ CommandResult[CommandResult["GaugeRangeMaxNaN"] = 41] = "GaugeRangeMaxNaN";
3683
+ CommandResult[CommandResult["GaugeRangeMinBiggerThanRangeMax"] = 42] = "GaugeRangeMinBiggerThanRangeMax";
3684
+ CommandResult[CommandResult["GaugeLowerInflectionPointNaN"] = 43] = "GaugeLowerInflectionPointNaN";
3685
+ CommandResult[CommandResult["GaugeUpperInflectionPointNaN"] = 44] = "GaugeUpperInflectionPointNaN";
3686
+ CommandResult[CommandResult["GaugeLowerBiggerThanUpper"] = 45] = "GaugeLowerBiggerThanUpper";
3687
+ CommandResult[CommandResult["InvalidAutofillSelection"] = 46] = "InvalidAutofillSelection";
3688
+ CommandResult[CommandResult["WrongComposerSelection"] = 47] = "WrongComposerSelection";
3689
+ CommandResult[CommandResult["MinBiggerThanMax"] = 48] = "MinBiggerThanMax";
3690
+ CommandResult[CommandResult["LowerBiggerThanUpper"] = 49] = "LowerBiggerThanUpper";
3691
+ CommandResult[CommandResult["MidBiggerThanMax"] = 50] = "MidBiggerThanMax";
3692
+ CommandResult[CommandResult["MinBiggerThanMid"] = 51] = "MinBiggerThanMid";
3693
+ CommandResult[CommandResult["FirstArgMissing"] = 52] = "FirstArgMissing";
3694
+ CommandResult[CommandResult["SecondArgMissing"] = 53] = "SecondArgMissing";
3695
+ CommandResult[CommandResult["MinNaN"] = 54] = "MinNaN";
3696
+ CommandResult[CommandResult["MidNaN"] = 55] = "MidNaN";
3697
+ CommandResult[CommandResult["MaxNaN"] = 56] = "MaxNaN";
3698
+ CommandResult[CommandResult["ValueUpperInflectionNaN"] = 57] = "ValueUpperInflectionNaN";
3699
+ CommandResult[CommandResult["ValueLowerInflectionNaN"] = 58] = "ValueLowerInflectionNaN";
3700
+ CommandResult[CommandResult["MinInvalidFormula"] = 59] = "MinInvalidFormula";
3701
+ CommandResult[CommandResult["MidInvalidFormula"] = 60] = "MidInvalidFormula";
3702
+ CommandResult[CommandResult["MaxInvalidFormula"] = 61] = "MaxInvalidFormula";
3703
+ CommandResult[CommandResult["ValueUpperInvalidFormula"] = 62] = "ValueUpperInvalidFormula";
3704
+ CommandResult[CommandResult["ValueLowerInvalidFormula"] = 63] = "ValueLowerInvalidFormula";
3705
+ CommandResult[CommandResult["InvalidSortZone"] = 64] = "InvalidSortZone";
3706
+ CommandResult[CommandResult["WaitingSessionConfirmation"] = 65] = "WaitingSessionConfirmation";
3707
+ CommandResult[CommandResult["MergeOverlap"] = 66] = "MergeOverlap";
3708
+ CommandResult[CommandResult["TooManyHiddenElements"] = 67] = "TooManyHiddenElements";
3709
+ CommandResult[CommandResult["Readonly"] = 68] = "Readonly";
3710
+ CommandResult[CommandResult["InvalidViewportSize"] = 69] = "InvalidViewportSize";
3711
+ CommandResult[CommandResult["InvalidScrollingDirection"] = 70] = "InvalidScrollingDirection";
3712
+ CommandResult[CommandResult["FigureDoesNotExist"] = 71] = "FigureDoesNotExist";
3713
+ CommandResult[CommandResult["InvalidConditionalFormatId"] = 72] = "InvalidConditionalFormatId";
3714
+ CommandResult[CommandResult["InvalidCellPopover"] = 73] = "InvalidCellPopover";
3715
+ CommandResult[CommandResult["EmptyTarget"] = 74] = "EmptyTarget";
3716
+ CommandResult[CommandResult["InvalidFreezeQuantity"] = 75] = "InvalidFreezeQuantity";
3717
+ CommandResult[CommandResult["FrozenPaneOverlap"] = 76] = "FrozenPaneOverlap";
3718
+ CommandResult[CommandResult["ValuesNotChanged"] = 77] = "ValuesNotChanged";
3719
+ CommandResult[CommandResult["InvalidFilterZone"] = 78] = "InvalidFilterZone";
3720
+ CommandResult[CommandResult["FilterOverlap"] = 79] = "FilterOverlap";
3721
+ CommandResult[CommandResult["FilterNotFound"] = 80] = "FilterNotFound";
3722
+ CommandResult[CommandResult["MergeInFilter"] = 81] = "MergeInFilter";
3723
+ CommandResult[CommandResult["NonContinuousTargets"] = 82] = "NonContinuousTargets";
3724
+ CommandResult[CommandResult["DuplicatedFigureId"] = 83] = "DuplicatedFigureId";
3725
+ CommandResult[CommandResult["InvalidSelectionStep"] = 84] = "InvalidSelectionStep";
3726
+ CommandResult[CommandResult["DuplicatedChartId"] = 85] = "DuplicatedChartId";
3727
+ CommandResult[CommandResult["ChartDoesNotExist"] = 86] = "ChartDoesNotExist";
3728
+ CommandResult[CommandResult["InvalidHeaderIndex"] = 87] = "InvalidHeaderIndex";
3729
+ CommandResult[CommandResult["InvalidQuantity"] = 88] = "InvalidQuantity";
3730
+ CommandResult[CommandResult["NoChanges"] = 89] = "NoChanges";
3727
3731
  })(CommandResult || (CommandResult = {}));
3728
3732
 
3729
3733
  function isMatrix(x) {
@@ -3997,11 +4001,11 @@ function checkDataset(definition) {
3997
4001
  if (definition.dataSets) {
3998
4002
  const invalidRanges = definition.dataSets.find((range) => !rangeReference.test(range)) !== undefined;
3999
4003
  if (invalidRanges) {
4000
- return 32 /* CommandResult.InvalidDataSet */;
4004
+ return 33 /* CommandResult.InvalidDataSet */;
4001
4005
  }
4002
4006
  const zones = definition.dataSets.map(toUnboundedZone);
4003
4007
  if (zones.some((zone) => zone.top !== zone.bottom && isFullRow(zone))) {
4004
- return 32 /* CommandResult.InvalidDataSet */;
4008
+ return 33 /* CommandResult.InvalidDataSet */;
4005
4009
  }
4006
4010
  }
4007
4011
  return 0 /* CommandResult.Success */;
@@ -4010,7 +4014,7 @@ function checkLabelRange(definition) {
4010
4014
  if (definition.labelRange) {
4011
4015
  const invalidLabels = !rangeReference.test(definition.labelRange || "");
4012
4016
  if (invalidLabels) {
4013
- return 33 /* CommandResult.InvalidLabelRange */;
4017
+ return 34 /* CommandResult.InvalidLabelRange */;
4014
4018
  }
4015
4019
  }
4016
4020
  return 0 /* CommandResult.Success */;
@@ -4083,22 +4087,22 @@ function getChartPositionAtCenterOfViewport(getters, chartSize) {
4083
4087
  const CfTerms = {
4084
4088
  Errors: {
4085
4089
  [25 /* CommandResult.InvalidRange */]: _lt("The range is invalid"),
4086
- [51 /* CommandResult.FirstArgMissing */]: _lt("The argument is missing. Please provide a value"),
4087
- [52 /* CommandResult.SecondArgMissing */]: _lt("The second argument is missing. Please provide a value"),
4088
- [53 /* CommandResult.MinNaN */]: _lt("The minpoint must be a number"),
4089
- [54 /* CommandResult.MidNaN */]: _lt("The midpoint must be a number"),
4090
- [55 /* CommandResult.MaxNaN */]: _lt("The maxpoint must be a number"),
4091
- [56 /* CommandResult.ValueUpperInflectionNaN */]: _lt("The first value must be a number"),
4092
- [57 /* CommandResult.ValueLowerInflectionNaN */]: _lt("The second value must be a number"),
4093
- [47 /* CommandResult.MinBiggerThanMax */]: _lt("Minimum must be smaller then Maximum"),
4094
- [50 /* CommandResult.MinBiggerThanMid */]: _lt("Minimum must be smaller then Midpoint"),
4095
- [49 /* CommandResult.MidBiggerThanMax */]: _lt("Midpoint must be smaller then Maximum"),
4096
- [48 /* CommandResult.LowerBiggerThanUpper */]: _lt("Lower inflection point must be smaller than upper inflection point"),
4097
- [58 /* CommandResult.MinInvalidFormula */]: _lt("Invalid Minpoint formula"),
4098
- [60 /* CommandResult.MaxInvalidFormula */]: _lt("Invalid Maxpoint formula"),
4099
- [59 /* CommandResult.MidInvalidFormula */]: _lt("Invalid Midpoint formula"),
4100
- [61 /* CommandResult.ValueUpperInvalidFormula */]: _lt("Invalid upper inflection point formula"),
4101
- [62 /* CommandResult.ValueLowerInvalidFormula */]: _lt("Invalid lower inflection point formula"),
4090
+ [52 /* CommandResult.FirstArgMissing */]: _lt("The argument is missing. Please provide a value"),
4091
+ [53 /* CommandResult.SecondArgMissing */]: _lt("The second argument is missing. Please provide a value"),
4092
+ [54 /* CommandResult.MinNaN */]: _lt("The minpoint must be a number"),
4093
+ [55 /* CommandResult.MidNaN */]: _lt("The midpoint must be a number"),
4094
+ [56 /* CommandResult.MaxNaN */]: _lt("The maxpoint must be a number"),
4095
+ [57 /* CommandResult.ValueUpperInflectionNaN */]: _lt("The first value must be a number"),
4096
+ [58 /* CommandResult.ValueLowerInflectionNaN */]: _lt("The second value must be a number"),
4097
+ [48 /* CommandResult.MinBiggerThanMax */]: _lt("Minimum must be smaller then Maximum"),
4098
+ [51 /* CommandResult.MinBiggerThanMid */]: _lt("Minimum must be smaller then Midpoint"),
4099
+ [50 /* CommandResult.MidBiggerThanMax */]: _lt("Midpoint must be smaller then Maximum"),
4100
+ [49 /* CommandResult.LowerBiggerThanUpper */]: _lt("Lower inflection point must be smaller than upper inflection point"),
4101
+ [59 /* CommandResult.MinInvalidFormula */]: _lt("Invalid Minpoint formula"),
4102
+ [61 /* CommandResult.MaxInvalidFormula */]: _lt("Invalid Maxpoint formula"),
4103
+ [60 /* CommandResult.MidInvalidFormula */]: _lt("Invalid Midpoint formula"),
4104
+ [62 /* CommandResult.ValueUpperInvalidFormula */]: _lt("Invalid upper inflection point formula"),
4105
+ [63 /* CommandResult.ValueLowerInvalidFormula */]: _lt("Invalid lower inflection point formula"),
4102
4106
  [24 /* CommandResult.EmptyRange */]: _lt("A range needs to be defined"),
4103
4107
  Unexpected: _lt("The rule is invalid for an unknown reason"),
4104
4108
  },
@@ -4126,20 +4130,20 @@ const ChartTerms = {
4126
4130
  Errors: {
4127
4131
  Unexpected: _lt("The chart definition is invalid for an unknown reason"),
4128
4132
  // BASIC CHART ERRORS (LINE | BAR | PIE)
4129
- [32 /* CommandResult.InvalidDataSet */]: _lt("The dataset is invalid"),
4130
- [33 /* CommandResult.InvalidLabelRange */]: _lt("Labels are invalid"),
4133
+ [33 /* CommandResult.InvalidDataSet */]: _lt("The dataset is invalid"),
4134
+ [34 /* CommandResult.InvalidLabelRange */]: _lt("Labels are invalid"),
4131
4135
  // SCORECARD CHART ERRORS
4132
- [34 /* CommandResult.InvalidScorecardKeyValue */]: _lt("The key value is invalid"),
4133
- [35 /* CommandResult.InvalidScorecardBaseline */]: _lt("The baseline value is invalid"),
4136
+ [35 /* CommandResult.InvalidScorecardKeyValue */]: _lt("The key value is invalid"),
4137
+ [36 /* CommandResult.InvalidScorecardBaseline */]: _lt("The baseline value is invalid"),
4134
4138
  // GAUGE CHART ERRORS
4135
- [36 /* CommandResult.InvalidGaugeDataRange */]: _lt("The data range is invalid"),
4136
- [37 /* CommandResult.EmptyGaugeRangeMin */]: _lt("A minimum range limit value is needed"),
4137
- [38 /* CommandResult.GaugeRangeMinNaN */]: _lt("The minimum range limit value must be a number"),
4138
- [39 /* CommandResult.EmptyGaugeRangeMax */]: _lt("A maximum range limit value is needed"),
4139
- [40 /* CommandResult.GaugeRangeMaxNaN */]: _lt("The maximum range limit value must be a number"),
4140
- [41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */]: _lt("Minimum range limit must be smaller than maximum range limit"),
4141
- [42 /* CommandResult.GaugeLowerInflectionPointNaN */]: _lt("The lower inflection point value must be a number"),
4142
- [43 /* CommandResult.GaugeUpperInflectionPointNaN */]: _lt("The upper inflection point value must be a number"),
4139
+ [37 /* CommandResult.InvalidGaugeDataRange */]: _lt("The data range is invalid"),
4140
+ [38 /* CommandResult.EmptyGaugeRangeMin */]: _lt("A minimum range limit value is needed"),
4141
+ [39 /* CommandResult.GaugeRangeMinNaN */]: _lt("The minimum range limit value must be a number"),
4142
+ [40 /* CommandResult.EmptyGaugeRangeMax */]: _lt("A maximum range limit value is needed"),
4143
+ [41 /* CommandResult.GaugeRangeMaxNaN */]: _lt("The maximum range limit value must be a number"),
4144
+ [42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */]: _lt("Minimum range limit must be smaller than maximum range limit"),
4145
+ [43 /* CommandResult.GaugeLowerInflectionPointNaN */]: _lt("The lower inflection point value must be a number"),
4146
+ [44 /* CommandResult.GaugeUpperInflectionPointNaN */]: _lt("The upper inflection point value must be a number"),
4143
4147
  },
4144
4148
  };
4145
4149
  const NumberFormatTerms = {
@@ -4511,7 +4515,7 @@ function createBarChartRuntime(chart, getters) {
4511
4515
 
4512
4516
  function isDataRangeValid(definition) {
4513
4517
  return definition.dataRange && !rangeReference.test(definition.dataRange)
4514
- ? 36 /* CommandResult.InvalidGaugeDataRange */
4518
+ ? 37 /* CommandResult.InvalidGaugeDataRange */
4515
4519
  : 0 /* CommandResult.Success */;
4516
4520
  }
4517
4521
  function checkRangeLimits(check, batchValidations) {
@@ -4543,7 +4547,7 @@ function checkInflectionPointsValue(check, batchValidations) {
4543
4547
  function checkRangeMinBiggerThanRangeMax(definition) {
4544
4548
  if (definition.sectionRule) {
4545
4549
  if (Number(definition.sectionRule.rangeMin) >= Number(definition.sectionRule.rangeMax)) {
4546
- return 41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */;
4550
+ return 42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */;
4547
4551
  }
4548
4552
  }
4549
4553
  return 0 /* CommandResult.Success */;
@@ -4552,9 +4556,9 @@ function checkEmpty(value, valueName) {
4552
4556
  if (value === "") {
4553
4557
  switch (valueName) {
4554
4558
  case "rangeMin":
4555
- return 37 /* CommandResult.EmptyGaugeRangeMin */;
4559
+ return 38 /* CommandResult.EmptyGaugeRangeMin */;
4556
4560
  case "rangeMax":
4557
- return 39 /* CommandResult.EmptyGaugeRangeMax */;
4561
+ return 40 /* CommandResult.EmptyGaugeRangeMax */;
4558
4562
  }
4559
4563
  }
4560
4564
  return 0 /* CommandResult.Success */;
@@ -4563,13 +4567,13 @@ function checkNaN(value, valueName) {
4563
4567
  if (isNaN(value)) {
4564
4568
  switch (valueName) {
4565
4569
  case "rangeMin":
4566
- return 38 /* CommandResult.GaugeRangeMinNaN */;
4570
+ return 39 /* CommandResult.GaugeRangeMinNaN */;
4567
4571
  case "rangeMax":
4568
- return 40 /* CommandResult.GaugeRangeMaxNaN */;
4572
+ return 41 /* CommandResult.GaugeRangeMaxNaN */;
4569
4573
  case "lowerInflectionPointValue":
4570
- return 42 /* CommandResult.GaugeLowerInflectionPointNaN */;
4574
+ return 43 /* CommandResult.GaugeLowerInflectionPointNaN */;
4571
4575
  case "upperInflectionPointValue":
4572
- return 43 /* CommandResult.GaugeUpperInflectionPointNaN */;
4576
+ return 44 /* CommandResult.GaugeUpperInflectionPointNaN */;
4573
4577
  }
4574
4578
  }
4575
4579
  return 0 /* CommandResult.Success */;
@@ -5320,12 +5324,12 @@ function createPieChartRuntime(chart, getters) {
5320
5324
 
5321
5325
  function checkKeyValue(definition) {
5322
5326
  return definition.keyValue && !rangeReference.test(definition.keyValue)
5323
- ? 34 /* CommandResult.InvalidScorecardKeyValue */
5327
+ ? 35 /* CommandResult.InvalidScorecardKeyValue */
5324
5328
  : 0 /* CommandResult.Success */;
5325
5329
  }
5326
5330
  function checkBaseline(definition) {
5327
5331
  return definition.baseline && !rangeReference.test(definition.baseline)
5328
- ? 35 /* CommandResult.InvalidScorecardBaseline */
5332
+ ? 36 /* CommandResult.InvalidScorecardBaseline */
5329
5333
  : 0 /* CommandResult.Success */;
5330
5334
  }
5331
5335
  class ScorecardChart extends AbstractChart {
@@ -6367,7 +6371,7 @@ function handlePasteResult(env, result) {
6367
6371
  else if (result.reasons.includes(22 /* CommandResult.WrongFigurePasteOption */)) {
6368
6372
  env.raiseError(PasteInteractiveContent.wrongFigurePasteOption);
6369
6373
  }
6370
- else if (result.reasons.includes(75 /* CommandResult.FrozenPaneOverlap */)) {
6374
+ else if (result.reasons.includes(76 /* CommandResult.FrozenPaneOverlap */)) {
6371
6375
  env.raiseError(PasteInteractiveContent.frozenPaneOverlap);
6372
6376
  }
6373
6377
  }
@@ -6654,7 +6658,7 @@ function interactiveSortSelection(env, sheetId, anchor, zone, sortDirection) {
6654
6658
  });
6655
6659
  }
6656
6660
  }
6657
- if (result.isCancelledBecause(63 /* CommandResult.InvalidSortZone */)) {
6661
+ if (result.isCancelledBecause(64 /* CommandResult.InvalidSortZone */)) {
6658
6662
  const { col, row } = anchor;
6659
6663
  env.model.selection.selectZone({ cell: { col, row }, zone });
6660
6664
  env.raiseError(_lt("Cannot sort. To sort, select only cells or only merges that have the same size."));
@@ -6668,13 +6672,13 @@ const AddFilterInteractiveContent = {
6668
6672
  };
6669
6673
  function interactiveAddFilter(env, sheetId, target) {
6670
6674
  const result = env.model.dispatch("CREATE_FILTER_TABLE", { target, sheetId });
6671
- if (result.isCancelledBecause(78 /* CommandResult.FilterOverlap */)) {
6675
+ if (result.isCancelledBecause(79 /* CommandResult.FilterOverlap */)) {
6672
6676
  env.raiseError(AddFilterInteractiveContent.filterOverlap);
6673
6677
  }
6674
- else if (result.isCancelledBecause(80 /* CommandResult.MergeInFilter */)) {
6678
+ else if (result.isCancelledBecause(81 /* CommandResult.MergeInFilter */)) {
6675
6679
  env.raiseError(AddFilterInteractiveContent.mergeInFilter);
6676
6680
  }
6677
- else if (result.isCancelledBecause(81 /* CommandResult.NonContinuousTargets */)) {
6681
+ else if (result.isCancelledBecause(82 /* CommandResult.NonContinuousTargets */)) {
6678
6682
  env.raiseError(AddFilterInteractiveContent.nonContinuousTargets);
6679
6683
  }
6680
6684
  }
@@ -16625,7 +16629,7 @@ class EditionPlugin extends UIPlugin {
16625
16629
  validateSelection(length, start, end) {
16626
16630
  return start >= 0 && start <= length && end >= 0 && end <= length
16627
16631
  ? 0 /* CommandResult.Success */
16628
- : 46 /* CommandResult.WrongComposerSelection */;
16632
+ : 47 /* CommandResult.WrongComposerSelection */;
16629
16633
  }
16630
16634
  onColumnsRemoved(cmd) {
16631
16635
  if (cmd.elements.includes(this.col) && this.mode !== "inactive") {
@@ -16939,9 +16943,10 @@ class EditionPlugin extends UIPlugin {
16939
16943
  */
16940
16944
  getReferencedRanges() {
16941
16945
  const editionSheetId = this.getters.getEditionSheet();
16942
- return this.currentTokens
16946
+ const referenceRanges = this.currentTokens
16943
16947
  .filter((token) => token.type === "REFERENCE")
16944
16948
  .map((token) => this.getters.getRangeFromSheetXC(editionSheetId, token.value));
16949
+ return referenceRanges.filter((range) => !range.invalidSheetName && !range.invalidXc);
16945
16950
  }
16946
16951
  /**
16947
16952
  * Function used to determine when composer selection can start.
@@ -19379,7 +19384,7 @@ function interactiveFreezeColumnsRows(env, dimension, base) {
19379
19384
  const sheetId = env.model.getters.getActiveSheetId();
19380
19385
  const cmd = dimension === "COL" ? "FREEZE_COLUMNS" : "FREEZE_ROWS";
19381
19386
  const result = env.model.dispatch(cmd, { sheetId, quantity: base });
19382
- if (result.isCancelledBecause(65 /* CommandResult.MergeOverlap */)) {
19387
+ if (result.isCancelledBecause(66 /* CommandResult.MergeOverlap */)) {
19383
19388
  env.raiseError(MergeErrorMessage);
19384
19389
  }
19385
19390
  }
@@ -20094,11 +20099,11 @@ class LineBarPieConfigPanel extends Component {
20094
20099
  }
20095
20100
  get isDatasetInvalid() {
20096
20101
  var _a;
20097
- return !!((_a = this.state.datasetDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(32 /* CommandResult.InvalidDataSet */));
20102
+ return !!((_a = this.state.datasetDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(33 /* CommandResult.InvalidDataSet */));
20098
20103
  }
20099
20104
  get isLabelInvalid() {
20100
20105
  var _a;
20101
- return !!((_a = this.state.labelsDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(33 /* CommandResult.InvalidLabelRange */));
20106
+ return !!((_a = this.state.labelsDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(34 /* CommandResult.InvalidLabelRange */));
20102
20107
  }
20103
20108
  onUpdateDataSetsHaveTitle(ev) {
20104
20109
  this.props.updateChart(this.props.figureId, {
@@ -20471,7 +20476,7 @@ class GaugeChartConfigPanel extends Component {
20471
20476
  }
20472
20477
  get isDataRangeInvalid() {
20473
20478
  var _a;
20474
- return !!((_a = this.state.dataRangeDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(36 /* CommandResult.InvalidGaugeDataRange */));
20479
+ return !!((_a = this.state.dataRangeDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(37 /* CommandResult.InvalidGaugeDataRange */));
20475
20480
  }
20476
20481
  onDataRangeChanged(ranges) {
20477
20482
  this.dataRange = ranges[0];
@@ -20563,28 +20568,28 @@ class GaugeChartDesignPanel extends Component {
20563
20568
  }
20564
20569
  isRangeMinInvalid() {
20565
20570
  var _a, _b, _c;
20566
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(37 /* CommandResult.EmptyGaugeRangeMin */)) ||
20567
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(38 /* CommandResult.GaugeRangeMinNaN */)) ||
20568
- ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
20571
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(38 /* CommandResult.EmptyGaugeRangeMin */)) ||
20572
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(39 /* CommandResult.GaugeRangeMinNaN */)) ||
20573
+ ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
20569
20574
  }
20570
20575
  isRangeMaxInvalid() {
20571
20576
  var _a, _b, _c;
20572
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(39 /* CommandResult.EmptyGaugeRangeMax */)) ||
20573
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(40 /* CommandResult.GaugeRangeMaxNaN */)) ||
20574
- ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(41 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
20577
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(40 /* CommandResult.EmptyGaugeRangeMax */)) ||
20578
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(41 /* CommandResult.GaugeRangeMaxNaN */)) ||
20579
+ ((_c = this.state.sectionRuleDispatchResult) === null || _c === void 0 ? void 0 : _c.isCancelledBecause(42 /* CommandResult.GaugeRangeMinBiggerThanRangeMax */)));
20575
20580
  }
20576
20581
  // ---------------------------------------------------------------------------
20577
20582
  // COLOR_SECTION_TEMPLATE
20578
20583
  // ---------------------------------------------------------------------------
20579
20584
  get isLowerInflectionPointInvalid() {
20580
20585
  var _a, _b;
20581
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(42 /* CommandResult.GaugeLowerInflectionPointNaN */)) ||
20582
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(44 /* CommandResult.GaugeLowerBiggerThanUpper */)));
20586
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(43 /* CommandResult.GaugeLowerInflectionPointNaN */)) ||
20587
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(45 /* CommandResult.GaugeLowerBiggerThanUpper */)));
20583
20588
  }
20584
20589
  get isUpperInflectionPointInvalid() {
20585
20590
  var _a, _b;
20586
- return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(43 /* CommandResult.GaugeUpperInflectionPointNaN */)) ||
20587
- ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(44 /* CommandResult.GaugeLowerBiggerThanUpper */)));
20591
+ return !!(((_a = this.state.sectionRuleDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(44 /* CommandResult.GaugeUpperInflectionPointNaN */)) ||
20592
+ ((_b = this.state.sectionRuleDispatchResult) === null || _b === void 0 ? void 0 : _b.isCancelledBecause(45 /* CommandResult.GaugeLowerBiggerThanUpper */)));
20588
20593
  }
20589
20594
  updateInflectionPointValue(attr, ev) {
20590
20595
  const sectionRule = deepCopy(this.props.definition.sectionRule);
@@ -20697,11 +20702,11 @@ class ScorecardChartConfigPanel extends Component {
20697
20702
  }
20698
20703
  get isKeyValueInvalid() {
20699
20704
  var _a;
20700
- return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(34 /* CommandResult.InvalidScorecardKeyValue */));
20705
+ return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(35 /* CommandResult.InvalidScorecardKeyValue */));
20701
20706
  }
20702
20707
  get isBaselineInvalid() {
20703
20708
  var _a;
20704
- return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(35 /* CommandResult.InvalidScorecardBaseline */));
20709
+ return !!((_a = this.state.keyValueDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(36 /* CommandResult.InvalidScorecardBaseline */));
20705
20710
  }
20706
20711
  onKeyValueRangeChanged(ranges) {
20707
20712
  this.keyValue = ranges[0];
@@ -21557,11 +21562,11 @@ class ConditionalFormattingPanel extends Component {
21557
21562
  ****************************************************************************/
21558
21563
  get isValue1Invalid() {
21559
21564
  var _a;
21560
- return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(51 /* CommandResult.FirstArgMissing */));
21565
+ return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(52 /* CommandResult.FirstArgMissing */));
21561
21566
  }
21562
21567
  get isValue2Invalid() {
21563
21568
  var _a;
21564
- return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(52 /* CommandResult.SecondArgMissing */));
21569
+ return !!((_a = this.state.errors) === null || _a === void 0 ? void 0 : _a.includes(53 /* CommandResult.SecondArgMissing */));
21565
21570
  }
21566
21571
  toggleStyle(tool) {
21567
21572
  const style = this.state.rules.cellIs.style;
@@ -21578,17 +21583,17 @@ class ConditionalFormattingPanel extends Component {
21578
21583
  isValueInvalid(threshold) {
21579
21584
  switch (threshold) {
21580
21585
  case "minimum":
21581
- return (this.state.errors.includes(58 /* CommandResult.MinInvalidFormula */) ||
21582
- this.state.errors.includes(50 /* CommandResult.MinBiggerThanMid */) ||
21583
- this.state.errors.includes(47 /* CommandResult.MinBiggerThanMax */) ||
21584
- this.state.errors.includes(53 /* CommandResult.MinNaN */));
21586
+ return (this.state.errors.includes(59 /* CommandResult.MinInvalidFormula */) ||
21587
+ this.state.errors.includes(51 /* CommandResult.MinBiggerThanMid */) ||
21588
+ this.state.errors.includes(48 /* CommandResult.MinBiggerThanMax */) ||
21589
+ this.state.errors.includes(54 /* CommandResult.MinNaN */));
21585
21590
  case "midpoint":
21586
- return (this.state.errors.includes(59 /* CommandResult.MidInvalidFormula */) ||
21587
- this.state.errors.includes(54 /* CommandResult.MidNaN */) ||
21588
- this.state.errors.includes(49 /* CommandResult.MidBiggerThanMax */));
21591
+ return (this.state.errors.includes(60 /* CommandResult.MidInvalidFormula */) ||
21592
+ this.state.errors.includes(55 /* CommandResult.MidNaN */) ||
21593
+ this.state.errors.includes(50 /* CommandResult.MidBiggerThanMax */));
21589
21594
  case "maximum":
21590
- return (this.state.errors.includes(60 /* CommandResult.MaxInvalidFormula */) ||
21591
- this.state.errors.includes(55 /* CommandResult.MaxNaN */));
21595
+ return (this.state.errors.includes(61 /* CommandResult.MaxInvalidFormula */) ||
21596
+ this.state.errors.includes(56 /* CommandResult.MaxNaN */));
21592
21597
  default:
21593
21598
  return false;
21594
21599
  }
@@ -21637,13 +21642,13 @@ class ConditionalFormattingPanel extends Component {
21637
21642
  isInflectionPointInvalid(inflectionPoint) {
21638
21643
  switch (inflectionPoint) {
21639
21644
  case "lowerInflectionPoint":
21640
- return (this.state.errors.includes(57 /* CommandResult.ValueLowerInflectionNaN */) ||
21641
- this.state.errors.includes(62 /* CommandResult.ValueLowerInvalidFormula */) ||
21642
- this.state.errors.includes(48 /* CommandResult.LowerBiggerThanUpper */));
21645
+ return (this.state.errors.includes(58 /* CommandResult.ValueLowerInflectionNaN */) ||
21646
+ this.state.errors.includes(63 /* CommandResult.ValueLowerInvalidFormula */) ||
21647
+ this.state.errors.includes(49 /* CommandResult.LowerBiggerThanUpper */));
21643
21648
  case "upperInflectionPoint":
21644
- return (this.state.errors.includes(56 /* CommandResult.ValueUpperInflectionNaN */) ||
21645
- this.state.errors.includes(61 /* CommandResult.ValueUpperInvalidFormula */) ||
21646
- this.state.errors.includes(48 /* CommandResult.LowerBiggerThanUpper */));
21649
+ return (this.state.errors.includes(57 /* CommandResult.ValueUpperInflectionNaN */) ||
21650
+ this.state.errors.includes(62 /* CommandResult.ValueUpperInvalidFormula */) ||
21651
+ this.state.errors.includes(49 /* CommandResult.LowerBiggerThanUpper */));
21647
21652
  default:
21648
21653
  return true;
21649
21654
  }
@@ -28439,7 +28444,7 @@ class BordersPlugin extends CorePlugin {
28439
28444
  const currentBorder = this.getCellBorder(cmd);
28440
28445
  const areAllNewBordersUndefined = !((_a = cmd.border) === null || _a === void 0 ? void 0 : _a.bottom) && !((_b = cmd.border) === null || _b === void 0 ? void 0 : _b.left) && !((_c = cmd.border) === null || _c === void 0 ? void 0 : _c.right) && !((_d = cmd.border) === null || _d === void 0 ? void 0 : _d.top);
28441
28446
  if ((!currentBorder && areAllNewBordersUndefined) || deepEquals(currentBorder, cmd.border)) {
28442
- return 88 /* CommandResult.NoChanges */;
28447
+ return 89 /* CommandResult.NoChanges */;
28443
28448
  }
28444
28449
  return 0 /* CommandResult.Success */;
28445
28450
  }
@@ -28961,9 +28966,9 @@ class CellPlugin extends CorePlugin {
28961
28966
  checkUselessClearCell(cmd) {
28962
28967
  const cell = this.getters.getCell(cmd);
28963
28968
  if (!cell)
28964
- return 88 /* CommandResult.NoChanges */;
28969
+ return 89 /* CommandResult.NoChanges */;
28965
28970
  if (!cell.content && !cell.style && !cell.format) {
28966
- return 88 /* CommandResult.NoChanges */;
28971
+ return 89 /* CommandResult.NoChanges */;
28967
28972
  }
28968
28973
  return 0 /* CommandResult.Success */;
28969
28974
  }
@@ -29172,13 +29177,13 @@ class ChartPlugin extends CorePlugin {
29172
29177
  }
29173
29178
  checkChartDuplicate(cmd) {
29174
29179
  return this.getters.getFigureSheetId(cmd.id)
29175
- ? 84 /* CommandResult.DuplicatedChartId */
29180
+ ? 85 /* CommandResult.DuplicatedChartId */
29176
29181
  : 0 /* CommandResult.Success */;
29177
29182
  }
29178
29183
  checkChartExists(cmd) {
29179
29184
  return this.getters.getFigureSheetId(cmd.id)
29180
29185
  ? 0 /* CommandResult.Success */
29181
- : 85 /* CommandResult.ChartDoesNotExist */;
29186
+ : 86 /* CommandResult.ChartDoesNotExist */;
29182
29187
  }
29183
29188
  }
29184
29189
  ChartPlugin.getters = [
@@ -29380,10 +29385,10 @@ class ConditionalFormatPlugin extends CorePlugin {
29380
29385
  return 27 /* CommandResult.InvalidSheetId */;
29381
29386
  const ruleIndex = this.cfRules[sheetId].findIndex((cf) => cf.id === cfId);
29382
29387
  if (ruleIndex === -1)
29383
- return 71 /* CommandResult.InvalidConditionalFormatId */;
29388
+ return 72 /* CommandResult.InvalidConditionalFormatId */;
29384
29389
  const cfIndex2 = direction === "up" ? ruleIndex - 1 : ruleIndex + 1;
29385
29390
  if (cfIndex2 < 0 || cfIndex2 >= this.cfRules[sheetId].length) {
29386
- return 71 /* CommandResult.InvalidConditionalFormatId */;
29391
+ return 72 /* CommandResult.InvalidConditionalFormatId */;
29387
29392
  }
29388
29393
  return 0 /* CommandResult.Success */;
29389
29394
  }
@@ -29424,10 +29429,10 @@ class ConditionalFormatPlugin extends CorePlugin {
29424
29429
  const errors = [];
29425
29430
  const isEmpty = (value) => value === undefined || value === "";
29426
29431
  if (expectedNumber >= 1 && isEmpty(rule.values[0])) {
29427
- errors.push(51 /* CommandResult.FirstArgMissing */);
29432
+ errors.push(52 /* CommandResult.FirstArgMissing */);
29428
29433
  }
29429
29434
  if (expectedNumber >= 2 && isEmpty(rule.values[1])) {
29430
- errors.push(52 /* CommandResult.SecondArgMissing */);
29435
+ errors.push(53 /* CommandResult.SecondArgMissing */);
29431
29436
  }
29432
29437
  return errors.length ? errors : 0 /* CommandResult.Success */;
29433
29438
  }
@@ -29439,15 +29444,15 @@ class ConditionalFormatPlugin extends CorePlugin {
29439
29444
  (threshold.value === "" || isNaN(threshold.value))) {
29440
29445
  switch (thresholdName) {
29441
29446
  case "min":
29442
- return 53 /* CommandResult.MinNaN */;
29447
+ return 54 /* CommandResult.MinNaN */;
29443
29448
  case "max":
29444
- return 55 /* CommandResult.MaxNaN */;
29449
+ return 56 /* CommandResult.MaxNaN */;
29445
29450
  case "mid":
29446
- return 54 /* CommandResult.MidNaN */;
29451
+ return 55 /* CommandResult.MidNaN */;
29447
29452
  case "upperInflectionPoint":
29448
- return 56 /* CommandResult.ValueUpperInflectionNaN */;
29453
+ return 57 /* CommandResult.ValueUpperInflectionNaN */;
29449
29454
  case "lowerInflectionPoint":
29450
- return 57 /* CommandResult.ValueLowerInflectionNaN */;
29455
+ return 58 /* CommandResult.ValueLowerInflectionNaN */;
29451
29456
  }
29452
29457
  }
29453
29458
  return 0 /* CommandResult.Success */;
@@ -29461,15 +29466,15 @@ class ConditionalFormatPlugin extends CorePlugin {
29461
29466
  catch (error) {
29462
29467
  switch (thresholdName) {
29463
29468
  case "min":
29464
- return 58 /* CommandResult.MinInvalidFormula */;
29469
+ return 59 /* CommandResult.MinInvalidFormula */;
29465
29470
  case "max":
29466
- return 60 /* CommandResult.MaxInvalidFormula */;
29471
+ return 61 /* CommandResult.MaxInvalidFormula */;
29467
29472
  case "mid":
29468
- return 59 /* CommandResult.MidInvalidFormula */;
29473
+ return 60 /* CommandResult.MidInvalidFormula */;
29469
29474
  case "upperInflectionPoint":
29470
- return 61 /* CommandResult.ValueUpperInvalidFormula */;
29475
+ return 62 /* CommandResult.ValueUpperInvalidFormula */;
29471
29476
  case "lowerInflectionPoint":
29472
- return 62 /* CommandResult.ValueLowerInvalidFormula */;
29477
+ return 63 /* CommandResult.ValueLowerInvalidFormula */;
29473
29478
  }
29474
29479
  }
29475
29480
  return 0 /* CommandResult.Success */;
@@ -29486,7 +29491,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29486
29491
  if (["number", "percentage", "percentile"].includes(rule.lowerInflectionPoint.type) &&
29487
29492
  rule.lowerInflectionPoint.type === rule.upperInflectionPoint.type &&
29488
29493
  Number(minValue) > Number(maxValue)) {
29489
- return 48 /* CommandResult.LowerBiggerThanUpper */;
29494
+ return 49 /* CommandResult.LowerBiggerThanUpper */;
29490
29495
  }
29491
29496
  return 0 /* CommandResult.Success */;
29492
29497
  }
@@ -29496,7 +29501,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29496
29501
  if (["number", "percentage", "percentile"].includes(rule.minimum.type) &&
29497
29502
  rule.minimum.type === rule.maximum.type &&
29498
29503
  stringToNumber(minValue) >= stringToNumber(maxValue)) {
29499
- return 47 /* CommandResult.MinBiggerThanMax */;
29504
+ return 48 /* CommandResult.MinBiggerThanMax */;
29500
29505
  }
29501
29506
  return 0 /* CommandResult.Success */;
29502
29507
  }
@@ -29508,7 +29513,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29508
29513
  ["number", "percentage", "percentile"].includes(rule.midpoint.type) &&
29509
29514
  rule.midpoint.type === rule.maximum.type &&
29510
29515
  stringToNumber(midValue) >= stringToNumber(maxValue)) {
29511
- return 49 /* CommandResult.MidBiggerThanMax */;
29516
+ return 50 /* CommandResult.MidBiggerThanMax */;
29512
29517
  }
29513
29518
  return 0 /* CommandResult.Success */;
29514
29519
  }
@@ -29520,7 +29525,7 @@ class ConditionalFormatPlugin extends CorePlugin {
29520
29525
  ["number", "percentage", "percentile"].includes(rule.midpoint.type) &&
29521
29526
  rule.minimum.type === rule.midpoint.type &&
29522
29527
  stringToNumber(minValue) >= stringToNumber(midValue)) {
29523
- return 50 /* CommandResult.MinBiggerThanMid */;
29528
+ return 51 /* CommandResult.MinBiggerThanMid */;
29524
29529
  }
29525
29530
  return 0 /* CommandResult.Success */;
29526
29531
  }
@@ -29621,13 +29626,13 @@ class FigurePlugin extends CorePlugin {
29621
29626
  checkFigureExists(sheetId, figureId) {
29622
29627
  var _a;
29623
29628
  if (((_a = this.figures[sheetId]) === null || _a === void 0 ? void 0 : _a[figureId]) === undefined) {
29624
- return 70 /* CommandResult.FigureDoesNotExist */;
29629
+ return 71 /* CommandResult.FigureDoesNotExist */;
29625
29630
  }
29626
29631
  return 0 /* CommandResult.Success */;
29627
29632
  }
29628
29633
  checkFigureDuplicate(figureId) {
29629
29634
  if (Object.values(this.figures).find((sheet) => sheet === null || sheet === void 0 ? void 0 : sheet[figureId])) {
29630
- return 82 /* CommandResult.DuplicatedFigureId */;
29635
+ return 83 /* CommandResult.DuplicatedFigureId */;
29631
29636
  }
29632
29637
  return 0 /* CommandResult.Success */;
29633
29638
  }
@@ -29729,12 +29734,12 @@ class FiltersPlugin extends CorePlugin {
29729
29734
  switch (cmd.type) {
29730
29735
  case "CREATE_FILTER_TABLE":
29731
29736
  if (!areZonesContinuous(...cmd.target)) {
29732
- return 81 /* CommandResult.NonContinuousTargets */;
29737
+ return 82 /* CommandResult.NonContinuousTargets */;
29733
29738
  }
29734
29739
  const zone = union(...cmd.target);
29735
29740
  const checkFilterOverlap = () => {
29736
29741
  if (this.getFilterTables(cmd.sheetId).some((filter) => overlap(filter.zone, zone))) {
29737
- return 78 /* CommandResult.FilterOverlap */;
29742
+ return 79 /* CommandResult.FilterOverlap */;
29738
29743
  }
29739
29744
  return 0 /* CommandResult.Success */;
29740
29745
  };
@@ -29742,7 +29747,7 @@ class FiltersPlugin extends CorePlugin {
29742
29747
  const mergesInTarget = this.getters.getMergesInZone(cmd.sheetId, zone);
29743
29748
  for (let merge of mergesInTarget) {
29744
29749
  if (overlap(zone, merge)) {
29745
- return 80 /* CommandResult.MergeInFilter */;
29750
+ return 81 /* CommandResult.MergeInFilter */;
29746
29751
  }
29747
29752
  }
29748
29753
  return 0 /* CommandResult.Success */;
@@ -29752,7 +29757,7 @@ class FiltersPlugin extends CorePlugin {
29752
29757
  for (let merge of cmd.target) {
29753
29758
  for (let filterTable of this.getFilterTables(cmd.sheetId)) {
29754
29759
  if (overlap(filterTable.zone, merge)) {
29755
- return 80 /* CommandResult.MergeInFilter */;
29760
+ return 81 /* CommandResult.MergeInFilter */;
29756
29761
  }
29757
29762
  }
29758
29763
  }
@@ -30252,10 +30257,10 @@ class HeaderVisibilityPlugin extends CorePlugin {
30252
30257
  : this.getters.getNumberRows(cmd.sheetId);
30253
30258
  const hiddenElements = new Set((hiddenGroup || []).flat().concat(cmd.elements));
30254
30259
  if (hiddenElements.size >= elements) {
30255
- return 66 /* CommandResult.TooManyHiddenElements */;
30260
+ return 67 /* CommandResult.TooManyHiddenElements */;
30256
30261
  }
30257
30262
  else if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
30258
- return 86 /* CommandResult.InvalidHeaderIndex */;
30263
+ return 87 /* CommandResult.InvalidHeaderIndex */;
30259
30264
  }
30260
30265
  else {
30261
30266
  return 0 /* CommandResult.Success */;
@@ -30781,7 +30786,7 @@ class MergePlugin extends CorePlugin {
30781
30786
  for (const zone of target) {
30782
30787
  for (const zone2 of target) {
30783
30788
  if (zone !== zone2 && overlap(zone, zone2)) {
30784
- return 65 /* CommandResult.MergeOverlap */;
30789
+ return 66 /* CommandResult.MergeOverlap */;
30785
30790
  }
30786
30791
  }
30787
30792
  }
@@ -30795,7 +30800,7 @@ class MergePlugin extends CorePlugin {
30795
30800
  for (const zone of target) {
30796
30801
  if ((zone.left < xSplit && zone.right >= xSplit) ||
30797
30802
  (zone.top < ySplit && zone.bottom >= ySplit)) {
30798
- return 75 /* CommandResult.FrozenPaneOverlap */;
30803
+ return 76 /* CommandResult.FrozenPaneOverlap */;
30799
30804
  }
30800
30805
  }
30801
30806
  return 0 /* CommandResult.Success */;
@@ -31327,9 +31332,10 @@ class RangeAdapter {
31327
31332
  * Get a Xc string that represent a part of a range
31328
31333
  */
31329
31334
  getRangePartString(range, part) {
31330
- const colFixed = range.parts && range.parts[part].colFixed ? "$" : "";
31335
+ var _a, _b;
31336
+ const colFixed = range.parts && ((_a = range.parts[part]) === null || _a === void 0 ? void 0 : _a.colFixed) ? "$" : "";
31331
31337
  const col = part === 0 ? numberToLetters(range.zone.left) : numberToLetters(range.zone.right);
31332
- const rowFixed = range.parts && range.parts[part].rowFixed ? "$" : "";
31338
+ const rowFixed = range.parts && ((_b = range.parts[part]) === null || _b === void 0 ? void 0 : _b.rowFixed) ? "$" : "";
31333
31339
  const row = part === 0 ? String(range.zone.top + 1) : String(range.zone.bottom + 1);
31334
31340
  let str = "";
31335
31341
  if (range.isFullCol) {
@@ -31428,10 +31434,10 @@ class SheetPlugin extends CorePlugin {
31428
31434
  ? this.getNumberCols(cmd.sheetId)
31429
31435
  : this.getNumberRows(cmd.sheetId);
31430
31436
  if (cmd.base < 0 || cmd.base >= elements) {
31431
- return 86 /* CommandResult.InvalidHeaderIndex */;
31437
+ return 87 /* CommandResult.InvalidHeaderIndex */;
31432
31438
  }
31433
31439
  else if (cmd.quantity <= 0) {
31434
- return 87 /* CommandResult.InvalidQuantity */;
31440
+ return 88 /* CommandResult.InvalidQuantity */;
31435
31441
  }
31436
31442
  return 0 /* CommandResult.Success */;
31437
31443
  case "REMOVE_COLUMNS_ROWS": {
@@ -31439,7 +31445,7 @@ class SheetPlugin extends CorePlugin {
31439
31445
  ? this.getNumberCols(cmd.sheetId)
31440
31446
  : this.getNumberRows(cmd.sheetId);
31441
31447
  if (Math.min(...cmd.elements) < 0 || Math.max(...cmd.elements) > elements) {
31442
- return 86 /* CommandResult.InvalidHeaderIndex */;
31448
+ return 87 /* CommandResult.InvalidHeaderIndex */;
31443
31449
  }
31444
31450
  else if (this.checkElementsIncludeAllNonFrozenHeaders(cmd.sheetId, cmd.dimension, cmd.elements)) {
31445
31451
  return 8 /* CommandResult.NotEnoughElements */;
@@ -31883,18 +31889,18 @@ class SheetPlugin extends CorePlugin {
31883
31889
  checkRowFreezeQuantity(cmd) {
31884
31890
  return cmd.quantity >= 1 && cmd.quantity < this.getNumberRows(cmd.sheetId)
31885
31891
  ? 0 /* CommandResult.Success */
31886
- : 74 /* CommandResult.InvalidFreezeQuantity */;
31892
+ : 75 /* CommandResult.InvalidFreezeQuantity */;
31887
31893
  }
31888
31894
  checkColFreezeQuantity(cmd) {
31889
31895
  return cmd.quantity >= 1 && cmd.quantity < this.getNumberCols(cmd.sheetId)
31890
31896
  ? 0 /* CommandResult.Success */
31891
- : 74 /* CommandResult.InvalidFreezeQuantity */;
31897
+ : 75 /* CommandResult.InvalidFreezeQuantity */;
31892
31898
  }
31893
31899
  checkRowFreezeOverlapMerge(cmd) {
31894
31900
  const merges = this.getters.getMerges(cmd.sheetId);
31895
31901
  for (let merge of merges) {
31896
31902
  if (merge.top < cmd.quantity && cmd.quantity <= merge.bottom) {
31897
- return 65 /* CommandResult.MergeOverlap */;
31903
+ return 66 /* CommandResult.MergeOverlap */;
31898
31904
  }
31899
31905
  }
31900
31906
  return 0 /* CommandResult.Success */;
@@ -31903,7 +31909,7 @@ class SheetPlugin extends CorePlugin {
31903
31909
  const merges = this.getters.getMerges(cmd.sheetId);
31904
31910
  for (let merge of merges) {
31905
31911
  if (merge.left < cmd.quantity && cmd.quantity <= merge.right) {
31906
- return 65 /* CommandResult.MergeOverlap */;
31912
+ return 66 /* CommandResult.MergeOverlap */;
31907
31913
  }
31908
31914
  }
31909
31915
  return 0 /* CommandResult.Success */;
@@ -32640,10 +32646,8 @@ class EvaluationPlugin extends UIPlugin {
32640
32646
  * that are actually present in the grid.
32641
32647
  */
32642
32648
  function range(range) {
32649
+ assertRangeValid(range);
32643
32650
  const sheetId = range.sheetId;
32644
- if (!isZoneValid(range.zone)) {
32645
- throw new InvalidReferenceError();
32646
- }
32647
32651
  // Performance issue: Avoid fetching data on positions that are out of the spreadsheet
32648
32652
  // e.g. A1:ZZZ9999 in a sheet with 10 cols and 10 rows should ignore everything past J10 and return a 10x10 array
32649
32653
  const sheetZone = getters.getSheetZone(sheetId);
@@ -32678,23 +32682,26 @@ class EvaluationPlugin extends UIPlugin {
32678
32682
  * The `compute` of the formula's function must process it completely
32679
32683
  */
32680
32684
  function refFn(range, isMeta, functionName, paramNumber) {
32685
+ assertRangeValid(range);
32681
32686
  if (isMeta) {
32682
32687
  // Use zoneToXc of zone instead of getRangeString to avoid sending unbounded ranges
32683
32688
  return { value: zoneToXc(range.zone) };
32684
32689
  }
32685
- if (!isZoneValid(range.zone)) {
32686
- throw new InvalidReferenceError();
32687
- }
32688
32690
  // if the formula definition could have accepted a range, we would pass through the _range function and not here
32689
32691
  if (range.zone.bottom !== range.zone.top || range.zone.left !== range.zone.right) {
32690
32692
  throw new Error(paramNumber
32691
32693
  ? _lt("Function %s expects the parameter %s to be a single value or a single cell reference, not a range.", functionName.toString(), paramNumber.toString())
32692
32694
  : _lt("Function %s expects its parameters to be single values or single cell references, not ranges.", functionName.toString()));
32693
32695
  }
32696
+ return readCell(range);
32697
+ }
32698
+ function assertRangeValid(range) {
32699
+ if (!isZoneValid(range.zone)) {
32700
+ throw new InvalidReferenceError();
32701
+ }
32694
32702
  if (range.invalidSheetName) {
32695
32703
  throw new Error(_lt("Invalid sheet name: %s", range.invalidSheetName));
32696
32704
  }
32697
- return readCell(range);
32698
32705
  }
32699
32706
  return [refFn, range, evalContext];
32700
32707
  }
@@ -33193,7 +33200,7 @@ class FilterEvaluationPlugin extends UIPlugin {
33193
33200
  switch (cmd.type) {
33194
33201
  case "UPDATE_FILTER":
33195
33202
  if (!this.getters.getFilterId(cmd)) {
33196
- return 79 /* CommandResult.FilterNotFound */;
33203
+ return 80 /* CommandResult.FilterNotFound */;
33197
33204
  }
33198
33205
  break;
33199
33206
  }
@@ -34139,7 +34146,7 @@ class SheetViewPlugin extends UIPlugin {
34139
34146
  }
34140
34147
  checkPositiveDimension(cmd) {
34141
34148
  if (cmd.width < 0 || cmd.height < 0) {
34142
- return 68 /* CommandResult.InvalidViewportSize */;
34149
+ return 69 /* CommandResult.InvalidViewportSize */;
34143
34150
  }
34144
34151
  return 0 /* CommandResult.Success */;
34145
34152
  }
@@ -34149,7 +34156,7 @@ class SheetViewPlugin extends UIPlugin {
34149
34156
  cmd.gridOffsetY === this.gridOffsetY &&
34150
34157
  cmd.width === width &&
34151
34158
  cmd.height === height) {
34152
- return 76 /* CommandResult.ValuesNotChanged */;
34159
+ return 77 /* CommandResult.ValuesNotChanged */;
34153
34160
  }
34154
34161
  return 0 /* CommandResult.Success */;
34155
34162
  }
@@ -34157,7 +34164,7 @@ class SheetViewPlugin extends UIPlugin {
34157
34164
  const pane = this.getMainInternalViewport(this.getters.getActiveSheetId());
34158
34165
  if ((!pane.canScrollHorizontally && offsetX > 0) ||
34159
34166
  (!pane.canScrollVertically && offsetY > 0)) {
34160
- return 69 /* CommandResult.InvalidScrollingDirection */;
34167
+ return 70 /* CommandResult.InvalidScrollingDirection */;
34161
34168
  }
34162
34169
  return 0 /* CommandResult.Success */;
34163
34170
  }
@@ -34413,7 +34420,7 @@ class AutofillPlugin extends UIPlugin {
34413
34420
  if (this.lastCellSelected.col !== undefined && this.lastCellSelected.row !== undefined) {
34414
34421
  return 0 /* CommandResult.Success */;
34415
34422
  }
34416
- return 45 /* CommandResult.InvalidAutofillSelection */;
34423
+ return 46 /* CommandResult.InvalidAutofillSelection */;
34417
34424
  case "AUTOFILL_AUTO":
34418
34425
  const zone = this.getters.getSelectedZone();
34419
34426
  return zone.top === zone.bottom
@@ -35015,7 +35022,7 @@ class CellPopoverPlugin extends UIPlugin {
35015
35022
  cellPopoverRegistry.get(cmd.popoverType);
35016
35023
  }
35017
35024
  catch (error) {
35018
- return 72 /* CommandResult.InvalidCellPopover */;
35025
+ return 73 /* CommandResult.InvalidCellPopover */;
35019
35026
  }
35020
35027
  return 0 /* CommandResult.Success */;
35021
35028
  default:
@@ -36218,21 +36225,6 @@ class SelectionInputPlugin extends UIPlugin {
36218
36225
  // ---------------------------------------------------------------------------
36219
36226
  // Command Handling
36220
36227
  // ---------------------------------------------------------------------------
36221
- allowDispatch(cmd) {
36222
- switch (cmd.type) {
36223
- case "ADD_EMPTY_RANGE":
36224
- if (this.inputHasSingleRange && this.ranges.length === 1) {
36225
- return 30 /* CommandResult.MaximumRangesReached */;
36226
- }
36227
- break;
36228
- case "CHANGE_RANGE":
36229
- if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
36230
- return 30 /* CommandResult.MaximumRangesReached */;
36231
- }
36232
- break;
36233
- }
36234
- return 0 /* CommandResult.Success */;
36235
- }
36236
36228
  handleEvent(event) {
36237
36229
  const xc = zoneToXc(event.anchor.zone);
36238
36230
  const inputSheetId = this.activeSheet;
@@ -36444,6 +36436,15 @@ class SelectionInputsManagerPlugin extends UIPlugin {
36444
36436
  // ---------------------------------------------------------------------------
36445
36437
  allowDispatch(cmd) {
36446
36438
  var _a, _b;
36439
+ switch (cmd.type) {
36440
+ case "FOCUS_RANGE":
36441
+ case "CHANGE_RANGE":
36442
+ case "ADD_EMPTY_RANGE":
36443
+ case "REMOVE_RANGE":
36444
+ if (!this.inputs[cmd.id]) {
36445
+ return 31 /* CommandResult.InvalidInputId */;
36446
+ }
36447
+ }
36447
36448
  switch (cmd.type) {
36448
36449
  case "FOCUS_RANGE":
36449
36450
  const index = (_a = this.currentInput) === null || _a === void 0 ? void 0 : _a.getIndex(cmd.rangeId);
@@ -36451,9 +36452,19 @@ class SelectionInputsManagerPlugin extends UIPlugin {
36451
36452
  return 29 /* CommandResult.InputAlreadyFocused */;
36452
36453
  }
36453
36454
  break;
36454
- }
36455
- if (this.currentInput) {
36456
- return this.currentInput.allowDispatch(cmd);
36455
+ case "ADD_EMPTY_RANGE":
36456
+ const input = this.inputs[cmd.id];
36457
+ if (input.inputHasSingleRange && input.ranges.length === 1) {
36458
+ return 30 /* CommandResult.MaximumRangesReached */;
36459
+ }
36460
+ break;
36461
+ case "CHANGE_RANGE": {
36462
+ const input = this.inputs[cmd.id];
36463
+ if (input.inputHasSingleRange && cmd.value.split(",").length > 1) {
36464
+ return 30 /* CommandResult.MaximumRangesReached */;
36465
+ }
36466
+ break;
36467
+ }
36457
36468
  }
36458
36469
  return 0 /* CommandResult.Success */;
36459
36470
  }
@@ -37436,7 +37447,7 @@ class SortPlugin extends UIPlugin {
37436
37447
  /*Test the presence of single cells*/
37437
37448
  const singleCells = positions(zone).some(({ col, row }) => !this.getters.isInMerge({ sheetId, col, row }));
37438
37449
  if (singleCells) {
37439
- return 63 /* CommandResult.InvalidSortZone */;
37450
+ return 64 /* CommandResult.InvalidSortZone */;
37440
37451
  }
37441
37452
  return 0 /* CommandResult.Success */;
37442
37453
  }
@@ -37455,7 +37466,7 @@ class SortPlugin extends UIPlugin {
37455
37466
  ];
37456
37467
  return widthCurrent === widthFirst && heightCurrent === heightFirst;
37457
37468
  })) {
37458
- return 63 /* CommandResult.InvalidSortZone */;
37469
+ return 64 /* CommandResult.InvalidSortZone */;
37459
37470
  }
37460
37471
  return 0 /* CommandResult.Success */;
37461
37472
  }
@@ -38083,7 +38094,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
38083
38094
  for (const zone of this.getPasteZones(target)) {
38084
38095
  if ((zone.left < xSplit && zone.right >= xSplit) ||
38085
38096
  (zone.top < ySplit && zone.bottom >= ySplit)) {
38086
- return 75 /* CommandResult.FrozenPaneOverlap */;
38097
+ return 76 /* CommandResult.FrozenPaneOverlap */;
38087
38098
  }
38088
38099
  }
38089
38100
  return 0 /* CommandResult.Success */;
@@ -38471,7 +38482,7 @@ class ClipboardFigureState {
38471
38482
  }
38472
38483
  isPasteAllowed(target, option) {
38473
38484
  if (target.length === 0) {
38474
- return 73 /* CommandResult.EmptyTarget */;
38485
+ return 74 /* CommandResult.EmptyTarget */;
38475
38486
  }
38476
38487
  if ((option === null || option === void 0 ? void 0 : option.pasteOption) !== undefined) {
38477
38488
  return 22 /* CommandResult.WrongFigurePasteOption */;
@@ -39382,7 +39393,7 @@ class GridSelectionPlugin extends UIPlugin {
39382
39393
  const headers = [cmd.base, ...cmd.elements];
39383
39394
  const maxHeaderValue = isCol ? this.getters.getNumberCols(id) : this.getters.getNumberRows(id);
39384
39395
  if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
39385
- return 86 /* CommandResult.InvalidHeaderIndex */;
39396
+ return 87 /* CommandResult.InvalidHeaderIndex */;
39386
39397
  }
39387
39398
  return 0 /* CommandResult.Success */;
39388
39399
  }
@@ -40190,7 +40201,7 @@ const AddMergeInteractiveContent = {
40190
40201
  };
40191
40202
  function interactiveAddMerge(env, sheetId, target) {
40192
40203
  const result = env.model.dispatch("ADD_MERGE", { sheetId, target });
40193
- if (result.isCancelledBecause(80 /* CommandResult.MergeInFilter */)) {
40204
+ if (result.isCancelledBecause(81 /* CommandResult.MergeInFilter */)) {
40194
40205
  env.raiseError(AddMergeInteractiveContent.MergeInFilter);
40195
40206
  }
40196
40207
  else if (result.isCancelledBecause(3 /* CommandResult.MergeIsDestructive */)) {
@@ -42065,7 +42076,7 @@ class SelectionStreamProcessor {
42065
42076
  */
42066
42077
  moveAnchorCell(direction, step = 1) {
42067
42078
  if (step !== "end" && step <= 0) {
42068
- return new DispatchResult(83 /* CommandResult.InvalidSelectionStep */);
42079
+ return new DispatchResult(84 /* CommandResult.InvalidSelectionStep */);
42069
42080
  }
42070
42081
  const { col, row } = this.getNextAvailablePosition(direction, step);
42071
42082
  return this.selectCell(col, row);
@@ -42111,7 +42122,7 @@ class SelectionStreamProcessor {
42111
42122
  */
42112
42123
  resizeAnchorZone(direction, step = 1) {
42113
42124
  if (step !== "end" && step <= 0) {
42114
- return new DispatchResult(83 /* CommandResult.InvalidSelectionStep */);
42125
+ return new DispatchResult(84 /* CommandResult.InvalidSelectionStep */);
42115
42126
  }
42116
42127
  const sheetId = this.getters.getActiveSheetId();
42117
42128
  const anchor = this.anchor;
@@ -44071,10 +44082,10 @@ class Model extends EventBus {
44071
44082
  const command = { ...payload, type };
44072
44083
  let status = this.status;
44073
44084
  if (this.getters.isReadonly() && !canExecuteInReadonly(command)) {
44074
- return new DispatchResult(67 /* CommandResult.Readonly */);
44085
+ return new DispatchResult(68 /* CommandResult.Readonly */);
44075
44086
  }
44076
44087
  if (!this.session.canApplyOptimisticUpdate()) {
44077
- return new DispatchResult(64 /* CommandResult.WaitingSessionConfirmation */);
44088
+ return new DispatchResult(65 /* CommandResult.WaitingSessionConfirmation */);
44078
44089
  }
44079
44090
  switch (status) {
44080
44091
  case 0 /* Status.Ready */:
@@ -44534,6 +44545,6 @@ function addFunction(functionName, functionDescription) {
44534
44545
  export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
44535
44546
 
44536
44547
 
44537
- __info__.version = '16.1.31';
44538
- __info__.date = '2024-01-12T13:42:11.001Z';
44539
- __info__.hash = 'f51befa';
44548
+ __info__.version = '16.1.33';
44549
+ __info__.date = '2024-01-29T13:49:43.259Z';
44550
+ __info__.hash = 'd3b27dd';