ooxml-core 1.18.0 → 1.19.1

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 (205) hide show
  1. package/dist/{PptxHandler-X6AO6LKJ.mjs → PptxHandler-2V4PQL6O.mjs} +2 -2
  2. package/dist/{PptxHandler-4AHDZDA5.cjs → PptxHandler-6TNIQ7S5.cjs} +2 -2
  3. package/dist/{PptxHandler-5X4VOWAO.mjs → PptxHandler-HSPKEP5E.mjs} +1 -1
  4. package/dist/{PresentationBuilder-UY3S4YE2.mjs → PresentationBuilder-G7MPEGXJ.mjs} +1 -1
  5. package/dist/{PresentationBuilder-LRX55PXA.mjs → PresentationBuilder-HQ6C7L4V.mjs} +2 -2
  6. package/dist/{PresentationBuilder-MJB4LIFS.cjs → PresentationBuilder-RM52LCVN.cjs} +4 -4
  7. package/dist/automation/index.cjs +535 -266
  8. package/dist/automation/index.mjs +535 -266
  9. package/dist/automation/node.cjs +2 -1
  10. package/dist/automation/node.d.ts.map +1 -1
  11. package/dist/automation/node.mjs +2 -1
  12. package/dist/chart/axis-range-auto.d.ts +10 -0
  13. package/dist/chart/axis-range-auto.d.ts.map +1 -0
  14. package/dist/chart/axis-range-types.d.ts +27 -0
  15. package/dist/chart/axis-range-types.d.ts.map +1 -0
  16. package/dist/chart/axis-range.d.ts +37 -0
  17. package/dist/chart/axis-range.d.ts.map +1 -0
  18. package/dist/chart/axis-ticks.d.ts +8 -0
  19. package/dist/chart/axis-ticks.d.ts.map +1 -0
  20. package/dist/chart/index.cjs +815 -165
  21. package/dist/chart/index.d.ts +6 -0
  22. package/dist/chart/index.d.ts.map +1 -1
  23. package/dist/chart/index.mjs +795 -166
  24. package/dist/chart/line-dash.d.ts +2 -0
  25. package/dist/chart/line-dash.d.ts.map +1 -0
  26. package/dist/chart/marker-shape.d.ts +70 -0
  27. package/dist/chart/marker-shape.d.ts.map +1 -0
  28. package/dist/chart/render/chart-svg-axes.d.ts +9 -0
  29. package/dist/chart/render/chart-svg-axes.d.ts.map +1 -0
  30. package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
  31. package/dist/chart/render/chart-svg-markers.d.ts +6 -0
  32. package/dist/chart/render/chart-svg-markers.d.ts.map +1 -0
  33. package/dist/chart/render/chart-svg-radial.d.ts.map +1 -1
  34. package/dist/chart/render/chart-svg-xy.d.ts.map +1 -1
  35. package/dist/chart/render/chart-view-axes.d.ts +30 -0
  36. package/dist/chart/render/chart-view-axes.d.ts.map +1 -0
  37. package/dist/chart/render/chart-view-markers.d.ts +27 -0
  38. package/dist/chart/render/chart-view-markers.d.ts.map +1 -0
  39. package/dist/chart/render/chart-view-series.d.ts.map +1 -1
  40. package/dist/chart/render/chart-view.d.ts +4 -1
  41. package/dist/chart/render/chart-view.d.ts.map +1 -1
  42. package/dist/chart/render/index.d.ts +2 -0
  43. package/dist/chart/render/index.d.ts.map +1 -1
  44. package/dist/chart/render/summary-from-space.d.ts.map +1 -1
  45. package/dist/chart/render/summary.d.ts +6 -1
  46. package/dist/chart/render/summary.d.ts.map +1 -1
  47. package/dist/{chunk-D4GBMBG6.mjs → chunk-365VXA3X.mjs} +1 -1
  48. package/dist/{chunk-7NWQUCGX.mjs → chunk-4FTUAD2B.mjs} +20 -5
  49. package/dist/{chunk-PLWRGPRH.mjs → chunk-4YDPRQRH.mjs} +145 -96
  50. package/dist/{chunk-QXDWDDLN.mjs → chunk-6UV3JVB3.mjs} +1 -1
  51. package/dist/{chunk-3ATTMOYZ.mjs → chunk-7FPQ7LGN.mjs} +1 -1
  52. package/dist/{chunk-7WCCQKV2.mjs → chunk-7I7CMDUZ.mjs} +1 -1
  53. package/dist/{chunk-KZ6UTEES.mjs → chunk-E6WNB3JX.mjs} +1 -1
  54. package/dist/{chunk-SPG7WICG.mjs → chunk-EDRS3OSM.mjs} +1 -1
  55. package/dist/{chunk-VXLBSKZ6.mjs → chunk-GKLDCQLY.mjs} +1 -1
  56. package/dist/{chunk-ITQNJLJW.mjs → chunk-ILG6NKXV.mjs} +1 -1
  57. package/dist/{chunk-OXZUJR7O.mjs → chunk-J3PD5JWS.mjs} +1 -1
  58. package/dist/{chunk-I5ZE3VLI.mjs → chunk-JUABSM7C.mjs} +1 -1
  59. package/dist/{chunk-5GBNB7VU.mjs → chunk-LMDNFNZJ.mjs} +1 -1
  60. package/dist/{chunk-LT7RCEHY.mjs → chunk-M6GDBVQ7.mjs} +1 -1
  61. package/dist/{chunk-4SMQRUUE.mjs → chunk-MZP6H7QY.mjs} +1 -1
  62. package/dist/{chunk-KCALUCYU.mjs → chunk-NIGOXRUP.mjs} +1 -1
  63. package/dist/{chunk-VB7NKWZH.mjs → chunk-P37EWZBC.mjs} +1 -1
  64. package/dist/{chunk-VD3XNFJH.mjs → chunk-PIOG7ZFF.mjs} +1 -1
  65. package/dist/{chunk-R4BCOQHB.cjs → chunk-R5FIHHGB.cjs} +33 -13
  66. package/dist/{chunk-4EUHK4OA.mjs → chunk-RRQFRNPQ.mjs} +1 -1
  67. package/dist/{chunk-AXDQEOYK.mjs → chunk-S3E6XBOU.mjs} +1 -1
  68. package/dist/{chunk-U7IDT6VT.mjs → chunk-SLNQNVQM.mjs} +1 -1
  69. package/dist/{chunk-Z5Y53IZD.mjs → chunk-TJPUAUWL.mjs} +4 -4
  70. package/dist/{chunk-53GW7NSV.mjs → chunk-UFZZESXL.mjs} +1 -1
  71. package/dist/{chunk-4JGKTRLH.mjs → chunk-X45XTEMI.mjs} +1 -1
  72. package/dist/{chunk-DUSAQQTU.mjs → chunk-YIXIC3TR.mjs} +1 -1
  73. package/dist/{chunk-YSKKMXDL.mjs → chunk-ZDD2RZGB.mjs} +1 -1
  74. package/dist/{chunk-C363NN2C.mjs → chunk-ZJ2OKIJN.mjs} +33 -13
  75. package/dist/docx/index.cjs +695 -168
  76. package/dist/docx/index.mjs +695 -168
  77. package/dist/docx/layout/index.cjs +697 -170
  78. package/dist/docx/layout/index.mjs +697 -170
  79. package/dist/docx/ui/index.cjs +704 -177
  80. package/dist/docx/ui/index.mjs +704 -177
  81. package/dist/index.cjs +912 -262
  82. package/dist/index.mjs +912 -262
  83. package/dist/pptx/automation/index.cjs +89 -14
  84. package/dist/pptx/automation/index.d.ts +2 -2
  85. package/dist/pptx/automation/index.mjs +5 -5
  86. package/dist/pptx/automation/schemas/chart-formatting-schemas.cjs +145 -96
  87. package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -1
  88. package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts.map +1 -1
  89. package/dist/pptx/automation/schemas/chart-formatting-schemas.mjs +2 -2
  90. package/dist/pptx/automation/schemas/chart-schemas.cjs +145 -96
  91. package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -1
  92. package/dist/pptx/automation/schemas/chart-schemas.d.ts.map +1 -1
  93. package/dist/pptx/automation/schemas/chart-schemas.mjs +2 -2
  94. package/dist/pptx/automation/schemas/chart-user-shape-schemas.cjs +145 -96
  95. package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -1
  96. package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts.map +1 -1
  97. package/dist/pptx/automation/schemas/chart-user-shape-schemas.mjs +2 -2
  98. package/dist/pptx/automation/schemas/element-schemas.cjs +145 -96
  99. package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -1
  100. package/dist/pptx/automation/schemas/element-schemas.d.ts.map +1 -1
  101. package/dist/pptx/automation/schemas/element-schemas.mjs +2 -2
  102. package/dist/pptx/automation/schemas/export-schemas.cjs +145 -96
  103. package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -1
  104. package/dist/pptx/automation/schemas/export-schemas.d.ts.map +1 -1
  105. package/dist/pptx/automation/schemas/export-schemas.mjs +2 -2
  106. package/dist/pptx/automation/schemas/geometry-schemas.cjs +145 -96
  107. package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -1
  108. package/dist/pptx/automation/schemas/geometry-schemas.d.ts.map +1 -1
  109. package/dist/pptx/automation/schemas/geometry-schemas.mjs +2 -2
  110. package/dist/pptx/automation/schemas/hyperlink-schemas.cjs +145 -96
  111. package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -1
  112. package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts.map +1 -1
  113. package/dist/pptx/automation/schemas/hyperlink-schemas.mjs +2 -2
  114. package/dist/pptx/automation/schemas/index.cjs +145 -96
  115. package/dist/pptx/automation/schemas/index.mjs +21 -21
  116. package/dist/pptx/automation/schemas/json-schemas.cjs +145 -96
  117. package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -1
  118. package/dist/pptx/automation/schemas/json-schemas.d.ts.map +1 -1
  119. package/dist/pptx/automation/schemas/json-schemas.mjs +2 -2
  120. package/dist/pptx/automation/schemas/layout-schemas.cjs +145 -96
  121. package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -1
  122. package/dist/pptx/automation/schemas/layout-schemas.d.ts.map +1 -1
  123. package/dist/pptx/automation/schemas/layout-schemas.mjs +2 -2
  124. package/dist/pptx/automation/schemas/lock-schemas.cjs +145 -96
  125. package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -1
  126. package/dist/pptx/automation/schemas/lock-schemas.d.ts.map +1 -1
  127. package/dist/pptx/automation/schemas/lock-schemas.mjs +2 -2
  128. package/dist/pptx/automation/schemas/metadata-schemas.cjs +145 -96
  129. package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -1
  130. package/dist/pptx/automation/schemas/metadata-schemas.d.ts.map +1 -1
  131. package/dist/pptx/automation/schemas/metadata-schemas.mjs +2 -2
  132. package/dist/pptx/automation/schemas/ole-schemas.cjs +145 -96
  133. package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -1
  134. package/dist/pptx/automation/schemas/ole-schemas.d.ts.map +1 -1
  135. package/dist/pptx/automation/schemas/ole-schemas.mjs +2 -2
  136. package/dist/pptx/automation/schemas/presentation-schemas.cjs +145 -96
  137. package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -1
  138. package/dist/pptx/automation/schemas/presentation-schemas.d.ts.map +1 -1
  139. package/dist/pptx/automation/schemas/presentation-schemas.mjs +2 -2
  140. package/dist/pptx/automation/schemas/section-schemas.cjs +145 -96
  141. package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -1
  142. package/dist/pptx/automation/schemas/section-schemas.d.ts.map +1 -1
  143. package/dist/pptx/automation/schemas/section-schemas.mjs +2 -2
  144. package/dist/pptx/automation/schemas/slide-schemas.cjs +145 -96
  145. package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -1
  146. package/dist/pptx/automation/schemas/slide-schemas.d.ts.map +1 -1
  147. package/dist/pptx/automation/schemas/slide-schemas.mjs +2 -2
  148. package/dist/pptx/automation/schemas/smartart-schemas.cjs +145 -96
  149. package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -1
  150. package/dist/pptx/automation/schemas/smartart-schemas.d.ts.map +1 -1
  151. package/dist/pptx/automation/schemas/smartart-schemas.mjs +2 -2
  152. package/dist/pptx/automation/schemas/table-style-schemas.cjs +145 -96
  153. package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -1
  154. package/dist/pptx/automation/schemas/table-style-schemas.d.ts.map +1 -1
  155. package/dist/pptx/automation/schemas/table-style-schemas.mjs +2 -2
  156. package/dist/pptx/automation/schemas/template-schemas.cjs +145 -96
  157. package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -1
  158. package/dist/pptx/automation/schemas/template-schemas.d.ts.map +1 -1
  159. package/dist/pptx/automation/schemas/template-schemas.mjs +2 -2
  160. package/dist/pptx/automation/schemas/theme-schemas.cjs +145 -96
  161. package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -1
  162. package/dist/pptx/automation/schemas/theme-schemas.d.ts.map +1 -1
  163. package/dist/pptx/automation/schemas/theme-schemas.mjs +2 -2
  164. package/dist/pptx/automation/schemas/validation-schemas.cjs +145 -96
  165. package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -1
  166. package/dist/pptx/automation/schemas/validation-schemas.d.ts.map +1 -1
  167. package/dist/pptx/automation/schemas/validation-schemas.mjs +2 -2
  168. package/dist/pptx/chunks/{index-CiyTR6mm.d.ts → index-B9x557hr.d.ts} +3 -2
  169. package/dist/pptx/chunks/{index-CiyTR6mm.d.ts.map → index-B9x557hr.d.ts.map} +1 -1
  170. package/dist/pptx/chunks/{index-BWHNCVNC.d.ts → index-Bqm-jFG-.d.ts} +3 -4
  171. package/dist/pptx/chunks/{index-BWHNCVNC.d.ts.map → index-Bqm-jFG-.d.ts.map} +1 -1
  172. package/dist/pptx/chunks/schemas-CWr181Wx.d.ts +2186 -0
  173. package/dist/pptx/chunks/schemas-CWr181Wx.d.ts.map +1 -0
  174. package/dist/pptx/cli/index.cjs +89 -14
  175. package/dist/pptx/cli/index.mjs +4 -4
  176. package/dist/pptx/converter/index.d.ts +1 -1
  177. package/dist/pptx/converter/index.mjs +2 -2
  178. package/dist/pptx/editor/loader/table-style-image-paths.d.ts +1 -0
  179. package/dist/pptx/editor/render/collaboration-text-native-edit.d.ts +1 -0
  180. package/dist/pptx/editor/render/collaboration-text-session-paragraph.d.ts +1 -0
  181. package/dist/pptx/editor/render/collaboration-text-snapshot-positions.d.ts.map +1 -1
  182. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  183. package/dist/pptx/editor/render/slide-operations.cjs +1 -1
  184. package/dist/pptx/editor/render/slide-operations.mjs +1 -1
  185. package/dist/pptx/index.cjs +84 -6
  186. package/dist/pptx/index.d.ts +2 -2
  187. package/dist/pptx/index.mjs +5 -5
  188. package/dist/pptx/ui/index.d.ts +1 -0
  189. package/dist/teams/index.cjs +71 -5
  190. package/dist/teams/index.mjs +71 -5
  191. package/dist/visio/index.cjs +483 -214
  192. package/dist/visio/index.mjs +483 -214
  193. package/dist/visio/ui/index.cjs +504 -235
  194. package/dist/visio/ui/index.mjs +504 -235
  195. package/dist/xlsx/edit/chart-colors.d.ts.map +1 -1
  196. package/dist/xlsx/index.cjs +818 -281
  197. package/dist/xlsx/index.mjs +818 -281
  198. package/dist/xlsx/load/index.cjs +58 -5
  199. package/dist/xlsx/load/index.mjs +58 -5
  200. package/dist/xlsx/read/chart.d.ts.map +1 -1
  201. package/dist/xlsx/ui/index.cjs +835 -298
  202. package/dist/xlsx/ui/index.mjs +835 -298
  203. package/package.json +9 -9
  204. package/dist/pptx/chunks/external-DQ3B4V-o.d.ts +0 -4275
  205. package/dist/pptx/chunks/external-DQ3B4V-o.d.ts.map +0 -1
@@ -284,8 +284,8 @@ function createWorksheet(name, sheetId) {
284
284
  preserved: /* @__PURE__ */ new Map()
285
285
  };
286
286
  }
287
- function createWorkbook(options6 = {}) {
288
- const names = options6.sheets?.length ? options6.sheets : ["Sheet1"];
287
+ function createWorkbook(options7 = {}) {
288
+ const names = options7.sheets?.length ? options7.sheets : ["Sheet1"];
289
289
  return {
290
290
  sheets: names.map((name, index3) => createWorksheet(name, index3 + 1)),
291
291
  styles: [defaultCellStyle()],
@@ -1686,15 +1686,15 @@ function renderAbs(v, section, generalWidth) {
1686
1686
  }
1687
1687
  return { text: text4, zero: general === "0" };
1688
1688
  }
1689
- function hashFill(options6) {
1690
- const width = options6.width ?? 0;
1691
- const one2 = options6.measure ? options6.measure("#") : 1;
1689
+ function hashFill(options7) {
1690
+ const width = options7.width ?? 0;
1691
+ const one2 = options7.measure ? options7.measure("#") : 1;
1692
1692
  return "#".repeat(Math.max(1, Math.floor(one2 > 0 ? width / one2 : width)));
1693
1693
  }
1694
- function fitNumber(value3, format, options6) {
1695
- const date1904 = options6.date1904 ?? false;
1696
- const width = options6.width ?? 0;
1697
- const fits = (text4) => (options6.measure ? options6.measure(text4) : text4.length) <= width;
1694
+ function fitNumber(value3, format, options7) {
1695
+ const date1904 = options7.date1904 ?? false;
1696
+ const width = options7.width ?? 0;
1697
+ const fits = (text4) => (options7.measure ? options7.measure(text4) : text4.length) <= width;
1698
1698
  const first2 = formatNumber(value3, format, date1904);
1699
1699
  if (fits(first2.text) || first2.text === OVERFLOW_TEXT) return first2;
1700
1700
  const choice = chooseSection(compileFormat(format), value3);
@@ -1705,7 +1705,7 @@ function fitNumber(value3, format, options6) {
1705
1705
  if (fits(next.text)) return next;
1706
1706
  }
1707
1707
  }
1708
- const fill = hashFill(options6);
1708
+ const fill = hashFill(options7);
1709
1709
  return first2.color ? { text: fill, color: first2.color } : { text: fill };
1710
1710
  }
1711
1711
  function formatNumber(value3, format, date1904, generalWidth) {
@@ -1727,13 +1727,13 @@ function formatNumber(value3, format, date1904, generalWidth) {
1727
1727
  const minus = value3 < 0 && !abs2 && !zero;
1728
1728
  return result(minus ? `-${text4}` : text4, section);
1729
1729
  }
1730
- function formatValue(value3, format, options6 = {}) {
1730
+ function formatValue(value3, format, options7 = {}) {
1731
1731
  if (value3 === null) return { text: "" };
1732
1732
  if (typeof value3 === "boolean") return { text: value3 ? "TRUE" : "FALSE" };
1733
1733
  if (typeof value3 === "string") return formatText(value3, compileFormat(format).text);
1734
1734
  if (isCellError(value3)) return { text: value3.error };
1735
- if (options6.width !== void 0) return fitNumber(value3, format, options6);
1736
- return formatNumber(value3, format, options6.date1904 ?? false);
1735
+ if (options7.width !== void 0) return fitNumber(value3, format, options7);
1736
+ return formatNumber(value3, format, options7.date1904 ?? false);
1737
1737
  }
1738
1738
  function isDateFormat(format) {
1739
1739
  return compileFormat(format).isDate;
@@ -1944,7 +1944,7 @@ function parseFractionInput(text4) {
1944
1944
  numFmt: den < 10 ? "# ?/?" : "# ??/??"
1945
1945
  };
1946
1946
  }
1947
- function parseCellInput(text4, options6 = {}) {
1947
+ function parseCellInput(text4, options7 = {}) {
1948
1948
  if (text4 === "") return { value: null };
1949
1949
  if (text4.startsWith("=") && text4.length > 1) return { value: null, formula: text4.slice(1) };
1950
1950
  if (text4.startsWith("'")) return { value: text4.slice(1) };
@@ -1955,7 +1955,7 @@ function parseCellInput(text4, options6 = {}) {
1955
1955
  if (upper2 === "TRUE" || upper2 === "FALSE") return { value: upper2 === "TRUE" };
1956
1956
  if (isErrorCode(upper2)) return { value: cellError(upper2) };
1957
1957
  }
1958
- const parsed = parseNumberInput(trimmed2) ?? parseFractionInput(trimmed2) ?? parseDateTimeInput(trimmed2, options6.date1904 ?? false);
1958
+ const parsed = parseNumberInput(trimmed2) ?? parseFractionInput(trimmed2) ?? parseDateTimeInput(trimmed2, options7.date1904 ?? false);
1959
1959
  if (!parsed) return { value: text4 };
1960
1960
  return parsed.numFmt ? { value: parsed.value, numFmt: parsed.numFmt } : { value: parsed.value };
1961
1961
  }
@@ -3506,7 +3506,7 @@ var int = (value3) => Math.trunc(num(value3));
3506
3506
  var optNum = (args, i2, fallback) => i2 < args.length ? num(args[i2]) : fallback;
3507
3507
  var optBool = (args, i2, fallback) => i2 < args.length ? bool(args[i2]) : fallback;
3508
3508
  var omitted = (args, i2) => i2 >= args.length || args[i2] === null;
3509
- function collectNumbers(ctx, args, options6 = {}) {
3509
+ function collectNumbers(ctx, args, options7 = {}) {
3510
3510
  const out = [];
3511
3511
  for (const arg of args) {
3512
3512
  ctx.forEach(arg, (value3, kind) => {
@@ -3515,7 +3515,7 @@ function collectNumbers(ctx, args, options6 = {}) {
3515
3515
  return;
3516
3516
  }
3517
3517
  if (isError(value3)) {
3518
- if (options6.ignoreErrors) return;
3518
+ if (options7.ignoreErrors) return;
3519
3519
  throw new ErrorSignal(value3);
3520
3520
  }
3521
3521
  if (kind === "direct") {
@@ -3523,7 +3523,7 @@ function collectNumbers(ctx, args, options6 = {}) {
3523
3523
  else out.push(toNumber(value3));
3524
3524
  return;
3525
3525
  }
3526
- if (options6.includeAll) {
3526
+ if (options7.includeAll) {
3527
3527
  if (typeof value3 === "boolean") out.push(value3 ? 1 : 0);
3528
3528
  else if (typeof value3 === "string") out.push(0);
3529
3529
  }
@@ -8488,11 +8488,11 @@ var SUM_FUNCTIONS = [
8488
8488
  255,
8489
8489
  (args, ctx) => {
8490
8490
  const code = int(args[0]);
8491
- const options6 = int(args[1]);
8492
- if (code < 1 || code > 19 || options6 < 0 || options6 > 7) fail(ERR.VALUE);
8493
- const skipNested = options6 <= 3;
8494
- const skipHidden = options6 === 1 || options6 === 3 || options6 === 5 || options6 === 7;
8495
- const skipErrors = options6 === 2 || options6 === 3 || options6 === 6 || options6 === 7;
8491
+ const options7 = int(args[1]);
8492
+ if (code < 1 || code > 19 || options7 < 0 || options7 > 7) fail(ERR.VALUE);
8493
+ const skipNested = options7 <= 3;
8494
+ const skipHidden = options7 === 1 || options7 === 3 || options7 === 5 || options7 === 7;
8495
+ const skipErrors = options7 === 2 || options7 === 3 || options7 === 6 || options7 === 7;
8496
8496
  if (code >= 14) {
8497
8497
  if (args.length !== 4) fail(ERR.VALUE);
8498
8498
  const values2 = subtotalValues(ctx, [args[2] ?? null], skipHidden, skipErrors, skipNested);
@@ -11779,11 +11779,11 @@ function checkXmlLimits(xml, label2, limits = {}) {
11779
11779
  throw new Error(`${label2} XML exceeds the nesting depth limit of ${maxDepth}`);
11780
11780
  }
11781
11781
  }
11782
- function parseXml(xml, options6 = {}) {
11783
- const label2 = options6.label ?? "OOXML";
11782
+ function parseXml(xml, options7 = {}) {
11783
+ const label2 = options7.label ?? "OOXML";
11784
11784
  if (/<!DOCTYPE|<!ENTITY/i.test(xml))
11785
11785
  throw new Error(`${label2} XML with DTD or entity declarations is not supported`);
11786
- checkXmlLimits(xml, label2, options6.limits);
11786
+ checkXmlLimits(xml, label2, options7.limits);
11787
11787
  let parseError = "";
11788
11788
  let parsed;
11789
11789
  try {
@@ -11997,7 +11997,7 @@ var pivotColumnFields = (pivot) => [
11997
11997
  // i18n/locale.ts
11998
11998
  var SUPPORTED_OFFICE_LOCALES = ["en", "fr", "de", "es", "zh-CN"];
11999
11999
  var DEFAULT_REJECTED_SUBTAGS = ["hant", "tw", "hk", "mo"];
12000
- function normalizeLocale(input, supported, fallback, options6 = {}) {
12000
+ function normalizeLocale(input, supported, fallback, options7 = {}) {
12001
12001
  const parts = (input ?? "").trim().toLowerCase().split(/[-_]/).filter(Boolean);
12002
12002
  const language = parts[0];
12003
12003
  if (!language) return fallback;
@@ -12006,7 +12006,7 @@ function normalizeLocale(input, supported, fallback, options6 = {}) {
12006
12006
  if (exact) return exact;
12007
12007
  const base = find3(language);
12008
12008
  if (base) return base;
12009
- const rejected = options6.rejectedSubtags ?? DEFAULT_REJECTED_SUBTAGS;
12009
+ const rejected = options7.rejectedSubtags ?? DEFAULT_REJECTED_SUBTAGS;
12010
12010
  if (parts.slice(1).some((part) => rejected.includes(part))) return fallback;
12011
12011
  return supported.find((item) => item.toLowerCase().split("-")[0] === language && item.includes("-")) ?? fallback;
12012
12012
  }
@@ -12041,12 +12041,12 @@ function interpolate(template, params, placeholder2 = "single") {
12041
12041
  (match2, name) => Object.prototype.hasOwnProperty.call(params, name) && params[name] !== void 0 ? String(params[name]) : match2
12042
12042
  );
12043
12043
  }
12044
- function createTranslator(messages, fallbacks = [], options6 = {}) {
12045
- const placeholder2 = options6.placeholder ?? "single";
12044
+ function createTranslator(messages, fallbacks = [], options7 = {}) {
12045
+ const placeholder2 = options7.placeholder ?? "single";
12046
12046
  return (key, params) => {
12047
12047
  let text4 = messages?.[key];
12048
12048
  for (let i2 = 0; text4 === void 0 && i2 < fallbacks.length; i2++) text4 = fallbacks[i2]?.[key];
12049
- return interpolate(text4 ?? options6.missing?.(key) ?? key, params, placeholder2);
12049
+ return interpolate(text4 ?? options7.missing?.(key) ?? key, params, placeholder2);
12050
12050
  };
12051
12051
  }
12052
12052
 
@@ -12506,8 +12506,8 @@ function trimmedCaptions(caps) {
12506
12506
  }
12507
12507
  return Object.keys(out).length ? out : void 0;
12508
12508
  }
12509
- function authoredCaptions(options6) {
12510
- const own = options6.captions ?? localizedPivotCaptions(options6.locale);
12509
+ function authoredCaptions(options7) {
12510
+ const own = options7.captions ?? localizedPivotCaptions(options7.locale);
12511
12511
  return own && Object.keys(own).length ? structuredClone(own) : void 0;
12512
12512
  }
12513
12513
 
@@ -14986,9 +14986,9 @@ var Deferred = class {
14986
14986
  };
14987
14987
  var MAX_NESTED_COMPUTE = 40;
14988
14988
  var EngineHost = class {
14989
- constructor(workbook, options6) {
14989
+ constructor(workbook, options7) {
14990
14990
  this.workbook = workbook;
14991
- this.options = options6;
14991
+ this.options = options7;
14992
14992
  }
14993
14993
  workbook;
14994
14994
  options;
@@ -16085,8 +16085,8 @@ var Engine = class extends EngineStructure {
16085
16085
  return [...this.cycles].map(({ sheet, row: row2, col }) => ({ sheet, row: row2, col }));
16086
16086
  }
16087
16087
  };
16088
- function createCalcEngine(workbook, options6 = {}) {
16089
- return new Engine(workbook, options6);
16088
+ function createCalcEngine(workbook, options7 = {}) {
16089
+ return new Engine(workbook, options7);
16090
16090
  }
16091
16091
 
16092
16092
  // xlsx/formula/ref-text.ts
@@ -19415,8 +19415,8 @@ function rgbToHsl(r, g2, b) {
19415
19415
  }
19416
19416
  return { h: h2, s: clampUnitInterval(s), l: clampUnitInterval(l) };
19417
19417
  }
19418
- function hslToRgb(h2, s, l, roundChannel = Math.round, options6) {
19419
- const sC = options6?.clampSaturation === false ? s : clampUnitInterval(s);
19418
+ function hslToRgb(h2, s, l, roundChannel = Math.round, options7) {
19419
+ const sC = options7?.clampSaturation === false ? s : clampUnitInterval(s);
19420
19420
  const lC = clampUnitInterval(l);
19421
19421
  const hN = (h2 % 360 + 360) % 360;
19422
19422
  const c2 = (1 - Math.abs(2 * lC - 1)) * sC;
@@ -19914,13 +19914,13 @@ var APPLIED = /* @__PURE__ */ new Set([
19914
19914
  "lumMod",
19915
19915
  "lumOff"
19916
19916
  ]);
19917
- function resolveDrawingColor(color, theme2, options6) {
19917
+ function resolveDrawingColor(color, theme2, options7) {
19918
19918
  const base = baseHex(color, theme2);
19919
19919
  const rgb2 = base ? hexToRgbChannels(base) : null;
19920
19920
  if (!rgb2) return void 0;
19921
- if (options6?.transformOrder === "document") {
19921
+ if (options7?.transformOrder === "document") {
19922
19922
  const value3 = orderedColorTransforms(rgb2, color.transforms);
19923
- const round4 = options6.hslRounding === "halfDown" ? (channel) => Math.ceil(channel - 0.5) : Math.round;
19923
+ const round4 = options7.hslRounding === "halfDown" ? (channel) => Math.ceil(channel - 0.5) : Math.round;
19924
19924
  return {
19925
19925
  hex: `#${toHex(round4(value3.r))}${toHex(round4(value3.g))}${toHex(round4(value3.b))}`,
19926
19926
  alpha: value3.alpha,
@@ -19971,7 +19971,7 @@ function resolveDrawingColor(color, theme2, options6) {
19971
19971
  if (lumMod !== void 0) hsl.l = clampUnitInterval(hsl.l * lumMod);
19972
19972
  const lumOff = parseDrawingFraction(find3("lumOff"));
19973
19973
  if (lumOff !== void 0) hsl.l = clampUnitInterval(hsl.l + lumOff);
19974
- const round4 = options6?.hslRounding === "halfDown" ? (value3) => Math.ceil(value3 - 0.5) : Math.round;
19974
+ const round4 = options7?.hslRounding === "halfDown" ? (value3) => Math.ceil(value3 - 0.5) : Math.round;
19975
19975
  ({ r, g: g2, b } = hslToRgb(hsl.h, hsl.s, hsl.l, round4));
19976
19976
  }
19977
19977
  let alpha = parseDrawingPercent(find3("alpha")) ?? 1;
@@ -21387,7 +21387,7 @@ function resolveInnerRect(fillToRect, focalPoint) {
21387
21387
  function lerpEdge(inner2, outer, t) {
21388
21388
  return inner2 + (outer - inner2) * t;
21389
21389
  }
21390
- function buildRectPathGradientSvg(stops, focalPoint, fillToRect, options6) {
21390
+ function buildRectPathGradientSvg(stops, focalPoint, fillToRect, options7) {
21391
21391
  if (stops.length === 0) {
21392
21392
  return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"/>';
21393
21393
  }
@@ -21396,7 +21396,7 @@ function buildRectPathGradientSvg(stops, focalPoint, fillToRect, options6) {
21396
21396
  const rects = [];
21397
21397
  const alphaRects = [];
21398
21398
  const masked = sorted2.some((stop) => (stop.opacity ?? 1) < 1);
21399
- const bands = options6?.bands;
21399
+ const bands = options7?.bands;
21400
21400
  if (!Number.isInteger(bands) || bands < 1) throw new RangeError("Invalid gradient band count");
21401
21401
  for (let i2 = bands; i2 >= 0; i2 -= 1) {
21402
21402
  const t = i2 / bands;
@@ -23135,6 +23135,191 @@ function parseChartSpace(source2) {
23135
23135
  return { chartSpace, issues: context.issues };
23136
23136
  }
23137
23137
 
23138
+ // chart/marker-shape.ts
23139
+ var CHART_PX_PER_PT = 4 / 3;
23140
+ var DEFAULT_MARKER_OUTLINE_PT = 0.75;
23141
+ var AUTOMATIC_MARKER_CYCLE = [
23142
+ "diamond",
23143
+ "square",
23144
+ "triangle",
23145
+ "x",
23146
+ "star",
23147
+ "circle",
23148
+ "plus",
23149
+ "dot",
23150
+ "dash"
23151
+ ];
23152
+ function automaticMarkerSymbol(seriesIdx) {
23153
+ const length = AUTOMATIC_MARKER_CYCLE.length;
23154
+ const normalized = (Math.trunc(seriesIdx) % length + length) % length;
23155
+ return AUTOMATIC_MARKER_CYCLE[Number.isFinite(normalized) ? normalized : 0];
23156
+ }
23157
+ function markerRadius(size, defaultRadius) {
23158
+ if (size === void 0 || !Number.isFinite(size) || size <= 0) {
23159
+ return defaultRadius;
23160
+ }
23161
+ return size / 2;
23162
+ }
23163
+ function polygonPoints(vertices) {
23164
+ return vertices.map(([x, y]) => `${x.toFixed(2)},${y.toFixed(2)}`).join(" ");
23165
+ }
23166
+ function starVertices(cx2, cy, r) {
23167
+ const inner2 = r * 0.5;
23168
+ const out = [];
23169
+ for (let i2 = 0; i2 < 10; i2++) {
23170
+ const radius = i2 % 2 === 0 ? r : inner2;
23171
+ const angle = -Math.PI / 2 + Math.PI * i2 / 5;
23172
+ out.push([cx2 + radius * Math.cos(angle), cy + radius * Math.sin(angle)]);
23173
+ }
23174
+ return out;
23175
+ }
23176
+ function rectPolygon(x, y, w, h2) {
23177
+ return polygonPoints([
23178
+ [x, y],
23179
+ [x + w, y],
23180
+ [x + w, y + h2],
23181
+ [x, y + h2]
23182
+ ]);
23183
+ }
23184
+ function buildMarkerPrimitive(input) {
23185
+ const { symbol: symbol2, cx: cx2, cy, fill } = input;
23186
+ const part = input.part === void 0 ? {} : { part: input.part };
23187
+ if (symbol2 === "none") {
23188
+ return null;
23189
+ }
23190
+ const r = markerRadius(input.size, input.defaultRadius);
23191
+ const outline = input.stroke ? {
23192
+ stroke: input.stroke,
23193
+ strokeWidth: input.strokeWidth ?? DEFAULT_MARKER_OUTLINE_PT * CHART_PX_PER_PT
23194
+ } : void 0;
23195
+ const polygonStroke = outline ?? { stroke: fill, strokeWidth: 0 };
23196
+ const lineStroke = input.stroke ?? fill;
23197
+ switch (symbol2) {
23198
+ case "square":
23199
+ case "dash": {
23200
+ const h2 = symbol2 === "dash" ? r * 0.64 : r * 2;
23201
+ const y = cy - h2 / 2;
23202
+ if (outline) {
23203
+ return {
23204
+ kind: "polygon",
23205
+ points: rectPolygon(cx2 - r, y, r * 2, h2),
23206
+ fill,
23207
+ ...outline,
23208
+ ...part
23209
+ };
23210
+ }
23211
+ return { kind: "rect", x: cx2 - r, y, w: r * 2, h: h2, fill, ...part };
23212
+ }
23213
+ case "diamond":
23214
+ return {
23215
+ kind: "polygon",
23216
+ points: polygonPoints([
23217
+ [cx2, cy - r],
23218
+ [cx2 + r, cy],
23219
+ [cx2, cy + r],
23220
+ [cx2 - r, cy]
23221
+ ]),
23222
+ fill,
23223
+ ...polygonStroke,
23224
+ ...part
23225
+ };
23226
+ case "triangle":
23227
+ return {
23228
+ kind: "polygon",
23229
+ points: polygonPoints([
23230
+ [cx2, cy - r],
23231
+ [cx2 + r * 0.9, cy + r * 0.75],
23232
+ [cx2 - r * 0.9, cy + r * 0.75]
23233
+ ]),
23234
+ fill,
23235
+ ...polygonStroke,
23236
+ ...part
23237
+ };
23238
+ case "star":
23239
+ return {
23240
+ kind: "polygon",
23241
+ points: polygonPoints(starVertices(cx2, cy, r)),
23242
+ fill,
23243
+ ...polygonStroke,
23244
+ ...part
23245
+ };
23246
+ case "plus":
23247
+ return {
23248
+ kind: "path",
23249
+ d: `M${(cx2 - r).toFixed(2)},${cy.toFixed(2)} L${(cx2 + r).toFixed(2)},${cy.toFixed(2)} M${cx2.toFixed(2)},${(cy - r).toFixed(2)} L${cx2.toFixed(2)},${(cy + r).toFixed(2)}`,
23250
+ fill: "none",
23251
+ stroke: lineStroke,
23252
+ strokeWidth: Math.max(1, r * 0.4),
23253
+ ...part
23254
+ };
23255
+ case "x":
23256
+ return {
23257
+ kind: "path",
23258
+ d: `M${(cx2 - r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx2 + r).toFixed(2)},${(cy + r).toFixed(2)} M${(cx2 + r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx2 - r).toFixed(2)},${(cy + r).toFixed(2)}`,
23259
+ fill: "none",
23260
+ stroke: lineStroke,
23261
+ strokeWidth: Math.max(1, r * 0.4),
23262
+ ...part
23263
+ };
23264
+ case "dot":
23265
+ return { kind: "circle", cx: cx2, cy, r: Math.max(r * 0.6, 1), fill, ...part, ...outline };
23266
+ default:
23267
+ return { kind: "circle", cx: cx2, cy, r, fill, ...part, ...outline };
23268
+ }
23269
+ }
23270
+
23271
+ // chart/render/chart-view-markers.ts
23272
+ function summaryMarkers(source2, group2, seriesPosition) {
23273
+ if (!["line", "scatter", "radar"].includes(group2.kind)) return {};
23274
+ const enabled = group2.kind === "line" ? group2.marker === true : group2.kind === "radar" ? group2.radarStyle === "marker" : !["line", "smooth", "none"].includes(group2.scatterStyle ?? "marker");
23275
+ const symbol2 = source2.marker?.symbol;
23276
+ const marker3 = {
23277
+ ...source2.marker,
23278
+ symbol: symbol2 && symbol2 !== "auto" ? symbol2 : source2.marker || enabled ? automaticMarkerSymbol(source2.index ?? seriesPosition) : "none"
23279
+ };
23280
+ const pointMarkers = {};
23281
+ for (const point of source2.dataPoints) {
23282
+ if (point.index === void 0 || !point.marker) continue;
23283
+ const override = point.marker;
23284
+ pointMarkers[point.index] = {
23285
+ ...marker3,
23286
+ ...override,
23287
+ ...override.symbol === "auto" || !source2.marker && override.symbol === void 0 ? { symbol: automaticMarkerSymbol(source2.index ?? seriesPosition) } : {},
23288
+ ...marker3.spPr || override.spPr ? {
23289
+ spPr: {
23290
+ ...marker3.spPr,
23291
+ ...override.spPr,
23292
+ ...marker3.spPr?.line || override.spPr?.line ? { line: { ...marker3.spPr?.line, ...override.spPr?.line } } : {}
23293
+ }
23294
+ } : {}
23295
+ };
23296
+ }
23297
+ return { marker: marker3, ...Object.keys(pointMarkers).length ? { pointMarkers } : {} };
23298
+ }
23299
+ function seriesMarkerViews(source2, drawingColor) {
23300
+ const fillColor = (fill) => fill?.kind === "none" ? "none" : fill?.kind === "solid" ? drawingColor(fill.color) : void 0;
23301
+ const resolve3 = (marker3) => {
23302
+ const fill = fillColor(marker3.spPr?.fill);
23303
+ const stroke = fillColor(marker3.spPr?.line?.fill);
23304
+ const width = marker3.spPr?.line?.widthEmu;
23305
+ return {
23306
+ ...marker3.symbol !== void 0 ? { symbol: marker3.symbol } : {},
23307
+ ...marker3.size !== void 0 ? { size: marker3.size } : {},
23308
+ ...fill !== void 0 ? { fill } : {},
23309
+ ...stroke !== void 0 ? { stroke } : {},
23310
+ ...width !== void 0 ? { strokeWidth: width / 9525 } : {}
23311
+ };
23312
+ };
23313
+ return {
23314
+ ...source2.marker ? { marker: resolve3(source2.marker) } : {},
23315
+ ...source2.pointMarkers ? {
23316
+ pointMarkers: Object.fromEntries(
23317
+ Object.entries(source2.pointMarkers).map(([i2, marker3]) => [i2, resolve3(marker3)])
23318
+ )
23319
+ } : {}
23320
+ };
23321
+ }
23322
+
23138
23323
  // chart/render/summary-analysis.ts
23139
23324
  function summaryTrendline(source2) {
23140
23325
  const kind = chartTrendlineKind(source2.trendlineType);
@@ -23409,6 +23594,9 @@ function formatChartNumberWithColor(value3, formatCode) {
23409
23594
  return void 0;
23410
23595
  }
23411
23596
  }
23597
+ function formatChartNumber(value3, formatCode) {
23598
+ return formatChartNumberWithColor(value3, formatCode)?.text;
23599
+ }
23412
23600
 
23413
23601
  // chart/data-label-text.ts
23414
23602
  var DATA_LABEL_SEPARATOR = ", ";
@@ -23457,17 +23645,17 @@ function composeDataLabelText(input) {
23457
23645
  }
23458
23646
 
23459
23647
  // chart/render/summary-labels.ts
23460
- function level(options6, custom) {
23648
+ function level(options7, custom) {
23461
23649
  const out = {};
23462
- if (options6.deleted !== void 0) out.deleted = options6.deleted;
23463
- if (options6.showValue !== void 0) out.showValue = options6.showValue;
23464
- if (options6.showCategoryName !== void 0) out.showCategory = options6.showCategoryName;
23465
- if (options6.showSeriesName !== void 0) out.showSeriesName = options6.showSeriesName;
23466
- if (options6.showPercent !== void 0) out.showPercent = options6.showPercent;
23467
- if (options6.showBubbleSize !== void 0) out.showBubbleSize = options6.showBubbleSize;
23468
- if (options6.separator !== void 0) out.separator = options6.separator;
23469
- if (options6.position) out.position = options6.position;
23470
- if (options6.numberFormat?.formatCode) out.numberFormat = options6.numberFormat.formatCode;
23650
+ if (options7.deleted !== void 0) out.deleted = options7.deleted;
23651
+ if (options7.showValue !== void 0) out.showValue = options7.showValue;
23652
+ if (options7.showCategoryName !== void 0) out.showCategory = options7.showCategoryName;
23653
+ if (options7.showSeriesName !== void 0) out.showSeriesName = options7.showSeriesName;
23654
+ if (options7.showPercent !== void 0) out.showPercent = options7.showPercent;
23655
+ if (options7.showBubbleSize !== void 0) out.showBubbleSize = options7.showBubbleSize;
23656
+ if (options7.separator !== void 0) out.separator = options7.separator;
23657
+ if (options7.position) out.position = options7.position;
23658
+ if (options7.numberFormat?.formatCode) out.numberFormat = options7.numberFormat.formatCode;
23471
23659
  if (custom?.text !== void 0) out.text = custom.text;
23472
23660
  return out;
23473
23661
  }
@@ -23574,7 +23762,10 @@ function extraGroups(chartSpace, firstType) {
23574
23762
  const type = group2.kind === "bar" ? "column" : group2.kind;
23575
23763
  const entry3 = {
23576
23764
  chartType: type,
23577
- series: group2.series.map((source2) => chartSummarySeries(source2, type, group2.dataLabels)),
23765
+ series: group2.series.map((source2, index3) => ({
23766
+ ...chartSummarySeries(source2, type, group2.dataLabels),
23767
+ ...summaryMarkers(source2, group2, index3)
23768
+ })),
23578
23769
  secondary: valueAxisId(chartSpace, group2.axisIds) !== primary
23579
23770
  };
23580
23771
  if (group2.grouping && GROUPINGS.has(group2.grouping))
@@ -23592,13 +23783,16 @@ function chartSummaryFromSpace(chartSpace, extras = {}) {
23592
23783
  const group2 = chartSpace.plotArea.groups[0];
23593
23784
  let chartType = group2 ? GROUP_TYPES[group2.kind] : "column";
23594
23785
  if (chartType === "bar" && group2?.barDirection !== "bar") chartType = "column";
23595
- const series = (group2?.series ?? []).map(
23596
- (source2) => chartSummarySeries(source2, chartType, group2?.dataLabels)
23597
- );
23786
+ const series = (group2?.series ?? []).map((source2, index3) => ({
23787
+ ...chartSummarySeries(source2, chartType, group2?.dataLabels),
23788
+ ...group2 ? summaryMarkers(source2, group2, index3) : {}
23789
+ }));
23598
23790
  const summary = {
23599
23791
  chartType,
23600
23792
  series,
23601
- showLegend: chartSpace.legend !== void 0
23793
+ showLegend: chartSpace.legend !== void 0,
23794
+ axes: chartSpace.plotArea.axes,
23795
+ axisIds: group2?.axisIds ?? []
23602
23796
  };
23603
23797
  const combined = extraGroups(chartSpace, chartType);
23604
23798
  if (combined.length) summary.extraGroups = combined;
@@ -23681,6 +23875,8 @@ function parseChart(xml, anchor, partName, name) {
23681
23875
  showLegend: summary.showLegend,
23682
23876
  partName
23683
23877
  };
23878
+ if (summary.axes) object.axes = summary.axes;
23879
+ if (summary.axisIds) object.axisIds = summary.axisIds;
23684
23880
  if (summary.grouping) object.grouping = summary.grouping;
23685
23881
  if (summary.barGapWidth !== void 0) object.barGapWidth = summary.barGapWidth;
23686
23882
  if (summary.barOverlap !== void 0) object.barOverlap = summary.barOverlap;
@@ -24459,9 +24655,9 @@ function readPrintOptions(node2) {
24459
24655
  for (const key of KEYS) if (boolAttr(node2, key)) out[key] = true;
24460
24656
  return Object.keys(out).length ? out : void 0;
24461
24657
  }
24462
- function printOptionsXml(options6) {
24463
- if (!options6) return "";
24464
- const attrs2 = KEYS.filter((key) => options6[key]).map((key) => ` ${key}="1"`);
24658
+ function printOptionsXml(options7) {
24659
+ if (!options7) return "";
24660
+ const attrs2 = KEYS.filter((key) => options7[key]).map((key) => ` ${key}="1"`);
24465
24661
  return attrs2.length ? `<printOptions${attrs2.join("")}/>` : "";
24466
24662
  }
24467
24663
 
@@ -25000,12 +25196,12 @@ Reply:
25000
25196
 
25001
25197
  // chart/bar-cluster-geometry.ts
25002
25198
  var DEFAULT_BAR_GAP_WIDTH = 150;
25003
- function assertBarClusterOptions(options6) {
25199
+ function assertBarClusterOptions(options7) {
25004
25200
  for (const [field, min, max] of [
25005
25201
  ["barGapWidth", 0, 500],
25006
25202
  ["barOverlap", -100, 100]
25007
25203
  ]) {
25008
- const value3 = options6[field];
25204
+ const value3 = options7[field];
25009
25205
  if (value3 !== void 0 && (!Number.isInteger(value3) || value3 < min || value3 > max))
25010
25206
  throw new RangeError(`${field} must be an integer from ${min} to ${max}`);
25011
25207
  }
@@ -25456,8 +25652,8 @@ function titleXml(context, title) {
25456
25652
  chartTextXml(context, tx, false) + layoutXml(context, title.layout) + valXml("overlay", title.overlay) + shapePropertiesXml(context, title.spPr) + textBodyXml(context, title.txPr) + raw(context, title.extLst)
25457
25653
  );
25458
25654
  }
25459
- function labelOptionsXml(context, options6) {
25460
- return numberFormatXml(options6.numberFormat) + shapePropertiesXml(context, options6.spPr) + textBodyXml(context, options6.txPr) + valXml("dLblPos", options6.position) + valXml("showLegendKey", options6.showLegendKey) + valXml("showVal", options6.showValue) + valXml("showCatName", options6.showCategoryName) + valXml("showSerName", options6.showSeriesName) + valXml("showPercent", options6.showPercent) + valXml("showBubbleSize", options6.showBubbleSize) + (options6.separator === void 0 ? "" : textElement("separator", options6.separator));
25655
+ function labelOptionsXml(context, options7) {
25656
+ return numberFormatXml(options7.numberFormat) + shapePropertiesXml(context, options7.spPr) + textBodyXml(context, options7.txPr) + valXml("dLblPos", options7.position) + valXml("showLegendKey", options7.showLegendKey) + valXml("showVal", options7.showValue) + valXml("showCatName", options7.showCategoryName) + valXml("showSerName", options7.showSeriesName) + valXml("showPercent", options7.showPercent) + valXml("showBubbleSize", options7.showBubbleSize) + (options7.separator === void 0 ? "" : textElement("separator", options7.separator));
25461
25657
  }
25462
25658
  function labelXml(context, label2) {
25463
25659
  return elementXml(
@@ -25627,7 +25823,7 @@ function styleXml(context, space) {
25627
25823
  );
25628
25824
  }
25629
25825
  var relationship = (local, id, content2 = "") => id === void 0 ? "" : elementXml(local, content2, ` r:id="${escapeAttribute(id)}"`);
25630
- function writeChartSpace(space, options6 = {}) {
25826
+ function writeChartSpace(space, options7 = {}) {
25631
25827
  const bindings = new Map(CHART_ROOT_BINDINGS);
25632
25828
  for (const { prefix, uri } of space.namespaceDeclarations ?? [])
25633
25829
  if (!bindings.has(prefix) && /^[A-Za-z_][\w.-]*$/.test(prefix)) bindings.set(prefix, uri);
@@ -25642,7 +25838,7 @@ function writeChartSpace(space, options6 = {}) {
25642
25838
  space.externalDataRelId,
25643
25839
  valXml("autoUpdate", space.externalDataAutoUpdate)
25644
25840
  ) + raw(context, space.printSettings) + relationship("userShapes", space.userShapesRelId) + raw(context, space.extLst);
25645
- const breakAfter = options6.declarationBreak ?? "\r\n";
25841
+ const breakAfter = options7.declarationBreak ?? "\r\n";
25646
25842
  return `${DECLARATION3}${breakAfter}<c:chartSpace${declarations}>${body2}</c:chartSpace>`;
25647
25843
  }
25648
25844
 
@@ -25827,6 +26023,14 @@ function chartColorPalettePatch(chart, id) {
25827
26023
  if (!previous) return copy2;
25828
26024
  const previousChoice = chartPaletteSeriesColorChoice(previous, index3, chart.series.length);
25829
26025
  const nextChoice = chartPaletteSeriesColorChoice(next, index3, chart.series.length);
26026
+ for (const marker3 of [copy2.marker, ...Object.values(copy2.pointMarkers ?? {})]) {
26027
+ const shape2 = marker3?.spPr;
26028
+ if (!shape2) continue;
26029
+ for (const paint2 of [shape2, shape2.line]) {
26030
+ if (paint2?.fill?.kind === "solid" && sameChartColor(paint2.fill.color, previousChoice))
26031
+ paint2.fill = { kind: "solid", color: structuredClone(nextChoice) };
26032
+ }
26033
+ }
25830
26034
  const fill = recolorGradient(copy2.fill, previousChoice, nextChoice);
25831
26035
  if (fill) copy2.fill = fill;
25832
26036
  if (sameChartColor(
@@ -26174,10 +26378,10 @@ var PackageWriter = class {
26174
26378
  async build() {
26175
26379
  const zip = new JSZip2__default.default();
26176
26380
  const date = new Date(Date.UTC(1980, 0, 1));
26177
- const options6 = { date, createFolders: false };
26178
- zip.file("[Content_Types].xml", this.contentTypesXml(), options6);
26381
+ const options7 = { date, createFolders: false };
26382
+ zip.file("[Content_Types].xml", this.contentTypesXml(), options7);
26179
26383
  const names = [...this.parts.keys()].sort((a2, b) => rank2(a2) - rank2(b) || a2.localeCompare(b));
26180
- for (const name of names) zip.file(name, this.parts.get(name) ?? "", options6);
26384
+ for (const name of names) zip.file(name, this.parts.get(name) ?? "", options7);
26181
26385
  return zip.generateAsync({
26182
26386
  type: "uint8array",
26183
26387
  compression: "DEFLATE",
@@ -32836,15 +33040,15 @@ function pasteAt(ctx, s, at, payload, request) {
32836
33040
  function pasteSelection(ctx, sheet, selection, payload, request) {
32837
33041
  const dest = normalizeRange(selection);
32838
33042
  const clip = typeof payload === "string" ? { tsv: payload, html: "", cells: cellsFromText(ctx.workbook, payload) } : payload;
32839
- const options6 = resolvePasteOptions(request);
32840
- if (options6.mode === "widths")
32841
- return pasteWidths(ctx, sheet, dest, clip.cells, options6.transpose, !!clip.cut);
32842
- const height = options6.transpose ? clip.cells.cols : clip.cells.rows;
32843
- const width = options6.transpose ? clip.cells.rows : clip.cells.cols;
33043
+ const options7 = resolvePasteOptions(request);
33044
+ if (options7.mode === "widths")
33045
+ return pasteWidths(ctx, sheet, dest, clip.cells, options7.transpose, !!clip.cut);
33046
+ const height = options7.transpose ? clip.cells.cols : clip.cells.rows;
33047
+ const width = options7.transpose ? clip.cells.rows : clip.cells.cols;
32844
33048
  const rows2 = dest.end.row - dest.start.row + 1;
32845
33049
  const cols = dest.end.col - dest.start.col + 1;
32846
33050
  if (clip.cut || !height || !width || rows2 === 1 && cols === 1 || dest.start.row === 0 && dest.end.row === MAX_ROW || dest.start.col === 0 && dest.end.col === MAX_COL)
32847
- return pasteAt(ctx, sheet, dest.start, clip, options6);
33051
+ return pasteAt(ctx, sheet, dest.start, clip, options7);
32848
33052
  if (rows2 % height || cols % width)
32849
33053
  throw new RangeError("The copy and paste areas are not compatible sizes.");
32850
33054
  if (rows2 * cols > 25e4) throw new RangeError("The selected paste area is too large.");
@@ -32864,16 +33068,16 @@ function pasteSelection(ctx, sheet, selection, payload, request) {
32864
33068
  () => {
32865
33069
  for (let row2 = dest.start.row; row2 <= dest.end.row; row2 += height)
32866
33070
  for (let col = dest.start.col; col <= dest.end.col; col += width)
32867
- pasteAt(tileContext, sheet, { row: row2, col }, tileClip, options6);
32868
- if (["all", "formats", "noBorders", "mergeFormats"].includes(options6.mode))
33071
+ pasteAt(tileContext, sheet, { row: row2, col }, tileClip, options7);
33072
+ if (["all", "formats", "noBorders", "mergeFormats"].includes(options7.mode))
32869
33073
  pasteConditionalFormats(
32870
33074
  sheetAt(ctx.workbook, sheet),
32871
33075
  dest,
32872
33076
  clip.cells,
32873
- options6.transpose,
32874
- options6.skipBlanks,
33077
+ options7.transpose,
33078
+ options7.skipBlanks,
32875
33079
  void 0,
32876
- options6.mode === "mergeFormats"
33080
+ options7.mode === "mergeFormats"
32877
33081
  );
32878
33082
  return dest;
32879
33083
  },
@@ -33324,7 +33528,7 @@ function numberInputText(value3, numFmt, date1904 = false) {
33324
33528
  if (/%/.test(numFmt.replace(/"[^"]*"|\\./g, ""))) return `${plainNumber(value3 * 100)}%`;
33325
33529
  return plainNumber(value3);
33326
33530
  }
33327
- function formulaBarText(workbook, cell, options6 = {}) {
33531
+ function formulaBarText(workbook, cell, options7 = {}) {
33328
33532
  if (!cell) return "";
33329
33533
  if (cell.formula !== void 0) return `=${cell.formula}`;
33330
33534
  const value3 = cell.value;
@@ -33338,7 +33542,7 @@ function formulaBarText(workbook, cell, options6 = {}) {
33338
33542
  workbook.date1904
33339
33543
  );
33340
33544
  const text4 = cell.richText?.length ? cell.richText.map((run2) => run2.text).join("") : value3;
33341
- if (text4 === "" || options6.quote === false) return text4;
33545
+ if (text4 === "" || options7.quote === false) return text4;
33342
33546
  const parsed = parseCellInput(text4, { date1904: workbook.date1904 });
33343
33547
  const literal2 = parsed.formula === void 0 && parsed.value === text4;
33344
33548
  return literal2 ? text4 : `'${text4}`;
@@ -33964,9 +34168,9 @@ var SessionCalculator = class {
33964
34168
  // xlsx/edit/goal-solver.ts
33965
34169
  var DEFAULT_GOAL_ITERATIONS = 100;
33966
34170
  var DEFAULT_GOAL_MAX_CHANGE = 1e-3;
33967
- function solveGoal(f6, goal, start, options6 = {}) {
33968
- const maxIterations = options6.maxIterations ?? DEFAULT_GOAL_ITERATIONS;
33969
- const tolerance = options6.maxChange ?? DEFAULT_GOAL_MAX_CHANGE;
34171
+ function solveGoal(f6, goal, start, options7 = {}) {
34172
+ const maxIterations = options7.maxIterations ?? DEFAULT_GOAL_ITERATIONS;
34173
+ const tolerance = options7.maxChange ?? DEFAULT_GOAL_MAX_CHANGE;
33970
34174
  let iterations = 0;
33971
34175
  let best;
33972
34176
  let negative;
@@ -34443,10 +34647,10 @@ function columnOverrides(sheet, mdw, defaultPx) {
34443
34647
  }
34444
34648
  return out;
34445
34649
  }
34446
- function createGridMetrics(sheet, options6 = {}) {
34447
- const zoom = zoomPercent(options6.zoom ?? sheet.view.zoom);
34650
+ function createGridMetrics(sheet, options7 = {}) {
34651
+ const zoom = zoomPercent(options7.zoom ?? sheet.view.zoom);
34448
34652
  const factor = zoom / 100;
34449
- const mdw = options6.mdw ?? DEFAULT_MAX_DIGIT_WIDTH;
34653
+ const mdw = options7.mdw ?? DEFAULT_MAX_DIGIT_WIDTH;
34450
34654
  const scale2 = (px) => px > 0 ? Math.max(1, Math.round(px * factor)) : 0;
34451
34655
  const defaultColPx = defaultColumnPixels(sheet.defaultColWidth, mdw);
34452
34656
  const colOverrides = [...columnOverrides(sheet, mdw, defaultColPx)].map(
@@ -34468,8 +34672,8 @@ function createGridMetrics(sheet, options6 = {}) {
34468
34672
  for (const merge2 of sheet.merges) lastColUsed = Math.max(lastColUsed, merge2.end.col);
34469
34673
  for (const info of sheet.columns)
34470
34674
  if (info.max < MAX_COL) lastColUsed = Math.max(lastColUsed, info.max);
34471
- const lastRow = Math.min(MAX_ROW, lastRowUsed + (options6.extraRows ?? 50));
34472
- const lastCol = Math.min(MAX_COL, lastColUsed + (options6.extraCols ?? 20));
34675
+ const lastRow = Math.min(MAX_ROW, lastRowUsed + (options7.extraRows ?? 50));
34676
+ const lastCol = Math.min(MAX_COL, lastColUsed + (options7.extraCols ?? 20));
34473
34677
  return {
34474
34678
  zoom,
34475
34679
  lastRow,
@@ -34689,37 +34893,37 @@ function writePivot(ctx, s, pivot, old, label2, inside) {
34689
34893
  );
34690
34894
  }
34691
34895
  var startRow = (range2, offset2) => range2.start.row + offset2;
34692
- function createPivotTable(ctx, s, destination, options6) {
34693
- const data = pivotSourceData(ctx.workbook, s, options6.source);
34694
- const name = options6.name ?? uniqueName(ctx);
34896
+ function createPivotTable(ctx, s, destination, options7) {
34897
+ const data = pivotSourceData(ctx.workbook, s, options7.source);
34898
+ const name = options7.name ?? uniqueName(ctx);
34695
34899
  checkName2(ctx, name);
34696
- const aggregate3 = options6.aggregate ?? "sum";
34697
- const captions = authoredCaptions(options6);
34900
+ const aggregate3 = options7.aggregate ?? "sum";
34901
+ const captions = authoredCaptions(options7);
34698
34902
  const pivot = {
34699
34903
  ...data,
34700
34904
  ...captions ? { captions } : {},
34701
34905
  name,
34702
- rowField: options6.rowField,
34703
- layout: options6.layout ?? "tabular",
34704
- subtotalPosition: options6.subtotalPosition ?? (options6.layout && options6.layout !== "tabular" ? "top" : "bottom"),
34705
- ...options6.secondRowField ? { secondRowField: options6.secondRowField } : {},
34706
- ...options6.secondRowField && options6.moreRowFields?.length ? { moreRowFields: [...options6.moreRowFields] } : {},
34707
- ...options6.fieldSubtotals?.length ? { fieldSubtotals: normalizedFieldSubtotals(options6.fieldSubtotals) } : {},
34708
- ...options6.dateGroups?.length ? { dateGroups: structuredClone(options6.dateGroups) } : {},
34906
+ rowField: options7.rowField,
34907
+ layout: options7.layout ?? "tabular",
34908
+ subtotalPosition: options7.subtotalPosition ?? (options7.layout && options7.layout !== "tabular" ? "top" : "bottom"),
34909
+ ...options7.secondRowField ? { secondRowField: options7.secondRowField } : {},
34910
+ ...options7.secondRowField && options7.moreRowFields?.length ? { moreRowFields: [...options7.moreRowFields] } : {},
34911
+ ...options7.fieldSubtotals?.length ? { fieldSubtotals: normalizedFieldSubtotals(options7.fieldSubtotals) } : {},
34912
+ ...options7.dateGroups?.length ? { dateGroups: structuredClone(options7.dateGroups) } : {},
34709
34913
  ...ctx.workbook.date1904 ? { date1904: true } : {},
34710
- ...options6.subtotals !== void 0 ? { subtotals: options6.subtotals } : {},
34711
- ...options6.repeatLabels !== void 0 ? { repeatLabels: options6.repeatLabels } : {},
34712
- valueField: options6.valueField,
34914
+ ...options7.subtotals !== void 0 ? { subtotals: options7.subtotals } : {},
34915
+ ...options7.repeatLabels !== void 0 ? { repeatLabels: options7.repeatLabels } : {},
34916
+ valueField: options7.valueField,
34713
34917
  aggregate: aggregate3,
34714
- valueCaption: pivotCaption(aggregate3, options6.valueField, { captions }),
34715
- ...options6.pageFilter !== void 0 ? { pageFilter: structuredClone(options6.pageFilter) } : {},
34716
- ...options6.fieldGroups?.length ? { fieldGroups: structuredClone(options6.fieldGroups) } : {},
34717
- ...options6.valuesAxis !== void 0 ? { valuesAxis: options6.valuesAxis } : {},
34718
- ...options6.valuesPosition !== void 0 ? { valuesPosition: options6.valuesPosition } : {},
34719
- ...options6.additionalValues ? { additionalValues: normalizedPivotMeasures(options6.additionalValues, { captions }) } : {},
34918
+ valueCaption: pivotCaption(aggregate3, options7.valueField, { captions }),
34919
+ ...options7.pageFilter !== void 0 ? { pageFilter: structuredClone(options7.pageFilter) } : {},
34920
+ ...options7.fieldGroups?.length ? { fieldGroups: structuredClone(options7.fieldGroups) } : {},
34921
+ ...options7.valuesAxis !== void 0 ? { valuesAxis: options7.valuesAxis } : {},
34922
+ ...options7.valuesPosition !== void 0 ? { valuesPosition: options7.valuesPosition } : {},
34923
+ ...options7.additionalValues ? { additionalValues: normalizedPivotMeasures(options7.additionalValues, { captions }) } : {},
34720
34924
  location: { start: { ...destination }, end: { ...destination } },
34721
- ...options6.columnField ? { columnField: options6.columnField } : {},
34722
- ...options6.columnField && options6.moreColumnFields?.length ? { moreColumnFields: [...options6.moreColumnFields] } : {}
34925
+ ...options7.columnField ? { columnField: options7.columnField } : {},
34926
+ ...options7.columnField && options7.moreColumnFields?.length ? { moreColumnFields: [...options7.moreColumnFields] } : {}
34723
34927
  };
34724
34928
  if (pivot.dateGroups) reconcileDateAxes(pivot);
34725
34929
  const dates = pivotDateFieldsOf(ctx.workbook, s, pivot);
@@ -38474,7 +38678,7 @@ function displayText2(value3, style3, numFmt, workbook, sheet) {
38474
38678
  });
38475
38679
  return formatted.color ? { text: formatted.text, color: formatted.color } : { text: formatted.text };
38476
38680
  }
38477
- function cellView(workbook, sheetIndex2, row2, col, cf, options6 = {}) {
38681
+ function cellView(workbook, sheetIndex2, row2, col, cf, options7 = {}) {
38478
38682
  const sheet = workbook.sheets[sheetIndex2];
38479
38683
  if (!sheet) throw new RangeError(`No sheet at index ${sheetIndex2}`);
38480
38684
  const cell = getCell(sheet, row2, col);
@@ -38513,10 +38717,10 @@ function cellView(workbook, sheetIndex2, row2, col, cf, options6 = {}) {
38513
38717
  vAlign: alignment.vertical ?? "bottom",
38514
38718
  wrap: wrap3,
38515
38719
  shrink,
38516
- indentPx: indentable ? (alignment.indent ?? 0) * (options6.indentPx ?? INDENT_PX_PER_LEVEL) : 0,
38720
+ indentPx: indentable ? (alignment.indent ?? 0) * (options7.indentPx ?? INDENT_PX_PER_LEVEL) : 0,
38517
38721
  rotation,
38518
38722
  isNumber: isNumber2,
38519
- overflow: (formulaText !== void 0 || typeof value3 === "string" && value3 !== "") && !wrap3 && !shrink && rotation === 0 && !vertical2 && hAlign !== "fill" && !(options6.merged ?? sheet.merges.some((m) => rangeContains(m, { row: row2, col }))),
38723
+ overflow: (formulaText !== void 0 || typeof value3 === "string" && value3 !== "") && !wrap3 && !shrink && rotation === 0 && !vertical2 && hAlign !== "fill" && !(options7.merged ?? sheet.merges.some((m) => rangeContains(m, { row: row2, col }))),
38520
38724
  hasComment: sheet.comments.some((c2) => c2.address.row === row2 && c2.address.col === col),
38521
38725
  hasHyperlink: false,
38522
38726
  validationList: sheet.dataValidations.some(
@@ -39132,11 +39336,11 @@ function check2(workbook, dv, value3, at, evaluate) {
39132
39336
  if (dv.type === "whole" && !Number.isInteger(n2)) return false;
39133
39337
  return compare(operator, n2, a2, b);
39134
39338
  }
39135
- function validateCellInput(workbook, sheet, row2, col, value3, options6 = {}) {
39339
+ function validateCellInput(workbook, sheet, row2, col, value3, options7 = {}) {
39136
39340
  const dv = validationAt(workbook, sheet, row2, col);
39137
39341
  if (!dv || dv.type === "none" || dv.showErrorMessage !== true) return { ok: true };
39138
39342
  if (value3 === null || value3 === "") return dv.allowBlank === false ? failure(dv) : { ok: true };
39139
- const evaluate = options6.evaluate ?? defaultEvaluate(workbook);
39343
+ const evaluate = options7.evaluate ?? defaultEvaluate(workbook);
39140
39344
  return check2(workbook, dv, value3, { sheet, row: row2, col }, evaluate) ? { ok: true } : failure(dv);
39141
39345
  }
39142
39346
  function failure(dv) {
@@ -39150,10 +39354,10 @@ function failure(dv) {
39150
39354
  }
39151
39355
 
39152
39356
  // xlsx/edit/session.ts
39153
- function createEditSession(workbook, options6 = {}) {
39357
+ function createEditSession(workbook, options7 = {}) {
39154
39358
  const calc = createCalcEngine(workbook);
39155
- const autoRecalc = options6.recalc ?? true;
39156
- const history = new History(options6.historyLimit ?? 100);
39359
+ const autoRecalc = options7.recalc ?? true;
39360
+ const history = new History(options7.historyLimit ?? 100);
39157
39361
  const listeners2 = /* @__PURE__ */ new Set();
39158
39362
  let open;
39159
39363
  const emit = (change) => {
@@ -39252,8 +39456,8 @@ function createEditSession(workbook, options6 = {}) {
39252
39456
  return result2;
39253
39457
  };
39254
39458
  const ctx = { workbook, calc, run: run2 };
39255
- if (options6.defaultSheetBase) ctx.defaultSheetBase = options6.defaultSheetBase;
39256
- const autoRows = options6.autoRowHeight ?? true;
39459
+ if (options7.defaultSheetBase) ctx.defaultSheetBase = options7.defaultSheetBase;
39460
+ const autoRows = options7.autoRowHeight ?? true;
39257
39461
  const refitRows = (current) => {
39258
39462
  const { sheet: s, kind, ranges } = current;
39259
39463
  if (!autoRows || s === void 0 || !ranges.length || !current.step.entries.length) return;
@@ -39261,7 +39465,7 @@ function createEditSession(workbook, options6 = {}) {
39261
39465
  const sheet = workbook.sheets[s];
39262
39466
  if (!sheet) return;
39263
39467
  try {
39264
- autoGrowRows(ctx, s, rowsToRefit(sheet, ranges), options6.measureText);
39468
+ autoGrowRows(ctx, s, rowsToRefit(sheet, ranges), options7.measureText);
39265
39469
  } catch (error) {
39266
39470
  const message = `Row height update failed: ${error instanceof Error ? error.message : String(error)}`;
39267
39471
  if (!workbook.warnings.includes(message)) workbook.warnings.push(message);
@@ -39324,7 +39528,7 @@ function createEditSession(workbook, options6 = {}) {
39324
39528
  setDefinedName: (name) => setDefinedName(ctx, name),
39325
39529
  deleteDefinedName: (name, localSheet) => deleteDefinedName(ctx, name, localSheet),
39326
39530
  setDrawingAnchor: (s, index3, anchor) => setDrawingAnchor(ctx, s, index3, anchor),
39327
- createPivotTable: (s, destination, options7) => createPivotTable(ctx, s, destination, options7),
39531
+ createPivotTable: (s, destination, options8) => createPivotTable(ctx, s, destination, options8),
39328
39532
  refreshPivotTable: (s, name, patch2) => refreshPivotTable(ctx, s, name, patch2),
39329
39533
  deletePivotTable: (s, name) => deletePivotTable(ctx, s, name),
39330
39534
  setSlicerSelection: (cache3, keys) => setSlicerSelection(ctx, cache3, keys),
@@ -39374,8 +39578,8 @@ function createEditSession(workbook, options6 = {}) {
39374
39578
  setDocumentProperties: (patch2) => setDocumentProperties(ctx, patch2),
39375
39579
  setAutoRecalc: (enabled) => setCalcMode(ctx, enabled ? "auto" : "manual"),
39376
39580
  autoRecalc: () => autoRecalc && calcModeOf(workbook) === "auto",
39377
- calculateNow(options7) {
39378
- calculator.now(options7?.full ?? false);
39581
+ calculateNow(options8) {
39582
+ calculator.now(options8?.full ?? false);
39379
39583
  emit({ kind: "cells", label: "Calculate now", structural: false });
39380
39584
  },
39381
39585
  prepareCalculation: (opts) => calculator.prepare(opts?.timeRemaining),
@@ -39507,14 +39711,14 @@ function dataBarAppearance(rule, workbook) {
39507
39711
  }
39508
39712
 
39509
39713
  // xlsx/layout/data-bar-geometry.ts
39510
- function dataBarGeometry(value3, low, high, options6) {
39511
- const lo = options6.autoMin ? Math.min(0, low) : low;
39512
- const hi = options6.autoMax ? Math.max(0, high) : high;
39714
+ function dataBarGeometry(value3, low, high, options7) {
39715
+ const lo = options7.autoMin ? Math.min(0, low) : low;
39716
+ const hi = options7.autoMax ? Math.max(0, high) : high;
39513
39717
  const clamp = (v) => Math.max(0, Math.min(1, v));
39514
- const minimum = options6.minLength;
39515
- const delta = options6.maxLength - minimum;
39718
+ const minimum = options7.minLength;
39719
+ const delta = options7.maxLength - minimum;
39516
39720
  const interpolate2 = (ratio, offset2 = minimum) => clamp(offset2 + clamp(ratio) * delta);
39517
- if (options6.axis === "none") {
39721
+ if (options7.axis === "none") {
39518
39722
  const ratio = hi > lo ? clamp((value3 - lo) / (hi - lo)) : 0.5;
39519
39723
  return {
39520
39724
  start: 0,
@@ -39522,7 +39726,7 @@ function dataBarGeometry(value3, low, high, options6) {
39522
39726
  reverse: false
39523
39727
  };
39524
39728
  }
39525
- if (options6.axis === "middle") {
39729
+ if (options7.axis === "middle") {
39526
39730
  const span4 = Math.max(Math.abs(lo), Math.abs(hi));
39527
39731
  const fraction2 = interpolate2(span4 > 0 ? Math.abs(value3) / span4 : 0) / 2;
39528
39732
  return { start: value3 < 0 ? 0.5 - fraction2 : 0.5, fraction: fraction2, axis: 0.5, reverse: value3 < 0 };
@@ -39534,7 +39738,7 @@ function dataBarGeometry(value3, low, high, options6) {
39534
39738
  }
39535
39739
  if (hi <= 0) {
39536
39740
  const fraction2 = hi > lo ? interpolate2((hi - value3) / (hi - lo), hi === 0 ? minimum / 2 : minimum) : interpolate2(0.5);
39537
- const axis2 = hi === 0 ? (1 + options6.maxLength - minimum) / 2 : options6.maxLength;
39741
+ const axis2 = hi === 0 ? (1 + options7.maxLength - minimum) / 2 : options7.maxLength;
39538
39742
  return {
39539
39743
  start: axis2 - fraction2,
39540
39744
  fraction: fraction2,
@@ -39542,7 +39746,7 @@ function dataBarGeometry(value3, low, high, options6) {
39542
39746
  reverse: true
39543
39747
  };
39544
39748
  }
39545
- const axis = (1 - options6.maxLength + minimum) / 2 + -lo / (hi - lo) * delta;
39749
+ const axis = (1 - options7.maxLength + minimum) / 2 + -lo / (hi - lo) * delta;
39546
39750
  const bounded = Math.max(lo, Math.min(hi, value3));
39547
39751
  const fraction = interpolate2(Math.abs(bounded) / (hi - lo), minimum / 2);
39548
39752
  return { start: bounded < 0 ? axis - fraction : axis, fraction, axis, reverse: bounded < 0 };
@@ -39648,10 +39852,10 @@ function valueText(value3) {
39648
39852
 
39649
39853
  // xlsx/layout/cf-evaluator.ts
39650
39854
  var GRAPHIC_RULES = /* @__PURE__ */ new Set(["colorScale", "dataBar", "iconSet"]);
39651
- function createConditionalFormatEvaluator(workbook, sheetIndex2, evaluate, options6 = {}) {
39855
+ function createConditionalFormatEvaluator(workbook, sheetIndex2, evaluate, options7 = {}) {
39652
39856
  const sheet = workbook.sheets[sheetIndex2];
39653
39857
  if (!sheet) return { at: () => void 0 };
39654
- const translate2 = options6.translate ?? translateFormula;
39858
+ const translate2 = options7.translate ?? translateFormula;
39655
39859
  const entries = [];
39656
39860
  let order = 0;
39657
39861
  for (const format of sheet.conditionalFormats)
@@ -39671,7 +39875,7 @@ function createConditionalFormatEvaluator(workbook, sheetIndex2, evaluate, optio
39671
39875
  let todaySerial;
39672
39876
  const today = () => {
39673
39877
  if (todaySerial !== void 0) return todaySerial;
39674
- let serial = options6.today?.();
39878
+ let serial = options7.today?.();
39675
39879
  if (serial === void 0) {
39676
39880
  const anchor = { sheet: sheetIndex2, row: 0, col: 0 };
39677
39881
  let raw2 = null;
@@ -39936,14 +40140,14 @@ function* units(raw2) {
39936
40140
  exp2++;
39937
40141
  }
39938
40142
  }
39939
- function niceScale(dataMin, dataMax, options6 = {}) {
39940
- const maxIntervals = Math.max(1, options6.maxIntervals ?? 10);
40143
+ function niceScale(dataMin, dataMax, options7 = {}) {
40144
+ const maxIntervals = Math.max(1, options7.maxIntervals ?? 10);
39941
40145
  let lo = Number.isFinite(dataMin) ? dataMin : 0;
39942
40146
  let hi = Number.isFinite(dataMax) ? dataMax : 0;
39943
40147
  if (lo > hi) [lo, hi] = [hi, lo];
39944
40148
  if (lo === hi) {
39945
40149
  if (lo === 0) hi = 1;
39946
- else if (options6.noZero) {
40150
+ else if (options7.noZero) {
39947
40151
  const pad7 = Math.abs(lo) * 0.1 || 1;
39948
40152
  lo -= pad7;
39949
40153
  hi += pad7;
@@ -39952,7 +40156,7 @@ function niceScale(dataMin, dataMax, options6 = {}) {
39952
40156
  }
39953
40157
  let fixedLo = false;
39954
40158
  let fixedHi = false;
39955
- if (!options6.noZero) {
40159
+ if (!options7.noZero) {
39956
40160
  if (lo >= 0 && hi - lo >= hi / 6) {
39957
40161
  lo = 0;
39958
40162
  fixedLo = true;
@@ -39992,6 +40196,202 @@ function formatAxisValue(value3, percent = false) {
39992
40196
  return `${v < 0 ? "-" : ""}${grouped}${frac ? `.${frac}` : ""}`;
39993
40197
  }
39994
40198
 
40199
+ // chart/axis-range.ts
40200
+ function computeLogValueRange(series, logBase) {
40201
+ const allValues = series.flatMap((item) => item.values).filter((value3) => value3 !== null && Number.isFinite(value3) && value3 > 0);
40202
+ if (allValues.length === 0) {
40203
+ return { min: 1, max: logBase, span: 1, logScale: true, logBase };
40204
+ }
40205
+ const dataMin = Math.min(...allValues);
40206
+ const dataMax = Math.max(...allValues);
40207
+ const logMin = Math.floor(Math.log(dataMin) / Math.log(logBase));
40208
+ const logMax = Math.ceil(Math.log(dataMax) / Math.log(logBase));
40209
+ const min = logBase ** logMin;
40210
+ const max = logBase ** Math.max(logMax, logMin + 1);
40211
+ return {
40212
+ min,
40213
+ max,
40214
+ span: Math.max(Math.log(max) / Math.log(logBase) - Math.log(min) / Math.log(logBase), 1),
40215
+ logScale: true,
40216
+ logBase
40217
+ };
40218
+ }
40219
+ function withAxisBounds(automatic, axis, logBase) {
40220
+ const validMin = typeof axis?.min === "number" && Number.isFinite(axis.min) && (!logBase || axis.min > 0) ? axis.min : void 0;
40221
+ const validMax = typeof axis?.max === "number" && Number.isFinite(axis.max) && (!logBase || axis.max > 0) ? axis.max : void 0;
40222
+ const min = validMin ?? automatic.min;
40223
+ let max = validMax ?? automatic.max;
40224
+ const majorUnit = validMin === void 0 && validMax === void 0 ? automatic.majorUnit : void 0;
40225
+ if (max <= min) {
40226
+ max = logBase ? min * logBase : min + 1;
40227
+ }
40228
+ const span4 = logBase ? Math.log(max) / Math.log(logBase) - Math.log(min) / Math.log(logBase) : max - min;
40229
+ return {
40230
+ min,
40231
+ max,
40232
+ span: Math.max(span4, Number.EPSILON),
40233
+ ...majorUnit !== void 0 ? { majorUnit } : {},
40234
+ ...logBase ? { logScale: true, logBase } : {},
40235
+ ...axis?.orientation === "maxMin" ? { reverseOrder: true } : {}
40236
+ };
40237
+ }
40238
+
40239
+ // chart/axis-ticks.ts
40240
+ var LOG_EXPONENT_TOLERANCE = 1e-12;
40241
+ function generateLogTicks(range2) {
40242
+ if (!range2.logScale || !range2.logBase) {
40243
+ return [];
40244
+ }
40245
+ const base = range2.logBase;
40246
+ const logMin = Math.log(range2.min) / Math.log(base);
40247
+ const logMax = Math.log(range2.max) / Math.log(base);
40248
+ const firstExponent = Math.ceil(logMin - LOG_EXPONENT_TOLERANCE);
40249
+ const lastExponent = Math.floor(logMax + LOG_EXPONENT_TOLERANCE);
40250
+ if (lastExponent < firstExponent) {
40251
+ return range2.min === range2.max ? [range2.min] : [range2.min, range2.max];
40252
+ }
40253
+ return Array.from(
40254
+ { length: lastExponent - firstExponent + 1 },
40255
+ (_unused, index3) => base ** (firstExponent + index3)
40256
+ );
40257
+ }
40258
+ function generateIntervalTicks(range2, unit) {
40259
+ if (!Number.isFinite(unit) || unit <= 0 || range2.logScale) {
40260
+ return [];
40261
+ }
40262
+ const tolerance = Math.max(1, Math.abs(range2.min), Math.abs(range2.max)) * 1e-12;
40263
+ const first2 = Math.ceil((range2.min - tolerance) / unit);
40264
+ const last = Math.floor((range2.max + tolerance) / unit);
40265
+ const count2 = Math.min(Math.max(last - first2 + 1, 0), 2e3);
40266
+ return Array.from({ length: count2 }, (_, index3) => (first2 + index3) * unit);
40267
+ }
40268
+ function generateAxisTicks(range2, axis, defaultIntervals) {
40269
+ if (range2.logScale && range2.logBase) {
40270
+ return generateLogTicks(range2);
40271
+ }
40272
+ const explicit = generateIntervalTicks(range2, axis?.majorUnit ?? 0);
40273
+ if (explicit.length > 0) {
40274
+ return explicit;
40275
+ }
40276
+ const automatic = generateIntervalTicks(range2, range2.majorUnit ?? 0);
40277
+ if (automatic.length > 0) {
40278
+ return automatic;
40279
+ }
40280
+ return Array.from(
40281
+ { length: defaultIntervals + 1 },
40282
+ (_, index3) => range2.min + range2.span / defaultIntervals * index3
40283
+ );
40284
+ }
40285
+ function generateMinorAxisTicks(range2, axis) {
40286
+ const minor = generateIntervalTicks(range2, axis?.minorUnit ?? 0);
40287
+ if (minor.length === 0) {
40288
+ return [];
40289
+ }
40290
+ const majorUnit = axis?.majorUnit;
40291
+ if (!majorUnit || !Number.isFinite(majorUnit) || majorUnit <= 0) {
40292
+ return minor;
40293
+ }
40294
+ const tolerance = Math.max(1, Math.abs(range2.min), Math.abs(range2.max)) * 1e-10;
40295
+ return minor.filter(
40296
+ (value3) => Math.abs(value3 / majorUnit - Math.round(value3 / majorUnit)) > tolerance
40297
+ );
40298
+ }
40299
+
40300
+ // chart/render/chart-view-axes.ts
40301
+ function chartAxisRatio(value3, scale2, axis) {
40302
+ const range2 = axis?.range;
40303
+ const ratio = range2?.logScale ? Math.log(Math.max(value3, range2.min) / range2.min) / Math.log(range2.max / range2.min) : (value3 - scale2.min) / (scale2.max - scale2.min || 1);
40304
+ return range2?.reverseOrder ? 1 - ratio : ratio;
40305
+ }
40306
+ function chartAxisLabels(axis) {
40307
+ return axis?.source.deleted !== true && axis?.source.tickLabelPosition !== "none";
40308
+ }
40309
+ function options(axis) {
40310
+ return {
40311
+ ...axis.scaling,
40312
+ ...axis.scaling.logBase === void 0 ? {} : { logScale: true },
40313
+ ...axis.majorUnit === void 0 ? {} : { majorUnit: axis.majorUnit },
40314
+ ...axis.minorUnit === void 0 ? {} : { minorUnit: axis.minorUnit }
40315
+ };
40316
+ }
40317
+ function applyChartAxes(model, chart, color) {
40318
+ if (!chart.axes?.length) return;
40319
+ const axes2 = chart.axes;
40320
+ const linked = axes2.filter((axis) => axis.id !== void 0 && chart.axisIds?.includes(axis.id));
40321
+ const candidates = linked.length ? linked : axes2;
40322
+ const xy = model.type === "scatter" || model.type === "bubble";
40323
+ const value3 = candidates.find((axis) => axis.kind === "val" && !["b", "t"].includes(axis.position ?? "")) ?? candidates.find((axis) => axis.kind === "val");
40324
+ const category = candidates.find(
40325
+ (axis) => xy ? axis.kind === "val" && axis !== value3 : axis.kind === "cat" || axis.kind === "date"
40326
+ );
40327
+ const secondary = axes2.find((axis) => axis.kind === "val" && axis !== value3 && axis !== category);
40328
+ const paint2 = (shape2) => {
40329
+ const ln2 = shape2?.line;
40330
+ const fill = ln2?.fill;
40331
+ const resolved = fill?.kind === "none" ? "none" : color(fill?.kind === "solid" ? fill.color : void 0);
40332
+ return {
40333
+ ...resolved === void 0 ? {} : { color: resolved },
40334
+ ...ln2?.widthEmu === void 0 ? {} : { width: ln2.widthEmu / EMU_PER_PIXEL },
40335
+ ...ln2?.dash === void 0 ? {} : { dash: ln2.dash }
40336
+ };
40337
+ };
40338
+ const bind = (axis, scale2, values2) => {
40339
+ const opts = options(axis);
40340
+ const automatic = opts.logScale ? computeLogValueRange(
40341
+ [{ values: values2 ?? [] }],
40342
+ opts.logBase && Number.isFinite(opts.logBase) && opts.logBase > 1 ? opts.logBase : 10
40343
+ ) : {
40344
+ min: scale2?.min ?? 0,
40345
+ max: scale2?.max ?? 1,
40346
+ span: (scale2?.max ?? 1) - (scale2?.min ?? 0),
40347
+ ...scale2 ? { majorUnit: scale2.majorUnit } : {}
40348
+ };
40349
+ const logBase = automatic.logBase;
40350
+ const range2 = withAxisBounds(automatic, opts, logBase);
40351
+ if (scale2) {
40352
+ scale2.min = range2.min;
40353
+ scale2.max = range2.max;
40354
+ scale2.ticks = generateAxisTicks(range2, opts, 5);
40355
+ }
40356
+ return {
40357
+ source: axis,
40358
+ range: range2,
40359
+ minorTicks: generateMinorAxisTicks(range2, opts),
40360
+ line: paint2(axis.spPr),
40361
+ majorGrid: paint2(axis.majorGridlinesSpPr),
40362
+ minorGrid: paint2(axis.minorGridlinesSpPr)
40363
+ };
40364
+ };
40365
+ const out = {};
40366
+ if (value3)
40367
+ out.value = bind(
40368
+ value3,
40369
+ model.valueAxis,
40370
+ [
40371
+ ...model.series,
40372
+ ...model.extraGroups?.filter((g2) => !g2.secondary).flatMap((g2) => g2.series) ?? []
40373
+ ].flatMap((s) => s.values)
40374
+ );
40375
+ if (category)
40376
+ out.category = bind(
40377
+ category,
40378
+ model.xAxis ?? {
40379
+ min: 0,
40380
+ max: Math.max(1, model.categories.length - 1),
40381
+ majorUnit: 1,
40382
+ ticks: []
40383
+ },
40384
+ model.series.flatMap((s) => s.xValues ?? [])
40385
+ );
40386
+ if (secondary)
40387
+ out.secondary = bind(
40388
+ secondary,
40389
+ model.secondaryAxis,
40390
+ model.extraGroups?.filter((g2) => g2.secondary).flatMap((g2) => g2.series.flatMap((s) => s.values))
40391
+ );
40392
+ model.axes = out;
40393
+ }
40394
+
39995
40395
  // chart/treemap-squarify.ts
39996
40396
  function worstAspectRatio(areas, side) {
39997
40397
  const sum3 = areas.reduce((total2, area) => total2 + area, 0);
@@ -40464,15 +40864,15 @@ function seriesName(series, index3, evaluateRef2) {
40464
40864
  const fromRef = resolveRef(series.nameRef, evaluateRef2)?.map(toText2).filter((t) => t !== "").join(" ");
40465
40865
  return fromRef || series.name || `Series${index3 + 1}`;
40466
40866
  }
40467
- function seriesContext(chart, theme2, options6) {
40867
+ function seriesContext(chart, theme2, options7) {
40468
40868
  const scheme = chartColorScheme(theme2);
40469
40869
  const resolver = { scheme: (name) => scheme[name] };
40470
40870
  return {
40471
40871
  theme: theme2,
40472
40872
  scheme,
40473
40873
  palette: chart.colorPalette === void 0 ? void 0 : findChartColorPalette(chart.colorPalette),
40474
- evaluateRef: options6.evaluateRef ?? (() => []),
40475
- seriesColor: options6.seriesColor,
40874
+ evaluateRef: options7.evaluateRef ?? (() => []),
40875
+ seriesColor: options7.seriesColor,
40476
40876
  drawingColor: (color) => color && drawingColorCss(resolveDrawingColor(color, resolver, { transformOrder: "document" })),
40477
40877
  gradient: (fill) => fill?.kind === "gradient" ? resolveChartGradient(
40478
40878
  fill,
@@ -40498,7 +40898,11 @@ function seriesView(ctx, s, index3, total2, categoriesOf) {
40498
40898
  })
40499
40899
  );
40500
40900
  if (Object.keys(points).length) view.pointGradients = points;
40501
- Object.assign(view, analysisView(s, color, ctx.drawingColor));
40901
+ Object.assign(
40902
+ view,
40903
+ analysisView(s, color, ctx.drawingColor),
40904
+ seriesMarkerViews(s, ctx.drawingColor)
40905
+ );
40502
40906
  return view;
40503
40907
  }
40504
40908
 
@@ -40804,14 +41208,14 @@ function scottBinCount(values2, min, max) {
40804
41208
  const width = 3.49 * sd * values2.length ** (-1 / 3);
40805
41209
  return Math.max(1, Math.ceil((max - min) / width));
40806
41210
  }
40807
- function computeHistogramBins(values2, options6, format = String) {
40808
- const closed = options6.intervalClosed ?? "l";
41211
+ function computeHistogramBins(values2, options7, format = String) {
41212
+ const closed = options7.intervalClosed ?? "l";
40809
41213
  const finite2 = values2.map((value3, sourceIndex) => ({ value: value3, sourceIndex })).filter((item) => Number.isFinite(item.value));
40810
41214
  if (finite2.length === 0) {
40811
41215
  return [];
40812
41216
  }
40813
- const underflow = typeof options6.underflow === "number" ? options6.underflow : void 0;
40814
- const overflow = typeof options6.overflow === "number" ? options6.overflow : void 0;
41217
+ const underflow = typeof options7.underflow === "number" ? options7.underflow : void 0;
41218
+ const overflow = typeof options7.overflow === "number" ? options7.overflow : void 0;
40815
41219
  const under = underflow === void 0 ? [] : finite2.filter(
40816
41220
  (item) => closed === "r" ? item.value <= underflow : item.value < underflow
40817
41221
  );
@@ -40828,8 +41232,8 @@ function computeHistogramBins(values2, options6, format = String) {
40828
41232
  if (regular.length > 0) {
40829
41233
  const min = Math.min(...regular.map((item) => item.value));
40830
41234
  const max = Math.max(...regular.map((item) => item.value));
40831
- const requestedSize = options6.binSize && options6.binSize > 0 ? options6.binSize : void 0;
40832
- const requestedCount = options6.binCount && options6.binCount > 0 ? options6.binCount : void 0;
41235
+ const requestedSize = options7.binSize && options7.binSize > 0 ? options7.binSize : void 0;
41236
+ const requestedCount = options7.binCount && options7.binCount > 0 ? options7.binCount : void 0;
40833
41237
  const start = requestedSize ? Math.floor(min / requestedSize) * requestedSize : min;
40834
41238
  const count2 = requestedSize ? Math.max(
40835
41239
  closed === "l" ? Math.floor((max - start) / requestedSize) + 1 : Math.ceil((max - start) / requestedSize),
@@ -40880,9 +41284,9 @@ function aggregateByCategory(values2, rawCategories) {
40880
41284
  }
40881
41285
 
40882
41286
  // chart/waterfall.ts
40883
- function buildWaterfallSteps(values2, options6) {
41287
+ function buildWaterfallSteps(values2, options7) {
40884
41288
  const subtotalIndices = new Set(
40885
- options6?.subtotalIndices ?? (values2.length > 0 ? [values2.length - 1] : [])
41289
+ options7?.subtotalIndices ?? (values2.length > 0 ? [values2.length - 1] : [])
40886
41290
  );
40887
41291
  const steps = [];
40888
41292
  let runningTotal = 0;
@@ -40966,11 +41370,11 @@ function histogramView(chart, model) {
40966
41370
  const first2 = model.series[0];
40967
41371
  if (!first2) return;
40968
41372
  const raw2 = first2.values.map((v) => v ?? Number.NaN);
40969
- const options6 = chart.histogram ?? {};
40970
- const bins = options6.aggregateByCategory ? aggregateByCategory(
41373
+ const options7 = chart.histogram ?? {};
41374
+ const bins = options7.aggregateByCategory ? aggregateByCategory(
40971
41375
  first2.values.map((v) => v ?? 0),
40972
41376
  model.categories
40973
- ) : computeHistogramBins(raw2, options6, formatAxisValue);
41377
+ ) : computeHistogramBins(raw2, options7, formatAxisValue);
40974
41378
  model.categories = bins.map((bin) => bin.label);
40975
41379
  first2.values = bins.map((bin) => bin.value);
40976
41380
  model.barGapWidth = 0;
@@ -40994,11 +41398,11 @@ var SUPPORTED = /* @__PURE__ */ new Set([
40994
41398
  "treemap",
40995
41399
  "sunburst"
40996
41400
  ]);
40997
- function chartSummaryView(chart, theme2, options6 = {}) {
41401
+ function chartSummaryView(chart, theme2, options7 = {}) {
40998
41402
  const type = chart.chartType;
40999
41403
  const radial = type === "pie" || type === "doughnut";
41000
41404
  const byPoint = radial || type === "treemap" || type === "sunburst";
41001
- const ctx = seriesContext(chart, theme2, options6);
41405
+ const ctx = seriesContext(chart, theme2, options7);
41002
41406
  const { palette, scheme, drawingColor } = ctx;
41003
41407
  const grouping = chart.grouping ?? (type === "bar" || type === "column" ? "clustered" : "standard");
41004
41408
  const rawCategories = [];
@@ -41084,6 +41488,7 @@ function chartSummaryView(chart, theme2, options6 = {}) {
41084
41488
  else if (!byPoint) model.valueAxis = valueAxis(model);
41085
41489
  applyDataLabels(model, chart.series, extra);
41086
41490
  chartExtraAxes(model);
41491
+ applyChartAxes(model, chart, ctx.drawingColor);
41087
41492
  return model;
41088
41493
  }
41089
41494
 
@@ -41115,18 +41520,18 @@ function chartSampleVariance(values2) {
41115
41520
  const mean2 = values2.reduce((sum3, value3) => sum3 + value3, 0) / count2;
41116
41521
  return values2.reduce((sum3, value3) => sum3 + (value3 - mean2) ** 2, 0) / Math.max(count2 - 1, 1);
41117
41522
  }
41118
- function chartErrorBarAmount(options6, values2, displayIndex, sourceIndex, side) {
41119
- switch (options6.valueType) {
41523
+ function chartErrorBarAmount(options7, values2, displayIndex, sourceIndex, side) {
41524
+ switch (options7.valueType) {
41120
41525
  case "fixedVal":
41121
- return options6.value ?? 0;
41526
+ return options7.value ?? 0;
41122
41527
  case "percentage":
41123
- return Math.abs(values2[displayIndex] ?? 0) * ((options6.value ?? 0) / 100);
41528
+ return Math.abs(values2[displayIndex] ?? 0) * ((options7.value ?? 0) / 100);
41124
41529
  case "stdDev":
41125
- return Math.sqrt(chartSampleVariance(values2)) * (options6.value ?? 1);
41530
+ return Math.sqrt(chartSampleVariance(values2)) * (options7.value ?? 1);
41126
41531
  case "stdErr":
41127
41532
  return Math.sqrt(chartSampleVariance(values2) / Math.max(values2.length, 1));
41128
41533
  case "cust":
41129
- return side === "plus" ? options6.customPlus?.[sourceIndex] ?? 0 : options6.customMinus?.[sourceIndex] ?? 0;
41534
+ return side === "plus" ? options7.customPlus?.[sourceIndex] ?? 0 : options7.customMinus?.[sourceIndex] ?? 0;
41130
41535
  }
41131
41536
  }
41132
41537
 
@@ -41263,13 +41668,13 @@ var noFit = () => ({
41263
41668
  rSquared: 0,
41264
41669
  coefficients: []
41265
41670
  });
41266
- function fitModel(options6, xVals, yVals) {
41671
+ function fitModel(options7, xVals, yVals) {
41267
41672
  const xs = [...xVals];
41268
41673
  const ys = [...yVals];
41269
- switch (options6.kind) {
41674
+ switch (options7.kind) {
41270
41675
  case "linear": {
41271
41676
  const reg = computeLinearRegression(xs, ys);
41272
- const fixed2 = options6.intercept;
41677
+ const fixed2 = options7.intercept;
41273
41678
  const slope = fixed2 !== void 0 ? ys.reduce((s, y, i2) => s + (y - fixed2) * xs[i2], 0) / xs.reduce((s, x) => s + x * x, 0) : reg.slope;
41274
41679
  const b = fixed2 ?? reg.intercept;
41275
41680
  return {
@@ -41319,7 +41724,7 @@ function fitModel(options6, xVals, yVals) {
41319
41724
  };
41320
41725
  }
41321
41726
  case "polynomial": {
41322
- const order = Math.min(options6.order ?? 2, 6);
41727
+ const order = Math.min(options7.order ?? 2, 6);
41323
41728
  const coeffs = fitPolynomial(xs, ys, order);
41324
41729
  const evaluate = (x) => coeffs.reduce((s, c2, i2) => s + c2 * x ** i2, 0);
41325
41730
  return {
@@ -41333,11 +41738,11 @@ function fitModel(options6, xVals, yVals) {
41333
41738
  return void 0;
41334
41739
  }
41335
41740
  }
41336
- function fitChartTrendline(options6, xVals, yVals) {
41741
+ function fitChartTrendline(options7, xVals, yVals) {
41337
41742
  const count2 = yVals.length;
41338
41743
  if (count2 < 2) return noFit();
41339
- if (options6.kind === "movingAvg") {
41340
- const period = options6.period ?? 2;
41744
+ if (options7.kind === "movingAvg") {
41745
+ const period = options7.period ?? 2;
41341
41746
  const points2 = [];
41342
41747
  for (let i2 = period - 1; i2 < count2; i2++) {
41343
41748
  let sum3 = 0;
@@ -41346,10 +41751,10 @@ function fitChartTrendline(options6, xVals, yVals) {
41346
41751
  }
41347
41752
  return { points: points2, equation: `${period}-period moving average`, rSquared: 0, coefficients: [] };
41348
41753
  }
41349
- const model = fitModel(options6, xVals, yVals);
41754
+ const model = fitModel(options7, xVals, yVals);
41350
41755
  if (!model) return noFit();
41351
- const startX = Math.min(...xVals) - (options6.backward ?? 0);
41352
- const endX = Math.max(...xVals) + (options6.forward ?? 0);
41756
+ const startX = Math.min(...xVals) - (options7.backward ?? 0);
41757
+ const endX = Math.max(...xVals) + (options7.forward ?? 0);
41353
41758
  const steps = Math.max(Math.ceil((endX - startX) * 4), 20);
41354
41759
  const points = [];
41355
41760
  for (let step = 0; step <= steps; step++) {
@@ -41526,7 +41931,7 @@ function chartTextAttributes(model, part, fallbackSize = FONT_SIZE) {
41526
41931
  function chartStroke(model, part) {
41527
41932
  const entry3 = model.appearance?.[part];
41528
41933
  return {
41529
- color: entry3?.axisVisible === false ? "none" : entry3?.lineColor ?? (part === "gridlineMajor" ? GRID_COLOR : AXIS_COLOR),
41934
+ color: entry3?.axisVisible === false ? "none" : entry3?.lineColor ?? (part.startsWith("gridline") ? GRID_COLOR : AXIS_COLOR),
41530
41935
  width: entry3?.lineWidth === void 0 ? 1 : chartPointsToPixels(entry3.lineWidth)
41531
41936
  };
41532
41937
  }
@@ -41817,19 +42222,102 @@ function scatterAnalysis(model, px, py, out) {
41817
42222
  });
41818
42223
  }
41819
42224
 
42225
+ // chart/render/chart-svg-markers.ts
42226
+ function chartMarkerRadius(series, index3, defaultRadius = 3) {
42227
+ const marker3 = { ...series.marker, ...series.pointMarkers?.[index3] };
42228
+ if (marker3.symbol === "none") return 0;
42229
+ const radius = markerRadius(marker3.size, defaultRadius);
42230
+ return marker3.symbol === "dot" ? Math.max(radius * 0.6, 1) : radius;
42231
+ }
42232
+ function chartSeriesMarkerSvg(series, index3, cx2, cy, defaultRadius = 3) {
42233
+ const marker3 = { ...series.marker, ...series.pointMarkers?.[index3] };
42234
+ const primitive = buildMarkerPrimitive({
42235
+ ...marker3,
42236
+ symbol: marker3.symbol,
42237
+ size: marker3.size,
42238
+ cx: cx2,
42239
+ cy,
42240
+ fill: marker3.fill ?? series.pointColors?.[index3] ?? series.color,
42241
+ defaultRadius
42242
+ });
42243
+ if (!primitive) return "";
42244
+ let geometry;
42245
+ switch (primitive.kind) {
42246
+ case "circle":
42247
+ geometry = `cx="${n(primitive.cx)}" cy="${n(primitive.cy)}" r="${n(primitive.r)}"`;
42248
+ break;
42249
+ case "rect":
42250
+ geometry = `x="${n(primitive.x)}" y="${n(primitive.y)}" width="${n(primitive.w)}" height="${n(primitive.h)}"`;
42251
+ break;
42252
+ case "path":
42253
+ geometry = `d="${esc(primitive.d)}"`;
42254
+ break;
42255
+ case "polygon":
42256
+ geometry = `points="${esc(primitive.points)}"`;
42257
+ break;
42258
+ }
42259
+ const outline = primitive.stroke ? ` stroke="${esc(primitive.stroke)}" stroke-width="${n(primitive.strokeWidth ?? 1)}"` : "";
42260
+ const filter2 = series.shadowFilter ? ` filter="${esc(series.shadowFilter)}"` : "";
42261
+ return `<${primitive.kind} ${geometry} fill="${esc(primitive.fill)}"${outline}${filter2}/>`;
42262
+ }
42263
+
42264
+ // chart/line-dash.ts
42265
+ function chartLineDashArray(style3, width) {
42266
+ if (!style3 || style3 === "solid") {
42267
+ return void 0;
42268
+ }
42269
+ const unit = Math.max(width, 1);
42270
+ if (style3 === "dot" || style3 === "sysDot") {
42271
+ return `${unit} ${unit * 2}`;
42272
+ }
42273
+ if (style3 === "lgDash") {
42274
+ return `${unit * 6} ${unit * 3}`;
42275
+ }
42276
+ return `${unit * 3} ${unit * 2}`;
42277
+ }
42278
+
42279
+ // chart/render/chart-svg-axes.ts
42280
+ function axisTickText(value3, axis, percent = false) {
42281
+ return formatChartNumber(value3, axis?.source.numberFormat?.formatCode) ?? formatAxisValue(value3, percent);
42282
+ }
42283
+ function axisLine(model, axis, part, x1, y1, x2, y2) {
42284
+ if (axis?.source.deleted) return "";
42285
+ return styledAxisLine(x1, y1, x2, y2, axis?.line, chartStroke(model, part));
42286
+ }
42287
+ function styledAxisLine(x1, y1, x2, y2, paint2, fallback) {
42288
+ const color = paint2?.color ?? fallback.color;
42289
+ const width = paint2?.width ?? fallback.width;
42290
+ if (color === "none" || width === 0) return "";
42291
+ const dash = chartLineDashArray(paint2?.dash, width);
42292
+ return line2(x1, y1, x2, y2, esc(color), width).replace(
42293
+ "/>",
42294
+ dash ? ` stroke-dasharray="${dash}"/>` : "/>"
42295
+ );
42296
+ }
42297
+ function axisGridlines(model, axis, ticks, position, plot2, vertical2) {
42298
+ const draw2 = (values2, paint2, minor2) => {
42299
+ const fallback = chartStroke(model, minor2 ? "gridlineMinor" : "gridlineMajor");
42300
+ return values2.map((value3) => {
42301
+ const p = position(value3);
42302
+ return vertical2 ? styledAxisLine(p, plot2.y, p, plot2.y + plot2.h, paint2, fallback) : styledAxisLine(plot2.x, p, plot2.x + plot2.w, p, paint2, fallback);
42303
+ }).join("");
42304
+ };
42305
+ const major = !axis || axis.source.majorGridlines ? draw2(ticks, axis?.majorGrid, false) : "";
42306
+ const minor = axis?.source.minorGridlines ? draw2(axis.minorTicks, axis.minorGrid, true) : "";
42307
+ return major + minor;
42308
+ }
42309
+
41820
42310
  // chart/render/chart-svg-cartesian.ts
41821
42311
  function cartesianAxes(model, area, out) {
41822
42312
  const scale2 = model.valueAxis;
41823
42313
  if (!scale2) return void 0;
41824
- const labels = scale2.ticks.map((t) => formatAxisValue(t, scale2.percent));
42314
+ const labels = scale2.ticks.map((t) => axisTickText(t, model.axes?.value, scale2.percent));
41825
42315
  const valueAttrs = chartTextAttributes(model, "valueAxis");
41826
42316
  const categoryAttrs = chartTextAttributes(model, "categoryAxis");
41827
42317
  const valueSize = valueAttrs.size ?? 10;
41828
42318
  const categorySize = categoryAttrs.size ?? 10;
41829
- const grid6 = chartStroke(model, "gridlineMajor");
41830
- const axis = chartStroke(model, "categoryAxis");
41831
- const valueLabels = model.appearance?.valueAxis?.labelsVisible !== false;
41832
- const categoryLabels = model.appearance?.categoryAxis?.labelsVisible !== false;
42319
+ const valueLabels = chartAxisLabels(model.axes?.value) && model.appearance?.valueAxis?.labelsVisible !== false;
42320
+ const categoryLabels = chartAxisLabels(model.axes?.category) && model.appearance?.categoryAxis?.labelsVisible !== false;
41833
42321
  const labelW = valueLabels ? Math.max(...labels.map((l) => textWidth(l, valueSize)), 8) + 6 : 4;
41834
42322
  const horizontal2 = model.horizontal;
41835
42323
  const cats = Math.max(1, model.categories.length);
@@ -41838,7 +42326,7 @@ function cartesianAxes(model, area, out) {
41838
42326
  Math.max(...model.categories.map((c2) => textWidth(c2, categorySize)), 8) + 6
41839
42327
  );
41840
42328
  const second = horizontal2 ? void 0 : model.secondaryAxis;
41841
- const secondLabels = second?.ticks.map((t) => formatAxisValue(t, second.percent)) ?? [];
42329
+ const secondLabels = second?.ticks.map((t) => axisTickText(t, model.axes?.secondary, second.percent)) ?? [];
41842
42330
  const secondW = second ? valueLabels ? Math.max(...secondLabels.map((l) => textWidth(l, valueSize)), 8) + 8 : 4 : 0;
41843
42331
  const plot2 = horizontal2 ? {
41844
42332
  x: area.x + catW,
@@ -41851,29 +42339,47 @@ function cartesianAxes(model, area, out) {
41851
42339
  w: Math.max(1, area.w - labelW - 4 - secondW),
41852
42340
  h: Math.max(1, area.h - Math.max(20, categorySize * 1.5))
41853
42341
  };
41854
- const span4 = scale2.max - scale2.min || 1;
41855
- const value3 = horizontal2 ? (v) => plot2.x + (v - scale2.min) / span4 * plot2.w : (v) => plot2.y + plot2.h - (v - scale2.min) / span4 * plot2.h;
42342
+ const value3 = horizontal2 ? (v) => plot2.x + chartAxisRatio(v, scale2, model.axes?.value) * plot2.w : (v) => plot2.y + plot2.h - chartAxisRatio(v, scale2, model.axes?.value) * plot2.h;
41856
42343
  const bandSize = (horizontal2 ? plot2.h : plot2.w) / cats;
41857
- const band = horizontal2 ? (i2) => plot2.y + plot2.h - bandSize * (i2 + 0.5) : (i2) => plot2.x + bandSize * (i2 + 0.5);
42344
+ const index3 = (i2) => model.axes?.category?.range.reverseOrder ? cats - 1 - i2 : i2;
42345
+ const band = horizontal2 ? (i2) => plot2.y + plot2.h - bandSize * (index3(i2) + 0.5) : (i2) => plot2.x + bandSize * (index3(i2) + 0.5);
41858
42346
  out.push(chartAreaRect(model, "plotArea", plot2));
42347
+ out.push(axisGridlines(model, model.axes?.value, scale2.ticks, value3, plot2, horizontal2));
42348
+ if (model.axes?.category?.source.majorGridlines || model.axes?.category?.source.minorGridlines)
42349
+ out.push(
42350
+ axisGridlines(
42351
+ model,
42352
+ model.axes.category,
42353
+ model.categories.map((_, i2) => i2),
42354
+ band,
42355
+ plot2,
42356
+ !horizontal2
42357
+ )
42358
+ );
41859
42359
  scale2.ticks.forEach((t, i2) => {
41860
42360
  const p = value3(t);
41861
42361
  const label2 = labels[i2] ?? "";
41862
42362
  if (horizontal2) {
41863
- out.push(line2(p, plot2.y, p, plot2.y + plot2.h, grid6.color, grid6.width));
41864
42363
  if (valueLabels)
41865
42364
  out.push(
41866
42365
  text3(p, plot2.y + plot2.h + valueSize + 2, label2, { anchor: "middle", ...valueAttrs })
41867
42366
  );
41868
42367
  } else {
41869
- out.push(line2(plot2.x, p, plot2.x + plot2.w, p, grid6.color, grid6.width));
41870
42368
  if (valueLabels)
41871
42369
  out.push(text3(plot2.x - 4, p + valueSize * 0.3, label2, { anchor: "end", ...valueAttrs }));
41872
42370
  }
41873
42371
  });
41874
- const zero = value3(Math.min(Math.max(0, scale2.min), scale2.max));
41875
- if (horizontal2) out.push(line2(zero, plot2.y, zero, plot2.y + plot2.h, axis.color, axis.width));
41876
- else out.push(line2(plot2.x, zero, plot2.x + plot2.w, zero, axis.color, axis.width));
42372
+ const source2 = model.axes?.value?.source;
42373
+ const crossing = source2?.crosses === "max" ? scale2.max : source2?.crosses === "min" ? scale2.min : source2?.crossesAt ?? 0;
42374
+ const zero = value3(Math.min(Math.max(crossing, scale2.min), scale2.max));
42375
+ if (horizontal2)
42376
+ out.push(
42377
+ axisLine(model, model.axes?.category, "categoryAxis", zero, plot2.y, zero, plot2.y + plot2.h)
42378
+ );
42379
+ else
42380
+ out.push(
42381
+ axisLine(model, model.axes?.category, "categoryAxis", plot2.x, zero, plot2.x + plot2.w, zero)
42382
+ );
41877
42383
  const step = Math.max(
41878
42384
  1,
41879
42385
  Math.ceil(cats / Math.max(1, Math.floor((horizontal2 ? plot2.h : plot2.w) / 14)))
@@ -41898,20 +42404,23 @@ function cartesianAxes(model, area, out) {
41898
42404
  });
41899
42405
  const frame = { plot: plot2, value: value3, band, bandSize };
41900
42406
  if (second) {
41901
- const secondSpan = second.max - second.min || 1;
41902
- frame.secondary = (v) => plot2.y + plot2.h - (v - second.min) / secondSpan * plot2.h;
41903
- const secondAxis = chartStroke(model, "valueAxis");
42407
+ frame.secondary = (v) => plot2.y + plot2.h - chartAxisRatio(v, second, model.axes?.secondary) * plot2.h;
41904
42408
  out.push(
41905
- line2(
42409
+ axisLine(
42410
+ model,
42411
+ model.axes?.secondary,
42412
+ "valueAxis",
41906
42413
  plot2.x + plot2.w,
41907
42414
  plot2.y,
41908
42415
  plot2.x + plot2.w,
41909
- plot2.y + plot2.h,
41910
- secondAxis.color,
41911
- secondAxis.width
42416
+ plot2.y + plot2.h
41912
42417
  )
41913
42418
  );
41914
- if (valueLabels)
42419
+ if (model.axes?.secondary?.source.majorGridlines || model.axes?.secondary?.source.minorGridlines)
42420
+ out.push(
42421
+ axisGridlines(model, model.axes.secondary, second.ticks, frame.secondary, plot2, false)
42422
+ );
42423
+ if (chartAxisLabels(model.axes?.secondary))
41915
42424
  second.ticks.forEach(
41916
42425
  (t, i2) => out.push(
41917
42426
  text3(plot2.x + plot2.w + 4, frame.secondary(t) + valueSize * 0.3, secondLabels[i2] ?? "", {
@@ -41955,18 +42464,19 @@ function linesAndAreas(model, frame, out) {
41955
42464
  index: i2,
41956
42465
  x: frame.band(i2),
41957
42466
  y: frame.value(top),
41958
- radius: area ? 0 : 3
42467
+ radius: area ? 0 : chartMarkerRadius(s, i2, 2.5)
41959
42468
  });
41960
42469
  lower3.push([frame.band(i2), frame.value(below)]);
41961
42470
  });
41962
42471
  layers.push({
42472
+ series: s,
41963
42473
  points,
41964
42474
  lower: lower3,
41965
42475
  color: s.color,
41966
42476
  filter: s.shadowFilter ? ` filter="${s.shadowFilter}"` : ""
41967
42477
  });
41968
42478
  });
41969
- for (const { points, lower: lower3, color, filter: filter2 } of area ? [...layers].reverse() : layers) {
42479
+ for (const { points, lower: lower3, color, filter: filter2, series } of area ? [...layers].reverse() : layers) {
41970
42480
  if (area) {
41971
42481
  const poly = [...points, ...[...lower3].reverse()].map(([x, y]) => `${n(x)},${n(y)}`).join(" ");
41972
42482
  out.push(`<polygon points="${poly}" fill="${color}" fill-opacity="0.85"${filter2}/>`);
@@ -41985,20 +42495,20 @@ function linesAndAreas(model, frame, out) {
41985
42495
  else segment2.push(`${n(x)},${n(y)}`);
41986
42496
  }
41987
42497
  flush();
41988
- for (const [x, y] of points)
41989
- if (!Number.isNaN(x))
41990
- out.push(`<circle cx="${n(x)}" cy="${n(y)}" r="2.5" fill="${color}"${filter2}/>`);
42498
+ points.forEach(([x, y], index3) => {
42499
+ if (!Number.isNaN(x)) out.push(chartSeriesMarkerSvg(series, index3, x, y, 2.5));
42500
+ });
41991
42501
  }
41992
42502
  pointLabels(model, marks, out);
41993
42503
  }
41994
42504
 
41995
42505
  // chart/bubble-radius.ts
41996
- function computeBubbleRadius(sizeVal, maxBubble, medianRadius, options6) {
41997
- const scale2 = (options6?.bubbleScale ?? 100) / 100;
42506
+ function computeBubbleRadius(sizeVal, maxBubble, medianRadius, options7) {
42507
+ const scale2 = (options7?.bubbleScale ?? 100) / 100;
41998
42508
  if (sizeVal === void 0) return medianRadius * scale2;
41999
42509
  const denom = maxBubble > 0 ? maxBubble : 1;
42000
42510
  const magnitude = Math.abs(sizeVal);
42001
- const ratio = (options6?.sizeRepresents ?? "w") === "area" ? Math.sqrt(magnitude) / Math.sqrt(denom) : magnitude / denom;
42511
+ const ratio = (options7?.sizeRepresents ?? "w") === "area" ? Math.sqrt(magnitude) / Math.sqrt(denom) : magnitude / denom;
42002
42512
  return medianRadius * scale2 * 0.5 + ratio * medianRadius * scale2 * 1.5;
42003
42513
  }
42004
42514
  function maxBubbleSize(sizes) {
@@ -42013,16 +42523,14 @@ function scatter(model, area, out) {
42013
42523
  const ys = model.valueAxis;
42014
42524
  const xs = model.xAxis;
42015
42525
  if (!ys || !xs) return;
42016
- const yLabels = ys.ticks.map((t) => formatAxisValue(t));
42526
+ const yLabels = ys.ticks.map((t) => axisTickText(t, model.axes?.value));
42017
42527
  const valueAttrs = chartTextAttributes(model, "valueAxis");
42018
42528
  const categoryAttrs = chartTextAttributes(model, "categoryAxis");
42019
42529
  const valueSize = valueAttrs.size ?? 10;
42020
42530
  const categorySize = categoryAttrs.size ?? 10;
42021
- const grid6 = chartStroke(model, "gridlineMajor");
42022
42531
  const xAxis = chartStroke(model, "categoryAxis");
42023
- const yAxis = chartStroke(model, "valueAxis");
42024
- const valueLabels = model.appearance?.valueAxis?.labelsVisible !== false;
42025
- const categoryLabels = model.appearance?.categoryAxis?.labelsVisible !== false;
42532
+ const valueLabels = chartAxisLabels(model.axes?.value) && model.appearance?.valueAxis?.labelsVisible !== false;
42533
+ const categoryLabels = chartAxisLabels(model.axes?.category) && model.appearance?.categoryAxis?.labelsVisible !== false;
42026
42534
  const labelW = valueLabels ? Math.max(...yLabels.map((l) => textWidth(l, valueSize)), 8) + 6 : 4;
42027
42535
  const plot2 = {
42028
42536
  x: area.x + labelW,
@@ -42042,17 +42550,24 @@ function scatter(model, area, out) {
42042
42550
  s.values.forEach((_, i2) => {
42043
42551
  reach = Math.max(reach, radiusOf(s.sizes?.[i2] ?? void 0) ?? 0);
42044
42552
  });
42045
- const widen = (s, length) => {
42553
+ const widen = (s, length, axis) => {
42554
+ if (axis?.range.logScale) return s;
42046
42555
  const pad7 = reach * (s.max - s.min || 1) / Math.max(1, length - 2 * reach);
42047
- return { ...s, min: s.min - pad7, max: s.max + pad7 };
42556
+ return {
42557
+ ...s,
42558
+ min: axis?.source.scaling.min === void 0 ? s.min - pad7 : s.min,
42559
+ max: axis?.source.scaling.max === void 0 ? s.max + pad7 : s.max
42560
+ };
42048
42561
  };
42049
- const xView = widen(xs, plot2.w);
42050
- const yView = widen(ys, plot2.h);
42051
- const px = (v) => plot2.x + (v - xView.min) / (xView.max - xView.min || 1) * plot2.w;
42052
- const py = (v) => plot2.y + plot2.h - (v - yView.min) / (yView.max - yView.min || 1) * plot2.h;
42562
+ const xView = widen(xs, plot2.w, model.axes?.category);
42563
+ const yView = widen(ys, plot2.h, model.axes?.value);
42564
+ const px = (v) => plot2.x + chartAxisRatio(v, xView, model.axes?.category) * plot2.w;
42565
+ const py = (v) => plot2.y + plot2.h - chartAxisRatio(v, yView, model.axes?.value) * plot2.h;
42053
42566
  out.push(chartAreaRect(model, "plotArea", plot2));
42567
+ out.push(axisGridlines(model, model.axes?.value, ys.ticks, py, plot2, false));
42568
+ if (model.axes?.category)
42569
+ out.push(axisGridlines(model, model.axes.category, xs.ticks, px, plot2, true));
42054
42570
  ys.ticks.forEach((t, i2) => {
42055
- out.push(line2(plot2.x, py(t), plot2.x + plot2.w, py(t), grid6.color, grid6.width));
42056
42571
  if (valueLabels)
42057
42572
  out.push(
42058
42573
  text3(plot2.x - 4, py(t) + valueSize * 0.3, yLabels[i2] ?? "", {
@@ -42062,19 +42577,30 @@ function scatter(model, area, out) {
42062
42577
  );
42063
42578
  });
42064
42579
  for (const t of xs.ticks) {
42065
- out.push(line2(px(t), plot2.y + plot2.h, px(t), plot2.y + plot2.h + 3, xAxis.color, xAxis.width));
42580
+ if (!model.axes?.category?.source.deleted)
42581
+ out.push(line2(px(t), plot2.y + plot2.h, px(t), plot2.y + plot2.h + 3, xAxis.color, xAxis.width));
42066
42582
  if (categoryLabels)
42067
42583
  out.push(
42068
- text3(px(t), plot2.y + plot2.h + categorySize + 3, formatAxisValue(t), {
42584
+ text3(px(t), plot2.y + plot2.h + categorySize + 3, axisTickText(t, model.axes?.category), {
42069
42585
  anchor: "middle",
42070
42586
  ...categoryAttrs
42071
42587
  })
42072
42588
  );
42073
42589
  }
42074
42590
  out.push(
42075
- line2(plot2.x, plot2.y + plot2.h, plot2.x + plot2.w, plot2.y + plot2.h, xAxis.color, xAxis.width)
42591
+ axisLine(
42592
+ model,
42593
+ model.axes?.category,
42594
+ "categoryAxis",
42595
+ plot2.x,
42596
+ plot2.y + plot2.h,
42597
+ plot2.x + plot2.w,
42598
+ plot2.y + plot2.h
42599
+ )
42600
+ );
42601
+ out.push(
42602
+ axisLine(model, model.axes?.value, "valueAxis", plot2.x, plot2.y, plot2.x, plot2.y + plot2.h)
42076
42603
  );
42077
- out.push(line2(plot2.x, plot2.y, plot2.x, plot2.y + plot2.h, yAxis.color, yAxis.width));
42078
42604
  const marks = [];
42079
42605
  for (const [si, s] of model.series.entries())
42080
42606
  s.values.forEach((v, i2) => {
@@ -42083,8 +42609,8 @@ function scatter(model, area, out) {
42083
42609
  const filter2 = s.shadowFilter ? ` filter="${s.shadowFilter}"` : "";
42084
42610
  const fill = s.pointColors?.[i2] ?? s.color;
42085
42611
  if (!bubble) {
42086
- out.push(`<circle cx="${n(px(x))}" cy="${n(py(v))}" r="3" fill="${fill}"${filter2}/>`);
42087
- marks.push({ series: s, index: i2, x: px(x), y: py(v), radius: 3 });
42612
+ out.push(chartSeriesMarkerSvg(s, i2, px(x), py(v)));
42613
+ marks.push({ series: s, index: i2, x: px(x), y: py(v), radius: chartMarkerRadius(s, i2) });
42088
42614
  return;
42089
42615
  }
42090
42616
  const r = radiusOf(s.sizes?.[i2] ?? void 0);
@@ -42304,32 +42830,37 @@ function radarSvg(model, area) {
42304
42830
  const valueSize = valueAttrs.size ?? 9;
42305
42831
  const categorySize = categoryAttrs.size ?? 10;
42306
42832
  const grid6 = chartStroke(model, "gridlineMajor");
42307
- const axis = chartStroke(model, "categoryAxis");
42308
42833
  const cx2 = area.x + area.w / 2;
42309
42834
  const cy = area.y + area.h / 2 + 4;
42310
42835
  const radius = Math.max(1, Math.min(area.w, area.h) / 2 - Math.max(18, categorySize * 1.8));
42311
42836
  const angle = (i2) => i2 / count2 * Math.PI * 2;
42312
- const r = (v) => (v - scale2.min) / (scale2.max - scale2.min || 1) * radius;
42837
+ const r = (v) => chartAxisRatio(v, scale2, model.axes?.value) * radius;
42313
42838
  const labelEvery = Math.max(
42314
42839
  1,
42315
42840
  Math.ceil(12 / Math.max(1, radius / Math.max(1, scale2.ticks.length - 1)))
42316
42841
  );
42317
42842
  for (const [k, t] of scale2.ticks.entries()) {
42318
42843
  const ring = Array.from({ length: count2 }, (_, i2) => polar2(cx2, cy, r(t), angle(i2))).map(([x, y]) => `${n(x)},${n(y)}`).join(" ");
42319
- out.push(
42320
- `<polygon points="${ring}" fill="none" stroke="${grid6.color}" stroke-width="${n(grid6.width)}"/>`
42321
- );
42322
- if (model.appearance?.valueAxis?.labelsVisible !== false && k % labelEvery === 0)
42844
+ if (!model.axes?.value || model.axes.value.source.majorGridlines)
42323
42845
  out.push(
42324
- text3(cx2 + 3, cy - r(t) + valueSize * 0.3, formatAxisValue(t, scale2.percent), valueAttrs)
42846
+ `<polygon points="${ring}" fill="none" stroke="${grid6.color}" stroke-width="${n(grid6.width)}"/>`
42847
+ );
42848
+ if (chartAxisLabels(model.axes?.value) && model.appearance?.valueAxis?.labelsVisible !== false && k % labelEvery === 0)
42849
+ out.push(
42850
+ text3(
42851
+ cx2 + 3,
42852
+ cy - r(t) + valueSize * 0.3,
42853
+ axisTickText(t, model.axes?.value, scale2.percent),
42854
+ valueAttrs
42855
+ )
42325
42856
  );
42326
42857
  }
42327
42858
  model.categories.forEach((c2, i2) => {
42328
42859
  const [x, y] = polar2(cx2, cy, radius, angle(i2));
42329
- out.push(line2(cx2, cy, x, y, axis.color, axis.width));
42860
+ out.push(axisLine(model, model.axes?.category, "categoryAxis", cx2, cy, x, y));
42330
42861
  const [lx, ly] = polar2(cx2, cy, radius + 10, angle(i2));
42331
42862
  const anchor = Math.abs(lx - cx2) < 2 ? "middle" : lx > cx2 ? "start" : "end";
42332
- if (model.appearance?.categoryAxis?.labelsVisible !== false)
42863
+ if (chartAxisLabels(model.axes?.category) && model.appearance?.categoryAxis?.labelsVisible !== false)
42333
42864
  out.push(
42334
42865
  text3(lx, ly + categorySize * 0.3, fit(c2, area.w / 4, categorySize), {
42335
42866
  anchor,
@@ -42340,7 +42871,13 @@ function radarSvg(model, area) {
42340
42871
  const marks = [];
42341
42872
  for (const s of model.series) {
42342
42873
  const vertices = s.values.slice(0, count2).map((v, i2) => polar2(cx2, cy, r(v ?? scale2.min), angle(i2)));
42343
- vertices.forEach(([x, y], i2) => marks.push({ series: s, index: i2, x, y, radius: 3 }));
42874
+ vertices.forEach(([x, y], i2) => {
42875
+ if (s.values[i2] === null) return;
42876
+ const markerSeries = s;
42877
+ if (markerSeries.marker || markerSeries.pointMarkers)
42878
+ out.push(chartSeriesMarkerSvg(s, i2, x, y));
42879
+ marks.push({ series: s, index: i2, x, y, radius: chartMarkerRadius(s, i2) });
42880
+ });
42344
42881
  const points = vertices.map(([x, y]) => `${n(x)},${n(y)}`).join(" ");
42345
42882
  out.push(
42346
42883
  `<polygon points="${points}" fill="none" stroke="${s.color}" stroke-width="2"${s.shadowFilter ? ` filter="${s.shadowFilter}"` : ""}/>`
@@ -42530,33 +43067,33 @@ var CHART_FONT_FAMILY = "Calibri, Carlito, Arial, sans-serif";
42530
43067
  function cssFont(attrs2) {
42531
43068
  return `${attrs2.italic ? "italic" : "normal"} ${attrs2.weight ?? "normal"} ${attrs2.size ?? 10}px ${attrs2.family ?? CHART_FONT_FAMILY}`;
42532
43069
  }
42533
- function chartFontMetrics(attrs2, options6) {
42534
- const metrics = options6.measureFont?.(cssFont(attrs2));
43070
+ function chartFontMetrics(attrs2, options7) {
43071
+ const metrics = options7.measureFont?.(cssFont(attrs2));
42535
43072
  return metrics && Number.isFinite(metrics.ascent) && Number.isFinite(metrics.descent) && metrics.ascent >= 0 && metrics.descent >= 0 && metrics.ascent + metrics.descent > 0 ? metrics : void 0;
42536
43073
  }
42537
- function chartTextWidth(content2, attrs2, options6) {
42538
- const width = options6.measureText?.(content2, cssFont(attrs2));
43074
+ function chartTextWidth(content2, attrs2, options7) {
43075
+ const width = options7.measureText?.(content2, cssFont(attrs2));
42539
43076
  return width !== void 0 && Number.isFinite(width) && width >= 0 ? width : textWidth(content2, attrs2.size);
42540
43077
  }
42541
- function fitChartText(content2, maxWidth, attrs2, options6) {
42542
- if (!options6.measureText) return fit(content2, maxWidth, attrs2.size);
42543
- if (chartTextWidth(content2, attrs2, options6) <= maxWidth) return content2;
43078
+ function fitChartText(content2, maxWidth, attrs2, options7) {
43079
+ if (!options7.measureText) return fit(content2, maxWidth, attrs2.size);
43080
+ if (chartTextWidth(content2, attrs2, options7) <= maxWidth) return content2;
42544
43081
  const points = [...content2];
42545
43082
  let low = 0;
42546
43083
  let high = points.length;
42547
43084
  while (low < high) {
42548
43085
  const mid = Math.ceil((low + high) / 2);
42549
- if (chartTextWidth(`${points.slice(0, mid).join("")}\u2026`, attrs2, options6) <= maxWidth) low = mid;
43086
+ if (chartTextWidth(`${points.slice(0, mid).join("")}\u2026`, attrs2, options7) <= maxWidth) low = mid;
42550
43087
  else high = mid - 1;
42551
43088
  }
42552
43089
  return `${points.slice(0, low).join("")}\u2026`;
42553
43090
  }
42554
43091
 
42555
43092
  // chart/render/chart-svg-legend.ts
42556
- function chartLegendSvg(model, area, frame, options6) {
43093
+ function chartLegendSvg(model, area, frame, options7) {
42557
43094
  const automatic = [];
42558
43095
  const bounds = {};
42559
- const reserved = automaticLegend(model, area, automatic, options6, bounds);
43096
+ const reserved = automaticLegend(model, area, automatic, options7, bounds);
42560
43097
  const plot2 = model.legendOverlay ? area : reserved;
42561
43098
  const box2 = bounds.box;
42562
43099
  if (!box2) return { plot: plot2, markup: "", foreground: false };
@@ -42570,11 +43107,11 @@ function chartLegendSvg(model, area, frame, options6) {
42570
43107
  const entries = legendEntries(model);
42571
43108
  const attrs2 = chartTextAttributes(model, "legend");
42572
43109
  const size = attrs2.size ?? 10;
42573
- const font = chartFontMetrics(attrs2, options6);
43110
+ const font = chartFontMetrics(attrs2, options7);
42574
43111
  const keySize = size / 2;
42575
43112
  const keyGap = size / 4;
42576
43113
  const widths = entries.map(
42577
- (entry3) => chartTextWidth(entry3.label, attrs2, options6) + keySize + keyGap
43114
+ (entry3) => chartTextWidth(entry3.label, attrs2, options7) + keySize + keyGap
42578
43115
  );
42579
43116
  const horizontal2 = manual.width > manual.height && widths.reduce((sum3, width) => sum3 + width, 0) + size <= manual.width;
42580
43117
  const rowWidth = horizontal2 ? manual.width / entries.length : manual.width;
@@ -42589,8 +43126,8 @@ function chartLegendSvg(model, area, frame, options6) {
42589
43126
  ];
42590
43127
  const baselineOffset = font ? (font.ascent - font.descent) / 2 : size * 0.35;
42591
43128
  entries.forEach((entry3, i2) => {
42592
- const available = horizontal2 ? chartTextWidth(entry3.label, attrs2, options6) : Math.max(0, rowWidth - size / 2 - keySize - keyGap);
42593
- const label2 = fitChartText(entry3.label, available, attrs2, options6);
43129
+ const available = horizontal2 ? chartTextWidth(entry3.label, attrs2, options7) : Math.max(0, rowWidth - size / 2 - keySize - keyGap);
43130
+ const label2 = fitChartText(entry3.label, available, attrs2, options7);
42594
43131
  const contentWidth = Math.min(
42595
43132
  horizontal2 ? widths[i2] ?? 0 : Math.max(...widths),
42596
43133
  rowWidth - size / 2
@@ -42633,7 +43170,7 @@ function legendEntries(model) {
42633
43170
  color: s.color
42634
43171
  }));
42635
43172
  }
42636
- function automaticLegend(model, area, out, options6, bounds) {
43173
+ function automaticLegend(model, area, out, options7, bounds) {
42637
43174
  const entries = legendEntries(model);
42638
43175
  if (!model.showLegend || entries.length === 0) return area;
42639
43176
  const pos = model.legendPosition;
@@ -42642,7 +43179,7 @@ function automaticLegend(model, area, out, options6, bounds) {
42642
43179
  const rowH = Math.max(16, size * 1.4);
42643
43180
  if (pos === "t" || pos === "b") {
42644
43181
  const widths = entries.map(
42645
- (e) => Math.min(chartTextWidth(e.label, attrs2, options6) + 20, area.w / 2)
43182
+ (e) => Math.min(chartTextWidth(e.label, attrs2, options7) + 20, area.w / 2)
42646
43183
  );
42647
43184
  const total2 = widths.reduce((a2, b) => a2 + b, 0);
42648
43185
  let x2 = area.x + Math.max(0, (area.w - total2) / 2);
@@ -42659,14 +43196,14 @@ function automaticLegend(model, area, out, options6, bounds) {
42659
43196
  entries.forEach((e, i2) => {
42660
43197
  const w = widths[i2] ?? 0;
42661
43198
  out.push(rect(x2, y, 8, 8, e.color));
42662
- out.push(text3(x2 + 12, y + 8, fitChartText(e.label, w - 16, attrs2, options6), attrs2));
43199
+ out.push(text3(x2 + 12, y + 8, fitChartText(e.label, w - 16, attrs2, options7), attrs2));
42663
43200
  x2 += w;
42664
43201
  });
42665
43202
  return pos === "t" ? { x: area.x, y: area.y + rowH + 4, w: area.w, h: area.h - rowH - 4 } : { x: area.x, y: area.y, w: area.w, h: area.h - rowH - 4 };
42666
43203
  }
42667
43204
  const width = Math.min(
42668
43205
  area.w * 0.35,
42669
- Math.max(...entries.map((e) => chartTextWidth(e.label, attrs2, options6))) + 22
43206
+ Math.max(...entries.map((e) => chartTextWidth(e.label, attrs2, options7))) + 22
42670
43207
  );
42671
43208
  const height = entries.length * rowH;
42672
43209
  const x = pos === "l" ? area.x + 4 : area.x + area.w - width;
@@ -42684,14 +43221,14 @@ function automaticLegend(model, area, out, options6, bounds) {
42684
43221
  const y = y0 + i2 * rowH;
42685
43222
  if (y + rowH > area.y + area.h + 2) return;
42686
43223
  out.push(rect(x, y + 3, 8, 8, e.color));
42687
- out.push(text3(x + 12, y + 11, fitChartText(e.label, width - 16, attrs2, options6), attrs2));
43224
+ out.push(text3(x + 12, y + 11, fitChartText(e.label, width - 16, attrs2, options7), attrs2));
42688
43225
  });
42689
43226
  return pos === "l" ? { x: area.x + width + 8, y: area.y, w: area.w - width - 8, h: area.h } : { x: area.x, y: area.y, w: area.w - width - 8, h: area.h };
42690
43227
  }
42691
43228
 
42692
43229
  // text/wrap-styled-runs.ts
42693
43230
  var graphemes = new Intl.Segmenter(void 0, { granularity: "grapheme" });
42694
- function wrapStyledRuns(runs, maxWidth, measure3, options6 = {}) {
43231
+ function wrapStyledRuns(runs, maxWidth, measure3, options7 = {}) {
42695
43232
  const groups = [];
42696
43233
  for (const [source2, run2] of runs.entries()) {
42697
43234
  for (const token of run2.text.split(/(\r\n|[\r\n]|[ \t]+)/u).filter(Boolean)) {
@@ -42739,7 +43276,7 @@ function wrapStyledRuns(runs, maxWidth, measure3, options6 = {}) {
42739
43276
  if (line3.length && width(merged(line3, [...separator, ...group2.pieces])) > maxWidth) flush();
42740
43277
  else line3 = merged(line3, separator);
42741
43278
  spaces = [];
42742
- if (options6.breakWords && wordWidth > maxWidth) {
43279
+ if (options7.breakWords && wordWidth > maxWidth) {
42743
43280
  for (const piece of group2.pieces) {
42744
43281
  for (const { segment: segment2 } of graphemes.segment(piece.text)) {
42745
43282
  const next = { ...piece, text: segment2 };
@@ -42757,11 +43294,11 @@ function wrapStyledRuns(runs, maxWidth, measure3, options6 = {}) {
42757
43294
  function spacing2(value3, naturalHeight, fallback) {
42758
43295
  return value3 ? value3.unit === "points" ? chartPointsToPixels(value3.value) : naturalHeight * value3.value : fallback;
42759
43296
  }
42760
- function chartRichTitleSvg(model, width, options6 = {}, frameHeight = 400) {
43297
+ function chartRichTitleSvg(model, width, options7 = {}, frameHeight = 400) {
42761
43298
  if (!model.title) return void 0;
42762
43299
  const base = chartTextAttributes(model, "title", 14);
42763
43300
  const capacity = Math.max(1, width * 0.8 - 8);
42764
- if (!model.titleText && !hasManualLayoutFields(model.titleLayout) && !model.titleOverlay && !model.title.includes("\n") && chartTextWidth(model.title, base, options6) <= capacity)
43301
+ if (!model.titleText && !hasManualLayoutFields(model.titleLayout) && !model.titleOverlay && !model.title.includes("\n") && chartTextWidth(model.title, base, options7) <= capacity)
42765
43302
  return void 0;
42766
43303
  const paragraphs = model.titleText?.paragraphs ?? [
42767
43304
  {
@@ -42797,7 +43334,7 @@ function chartRichTitleSvg(model, width, options6 = {}, frameHeight = 400) {
42797
43334
  "title",
42798
43335
  base.size
42799
43336
  ),
42800
- options6
43337
+ options7
42801
43338
  ),
42802
43339
  { breakWords: true }
42803
43340
  );
@@ -42821,10 +43358,10 @@ function chartRichTitleSvg(model, width, options6 = {}, frameHeight = 400) {
42821
43358
  return {
42822
43359
  ...line3,
42823
43360
  runs,
42824
- width: runs.reduce((sum3, run2) => sum3 + chartTextWidth(run2.text, run2.attrs, options6), 0),
43361
+ width: runs.reduce((sum3, run2) => sum3 + chartTextWidth(run2.text, run2.attrs, options7), 0),
42825
43362
  size: runs.length ? Math.max(...runs.map((run2) => run2.attrs.size ?? 14)) : base.size ?? 14,
42826
43363
  fontMetrics: (runs.length ? runs.map((run2) => run2.attrs) : [base]).map(
42827
- (attrs2) => chartFontMetrics(attrs2, options6)
43364
+ (attrs2) => chartFontMetrics(attrs2, options7)
42828
43365
  )
42829
43366
  };
42830
43367
  });
@@ -42862,7 +43399,7 @@ function chartRichTitleSvg(model, width, options6 = {}, frameHeight = 400) {
42862
43399
  anchor: "start"
42863
43400
  }).replace("<text ", '<tspan data-chart-title-run="true" ').replace("</text>", "</tspan>")
42864
43401
  );
42865
- x += chartTextWidth(run2.text, run2.attrs, options6);
43402
+ x += chartTextWidth(run2.text, run2.attrs, options7);
42866
43403
  }
42867
43404
  }
42868
43405
  const parent = text3(0, 0, "", { ...base, underline: false }).replace(
@@ -42888,7 +43425,7 @@ function chartRichTitleSvg(model, width, options6 = {}, frameHeight = 400) {
42888
43425
  }
42889
43426
 
42890
43427
  // chart/render/chart-svg.ts
42891
- function renderChartSvg(model, width, height, options6 = {}) {
43428
+ function renderChartSvg(model, width, height, options7 = {}) {
42892
43429
  const paint2 = chartGradientPaint(model, Math.max(1, width), Math.max(1, height));
42893
43430
  model = paint2.model;
42894
43431
  const w = Math.max(1, width);
@@ -42902,7 +43439,7 @@ function renderChartSvg(model, width, height, options6 = {}) {
42902
43439
  if (paint2.defs) out.push(paint2.defs);
42903
43440
  out.push(chartAreaRect(model, "chartArea", { x: 0, y: 0, w, h: h2 }));
42904
43441
  let area = { x: 8, y: 8, w: w - 16, h: h2 - 16 };
42905
- const richTitle = chartRichTitleSvg(model, w, options6, h2);
43442
+ const richTitle = chartRichTitleSvg(model, w, options7, h2);
42906
43443
  if (richTitle) {
42907
43444
  if (model.titleLayout || model.titleOverlay) foregroundTitle = richTitle.markup;
42908
43445
  else out.push(richTitle.markup);
@@ -42911,9 +43448,9 @@ function renderChartSvg(model, width, height, options6 = {}) {
42911
43448
  } else if (model.title) {
42912
43449
  const attrs2 = chartTextAttributes(model, "title", 14);
42913
43450
  const size = attrs2.size ?? 14;
42914
- const label2 = fitChartText(model.title, w - 16, attrs2, options6);
42915
- const titleWidth = Math.min(w - 16, chartTextWidth(label2, attrs2, options6) + 8);
42916
- const font = chartFontMetrics(attrs2, options6);
43451
+ const label2 = fitChartText(model.title, w - 16, attrs2, options7);
43452
+ const titleWidth = Math.min(w - 16, chartTextWidth(label2, attrs2, options7) + 8);
43453
+ const font = chartFontMetrics(attrs2, options7);
42917
43454
  const titleHeight = Math.max(24, font ? font.ascent + font.descent + 4 : size * 1.4 + 4);
42918
43455
  out.push(
42919
43456
  chartAreaRect(model, "title", {
@@ -42941,7 +43478,7 @@ function renderChartSvg(model, width, height, options6 = {}) {
42941
43478
  out.push("</svg>");
42942
43479
  return out.join("");
42943
43480
  }
42944
- const legend = chartLegendSvg(model, area, { width: w, height: h2 }, options6);
43481
+ const legend = chartLegendSvg(model, area, { width: w, height: h2 }, options7);
42945
43482
  area = legend.plot;
42946
43483
  if (!legend.foreground) out.push(legend.markup);
42947
43484
  if (area.w > 4 && area.h > 4) {
@@ -43068,11 +43605,11 @@ function createTemplateWorkbook(id, t) {
43068
43605
  }
43069
43606
 
43070
43607
  // xlsx/ui/commands.ts
43071
- function createCommandRegistry(context, options6 = {}) {
43608
+ function createCommandRegistry(context, options7 = {}) {
43072
43609
  const commands6 = /* @__PURE__ */ new Map();
43073
43610
  const isEnabled = (id) => {
43074
43611
  const command = commands6.get(id);
43075
- if (!command || options6.isHidden?.(id)) return false;
43612
+ if (!command || options7.isHidden?.(id)) return false;
43076
43613
  const ctx = context();
43077
43614
  if (command.editing && ctx.readOnly()) return false;
43078
43615
  try {
@@ -43099,7 +43636,7 @@ function createCommandRegistry(context, options6 = {}) {
43099
43636
  try {
43100
43637
  await command.run(ctx, arg);
43101
43638
  } catch (error) {
43102
- options6.onError?.(id, error);
43639
+ options7.onError?.(id, error);
43103
43640
  return false;
43104
43641
  }
43105
43642
  ctx.requestRender();
@@ -49172,9 +49709,9 @@ var grid = {
49172
49709
  // xlsx/ui/locales/de/options.ts
49173
49710
  var options_exports = {};
49174
49711
  __export(options_exports, {
49175
- options: () => options
49712
+ options: () => options2
49176
49713
  });
49177
- var options = {
49714
+ var options2 = {
49178
49715
  ...optionStrings.de,
49179
49716
  "Change options related to formula calculation, performance, and error handling.": "\xC4ndern Sie Optionen f\xFCr Formelberechnung, Leistung und Fehlerbehandlung.",
49180
49717
  "Calculation options": "Berechnungsoptionen",
@@ -49576,9 +50113,9 @@ var grid2 = {
49576
50113
  // xlsx/ui/locales/en/options.ts
49577
50114
  var options_exports2 = {};
49578
50115
  __export(options_exports2, {
49579
- options: () => options2
50116
+ options: () => options3
49580
50117
  });
49581
- var options2 = {
50118
+ var options3 = {
49582
50119
  ...optionStrings.en,
49583
50120
  "Change options related to formula calculation, performance, and error handling.": "Change options related to formula calculation, performance, and error handling.",
49584
50121
  "Calculation options": "Calculation options",
@@ -49980,9 +50517,9 @@ var grid3 = {
49980
50517
  // xlsx/ui/locales/es/options.ts
49981
50518
  var options_exports3 = {};
49982
50519
  __export(options_exports3, {
49983
- options: () => options3
50520
+ options: () => options4
49984
50521
  });
49985
- var options3 = {
50522
+ var options4 = {
49986
50523
  ...optionStrings.es,
49987
50524
  "Change options related to formula calculation, performance, and error handling.": "Cambie las opciones relacionadas con el c\xE1lculo de f\xF3rmulas, el rendimiento y el control de errores.",
49988
50525
  "Calculation options": "Opciones de c\xE1lculo",
@@ -50384,9 +50921,9 @@ var grid4 = {
50384
50921
  // xlsx/ui/locales/fr/options.ts
50385
50922
  var options_exports4 = {};
50386
50923
  __export(options_exports4, {
50387
- options: () => options4
50924
+ options: () => options5
50388
50925
  });
50389
- var options4 = {
50926
+ var options5 = {
50390
50927
  ...optionStrings.fr,
50391
50928
  "Change options related to formula calculation, performance, and error handling.": "Modifiez les options relatives au calcul des formules, aux performances et \xE0 la gestion des erreurs.",
50392
50929
  "Calculation options": "Options de calcul",
@@ -50788,9 +51325,9 @@ var grid5 = {
50788
51325
  // xlsx/ui/locales/zh-CN/options.ts
50789
51326
  var options_exports5 = {};
50790
51327
  __export(options_exports5, {
50791
- options: () => options5
51328
+ options: () => options6
50792
51329
  });
50793
- var options5 = {
51330
+ var options6 = {
50794
51331
  ...optionStrings["zh-CN"],
50795
51332
  "Change options related to formula calculation, performance, and error handling.": "\u66F4\u6539\u4E0E\u516C\u5F0F\u8BA1\u7B97\u3001\u6027\u80FD\u548C\u9519\u8BEF\u5904\u7406\u76F8\u5173\u7684\u9009\u9879\u3002",
50796
51333
  "Calculation options": "\u8BA1\u7B97\u9009\u9879",
@@ -52430,11 +52967,11 @@ var ACCOUNTING_FORMATS = [
52430
52967
  ];
52431
52968
  var COMMA = BUILTIN_NUMBER_FORMATS[43] ?? '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)';
52432
52969
  function numberFormatOptions(ctx) {
52433
- const options6 = FORMAT_PRESETS.map((p) => ({ value: p.format, label: ctx.t(p.label) }));
52970
+ const options7 = FORMAT_PRESETS.map((p) => ({ value: p.format, label: ctx.t(p.label) }));
52434
52971
  const current = activeStyle(ctx)?.numFmt;
52435
- if (current && !options6.some((o) => o.value === current))
52436
- options6.push({ value: current, label: ctx.t("Custom") });
52437
- return options6;
52972
+ if (current && !options7.some((o) => o.value === current))
52973
+ options7.push({ value: current, label: ctx.t("Custom") });
52974
+ return options7;
52438
52975
  }
52439
52976
  var sampleNumber = (ctx) => {
52440
52977
  const t = target(ctx);
@@ -53108,8 +53645,8 @@ function detectCategory(code) {
53108
53645
  for (const thousands of [false, true])
53109
53646
  for (let symbol2 = 0; symbol2 < SYMBOLS.length; symbol2++)
53110
53647
  for (let negative = 0; negative < 4; negative++) {
53111
- const options6 = { decimals: dec, thousands, symbol: symbol2, negative, code };
53112
- if (buildCode(category, options6) === code) return { category, options: options6 };
53648
+ const options7 = { decimals: dec, thousands, symbol: symbol2, negative, code };
53649
+ if (buildCode(category, options7) === code) return { category, options: options7 };
53113
53650
  }
53114
53651
  return { category: "custom", options: base };
53115
53652
  }
@@ -53123,7 +53660,7 @@ var absolute = (r) => {
53123
53660
  };
53124
53661
  var value2 = (ws, row2, col) => getCell(ws, row2, col)?.value ?? null;
53125
53662
  var isText = (v) => typeof v === "string" && v !== "";
53126
- function buildChart(workbook, sheetIndex2, range2, type, options6 = {}) {
53663
+ function buildChart(workbook, sheetIndex2, range2, type, options7 = {}) {
53127
53664
  const ws = workbook.sheets[sheetIndex2];
53128
53665
  if (!ws) throw new RangeError(`No sheet at index ${sheetIndex2}`);
53129
53666
  const r = normalizeRange(range2);
@@ -53184,8 +53721,8 @@ function buildChart(workbook, sheetIndex2, range2, type, options6 = {}) {
53184
53721
  showLegend: series.length > 1 || type === "pie" || type === "doughnut",
53185
53722
  legendPosition: "b"
53186
53723
  };
53187
- if (options6.grouping && (type === "column" || type === "bar")) chart.grouping = options6.grouping;
53188
- if (options6.title) chart.title = options6.title;
53724
+ if (options7.grouping && (type === "column" || type === "bar")) chart.grouping = options7.grouping;
53725
+ if (options7.title) chart.title = options7.title;
53189
53726
  return chart;
53190
53727
  }
53191
53728
  function evaluateRef(workbook, sheetIndex2, ref) {
@@ -53229,7 +53766,7 @@ function parseChartGrid(text4) {
53229
53766
  const width = rows2.reduce((most, row2) => Math.max(most, row2.length), 0);
53230
53767
  return rows2.map((row2) => [...row2, ...Array(width - row2.length).fill(null)]);
53231
53768
  }
53232
- function gridChart(rows2, type, options6 = {}) {
53769
+ function gridChart(rows2, type, options7 = {}) {
53233
53770
  const width = rows2[0]?.length ?? 0;
53234
53771
  if (rows2.length === 0 || width === 0) return void 0;
53235
53772
  const workbook = createWorkbook();
@@ -53239,7 +53776,7 @@ function gridChart(rows2, type, options6 = {}) {
53239
53776
  rows2.map((row2) => [...row2])
53240
53777
  );
53241
53778
  const range2 = { start: { row: 0, col: 0 }, end: { row: rows2.length - 1, col: width - 1 } };
53242
- return { workbook, chart: buildChart(workbook, 0, range2, type, options6) };
53779
+ return { workbook, chart: buildChart(workbook, 0, range2, type, options7) };
53243
53780
  }
53244
53781
  function gridChartSvg(grid6, width, height, bare = false) {
53245
53782
  const chart = bare ? { ...grid6.chart, title: "", showLegend: false } : grid6.chart;
@@ -53248,8 +53785,8 @@ function gridChartSvg(grid6, width, height, bare = false) {
53248
53785
  }
53249
53786
  var EMBED_ANCHOR = { fromCol: 4, toCol: 14, rows: 20 };
53250
53787
  var EMBED_ASPECT = (EMBED_ANCHOR.toCol - EMBED_ANCHOR.fromCol) * 64 / (EMBED_ANCHOR.rows * 20);
53251
- async function gridChartWorkbook(rows2, type, options6 = {}) {
53252
- const grid6 = gridChart(rows2, type, options6);
53788
+ async function gridChartWorkbook(rows2, type, options7 = {}) {
53789
+ const grid6 = gridChart(rows2, type, options7);
53253
53790
  if (!grid6) return void 0;
53254
53791
  const { workbook, chart } = grid6;
53255
53792
  chart.anchor = {
@@ -53628,7 +54165,7 @@ function createEditBridge() {
53628
54165
  listeners2.add(listener);
53629
54166
  return () => listeners2.delete(listener);
53630
54167
  },
53631
- begin: (options6 = {}) => driver?.begin(options6) ?? false,
54168
+ begin: (options7 = {}) => driver?.begin(options7) ?? false,
53632
54169
  update(text4, caret, source2) {
53633
54170
  if (!state.editing) return;
53634
54171
  state = { ...state, text: text4, caret, source: source2 };