@silurus/ooxml 0.89.2 → 0.89.3
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 +4 -3
- package/dist/{abort-VrnK7mdP.js → abort-JztSoyw2.js} +0 -2
- package/dist/assets/render-worker-BUa1gyCE.js +15 -0
- package/dist/{bounded-raw-part-cache-C3daknU-.js → bounded-raw-part-cache-Bi_VqXmg.js} +7 -115
- package/dist/{bundled-asset-url-E2nXURF9.js → bundled-asset-url-BMJ8vNHP.js} +0 -2
- package/dist/{canvas-viewer-mechanics-SZWSnn6j.js → canvas-viewer-mechanics-ycCX6v-z.js} +3 -25
- package/dist/{cfb-guard-dNeUiANF.js → cfb-guard-BIaHdonq.js} +1 -13
- package/dist/chart-ex.mjs +4 -7
- package/dist/{chunk-Dy4uBu1J.js → chunk-D5OxutzX.js} +0 -2
- package/dist/{comment-overlay-controller-CHDxT0e7.js → comment-overlay-controller-CR5ySvki.js} +2 -22
- package/dist/{comment-ui-runtime-Dk2qrPy_.js → comment-ui-runtime-BWhLz4gq.js} +5 -7
- package/dist/comment-ui-runtime-BtP_TpvT.js +2 -0
- package/dist/{comment-ui-runtime-BcwaRnMR.js → comment-ui-runtime-CwTOCwA8.js} +5 -7
- package/dist/{delimited-text-worker-host-CikWU6_m.js → delimited-text-worker-host-RwvuSsP2.js} +0 -4
- package/dist/{document-model-source-BD2VSd2L.js → document-model-source-Csow9uxO.js} +9 -11
- package/dist/{document-pull-client-DhSGspvi.js → document-pull-client-CHpz0Q1p.js} +7572 -7285
- package/dist/{document-pull-worker-D-E0Iz3P.js → document-pull-worker-1ZJv9f9W.js} +3 -7
- package/dist/{docx-CXfILbzI.js → docx-D9E0vCq-.js} +12 -18
- package/dist/{docx-CCZBO1WQ.js → docx-GXxH0AwW.js} +13 -65
- package/dist/{docx-model-source-Ci6xb487.js → docx-model-source-aKx2gZH9.js} +7 -9
- package/dist/docx.mjs +6 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{drawingml-shape-Bp0yEZHC.js → drawingml-shape-BwELUfNW.js} +2 -6
- package/dist/{duotone-DN8P4aXe.js → duotone-BI7CoghW.js} +2 -6
- package/dist/{emf-CGFQIz6c.js → emf-DgUBx9BU.js} +2 -4
- package/dist/{font-preload-demand-CGOB-MoE.js → font-preload-demand-BuMy4iJ1.js} +2 -8
- package/dist/{grid-geometry-C3IG20ut.js → grid-geometry-CqTDvpDr.js} +1 -6
- package/dist/{host-layout-DVMw8hDY.js → host-layout-Cz_lCuTZ.js} +0 -1
- package/dist/{host-layout-measure-BAysJILu.js → host-layout-measure-GU0oJ4Me.js} +1 -3
- package/dist/{in-process-pull-transport-DuXcPZng.js → in-process-pull-transport-BPJ7M0uC.js} +0 -2
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +3 -5
- package/dist/{line-distribute-DhQqysA2.js → line-distribute-C_CJisnJ.js} +2 -18
- package/dist/math.mjs +2 -8
- package/dist/{mathjax-BhwN6ilc.js → mathjax-DvwccQ8e.js} +0 -2
- package/dist/{model-source-kz_NkZqT.js → model-source-COXegBNA.js} +1 -3
- package/dist/{model-source-BkmyX_r-.js → model-source-DLXFe4_2.js} +3 -5
- package/dist/{model-source-session-CnPCTRDD.js → model-source-session-B3WVQCM5.js} +5 -9
- package/dist/{model-source-session-CF4iXav8.js → model-source-session-BVZBHZ04.js} +5 -11
- package/dist/{model-source-session-CJmkItIK.js → model-source-session-DfUgVpr1.js} +4 -8
- package/dist/node.mjs +6 -6
- package/dist/{pixel-budget-BpTYrepD.js → pixel-budget-DI82Hn3R.js} +0 -2
- package/dist/{plot-area-frame-Bs_j4uu7.js → plot-area-frame-D3JtHvov.js} +1 -167
- package/dist/{pptx-BhmLP_Ed.js → pptx-BD0jwWs6.js} +9 -11
- package/dist/{pptx-Bo9hCGQU.js → pptx-CLyebeF_.js} +16 -62
- package/dist/{pptx-model-source-J0SrVkO6.js → pptx-model-source-D_2mnSxI.js} +5 -7
- package/dist/pptx.mjs +7 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{presentation-model-source-CebYmrOD.js → presentation-model-source-rWZ3Y-S_.js} +8 -10
- package/dist/{raster-target-YQ4G6rxo.js → raster-target-Ca3tyA0L.js} +0 -2
- package/dist/{read-only-comment-decoration-PidH0wnP.js → read-only-comment-decoration-B06YO2zk.js} +0 -4
- package/dist/{read-only-comment-margin-B52rDVKo.js → read-only-comment-margin-Ee9Y6vPg.js} +0 -2
- package/dist/region-map.mjs +4 -7
- package/dist/{render-hT2OVZUi.js → render-Cs1bgbEm.js} +3 -5
- package/dist/{render-worker-host-Desevuoc.js → render-worker-host-BR7n4xKy.js} +0 -4
- package/dist/render-worker-host-BxsA-yJo.js +5 -0
- package/dist/{render-worker-host-BmAQ-sWT.js → render-worker-host-CZC0WOn8.js} +0 -4
- package/dist/{renderer-CvZ4JmoL.js → renderer-DFDF48zw.js} +7 -55
- package/dist/{renderer-module-contract-CWM7jv6d.js → renderer-module-contract-BuTx2FWJ.js} +0 -2
- package/dist/{renderer-BFWqhLEt.js → renderer-xdugdcMd.js} +6 -70
- package/dist/{resource-measurement-DBiUwblM.js → resource-measurement-CTGrNAsD.js} +2 -18
- package/dist/{session-CWDKFWCh.js → session-B5CgMc2N.js} +7 -17
- package/dist/{slide-pull-client-BuBvXMyc.js → slide-pull-client-43mS9T70.js} +9 -63
- package/dist/{three-d-BKwNPAP4.js → three-d-ByHGsYrX.js} +1 -11
- package/dist/three-d.mjs +4 -17
- package/dist/{tiff-contract-C6M3QcPp.js → tiff-contract-DEd8CGuz.js} +0 -2
- package/dist/tiff.mjs +5 -8
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +12 -11
- package/dist/types/index.d.ts +16 -15
- package/dist/types/internal-companion.d.ts +1 -1
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +7 -6
- package/dist/types/pptx.d.ts +11 -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 +11 -11
- package/dist/{visible-index-FeVA0mGE.js → visible-index-vN-4BNn7.js} +0 -2
- package/dist/{wasm-loader-rlgHmcSv.js → wasm-loader-KAOyLXzf.js} +0 -4
- package/dist/{wasm-runtime-generation-BWGfM44b.js → wasm-runtime-generation-BsWKRY7U.js} +1 -3
- package/dist/{workbook-model-source-Che8Zbjw.js → workbook-model-source-ChIQjX9a.js} +9 -11
- package/dist/{worker-source-UAi3GNcM.js → worker-source-C29EQNUj.js} +0 -2
- package/dist/{worker-source-SbudzjYL.js → worker-source-D3NwPe6l.js} +0 -2
- package/dist/{worker-source-DrwhR9fw.js → worker-source-ZQE9C1j6.js} +0 -2
- package/dist/{worksheet-pull-client-Cxzj6uuB.js → worksheet-pull-client-D5zAevQv.js} +4 -18
- package/dist/{xlsx-CUVUep5I.js → xlsx-DelYm4VZ.js} +17 -61
- package/dist/{xlsx-C5BSwMUd.js → xlsx-S6orTmKI.js} +8 -16
- package/dist/{xlsx-model-source-C3_PiPBo.js → xlsx-model-source-Cm9ocDgT.js} +8 -12
- package/dist/xlsx.mjs +7 -7
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +2 -2
- package/dist/assets/render-worker-D_SMt5nl.js +0 -15
- package/dist/comment-ui-runtime-B7ZvovcS.js +0 -2
- package/dist/render-worker-host-Cz224I38.js +0 -9
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-oB13FB5_.d.ts
|
|
2
2
|
type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
|
|
3
3
|
interface ImageResourceOptions {
|
|
4
4
|
decodedByteBudget?: number;
|
|
@@ -1533,12 +1533,12 @@ interface ChartRect {
|
|
|
1533
1533
|
h: number;
|
|
1534
1534
|
}
|
|
1535
1535
|
//#endregion
|
|
1536
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
1536
|
+
//#region dist/.types-work/chart-ex-contract-Btw9pmox.d.ts
|
|
1537
1537
|
interface ChartExRenderer {
|
|
1538
1538
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1539
1539
|
}
|
|
1540
1540
|
//#endregion
|
|
1541
|
-
//#region dist/.types-work/mathjax-
|
|
1541
|
+
//#region dist/.types-work/mathjax-DXhFag3c.d.ts
|
|
1542
1542
|
interface MathSvg {
|
|
1543
1543
|
svg: string;
|
|
1544
1544
|
widthEm: number;
|
|
@@ -1550,17 +1550,17 @@ interface MathRenderer {
|
|
|
1550
1550
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
1551
1551
|
}
|
|
1552
1552
|
//#endregion
|
|
1553
|
-
//#region dist/.types-work/three-d-contract-
|
|
1553
|
+
//#region dist/.types-work/three-d-contract-C1vpmN0H.d.ts
|
|
1554
1554
|
interface ChartThreeDRenderer {
|
|
1555
1555
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1556
1556
|
}
|
|
1557
1557
|
//#endregion
|
|
1558
|
-
//#region dist/.types-work/region-map-contract-
|
|
1558
|
+
//#region dist/.types-work/region-map-contract-C3gO5S5h.d.ts
|
|
1559
1559
|
interface ChartRegionMapRenderer {
|
|
1560
1560
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1561
1561
|
}
|
|
1562
1562
|
//#endregion
|
|
1563
|
-
//#region dist/.types-work/tiff-contract-
|
|
1563
|
+
//#region dist/.types-work/tiff-contract-CiDe3tba.d.ts
|
|
1564
1564
|
interface TiffRenderOptions {
|
|
1565
1565
|
targetWidthPx?: number;
|
|
1566
1566
|
targetHeightPx?: number;
|
|
@@ -1575,7 +1575,7 @@ interface TiffRenderer {
|
|
|
1575
1575
|
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
1576
1576
|
}
|
|
1577
1577
|
//#endregion
|
|
1578
|
-
//#region dist/.types-work/hyperlink-
|
|
1578
|
+
//#region dist/.types-work/hyperlink-Du5ndoeF.d.ts
|
|
1579
1579
|
type CjkLang = 'kr' | 'sc' | 'tc' | 'hk' | 'jp';
|
|
1580
1580
|
type CjkFallback = 'auto' | CjkLang;
|
|
1581
1581
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml' | 'unsupported-image-effect' | 'invalid-numbering' | 'unsupported-content';
|
|
@@ -1711,7 +1711,7 @@ type HyperlinkTarget = {
|
|
|
1711
1711
|
};
|
|
1712
1712
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1713
1713
|
//#endregion
|
|
1714
|
-
//#region dist/.types-work/find-highlight-
|
|
1714
|
+
//#region dist/.types-work/find-highlight-bgte5AM6.d.ts
|
|
1715
1715
|
interface TextSelectionContextOptions {
|
|
1716
1716
|
readonly maxTextCharacters?: number;
|
|
1717
1717
|
readonly maxRunLocators?: number;
|
|
@@ -1772,7 +1772,7 @@ interface FindHighlightColors {
|
|
|
1772
1772
|
active?: string;
|
|
1773
1773
|
}
|
|
1774
1774
|
//#endregion
|
|
1775
|
-
//#region dist/.types-work/model-source-
|
|
1775
|
+
//#region dist/.types-work/model-source-o_kIn8O6.d.ts
|
|
1776
1776
|
type ModelSourceTarget = 'docx' | 'xlsx' | 'pptx';
|
|
1777
1777
|
type ModelSourceConfigValue = string | number | boolean | null;
|
|
1778
1778
|
type ModelSourceConfig = Readonly<Record<string, ModelSourceConfigValue>>;
|
|
@@ -1802,7 +1802,7 @@ interface ModelSourceModule<TArchive = unknown> {
|
|
|
1802
1802
|
openModelSource(bytes: Uint8Array, config: ModelSourceConfig, signal?: AbortSignal, transfer?: readonly Transferable[]): Promise<OpenedModelSource<TArchive>>;
|
|
1803
1803
|
}
|
|
1804
1804
|
//#endregion
|
|
1805
|
-
//#region dist/.types-work/types-
|
|
1805
|
+
//#region dist/.types-work/types-C2FlVYUX.d.ts
|
|
1806
1806
|
type DocxDiagnosticCode = 'FLOW_OVERLAP' | 'BOTTOM_MARGIN_INVASION' | 'FLOW_DOMAIN_INVASION' | 'INVALID_REFERENCE' | 'INVALID_GEOMETRY' | 'INVALID_VALUE' | 'MISSING_RESOURCE' | 'NON_CONVERGENCE' | 'UNSUPPORTED_FEATURE';
|
|
1807
1807
|
interface DocxDiagnostic {
|
|
1808
1808
|
readonly code: DocxDiagnosticCode;
|
|
@@ -1834,6 +1834,7 @@ interface EmbeddedFontRef {
|
|
|
1834
1834
|
fontKey: string;
|
|
1835
1835
|
}
|
|
1836
1836
|
interface DocSettings {
|
|
1837
|
+
footnoteLayoutLikeWW8?: boolean;
|
|
1837
1838
|
doNotUseHtmlParagraphAutoSpacing?: boolean;
|
|
1838
1839
|
kinsoku?: boolean;
|
|
1839
1840
|
noLineBreaksBefore?: string;
|
|
@@ -2625,7 +2626,7 @@ interface RenderPageOptions {
|
|
|
2625
2626
|
showTrackedChanges?: boolean;
|
|
2626
2627
|
}
|
|
2627
2628
|
//#endregion
|
|
2628
|
-
//#region dist/.types-work/docx-
|
|
2629
|
+
//#region dist/.types-work/docx-Y6PoeUXw.d.ts
|
|
2629
2630
|
interface CommentAnchorRange {
|
|
2630
2631
|
readonly commentId: string;
|
|
2631
2632
|
readonly source: Readonly<DocxStorySource>;
|
|
@@ -3137,7 +3138,7 @@ declare namespace docx_d_exports {
|
|
|
3137
3138
|
export { AnchorHostMetrics, AutoResizeOptions, BlendMode, BlipEffect, BlipEffectContainer, BlipEffectFill, BlipEffectImageFill, BodyElement, BorderSpec, CellBorders, CellElement, ChartAreaGroupDecorations, ChartAxisNumberFormat, ChartBarGroupDecorations, ChartClassicSurfaceBandStyles, ChartDataLabelOverride, ChartDataPointOverride, ChartDataTable, ChartDecorationLineStyle, ChartDisplayUnits, ChartDisplayUnitsLabel, ChartErrBars, ChartExElementStyle, ChartExRenderer, ChartLabelBox, ChartLegendEntryOverride, ChartLineDashSegment, ChartLineGroupDecorations, ChartManualLayout, ChartModel, ChartOfPie, ChartPlotGroup, ChartPlotGroupAxisSlot, ChartPlotGroupKind, ChartRect, ChartRegionMapRenderer, ChartRun, ChartSeries, ChartSeriesDataLabels, ChartStockBarPaint, ChartStockUpDownBarStyle, ChartSurfaceBandFormat, ChartTextBox, ChartTextParagraph, ChartTextRun, ChartThreeD, ChartThreeDPictureOptions, ChartThreeDRenderer, ChartThreeDSeriesAxis, ChartThreeDSurface, ChartTrendline, ChartType, ChartexBoxSeries, ChartexBoxWhisker, ChartexGeography, ChartexHistogramBinning, ChartexRegionMap, ChartexRegionMapColors, ChartexRegionMapRow, ChartexSunburst, ChartexSunburstRow, ChartexTreemap, ChartexValueColorStop, CjkFallback, ColSpec, CollectPageRunsOptions, ColumnsSpec, CommentAnchorGeometryFallback, CommentAnchorPoint, CommentAnchorRange, DecodedImageBudgetStrategy, DocComment, DocNote, DocParagraph, DocRevision, DocRun, DocSettings, DocTable, DocTableCell, DocTableRow, DocxCommentAnchorKind, DocxCommentHighlightRect, DocxCommentMark, DocxCommentSelectionContext, DocxCommentsOptions, DocxDiagnostic, DocxDiagnosticCode, DocxDocument, DocxDocumentModel, DocxElementContext, DocxElementContextOptions, DocxHighlightColors, DocxHighlightMatch, DocxMatchLocation, DocxPageCommentThreadsOptions, DocxPagePoint, DocxRunBorder, DocxScrollViewer, DocxScrollViewerOptions, DocxSelectionContext, DocxSelectionContextOptions, DocxSelectionRunLocator, DocxSelectionSourceLocator, DocxStorySource, DocxTextRun, DocxTextRunInfo, DocxTextSelectionContext, DocxViewer, DocxViewerOptions, DrawingMLCustomDashSegment, Duotone$1 as Duotone, EmbeddedFontRef, FieldRun, FillRect, FindHighlightColors, FindMatch, FindMatchesOptions, FramePr, Glow, GradientFill, GradientStop, HeaderFooter, HeadersFooters, HyperlinkTarget, ImageFill, ImageResourceOptions, ImageRun, LegendManualLayout, LineEnd, LineNumbering, LineSpacing, LoadOptions$2 as LoadOptions, MatchRunSlice, MathAccent, MathArray, MathBar, MathBorderBox, MathBox, MathDelimiter, MathFraction, MathFunc, MathGroup, MathGroupChr, MathLimit, MathNary, MathNode, MathPhant, MathRadical, MathRenderer, MathRun, MathSPre, MathScript, MathStyle, MathSvg, ModelSource, ModelSourceConfig, ModelSourceConfigValue, ModelSourceLoad, ModelSourceModule, ModelSourceModuleDescriptor, ModelSourceTarget, NoFill, NoteRef, NumberingInfo, OoxmlDecodedImageLimitError, OoxmlDecodedImageLimitMetric, OoxmlError, OoxmlErrorCode, OoxmlErrorStage, OoxmlFormat, OoxmlResourceLimit, OoxmlResourceLimitError, OoxmlResourceLimitErrorDetails, OoxmlResourceLimits, OoxmlResourceMetric, OoxmlResourceMetrics, OoxmlResourceMetricsCheckpoint, OoxmlResourceName, OoxmlResourcePolicySnapshot, OoxmlResourceUsageSnapshot, OoxmlResourceViolation, OoxmlUnsupportedContentDetails, OpenedModelSource, PTabRun, PageBorderEdge, PageBorders, PageNumType, ParaBorderEdge, ParagraphBorders, PathCmd$1 as PathCmd, PatternFill, Reflection, RenderPageOptions, RenderPageToBitmapOptions, ResolveDocxCommentThreadsOptions, ResolvedDocxCommentAnchor, ResolvedDocxCommentThread, RevisionAnchorGeometryFallback, RevisionAnchorRange, RubyAnnotation, RunRevision, SecondaryValueAxis, SectionGeom, SectionProps, Shadow, ShapeFill$1 as ShapeFill, ShapeRun, ShapeStrokeFill, ShapeText$1 as ShapeText, ShapeTextRun$1 as ShapeTextRun, SoftEdge, SolidFill, SrcRect, TabStop, TableBorders, TblpPr, TextPath, TextSelectionContextOptions, TiffDecodeError, TiffRenderOptions, TiffRenderer, TileInfo, ViewerCommentConnectorOptions, ViewerCommentConnectorRoute, ViewerCommentConnectorStroke, ViewerCommentMessageContext, ViewerCommentThreadContext, ViewerContextMenuEvent, XlsxWorksheetLimits, ZoomableViewer, autoResize, buildDocxHighlightLayer, buildDocxTextLayer, isOoxmlDecodedImageLimitError, isTiffDecodeError, noteText, openExternalHyperlink, readDocxTextSelectionContext, resolveCommentAnchorRuns, resolveDocxCommentThreads, resolveRevisionAnchorRuns };
|
|
3138
3139
|
}
|
|
3139
3140
|
//#endregion
|
|
3140
|
-
//#region dist/.types-work/types-
|
|
3141
|
+
//#region dist/.types-work/types-CahOVsZA.d.ts
|
|
3141
3142
|
interface BlipBullet {
|
|
3142
3143
|
type: 'blip';
|
|
3143
3144
|
imagePath: string;
|
|
@@ -3429,7 +3430,7 @@ interface PictureElement {
|
|
|
3429
3430
|
sp3d?: Sp3d;
|
|
3430
3431
|
}
|
|
3431
3432
|
//#endregion
|
|
3432
|
-
//#region dist/.types-work/pptx-
|
|
3433
|
+
//#region dist/.types-work/pptx-XevDYFlC.d.ts
|
|
3433
3434
|
interface PptxTextRunInfo {
|
|
3434
3435
|
renderElementIndex?: number;
|
|
3435
3436
|
elementIndex?: number;
|
|
@@ -3961,7 +3962,7 @@ declare namespace pptx_d_exports {
|
|
|
3961
3962
|
export { ArrowEnd, AutoResizeOptions, Bevel3d, BlendMode, BlipBullet, BlipEffect, BlipEffectContainer, BlipEffectFill, BlipEffectImageFill, Bullet, Camera3d, ChartAreaGroupDecorations, ChartAxisNumberFormat, ChartBarGroupDecorations, ChartClassicSurfaceBandStyles, ChartDataLabelOverride, ChartDataPointOverride, ChartDataTable, ChartDecorationLineStyle, ChartDisplayUnits, ChartDisplayUnitsLabel, ChartElement, ChartErrBars, ChartExElementStyle, ChartExRenderer, ChartLabelBox, ChartLegendEntryOverride, ChartLineDashSegment, ChartLineGroupDecorations, ChartManualLayout, ChartModel, ChartOfPie, ChartPlotGroup, ChartPlotGroupAxisSlot, ChartPlotGroupKind, ChartRect, ChartRegionMapRenderer, ChartSeries, ChartSeriesDataLabels, ChartStockBarPaint, ChartStockUpDownBarStyle, ChartSurfaceBandFormat, ChartTextBox, ChartTextParagraph, ChartTextRun, ChartThreeD, ChartThreeDPictureOptions, ChartThreeDRenderer, ChartThreeDSeriesAxis, ChartThreeDSurface, ChartTrendline, ChartType, ChartexBoxSeries, ChartexBoxWhisker, ChartexGeography, ChartexHistogramBinning, ChartexRegionMap, ChartexRegionMapColors, ChartexRegionMapRow, ChartexSunburst, ChartexSunburstRow, ChartexTreemap, ChartexValueColorStop, CjkFallback, DecodedImageBudgetStrategy, DimOptions, DrawingMLCustomDashSegment, Duotone$1 as Duotone, EquationBranchFallback, EquationRun, Fill, FillRect, FindHighlightColors, FindMatch, FindMatchesOptions, Glow, GradientFill, GradientStop$1 as GradientStop, HiddenSlideMode, HyperlinkTarget, ImageFill, ImageResourceOptions, LegendManualLayout, LightRig, LineBreak, LoadOptions$1 as LoadOptions, MatchRunSlice, MathAccent, MathArray, MathBar, MathBorderBox, MathBox, MathDelimiter, MathFraction, MathFunc, MathGroup, MathGroupChr, MathLimit, MathNary, MathNode, MathPhant, MathRadical, MathRenderer, MathRun, MathSPre, MathScript, MathStyle, MathSvg, MediaElement, ModelSource, ModelSourceConfig, ModelSourceConfigValue, ModelSourceLoad, ModelSourceModule, ModelSourceModuleDescriptor, ModelSourceTarget, NoFill, OoxmlDecodedImageLimitError, OoxmlDecodedImageLimitMetric, OoxmlError, OoxmlErrorCode, OoxmlErrorStage, OoxmlFormat, OoxmlResourceLimit, OoxmlResourceLimitError, OoxmlResourceLimitErrorDetails, OoxmlResourceLimits, OoxmlResourceMetric, OoxmlResourceMetrics, OoxmlResourceMetricsCheckpoint, OoxmlResourceName, OoxmlResourcePolicySnapshot, OoxmlResourceUsageSnapshot, OoxmlResourceViolation, OoxmlUnsupportedContentDetails, OpenedModelSource, Paragraph, PathCmd$2 as PathCmd, PatternFill, PictureElement, PptxComment, PptxCommentAnchor, PptxCommentReply, PptxCommentSelectionContext, PptxCommentsOptions, PptxElementBounds, PptxElementContext, PptxElementContextOptions, PptxHighlightColors, PptxHighlightMatch, PptxMatchLocation, PptxPresentation, PptxScrollViewer, PptxScrollViewerOptions, PptxSelectionContext, PptxSelectionContextOptions, PptxSelectionRunLocator, PptxSlidePoint, PptxTextRunInfo, PptxTextSelectionContext, PptxViewer, PptxViewerOptions, PresentSlideOptions, Presentation, PresentationHandle, Reflection, RenderOptions, RenderSlideOptions, RenderSlideToBitmapOptions, Rot3d, Scene3d, SecondaryValueAxis, Shadow, ShapeElement, Slide, SlideElement, SlideElementOrigin, SlideElementSource, SlideRenderOptions, SoftEdge, SolidFill, Sp3d, SpaceLine, SrcRect, Stroke, TabStop$1 as TabStop, TableCell, TableElement, TableRow, TextBody, TextOutline, TextRect, TextRun, TextRunCallback, TextRunData, TextSelectionContextOptions, TiffDecodeError, TiffRenderOptions, TiffRenderer, TileInfo, ViewerCommentConnectorOptions, ViewerCommentConnectorRoute, ViewerCommentConnectorStroke, ViewerCommentMessageContext, ViewerCommentThreadContext, ViewerContextMenuEvent, XlsxWorksheetLimits, ZoomableViewer, autoResize, buildPptxHighlightLayer, buildPptxTextLayer, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, readPptxTextSelectionContext, renderSlide };
|
|
3962
3963
|
}
|
|
3963
3964
|
//#endregion
|
|
3964
|
-
//#region dist/.types-work/types-
|
|
3965
|
+
//#region dist/.types-work/types-BkLrqKyW.d.ts
|
|
3965
3966
|
type ShapeFill = Exclude<Fill, {
|
|
3966
3967
|
fillType: 'image';
|
|
3967
3968
|
} | {
|
|
@@ -4798,7 +4799,7 @@ interface XlsxRenderViewportOptions {
|
|
|
4798
4799
|
} | null;
|
|
4799
4800
|
}
|
|
4800
4801
|
//#endregion
|
|
4801
|
-
//#region dist/.types-work/xlsx-
|
|
4802
|
+
//#region dist/.types-work/xlsx-MBk1F2bM.d.ts
|
|
4802
4803
|
type ResolvedList = {
|
|
4803
4804
|
kind: 'values';
|
|
4804
4805
|
values: string[];
|
package/dist/types/math.d.ts
CHANGED
package/dist/types/node.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-oB13FB5_.d.ts
|
|
2
2
|
type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
|
|
3
3
|
interface MathRun {
|
|
4
4
|
kind: 'run';
|
|
@@ -1509,7 +1509,7 @@ interface ChartLegendEntryOverride {
|
|
|
1509
1509
|
fontItalic?: boolean | null;
|
|
1510
1510
|
}
|
|
1511
1511
|
//#endregion
|
|
1512
|
-
//#region dist/.types-work/hyperlink-
|
|
1512
|
+
//#region dist/.types-work/hyperlink-Du5ndoeF.d.ts
|
|
1513
1513
|
type CjkLang = 'kr' | 'sc' | 'tc' | 'hk' | 'jp';
|
|
1514
1514
|
type CjkFallback = 'auto' | CjkLang;
|
|
1515
1515
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml' | 'unsupported-image-effect' | 'invalid-numbering' | 'unsupported-content';
|
|
@@ -1619,7 +1619,7 @@ type HyperlinkTarget = {
|
|
|
1619
1619
|
slideIndex?: number;
|
|
1620
1620
|
};
|
|
1621
1621
|
//#endregion
|
|
1622
|
-
//#region dist/.types-work/model-source-
|
|
1622
|
+
//#region dist/.types-work/model-source-o_kIn8O6.d.ts
|
|
1623
1623
|
type ModelSourceTarget = 'docx' | 'xlsx' | 'pptx';
|
|
1624
1624
|
type ModelSourceConfigValue = string | number | boolean | null;
|
|
1625
1625
|
type ModelSourceConfig = Readonly<Record<string, ModelSourceConfigValue>>;
|
|
@@ -1649,7 +1649,7 @@ interface ModelSourceModule<TArchive = unknown> {
|
|
|
1649
1649
|
openModelSource(bytes: Uint8Array, config: ModelSourceConfig, signal?: AbortSignal, transfer?: readonly Transferable[]): Promise<OpenedModelSource<TArchive>>;
|
|
1650
1650
|
}
|
|
1651
1651
|
//#endregion
|
|
1652
|
-
//#region dist/.types-work/types-
|
|
1652
|
+
//#region dist/.types-work/types-C2FlVYUX.d.ts
|
|
1653
1653
|
interface DocxDocumentModel {
|
|
1654
1654
|
section: SectionProps;
|
|
1655
1655
|
body: BodyElement[];
|
|
@@ -1674,6 +1674,7 @@ interface EmbeddedFontRef {
|
|
|
1674
1674
|
fontKey: string;
|
|
1675
1675
|
}
|
|
1676
1676
|
interface DocSettings {
|
|
1677
|
+
footnoteLayoutLikeWW8?: boolean;
|
|
1677
1678
|
doNotUseHtmlParagraphAutoSpacing?: boolean;
|
|
1678
1679
|
kinsoku?: boolean;
|
|
1679
1680
|
noLineBreaksBefore?: string;
|
|
@@ -2455,7 +2456,7 @@ interface DocxTextRunInfo {
|
|
|
2455
2456
|
eastAsianVert?: boolean;
|
|
2456
2457
|
}
|
|
2457
2458
|
//#endregion
|
|
2458
|
-
//#region dist/.types-work/types-
|
|
2459
|
+
//#region dist/.types-work/types-CahOVsZA.d.ts
|
|
2459
2460
|
interface Paragraph extends Paragraph$1 {
|
|
2460
2461
|
mathFallbacks?: {
|
|
2461
2462
|
start: number;
|
|
@@ -2735,7 +2736,7 @@ interface PictureElement {
|
|
|
2735
2736
|
sp3d?: Sp3d;
|
|
2736
2737
|
}
|
|
2737
2738
|
//#endregion
|
|
2738
|
-
//#region dist/.types-work/types-
|
|
2739
|
+
//#region dist/.types-work/types-BkLrqKyW.d.ts
|
|
2739
2740
|
type ShapeFill = Exclude<Fill, {
|
|
2740
2741
|
fillType: 'image';
|
|
2741
2742
|
} | {
|
package/dist/types/pptx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-oB13FB5_.d.ts
|
|
2
2
|
type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
|
|
3
3
|
interface ImageResourceOptions {
|
|
4
4
|
decodedByteBudget?: number;
|
|
@@ -1533,12 +1533,12 @@ interface ChartRect {
|
|
|
1533
1533
|
h: number;
|
|
1534
1534
|
}
|
|
1535
1535
|
//#endregion
|
|
1536
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
1536
|
+
//#region dist/.types-work/chart-ex-contract-Btw9pmox.d.ts
|
|
1537
1537
|
interface ChartExRenderer {
|
|
1538
1538
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1539
1539
|
}
|
|
1540
1540
|
//#endregion
|
|
1541
|
-
//#region dist/.types-work/mathjax-
|
|
1541
|
+
//#region dist/.types-work/mathjax-DXhFag3c.d.ts
|
|
1542
1542
|
interface MathSvg {
|
|
1543
1543
|
svg: string;
|
|
1544
1544
|
widthEm: number;
|
|
@@ -1550,17 +1550,17 @@ interface MathRenderer {
|
|
|
1550
1550
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
1551
1551
|
}
|
|
1552
1552
|
//#endregion
|
|
1553
|
-
//#region dist/.types-work/three-d-contract-
|
|
1553
|
+
//#region dist/.types-work/three-d-contract-C1vpmN0H.d.ts
|
|
1554
1554
|
interface ChartThreeDRenderer {
|
|
1555
1555
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1556
1556
|
}
|
|
1557
1557
|
//#endregion
|
|
1558
|
-
//#region dist/.types-work/region-map-contract-
|
|
1558
|
+
//#region dist/.types-work/region-map-contract-C3gO5S5h.d.ts
|
|
1559
1559
|
interface ChartRegionMapRenderer {
|
|
1560
1560
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1561
1561
|
}
|
|
1562
1562
|
//#endregion
|
|
1563
|
-
//#region dist/.types-work/tiff-contract-
|
|
1563
|
+
//#region dist/.types-work/tiff-contract-CiDe3tba.d.ts
|
|
1564
1564
|
interface TiffRenderOptions {
|
|
1565
1565
|
targetWidthPx?: number;
|
|
1566
1566
|
targetHeightPx?: number;
|
|
@@ -1575,7 +1575,7 @@ interface TiffRenderer {
|
|
|
1575
1575
|
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
1576
1576
|
}
|
|
1577
1577
|
//#endregion
|
|
1578
|
-
//#region dist/.types-work/hyperlink-
|
|
1578
|
+
//#region dist/.types-work/hyperlink-Du5ndoeF.d.ts
|
|
1579
1579
|
type CjkLang = 'kr' | 'sc' | 'tc' | 'hk' | 'jp';
|
|
1580
1580
|
type CjkFallback = 'auto' | CjkLang;
|
|
1581
1581
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml' | 'unsupported-image-effect' | 'invalid-numbering' | 'unsupported-content';
|
|
@@ -1711,7 +1711,7 @@ type HyperlinkTarget = {
|
|
|
1711
1711
|
};
|
|
1712
1712
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1713
1713
|
//#endregion
|
|
1714
|
-
//#region dist/.types-work/find-highlight-
|
|
1714
|
+
//#region dist/.types-work/find-highlight-bgte5AM6.d.ts
|
|
1715
1715
|
interface TextSelectionContextOptions {
|
|
1716
1716
|
readonly maxTextCharacters?: number;
|
|
1717
1717
|
readonly maxRunLocators?: number;
|
|
@@ -1772,7 +1772,7 @@ interface FindHighlightColors {
|
|
|
1772
1772
|
active?: string;
|
|
1773
1773
|
}
|
|
1774
1774
|
//#endregion
|
|
1775
|
-
//#region dist/.types-work/model-source-
|
|
1775
|
+
//#region dist/.types-work/model-source-o_kIn8O6.d.ts
|
|
1776
1776
|
type ModelSourceTarget = 'docx' | 'xlsx' | 'pptx';
|
|
1777
1777
|
type ModelSourceConfigValue = string | number | boolean | null;
|
|
1778
1778
|
type ModelSourceConfig = Readonly<Record<string, ModelSourceConfigValue>>;
|
|
@@ -1802,7 +1802,7 @@ interface ModelSourceModule<TArchive = unknown> {
|
|
|
1802
1802
|
openModelSource(bytes: Uint8Array, config: ModelSourceConfig, signal?: AbortSignal, transfer?: readonly Transferable[]): Promise<OpenedModelSource<TArchive>>;
|
|
1803
1803
|
}
|
|
1804
1804
|
//#endregion
|
|
1805
|
-
//#region dist/.types-work/types-
|
|
1805
|
+
//#region dist/.types-work/types-CahOVsZA.d.ts
|
|
1806
1806
|
interface BlipBullet {
|
|
1807
1807
|
type: 'blip';
|
|
1808
1808
|
imagePath: string;
|
|
@@ -2094,7 +2094,7 @@ interface PictureElement {
|
|
|
2094
2094
|
sp3d?: Sp3d;
|
|
2095
2095
|
}
|
|
2096
2096
|
//#endregion
|
|
2097
|
-
//#region dist/.types-work/pptx-
|
|
2097
|
+
//#region dist/.types-work/pptx-XevDYFlC.d.ts
|
|
2098
2098
|
interface PptxTextRunInfo {
|
|
2099
2099
|
renderElementIndex?: number;
|
|
2100
2100
|
elementIndex?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-oB13FB5_.d.ts
|
|
2
2
|
interface Duotone {
|
|
3
3
|
clr1: string;
|
|
4
4
|
clr2: string;
|
|
@@ -1223,7 +1223,7 @@ interface ChartRect {
|
|
|
1223
1223
|
h: number;
|
|
1224
1224
|
}
|
|
1225
1225
|
//#endregion
|
|
1226
|
-
//#region dist/.types-work/region-map-contract-
|
|
1226
|
+
//#region dist/.types-work/region-map-contract-C3gO5S5h.d.ts
|
|
1227
1227
|
interface ChartRegionMapRenderer {
|
|
1228
1228
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1229
1229
|
}
|
package/dist/types/three-d.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-oB13FB5_.d.ts
|
|
2
2
|
interface Duotone {
|
|
3
3
|
clr1: string;
|
|
4
4
|
clr2: string;
|
|
@@ -1223,7 +1223,7 @@ interface ChartRect {
|
|
|
1223
1223
|
h: number;
|
|
1224
1224
|
}
|
|
1225
1225
|
//#endregion
|
|
1226
|
-
//#region dist/.types-work/three-d-contract-
|
|
1226
|
+
//#region dist/.types-work/three-d-contract-C1vpmN0H.d.ts
|
|
1227
1227
|
interface ChartThreeDRenderer {
|
|
1228
1228
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1229
1229
|
}
|
package/dist/types/tiff.d.ts
CHANGED
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-oB13FB5_.d.ts
|
|
2
2
|
type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
|
|
3
3
|
interface ImageResourceOptions {
|
|
4
4
|
decodedByteBudget?: number;
|
|
@@ -1345,12 +1345,12 @@ interface ChartRect {
|
|
|
1345
1345
|
h: number;
|
|
1346
1346
|
}
|
|
1347
1347
|
//#endregion
|
|
1348
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
1348
|
+
//#region dist/.types-work/chart-ex-contract-Btw9pmox.d.ts
|
|
1349
1349
|
interface ChartExRenderer {
|
|
1350
1350
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1351
1351
|
}
|
|
1352
1352
|
//#endregion
|
|
1353
|
-
//#region dist/.types-work/mathjax-
|
|
1353
|
+
//#region dist/.types-work/mathjax-DXhFag3c.d.ts
|
|
1354
1354
|
interface MathSvg {
|
|
1355
1355
|
svg: string;
|
|
1356
1356
|
widthEm: number;
|
|
@@ -1362,17 +1362,17 @@ interface MathRenderer {
|
|
|
1362
1362
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
1363
1363
|
}
|
|
1364
1364
|
//#endregion
|
|
1365
|
-
//#region dist/.types-work/three-d-contract-
|
|
1365
|
+
//#region dist/.types-work/three-d-contract-C1vpmN0H.d.ts
|
|
1366
1366
|
interface ChartThreeDRenderer {
|
|
1367
1367
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1368
1368
|
}
|
|
1369
1369
|
//#endregion
|
|
1370
|
-
//#region dist/.types-work/region-map-contract-
|
|
1370
|
+
//#region dist/.types-work/region-map-contract-C3gO5S5h.d.ts
|
|
1371
1371
|
interface ChartRegionMapRenderer {
|
|
1372
1372
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1373
1373
|
}
|
|
1374
1374
|
//#endregion
|
|
1375
|
-
//#region dist/.types-work/tiff-contract-
|
|
1375
|
+
//#region dist/.types-work/tiff-contract-CiDe3tba.d.ts
|
|
1376
1376
|
interface TiffRenderOptions {
|
|
1377
1377
|
targetWidthPx?: number;
|
|
1378
1378
|
targetHeightPx?: number;
|
|
@@ -1387,7 +1387,7 @@ interface TiffRenderer {
|
|
|
1387
1387
|
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
1388
1388
|
}
|
|
1389
1389
|
//#endregion
|
|
1390
|
-
//#region dist/.types-work/hyperlink-
|
|
1390
|
+
//#region dist/.types-work/hyperlink-Du5ndoeF.d.ts
|
|
1391
1391
|
type CjkLang = 'kr' | 'sc' | 'tc' | 'hk' | 'jp';
|
|
1392
1392
|
type CjkFallback = 'auto' | CjkLang;
|
|
1393
1393
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml' | 'unsupported-image-effect' | 'invalid-numbering' | 'unsupported-content';
|
|
@@ -1515,7 +1515,7 @@ type HyperlinkTarget = {
|
|
|
1515
1515
|
};
|
|
1516
1516
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1517
1517
|
//#endregion
|
|
1518
|
-
//#region dist/.types-work/find-highlight-
|
|
1518
|
+
//#region dist/.types-work/find-highlight-bgte5AM6.d.ts
|
|
1519
1519
|
interface ViewerContextMenuEvent<TContext> {
|
|
1520
1520
|
readonly originalEvent: MouseEvent;
|
|
1521
1521
|
getContext(): Promise<TContext | null>;
|
|
@@ -1559,7 +1559,7 @@ interface FindHighlightColors {
|
|
|
1559
1559
|
active?: string;
|
|
1560
1560
|
}
|
|
1561
1561
|
//#endregion
|
|
1562
|
-
//#region dist/.types-work/model-source-
|
|
1562
|
+
//#region dist/.types-work/model-source-o_kIn8O6.d.ts
|
|
1563
1563
|
type ModelSourceTarget = 'docx' | 'xlsx' | 'pptx';
|
|
1564
1564
|
type ModelSourceConfigValue = string | number | boolean | null;
|
|
1565
1565
|
type ModelSourceConfig = Readonly<Record<string, ModelSourceConfigValue>>;
|
|
@@ -1589,7 +1589,7 @@ interface ModelSourceModule<TArchive = unknown> {
|
|
|
1589
1589
|
openModelSource(bytes: Uint8Array, config: ModelSourceConfig, signal?: AbortSignal, transfer?: readonly Transferable[]): Promise<OpenedModelSource<TArchive>>;
|
|
1590
1590
|
}
|
|
1591
1591
|
//#endregion
|
|
1592
|
-
//#region dist/.types-work/types-
|
|
1592
|
+
//#region dist/.types-work/types-BkLrqKyW.d.ts
|
|
1593
1593
|
type ShapeFill = Exclude<Fill, {
|
|
1594
1594
|
fillType: 'image';
|
|
1595
1595
|
} | {
|
|
@@ -2426,7 +2426,7 @@ interface XlsxRenderViewportOptions {
|
|
|
2426
2426
|
} | null;
|
|
2427
2427
|
}
|
|
2428
2428
|
//#endregion
|
|
2429
|
-
//#region dist/.types-work/xlsx-
|
|
2429
|
+
//#region dist/.types-work/xlsx-MBk1F2bM.d.ts
|
|
2430
2430
|
type ResolvedList = {
|
|
2431
2431
|
kind: 'values';
|
|
2432
2432
|
values: string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region packages/core/src/nav/visible-index.ts
|
|
2
1
|
function e(e, t, n, r) {
|
|
3
2
|
for (let i = e + t; i >= 0 && i < r; i += t) if (!n(i)) return i;
|
|
4
3
|
return e;
|
|
@@ -13,5 +12,4 @@ function n(e, t) {
|
|
|
13
12
|
for (let r = 0; r < t; r++) e(r) || n++;
|
|
14
13
|
return n;
|
|
15
14
|
}
|
|
16
|
-
//#endregion
|
|
17
15
|
export { e as n, t as r, n as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { existsSync as e, readFileSync as t } from "node:fs";
|
|
2
2
|
import { fileURLToPath as n } from "node:url";
|
|
3
3
|
import { basename as r, dirname as i, resolve as a } from "node:path";
|
|
4
|
-
//#region packages/core/src/internal/owned-session.ts
|
|
5
4
|
async function o(e, t) {
|
|
6
5
|
let n = await e(), r;
|
|
7
6
|
try {
|
|
@@ -16,8 +15,6 @@ async function o(e, t) {
|
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region packages/node/src/wasm-loader.ts
|
|
21
18
|
function s(e) {
|
|
22
19
|
return new WebAssembly.Module(t(e));
|
|
23
20
|
}
|
|
@@ -31,5 +28,4 @@ function l(t, o, s) {
|
|
|
31
28
|
let u = a(c, r(o));
|
|
32
29
|
return e(u) || !s ? u : n(import.meta.resolve(s));
|
|
33
30
|
}
|
|
34
|
-
//#endregion
|
|
35
31
|
export { l as n, o as r, c as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { I as e, K as t, L as n, R as r, z as i } from "./bounded-raw-part-cache-
|
|
2
|
-
//#region packages/core/src/internal/wasm-runtime-generation.ts
|
|
1
|
+
import { I as e, K as t, L as n, R as r, z as i } from "./bounded-raw-part-cache-Bi_VqXmg.js";
|
|
3
2
|
function a(t) {
|
|
4
3
|
return r(t) ? new e(`WASM parser trapped and was recycled: ${t instanceof Error ? t.message : String(t)}`) : null;
|
|
5
4
|
}
|
|
@@ -93,5 +92,4 @@ var c = class {
|
|
|
93
92
|
this.failure = e, this.archive = void 0, n(t);
|
|
94
93
|
}
|
|
95
94
|
};
|
|
96
|
-
//#endregion
|
|
97
95
|
export { s as t };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { N as e, j as t, qt as n } from "./bounded-raw-part-cache-
|
|
2
|
-
import { T as r } from "./canvas-viewer-mechanics-
|
|
3
|
-
import { a as i, g as a } from "./renderer-
|
|
4
|
-
import { b as o } from "./worksheet-pull-client-
|
|
5
|
-
import { c as s, l as c } from "./xlsx-
|
|
6
|
-
import { n as l, o as u, r as d } from "./model-source-
|
|
7
|
-
import { t as f } from "./bundled-asset-url-
|
|
8
|
-
import { n as p } from "./host-layout-
|
|
9
|
-
//#region packages/xlsx/src/internal/workbook-model-source.ts
|
|
1
|
+
import { N as e, j as t, qt as n } from "./bounded-raw-part-cache-Bi_VqXmg.js";
|
|
2
|
+
import { T as r } from "./canvas-viewer-mechanics-ycCX6v-z.js";
|
|
3
|
+
import { a as i, g as a } from "./renderer-DFDF48zw.js";
|
|
4
|
+
import { b as o } from "./worksheet-pull-client-D5zAevQv.js";
|
|
5
|
+
import { c as s, l as c } from "./xlsx-DelYm4VZ.js";
|
|
6
|
+
import { n as l, o as u, r as d } from "./model-source-COXegBNA.js";
|
|
7
|
+
import { t as f } from "./bundled-asset-url-BMJ8vNHP.js";
|
|
8
|
+
import { n as p } from "./host-layout-Cz_lCuTZ.js";
|
|
10
9
|
async function m(i, d, f) {
|
|
11
10
|
let p = o(d);
|
|
12
11
|
d = {
|
|
@@ -53,7 +52,7 @@ async function m(i, d, f) {
|
|
|
53
52
|
let p = l(t, "xlsx");
|
|
54
53
|
try {
|
|
55
54
|
_.setSourceBytes(e.byteLength), _.checkpoint("container ready");
|
|
56
|
-
let t = g === "worker" ? (await import("./render-worker-host-
|
|
55
|
+
let t = g === "worker" ? (await import("./render-worker-host-BR7n4xKy.js")).createRenderWorker() : new (await (import("./worker-source-C29EQNUj.js"))).default(), n, i = h(t, p, d, (e) => {
|
|
57
56
|
n && (n.sourceMdw = e);
|
|
58
57
|
});
|
|
59
58
|
try {
|
|
@@ -90,5 +89,4 @@ function h(e, t, n, r) {
|
|
|
90
89
|
}
|
|
91
90
|
});
|
|
92
91
|
}
|
|
93
|
-
//#endregion
|
|
94
92
|
export { m as loadXlsxModelSource };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region packages/xlsx/src/worker-source.ts?worker&inline
|
|
2
1
|
var e = "var e=(e,t)=>()=>(e&&(t=e(e=0)),t);function t(e){if(!e.startsWith(`data:`))return null;let t=e.indexOf(`,`);if(t===-1)return null;let n=atob(e.slice(t+1)),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}var n,r,i=e((()=>{n=class e extends Error{code;details;constructor(t,n,r){super(n),this.name=`OoxmlError`,this.code=t,t===`unsupported-content`&&r&&(this.details=Object.freeze({format:r.format,reason:r.reason})),Object.setPrototypeOf(this,e.prototype)}},r=class e extends Error{code=`ooxml-resource-limit`;details;constructor(t,n){super(t),this.name=`OoxmlResourceLimitError`;let r=n.violation,i=Object.freeze({format:r.format,operation:r.operation,resource:r.resource,metric:r.metric,...r.part===void 0?{}:{part:r.part},limit:r.limit,observed:r.observed,configurable:r.configurable,usage:Object.freeze({archiveEntryCount:r.usage.archiveEntryCount,declaredInflatedBytes:r.usage.declaredInflatedBytes,...r.usage.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:r.usage.largestInflatedEntryBytes},distinctInflatedBytes:r.usage.distinctInflatedBytes,operationInflatedBytes:r.usage.operationInflatedBytes})});this.details=Object.freeze({stage:n.stage,violation:i}),Object.setPrototypeOf(this,e.prototype)}}}));function a(e){return e===`image-dimension`||e===`image-pixels`||e===`active-decoded-bytes`||e===`image-effect-count`||e===`image-effect-work`||e===`tiff-lzw-work`||e===`metafile-path-commands`||e===`metafile-record-points`||e===`metafile-record-polygons`||e===`metafile-record-rectangles`||e===`metafile-record-text-units`}function o(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function s(e){if(!(!e||typeof e!=`object`))try{let t=e,n=t.code,r=t.metric,i=t.limit,s=t.observed;return n!==`ooxml-decoded-image-limit`||!a(r)||!o(i)||!o(s)||s<=i?void 0:{metric:r,limit:i,observed:s}}catch{return}}var c,l,u,d,ee,te=e((()=>{c=1<<25,l=1<<27,c*4,l*4,u=Math.floor(c/4),d=l,d/u,ee=class e extends RangeError{metric;limit;observed;code=`ooxml-decoded-image-limit`;constructor(t,n,r){super(`OOXML decoded image limit exceeded: ${t} ${r} > ${n}`),this.metric=t,this.limit=n,this.observed=r,this.name=`OoxmlDecodedImageLimitError`,Object.setPrototypeOf(this,e.prototype)}}}));function ne(e){if(!(typeof e!=`object`||!e))try{let t=e,n=t.code,r=t.message;return n===`ooxml-tiff-decode`&&typeof r==`string`?{message:r}:void 0}catch{return}}var re=e((()=>{}));function f(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}function ie(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return f(t.requiredBytes)&&f(t.offeredBytes)&&t.requiredBytes>t.offeredBytes}var p=class e extends RangeError{code=`ooxml-insufficient-credit`;requiredBytes;offeredBytes;constructor(t){super(`Pull unit requires ${t.requiredBytes} bytes but credit is ${t.offeredBytes}`),this.name=`PullSessionInsufficientCreditError`,this.requiredBytes=t.requiredBytes,this.offeredBytes=t.offeredBytes,Object.setPrototypeOf(this,e.prototype)}};function ae(e){if(e instanceof p)return e;let t=e instanceof Error?e.message:String(e);if(!t.startsWith(`OOXML_INSUFFICIENT_CREDIT:`))return;let n;try{n=JSON.parse(t.slice(26))}catch{return}if(!n||typeof n!=`object`||Array.isArray(n))return;let r=n;if(!(r.code!==`ooxml-insufficient-credit`||!ie(r)))return new p(r)}i(),te(),re();const oe=`OOXML_RESOURCE_LIMIT:`;function m(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function se(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return m(t.archiveEntryCount)&&m(t.declaredInflatedBytes)&&(t.largestInflatedEntryBytes===void 0||m(t.largestInflatedEntryBytes))&&m(t.distinctInflatedBytes)&&m(t.operationInflatedBytes)}function h(e){let t;try{t=JSON.parse(new TextDecoder().decode(e))}catch{throw TypeError(`OOXML resource usage checkpoint is not valid JSON`)}if(!se(t))throw TypeError(`OOXML resource usage checkpoint is invalid`);return t}function ce(e){return e===`docx`||e===`xlsx`||e===`pptx`}function le(e){return e===`container`||e===`decompression`||e===`parsing`||e===`serialization`||e===`layout`||e===`rendering`||e===`worker`}function g(e,t){return typeof e==`string`&&e.length>0&&e.length<=t&&!/[\\u0000-\\u001f\\u007f]/u.test(e)}function _(e){return g(e,128)&&/^[a-z0-9][a-z0-9-]*$/u.test(e)}function ue(e){return!g(e,4096)||e.startsWith(`/`)||e.startsWith(`\\\\`)||e.includes(`\\\\`)||e.includes(`?`)||e.includes(`#`)||e.includes(`://`)||/^[a-z]:/iu.test(e)?!1:e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`)}const v=new Map([[`archive-entry:declared-inflated-bytes`,{stage:`container`,part:`required`}],[`archive-entry:actual-inflated-bytes`,{stage:`decompression`,part:`required`}],[`archive:entry-count`,{stage:`container`,part:`forbidden`}],[`archive:central-directory-bytes`,{stage:`container`,part:`forbidden`,configurable:!1}],[`archive:distinct-inflated-bytes`,{stage:`decompression`,part:`required`}],[`xml-event:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`xml-context:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`image-effect:work`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chartex-allocation:elements`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chartex-allocation:bytes`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chart-cache:points`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`numbering-marker:bytes`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chart-style-formats:entries`,{stage:`parsing`,part:`required`,configurable:!1}],[`chart-custom-number-formats:entries`,{stage:`parsing`,part:`required`,configurable:!1}],[`chart-number-format-bytes:bytes`,{stage:`parsing`,part:`required`,configurable:!1}],[`xml-tree:depth`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-row:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-shell:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`theme-style-reparse:bytes`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`style-inheritance:depth`,{stage:`parsing`,part:`required`,configurable:!1}],[`complex-field:depth`,{stage:`parsing`,part:`forbidden`,configurable:!1}]]),de=new Set([...v.keys()].map(e=>e.slice(0,e.indexOf(`:`)))),fe=new Set([...v.keys()].map(e=>e.slice(e.indexOf(`:`)+1)));function pe(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!ce(t.format)||!g(t.operation,256)||!_(t.resource)||!_(t.metric)||!m(t.limit)||!m(t.observed)||typeof t.configurable!=`boolean`||!se(t.usage)?!1:!(`part`in t)||ue(t.part)}function y(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(!le(t.stage)||!pe(t.violation))return!1;let n=t.violation,r=v.get(`${n.resource}:${n.metric}`);return r?t.stage!==r.stage||r.configurable===!1&&n.configurable!==!1?!1:r.part===`required`?n.part!==void 0:r.part===`forbidden`?n.part===void 0:!0:!(de.has(n.resource)&&fe.has(n.metric))}function me(e){return{archiveEntryCount:e.archiveEntryCount,declaredInflatedBytes:e.declaredInflatedBytes,...e.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:e.largestInflatedEntryBytes},distinctInflatedBytes:e.distinctInflatedBytes,operationInflatedBytes:e.operationInflatedBytes}}function he(e){if(!y(e))return;let t=e.violation,n={stage:e.stage,violation:{format:t.format,operation:t.operation,resource:t.resource,metric:t.metric,...t.part===void 0?{}:{part:t.part},limit:t.limit,observed:t.observed,configurable:t.configurable,usage:me(t.usage)}};return y(n)?n:void 0}function b(e){let t=e.violation;return`OOXML resource limit exceeded${t.part?` for ${t.part}`:``} (${t.resource}, ${e.stage}): ${t.metric} ${t.observed} > ${t.limit}`}function x(e){let t=e instanceof Error?e.message:String(e);if(!t.startsWith(oe))return;let n;try{n=JSON.parse(t.slice(21))}catch{return}if(!n||typeof n!=`object`)return;let i=n;if(!(i.code!==`ooxml-resource-limit`||!y(i.details)))return new r(b(i.details),i.details)}function ge(e){try{return e()}catch(e){throw e instanceof r||typeof e!=`string`&&!(e instanceof Error)?e:x(e)??e}}function _e(e){let t=e instanceof Error?e.message:String(e);if(t.startsWith(`OOXML_NOT_OOXML:`))return new n(`not-ooxml`,`This file is not an Office Open XML document: ${t.slice(16)}`)}function S(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e,n=t.format,r=t.reason;if(!(!_(n)||r!==`source-subset`))return{format:n,reason:r}}function C(e){return new n(`unsupported-content`,`Input is outside the source’s supported subset.`,e)}function ve(e){let t=typeof e==`string`?e:e instanceof Error?e.message:``;if(!(!t.startsWith(`MODEL_SOURCE_UNSUPPORTED:`)||t.length>1024))try{let e=S(JSON.parse(t.slice(25)));return e?C(e):void 0}catch{return}}function ye(e){return e===`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`||e instanceof Error&&e.message===`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`?new n(`unsupported-encryption`,`The configured source cannot decrypt this input.`):ve(e)??x(e)??_e(e)}function be(e){let t=s(e);if(t){let e=new ee(t.metric,t.limit,t.observed);return{message:e.message,errorName:e.name,code:e.code,decodedImage:t}}let i=ne(e);if(i)return{message:i.message,errorName:`TiffDecodeError`,code:`ooxml-tiff-decode`};let a=ae(e);if(a)return{message:a.message,errorName:a.name,code:a.code,insufficientCredit:{requiredBytes:a.requiredBytes,offeredBytes:a.offeredBytes}};let o=e instanceof n||e instanceof r?e:ye(e),c=o??e;if(o instanceof r||c&&typeof c==`object`&&c.code===`ooxml-resource-limit`){let e=c,t=he(e.details);return t?{message:typeof e.message==`string`?e.message:b(t),errorName:`OoxmlResourceLimitError`,code:`ooxml-resource-limit`,resourceLimit:t}:{message:`Invalid OOXML resource-limit error payload`,errorName:`Error`}}if(c&&typeof c==`object`&&c.code===`unsupported-content`){let e=S(c.details);return e?{message:C(e).message,code:`unsupported-content`,unsupportedContent:e}:{message:`Invalid unsupported-content error payload`,errorName:`Error`}}if(o instanceof n)return{message:typeof o.message==`string`?o.message:String(o.message),errorName:g(o.name,128)?o.name:`OoxmlError`,..._(o.code)?{code:o.code}:{}};let l=e instanceof Error?e.message:String(e);if(typeof l==`string`&&l.startsWith(oe))return{message:`Invalid OOXML resource-limit payload`,errorName:`Error`};let u=e instanceof Error?e:Error(l),d=u;return{message:typeof u.message==`string`?u.message:String(u.message),errorName:g(u.name,128)?u.name:`Error`,...typeof d.code==`string`?{code:d.code}:{}}}function w(e){try{return be(e)}catch{return{message:`Worker operation failed with an unreadable error`,errorName:`Error`}}}var xe=class{initialize;reinitialize;normalizeFailure;state=`uninitialized`;generationValue=0;readiness;poisonListeners=new Set;constructor(e,t,n){this.initialize=e,this.reinitialize=t,this.normalizeFailure=n}get generation(){return this.generationValue}get poisoned(){return this.state===`poisoned`}onPoison(e){return this.poisonListeners.add(e),()=>this.poisonListeners.delete(e)}async ensureReady(){if(this.state!==`ready`){if(!this.readiness){let e=this.state===`uninitialized`?this.initialize:this.reinitialize;this.readiness=Promise.resolve().then(e).then(()=>{this.generationValue+=1,this.state=`ready`,this.readiness=void 0},e=>{throw this.readiness=void 0,e})}await this.readiness}}run(e){try{return e()}catch(e){let t=this.normalizeFailure(e);throw t?(this.poison(t),t):e}}tryRunReady(e){if(this.state!==`ready`)return{current:!1};let t=this.generationValue,n=this.run(e);return this.state!==`ready`||t!==this.generationValue?{current:!1}:{current:!0,generation:t,value:n}}poison(e){this.state=`poisoned`,this.readiness=void 0;for(let t of this.poisonListeners)t(e)}assertCurrent(e){if(this.state!==`ready`||e!==this.generationValue)throw Error(`WASM archive session belongs to a discarded runtime generation`)}},T=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function Se(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function Ce(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}function we(e,t){return e({module_or_path:t})}var Te=class{init;options;runtime;wasmInput=null;currentArchive=null;constructor(e,t={}){this.init=e,this.options=t,this.runtime=new xe(()=>this.invokeConfigured(this.init),()=>this.invokeConfigured(this.options.reinit??this.init),Ee),this.runtime.onPoison(()=>this.dropPoisonedArchive())}setWasmInput(e){this.wasmInput=e,this.runtime.ensureReady().catch(()=>void 0)}setWasmUrl(e){this.setWasmInput(e)}get archive(){return this.currentArchive}setArchive(e){this.freeArchive(),this.currentArchive=e}disposeArchive(){this.freeArchive()}get poisoned(){return this.runtime.poisoned}async ensureReady(){await this.runtime.ensureReady()}run(e){return ge(()=>this.runtime.run(e))}poison(){this.runtime.poison(new T(`WASM parser was recycled`))}invokeConfigured(e){return this.wasmInput===null?Promise.reject(Error(`WasmParserHost: setWasmInput was never called`)):we(e,this.wasmInput)}freeArchive(){this.currentArchive!==null&&this.options.freeArchive&&this.options.freeArchive(this.currentArchive),this.currentArchive=null}dropPoisonedArchive(){let e=this.currentArchive;this.currentArchive=null,Ce(e)}};function Ee(e){return Se(e)?new T(`WASM parser trapped and was recycled: ${e instanceof Error?e.message:String(e)}`):null}function De(e){return e.byteOffset===0&&e.byteLength===e.buffer.byteLength&&e.buffer instanceof ArrayBuffer?e.buffer:e.slice().buffer}Object.freeze({maxArchiveEntryBytes:134217728,maxTotalInflatedBytes:268435456,maxArchiveEntries:4096});function Oe(e){return[e.maxArchiveEntryBytes===null?0n:BigInt(e.maxArchiveEntryBytes),e.maxTotalInflatedBytes===null?0n:BigInt(e.maxTotalInflatedBytes),e.maxArchiveEntries===null?0n:BigInt(e.maxArchiveEntries)]}const E=`ooxml-pull-v1`;function D(e,t){if(!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} must be a positive safe integer`)}function ke(e){if(!(typeof e==`string`&&e.length>0||typeof e==`number`&&Number.isSafeInteger(e)&&e>0))throw RangeError(`session id must be a non-empty string or positive safe integer`)}var Ae=class{owner;queue=Promise.resolve();leases=new Map;retainedBytes=0;retainedCount=0;maxRetainedBytes;maxRetainedCount;cleanups=new Set;pendingFatalCleanups=[];poisonRunning=!1;fatal;constructor(e){this.maxRetainedBytes=e?.maxRetainedBytes??64*1024*1024,this.maxRetainedCount=e?.maxRetainedCount??256,D(this.maxRetainedBytes,`max retained lease bytes`),D(this.maxRetainedCount,`max retained lease count`)}enqueue(e){let t=this.queue.then(e,e);return this.queue=t.then(()=>void 0,()=>void 0),t}acquire(e){return this.owner===void 0?(this.owner=e,!0):this.owner===e}release(e){this.owner===e&&(this.owner=void 0)}retainLease(e,t,n){if(!Number.isSafeInteger(n)||n<0)throw RangeError(`retained lease bytes are invalid`);let r=this.leases.get(e)??new Map;if(r.has(t))throw Error(`driver returned a duplicate lease id`);if(this.retainedCount+1>this.maxRetainedCount)throw RangeError(`retained lease count exceeds limit`);if(this.retainedBytes+n>this.maxRetainedBytes)throw RangeError(`retained lease bytes exceed limit`);r.set(t,n),this.leases.set(e,r),this.retainedCount++,this.retainedBytes+=n}releaseLease(e,t){let n=this.leases.get(e),r=n?.get(t);r!==void 0&&(n?.delete(t),n?.size===0&&this.leases.delete(e),this.retainedCount--,this.retainedBytes-=r)}registerCleanup(e){return this.fatal?(this.poisonRunning?this.pendingFatalCleanups.push(e):this.enqueue(e).catch(()=>void 0),()=>void 0):(this.cleanups.add(e),()=>this.cleanups.delete(e))}get fatalError(){return this.fatal}get registeredHostCount(){return this.cleanups.size}async poison(e){if(this.fatal??=e,this.poisonRunning)return this.fatal;this.poisonRunning=!0,this.pendingFatalCleanups.push(...this.cleanups);try{let e;for(;(e=this.pendingFatalCleanups.shift())!==void 0;)await e().catch(()=>void 0)}finally{this.poisonRunning=!1}return this.fatal}},je=class{options;coordinator;coordinatorOwner=Symbol(`pull-session-host`);unregisterCleanup;sequence=0;unacked;leases=new Map;activeDriverLeases=new Set;nextWireLeaseId;cancelRequested=!1;cancelComplete=!1;closeRequested=!1;closeComplete=!1;driverCancelComplete=!1;driverCloseComplete=!1;completed=!1;constructor(e){ke(e.sessionId),D(e.operationId,`operation id`),D(e.generation,`generation`),D(e.maxByteCredit,`max byte credit`),e.wireLeaseIdStart!==void 0&&D(e.wireLeaseIdStart,`wire lease id start`),this.options=e,this.coordinator=e.coordinator,this.nextWireLeaseId=e.wireLeaseIdStart??1,this.unregisterCleanup=this.coordinator.registerCleanup(()=>this.forceFatalCleanup())}dispatch(e,t){return this.coordinator.enqueue(async()=>{let n=await this.execute(e);try{t(n.response,n.transfer)}catch(e){throw await this.rollbackFailedPost(n),e}})}async rollbackFailedPost(e){let t=e.response;if(t.kind===`chunk`){let n=t.leaseId===void 0?void 0:this.leases.get(t.leaseId);try{await this.options.driver.disposeInvalidChunk?.({payload:t.payload,byteLength:t.byteLength,done:t.done,leaseId:n?.driverLeaseId,retainedBytes:n?.retainedBytes,transfer:e.transfer})}catch{}}this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);for(let[e,t]of[...this.leases])try{await this.options.driver.releaseLease?.(t.driverLeaseId)}catch{}finally{this.leases.delete(e),this.activeDriverLeases.delete(t.driverLeaseId),this.coordinator.releaseLease(this.coordinatorOwner,e)}if(this.cancelRequested=!0,!this.driverCancelComplete)try{await this.options.driver.cancel?.(),this.driverCancelComplete=!0}catch{}this.unregisterCleanup()}async execute(e){try{if(this.isStaleLifecycle(e)){let t=e.kind===`cancel`?`cancel`:`close`;return this.sameOperationIdentity(e)?{response:this.accepted(e,t,!0)}:{response:this.errorResponse(e,{message:`stale lifecycle targets another session or operation`,errorName:`PullSessionProtocolError`,code:`ooxml-stale-lifecycle`})}}this.validateCommandIdentity(e);let t=this.coordinator.fatalError;if(t)return e.kind===`pull`?{response:this.errorResponse(e,t)}:(e.kind===`cancel`?await this.cancel():e.kind===`close`?await this.close():e.kind===`release`&&await this.release(e.leaseId),{response:this.accepted(e,e.kind)});switch(e.kind){case`pull`:return await this.pull(e);case`ack`:return await this.ack(e.sequence),{response:this.accepted(e,`ack`)};case`release`:return await this.release(e.leaseId),{response:this.accepted(e,`release`)};case`cancel`:return await this.cancel(),{response:this.accepted(e,`cancel`)};case`close`:return await this.close(),{response:this.accepted(e,`close`)}}}catch(t){let n=w(t);return n.code===`ooxml-resource-limit`&&(n=await this.coordinator.poison(n)),{response:this.errorResponse(e,n)}}}async pull(e){if(this.closeRequested||this.cancelRequested||this.completed)throw Error(`pull session is closed`);if(this.unacked)throw Error(`previous chunk is not acknowledged`);if(!Number.isSafeInteger(e.sequence)||e.sequence<0||e.sequence!==this.sequence)throw Error(`pull command sequence mismatch`);if(this.validateHostCredit(e.byteCredit),!this.coordinator.acquire(this.coordinatorOwner))throw Error(`another operation has an unacknowledged package chunk`);let t;try{t=await this.options.driver.pull(e.byteCredit)}catch(e){throw this.coordinator.release(this.coordinatorOwner),e}let n=!1,r=!1,i,a;try{let o=this.options.driver.measureChunk(t),s=this.arrayBufferTransferBytes(t.transfer);if(o<s)throw RangeError(`measured chunk bytes are below ArrayBuffer transfer bytes`);if(a=Math.max(o,s),t.leaseId!==void 0){if(D(t.leaseId,`lease id`),t.retainedBytes===void 0)throw Error(`retained lease bytes are required`);if(this.activeDriverLeases.has(t.leaseId))throw r=!0,Error(`driver returned an active duplicate lease id`);i=this.allocateWireLeaseId(),this.coordinator.retainLease(this.coordinatorOwner,i,t.retainedBytes),this.leases.set(i,{driverLeaseId:t.leaseId,retainedBytes:t.retainedBytes}),this.activeDriverLeases.add(t.leaseId),n=!0}else if(t.retainedBytes!==void 0)throw Error(`retained lease bytes require a lease id`);if(!Number.isSafeInteger(a)||a<0)throw RangeError(`host chunk byte length must be a non-negative safe integer`);if(a>e.byteCredit)throw RangeError(`host chunk exceeds byte credit`)}catch(e){let a;try{await this.options.driver.disposeInvalidChunk?.(t)}catch(e){a=e}if(n&&i!==void 0)try{await this.release(i)}catch(e){a??=e}else if(t.leaseId!==void 0&&!r)try{await this.options.driver.releaseLease?.(t.leaseId)}catch(e){a??=e}if(r)try{await this.cancel()}catch(e){a??=e}throw this.coordinator.release(this.coordinatorOwner),a||e}return this.unacked={sequence:this.sequence,done:t.done},{response:{kind:`chunk`,protocol:E,...this.identity(),requestId:e.requestId,sequence:this.sequence,byteLength:a,done:t.done,payload:t.payload,leaseId:i,usage:this.resourceUsage()},transfer:t.transfer}}async ack(e){if(!Number.isSafeInteger(e)||e<0)throw RangeError(`invalid ack sequence`);if(e<this.sequence)return;if(!this.unacked||e!==this.sequence)throw Error(`ack sequence mismatch`);let t=this.unacked.done;await this.options.driver.acknowledge?.(e),this.unacked=void 0,this.coordinator.release(this.coordinatorOwner),this.sequence++,t&&(this.completed=!0,this.maybeUnregisterCompleted())}async release(e){D(e,`wire lease id`);let t=this.leases.get(e);t&&(await this.options.driver.releaseLease?.(t.driverLeaseId),this.leases.delete(e),this.activeDriverLeases.delete(t.driverLeaseId),this.coordinator.releaseLease(this.coordinatorOwner,e),this.maybeUnregisterCompleted())}async cancel(){if(this.cancelComplete)return;this.cancelRequested=!0,this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);let e;try{await this.releaseAllLeases()}catch(t){e=t}if(!this.driverCancelComplete)try{await this.options.driver.cancel?.(),this.driverCancelComplete=!0}catch(t){e??=t}if(e)throw e;this.cancelComplete=!0,this.unregisterCleanup()}async close(){if(this.closeComplete)return;this.closeRequested=!0,this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);let e;try{await this.releaseAllLeases()}catch(t){e=t}if(!this.driverCloseComplete)try{await this.options.driver.close?.(),this.driverCloseComplete=!0}catch(t){e??=t}if(e)throw e;this.closeComplete=!0,this.unregisterCleanup()}async releaseAllLeases(){let e;for(let t of[...this.leases.keys()])try{await this.release(t)}catch(t){e??=t}if(e)throw e}validateCommandIdentity(e){if(e.protocol!==`ooxml-pull-v1`||e.sessionId!==this.options.sessionId||e.operationId!==this.options.operationId||e.generation!==this.options.generation||!Number.isSafeInteger(e.requestId)||e.requestId<=0)throw Error(`stale or mismatched pull session command`)}validateHostCredit(e){if(D(e,`byte credit`),e>this.options.maxByteCredit)throw RangeError(`byte credit exceeds host maximum`)}accepted(e,t,n=!1){return{kind:`accepted`,protocol:E,...n?{sessionId:e.sessionId,operationId:e.operationId,generation:e.generation}:this.identity(),requestId:e.requestId,command:t,usage:this.resourceUsage()}}identity(){return{sessionId:this.options.sessionId,operationId:this.options.operationId,generation:this.options.generation}}isStaleLifecycle(e){return(e.kind===`cancel`||e.kind===`close`)&&e.protocol===`ooxml-pull-v1`&&Number.isSafeInteger(e.requestId)&&e.requestId>0&&Number.isSafeInteger(e.generation)&&e.generation>0&&e.generation<this.options.generation}sameOperationIdentity(e){return e.sessionId===this.options.sessionId&&e.operationId===this.options.operationId}errorResponse(e,t){return{kind:`error`,protocol:E,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,error:t,usage:this.errorResourceUsage()}}async forceFatalCleanup(){this.cancelRequested=!0,this.unacked=void 0,this.coordinator.release(this.coordinatorOwner);let e;for(let t of[...this.leases.keys()])try{await this.release(t)}catch(t){e??=t}if(!this.driverCancelComplete)try{await this.options.driver.cancel?.(),this.driverCancelComplete=!0}catch(t){e??=t}if(e)throw e;this.unregisterCleanup()}allocateWireLeaseId(){if(!Number.isSafeInteger(this.nextWireLeaseId)||this.nextWireLeaseId<=0)throw RangeError(`wire lease id space exhausted`);return this.nextWireLeaseId++}arrayBufferTransferBytes(e){let t=0;for(let n of e??[])if(n instanceof ArrayBuffer&&(t+=n.byteLength,!Number.isSafeInteger(t)))throw RangeError(`ArrayBuffer transfer bytes overflow`);return t}maybeUnregisterCompleted(){this.completed&&this.leases.size===0&&this.unregisterCleanup()}resourceUsage(){return this.options.driver.resourceUsage?.()}errorResourceUsage(){try{return this.resourceUsage()}catch{return}}};const O=2**53-1-1;function k(e){return Object.freeze({maxRows:e.maxRows,maxCells:e.maxCells,maxOwnedUtf8Bytes:e.maxOwnedUtf8Bytes,maxJsonBytes:e.maxJsonBytes})}const A=Object.freeze({worksheet:k({maxRows:1e5,maxCells:25e4,maxOwnedUtf8Bytes:33554432,maxJsonBytes:67108864}),cache:k({maxRows:2e5,maxCells:5e5,maxOwnedUtf8Bytes:67108864,maxJsonBytes:134217728}),maxCoordinateIndexEntries:25e4});function j(e,t){let n=e[t];if(n===void 0)return A.worksheet[t];if(typeof n!=`number`)throw TypeError(`xlsxWorksheetLimits.${t} must be a number`);if(!Number.isSafeInteger(n)||n<=0||n>O)throw RangeError(`xlsxWorksheetLimits.${t} must be a positive safe integer no greater than ${O}`);return n}function Me(e={}){let t=e.xlsxWorksheetLimits,n={};if(t!==void 0){if(typeof t!=`object`||!t||Array.isArray(t))throw TypeError(`xlsxWorksheetLimits must be a non-null, non-array object`);n=t}let r=k({maxRows:j(n,`maxRows`),maxCells:j(n,`maxCells`),maxOwnedUtf8Bytes:j(n,`maxOwnedUtf8Bytes`),maxJsonBytes:j(n,`maxJsonBytes`)}),i=A,a=k({maxRows:Math.max(i.cache.maxRows,r.maxRows),maxCells:Math.max(i.cache.maxCells,r.maxCells),maxOwnedUtf8Bytes:Math.max(i.cache.maxOwnedUtf8Bytes,r.maxOwnedUtf8Bytes),maxJsonBytes:Math.max(i.cache.maxJsonBytes,r.maxJsonBytes)});return Object.freeze({worksheet:r,cache:a,maxCoordinateIndexEntries:Math.max(i.maxCoordinateIndexEntries,r.maxCells)})}function Ne(e){let{worksheet:t}=e;return[BigInt(t.maxRows),BigInt(t.maxCells),BigInt(t.maxOwnedUtf8Bytes),BigInt(t.maxJsonBytes)]}var M=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Fe.unregister(this),e}free(){let e=this.__destroy_into_raw();G.__wbg_xlsxarchive_free(e,0)}acknowledge_sheet_cursor_terminal(){let e=G.xlsxarchive_acknowledge_sheet_cursor_terminal(this.__wbg_ptr);if(e[1])throw B(e[0])}assert_healthy(){let e=G.xlsxarchive_assert_healthy(this.__wbg_ptr);if(e[1])throw B(e[0])}cancel_sheet_cursor(){G.xlsxarchive_cancel_sheet_cursor(this.__wbg_ptr)}close_sheet_cursor(){G.xlsxarchive_close_sheet_cursor(this.__wbg_ptr)}extract_image(e){let t=z(e,G.__wbindgen_malloc,G.__wbindgen_realloc),n=W,r=G.xlsxarchive_extract_image(this.__wbg_ptr,t,n);if(r[3])throw B(r[2]);var i=N(r[0],r[1]).slice();return G.__wbindgen_free(r[0],r[1]*1,1),i}constructor(e,t,n,r){let i=Le(e,G.__wbindgen_malloc),a=W,o=G.xlsxarchive_new(i,a,!R(t),R(t)?BigInt(0):t,!R(n),R(n)?BigInt(0):n,!R(r),R(r)?BigInt(0):r);if(o[2])throw B(o[1]);return this.__wbg_ptr=o[0]>>>0,Fe.register(this,this.__wbg_ptr,this),this}open_sheet_cursor(e,t){let n=z(t,G.__wbindgen_malloc,G.__wbindgen_realloc),r=W,i=G.xlsxarchive_open_sheet_cursor(this.__wbg_ptr,e,n,r);if(i[1])throw B(i[0])}parse(){let e=G.xlsxarchive_parse(this.__wbg_ptr);if(e[3])throw B(e[2]);var t=N(e[0],e[1]).slice();return G.__wbindgen_free(e[0],e[1]*1,1),t}pull_sheet_cursor(e){let t=G.xlsxarchive_pull_sheet_cursor(this.__wbg_ptr,e);if(t[3])throw B(t[2]);var n=N(t[0],t[1]).slice();return G.__wbindgen_free(t[0],t[1]*1,1),n}resource_usage(){let e=G.xlsxarchive_resource_usage(this.__wbg_ptr);if(e[3])throw B(e[2]);var t=N(e[0],e[1]).slice();return G.__wbindgen_free(e[0],e[1]*1,1),t}set_worksheet_limits(e,t,n,r){let i=G.xlsxarchive_set_worksheet_limits(this.__wbg_ptr,e,t,n,r);if(i[1])throw B(i[0])}sheet_cursor_pull_finished(){return G.xlsxarchive_sheet_cursor_pull_finished(this.__wbg_ptr)!==0}sheet_cursor_resource_usage(){let e=G.xlsxarchive_sheet_cursor_resource_usage(this.__wbg_ptr);if(e[3])throw B(e[2]);var t=N(e[0],e[1]).slice();return G.__wbindgen_free(e[0],e[1]*1,1),t}to_markdown(){let e,t;try{let i=G.xlsxarchive_to_markdown(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,B(i[2]);return e=n,t=r,F(n,r)}finally{G.__wbindgen_free(e,t,1)}}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);function Pe(){return{__proto__:null,\"./xlsx_parser_bg.js\":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(F(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(F(e,t))}finally{G.__wbindgen_free(n,r,1)}},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=z(n,G.__wbindgen_malloc,G.__wbindgen_realloc),i=W;Ie().setInt32(e+4,i,!0),Ie().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return F(e,t)},__wbindgen_init_externref_table:function(){let e=G.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}const Fe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>G.__wbg_xlsxarchive_free(e>>>0,1));function N(e,t){return e>>>=0,L().subarray(e/1,e/1+t)}let P=null;function Ie(){return(P===null||P.buffer.detached===!0||P.buffer.detached===void 0&&P.buffer!==G.memory.buffer)&&(P=new DataView(G.memory.buffer)),P}function F(e,t){return e>>>=0,Re(e,t)}let I=null;function L(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(G.memory.buffer)),I}function R(e){return e==null}function Le(e,t){let n=t(e.length*1,1)>>>0;return L().set(e,n/1),W=e.length,n}function z(e,t,n){if(n===void 0){let n=U.encode(e),r=t(n.length,1)>>>0;return L().subarray(r,r+n.length).set(n),W=n.length,r}let r=e.length,i=t(r,1)>>>0,a=L(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=L().subarray(i+o,i+r),a=U.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return W=o,i}function B(e){let t=G.__wbindgen_externrefs.get(e);return G.__externref_table_dealloc(e),t}let V=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});V.decode();let H=0;function Re(e,t){return H+=t,H>=2146435072&&(V=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),V.decode(),H=t),V.decode(L().subarray(e,e+t))}const U=new TextEncoder;`encodeInto`in U||(U.encodeInto=function(e,t){let n=U.encode(e);return t.set(n),{read:e.length,written:n.length}});let W=0,G;function ze(e,t){return G=e.exports,P=null,I=null,G.__wbindgen_start(),G}async function Be(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.ok&&n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}async function Ve(e){if(G!==void 0)return G;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`));let t=Pe();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await Be(await e,t);return ze(n,r)}async function He(e){return G=void 0,P=null,I=null,Ve(e)}function Ue(e,t){let n=e(),r=t();return{workbook:n,usage:r===void 0?void 0:h(r)}}function We(e,t){for(let n of e)for(let e of n.cells){let n=e.value;if(n.type===`shared`){let r=t[n.si];if(r){let t={type:`text`,text:r.text};r.runs!==void 0&&(t.runs=r.runs),r.phoneticRuns!==void 0&&(t.phoneticRuns=r.phoneticRuns),r.phoneticPr!==void 0&&(t.phoneticPr=r.phoneticPr),e.value=t}else e.value={type:`text`,text:``}}}return e}const Ge=new Set([`outline`,`merge`,`conditional-format`,`ancillary-content`,`metadata-unavailable`,`unordered-rows`]);function Ke(e,t,n,r){let i=e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=JSON.parse(new TextDecoder().decode(i));if(!a||typeof a!=`object`||!(`kind`in a))throw Error(`worksheet cursor returned an invalid unit`);let o=a;if(t!==(o.kind===`finished`))throw Error(`worksheet cursor terminal marker mismatch`);if(o.kind===`rows`){if(!Array.isArray(o.rows))throw Error(`worksheet row unit is missing rows`);return n&&We(o.rows,n),r?.(o.rows),{kind:`rows`,rows:o.rows}}if(o.kind===`preview`){if(!Number.isSafeInteger(o.maxRow)||!Number.isSafeInteger(o.maxCol)||o.maxRow<0||o.maxCol<0||o.worksheet===null==(o.reason===null)||o.worksheet!==null&&(typeof o.worksheet!=`object`||Array.isArray(o.worksheet))||o.reason!==null&&!Ge.has(o.reason))throw Error(`worksheet preview unit is invalid`);return o.worksheet&&(o.worksheet.rows=[]),o}if(o.kind===`finished`){if(!o.worksheet||typeof o.worksheet!=`object`)throw Error(`worksheet terminal unit is missing its worksheet`);return o.worksheet.rows=[],{kind:`finished`,worksheet:o.worksheet}}throw Error(`worksheet cursor returned an unknown unit kind`)}const qe=new WeakMap;function Je(e,t){qe.set(e,t)}function K(e,t){if(!Number.isSafeInteger(e)||e<0)throw Error(`${t} must be a non-negative safe integer`)}function q(e,t,n){return K(e,`resource measurement`),K(t,`resource measurement`),K(n,`resource measurement limit`),e>n||t>n||t>n-e?n===2**53-1?n:n+1:e+t}function Ye(e,t=2**53-1){K(t,`resource measurement limit`);let n=0;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r),a;if(i<=127)a=1;else if(i<=2047)a=2;else if(i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343?(a=4,r+=1):a=3}else a=3;if(n=q(n,a,t),n>t)return n}return n}function Xe(e,t=2**53-1){K(t,`resource measurement limit`);let n=q(0,2,t);if(n>t)return n;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r),a;if(i===34||i===92||i===8||i===9||i===10||i===12||i===13)a=2;else if(i<=31)a=6;else if(i<=127)a=1;else if(i<=2047)a=2;else if(i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343?(a=4,r+=1):a=6}else a=i>=55296&&i<=57343?6:3;if(n=q(n,a,t),n>t)return n}return n}function J(e,t){return q(0,e,t)}function Y(e,t=2**53-1,n=!1){if(K(t,`resource measurement limit`),e===null)return{jsonBytes:J(4,t),stringValueUtf8Bytes:0};if(typeof e==`string`)return{jsonBytes:Xe(e,t),stringValueUtf8Bytes:Ye(e,t)};if(typeof e==`boolean`)return{jsonBytes:J(e?4:5,t),stringValueUtf8Bytes:0};if(typeof e==`number`)return{jsonBytes:J((Number.isFinite(e)?String(Object.is(e,-0)?0:e):`null`).length,t),stringValueUtf8Bytes:0};if(typeof e==`bigint`)throw TypeError(`BigInt values cannot be serialized to JSON`);if(Array.isArray(e)){let n=J(2,t),r=0;for(let i=0;i<e.length;i+=1){i!==0&&(n=q(n,1,t));let a=Y(e[i],t,!0);n=q(n,a.jsonBytes,t),r=q(r,a.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}if(typeof e==`object`){let n=J(2,t),r=0,i=0;for(let[a,o]of Object.entries(e)){if(o===void 0||typeof o==`function`||typeof o==`symbol`)continue;i++!==0&&(n=q(n,1,t)),n=q(n,Xe(a,t),t),n=q(n,1,t);let e=Y(o,t);n=q(n,e.jsonBytes,t),r=q(r,e.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}return{jsonBytes:n?J(4,t):0,stringValueUtf8Bytes:0}}i();const Ze=Object.freeze({archiveEntryCount:0,declaredInflatedBytes:0,distinctInflatedBytes:0,operationInflatedBytes:0});function Qe(e,t=A){let{maxCells:n,maxOwnedUtf8Bytes:r}=t.worksheet,i=e.reduce((e,t)=>q(e,t.cells.length,n),0);return{rows:e.length,cells:i,ownedUtf8Bytes:e.reduce((e,t)=>t.cells.reduce((e,t)=>{let n=Y(t.value,r).stringValueUtf8Bytes;return q(e,q(n,t.formula===void 0?0:Ye(t.formula,r),r),r)},e),0)}}function $e(e,t,n=A){let r=Y(e,n.worksheet.maxJsonBytes);return{...t,jsonBytes:r.jsonBytes}}function et(e,t,n=A){let r=n.worksheet;return{rows:q(e.rows,t.rows,r.maxRows),cells:q(e.cells,t.cells,r.maxCells),ownedUtf8Bytes:q(e.ownedUtf8Bytes,t.ownedUtf8Bytes,r.maxOwnedUtf8Bytes)}}function tt(e,t,n,i,a,o,s,c=n!==`delimited-text-source`){let l=n===`worksheet-json`?`serialization`:`parsing`;return new r(b({stage:l,violation:{part:t,resource:n,metric:i,observed:o,limit:a}}),{stage:l,violation:{format:`xlsx`,operation:e,resource:n,metric:i,...t===void 0?{}:{part:t},limit:a,observed:Math.min(o,a+1),configurable:c,usage:s??Ze}})}function nt(e,t,n,r,i=A){let a=i.worksheet,o=[[`rows`,e.rows,a.maxRows],[`cells`,e.cells,a.maxCells],[`owned-utf8-bytes`,e.ownedUtf8Bytes,a.maxOwnedUtf8Bytes]];for(let[e,i,a]of o)if(i>a)throw tt(t,n,e===`owned-utf8-bytes`?`worksheet-cell-content`:`worksheet-model`,e,a,i,r)}function rt(e,t,n,r,i=A){let a=i.worksheet.maxJsonBytes;if(e>a)throw tt(t,n,`worksheet-json`,`bytes`,a,e,r)}i();var it=class{archive;acceptWorksheet;executeArchive;prepareRows;provisional;worksheetPolicy;coordinator=new Ae;sessions=new Map;operationTail=Promise.resolve();pendingOpens=new Map;resourceFailure;constructor(e,t,n=e=>e(this.requireArchive()),r,i,a=()=>A){this.archive=e,this.acceptWorksheet=t,this.executeArchive=n,this.prepareRows=r,this.provisional=i,this.worksheetPolicy=a}reserveOpen(e){this.pendingOpens.set(e.sessionId,{identity:e,canceled:!1})}abandonOpen(e){this.pendingOpens.delete(e)}get pendingOpenCount(){return this.pendingOpens.size}runDuringPull(e){return this.sessions.size===0?this.run(e):this.coordinator.enqueue(async()=>{if(this.resourceFailure)throw this.resourceFailure;try{return e()}catch(e){throw e instanceof r&&(this.resourceFailure??=e),e}})}async open(e,t,n){if(this.resourceFailure)throw this.resourceFailure;let i=this.pendingOpens.get(n.sessionId);if(!i||i.identity.operationId!==n.operationId||i.identity.generation!==n.generation)throw Error(`worksheet pull session open reservation is stale or missing`);let a=this.worksheetPolicy(),o,s=new Promise(e=>{o=e}),c=this.operationTail.then(()=>this.coordinator.enqueue(async()=>{if(i.canceled)throw Error(`worksheet pull session open was canceled`);this.executeArchive(n=>n.open_sheet_cursor(e,t));let s=[],c={rows:0,cells:0,ownedUtf8Bytes:0},l,u=!1,d=new je({...n,maxByteCredit:67108864,coordinator:this.coordinator,driver:{pull:()=>{let t=this.executeArchive(e=>e.pull_sheet_cursor(128)),n=this.executeArchive(e=>e.sheet_cursor_pull_finished());if(this.acceptWorksheet){let i=Ke(t,n,void 0,this.prepareRows);try{if(i.kind===`preview`)i.worksheet&&(i.worksheet.rows=s,Je(i.worksheet,a),this.provisional?.preview(e,i.worksheet));else if(i.kind===`rows`){let e=et(c,Qe(i.rows,a),a);nt(e,`get-worksheet-worker`,void 0,this.readResourceUsage(),a),s.push(...i.rows),c=e}else i.kind===`finished`&&(l=i.worksheet)}catch(e){throw e instanceof r&&(this.resourceFailure??=e),e}}u=n;let i=De(t);return{payload:i,byteLength:i.byteLength,done:n,transfer:[i]}},measureChunk:({payload:e})=>e.byteLength,acknowledge:()=>{if(!u)return;let t,i;try{if(this.acceptWorksheet){if(!l)throw Error(`worksheet terminal payload is missing`);l.rows=l.parseError?[]:s;let n=l.parseError?{rows:0,cells:0,ownedUtf8Bytes:0}:c,r=$e(l,n,a),o=this.readResourceUsage();nt(r,`get-worksheet-worker`,void 0,o,a),rt(r.jsonBytes,`get-worksheet-worker`,void 0,o,a),Je(l,a);let u=this.acceptWorksheet(e,l,r,o);typeof u==`function`?t=u:u&&({rollback:t,commit:i}=u)}this.executeArchive(e=>e.acknowledge_sheet_cursor_terminal()),i?.()}catch(e){throw t?.(),e instanceof r&&(this.resourceFailure??=e),e}u=!1,this.sessions.delete(n.sessionId),this.provisional?.stop(e),o()},cancel:()=>{try{this.archive()&&this.executeArchive(e=>e.cancel_sheet_cursor())}finally{this.sessions.delete(n.sessionId),this.provisional?.stop(e),o()}},close:()=>{try{this.archive()&&this.executeArchive(e=>e.close_sheet_cursor())}finally{this.sessions.delete(n.sessionId),this.provisional?.stop(e),o()}},resourceUsage:()=>this.readResourceUsage()}});this.sessions.set(n.sessionId,{host:d,identity:n}),this.pendingOpens.delete(n.sessionId)}));this.operationTail=c.then(()=>s,()=>void 0);try{await c}catch(e){throw this.pendingOpens.delete(n.sessionId),o(),e}}async postOpenedSafely(e,t,n){try{t()}catch(t){await this.closeIdentity(e);try{n(t)}catch{}}}dispatch(e,t){let n=this.sessions.get(e.sessionId);if(n)return n.host.dispatch(e,t);let r=this.pendingOpens.get(e.sessionId);if(r&&(e.kind===`cancel`||e.kind===`close`)){let n=r.identity.operationId===e.operationId&&r.identity.generation===e.generation;return n&&(r.canceled=!0),t(n?{protocol:E,kind:`accepted`,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,command:e.kind}:{protocol:E,kind:`error`,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,error:{message:`stale lifecycle targets another pending worksheet operation`,errorName:`PullSessionProtocolError`,code:`ooxml-stale-lifecycle`}}),Promise.resolve()}return e.kind===`cancel`||e.kind===`close`?(t({protocol:E,kind:`accepted`,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,command:e.kind}),Promise.resolve()):(t({protocol:E,kind:`error`,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,error:w(Error(`worksheet pull session is not open`))}),Promise.resolve())}async dispatchSafely(e,t){try{await this.dispatch(e,t)}catch(n){try{t({protocol:E,kind:`error`,sessionId:e.sessionId,operationId:e.operationId,generation:e.generation,requestId:e.requestId,error:w(n)})}catch{}}}run(e){let t=this.operationTail.then(()=>this.coordinator.enqueue(async()=>{if(this.resourceFailure)throw this.resourceFailure;return e()})).catch(e=>{throw e instanceof r&&(this.resourceFailure??=e),e});return this.operationTail=t.then(()=>void 0,()=>void 0),t}async reset(){for(let e of this.pendingOpens.values())e.canceled=!0;let e=1;for(let{host:t,identity:n}of[...this.sessions.values()])await t.dispatch({protocol:E,kind:`close`,...n,requestId:e++},()=>void 0);this.sessions.clear(),await this.operationTail,this.pendingOpens.clear(),this.resourceFailure=void 0}requireArchive(){let e=this.archive();if(!e)throw Error(`Workbook not loaded`);return e}async closeIdentity(e){let t=this.sessions.get(e.sessionId);if(t){await t.host.dispatch({protocol:E,kind:`close`,...e,requestId:1},()=>void 0);return}let n=this.pendingOpens.get(e.sessionId);n&&n.identity.operationId===e.operationId&&n.identity.generation===e.generation&&(n.canceled=!0)}readResourceUsage(){let e=this.executeArchive(e=>e.sheet_cursor_resource_usage?.());return e===void 0?void 0:h(e)}};function at(e){return!!e&&typeof e==`object`&&e.protocol===`ooxml-pull-v1`}const X=new Te(Ve,{freeArchive:e=>e.free(),reinit:He});let Z,Q=A;const $=new it(()=>Z?.cursor()??X.archive,void 0,e=>{if(Z)return Z.execute(e);let t=X.archive;if(!t)throw Error(`Workbook not loaded`);return X.run(()=>e(t))},void 0,void 0,()=>Q);self.onmessage=async e=>{let n=e.data;if(Z?.isHostLayoutResult(n))return;if(at(n)){await $.dispatchSafely(n,(e,t)=>self.postMessage(e,t));return}if(n.type===`init`){X.setWasmInput(t(n.wasmUrl)??n.wasmUrl);return}let r=n.id;n.type===`openSheetSession`&&$.reserveOpen(n);try{let e=n.type===`parse`?Me({xlsxWorksheetLimits:n.worksheetPolicy?.worksheet}):void 0;if(n.type===`openSheetSession`){Z||await X.ensureReady(),Z?.cursor()?Z.execute(e=>e.assert_healthy()):X.archive&&X.run(()=>X.archive?.assert_healthy()),await $.open(n.sheetIndex,n.sheetName,n),await $.postOpenedSafely(n,()=>self.postMessage({type:`sheetSessionOpened`,id:r,sessionId:n.sessionId,operationId:n.operationId,generation:n.generation}),e=>self.postMessage({type:`error`,id:r,...w(e)}));return}n.type===`parse`&&await $.reset(),await(n.type===`extractImage`?$.runDuringPull:$.run).call($,async()=>{if((n.type===`parse`?!n.source:!Z)&&await X.ensureReady(),n.type!==`parse`&&(Z?.cursor()??X.archive)&&(Z?Z.execute(e=>e.assert_healthy()):X.run(()=>X.archive?.assert_healthy())),n.type===`parse`){if(Z?.closeModelSource(),Z=void 0,Q=e??A,n.source){if(X.disposeArchive(),!n.sourceOwnerUrl)throw TypeError(`XLSX source owner URL is missing`);let{WorkerWorksheetSourceOwner:e}=await import(n.sourceOwnerUrl),t=new e(X);Z=t,await t.openModelSource(new Uint8Array(n.data),n.source,e=>t.requestHostLayoutFromPage(self,e),n.sourceTransfer)}else{let[e,t,r]=Oe(n.resourcePolicy),i=new Uint8Array(n.data);X.run(()=>{let n=new M(i,e,t,r);return X.setArchive(n),n.set_worksheet_limits(...Ne(Q)),n})}let{workbook:t,usage:i}=Ue(()=>Z?Z.execute(e=>e.parse()):X.run(()=>X.archive.parse()),()=>Z?Z.resourceUsage():X.run(()=>X.archive.resource_usage())),a=Z?Z.copyBytes(t):t.buffer,o=Z?.maximumDigitWidth,s={type:`parsed`,id:r,workbookJson:a,usage:i,...o===void 0?{}:{layoutMetrics:{maximumDigitWidth:o}}};self.postMessage(s,[a]);return}let t=Z?.cursor()??X.archive;if(n.type===`extractImage`){if(!t)throw Error(`No xlsx loaded`);let e=Z?Z.extractImage(n.path):X.run(()=>t.extract_image(n.path).buffer),i={type:`imageExtracted`,id:r,bytes:e};self.postMessage(i,[e]);return}if(n.type===`resourceUsage`){if(!t)throw Error(`No xlsx loaded`);let e=Z?Z.resourceUsage():X.run(()=>X.archive.resource_usage()),n=e===void 0?void 0:h(e);self.postMessage({type:`resourceUsage`,id:r,usage:n});return}if(n.type===`toMarkdown`){if(!t)throw Error(`No xlsx loaded`);let e={type:`markdownRendered`,id:r,markdown:Z?Z.toMarkdown():X.run(()=>X.archive.to_markdown())};self.postMessage(e);return}})}catch(e){if(n.type===`openSheetSession`&&$.abandonOpen(n.sessionId),n.type===`parse`)try{Z?.closeModelSource()}catch{}let t={type:`error`,id:r,...w(e)};try{self.postMessage(t)}catch{}}};", t = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", e], { type: "text/javascript;charset=utf-8" });
|
|
3
2
|
function n(n) {
|
|
4
3
|
let r;
|
|
@@ -18,5 +17,4 @@ function n(n) {
|
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
//#endregion
|
|
22
20
|
export { n as default };
|