@silurus/ooxml 0.86.0 → 0.87.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.
- package/README.md +42 -2
- package/dist/assets/render-worker-CeK_iqK3.js +10 -0
- package/dist/assets/render-worker-DusrDhPk.js +11 -0
- package/dist/assets/render-worker-n2ZG0lrQ.js +31 -0
- package/dist/bounded-raw-part-cache-Cg1BsSZQ.js +119 -0
- package/dist/{canvas-viewer-mechanics-B3A7KLLi.js → canvas-viewer-mechanics-Cpk0YFvM.js} +301 -155
- package/dist/chart-ex.mjs +1 -1
- package/dist/cjk-fallback-bLI3z70h.js +46 -0
- package/dist/{comment-ui-runtime-ssI6IE39.js → comment-ui-runtime-BfE7MJZn.js} +4 -4
- package/dist/comment-ui-runtime-BsK8pmUT.js +2 -0
- package/dist/{comment-ui-runtime-DEtgcmj7.js → comment-ui-runtime-DcJOYlw-.js} +5 -5
- package/dist/{comments-CAn2A_Xh.js → comments-Diid5ujN.js} +1 -1
- package/dist/{document-pull-client-xZrA2IjM.js → document-pull-client-yKxI8aDH.js} +4326 -4238
- package/dist/{docx-DzDiGvqe.js → docx-BkSRiy07.js} +541 -349
- package/dist/docx.mjs +7 -7
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-DK1JLkrz.js → dom-interaction-boundary-CBUQJsIM.js} +63 -57
- package/dist/{hyperlink-enyPbflR.js → hyperlink-ArrU3ArU.js} +1014 -951
- package/dist/index.mjs +4 -4
- package/dist/line-distribute-Dtudnqhs.js +1023 -0
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +380 -376
- package/dist/{pptx-D_U62nl-.js → pptx-62MmVbYB.js} +462 -447
- package/dist/pptx.mjs +7 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/region-map.mjs +1 -1
- package/dist/{render-DSn0d35X.js → render-8Zo7dnds.js} +31 -29
- package/dist/{render-worker-host-CbYDBg7U.js → render-worker-host-BfbnEChF.js} +1 -1
- package/dist/{render-worker-host-CO0UYoQh.js → render-worker-host-DNL9dWRh.js} +1 -1
- package/dist/{render-worker-host-BHz9vjxB.js → render-worker-host-IkHrYOci.js} +1 -1
- package/dist/{resource-measurement-Do07ZRcR.js → resource-measurement-CJsgolre.js} +9 -9
- package/dist/{session-C1GYhr6n.js → session-CrU8f8DI.js} +91 -91
- package/dist/{slide-pull-client-DuEaUxPw.js → slide-pull-client-B9KA8bU6.js} +1069 -966
- package/dist/three-d.mjs +1 -1
- package/dist/tiff.mjs +1 -1
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +15 -12
- package/dist/types/index.d.ts +23 -18
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +12 -6
- package/dist/types/pptx.d.ts +15 -11
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +1 -1
- package/dist/types/xlsx.d.ts +15 -11
- package/dist/{worksheet-pull-client-eDiHHEG2.js → worksheet-pull-client-eIcQ-xlD.js} +65 -65
- package/dist/{xlsx-CMHmYTHP.js → xlsx-CRcSzZNq.js} +1656 -1630
- package/dist/xlsx.mjs +4 -4
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-BCGnuBLj.js +0 -10
- package/dist/assets/render-worker-CB4DxjXg.js +0 -31
- package/dist/assets/render-worker-CHW0F0n6.js +0 -11
- package/dist/bounded-raw-part-cache-DVx3Camo.js +0 -256
- package/dist/comment-ui-runtime-TLHustXJ.js +0 -2
- package/dist/line-distribute-BFB575d6.js +0 -1023
- /package/dist/{comment-occurrence-Dhdplprg.js → comment-occurrence-C8Y2uoVr.js} +0 -0
- /package/dist/{delimited-text-worker-host-DcHj_JZt.js → delimited-text-worker-host-BVY-Ecni.js} +0 -0
- /package/dist/{highlight-rect-FuUSmL3a.js → highlight-rect-C5hkRqUr.js} +0 -0
- /package/dist/{line-metrics-CBbw80Ko.js → line-metrics-B60C86uh.js} +0 -0
- /package/dist/{mathjax-DS69BmJd.js → mathjax-DoyWZbSp.js} +0 -0
- /package/dist/{read-only-comment-decoration-BTnWEeo5.js → read-only-comment-decoration-Dz7eTQ4d.js} +0 -0
- /package/dist/{read-only-comment-margin-plStyGfE.js → read-only-comment-margin-DkgzASAl.js} +0 -0
- /package/dist/{renderer-module-contract-Cu-GKuPd.js → renderer-module-contract-D91rkYHH.js} +0 -0
- /package/dist/{source-key-Ktb1GRE5.js → source-key-DIJG8BA0.js} +0 -0
- /package/dist/{transfer-mIj7E7NB.js → transfer-p6iCC2R7.js} +0 -0
- /package/dist/{visible-index-DPoQYSDt.js → visible-index-BgiHEc1z.js} +0 -0
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-IZnSIPIJ.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-
|
|
1063
|
+
//#region dist/.types-work/chart-ex-contract-CJ8NVYlS.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-
|
|
1068
|
+
//#region dist/.types-work/mathjax-Ceqah_7b.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-
|
|
1080
|
+
//#region dist/.types-work/three-d-contract-aYaGCu4V.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-
|
|
1085
|
+
//#region dist/.types-work/region-map-contract-Be6TbKbC.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-
|
|
1090
|
+
//#region dist/.types-work/tiff-contract-DsRI31nK.d.ts
|
|
1091
1091
|
interface TiffRenderOptions {
|
|
1092
1092
|
targetWidthPx?: number;
|
|
1093
1093
|
targetHeightPx?: number;
|
|
@@ -1102,7 +1102,9 @@ interface TiffRenderer {
|
|
|
1102
1102
|
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
1103
1103
|
}
|
|
1104
1104
|
//#endregion
|
|
1105
|
-
//#region dist/.types-work/hyperlink-
|
|
1105
|
+
//#region dist/.types-work/hyperlink-BwNed17w.d.ts
|
|
1106
|
+
type CjkLang = 'kr' | 'sc' | 'tc' | 'hk' | 'jp';
|
|
1107
|
+
type CjkFallback = 'auto' | CjkLang;
|
|
1106
1108
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
1107
1109
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
1108
1110
|
declare class OoxmlError extends Error {
|
|
@@ -1177,6 +1179,7 @@ interface OoxmlResourceLimits {
|
|
|
1177
1179
|
}
|
|
1178
1180
|
interface LoadOptions$1 {
|
|
1179
1181
|
useGoogleFonts?: boolean;
|
|
1182
|
+
cjkFallback?: CjkFallback;
|
|
1180
1183
|
password?: string;
|
|
1181
1184
|
wasmUrl?: string | URL;
|
|
1182
1185
|
maxZipEntryBytes?: number;
|
|
@@ -1209,7 +1212,7 @@ type HyperlinkTarget = {
|
|
|
1209
1212
|
};
|
|
1210
1213
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1211
1214
|
//#endregion
|
|
1212
|
-
//#region dist/.types-work/find-highlight-
|
|
1215
|
+
//#region dist/.types-work/find-highlight-CfHNje1k.d.ts
|
|
1213
1216
|
interface ViewerContextMenuEvent<TContext> {
|
|
1214
1217
|
readonly originalEvent: MouseEvent;
|
|
1215
1218
|
getContext(): Promise<TContext | null>;
|
|
@@ -1253,7 +1256,7 @@ interface FindHighlightColors {
|
|
|
1253
1256
|
active?: string;
|
|
1254
1257
|
}
|
|
1255
1258
|
//#endregion
|
|
1256
|
-
//#region dist/.types-work/types-
|
|
1259
|
+
//#region dist/.types-work/types-mD4FqxtD.d.ts
|
|
1257
1260
|
type ShapeFill = Exclude<Fill, {
|
|
1258
1261
|
fillType: 'image';
|
|
1259
1262
|
} | {
|
|
@@ -2008,7 +2011,7 @@ interface XlsxRenderViewportOptions {
|
|
|
2008
2011
|
} | null;
|
|
2009
2012
|
}
|
|
2010
2013
|
//#endregion
|
|
2011
|
-
//#region dist/.types-work/xlsx-
|
|
2014
|
+
//#region dist/.types-work/xlsx-B25CJOvy.d.ts
|
|
2012
2015
|
type ResolvedList = {
|
|
2013
2016
|
kind: 'values';
|
|
2014
2017
|
values: string[];
|
|
@@ -2047,6 +2050,7 @@ declare class XlsxWorkbook {
|
|
|
2047
2050
|
private queuedImageLoads;
|
|
2048
2051
|
private readonly _fetchImage;
|
|
2049
2052
|
private resourcePolicy;
|
|
2053
|
+
private cjkFallback;
|
|
2050
2054
|
private math;
|
|
2051
2055
|
private threeD;
|
|
2052
2056
|
private regionMap;
|
|
@@ -2564,4 +2568,4 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
2564
2568
|
}
|
|
2565
2569
|
declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
|
|
2566
2570
|
//#endregion
|
|
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 };
|
|
2571
|
+
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 CjkFallback, 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 {
|
|
2
|
-
import { n as h, r as g, t as _ } from "./resource-measurement-
|
|
3
|
-
import { t as v } from "./transfer-
|
|
1
|
+
import { F as e, G as t, H as n, M as r, N as i, P as a, an as o, cn as s, in as c, nn as l, on as u, rn as d, sn as f, tn as p, un as m } from "./hyperlink-ArrU3ArU.js";
|
|
2
|
+
import { n as h, r as g, t as _ } from "./resource-measurement-CJsgolre.js";
|
|
3
|
+
import { t as v } from "./transfer-p6iCC2R7.js";
|
|
4
4
|
//#region packages/xlsx/src/worksheet-resource-limits.ts
|
|
5
|
-
var y = s, b =
|
|
5
|
+
var y = s, b = o, x = u, S = f, C = c, w = p, T = l, E = d, D = Object.freeze({
|
|
6
6
|
archiveEntryCount: 0,
|
|
7
7
|
declaredInflatedBytes: 0,
|
|
8
8
|
distinctInflatedBytes: 0,
|
|
@@ -48,7 +48,7 @@ function M(e, t, n = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
function N(e, t, n, r, i, a, o) {
|
|
50
50
|
let s = n === "worksheet-json" ? "serialization" : "parsing";
|
|
51
|
-
return new
|
|
51
|
+
return new m(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
|
|
52
52
|
stage: s,
|
|
53
53
|
violation: {
|
|
54
54
|
format: "xlsx",
|
|
@@ -142,7 +142,7 @@ function z(e, t, n, r) {
|
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region packages/xlsx/src/worksheet-pull-worker.ts
|
|
144
144
|
var B = 64 * 1024 * 1024, V = class {
|
|
145
|
-
coordinator = new
|
|
145
|
+
coordinator = new e();
|
|
146
146
|
sessions = /* @__PURE__ */ new Map();
|
|
147
147
|
operationTail = Promise.resolve();
|
|
148
148
|
pendingOpens = /* @__PURE__ */ new Map();
|
|
@@ -162,21 +162,21 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
162
162
|
get pendingOpenCount() {
|
|
163
163
|
return this.pendingOpens.size;
|
|
164
164
|
}
|
|
165
|
-
async open(e, t,
|
|
165
|
+
async open(e, t, n) {
|
|
166
166
|
if (this.resourceFailure) throw this.resourceFailure;
|
|
167
|
-
let
|
|
168
|
-
if (!
|
|
169
|
-
let
|
|
170
|
-
|
|
167
|
+
let r = this.pendingOpens.get(n.sessionId);
|
|
168
|
+
if (!r || r.identity.operationId !== n.operationId || r.identity.generation !== n.generation) throw Error("worksheet pull session open reservation is stale or missing");
|
|
169
|
+
let i, o = new Promise((e) => {
|
|
170
|
+
i = e;
|
|
171
171
|
}), s = this.operationTail.then(() => this.coordinator.enqueue(async () => {
|
|
172
|
-
if (
|
|
172
|
+
if (r.canceled) throw Error("worksheet pull session open was canceled");
|
|
173
173
|
this.executeArchive((n) => n.open_sheet_cursor(e, t));
|
|
174
174
|
let o = [], s = {
|
|
175
175
|
rows: 0,
|
|
176
176
|
cells: 0,
|
|
177
177
|
ownedUtf8Bytes: 0
|
|
178
|
-
}, c, l = !1, u = new
|
|
179
|
-
...
|
|
178
|
+
}, c, l = !1, u = new a({
|
|
179
|
+
...n,
|
|
180
180
|
maxByteCredit: B,
|
|
181
181
|
coordinator: this.coordinator,
|
|
182
182
|
driver: {
|
|
@@ -190,7 +190,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
190
190
|
P(e, "get-worksheet-worker", void 0, this.readResourceUsage()), o.push(...n.rows), s = e;
|
|
191
191
|
} else c = n.worksheet;
|
|
192
192
|
} catch (e) {
|
|
193
|
-
throw e instanceof
|
|
193
|
+
throw e instanceof m && (this.resourceFailure ??= e), e;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
l = t;
|
|
@@ -205,53 +205,53 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
205
205
|
measureChunk: ({ payload: e }) => e.byteLength,
|
|
206
206
|
acknowledge: () => {
|
|
207
207
|
if (!l) return;
|
|
208
|
-
let t,
|
|
208
|
+
let t, r;
|
|
209
209
|
try {
|
|
210
210
|
if (this.acceptWorksheet) {
|
|
211
211
|
if (!c) throw Error("worksheet terminal payload is missing");
|
|
212
212
|
c.rows = c.parseError ? [] : o;
|
|
213
|
-
let
|
|
213
|
+
let n = c.parseError ? {
|
|
214
214
|
rows: 0,
|
|
215
215
|
cells: 0,
|
|
216
216
|
ownedUtf8Bytes: 0
|
|
217
|
-
} : s, i = A(c,
|
|
217
|
+
} : s, i = A(c, n), a = this.readResourceUsage();
|
|
218
218
|
P(i, "get-worksheet-worker", void 0, a), F(i.jsonBytes, "get-worksheet-worker", void 0, a);
|
|
219
219
|
let l = this.acceptWorksheet(e, c, i, a);
|
|
220
|
-
typeof l == "function" ? t = l : l && ({rollback: t, commit:
|
|
220
|
+
typeof l == "function" ? t = l : l && ({rollback: t, commit: r} = l);
|
|
221
221
|
}
|
|
222
|
-
this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()),
|
|
222
|
+
this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), r?.();
|
|
223
223
|
} catch (e) {
|
|
224
|
-
throw t?.(), e instanceof
|
|
224
|
+
throw t?.(), e instanceof m && (this.resourceFailure ??= e), e;
|
|
225
225
|
}
|
|
226
|
-
l = !1, this.sessions.delete(
|
|
226
|
+
l = !1, this.sessions.delete(n.sessionId), i();
|
|
227
227
|
},
|
|
228
228
|
cancel: () => {
|
|
229
229
|
try {
|
|
230
230
|
this.archive() && this.executeArchive((e) => e.cancel_sheet_cursor());
|
|
231
231
|
} finally {
|
|
232
|
-
this.sessions.delete(
|
|
232
|
+
this.sessions.delete(n.sessionId), i();
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
235
|
close: () => {
|
|
236
236
|
try {
|
|
237
237
|
this.archive() && this.executeArchive((e) => e.close_sheet_cursor());
|
|
238
238
|
} finally {
|
|
239
|
-
this.sessions.delete(
|
|
239
|
+
this.sessions.delete(n.sessionId), i();
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
resourceUsage: () => this.readResourceUsage()
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
|
-
this.sessions.set(
|
|
245
|
+
this.sessions.set(n.sessionId, {
|
|
246
246
|
host: u,
|
|
247
|
-
identity:
|
|
248
|
-
}), this.pendingOpens.delete(
|
|
247
|
+
identity: n
|
|
248
|
+
}), this.pendingOpens.delete(n.sessionId);
|
|
249
249
|
}));
|
|
250
250
|
this.operationTail = s.then(() => o, () => void 0);
|
|
251
251
|
try {
|
|
252
252
|
await s;
|
|
253
253
|
} catch (e) {
|
|
254
|
-
throw this.pendingOpens.delete(
|
|
254
|
+
throw this.pendingOpens.delete(n.sessionId), i(), e;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
async postOpenedSafely(e, t, n) {
|
|
@@ -267,11 +267,11 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
267
267
|
dispatch(e, n) {
|
|
268
268
|
let r = this.sessions.get(e.sessionId);
|
|
269
269
|
if (r) return r.host.dispatch(e, n);
|
|
270
|
-
let
|
|
271
|
-
if (
|
|
272
|
-
let
|
|
273
|
-
return
|
|
274
|
-
protocol:
|
|
270
|
+
let a = this.pendingOpens.get(e.sessionId);
|
|
271
|
+
if (a && (e.kind === "cancel" || e.kind === "close")) {
|
|
272
|
+
let t = a.identity.operationId === e.operationId && a.identity.generation === e.generation;
|
|
273
|
+
return t && (a.canceled = !0), n(t ? {
|
|
274
|
+
protocol: i,
|
|
275
275
|
kind: "accepted",
|
|
276
276
|
sessionId: e.sessionId,
|
|
277
277
|
operationId: e.operationId,
|
|
@@ -279,7 +279,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
279
279
|
requestId: e.requestId,
|
|
280
280
|
command: e.kind
|
|
281
281
|
} : {
|
|
282
|
-
protocol:
|
|
282
|
+
protocol: i,
|
|
283
283
|
kind: "error",
|
|
284
284
|
sessionId: e.sessionId,
|
|
285
285
|
operationId: e.operationId,
|
|
@@ -293,7 +293,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
293
293
|
}), Promise.resolve();
|
|
294
294
|
}
|
|
295
295
|
return e.kind === "cancel" || e.kind === "close" ? (n({
|
|
296
|
-
protocol:
|
|
296
|
+
protocol: i,
|
|
297
297
|
kind: "accepted",
|
|
298
298
|
sessionId: e.sessionId,
|
|
299
299
|
operationId: e.operationId,
|
|
@@ -301,13 +301,13 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
301
301
|
requestId: e.requestId,
|
|
302
302
|
command: e.kind
|
|
303
303
|
}), Promise.resolve()) : (n({
|
|
304
|
-
protocol:
|
|
304
|
+
protocol: i,
|
|
305
305
|
kind: "error",
|
|
306
306
|
sessionId: e.sessionId,
|
|
307
307
|
operationId: e.operationId,
|
|
308
308
|
generation: e.generation,
|
|
309
309
|
requestId: e.requestId,
|
|
310
|
-
error:
|
|
310
|
+
error: t(/* @__PURE__ */ Error("worksheet pull session is not open"))
|
|
311
311
|
}), Promise.resolve());
|
|
312
312
|
}
|
|
313
313
|
async dispatchSafely(e, n) {
|
|
@@ -316,13 +316,13 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
316
316
|
} catch (r) {
|
|
317
317
|
try {
|
|
318
318
|
n({
|
|
319
|
-
protocol:
|
|
319
|
+
protocol: i,
|
|
320
320
|
kind: "error",
|
|
321
321
|
sessionId: e.sessionId,
|
|
322
322
|
operationId: e.operationId,
|
|
323
323
|
generation: e.generation,
|
|
324
324
|
requestId: e.requestId,
|
|
325
|
-
error:
|
|
325
|
+
error: t(r)
|
|
326
326
|
});
|
|
327
327
|
} catch {}
|
|
328
328
|
}
|
|
@@ -332,17 +332,17 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
332
332
|
if (this.resourceFailure) throw this.resourceFailure;
|
|
333
333
|
return e();
|
|
334
334
|
})).catch((e) => {
|
|
335
|
-
throw e instanceof
|
|
335
|
+
throw e instanceof m && (this.resourceFailure ??= e), e;
|
|
336
336
|
});
|
|
337
337
|
return this.operationTail = t.then(() => void 0, () => void 0), t;
|
|
338
338
|
}
|
|
339
339
|
async reset() {
|
|
340
340
|
for (let e of this.pendingOpens.values()) e.canceled = !0;
|
|
341
341
|
let e = 1;
|
|
342
|
-
for (let { host:
|
|
343
|
-
protocol:
|
|
342
|
+
for (let { host: t, identity: n } of [...this.sessions.values()]) await t.dispatch({
|
|
343
|
+
protocol: i,
|
|
344
344
|
kind: "close",
|
|
345
|
-
...
|
|
345
|
+
...n,
|
|
346
346
|
requestId: e++
|
|
347
347
|
}, () => void 0);
|
|
348
348
|
this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.resourceFailure = void 0;
|
|
@@ -353,22 +353,22 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
353
353
|
return e;
|
|
354
354
|
}
|
|
355
355
|
async closeIdentity(e) {
|
|
356
|
-
let
|
|
357
|
-
if (
|
|
358
|
-
await
|
|
359
|
-
protocol:
|
|
356
|
+
let t = this.sessions.get(e.sessionId);
|
|
357
|
+
if (t) {
|
|
358
|
+
await t.host.dispatch({
|
|
359
|
+
protocol: i,
|
|
360
360
|
kind: "close",
|
|
361
361
|
...e,
|
|
362
362
|
requestId: 1
|
|
363
363
|
}, () => void 0);
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
|
-
let
|
|
367
|
-
|
|
366
|
+
let n = this.pendingOpens.get(e.sessionId);
|
|
367
|
+
n && n.identity.operationId === e.operationId && n.identity.generation === e.generation && (n.canceled = !0);
|
|
368
368
|
}
|
|
369
369
|
readResourceUsage() {
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return n(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
|
|
372
372
|
} catch (e) {
|
|
373
373
|
if (String(e).includes("worksheet cursor usage is unavailable")) return;
|
|
374
374
|
throw e;
|
|
@@ -384,24 +384,24 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
384
384
|
if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
|
|
385
385
|
if (!t) throw TypeError("sheetName must be non-empty");
|
|
386
386
|
G(n);
|
|
387
|
-
let
|
|
388
|
-
sessionId:
|
|
389
|
-
operationId:
|
|
387
|
+
let i = this.nextSessionId++, a = {
|
|
388
|
+
sessionId: i,
|
|
389
|
+
operationId: i,
|
|
390
390
|
generation: this.options.generation ?? 1
|
|
391
|
-
},
|
|
392
|
-
...
|
|
391
|
+
}, o = new r(this.options.transport, {
|
|
392
|
+
...a,
|
|
393
393
|
maxByteCredit: B,
|
|
394
394
|
timeoutMs: this.options.timeoutMs,
|
|
395
395
|
disposeTransferred: this.options.disposeTransferred
|
|
396
396
|
});
|
|
397
|
-
this.active.add(
|
|
398
|
-
let
|
|
397
|
+
this.active.add(o);
|
|
398
|
+
let s = !1, c;
|
|
399
399
|
try {
|
|
400
|
-
for (await this.options.open(e, t,
|
|
400
|
+
for (await this.options.open(e, t, a, this.options.timeoutMs);;) {
|
|
401
401
|
G(n);
|
|
402
|
-
let e = await
|
|
402
|
+
let e = await o.pull(B, { signal: n });
|
|
403
403
|
try {
|
|
404
|
-
let t = e.usage ??
|
|
404
|
+
let t = e.usage ?? o.usageCheckpoint;
|
|
405
405
|
t && this.options.onUsage?.(t);
|
|
406
406
|
let r = z(e.payload, e.done, this.options.sharedStrings);
|
|
407
407
|
if (yield r.kind === "rows" ? {
|
|
@@ -417,7 +417,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
417
417
|
wireBytes: e.byteLength,
|
|
418
418
|
usage: t
|
|
419
419
|
}, await e.ack({ signal: n }), r.kind === "finished") {
|
|
420
|
-
|
|
420
|
+
s = !0;
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
423
|
} finally {
|
|
@@ -425,17 +425,17 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
} catch (e) {
|
|
428
|
-
throw
|
|
428
|
+
throw c = e, e;
|
|
429
429
|
} finally {
|
|
430
430
|
let e;
|
|
431
431
|
try {
|
|
432
|
-
|
|
432
|
+
s || await o.cancel(W(c));
|
|
433
433
|
} catch (t) {
|
|
434
434
|
e = t;
|
|
435
435
|
} finally {
|
|
436
|
-
this.active.delete(
|
|
436
|
+
this.active.delete(o);
|
|
437
437
|
}
|
|
438
|
-
if (
|
|
438
|
+
if (c === void 0 && e !== void 0) throw e;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
async cancelAll(e = "closed") {
|