@evotecit/officeimo 0.1.2 → 0.1.4

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 (54) hide show
  1. package/README.md +59 -51
  2. package/bundles/officeimo-canopyx.js +1553 -314
  3. package/bundles/officeimo-canopyx.mjs +1497 -269
  4. package/bundles/officeimo-csv.js +18 -15
  5. package/bundles/officeimo-csv.mjs +16 -13
  6. package/bundles/officeimo-datatables.js +463 -301
  7. package/bundles/officeimo-datatables.mjs +420 -259
  8. package/bundles/officeimo-pdf.js +148 -65
  9. package/bundles/officeimo-pdf.mjs +124 -41
  10. package/bundles/officeimo-xlsx.js +177 -101
  11. package/bundles/officeimo-xlsx.mjs +149 -74
  12. package/bundles/officeimo.js +461 -299
  13. package/bundles/officeimo.mjs +419 -258
  14. package/dist/csv/index.js +16 -13
  15. package/dist/integrations/canopyx/diagnostics.d.ts +3 -0
  16. package/dist/integrations/canopyx/diagnostics.js +17 -0
  17. package/dist/integrations/canopyx/grouping.d.ts +6 -0
  18. package/dist/integrations/canopyx/grouping.js +198 -0
  19. package/dist/integrations/canopyx/index.d.ts +2 -2
  20. package/dist/integrations/canopyx/index.js +89 -15
  21. package/dist/integrations/canopyx/metadata.d.ts +4 -0
  22. package/dist/integrations/canopyx/metadata.js +51 -0
  23. package/dist/integrations/canopyx/pdf-layout.d.ts +5 -0
  24. package/dist/integrations/canopyx/pdf-layout.js +97 -0
  25. package/dist/integrations/canopyx/pdf-number.d.ts +3 -0
  26. package/dist/integrations/canopyx/pdf-number.js +64 -0
  27. package/dist/integrations/canopyx/pivot.d.ts +15 -0
  28. package/dist/integrations/canopyx/pivot.js +67 -0
  29. package/dist/integrations/canopyx/presentation.d.ts +8 -0
  30. package/dist/integrations/canopyx/presentation.js +40 -0
  31. package/dist/integrations/canopyx/rule-predicates.d.ts +3 -0
  32. package/dist/integrations/canopyx/rule-predicates.js +110 -0
  33. package/dist/integrations/canopyx/rules.d.ts +6 -0
  34. package/dist/integrations/canopyx/rules.js +176 -0
  35. package/dist/integrations/canopyx/source.js +69 -31
  36. package/dist/integrations/canopyx/types.d.ts +134 -10
  37. package/dist/integrations/canopyx/workbook.d.ts +6 -0
  38. package/dist/integrations/canopyx/workbook.js +52 -0
  39. package/dist/opc/index.js +9 -0
  40. package/dist/pdf/font-resources.js +33 -14
  41. package/dist/pdf/pages.js +60 -14
  42. package/dist/pdf/table-band-flow.js +7 -2
  43. package/dist/pdf/table-band-plan.js +9 -1
  44. package/dist/pdf/table-layout.js +6 -2
  45. package/dist/pdf/table-structure.js +9 -8
  46. package/dist/xlsx/index.d.ts +1 -1
  47. package/dist/xlsx/options.js +1 -1
  48. package/dist/xlsx/outlines.d.ts +3 -0
  49. package/dist/xlsx/outlines.js +39 -0
  50. package/dist/xlsx/types.d.ts +9 -0
  51. package/dist/xlsx/values.js +11 -2
  52. package/dist/xlsx/workbook.js +2 -0
  53. package/dist/xlsx/worksheet.js +14 -6
  54. package/package.json +2 -2
@@ -1543,7 +1543,7 @@ _modules.set("56b2057461a668e8c90abd1fbf4f13ff93efd9854e590c82a195799f0f842c2a",
1543
1543
  return _exports;
1544
1544
  })();
1545
1545
 
1546
- const _m18 = _modules.get("4d4856357f94ecbeea67d111ff5e97f916ccc6be6aaefde219d461c6ad10a8c5") ?? (() => {
1546
+ const _m18 = _modules.get("945379594834125fea38bc00f02ef077409dd15f6ed67279e63e89afe0bb944b") ?? (() => {
1547
1547
 
1548
1548
 
1549
1549
 
@@ -1621,7 +1621,16 @@ class OpcPackage {
1621
1621
  throw new OfficeIMOError("INVALID_STATE", "OPC package is finalized."); }
1622
1622
  reserve(uri, type) {
1623
1623
  this.open();
1624
+ // OPC part names become ZIP entry names. Reject oversized and deeply nested
1625
+ // names before collecting every ancestor prefix.
1626
+ if (typeof uri === "string" && uri.length > 65536)
1627
+ throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the ZIP entry-name limit.");
1624
1628
  uri = partUri(uri);
1629
+ let depth = 0;
1630
+ for (let index = 0; index < uri.length; index++) {
1631
+ if (uri[index] === "/" && ++depth > 64)
1632
+ throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the directory-depth limit.");
1633
+ }
1625
1634
  if (/\/_rels(?:\/|$)/i.test(uri) || uri.toLowerCase() === "/[content_types].xml")
1626
1635
  throw new TypeError("Package metadata part names are reserved.");
1627
1636
  const key = uri.toLowerCase();
@@ -1793,7 +1802,7 @@ class OpcPackage {
1793
1802
  }
1794
1803
  }
1795
1804
  const _exports = Object.freeze({ partUri: _m19.partUri, relationshipPartUri: _m19.relationshipPartUri, relativePartTarget: _m19.relativePartTarget, corePropertiesXml: _m20.corePropertiesXml, appPropertiesXml: _m20.appPropertiesXml, relationshipsNamespace: relationshipsNamespace, officeRelationshipsNamespace: officeRelationshipsNamespace, contentTypesNamespace: contentTypesNamespace, relationshipTypes: relationshipTypes, ContentTypes: ContentTypes, OpcPackage: OpcPackage });
1796
- _modules.set("4d4856357f94ecbeea67d111ff5e97f916ccc6be6aaefde219d461c6ad10a8c5", _exports);
1805
+ _modules.set("945379594834125fea38bc00f02ef077409dd15f6ed67279e63e89afe0bb944b", _exports);
1797
1806
  return _exports;
1798
1807
  })();
1799
1808
 
@@ -2262,7 +2271,7 @@ _modules.set("f1de2157d2aefa347a314940eb7f89c16545e11f69923920e605409433742f93",
2262
2271
  return _exports;
2263
2272
  })();
2264
2273
 
2265
- const _m27 = _modules.get("4bce839e90e3ef590aa1b224ffd9c4bdf24d7639b93bdf879f9a0d79de4cd0e4") ?? (() => {
2274
+ const _m27 = _modules.get("e88a83ca79cd099fc2de29689554c913c7d04b17018098f81c43044064fcdfb8") ?? (() => {
2266
2275
  const { cleanXml, escapeXml } = _m17;
2267
2276
 
2268
2277
  const { assertExportValue, assertScalar } = _m5;
@@ -2321,14 +2330,23 @@ function columnName(index) {
2321
2330
  return name;
2322
2331
  }
2323
2332
  function clipName(text, length) { return text.slice(0, length).replace(/[\ud800-\udbff]$/, ""); }
2333
+ function trimSheetNameEdges(text) {
2334
+ let start = 0, end = text.length;
2335
+ const removable = (character) => character === "'" || /\s/u.test(character);
2336
+ while (start < end && removable(text[start]))
2337
+ start++;
2338
+ while (end > start && removable(text[end - 1]))
2339
+ end--;
2340
+ return text.slice(start, end);
2341
+ }
2324
2342
  function sheetName(requested, names, policy, register = true) {
2325
2343
  if (typeof requested !== "string")
2326
2344
  throw new TypeError("Sheet name must be a string.");
2327
2345
  // Validate and deduplicate the decoded literal value, before ST_Xstring attribute encoding.
2328
2346
  // A requested _xHHHH_ token is literal text; the serializer protects its leading underscore.
2329
- let base = cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_").replace(/^[\s']+|[\s']+$/g, "");
2347
+ let base = trimSheetNameEdges(cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_"));
2330
2348
  // Clipping can expose an internal apostrophe or the reserved History name.
2331
- base = clipName(base, 31).replace(/[\s']+$/g, "");
2349
+ base = trimSheetNameEdges(clipName(base, 31));
2332
2350
  if (!base)
2333
2351
  base = "Sheet";
2334
2352
  if (base.toLowerCase() === "history")
@@ -2355,11 +2373,57 @@ function excelDate(date, mode) {
2355
2373
  return (time - Date.UTC(1899, 11, 31)) / 86400000 + (time >= Date.UTC(1900, 2, 1) ? 1 : 0);
2356
2374
  }
2357
2375
  const _exports = Object.freeze({ Cell: Cell, assertXlsxValue: assertXlsxValue, copyValue: copyValue, cellText: cellText, inlineText: inlineText, columnName: columnName, sheetName: sheetName, excelDate: excelDate });
2358
- _modules.set("4bce839e90e3ef590aa1b224ffd9c4bdf24d7639b93bdf879f9a0d79de4cd0e4", _exports);
2376
+ _modules.set("e88a83ca79cd099fc2de29689554c913c7d04b17018098f81c43044064fcdfb8", _exports);
2377
+ return _exports;
2378
+ })();
2379
+
2380
+ const _m29 = _modules.get("e92456dbf0c50db97c8b6cf9a09365489ca3a882b4d506ad4dd841805b1146d1") ?? (() => {
2381
+ const { captureFields } = _m10;
2382
+
2383
+ /** Capture bounded disjoint ranges before asynchronous serialization; absent columns stay visible. */
2384
+ function captureColumnOutlines(input, columns) {
2385
+ if (input === undefined)
2386
+ return undefined;
2387
+ if (!Array.isArray(input) || input.length > columns)
2388
+ throw new TypeError("Column outlines must be bounded, non-overlapping ranges.");
2389
+ let end = 0;
2390
+ return Object.freeze(input.map(range => {
2391
+ if (!range || typeof range !== "object")
2392
+ throw new TypeError("Column outlines require range metadata.");
2393
+ return captureFields(range, ["firstColumn", "columnCount", "level", "hidden", "collapsed"]);
2394
+ }).sort((a, b) => a.firstColumn - b.firstColumn).map(range => {
2395
+ const { firstColumn, columnCount, level = 0, hidden, collapsed } = range;
2396
+ if (!Number.isSafeInteger(firstColumn) || firstColumn < end || !Number.isSafeInteger(columnCount) || columnCount < 1 || firstColumn + columnCount > columns)
2397
+ throw new RangeError("Column outline ranges must be disjoint and within the declared columns.");
2398
+ if (!Number.isInteger(level) || level < 0 || level > 7)
2399
+ throw new RangeError("Column outline level must be from zero through seven.");
2400
+ for (const flag of [hidden, collapsed])
2401
+ if (flag !== undefined && typeof flag !== "boolean")
2402
+ throw new TypeError("Column outline flags must be booleans.");
2403
+ end = firstColumn + columnCount;
2404
+ return Object.freeze({ firstColumn, columnCount, level, ...(hidden === undefined ? {} : { hidden }), ...(collapsed === undefined ? {} : { collapsed }) });
2405
+ }));
2406
+ }
2407
+ /** @internal Positions are captured even when a sheet has only column outlines. */
2408
+ function validateOutlinePositions(options) {
2409
+ for (const flag of [options.outlineSummaryBelow, options.outlineSummaryRight])
2410
+ if (flag !== undefined && typeof flag !== "boolean")
2411
+ throw new TypeError("Outline summary positions must be booleans.");
2412
+ }
2413
+ /** @internal Resolve at most 16,384 columns once, without retaining any worksheet body. */
2414
+ function columnOutlineMap(ranges) {
2415
+ const result = new Map();
2416
+ for (const range of ranges ?? [])
2417
+ for (let index = range.firstColumn; index < range.firstColumn + range.columnCount; index++)
2418
+ result.set(index, range);
2419
+ return result;
2420
+ }
2421
+ const _exports = Object.freeze({ captureColumnOutlines: captureColumnOutlines, validateOutlinePositions: validateOutlinePositions, columnOutlineMap: columnOutlineMap });
2422
+ _modules.set("e92456dbf0c50db97c8b6cf9a09365489ca3a882b4d506ad4dd841805b1146d1", _exports);
2359
2423
  return _exports;
2360
2424
  })();
2361
2425
 
2362
- const _m29 = _modules.get("d56b24243cff6f3552a2f7b45521af4491494375ec76117e9ac1ebb047ce02da") ?? (() => {
2426
+ const _m30 = _modules.get("d56b24243cff6f3552a2f7b45521af4491494375ec76117e9ac1ebb047ce02da") ?? (() => {
2363
2427
  const { assertExportValue } = _m5;
2364
2428
 
2365
2429
  const { copyExportValue } = _m13;
@@ -2425,7 +2489,7 @@ _modules.set("d56b24243cff6f3552a2f7b45521af4491494375ec76117e9ac1ebb047ce02da",
2425
2489
  return _exports;
2426
2490
  })();
2427
2491
 
2428
- const _m32 = _modules.get("84c16159c55cf4c0af5d3c67510302694946ae99c6c685fc09314069ee3da5c5") ?? (() => {
2492
+ const _m33 = _modules.get("aaf6808e1812a251687fd513480fe845b5677ffa493bccf519409807fe4d250c") ?? (() => {
2429
2493
  const { ChunkedTextSink } = _m3;
2430
2494
 
2431
2495
  const { escapeXml, xmlDeclaration } = _m17;
@@ -2534,18 +2598,18 @@ async function writeChartXml(chart, destination, policy, signal) {
2534
2598
  await text.close();
2535
2599
  }
2536
2600
  const _exports = Object.freeze({ chartNamespace: chartNamespace, chartContentType: chartContentType, chartAnchorXml: chartAnchorXml, writeChartXml: writeChartXml });
2537
- _modules.set("84c16159c55cf4c0af5d3c67510302694946ae99c6c685fc09314069ee3da5c5", _exports);
2601
+ _modules.set("aaf6808e1812a251687fd513480fe845b5677ffa493bccf519409807fe4d250c", _exports);
2538
2602
  return _exports;
2539
2603
  })();
2540
2604
 
2541
- const _m31 = _modules.get("9d4496a1ff3d58ac0b9dcd7304e6861184df30700c344329157899639df7b5e4") ?? (() => {
2605
+ const _m32 = _modules.get("d599dca57105b9cc787ba2498051ed0193cbdb1e5f23116e35bc77cd67a233f1") ?? (() => {
2542
2606
  const { cleanXml, escapeXml, escapeOoxmlAttribute, xmlDeclaration } = _m17;
2543
2607
 
2544
2608
  const { copyExportLink } = _m7;
2545
2609
 
2546
2610
  const { officeRelationshipsNamespace } = _m18;
2547
2611
 
2548
- const { chartAnchorXml } = _m32;
2612
+ const { chartAnchorXml } = _m33;
2549
2613
 
2550
2614
  const { captureFields } = _m10;
2551
2615
 
@@ -2612,14 +2676,14 @@ function drawingXml(images, policy, charts = []) {
2612
2676
  }
2613
2677
  const drawingContentType = "application/vnd.openxmlformats-officedocument.drawing+xml";
2614
2678
  const _exports = Object.freeze({ copyDrawingAnchor: copyDrawingAnchor, cellPosition: cellPosition, copyHyperlink: copyHyperlink, copyImage: copyImage, hyperlinksXml: hyperlinksXml, drawingXml: drawingXml, drawingContentType: drawingContentType });
2615
- _modules.set("9d4496a1ff3d58ac0b9dcd7304e6861184df30700c344329157899639df7b5e4", _exports);
2679
+ _modules.set("d599dca57105b9cc787ba2498051ed0193cbdb1e5f23116e35bc77cd67a233f1", _exports);
2616
2680
  return _exports;
2617
2681
  })();
2618
2682
 
2619
- const _m34 = _modules.get("4c91e257806f805b473340527db7ce3404c98ac27db0a775ff047dc3dded10cc") ?? (() => {
2683
+ const _m35 = _modules.get("39155eb25a58694b2caf100529b6c13dbe91f583741807b46232a2a567e19ecb") ?? (() => {
2620
2684
  const { OfficeIMOError } = _m2;
2621
2685
 
2622
- const { cellPosition } = _m31;
2686
+ const { cellPosition } = _m32;
2623
2687
 
2624
2688
  function indexRows(regions) {
2625
2689
  if (!regions.length)
@@ -2717,14 +2781,14 @@ class MergeRegions {
2717
2781
  throw new RangeError("Merged ranges must stay within exported rows."); }
2718
2782
  }
2719
2783
  const _exports = Object.freeze({ MergeRegions: MergeRegions });
2720
- _modules.set("4c91e257806f805b473340527db7ce3404c98ac27db0a775ff047dc3dded10cc", _exports);
2784
+ _modules.set("39155eb25a58694b2caf100529b6c13dbe91f583741807b46232a2a567e19ecb", _exports);
2721
2785
  return _exports;
2722
2786
  })();
2723
2787
 
2724
- const _m35 = _modules.get("47efdc8f108b0e995accdd63fd1addea0e4de507010cbf0975417e7151636360") ?? (() => {
2788
+ const _m36 = _modules.get("2a51a034ac74f5a0656731f46740bb80adee48101e7a4b51253d9399df11d238") ?? (() => {
2725
2789
  const { ExportCell } = _m5;
2726
2790
 
2727
- const { tableSpans } = _m29;
2791
+ const { tableSpans } = _m30;
2728
2792
 
2729
2793
  const { copyValue, columnName } = _m27;
2730
2794
 
@@ -2754,11 +2818,11 @@ class StructuredRows {
2754
2818
  }
2755
2819
  }
2756
2820
  const _exports = Object.freeze({ StructuredRows: StructuredRows });
2757
- _modules.set("47efdc8f108b0e995accdd63fd1addea0e4de507010cbf0975417e7151636360", _exports);
2821
+ _modules.set("2a51a034ac74f5a0656731f46740bb80adee48101e7a4b51253d9399df11d238", _exports);
2758
2822
  return _exports;
2759
2823
  })();
2760
2824
 
2761
- const _m33 = _modules.get("23615ba776e7025e5e40cde325ad13799a7eeae6c88cb2ed74395222f91e6a81") ?? (() => {
2825
+ const _m34 = _modules.get("b732883d8635c0adf27cef2a3900f08374d02c9ce1b005d02af6853c8be627cc") ?? (() => {
2762
2826
  const { ExportCell } = _m5;
2763
2827
 
2764
2828
  const { isDate } = _m6;
@@ -2769,13 +2833,13 @@ const { FormulaCell } = _m28;
2769
2833
 
2770
2834
  const { escapeOoxmlAttribute } = _m17;
2771
2835
 
2772
- const { MergeRegions } = _m34;
2836
+ const { MergeRegions } = _m35;
2773
2837
 
2774
2838
  const { OfficeIMOError } = _m2;
2775
2839
 
2776
2840
  const { createTotals } = _m12;
2777
2841
 
2778
- const { StructuredRows } = _m35;
2842
+ const { StructuredRows } = _m36;
2779
2843
 
2780
2844
  /** @internal A computed formula with a numeric cache; no public arbitrary-formula input. */
2781
2845
  class ComputedTotal {
@@ -2955,11 +3019,11 @@ function printXml(options, policy) {
2955
3019
  (options.footer === undefined ? "" : '<oddFooter>' + escapeOoxmlAttribute("&C" + options.footer.replace(/&/g, "&&"), policy) + '</oddFooter>') + '</headerFooter>' : "");
2956
3020
  }
2957
3021
  const _exports = Object.freeze({ ComputedTotal: ComputedTotal, ReportLayout: ReportLayout, totalFormula: totalFormula, printXml: printXml });
2958
- _modules.set("23615ba776e7025e5e40cde325ad13799a7eeae6c88cb2ed74395222f91e6a81", _exports);
3022
+ _modules.set("b732883d8635c0adf27cef2a3900f08374d02c9ce1b005d02af6853c8be627cc", _exports);
2959
3023
  return _exports;
2960
3024
  })();
2961
3025
 
2962
- const _m37 = _modules.get("7845d79cd22590bbefc767802abfe3f805e8f68807521cef8d07ecc42db0b491") ?? (() => {
3026
+ const _m38 = _modules.get("09d589ff8f82302ce4c17411c7b811a87fb034e61e4b3013b7f8b18853a90449") ?? (() => {
2963
3027
  const { columnName } = _m27;
2964
3028
 
2965
3029
  /** @internal Data-column selectors use stable keys or one-based worksheet columns. */
@@ -2986,11 +3050,11 @@ function qualifiedCell(sheetName, column, row) {
2986
3050
  return qualifiedColumnRange(sheetName, column, row, 1).split(":")[0];
2987
3051
  }
2988
3052
  const _exports = Object.freeze({ resolveDataColumn: resolveDataColumn, qualifiedColumnRange: qualifiedColumnRange, qualifiedCell: qualifiedCell });
2989
- _modules.set("7845d79cd22590bbefc767802abfe3f805e8f68807521cef8d07ecc42db0b491", _exports);
3053
+ _modules.set("09d589ff8f82302ce4c17411c7b811a87fb034e61e4b3013b7f8b18853a90449", _exports);
2990
3054
  return _exports;
2991
3055
  })();
2992
3056
 
2993
- const _m38 = _modules.get("4892a7dafefc4d82567cd2bd4cc8da5470cee4dbf546e6473f782f44bd4bbe35") ?? (() => {
3057
+ const _m39 = _modules.get("55a9bd1fb59ea19bf98a03859769a119fdc71a44075e560937e7184720e53514") ?? (() => {
2994
3058
  const { OfficeIMOError } = _m2;
2995
3059
 
2996
3060
  const { columnName } = _m27;
@@ -3033,22 +3097,22 @@ function dataRowReference(firstColumn, lastColumn, headerRows, dataRows, ranges)
3033
3097
  return reference || undefined;
3034
3098
  }
3035
3099
  const _exports = Object.freeze({ retainDataRowRanges: retainDataRowRanges, dataRowRanges: dataRowRanges, dataRowCount: dataRowCount, dataRowReference: dataRowReference });
3036
- _modules.set("4892a7dafefc4d82567cd2bd4cc8da5470cee4dbf546e6473f782f44bd4bbe35", _exports);
3100
+ _modules.set("55a9bd1fb59ea19bf98a03859769a119fdc71a44075e560937e7184720e53514", _exports);
3037
3101
  return _exports;
3038
3102
  })();
3039
3103
 
3040
- const _m36 = _modules.get("736b2b2fc3489642263dbaf677544e8a270eea6b8efb0cc26c67346e66cab118") ?? (() => {
3104
+ const _m37 = _modules.get("a1b616256344317787b0b102f35d062009d6a2e9c873b9f106c99c095c92ace3") ?? (() => {
3041
3105
  const { cleanXml, escapeXml, escapeOoxmlAttribute } = _m17;
3042
3106
 
3043
- const { cellPosition } = _m31;
3107
+ const { cellPosition } = _m32;
3044
3108
 
3045
3109
  const { colorArgb } = _m25;
3046
3110
 
3047
3111
  const { fields, optionalBoolean, differentialXml } = _m26;
3048
3112
 
3049
- const { resolveDataColumn } = _m37;
3113
+ const { resolveDataColumn } = _m38;
3050
3114
 
3051
- const { dataRowReference } = _m38;
3115
+ const { dataRowReference } = _m39;
3052
3116
 
3053
3117
  function target(range, columns) {
3054
3118
  if (typeof range === "string") {
@@ -3203,11 +3267,11 @@ class ConditionalFormats {
3203
3267
  }
3204
3268
  }
3205
3269
  const _exports = Object.freeze({ prepareConditionalFormats: prepareConditionalFormats, ConditionalFormats: ConditionalFormats });
3206
- _modules.set("736b2b2fc3489642263dbaf677544e8a270eea6b8efb0cc26c67346e66cab118", _exports);
3270
+ _modules.set("a1b616256344317787b0b102f35d062009d6a2e9c873b9f106c99c095c92ace3", _exports);
3207
3271
  return _exports;
3208
3272
  })();
3209
3273
 
3210
- const _m39 = _modules.get("860c88d97ba76e8713c14d56967152e369d2f08f50ffada68827a9c220881c61") ?? (() => {
3274
+ const _m40 = _modules.get("13fa96d976e4dec7343dd3a392829567f1fcb574324a98f5a5d3a61c9a0dc27d") ?? (() => {
3211
3275
  const { OfficeIMOError } = _m2;
3212
3276
 
3213
3277
  const { checkAbort } = _m4;
@@ -3216,9 +3280,9 @@ const { cleanXml, escapeOoxmlAttribute, escapeXml } = _m17;
3216
3280
 
3217
3281
  const { fields, optionalBoolean } = _m26;
3218
3282
 
3219
- const { resolveDataColumn } = _m37;
3283
+ const { resolveDataColumn } = _m38;
3220
3284
 
3221
- const { dataRowReference } = _m38;
3285
+ const { dataRowReference } = _m39;
3222
3286
 
3223
3287
  function message(value, maximum, name) {
3224
3288
  if (value === undefined)
@@ -3307,11 +3371,11 @@ function* dataValidationsXml(prepared, headerRows, dataRows, ranges) {
3307
3371
  yield '</dataValidations>';
3308
3372
  }
3309
3373
  const _exports = Object.freeze({ prepareDataValidations: prepareDataValidations, dataValidationsXml: dataValidationsXml });
3310
- _modules.set("860c88d97ba76e8713c14d56967152e369d2f08f50ffada68827a9c220881c61", _exports);
3374
+ _modules.set("13fa96d976e4dec7343dd3a392829567f1fcb574324a98f5a5d3a61c9a0dc27d", _exports);
3311
3375
  return _exports;
3312
3376
  })();
3313
3377
 
3314
- const _m30 = _modules.get("b99287e3e329b75007119103112a699c368d8237b37fa79e083b0014a21952e4") ?? (() => {
3378
+ const _m31 = _modules.get("a61e744201bb537b635b367b1764bd85892101d55e00b8c78faec8be89577376") ?? (() => {
3315
3379
  const { checkAbort, consumeRows, inputRows, pause, taskYieldDue } = _m4;
3316
3380
 
3317
3381
  const { ChunkedTextSink, BlobByteSink } = _m3;
@@ -3332,25 +3396,27 @@ const { Cell, cellText, columnName, inlineText, excelDate, copyValue } = _m27;
3332
3396
 
3333
3397
  const { spreadsheetNamespace, colorArgb, validateStylePatch, copyStylePatch } = _m24;
3334
3398
 
3335
- const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } = _m31;
3399
+ const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } = _m32;
3336
3400
 
3337
3401
  const { ExportCell, assertScalar } = _m5;
3338
3402
 
3339
- const { ReportLayout, ComputedTotal, printXml } = _m33;
3403
+ const { ReportLayout, ComputedTotal, printXml } = _m34;
3340
3404
 
3341
3405
  const { cleanXml } = _m17;
3342
3406
 
3343
- const { ConditionalFormats, prepareConditionalFormats } = _m36;
3407
+ const { ConditionalFormats, prepareConditionalFormats } = _m37;
3344
3408
 
3345
3409
  const { isDate } = _m6;
3346
3410
 
3347
3411
  const { FormulaCell, formulaXml, isSubtotalFormula } = _m28;
3348
3412
 
3349
- const { prepareDataValidations, dataValidationsXml } = _m39;
3413
+ const { prepareDataValidations, dataValidationsXml } = _m40;
3414
+
3415
+ const { qualifiedCell, qualifiedColumnRange, resolveDataColumn } = _m38;
3350
3416
 
3351
- const { qualifiedCell, qualifiedColumnRange, resolveDataColumn } = _m37;
3417
+ const { dataRowRanges, dataRowCount } = _m39;
3352
3418
 
3353
- const { dataRowRanges, dataRowCount } = _m38;
3419
+ const { captureColumnOutlines, columnOutlineMap, validateOutlinePositions } = _m29;
3354
3420
 
3355
3421
  const maximumHyperlinks = 65530;
3356
3422
  function checkHyperlinkCount(count) {
@@ -3482,6 +3548,8 @@ class Worksheet {
3482
3548
  throw new TypeError("Row and style callbacks must be functions.");
3483
3549
  if (options.maxOutlineLevel !== undefined && (!Number.isInteger(options.maxOutlineLevel) || options.maxOutlineLevel < 0 || options.maxOutlineLevel > 7))
3484
3550
  throw new RangeError("Maximum outline level must be an integer from zero through seven.");
3551
+ validateOutlinePositions(options);
3552
+ captureColumnOutlines(options.columnOutlines, columns.length);
3485
3553
  if (options.rowOutline && options.maxOutlineLevel === undefined)
3486
3554
  throw new TypeError("A row outline callback requires maxOutlineLevel before streamed rows are written.");
3487
3555
  if (!options.rowOutline && options.maxOutlineLevel !== undefined)
@@ -3766,17 +3834,22 @@ class Worksheet {
3766
3834
  const buffer = this.buffer = new ChunkedTextSink(this.entry, this.book.settings.signal), opts = this.options;
3767
3835
  const x = opts.freezeColumns ?? 0, y = opts.freezeHeader ? this.headerRows : 0;
3768
3836
  const pane = x && y ? "bottomRight" : x ? "topRight" : "bottomLeft", cell = columnName(x + 1) + (y + 1);
3837
+ const outlines = columnOutlineMap(opts.columnOutlines), hasOutline = !!opts.rowOutline || outlines.size > 0;
3838
+ const maxColumnLevel = Math.max(0, ...Array.from(outlines.values(), value => value.level ?? 0));
3769
3839
  await buffer.write(xmlDeclaration + '<worksheet xmlns="' + spreadsheetNamespace + '" xmlns:r="' + officeRelationshipsNamespace + '">' +
3770
- (opts.print || opts.rowOutline ? '<sheetPr>' + (opts.rowOutline ? '<outlinePr summaryBelow="1" showOutlineSymbols="1"/>' : "") + (opts.print ? '<pageSetUpPr fitToPage="1"/>' : "") + '</sheetPr>' : "") + '<sheetViews><sheetView workbookViewId="0">' +
3840
+ (opts.print || hasOutline ? '<sheetPr>' + (hasOutline ? '<outlinePr summaryBelow="' + (opts.outlineSummaryBelow === false ? "0" : "1") + '"' + (opts.outlineSummaryRight === undefined ? "" : ' summaryRight="' + (opts.outlineSummaryRight ? "1" : "0") + '"') + ' showOutlineSymbols="1"/>' : "") + (opts.print ? '<pageSetUpPr fitToPage="1"/>' : "") + '</sheetPr>' : "") + '<sheetViews><sheetView workbookViewId="0">' +
3771
3841
  (x || y ? '<pane' + (x ? ' xSplit="' + x + '"' : "") + (y ? ' ySplit="' + y + '"' : "") + ' topLeftCell="' + cell + '" activePane="' + pane + '" state="frozen"/><selection pane="' + pane + '" activeCell="' + cell + '" sqref="' + cell + '"/>' : "") + '</sheetView></sheetViews>' +
3772
- (opts.rowOutline ? '<sheetFormatPr defaultRowHeight="15" outlineLevelRow="' + opts.maxOutlineLevel + '"/>' : ""));
3842
+ (hasOutline ? '<sheetFormatPr defaultRowHeight="15"' + (opts.rowOutline ? ' outlineLevelRow="' + opts.maxOutlineLevel + '"' : "") + (outlines.size ? ' outlineLevelCol="' + maxColumnLevel + '"' : "") + '/>' : ""));
3773
3843
  const defaultWidth = opts.defaultColumnWidth ?? (this.table ? 20 : undefined);
3774
- if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined)) {
3844
+ if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined || outlines.has(i))) {
3775
3845
  await buffer.write('<cols>');
3776
3846
  for (let i = 0; i < this.columns.length; i++) {
3777
- const width = this.layout.widths[i] ?? defaultWidth;
3778
- if (width !== undefined)
3779
- await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '" width="' + width + '" customWidth="1"/>');
3847
+ const width = this.layout.widths[i] ?? defaultWidth, outline = outlines.get(i);
3848
+ if (width !== undefined || outline)
3849
+ await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '"' +
3850
+ (width === undefined ? "" : ' width="' + width + '" customWidth="1"') +
3851
+ (outline?.level ? ' outlineLevel="' + outline.level + '"' : "") + (outline?.hidden ? ' hidden="1"' : "") +
3852
+ (outline?.collapsed ? ' collapsed="1"' : "") + '/>');
3780
3853
  }
3781
3854
  await buffer.write('</cols>');
3782
3855
  }
@@ -4034,11 +4107,11 @@ class Worksheet {
4034
4107
  async discard(error) { this.failed = true; this.error = error; this.pending = []; this.pendingCharacters = 0; this.prepared = undefined; this.buffer = undefined; this.nativeCharts.length = 0; this.chartSources.length = 0; this.output.discard(); await this.entry?.discard(error); }
4035
4108
  }
4036
4109
  const _exports = Object.freeze({ Worksheet: Worksheet });
4037
- _modules.set("b99287e3e329b75007119103112a699c368d8237b37fa79e083b0014a21952e4", _exports);
4110
+ _modules.set("a61e744201bb537b635b367b1764bd85892101d55e00b8c78faec8be89577376", _exports);
4038
4111
  return _exports;
4039
4112
  })();
4040
4113
 
4041
- const _m40 = _modules.get("7f1b6bb321e8055ba5269c0fe0933cf02f9a4ce269d3b8e4a64cc63d8398954a") ?? (() => {
4114
+ const _m41 = _modules.get("1b4698baf9a9c9b3505988abac9f83967c32cf37483d70a949ae89c4485532a4") ?? (() => {
4042
4115
  const { escapeOoxmlAttribute, escapeXml, xmlDeclaration } = _m17;
4043
4116
 
4044
4117
  const { cellText, columnName } = _m27;
@@ -4049,7 +4122,7 @@ const { ExportCell } = _m5;
4049
4122
 
4050
4123
  const { Cell } = _m27;
4051
4124
 
4052
- const { totalFormula } = _m33;
4125
+ const { totalFormula } = _m34;
4053
4126
 
4054
4127
  function defineTable(id, options, columns, policy) {
4055
4128
  const name = options.name ?? "Table" + id;
@@ -4081,11 +4154,11 @@ function tableXml(table, rowCount, policy, headerRow = 1, footer) {
4081
4154
  '" showColumnStripes="' + (options.bandedColumns ? 1 : 0) + '"/></table>';
4082
4155
  }
4083
4156
  const _exports = Object.freeze({ defineTable: defineTable, tableXml: tableXml });
4084
- _modules.set("7f1b6bb321e8055ba5269c0fe0933cf02f9a4ce269d3b8e4a64cc63d8398954a", _exports);
4157
+ _modules.set("1b4698baf9a9c9b3505988abac9f83967c32cf37483d70a949ae89c4485532a4", _exports);
4085
4158
  return _exports;
4086
4159
  })();
4087
4160
 
4088
- const _m41 = _modules.get("0c395783b9d7cc62dd39a21adeb698ad4a61e2c89f7b1fc8712e2eb2ccfe9d92") ?? (() => {
4161
+ const _m42 = _modules.get("0c395783b9d7cc62dd39a21adeb698ad4a61e2c89f7b1fc8712e2eb2ccfe9d92") ?? (() => {
4089
4162
  const { OfficeIMOError } = _m2;
4090
4163
 
4091
4164
  const { cleanXml } = _m17;
@@ -4153,13 +4226,13 @@ _modules.set("0c395783b9d7cc62dd39a21adeb698ad4a61e2c89f7b1fc8712e2eb2ccfe9d92",
4153
4226
  return _exports;
4154
4227
  })();
4155
4228
 
4156
- const _m42 = _modules.get("e00bc0213b723678d050e3e1f11b39ed3d6b0b0fd6a39b403beb1a6bef69e282") ?? (() => {
4229
+ const _m43 = _modules.get("477ff98f49343b8ec4213008254b57a60dd42d07cb9843b3791d5e5f8e295865") ?? (() => {
4157
4230
  const { captureFields } = _m10;
4158
4231
 
4159
4232
  /** @internal The workbook owner captures these settings before validation or adapter merging. */
4160
4233
  const workbookOptionFields = ["signal", "onProgress", "limits", "sink", "dateMode", "compression", "invalidCharacterPolicy", "appProperties", "cellValueWriters", "oversizedText", "creator", "title", "subject", "description", "created", "modified"];
4161
4234
  /** @internal Worksheet settings also used by the portable sheet owner. */
4162
- const sheetOptionFields = ["columns", "includeHeader", "headerRows", "freezeHeader", "autoFilter", "boldHeader", "headerFill", "headerStyle", "alternatingRowStyle", "rowStyle", "cellStyle", "rowOutline", "maxOutlineLevel", "rowHeight", "headerHeight", "defaultColumnWidth", "freezeColumns", "table", "autoSize", "footer", "print", "title", "mergedCells", "hyperlinks", "conditionalFormats", "dataValidation"];
4235
+ const sheetOptionFields = ["columns", "includeHeader", "headerRows", "freezeHeader", "autoFilter", "boldHeader", "headerFill", "headerStyle", "alternatingRowStyle", "rowStyle", "cellStyle", "rowOutline", "maxOutlineLevel", "outlineSummaryBelow", "outlineSummaryRight", "columnOutlines", "rowHeight", "headerHeight", "defaultColumnWidth", "freezeColumns", "table", "autoSize", "footer", "print", "title", "mergedCells", "hyperlinks", "conditionalFormats", "dataValidation"];
4163
4236
  /** @internal Includes inherited format-specific ceilings before a wrapper combines stream settings. */
4164
4237
  const workbookLimitFields = ["maxRows", "maxCells", "maxTextCharacters", "maxOutputBytes", "maxStyles", "maxSheets", "maxOverflowCharacters", "maxHyperlinks", "maxImageBytes", "maxBufferedCells", "maxBufferedCharacters", "maxMergedRanges", "maxConditionalFormats", "maxDifferentialStyles", "maxCharts", "maxChartPoints", "maxChartTextCharacters", "maxFormulaCharacters", "maxDataValidations", "maxValidationTextCharacters"];
4165
4238
  /** @internal Capture the workbook's known ceilings without dropping supported prototype fields. */
@@ -4172,11 +4245,11 @@ function captureWorkbookOptions(options) {
4172
4245
  return { ...captured, ...(captured.limits === undefined ? {} : { limits: captureWorkbookLimits(captured.limits) }) };
4173
4246
  }
4174
4247
  const _exports = Object.freeze({ workbookOptionFields: workbookOptionFields, sheetOptionFields: sheetOptionFields, workbookLimitFields: workbookLimitFields, captureWorkbookLimits: captureWorkbookLimits, captureWorkbookOptions: captureWorkbookOptions });
4175
- _modules.set("e00bc0213b723678d050e3e1f11b39ed3d6b0b0fd6a39b403beb1a6bef69e282", _exports);
4248
+ _modules.set("477ff98f49343b8ec4213008254b57a60dd42d07cb9843b3791d5e5f8e295865", _exports);
4176
4249
  return _exports;
4177
4250
  })();
4178
4251
 
4179
- const _m44 = _modules.get("35db01801a6b2e3e0c5acd7493e56f04b5b41b1d57afa8be28b8358378ad6494") ?? (() => {
4252
+ const _m45 = _modules.get("35db01801a6b2e3e0c5acd7493e56f04b5b41b1d57afa8be28b8358378ad6494") ?? (() => {
4180
4253
  const { checkAbort } = _m4;
4181
4254
 
4182
4255
  const { NotSupportedError, OfficeIMOError } = _m2;
@@ -4308,18 +4381,18 @@ _modules.set("35db01801a6b2e3e0c5acd7493e56f04b5b41b1d57afa8be28b8358378ad6494",
4308
4381
  return _exports;
4309
4382
  })();
4310
4383
 
4311
- const _m43 = _modules.get("6ff482aba6cf0b524cf20f6a4f8af16b842a49f36448b14e73beaf838885d219") ?? (() => {
4384
+ const _m44 = _modules.get("24f1417c3c320a8a41137c28f70b72091256c63010be0c88b684dce85f54950c") ?? (() => {
4312
4385
  const { checkAbort } = _m4;
4313
4386
 
4314
4387
  const { NotSupportedError, OfficeIMOError } = _m2;
4315
4388
 
4316
4389
  const { cleanXml } = _m17;
4317
4390
 
4318
- const { copyDrawingAnchor } = _m31;
4391
+ const { copyDrawingAnchor } = _m32;
4319
4392
 
4320
4393
  const { captureFields } = _m10;
4321
4394
 
4322
- const { captureChartRange, prepareChartBinding } = _m44;
4395
+ const { captureChartRange, prepareChartBinding } = _m45;
4323
4396
 
4324
4397
  function fields(value, allowed, context) {
4325
4398
  if (!value || typeof value !== "object" || Array.isArray(value))
@@ -4475,11 +4548,11 @@ function prepareChart(input, policy, availablePoints, availableText, signal, res
4475
4548
  points, textCharacters });
4476
4549
  }
4477
4550
  const _exports = Object.freeze({ prepareChart: prepareChart });
4478
- _modules.set("6ff482aba6cf0b524cf20f6a4f8af16b842a49f36448b14e73beaf838885d219", _exports);
4551
+ _modules.set("24f1417c3c320a8a41137c28f70b72091256c63010be0c88b684dce85f54950c", _exports);
4479
4552
  return _exports;
4480
4553
  })();
4481
4554
 
4482
- const _m22 = _modules.get("0f11efc0d52501e827898643b33f7fa42365115a892aa801634ecea3f3603681") ?? (() => {
4555
+ const _m22 = _modules.get("e89ecd2f5e1738c6e88f72ac2bcac70dfaa81b4aa86edf333e9b395cf2212e2a") ?? (() => {
4483
4556
  const { beginTask, checkAbort, pause, taskYieldDue } = _m4;
4484
4557
 
4485
4558
  const { OfficeIMOError } = _m2;
@@ -4502,25 +4575,27 @@ const { copyColumns } = _m11;
4502
4575
 
4503
4576
  const { captureFields } = _m10;
4504
4577
 
4505
- const { captureTableSpans } = _m29;
4578
+ const { captureColumnOutlines } = _m29;
4579
+
4580
+ const { captureTableSpans } = _m30;
4506
4581
 
4507
4582
  const { assertExportValue } = _m5;
4508
4583
 
4509
- const { Worksheet } = _m30;
4584
+ const { Worksheet } = _m31;
4510
4585
 
4511
- const { defineTable, tableXml } = _m40;
4586
+ const { defineTable, tableXml } = _m41;
4512
4587
 
4513
- const { copyHyperlink, drawingXml, drawingContentType } = _m31;
4588
+ const { copyHyperlink, drawingXml, drawingContentType } = _m32;
4514
4589
 
4515
- const { TextOverflow } = _m41;
4590
+ const { TextOverflow } = _m42;
4516
4591
 
4517
- const { captureWorkbookOptions, sheetOptionFields } = _m42;
4592
+ const { captureWorkbookOptions, sheetOptionFields } = _m43;
4518
4593
 
4519
- const { prepareChart } = _m43;
4594
+ const { prepareChart } = _m44;
4520
4595
 
4521
- const { qualifiedColumnRange, resolveDataColumn } = _m37;
4596
+ const { qualifiedColumnRange, resolveDataColumn } = _m38;
4522
4597
 
4523
- const { chartContentType, writeChartXml } = _m32;
4598
+ const { chartContentType, writeChartXml } = _m33;
4524
4599
 
4525
4600
  const xlsxMime = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
4526
4601
  const formatType = (name) => "application/vnd.openxmlformats-officedocument.spreadsheetml." + name + "+xml";
@@ -4531,6 +4606,7 @@ function captureSheet(options, policy) {
4531
4606
  const footer = captured.footer && captureFields(captured.footer, ["rows", "values", "totals", "style"]);
4532
4607
  const print = captured.print && captureFields(captured.print, ["paper", "orientation", "fitToWidth", "fitToHeight", "repeatHeaders", "margins", "header", "footer"]);
4533
4608
  return { ...captured, columns,
4609
+ ...(captured.columnOutlines === undefined ? {} : { columnOutlines: captureColumnOutlines(captured.columnOutlines, columns.length) }),
4534
4610
  ...(captured.headerRows === undefined ? {} : { headerRows: captureTableSpans(captured.headerRows, columns.length) }),
4535
4611
  ...(footer ? { footer: { ...footer,
4536
4612
  ...(footer.rows === undefined ? {} : { rows: captureTableSpans(footer.rows, columns.length) }),
@@ -4957,14 +5033,14 @@ class Workbook {
4957
5033
  }
4958
5034
  }
4959
5035
  const _exports = Object.freeze({ Workbook: Workbook });
4960
- _modules.set("0f11efc0d52501e827898643b33f7fa42365115a892aa801634ecea3f3603681", _exports);
5036
+ _modules.set("e89ecd2f5e1738c6e88f72ac2bcac70dfaa81b4aa86edf333e9b395cf2212e2a", _exports);
4961
5037
  return _exports;
4962
5038
  })();
4963
5039
 
4964
- const _m46 = _modules.get("89111eab1f3857529c2d0cd849f16598097e62bd73841211b9c66ccc7b1b7ca2") ?? (() => {
5040
+ const _m47 = _modules.get("a10003e971cd5ec2cee127bc9b029a0aa06fe3d50112838929d7a04a55e177c0") ?? (() => {
4965
5041
  const { ExportCell, assertScalar } = _m5;
4966
5042
 
4967
- const { captureWorkbookOptions, sheetOptionFields } = _m42;
5043
+ const { captureWorkbookOptions, sheetOptionFields } = _m43;
4968
5044
 
4969
5045
  const { captureFields } = _m10;
4970
5046
 
@@ -5010,22 +5086,22 @@ function portableWorkbook(options = {}) {
5010
5086
  return { ...options, cellValueWriters: wrapped };
5011
5087
  }
5012
5088
  const _exports = Object.freeze({ portableSheet: portableSheet, portableWorkbook: portableWorkbook });
5013
- _modules.set("89111eab1f3857529c2d0cd849f16598097e62bd73841211b9c66ccc7b1b7ca2", _exports);
5089
+ _modules.set("a10003e971cd5ec2cee127bc9b029a0aa06fe3d50112838929d7a04a55e177c0", _exports);
5014
5090
  return _exports;
5015
5091
  })();
5016
5092
 
5017
- const _m45 = _modules.get("8d425cd3abec2c5e0140f71239bbeacbae0e57524ed70a8e545f80286c4a1308") ?? (() => {
5093
+ const _m46 = _modules.get("5bfd5c9c5e179305b9bebd6cb0d6a0d75e974b223e119e0fd4fbb773325f1e63") ?? (() => {
5018
5094
  const { withDestination } = _m3;
5019
5095
 
5020
5096
  const { copyColumns } = _m11;
5021
5097
 
5022
5098
  const { Workbook } = _m22;
5023
5099
 
5024
- const { portableSheet, portableWorkbook } = _m46;
5100
+ const { portableSheet, portableWorkbook } = _m47;
5025
5101
 
5026
5102
  const { captureFields } = _m10;
5027
5103
 
5028
- const { sheetOptionFields, workbookOptionFields } = _m42;
5104
+ const { sheetOptionFields, workbookOptionFields } = _m43;
5029
5105
 
5030
5106
  function prepare(options) {
5031
5107
  options = captureFields(options, [...workbookOptionFields, "columns", "sheet"]);
@@ -5069,11 +5145,11 @@ async function writeXlsxTo(rows, destination, configuration) {
5069
5145
  });
5070
5146
  }
5071
5147
  const _exports = Object.freeze({ writeXlsx: writeXlsx, writeXlsxTo: writeXlsxTo });
5072
- _modules.set("8d425cd3abec2c5e0140f71239bbeacbae0e57524ed70a8e545f80286c4a1308", _exports);
5148
+ _modules.set("5bfd5c9c5e179305b9bebd6cb0d6a0d75e974b223e119e0fd4fbb773325f1e63", _exports);
5073
5149
  return _exports;
5074
5150
  })();
5075
5151
 
5076
- const _m48 = _modules.get("02f1b8fe9368420b22d79efc01f2b37794fc40aaf8150161b3b7623fcdc0d71f") ?? (() => {
5152
+ const _m49 = _modules.get("dd34d5fd89869a0f953f3f2b3fd27ac83be29e68f76c9087fae3d33095aeda7c") ?? (() => {
5077
5153
  const { assertGroupedReportSource } = _m8;
5078
5154
 
5079
5155
  const { captureFields } = _m10;
@@ -5082,11 +5158,11 @@ const { OfficeIMOError } = _m2;
5082
5158
 
5083
5159
  const { fields } = _m26;
5084
5160
 
5085
- const { sheetOptionFields } = _m42;
5161
+ const { sheetOptionFields } = _m43;
5086
5162
 
5087
- const { portableSheet } = _m46;
5163
+ const { portableSheet } = _m47;
5088
5164
 
5089
- const { resolveDataColumn } = _m37;
5165
+ const { resolveDataColumn } = _m38;
5090
5166
 
5091
5167
  const { copyStylePatch } = _m24;
5092
5168
 
@@ -5162,11 +5238,11 @@ function prepareGroupedSheet(report, configuration, maxConditionalFormats = 1000
5162
5238
  ...(options.grandTotalStyle ? { grandTotalStyle: copyStylePatch(options.grandTotalStyle) } : {}) };
5163
5239
  }
5164
5240
  const _exports = Object.freeze({ groupedOptionFields: groupedOptionFields, prepareGroupedSheet: prepareGroupedSheet });
5165
- _modules.set("02f1b8fe9368420b22d79efc01f2b37794fc40aaf8150161b3b7623fcdc0d71f", _exports);
5241
+ _modules.set("dd34d5fd89869a0f953f3f2b3fd27ac83be29e68f76c9087fae3d33095aeda7c", _exports);
5166
5242
  return _exports;
5167
5243
  })();
5168
5244
 
5169
- const _m47 = _modules.get("6b646c4d57b8f8f452eaa7e61d2935bab09681aceb6064b8600bf73ca10b8f4e") ?? (() => {
5245
+ const _m48 = _modules.get("2ba62cdf88d559804bb84b20e9816b2de0f232401b7431ac414699a607d554a4") ?? (() => {
5170
5246
  const { groupedReportOperation } = _m8;
5171
5247
 
5172
5248
  const { checkAbort, withAbort } = _m4;
@@ -5181,11 +5257,11 @@ const { FormulaCell } = _m28;
5181
5257
 
5182
5258
  const { columnName } = _m27;
5183
5259
 
5184
- const { captureWorkbookLimits, workbookOptionFields } = _m42;
5260
+ const { captureWorkbookLimits, workbookOptionFields } = _m43;
5185
5261
 
5186
- const { retainDataRowRanges } = _m38;
5262
+ const { retainDataRowRanges } = _m39;
5187
5263
 
5188
- const { groupedOptionFields, prepareGroupedSheet } = _m48;
5264
+ const { groupedOptionFields, prepareGroupedSheet } = _m49;
5189
5265
 
5190
5266
  const subtotalOperations = { average: 1, count: 2, max: 4, min: 5, sum: 9 };
5191
5267
  function label(value) {
@@ -5339,19 +5415,19 @@ async function writeGroupedXlsxTo(report, destination, options) {
5339
5415
  return withDestination(destination, async (sink) => (await write(report, prepared, sink)).result);
5340
5416
  }
5341
5417
  const _exports = Object.freeze({ addGroupedXlsx: addGroupedXlsx, writeGroupedXlsx: writeGroupedXlsx, writeGroupedXlsxTo: writeGroupedXlsxTo });
5342
- _modules.set("6b646c4d57b8f8f452eaa7e61d2935bab09681aceb6064b8600bf73ca10b8f4e", _exports);
5418
+ _modules.set("2ba62cdf88d559804bb84b20e9816b2de0f232401b7431ac414699a607d554a4", _exports);
5343
5419
  return _exports;
5344
5420
  })();
5345
5421
 
5346
- const _m21 = _modules.get("9fbdb5c6f6af75d87ac6cb47771fe48fa6527be2cb7d16dbad56e4213e2f7195") ?? (() => {
5422
+ const _m21 = _modules.get("d6587a933b36ccfdba9a2a252389924ac8461f672b3a500082cceb5e53c8b0b6") ?? (() => {
5347
5423
 
5348
- const _exports = Object.freeze({ Workbook: _m22.Workbook, writeXlsx: _m45.writeXlsx, writeXlsxTo: _m45.writeXlsxTo, writeGroupedXlsx: _m47.writeGroupedXlsx, writeGroupedXlsxTo: _m47.writeGroupedXlsxTo, addGroupedXlsx: _m47.addGroupedXlsx, createGroupedReport: _m8.createGroupedReport, Worksheet: _m30.Worksheet, Cell: _m27.Cell, FormulaCell: _m28.FormulaCell, StyleRegistry: _m24.StyleRegistry, NumberFormats: _m24.NumberFormats, saveBlob: _m1.saveBlob, ExportCell: _m5.ExportCell });
5349
- _modules.set("9fbdb5c6f6af75d87ac6cb47771fe48fa6527be2cb7d16dbad56e4213e2f7195", _exports);
5424
+ const _exports = Object.freeze({ Workbook: _m22.Workbook, writeXlsx: _m46.writeXlsx, writeXlsxTo: _m46.writeXlsxTo, writeGroupedXlsx: _m48.writeGroupedXlsx, writeGroupedXlsxTo: _m48.writeGroupedXlsxTo, addGroupedXlsx: _m48.addGroupedXlsx, createGroupedReport: _m8.createGroupedReport, Worksheet: _m31.Worksheet, Cell: _m27.Cell, FormulaCell: _m28.FormulaCell, StyleRegistry: _m24.StyleRegistry, NumberFormats: _m24.NumberFormats, saveBlob: _m1.saveBlob, ExportCell: _m5.ExportCell });
5425
+ _modules.set("d6587a933b36ccfdba9a2a252389924ac8461f672b3a500082cceb5e53c8b0b6", _exports);
5350
5426
  return _exports;
5351
5427
  })();
5352
5428
 
5353
- const _m50 = _modules.get("2f5c0823847e9209017d01b2a753f36056df2a9988fae1f3a1bd5fd186545220") ?? (() => {
5354
- const { captureTableSpans, tableSpans } = _m29;
5429
+ const _m51 = _modules.get("2f5c0823847e9209017d01b2a753f36056df2a9988fae1f3a1bd5fd186545220") ?? (() => {
5430
+ const { captureTableSpans, tableSpans } = _m30;
5355
5431
 
5356
5432
  /** Snapshot small report matrices; flattening is an explicit format decision, never inferred from labels. */
5357
5433
  function csvStructuredRows(rows, columns, mode) {
@@ -5372,7 +5448,7 @@ _modules.set("2f5c0823847e9209017d01b2a753f36056df2a9988fae1f3a1bd5fd186545220",
5372
5448
  return _exports;
5373
5449
  })();
5374
5450
 
5375
- const _m51 = _modules.get("9b33d9107e62ba8299c576072de40d24a261464f118de4ace64f23154fc78307") ?? (() => {
5451
+ const _m52 = _modules.get("9b33d9107e62ba8299c576072de40d24a261464f118de4ace64f23154fc78307") ?? (() => {
5376
5452
  /** Compatibility display policy; hosts can supply labels without changing typed source values. */
5377
5453
  const defaultBooleanText = Object.freeze({ true: "True", false: "False" });
5378
5454
  /** @internal Capture display policy once, before source iteration or asynchronous output. */
@@ -5391,7 +5467,7 @@ _modules.set("9b33d9107e62ba8299c576072de40d24a261464f118de4ace64f23154fc78307",
5391
5467
  return _exports;
5392
5468
  })();
5393
5469
 
5394
- const _m52 = _modules.get("f0627ba89e5c8fcb376ebe3ce72dcc8d68c34952981f8703e36b8bb1a9894208") ?? (() => {
5470
+ const _m53 = _modules.get("f0627ba89e5c8fcb376ebe3ce72dcc8d68c34952981f8703e36b8bb1a9894208") ?? (() => {
5395
5471
  const { captureFields } = _m10;
5396
5472
 
5397
5473
  /** @internal Share the format's capture policy with thin adapters before they compose options. */
@@ -5406,7 +5482,7 @@ _modules.set("f0627ba89e5c8fcb376ebe3ce72dcc8d68c34952981f8703e36b8bb1a9894208",
5406
5482
  return _exports;
5407
5483
  })();
5408
5484
 
5409
- const _m49 = _modules.get("b6dbf755b495baef5c7d7651e6a55b2098f2ee304edca2c8b285a0bd7ec127a1") ?? (() => {
5485
+ const _m50 = _modules.get("b48bcab805d4c75294dd8d8e8dc57f96d9db3f5af31a8f0ddc6562f010f566e4") ?? (() => {
5410
5486
  const { beginTask, checkAbort, consumeRows, taskYieldDue, withAbort } = _m4;
5411
5487
 
5412
5488
  const { BlobByteSink, ChunkedTextSink, withDestination } = _m3;
@@ -5421,39 +5497,42 @@ const { notifyProgress } = _m23;
5421
5497
 
5422
5498
  const { copyColumns, createRowProjector } = _m11;
5423
5499
 
5424
- const { csvStructuredRows } = _m50;
5500
+ const { csvStructuredRows } = _m51;
5425
5501
 
5426
- const { captureBooleanText } = _m51;
5502
+ const { captureBooleanText } = _m52;
5427
5503
 
5428
- const { captureCsvOptions } = _m52;
5504
+ const { captureCsvOptions } = _m53;
5429
5505
 
5430
5506
 
5431
5507
 
5432
5508
 
5433
5509
 
5434
- function csvField(value, delimiter, protect, quote, booleanText, nullValue) {
5435
- if (value == null && nullValue !== undefined)
5436
- value = nullValue;
5510
+ function csvField(value, delimiter, protect, quote, booleanText) {
5511
+ const kind = typeof value;
5437
5512
  let text;
5438
5513
  if (value == null)
5439
5514
  text = "";
5515
+ else if (kind === "string")
5516
+ text = value;
5517
+ else if (kind === "number") {
5518
+ text = Number.isFinite(value) ? String(value) : "";
5519
+ // Numeric text has no CSV delimiter, quote or line break to escape.
5520
+ return quote === "all" ? '"' + text + '"' : text;
5521
+ }
5522
+ else if (kind === "boolean")
5523
+ text = booleanText[value ? "true" : "false"];
5440
5524
  else if (isDate(value))
5441
5525
  text = Number.isFinite(value.getTime()) ? value.toISOString() : "";
5442
- else if (typeof value === "boolean")
5443
- text = booleanText[value ? "true" : "false"];
5444
- else if (typeof value === "number")
5445
- text = Number.isFinite(value) ? String(value) : "";
5446
- else if (typeof value === "string")
5447
- text = value;
5448
5526
  else {
5449
5527
  if (typeof value.then === "function")
5450
5528
  void Promise.resolve(value).catch(() => { });
5451
5529
  throw new TypeError("CSV cells and formatter results must be synchronous strings, numbers, booleans, Dates or null.");
5452
5530
  }
5453
- if (protect && (typeof value === "string" || typeof value === "boolean") && /^ *[=+\-@\t\r\n]/.test(text))
5531
+ // Only ASCII spaces, controls and markers through @ can begin the protected prefix.
5532
+ if (protect && (kind === "string" || kind === "boolean") && text.charCodeAt(0) <= 64 && /^ *[=+\-@\t\r\n]/.test(text))
5454
5533
  text = "'" + text;
5455
- return quote === "all" || (quote === "strings" && typeof value === "string") || text.includes(delimiter) || /["\r\n]/.test(text)
5456
- ? '"' + text.replace(/"/g, '""') + '"' : text;
5534
+ return quote === "all" || (quote === "strings" && kind === "string") || text.includes(delimiter) || /["\r\n]/.test(text)
5535
+ ? '"' + (text.includes('"') ? text.replace(/"/g, '""') : text) + '"' : text;
5457
5536
  }
5458
5537
  async function writeCsvTo(rows, destination, configuration) {
5459
5538
  const options = captureCsvOptions(configuration);
@@ -5505,7 +5584,7 @@ async function write(rows, sink, options) {
5505
5584
  value = options.nullValue;
5506
5585
  budget.cell(typeof value === "boolean" ? booleanText[value ? "true" : "false"] : value);
5507
5586
  checkAbort(signal);
5508
- text += (i ? delimiter : "") + csvField(value, delimiter, protect, quote, booleanText, options.nullValue);
5587
+ text += (i ? delimiter : "") + csvField(value, delimiter, protect, quote, booleanText);
5509
5588
  if (text.length >= buffer.chunkSize || (i & 127) === 127 && taskYieldDue()) {
5510
5589
  if (buffer.append(text))
5511
5590
  return buffer.flush().then(() => record(values, header, i + 1, snapshot));
@@ -5553,11 +5632,11 @@ async function writeCsv(rows, configuration) {
5553
5632
  }
5554
5633
  }
5555
5634
  const _exports = Object.freeze({ saveBlob: _m1.saveBlob, ExportCell: _m5.ExportCell, writeCsvTo: writeCsvTo, writeCsv: writeCsv });
5556
- _modules.set("b6dbf755b495baef5c7d7651e6a55b2098f2ee304edca2c8b285a0bd7ec127a1", _exports);
5635
+ _modules.set("b48bcab805d4c75294dd8d8e8dc57f96d9db3f5af31a8f0ddc6562f010f566e4", _exports);
5557
5636
  return _exports;
5558
5637
  })();
5559
5638
 
5560
- const _m57 = _modules.get("49927994ccf68595c9211828bccb16a874fa149bda2ea904d369d9943e93bc58") ?? (() => {
5639
+ const _m58 = _modules.get("49927994ccf68595c9211828bccb16a874fa149bda2ea904d369d9943e93bc58") ?? (() => {
5561
5640
  const { captureFields } = _m10;
5562
5641
 
5563
5642
  /** Pure validation shared by document settings and named paragraph styles. */
@@ -5592,10 +5671,10 @@ _modules.set("49927994ccf68595c9211828bccb16a874fa149bda2ea904d369d9943e93bc58",
5592
5671
  return _exports;
5593
5672
  })();
5594
5673
 
5595
- const _m56 = _modules.get("278e6adc6a5d4491e688589ef165bd1aa9cc74f557da6f9d6bdf53ecc0c6df47") ?? (() => {
5674
+ const _m57 = _modules.get("278e6adc6a5d4491e688589ef165bd1aa9cc74f557da6f9d6bdf53ecc0c6df47") ?? (() => {
5596
5675
  const { OfficeIMOError } = _m2;
5597
5676
 
5598
- const { positive, presentation } = _m57;
5677
+ const { positive, presentation } = _m58;
5599
5678
 
5600
5679
  const fields = ["fontSize", "presentation", "keepTogether", "keepWithNext", "spaceBefore", "spaceAfter"];
5601
5680
  const presentationFields = ["bold", "italic", "color", "alignment"];
@@ -5666,24 +5745,24 @@ _modules.set("278e6adc6a5d4491e688589ef165bd1aa9cc74f557da6f9d6bdf53ecc0c6df47",
5666
5745
  return _exports;
5667
5746
  })();
5668
5747
 
5669
- const _m55 = _modules.get("4a089607f7cbe50e13d4382d1cc4e5f6ce32c5773bbec2df84178710f54d9a38") ?? (() => {
5748
+ const _m56 = _modules.get("4a089607f7cbe50e13d4382d1cc4e5f6ce32c5773bbec2df84178710f54d9a38") ?? (() => {
5670
5749
  const { OfficeIMOError } = _m2;
5671
5750
 
5672
5751
  const { ExportBudget } = _m9;
5673
5752
 
5674
5753
  const { copyColumns } = _m11;
5675
5754
 
5676
- const { captureTableSpans } = _m29;
5755
+ const { captureTableSpans } = _m30;
5677
5756
 
5678
5757
  const { copyExportValue } = _m13;
5679
5758
 
5680
5759
  const { captureFields } = _m10;
5681
5760
 
5682
- const { captureParagraphStyles } = _m56;
5761
+ const { captureParagraphStyles } = _m57;
5683
5762
 
5684
- const { captureBooleanText } = _m51;
5763
+ const { captureBooleanText } = _m52;
5685
5764
 
5686
- const { positive, color, presentation } = _m57;
5765
+ const { positive, color, presentation } = _m58;
5687
5766
 
5688
5767
 
5689
5768
 
@@ -5873,12 +5952,12 @@ function settings(input, document = false) {
5873
5952
  repeatedColumns: document ? Object.freeze([]) : repeatedColumns(options.wideTable, columns),
5874
5953
  limits: { ...limits, ...(maxImageWorkingBytes === undefined ? {} : { maxImageWorkingBytes }) }, budget };
5875
5954
  }
5876
- const _exports = Object.freeze({ positive: _m57.positive, color: _m57.color, presentation: _m57.presentation, pdfOptionFields: pdfOptionFields, pdfLimitFields: pdfLimitFields, capturePdfOptions: capturePdfOptions, capturePdfLimits: capturePdfLimits, captureWideTable: captureWideTable, settings: settings });
5955
+ const _exports = Object.freeze({ positive: _m58.positive, color: _m58.color, presentation: _m58.presentation, pdfOptionFields: pdfOptionFields, pdfLimitFields: pdfLimitFields, capturePdfOptions: capturePdfOptions, capturePdfLimits: capturePdfLimits, captureWideTable: captureWideTable, settings: settings });
5877
5956
  _modules.set("4a089607f7cbe50e13d4382d1cc4e5f6ce32c5773bbec2df84178710f54d9a38", _exports);
5878
5957
  return _exports;
5879
5958
  })();
5880
5959
 
5881
- const _m60 = _modules.get("e3d39f39aebcbaf063fd8221df0d9cb5902ad2545a9d9e474bb59d47f15e2c01") ?? (() => {
5960
+ const _m61 = _modules.get("e3d39f39aebcbaf063fd8221df0d9cb5902ad2545a9d9e474bb59d47f15e2c01") ?? (() => {
5882
5961
  /** @internal One type byte, an eight-byte offset/container number and a two-byte generation/index. */
5883
5962
  const pdfXrefEntryBytes = 11;
5884
5963
  function unsigned(bytes, offset, value, width) {
@@ -5914,12 +5993,12 @@ _modules.set("e3d39f39aebcbaf063fd8221df0d9cb5902ad2545a9d9e474bb59d47f15e2c01",
5914
5993
  return _exports;
5915
5994
  })();
5916
5995
 
5917
- const _m59 = _modules.get("e716b8b1da464094622f5f671518493c78e63ff22a029d61544d2d193b63ce8f") ?? (() => {
5996
+ const _m60 = _modules.get("e716b8b1da464094622f5f671518493c78e63ff22a029d61544d2d193b63ce8f") ?? (() => {
5918
5997
  const { checkAbort, withAbort, pause, taskYieldDue } = _m4;
5919
5998
 
5920
5999
  const { OfficeIMOError } = _m2;
5921
6000
 
5922
- const { pdfXrefChunks, pdfXrefEntryBytes } = _m60;
6001
+ const { pdfXrefChunks, pdfXrefEntryBytes } = _m61;
5923
6002
 
5924
6003
  const compactObjectCount = 256, compactObjectBytes = 32768;
5925
6004
  const compactIndexChunkEntries = 4096;
@@ -6243,7 +6322,7 @@ _modules.set("e716b8b1da464094622f5f671518493c78e63ff22a029d61544d2d193b63ce8f",
6243
6322
  return _exports;
6244
6323
  })();
6245
6324
 
6246
- const _m64 = _modules.get("1e169e6ecdeceff319b5da4bf01f4c653c1a3d9e8ad696b141bf8ac52d9f446c") ?? (() => {
6325
+ const _m65 = _modules.get("1e169e6ecdeceff319b5da4bf01f4c653c1a3d9e8ad696b141bf8ac52d9f446c") ?? (() => {
6247
6326
  /** @internal Bounded big-endian reader used for caller-provided TrueType programs. */
6248
6327
  class FontReader {
6249
6328
  bytes;
@@ -6273,8 +6352,8 @@ _modules.set("1e169e6ecdeceff319b5da4bf01f4c653c1a3d9e8ad696b141bf8ac52d9f446c",
6273
6352
  return _exports;
6274
6353
  })();
6275
6354
 
6276
- const _m65 = _modules.get("ecf6c6ab2f9c5f747338d0d59d9f2cae0b006d9d2a210bcb1545db1f046eb80c") ?? (() => {
6277
- const { align4 } = _m64;
6355
+ const _m66 = _modules.get("ecf6c6ab2f9c5f747338d0d59d9f2cae0b006d9d2a210bcb1545db1f046eb80c") ?? (() => {
6356
+ const { align4 } = _m65;
6278
6357
 
6279
6358
  const { checkAbort, pause, taskYieldDue } = _m4;
6280
6359
 
@@ -6498,12 +6577,12 @@ _modules.set("ecf6c6ab2f9c5f747338d0d59d9f2cae0b006d9d2a210bcb1545db1f046eb80c",
6498
6577
  return _exports;
6499
6578
  })();
6500
6579
 
6501
- const _m63 = _modules.get("2e1fa1582af797386e2e2914c0a27237309b1692a3cc2be688f46590eb74480d") ?? (() => {
6580
+ const _m64 = _modules.get("2e1fa1582af797386e2e2914c0a27237309b1692a3cc2be688f46590eb74480d") ?? (() => {
6502
6581
  const { NotSupportedError } = _m2;
6503
6582
 
6504
- const { FontReader } = _m64;
6583
+ const { FontReader } = _m65;
6505
6584
 
6506
- const { subsetTrueType, subsetTrueTypeCooperatively } = _m65;
6585
+ const { subsetTrueType, subsetTrueTypeCooperatively } = _m66;
6507
6586
 
6508
6587
  const { checkAbort, pause, taskYieldDue } = _m4;
6509
6588
 
@@ -6743,8 +6822,8 @@ _modules.set("2e1fa1582af797386e2e2914c0a27237309b1692a3cc2be688f46590eb74480d",
6743
6822
  return _exports;
6744
6823
  })();
6745
6824
 
6746
- const _m62 = _modules.get("d9c1509dff0538488752433e47cd0927ece5f93c559ad0e32dc56602dfd44596") ?? (() => {
6747
- const { TrueTypeFont } = _m63;
6825
+ const _m63 = _modules.get("d9c1509dff0538488752433e47cd0927ece5f93c559ad0e32dc56602dfd44596") ?? (() => {
6826
+ const { TrueTypeFont } = _m64;
6748
6827
 
6749
6828
  const { beginTask, checkAbort } = _m4;
6750
6829
 
@@ -6807,7 +6886,7 @@ _modules.set("d9c1509dff0538488752433e47cd0927ece5f93c559ad0e32dc56602dfd44596",
6807
6886
  return _exports;
6808
6887
  })();
6809
6888
 
6810
- const _m67 = _modules.get("1ed4965a6e2963a91190baa8a58ada8ce0edde8fe653bcb6609002e872af0d61") ?? (() => {
6889
+ const _m68 = _modules.get("1ed4965a6e2963a91190baa8a58ada8ce0edde8fe653bcb6609002e872af0d61") ?? (() => {
6811
6890
  // Generated by scripts/pdf-widths.mjs from OfficeIMO.Pdf's Adobe AFM-derived metrics.
6812
6891
  const helveticaWidths = new Map([
6813
6892
  [32, [278, 278]],
@@ -7130,12 +7209,12 @@ _modules.set("1ed4965a6e2963a91190baa8a58ada8ce0edde8fe653bcb6609002e872af0d61",
7130
7209
  return _exports;
7131
7210
  })();
7132
7211
 
7133
- const _m66 = _modules.get("59911f0fe023545e9e97521b268551078bdc4c5f303e446a13b7d52f905e8070") ?? (() => {
7212
+ const _m67 = _modules.get("59911f0fe023545e9e97521b268551078bdc4c5f303e446a13b7d52f905e8070") ?? (() => {
7134
7213
  const { OfficeIMOError } = _m2;
7135
7214
 
7136
- const { PdfFont, fontProgram } = _m62;
7215
+ const { PdfFont, fontProgram } = _m63;
7137
7216
 
7138
- const { helveticaWidths } = _m67;
7217
+ const { helveticaWidths } = _m68;
7139
7218
 
7140
7219
  const winAnsiExtras = new Map([0x20ac, 0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, 0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0, 0x17d, 0, 0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x2dc, 0x2122, 0x161, 0x203a, 0x153, 0, 0x17e, 0x178].map((cp, i) => [cp, i + 128]));
7141
7220
  /** @internal Called after scalar support succeeds when encoding a standard-font run. */
@@ -7199,18 +7278,19 @@ _modules.set("59911f0fe023545e9e97521b268551078bdc4c5f303e446a13b7d52f905e8070",
7199
7278
  return _exports;
7200
7279
  })();
7201
7280
 
7202
- const _m61 = _modules.get("7da602b40c346a3838e75963f9a3f10c95ac5ce08a7b0a23b9d96f8898a01db7") ?? (() => {
7281
+ const _m62 = _modules.get("4d4736e6b8e2aaecc6f6c1b124b7e6bc0a5e141dcc725edf0ad4847d87fca1b3") ?? (() => {
7203
7282
  const { NotSupportedError, OfficeIMOError } = _m2;
7204
7283
 
7205
- const { fontProgram } = _m62;
7284
+ const { fontProgram } = _m63;
7206
7285
 
7207
- const { resolveScalar, selectFont, standardCode, validateFonts } = _m66;
7286
+ const { resolveScalar, selectFont, standardCode, validateFonts } = _m67;
7208
7287
 
7209
- const { pdfNumber, unicodeHex } = _m59;
7288
+ const { pdfNumber, unicodeHex } = _m60;
7210
7289
 
7211
7290
  const { checkAbort, pause, taskYieldDue } = _m4;
7212
7291
 
7213
- const standardHexBytes = Object.freeze(Array.from({ length: 256 }, (_, byte) => byte.toString(16).padStart(2, "0")));
7292
+ const hexBytes = Object.freeze(Array.from({ length: 256 }, (_, byte) => byte.toString(16).padStart(2, "0")));
7293
+ function cidHex(cid) { return hexBytes[cid >>> 8] + hexBytes[cid & 255]; }
7214
7294
  class PdfFontResource {
7215
7295
  index;
7216
7296
  bold;
@@ -7241,12 +7321,16 @@ class PdfFontResource {
7241
7321
  width(scalar) {
7242
7322
  if (this.shared)
7243
7323
  return this.shared.width(scalar);
7244
- const existing = this.mappings.get(scalar);
7245
- if (existing)
7246
- return existing.width;
7247
- const standard = this.standardWidths.get(scalar);
7248
- if (standard !== undefined)
7249
- return standard;
7324
+ if (this.program) {
7325
+ const existing = this.mappings.get(scalar);
7326
+ if (existing)
7327
+ return existing.width;
7328
+ }
7329
+ else {
7330
+ const standard = this.standardWidths.get(scalar);
7331
+ if (standard !== undefined)
7332
+ return standard;
7333
+ }
7250
7334
  const resolved = resolveScalar(scalar, this.program, this.bold);
7251
7335
  if (!resolved.supported) {
7252
7336
  if (resolved.code === "unpaired-surrogate")
@@ -7259,7 +7343,8 @@ class PdfFontResource {
7259
7343
  }
7260
7344
  if (this.mappings.size >= 65535)
7261
7345
  throw new OfficeIMOError("RESOURCE_LIMIT", "A PDF font supports at most 65,535 distinct Unicode scalars.");
7262
- const mapping = { cid: this.mappings.size + 1, glyph: resolved.glyph, width: resolved.width, text: String.fromCodePoint(scalar) };
7346
+ const cid = this.mappings.size + 1;
7347
+ const mapping = { cid, hex: cidHex(cid), glyph: resolved.glyph, width: resolved.width, text: String.fromCodePoint(scalar) };
7263
7348
  this.mappings.set(scalar, mapping);
7264
7349
  return mapping.width;
7265
7350
  }
@@ -7272,8 +7357,20 @@ class PdfFontResource {
7272
7357
  let hex = "";
7273
7358
  for (const char of text) {
7274
7359
  const cp = char.codePointAt(0);
7275
- this.width(cp);
7276
- hex += this.program ? this.mappings.get(cp).cid.toString(16).padStart(4, "0") : standardHexBytes[standardCode(cp)];
7360
+ if (this.program) {
7361
+ let mapping = this.mappings.get(cp);
7362
+ // Layout normally registered the scalar already; validate only a newly painted scalar.
7363
+ if (!mapping) {
7364
+ this.width(cp);
7365
+ mapping = this.mappings.get(cp);
7366
+ }
7367
+ hex += mapping.hex;
7368
+ }
7369
+ else {
7370
+ if (!this.standardWidths.has(cp))
7371
+ this.width(cp);
7372
+ hex += hexBytes[standardCode(cp)];
7373
+ }
7277
7374
  }
7278
7375
  return "<" + hex + ">";
7279
7376
  }
@@ -7288,10 +7385,11 @@ class PdfFontResource {
7288
7385
  if (!mapping) {
7289
7386
  if (this.mappings.size >= 65535)
7290
7387
  throw new OfficeIMOError("RESOURCE_LIMIT", "A PDF font supports at most 65,535 distinct CID mappings.");
7291
- mapping = { cid: this.mappings.size + 1, glyph, width: this.program.widths[glyph], text };
7388
+ const cid = this.mappings.size + 1;
7389
+ mapping = { cid, hex: cidHex(cid), glyph, width: this.program.widths[glyph], text };
7292
7390
  this.mappings.set(key, mapping);
7293
7391
  }
7294
- return "<" + mapping.cid.toString(16).padStart(4, "0") + ">";
7392
+ return "<" + mapping.hex + ">";
7295
7393
  }
7296
7394
  async write(objects, compression) {
7297
7395
  checkAbort(this.signal);
@@ -7340,7 +7438,7 @@ class PdfFontResource {
7340
7438
  const batch = mapped.slice(i, i + 100);
7341
7439
  cmap += batch.length + " beginbfchar\n";
7342
7440
  for (const [, m] of batch)
7343
- cmap += "<" + m.cid.toString(16).padStart(4, "0") + "> <" + unicodeHex(m.text) + ">\n";
7441
+ cmap += "<" + m.hex + "> <" + unicodeHex(m.text) + ">\n";
7344
7442
  cmap += "endbfchar\n";
7345
7443
  if (taskYieldDue())
7346
7444
  await pause();
@@ -7391,7 +7489,7 @@ class PdfFontResources {
7391
7489
  if (!found)
7392
7490
  this.explicitSelections.set(explicit, selections);
7393
7491
  }
7394
- const key = String(bold) + String(italic), existing = selections.get(key);
7492
+ const key = (bold ? 2 : 0) | (italic ? 1 : 0), existing = selections.get(key);
7395
7493
  if (existing)
7396
7494
  return existing;
7397
7495
  const { font, syntheticBold, syntheticItalic } = explicit ? { font: explicit, syntheticBold: bold, syntheticItalic: italic } : selectFont(this.fonts, bold, italic);
@@ -7408,11 +7506,11 @@ class PdfFontResources {
7408
7506
  dictionary() { return "<< " + this.resources.map(f => "/" + f.name + " " + f.object + " 0 R").join(" ") + " >>"; }
7409
7507
  }
7410
7508
  const _exports = Object.freeze({ PdfFontResource: PdfFontResource, PdfFontResources: PdfFontResources });
7411
- _modules.set("7da602b40c346a3838e75963f9a3f10c95ac5ce08a7b0a23b9d96f8898a01db7", _exports);
7509
+ _modules.set("4d4736e6b8e2aaecc6f6c1b124b7e6bc0a5e141dcc725edf0ad4847d87fca1b3", _exports);
7412
7510
  return _exports;
7413
7511
  })();
7414
7512
 
7415
- const _m69 = _modules.get("253db2c0eab1f298fda61fb40a5ddaacbf6ad12a7408ee3d8c12d27f88e7ca27") ?? (() => {
7513
+ const _m70 = _modules.get("253db2c0eab1f298fda61fb40a5ddaacbf6ad12a7408ee3d8c12d27f88e7ca27") ?? (() => {
7416
7514
  const { OfficeIMOError } = _m2;
7417
7515
 
7418
7516
  const { ExportCell, assertExportValue } = _m5;
@@ -7421,7 +7519,7 @@ const { checkAbort, pause, taskYieldDue } = _m4;
7421
7519
 
7422
7520
  const { isDate } = _m6;
7423
7521
 
7424
- const { defaultBooleanText } = _m51;
7522
+ const { defaultBooleanText } = _m52;
7425
7523
 
7426
7524
  /** @internal Charge displayed characters: tabs paint four spaces, while CR/LF only separate lines.
7427
7525
  * Raw text remains authoritative for input limits and layout. Skip normalization when no text ceiling observes it. */
@@ -7524,7 +7622,7 @@ _modules.set("253db2c0eab1f298fda61fb40a5ddaacbf6ad12a7408ee3d8c12d27f88e7ca27",
7524
7622
  return _exports;
7525
7623
  })();
7526
7624
 
7527
- const _m71 = _modules.get("8be3fb029e08d100ce8ffcf50916d5ba7f7bc00d62156cc33815fd58554a9ed6") ?? (() => {
7625
+ const _m72 = _modules.get("8be3fb029e08d100ce8ffcf50916d5ba7f7bc00d62156cc33815fd58554a9ed6") ?? (() => {
7528
7626
  const { NotSupportedError, OfficeIMOError } = _m2;
7529
7627
 
7530
7628
  const { checkAbort, pause, taskYieldDue, withAbort } = _m4;
@@ -7737,20 +7835,20 @@ _modules.set("8be3fb029e08d100ce8ffcf50916d5ba7f7bc00d62156cc33815fd58554a9ed6",
7737
7835
  return _exports;
7738
7836
  })();
7739
7837
 
7740
- const _m70 = _modules.get("0a1c79b51ac9a164b86197239117df6497f45ca2892b423b1ec77a663ccc1c47") ?? (() => {
7838
+ const _m71 = _modules.get("0a1c79b51ac9a164b86197239117df6497f45ca2892b423b1ec77a663ccc1c47") ?? (() => {
7741
7839
  const { NotSupportedError, OfficeIMOError } = _m2;
7742
7840
 
7743
7841
  const { copyExportLink } = _m7;
7744
7842
 
7745
7843
  const { checkAbort, pause, taskYieldDue } = _m4;
7746
7844
 
7747
- const { presentation, color } = _m55;
7845
+ const { presentation, color } = _m56;
7748
7846
 
7749
- const { wrapShapedPdfText } = _m71;
7847
+ const { wrapShapedPdfText } = _m72;
7750
7848
 
7751
- const { PdfFont } = _m62;
7849
+ const { PdfFont } = _m63;
7752
7850
 
7753
- const { pdfBudgetText } = _m69;
7851
+ const { pdfBudgetText } = _m70;
7754
7852
 
7755
7853
  /** @internal Callers supply an owned, validated, frozen base presentation. A run list is a PDF presentation value, never an alternate shared table value model. */
7756
7854
  function capturePdfText(value, base, settings, fonts, countEmpty = true, reserveBudget = true) {
@@ -7933,10 +8031,10 @@ _modules.set("0a1c79b51ac9a164b86197239117df6497f45ca2892b423b1ec77a663ccc1c47",
7933
8031
  return _exports;
7934
8032
  })();
7935
8033
 
7936
- const _m72 = _modules.get("9a88773878eacc51df9f05bb5ee90cc2b683b083ebea8fb54375092301388e96") ?? (() => {
8034
+ const _m73 = _modules.get("2f40af05ba09102fe440c1d46385b64cecdd233371771796c9ae4e8d523f2cea") ?? (() => {
7937
8035
  const { OfficeIMOError } = _m2;
7938
8036
 
7939
- const { wrapPdfText } = _m70;
8037
+ const { wrapPdfText } = _m71;
7940
8038
 
7941
8039
  /** Plan without opening a source. Exact column widths never shrink in band mode. */
7942
8040
  function planTableBands(widths, settings) {
@@ -7981,6 +8079,14 @@ async function projectBandRows(rows, band, widths, settings, fonts) {
7981
8079
  for (const row of rows) {
7982
8080
  const cells = [];
7983
8081
  for (const cell of row.cells) {
8082
+ // Ordinary data and leaf headings keep their captured width and lines in every band.
8083
+ // Look up their physical position without allocating another per-row column index.
8084
+ if (cell.span === 1) {
8085
+ const first = band.columns.indexOf(cell.first);
8086
+ if (first >= 0)
8087
+ cells.push({ ...cell, source: cell.source ?? cell, first });
8088
+ continue;
8089
+ }
7984
8090
  for (let first = 0; first < band.columns.length;) {
7985
8091
  const source = band.columns[first];
7986
8092
  if (source < cell.first || source >= cell.first + cell.span) {
@@ -7991,7 +8097,7 @@ async function projectBandRows(rows, band, widths, settings, fonts) {
7991
8097
  while (end < band.columns.length && band.columns[end] === band.columns[end - 1] + 1 && band.columns[end] < cell.first + cell.span)
7992
8098
  end++;
7993
8099
  const width = band.columns.slice(first, end).reduce((sum, index) => sum + widths[index], 0);
7994
- const lines = cell.span === 1 ? cell.lines : await wrapPdfText(cell.captured, fonts, settings.fontSize, width - settings.padding * 2, settings, cell.style.wrapText !== false);
8100
+ const lines = await wrapPdfText(cell.captured, fonts, settings.fontSize, width - settings.padding * 2, settings, cell.style.wrapText !== false);
7995
8101
  cells.push({ ...cell, source: cell.source ?? cell, first, span: end - first, width, lines,
7996
8102
  lineHeight: lines.reduce((height, line) => Math.max(height, line.lineHeight), cell.font.lineHeight(settings.fontSize)) });
7997
8103
  first = end;
@@ -8020,26 +8126,26 @@ function alignBandBlocks(bands, settings) {
8020
8126
  cells: row.cells.map(cell => ({ ...cell, height: heights.slice(index, index + (cell.rowSpan ?? 1)).reduce((sum, value) => sum + value, 0) })) })));
8021
8127
  }
8022
8128
  const _exports = Object.freeze({ planTableBands: planTableBands, projectBandRows: projectBandRows, alignBandBlocks: alignBandBlocks });
8023
- _modules.set("9a88773878eacc51df9f05bb5ee90cc2b683b083ebea8fb54375092301388e96", _exports);
8129
+ _modules.set("2f40af05ba09102fe440c1d46385b64cecdd233371771796c9ae4e8d523f2cea", _exports);
8024
8130
  return _exports;
8025
8131
  })();
8026
8132
 
8027
- const _m68 = _modules.get("07d2da8d8b93f12f172a48b97c1807e485555cf608e2eaa5b7610aa91d4a5305") ?? (() => {
8133
+ const _m69 = _modules.get("ad81357e627d3100e1068a8ce521aa1c1cd65de5c6c6ab36f807a3e5da50d874") ?? (() => {
8028
8134
  const { ExportCell } = _m5;
8029
8135
 
8030
8136
  const { copyExportLink } = _m7;
8031
8137
 
8032
- const { tableSpans } = _m29;
8138
+ const { tableSpans } = _m30;
8033
8139
 
8034
8140
  const { createTotals } = _m12;
8035
8141
 
8036
- const { presentation, positive } = _m55;
8142
+ const { presentation, positive } = _m56;
8037
8143
 
8038
- const { displayText, pdfBudgetText } = _m69;
8144
+ const { displayText, pdfBudgetText } = _m70;
8039
8145
 
8040
- const { capturePdfText, wrapPdfText } = _m70;
8146
+ const { capturePdfText, wrapPdfText } = _m71;
8041
8147
 
8042
- const { planTableBands, projectBandRows, alignBandBlocks } = _m72;
8148
+ const { planTableBands, projectBandRows, alignBandBlocks } = _m73;
8043
8149
 
8044
8150
  class PdfTableLayout {
8045
8151
  settings;
@@ -8144,8 +8250,12 @@ class PdfTableLayout {
8144
8250
  lines };
8145
8251
  }
8146
8252
  row(cells) {
8147
- const lines = Math.max(1, ...cells.map(c => c.lines.length));
8148
- const lineHeight = Math.max(this.lineHeight, ...cells.map(c => c.lineHeight));
8253
+ let lines = 1, lineHeight = this.lineHeight;
8254
+ for (let index = 0; index < cells.length; index++) {
8255
+ const cell = cells[index];
8256
+ lines = Math.max(lines, cell.lines.length);
8257
+ lineHeight = Math.max(lineHeight, cell.lineHeight);
8258
+ }
8149
8259
  return { cells, lines, lineHeight, height: lines * lineHeight + this.settings.padding * 2 };
8150
8260
  }
8151
8261
  async headers() {
@@ -8251,11 +8361,11 @@ class PdfTableLayout {
8251
8361
  }
8252
8362
  }
8253
8363
  const _exports = Object.freeze({ PdfTableLayout: PdfTableLayout });
8254
- _modules.set("07d2da8d8b93f12f172a48b97c1807e485555cf608e2eaa5b7610aa91d4a5305", _exports);
8364
+ _modules.set("ad81357e627d3100e1068a8ce521aa1c1cd65de5c6c6ab36f807a3e5da50d874", _exports);
8255
8365
  return _exports;
8256
8366
  })();
8257
8367
 
8258
- const _m74 = _modules.get("67ad5f4adbd6bc0dddafe5cf82638d46d150237f4ff0bee15c0ace652d5095f4") ?? (() => {
8368
+ const _m75 = _modules.get("9ea74d93c18250e809a7be745444b886bcd5ec924a78e6ab004d649789db1f72") ?? (() => {
8259
8369
  const { OfficeIMOError } = _m2;
8260
8370
 
8261
8371
  const { checkAbort } = _m4;
@@ -8299,7 +8409,7 @@ class PdfTableBandFlow {
8299
8409
  await this.flush();
8300
8410
  }
8301
8411
  async row(row, allowFirstFragment = false) {
8302
- const { padding, fontSize, options } = this.layout.settings, minimumLines = this.layout.minimumRowLines(row), minimumHeight = this.layout.minimumRowHeight(row);
8412
+ const { padding, fontSize, options } = this.layout.settings, minimumLines = this.layout.minimumRowLines(row), minimumHeight = minimumLines * row.lineHeight + padding * 2;
8303
8413
  if (minimumHeight > this.painter.firstFullCapacity + .001 || minimumHeight > this.painter.continuationCapacity + .001)
8304
8414
  throw new RangeError("Repeated PDF identifiers must fit intact below the first and continued band headings/context.");
8305
8415
  // Keep ordinary rows intact when they fit fresh. A kept heading/caption can deliberately
@@ -8333,9 +8443,14 @@ class PdfTableBandFlow {
8333
8443
  let remaining = false;
8334
8444
  const cells = rows[0].cells.map(cell => {
8335
8445
  const source = this.layout.bands[index].columns[cell.first];
8336
- const repeated = this.layout.repeatedColumn(source), visible = repeated ? cell.lines : cell.lines.slice(first, first + lines);
8446
+ const repeated = this.layout.repeatedColumn(source), reusable = cell.span === 1 && (cell.source?.span ?? 1) === 1 && (cell.rowSpan ?? 1) === 1 &&
8447
+ cell.height === undefined && first === 0 && (repeated || lines >= cell.lines.length);
8448
+ const visible = repeated || reusable ? cell.lines : cell.lines.slice(first, first + lines);
8337
8449
  if (!repeated && (visible.length > 0 || cell.link !== undefined))
8338
8450
  remaining = true;
8451
+ // A complete first fragment already owns these lines and their maximum font metrics.
8452
+ if (reusable)
8453
+ return cell;
8339
8454
  const { height: _height, ...plain } = cell;
8340
8455
  return { ...plain, lines: visible,
8341
8456
  lineHeight: visible.reduce((value, line) => Math.max(value, line.lineHeight), cell.font.lineHeight(fontSize)),
@@ -8388,11 +8503,11 @@ class PdfTableBandFlow {
8388
8503
  }
8389
8504
  }
8390
8505
  const _exports = Object.freeze({ PdfTableBandFlow: PdfTableBandFlow });
8391
- _modules.set("67ad5f4adbd6bc0dddafe5cf82638d46d150237f4ff0bee15c0ace652d5095f4", _exports);
8506
+ _modules.set("9ea74d93c18250e809a7be745444b886bcd5ec924a78e6ab004d649789db1f72", _exports);
8392
8507
  return _exports;
8393
8508
  })();
8394
8509
 
8395
- const _m75 = _modules.get("b52424ed74721dce3a2621456888fe1c6af0490627063e56f690df9abcb1dfff") ?? (() => {
8510
+ const _m76 = _modules.get("9deed79565a5da5009f7a01579df8d6a3f019b78eb7b17d831c7964840e9a6bf") ?? (() => {
8396
8511
  /** @internal Source-cell identities survive page fragments and horizontal band projections.
8397
8512
  * Only column headers and still-owned row objects remain reachable from this table owner. */
8398
8513
  class PdfTableStructure {
@@ -8444,30 +8559,31 @@ class PdfTableStructure {
8444
8559
  return row.cells.map(cell => this.cells.get(cell));
8445
8560
  const rowId = this.structure.element("TR", parent);
8446
8561
  this.rows.set(row, rowId);
8447
- const headers = row.cells.map((cell, index) => rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex);
8448
8562
  // Allocate in source order, then resolve every row header before associating even earlier data cells.
8449
8563
  // Generated summary labels override detail roles so numeric subtotal cells never become row headers.
8450
8564
  const ids = row.cells.map((cell, index) => {
8451
- const id = this.structure.element(headers[index] ? "TH" : "TD", rowId);
8565
+ const header = rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex;
8566
+ const id = this.structure.element(header ? "TH" : "TD", rowId);
8452
8567
  this.cells.set(cell, id);
8453
8568
  return id;
8454
8569
  });
8455
- const rowHeaders = [];
8570
+ let rowHeaders;
8456
8571
  for (let index = 0; index < ids.length; index++)
8457
- if (headers[index])
8458
- rowHeaders.push(await this.structure.identifier(ids[index]));
8572
+ if (rowHeaderIndex === undefined ? row.cells[index].rowHeader === true : index === rowHeaderIndex)
8573
+ (rowHeaders ??= []).push(await this.structure.identifier(ids[index]));
8459
8574
  for (let index = 0; index < row.cells.length; index++) {
8460
8575
  const cell = row.cells[index];
8461
- if (!rowHeaders.length && cell.span === 1 && (cell.rowSpan ?? 1) === 1) {
8576
+ if (!rowHeaders && cell.span === 1 && (cell.rowSpan ?? 1) === 1) {
8462
8577
  const attributes = this.ordinaryAttributes[cell.first] ??=
8463
8578
  await this.structure.attributeReference(this.attributeDictionary(cell, this.associations(cell)));
8464
8579
  this.structure.setAttributes(ids[index], attributes);
8465
8580
  continue;
8466
8581
  }
8467
8582
  const associations = this.associations(cell);
8468
- if (!headers[index])
8583
+ const header = rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex;
8584
+ if (!header && rowHeaders)
8469
8585
  associations.push(...rowHeaders);
8470
- this.structure.setAttributes(ids[index], this.attributes(cell, associations, headers[index] ? "Row" : undefined));
8586
+ this.structure.setAttributes(ids[index], this.attributes(cell, associations, header ? "Row" : undefined));
8471
8587
  }
8472
8588
  return ids;
8473
8589
  }
@@ -8502,14 +8618,14 @@ class PdfTableStructure {
8502
8618
  }
8503
8619
  }
8504
8620
  const _exports = Object.freeze({ PdfTableStructure: PdfTableStructure });
8505
- _modules.set("b52424ed74721dce3a2621456888fe1c6af0490627063e56f690df9abcb1dfff", _exports);
8621
+ _modules.set("9deed79565a5da5009f7a01579df8d6a3f019b78eb7b17d831c7964840e9a6bf", _exports);
8506
8622
  return _exports;
8507
8623
  })();
8508
8624
 
8509
- const _m76 = _modules.get("09c712096a1028af340e275d5a273e870546413797e71ed709657ad0482ea170") ?? (() => {
8625
+ const _m77 = _modules.get("09c712096a1028af340e275d5a273e870546413797e71ed709657ad0482ea170") ?? (() => {
8510
8626
  const { OfficeIMOError } = _m2;
8511
8627
 
8512
- const { pdfNumber, unicodeHex } = _m59;
8628
+ const { pdfNumber, unicodeHex } = _m60;
8513
8629
 
8514
8630
  const encoder = new TextEncoder();
8515
8631
  /** @internal URI actions are byte strings; tooltips are Unicode PDF text strings. */
@@ -8552,10 +8668,10 @@ _modules.set("09c712096a1028af340e275d5a273e870546413797e71ed709657ad0482ea170",
8552
8668
  return _exports;
8553
8669
  })();
8554
8670
 
8555
- const _m77 = _modules.get("c68d18d668366fb9b96d1b53c79dc6305f84cb83c05e4942fcf1cdf96ed1a73f") ?? (() => {
8671
+ const _m78 = _modules.get("c68d18d668366fb9b96d1b53c79dc6305f84cb83c05e4942fcf1cdf96ed1a73f") ?? (() => {
8556
8672
  const { OfficeIMOError } = _m2;
8557
8673
 
8558
- const { unicodeHex } = _m59;
8674
+ const { unicodeHex } = _m60;
8559
8675
 
8560
8676
  const { captureFields } = _m10;
8561
8677
 
@@ -8601,8 +8717,8 @@ _modules.set("c68d18d668366fb9b96d1b53c79dc6305f84cb83c05e4942fcf1cdf96ed1a73f",
8601
8717
  return _exports;
8602
8718
  })();
8603
8719
 
8604
- const _m78 = _modules.get("a66257a32f03d958aa57be4de9da7f80b708cebca26b5cc6404de0ee11bfe052") ?? (() => {
8605
- const { settings } = _m55;
8720
+ const _m79 = _modules.get("a66257a32f03d958aa57be4de9da7f80b708cebca26b5cc6404de0ee11bfe052") ?? (() => {
8721
+ const { settings } = _m56;
8606
8722
 
8607
8723
  /** @internal Every section derives from captured document defaults, never the preceding section. */
8608
8724
  function sectionSettings(base, section) {
@@ -8620,28 +8736,28 @@ _modules.set("a66257a32f03d958aa57be4de9da7f80b708cebca26b5cc6404de0ee11bfe052",
8620
8736
  return _exports;
8621
8737
  })();
8622
8738
 
8623
- const _m73 = _modules.get("a7fca40cb8c75af206111c90db36839b4648982beeb4179efda0ddd1ee366210") ?? (() => {
8739
+ const _m74 = _modules.get("3ed7114181be5a3066742336da574fef7f2fc04ee6dfc5e64211f3bedad4cab9") ?? (() => {
8624
8740
  const { OfficeIMOError } = _m2;
8625
8741
 
8626
8742
  const { checkAbort } = _m4;
8627
8743
 
8628
- const { pdfNumber } = _m59;
8744
+ const { pdfNumber } = _m60;
8629
8745
 
8630
- const { color } = _m55;
8746
+ const { color } = _m56;
8631
8747
 
8632
- const { PdfTableBandFlow } = _m74;
8748
+ const { PdfTableBandFlow } = _m75;
8633
8749
 
8634
- const { PdfTableStructure } = _m75;
8750
+ const { PdfTableStructure } = _m76;
8635
8751
 
8636
- const { wrapText, wrapTextCooperatively, synchronousText, pdfBudgetText } = _m69;
8752
+ const { wrapText, wrapTextCooperatively, synchronousText, pdfBudgetText } = _m70;
8637
8753
 
8638
- const { linkAnnotation } = _m76;
8754
+ const { linkAnnotation } = _m77;
8639
8755
 
8640
- const { unicodeHex } = _m59;
8756
+ const { unicodeHex } = _m60;
8641
8757
 
8642
- const { captureSection, captureBookmark } = _m77;
8758
+ const { captureSection, captureBookmark } = _m78;
8643
8759
 
8644
- const { sectionSettings } = _m78;
8760
+ const { sectionSettings } = _m79;
8645
8761
 
8646
8762
  /** @internal One page of drawing commands and O(page count) references, never the complete report body. */
8647
8763
  class PdfPages {
@@ -8655,7 +8771,8 @@ class PdfPages {
8655
8771
  outlines;
8656
8772
  references = [];
8657
8773
  current = 0;
8658
- commands = [];
8774
+ commands = "";
8775
+ commandParts = [];
8659
8776
  commandBytes = 0;
8660
8777
  annotations = [];
8661
8778
  hyperlinks = 0;
@@ -8673,6 +8790,12 @@ class PdfPages {
8673
8790
  pendingBookmarks = [];
8674
8791
  pageNumberWidth = 0;
8675
8792
  colors = new Map();
8793
+ textFont;
8794
+ textSize = 0;
8795
+ textColor = "";
8796
+ textPrefix = "";
8797
+ rectangleLefts;
8798
+ rectangleColumns = [];
8676
8799
  externalObjects = new Map();
8677
8800
  bandFlow;
8678
8801
  bandCellBudget = false;
@@ -8739,7 +8862,7 @@ class PdfPages {
8739
8862
  }
8740
8863
  add(command) {
8741
8864
  this.retainPageBytes(command.length);
8742
- this.commands.push(command);
8865
+ this.commands += command;
8743
8866
  }
8744
8867
  retainPageBytes(length) {
8745
8868
  this.commandBytes += length;
@@ -8759,9 +8882,17 @@ class PdfPages {
8759
8882
  return this.structure ? "/Artifact << /Type /" + type + " >> BDC\n" + command + "EMC\n" : command;
8760
8883
  }
8761
8884
  text(text, font, size, x, baseline, foreground = "111827", element) {
8762
- const n = pdfNumber, shear = font.syntheticItalic ? .213 : 0;
8763
- const command = "q " + this.rgb(foreground) + " rg " + this.rgb(foreground) + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
8764
- (font.syntheticBold ? n(size * .025) + " w 2 Tr " : "0 Tr ") + "1 0 " + n(shear) + " 1 " + n(x) + " " + n(baseline) + " Tm " + font.encode(text) + " Tj ET Q\n";
8885
+ const n = pdfNumber;
8886
+ if (font !== this.textFont || size !== this.textSize || foreground !== this.textColor) {
8887
+ const shear = font.syntheticItalic ? .213 : 0, rgb = this.rgb(foreground);
8888
+ // Keep one prefix, independent of report size. Resource identity includes synthetic styling.
8889
+ this.textPrefix = "q " + rgb + " rg " + rgb + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
8890
+ (font.syntheticBold ? n(size * .025) + " w 2 Tr " : "0 Tr ") + "1 0 " + n(shear) + " 1 ";
8891
+ this.textFont = font;
8892
+ this.textSize = size;
8893
+ this.textColor = foreground;
8894
+ }
8895
+ const command = this.textPrefix + n(x) + " " + n(baseline) + " Tm " + font.encode(text) + " Tj ET Q\n";
8765
8896
  this.add(this.structure && element !== undefined ? this.structure.mark(element) + command + "EMC\n" : this.artifact(command, "Pagination"));
8766
8897
  }
8767
8898
  link(link, x, bottom, width, height, element) {
@@ -8791,8 +8922,8 @@ class PdfPages {
8791
8922
  for (const segment of line.segments) {
8792
8923
  const registered = marks?.get(segment), owner = registered?.owner ?? (segment.link && this.structure && element !== undefined ? this.structure.link(element, segment.link) : element);
8793
8924
  if (segment.glyphs) {
8794
- const font = segment.font, n = pdfNumber, shear = font.syntheticItalic ? .213 : 0;
8795
- let cursor = x, command = "q " + this.rgb(segment.color ?? "111827") + " rg " + this.rgb(segment.color ?? "111827") + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
8925
+ const font = segment.font, n = pdfNumber, shear = font.syntheticItalic ? .213 : 0, rgb = this.rgb(segment.color ?? "111827");
8926
+ let cursor = x, command = "q " + rgb + " rg " + rgb + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
8796
8927
  (font.syntheticBold ? n(size * .025) + " w 2 Tr " : "0 Tr ");
8797
8928
  for (const glyph of segment.glyphs) {
8798
8929
  command += "1 0 " + n(shear) + " 1 " + n(cursor + (glyph.xOffset + shear * glyph.yOffset) * size / 1000) + " " + n(baseline + glyph.yOffset * size / 1000) + " Tm " + font.encodeGlyph(glyph.id, glyph.logicalText) + " Tj\n";
@@ -8840,7 +8971,8 @@ class PdfPages {
8840
8971
  this.current = this.objects.reserve();
8841
8972
  this.references.push(this.current);
8842
8973
  }
8843
- this.commands = [];
8974
+ this.commands = "";
8975
+ this.commandParts = [];
8844
8976
  this.annotations = [];
8845
8977
  this.commandBytes = 0;
8846
8978
  this.bodyAdded = false;
@@ -8923,15 +9055,32 @@ class PdfPages {
8923
9055
  if (!this.layout)
8924
9056
  throw new Error("A table layout is required before drawing rows.");
8925
9057
  this.bodyAdded = true;
8926
- const { padding, fontSize } = this.settings, n = pdfNumber, height = lineCount * row.lineHeight + padding * 2;
9058
+ const { padding, fontSize } = this.settings, n = pdfNumber, height = lineCount * row.lineHeight + padding * 2, lefts = this.layout.lefts;
9059
+ // One geometry token per active physical column; table/band changes release the old tokens.
9060
+ if (this.rectangleLefts !== lefts) {
9061
+ this.rectangleLefts = lefts;
9062
+ this.rectangleColumns = [];
9063
+ }
9064
+ let rectangleHeight, rectangleBottom = "", rectangleHeightText = "";
8927
9065
  for (const [index, cell] of row.cells.entries()) {
8928
9066
  if (this.bandCellBudget)
8929
9067
  this.settings.budget.cell(this.settings.budget.limits.maxTextCharacters === undefined ? "" :
8930
9068
  (cell.height === undefined ? cell.lines.slice(firstLine, firstLine + lineCount) : cell.lines).map(line => line.text).join(""));
8931
- const x = this.layout.lefts[cell.first], cellHeight = cell.height ?? height;
9069
+ const x = lefts[cell.first], cellHeight = cell.height ?? height;
9070
+ if (cellHeight !== rectangleHeight) {
9071
+ rectangleBottom = n(this.y - cellHeight);
9072
+ rectangleHeightText = n(cellHeight);
9073
+ rectangleHeight = cellHeight;
9074
+ }
9075
+ let horizontal = this.rectangleColumns[cell.first];
9076
+ if (!horizontal || horizontal.x !== x || horizontal.width !== cell.width) {
9077
+ horizontal = { x, width: cell.width, left: n(x), widthText: n(cell.width) };
9078
+ this.rectangleColumns[cell.first] = horizontal;
9079
+ }
9080
+ const rectangle = horizontal.left + " " + rectangleBottom + " " + horizontal.widthText + " " + rectangleHeightText;
8932
9081
  if (cell.style.background)
8933
- this.add(this.artifact("q " + this.rgb(cell.style.background) + " rg " + n(x) + " " + n(this.y - cellHeight) + " " + n(cell.width) + " " + n(cellHeight) + " re f Q\n"));
8934
- this.add(this.artifact("q 0.82 0.85 0.89 RG 0.4 w " + n(x) + " " + n(this.y - cellHeight) + " " + n(cell.width) + " " + n(cellHeight) + " re S Q\n"));
9082
+ this.add(this.artifact("q " + this.rgb(cell.style.background) + " rg " + rectangle + " re f Q\n"));
9083
+ this.add(this.artifact("q 0.82 0.85 0.89 RG 0.4 w " + rectangle + " re S Q\n"));
8935
9084
  const element = elements?.[index], artifact = cell.semanticArtifact || repeated[index], owner = cell.link && this.structure && element !== undefined ? this.structure.link(element, cell.link) : element;
8936
9085
  for (let line = firstLine; line < Math.min(cell.lines.length, cell.height ? cell.lines.length : firstLine + lineCount); line++) {
8937
9086
  const text = cell.lines[line], left = cell.style.alignment === "right" ? cell.width - padding - text.width : cell.style.alignment === "center" ? (cell.width - text.width) / 2 : padding;
@@ -8941,6 +9090,7 @@ class PdfPages {
8941
9090
  this.link(cell.link, x, this.y - cellHeight, cell.width, cellHeight, owner);
8942
9091
  }
8943
9092
  this.y -= row.structured ? row.height : height;
9093
+ this.sealCommands();
8944
9094
  }
8945
9095
  async block(rows) {
8946
9096
  if (this.bandFlow)
@@ -9266,9 +9416,22 @@ class PdfPages {
9266
9416
  marker: { line: item.marker, gap: item.markerGap, ...(label === undefined ? {} : { owner: label }) } });
9267
9417
  await this.structure?.complete(li);
9268
9418
  }
9419
+ sealCommands() {
9420
+ if (this.commands) {
9421
+ this.commandParts.push(this.commands);
9422
+ this.commands = "";
9423
+ }
9424
+ }
9425
+ takeCommands() {
9426
+ this.sealCommands();
9427
+ const content = this.commandParts.join("");
9428
+ // Encoding and awaited delivery own the page value; the next page starts independently.
9429
+ this.commandParts = [];
9430
+ return content;
9431
+ }
9269
9432
  async finishPage() {
9270
9433
  const contents = this.objects.reserve(), { page, options } = this.settings;
9271
- await this.objects.stream(contents, this.commands.join(""), "", options.compression !== false);
9434
+ await this.objects.stream(contents, this.takeCommands(), "", options.compression !== false);
9272
9435
  const annotations = [];
9273
9436
  for (const annotation of this.annotations) {
9274
9437
  annotations.push(annotation.id);
@@ -9280,7 +9443,6 @@ class PdfPages {
9280
9443
  (annotations.length ? " /Annots [" + annotations.map(id => id + " 0 R").join(" ") + "]" : "") + " >>");
9281
9444
  if (this.structure)
9282
9445
  await this.structure.finishPage();
9283
- this.commands = [];
9284
9446
  this.annotations = [];
9285
9447
  this.commandBytes = 0;
9286
9448
  this.current = 0;
@@ -9312,11 +9474,11 @@ class PdfPages {
9312
9474
  }
9313
9475
  }
9314
9476
  const _exports = Object.freeze({ PdfPages: PdfPages });
9315
- _modules.set("a7fca40cb8c75af206111c90db36839b4648982beeb4179efda0ddd1ee366210", _exports);
9477
+ _modules.set("3ed7114181be5a3066742336da574fef7f2fc04ee6dfc5e64211f3bedad4cab9", _exports);
9316
9478
  return _exports;
9317
9479
  })();
9318
9480
 
9319
- const _m80 = _modules.get("7a58e8ccb5164de51db14e39ca9695af6487c354df909509f0ae6bfac8ae3887") ?? (() => {
9481
+ const _m81 = _modules.get("7a58e8ccb5164de51db14e39ca9695af6487c354df909509f0ae6bfac8ae3887") ?? (() => {
9320
9482
  /** @internal Incremental PDF number tree: at most 64 entries/children per retained level. */
9321
9483
  class PdfParentTree {
9322
9484
  objects;
@@ -9379,14 +9541,14 @@ _modules.set("7a58e8ccb5164de51db14e39ca9695af6487c354df909509f0ae6bfac8ae3887",
9379
9541
  return _exports;
9380
9542
  })();
9381
9543
 
9382
- const _m79 = _modules.get("1c1828a3d6dfc2edda674566203e7aa8e97c984114b7928df13cb373859977d0") ?? (() => {
9544
+ const _m80 = _modules.get("1c1828a3d6dfc2edda674566203e7aa8e97c984114b7928df13cb373859977d0") ?? (() => {
9383
9545
  const { OfficeIMOError } = _m2;
9384
9546
 
9385
9547
  const { checkAbort } = _m4;
9386
9548
 
9387
- const { unicodeHex } = _m59;
9549
+ const { unicodeHex } = _m60;
9388
9550
 
9389
- const { PdfParentTree } = _m80;
9551
+ const { PdfParentTree } = _m81;
9390
9552
 
9391
9553
  /** Same-page marked content uses integer K; cross-page MCR and annotation OBJR stay explicit. */
9392
9554
  function structureChild(child) {
@@ -9691,12 +9853,12 @@ _modules.set("1c1828a3d6dfc2edda674566203e7aa8e97c984114b7928df13cb373859977d0",
9691
9853
  return _exports;
9692
9854
  })();
9693
9855
 
9694
- const _m81 = _modules.get("52c78ca6833cee7e5a96b657e2c00172d550176daf2c95e742692f8416977bea") ?? (() => {
9856
+ const _m82 = _modules.get("52c78ca6833cee7e5a96b657e2c00172d550176daf2c95e742692f8416977bea") ?? (() => {
9695
9857
  const { OfficeIMOError } = _m2;
9696
9858
 
9697
9859
  const { checkAbort } = _m4;
9698
9860
 
9699
- const { pdfNumber, unicodeHex } = _m59;
9861
+ const { pdfNumber, unicodeHex } = _m60;
9700
9862
 
9701
9863
  /** @internal Bounded native bookmarks; destinations are captured only when their content is painted. */
9702
9864
  class PdfOutlines {
@@ -9755,18 +9917,18 @@ _modules.set("52c78ca6833cee7e5a96b657e2c00172d550176daf2c95e742692f8416977bea",
9755
9917
  return _exports;
9756
9918
  })();
9757
9919
 
9758
- const _m58 = _modules.get("eb2c981b4568b33deca2137956ace31ea621b6a6287755ec234336d0a7c23cfc") ?? (() => {
9759
- const { PdfObjects, unicodeHex } = _m59;
9920
+ const _m59 = _modules.get("afdad27eb363e8de0c3bd69ebf358860eb76f5c6fb29f43a87635807cb7fc273") ?? (() => {
9921
+ const { PdfObjects, unicodeHex } = _m60;
9760
9922
 
9761
- const { PdfFontResources } = _m61;
9923
+ const { PdfFontResources } = _m62;
9762
9924
 
9763
- const { PdfTableLayout } = _m68;
9925
+ const { PdfTableLayout } = _m69;
9764
9926
 
9765
- const { PdfPages } = _m73;
9927
+ const { PdfPages } = _m74;
9766
9928
 
9767
- const { PdfStructure } = _m79;
9929
+ const { PdfStructure } = _m80;
9768
9930
 
9769
- const { PdfOutlines } = _m81;
9931
+ const { PdfOutlines } = _m82;
9770
9932
 
9771
9933
  /** One resource/catalog owner shared by table convenience exports and composed documents. */
9772
9934
  class PdfWriteSession {
@@ -9818,11 +9980,11 @@ class PdfWriteSession {
9818
9980
  }
9819
9981
  }
9820
9982
  const _exports = Object.freeze({ PdfWriteSession: PdfWriteSession });
9821
- _modules.set("eb2c981b4568b33deca2137956ace31ea621b6a6287755ec234336d0a7c23cfc", _exports);
9983
+ _modules.set("afdad27eb363e8de0c3bd69ebf358860eb76f5c6fb29f43a87635807cb7fc273", _exports);
9822
9984
  return _exports;
9823
9985
  })();
9824
9986
 
9825
- const _m54 = _modules.get("98eb735e985f873ed0ffc628449a20d1f3bb729a87b6d6b3099b6f308438fcb5") ?? (() => {
9987
+ const _m55 = _modules.get("45cf9fd6b6293c1a83bc8554e1bcb5cf119f44701fbad7849f39a712cab5074b") ?? (() => {
9826
9988
  const { BlobByteSink, withDestination } = _m3;
9827
9989
 
9828
9990
  const { beginTask, checkAbort, consumeRows, pause, taskYieldDue } = _m4;
@@ -9831,9 +9993,9 @@ const { notifyProgress } = _m23;
9831
9993
 
9832
9994
  const { createRowProjector } = _m11;
9833
9995
 
9834
- const { settings } = _m55;
9996
+ const { settings } = _m56;
9835
9997
 
9836
- const { PdfWriteSession } = _m58;
9998
+ const { PdfWriteSession } = _m59;
9837
9999
 
9838
10000
  async function writePdf(rows, configuration) {
9839
10001
  const sink = new BlobByteSink();
@@ -9887,11 +10049,11 @@ async function writePdfTo(rows, destination, configuration) {
9887
10049
  });
9888
10050
  }
9889
10051
  const _exports = Object.freeze({ writePdf: writePdf, writePdfTo: writePdfTo });
9890
- _modules.set("98eb735e985f873ed0ffc628449a20d1f3bb729a87b6d6b3099b6f308438fcb5", _exports);
10052
+ _modules.set("45cf9fd6b6293c1a83bc8554e1bcb5cf119f44701fbad7849f39a712cab5074b", _exports);
9891
10053
  return _exports;
9892
10054
  })();
9893
10055
 
9894
- const _m85 = _modules.get("749d1ec5422c0087787f525ef42e3b8d3a94d2b70eb5e42d2e3723a870777ad6") ?? (() => {
10056
+ const _m86 = _modules.get("749d1ec5422c0087787f525ef42e3b8d3a94d2b70eb5e42d2e3723a870777ad6") ?? (() => {
9895
10057
  const { NotSupportedError, OfficeIMOError } = _m2;
9896
10058
 
9897
10059
  const { checkAbort, pause, taskYieldDue, withAbort } = _m4;
@@ -10159,12 +10321,12 @@ _modules.set("749d1ec5422c0087787f525ef42e3b8d3a94d2b70eb5e42d2e3723a870777ad6",
10159
10321
  return _exports;
10160
10322
  })();
10161
10323
 
10162
- const _m84 = _modules.get("7dca2d9ca5c43893abdaf86df5b1bcb1f3de3d5d33532d082fdfe04711999d21") ?? (() => {
10324
+ const _m85 = _modules.get("7dca2d9ca5c43893abdaf86df5b1bcb1f3de3d5d33532d082fdfe04711999d21") ?? (() => {
10163
10325
  const { NotSupportedError, OfficeIMOError } = _m2;
10164
10326
 
10165
10327
  const { checkAbort, pause, taskYieldDue } = _m4;
10166
10328
 
10167
- const { pngPixels } = _m85;
10329
+ const { pngPixels } = _m86;
10168
10330
 
10169
10331
  /** Shared document image resources; source objects are captured on first consumption. */
10170
10332
  class PdfDocumentImages {
@@ -10293,14 +10455,14 @@ _modules.set("7dca2d9ca5c43893abdaf86df5b1bcb1f3de3d5d33532d082fdfe04711999d21",
10293
10455
  return _exports;
10294
10456
  })();
10295
10457
 
10296
- const _m86 = _modules.get("3290c84fdf80725af802f497d947bc088aa8d93d9db0a33f6f829f9153aa6fd6") ?? (() => {
10458
+ const _m87 = _modules.get("3290c84fdf80725af802f497d947bc088aa8d93d9db0a33f6f829f9153aa6fd6") ?? (() => {
10297
10459
  const { OfficeIMOError } = _m2;
10298
10460
 
10299
10461
  const { checkAbort, pause, taskYieldDue } = _m4;
10300
10462
 
10301
- const { color, positive } = _m55;
10463
+ const { color, positive } = _m56;
10302
10464
 
10303
- const { pdfNumber: n } = _m59;
10465
+ const { pdfNumber: n } = _m60;
10304
10466
 
10305
10467
  /** Capture and serialize one bounded display path, with no markup parser or resource loading. */
10306
10468
  async function vectorCommands(block, settings, used) {
@@ -10380,14 +10542,14 @@ _modules.set("3290c84fdf80725af802f497d947bc088aa8d93d9db0a33f6f829f9153aa6fd6",
10380
10542
  return _exports;
10381
10543
  })();
10382
10544
 
10383
- const _m87 = _modules.get("da9ad00f94b9ae28e2e3de796928ff0c4eab1d73382b1441e7d779fad4278ef7") ?? (() => {
10545
+ const _m88 = _modules.get("da9ad00f94b9ae28e2e3de796928ff0c4eab1d73382b1441e7d779fad4278ef7") ?? (() => {
10384
10546
  const { NotSupportedError, OfficeIMOError } = _m2;
10385
10547
 
10386
10548
  const { checkAbort, pause, taskYieldDue } = _m4;
10387
10549
 
10388
- const { color, positive } = _m55;
10550
+ const { color, positive } = _m56;
10389
10551
 
10390
- const { pdfNumber: n } = _m59;
10552
+ const { pdfNumber: n } = _m60;
10391
10553
 
10392
10554
  /** Portable drawings are an exact schema: unsupported data must never be silently discarded. */
10393
10555
  function record(value, keys, name) {
@@ -10627,20 +10789,20 @@ _modules.set("da9ad00f94b9ae28e2e3de796928ff0c4eab1d73382b1441e7d779fad4278ef7",
10627
10789
  return _exports;
10628
10790
  })();
10629
10791
 
10630
- const _m88 = _modules.get("5e4503b77b357ee6d9fad1f52690085b0f0b140cd3b550b63c5100ed95a92f88") ?? (() => {
10792
+ const _m89 = _modules.get("5e4503b77b357ee6d9fad1f52690085b0f0b140cd3b550b63c5100ed95a92f88") ?? (() => {
10631
10793
  const { OfficeIMOError } = _m2;
10632
10794
 
10633
- const { capturePdfText, wrapPdfText } = _m70;
10795
+ const { capturePdfText, wrapPdfText } = _m71;
10634
10796
 
10635
- const { positive } = _m55;
10797
+ const { positive } = _m56;
10636
10798
 
10637
- const { resolveParagraphStyle } = _m56;
10799
+ const { resolveParagraphStyle } = _m57;
10638
10800
 
10639
- const { captureBookmark } = _m77;
10801
+ const { captureBookmark } = _m78;
10640
10802
 
10641
10803
  const { captureFields } = _m10;
10642
10804
 
10643
- const { pdfBudgetText } = _m69;
10805
+ const { pdfBudgetText } = _m70;
10644
10806
 
10645
10807
  /** @internal Copy public paragraph input before any cooperative layout or source enumeration. */
10646
10808
  function captureParagraph(block, settings, fonts, budgetOnPaint = false) {
@@ -10711,12 +10873,12 @@ _modules.set("5e4503b77b357ee6d9fad1f52690085b0f0b140cd3b550b63c5100ed95a92f88",
10711
10873
  return _exports;
10712
10874
  })();
10713
10875
 
10714
- const _m89 = _modules.get("1d57c429705ae0cbc14d98dcfef4c8a6c2df06f391c8f58e99cacb02f2d1cbc7") ?? (() => {
10715
- const { capturePdfText, wrapPdfText } = _m70;
10876
+ const _m90 = _modules.get("1d57c429705ae0cbc14d98dcfef4c8a6c2df06f391c8f58e99cacb02f2d1cbc7") ?? (() => {
10877
+ const { capturePdfText, wrapPdfText } = _m71;
10716
10878
 
10717
- const { captureParagraph, prepareParagraph } = _m88;
10879
+ const { captureParagraph, prepareParagraph } = _m89;
10718
10880
 
10719
- const { resolveParagraphStyle } = _m56;
10881
+ const { resolveParagraphStyle } = _m57;
10720
10882
 
10721
10883
  function captureListOptions(block, settings) {
10722
10884
  const { items, ordered = false, start: inputStart, itemStyle, indent, markerGap } = block;
@@ -10769,14 +10931,14 @@ _modules.set("1d57c429705ae0cbc14d98dcfef4c8a6c2df06f391c8f58e99cacb02f2d1cbc7",
10769
10931
  return _exports;
10770
10932
  })();
10771
10933
 
10772
- const _m91 = _modules.get("d04686d2c067355dfd215333b83eb5f79f96e9e4be49f942e050f21ac0795343") ?? (() => {
10934
+ const _m92 = _modules.get("d04686d2c067355dfd215333b83eb5f79f96e9e4be49f942e050f21ac0795343") ?? (() => {
10773
10935
  const { assertGroupedReportSource } = _m8;
10774
10936
 
10775
10937
  const { captureFields } = _m10;
10776
10938
 
10777
- const { captureWideTable } = _m55;
10939
+ const { captureWideTable } = _m56;
10778
10940
 
10779
- const { presentation } = _m57;
10941
+ const { presentation } = _m58;
10780
10942
 
10781
10943
  /** @internal Capture schemas shared by the block factory and standalone convenience writers. */
10782
10944
  const groupedPdfLabelFields = ["labelColumn", "subtotalLabel", "grandTotalLabel", "includeGrandTotal", "continuationLabel", "groupHeadingLevel"];
@@ -10819,22 +10981,22 @@ _modules.set("d04686d2c067355dfd215333b83eb5f79f96e9e4be49f942e050f21ac0795343",
10819
10981
  return _exports;
10820
10982
  })();
10821
10983
 
10822
- const _m90 = _modules.get("d43e573fd5bad18a7ec2d71752168c422c4f8fabbc51f1cef8e3ba389f298715") ?? (() => {
10984
+ const _m91 = _modules.get("289fa3a052c7fbab2a3ca0fb91fb9974db709d24b7d850f1175810258f0409a0") ?? (() => {
10823
10985
  const { assertGroupedReportSource, groupedReportOperation } = _m8;
10824
10986
 
10825
10987
  const { consumeRows } = _m4;
10826
10988
 
10827
10989
  const { ExportCell } = _m5;
10828
10990
 
10829
- const { captureGroupedPdfTableOptions } = _m91;
10991
+ const { captureGroupedPdfTableOptions } = _m92;
10830
10992
 
10831
- const { settings } = _m55;
10993
+ const { settings } = _m56;
10832
10994
 
10833
- const { PdfTableLayout } = _m68;
10995
+ const { PdfTableLayout } = _m69;
10834
10996
 
10835
- const { captureCaption, captureParagraph, prepareParagraph } = _m88;
10997
+ const { captureCaption, captureParagraph, prepareParagraph } = _m89;
10836
10998
 
10837
- const { synchronousText } = _m69;
10999
+ const { synchronousText } = _m70;
10838
11000
 
10839
11001
  /** @internal Render one analytical source in the existing document session. Retain one detail row and
10840
11002
  * at most four closing subtotals. All captions, rows, pages, bytes and fonts use the document owners. */
@@ -11073,11 +11235,11 @@ async function renderGroupedPdfTable(block, context) {
11073
11235
  }
11074
11236
  }
11075
11237
  const _exports = Object.freeze({ renderGroupedPdfTable: renderGroupedPdfTable });
11076
- _modules.set("d43e573fd5bad18a7ec2d71752168c422c4f8fabbc51f1cef8e3ba389f298715", _exports);
11238
+ _modules.set("289fa3a052c7fbab2a3ca0fb91fb9974db709d24b7d850f1175810258f0409a0", _exports);
11077
11239
  return _exports;
11078
11240
  })();
11079
11241
 
11080
- const _m83 = _modules.get("f6c70e9a0bed09b5a1c61a662ad7d3faf731c911f574e2df285f669bd643b947") ?? (() => {
11242
+ const _m84 = _modules.get("9051bf9fc3168e24b53b16c123a42816198456846003fb49191c03a18cdab904") ?? (() => {
11081
11243
  const { BlobByteSink, withDestination } = _m3;
11082
11244
 
11083
11245
  const { OfficeIMOError } = _m2;
@@ -11090,29 +11252,29 @@ const { copyColumns, createRowProjector } = _m11;
11090
11252
 
11091
11253
  const { captureFields } = _m10;
11092
11254
 
11093
- const { settings, captureWideTable } = _m55;
11255
+ const { settings, captureWideTable } = _m56;
11094
11256
 
11095
- const { pdfNumber: n } = _m59;
11257
+ const { pdfNumber: n } = _m60;
11096
11258
 
11097
- const { PdfTableLayout } = _m68;
11259
+ const { PdfTableLayout } = _m69;
11098
11260
 
11099
- const { PdfWriteSession } = _m58;
11261
+ const { PdfWriteSession } = _m59;
11100
11262
 
11101
- const { PdfDocumentImages } = _m84;
11263
+ const { PdfDocumentImages } = _m85;
11102
11264
 
11103
- const { vectorCommands } = _m86;
11265
+ const { vectorCommands } = _m87;
11104
11266
 
11105
- const { graphicAlternative } = _m79;
11267
+ const { graphicAlternative } = _m80;
11106
11268
 
11107
- const { checkDrawingBlock, prepareDrawing } = _m87;
11269
+ const { checkDrawingBlock, prepareDrawing } = _m88;
11108
11270
 
11109
- const { captureParagraph, captureCaption, prepareParagraph, checkParagraphBuffer, paragraphStartHeight } = _m88;
11271
+ const { captureParagraph, captureCaption, prepareParagraph, checkParagraphBuffer, paragraphStartHeight } = _m89;
11110
11272
 
11111
- const { captureListOptions, prepareListItem } = _m89;
11273
+ const { captureListOptions, prepareListItem } = _m90;
11112
11274
 
11113
- const { captureSection } = _m77;
11275
+ const { captureSection } = _m78;
11114
11276
 
11115
- const { renderGroupedPdfTable } = _m90;
11277
+ const { renderGroupedPdfTable } = _m91;
11116
11278
 
11117
11279
  const tableOptionFields = ["columns", "includeHeader", "headerRows", "footer", "headerPresentation", "footerPresentation", "alternateRowColor", "columnWidths", "wideTable", "formatValue", "formatRuns"];
11118
11280
  /** Capture typed columns for a single-use table source in a composed document. */
@@ -11367,22 +11529,22 @@ function captureTableOptions(options) {
11367
11529
  return { ...captured, ...(captured.wideTable === undefined ? {} : { wideTable: captureWideTable(captured.wideTable) }) };
11368
11530
  }
11369
11531
  const _exports = Object.freeze({ pdfTable: pdfTable, writePdfDocument: writePdfDocument, writePdfDocumentTo: writePdfDocumentTo });
11370
- _modules.set("f6c70e9a0bed09b5a1c61a662ad7d3faf731c911f574e2df285f669bd643b947", _exports);
11532
+ _modules.set("9051bf9fc3168e24b53b16c123a42816198456846003fb49191c03a18cdab904", _exports);
11371
11533
  return _exports;
11372
11534
  })();
11373
11535
 
11374
- const _m82 = _modules.get("879a0adeb3c62918085a071cbc37f221eb89a0fd73d56ebb5e9cfe0d49db8ee9") ?? (() => {
11536
+ const _m83 = _modules.get("abe76e52ffeed11ab42477c83ddde1d1d7de28b803096436b5b23cb153af58ba") ?? (() => {
11375
11537
  const { assertGroupedReportSource } = _m8;
11376
11538
 
11377
11539
  const { BlobByteSink } = _m3;
11378
11540
 
11379
- const { writePdfDocumentTo } = _m83;
11541
+ const { writePdfDocumentTo } = _m84;
11380
11542
 
11381
- const { pdfOptionFields } = _m55;
11543
+ const { pdfOptionFields } = _m56;
11382
11544
 
11383
11545
  const { captureFields } = _m10;
11384
11546
 
11385
- const { pdfGroupedTable, groupedPdfLabelFields, groupedPdfTableFields } = _m91;
11547
+ const { pdfGroupedTable, groupedPdfLabelFields, groupedPdfTableFields } = _m92;
11386
11548
 
11387
11549
 
11388
11550
 
@@ -11416,15 +11578,15 @@ async function writeGroupedPdfTo(report, destination, configuration) {
11416
11578
  delete documentOptions.footer;
11417
11579
  return writePdfDocumentTo([pdfGroupedTable(report, tableOptions)], destination, documentOptions);
11418
11580
  }
11419
- const _exports = Object.freeze({ pdfGroupedTable: _m91.pdfGroupedTable, writeGroupedPdf: writeGroupedPdf, writeGroupedPdfTo: writeGroupedPdfTo });
11420
- _modules.set("879a0adeb3c62918085a071cbc37f221eb89a0fd73d56ebb5e9cfe0d49db8ee9", _exports);
11581
+ const _exports = Object.freeze({ pdfGroupedTable: _m92.pdfGroupedTable, writeGroupedPdf: writeGroupedPdf, writeGroupedPdfTo: writeGroupedPdfTo });
11582
+ _modules.set("abe76e52ffeed11ab42477c83ddde1d1d7de28b803096436b5b23cb153af58ba", _exports);
11421
11583
  return _exports;
11422
11584
  })();
11423
11585
 
11424
- const _m92 = _modules.get("3d777096288d1be55a05a80bc015d4674212e587703f25a7e7cf99a8065feb86") ?? (() => {
11425
- const { fontProgram } = _m62;
11586
+ const _m93 = _modules.get("3d777096288d1be55a05a80bc015d4674212e587703f25a7e7cf99a8065feb86") ?? (() => {
11587
+ const { fontProgram } = _m63;
11426
11588
 
11427
- const { resolveScalar, selectFont, validateFonts } = _m66;
11589
+ const { resolveScalar, selectFont, validateFonts } = _m67;
11428
11590
 
11429
11591
  /**
11430
11592
  * Check one text run against the writer's selected font and scalar-layout rules.
@@ -11461,17 +11623,17 @@ _modules.set("3d777096288d1be55a05a80bc015d4674212e587703f25a7e7cf99a8065feb86",
11461
11623
  return _exports;
11462
11624
  })();
11463
11625
 
11464
- const _m53 = _modules.get("2deab7b4ccb08bed297341ddb563d8fcf74277aff38c1dfc3d9edd61c0d98481") ?? (() => {
11626
+ const _m54 = _modules.get("027aafa08408056b10d7d717d63d1f7c0ee20ecfc68213aa66feacc75ec525fe") ?? (() => {
11465
11627
 
11466
- const _exports = Object.freeze({ writePdf: _m54.writePdf, writePdfTo: _m54.writePdfTo, writeGroupedPdf: _m82.writeGroupedPdf, writeGroupedPdfTo: _m82.writeGroupedPdfTo, pdfGroupedTable: _m82.pdfGroupedTable, createGroupedReport: _m8.createGroupedReport, writePdfDocument: _m83.writePdfDocument, writePdfDocumentTo: _m83.writePdfDocumentTo, pdfTable: _m83.pdfTable, PdfFont: _m62.PdfFont, preflightPdfText: _m92.preflightPdfText, ExportCell: _m5.ExportCell, saveBlob: _m1.saveBlob });
11467
- _modules.set("2deab7b4ccb08bed297341ddb563d8fcf74277aff38c1dfc3d9edd61c0d98481", _exports);
11628
+ const _exports = Object.freeze({ writePdf: _m55.writePdf, writePdfTo: _m55.writePdfTo, writeGroupedPdf: _m83.writeGroupedPdf, writeGroupedPdfTo: _m83.writeGroupedPdfTo, pdfGroupedTable: _m83.pdfGroupedTable, createGroupedReport: _m8.createGroupedReport, writePdfDocument: _m84.writePdfDocument, writePdfDocumentTo: _m84.writePdfDocumentTo, pdfTable: _m84.pdfTable, PdfFont: _m63.PdfFont, preflightPdfText: _m93.preflightPdfText, ExportCell: _m5.ExportCell, saveBlob: _m1.saveBlob });
11629
+ _modules.set("027aafa08408056b10d7d717d63d1f7c0ee20ecfc68213aa66feacc75ec525fe", _exports);
11468
11630
  return _exports;
11469
11631
  })();
11470
11632
 
11471
- const _m0 = _modules.get("e049e8f0ed9efd8026af14762e37ef9389261e00ca3976ee034cc412d35ba908") ?? (() => {
11633
+ const _m0 = _modules.get("24797253ebcf6e25ce43ac76d1f16d0ce85b477a461faa1d167dabbea8e43968") ?? (() => {
11472
11634
 
11473
- const _exports = Object.freeze({ core: _m1, zip: _m14, xml: _m17, opc: _m18, xlsx: _m21, csv: _m49, pdf: _m53, Workbook: _m21.Workbook, Worksheet: _m21.Worksheet, Cell: _m21.Cell, FormulaCell: _m21.FormulaCell, StyleRegistry: _m21.StyleRegistry, NumberFormats: _m21.NumberFormats, writeXlsx: _m21.writeXlsx, writeXlsxTo: _m21.writeXlsxTo, writeCsv: _m49.writeCsv, writeCsvTo: _m49.writeCsvTo, createGroupedReport: _m8.createGroupedReport, writeGroupedXlsx: _m47.writeGroupedXlsx, writeGroupedXlsxTo: _m47.writeGroupedXlsxTo, addGroupedXlsx: _m47.addGroupedXlsx, writeGroupedPdf: _m82.writeGroupedPdf, writeGroupedPdfTo: _m82.writeGroupedPdfTo, pdfGroupedTable: _m82.pdfGroupedTable, writePdf: _m53.writePdf, writePdfTo: _m53.writePdfTo, writePdfDocument: _m53.writePdfDocument, writePdfDocumentTo: _m53.writePdfDocumentTo, pdfTable: _m53.pdfTable, PdfFont: _m53.PdfFont, preflightPdfText: _m53.preflightPdfText, OfficeIMOError: _m1.OfficeIMOError, NotSupportedError: _m1.NotSupportedError, detectFeatures: _m1.detectFeatures, saveBlob: _m1.saveBlob, ExportCell: _m1.ExportCell });
11474
- _modules.set("e049e8f0ed9efd8026af14762e37ef9389261e00ca3976ee034cc412d35ba908", _exports);
11635
+ const _exports = Object.freeze({ core: _m1, zip: _m14, xml: _m17, opc: _m18, xlsx: _m21, csv: _m50, pdf: _m54, Workbook: _m21.Workbook, Worksheet: _m21.Worksheet, Cell: _m21.Cell, FormulaCell: _m21.FormulaCell, StyleRegistry: _m21.StyleRegistry, NumberFormats: _m21.NumberFormats, writeXlsx: _m21.writeXlsx, writeXlsxTo: _m21.writeXlsxTo, writeCsv: _m50.writeCsv, writeCsvTo: _m50.writeCsvTo, createGroupedReport: _m8.createGroupedReport, writeGroupedXlsx: _m48.writeGroupedXlsx, writeGroupedXlsxTo: _m48.writeGroupedXlsxTo, addGroupedXlsx: _m48.addGroupedXlsx, writeGroupedPdf: _m83.writeGroupedPdf, writeGroupedPdfTo: _m83.writeGroupedPdfTo, pdfGroupedTable: _m83.pdfGroupedTable, writePdf: _m54.writePdf, writePdfTo: _m54.writePdfTo, writePdfDocument: _m54.writePdfDocument, writePdfDocumentTo: _m54.writePdfDocumentTo, pdfTable: _m54.pdfTable, PdfFont: _m54.PdfFont, preflightPdfText: _m54.preflightPdfText, OfficeIMOError: _m1.OfficeIMOError, NotSupportedError: _m1.NotSupportedError, detectFeatures: _m1.detectFeatures, saveBlob: _m1.saveBlob, ExportCell: _m1.ExportCell });
11636
+ _modules.set("24797253ebcf6e25ce43ac76d1f16d0ce85b477a461faa1d167dabbea8e43968", _exports);
11475
11637
  return _exports;
11476
11638
  })();
11477
11639
  Object.assign(officeimo, _m0);