ooxml-core 1.15.0 → 1.16.0

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.
Files changed (102) hide show
  1. package/dist/PptxHandler-3A7VEXVK.cjs +13 -0
  2. package/dist/PptxHandler-7POULDRL.mjs +4 -0
  3. package/dist/{PptxHandler-R5BVKEBW.mjs → PptxHandler-M35YFCUC.mjs} +2 -2
  4. package/dist/PresentationBuilder-C7NPM7OQ.mjs +4 -0
  5. package/dist/{PresentationBuilder-4AF3PZHG.cjs → PresentationBuilder-XVRTITYR.cjs} +6 -5
  6. package/dist/{PresentationBuilder-W67DIJBV.mjs → PresentationBuilder-Y6DJK6H2.mjs} +2 -2
  7. package/dist/automation/index.cjs +935 -535
  8. package/dist/automation/index.mjs +935 -535
  9. package/dist/chunk-5W2QL4SB.cjs +244 -0
  10. package/dist/{chunk-ZWI7MTLF.cjs → chunk-AHRFBMLK.cjs} +2846 -1546
  11. package/dist/{chunk-NWAQEXBK.mjs → chunk-B37EVUMG.mjs} +1 -1
  12. package/dist/{chunk-HU36GIYM.mjs → chunk-C2Y6SZDN.mjs} +421 -129
  13. package/dist/chunk-CA7KCNL3.mjs +236 -0
  14. package/dist/{chunk-BSUIDT6K.cjs → chunk-DWRJ62KP.cjs} +1 -0
  15. package/dist/{chunk-OPBZBSJF.mjs → chunk-KOX5Y5E5.mjs} +1 -1
  16. package/dist/{chunk-JFMIPOPV.mjs → chunk-LM6VBPQJ.mjs} +416 -15
  17. package/dist/{chunk-PC4MTLG4.cjs → chunk-OA5V3JJC.cjs} +8 -8
  18. package/dist/{chunk-7ZIZFJXT.mjs → chunk-OKGQ2X7D.mjs} +1848 -548
  19. package/dist/{chunk-X7MGZQ6C.cjs → chunk-UGWY72WC.cjs} +396 -254
  20. package/dist/{chunk-EMZIHAOH.mjs → chunk-WBCV52YV.mjs} +1846 -565
  21. package/dist/{chunk-2EBMHIGJ.mjs → chunk-WEFFRYXN.mjs} +379 -242
  22. package/dist/{chunk-AXF2FC4D.mjs → chunk-WSRCLCMB.mjs} +1 -0
  23. package/dist/{chunk-LMMP67YN.mjs → chunk-XCJRUBGJ.mjs} +1 -1
  24. package/dist/pptx/automation/index.cjs +2662 -884
  25. package/dist/pptx/automation/index.d.ts +4 -4
  26. package/dist/pptx/automation/index.mjs +5 -5
  27. package/dist/pptx/chunks/{elements-Cadkqht8.d.ts → elements-iUzpAeqR.d.ts} +114 -25
  28. package/dist/pptx/chunks/elements-iUzpAeqR.d.ts.map +1 -0
  29. package/dist/pptx/chunks/{index-CJI2EugA.d.ts → index-BWHNCVNC.d.ts} +1671 -1534
  30. package/dist/pptx/chunks/index-BWHNCVNC.d.ts.map +1 -0
  31. package/dist/pptx/chunks/{index-CozqpSPL.d.ts → index-CiyTR6mm.d.ts} +99 -10
  32. package/dist/pptx/chunks/index-CiyTR6mm.d.ts.map +1 -0
  33. package/dist/pptx/chunks/{text-operations-C3L9xrqx.d.ts → text-operations-CfLVZ7DK.d.ts} +81 -3
  34. package/dist/pptx/chunks/text-operations-CfLVZ7DK.d.ts.map +1 -0
  35. package/dist/pptx/cli/index.cjs +2652 -874
  36. package/dist/pptx/cli/index.d.ts +1 -1
  37. package/dist/pptx/cli/index.mjs +4 -4
  38. package/dist/pptx/converter/index.cjs +45 -1
  39. package/dist/pptx/converter/index.d.ts +1 -1
  40. package/dist/pptx/converter/index.mjs +2 -2
  41. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
  42. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
  43. package/dist/pptx/editor/render/collaboration-reconcile.cjs +7 -7
  44. package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
  45. package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
  46. package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
  47. package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
  48. package/dist/pptx/editor/render/find-replace.cjs +15 -14
  49. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  50. package/dist/pptx/editor/render/find-replace.mjs +2 -1
  51. package/dist/pptx/editor/render/slide-operations.cjs +9 -8
  52. package/dist/pptx/editor/render/slide-operations.mjs +3 -2
  53. package/dist/pptx/editor/render/slide-size-rescale.cjs +3 -3
  54. package/dist/pptx/editor/render/slide-size-rescale.d.ts +1 -1
  55. package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
  56. package/dist/pptx/editor/render/slide-size-rescale.mjs +3 -3
  57. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  58. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  59. package/dist/pptx/index.cjs +3208 -1106
  60. package/dist/pptx/index.d.ts +5 -5
  61. package/dist/pptx/index.mjs +5 -5
  62. package/dist/teams/index.cjs +156 -65
  63. package/dist/teams/index.mjs +156 -65
  64. package/dist/xlsx/edit/pivots.d.ts.map +1 -1
  65. package/dist/xlsx/index.cjs +867 -467
  66. package/dist/xlsx/index.mjs +867 -467
  67. package/dist/xlsx/load/index.cjs +345 -99
  68. package/dist/xlsx/load/index.mjs +345 -99
  69. package/dist/xlsx/model-pivots.d.ts +47 -0
  70. package/dist/xlsx/model-pivots.d.ts.map +1 -1
  71. package/dist/xlsx/pivot/captions-locales.d.ts +3 -0
  72. package/dist/xlsx/pivot/captions-locales.d.ts.map +1 -0
  73. package/dist/xlsx/pivot/captions-read.d.ts +14 -0
  74. package/dist/xlsx/pivot/captions-read.d.ts.map +1 -0
  75. package/dist/xlsx/pivot/captions.d.ts +26 -0
  76. package/dist/xlsx/pivot/captions.d.ts.map +1 -0
  77. package/dist/xlsx/pivot/columns.d.ts.map +1 -1
  78. package/dist/xlsx/pivot/data.d.ts +3 -2
  79. package/dist/xlsx/pivot/data.d.ts.map +1 -1
  80. package/dist/xlsx/pivot/item-labels.d.ts +12 -0
  81. package/dist/xlsx/pivot/item-labels.d.ts.map +1 -0
  82. package/dist/xlsx/pivot/item-names-read.d.ts +8 -0
  83. package/dist/xlsx/pivot/item-names-read.d.ts.map +1 -0
  84. package/dist/xlsx/pivot/measures.d.ts +2 -1
  85. package/dist/xlsx/pivot/measures.d.ts.map +1 -1
  86. package/dist/xlsx/pivot/nested.d.ts.map +1 -1
  87. package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -1
  88. package/dist/xlsx/pivot/page-filter.d.ts +1 -1
  89. package/dist/xlsx/pivot/page-filter.d.ts.map +1 -1
  90. package/dist/xlsx/pivot/read.d.ts.map +1 -1
  91. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
  92. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
  93. package/dist/xlsx/ui/index.cjs +800 -621
  94. package/dist/xlsx/ui/index.mjs +800 -621
  95. package/package.json +1 -1
  96. package/dist/PptxHandler-OGLITB3F.cjs +0 -12
  97. package/dist/PptxHandler-UKAA5T5U.mjs +0 -3
  98. package/dist/PresentationBuilder-54QGEZ2F.mjs +0 -3
  99. package/dist/pptx/chunks/elements-Cadkqht8.d.ts.map +0 -1
  100. package/dist/pptx/chunks/index-CJI2EugA.d.ts.map +0 -1
  101. package/dist/pptx/chunks/index-CozqpSPL.d.ts.map +0 -1
  102. package/dist/pptx/chunks/text-operations-C3L9xrqx.d.ts.map +0 -1
@@ -27,19 +27,19 @@ var isCellError = (value2) => typeof value2 === "object" && value2 !== null && "
27
27
  var MAX_ROW = 1048575;
28
28
  var MAX_COL = 16383;
29
29
  function columnLabel(col) {
30
- let label4 = "";
30
+ let label2 = "";
31
31
  let n = col + 1;
32
32
  while (n > 0) {
33
33
  const rem = (n - 1) % 26;
34
- label4 = String.fromCharCode(65 + rem) + label4;
34
+ label2 = String.fromCharCode(65 + rem) + label2;
35
35
  n = Math.floor((n - 1) / 26);
36
36
  }
37
- return label4;
37
+ return label2;
38
38
  }
39
- function columnIndex(label4) {
40
- if (!/^[A-Za-z]{1,3}$/.test(label4)) return -1;
39
+ function columnIndex(label2) {
40
+ if (!/^[A-Za-z]{1,3}$/.test(label2)) return -1;
41
41
  let n = 0;
42
- for (const ch of label4.toUpperCase()) n = n * 26 + (ch.charCodeAt(0) - 64);
42
+ for (const ch of label2.toUpperCase()) n = n * 26 + (ch.charCodeAt(0) - 64);
43
43
  return n - 1;
44
44
  }
45
45
  var formatAddress = (address2) => `${columnLabel(address2.col)}${address2.row + 1}`;
@@ -3836,14 +3836,14 @@ function unique(args, ctx) {
3836
3836
  const byCol = args.length > 1 && args[1] !== null && toBool(ctx.toScalar(args[1] ?? null));
3837
3837
  const once = args.length > 2 && args[2] !== null && toBool(ctx.toScalar(args[2] ?? null));
3838
3838
  if (byCol) m = transpose(m);
3839
- const keyOf2 = (row2) => JSON.stringify(
3839
+ const keyOf3 = (row2) => JSON.stringify(
3840
3840
  row2.map(
3841
3841
  (v) => isError(v) ? `#${v.error}` : typeof v === "string" ? `s${v.toLowerCase()}` : v
3842
3842
  )
3843
3843
  );
3844
3844
  const counts = /* @__PURE__ */ new Map();
3845
3845
  for (const row2 of m.data) {
3846
- const key = keyOf2(row2);
3846
+ const key = keyOf3(row2);
3847
3847
  const entry = counts.get(key);
3848
3848
  if (entry) entry.count++;
3849
3849
  else counts.set(key, { row: row2, count: 1 });
@@ -4134,24 +4134,24 @@ function tableOf(ctx, value2) {
4134
4134
  if (!head || records.length === 0) fail(ERR.VALUE);
4135
4135
  return { headers: head.map((v) => label(v).toLowerCase()), records };
4136
4136
  }
4137
- function fieldIndex(table2, field) {
4137
+ function fieldIndex(table3, field) {
4138
4138
  const value2 = scalar(field);
4139
4139
  if (isError(value2)) fail(value2);
4140
4140
  if (typeof value2 === "number") {
4141
4141
  const index3 = Math.trunc(value2) - 1;
4142
- if (index3 < 0 || index3 >= table2.headers.length) fail(ERR.VALUE);
4142
+ if (index3 < 0 || index3 >= table3.headers.length) fail(ERR.VALUE);
4143
4143
  return index3;
4144
4144
  }
4145
- const index2 = table2.headers.indexOf(label(value2).toLowerCase());
4145
+ const index2 = table3.headers.indexOf(label(value2).toLowerCase());
4146
4146
  if (index2 < 0) fail(ERR.VALUE);
4147
4147
  return index2;
4148
4148
  }
4149
- function recordFilter(table2, criteria) {
4149
+ function recordFilter(table3, criteria) {
4150
4150
  const [head, ...rows2] = criteria;
4151
4151
  if (!head || rows2.length === 0) fail(ERR.VALUE);
4152
4152
  const columns = head.map((name) => {
4153
4153
  if (name === null || name === "") return -1;
4154
- return table2.headers.indexOf(label(name).toLowerCase());
4154
+ return table3.headers.indexOf(label(name).toLowerCase());
4155
4155
  });
4156
4156
  const alternatives = rows2.map(
4157
4157
  (row2) => row2.flatMap((cell, c) => {
@@ -4165,10 +4165,10 @@ function recordFilter(table2, criteria) {
4165
4165
  return (record) => alternatives.some((tests) => tests.every((test) => test(record)));
4166
4166
  }
4167
4167
  function selected(ctx, args) {
4168
- const table2 = tableOf(ctx, args[0]);
4169
- const column2 = fieldIndex(table2, args[1]);
4170
- const matches2 = recordFilter(table2, ctx.toMatrix(args[2] ?? null).data);
4171
- return table2.records.filter(matches2).map((record) => record[column2] ?? null);
4168
+ const table3 = tableOf(ctx, args[0]);
4169
+ const column2 = fieldIndex(table3, args[1]);
4170
+ const matches2 = recordFilter(table3, ctx.toMatrix(args[2] ?? null).data);
4171
+ return table3.records.filter(matches2).map((record) => record[column2] ?? null);
4172
4172
  }
4173
4173
  var numbers = (values2) => {
4174
4174
  for (const v of values2) if (isError(v)) fail(v);
@@ -6467,30 +6467,30 @@ function findTable(host, name, sheet, row2, col) {
6467
6467
  if (name) {
6468
6468
  const lower3 = name.toLowerCase();
6469
6469
  for (let s = 0; s < sheets.length; s++) {
6470
- const table3 = sheets[s]?.tables.find(
6470
+ const table4 = sheets[s]?.tables.find(
6471
6471
  (t) => t.displayName.toLowerCase() === lower3 || t.name.toLowerCase() === lower3
6472
6472
  );
6473
- if (table3) return { table: table3, sheet: s };
6473
+ if (table4) return { table: table4, sheet: s };
6474
6474
  }
6475
6475
  return void 0;
6476
6476
  }
6477
- const table2 = sheets[sheet]?.tables.find(
6477
+ const table3 = sheets[sheet]?.tables.find(
6478
6478
  (t) => row2 >= t.range.start.row && row2 <= t.range.end.row && col >= t.range.start.col && col <= t.range.end.col
6479
6479
  );
6480
- return table2 ? { table: table2, sheet } : void 0;
6480
+ return table3 ? { table: table3, sheet } : void 0;
6481
6481
  }
6482
6482
  function resolveStructured(ref, frame) {
6483
6483
  const found = findTable(frame.host, ref.table, frame.sheet, frame.row, frame.col);
6484
6484
  if (!found) return ref.table ? ERR.NAME : ERR.REF;
6485
- const { table: table2, sheet } = found;
6486
- const range2 = normalizeRange(table2.range);
6487
- const headerRow = table2.headerRow ? range2.start.row : -1;
6488
- const dataStart = range2.start.row + (table2.headerRow ? 1 : 0);
6489
- const dataEnd = range2.end.row - (table2.totalsRow ? 1 : 0);
6490
- const totalsRow = table2.totalsRow ? range2.end.row : -1;
6485
+ const { table: table3, sheet } = found;
6486
+ const range2 = normalizeRange(table3.range);
6487
+ const headerRow = table3.headerRow ? range2.start.row : -1;
6488
+ const dataStart = range2.start.row + (table3.headerRow ? 1 : 0);
6489
+ const dataEnd = range2.end.row - (table3.totalsRow ? 1 : 0);
6490
+ const totalsRow = table3.totalsRow ? range2.end.row : -1;
6491
6491
  const columnOf = (name) => {
6492
6492
  const lower3 = name.toLowerCase();
6493
- const index2 = table2.columns.findIndex((c) => c.name.toLowerCase() === lower3);
6493
+ const index2 = table3.columns.findIndex((c) => c.name.toLowerCase() === lower3);
6494
6494
  return index2 < 0 ? -1 : range2.start.col + index2;
6495
6495
  };
6496
6496
  let c1 = range2.start.col;
@@ -7758,16 +7758,16 @@ function lookupArray(value2) {
7758
7758
  }
7759
7759
  function vhlookup(args, ctx, vertical2) {
7760
7760
  const lookup2 = blankAsZero(args);
7761
- const table2 = lookupArray(args[1] ?? null);
7761
+ const table3 = lookupArray(args[1] ?? null);
7762
7762
  const index2 = int(args[2]);
7763
7763
  const approximate2 = args.length < 4 ? true : bool(args[3]);
7764
- const { rows: rows2, cols } = shape(table2);
7764
+ const { rows: rows2, cols } = shape(table3);
7765
7765
  if (index2 < 1) fail(ERR.VALUE);
7766
7766
  if (index2 > (vertical2 ? cols : rows2)) fail(ERR.REF);
7767
- const keys = line(ctx, table2, vertical2 ? "col" : "row", 0);
7767
+ const keys = line(ctx, table3, vertical2 ? "col" : "row", 0);
7768
7768
  const at = approximate2 ? findAscending(keys, lookup2) : findExact(keys, lookup2, true);
7769
7769
  if (at < 0) fail(ERR.NA);
7770
- return vertical2 ? cellOf(table2, at, index2 - 1) : cellOf(table2, index2 - 1, at);
7770
+ return vertical2 ? cellOf(table3, at, index2 - 1) : cellOf(table3, index2 - 1, at);
7771
7771
  }
7772
7772
  function match(args, ctx) {
7773
7773
  const lookup2 = blankAsZero(args);
@@ -9262,10 +9262,10 @@ var REGRESSION_FUNCTIONS = [
9262
9262
  const lay = logs(layout(ctx, args));
9263
9263
  const fit = fitLeastSquares(lay.x, lay.y, withConst(args, 2));
9264
9264
  const stats = !omitted(args, 3) && bool(args[3]);
9265
- const table2 = coefficientTable(fit, stats, Math.exp);
9266
- if (!stats) return table2;
9265
+ const table3 = coefficientTable(fit, stats, Math.exp);
9266
+ if (!stats) return table3;
9267
9267
  const plain3 = coefficientTable(fit, true, (v) => v).data;
9268
- return new Matrix([table2.data[0] ?? [], ...plain3.slice(1)]);
9268
+ return new Matrix([table3.data[0] ?? [], ...plain3.slice(1)]);
9269
9269
  },
9270
9270
  ARGS
9271
9271
  ),
@@ -11607,7 +11607,7 @@ var DEFAULT_XML_LIMITS = {
11607
11607
  maxNodes: 5e6
11608
11608
  };
11609
11609
  var MARKUP_RE = /<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<\?[\s\S]*?\?>|<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/g;
11610
- function checkXmlLimits(xml, label4, limits = {}) {
11610
+ function checkXmlLimits(xml, label2, limits = {}) {
11611
11611
  const maxDepth = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
11612
11612
  const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
11613
11613
  let depth = 0;
@@ -11620,16 +11620,16 @@ function checkXmlLimits(xml, label4, limits = {}) {
11620
11620
  continue;
11621
11621
  }
11622
11622
  nodes++;
11623
- if (nodes > maxNodes) throw new Error(`${label4} XML exceeds the limit of ${maxNodes} elements`);
11623
+ if (nodes > maxNodes) throw new Error(`${label2} XML exceeds the limit of ${maxNodes} elements`);
11624
11624
  if (!selfClosing && ++depth > maxDepth)
11625
- throw new Error(`${label4} XML exceeds the nesting depth limit of ${maxDepth}`);
11625
+ throw new Error(`${label2} XML exceeds the nesting depth limit of ${maxDepth}`);
11626
11626
  }
11627
11627
  }
11628
11628
  function parseXml(xml, options6 = {}) {
11629
- const label4 = options6.label ?? "OOXML";
11629
+ const label2 = options6.label ?? "OOXML";
11630
11630
  if (/<!DOCTYPE|<!ENTITY/i.test(xml))
11631
- throw new Error(`${label4} XML with DTD or entity declarations is not supported`);
11632
- checkXmlLimits(xml, label4, options6.limits);
11631
+ throw new Error(`${label2} XML with DTD or entity declarations is not supported`);
11632
+ checkXmlLimits(xml, label2, options6.limits);
11633
11633
  let parseError = "";
11634
11634
  let parsed;
11635
11635
  try {
@@ -11640,12 +11640,12 @@ function parseXml(xml, options6 = {}) {
11640
11640
  }).parseFromString(xml, "application/xml");
11641
11641
  } catch (error) {
11642
11642
  throw new Error(
11643
- `Invalid ${label4} XML: ${error instanceof Error ? error.message : String(error)}`,
11643
+ `Invalid ${label2} XML: ${error instanceof Error ? error.message : String(error)}`,
11644
11644
  { cause: error }
11645
11645
  );
11646
11646
  }
11647
11647
  if (parseError || !parsed.documentElement)
11648
- throw new Error(`Invalid ${label4} XML: ${parseError || "missing root element"}`);
11648
+ throw new Error(`Invalid ${label2} XML: ${parseError || "missing root element"}`);
11649
11649
  return parsed;
11650
11650
  }
11651
11651
  var buildXml = (node2) => new XMLSerializer().serializeToString(node2);
@@ -11676,6 +11676,502 @@ var pivotColumnFields = (pivot) => [
11676
11676
  ...pivot.columnField ? pivot.moreColumnFields ?? [] : []
11677
11677
  ];
11678
11678
 
11679
+ // i18n/locale.ts
11680
+ var SUPPORTED_OFFICE_LOCALES = ["en", "fr", "de", "es", "zh-CN"];
11681
+ var DEFAULT_REJECTED_SUBTAGS = ["hant", "tw", "hk", "mo"];
11682
+ function normalizeLocale(input, supported, fallback, options6 = {}) {
11683
+ const parts = (input ?? "").trim().toLowerCase().split(/[-_]/).filter(Boolean);
11684
+ const language = parts[0];
11685
+ if (!language) return fallback;
11686
+ const find3 = (tag) => supported.find((item) => item.toLowerCase() === tag);
11687
+ const exact = find3(parts.join("-"));
11688
+ if (exact) return exact;
11689
+ const base = find3(language);
11690
+ if (base) return base;
11691
+ const rejected = options6.rejectedSubtags ?? DEFAULT_REJECTED_SUBTAGS;
11692
+ if (parts.slice(1).some((part) => rejected.includes(part))) return fallback;
11693
+ return supported.find((item) => item.toLowerCase().split("-")[0] === language && item.includes("-")) ?? fallback;
11694
+ }
11695
+ function normalizeOfficeLocale(input) {
11696
+ return normalizeLocale(input, SUPPORTED_OFFICE_LOCALES, "en");
11697
+ }
11698
+
11699
+ // i18n/dictionary.ts
11700
+ function mergeMessageModules(modules) {
11701
+ const merged = {};
11702
+ for (const path of Object.keys(modules).sort()) {
11703
+ const module = modules[path];
11704
+ if (!module) continue;
11705
+ for (const value2 of Object.values(module)) {
11706
+ if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) continue;
11707
+ const entries = Object.entries(value2);
11708
+ if (!entries.every(([, text2]) => typeof text2 === "string")) continue;
11709
+ for (const [key, text2] of entries) merged[key] = text2;
11710
+ }
11711
+ }
11712
+ return merged;
11713
+ }
11714
+
11715
+ // i18n/translator.ts
11716
+ var SINGLE2 = /\{(\w+)\}/g;
11717
+ var DOUBLE = /\{\{\s*(\w+)\s*\}\}/g;
11718
+ function interpolate(template, params, placeholder = "single") {
11719
+ if (!params) return template;
11720
+ const pattern = placeholder === "double" ? DOUBLE : SINGLE2;
11721
+ return template.replace(
11722
+ pattern,
11723
+ (match2, name) => Object.prototype.hasOwnProperty.call(params, name) && params[name] !== void 0 ? String(params[name]) : match2
11724
+ );
11725
+ }
11726
+ function createTranslator(messages, fallbacks = [], options6 = {}) {
11727
+ const placeholder = options6.placeholder ?? "single";
11728
+ return (key, params) => {
11729
+ let text2 = messages?.[key];
11730
+ for (let i2 = 0; text2 === void 0 && i2 < fallbacks.length; i2++) text2 = fallbacks[i2]?.[key];
11731
+ return interpolate(text2 ?? options6.missing?.(key) ?? key, params, placeholder);
11732
+ };
11733
+ }
11734
+
11735
+ // i18n/option-strings.ts
11736
+ var enOptionStrings = {
11737
+ General: "General",
11738
+ Display: "Display",
11739
+ Formulas: "Formulas",
11740
+ Data: "Data",
11741
+ Proofing: "Proofing",
11742
+ Save: "Save",
11743
+ Language: "Language",
11744
+ Accessibility: "Accessibility",
11745
+ Advanced: "Advanced",
11746
+ "Customize Ribbon": "Customize Ribbon",
11747
+ "Quick Access Toolbar": "Quick Access Toolbar",
11748
+ "Add-ins": "Add-ins",
11749
+ "Trust Center": "Trust Center",
11750
+ OK: "OK",
11751
+ Cancel: "Cancel",
11752
+ Close: "Close",
11753
+ Categories: "Categories",
11754
+ "Reset all options": "Reset all options",
11755
+ "General options for working with {product}.": "General options for working with {product}.",
11756
+ "Change how {product} corrects and formats your text.": "Change how {product} corrects and formats your text.",
11757
+ "Customize how documents are saved.": "Customize how documents are saved.",
11758
+ "Set the Office Language Preferences.": "Set the Office Language Preferences.",
11759
+ "Make {product} easier to work with.": "Make {product} easier to work with.",
11760
+ "Advanced options for working with {product}.": "Advanced options for working with {product}.",
11761
+ "Customize the Ribbon and keyboard shortcuts.": "Customize the Ribbon and keyboard shortcuts.",
11762
+ "Customize the Quick Access Toolbar.": "Customize the Quick Access Toolbar.",
11763
+ "View and manage Microsoft Office Add-ins.": "View and manage Microsoft Office Add-ins.",
11764
+ "Help keep your documents safe and your computer secure and healthy.": "Help keep your documents safe and your computer secure and healthy.",
11765
+ "User Interface options": "User Interface options",
11766
+ "Show Mini Toolbar on selection": "Show Mini Toolbar on selection",
11767
+ "Enable Live Preview": "Enable Live Preview",
11768
+ "ScreenTip style": "ScreenTip style",
11769
+ "Show feature descriptions in ScreenTips": "Show feature descriptions in ScreenTips",
11770
+ "Personalize your copy of Microsoft Office": "Personalize your copy of Microsoft Office",
11771
+ "User name": "User name",
11772
+ "Office Theme": "Office Theme",
11773
+ "Office display language": "Office display language",
11774
+ "Choose the language for menus, buttons and messages.": "Choose the language for menus, buttons and messages.",
11775
+ "Not available yet. Needs rich text formatting.": "Not available yet. Needs rich text formatting.",
11776
+ "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "Not available yet. Styles are applied on click; hover previews are not drawn yet.",
11777
+ "Not available yet. ScreenTips always describe the command.": "Not available yet. ScreenTips always describe the command.",
11778
+ "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "Not available yet. Documents are saved to this device; AutoRecover is not kept.",
11779
+ "Not available yet. There are no accessibility settings to change.": "Not available yet. There are no accessibility settings to change.",
11780
+ "Not available yet. The editing behaviour is fixed.": "Not available yet. The editing behaviour is fixed.",
11781
+ "Not available yet. The Quick Access Toolbar is fixed.": "Not available yet. The Quick Access Toolbar is fixed.",
11782
+ "Not available yet. The ribbon layout is fixed.": "Not available yet. The ribbon layout is fixed.",
11783
+ "Not available yet. The display language is fixed.": "Not available yet. The display language is fixed.",
11784
+ "Not available. Add-ins and macros are never run.": "Not available. Add-ins and macros are never run.",
11785
+ "Not available. Documents stay local and active content is never run.": "Not available. Documents stay local and active content is never run."
11786
+ };
11787
+ var frOptionStrings = {
11788
+ General: "G\xE9n\xE9ral",
11789
+ Display: "Affichage",
11790
+ Formulas: "Formules",
11791
+ Data: "Donn\xE9es",
11792
+ Proofing: "V\xE9rification",
11793
+ Save: "Enregistrer",
11794
+ Language: "Langue",
11795
+ Accessibility: "Accessibilit\xE9",
11796
+ Advanced: "Options avanc\xE9es",
11797
+ "Customize Ribbon": "Personnaliser le ruban",
11798
+ "Quick Access Toolbar": "Barre d\u2019outils Acc\xE8s rapide",
11799
+ "Add-ins": "Compl\xE9ments",
11800
+ "Trust Center": "Centre de gestion de la confidentialit\xE9",
11801
+ OK: "OK",
11802
+ Cancel: "Annuler",
11803
+ Close: "Fermer",
11804
+ Categories: "Cat\xE9gories",
11805
+ "Reset all options": "R\xE9initialiser toutes les options",
11806
+ "General options for working with {product}.": "Options g\xE9n\xE9rales pour l\u2019utilisation de {product}.",
11807
+ "Change how {product} corrects and formats your text.": "Modifiez la fa\xE7on dont {product} corrige et met en forme votre texte.",
11808
+ "Customize how documents are saved.": "Personnalisez l\u2019enregistrement des documents.",
11809
+ "Set the Office Language Preferences.": "D\xE9finissez les pr\xE9f\xE9rences de langue d\u2019Office.",
11810
+ "Make {product} easier to work with.": "Facilitez l\u2019utilisation de {product}.",
11811
+ "Advanced options for working with {product}.": "Options avanc\xE9es pour l\u2019utilisation de {product}.",
11812
+ "Customize the Ribbon and keyboard shortcuts.": "Personnalisez le ruban et les raccourcis clavier.",
11813
+ "Customize the Quick Access Toolbar.": "Personnalisez la barre d\u2019outils Acc\xE8s rapide.",
11814
+ "View and manage Microsoft Office Add-ins.": "Affichez et g\xE9rez les compl\xE9ments Microsoft Office.",
11815
+ "Help keep your documents safe and your computer secure and healthy.": "Prot\xE9gez vos documents et assurez la s\xE9curit\xE9 et le bon \xE9tat de votre ordinateur.",
11816
+ "User Interface options": "Options de l\u2019interface utilisateur",
11817
+ "Show Mini Toolbar on selection": "Afficher la mini barre d\u2019outils lors de la s\xE9lection",
11818
+ "Enable Live Preview": "Activer l\u2019aper\xE7u dynamique",
11819
+ "ScreenTip style": "Style des info-bulles",
11820
+ "Show feature descriptions in ScreenTips": "Afficher les descriptions des fonctionnalit\xE9s dans les info-bulles",
11821
+ "Personalize your copy of Microsoft Office": "Personnalisez votre copie de Microsoft Office",
11822
+ "User name": "Nom d\u2019utilisateur",
11823
+ "Office Theme": "Th\xE8me Office",
11824
+ "Office display language": "Langue d\u2019affichage d\u2019Office",
11825
+ "Choose the language for menus, buttons and messages.": "Choisissez la langue des menus, des boutons et des messages.",
11826
+ "Not available yet. Needs rich text formatting.": "Pas encore disponible. N\xE9cessite la mise en forme de texte enrichi.",
11827
+ "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "Pas encore disponible. Les styles s\u2019appliquent au clic ; les aper\xE7us au survol ne sont pas encore dessin\xE9s.",
11828
+ "Not available yet. ScreenTips always describe the command.": "Pas encore disponible. Les info-bulles d\xE9crivent toujours la commande.",
11829
+ "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "Pas encore disponible. Les documents sont enregistr\xE9s sur cet appareil ; la r\xE9cup\xE9ration automatique n\u2019est pas conserv\xE9e.",
11830
+ "Not available yet. There are no accessibility settings to change.": "Pas encore disponible. Aucun param\xE8tre d\u2019accessibilit\xE9 n\u2019est modifiable.",
11831
+ "Not available yet. The editing behaviour is fixed.": "Pas encore disponible. Le comportement de modification est fixe.",
11832
+ "Not available yet. The Quick Access Toolbar is fixed.": "Pas encore disponible. La barre d\u2019outils Acc\xE8s rapide est fixe.",
11833
+ "Not available yet. The ribbon layout is fixed.": "Pas encore disponible. La disposition du ruban est fixe.",
11834
+ "Not available yet. The display language is fixed.": "Pas encore disponible. La langue d\u2019affichage est fixe.",
11835
+ "Not available. Add-ins and macros are never run.": "Non disponible. Les compl\xE9ments et les macros ne sont jamais ex\xE9cut\xE9s.",
11836
+ "Not available. Documents stay local and active content is never run.": "Non disponible. Les documents restent locaux et le contenu actif n\u2019est jamais ex\xE9cut\xE9."
11837
+ };
11838
+ var deOptionStrings = {
11839
+ General: "Allgemein",
11840
+ Display: "Anzeige",
11841
+ Formulas: "Formeln",
11842
+ Data: "Daten",
11843
+ Proofing: "Dokumentpr\xFCfung",
11844
+ Save: "Speichern",
11845
+ Language: "Sprache",
11846
+ Accessibility: "Barrierefreiheit",
11847
+ Advanced: "Erweitert",
11848
+ "Customize Ribbon": "Men\xFCband anpassen",
11849
+ "Quick Access Toolbar": "Symbolleiste f\xFCr den Schnellzugriff",
11850
+ "Add-ins": "Add-Ins",
11851
+ "Trust Center": "Trust Center",
11852
+ OK: "OK",
11853
+ Cancel: "Abbrechen",
11854
+ Close: "Schlie\xDFen",
11855
+ Categories: "Kategorien",
11856
+ "Reset all options": "Alle Optionen zur\xFCcksetzen",
11857
+ "General options for working with {product}.": "Allgemeine Optionen f\xFCr die Arbeit mit {product}.",
11858
+ "Change how {product} corrects and formats your text.": "\xC4ndern Sie, wie {product} Ihren Text korrigiert und formatiert.",
11859
+ "Customize how documents are saved.": "Passen Sie an, wie Dokumente gespeichert werden.",
11860
+ "Set the Office Language Preferences.": "Legen Sie die Office-Spracheinstellungen fest.",
11861
+ "Make {product} easier to work with.": "Machen Sie {product} einfacher bedienbar.",
11862
+ "Advanced options for working with {product}.": "Erweiterte Optionen f\xFCr die Arbeit mit {product}.",
11863
+ "Customize the Ribbon and keyboard shortcuts.": "Passen Sie das Men\xFCband und die Tastenkombinationen an.",
11864
+ "Customize the Quick Access Toolbar.": "Passen Sie die Symbolleiste f\xFCr den Schnellzugriff an.",
11865
+ "View and manage Microsoft Office Add-ins.": "Microsoft Office-Add-Ins anzeigen und verwalten.",
11866
+ "Help keep your documents safe and your computer secure and healthy.": "Sch\xFCtzen Sie Ihre Dokumente und halten Sie Ihren Computer sicher und fehlerfrei.",
11867
+ "User Interface options": "Benutzeroberfl\xE4chenoptionen",
11868
+ "Show Mini Toolbar on selection": "Minisymbolleiste bei Auswahl anzeigen",
11869
+ "Enable Live Preview": "Livevorschau aktivieren",
11870
+ "ScreenTip style": "QuickInfo-Format",
11871
+ "Show feature descriptions in ScreenTips": "Funktionsbeschreibungen in QuickInfos anzeigen",
11872
+ "Personalize your copy of Microsoft Office": "Microsoft Office personalisieren",
11873
+ "User name": "Benutzername",
11874
+ "Office Theme": "Office-Design",
11875
+ "Office display language": "Office-Anzeigesprache",
11876
+ "Choose the language for menus, buttons and messages.": "W\xE4hlen Sie die Sprache f\xFCr Men\xFCs, Schaltfl\xE4chen und Meldungen.",
11877
+ "Not available yet. Needs rich text formatting.": "Noch nicht verf\xFCgbar. Erfordert Formatierung von Rich-Text.",
11878
+ "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "Noch nicht verf\xFCgbar. Formatvorlagen werden per Klick angewendet; Vorschauen beim Dar\xFCberfahren werden noch nicht gezeichnet.",
11879
+ "Not available yet. ScreenTips always describe the command.": "Noch nicht verf\xFCgbar. QuickInfos beschreiben immer den Befehl.",
11880
+ "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "Noch nicht verf\xFCgbar. Dokumente werden auf diesem Ger\xE4t gespeichert; AutoWiederherstellen wird nicht gef\xFChrt.",
11881
+ "Not available yet. There are no accessibility settings to change.": "Noch nicht verf\xFCgbar. Es gibt keine Einstellungen zur Barrierefreiheit zu \xE4ndern.",
11882
+ "Not available yet. The editing behaviour is fixed.": "Noch nicht verf\xFCgbar. Das Bearbeitungsverhalten ist festgelegt.",
11883
+ "Not available yet. The Quick Access Toolbar is fixed.": "Noch nicht verf\xFCgbar. Die Symbolleiste f\xFCr den Schnellzugriff ist festgelegt.",
11884
+ "Not available yet. The ribbon layout is fixed.": "Noch nicht verf\xFCgbar. Das Men\xFCband-Layout ist festgelegt.",
11885
+ "Not available yet. The display language is fixed.": "Noch nicht verf\xFCgbar. Die Anzeigesprache ist festgelegt.",
11886
+ "Not available. Add-ins and macros are never run.": "Nicht verf\xFCgbar. Add-Ins und Makros werden nie ausgef\xFChrt.",
11887
+ "Not available. Documents stay local and active content is never run.": "Nicht verf\xFCgbar. Dokumente bleiben lokal und aktive Inhalte werden nie ausgef\xFChrt."
11888
+ };
11889
+ var esOptionStrings = {
11890
+ General: "General",
11891
+ Display: "Mostrar",
11892
+ Formulas: "F\xF3rmulas",
11893
+ Data: "Datos",
11894
+ Proofing: "Revisi\xF3n",
11895
+ Save: "Guardar",
11896
+ Language: "Idioma",
11897
+ Accessibility: "Accesibilidad",
11898
+ Advanced: "Avanzadas",
11899
+ "Customize Ribbon": "Personalizar cinta de opciones",
11900
+ "Quick Access Toolbar": "Barra de herramientas de acceso r\xE1pido",
11901
+ "Add-ins": "Complementos",
11902
+ "Trust Center": "Centro de confianza",
11903
+ OK: "Aceptar",
11904
+ Cancel: "Cancelar",
11905
+ Close: "Cerrar",
11906
+ Categories: "Categor\xEDas",
11907
+ "Reset all options": "Restablecer todas las opciones",
11908
+ "General options for working with {product}.": "Opciones generales para trabajar con {product}.",
11909
+ "Change how {product} corrects and formats your text.": "Cambie la forma en que {product} corrige y da formato al texto.",
11910
+ "Customize how documents are saved.": "Personalice c\xF3mo se guardan los documentos.",
11911
+ "Set the Office Language Preferences.": "Establezca las preferencias de idioma de Office.",
11912
+ "Make {product} easier to work with.": "Haga que {product} sea m\xE1s f\xE1cil de usar.",
11913
+ "Advanced options for working with {product}.": "Opciones avanzadas para trabajar con {product}.",
11914
+ "Customize the Ribbon and keyboard shortcuts.": "Personalice la cinta de opciones y los m\xE9todos abreviados de teclado.",
11915
+ "Customize the Quick Access Toolbar.": "Personalice la barra de herramientas de acceso r\xE1pido.",
11916
+ "View and manage Microsoft Office Add-ins.": "Vea y administre los complementos de Microsoft Office.",
11917
+ "Help keep your documents safe and your computer secure and healthy.": "Ayude a mantener seguros sus documentos y a proteger y mantener en buen estado su equipo.",
11918
+ "User Interface options": "Opciones de la interfaz de usuario",
11919
+ "Show Mini Toolbar on selection": "Mostrar minibarra de herramientas al seleccionar",
11920
+ "Enable Live Preview": "Habilitar vistas previas din\xE1micas",
11921
+ "ScreenTip style": "Estilo de la informaci\xF3n en pantalla",
11922
+ "Show feature descriptions in ScreenTips": "Mostrar descripciones de caracter\xEDsticas en la informaci\xF3n en pantalla",
11923
+ "Personalize your copy of Microsoft Office": "Personalice su copia de Microsoft Office",
11924
+ "User name": "Nombre de usuario",
11925
+ "Office Theme": "Tema de Office",
11926
+ "Office display language": "Idioma de presentaci\xF3n de Office",
11927
+ "Choose the language for menus, buttons and messages.": "Elija el idioma de los men\xFAs, los botones y los mensajes.",
11928
+ "Not available yet. Needs rich text formatting.": "A\xFAn no disponible. Requiere formato de texto enriquecido.",
11929
+ "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "A\xFAn no disponible. Los estilos se aplican al hacer clic; las vistas previas al pasar el cursor todav\xEDa no se dibujan.",
11930
+ "Not available yet. ScreenTips always describe the command.": "A\xFAn no disponible. La informaci\xF3n en pantalla siempre describe el comando.",
11931
+ "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "A\xFAn no disponible. Los documentos se guardan en este dispositivo; no se conserva la recuperaci\xF3n autom\xE1tica.",
11932
+ "Not available yet. There are no accessibility settings to change.": "A\xFAn no disponible. No hay opciones de accesibilidad que cambiar.",
11933
+ "Not available yet. The editing behaviour is fixed.": "A\xFAn no disponible. El comportamiento de edici\xF3n es fijo.",
11934
+ "Not available yet. The Quick Access Toolbar is fixed.": "A\xFAn no disponible. La barra de herramientas de acceso r\xE1pido es fija.",
11935
+ "Not available yet. The ribbon layout is fixed.": "A\xFAn no disponible. El dise\xF1o de la cinta de opciones es fijo.",
11936
+ "Not available yet. The display language is fixed.": "A\xFAn no disponible. El idioma de presentaci\xF3n es fijo.",
11937
+ "Not available. Add-ins and macros are never run.": "No disponible. Los complementos y las macros nunca se ejecutan.",
11938
+ "Not available. Documents stay local and active content is never run.": "No disponible. Los documentos permanecen locales y el contenido activo nunca se ejecuta."
11939
+ };
11940
+ var zhOptionStrings = {
11941
+ General: "\u5E38\u89C4",
11942
+ Display: "\u663E\u793A",
11943
+ Formulas: "\u516C\u5F0F",
11944
+ Data: "\u6570\u636E",
11945
+ Proofing: "\u6821\u5BF9",
11946
+ Save: "\u4FDD\u5B58",
11947
+ Language: "\u8BED\u8A00",
11948
+ Accessibility: "\u8F85\u52A9\u529F\u80FD",
11949
+ Advanced: "\u9AD8\u7EA7",
11950
+ "Customize Ribbon": "\u81EA\u5B9A\u4E49\u529F\u80FD\u533A",
11951
+ "Quick Access Toolbar": "\u5FEB\u901F\u8BBF\u95EE\u5DE5\u5177\u680F",
11952
+ "Add-ins": "\u52A0\u8F7D\u9879",
11953
+ "Trust Center": "\u4FE1\u4EFB\u4E2D\u5FC3",
11954
+ OK: "\u786E\u5B9A",
11955
+ Cancel: "\u53D6\u6D88",
11956
+ Close: "\u5173\u95ED",
11957
+ Categories: "\u7C7B\u522B",
11958
+ "Reset all options": "\u91CD\u7F6E\u6240\u6709\u9009\u9879",
11959
+ "General options for working with {product}.": "\u4F7F\u7528 {product} \u7684\u5E38\u89C4\u9009\u9879\u3002",
11960
+ "Change how {product} corrects and formats your text.": "\u66F4\u6539 {product} \u66F4\u6B63\u548C\u8BBE\u7F6E\u6587\u672C\u683C\u5F0F\u7684\u65B9\u5F0F\u3002",
11961
+ "Customize how documents are saved.": "\u81EA\u5B9A\u4E49\u4FDD\u5B58\u6587\u6863\u7684\u65B9\u5F0F\u3002",
11962
+ "Set the Office Language Preferences.": "\u8BBE\u7F6E Office \u8BED\u8A00\u9996\u9009\u9879\u3002",
11963
+ "Make {product} easier to work with.": "\u8BA9 {product} \u66F4\u6613\u4E8E\u4F7F\u7528\u3002",
11964
+ "Advanced options for working with {product}.": "\u4F7F\u7528 {product} \u7684\u9AD8\u7EA7\u9009\u9879\u3002",
11965
+ "Customize the Ribbon and keyboard shortcuts.": "\u81EA\u5B9A\u4E49\u529F\u80FD\u533A\u548C\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002",
11966
+ "Customize the Quick Access Toolbar.": "\u81EA\u5B9A\u4E49\u5FEB\u901F\u8BBF\u95EE\u5DE5\u5177\u680F\u3002",
11967
+ "View and manage Microsoft Office Add-ins.": "\u67E5\u770B\u548C\u7BA1\u7406 Microsoft Office \u52A0\u8F7D\u9879\u3002",
11968
+ "Help keep your documents safe and your computer secure and healthy.": "\u5E2E\u52A9\u4FDD\u969C\u6587\u6863\u5B89\u5168\uFF0C\u5E76\u4F7F\u8BA1\u7B97\u673A\u4FDD\u6301\u5B89\u5168\u548C\u5065\u5EB7\u3002",
11969
+ "User Interface options": "\u7528\u6237\u754C\u9762\u9009\u9879",
11970
+ "Show Mini Toolbar on selection": "\u9009\u62E9\u65F6\u663E\u793A\u6D6E\u52A8\u5DE5\u5177\u680F",
11971
+ "Enable Live Preview": "\u542F\u7528\u5B9E\u65F6\u9884\u89C8",
11972
+ "ScreenTip style": "\u5C4F\u5E55\u63D0\u793A\u6837\u5F0F",
11973
+ "Show feature descriptions in ScreenTips": "\u5728\u5C4F\u5E55\u63D0\u793A\u4E2D\u663E\u793A\u529F\u80FD\u8BF4\u660E",
11974
+ "Personalize your copy of Microsoft Office": "\u5BF9 Microsoft Office \u8FDB\u884C\u4E2A\u6027\u5316\u8BBE\u7F6E",
11975
+ "User name": "\u7528\u6237\u540D",
11976
+ "Office Theme": "Office \u4E3B\u9898",
11977
+ "Office display language": "Office \u663E\u793A\u8BED\u8A00",
11978
+ "Choose the language for menus, buttons and messages.": "\u9009\u62E9\u83DC\u5355\u3001\u6309\u94AE\u548C\u6D88\u606F\u4F7F\u7528\u7684\u8BED\u8A00\u3002",
11979
+ "Not available yet. Needs rich text formatting.": "\u6682\u4E0D\u53EF\u7528\u3002\u9700\u8981\u5BCC\u6587\u672C\u683C\u5F0F\u3002",
11980
+ "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "\u6682\u4E0D\u53EF\u7528\u3002\u6837\u5F0F\u5728\u5355\u51FB\u65F6\u5E94\u7528\uFF1B\u5C1A\u4E0D\u7ED8\u5236\u60AC\u505C\u9884\u89C8\u3002",
11981
+ "Not available yet. ScreenTips always describe the command.": "\u6682\u4E0D\u53EF\u7528\u3002\u5C4F\u5E55\u63D0\u793A\u59CB\u7EC8\u63CF\u8FF0\u8BE5\u547D\u4EE4\u3002",
11982
+ "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "\u6682\u4E0D\u53EF\u7528\u3002\u6587\u6863\u4FDD\u5B58\u5230\u6B64\u8BBE\u5907\uFF1B\u4E0D\u4FDD\u7559\u81EA\u52A8\u6062\u590D\u3002",
11983
+ "Not available yet. There are no accessibility settings to change.": "\u6682\u4E0D\u53EF\u7528\u3002\u6CA1\u6709\u53EF\u66F4\u6539\u7684\u8F85\u52A9\u529F\u80FD\u8BBE\u7F6E\u3002",
11984
+ "Not available yet. The editing behaviour is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u7F16\u8F91\u884C\u4E3A\u662F\u56FA\u5B9A\u7684\u3002",
11985
+ "Not available yet. The Quick Access Toolbar is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u5FEB\u901F\u8BBF\u95EE\u5DE5\u5177\u680F\u662F\u56FA\u5B9A\u7684\u3002",
11986
+ "Not available yet. The ribbon layout is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u529F\u80FD\u533A\u5E03\u5C40\u662F\u56FA\u5B9A\u7684\u3002",
11987
+ "Not available yet. The display language is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u663E\u793A\u8BED\u8A00\u662F\u56FA\u5B9A\u7684\u3002",
11988
+ "Not available. Add-ins and macros are never run.": "\u4E0D\u53EF\u7528\u3002\u52A0\u8F7D\u9879\u548C\u5B8F\u6C38\u8FDC\u4E0D\u4F1A\u8FD0\u884C\u3002",
11989
+ "Not available. Documents stay local and active content is never run.": "\u4E0D\u53EF\u7528\u3002\u6587\u6863\u4FDD\u7559\u5728\u672C\u5730\uFF0C\u6D3B\u52A8\u5185\u5BB9\u6C38\u8FDC\u4E0D\u4F1A\u8FD0\u884C\u3002"
11990
+ };
11991
+ var optionStrings = {
11992
+ en: enOptionStrings,
11993
+ fr: frOptionStrings,
11994
+ de: deOptionStrings,
11995
+ es: esOptionStrings,
11996
+ "zh-CN": zhOptionStrings
11997
+ };
11998
+
11999
+ // xlsx/pivot/captions-locales.ts
12000
+ var table2 = (words2, prefix, rest, functions) => ({
12001
+ ...rest,
12002
+ functions,
12003
+ aggregates: Object.fromEntries(
12004
+ Object.keys(words2).map((fn) => [fn, prefix(words2[fn])])
12005
+ )
12006
+ });
12007
+ var GERMAN = {
12008
+ sum: "Summe",
12009
+ count: "Anzahl",
12010
+ average: "Mittelwert",
12011
+ max: "Max",
12012
+ min: "Min",
12013
+ product: "Produkt",
12014
+ countNums: "Anzahl (Zahlen)",
12015
+ stdDev: "Standardabweichung",
12016
+ stdDevp: "Standardabweichung (Grundgesamtheit)",
12017
+ var: "Varianz",
12018
+ varp: "Varianz (Grundgesamtheit)"
12019
+ };
12020
+ var SPANISH = {
12021
+ sum: "Suma",
12022
+ count: "Cuenta",
12023
+ average: "Promedio",
12024
+ max: "M\xE1x",
12025
+ min: "M\xEDn",
12026
+ product: "Producto",
12027
+ countNums: "Cuenta de n\xFAmeros",
12028
+ stdDev: "Desvest",
12029
+ stdDevp: "Desvestp",
12030
+ var: "Var",
12031
+ varp: "Varp"
12032
+ };
12033
+ var FRENCH = {
12034
+ sum: "Somme",
12035
+ count: "Nombre",
12036
+ average: "Moyenne",
12037
+ max: "Max",
12038
+ min: "Min",
12039
+ product: "Produit",
12040
+ countNums: "Nombre (nombres)",
12041
+ stdDev: "\xC9cartype",
12042
+ stdDevp: "\xC9cartypep",
12043
+ var: "Var",
12044
+ varp: "Varp"
12045
+ };
12046
+ var CHINESE = {
12047
+ sum: "\u6C42\u548C",
12048
+ count: "\u8BA1\u6570",
12049
+ average: "\u5E73\u5747\u503C",
12050
+ max: "\u6700\u5927\u503C",
12051
+ min: "\u6700\u5C0F\u503C",
12052
+ product: "\u4E58\u79EF",
12053
+ countNums: "\u6570\u503C\u8BA1\u6570",
12054
+ stdDev: "\u6807\u51C6\u504F\u5DEE",
12055
+ stdDevp: "\u603B\u4F53\u6807\u51C6\u504F\u5DEE",
12056
+ var: "\u65B9\u5DEE",
12057
+ varp: "\u603B\u4F53\u65B9\u5DEE"
12058
+ };
12059
+ var LOCALIZED_PIVOT_CAPTIONS = {
12060
+ de: table2(
12061
+ GERMAN,
12062
+ (word) => `${word} von {0}`,
12063
+ {
12064
+ rowLabels: "Zeilenbeschriftungen",
12065
+ columnLabels: "Spaltenbeschriftungen",
12066
+ grandTotal: "Gesamtergebnis",
12067
+ values: "Werte",
12068
+ all: "(Alle)",
12069
+ blank: "(leer)",
12070
+ subtotal: "{0} Ergebnis",
12071
+ measureTotal: "Gesamt {0}"
12072
+ },
12073
+ GERMAN
12074
+ ),
12075
+ es: table2(
12076
+ SPANISH,
12077
+ (word) => `${word} de {0}`,
12078
+ {
12079
+ rowLabels: "Etiquetas de fila",
12080
+ columnLabels: "Etiquetas de columna",
12081
+ grandTotal: "Total general",
12082
+ values: "Valores",
12083
+ all: "(Todas)",
12084
+ blank: "(en blanco)",
12085
+ subtotal: "{0} Total",
12086
+ measureTotal: "Total {0}"
12087
+ },
12088
+ SPANISH
12089
+ ),
12090
+ fr: table2(
12091
+ FRENCH,
12092
+ (word) => `${word} de {0}`,
12093
+ {
12094
+ rowLabels: "\xC9tiquettes de lignes",
12095
+ columnLabels: "\xC9tiquettes de colonnes",
12096
+ grandTotal: "Total g\xE9n\xE9ral",
12097
+ values: "Valeurs",
12098
+ all: "(Tous)",
12099
+ blank: "(vide)",
12100
+ subtotal: "{0} Total",
12101
+ measureTotal: "Total {0}"
12102
+ },
12103
+ FRENCH
12104
+ ),
12105
+ "zh-CN": table2(
12106
+ CHINESE,
12107
+ (word) => `${word}\u9879:{0}`,
12108
+ {
12109
+ rowLabels: "\u884C\u6807\u7B7E",
12110
+ columnLabels: "\u5217\u6807\u7B7E",
12111
+ grandTotal: "\u603B\u8BA1",
12112
+ values: "\u6570\u503C",
12113
+ all: "(\u5168\u90E8)",
12114
+ blank: "(\u7A7A\u767D)",
12115
+ subtotal: "{0} \u6C47\u603B",
12116
+ measureTotal: "\u603B\u8BA1 {0}"
12117
+ },
12118
+ CHINESE
12119
+ )
12120
+ };
12121
+
12122
+ // xlsx/pivot/captions.ts
12123
+ var FUNCTIONS = {
12124
+ sum: "Sum",
12125
+ count: "Count",
12126
+ average: "Average",
12127
+ max: "Max",
12128
+ min: "Min",
12129
+ product: "Product",
12130
+ countNums: "Count",
12131
+ stdDev: "StdDev",
12132
+ stdDevp: "StdDevp",
12133
+ var: "Var",
12134
+ varp: "Varp"
12135
+ };
12136
+ var aggregateNames = () => Object.fromEntries(
12137
+ Object.keys(FUNCTIONS).map((fn) => [
12138
+ fn,
12139
+ `${fn[0].toUpperCase()}${fn.slice(1)} of {0}`
12140
+ ])
12141
+ );
12142
+ var ENGLISH_PIVOT_CAPTIONS = {
12143
+ rowLabels: "Row Labels",
12144
+ columnLabels: "Column Labels",
12145
+ grandTotal: "Grand Total",
12146
+ values: "Values",
12147
+ all: "(All)",
12148
+ blank: "(blank)",
12149
+ subtotal: "{0} Total",
12150
+ measureTotal: "Total {0}",
12151
+ functions: FUNCTIONS,
12152
+ aggregates: aggregateNames()
12153
+ };
12154
+ var fillCaption = (template, ...args) => template.replace(/\{(\d)\}/g, (_match, at) => args[Number(at)] ?? "");
12155
+ function pivotCaptions(pivot) {
12156
+ const own = pivot.captions;
12157
+ if (!own) return ENGLISH_PIVOT_CAPTIONS;
12158
+ return {
12159
+ ...ENGLISH_PIVOT_CAPTIONS,
12160
+ ...Object.fromEntries(Object.entries(own).filter(([, value2]) => typeof value2 === "string")),
12161
+ functions: { ...ENGLISH_PIVOT_CAPTIONS.functions, ...own.functions },
12162
+ aggregates: { ...ENGLISH_PIVOT_CAPTIONS.aggregates, ...own.aggregates }
12163
+ };
12164
+ }
12165
+ var pivotMeasureName = (aggregate2, field, pivot = {}) => fillCaption(pivotCaptions(pivot).aggregates[aggregate2], field);
12166
+ function localizedPivotCaptions(locale) {
12167
+ const caps = LOCALIZED_PIVOT_CAPTIONS[normalizeOfficeLocale(locale)];
12168
+ return caps ? structuredClone(caps) : void 0;
12169
+ }
12170
+ function authoredCaptions(options6) {
12171
+ const own = options6.captions ?? localizedPivotCaptions(options6.locale);
12172
+ return own && Object.keys(own).length ? structuredClone(own) : void 0;
12173
+ }
12174
+
11679
12175
  // xlsx/pivot/date-groups.ts
11680
12176
  var PIVOT_DATE_UNITS = [
11681
12177
  "seconds",
@@ -11862,9 +12358,9 @@ function expandDateGroups(pivot) {
11862
12358
  fields: [...pivot.fields, ...derived.map((entry) => entry.name)],
11863
12359
  records: pivot.records.map((record) => [
11864
12360
  ...record,
11865
- ...tables.map((table2) => {
11866
- const value2 = record[table2.base];
11867
- return typeof value2 === "number" ? table2.labels[table2.index(value2)] : null;
12361
+ ...tables.map((table3) => {
12362
+ const value2 = record[table3.base];
12363
+ return typeof value2 === "number" ? table3.labels[table3.index(value2)] : null;
11868
12364
  })
11869
12365
  ])
11870
12366
  };
@@ -11942,19 +12438,6 @@ function groupLabelsOf(pivot, field) {
11942
12438
  }
11943
12439
 
11944
12440
  // xlsx/pivot/subtotals.ts
11945
- var PIVOT_SUBTOTALS = {
11946
- sum: { attr: "sumSubtotal", item: "sum", label: "Sum" },
11947
- count: { attr: "countASubtotal", item: "countA", label: "Count" },
11948
- average: { attr: "avgSubtotal", item: "avg", label: "Average" },
11949
- max: { attr: "maxSubtotal", item: "max", label: "Max" },
11950
- min: { attr: "minSubtotal", item: "min", label: "Min" },
11951
- product: { attr: "productSubtotal", item: "product", label: "Product" },
11952
- countNums: { attr: "countSubtotal", item: "count", label: "Count" },
11953
- stdDev: { attr: "stdDevSubtotal", item: "stdDev", label: "StdDev" },
11954
- stdDevp: { attr: "stdDevPSubtotal", item: "stdDevP", label: "StdDevp" },
11955
- var: { attr: "varSubtotal", item: "var", label: "Var" },
11956
- varp: { attr: "varPSubtotal", item: "varP", label: "Varp" }
11957
- };
11958
12441
  var PIVOT_SUBTOTAL_ORDER = [
11959
12442
  "sum",
11960
12443
  "count",
@@ -12053,6 +12536,14 @@ function pruneItemFilters(pivot) {
12053
12536
  return next.length ? next : void 0;
12054
12537
  }
12055
12538
 
12539
+ // xlsx/pivot/item-labels.ts
12540
+ var keyOf = (field, item) => `${field}\0${pivotValueKey(item)}`;
12541
+ function pivotItemLabeler(pivot) {
12542
+ const blank = pivotCaptions(pivot).blank;
12543
+ const names = pivot.itemNames?.length ? new Map(pivot.itemNames.map((entry) => [keyOf(entry.field, entry.item), entry.name])) : void 0;
12544
+ return (field, value2) => names?.get(keyOf(field, value2)) ?? (value2 === null || value2 === "" ? blank : pivotItemLabel(value2));
12545
+ }
12546
+
12056
12547
  // xlsx/pivot/page-filter.ts
12057
12548
  function validatePivotPageFilter(pivot) {
12058
12549
  const filter2 = pivot.pageFilter;
@@ -12064,8 +12555,8 @@ function validatePivotPageFilter(pivot) {
12064
12555
  pivot.columnField,
12065
12556
  pivot.valueField,
12066
12557
  ...extras.map((v) => v?.field)
12067
- ].includes(filter2.field) || pivot.valuesAxis === "rows")
12068
- throw new Error("Report filters require Values on columns and a separate source field.");
12558
+ ].includes(filter2.field))
12559
+ throw new Error("Report filters require a separate source field.");
12069
12560
  if (filter2.item !== void 0 && !(filter2.item === null || typeof filter2.item === "string" || typeof filter2.item === "boolean" || typeof filter2.item === "number" && Number.isFinite(filter2.item) || isCellError(filter2.item) && isErrorCode(filter2.item.error) && Object.keys(filter2.item).length === 1))
12070
12561
  throw new Error("Choose a cached literal report filter item.");
12071
12562
  }
@@ -12078,10 +12569,10 @@ function pagedProjection(pivot) {
12078
12569
  if (!filter2) return pivot;
12079
12570
  const labels = /* @__PURE__ */ new Map();
12080
12571
  for (const item of pivotItems(pivot, filter2.field)) {
12081
- const label4 = String(pivotItemLabel(item)).toLowerCase(), key2 = pivotValueKey(item);
12082
- if (label4 === "(all)" || labels.has(label4) && labels.get(label4) !== key2)
12572
+ const label2 = String(pivotItemLabel(item)).toLowerCase(), key2 = pivotValueKey(item);
12573
+ if (label2 === "(all)" || labels.has(label2) && labels.get(label2) !== key2)
12083
12574
  throw new Error("Ambiguous report filter item captions are preserved.");
12084
- labels.set(label4, key2);
12575
+ labels.set(label2, key2);
12085
12576
  }
12086
12577
  if (filter2.item === void 0) return pivot;
12087
12578
  const index2 = pivot.fields.indexOf(filter2.field), key = pivotValueKey(filter2.item);
@@ -12099,7 +12590,7 @@ function prependPivotPage(grid6, pivot) {
12099
12590
  values: [
12100
12591
  [
12101
12592
  pivot.pageFilter.field,
12102
- pivot.pageFilter.item === void 0 ? "(All)" : pivotItemLabel(pivot.pageFilter.item),
12593
+ pivot.pageFilter.item === void 0 ? pivotCaptions(pivot).all : pivotItemLabeler(pivot)(pivot.pageFilter.field, pivot.pageFilter.item),
12103
12594
  ...Array(width - 2).fill(null)
12104
12595
  ],
12105
12596
  Array(width).fill(null),
@@ -12202,7 +12693,7 @@ function validatePivotFields(pivot) {
12202
12693
  throw new Error("Values before or between fields require two row fields and Values on rows.");
12203
12694
  if (pivot.valuesAxis === "rows" && (!Array.isArray(extras) || !extras.length))
12204
12695
  throw new Error("Values on rows require multiple measures.");
12205
- if (extras.length > 0 && pivot.sourceXml && parseXml(pivot.sourceXml).documentElement.getAttribute("dataCaption") !== "Values")
12696
+ if (extras.length > 0 && pivot.sourceXml && parseXml(pivot.sourceXml).documentElement.getAttribute("dataCaption") !== pivotCaptions(pivot).values)
12206
12697
  throw new Error("This PivotTable uses unsupported Values header captions.");
12207
12698
  if (!Array.isArray(extras) || extras.length > 15 || extras.some(
12208
12699
  (measure2) => !measure2 || !pivot.fields.includes(measure2.field) || !PIVOT_AGGREGATES.includes(measure2.aggregate) || typeof measure2.caption !== "string" || !measure2.caption.trim() || measure2.caption.length > 255 || pivot.fields.some((field) => field.toLowerCase() === measure2.caption.toLowerCase())
@@ -12215,8 +12706,8 @@ function validatePivotFields(pivot) {
12215
12706
  if (pivot.layout !== void 0 && !["tabular", "compact", "outline"].includes(pivot.layout) || pivot.subtotalPosition !== void 0 && !["top", "bottom"].includes(pivot.subtotalPosition) || !PIVOT_AGGREGATES.includes(pivot.aggregate) || !pivot.fields.includes(pivot.valueField) || [...rows2, ...columns].some((field) => !axisNames.includes(field)) || (/* @__PURE__ */ new Set([...rows2, ...columns])).size !== rows2.length + columns.length || pivot.subtotals !== void 0 && typeof pivot.subtotals !== "boolean" || pivot.repeatLabels !== void 0 && typeof pivot.repeatLabels !== "boolean")
12216
12707
  throw new Error("Choose valid PivotTable fields; row and column fields must differ.");
12217
12708
  }
12218
- function pivotCaption(aggregate2, field) {
12219
- return `${aggregate2[0].toUpperCase()}${aggregate2.slice(1)} of ${field}`;
12709
+ function pivotCaption(aggregate2, field, pivot) {
12710
+ return pivotMeasureName(aggregate2, field, pivot);
12220
12711
  }
12221
12712
 
12222
12713
  // xlsx/write/xml-out.ts
@@ -12241,7 +12732,7 @@ var pivotMeasures = (pivot) => [
12241
12732
  { field: pivot.valueField, aggregate: pivot.aggregate, caption: pivot.valueCaption },
12242
12733
  ...pivot.additionalValues ?? []
12243
12734
  ];
12244
- function normalizedPivotMeasures(values2) {
12735
+ function normalizedPivotMeasures(values2, pivot) {
12245
12736
  if (!Array.isArray(values2) || values2.length > 15)
12246
12737
  throw new Error("Choose between one and sixteen PivotTable value fields.");
12247
12738
  return values2.map((value2) => {
@@ -12253,7 +12744,7 @@ function normalizedPivotMeasures(values2) {
12253
12744
  return {
12254
12745
  field: value2.field,
12255
12746
  aggregate: aggregate2,
12256
- caption: value2.caption ?? `${aggregate2[0].toUpperCase()}${aggregate2.slice(1)} of ${value2.field}`
12747
+ caption: value2.caption ?? pivotMeasureName(aggregate2, value2.field, pivot)
12257
12748
  };
12258
12749
  });
12259
12750
  }
@@ -12288,7 +12779,6 @@ var pivotMeasureNumber = (pivot, records, measure2) => aggregateValues(records,
12288
12779
 
12289
12780
  // xlsx/pivot/columns.ts
12290
12781
  var SEPARATOR = "";
12291
- var label2 = pivotItemLabel;
12292
12782
  var columnKey = (keys, depth) => keys.slice(0, depth).join(SEPARATOR);
12293
12783
  var recordColumnKeys = (record, indices) => indices.map((index2) => pivotValueKey(record[index2] ?? null));
12294
12784
  function pivotColumnEntries(pivot) {
@@ -12363,7 +12853,9 @@ function pivotColumnHeaders(pivot, columns, rowLabels, valuesOnRows = false) {
12363
12853
  const rows2 = levels + 1 + Number(count2 > 1);
12364
12854
  const grid6 = Array.from({ length: rows2 }, () => Array(width).fill(null));
12365
12855
  if (count2 === 1 && !valuesOnRows) grid6[0][0] = pivot.valueCaption;
12366
- const titles = compact3 ? ["Column Labels"] : [...columns.names, ...count2 > 1 ? ["Values"] : []];
12856
+ const caps = pivotCaptions(pivot);
12857
+ const labelOf = pivotItemLabeler(pivot);
12858
+ const titles = compact3 ? [caps.columnLabels] : [...columns.names, ...count2 > 1 ? [caps.values] : []];
12367
12859
  titles.forEach((title, i2) => {
12368
12860
  grid6[0][labelColumns + i2] = title;
12369
12861
  });
@@ -12376,24 +12868,23 @@ function pivotColumnHeaders(pivot, columns, rowLabels, valuesOnRows = false) {
12376
12868
  if (entry.kind === "leaf") {
12377
12869
  entry.path.forEach((_index, level) => {
12378
12870
  const continued = entry.path.slice(0, level + 1).every((p, i2) => p === previous[i2]);
12379
- if (!continued) grid6[1 + level][at] = label2(entry.values[level]);
12871
+ if (!continued) grid6[1 + level][at] = labelOf(columns.names[level], entry.values[level]);
12380
12872
  });
12381
12873
  previous = entry.path;
12382
12874
  if (count2 > 1) measures.forEach((measure2, m) => grid6[rows2 - 1][at + m] = measure2.caption);
12383
12875
  return;
12384
12876
  }
12385
12877
  const row2 = entry.kind === "grand" ? 1 : entry.path.length;
12386
- const name = entry.kind === "grand" ? "" : String(label2(entry.values.at(-1)));
12878
+ const name = entry.kind === "grand" ? "" : String(labelOf(columns.names[entry.path.length - 1], entry.values.at(-1)));
12387
12879
  measures.forEach((measure2, m) => {
12388
- const custom = entry.fn ? PIVOT_SUBTOTALS[entry.fn].label : void 0;
12389
- grid6[row2][at + m] = custom ? count2 === 1 ? `${name} ${custom}` : `${name} ${custom} of ${measure2.field}` : count2 === 1 ? entry.kind === "grand" ? "Grand Total" : `${name} Total` : entry.kind === "grand" ? `Total ${measure2.caption}` : `${name} ${measure2.caption}`;
12880
+ const custom = entry.fn ? caps.functions[entry.fn] : void 0;
12881
+ grid6[row2][at + m] = custom ? count2 === 1 ? `${name} ${custom}` : `${name} ${custom} of ${measure2.field}` : count2 === 1 ? entry.kind === "grand" ? caps.grandTotal : fillCaption(caps.subtotal, name) : entry.kind === "grand" ? fillCaption(caps.measureTotal, measure2.caption) : `${name} ${measure2.caption}`;
12390
12882
  });
12391
12883
  });
12392
12884
  return grid6;
12393
12885
  }
12394
12886
 
12395
12887
  // xlsx/pivot/nested.ts
12396
- var label3 = pivotItemLabel;
12397
12888
  var MAX_CELLS = 1e6;
12398
12889
  var node = (index2, value2) => ({
12399
12890
  index: index2,
@@ -12423,6 +12914,8 @@ function nestedPivotGrid(pivot) {
12423
12914
  const labelColumns = compact3 ? 1 : levels;
12424
12915
  const measures = pivotMeasures(pivot);
12425
12916
  const functions = names.map((name) => fieldSubtotalFunctions(pivot, name));
12917
+ const caps = pivotCaptions(pivot);
12918
+ const labelOf = pivotItemLabeler(pivot);
12426
12919
  const root = node(0, null);
12427
12920
  for (const record of pivot.records) {
12428
12921
  const keys = recordColumnKeys(record, columnFields);
@@ -12449,7 +12942,7 @@ function nestedPivotGrid(pivot) {
12449
12942
  }
12450
12943
  const dimensions = pivotColumnDimensions(pivot, columns, labelColumns, onRows);
12451
12944
  const rowTitles = names.map((name) => name);
12452
- if (onRows) rowTitles.splice(valuesAt, 0, "Values");
12945
+ if (onRows) rowTitles.splice(valuesAt, 0, caps.values);
12453
12946
  let values2 = [];
12454
12947
  let indents = [];
12455
12948
  const rowEntries = [];
@@ -12528,11 +13021,11 @@ function nestedPivotGrid(pivot) {
12528
13021
  const children2 = [...group.children.values()].sort((a, b) => a.index - b.index);
12529
13022
  children2.forEach((child, position) => {
12530
13023
  const here = {
12531
- labels: [...path.labels, label3(child.value)],
13024
+ labels: [...path.labels, labelOf(names[field], child.value)],
12532
13025
  indices: [...path.indices, child.index],
12533
13026
  firsts: [...path.firsts, position === 0]
12534
13027
  };
12535
- const text2 = label3(child.value);
13028
+ const text2 = labelOf(names[field], child.value);
12536
13029
  if (last)
12537
13030
  return push3(level, () => [
12538
13031
  labelCells(path, leafShown(here.firsts), level, text2),
@@ -12555,14 +13048,14 @@ function nestedPivotGrid(pivot) {
12555
13048
  ]);
12556
13049
  if (own === "auto") {
12557
13050
  if (showsValue) return;
12558
- if (valuesAbove) subtotal(`${caption} Total`, void 0, measure2);
13051
+ if (valuesAbove) subtotal(fillCaption(caps.subtotal, caption), void 0, measure2);
12559
13052
  else measures.forEach((one2, m) => subtotal(`${caption} ${one2.caption}`, void 0, m));
12560
13053
  } else
12561
13054
  for (const fn of own)
12562
- if (valuesAbove) subtotal(`${caption} ${PIVOT_SUBTOTALS[fn].label}`, fn, measure2);
13055
+ if (valuesAbove) subtotal(`${caption} ${caps.functions[fn]}`, fn, measure2);
12563
13056
  else
12564
13057
  measures.forEach(
12565
- (one2, m) => subtotal(`${caption} ${PIVOT_SUBTOTALS[fn].label} of ${one2.field}`, fn, m)
13058
+ (one2, m) => subtotal(`${caption} ${caps.functions[fn]} of ${one2.field}`, fn, m)
12566
13059
  );
12567
13060
  });
12568
13061
  };
@@ -12573,12 +13066,12 @@ function nestedPivotGrid(pivot) {
12573
13066
  ]);
12574
13067
  const build3 = () => {
12575
13068
  walk(0, root, void 0, { labels: [], indices: [], firsts: [] });
12576
- if (onRows) measures.forEach((one2, m) => grand(`Total ${one2.caption}`, m));
12577
- else grand("Grand Total");
13069
+ if (onRows) measures.forEach((one2, m) => grand(fillCaption(caps.measureTotal, one2.caption), m));
13070
+ else grand(caps.grandTotal);
12578
13071
  };
12579
13072
  build3();
12580
13073
  counting = false;
12581
- values2 = pivotColumnHeaders(pivot, columns, compact3 ? ["Row Labels"] : rowTitles, onRows);
13074
+ values2 = pivotColumnHeaders(pivot, columns, compact3 ? [caps.rowLabels] : rowTitles, onRows);
12582
13075
  const firstDataRow = values2.length;
12583
13076
  indents = values2.map(() => 0);
12584
13077
  build3();
@@ -12714,7 +13207,7 @@ function headerMode(args, i2, ctx, firstRow) {
12714
13207
  if (mode === 1 || mode === 3) return true;
12715
13208
  return fail(ERR.VALUE);
12716
13209
  }
12717
- var keyOf = (values2) => JSON.stringify(values2);
13210
+ var keyOf2 = (values2) => JSON.stringify(values2);
12718
13211
  var plain2 = (v) => v === void 0 || isError(v) ? null : v;
12719
13212
  function compareBy(keys, rows2) {
12720
13213
  return (a, b) => {
@@ -12754,12 +13247,12 @@ function groupby(args, ctx) {
12754
13247
  if (rows2.length === 0) fail(ERR.CALC);
12755
13248
  const groups = /* @__PURE__ */ new Map();
12756
13249
  for (const r of rows2) {
12757
- const key = keyOf(keysM.data[r]);
13250
+ const key = keyOf2(keysM.data[r]);
12758
13251
  const found = groups.get(key);
12759
13252
  if (found) found.push(r);
12760
13253
  else groups.set(key, [r]);
12761
13254
  }
12762
- const table2 = [...groups.values()].map((members) => {
13255
+ const table3 = [...groups.values()].map((members) => {
12763
13256
  const key = keysM.data[members[0]];
12764
13257
  const cells = Array.from(
12765
13258
  { length: vCols },
@@ -12771,8 +13264,8 @@ function groupby(args, ctx) {
12771
13264
  return [...key, ...cells];
12772
13265
  });
12773
13266
  for (const key of sort2) if (Math.abs(key) > kCols + vCols) fail(ERR.VALUE);
12774
- const order = table2.map((_, i2) => i2).sort(compareBy(sort2, table2));
12775
- const out = order.map((i2) => table2[i2]);
13267
+ const order = table3.map((_, i2) => i2).sort(compareBy(sort2, table3));
13268
+ const out = order.map((i2) => table3[i2]);
12776
13269
  if (depth !== 0) {
12777
13270
  const total2 = [
12778
13271
  "Total",
@@ -12821,8 +13314,8 @@ function pivotby(args, ctx) {
12821
13314
  const colKeys = /* @__PURE__ */ new Map();
12822
13315
  for (const r of used) {
12823
13316
  for (const [map, key] of [
12824
- [rowKeys, keyOf(rowsM.data[r])],
12825
- [colKeys, keyOf(colsM.data[r])]
13317
+ [rowKeys, keyOf2(rowsM.data[r])],
13318
+ [colKeys, keyOf2(colsM.data[r])]
12826
13319
  ]) {
12827
13320
  const found = map.get(key);
12828
13321
  if (found) found.push(r);
@@ -13555,8 +14048,8 @@ function resolveName(node2, frame) {
13555
14048
  const value2 = evaluateDefinedName(node2.name, sheet, node2.prefix !== void 0, frame);
13556
14049
  if (value2 !== void 0) return value2;
13557
14050
  if (!node2.prefix) {
13558
- const table2 = resolveStructured({ table: node2.name, specials: [] }, frame);
13559
- if (!(isError(table2) && table2.error === "#NAME?")) return table2;
14051
+ const table3 = resolveStructured({ table: node2.name, specials: [] }, frame);
14052
+ if (!(isError(table3) && table3.error === "#NAME?")) return table3;
13560
14053
  }
13561
14054
  return ERR.NAME;
13562
14055
  }
@@ -15414,8 +15907,8 @@ function deleteSheetInFormula(formula, sheetName, tableNames = []) {
15414
15907
  for (const token of tokens) {
15415
15908
  const prefix = token.prefix;
15416
15909
  const onSheet = prefix !== void 0 && prefix.book === void 0 && prefix.sheet2 === void 0 && same2(prefix.sheet, sheetName);
15417
- const table2 = typeof token.value === "string" && tables.has(token.value.toLowerCase()) && (token.kind === "structured" || token.kind === "name" && !prefix);
15418
- if ((token.kind === "ref" || token.kind === "name") && onSheet || table2) {
15910
+ const table3 = typeof token.value === "string" && tables.has(token.value.toLowerCase()) && (token.kind === "structured" || token.kind === "name" && !prefix);
15911
+ if ((token.kind === "ref" || token.kind === "name") && onSheet || table3) {
15419
15912
  token.text = "#REF!";
15420
15913
  changed = true;
15421
15914
  }
@@ -15478,11 +15971,11 @@ function renameTableColumnInFormula(formula, tableName, oldName, newName, inside
15478
15971
  // xlsx/formula/structured-to-a1.ts
15479
15972
  var abs = (row2, col, rowAbs = true) => `$${columnLabel(col)}${rowAbs ? "$" : ""}${row2 + 1}`;
15480
15973
  function a1For(ref, t) {
15481
- const { table: table2 } = t;
15482
- const { start, end } = table2.range;
15974
+ const { table: table3 } = t;
15975
+ const { start, end } = table3.range;
15483
15976
  const index2 = (name) => {
15484
15977
  if (name === void 0) return void 0;
15485
- const i2 = table2.columns.findIndex((c) => c.name.toLowerCase() === name.toLowerCase());
15978
+ const i2 = table3.columns.findIndex((c) => c.name.toLowerCase() === name.toLowerCase());
15486
15979
  return i2 < 0 ? -1 : start.col + i2;
15487
15980
  };
15488
15981
  const c1 = index2(ref.column);
@@ -15490,10 +15983,10 @@ function a1For(ref, t) {
15490
15983
  if (c1 === -1 || c2 === -1) return "#REF!";
15491
15984
  const colLo = c1 ?? start.col;
15492
15985
  const colHi = c2 ?? end.col;
15493
- const headerRow = table2.headerRow ? start.row : void 0;
15494
- const totalsRow = table2.totalsRow ? end.row : void 0;
15495
- const dataLo = start.row + (table2.headerRow ? 1 : 0);
15496
- const dataHi = end.row - (table2.totalsRow ? 1 : 0);
15986
+ const headerRow = table3.headerRow ? start.row : void 0;
15987
+ const totalsRow = table3.totalsRow ? end.row : void 0;
15988
+ const dataLo = start.row + (table3.headerRow ? 1 : 0);
15989
+ const dataHi = end.row - (table3.totalsRow ? 1 : 0);
15497
15990
  const specials = new Set(ref.specials);
15498
15991
  let rowLo;
15499
15992
  let rowHi;
@@ -15617,14 +16110,14 @@ function descendants(root, local, ns) {
15617
16110
  }
15618
16111
 
15619
16112
  // xlsx/slicer/table-filter.ts
15620
- function tableFilterBounds(table2) {
16113
+ function tableFilterBounds(table3) {
15621
16114
  return {
15622
- start: table2.range.start,
15623
- end: { ...table2.range.end, row: table2.range.end.row - (table2.totalsRow ? 1 : 0) }
16115
+ start: table3.range.start,
16116
+ end: { ...table3.range.end, row: table3.range.end.row - (table3.totalsRow ? 1 : 0) }
15624
16117
  };
15625
16118
  }
15626
- function tableAutoFilter(table2) {
15627
- const columns = table2.columns.flatMap(
16119
+ function tableAutoFilter(table3) {
16120
+ const columns = table3.columns.flatMap(
15628
16121
  (column2, offset2) => column2.filter ? [
15629
16122
  {
15630
16123
  offset: offset2,
@@ -15634,12 +16127,12 @@ function tableAutoFilter(table2) {
15634
16127
  ] : []
15635
16128
  );
15636
16129
  if (!columns.length) return void 0;
15637
- return { range: tableFilterBounds(table2), columns };
16130
+ return { range: tableFilterBounds(table3), columns };
15638
16131
  }
15639
- function applyTableFilter(workbook, sheet, table2) {
15640
- if (!table2.headerRow) return;
15641
- const bounds = tableFilterBounds(table2);
15642
- const filter2 = tableAutoFilter(table2);
16132
+ function applyTableFilter(workbook, sheet, table3) {
16133
+ if (!table3.headerRow) return;
16134
+ const bounds = tableFilterBounds(table3);
16135
+ const filter2 = tableAutoFilter(table3);
15643
16136
  for (let row2 = bounds.start.row + 1; row2 <= bounds.end.row; row2++) {
15644
16137
  const visible = !filter2 || rowMatchesFilter(workbook, sheet, row2, filter2);
15645
16138
  setRowFiltered(sheet, row2, !visible, !!filter2);
@@ -16754,9 +17247,9 @@ function slicerTarget(workbook, cache3) {
16754
17247
  const source = cache3.source;
16755
17248
  for (const [sheetIndex2, sheet] of workbook.sheets.entries()) {
16756
17249
  if (source.kind === "table") {
16757
- const table2 = sheet.tables.find((entry) => entry.id === source.tableId);
16758
- const offset2 = table2?.columns.findIndex((column2) => column2.sourceId === source.column) ?? -1;
16759
- if (table2 && offset2 >= 0) return { kind: "table", sheet, sheetIndex: sheetIndex2, table: table2, offset: offset2 };
17250
+ const table3 = sheet.tables.find((entry) => entry.id === source.tableId);
17251
+ const offset2 = table3?.columns.findIndex((column2) => column2.sourceId === source.column) ?? -1;
17252
+ if (table3 && offset2 >= 0) return { kind: "table", sheet, sheetIndex: sheetIndex2, table: table3, offset: offset2 };
16760
17253
  } else {
16761
17254
  const first2 = source.pivots[0];
16762
17255
  const pivot = first2 && sheet.sheetId === first2.tabId ? sheet.pivotTables?.find((entry) => entry.name === first2.name) : void 0;
@@ -16982,12 +17475,12 @@ function rewriteSheetFormulas(sheet, rewrite, formulaCells) {
16982
17475
  }
16983
17476
  {
16984
17477
  const name = sheet.name;
16985
- for (const table2 of sheet.tables)
16986
- for (const [index2, column2] of table2.columns.entries())
17478
+ for (const table3 of sheet.tables)
17479
+ for (const [index2, column2] of table3.columns.entries())
16987
17480
  if (column2.calculatedColumnFormula !== void 0)
16988
17481
  column2.calculatedColumnFormula = safe(rewrite, column2.calculatedColumnFormula, name, {
16989
- row: table2.range.start.row + (table2.headerRow ? 1 : 0),
16990
- col: table2.range.start.col + index2
17482
+ row: table3.range.start.row + (table3.headerRow ? 1 : 0),
17483
+ col: table3.range.start.col + index2
16991
17484
  });
16992
17485
  if (formulaCells) {
16993
17486
  for (const at of formulaCells) {
@@ -17052,14 +17545,14 @@ function tableHeaderAt(sheet, row2, col) {
17052
17545
  );
17053
17546
  }
17054
17547
  function syncTableHeader(ctx, sheet, row2, col, formulaCells) {
17055
- const table2 = tableHeaderAt(sheet, row2, col);
17056
- if (!table2) return;
17057
- const column2 = table2.columns[col - table2.range.start.col];
17548
+ const table3 = tableHeaderAt(sheet, row2, col);
17549
+ if (!table3) return;
17550
+ const column2 = table3.columns[col - table3.range.start.col];
17058
17551
  if (!column2) return;
17059
17552
  const text2 = displayText(ctx.workbook, getCell(sheet, row2, col)).trim();
17060
17553
  if (!text2 || column2.name === text2) return;
17061
17554
  const oldName = column2.name;
17062
- const others = table2.columns.filter((entry) => entry !== column2).map((entry) => entry.name);
17555
+ const others = table3.columns.filter((entry) => entry !== column2).map((entry) => entry.name);
17063
17556
  const newName = uniqueHeaders([...others, text2]).at(-1);
17064
17557
  column2.name = newName;
17065
17558
  if (newName !== text2) writeValue(sheet, row2, col, newName);
@@ -17069,10 +17562,10 @@ function syncTableHeader(ctx, sheet, row2, col, formulaCells) {
17069
17562
  ctx.workbook,
17070
17563
  (formula, formulaSheet, at) => renameTableColumnInFormula(
17071
17564
  formula,
17072
- table2.name,
17565
+ table3.name,
17073
17566
  oldName,
17074
17567
  newName,
17075
- formulaSheet === sheet.name && !!at && rangeContains(table2.range, at)
17568
+ formulaSheet === sheet.name && !!at && rangeContains(table3.range, at)
17076
17569
  ),
17077
17570
  cells
17078
17571
  );
@@ -18196,11 +18689,11 @@ function uniqueColumnName(columns) {
18196
18689
  const taken = new Set(columns.map((c) => c.name.toLowerCase()));
18197
18690
  for (let n = 1; ; n++) if (!taken.has(`column${n}`)) return `Column${n}`;
18198
18691
  }
18199
- function shiftTable(sheet, table2, shift2, moveRange) {
18200
- const old = table2.range;
18692
+ function shiftTable(sheet, table3, shift2, moveRange) {
18693
+ const old = table3.range;
18201
18694
  const range2 = moveRange(old);
18202
18695
  if (!range2) return [];
18203
- const next = { ...table2, range: range2, columns: [...table2.columns] };
18696
+ const next = { ...table3, range: range2, columns: [...table3.columns] };
18204
18697
  const widened = range2.end.col - range2.start.col !== old.end.col - old.start.col;
18205
18698
  if (shift2.axis === "col" && widened) {
18206
18699
  if (shift2.count > 0) {
@@ -18676,8 +19169,8 @@ function cellText(inner2) {
18676
19169
  ).replace(/ /g, " ").trim();
18677
19170
  }
18678
19171
  function parseHtmlTable(html, base) {
18679
- const table2 = /<table\b[^>]*>([\s\S]*?)<\/table>/i.exec(html)?.[1];
18680
- if (table2 === void 0) return void 0;
19172
+ const table3 = /<table\b[^>]*>([\s\S]*?)<\/table>/i.exec(html)?.[1];
19173
+ if (table3 === void 0) return void 0;
18681
19174
  const classes = /* @__PURE__ */ new Map();
18682
19175
  for (const block of html.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style>/gi))
18683
19176
  for (const rule of removeAll(block[1] ?? "", ["<!--", "-->"]).matchAll(
@@ -18690,7 +19183,7 @@ function parseHtmlTable(html, base) {
18690
19183
  const hyperlinks = [];
18691
19184
  let r = 0;
18692
19185
  let spanned = 0;
18693
- for (const tr of table2.matchAll(/<tr\b[^>]*>([\s\S]*?)(?=<tr\b|<\/tbody|<\/table|$)/gi)) {
19186
+ for (const tr of table3.matchAll(/<tr\b[^>]*>([\s\S]*?)(?=<tr\b|<\/tbody|<\/table|$)/gi)) {
18694
19187
  const row2 = grid6[r] ??= [];
18695
19188
  let c = 0;
18696
19189
  for (const td of (tr[1] ?? "").matchAll(
@@ -19542,9 +20035,9 @@ function filterColumn(ctx, s, col, values2) {
19542
20035
  }
19543
20036
  function sortByColumn(ctx, s, col, descending) {
19544
20037
  const sheet = sheetAt(ctx.workbook, s);
19545
- const table2 = sheet.tables.find((t) => col >= t.range.start.col && col <= t.range.end.col);
20038
+ const table3 = sheet.tables.find((t) => col >= t.range.start.col && col <= t.range.end.col);
19546
20039
  const filter2 = sheet.autoFilter;
19547
- const target2 = table2 ? { range: table2.range, header: table2.headerRow, totals: table2.totalsRow } : filter2 && rangeContains(filter2.range, { row: filter2.range.start.row, col }) ? { range: filter2.range, header: true, totals: false } : void 0;
20040
+ const target2 = table3 ? { range: table3.range, header: table3.headerRow, totals: table3.totalsRow } : filter2 && rangeContains(filter2.range, { row: filter2.range.start.row, col }) ? { range: filter2.range, header: true, totals: false } : void 0;
19548
20041
  if (!target2) throw new Error("The column is not inside a table or an auto-filter range.");
19549
20042
  const range2 = target2.totals ? { start: target2.range.start, end: { ...target2.range.end, row: target2.range.end.row - 1 } } : target2.range;
19550
20043
  ctx.run(
@@ -19604,12 +20097,12 @@ function restore(sheet, saved) {
19604
20097
  Object.assign(cell, saved.fields);
19605
20098
  }
19606
20099
  var valueAt = (sheet, row2, col) => getCell(sheet, row2, col)?.value ?? null;
19607
- function computeDataTable(workbook, calc, sheetIndex2, table2) {
20100
+ function computeDataTable(workbook, calc, sheetIndex2, table3) {
19608
20101
  const sheet = sheetAt(workbook, sheetIndex2);
19609
- const { ref } = table2;
19610
- const first2 = parseInputCell(sheet, table2.r1);
19611
- const second = table2.dt2D && table2.r2 ? parseInputCell(sheet, table2.r2) : void 0;
19612
- if (!first2 || table2.dt2D && !second || table2.del1 || table2.del2) return [];
20102
+ const { ref } = table3;
20103
+ const first2 = parseInputCell(sheet, table3.r1);
20104
+ const second = table3.dt2D && table3.r2 ? parseInputCell(sheet, table3.r2) : void 0;
20105
+ if (!first2 || table3.dt2D && !second || table3.del1 || table3.del2) return [];
19613
20106
  const inputs = [first2, ...second ? [second] : []];
19614
20107
  const saved = inputs.map((p) => save(sheet, p.row, p.col));
19615
20108
  const top = ref.start.row - 1;
@@ -19628,11 +20121,11 @@ function computeDataTable(workbook, calc, sheetIndex2, table2) {
19628
20121
  for (let row2 = ref.start.row; row2 <= ref.end.row; row2++) {
19629
20122
  for (let col = ref.start.col; col <= ref.end.col; col++) {
19630
20123
  let formulaAt;
19631
- if (table2.dt2D) {
20124
+ if (table3.dt2D) {
19632
20125
  set(first2, valueAt(sheet, top, col));
19633
20126
  if (second) set(second, valueAt(sheet, row2, left2));
19634
20127
  formulaAt = { row: top, col: left2 };
19635
- } else if (table2.dtr) {
20128
+ } else if (table3.dtr) {
19636
20129
  set(first2, valueAt(sheet, top, col));
19637
20130
  formulaAt = { row: row2, col: left2 };
19638
20131
  } else {
@@ -19657,8 +20150,8 @@ function computeDataTable(workbook, calc, sheetIndex2, table2) {
19657
20150
  function refreshDataTables(workbook, calc) {
19658
20151
  const changed = [];
19659
20152
  workbook.sheets.forEach((sheet, index2) => {
19660
- for (const table2 of sheet.dataTables ?? [])
19661
- changed.push(...computeDataTable(workbook, calc, index2, table2));
20153
+ for (const table3 of sheet.dataTables ?? [])
20154
+ changed.push(...computeDataTable(workbook, calc, index2, table3));
19662
20155
  });
19663
20156
  if (changed.length) calc.recalculateFrom(changed);
19664
20157
  }
@@ -19681,23 +20174,23 @@ function resolve2(sheet, request) {
19681
20174
  const ref = cellRange(range2.start.row + 1, range2.start.col + 1, range2.end.row, range2.end.col);
19682
20175
  if ([row2, col].some((p) => p && rangeContains(ref, p))) return { problem: "input-inside" };
19683
20176
  const name = (p) => formatAddress(p);
19684
- const table2 = { ref, r1: "" };
20177
+ const table3 = { ref, r1: "" };
19685
20178
  if (row2 && col) {
19686
- table2.dt2D = true;
19687
- table2.dtr = true;
19688
- table2.r1 = name(row2);
19689
- table2.r2 = name(col);
20179
+ table3.dt2D = true;
20180
+ table3.dtr = true;
20181
+ table3.r1 = name(row2);
20182
+ table3.r2 = name(col);
19690
20183
  } else if (row2) {
19691
- table2.dtr = true;
19692
- table2.r1 = name(row2);
19693
- } else if (col) table2.r1 = name(col);
19694
- return { table: table2 };
20184
+ table3.dtr = true;
20185
+ table3.r1 = name(row2);
20186
+ } else if (col) table3.r1 = name(col);
20187
+ return { table: table3 };
19695
20188
  }
19696
20189
  function createDataTable(ctx, s, request) {
19697
20190
  const sheet = sheetAt(ctx.workbook, s);
19698
20191
  const result2 = resolve2(sheet, request);
19699
20192
  if ("problem" in result2) throw new Error(MESSAGES[result2.problem]);
19700
- const { table: table2 } = result2;
20193
+ const { table: table3 } = result2;
19701
20194
  const range2 = normalizeRange(request.range);
19702
20195
  ctx.run(
19703
20196
  "Data Table",
@@ -19708,16 +20201,16 @@ function createDataTable(ctx, s, request) {
19708
20201
  ],
19709
20202
  () => {
19710
20203
  sheet.dataTables = (sheet.dataTables ?? []).filter((t) => !rangesIntersect(t.ref, range2));
19711
- sheet.dataTables.push(table2);
19712
- for (let row2 = table2.ref.start.row; row2 <= table2.ref.end.row; row2++)
19713
- for (let col = table2.ref.start.col; col <= table2.ref.end.col; col++) {
20204
+ sheet.dataTables.push(table3);
20205
+ for (let row2 = table3.ref.start.row; row2 <= table3.ref.end.row; row2++)
20206
+ for (let col = table3.ref.start.col; col <= table3.ref.end.col; col++) {
19714
20207
  const cell = ensureCell(sheet, row2, col);
19715
20208
  delete cell.formula;
19716
20209
  delete cell.arrayRange;
19717
20210
  delete cell.legacyFormula;
19718
20211
  delete cell.dynamicArray;
19719
20212
  }
19720
- computeDataTable(ctx.workbook, ctx.calc, s, table2);
20213
+ computeDataTable(ctx.workbook, ctx.calc, s, table3);
19721
20214
  },
19722
20215
  { sheet: s, ranges: [range2] }
19723
20216
  );
@@ -21034,7 +21527,7 @@ function plan(ctx, s, pivot, old) {
21034
21527
  if (![start.row, start.col].every(Number.isInteger) || start.row < 0 || start.col < 0 || location.end.row > MAX_ROW || location.end.col > MAX_COL)
21035
21528
  throw new Error("The PivotTable result does not fit on the worksheet.");
21036
21529
  const source = sparklineDataRange(ctx.workbook, s, pivot.source);
21037
- if (source.sheet === s && rangesIntersect(source.range, location) || sheet.merges.some((range2) => rangesIntersect(range2, location)) || sheet.tables.some((table2) => rangesIntersect(table2.range, location)) || sheet.pivotTables?.some((other) => other !== old && rangesIntersect(other.location, location)))
21530
+ if (source.sheet === s && rangesIntersect(source.range, location) || sheet.merges.some((range2) => rangesIntersect(range2, location)) || sheet.tables.some((table3) => rangesIntersect(table3.range, location)) || sheet.pivotTables?.some((other) => other !== old && rangesIntersect(other.location, location)))
21038
21531
  throw new Error("The PivotTable would overlap source data, another table or merged cells.");
21039
21532
  let occupied = false;
21040
21533
  forEachCellInRange(sheet, location, (cell, row2, col) => {
@@ -21044,12 +21537,12 @@ function plan(ctx, s, pivot, old) {
21044
21537
  if (occupied) throw new Error("The PivotTable would overwrite existing cell content.");
21045
21538
  return { grid: grid6, location };
21046
21539
  }
21047
- function writePivot(ctx, s, pivot, old, label4, inside) {
21540
+ function writePivot(ctx, s, pivot, old, label2, inside) {
21048
21541
  const sheet = sheetAt(ctx.workbook, s);
21049
21542
  const { grid: grid6, location } = plan(ctx, s, pivot, old);
21050
21543
  const ranges = [...old ? [old.location] : [], location];
21051
21544
  ctx.run(
21052
- label4 ?? (old ? "Refresh PivotTable" : "Create PivotTable"),
21545
+ label2 ?? (old ? "Refresh PivotTable" : "Create PivotTable"),
21053
21546
  "annotations",
21054
21547
  [
21055
21548
  { kind: "parts", sheet: s, parts: ["pivotTables"] },
@@ -21106,8 +21599,10 @@ function createPivotTable(ctx, s, destination, options6) {
21106
21599
  const name = options6.name ?? uniqueName(ctx);
21107
21600
  checkName2(ctx, name);
21108
21601
  const aggregate2 = options6.aggregate ?? "sum";
21602
+ const captions = authoredCaptions(options6);
21109
21603
  const pivot = {
21110
21604
  ...data,
21605
+ ...captions ? { captions } : {},
21111
21606
  name,
21112
21607
  rowField: options6.rowField,
21113
21608
  layout: options6.layout ?? "tabular",
@@ -21121,12 +21616,12 @@ function createPivotTable(ctx, s, destination, options6) {
21121
21616
  ...options6.repeatLabels !== void 0 ? { repeatLabels: options6.repeatLabels } : {},
21122
21617
  valueField: options6.valueField,
21123
21618
  aggregate: aggregate2,
21124
- valueCaption: pivotCaption(aggregate2, options6.valueField),
21619
+ valueCaption: pivotCaption(aggregate2, options6.valueField, { captions }),
21125
21620
  ...options6.pageFilter !== void 0 ? { pageFilter: structuredClone(options6.pageFilter) } : {},
21126
21621
  ...options6.fieldGroups?.length ? { fieldGroups: structuredClone(options6.fieldGroups) } : {},
21127
21622
  ...options6.valuesAxis !== void 0 ? { valuesAxis: options6.valuesAxis } : {},
21128
21623
  ...options6.valuesPosition !== void 0 ? { valuesPosition: options6.valuesPosition } : {},
21129
- ...options6.additionalValues ? { additionalValues: normalizedPivotMeasures(options6.additionalValues) } : {},
21624
+ ...options6.additionalValues ? { additionalValues: normalizedPivotMeasures(options6.additionalValues, { captions }) } : {},
21130
21625
  location: { start: { ...destination }, end: { ...destination } },
21131
21626
  ...options6.columnField ? { columnField: options6.columnField } : {},
21132
21627
  ...options6.columnField && options6.moreColumnFields?.length ? { moreColumnFields: [...options6.moreColumnFields] } : {}
@@ -21149,7 +21644,7 @@ function refreshPivotTable(ctx, s, name, patch2 = {}) {
21149
21644
  rowField: patch2.rowField ?? old.rowField,
21150
21645
  valueField,
21151
21646
  aggregate: aggregate2,
21152
- valueCaption: aggregate2 === old.aggregate && valueField === old.valueField ? old.valueCaption : pivotCaption(aggregate2, valueField)
21647
+ valueCaption: aggregate2 === old.aggregate && valueField === old.valueField ? old.valueCaption : pivotCaption(aggregate2, valueField, old)
21153
21648
  };
21154
21649
  if (patch2.columnField !== void 0) {
21155
21650
  if (patch2.columnField) next.columnField = patch2.columnField;
@@ -21199,7 +21694,7 @@ function refreshPivotTable(ctx, s, name, patch2 = {}) {
21199
21694
  else if (patch2.valuesAxis === "columns" || patch2.secondRowField === "")
21200
21695
  delete next.valuesPosition;
21201
21696
  if (patch2.additionalValues !== void 0) {
21202
- const measures = normalizedPivotMeasures(patch2.additionalValues);
21697
+ const measures = normalizedPivotMeasures(patch2.additionalValues, old);
21203
21698
  if (measures.length) next.additionalValues = measures;
21204
21699
  else delete next.additionalValues;
21205
21700
  }
@@ -21669,10 +22164,10 @@ function validatePatch(group, patch2) {
21669
22164
  delete next.manualMax;
21670
22165
  validateSettings(next);
21671
22166
  }
21672
- function save2(ctx, s, next, label4, ranges) {
22167
+ function save2(ctx, s, next, label2, ranges) {
21673
22168
  const sheet = sheetAt(ctx.workbook, s);
21674
22169
  ctx.run(
21675
- label4,
22170
+ label2,
21676
22171
  "annotations",
21677
22172
  [{ kind: "parts", sheet: s, parts: ["preserved"] }],
21678
22173
  () => sheet.preserved.set("extLst", next),
@@ -21790,20 +22285,20 @@ function setSlicerSelection(ctx, cacheName, keys) {
21790
22285
  const target2 = slicerTarget(ctx.workbook, cache3);
21791
22286
  if (!target2) throw new Error("The slicer has no data source.");
21792
22287
  if (target2.kind === "table") {
21793
- const { sheet, table: table2, offset: offset2 } = target2;
22288
+ const { sheet, table: table3, offset: offset2 } = target2;
21794
22289
  ctx.run(
21795
22290
  keys === null ? "Clear slicer filter" : "Filter slicer",
21796
22291
  "view",
21797
22292
  [{ kind: "sheet", sheet: target2.sheetIndex }],
21798
22293
  () => {
21799
- const column2 = table2.columns[offset2];
22294
+ const column2 = table3.columns[offset2];
21800
22295
  if (keys === null) delete column2.filter;
21801
22296
  else
21802
22297
  column2.filter = {
21803
22298
  values: keys.filter((key) => key !== ""),
21804
22299
  ...keys.includes("") ? { blank: true } : {}
21805
22300
  };
21806
- applyTableFilter(ctx.workbook, sheet, table2);
22301
+ applyTableFilter(ctx.workbook, sheet, table3);
21807
22302
  },
21808
22303
  { sheet: target2.sheetIndex, structural: true }
21809
22304
  );
@@ -21874,17 +22369,17 @@ function unique2(base, taken) {
21874
22369
  function insertSlicer(ctx, s, ref) {
21875
22370
  const { workbook } = ctx;
21876
22371
  const sheet = sheetAt(workbook, s);
21877
- let table2;
22372
+ let table3;
21878
22373
  let pivot;
21879
22374
  let field;
21880
22375
  if (ref.kind === "table") {
21881
- table2 = sheet.tables.find(
22376
+ table3 = sheet.tables.find(
21882
22377
  (entry) => entry.name === ref.table || entry.displayName === ref.table
21883
22378
  );
21884
- if (!table2?.headerRow || table2.filterNotModeled)
22379
+ if (!table3?.headerRow || table3.filterNotModeled)
21885
22380
  throw new Error("Choose a table with a header row and value filters.");
21886
22381
  field = ref.column;
21887
- if (!table2.columns.some((column2) => column2.name === field))
22382
+ if (!table3.columns.some((column2) => column2.name === field))
21888
22383
  throw new Error("Choose a column of the table.");
21889
22384
  } else {
21890
22385
  pivot = sheet.pivotTables?.find((entry) => entry.name === ref.pivot);
@@ -21904,7 +22399,7 @@ function insertSlicer(ctx, s, ref) {
21904
22399
  (c) => names.has(c.toLowerCase())
21905
22400
  ).replace(/ /g, "_");
21906
22401
  const metrics = createGridMetrics(sheet, { zoom: 100 });
21907
- const anchorCell = table2 ? { row: table2.range.start.row, col: table2.range.end.col + 2 } : { row: pivot.location.start.row, col: pivot.location.end.col + 2 };
22402
+ const anchorCell = table3 ? { row: table3.range.start.row, col: table3.range.end.col + 2 } : { row: pivot.location.start.row, col: pivot.location.end.col + 2 };
21908
22403
  const x = Math.max(metrics.colLeft(anchorCell.col), frameBounds(sheet) + 10);
21909
22404
  const box2 = { x, y: metrics.rowTop(anchorCell.row), ...SLICER_BOX };
21910
22405
  const anchor = pixelBoxToAnchor(sheet, box2, metrics, "twoCell");
@@ -21921,13 +22416,13 @@ function insertSlicer(ctx, s, ref) {
21921
22416
  () => {
21922
22417
  const book = cloneBook(workbook);
21923
22418
  let source;
21924
- if (table2) {
21925
- if (table2.columns.some((column2) => column2.sourceId === void 0))
21926
- table2.columns.forEach((column2, index2) => column2.sourceId ??= index2 + 1);
22419
+ if (table3) {
22420
+ if (table3.columns.some((column2) => column2.sourceId === void 0))
22421
+ table3.columns.forEach((column2, index2) => column2.sourceId ??= index2 + 1);
21927
22422
  source = {
21928
22423
  kind: "table",
21929
- tableId: table2.id,
21930
- column: table2.columns.find((column2) => column2.name === field).sourceId
22424
+ tableId: table3.id,
22425
+ column: table3.columns.find((column2) => column2.name === field).sourceId
21931
22426
  };
21932
22427
  } else {
21933
22428
  const target2 = pivot;
@@ -22191,9 +22686,9 @@ var SUBTOTAL = {
22191
22686
  var: 110
22192
22687
  };
22193
22688
  var escapeColumn = (name) => name.replace(/['#[\]]/g, "'$&");
22194
- function applyTotalsRow(sheet, table2) {
22195
- const row2 = table2.range.end.row;
22196
- const { columns } = table2;
22689
+ function applyTotalsRow(sheet, table3) {
22690
+ const row2 = table3.range.end.row;
22691
+ const { columns } = table3;
22197
22692
  if (!columns.some((c) => c.totalsRowFunction || c.totalsRowLabel)) {
22198
22693
  const first2 = columns[0];
22199
22694
  const last = columns[columns.length - 1];
@@ -22201,12 +22696,12 @@ function applyTotalsRow(sheet, table2) {
22201
22696
  if (last) last.totalsRowFunction = "sum";
22202
22697
  }
22203
22698
  columns.forEach((column2, i2) => {
22204
- const col = table2.range.start.col + i2;
22699
+ const col = table3.range.start.col + i2;
22205
22700
  const code = SUBTOTAL[column2.totalsRowFunction ?? ""];
22206
22701
  if (code !== void 0) {
22207
22702
  const cell = ensureCell(sheet, row2, col);
22208
22703
  clearContents(cell);
22209
- cell.formula = `SUBTOTAL(${code},${table2.name}[${escapeColumn(column2.name)}])`;
22704
+ cell.formula = `SUBTOTAL(${code},${table3.name}[${escapeColumn(column2.name)}])`;
22210
22705
  } else if (column2.totalsRowLabel && column2.totalsRowFunction !== "custom")
22211
22706
  writeValue(sheet, row2, col, column2.totalsRowLabel);
22212
22707
  });
@@ -22230,8 +22725,8 @@ function validateTableName(workbook, name, self) {
22230
22725
  ) || workbook.definedNames.some((n) => n.name.toLowerCase() === lower3);
22231
22726
  return taken ? "That name is already used by another table or name." : void 0;
22232
22727
  }
22233
- function renameTableIn(workbook, table2, name) {
22234
- const old = table2.name;
22728
+ function renameTableIn(workbook, table3, name) {
22729
+ const old = table3.name;
22235
22730
  if (old === name) return;
22236
22731
  const rename = (f6) => renameTableInFormula(f6, old, name);
22237
22732
  rewriteFormulas(workbook, rename);
@@ -22240,73 +22735,73 @@ function renameTableIn(workbook, table2, name) {
22240
22735
  for (const column2 of t.columns)
22241
22736
  if (column2.calculatedColumnFormula)
22242
22737
  column2.calculatedColumnFormula = rename(column2.calculatedColumnFormula);
22243
- table2.name = name;
22244
- table2.displayName = name;
22738
+ table3.name = name;
22739
+ table3.displayName = name;
22245
22740
  }
22246
22741
  var byId = (sheet, id) => {
22247
- const table2 = sheet.tables.find((t) => t.id === id);
22248
- if (!table2) throw new Error("The table disappeared during the edit.");
22249
- return table2;
22742
+ const table3 = sheet.tables.find((t) => t.id === id);
22743
+ if (!table3) throw new Error("The table disappeared during the edit.");
22744
+ return table3;
22250
22745
  };
22251
- function insertBandRow(workbook, sheet, table2, row2) {
22746
+ function insertBandRow(workbook, sheet, table3, row2) {
22252
22747
  const shift2 = { axis: "row", at: row2, count: 1 };
22253
- const band = { lo: table2.range.start.col, hi: table2.range.end.col };
22748
+ const band = { lo: table3.range.start.col, hi: table3.range.end.col };
22254
22749
  assertInsertFits(sheet, shift2, band);
22255
22750
  rewriteFormulas(workbook, (f6, fs) => shiftFormulaInBand(f6, fs, sheet.name, shift2, band));
22256
22751
  shiftSheetContent(sheet, shift2, band);
22257
22752
  }
22258
22753
  function setHeaderRow(workbook, sheet, id, on) {
22259
- let table2 = byId(sheet, id);
22260
- if (table2.headerRow === on) return;
22261
- const { start, end } = table2.range;
22754
+ let table3 = byId(sheet, id);
22755
+ if (table3.headerRow === on) return;
22756
+ const { start, end } = table3.range;
22262
22757
  if (!on) {
22263
22758
  if (start.row === end.row) throw new Error("A table needs at least one row.");
22264
22759
  clearRow(sheet, start.row, start.col, end.col);
22265
- table2.range = { start: { row: start.row + 1, col: start.col }, end };
22266
- table2.headerRow = false;
22760
+ table3.range = { start: { row: start.row + 1, col: start.col }, end };
22761
+ table3.headerRow = false;
22267
22762
  return;
22268
22763
  }
22269
22764
  if (start.row === 0 || !rowIsEmpty(sheet, start.row - 1, start.col, end.col)) {
22270
- insertBandRow(workbook, sheet, table2, start.row);
22271
- table2 = byId(sheet, id);
22272
- }
22273
- const top = table2.range.start.row - 1;
22274
- const left2 = table2.range.start.col;
22275
- table2.range = { start: { row: top, col: left2 }, end: table2.range.end };
22276
- table2.headerRow = true;
22277
- uniqueHeaders(table2.columns.map((c) => c.name)).forEach((name, i2) => {
22278
- const column2 = table2.columns[i2];
22765
+ insertBandRow(workbook, sheet, table3, start.row);
22766
+ table3 = byId(sheet, id);
22767
+ }
22768
+ const top = table3.range.start.row - 1;
22769
+ const left2 = table3.range.start.col;
22770
+ table3.range = { start: { row: top, col: left2 }, end: table3.range.end };
22771
+ table3.headerRow = true;
22772
+ uniqueHeaders(table3.columns.map((c) => c.name)).forEach((name, i2) => {
22773
+ const column2 = table3.columns[i2];
22279
22774
  if (column2) column2.name = name;
22280
22775
  writeValue(sheet, top, left2 + i2, name);
22281
22776
  });
22282
22777
  }
22283
22778
  function setTotalsRow(workbook, sheet, id, on) {
22284
- let table2 = byId(sheet, id);
22285
- if (table2.totalsRow === on) return;
22286
- const { start, end } = table2.range;
22779
+ let table3 = byId(sheet, id);
22780
+ if (table3.totalsRow === on) return;
22781
+ const { start, end } = table3.range;
22287
22782
  if (!on) {
22288
22783
  clearRow(sheet, end.row, start.col, end.col);
22289
- table2.range = { start, end: { row: end.row - 1, col: end.col } };
22290
- table2.totalsRow = false;
22784
+ table3.range = { start, end: { row: end.row - 1, col: end.col } };
22785
+ table3.totalsRow = false;
22291
22786
  return;
22292
22787
  }
22293
22788
  if (end.row === MAX_ROW) throw new RangeError("The insert area extends beyond the sheet.");
22294
22789
  if (!rowIsEmpty(sheet, end.row + 1, start.col, end.col)) {
22295
- insertBandRow(workbook, sheet, table2, end.row + 1);
22296
- table2 = byId(sheet, id);
22790
+ insertBandRow(workbook, sheet, table3, end.row + 1);
22791
+ table3 = byId(sheet, id);
22297
22792
  }
22298
- table2.range = { start: table2.range.start, end: { row: table2.range.end.row + 1, col: end.col } };
22299
- table2.totalsRow = true;
22300
- applyTotalsRow(sheet, table2);
22793
+ table3.range = { start: table3.range.start, end: { row: table3.range.end.row + 1, col: end.col } };
22794
+ table3.totalsRow = true;
22795
+ applyTotalsRow(sheet, table3);
22301
22796
  }
22302
- function resizedColumns(workbook, sheet, table2, range2) {
22797
+ function resizedColumns(workbook, sheet, table3, range2) {
22303
22798
  const width = range2.end.col - range2.start.col + 1;
22304
- const oldAt = (col) => col >= table2.range.start.col && col <= table2.range.end.col ? table2.columns[col - table2.range.start.col] : void 0;
22799
+ const oldAt = (col) => col >= table3.range.start.col && col <= table3.range.end.col ? table3.columns[col - table3.range.start.col] : void 0;
22305
22800
  const texts = Array.from({ length: width }, (_v, i2) => {
22306
22801
  const col = range2.start.col + i2;
22307
22802
  const old = oldAt(col);
22308
22803
  if (old) return old.name;
22309
- return table2.headerRow ? displayText(workbook, getCell(sheet, range2.start.row, col)) : "";
22804
+ return table3.headerRow ? displayText(workbook, getCell(sheet, range2.start.row, col)) : "";
22310
22805
  });
22311
22806
  return uniqueHeaders(texts).map((name, i2) => {
22312
22807
  const old = oldAt(range2.start.col + i2);
@@ -22314,30 +22809,30 @@ function resizedColumns(workbook, sheet, table2, range2) {
22314
22809
  });
22315
22810
  }
22316
22811
  function resizeTableIn(workbook, sheet, id, range2) {
22317
- const table2 = byId(sheet, id);
22812
+ const table3 = byId(sheet, id);
22318
22813
  const r = normalizeRange(range2);
22319
- if (table2.headerRow && r.start.row !== table2.range.start.row)
22814
+ if (table3.headerRow && r.start.row !== table3.range.start.row)
22320
22815
  throw new Error("The table headers must remain in the same row.");
22321
- if (!rangesIntersect(r, table2.range)) throw new Error("The new range must overlap the table.");
22322
- if (r.end.row - r.start.row + 1 < (table2.headerRow ? 2 : 1) + (table2.totalsRow ? 1 : 0))
22816
+ if (!rangesIntersect(r, table3.range)) throw new Error("The new range must overlap the table.");
22817
+ if (r.end.row - r.start.row + 1 < (table3.headerRow ? 2 : 1) + (table3.totalsRow ? 1 : 0))
22323
22818
  throw new Error("The table range is too small.");
22324
- if (sheet.tables.some((t) => t !== table2 && rangesIntersect(t.range, r)))
22819
+ if (sheet.tables.some((t) => t !== table3 && rangesIntersect(t.range, r)))
22325
22820
  throw new Error("A table cannot overlap another table.");
22326
22821
  if (sheet.pivotTables?.some((pivot) => rangesIntersect(pivot.location, r)))
22327
22822
  throw new Error("A table cannot overlap a PivotTable.");
22328
22823
  if (sheet.merges.some((m) => rangesIntersect(m, r)))
22329
22824
  throw new Error("A table cannot contain merged cells.");
22330
- const oldEnd = table2.range.end.row;
22331
- table2.columns = resizedColumns(workbook, sheet, table2, r);
22332
- table2.range = r;
22333
- if (table2.headerRow)
22334
- table2.columns.forEach((column2, i2) => {
22825
+ const oldEnd = table3.range.end.row;
22826
+ table3.columns = resizedColumns(workbook, sheet, table3, r);
22827
+ table3.range = r;
22828
+ if (table3.headerRow)
22829
+ table3.columns.forEach((column2, i2) => {
22335
22830
  const cell = getCell(sheet, r.start.row, r.start.col + i2);
22336
22831
  if (cell?.value !== column2.name) writeValue(sheet, r.start.row, r.start.col + i2, column2.name);
22337
22832
  });
22338
- if (table2.totalsRow) {
22833
+ if (table3.totalsRow) {
22339
22834
  if (oldEnd !== r.end.row) clearRow(sheet, oldEnd, r.start.col, r.end.col);
22340
- applyTotalsRow(sheet, table2);
22835
+ applyTotalsRow(sheet, table3);
22341
22836
  }
22342
22837
  }
22343
22838
  var STYLE_KEYS = [
@@ -22365,20 +22860,20 @@ function updateTable(ctx, s, ref, patch2) {
22365
22860
  "structure",
22366
22861
  [scope],
22367
22862
  () => {
22368
- const table2 = byId(sheet, id);
22369
- if (renaming) renameTableIn(workbook, table2, name);
22863
+ const table3 = byId(sheet, id);
22864
+ if (renaming) renameTableIn(workbook, table3, name);
22370
22865
  for (const key of STYLE_KEYS) {
22371
22866
  if (!(key in patch2)) continue;
22372
22867
  const value2 = patch2[key];
22373
- if (value2 === void 0) delete table2[key];
22374
- else table2[key] = value2;
22868
+ if (value2 === void 0) delete table3[key];
22869
+ else table3[key] = value2;
22375
22870
  }
22376
22871
  if (patch2.columns) {
22377
- const width = table2.range.end.col - table2.range.start.col + 1;
22872
+ const width = table3.range.end.col - table3.range.start.col + 1;
22378
22873
  if (patch2.columns.length !== width) throw new Error("Give one column per table column.");
22379
- const before = table2.columns;
22380
- table2.columns = structuredClone(patch2.columns);
22381
- for (const [index2, column2] of table2.columns.entries()) {
22874
+ const before = table3.columns;
22875
+ table3.columns = structuredClone(patch2.columns);
22876
+ for (const [index2, column2] of table3.columns.entries()) {
22382
22877
  const sourceId = before[index2]?.sourceId;
22383
22878
  if (column2.sourceId === void 0 && sourceId !== void 0) column2.sourceId = sourceId;
22384
22879
  const filter2 = before[index2]?.filter;
@@ -22387,7 +22882,7 @@ function updateTable(ctx, s, ref, patch2) {
22387
22882
  }
22388
22883
  if (patch2.headerRow !== void 0) setHeaderRow(workbook, sheet, id, patch2.headerRow);
22389
22884
  if (patch2.totalsRow !== void 0) setTotalsRow(workbook, sheet, id, patch2.totalsRow);
22390
- else if (patch2.columns && table2.totalsRow) applyTotalsRow(sheet, byId(sheet, id));
22885
+ else if (patch2.columns && table3.totalsRow) applyTotalsRow(sheet, byId(sheet, id));
22391
22886
  if (patch2.range) resizeTableIn(workbook, sheet, id, patch2.range);
22392
22887
  },
22393
22888
  { sheet: s, ranges: [current.range], structural: true }
@@ -22407,13 +22902,13 @@ function resizeTable(ctx, s, ref, range2) {
22407
22902
  function convertTableToRange(ctx, s, ref) {
22408
22903
  const { workbook } = ctx;
22409
22904
  const sheet = sheetAt(workbook, s);
22410
- const table2 = sheet.tables[tableIndex(sheet, ref)];
22905
+ const table3 = sheet.tables[tableIndex(sheet, ref)];
22411
22906
  ctx.run(
22412
22907
  "Convert to range",
22413
22908
  "structure",
22414
22909
  [{ kind: "workbook" }],
22415
22910
  () => {
22416
- const live = byId(sheet, table2.id);
22911
+ const live = byId(sheet, table3.id);
22417
22912
  const base = { table: live, tableSheet: sheet.name };
22418
22913
  const { start, end } = live.range;
22419
22914
  for (const ws of workbook.sheets)
@@ -22438,7 +22933,7 @@ function convertTableToRange(ctx, s, ref) {
22438
22933
  });
22439
22934
  sheet.tables = sheet.tables.filter((t) => t.id !== live.id);
22440
22935
  },
22441
- { sheet: s, ranges: [table2.range], structural: true }
22936
+ { sheet: s, ranges: [table3.range], structural: true }
22442
22937
  );
22443
22938
  }
22444
22939
 
@@ -25354,7 +25849,7 @@ function createTable(ctx, s, range2, hasHeader, styleName = "TableStyleMedium2")
25354
25849
  });
25355
25850
  const name = nextTableName(workbook);
25356
25851
  const id = Math.max(0, ...workbook.sheets.flatMap((ws) => ws.tables.map((t) => t.id))) + 1;
25357
- const table2 = {
25852
+ const table3 = {
25358
25853
  id,
25359
25854
  name,
25360
25855
  displayName: name,
@@ -25368,8 +25863,8 @@ function createTable(ctx, s, range2, hasHeader, styleName = "TableStyleMedium2")
25368
25863
  showFirstColumn: false,
25369
25864
  showLastColumn: false
25370
25865
  };
25371
- sheet.tables.push(table2);
25372
- return table2;
25866
+ sheet.tables.push(table3);
25867
+ return table3;
25373
25868
  },
25374
25869
  { sheet: s, ranges: [r], structural: !hasHeader }
25375
25870
  );
@@ -25573,8 +26068,8 @@ function createEditSession(workbook, options6 = {}) {
25573
26068
  if (!workbook.warnings.includes(message)) workbook.warnings.push(message);
25574
26069
  }
25575
26070
  };
25576
- const begin = (label4, kind, info) => {
25577
- const step = { label: label4, entries: [], structural: info.structural ?? false };
26071
+ const begin = (label2, kind, info) => {
26072
+ const step = { label: label2, entries: [], structural: info.structural ?? false };
25578
26073
  if (info.calc) step.calc = info.calc;
25579
26074
  return { step, kind, sheet: info.sheet, ranges: [...info.ranges ?? []] };
25580
26075
  };
@@ -25598,7 +26093,7 @@ function createEditSession(workbook, options6 = {}) {
25598
26093
  }
25599
26094
  current.step.entries.length = from;
25600
26095
  };
25601
- const run = (label4, kind, scopes, fn, info = {}) => {
26096
+ const run = (label2, kind, scopes, fn, info = {}) => {
25602
26097
  if (kind === "cells") {
25603
26098
  for (const scope of scopes)
25604
26099
  if (scope.kind === "cells" && workbook.sheets[scope.sheet]?.pivotTables?.some(
@@ -25615,7 +26110,7 @@ function createEditSession(workbook, options6 = {}) {
25615
26110
  }))
25616
26111
  throw new Error(DATA_TABLE_PART_ERROR);
25617
26112
  const outer = !open;
25618
- const current = open ?? begin(label4, kind, info);
26113
+ const current = open ?? begin(label2, kind, info);
25619
26114
  if (!outer) {
25620
26115
  delete current.step.calc;
25621
26116
  if (info.structural) current.step.structural = true;
@@ -25746,9 +26241,9 @@ function createEditSession(workbook, options6 = {}) {
25746
26241
  removeConditionalFormat: (s, index2) => removeConditionalFormat(ctx, s, index2),
25747
26242
  setConditionalRulePriority: (s, f6, r, priority) => setConditionalRulePriority(ctx, s, f6, r, priority),
25748
26243
  moveConditionalRule: (s, f6, r, direction) => moveConditionalRule(ctx, s, f6, r, direction),
25749
- updateTable: (s, table2, patch2) => updateTable(ctx, s, table2, patch2),
25750
- resizeTable: (s, table2, range2) => resizeTable(ctx, s, table2, range2),
25751
- convertTableToRange: (s, table2) => convertTableToRange(ctx, s, table2),
26244
+ updateTable: (s, table3, patch2) => updateTable(ctx, s, table3, patch2),
26245
+ resizeTable: (s, table3, range2) => resizeTable(ctx, s, table3, range2),
26246
+ convertTableToRange: (s, table3) => convertTableToRange(ctx, s, table3),
25752
26247
  applyCellStyle: (s, ranges, name) => applyCellStyle(ctx, s, ranges, name),
25753
26248
  setPageSetup: (s, patch2) => setPageSetup(ctx, s, patch2),
25754
26249
  setPageBreak: (s, axis, before, present) => setPageBreak(ctx, s, axis, before, present),
@@ -25785,12 +26280,12 @@ function createEditSession(workbook, options6 = {}) {
25785
26280
  validate: (s, r, c, value2) => validateCellInput(workbook, s, r, c, value2, {
25786
26281
  evaluate: (formula, at) => calc.evaluate(formula, at)
25787
26282
  }),
25788
- batch(label4, fn) {
26283
+ batch(label2, fn) {
25789
26284
  if (open) {
25790
26285
  fn();
25791
26286
  return;
25792
26287
  }
25793
- const current = begin(label4, "batch", {});
26288
+ const current = begin(label2, "batch", {});
25794
26289
  open = current;
25795
26290
  try {
25796
26291
  fn();
@@ -26761,9 +27256,9 @@ function pickColor(arg) {
26761
27256
  if (arg && typeof arg === "object" && !arg.auto) return arg;
26762
27257
  return null;
26763
27258
  }
26764
- var toggle = (id, label4, glyph, shortcut, read, patch2) => editing({
27259
+ var toggle = (id, label2, glyph, shortcut, read, patch2) => editing({
26765
27260
  id,
26766
- label: label4,
27261
+ label: label2,
26767
27262
  icon: icon(glyph),
26768
27263
  shortcut,
26769
27264
  lock: "formatCells",
@@ -26948,10 +27443,10 @@ var mergedAtActive = (ctx) => {
26948
27443
  const t = target(ctx);
26949
27444
  return !!t && t.ws.merges.some((m) => rangesIntersect(m, t.range));
26950
27445
  };
26951
- function mergeCommand(id, label4, mode) {
27446
+ function mergeCommand(id, label2, mode) {
26952
27447
  return editing({
26953
27448
  id,
26954
- label: label4,
27449
+ label: label2,
26955
27450
  icon: icon("mergeCenter"),
26956
27451
  lock: "formatCells",
26957
27452
  ...mode === "center" ? { checked: mergedAtActive } : {},
@@ -26966,30 +27461,30 @@ function mergeCommand(id, label4, mode) {
26966
27461
  }
26967
27462
  if (t.ranges.some((range2) => mergeWouldDiscard(t.ws, range2, mode))) {
26968
27463
  const ok = await ctx.dialogs.open("confirm", {
26969
- heading: label4,
27464
+ heading: label2,
26970
27465
  message: "Merging cells only keeps the upper-left value and discards other values."
26971
27466
  });
26972
27467
  if (ok !== true) return;
26973
27468
  if (ctx.session() !== t.session || ctx.readOnly()) return;
26974
27469
  }
26975
- t.session.batch(label4, () => {
27470
+ t.session.batch(label2, () => {
26976
27471
  for (const range2 of t.ranges) t.session.merge(t.sheet, range2, mode);
26977
27472
  });
26978
27473
  }
26979
27474
  });
26980
27475
  }
26981
27476
  function alignmentCommands() {
26982
- const valign = (id, label4, value2, glyph) => editing({
27477
+ const valign = (id, label2, value2, glyph) => editing({
26983
27478
  id,
26984
- label: label4,
27479
+ label: label2,
26985
27480
  icon: icon(glyph),
26986
27481
  lock: "formatCells",
26987
27482
  checked: (ctx) => vertical(ctx) === value2,
26988
27483
  run: (ctx) => style(ctx, { alignment: { vertical: value2 === "bottom" ? UNSET : value2 } })
26989
27484
  });
26990
- const halign = (id, label4, value2, glyph) => editing({
27485
+ const halign = (id, label2, value2, glyph) => editing({
26991
27486
  id,
26992
- label: label4,
27487
+ label: label2,
26993
27488
  icon: icon(glyph),
26994
27489
  lock: "formatCells",
26995
27490
  checked: (ctx) => horizontal(ctx) === value2,
@@ -27071,322 +27566,6 @@ function alignmentCommands() {
27071
27566
  ];
27072
27567
  }
27073
27568
 
27074
- // i18n/locale.ts
27075
- var DEFAULT_REJECTED_SUBTAGS = ["hant", "tw", "hk", "mo"];
27076
- function normalizeLocale(input, supported, fallback, options6 = {}) {
27077
- const parts = (input ?? "").trim().toLowerCase().split(/[-_]/).filter(Boolean);
27078
- const language = parts[0];
27079
- if (!language) return fallback;
27080
- const find3 = (tag) => supported.find((item) => item.toLowerCase() === tag);
27081
- const exact = find3(parts.join("-"));
27082
- if (exact) return exact;
27083
- const base = find3(language);
27084
- if (base) return base;
27085
- const rejected = options6.rejectedSubtags ?? DEFAULT_REJECTED_SUBTAGS;
27086
- if (parts.slice(1).some((part) => rejected.includes(part))) return fallback;
27087
- return supported.find((item) => item.toLowerCase().split("-")[0] === language && item.includes("-")) ?? fallback;
27088
- }
27089
-
27090
- // i18n/dictionary.ts
27091
- function mergeMessageModules(modules) {
27092
- const merged = {};
27093
- for (const path of Object.keys(modules).sort()) {
27094
- const module = modules[path];
27095
- if (!module) continue;
27096
- for (const value2 of Object.values(module)) {
27097
- if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) continue;
27098
- const entries = Object.entries(value2);
27099
- if (!entries.every(([, text2]) => typeof text2 === "string")) continue;
27100
- for (const [key, text2] of entries) merged[key] = text2;
27101
- }
27102
- }
27103
- return merged;
27104
- }
27105
-
27106
- // i18n/translator.ts
27107
- var SINGLE2 = /\{(\w+)\}/g;
27108
- var DOUBLE = /\{\{\s*(\w+)\s*\}\}/g;
27109
- function interpolate(template, params, placeholder = "single") {
27110
- if (!params) return template;
27111
- const pattern = placeholder === "double" ? DOUBLE : SINGLE2;
27112
- return template.replace(
27113
- pattern,
27114
- (match2, name) => Object.prototype.hasOwnProperty.call(params, name) && params[name] !== void 0 ? String(params[name]) : match2
27115
- );
27116
- }
27117
- function createTranslator(messages, fallbacks = [], options6 = {}) {
27118
- const placeholder = options6.placeholder ?? "single";
27119
- return (key, params) => {
27120
- let text2 = messages?.[key];
27121
- for (let i2 = 0; text2 === void 0 && i2 < fallbacks.length; i2++) text2 = fallbacks[i2]?.[key];
27122
- return interpolate(text2 ?? options6.missing?.(key) ?? key, params, placeholder);
27123
- };
27124
- }
27125
-
27126
- // i18n/option-strings.ts
27127
- var enOptionStrings = {
27128
- General: "General",
27129
- Display: "Display",
27130
- Formulas: "Formulas",
27131
- Data: "Data",
27132
- Proofing: "Proofing",
27133
- Save: "Save",
27134
- Language: "Language",
27135
- Accessibility: "Accessibility",
27136
- Advanced: "Advanced",
27137
- "Customize Ribbon": "Customize Ribbon",
27138
- "Quick Access Toolbar": "Quick Access Toolbar",
27139
- "Add-ins": "Add-ins",
27140
- "Trust Center": "Trust Center",
27141
- OK: "OK",
27142
- Cancel: "Cancel",
27143
- Close: "Close",
27144
- Categories: "Categories",
27145
- "Reset all options": "Reset all options",
27146
- "General options for working with {product}.": "General options for working with {product}.",
27147
- "Change how {product} corrects and formats your text.": "Change how {product} corrects and formats your text.",
27148
- "Customize how documents are saved.": "Customize how documents are saved.",
27149
- "Set the Office Language Preferences.": "Set the Office Language Preferences.",
27150
- "Make {product} easier to work with.": "Make {product} easier to work with.",
27151
- "Advanced options for working with {product}.": "Advanced options for working with {product}.",
27152
- "Customize the Ribbon and keyboard shortcuts.": "Customize the Ribbon and keyboard shortcuts.",
27153
- "Customize the Quick Access Toolbar.": "Customize the Quick Access Toolbar.",
27154
- "View and manage Microsoft Office Add-ins.": "View and manage Microsoft Office Add-ins.",
27155
- "Help keep your documents safe and your computer secure and healthy.": "Help keep your documents safe and your computer secure and healthy.",
27156
- "User Interface options": "User Interface options",
27157
- "Show Mini Toolbar on selection": "Show Mini Toolbar on selection",
27158
- "Enable Live Preview": "Enable Live Preview",
27159
- "ScreenTip style": "ScreenTip style",
27160
- "Show feature descriptions in ScreenTips": "Show feature descriptions in ScreenTips",
27161
- "Personalize your copy of Microsoft Office": "Personalize your copy of Microsoft Office",
27162
- "User name": "User name",
27163
- "Office Theme": "Office Theme",
27164
- "Office display language": "Office display language",
27165
- "Choose the language for menus, buttons and messages.": "Choose the language for menus, buttons and messages.",
27166
- "Not available yet. Needs rich text formatting.": "Not available yet. Needs rich text formatting.",
27167
- "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "Not available yet. Styles are applied on click; hover previews are not drawn yet.",
27168
- "Not available yet. ScreenTips always describe the command.": "Not available yet. ScreenTips always describe the command.",
27169
- "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "Not available yet. Documents are saved to this device; AutoRecover is not kept.",
27170
- "Not available yet. There are no accessibility settings to change.": "Not available yet. There are no accessibility settings to change.",
27171
- "Not available yet. The editing behaviour is fixed.": "Not available yet. The editing behaviour is fixed.",
27172
- "Not available yet. The Quick Access Toolbar is fixed.": "Not available yet. The Quick Access Toolbar is fixed.",
27173
- "Not available yet. The ribbon layout is fixed.": "Not available yet. The ribbon layout is fixed.",
27174
- "Not available yet. The display language is fixed.": "Not available yet. The display language is fixed.",
27175
- "Not available. Add-ins and macros are never run.": "Not available. Add-ins and macros are never run.",
27176
- "Not available. Documents stay local and active content is never run.": "Not available. Documents stay local and active content is never run."
27177
- };
27178
- var frOptionStrings = {
27179
- General: "G\xE9n\xE9ral",
27180
- Display: "Affichage",
27181
- Formulas: "Formules",
27182
- Data: "Donn\xE9es",
27183
- Proofing: "V\xE9rification",
27184
- Save: "Enregistrer",
27185
- Language: "Langue",
27186
- Accessibility: "Accessibilit\xE9",
27187
- Advanced: "Options avanc\xE9es",
27188
- "Customize Ribbon": "Personnaliser le ruban",
27189
- "Quick Access Toolbar": "Barre d\u2019outils Acc\xE8s rapide",
27190
- "Add-ins": "Compl\xE9ments",
27191
- "Trust Center": "Centre de gestion de la confidentialit\xE9",
27192
- OK: "OK",
27193
- Cancel: "Annuler",
27194
- Close: "Fermer",
27195
- Categories: "Cat\xE9gories",
27196
- "Reset all options": "R\xE9initialiser toutes les options",
27197
- "General options for working with {product}.": "Options g\xE9n\xE9rales pour l\u2019utilisation de {product}.",
27198
- "Change how {product} corrects and formats your text.": "Modifiez la fa\xE7on dont {product} corrige et met en forme votre texte.",
27199
- "Customize how documents are saved.": "Personnalisez l\u2019enregistrement des documents.",
27200
- "Set the Office Language Preferences.": "D\xE9finissez les pr\xE9f\xE9rences de langue d\u2019Office.",
27201
- "Make {product} easier to work with.": "Facilitez l\u2019utilisation de {product}.",
27202
- "Advanced options for working with {product}.": "Options avanc\xE9es pour l\u2019utilisation de {product}.",
27203
- "Customize the Ribbon and keyboard shortcuts.": "Personnalisez le ruban et les raccourcis clavier.",
27204
- "Customize the Quick Access Toolbar.": "Personnalisez la barre d\u2019outils Acc\xE8s rapide.",
27205
- "View and manage Microsoft Office Add-ins.": "Affichez et g\xE9rez les compl\xE9ments Microsoft Office.",
27206
- "Help keep your documents safe and your computer secure and healthy.": "Prot\xE9gez vos documents et assurez la s\xE9curit\xE9 et le bon \xE9tat de votre ordinateur.",
27207
- "User Interface options": "Options de l\u2019interface utilisateur",
27208
- "Show Mini Toolbar on selection": "Afficher la mini barre d\u2019outils lors de la s\xE9lection",
27209
- "Enable Live Preview": "Activer l\u2019aper\xE7u dynamique",
27210
- "ScreenTip style": "Style des info-bulles",
27211
- "Show feature descriptions in ScreenTips": "Afficher les descriptions des fonctionnalit\xE9s dans les info-bulles",
27212
- "Personalize your copy of Microsoft Office": "Personnalisez votre copie de Microsoft Office",
27213
- "User name": "Nom d\u2019utilisateur",
27214
- "Office Theme": "Th\xE8me Office",
27215
- "Office display language": "Langue d\u2019affichage d\u2019Office",
27216
- "Choose the language for menus, buttons and messages.": "Choisissez la langue des menus, des boutons et des messages.",
27217
- "Not available yet. Needs rich text formatting.": "Pas encore disponible. N\xE9cessite la mise en forme de texte enrichi.",
27218
- "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "Pas encore disponible. Les styles s\u2019appliquent au clic ; les aper\xE7us au survol ne sont pas encore dessin\xE9s.",
27219
- "Not available yet. ScreenTips always describe the command.": "Pas encore disponible. Les info-bulles d\xE9crivent toujours la commande.",
27220
- "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "Pas encore disponible. Les documents sont enregistr\xE9s sur cet appareil ; la r\xE9cup\xE9ration automatique n\u2019est pas conserv\xE9e.",
27221
- "Not available yet. There are no accessibility settings to change.": "Pas encore disponible. Aucun param\xE8tre d\u2019accessibilit\xE9 n\u2019est modifiable.",
27222
- "Not available yet. The editing behaviour is fixed.": "Pas encore disponible. Le comportement de modification est fixe.",
27223
- "Not available yet. The Quick Access Toolbar is fixed.": "Pas encore disponible. La barre d\u2019outils Acc\xE8s rapide est fixe.",
27224
- "Not available yet. The ribbon layout is fixed.": "Pas encore disponible. La disposition du ruban est fixe.",
27225
- "Not available yet. The display language is fixed.": "Pas encore disponible. La langue d\u2019affichage est fixe.",
27226
- "Not available. Add-ins and macros are never run.": "Non disponible. Les compl\xE9ments et les macros ne sont jamais ex\xE9cut\xE9s.",
27227
- "Not available. Documents stay local and active content is never run.": "Non disponible. Les documents restent locaux et le contenu actif n\u2019est jamais ex\xE9cut\xE9."
27228
- };
27229
- var deOptionStrings = {
27230
- General: "Allgemein",
27231
- Display: "Anzeige",
27232
- Formulas: "Formeln",
27233
- Data: "Daten",
27234
- Proofing: "Dokumentpr\xFCfung",
27235
- Save: "Speichern",
27236
- Language: "Sprache",
27237
- Accessibility: "Barrierefreiheit",
27238
- Advanced: "Erweitert",
27239
- "Customize Ribbon": "Men\xFCband anpassen",
27240
- "Quick Access Toolbar": "Symbolleiste f\xFCr den Schnellzugriff",
27241
- "Add-ins": "Add-Ins",
27242
- "Trust Center": "Trust Center",
27243
- OK: "OK",
27244
- Cancel: "Abbrechen",
27245
- Close: "Schlie\xDFen",
27246
- Categories: "Kategorien",
27247
- "Reset all options": "Alle Optionen zur\xFCcksetzen",
27248
- "General options for working with {product}.": "Allgemeine Optionen f\xFCr die Arbeit mit {product}.",
27249
- "Change how {product} corrects and formats your text.": "\xC4ndern Sie, wie {product} Ihren Text korrigiert und formatiert.",
27250
- "Customize how documents are saved.": "Passen Sie an, wie Dokumente gespeichert werden.",
27251
- "Set the Office Language Preferences.": "Legen Sie die Office-Spracheinstellungen fest.",
27252
- "Make {product} easier to work with.": "Machen Sie {product} einfacher bedienbar.",
27253
- "Advanced options for working with {product}.": "Erweiterte Optionen f\xFCr die Arbeit mit {product}.",
27254
- "Customize the Ribbon and keyboard shortcuts.": "Passen Sie das Men\xFCband und die Tastenkombinationen an.",
27255
- "Customize the Quick Access Toolbar.": "Passen Sie die Symbolleiste f\xFCr den Schnellzugriff an.",
27256
- "View and manage Microsoft Office Add-ins.": "Microsoft Office-Add-Ins anzeigen und verwalten.",
27257
- "Help keep your documents safe and your computer secure and healthy.": "Sch\xFCtzen Sie Ihre Dokumente und halten Sie Ihren Computer sicher und fehlerfrei.",
27258
- "User Interface options": "Benutzeroberfl\xE4chenoptionen",
27259
- "Show Mini Toolbar on selection": "Minisymbolleiste bei Auswahl anzeigen",
27260
- "Enable Live Preview": "Livevorschau aktivieren",
27261
- "ScreenTip style": "QuickInfo-Format",
27262
- "Show feature descriptions in ScreenTips": "Funktionsbeschreibungen in QuickInfos anzeigen",
27263
- "Personalize your copy of Microsoft Office": "Microsoft Office personalisieren",
27264
- "User name": "Benutzername",
27265
- "Office Theme": "Office-Design",
27266
- "Office display language": "Office-Anzeigesprache",
27267
- "Choose the language for menus, buttons and messages.": "W\xE4hlen Sie die Sprache f\xFCr Men\xFCs, Schaltfl\xE4chen und Meldungen.",
27268
- "Not available yet. Needs rich text formatting.": "Noch nicht verf\xFCgbar. Erfordert Formatierung von Rich-Text.",
27269
- "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "Noch nicht verf\xFCgbar. Formatvorlagen werden per Klick angewendet; Vorschauen beim Dar\xFCberfahren werden noch nicht gezeichnet.",
27270
- "Not available yet. ScreenTips always describe the command.": "Noch nicht verf\xFCgbar. QuickInfos beschreiben immer den Befehl.",
27271
- "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "Noch nicht verf\xFCgbar. Dokumente werden auf diesem Ger\xE4t gespeichert; AutoWiederherstellen wird nicht gef\xFChrt.",
27272
- "Not available yet. There are no accessibility settings to change.": "Noch nicht verf\xFCgbar. Es gibt keine Einstellungen zur Barrierefreiheit zu \xE4ndern.",
27273
- "Not available yet. The editing behaviour is fixed.": "Noch nicht verf\xFCgbar. Das Bearbeitungsverhalten ist festgelegt.",
27274
- "Not available yet. The Quick Access Toolbar is fixed.": "Noch nicht verf\xFCgbar. Die Symbolleiste f\xFCr den Schnellzugriff ist festgelegt.",
27275
- "Not available yet. The ribbon layout is fixed.": "Noch nicht verf\xFCgbar. Das Men\xFCband-Layout ist festgelegt.",
27276
- "Not available yet. The display language is fixed.": "Noch nicht verf\xFCgbar. Die Anzeigesprache ist festgelegt.",
27277
- "Not available. Add-ins and macros are never run.": "Nicht verf\xFCgbar. Add-Ins und Makros werden nie ausgef\xFChrt.",
27278
- "Not available. Documents stay local and active content is never run.": "Nicht verf\xFCgbar. Dokumente bleiben lokal und aktive Inhalte werden nie ausgef\xFChrt."
27279
- };
27280
- var esOptionStrings = {
27281
- General: "General",
27282
- Display: "Mostrar",
27283
- Formulas: "F\xF3rmulas",
27284
- Data: "Datos",
27285
- Proofing: "Revisi\xF3n",
27286
- Save: "Guardar",
27287
- Language: "Idioma",
27288
- Accessibility: "Accesibilidad",
27289
- Advanced: "Avanzadas",
27290
- "Customize Ribbon": "Personalizar cinta de opciones",
27291
- "Quick Access Toolbar": "Barra de herramientas de acceso r\xE1pido",
27292
- "Add-ins": "Complementos",
27293
- "Trust Center": "Centro de confianza",
27294
- OK: "Aceptar",
27295
- Cancel: "Cancelar",
27296
- Close: "Cerrar",
27297
- Categories: "Categor\xEDas",
27298
- "Reset all options": "Restablecer todas las opciones",
27299
- "General options for working with {product}.": "Opciones generales para trabajar con {product}.",
27300
- "Change how {product} corrects and formats your text.": "Cambie la forma en que {product} corrige y da formato al texto.",
27301
- "Customize how documents are saved.": "Personalice c\xF3mo se guardan los documentos.",
27302
- "Set the Office Language Preferences.": "Establezca las preferencias de idioma de Office.",
27303
- "Make {product} easier to work with.": "Haga que {product} sea m\xE1s f\xE1cil de usar.",
27304
- "Advanced options for working with {product}.": "Opciones avanzadas para trabajar con {product}.",
27305
- "Customize the Ribbon and keyboard shortcuts.": "Personalice la cinta de opciones y los m\xE9todos abreviados de teclado.",
27306
- "Customize the Quick Access Toolbar.": "Personalice la barra de herramientas de acceso r\xE1pido.",
27307
- "View and manage Microsoft Office Add-ins.": "Vea y administre los complementos de Microsoft Office.",
27308
- "Help keep your documents safe and your computer secure and healthy.": "Ayude a mantener seguros sus documentos y a proteger y mantener en buen estado su equipo.",
27309
- "User Interface options": "Opciones de la interfaz de usuario",
27310
- "Show Mini Toolbar on selection": "Mostrar minibarra de herramientas al seleccionar",
27311
- "Enable Live Preview": "Habilitar vistas previas din\xE1micas",
27312
- "ScreenTip style": "Estilo de la informaci\xF3n en pantalla",
27313
- "Show feature descriptions in ScreenTips": "Mostrar descripciones de caracter\xEDsticas en la informaci\xF3n en pantalla",
27314
- "Personalize your copy of Microsoft Office": "Personalice su copia de Microsoft Office",
27315
- "User name": "Nombre de usuario",
27316
- "Office Theme": "Tema de Office",
27317
- "Office display language": "Idioma de presentaci\xF3n de Office",
27318
- "Choose the language for menus, buttons and messages.": "Elija el idioma de los men\xFAs, los botones y los mensajes.",
27319
- "Not available yet. Needs rich text formatting.": "A\xFAn no disponible. Requiere formato de texto enriquecido.",
27320
- "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "A\xFAn no disponible. Los estilos se aplican al hacer clic; las vistas previas al pasar el cursor todav\xEDa no se dibujan.",
27321
- "Not available yet. ScreenTips always describe the command.": "A\xFAn no disponible. La informaci\xF3n en pantalla siempre describe el comando.",
27322
- "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "A\xFAn no disponible. Los documentos se guardan en este dispositivo; no se conserva la recuperaci\xF3n autom\xE1tica.",
27323
- "Not available yet. There are no accessibility settings to change.": "A\xFAn no disponible. No hay opciones de accesibilidad que cambiar.",
27324
- "Not available yet. The editing behaviour is fixed.": "A\xFAn no disponible. El comportamiento de edici\xF3n es fijo.",
27325
- "Not available yet. The Quick Access Toolbar is fixed.": "A\xFAn no disponible. La barra de herramientas de acceso r\xE1pido es fija.",
27326
- "Not available yet. The ribbon layout is fixed.": "A\xFAn no disponible. El dise\xF1o de la cinta de opciones es fijo.",
27327
- "Not available yet. The display language is fixed.": "A\xFAn no disponible. El idioma de presentaci\xF3n es fijo.",
27328
- "Not available. Add-ins and macros are never run.": "No disponible. Los complementos y las macros nunca se ejecutan.",
27329
- "Not available. Documents stay local and active content is never run.": "No disponible. Los documentos permanecen locales y el contenido activo nunca se ejecuta."
27330
- };
27331
- var zhOptionStrings = {
27332
- General: "\u5E38\u89C4",
27333
- Display: "\u663E\u793A",
27334
- Formulas: "\u516C\u5F0F",
27335
- Data: "\u6570\u636E",
27336
- Proofing: "\u6821\u5BF9",
27337
- Save: "\u4FDD\u5B58",
27338
- Language: "\u8BED\u8A00",
27339
- Accessibility: "\u8F85\u52A9\u529F\u80FD",
27340
- Advanced: "\u9AD8\u7EA7",
27341
- "Customize Ribbon": "\u81EA\u5B9A\u4E49\u529F\u80FD\u533A",
27342
- "Quick Access Toolbar": "\u5FEB\u901F\u8BBF\u95EE\u5DE5\u5177\u680F",
27343
- "Add-ins": "\u52A0\u8F7D\u9879",
27344
- "Trust Center": "\u4FE1\u4EFB\u4E2D\u5FC3",
27345
- OK: "\u786E\u5B9A",
27346
- Cancel: "\u53D6\u6D88",
27347
- Close: "\u5173\u95ED",
27348
- Categories: "\u7C7B\u522B",
27349
- "Reset all options": "\u91CD\u7F6E\u6240\u6709\u9009\u9879",
27350
- "General options for working with {product}.": "\u4F7F\u7528 {product} \u7684\u5E38\u89C4\u9009\u9879\u3002",
27351
- "Change how {product} corrects and formats your text.": "\u66F4\u6539 {product} \u66F4\u6B63\u548C\u8BBE\u7F6E\u6587\u672C\u683C\u5F0F\u7684\u65B9\u5F0F\u3002",
27352
- "Customize how documents are saved.": "\u81EA\u5B9A\u4E49\u4FDD\u5B58\u6587\u6863\u7684\u65B9\u5F0F\u3002",
27353
- "Set the Office Language Preferences.": "\u8BBE\u7F6E Office \u8BED\u8A00\u9996\u9009\u9879\u3002",
27354
- "Make {product} easier to work with.": "\u8BA9 {product} \u66F4\u6613\u4E8E\u4F7F\u7528\u3002",
27355
- "Advanced options for working with {product}.": "\u4F7F\u7528 {product} \u7684\u9AD8\u7EA7\u9009\u9879\u3002",
27356
- "Customize the Ribbon and keyboard shortcuts.": "\u81EA\u5B9A\u4E49\u529F\u80FD\u533A\u548C\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002",
27357
- "Customize the Quick Access Toolbar.": "\u81EA\u5B9A\u4E49\u5FEB\u901F\u8BBF\u95EE\u5DE5\u5177\u680F\u3002",
27358
- "View and manage Microsoft Office Add-ins.": "\u67E5\u770B\u548C\u7BA1\u7406 Microsoft Office \u52A0\u8F7D\u9879\u3002",
27359
- "Help keep your documents safe and your computer secure and healthy.": "\u5E2E\u52A9\u4FDD\u969C\u6587\u6863\u5B89\u5168\uFF0C\u5E76\u4F7F\u8BA1\u7B97\u673A\u4FDD\u6301\u5B89\u5168\u548C\u5065\u5EB7\u3002",
27360
- "User Interface options": "\u7528\u6237\u754C\u9762\u9009\u9879",
27361
- "Show Mini Toolbar on selection": "\u9009\u62E9\u65F6\u663E\u793A\u6D6E\u52A8\u5DE5\u5177\u680F",
27362
- "Enable Live Preview": "\u542F\u7528\u5B9E\u65F6\u9884\u89C8",
27363
- "ScreenTip style": "\u5C4F\u5E55\u63D0\u793A\u6837\u5F0F",
27364
- "Show feature descriptions in ScreenTips": "\u5728\u5C4F\u5E55\u63D0\u793A\u4E2D\u663E\u793A\u529F\u80FD\u8BF4\u660E",
27365
- "Personalize your copy of Microsoft Office": "\u5BF9 Microsoft Office \u8FDB\u884C\u4E2A\u6027\u5316\u8BBE\u7F6E",
27366
- "User name": "\u7528\u6237\u540D",
27367
- "Office Theme": "Office \u4E3B\u9898",
27368
- "Office display language": "Office \u663E\u793A\u8BED\u8A00",
27369
- "Choose the language for menus, buttons and messages.": "\u9009\u62E9\u83DC\u5355\u3001\u6309\u94AE\u548C\u6D88\u606F\u4F7F\u7528\u7684\u8BED\u8A00\u3002",
27370
- "Not available yet. Needs rich text formatting.": "\u6682\u4E0D\u53EF\u7528\u3002\u9700\u8981\u5BCC\u6587\u672C\u683C\u5F0F\u3002",
27371
- "Not available yet. Styles are applied on click; hover previews are not drawn yet.": "\u6682\u4E0D\u53EF\u7528\u3002\u6837\u5F0F\u5728\u5355\u51FB\u65F6\u5E94\u7528\uFF1B\u5C1A\u4E0D\u7ED8\u5236\u60AC\u505C\u9884\u89C8\u3002",
27372
- "Not available yet. ScreenTips always describe the command.": "\u6682\u4E0D\u53EF\u7528\u3002\u5C4F\u5E55\u63D0\u793A\u59CB\u7EC8\u63CF\u8FF0\u8BE5\u547D\u4EE4\u3002",
27373
- "Not available yet. Documents are saved to this device; AutoRecover is not kept.": "\u6682\u4E0D\u53EF\u7528\u3002\u6587\u6863\u4FDD\u5B58\u5230\u6B64\u8BBE\u5907\uFF1B\u4E0D\u4FDD\u7559\u81EA\u52A8\u6062\u590D\u3002",
27374
- "Not available yet. There are no accessibility settings to change.": "\u6682\u4E0D\u53EF\u7528\u3002\u6CA1\u6709\u53EF\u66F4\u6539\u7684\u8F85\u52A9\u529F\u80FD\u8BBE\u7F6E\u3002",
27375
- "Not available yet. The editing behaviour is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u7F16\u8F91\u884C\u4E3A\u662F\u56FA\u5B9A\u7684\u3002",
27376
- "Not available yet. The Quick Access Toolbar is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u5FEB\u901F\u8BBF\u95EE\u5DE5\u5177\u680F\u662F\u56FA\u5B9A\u7684\u3002",
27377
- "Not available yet. The ribbon layout is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u529F\u80FD\u533A\u5E03\u5C40\u662F\u56FA\u5B9A\u7684\u3002",
27378
- "Not available yet. The display language is fixed.": "\u6682\u4E0D\u53EF\u7528\u3002\u663E\u793A\u8BED\u8A00\u662F\u56FA\u5B9A\u7684\u3002",
27379
- "Not available. Add-ins and macros are never run.": "\u4E0D\u53EF\u7528\u3002\u52A0\u8F7D\u9879\u548C\u5B8F\u6C38\u8FDC\u4E0D\u4F1A\u8FD0\u884C\u3002",
27380
- "Not available. Documents stay local and active content is never run.": "\u4E0D\u53EF\u7528\u3002\u6587\u6863\u4FDD\u7559\u5728\u672C\u5730\uFF0C\u6D3B\u52A8\u5185\u5BB9\u6C38\u8FDC\u4E0D\u4F1A\u8FD0\u884C\u3002"
27381
- };
27382
- var optionStrings = {
27383
- en: enOptionStrings,
27384
- fr: frOptionStrings,
27385
- de: deOptionStrings,
27386
- es: esOptionStrings,
27387
- "zh-CN": zhOptionStrings
27388
- };
27389
-
27390
27569
  // xlsx/ui/locales/merge.ts
27391
27570
  var mergeStringModules = mergeMessageModules;
27392
27571
 
@@ -28655,11 +28834,11 @@ var NAVIGATION_STRINGS = {
28655
28834
  "Dise\xF1os de tablas din\xE1micas no modelados, agrupaci\xF3n, segmentaciones y fuentes externas (conservados)",
28656
28835
  "\u672A\u5EFA\u6A21\u7684\u6570\u636E\u900F\u89C6\u8868\u5E03\u5C40\u3001\u5206\u7EC4\u3001\u5207\u7247\u5668\u548C\u5916\u90E8\u6570\u636E\u6E90\uFF08\u4FDD\u7559\uFF09"
28657
28836
  ],
28658
- "Values-on-rows report filters, multiple/dynamic filters and repeated column captions (preserved)": [
28659
- "Filtres de rapport avec valeurs en lignes, filtres multiples ou dynamiques et libell\xE9s de colonnes r\xE9p\xE9t\xE9s (conserv\xE9s)",
28660
- "Berichtsfilter mit Werten in Zeilen, mehrere/dynamische Filter und wiederholte Spaltenbeschriftungen (erhalten)",
28661
- "Filtros de informe con valores en filas, filtros m\xFAltiples o din\xE1micos y t\xEDtulos de columna repetidos (conservados)",
28662
- "\u503C\u4F4D\u4E8E\u884C\u4E0A\u7684\u62A5\u8868\u7B5B\u9009\u5668\u3001\u591A\u91CD\u6216\u52A8\u6001\u7B5B\u9009\u5668\u548C\u91CD\u590D\u5217\u6807\u9898\uFF08\u4FDD\u7559\uFF09"
28837
+ "Multiple/dynamic report filters and repeated column captions (preserved)": [
28838
+ "Filtres de rapport multiples ou dynamiques et libell\xE9s de colonnes r\xE9p\xE9t\xE9s (conserv\xE9s)",
28839
+ "Mehrere/dynamische Berichtsfilter und wiederholte Spaltenbeschriftungen (erhalten)",
28840
+ "Filtros de informe m\xFAltiples o din\xE1micos y t\xEDtulos de columna repetidos (conservados)",
28841
+ "\u591A\u91CD\u6216\u52A8\u6001\u62A5\u8868\u7B5B\u9009\u5668\u548C\u91CD\u590D\u5217\u6807\u9898\uFF08\u4FDD\u7559\uFF09"
28663
28842
  ],
28664
28843
  OK: ["OK", "OK", "Aceptar", "\u786E\u5B9A"],
28665
28844
  Cancel: ["Annuler", "Abbrechen", "Cancelar", "\u53D6\u6D88"],
@@ -32730,8 +32909,8 @@ var COLUMN = {
32730
32909
  };
32731
32910
  function flatten2(tables, locale) {
32732
32911
  const out = {};
32733
- for (const table2 of tables)
32734
- for (const [key, texts] of Object.entries(table2))
32912
+ for (const table3 of tables)
32913
+ for (const [key, texts] of Object.entries(table3))
32735
32914
  out[key] = locale === "en" ? key : texts[COLUMN[locale]] ?? key;
32736
32915
  return out;
32737
32916
  }
@@ -35008,9 +35187,9 @@ function cellCommands() {
35008
35187
  ["format.hide-columns", "Hide Columns", "col", true],
35009
35188
  ["format.unhide-columns", "Unhide Columns", "col", false]
35010
35189
  ].map(
35011
- ([id, label4, axis, hidden]) => editing({
35190
+ ([id, label2, axis, hidden]) => editing({
35012
35191
  id,
35013
- label: label4,
35192
+ label: label2,
35014
35193
  icon: icon("hide"),
35015
35194
  lock: axis === "row" ? "formatRows" : "formatColumns",
35016
35195
  run: (ctx) => {
@@ -35335,10 +35514,10 @@ var TABLE_FLAGS = [
35335
35514
  ];
35336
35515
  function setTableBand(ctx, band, on) {
35337
35516
  const t = target(ctx);
35338
- const table2 = activeTable(ctx);
35339
- if (!t || !table2 || table2[band] === on) return;
35517
+ const table3 = activeTable(ctx);
35518
+ if (!t || !table3 || table3[band] === on) return;
35340
35519
  try {
35341
- t.session.updateTable(t.sheet, table2.name, { [band]: on });
35520
+ t.session.updateTable(t.sheet, table3.name, { [band]: on });
35342
35521
  } catch (error) {
35343
35522
  ctx.toast(ctx.t(error instanceof Error ? error.message : String(error)), "warning");
35344
35523
  }
@@ -35387,14 +35566,14 @@ function contextualCommands() {
35387
35566
  icon: icon("convertRange"),
35388
35567
  run: async (ctx) => {
35389
35568
  const t = target(ctx);
35390
- const table2 = activeTable(ctx);
35391
- if (!t || !table2) return;
35569
+ const table3 = activeTable(ctx);
35570
+ if (!t || !table3) return;
35392
35571
  const ok = await ctx.dialogs.open("confirm", {
35393
35572
  heading: "Convert to Range",
35394
35573
  message: "Do you want to convert the table to a normal range?",
35395
35574
  okLabel: "Yes"
35396
35575
  });
35397
- if (ok) t.session.convertTableToRange(t.sheet, table2.name);
35576
+ if (ok) t.session.convertTableToRange(t.sheet, table3.name);
35398
35577
  }
35399
35578
  }),
35400
35579
  tableCmd({
@@ -35411,14 +35590,14 @@ function contextualCommands() {
35411
35590
  run: (ctx) => setTableBand(ctx, "totalsRow", !activeTable(ctx)?.totalsRow)
35412
35591
  }),
35413
35592
  ...TABLE_FLAGS.map(
35414
- ([flag2, id, label4]) => tableCmd({
35593
+ ([flag2, id, label2]) => tableCmd({
35415
35594
  id,
35416
- label: label4,
35595
+ label: label2,
35417
35596
  checked: (ctx) => !!activeTable(ctx)?.[flag2],
35418
35597
  run: (ctx) => {
35419
35598
  const t = target(ctx);
35420
- const table2 = activeTable(ctx);
35421
- if (t && table2) t.session.updateTable(t.sheet, table2.name, { [flag2]: !table2[flag2] });
35599
+ const table3 = activeTable(ctx);
35600
+ if (t && table3) t.session.updateTable(t.sheet, table3.name, { [flag2]: !table3[flag2] });
35422
35601
  }
35423
35602
  })
35424
35603
  ),
@@ -35428,9 +35607,9 @@ function contextualCommands() {
35428
35607
  icon: icon("formatTable"),
35429
35608
  run: (ctx, arg) => {
35430
35609
  const t = target(ctx);
35431
- const table2 = activeTable(ctx);
35432
- if (t && table2 && typeof arg === "string")
35433
- t.session.updateTable(t.sheet, table2.name, { styleName: arg });
35610
+ const table3 = activeTable(ctx);
35611
+ if (t && table3 && typeof arg === "string")
35612
+ t.session.updateTable(t.sheet, table3.name, { styleName: arg });
35434
35613
  }
35435
35614
  }),
35436
35615
  chartCmd({
@@ -35829,9 +36008,9 @@ function fillDirection(ctx, dir) {
35829
36008
  function editingCommands() {
35830
36009
  return [
35831
36010
  ...AUTOSUM_FUNCTIONS.map(
35832
- ([fn, label4]) => editing({
36011
+ ([fn, label2]) => editing({
35833
36012
  id: fn === "SUM" ? "home.autosum" : `home.autosum-${fn.toLowerCase()}`,
35834
- label: fn === "SUM" ? "AutoSum" : label4,
36013
+ label: fn === "SUM" ? "AutoSum" : label2,
35835
36014
  icon: icon("autoSum"),
35836
36015
  ...fn === "SUM" ? { shortcut: "Alt+=" } : {},
35837
36016
  run: (ctx) => autoSum(ctx, fn)
@@ -35882,16 +36061,16 @@ function editingCommands() {
35882
36061
  ["comments", "Clear Comments and Notes"],
35883
36062
  ["hyperlinks", "Clear Hyperlinks"]
35884
36063
  ].map(
35885
- ([what, label4]) => editing({
36064
+ ([what, label2]) => editing({
35886
36065
  id: `home.clear-${what}`,
35887
- label: label4,
36066
+ label: label2,
35888
36067
  icon: icon("clear"),
35889
36068
  ...what === "formats" ? { lock: "formatCells" } : {},
35890
36069
  ...what === "contents" ? { shortcut: "Delete" } : {},
35891
36070
  run: (ctx) => {
35892
36071
  const t = target(ctx);
35893
36072
  if (!t) return;
35894
- t.session.batch(label4, () => {
36073
+ t.session.batch(label2, () => {
35895
36074
  for (const range2 of t.ranges) t.session.clearRange(t.sheet, range2, what);
35896
36075
  });
35897
36076
  }
@@ -35932,9 +36111,9 @@ function editingCommands() {
35932
36111
  ["constants", "Constants"],
35933
36112
  ["validation", "Data Validation"]
35934
36113
  ].map(
35935
- ([kind, label4]) => viewing({
36114
+ ([kind, label2]) => viewing({
35936
36115
  id: `home.select-${kind}`,
35937
- label: label4,
36116
+ label: label2,
35938
36117
  icon: icon("findSelect"),
35939
36118
  run: (ctx) => {
35940
36119
  if (!selectSpecial(ctx, { kind })) ctx.toast(ctx.t("No cells were found."), "info");
@@ -36205,7 +36384,7 @@ function numberCommands() {
36205
36384
  ["home.format-date", "Date format", "d-mmm-yy", "Ctrl+Shift+#"],
36206
36385
  ["home.format-scientific", "Scientific format", "0.00E+00", "Ctrl+Shift+^"]
36207
36386
  ].map(
36208
- ([id, label4, format, shortcut]) => editing({ id, label: label4, shortcut, lock: "formatCells", run: (ctx) => setFormat(ctx, format) })
36387
+ ([id, label2, format, shortcut]) => editing({ id, label: label2, shortcut, lock: "formatCells", run: (ctx) => setFormat(ctx, format) })
36209
36388
  )
36210
36389
  ];
36211
36390
  }
@@ -36429,9 +36608,9 @@ function slicerSourceAt(ctx) {
36429
36608
  pivot,
36430
36609
  fields: pivot.fields.filter((field) => field !== pivot.pageFilter?.field)
36431
36610
  };
36432
- const table2 = activeTable(ctx);
36433
- if (table2?.headerRow && !table2.filterNotModeled)
36434
- return { kind: "table", table: table2, fields: table2.columns.map((column2) => column2.name) };
36611
+ const table3 = activeTable(ctx);
36612
+ if (table3?.headerRow && !table3.filterNotModeled)
36613
+ return { kind: "table", table: table3, fields: table3.columns.map((column2) => column2.name) };
36435
36614
  return void 0;
36436
36615
  }
36437
36616
  function activeTimeline(ctx) {
@@ -38153,13 +38332,13 @@ function searchCommands(ctx, query, isHidden) {
38153
38332
  const seen = /* @__PURE__ */ new Set();
38154
38333
  for (const command of ctx.commands.list()) {
38155
38334
  if (isHidden(command.id) || !ctx.commands.isEnabled(command.id)) continue;
38156
- const label4 = ctx.t(command.label).toLocaleLowerCase();
38335
+ const label2 = ctx.t(command.label).toLocaleLowerCase();
38157
38336
  const english = command.label.toLocaleLowerCase();
38158
- const haystack = `${label4} ${english} ${command.id.replace(/[.-]/g, " ")}`;
38337
+ const haystack = `${label2} ${english} ${command.id.replace(/[.-]/g, " ")}`;
38159
38338
  if (!words2.every((word) => haystack.includes(word))) continue;
38160
- if (seen.has(label4)) continue;
38161
- seen.add(label4);
38162
- const score = label4.startsWith(words2[0]) ? 0 : label4.includes(words2[0]) ? 1 : 2;
38339
+ if (seen.has(label2)) continue;
38340
+ seen.add(label2);
38341
+ const score = label2.startsWith(words2[0]) ? 0 : label2.includes(words2[0]) ? 1 : 2;
38163
38342
  scored.push({ command, score });
38164
38343
  }
38165
38344
  return scored.sort(