@evotecit/officeimo 0.1.3 → 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.
@@ -1059,7 +1059,16 @@ class OpcPackage {
1059
1059
  throw new OfficeIMOError("INVALID_STATE", "OPC package is finalized."); }
1060
1060
  reserve(uri, type) {
1061
1061
  this.open();
1062
+ // OPC part names become ZIP entry names. Reject oversized and deeply nested
1063
+ // names before collecting every ancestor prefix.
1064
+ if (typeof uri === "string" && uri.length > 65536)
1065
+ throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the ZIP entry-name limit.");
1062
1066
  uri = partUri(uri);
1067
+ let depth = 0;
1068
+ for (let index = 0; index < uri.length; index++) {
1069
+ if (uri[index] === "/" && ++depth > 64)
1070
+ throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the directory-depth limit.");
1071
+ }
1063
1072
  if (/\/_rels(?:\/|$)/i.test(uri) || uri.toLowerCase() === "/[content_types].xml")
1064
1073
  throw new TypeError("Package metadata part names are reserved.");
1065
1074
  const key = uri.toLowerCase();
@@ -1844,14 +1853,23 @@ function columnName(index) {
1844
1853
  return name;
1845
1854
  }
1846
1855
  function clipName(text, length) { return text.slice(0, length).replace(/[\ud800-\udbff]$/, ""); }
1856
+ function trimSheetNameEdges(text) {
1857
+ let start = 0, end = text.length;
1858
+ const removable = (character) => character === "'" || /\s/u.test(character);
1859
+ while (start < end && removable(text[start]))
1860
+ start++;
1861
+ while (end > start && removable(text[end - 1]))
1862
+ end--;
1863
+ return text.slice(start, end);
1864
+ }
1847
1865
  function sheetName(requested, names, policy, register = true) {
1848
1866
  if (typeof requested !== "string")
1849
1867
  throw new TypeError("Sheet name must be a string.");
1850
1868
  // Validate and deduplicate the decoded literal value, before ST_Xstring attribute encoding.
1851
1869
  // A requested _xHHHH_ token is literal text; the serializer protects its leading underscore.
1852
- let base = cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_").replace(/^[\s']+|[\s']+$/g, "");
1870
+ let base = trimSheetNameEdges(cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_"));
1853
1871
  // Clipping can expose an internal apostrophe or the reserved History name.
1854
- base = clipName(base, 31).replace(/[\s']+$/g, "");
1872
+ base = trimSheetNameEdges(clipName(base, 31));
1855
1873
  if (!base)
1856
1874
  base = "Sheet";
1857
1875
  if (base.toLowerCase() === "history")
@@ -1968,6 +1986,51 @@ return _exports;
1968
1986
  })();
1969
1987
 
1970
1988
  const _m25 = (() => {
1989
+ const { captureFields } = _m7;
1990
+
1991
+ /** Capture bounded disjoint ranges before asynchronous serialization; absent columns stay visible. */
1992
+ function captureColumnOutlines(input, columns) {
1993
+ if (input === undefined)
1994
+ return undefined;
1995
+ if (!Array.isArray(input) || input.length > columns)
1996
+ throw new TypeError("Column outlines must be bounded, non-overlapping ranges.");
1997
+ let end = 0;
1998
+ return Object.freeze(input.map(range => {
1999
+ if (!range || typeof range !== "object")
2000
+ throw new TypeError("Column outlines require range metadata.");
2001
+ return captureFields(range, ["firstColumn", "columnCount", "level", "hidden", "collapsed"]);
2002
+ }).sort((a, b) => a.firstColumn - b.firstColumn).map(range => {
2003
+ const { firstColumn, columnCount, level = 0, hidden, collapsed } = range;
2004
+ if (!Number.isSafeInteger(firstColumn) || firstColumn < end || !Number.isSafeInteger(columnCount) || columnCount < 1 || firstColumn + columnCount > columns)
2005
+ throw new RangeError("Column outline ranges must be disjoint and within the declared columns.");
2006
+ if (!Number.isInteger(level) || level < 0 || level > 7)
2007
+ throw new RangeError("Column outline level must be from zero through seven.");
2008
+ for (const flag of [hidden, collapsed])
2009
+ if (flag !== undefined && typeof flag !== "boolean")
2010
+ throw new TypeError("Column outline flags must be booleans.");
2011
+ end = firstColumn + columnCount;
2012
+ return Object.freeze({ firstColumn, columnCount, level, ...(hidden === undefined ? {} : { hidden }), ...(collapsed === undefined ? {} : { collapsed }) });
2013
+ }));
2014
+ }
2015
+ /** @internal Positions are captured even when a sheet has only column outlines. */
2016
+ function validateOutlinePositions(options) {
2017
+ for (const flag of [options.outlineSummaryBelow, options.outlineSummaryRight])
2018
+ if (flag !== undefined && typeof flag !== "boolean")
2019
+ throw new TypeError("Outline summary positions must be booleans.");
2020
+ }
2021
+ /** @internal Resolve at most 16,384 columns once, without retaining any worksheet body. */
2022
+ function columnOutlineMap(ranges) {
2023
+ const result = new Map();
2024
+ for (const range of ranges ?? [])
2025
+ for (let index = range.firstColumn; index < range.firstColumn + range.columnCount; index++)
2026
+ result.set(index, range);
2027
+ return result;
2028
+ }
2029
+ const _exports = Object.freeze({ captureColumnOutlines: captureColumnOutlines, validateOutlinePositions: validateOutlinePositions, columnOutlineMap: columnOutlineMap });
2030
+ return _exports;
2031
+ })();
2032
+
2033
+ const _m26 = (() => {
1971
2034
  const { assertExportValue } = _m20;
1972
2035
 
1973
2036
  const { copyExportValue } = _m23;
@@ -2032,7 +2095,7 @@ const _exports = Object.freeze({ captureTableSpans: captureTableSpans, tableSpan
2032
2095
  return _exports;
2033
2096
  })();
2034
2097
 
2035
- const _m28 = (() => {
2098
+ const _m29 = (() => {
2036
2099
  const { ChunkedTextSink } = _m5;
2037
2100
 
2038
2101
  const { escapeXml, xmlDeclaration } = _m11;
@@ -2144,14 +2207,14 @@ const _exports = Object.freeze({ chartNamespace: chartNamespace, chartContentTyp
2144
2207
  return _exports;
2145
2208
  })();
2146
2209
 
2147
- const _m27 = (() => {
2210
+ const _m28 = (() => {
2148
2211
  const { cleanXml, escapeXml, escapeOoxmlAttribute, xmlDeclaration } = _m11;
2149
2212
 
2150
2213
  const { copyExportLink } = _m21;
2151
2214
 
2152
2215
  const { officeRelationshipsNamespace } = _m8;
2153
2216
 
2154
- const { chartAnchorXml } = _m28;
2217
+ const { chartAnchorXml } = _m29;
2155
2218
 
2156
2219
  const { captureFields } = _m7;
2157
2220
 
@@ -2221,10 +2284,10 @@ const _exports = Object.freeze({ copyDrawingAnchor: copyDrawingAnchor, cellPosit
2221
2284
  return _exports;
2222
2285
  })();
2223
2286
 
2224
- const _m30 = (() => {
2287
+ const _m31 = (() => {
2225
2288
  const { OfficeIMOError } = _m3;
2226
2289
 
2227
- const { cellPosition } = _m27;
2290
+ const { cellPosition } = _m28;
2228
2291
 
2229
2292
  function indexRows(regions) {
2230
2293
  if (!regions.length)
@@ -2325,7 +2388,7 @@ const _exports = Object.freeze({ MergeRegions: MergeRegions });
2325
2388
  return _exports;
2326
2389
  })();
2327
2390
 
2328
- const _m31 = (() => {
2391
+ const _m32 = (() => {
2329
2392
  class NumericAggregate {
2330
2393
  operation;
2331
2394
  count = 0;
@@ -2372,10 +2435,10 @@ const _exports = Object.freeze({ NumericAggregate: NumericAggregate, createTotal
2372
2435
  return _exports;
2373
2436
  })();
2374
2437
 
2375
- const _m32 = (() => {
2438
+ const _m33 = (() => {
2376
2439
  const { ExportCell } = _m20;
2377
2440
 
2378
- const { tableSpans } = _m25;
2441
+ const { tableSpans } = _m26;
2379
2442
 
2380
2443
  const { copyValue, columnName } = _m19;
2381
2444
 
@@ -2408,7 +2471,7 @@ const _exports = Object.freeze({ StructuredRows: StructuredRows });
2408
2471
  return _exports;
2409
2472
  })();
2410
2473
 
2411
- const _m29 = (() => {
2474
+ const _m30 = (() => {
2412
2475
  const { ExportCell } = _m20;
2413
2476
 
2414
2477
  const { isDate } = _m12;
@@ -2419,13 +2482,13 @@ const { FormulaCell } = _m22;
2419
2482
 
2420
2483
  const { escapeOoxmlAttribute } = _m11;
2421
2484
 
2422
- const { MergeRegions } = _m30;
2485
+ const { MergeRegions } = _m31;
2423
2486
 
2424
2487
  const { OfficeIMOError } = _m3;
2425
2488
 
2426
- const { createTotals } = _m31;
2489
+ const { createTotals } = _m32;
2427
2490
 
2428
- const { StructuredRows } = _m32;
2491
+ const { StructuredRows } = _m33;
2429
2492
 
2430
2493
  /** @internal A computed formula with a numeric cache; no public arbitrary-formula input. */
2431
2494
  class ComputedTotal {
@@ -2608,7 +2671,7 @@ const _exports = Object.freeze({ ComputedTotal: ComputedTotal, ReportLayout: Rep
2608
2671
  return _exports;
2609
2672
  })();
2610
2673
 
2611
- const _m34 = (() => {
2674
+ const _m35 = (() => {
2612
2675
  const { columnName } = _m19;
2613
2676
 
2614
2677
  /** @internal Data-column selectors use stable keys or one-based worksheet columns. */
@@ -2638,7 +2701,7 @@ const _exports = Object.freeze({ resolveDataColumn: resolveDataColumn, qualified
2638
2701
  return _exports;
2639
2702
  })();
2640
2703
 
2641
- const _m35 = (() => {
2704
+ const _m36 = (() => {
2642
2705
  const { OfficeIMOError } = _m3;
2643
2706
 
2644
2707
  const { columnName } = _m19;
@@ -2684,18 +2747,18 @@ const _exports = Object.freeze({ retainDataRowRanges: retainDataRowRanges, dataR
2684
2747
  return _exports;
2685
2748
  })();
2686
2749
 
2687
- const _m33 = (() => {
2750
+ const _m34 = (() => {
2688
2751
  const { cleanXml, escapeXml, escapeOoxmlAttribute } = _m11;
2689
2752
 
2690
- const { cellPosition } = _m27;
2753
+ const { cellPosition } = _m28;
2691
2754
 
2692
2755
  const { colorArgb } = _m17;
2693
2756
 
2694
2757
  const { fields, optionalBoolean, differentialXml } = _m18;
2695
2758
 
2696
- const { resolveDataColumn } = _m34;
2759
+ const { resolveDataColumn } = _m35;
2697
2760
 
2698
- const { dataRowReference } = _m35;
2761
+ const { dataRowReference } = _m36;
2699
2762
 
2700
2763
  function target(range, columns) {
2701
2764
  if (typeof range === "string") {
@@ -2853,7 +2916,7 @@ const _exports = Object.freeze({ prepareConditionalFormats: prepareConditionalFo
2853
2916
  return _exports;
2854
2917
  })();
2855
2918
 
2856
- const _m36 = (() => {
2919
+ const _m37 = (() => {
2857
2920
  const { OfficeIMOError } = _m3;
2858
2921
 
2859
2922
  const { checkAbort } = _m2;
@@ -2862,9 +2925,9 @@ const { cleanXml, escapeOoxmlAttribute, escapeXml } = _m11;
2862
2925
 
2863
2926
  const { fields, optionalBoolean } = _m18;
2864
2927
 
2865
- const { resolveDataColumn } = _m34;
2928
+ const { resolveDataColumn } = _m35;
2866
2929
 
2867
- const { dataRowReference } = _m35;
2930
+ const { dataRowReference } = _m36;
2868
2931
 
2869
2932
  function message(value, maximum, name) {
2870
2933
  if (value === undefined)
@@ -2956,7 +3019,7 @@ const _exports = Object.freeze({ prepareDataValidations: prepareDataValidations,
2956
3019
  return _exports;
2957
3020
  })();
2958
3021
 
2959
- const _m26 = (() => {
3022
+ const _m27 = (() => {
2960
3023
  const { checkAbort, consumeRows, inputRows, pause, taskYieldDue } = _m2;
2961
3024
 
2962
3025
  const { ChunkedTextSink, BlobByteSink } = _m5;
@@ -2977,25 +3040,27 @@ const { Cell, cellText, columnName, inlineText, excelDate, copyValue } = _m19;
2977
3040
 
2978
3041
  const { spreadsheetNamespace, colorArgb, validateStylePatch, copyStylePatch } = _m16;
2979
3042
 
2980
- const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } = _m27;
3043
+ const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } = _m28;
2981
3044
 
2982
3045
  const { ExportCell, assertScalar } = _m20;
2983
3046
 
2984
- const { ReportLayout, ComputedTotal, printXml } = _m29;
3047
+ const { ReportLayout, ComputedTotal, printXml } = _m30;
2985
3048
 
2986
3049
  const { cleanXml } = _m11;
2987
3050
 
2988
- const { ConditionalFormats, prepareConditionalFormats } = _m33;
3051
+ const { ConditionalFormats, prepareConditionalFormats } = _m34;
2989
3052
 
2990
3053
  const { isDate } = _m12;
2991
3054
 
2992
3055
  const { FormulaCell, formulaXml, isSubtotalFormula } = _m22;
2993
3056
 
2994
- const { prepareDataValidations, dataValidationsXml } = _m36;
3057
+ const { prepareDataValidations, dataValidationsXml } = _m37;
3058
+
3059
+ const { qualifiedCell, qualifiedColumnRange, resolveDataColumn } = _m35;
2995
3060
 
2996
- const { qualifiedCell, qualifiedColumnRange, resolveDataColumn } = _m34;
3061
+ const { dataRowRanges, dataRowCount } = _m36;
2997
3062
 
2998
- const { dataRowRanges, dataRowCount } = _m35;
3063
+ const { captureColumnOutlines, columnOutlineMap, validateOutlinePositions } = _m25;
2999
3064
 
3000
3065
  const maximumHyperlinks = 65530;
3001
3066
  function checkHyperlinkCount(count) {
@@ -3127,6 +3192,8 @@ class Worksheet {
3127
3192
  throw new TypeError("Row and style callbacks must be functions.");
3128
3193
  if (options.maxOutlineLevel !== undefined && (!Number.isInteger(options.maxOutlineLevel) || options.maxOutlineLevel < 0 || options.maxOutlineLevel > 7))
3129
3194
  throw new RangeError("Maximum outline level must be an integer from zero through seven.");
3195
+ validateOutlinePositions(options);
3196
+ captureColumnOutlines(options.columnOutlines, columns.length);
3130
3197
  if (options.rowOutline && options.maxOutlineLevel === undefined)
3131
3198
  throw new TypeError("A row outline callback requires maxOutlineLevel before streamed rows are written.");
3132
3199
  if (!options.rowOutline && options.maxOutlineLevel !== undefined)
@@ -3411,17 +3478,22 @@ class Worksheet {
3411
3478
  const buffer = this.buffer = new ChunkedTextSink(this.entry, this.book.settings.signal), opts = this.options;
3412
3479
  const x = opts.freezeColumns ?? 0, y = opts.freezeHeader ? this.headerRows : 0;
3413
3480
  const pane = x && y ? "bottomRight" : x ? "topRight" : "bottomLeft", cell = columnName(x + 1) + (y + 1);
3481
+ const outlines = columnOutlineMap(opts.columnOutlines), hasOutline = !!opts.rowOutline || outlines.size > 0;
3482
+ const maxColumnLevel = Math.max(0, ...Array.from(outlines.values(), value => value.level ?? 0));
3414
3483
  await buffer.write(xmlDeclaration + '<worksheet xmlns="' + spreadsheetNamespace + '" xmlns:r="' + officeRelationshipsNamespace + '">' +
3415
- (opts.print || opts.rowOutline ? '<sheetPr>' + (opts.rowOutline ? '<outlinePr summaryBelow="1" showOutlineSymbols="1"/>' : "") + (opts.print ? '<pageSetUpPr fitToPage="1"/>' : "") + '</sheetPr>' : "") + '<sheetViews><sheetView workbookViewId="0">' +
3484
+ (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">' +
3416
3485
  (x || y ? '<pane' + (x ? ' xSplit="' + x + '"' : "") + (y ? ' ySplit="' + y + '"' : "") + ' topLeftCell="' + cell + '" activePane="' + pane + '" state="frozen"/><selection pane="' + pane + '" activeCell="' + cell + '" sqref="' + cell + '"/>' : "") + '</sheetView></sheetViews>' +
3417
- (opts.rowOutline ? '<sheetFormatPr defaultRowHeight="15" outlineLevelRow="' + opts.maxOutlineLevel + '"/>' : ""));
3486
+ (hasOutline ? '<sheetFormatPr defaultRowHeight="15"' + (opts.rowOutline ? ' outlineLevelRow="' + opts.maxOutlineLevel + '"' : "") + (outlines.size ? ' outlineLevelCol="' + maxColumnLevel + '"' : "") + '/>' : ""));
3418
3487
  const defaultWidth = opts.defaultColumnWidth ?? (this.table ? 20 : undefined);
3419
- if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined)) {
3488
+ if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined || outlines.has(i))) {
3420
3489
  await buffer.write('<cols>');
3421
3490
  for (let i = 0; i < this.columns.length; i++) {
3422
- const width = this.layout.widths[i] ?? defaultWidth;
3423
- if (width !== undefined)
3424
- await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '" width="' + width + '" customWidth="1"/>');
3491
+ const width = this.layout.widths[i] ?? defaultWidth, outline = outlines.get(i);
3492
+ if (width !== undefined || outline)
3493
+ await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '"' +
3494
+ (width === undefined ? "" : ' width="' + width + '" customWidth="1"') +
3495
+ (outline?.level ? ' outlineLevel="' + outline.level + '"' : "") + (outline?.hidden ? ' hidden="1"' : "") +
3496
+ (outline?.collapsed ? ' collapsed="1"' : "") + '/>');
3425
3497
  }
3426
3498
  await buffer.write('</cols>');
3427
3499
  }
@@ -3682,7 +3754,7 @@ const _exports = Object.freeze({ Worksheet: Worksheet });
3682
3754
  return _exports;
3683
3755
  })();
3684
3756
 
3685
- const _m37 = (() => {
3757
+ const _m38 = (() => {
3686
3758
  const { escapeOoxmlAttribute, escapeXml, xmlDeclaration } = _m11;
3687
3759
 
3688
3760
  const { cellText, columnName } = _m19;
@@ -3693,7 +3765,7 @@ const { ExportCell } = _m20;
3693
3765
 
3694
3766
  const { Cell } = _m19;
3695
3767
 
3696
- const { totalFormula } = _m29;
3768
+ const { totalFormula } = _m30;
3697
3769
 
3698
3770
  function defineTable(id, options, columns, policy) {
3699
3771
  const name = options.name ?? "Table" + id;
@@ -3728,7 +3800,7 @@ const _exports = Object.freeze({ defineTable: defineTable, tableXml: tableXml })
3728
3800
  return _exports;
3729
3801
  })();
3730
3802
 
3731
- const _m38 = (() => {
3803
+ const _m39 = (() => {
3732
3804
  const { OfficeIMOError } = _m3;
3733
3805
 
3734
3806
  const { cleanXml } = _m11;
@@ -3795,13 +3867,13 @@ const _exports = Object.freeze({ TextOverflow: TextOverflow, clipText: clipText
3795
3867
  return _exports;
3796
3868
  })();
3797
3869
 
3798
- const _m39 = (() => {
3870
+ const _m40 = (() => {
3799
3871
  const { captureFields } = _m7;
3800
3872
 
3801
3873
  /** @internal The workbook owner captures these settings before validation or adapter merging. */
3802
3874
  const workbookOptionFields = ["signal", "onProgress", "limits", "sink", "dateMode", "compression", "invalidCharacterPolicy", "appProperties", "cellValueWriters", "oversizedText", "creator", "title", "subject", "description", "created", "modified"];
3803
3875
  /** @internal Worksheet settings also used by the portable sheet owner. */
3804
- 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"];
3876
+ 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"];
3805
3877
  /** @internal Includes inherited format-specific ceilings before a wrapper combines stream settings. */
3806
3878
  const workbookLimitFields = ["maxRows", "maxCells", "maxTextCharacters", "maxOutputBytes", "maxStyles", "maxSheets", "maxOverflowCharacters", "maxHyperlinks", "maxImageBytes", "maxBufferedCells", "maxBufferedCharacters", "maxMergedRanges", "maxConditionalFormats", "maxDifferentialStyles", "maxCharts", "maxChartPoints", "maxChartTextCharacters", "maxFormulaCharacters", "maxDataValidations", "maxValidationTextCharacters"];
3807
3879
  /** @internal Capture the workbook's known ceilings without dropping supported prototype fields. */
@@ -3817,7 +3889,7 @@ const _exports = Object.freeze({ workbookOptionFields: workbookOptionFields, she
3817
3889
  return _exports;
3818
3890
  })();
3819
3891
 
3820
- const _m41 = (() => {
3892
+ const _m42 = (() => {
3821
3893
  const { checkAbort } = _m2;
3822
3894
 
3823
3895
  const { NotSupportedError, OfficeIMOError } = _m3;
@@ -3948,18 +4020,18 @@ const _exports = Object.freeze({ captureChartRange: captureChartRange, prepareCh
3948
4020
  return _exports;
3949
4021
  })();
3950
4022
 
3951
- const _m40 = (() => {
4023
+ const _m41 = (() => {
3952
4024
  const { checkAbort } = _m2;
3953
4025
 
3954
4026
  const { NotSupportedError, OfficeIMOError } = _m3;
3955
4027
 
3956
4028
  const { cleanXml } = _m11;
3957
4029
 
3958
- const { copyDrawingAnchor } = _m27;
4030
+ const { copyDrawingAnchor } = _m28;
3959
4031
 
3960
4032
  const { captureFields } = _m7;
3961
4033
 
3962
- const { captureChartRange, prepareChartBinding } = _m41;
4034
+ const { captureChartRange, prepareChartBinding } = _m42;
3963
4035
 
3964
4036
  function fields(value, allowed, context) {
3965
4037
  if (!value || typeof value !== "object" || Array.isArray(value))
@@ -4141,25 +4213,27 @@ const { copyColumns } = _m24;
4141
4213
 
4142
4214
  const { captureFields } = _m7;
4143
4215
 
4144
- const { captureTableSpans } = _m25;
4216
+ const { captureColumnOutlines } = _m25;
4217
+
4218
+ const { captureTableSpans } = _m26;
4145
4219
 
4146
4220
  const { assertExportValue } = _m20;
4147
4221
 
4148
- const { Worksheet } = _m26;
4222
+ const { Worksheet } = _m27;
4149
4223
 
4150
- const { defineTable, tableXml } = _m37;
4224
+ const { defineTable, tableXml } = _m38;
4151
4225
 
4152
- const { copyHyperlink, drawingXml, drawingContentType } = _m27;
4226
+ const { copyHyperlink, drawingXml, drawingContentType } = _m28;
4153
4227
 
4154
- const { TextOverflow } = _m38;
4228
+ const { TextOverflow } = _m39;
4155
4229
 
4156
- const { captureWorkbookOptions, sheetOptionFields } = _m39;
4230
+ const { captureWorkbookOptions, sheetOptionFields } = _m40;
4157
4231
 
4158
- const { prepareChart } = _m40;
4232
+ const { prepareChart } = _m41;
4159
4233
 
4160
- const { qualifiedColumnRange, resolveDataColumn } = _m34;
4234
+ const { qualifiedColumnRange, resolveDataColumn } = _m35;
4161
4235
 
4162
- const { chartContentType, writeChartXml } = _m28;
4236
+ const { chartContentType, writeChartXml } = _m29;
4163
4237
 
4164
4238
  const xlsxMime = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
4165
4239
  const formatType = (name) => "application/vnd.openxmlformats-officedocument.spreadsheetml." + name + "+xml";
@@ -4170,6 +4244,7 @@ function captureSheet(options, policy) {
4170
4244
  const footer = captured.footer && captureFields(captured.footer, ["rows", "values", "totals", "style"]);
4171
4245
  const print = captured.print && captureFields(captured.print, ["paper", "orientation", "fitToWidth", "fitToHeight", "repeatHeaders", "margins", "header", "footer"]);
4172
4246
  return { ...captured, columns,
4247
+ ...(captured.columnOutlines === undefined ? {} : { columnOutlines: captureColumnOutlines(captured.columnOutlines, columns.length) }),
4173
4248
  ...(captured.headerRows === undefined ? {} : { headerRows: captureTableSpans(captured.headerRows, columns.length) }),
4174
4249
  ...(footer ? { footer: { ...footer,
4175
4250
  ...(footer.rows === undefined ? {} : { rows: captureTableSpans(footer.rows, columns.length) }),
@@ -4599,10 +4674,10 @@ const _exports = Object.freeze({ Workbook: Workbook });
4599
4674
  return _exports;
4600
4675
  })();
4601
4676
 
4602
- const _m43 = (() => {
4677
+ const _m44 = (() => {
4603
4678
  const { ExportCell, assertScalar } = _m20;
4604
4679
 
4605
- const { captureWorkbookOptions, sheetOptionFields } = _m39;
4680
+ const { captureWorkbookOptions, sheetOptionFields } = _m40;
4606
4681
 
4607
4682
  const { captureFields } = _m7;
4608
4683
 
@@ -4651,18 +4726,18 @@ const _exports = Object.freeze({ portableSheet: portableSheet, portableWorkbook:
4651
4726
  return _exports;
4652
4727
  })();
4653
4728
 
4654
- const _m42 = (() => {
4729
+ const _m43 = (() => {
4655
4730
  const { withDestination } = _m5;
4656
4731
 
4657
4732
  const { copyColumns } = _m24;
4658
4733
 
4659
4734
  const { Workbook } = _m1;
4660
4735
 
4661
- const { portableSheet, portableWorkbook } = _m43;
4736
+ const { portableSheet, portableWorkbook } = _m44;
4662
4737
 
4663
4738
  const { captureFields } = _m7;
4664
4739
 
4665
- const { sheetOptionFields, workbookOptionFields } = _m39;
4740
+ const { sheetOptionFields, workbookOptionFields } = _m40;
4666
4741
 
4667
4742
  function prepare(options) {
4668
4743
  options = captureFields(options, [...workbookOptionFields, "columns", "sheet"]);
@@ -4709,7 +4784,7 @@ const _exports = Object.freeze({ writeXlsx: writeXlsx, writeXlsxTo: writeXlsxTo
4709
4784
  return _exports;
4710
4785
  })();
4711
4786
 
4712
- const _m45 = (() => {
4787
+ const _m46 = (() => {
4713
4788
  const { ExportCell, assertScalar } = _m20;
4714
4789
 
4715
4790
  const { isDate } = _m12;
@@ -4722,7 +4797,7 @@ const { OfficeIMOError } = _m3;
4722
4797
 
4723
4798
  const { copyColumns, createRowProjector } = _m24;
4724
4799
 
4725
- const { createTotals } = _m31;
4800
+ const { createTotals } = _m32;
4726
4801
 
4727
4802
  const { copyExportValue } = _m23;
4728
4803
 
@@ -4974,8 +5049,8 @@ const _exports = Object.freeze({ assertGroupedReportSource: assertGroupedReportS
4974
5049
  return _exports;
4975
5050
  })();
4976
5051
 
4977
- const _m46 = (() => {
4978
- const { assertGroupedReportSource } = _m45;
5052
+ const _m47 = (() => {
5053
+ const { assertGroupedReportSource } = _m46;
4979
5054
 
4980
5055
  const { captureFields } = _m7;
4981
5056
 
@@ -4983,11 +5058,11 @@ const { OfficeIMOError } = _m3;
4983
5058
 
4984
5059
  const { fields } = _m18;
4985
5060
 
4986
- const { sheetOptionFields } = _m39;
5061
+ const { sheetOptionFields } = _m40;
4987
5062
 
4988
- const { portableSheet } = _m43;
5063
+ const { portableSheet } = _m44;
4989
5064
 
4990
- const { resolveDataColumn } = _m34;
5065
+ const { resolveDataColumn } = _m35;
4991
5066
 
4992
5067
  const { copyStylePatch } = _m16;
4993
5068
 
@@ -5066,8 +5141,8 @@ const _exports = Object.freeze({ groupedOptionFields: groupedOptionFields, prepa
5066
5141
  return _exports;
5067
5142
  })();
5068
5143
 
5069
- const _m44 = (() => {
5070
- const { groupedReportOperation } = _m45;
5144
+ const _m45 = (() => {
5145
+ const { groupedReportOperation } = _m46;
5071
5146
 
5072
5147
  const { checkAbort, withAbort } = _m2;
5073
5148
 
@@ -5081,11 +5156,11 @@ const { FormulaCell } = _m22;
5081
5156
 
5082
5157
  const { columnName } = _m19;
5083
5158
 
5084
- const { captureWorkbookLimits, workbookOptionFields } = _m39;
5159
+ const { captureWorkbookLimits, workbookOptionFields } = _m40;
5085
5160
 
5086
- const { retainDataRowRanges } = _m35;
5161
+ const { retainDataRowRanges } = _m36;
5087
5162
 
5088
- const { groupedOptionFields, prepareGroupedSheet } = _m46;
5163
+ const { groupedOptionFields, prepareGroupedSheet } = _m47;
5089
5164
 
5090
5165
  const subtotalOperations = { average: 1, count: 2, max: 4, min: 5, sum: 9 };
5091
5166
  function label(value) {
@@ -5242,7 +5317,7 @@ const _exports = Object.freeze({ addGroupedXlsx: addGroupedXlsx, writeGroupedXls
5242
5317
  return _exports;
5243
5318
  })();
5244
5319
 
5245
- const _m47 = (() => {
5320
+ const _m48 = (() => {
5246
5321
 
5247
5322
 
5248
5323
 
@@ -5286,13 +5361,13 @@ function saveBlob(blob, fileName) {
5286
5361
  setTimeout(() => URL.revokeObjectURL(url), 30000);
5287
5362
  }
5288
5363
  }
5289
- const _exports = Object.freeze({ OfficeIMOError: _m3.OfficeIMOError, NotSupportedError: _m3.NotSupportedError, BlobByteSink: _m5.BlobByteSink, ChunkedTextSink: _m5.ChunkedTextSink, writeBytes: _m5.writeBytes, ExportCell: _m20.ExportCell, createGroupedReport: _m45.createGroupedReport, checkAbort: _m2.checkAbort, withAbort: _m2.withAbort, inputRows: _m2.inputRows, pause: _m2.pause, detectFeatures: detectFeatures, saveBlob: saveBlob });
5364
+ const _exports = Object.freeze({ OfficeIMOError: _m3.OfficeIMOError, NotSupportedError: _m3.NotSupportedError, BlobByteSink: _m5.BlobByteSink, ChunkedTextSink: _m5.ChunkedTextSink, writeBytes: _m5.writeBytes, ExportCell: _m20.ExportCell, createGroupedReport: _m46.createGroupedReport, checkAbort: _m2.checkAbort, withAbort: _m2.withAbort, inputRows: _m2.inputRows, pause: _m2.pause, detectFeatures: detectFeatures, saveBlob: saveBlob });
5290
5365
  return _exports;
5291
5366
  })();
5292
5367
 
5293
5368
  const _m0 = (() => {
5294
5369
 
5295
- const _exports = Object.freeze({ Workbook: _m1.Workbook, writeXlsx: _m42.writeXlsx, writeXlsxTo: _m42.writeXlsxTo, writeGroupedXlsx: _m44.writeGroupedXlsx, writeGroupedXlsxTo: _m44.writeGroupedXlsxTo, addGroupedXlsx: _m44.addGroupedXlsx, createGroupedReport: _m45.createGroupedReport, Worksheet: _m26.Worksheet, Cell: _m19.Cell, FormulaCell: _m22.FormulaCell, StyleRegistry: _m16.StyleRegistry, NumberFormats: _m16.NumberFormats, saveBlob: _m47.saveBlob, ExportCell: _m20.ExportCell });
5370
+ const _exports = Object.freeze({ Workbook: _m1.Workbook, writeXlsx: _m43.writeXlsx, writeXlsxTo: _m43.writeXlsxTo, writeGroupedXlsx: _m45.writeGroupedXlsx, writeGroupedXlsxTo: _m45.writeGroupedXlsxTo, addGroupedXlsx: _m45.addGroupedXlsx, createGroupedReport: _m46.createGroupedReport, Worksheet: _m27.Worksheet, Cell: _m19.Cell, FormulaCell: _m22.FormulaCell, StyleRegistry: _m16.StyleRegistry, NumberFormats: _m16.NumberFormats, saveBlob: _m48.saveBlob, ExportCell: _m20.ExportCell });
5296
5371
  return _exports;
5297
5372
  })();
5298
5373
  const { Workbook, writeXlsx, writeXlsxTo, writeGroupedXlsx, writeGroupedXlsxTo, addGroupedXlsx, createGroupedReport, Worksheet, Cell, FormulaCell, StyleRegistry, NumberFormats, saveBlob, ExportCell } = _m0;