@silurus/ooxml 0.85.3 → 0.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +39 -7
  2. package/dist/assets/render-worker-BCGnuBLj.js +10 -0
  3. package/dist/assets/render-worker-CB4DxjXg.js +31 -0
  4. package/dist/assets/render-worker-CHW0F0n6.js +11 -0
  5. package/dist/{bounded-raw-part-cache-C6ro6Ezf.js → bounded-raw-part-cache-DVx3Camo.js} +12 -10
  6. package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-B3A7KLLi.js} +1 -1
  7. package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
  8. package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
  9. package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-ssI6IE39.js} +4 -4
  10. package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
  11. package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
  12. package/dist/{document-pull-client-F3ox_VXK.js → document-pull-client-xZrA2IjM.js} +577 -576
  13. package/dist/{docx-BYvm3TWw.js → docx-DzDiGvqe.js} +63 -63
  14. package/dist/docx.mjs +5 -5
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-DK1JLkrz.js} +2 -2
  17. package/dist/{line-metrics-BGtFM-ec.js → hyperlink-enyPbflR.js} +847 -877
  18. package/dist/index.mjs +3 -3
  19. package/dist/line-distribute-BFB575d6.js +1023 -0
  20. package/dist/line-metrics-CBbw80Ko.js +60 -0
  21. package/dist/node.mjs +91 -91
  22. package/dist/{pptx-BqpVTP8p.js → pptx-D_U62nl-.js} +71 -71
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/{render-DeZpRCfx.js → render-DSn0d35X.js} +1 -1
  26. package/dist/{render-worker-host-CBcQXsR5.js → render-worker-host-BHz9vjxB.js} +1 -1
  27. package/dist/{render-worker-host-BKtXmlEF.js → render-worker-host-CO0UYoQh.js} +1 -1
  28. package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-CbYDBg7U.js} +1 -1
  29. package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-Do07ZRcR.js} +7 -7
  30. package/dist/{session-n2p5_jxV.js → session-C1GYhr6n.js} +77 -77
  31. package/dist/{slide-pull-client-Dwek7xW8.js → slide-pull-client-DuEaUxPw.js} +732 -732
  32. package/dist/types/chart-ex.d.ts +2 -2
  33. package/dist/types/docx.d.ts +10 -10
  34. package/dist/types/index.d.ts +38 -18
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +6 -5
  37. package/dist/types/pptx.d.ts +10 -10
  38. package/dist/types/region-map.d.ts +2 -2
  39. package/dist/types/three-d.d.ts +2 -2
  40. package/dist/types/tiff.d.ts +1 -1
  41. package/dist/types/xlsx.d.ts +34 -14
  42. package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-eDiHHEG2.js} +99 -96
  43. package/dist/{xlsx-DSU6pV1O.js → xlsx-CMHmYTHP.js} +1629 -1469
  44. package/dist/xlsx.mjs +5 -5
  45. package/dist/xlsx_parser_bg.wasm +0 -0
  46. package/package.json +1 -1
  47. package/dist/assets/render-worker-D1O73gYW.js +0 -10
  48. package/dist/assets/render-worker-DHP0rgcW.js +0 -24
  49. package/dist/assets/render-worker-V2wWYA4O.js +0 -11
  50. package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
  51. package/dist/line-distribute-BsV4MVZ2.js +0 -1023
  52. /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-Dhdplprg.js} +0 -0
  53. /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
  54. /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
  55. /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
  56. /package/dist/{source-key-BkBB3X82.js → source-key-Ktb1GRE5.js} +0 -0
@@ -1,4 +1,4 @@
1
- //#region dist/.types-work/chart-CX4ml5hj.d.ts
1
+ //#region dist/.types-work/chart-DyZ-c18j.d.ts
2
2
  type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
3
3
  interface ImageResourceOptions {
4
4
  decodedByteBudget?: number;
@@ -1060,12 +1060,12 @@ interface ChartRect {
1060
1060
  h: number;
1061
1061
  }
1062
1062
  //#endregion
1063
- //#region dist/.types-work/chart-ex-contract-D-MROxI4.d.ts
1063
+ //#region dist/.types-work/chart-ex-contract-CdrCTgpH.d.ts
1064
1064
  interface ChartExRenderer {
1065
1065
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
1066
1066
  }
1067
1067
  //#endregion
1068
- //#region dist/.types-work/mathjax-emiLk9eb.d.ts
1068
+ //#region dist/.types-work/mathjax-Bh8Yow_s.d.ts
1069
1069
  interface MathSvg {
1070
1070
  svg: string;
1071
1071
  widthEm: number;
@@ -1077,17 +1077,17 @@ interface MathRenderer {
1077
1077
  mathMLToSvg(mathml: string): Promise<MathSvg>;
1078
1078
  }
1079
1079
  //#endregion
1080
- //#region dist/.types-work/three-d-contract-2IUr35q1.d.ts
1080
+ //#region dist/.types-work/three-d-contract-DVjawIXV.d.ts
1081
1081
  interface ChartThreeDRenderer {
1082
1082
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
1083
1083
  }
1084
1084
  //#endregion
1085
- //#region dist/.types-work/region-map-contract-CtuTzdmN.d.ts
1085
+ //#region dist/.types-work/region-map-contract-v0ic4OTv.d.ts
1086
1086
  interface ChartRegionMapRenderer {
1087
1087
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
1088
1088
  }
1089
1089
  //#endregion
1090
- //#region dist/.types-work/tiff-contract-DJ3gpIhe.d.ts
1090
+ //#region dist/.types-work/tiff-contract-CwDLah_7.d.ts
1091
1091
  interface TiffRenderOptions {
1092
1092
  targetWidthPx?: number;
1093
1093
  targetHeightPx?: number;
@@ -1102,7 +1102,7 @@ interface TiffRenderer {
1102
1102
  render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
1103
1103
  }
1104
1104
  //#endregion
1105
- //#region dist/.types-work/hyperlink-92bQUogu.d.ts
1105
+ //#region dist/.types-work/hyperlink-0jvpW8AM.d.ts
1106
1106
  type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
1107
1107
  type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
1108
1108
  declare class OoxmlError extends Error {
@@ -1209,7 +1209,7 @@ type HyperlinkTarget = {
1209
1209
  };
1210
1210
  declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
1211
1211
  //#endregion
1212
- //#region dist/.types-work/find-highlight-CEEVmKfp.d.ts
1212
+ //#region dist/.types-work/find-highlight-DrynDP6K.d.ts
1213
1213
  interface ViewerContextMenuEvent<TContext> {
1214
1214
  readonly originalEvent: MouseEvent;
1215
1215
  getContext(): Promise<TContext | null>;
@@ -1253,7 +1253,7 @@ interface FindHighlightColors {
1253
1253
  active?: string;
1254
1254
  }
1255
1255
  //#endregion
1256
- //#region dist/.types-work/types-BzjMGMnI.d.ts
1256
+ //#region dist/.types-work/types-B0AE_k3g.d.ts
1257
1257
  type ShapeFill = Exclude<Fill, {
1258
1258
  fillType: 'image';
1259
1259
  } | {
@@ -1281,6 +1281,7 @@ interface MergeCell {
1281
1281
  interface Worksheet {
1282
1282
  name: string;
1283
1283
  isChartSheet?: boolean;
1284
+ isDialogSheet?: boolean;
1284
1285
  rows: Row[];
1285
1286
  colWidths: Record<number, number>;
1286
1287
  colWidthRanges?: Array<{
@@ -2007,7 +2008,7 @@ interface XlsxRenderViewportOptions {
2007
2008
  } | null;
2008
2009
  }
2009
2010
  //#endregion
2010
- //#region dist/.types-work/xlsx-Bryt4758.d.ts
2011
+ //#region dist/.types-work/xlsx-BGOMFAqN.d.ts
2011
2012
  type ResolvedList = {
2012
2013
  kind: 'values';
2013
2014
  values: string[];
@@ -2015,6 +2016,19 @@ type ResolvedList = {
2015
2016
  kind: 'formula';
2016
2017
  formula: string;
2017
2018
  };
2019
+ type XlsxSheetLoadOptions = Readonly<{
2020
+ format?: 'xlsx';
2021
+ }> | Readonly<{
2022
+ format: 'csv' | 'tsv';
2023
+ delimiter?: string;
2024
+ encoding?: string;
2025
+ sheetName?: string;
2026
+ }> | Readonly<{
2027
+ format: 'delimited-text';
2028
+ delimiter: string;
2029
+ encoding?: string;
2030
+ sheetName?: string;
2031
+ }>;
2018
2032
  type RenderViewportToBitmapOptions = Omit<XlsxRenderViewportOptions, 'onTextRun'> & {
2019
2033
  width: number;
2020
2034
  height: number;
@@ -2024,8 +2038,8 @@ interface LoadOptions extends LoadOptions$1 {
2024
2038
  }
2025
2039
  declare class XlsxWorkbook {
2026
2040
  private metrics;
2027
- private worker;
2028
2041
  private bridge;
2042
+ private delimitedTextBacked;
2029
2043
  private parsedWorkbook;
2030
2044
  private sheetCache;
2031
2045
  private sheetLoads;
@@ -2050,8 +2064,10 @@ declare class XlsxWorkbook {
2050
2064
  private resourceFailure;
2051
2065
  private constructor();
2052
2066
  get mode(): 'main' | 'worker';
2067
+ private static loadDelimitedText;
2053
2068
  static load(source: string | ArrayBuffer, opts?: LoadOptions): Promise<XlsxWorkbook>;
2054
2069
  private _load;
2070
+ private _loadDelimitedText;
2055
2071
  private retainFontsInSet;
2056
2072
  get sheetNames(): string[];
2057
2073
  get sheetCount(): number;
@@ -2076,6 +2092,8 @@ declare class XlsxWorkbook {
2076
2092
  private withWorksheetArchiveOperation;
2077
2093
  destroy(): void;
2078
2094
  private assertResourceHealthy;
2095
+ private requireBridge;
2096
+ private requireArchiveBridge;
2079
2097
  }
2080
2098
  type CanvasViewerRenderMode = 'main' | 'worker';
2081
2099
  interface CellAddress {
@@ -2171,6 +2189,7 @@ interface XlsxMatchLocation {
2171
2189
  col: number;
2172
2190
  }
2173
2191
  interface XlsxCommentsOptions extends ViewerCommentsOptions {}
2192
+ declare const loadXlsxViewerSource: unique symbol;
2174
2193
  type HiddenSheetMode = 'show' | 'skip' | 'dim';
2175
2194
  interface XlsxSheetViewerOptions extends LoadOptions {
2176
2195
  imageResources?: ImageResourceOptions;
@@ -2341,7 +2360,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
2341
2360
  private refreshChromeTheme;
2342
2361
  private installChromeThemeRefresh;
2343
2362
  private _collectSheetCells;
2344
- load(source: string | ArrayBuffer): Promise<void>;
2363
+ [loadXlsxViewerSource](source: string | ArrayBuffer, sourceOptions?: XlsxSheetLoadOptions): Promise<void>;
2345
2364
  private activateWorkbook;
2346
2365
  private ensureHostFonts;
2347
2366
  private releaseHostFonts;
@@ -2493,6 +2512,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
2493
2512
  declare class XlsxViewer extends XlsxViewerEngine {
2494
2513
  static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions>): Omit<XlsxViewer, 'load'>;
2495
2514
  constructor(container: HTMLElement, opts?: XlsxViewerOptions);
2515
+ load(source: string | ArrayBuffer): Promise<void>;
2496
2516
  }
2497
2517
  declare class XlsxSheetViewer implements ZoomableViewer {
2498
2518
  readonly canvasElement: HTMLCanvasElement;
@@ -2503,7 +2523,7 @@ declare class XlsxSheetViewer implements ZoomableViewer {
2503
2523
  private lastMetrics;
2504
2524
  static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions>): Omit<XlsxSheetViewer, 'load'>;
2505
2525
  constructor(canvasElement: HTMLCanvasElement, options?: XlsxSheetViewerOptions);
2506
- load(source: string | ArrayBuffer): Promise<void>;
2526
+ load(source: string | ArrayBuffer, options?: XlsxSheetLoadOptions): Promise<void>;
2507
2527
  get sheetIndex(): number;
2508
2528
  get sheetCount(): number;
2509
2529
  get sheetNames(): string[];
@@ -2544,4 +2564,4 @@ declare class XlsxSheetViewer implements ZoomableViewer {
2544
2564
  }
2545
2565
  declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
2546
2566
  //#endregion
2547
- export { type ArrowEnd, type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type ConditionalFormat, type DataValidation, type DecodedImageBudgetStrategy, type DefinedName, type DrawingMLCustomDashSegment, type Duotone, type Dxf, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFill, type GradientFillSpec, type GradientStop, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type ImageFill, type ImageResourceOptions, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NoFill, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PatternFill, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeFill, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SolidFill, type SpaceLine, type Sparkline, type SparklineGroup, type SrcRect, type Styles, type TableColumnInfo, type TableInfo, TiffDecodeError, type TiffRenderOptions, type TiffRenderer, type TileInfo, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxCellViewportRect, type XlsxComment, type XlsxCommentReply, type XlsxCommentsOptions, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, resolveSharedStrings };
2567
+ export { type ArrowEnd, type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type ConditionalFormat, type DataValidation, type DecodedImageBudgetStrategy, type DefinedName, type DrawingMLCustomDashSegment, type Duotone, type Dxf, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFill, type GradientFillSpec, type GradientStop, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type ImageFill, type ImageResourceOptions, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NoFill, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PatternFill, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeFill, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SolidFill, type SpaceLine, type Sparkline, type SparklineGroup, type SrcRect, type Styles, type TableColumnInfo, type TableInfo, TiffDecodeError, type TiffRenderOptions, type TiffRenderer, type TileInfo, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxCellViewportRect, type XlsxComment, type XlsxCommentReply, type XlsxCommentsOptions, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, type XlsxSheetLoadOptions, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, resolveSharedStrings };
@@ -1,8 +1,8 @@
1
- import { $t as e, F as t, I as n, K as r, N as i, P as a, U as o, an as s, cn as c, en as l, in as u, nn as d, on as f, rn as p, tn as m } from "./line-metrics-BGtFM-ec.js";
2
- import { n as h, r as g, t as _ } from "./resource-measurement-D41R-0Bl.js";
1
+ import { $t as e, M as t, N as n, P as r, Qt as i, V as a, W as o, an as s, en as c, in as l, j as u, nn as d, rn as f, sn as p, tn as m } from "./hyperlink-enyPbflR.js";
2
+ import { n as h, r as g, t as _ } from "./resource-measurement-Do07ZRcR.js";
3
3
  import { t as v } from "./transfer-mIj7E7NB.js";
4
4
  //#region packages/xlsx/src/worksheet-resource-limits.ts
5
- var y = f, b = p, x = u, S = s, C = d, w = e, T = l, E = m, D = Object.freeze({
5
+ var y = s, b = d, x = f, S = l, C = m, w = i, T = e, E = c, D = Object.freeze({
6
6
  archiveEntryCount: 0,
7
7
  declaredInflatedBytes: 0,
8
8
  distinctInflatedBytes: 0,
@@ -19,21 +19,24 @@ function O(e) {
19
19
  }, e), 0)
20
20
  };
21
21
  }
22
- function k(e, t) {
22
+ function k(e) {
23
+ return A(e, O(e.rows));
24
+ }
25
+ function A(e, t) {
23
26
  let n = h(e, Math.max(x, S));
24
27
  return {
25
28
  ...t,
26
29
  jsonBytes: n.jsonBytes
27
30
  };
28
31
  }
29
- function A(e, t) {
32
+ function j(e, t) {
30
33
  return {
31
34
  rows: _(e.rows, t.rows, y),
32
35
  cells: _(e.cells, t.cells, b),
33
36
  ownedUtf8Bytes: _(e.ownedUtf8Bytes, t.ownedUtf8Bytes, x)
34
37
  };
35
38
  }
36
- function j(e, t, n = {}) {
39
+ function M(e, t, n = {}) {
37
40
  let r = e.rows - (n.rows ?? 0), i = e.cells - (n.cells ?? 0), a = e.ownedUtf8Bytes - (n.ownedUtf8Bytes ?? 0), o = e.jsonBytes - (n.jsonBytes ?? 0);
38
41
  if (r < 0 || i < 0 || a < 0 || o < 0) throw Error("worksheet cache accounting underflow");
39
42
  return {
@@ -43,9 +46,9 @@ function j(e, t, n = {}) {
43
46
  jsonBytes: _(o, t.jsonBytes, E)
44
47
  };
45
48
  }
46
- function M(e, t, n, r, i, a, o) {
49
+ function N(e, t, n, r, i, a, o) {
47
50
  let s = n === "worksheet-json" ? "serialization" : "parsing";
48
- return new c(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
51
+ return new p(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
49
52
  stage: s,
50
53
  violation: {
51
54
  format: "xlsx",
@@ -60,7 +63,7 @@ function M(e, t, n, r, i, a, o) {
60
63
  }
61
64
  });
62
65
  }
63
- function N(e, t, n, r) {
66
+ function P(e, t, n, r) {
64
67
  let i = [
65
68
  [
66
69
  "rows",
@@ -78,23 +81,23 @@ function N(e, t, n, r) {
78
81
  x
79
82
  ]
80
83
  ];
81
- for (let [e, a, o] of i) if (a > o) throw M(t, n, e === "owned-utf8-bytes" ? "worksheet-cell-content" : "worksheet-model", e, o, a, r);
82
- }
83
- function P(e, t, n, r) {
84
- if (e > S) throw M(t, n, "worksheet-json", "bytes", S, e, r);
84
+ for (let [e, a, o] of i) if (a > o) throw N(t, n, e === "owned-utf8-bytes" ? "worksheet-cell-content" : "worksheet-model", e, o, a, r);
85
85
  }
86
86
  function F(e, t, n, r) {
87
- if (e.rows > C) throw M(t, n, "worksheet-cache", "rows", C, e.rows, r);
88
- if (e.cells > w) throw M(t, n, "worksheet-cache", "cells", w, e.cells, r);
89
- if (e.ownedUtf8Bytes > T) throw M(t, n, "worksheet-cache", "owned-utf8-bytes", T, e.ownedUtf8Bytes, r);
90
- if (e.jsonBytes > E) throw M(t, n, "worksheet-cache", "bytes", E, e.jsonBytes, r);
87
+ if (e > S) throw N(t, n, "worksheet-json", "bytes", S, e, r);
88
+ }
89
+ function I(e, t, n, r) {
90
+ if (e.rows > C) throw N(t, n, "worksheet-cache", "rows", C, e.rows, r);
91
+ if (e.cells > w) throw N(t, n, "worksheet-cache", "cells", w, e.cells, r);
92
+ if (e.ownedUtf8Bytes > T) throw N(t, n, "worksheet-cache", "owned-utf8-bytes", T, e.ownedUtf8Bytes, r);
93
+ if (e.jsonBytes > E) throw N(t, n, "worksheet-cache", "bytes", E, e.jsonBytes, r);
91
94
  }
92
95
  //#endregion
93
96
  //#region packages/xlsx/src/shared-strings.ts
94
- function I(e, t) {
95
- return L(e.rows, t), e;
96
- }
97
97
  function L(e, t) {
98
+ return R(e.rows, t), e;
99
+ }
100
+ function R(e, t) {
98
101
  for (let n of e) for (let e of n.cells) {
99
102
  let n = e.value;
100
103
  if (n.type === "shared") {
@@ -115,14 +118,14 @@ function L(e, t) {
115
118
  }
116
119
  //#endregion
117
120
  //#region packages/xlsx/src/worksheet-pull-codec.ts
118
- function R(e, t, n, r) {
121
+ function z(e, t, n, r) {
119
122
  let i = e instanceof ArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength), a = JSON.parse(new TextDecoder().decode(i));
120
123
  if (!a || typeof a != "object" || !("kind" in a)) throw Error("worksheet cursor returned an invalid unit");
121
124
  let o = a;
122
125
  if (t !== (o.kind === "finished")) throw Error("worksheet cursor terminal marker mismatch");
123
126
  if (o.kind === "rows") {
124
127
  if (!Array.isArray(o.rows)) throw Error("worksheet row unit is missing rows");
125
- return n && L(o.rows, n), r?.(o.rows), {
128
+ return n && R(o.rows, n), r?.(o.rows), {
126
129
  kind: "rows",
127
130
  rows: o.rows
128
131
  };
@@ -138,8 +141,8 @@ function R(e, t, n, r) {
138
141
  }
139
142
  //#endregion
140
143
  //#region packages/xlsx/src/worksheet-pull-worker.ts
141
- var z = 64 * 1024 * 1024, B = class {
142
- coordinator = new n();
144
+ var B = 64 * 1024 * 1024, V = class {
145
+ coordinator = new r();
143
146
  sessions = /* @__PURE__ */ new Map();
144
147
  operationTail = Promise.resolve();
145
148
  pendingOpens = /* @__PURE__ */ new Map();
@@ -159,7 +162,7 @@ var z = 64 * 1024 * 1024, B = class {
159
162
  get pendingOpenCount() {
160
163
  return this.pendingOpens.size;
161
164
  }
162
- async open(e, n, r) {
165
+ async open(e, t, r) {
163
166
  if (this.resourceFailure) throw this.resourceFailure;
164
167
  let i = this.pendingOpens.get(r.sessionId);
165
168
  if (!i || i.identity.operationId !== r.operationId || i.identity.generation !== r.generation) throw Error("worksheet pull session open reservation is stale or missing");
@@ -167,30 +170,30 @@ var z = 64 * 1024 * 1024, B = class {
167
170
  a = e;
168
171
  }), s = this.operationTail.then(() => this.coordinator.enqueue(async () => {
169
172
  if (i.canceled) throw Error("worksheet pull session open was canceled");
170
- this.executeArchive((t) => t.open_sheet_cursor(e, n));
173
+ this.executeArchive((n) => n.open_sheet_cursor(e, t));
171
174
  let o = [], s = {
172
175
  rows: 0,
173
176
  cells: 0,
174
177
  ownedUtf8Bytes: 0
175
- }, l, u = !1, d = new t({
178
+ }, c, l = !1, u = new n({
176
179
  ...r,
177
- maxByteCredit: z,
180
+ maxByteCredit: B,
178
181
  coordinator: this.coordinator,
179
182
  driver: {
180
183
  pull: () => {
181
184
  let e = this.executeArchive((e) => e.pull_sheet_cursor(128)), t = this.executeArchive((e) => e.sheet_cursor_pull_finished());
182
185
  if (this.acceptWorksheet) {
183
- let n = R(e, t, void 0, this.prepareRows);
186
+ let n = z(e, t, void 0, this.prepareRows);
184
187
  try {
185
188
  if (n.kind === "rows") {
186
- let e = A(s, O(n.rows));
187
- N(e, "get-worksheet-worker", void 0, this.readResourceUsage()), o.push(...n.rows), s = e;
188
- } else l = n.worksheet;
189
+ let e = j(s, O(n.rows));
190
+ P(e, "get-worksheet-worker", void 0, this.readResourceUsage()), o.push(...n.rows), s = e;
191
+ } else c = n.worksheet;
189
192
  } catch (e) {
190
- throw e instanceof c && (this.resourceFailure ??= e), e;
193
+ throw e instanceof p && (this.resourceFailure ??= e), e;
191
194
  }
192
195
  }
193
- u = t;
196
+ l = t;
194
197
  let n = v(e);
195
198
  return {
196
199
  payload: n,
@@ -201,26 +204,26 @@ var z = 64 * 1024 * 1024, B = class {
201
204
  },
202
205
  measureChunk: ({ payload: e }) => e.byteLength,
203
206
  acknowledge: () => {
204
- if (!u) return;
207
+ if (!l) return;
205
208
  let t, n;
206
209
  try {
207
210
  if (this.acceptWorksheet) {
208
- if (!l) throw Error("worksheet terminal payload is missing");
209
- l.rows = l.parseError ? [] : o;
210
- let r = l.parseError ? {
211
+ if (!c) throw Error("worksheet terminal payload is missing");
212
+ c.rows = c.parseError ? [] : o;
213
+ let r = c.parseError ? {
211
214
  rows: 0,
212
215
  cells: 0,
213
216
  ownedUtf8Bytes: 0
214
- } : s, i = k(l, r), a = this.readResourceUsage();
215
- N(i, "get-worksheet-worker", void 0, a), P(i.jsonBytes, "get-worksheet-worker", void 0, a);
216
- let c = this.acceptWorksheet(e, l, i, a);
217
- typeof c == "function" ? t = c : c && ({rollback: t, commit: n} = c);
217
+ } : s, i = A(c, r), a = this.readResourceUsage();
218
+ P(i, "get-worksheet-worker", void 0, a), F(i.jsonBytes, "get-worksheet-worker", void 0, a);
219
+ let l = this.acceptWorksheet(e, c, i, a);
220
+ typeof l == "function" ? t = l : l && ({rollback: t, commit: n} = l);
218
221
  }
219
222
  this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), n?.();
220
223
  } catch (e) {
221
- throw t?.(), e instanceof c && (this.resourceFailure ??= e), e;
224
+ throw t?.(), e instanceof p && (this.resourceFailure ??= e), e;
222
225
  }
223
- u = !1, this.sessions.delete(r.sessionId), a();
226
+ l = !1, this.sessions.delete(r.sessionId), a();
224
227
  },
225
228
  cancel: () => {
226
229
  try {
@@ -240,7 +243,7 @@ var z = 64 * 1024 * 1024, B = class {
240
243
  }
241
244
  });
242
245
  this.sessions.set(r.sessionId, {
243
- host: d,
246
+ host: u,
244
247
  identity: r
245
248
  }), this.pendingOpens.delete(r.sessionId);
246
249
  }));
@@ -261,14 +264,14 @@ var z = 64 * 1024 * 1024, B = class {
261
264
  } catch {}
262
265
  }
263
266
  }
264
- dispatch(e, t) {
265
- let n = this.sessions.get(e.sessionId);
266
- if (n) return n.host.dispatch(e, t);
267
+ dispatch(e, n) {
268
+ let r = this.sessions.get(e.sessionId);
269
+ if (r) return r.host.dispatch(e, n);
267
270
  let i = this.pendingOpens.get(e.sessionId);
268
271
  if (i && (e.kind === "cancel" || e.kind === "close")) {
269
- let n = i.identity.operationId === e.operationId && i.identity.generation === e.generation;
270
- return n && (i.canceled = !0), t(n ? {
271
- protocol: a,
272
+ let r = i.identity.operationId === e.operationId && i.identity.generation === e.generation;
273
+ return r && (i.canceled = !0), n(r ? {
274
+ protocol: t,
272
275
  kind: "accepted",
273
276
  sessionId: e.sessionId,
274
277
  operationId: e.operationId,
@@ -276,7 +279,7 @@ var z = 64 * 1024 * 1024, B = class {
276
279
  requestId: e.requestId,
277
280
  command: e.kind
278
281
  } : {
279
- protocol: a,
282
+ protocol: t,
280
283
  kind: "error",
281
284
  sessionId: e.sessionId,
282
285
  operationId: e.operationId,
@@ -289,37 +292,37 @@ var z = 64 * 1024 * 1024, B = class {
289
292
  }
290
293
  }), Promise.resolve();
291
294
  }
292
- return e.kind === "cancel" || e.kind === "close" ? (t({
293
- protocol: a,
295
+ return e.kind === "cancel" || e.kind === "close" ? (n({
296
+ protocol: t,
294
297
  kind: "accepted",
295
298
  sessionId: e.sessionId,
296
299
  operationId: e.operationId,
297
300
  generation: e.generation,
298
301
  requestId: e.requestId,
299
302
  command: e.kind
300
- }), Promise.resolve()) : (t({
301
- protocol: a,
303
+ }), Promise.resolve()) : (n({
304
+ protocol: t,
302
305
  kind: "error",
303
306
  sessionId: e.sessionId,
304
307
  operationId: e.operationId,
305
308
  generation: e.generation,
306
309
  requestId: e.requestId,
307
- error: r(/* @__PURE__ */ Error("worksheet pull session is not open"))
310
+ error: o(/* @__PURE__ */ Error("worksheet pull session is not open"))
308
311
  }), Promise.resolve());
309
312
  }
310
- async dispatchSafely(e, t) {
313
+ async dispatchSafely(e, n) {
311
314
  try {
312
- await this.dispatch(e, t);
313
- } catch (n) {
315
+ await this.dispatch(e, n);
316
+ } catch (r) {
314
317
  try {
315
- t({
316
- protocol: a,
318
+ n({
319
+ protocol: t,
317
320
  kind: "error",
318
321
  sessionId: e.sessionId,
319
322
  operationId: e.operationId,
320
323
  generation: e.generation,
321
324
  requestId: e.requestId,
322
- error: r(n)
325
+ error: o(r)
323
326
  });
324
327
  } catch {}
325
328
  }
@@ -329,17 +332,17 @@ var z = 64 * 1024 * 1024, B = class {
329
332
  if (this.resourceFailure) throw this.resourceFailure;
330
333
  return e();
331
334
  })).catch((e) => {
332
- throw e instanceof c && (this.resourceFailure ??= e), e;
335
+ throw e instanceof p && (this.resourceFailure ??= e), e;
333
336
  });
334
337
  return this.operationTail = t.then(() => void 0, () => void 0), t;
335
338
  }
336
339
  async reset() {
337
340
  for (let e of this.pendingOpens.values()) e.canceled = !0;
338
341
  let e = 1;
339
- for (let { host: t, identity: n } of [...this.sessions.values()]) await t.dispatch({
340
- protocol: a,
342
+ for (let { host: n, identity: r } of [...this.sessions.values()]) await n.dispatch({
343
+ protocol: t,
341
344
  kind: "close",
342
- ...n,
345
+ ...r,
343
346
  requestId: e++
344
347
  }, () => void 0);
345
348
  this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.resourceFailure = void 0;
@@ -350,28 +353,28 @@ var z = 64 * 1024 * 1024, B = class {
350
353
  return e;
351
354
  }
352
355
  async closeIdentity(e) {
353
- let t = this.sessions.get(e.sessionId);
354
- if (t) {
355
- await t.host.dispatch({
356
- protocol: a,
356
+ let n = this.sessions.get(e.sessionId);
357
+ if (n) {
358
+ await n.host.dispatch({
359
+ protocol: t,
357
360
  kind: "close",
358
361
  ...e,
359
362
  requestId: 1
360
363
  }, () => void 0);
361
364
  return;
362
365
  }
363
- let n = this.pendingOpens.get(e.sessionId);
364
- n && n.identity.operationId === e.operationId && n.identity.generation === e.generation && (n.canceled = !0);
366
+ let r = this.pendingOpens.get(e.sessionId);
367
+ r && r.identity.operationId === e.operationId && r.identity.generation === e.generation && (r.canceled = !0);
365
368
  }
366
369
  readResourceUsage() {
367
370
  try {
368
- return o(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
371
+ return a(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
369
372
  } catch (e) {
370
373
  if (String(e).includes("worksheet cursor usage is unavailable")) return;
371
374
  throw e;
372
375
  }
373
376
  }
374
- }, V = class {
377
+ }, H = class {
375
378
  active = /* @__PURE__ */ new Set();
376
379
  nextSessionId = 1;
377
380
  constructor(e) {
@@ -380,27 +383,27 @@ var z = 64 * 1024 * 1024, B = class {
380
383
  async *stream(e, t, n) {
381
384
  if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
382
385
  if (!t) throw TypeError("sheetName must be non-empty");
383
- W(n);
384
- let r = this.nextSessionId++, a = {
386
+ G(n);
387
+ let r = this.nextSessionId++, i = {
385
388
  sessionId: r,
386
389
  operationId: r,
387
390
  generation: this.options.generation ?? 1
388
- }, o = new i(this.options.transport, {
389
- ...a,
390
- maxByteCredit: z,
391
+ }, a = new u(this.options.transport, {
392
+ ...i,
393
+ maxByteCredit: B,
391
394
  timeoutMs: this.options.timeoutMs,
392
395
  disposeTransferred: this.options.disposeTransferred
393
396
  });
394
- this.active.add(o);
395
- let s = !1, c;
397
+ this.active.add(a);
398
+ let o = !1, s;
396
399
  try {
397
- for (await this.options.open(e, t, a, this.options.timeoutMs);;) {
398
- W(n);
399
- let e = await o.pull(z, { signal: n });
400
+ for (await this.options.open(e, t, i, this.options.timeoutMs);;) {
401
+ G(n);
402
+ let e = await a.pull(B, { signal: n });
400
403
  try {
401
- let t = e.usage ?? o.usageCheckpoint;
404
+ let t = e.usage ?? a.usageCheckpoint;
402
405
  t && this.options.onUsage?.(t);
403
- let r = R(e.payload, e.done, this.options.sharedStrings);
406
+ let r = z(e.payload, e.done, this.options.sharedStrings);
404
407
  if (yield r.kind === "rows" ? {
405
408
  kind: "rows",
406
409
  rows: r.rows,
@@ -414,7 +417,7 @@ var z = 64 * 1024 * 1024, B = class {
414
417
  wireBytes: e.byteLength,
415
418
  usage: t
416
419
  }, await e.ack({ signal: n }), r.kind === "finished") {
417
- s = !0;
420
+ o = !0;
418
421
  return;
419
422
  }
420
423
  } finally {
@@ -422,17 +425,17 @@ var z = 64 * 1024 * 1024, B = class {
422
425
  }
423
426
  }
424
427
  } catch (e) {
425
- throw c = e, e;
428
+ throw s = e, e;
426
429
  } finally {
427
430
  let e;
428
431
  try {
429
- s || await o.cancel(U(c));
432
+ o || await a.cancel(W(s));
430
433
  } catch (t) {
431
434
  e = t;
432
435
  } finally {
433
- this.active.delete(o);
436
+ this.active.delete(a);
434
437
  }
435
- if (c === void 0 && e !== void 0) throw e;
438
+ if (s === void 0 && e !== void 0) throw e;
436
439
  }
437
440
  }
438
441
  async cancelAll(e = "closed") {
@@ -440,16 +443,16 @@ var z = 64 * 1024 * 1024, B = class {
440
443
  if (t) throw t.reason;
441
444
  }
442
445
  };
443
- function H(e) {
446
+ function U(e) {
444
447
  return !!e && typeof e == "object" && e.protocol === "ooxml-pull-v1";
445
448
  }
446
- function U(e) {
449
+ function W(e) {
447
450
  return e && typeof e == "object" && "name" in e && e.name === "AbortError" ? "abort" : e === void 0 ? "closed" : "request-error";
448
451
  }
449
- function W(e) {
452
+ function G(e) {
450
453
  if (!e?.aborted) return;
451
454
  let t = /* @__PURE__ */ Error("XLSX workbook session was aborted");
452
455
  throw t.name = "AbortError", t;
453
456
  }
454
457
  //#endregion
455
- export { j as a, P as c, O as d, I as i, N as l, H as n, A as o, B as r, F as s, V as t, k as u };
458
+ export { S as a, I as c, A as d, O as f, L as i, F as l, N as m, U as n, M as o, k as p, V as r, j as s, H as t, P as u };