@docx-editor.dev/core 2.33.0 → 2.35.0-canary.20261102190412.sha-b9a04a3
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/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +11 -11
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +13 -13
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-CrPI9ZQc.d.ts → chrome-print-DY0xsXm_.d.ts} +163 -112
- package/dist/chunk-36OE5A2F.cjs +3 -0
- package/dist/chunk-4BMTYXQL.cjs +7 -0
- package/dist/chunk-4UOOFSL5.cjs +4 -0
- package/dist/chunk-5KPONTUV.js +1 -0
- package/dist/{chunk-L3YXJDPX.js → chunk-5X23LOBT.js} +1 -1
- package/dist/chunk-6JKXXUXG.cjs +30 -0
- package/dist/chunk-7N553ZFH.js +1 -0
- package/dist/chunk-AXUSFHCQ.cjs +5 -0
- package/dist/chunk-BI2HHPJ7.cjs +1 -0
- package/dist/chunk-CCGWLTCP.cjs +1 -0
- package/dist/{chunk-PXMTQ73F.cjs → chunk-CNGBQ36V.cjs} +1 -1
- package/dist/{chunk-2F2UEAE2.js → chunk-CZIRRKXA.js} +1 -1
- package/dist/{chunk-2DR4TH6B.js → chunk-EVTBNATS.js} +1 -1
- package/dist/chunk-GVZRSFUY.cjs +2 -0
- package/dist/{chunk-RFUNFTGV.cjs → chunk-HBEVI765.cjs} +1 -1
- package/dist/chunk-HQGFS7O5.js +30 -0
- package/dist/chunk-I3XDNCUJ.js +3 -0
- package/dist/chunk-IK6L3RKU.cjs +236 -0
- package/dist/chunk-IVQT6HDE.js +7 -0
- package/dist/chunk-JWNOCKTF.js +4 -0
- package/dist/chunk-KDA6HKHR.js +236 -0
- package/dist/chunk-MCNHQCMR.js +2 -0
- package/dist/{chunk-X34QRAUU.cjs → chunk-MKEJJKTH.cjs} +1 -1
- package/dist/chunk-NMV7DRHU.cjs +1 -0
- package/dist/chunk-NTJWPRUU.js +5 -0
- package/dist/chunk-PA4BATSI.js +32 -0
- package/dist/chunk-SRKJYXCG.js +1 -0
- package/dist/chunk-TKCFTVY4.cjs +4 -0
- package/dist/chunk-UILTSNM6.js +4 -0
- package/dist/chunk-YBHYIWJH.cjs +32 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +11 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +2 -2
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +9 -9
- package/dist/contracts/modules.d.ts +11 -11
- package/dist/contracts/types.d.ts +3 -3
- package/dist/{custom-node-writes-AqY5KpVx.d.ts → custom-node-writes-DparEcZK.d.ts} +45 -7
- package/dist/{diagnostic-context-CuzhOX0g.d.ts → diagnostic-context-CkZKkKvB.d.ts} +1 -1
- package/dist/{diagnostic-hints-BtCaCqQC.d.ts → diagnostic-hints-BTyb8yzX.d.ts} +1 -1
- package/dist/{document-protection-BvbpSXbQ.d.ts → document-protection-DdWxihIN.d.ts} +1 -1
- package/dist/{drawing-graphic-kind-CXYGYbB3.d.ts → drawing-graphic-kind-CK0cMc7H.d.ts} +91 -18
- package/dist/{drawing-preview-package-B9lSLRg4.d.ts → drawing-preview-package-fFjXpOMS.d.ts} +1 -1
- package/dist/{editor-B7OOAAie.d.ts → editor-DDCkWqfD.d.ts} +47 -15
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +2 -2
- package/dist/editor.d.ts +200 -75
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +8 -8
- package/dist/export.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-Ci_BTnSU.d.ts → layout-shaping-Byj-TwsI.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +289 -129
- package/dist/layout.js +1 -1
- package/dist/{metafile-drawing-DtMFyMKq.d.ts → metafile-drawing-Ce6TuWLm.d.ts} +9 -1
- package/dist/{note-properties-DCIJUKIy.d.ts → note-properties-BiunaIQa.d.ts} +31 -7
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +76 -12
- package/dist/output.js +1 -1
- package/dist/{protocol-Cp_QzVxS.d.ts → protocol-Dn44dL4M.d.ts} +184 -120
- package/dist/{review-paragraph-order-BJQ43_r0.d.ts → review-paragraph-order-BWMXAKuA.d.ts} +1 -1
- package/dist/{revision-projection-OVusTS77.d.ts → revision-projection-DwFhgIR0.d.ts} +1 -1
- package/dist/{semantic-cell-selection-CoI5hHBm.d.ts → semantic-cell-selection-DhalxEBH.d.ts} +2 -2
- package/dist/{semantic-interaction-BbA4dgEo.d.ts → semantic-interaction-QeuzEtAk.d.ts} +2 -4
- package/dist/{semantic-paint-B5JcIv9c.d.ts → semantic-paint-BYDZbTiY.d.ts} +4 -4
- package/dist/{semantic-record-queries-DnO8J5_j.d.ts → semantic-record-queries-Bf5bgQL3.d.ts} +1 -1
- package/dist/{semantic-records-DoK0lNjS.d.ts → semantic-records-CzZiWMY8.d.ts} +99 -94
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +31 -16
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-Df4oY2u4.d.ts → tree-op-types-DKvJSH8T.d.ts} +204 -147
- package/dist/{tree-package-store-DXhX1PE-.d.ts → tree-package-store-Cl3BkWXF.d.ts} +1 -1
- package/dist/{tree-session-contract-CF2625mv.d.ts → tree-session-contract-BL50pqs8.d.ts} +14 -7
- package/dist/{unsupported-elements-CUojsaCr.d.ts → unsupported-elements-Bra4QTOM.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-23MKR33J.js +0 -4
- package/dist/chunk-2DEY5NUC.cjs +0 -32
- package/dist/chunk-2GPGAFOJ.cjs +0 -5
- package/dist/chunk-ALD626VU.cjs +0 -2
- package/dist/chunk-AU33YWEJ.js +0 -236
- package/dist/chunk-AXU63LYW.cjs +0 -1
- package/dist/chunk-CM5VZRBV.js +0 -32
- package/dist/chunk-D7FAFFTN.js +0 -1
- package/dist/chunk-DYUVJNDD.cjs +0 -1
- package/dist/chunk-ESYUKD5D.js +0 -2
- package/dist/chunk-F7TGQMVR.js +0 -5
- package/dist/chunk-FLW7KIQX.js +0 -30
- package/dist/chunk-JG4A6W6I.js +0 -7
- package/dist/chunk-JNGLSBPH.js +0 -2
- package/dist/chunk-KE6ZWRIY.cjs +0 -236
- package/dist/chunk-LI42N7OW.cjs +0 -4
- package/dist/chunk-PLKDS4JT.js +0 -1
- package/dist/chunk-R4R3AAE4.js +0 -1
- package/dist/chunk-SVM6PGMS.js +0 -3
- package/dist/chunk-SZURLHR3.cjs +0 -3
- package/dist/chunk-UYCGCVZ2.cjs +0 -1
- package/dist/chunk-XNBYG4XJ.cjs +0 -30
- package/dist/chunk-ZDFJW5XS.cjs +0 -2
- package/dist/chunk-ZWO4JHNN.cjs +0 -7
package/dist/editor.d.ts
CHANGED
|
@@ -9,46 +9,46 @@
|
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
import { O as OoxmlPart, b5 as TreeDocColorValue, r as ColorValue, aa as DrawingPositionInput, G as ParagraphTabStop, ar as Watermark } from './tree-op-types-
|
|
13
|
-
export { b6 as DEFAULT_IMAGE_RESOURCE_LIMITS, b7 as IMAGE_WRAP_TARGETS, ad as ImageDecodePort, ae as ImageResourceLimits, ag as ImageWrapTarget, F as ParagraphFlags, al as RenderableImageMime, R as ReviewModelInput, an as SupportedImageMime, b8 as TEXT_FORM_FORMATS, aq as VectorImageMime, b9 as resolveImageResourceLimits, ba as resolveSvgIntrinsicSize, bb as sniffImageMime, bc as validateRasterHeader } from './tree-op-types-
|
|
14
|
-
export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-
|
|
15
|
-
export { D as DrawingGraphicKind, a as DrawingSupport, b as DrawingSupportIssue } from './drawing-graphic-kind-
|
|
16
|
-
import { B as BookmarkNameProblem, D as DrawingPreviewPackageLimits, a as DrawingPreviewPackageResult } from './drawing-preview-package-
|
|
17
|
-
import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-
|
|
18
|
-
export { a as TreeApplyResult } from './tree-session-contract-
|
|
12
|
+
import { O as OoxmlPart, b5 as TreeDocColorValue, r as ColorValue, aa as DrawingPositionInput, G as ParagraphTabStop, ar as Watermark } from './tree-op-types-DKvJSH8T.js';
|
|
13
|
+
export { b6 as DEFAULT_IMAGE_RESOURCE_LIMITS, b7 as IMAGE_WRAP_TARGETS, ad as ImageDecodePort, ae as ImageResourceLimits, ag as ImageWrapTarget, F as ParagraphFlags, al as RenderableImageMime, R as ReviewModelInput, an as SupportedImageMime, b8 as TEXT_FORM_FORMATS, aq as VectorImageMime, b9 as resolveImageResourceLimits, ba as resolveSvgIntrinsicSize, bb as sniffImageMime, bc as validateRasterHeader } from './tree-op-types-DKvJSH8T.js';
|
|
14
|
+
export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-Cl3BkWXF.js';
|
|
15
|
+
export { D as DrawingGraphicKind, a as DrawingSupport, b as DrawingSupportIssue } from './drawing-graphic-kind-CK0cMc7H.js';
|
|
16
|
+
import { B as BookmarkNameProblem, D as DrawingPreviewPackageLimits, a as DrawingPreviewPackageResult } from './drawing-preview-package-fFjXpOMS.js';
|
|
17
|
+
import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-BL50pqs8.js';
|
|
18
|
+
export { a as TreeApplyResult } from './tree-session-contract-BL50pqs8.js';
|
|
19
19
|
export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, RevisionMarkupDialog, RevisionMarkupDialogHost, resolveEditorModules } from './contracts/modules.js';
|
|
20
20
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
21
|
-
import { J as EditorFontError, W as EditorSnapshot, x as Editor, b as EditorCommand, C as CanResult,
|
|
22
|
-
export { a2 as HighlightHit, a5 as HighlightRect, a9 as ImageContext, aa as ImageCropPercent,
|
|
23
|
-
import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-
|
|
24
|
-
export { d as disposeLayoutShaping } from './layout-shaping-
|
|
21
|
+
import { J as EditorFontError, W as EditorSnapshot, x as Editor, b as EditorCommand, C as CanResult, aR as ZoomMode, g as ClearAnchorHighlightOptions, c as AnchorHighlightOptions, aw as ScrollToAnchorOptions, av as ScrollPlacement, A as AnchorHighlightAnimation, a4 as HighlightRange, a6 as HighlightResult, a3 as HighlightOptions, aM as TextMatch, f as BookmarkSummary, B as BookmarkPlace } from './editor-DDCkWqfD.js';
|
|
22
|
+
export { a2 as HighlightHit, a5 as HighlightRect, a9 as ImageContext, aa as ImageCropPercent, aS as ImageCropPermille, an as ReviewItemHit, ax as SelectedImageState, aJ as TableInteractionLabelKey, aO as TrackedChangeFilterMode, aP as TrackedChangePredicate, aT as cropPercentFromCropPermille, aU as cropPercentFromPermille, aV as cropPercentFromSourceCrop, aW as cropPermilleFromCropPercent, aX as cropPermilleFromPercent, aY as sourceCropFromCropPercent, aZ as validateImageCropPercent } from './editor-DDCkWqfD.js';
|
|
23
|
+
import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-Byj-TwsI.js';
|
|
24
|
+
export { d as disposeLayoutShaping } from './layout-shaping-Byj-TwsI.js';
|
|
25
25
|
import { F as FontConfiguration } from './editor-fonts-D_-vjuJi.js';
|
|
26
26
|
export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, m as MAX_RESOLVER_FAMILIES, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-Bm9XqTNO.js';
|
|
27
|
-
import { ae as PaginatedSurfaceOptions, af as OpenPaginatedResult, ag as PaginatedSurface, ah as TableCommandPlan, z as DocxEditorInstance, ai as SurfaceFormatting } from './chrome-print-
|
|
28
|
-
export { aj as AnchorFrameOrigin, A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, ak as BookmarkMarkOptionsSource, C as CHROME_GROUPS, d as CHROME_MENUS, al as CHROME_UNAVAILABLE_KEY, am as ChromeControl, an as ChromeControlId, ao as ChromeControlState, e as ChromeExportError, f as ChromeExportFormat, g as ChromeExportHandlers, h as ChromeExportResult, i as ChromeExportView, ap as ChromeGroup, aq as ChromeGroupId, j as ChromeMenu, k as ChromeMenuEntry, l as ChromeMenuId, m as ChromeMenuItemEntry, n as ChromeMenuSeparatorEntry, o as ChromeMenuSubmenuEntry, p as ChromePrintError, q as ChromePrintErrorCode, r as ChromePrintJob, s as ChromePrintOptions, t as ChromeSlotId, u as CommentDraftChromeHandlers, v as ContentControlWidgetChromeHandlers, w as ContentControlWidgetSession, x as CustomFontsOptions, y as CustomFontsResolver, ar as DEFAULT_TABLE_CHROME_DRAFT, D as DocxEditorConfig, as as DrawingSelectionIntent, at as EMU_PER_POINT, au as EditorCommandExecute, E as EquationActivation, F as EquationChromeHandlers, av as EquationOps, aw as FinalizedImageOverlayInteraction, G as FontLoadFailure, H as FontLoadFailureReason, I as FontMeasurementState, J as FontUrlSource, ax as FormattingBarOptions, K as GoToChromeHandlers, L as HistoryGroupBinding, M as HistoryGroupBindingOptions, N as HyperlinkActivation, O as HyperlinkChromeHandlers, ay as HyperlinkOps, az as IMAGE_OVERLAY_NUDGE_PT, aA as IMAGE_OVERLAY_NUDGE_SHIFT_PT, aB as ImageInteractionSession, aC as ImageOverlayScrollPort, aD as ImageResizeHandle, aE as ImageResizeResult, P as InvalidTextFormFieldChromeHandlers, Q as InvalidTextFormFieldSession, R as LoadFontsRequest, S as LoadFontsResult, T as LockedControlNavigation, aF as OpeningIndicatorHost, aG as OverlayFrameRect, aH as PaginatedSurfaceState, aI as ParagraphPropertyEdit, U as PopupChromeRegistrationOptions, aJ as RemoteCaretLabelAnchor, aK as RemoteCaretLabelHost, aL as ReviewWriteIntent, aM as RunTableChromeCommandResult, aN as SectionAnchor, aO as SectionBreakInsertType, aP as SelectedDrawingOverlayTarget, V as SurfaceEquation, W as SurfaceHyperlink, aQ as
|
|
29
|
-
import { a as AutomationCapabilities, b as AutomationHost, e as AutomationBatchRequest, f as AutomationBatchResponse } from './protocol-
|
|
27
|
+
import { ae as PaginatedSurfaceOptions, af as OpenPaginatedResult, ag as PaginatedSurface, ah as TableCommandPlan, z as DocxEditorInstance, ai as SurfaceFormatting } from './chrome-print-DY0xsXm_.js';
|
|
28
|
+
export { aj as AnchorFrameOrigin, A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, ak as BookmarkMarkOptionsSource, C as CHROME_GROUPS, d as CHROME_MENUS, al as CHROME_UNAVAILABLE_KEY, am as ChromeControl, an as ChromeControlId, ao as ChromeControlState, e as ChromeExportError, f as ChromeExportFormat, g as ChromeExportHandlers, h as ChromeExportResult, i as ChromeExportView, ap as ChromeGroup, aq as ChromeGroupId, j as ChromeMenu, k as ChromeMenuEntry, l as ChromeMenuId, m as ChromeMenuItemEntry, n as ChromeMenuSeparatorEntry, o as ChromeMenuSubmenuEntry, p as ChromePrintError, q as ChromePrintErrorCode, r as ChromePrintJob, s as ChromePrintOptions, t as ChromeSlotId, u as CommentDraftChromeHandlers, v as ContentControlWidgetChromeHandlers, w as ContentControlWidgetSession, x as CustomFontsOptions, y as CustomFontsResolver, ar as DEFAULT_TABLE_CHROME_DRAFT, D as DocxEditorConfig, as as DrawingSelectionIntent, at as EMU_PER_POINT, au as EditorCommandExecute, E as EquationActivation, F as EquationChromeHandlers, av as EquationOps, aw as FinalizedImageOverlayInteraction, G as FontLoadFailure, H as FontLoadFailureReason, I as FontMeasurementState, J as FontUrlSource, ax as FormattingBarOptions, K as GoToChromeHandlers, L as HistoryGroupBinding, M as HistoryGroupBindingOptions, N as HyperlinkActivation, O as HyperlinkChromeHandlers, ay as HyperlinkOps, az as IMAGE_OVERLAY_NUDGE_PT, aA as IMAGE_OVERLAY_NUDGE_SHIFT_PT, aB as ImageInteractionSession, aC as ImageOverlayScrollPort, aD as ImageResizeHandle, aE as ImageResizeResult, P as InvalidTextFormFieldChromeHandlers, Q as InvalidTextFormFieldSession, R as LoadFontsRequest, S as LoadFontsResult, T as LockedControlNavigation, aF as OpeningIndicatorHost, aG as OverlayFrameRect, aH as PaginatedSurfaceState, aI as ParagraphPropertyEdit, U as PopupChromeRegistrationOptions, aJ as RemoteCaretLabelAnchor, aK as RemoteCaretLabelHost, aL as ReviewWriteIntent, aM as RunTableChromeCommandResult, aN as SectionAnchor, aO as SectionBreakInsertType, aP as SelectedDrawingOverlayTarget, V as SurfaceEquation, W as SurfaceHyperlink, aQ as SurfaceIndentAndListOps, aR as SurfaceInsertImageInput, aS as SurfaceNavigation, aT as SurfaceOverlayCoordinates, aU as SurfaceParagraphFormat, aV as TABLE_BORDER_STYLE_OPTIONS, aW as TABLE_BORDER_TARGET_OPTIONS, aX as TABLE_BORDER_WIDTH_OPTIONS, aY as TABLE_CHROME_SLOT_IDS, aZ as TableBorderStyleOption, a_ as TableBorderTargetOption, a$ as TableBorderTargetValue, b0 as TableBorderWidthOption, b1 as TableChromeDraft, b2 as TableChromePick, X as TableChromeSlotId, b3 as TextFormFieldChromeHandlers, b4 as TextFormFieldDialogSession, b5 as TocRemovalRefusal, Y as ToolbarCommandState, b6 as ToolbarSlotValue, Z as ToolbarValueMap, _ as ToolbarValueSlot, b7 as applyTableChromePick, $ as bindHistoryGroup, a0 as blankDocumentBytes, b8 as canExecuteImageCommand, b9 as captureImageMutationPreconditions, ba as chromeControlCount, a1 as chromeMenuSlots, bb as chromeProbeForSlot, bc as chromeSlotId, bd as chromeSlotIsToggle, be as commandExecOptions, a2 as commandForSlot, a3 as commandForSlotValue, bf as commandForTableChromeSlotValue, bg as computeImageResizeResult, bh as computeMovedImagePosition, bi as computeResizedImageExtentEmu, a4 as createDocxEditor, a5 as createFontSource, bj as createImageOverlayScrollPort, bk as cssPixelsToLayoutPoints, a6 as customFonts, bl as defaultChromeGroups, bm as defaultTableLabel, a7 as deferFonts, bn as emuToOverlayPoints, bo as equationAtPosition, bp as executeImageCommand, bq as finalizeImageOverlayInteraction, br as formattingBarChromeGroups, a8 as isChromePrintShortcut, bs as isStaleImageInteractionCommit, bt as isTableChromeSlot, bu as layoutPointsToCssPixels, a9 as loadFonts, bv as overlayFrameToSheetCssPixels, bw as overlayHostOrigin, bx as pointsToEmu, by as probeTableChromeCommand, bz as resizePreservesAspect, aa as runChromeExport, ab as runChromePrint, bA as runSave, bB as runTableChromeCommand, bC as runTableCommand, ac as runToolbarCommand, bD as selectedDrawingOverlayTargetOf, bE as selectedImageStateOf, bF as surfacePaintScale, bG as tableChromeIconPaths, bH as tableChromeLabelKeyForTarget, bI as tableChromeToolbarState, bJ as tableChromeVisible, bK as tableCommandToolbarState, ad as toolbarCommandState, bL as toolbarCommandStates } from './chrome-print-DY0xsXm_.js';
|
|
29
|
+
import { a as AutomationCapabilities, b as AutomationHost, e as AutomationBatchRequest, f as AutomationBatchResponse } from './protocol-Dn44dL4M.js';
|
|
30
30
|
import { c as HistoryGroup } from './editor-scope-CA6egMaK.js';
|
|
31
31
|
export { d as HistoryGroupOptions } from './editor-scope-CA6egMaK.js';
|
|
32
|
-
import { E as EditDiagnosticCode, R as ReviewDiagnosticCode, k as ReviewOperation } from './diagnostic-hints-
|
|
33
|
-
import { S as SemanticLayout, T as TextMeasurer, U as UnsupportedElement } from './semantic-records-
|
|
34
|
-
export { t as SectionProperties,
|
|
32
|
+
import { E as EditDiagnosticCode, R as ReviewDiagnosticCode, k as ReviewOperation } from './diagnostic-hints-BTyb8yzX.js';
|
|
33
|
+
import { S as SemanticLayout, T as TextMeasurer, U as UnsupportedElement } from './semantic-records-CzZiWMY8.js';
|
|
34
|
+
export { t as SectionProperties, h as UnsupportedElementLayout, i as UnsupportedElementRule, u as unsupportedElementRuleMatches } from './semantic-records-CzZiWMY8.js';
|
|
35
35
|
import { ReviewPaneOverflow } from './contracts/types.js';
|
|
36
36
|
export { CommentMarkerStyle, DEFAULT_REVIEW_PANE, ResolvedReviewPane, ReviewPaneItemFields, ReviewPaneOpening, ReviewPaneOptions, RevisionDisplay, resolveReviewPane, reviewPaneListsItem } from './contracts/types.js';
|
|
37
|
-
export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup } from './revision-projection-
|
|
38
|
-
export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-
|
|
39
|
-
export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-
|
|
40
|
-
export { U as UnsupportedElementHost, o as observeUnsupportedElements } from './unsupported-elements-
|
|
37
|
+
export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup } from './revision-projection-DwFhgIR0.js';
|
|
38
|
+
export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-QeuzEtAk.js';
|
|
39
|
+
export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-BYDZbTiY.js';
|
|
40
|
+
export { U as UnsupportedElementHost, o as observeUnsupportedElements } from './unsupported-elements-Bra4QTOM.js';
|
|
41
41
|
export { CollaborationModuleContribution } from './collaboration.js';
|
|
42
|
-
import './custom-node-writes-
|
|
42
|
+
import './custom-node-writes-DparEcZK.js';
|
|
43
43
|
import 'prosemirror-model';
|
|
44
44
|
import './collaboration/replication.js';
|
|
45
45
|
import './failure-6KGFrDO9.js';
|
|
46
|
-
import './document-protection-
|
|
46
|
+
import './document-protection-DdWxihIN.js';
|
|
47
47
|
import './contracts/document.js';
|
|
48
48
|
import './contracts/interaction.js';
|
|
49
|
-
import './
|
|
50
|
-
import './
|
|
51
|
-
import './semantic-record-queries-
|
|
49
|
+
import './semantic-cell-selection-DhalxEBH.js';
|
|
50
|
+
import './note-properties-BiunaIQa.js';
|
|
51
|
+
import './semantic-record-queries-Bf5bgQL3.js';
|
|
52
52
|
|
|
53
53
|
declare function toEditorFontError(error: unknown): EditorFontError;
|
|
54
54
|
declare function createLayoutShaping(configuration: FontConfiguration, instrumentation?: LayoutShapingInstrumentation, execution?: FontShapingOptions): Promise<LayoutShapingOptions>;
|
|
@@ -535,8 +535,12 @@ declare function mountPaginatedSurface(container: HTMLElement, bytes: Uint8Array
|
|
|
535
535
|
*
|
|
536
536
|
* Read straight from the live package instead. Ids carry the canonical part name, so this is a
|
|
537
537
|
* map lookup.
|
|
538
|
+
*
|
|
539
|
+
* A collaboration session names the nodes it creates by logical id, which carries no part name.
|
|
540
|
+
* Those ids are looked up in each story part's node index, which opens no story store either.
|
|
541
|
+
* A view without `storyParts` has no session ids, so it answers null for them.
|
|
538
542
|
*/
|
|
539
|
-
declare function partOfNodeId(session: Pick<TreeDocxSessionView, 'currentPackage' | 'part'
|
|
543
|
+
declare function partOfNodeId(session: Pick<TreeDocxSessionView, 'currentPackage' | 'part'> & Partial<Pick<TreeDocxSessionView, 'storyParts'>>, nodeId: string | undefined): OoxmlPart | null;
|
|
540
544
|
|
|
541
545
|
/** The engine paints at 96 px per inch (twips / 15, 1440 twips per inch). */
|
|
542
546
|
declare const PX_PER_INCH = 96;
|
|
@@ -696,7 +700,9 @@ declare const TOOLBAR_COLLAPSE_ORDER: readonly string[];
|
|
|
696
700
|
*/
|
|
697
701
|
declare const TOOLBAR_PINNED_GROUPS: ReadonlySet<string>;
|
|
698
702
|
/**
|
|
699
|
-
* Px of surplus
|
|
703
|
+
* Px of surplus, beyond what a control costs (its width and gap, plus its group's separator
|
|
704
|
+
* slot when it is the group's first control back, less the "⋯" trigger when it is the last
|
|
705
|
+
* hidden one), the bar must have before that control comes back OUT of the overflow menu.
|
|
700
706
|
*
|
|
701
707
|
* Without it a value control that widens with its own value (font family going from
|
|
702
708
|
* "Arial" to "Times New Roman") pushes itself out, which frees the width that pulled it
|
|
@@ -705,28 +711,6 @@ declare const TOOLBAR_PINNED_GROUPS: ReadonlySet<string>;
|
|
|
705
711
|
* @internal
|
|
706
712
|
*/
|
|
707
713
|
declare const TOOLBAR_OVERFLOW_HYSTERESIS = 24;
|
|
708
|
-
/**
|
|
709
|
-
* What {@link toolbarOverflowGroups} measures against.
|
|
710
|
-
*
|
|
711
|
-
* @internal
|
|
712
|
-
*/
|
|
713
|
-
interface ToolbarFitInput {
|
|
714
|
-
/** Content width of the bar, in px. `0` or less means "not measured yet". */
|
|
715
|
-
readonly available: number;
|
|
716
|
-
/** Group id -> measured width, separator and gaps included. */
|
|
717
|
-
readonly widths: ReadonlyMap<string, number>;
|
|
718
|
-
/** Collapsible groups, in bar order. */
|
|
719
|
-
readonly groups: readonly string[];
|
|
720
|
-
/** Collapse order; ids missing from it collapse first, in reverse bar order. */
|
|
721
|
-
readonly order: readonly string[];
|
|
722
|
-
/** Width of everything that never collapses: pinned groups, appended children, padding. */
|
|
723
|
-
readonly fixed: number;
|
|
724
|
-
/** Width the "⋯" trigger takes once it is shown. */
|
|
725
|
-
readonly more: number;
|
|
726
|
-
/** The previous answer, for the one-directional slack. */
|
|
727
|
-
readonly previous?: ReadonlySet<string> | undefined;
|
|
728
|
-
readonly hysteresis?: number;
|
|
729
|
-
}
|
|
730
714
|
/**
|
|
731
715
|
* The priority of a declared group: its place in {@link TOOLBAR_COLLAPSE_ORDER}, in steps of
|
|
732
716
|
* 10, so zoom is 10 and history is 90. A host group with a `priority` sorts among these, and
|
|
@@ -803,23 +787,6 @@ declare function toolbarPanelPlacement(input: {
|
|
|
803
787
|
readonly viewportWidth: number;
|
|
804
788
|
readonly margin?: number;
|
|
805
789
|
}): ToolbarPanelPlacement;
|
|
806
|
-
declare function sameIds(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean;
|
|
807
|
-
/**
|
|
808
|
-
* True when two answers describe the same bar, so a re-render can be skipped.
|
|
809
|
-
*
|
|
810
|
-
* @internal
|
|
811
|
-
*/
|
|
812
|
-
declare const sameOverflow: typeof sameIds;
|
|
813
|
-
/**
|
|
814
|
-
* The groups that must leave the bar for the rest of it to fit in one row.
|
|
815
|
-
*
|
|
816
|
-
* An unmeasured bar (`available <= 0`, which is every server render and every jsdom test)
|
|
817
|
-
* overflows nothing: the full toolbar is the honest answer when nothing is known about the
|
|
818
|
-
* space, and it is also what a host that opted out of overflow renders.
|
|
819
|
-
*
|
|
820
|
-
* @internal
|
|
821
|
-
*/
|
|
822
|
-
declare function toolbarOverflowGroups(input: ToolbarFitInput): ReadonlySet<string>;
|
|
823
790
|
/**
|
|
824
791
|
* The left edge, in viewport px, of a popup that opens under a bar control.
|
|
825
792
|
*
|
|
@@ -842,12 +809,6 @@ declare function toolbarPopupLeft(input: {
|
|
|
842
809
|
* @internal
|
|
843
810
|
*/
|
|
844
811
|
declare function separatorLeadingCost(separatorWidth: number, marginInlineStart: number, marginInlineEnd: number, gap: number): number;
|
|
845
|
-
/**
|
|
846
|
-
* Total width charged for one collapsible group on the bar.
|
|
847
|
-
*
|
|
848
|
-
* @internal
|
|
849
|
-
*/
|
|
850
|
-
declare function collapsibleGroupCost(groupWidth: number, separatorLeading: number): number;
|
|
851
812
|
/**
|
|
852
813
|
* Flex gap charged after a fixed group or the More trigger.
|
|
853
814
|
*
|
|
@@ -929,6 +890,170 @@ declare function controlsOverflow(bar: HTMLElement, style: CSSStyleDeclaration):
|
|
|
929
890
|
* @internal
|
|
930
891
|
*/
|
|
931
892
|
declare function readAvailableWidth(bar: HTMLElement, style: CSSStyleDeclaration): number;
|
|
893
|
+
/**
|
|
894
|
+
* Widths that survive a control leaving the bar: a control in the "⋯" menu renders nothing
|
|
895
|
+
* to measure, and forgetting its width would mean never knowing whether it could come back.
|
|
896
|
+
*
|
|
897
|
+
* @internal
|
|
898
|
+
*/
|
|
899
|
+
interface ToolbarRowMemory {
|
|
900
|
+
/** `toolbarItemKey(group, item)` -> width, in layout px. */
|
|
901
|
+
readonly itemWidths: Map<string, number>;
|
|
902
|
+
/** Group id -> separator slot plus the group's own padding, in layout px. */
|
|
903
|
+
readonly groupBases: Map<string, number>;
|
|
904
|
+
/** Group id -> the flex gap between that group's controls, in layout px. */
|
|
905
|
+
readonly groupGaps: Map<string, number>;
|
|
906
|
+
/** The "⋯" trigger's cost, in layout px. Seed it with an assumed width. */
|
|
907
|
+
more: number;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* One measurement of the bar, for the item fit. Every width is in layout px, the unit of
|
|
911
|
+
* `clientWidth`, so a bar inside a scaled container compares like with like.
|
|
912
|
+
*
|
|
913
|
+
* @internal
|
|
914
|
+
*/
|
|
915
|
+
interface ToolbarRowReading {
|
|
916
|
+
/** The content width the bar can take. */
|
|
917
|
+
readonly available: number;
|
|
918
|
+
/** The bar's flex gap. */
|
|
919
|
+
readonly gap: number;
|
|
920
|
+
/** Width of everything that never collapses. */
|
|
921
|
+
readonly fixed: number;
|
|
922
|
+
/** The "⋯" trigger's cost. */
|
|
923
|
+
readonly more: number;
|
|
924
|
+
/** {@link controlsOverflow} for this reading: true, false, or null without layout. */
|
|
925
|
+
readonly overflowing: boolean | null;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Reads the bar into `memory` and returns what the item fit needs.
|
|
929
|
+
*
|
|
930
|
+
* Each `[data-toolbar-group]` element is a collapsible group. Its direct
|
|
931
|
+
* `[data-toolbar-item]` children are its controls, stored under `itemKey(group, item)`. A
|
|
932
|
+
* group with no item children (the contextual table block) is one control whose id is the
|
|
933
|
+
* group id. `[data-toolbar-fixed]` elements never collapse, and `[data-toolbar-more]` is the
|
|
934
|
+
* trigger. An item that draws nothing is stored as 0 wide: it takes no room, now or later.
|
|
935
|
+
*
|
|
936
|
+
* Every group is charged a leading separator slot, the first one included. That overstates
|
|
937
|
+
* the row by one separator, so the bar collapses a few px early: the safe direction.
|
|
938
|
+
*
|
|
939
|
+
* @internal
|
|
940
|
+
*/
|
|
941
|
+
declare function readToolbarRow(bar: HTMLElement, memory: ToolbarRowMemory, itemKey: (groupId: string, itemId: string) => string): ToolbarRowReading;
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Marks one control of a collapsible group in the bar; the value is the control id.
|
|
945
|
+
*
|
|
946
|
+
* @internal
|
|
947
|
+
*/
|
|
948
|
+
declare const TOOLBAR_ITEM_ATTRIBUTE = "data-toolbar-item";
|
|
949
|
+
/**
|
|
950
|
+
* The control id of a group's host content (`Toolbar.Group` children), which collapses as one
|
|
951
|
+
* control after the group's own slots. Printable, so it survives server rendering in a DOM
|
|
952
|
+
* attribute, and never a slot or arrangement id.
|
|
953
|
+
*
|
|
954
|
+
* @internal
|
|
955
|
+
*/
|
|
956
|
+
declare const TOOLBAR_HOST_ITEM = "host-content";
|
|
957
|
+
/**
|
|
958
|
+
* One collapsible group, as the item fit sees it.
|
|
959
|
+
*
|
|
960
|
+
* @internal
|
|
961
|
+
*/
|
|
962
|
+
interface ToolbarFitGroup {
|
|
963
|
+
/** The group id, as the collapse order names it. */
|
|
964
|
+
readonly id: string;
|
|
965
|
+
/** The group's control ids, in bar order. Controls leave from the end. */
|
|
966
|
+
readonly items: readonly string[];
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Group id -> how many controls, counted from the END of the group, are in the "⋯" menu. A
|
|
970
|
+
* group that is not in the map is complete in the bar. A count equal to the group's length
|
|
971
|
+
* means the whole group is in the menu.
|
|
972
|
+
*
|
|
973
|
+
* @internal
|
|
974
|
+
*/
|
|
975
|
+
type ToolbarItemOverflow = ReadonlyMap<string, number>;
|
|
976
|
+
/**
|
|
977
|
+
* What {@link toolbarOverflowItems} measures against. Widths are layout px.
|
|
978
|
+
*
|
|
979
|
+
* @internal
|
|
980
|
+
*/
|
|
981
|
+
interface ToolbarItemFitInput {
|
|
982
|
+
/** Content width of the bar. `0` or less means "not measured yet". */
|
|
983
|
+
readonly available: number;
|
|
984
|
+
/** Collapsible groups, in bar order. */
|
|
985
|
+
readonly groups: readonly ToolbarFitGroup[];
|
|
986
|
+
/** Collapse order of group ids; groups missing from it never collapse. */
|
|
987
|
+
readonly order: readonly string[];
|
|
988
|
+
/** {@link toolbarItemKey} -> the control's measured width. A missing width counts as 0. */
|
|
989
|
+
readonly itemWidths: ReadonlyMap<string, number>;
|
|
990
|
+
/**
|
|
991
|
+
* Group id -> what showing the group at all costs: its separator slot and its own padding.
|
|
992
|
+
* A missing entry counts as 0.
|
|
993
|
+
*/
|
|
994
|
+
readonly groupBases: ReadonlyMap<string, number>;
|
|
995
|
+
/** The flex gap between two controls of one group, for groups without their own. */
|
|
996
|
+
readonly gap: number;
|
|
997
|
+
/** Group id -> that group's own flex gap, where it has one. */
|
|
998
|
+
readonly groupGaps?: ReadonlyMap<string, number>;
|
|
999
|
+
/** Width of everything that never collapses: pinned groups, appended children. */
|
|
1000
|
+
readonly fixed: number;
|
|
1001
|
+
/** Width the "⋯" trigger takes once it is shown. */
|
|
1002
|
+
readonly more: number;
|
|
1003
|
+
/** The previous answer, for the one-directional slack. */
|
|
1004
|
+
readonly previous?: ToolbarItemOverflow | undefined;
|
|
1005
|
+
/** Surplus a control needs before it comes back from the menu, in px. */
|
|
1006
|
+
readonly hysteresis?: number;
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* The key one control's width is stored under.
|
|
1010
|
+
*
|
|
1011
|
+
* @internal
|
|
1012
|
+
*/
|
|
1013
|
+
declare function toolbarItemKey(groupId: string, itemId: string): string;
|
|
1014
|
+
/**
|
|
1015
|
+
* A stable key for a list of groups, so a fresh list with the same content does not
|
|
1016
|
+
* re-measure.
|
|
1017
|
+
*
|
|
1018
|
+
* @internal
|
|
1019
|
+
*/
|
|
1020
|
+
declare function toolbarGroupsKey(groups: readonly ToolbarFitGroup[]): string;
|
|
1021
|
+
/**
|
|
1022
|
+
* A group's collapsible controls, in bar order: its drawn slots, then its host content as one
|
|
1023
|
+
* control. Pass only the slots the bar draws; a slot removed with `hidden` takes no place.
|
|
1024
|
+
*
|
|
1025
|
+
* @internal
|
|
1026
|
+
*/
|
|
1027
|
+
declare function toolbarGroupItems(slots: readonly string[], hasHostContent: boolean): string[];
|
|
1028
|
+
/**
|
|
1029
|
+
* Whether a group's host panel content shows in the "⋯" panel: when its host content left the
|
|
1030
|
+
* bar, or, for a group whose panel content has no bar content, when any of its controls did.
|
|
1031
|
+
*
|
|
1032
|
+
* @internal
|
|
1033
|
+
*/
|
|
1034
|
+
declare function toolbarHostPanelShown(hasHostContent: boolean, hidden: readonly string[]): boolean;
|
|
1035
|
+
/**
|
|
1036
|
+
* How many of a group's controls the bar shows under an answer.
|
|
1037
|
+
*
|
|
1038
|
+
* @internal
|
|
1039
|
+
*/
|
|
1040
|
+
declare function toolbarShownCount(overflow: ToolbarItemOverflow, groupId: string, itemCount: number): number;
|
|
1041
|
+
/**
|
|
1042
|
+
* True when two answers describe the same bar, so a re-render can be skipped.
|
|
1043
|
+
*
|
|
1044
|
+
* @internal
|
|
1045
|
+
*/
|
|
1046
|
+
declare function sameItemOverflow(a: ToolbarItemOverflow, b: ToolbarItemOverflow): boolean;
|
|
1047
|
+
/**
|
|
1048
|
+
* The controls that must leave the bar for the rest of it to fit in one row.
|
|
1049
|
+
*
|
|
1050
|
+
* An unmeasured bar (`available <= 0`, which is every server render and every jsdom test)
|
|
1051
|
+
* overflows nothing: the full toolbar is the honest answer when nothing is known about the
|
|
1052
|
+
* space.
|
|
1053
|
+
*
|
|
1054
|
+
* @internal
|
|
1055
|
+
*/
|
|
1056
|
+
declare function toolbarOverflowItems(input: ToolbarItemFitInput): ToolbarItemOverflow;
|
|
932
1057
|
|
|
933
1058
|
/**
|
|
934
1059
|
* Which LETTER a chord names, for the accelerators held with Alt.
|
|
@@ -2211,5 +2336,5 @@ declare function bookmarkDialogNameState(bookmarks: readonly BookmarkSummary[],
|
|
|
2211
2336
|
*/
|
|
2212
2337
|
declare function drawingPreviewDocx(editor: DocxEditorInstance, element: Pick<UnsupportedElement, 'ownerPartName' | 'nodeId'>, limits?: DrawingPreviewPackageLimits): DrawingPreviewPackageResult;
|
|
2213
2338
|
|
|
2214
|
-
export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DEFAULT_WATERMARK_FONT, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, DrawingPreviewPackageLimits, DrawingPreviewPackageResult, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, HistoryGroup, LINE_SPACING_PRESETS, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewDiagnosticCode, ReviewOperation, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, SPLIT_CELL_FALLBACK_MAX, ScrollPlacement, ScrollToAnchorOptions, SurfaceFormatting, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TextMatch, TextMeasurer, TreeDocxSessionView, UnsupportedElement, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, beginEditorPreview, bookmarkDialogInitialName, bookmarkDialogNameState, bookmarkDialogRows, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder,
|
|
2215
|
-
export type { BarRoomInput, BookmarkDialogNameState, BookmarkSortOrder, BrowserAutomationHost, CalendarDay, CalendarMonth, CalendarMonthOptions, ClearRefreshHighlightsOptions, ColorLowerResult, ContentControlListNavigation, DocumentRefresh, DocumentRefreshState, DocumentSearch, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, DocumentSearchState, EditorPreviewFork, EditorPreviewRefusal, EditorWindow, GoToBookmarkGroup, HighlightSource, HighlightWatch, HistoryGroupRun, HistoryShortcutKeys, HostTimers, HostWindow, LineSpacingMenuRow, LineSpacingMenuValue, NavigateToChangeOptions, OpenEditorWindowOptions, OutsidePressOptions, ParagraphDialogFields, ParagraphDialogMixed, ParagraphFlagKey, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, PopupEscapeOptions, PopupFocusLeaveOptions, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, RulerDragOptions, RulerIndent, RulerIndentHandle, RulerMarginTick, RulerPageMetrics, RulerTick, RulerUnit, SpecialIndent, SplitCellCountProblem, SplitCellCounts, SplitCellLimits, SurfaceExtent, TabAlignment, TabLeaderName,
|
|
2339
|
+
export { AUTO_ZOOM_MODE, AnchorHighlightAnimation, AnchorHighlightOptions, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, ClearAnchorHighlightOptions, DEFAULT_WATERMARK_FONT, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocumentRefreshError, DocxEditorInstance, DrawingPositionInput, DrawingPreviewPackageLimits, DrawingPreviewPackageResult, FIT_WIDTH_ZOOM_MODE, FontShapingOptions, HIGHLIGHT_REFRESH_MS, HighlightOptions, HighlightRange, HighlightResult, HistoryGroup, LINE_SPACING_PRESETS, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, ParagraphTabStop, REVIEW_MARKERS_GUTTER_PX, ReviewDiagnosticCode, ReviewOperation, ReviewPaneOverflow, SEARCH_DEBOUNCE_MS, SEARCH_HIGHLIGHT_PRIORITY, SEARCH_HIGHLIGHT_SET, SEARCH_MATCH_LIMIT, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, SPLIT_CELL_FALLBACK_MAX, ScrollPlacement, ScrollToAnchorOptions, SurfaceFormatting, TAB_ALIGNMENT_LABELS, TOOLBAR_COLLAPSE_ORDER, TOOLBAR_HOST_ITEM, TOOLBAR_ITEM_ATTRIBUTE, TOOLBAR_OVERFLOW_HYSTERESIS, TOOLBAR_PANEL_EDGE_MARGIN, TOOLBAR_PINNED_GROUPS, TWIPS_PER_CM, TWIPS_PER_INCH, TextMatch, TextMeasurer, TreeDocxSessionView, UnsupportedElement, ZOOM_MAX, ZOOM_MIN, alignmentAfterDirectionChange, applyThemeShade, applyThemeTint, arrangeToolbarGroups, barRoomWidth, beginEditorPreview, bookmarkDialogInitialName, bookmarkDialogNameState, bookmarkDialogRows, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, chordLetter, clipboardDropLandsText, clipboardPasteLandsContent, collapseOrder, contentControlPopupKeyDown, contentControlPopupOpener, controlsOverflow, copyEditorStyles, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createDocumentSearch, createLayoutShaping, dragIndent, drawingPreviewDocx, editorCommandKey, editorHostDocument, editorHostElement, editorHostWindow, editorInstanceScope, editorPreviewActive, firstDayOfWeek, formatInches, generateRulerTicks, goToBookmarkGroups, goToBookmarkMatch, goToBookmarkRows, goToBookmarkTarget, handlePosition, hasOpenNestedPopup, historyShortcutOf, hostDirectionOf, hostDocumentOf, hostTimers, hostWindowOf, inchesToTwips, initialSplitCellCounts, isDomNode, isElementNode, isGoToChord, isHTMLElementNode, isInputEvent, isKeyboardEvent, isMouseEvent, isPointerEvent, isTextNode, isoDateOf, keepScrollAtInlineEnd, lineSpacingMenuRowLabel, lineSpacingMenuRows, listenForOutsidePress, listenForPopupEscape, listenForPopupFocusLeave, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, observeHostDirection, openEditorWindow, parseIsoDate, partOfNodeId, placeSubmenu, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, readAvailableWidth, readColumnGap, readInlineMargins, readSplitCellCounts, readToolbarRow, reportAutomationException, reportAutomationRefusal, reportAutomationReviewSkip, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, reviewPaneEntitledZoom, rulerMarginTicks, rulerPageBox, rulerTabPosition, sameItemOverflow, sameTabStops, sameZoomMode, seedFields, separatorLeadingCost, shiftMonth, signedFirstLineOf, snapTwips, specialOf, storyLabelTop, submenuKeys, surfaceExtent, tableCommandState, textboxFrameReason, toEditorFontError, toolbarGroupItems, toolbarGroupPriority, toolbarGroupsKey, toolbarHostPanelShown, toolbarItemKey, toolbarOverflowItems, toolbarPanelPlacement, toolbarPopupLeft, toolbarShownCount, trailingGapCost, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, watchHighlights, watermarkShapeBox, withTabStop };
|
|
2340
|
+
export type { BarRoomInput, BookmarkDialogNameState, BookmarkSortOrder, BrowserAutomationHost, CalendarDay, CalendarMonth, CalendarMonthOptions, ClearRefreshHighlightsOptions, ColorLowerResult, ContentControlListNavigation, DocumentRefresh, DocumentRefreshState, DocumentSearch, DocumentSearchFindOptions, DocumentSearchHighlight, DocumentSearchNavigateOptions, DocumentSearchOptions, DocumentSearchState, EditorPreviewFork, EditorPreviewRefusal, EditorWindow, GoToBookmarkGroup, HighlightSource, HighlightWatch, HistoryGroupRun, HistoryShortcutKeys, HostTimers, HostWindow, LineSpacingMenuRow, LineSpacingMenuValue, NavigateToChangeOptions, OpenEditorWindowOptions, OutsidePressOptions, ParagraphDialogFields, ParagraphDialogMixed, ParagraphFlagKey, ParagraphFlagState, ParagraphFormatRead, ParagraphFormatUpdate, PopupEscapeOptions, PopupFocusLeaveOptions, RefreshChange, RefreshChangeInput, RefreshFailureCode, RefreshHighlightAnimation, RefreshHighlightOptions, RefreshLocation, RefreshResult, RefreshSubmission, RefreshUpdate, RulerDragOptions, RulerIndent, RulerIndentHandle, RulerMarginTick, RulerPageMetrics, RulerTick, RulerUnit, SpecialIndent, SplitCellCountProblem, SplitCellCounts, SplitCellLimits, SurfaceExtent, TabAlignment, TabLeaderName, ToolbarFitGroup, ToolbarHostGroupPlacement, ToolbarItemFitInput, ToolbarItemOverflow, ToolbarPanelPlacement, ToolbarRowMemory, ToolbarRowReading, WatchHighlightsOptions, WatermarkSize };
|
package/dist/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{mc as AUTO_ZOOM_MODE,sc as BROWSER_AUTOMATION_CAPABILITIES,Bb as CHROME_GROUPS,Fb as CHROME_MENUS,Ib as CHROME_UNAVAILABLE_KEY,Nb as CONTENT_CONTROL_PICTURE_ACCEPT,kd as ChromeExportError,md as ChromePrintError,c as DEFAULT_REVIEW_PANE,Ba as DEFAULT_TABLE_CHROME_DRAFT,ea as DEFAULT_WATERMARK_FONT,bd as DocumentRefreshError,na as EMU_PER_POINT,nc as FIT_WIDTH_ZOOM_MODE,dd as HIGHLIGHT_REFRESH_MS,wa as IMAGE_OVERLAY_NUDGE_PT,xa as IMAGE_OVERLAY_NUDGE_SHIFT_PT,_c as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,Pc as NO_MIXED_FIELDS,M as PX_PER_CM,L as PX_PER_INCH,jc as REVIEW_MARKERS_GUTTER_PX,fd as SEARCH_DEBOUNCE_MS,id as SEARCH_HIGHLIGHT_PRIORITY,hd as SEARCH_HIGHLIGHT_SET,gd as SEARCH_MATCH_LIMIT,S as SNAP_TWIPS_CM,R as SNAP_TWIPS_INCH,Wc as SPLIT_CELL_FALLBACK_MAX,Ha as TABLE_BORDER_STYLE_OPTIONS,Ga as TABLE_BORDER_TARGET_OPTIONS,Ia as TABLE_BORDER_WIDTH_OPTIONS,Ca as TABLE_CHROME_SLOT_IDS,Lc as TAB_ALIGNMENT_LABELS,$a as TOOLBAR_COLLAPSE_ORDER,jb as TOOLBAR_HOST_ITEM,ib as TOOLBAR_ITEM_ATTRIBUTE,bb as TOOLBAR_OVERFLOW_HYSTERESIS,fb as TOOLBAR_PANEL_EDGE_MARGIN,ab as TOOLBAR_PINNED_GROUPS,Q as TWIPS_PER_CM,P as TWIPS_PER_INCH,lc as ZOOM_MAX,kc as ZOOM_MIN,Tc as alignmentAfterDirectionChange,Ja as applyTableChromePick,$ as applyThemeShade,_ as applyThemeTint,eb as arrangeToolbarGroups,vb as barRoomWidth,ic as beginEditorPreview,Zc as bindHistoryGroup,h as blankDocumentBytes,ud as bookmarkDialogInitialName,vd as bookmarkDialogNameState,pd as bookmarkDialogRows,Vb as calendarDateForKey,Xb as calendarDateFromText,Wb as calendarDateText,Tb as calendarMonth,Yb as calendarMonthNames,Rb as calendarMonthTitle,Sb as calendarWeekdays,ua as canExecuteImageCommand,ta as captureImageMutationPreconditions,Sc as changedFields,zb as chordLetter,Hb as chromeControlCount,Gb as chromeMenuSlots,Na as chromeProbeForSlot,Cb as chromeSlotId,Ta as chromeSlotIsToggle,C as clipboardDropLandsText,B as clipboardPasteLandsContent,db as collapseOrder,Y as commandExecOptions,Oa as commandForSlot,Qa as commandForSlotValue,Pa as commandForTableChromeSlotValue,Fc as computeImageResizeResult,ra as computeMovedImagePosition,qa as computeResizedImageExtentEmu,Lb as contentControlPopupKeyDown,Mb as contentControlPopupOpener,wb as controlsOverflow,E as copyEditorStyles,tc as createBrowserAutomationHost,Zb as createContentControlListNavigation,cd as createDocumentRefresh,jd as createDocumentSearch,rc as createDocxEditor,J as createFontSource,Gc as createImageOverlayScrollPort,b as createLayoutShaping,la as cropPercentFromCropPermille,ja as cropPercentFromPermille,ga as cropPercentFromSourceCrop,ka as cropPermilleFromCropPercent,ia as cropPermilleFromPercent,Bc as cssPixelsToLayoutPoints,K as customFonts,Db as defaultChromeGroups,Da as defaultTableLabel,g as deferFonts,V as dragIndent,xd as drawingPreviewDocx,_a as editorCommandKey,l as editorHostDocument,k as editorHostElement,m as editorHostWindow,uc as editorInstanceScope,hc as editorPreviewActive,pa as emuToOverlayPoints,ac as equationAtPosition,va as executeImageCommand,Hc as finalizeImageOverlayInteraction,Qb as firstDayOfWeek,Jc as formatInches,Eb as formattingBarChromeGroups,N as generateRulerTicks,td as goToBookmarkGroups,sd as goToBookmarkMatch,qd as goToBookmarkRows,rd as goToBookmarkTarget,T as handlePosition,wc as hasOpenNestedPopup,$b as historyShortcutOf,z as hostDirectionOf,i as hostDocumentOf,r as hostTimers,j as hostWindowOf,Kc as inchesToTwips,Yc as initialSplitCellCounts,nd as isChromePrintShortcut,q as isDomNode,n as isElementNode,Ab as isGoToChord,o as isHTMLElementNode,v as isInputEvent,s as isKeyboardEvent,u as isMouseEvent,t as isPointerEvent,za as isStaleImageInteractionCommit,Ea as isTableChromeSlot,p as isTextNode,Ob as isoDateOf,w as keepScrollAtInlineEnd,Ac as layoutPointsToCssPixels,ad as lineSpacingMenuRowLabel,$c as lineSpacingMenuRows,yc as listenForOutsidePress,vc as listenForPopupEscape,xc as listenForPopupFocusLeave,I as loadFonts,ba as lowerColorValueForBorder,ca as lowerColorValueForFill,Qc as mixedFieldsOf,bc as mountPaginatedSurface,Kb as observeContentControlPopup,A as observeHostDirection,D as openEditorWindow,Cc as overlayFrameToSheetCssPixels,Dc as overlayHostOrigin,Pb as parseIsoDate,H as partOfNodeId,x as placeSubmenu,oa as pointsToEmu,Jb as positionContentControlPopup,Ka as probeTableChromeCommand,xb as readAvailableWidth,ub as readColumnGap,tb as readInlineMargins,Xc as readSplitCellCounts,yb as readToolbarRow,gc as reportAutomationException,ec as reportAutomationRefusal,fc as reportAutomationReviewSkip,Ec as resizePreservesAspect,da as resolveColorValueToCss,d as resolveReviewPane,aa as resolveThemeColorHex,oc as resolveZoomMode,qc as reviewPaneEntitledZoom,e as reviewPaneListsItem,X as rulerMarginTicks,O as rulerPageBox,W as rulerTabPosition,ld as runChromeExport,od as runChromePrint,Xa as runSave,Va as runTableChromeCommand,Za as runTableCommand,Wa as runToolbarCommand,pb as sameItemOverflow,Rc as sameTabStops,pc as sameZoomMode,Oc as seedFields,ya as selectedDrawingOverlayTargetOf,sa as selectedImageStateOf,rb as separatorLeadingCost,Ub as shiftMonth,Nc as signedFirstLineOf,U as snapTwips,ha as sourceCropFromCropPercent,Mc as specialOf,F as storyLabelTop,y as submenuKeys,_b as surfaceExtent,zc as surfacePaintScale,Ma as tableChromeIconPaths,La as tableChromeLabelKeyForTarget,Ra as tableChromeToolbarState,Fa as tableChromeVisible,Aa as tableCommandState,Ya as tableCommandToolbarState,G as textboxFrameReason,a as toEditorFontError,Sa as toolbarCommandState,Ua as toolbarCommandStates,mb as toolbarGroupItems,cb as toolbarGroupPriority,lb as toolbarGroupsKey,nb as toolbarHostPanelShown,kb as toolbarItemKey,qb as toolbarOverflowItems,gb as toolbarPanelPlacement,hb as toolbarPopupLeft,ob as toolbarShownCount,sb as trailingGapCost,Vc as trapTabWithin,Ic as twipsToInches,wd as unsupportedElementRuleMatches,ma as validateImageCropPercent,Z as validateThemeModifier,ed as watchHighlights,fa as watermarkShapeBox,Uc as withTabStop}from'./chunk-HQGFS7O5.js';export{a as resolveEditorModules}from'./chunk-4HENIAFG.js';export{c as observeUnsupportedElements}from'./chunk-UILTSNM6.js';export{d as DEFAULT_FONT,n as FONT_RESOLVER_BRAND,m as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,s as composeFontOrigins,o as defineFontResolver,p as isFontResolver}from'./chunk-MCNHQCMR.js';export{t as disposeLayoutShaping}from'./chunk-I3XDNCUJ.js';import'./chunk-RIYSCEFQ.js';import'./chunk-IVQT6HDE.js';import'./chunk-7N553ZFH.js';export{gb as DEFAULT_REVISION_MARKUP,fb as REVISION_MARKUP_COLORS,hb as resolveRevisionMarkup}from'./chunk-PA4BATSI.js';import'./chunk-NTJWPRUU.js';import'./chunk-SRKJYXCG.js';import'./chunk-CZIRRKXA.js';import'./chunk-5X23LOBT.js';import'./chunk-5KPONTUV.js';import'./chunk-JWNOCKTF.js';import'./chunk-WN7ICTA5.js';import'./chunk-EVTBNATS.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,gn as DRAWING_REL_FROM_H,hn as DRAWING_REL_FROM_V,Le as IMAGE_WRAP_TARGETS,Ck as TEXT_FORM_FORMATS,jn as positionInputFromPropertiesCommand,in as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,Pf as resolveSvgIntrinsicSize,Lf as sniffImageMime,fn as validateDrawingPositionInput,Qf as validateRasterHeader,kn as validateSetImagePositionCommand}from'./chunk-KDA6HKHR.js';import'./chunk-S6J4O5XP.js';
|
package/dist/export.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkALD626VU_cjs=require('./chunk-ALD626VU.cjs'),chunkSZURLHR3_cjs=require('./chunk-SZURLHR3.cjs'),chunkAXU63LYW_cjs=require('./chunk-AXU63LYW.cjs'),chunk2DEY5NUC_cjs=require('./chunk-2DEY5NUC.cjs'),chunkUYCGCVZ2_cjs=require('./chunk-UYCGCVZ2.cjs');require('./chunk-RFUNFTGV.cjs'),require('./chunk-DYUVJNDD.cjs');var chunkZDFJW5XS_cjs=require('./chunk-ZDFJW5XS.cjs'),chunkKE6ZWRIY_cjs=require('./chunk-KE6ZWRIY.cjs');function Yt(e,o,t){let n=chunkKE6ZWRIY_cjs.Wd().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:chunk2DEY5NUC_cjs.n(y+Math.round(b.originX*f)),originY:chunk2DEY5NUC_cjs.n(Math.round(b.originY*f)),offsetX:chunk2DEY5NUC_cjs.n(Math.round(b.offsetX*f)),offsetY:chunk2DEY5NUC_cjs.n(Math.round(b.offsetY*f)),advanceX:chunk2DEY5NUC_cjs.n(Math.round(b.advanceX*f)),advanceY:chunk2DEY5NUC_cjs.n(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=chunk2DEY5NUC_cjs.n(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:chunk2DEY5NUC_cjs.n(T.advance+I),caretEdges:[chunk2DEY5NUC_cjs.n(0),chunk2DEY5NUC_cjs.n(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>chunk2DEY5NUC_cjs.n(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:chunk2DEY5NUC_cjs.r({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:chunk2DEY5NUC_cjs.n(c+h.originX),originY:chunk2DEY5NUC_cjs.n(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return chunk2DEY5NUC_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunk2DEY5NUC_cjs.n(f),descent:chunk2DEY5NUC_cjs.n(E),lineGap:chunk2DEY5NUC_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunk2DEY5NUC_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunk2DEY5NUC_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:chunk2DEY5NUC_cjs.r({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=chunk2DEY5NUC_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:chunk2DEY5NUC_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunk2DEY5NUC_cjs.d?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof chunk2DEY5NUC_cjs.d||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkALD626VU_cjs.q))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkALD626VU_cjs.r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunkAXU63LYW_cjs.h("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunk2DEY5NUC_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunk2DEY5NUC_cjs.d?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=chunk2DEY5NUC_cjs.za(n.style,n.fontSlot),r=chunk2DEY5NUC_cjs.ld(n)?chunk2DEY5NUC_cjs.md(n):chunk2DEY5NUC_cjs.ga(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkKE6ZWRIY_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkSZURLHR3_cjs.ea(e.shaper,e.environment,i,a,t))return null;let p=chunkSZURLHR3_cjs.da(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=chunk2DEY5NUC_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunkSZURLHR3_cjs.d(),chunkSZURLHR3_cjs.h({...chunkSZURLHR3_cjs.i,maxFontBytes:chunk2DEY5NUC_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunkSZURLHR3_cjs.ia(e,{resolveFont(t){return St(e,o,t)},fallback:chunk2DEY5NUC_cjs.ma()})}async function Lt(e,o,t=[],n=false,a){if(!chunkSZURLHR3_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunkSZURLHR3_cjs.k(a,chunkSZURLHR3_cjs.i),s=await At(),i=Et(await chunkSZURLHR3_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunk2DEY5NUC_cjs.la}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunkSZURLHR3_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunkSZURLHR3_cjs.k(t,chunkSZURLHR3_cjs.i),a=chunkSZURLHR3_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunkSZURLHR3_cjs.o(e)}|${a}`,p=C.get(i);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=chunkSZURLHR3_cjs.n(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await chunkSZURLHR3_cjs.t(e,f,n,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i,p),p.catch(()=>{C.get(i)===p&&C.delete(i);});}let l=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${chunk2DEY5NUC_cjs.la}`].join("|"),extensionFingerprint:l}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=chunkKE6ZWRIY_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkKE6ZWRIY_cjs.qg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkALD626VU_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunk2DEY5NUC_cjs.h(s))),r=chunkALD626VU_cjs.K(t,{maxFontBytes:chunk2DEY5NUC_cjs.a,aggregateBudget:Fo(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunk2DEY5NUC_cjs.c:Math.max(0,chunk2DEY5NUC_cjs.c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunk2DEY5NUC_cjs.c)throw new chunkAXU63LYW_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunk2DEY5NUC_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkKE6ZWRIY_cjs.pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkZDFJW5XS_cjs.va(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof chunkAXU63LYW_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunkAXU63LYW_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkAXU63LYW_cjs.i(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new chunkAXU63LYW_cjs.h("aborted","Export resource settlement was aborted"):new chunkAXU63LYW_cjs.h("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t={}){let n=chunkSZURLHR3_cjs.k(t.fontShaping,chunkSZURLHR3_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p=(async()=>{let l=bo(t.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,chunkALD626VU_cjs.c),c=chunkALD626VU_cjs.D(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkALD626VU_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkALD626VU_cjs.c),defaultFamily:chunkALD626VU_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkALD626VU_cjs.f(m??{}),g=chunkALD626VU_cjs.F(x,c),S=chunkALD626VU_cjs.G(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d,void 0,f.dropped);ne(F,t),re(F,t,t.glyphFallbacks);return}let h=await Lt(chunkSZURLHR3_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d,h.resolveFont,f.dropped,S);return ne(b,t),re(b,t,t.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,wo(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new chunkAXU63LYW_cjs.h(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=chunkUYCGCVZ2_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkALD626VU_cjs.B(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkALD626VU_cjs.y(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkALD626VU_cjs.u(e.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=chunkKE6ZWRIY_cjs.ti(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkKE6ZWRIY_cjs.ui(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkKE6ZWRIY_cjs.Jc(r),i=chunkKE6ZWRIY_cjs.Ic(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkKE6ZWRIY_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkKE6ZWRIY_cjs.pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=chunk2DEY5NUC_cjs.Gc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=chunkKE6ZWRIY_cjs.Aa||c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunk2DEY5NUC_cjs.Td(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunk2DEY5NUC_cjs.Jc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkKE6ZWRIY_cjs.Jg(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunk2DEY5NUC_cjs.Lc(n),x){let g=chunk2DEY5NUC_cjs.Ic(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunk2DEY5NUC_cjs.Ic(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunk2DEY5NUC_cjs.Sd(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}chunk2DEY5NUC_cjs.Mc(n);}continue}if(c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunk2DEY5NUC_cjs.Kc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunk2DEY5NUC_cjs.Nc(n)&&c.namespaceUri===chunkKE6ZWRIY_cjs.pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:chunkKE6ZWRIY_cjs.Ba(c,E)});}}chunk2DEY5NUC_cjs.Hc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkKE6ZWRIY_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkKE6ZWRIY_cjs.pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkKE6ZWRIY_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=chunkUYCGCVZ2_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(chunk2DEY5NUC_cjs.sc),r.namespaceUri===chunkKE6ZWRIY_cjs.pa&&r.localName==="sym"&&t(chunkUYCGCVZ2_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkKE6ZWRIY_cjs.Ud(r)),r.namespaceUri===chunkKE6ZWRIY_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunk2DEY5NUC_cjs.Rd(s??"")?.font??null);}if(r.namespaceUri===chunkKE6ZWRIY_cjs.pa&&r.localName==="p")for(let s of chunkALD626VU_cjs.A(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunk2DEY5NUC_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunk2DEY5NUC_cjs.a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
|
|
2
|
-
Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return
|
|
1
|
+
'use strict';var chunkGVZRSFUY_cjs=require('./chunk-GVZRSFUY.cjs'),chunk36OE5A2F_cjs=require('./chunk-36OE5A2F.cjs'),chunkBI2HHPJ7_cjs=require('./chunk-BI2HHPJ7.cjs'),chunkYBHYIWJH_cjs=require('./chunk-YBHYIWJH.cjs'),chunkNMV7DRHU_cjs=require('./chunk-NMV7DRHU.cjs');require('./chunk-HBEVI765.cjs'),require('./chunk-CCGWLTCP.cjs');var chunk4UOOFSL5_cjs=require('./chunk-4UOOFSL5.cjs'),chunkIK6L3RKU_cjs=require('./chunk-IK6L3RKU.cjs');function Yt(e,o,t){let n=chunkIK6L3RKU_cjs._d().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:chunkYBHYIWJH_cjs.n(y+Math.round(b.originX*f)),originY:chunkYBHYIWJH_cjs.n(Math.round(b.originY*f)),offsetX:chunkYBHYIWJH_cjs.n(Math.round(b.offsetX*f)),offsetY:chunkYBHYIWJH_cjs.n(Math.round(b.offsetY*f)),advanceX:chunkYBHYIWJH_cjs.n(Math.round(b.advanceX*f)),advanceY:chunkYBHYIWJH_cjs.n(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=chunkYBHYIWJH_cjs.n(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:chunkYBHYIWJH_cjs.n(T.advance+I),caretEdges:[chunkYBHYIWJH_cjs.n(0),chunkYBHYIWJH_cjs.n(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>chunkYBHYIWJH_cjs.n(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:chunkYBHYIWJH_cjs.r({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:chunkYBHYIWJH_cjs.n(c+h.originX),originY:chunkYBHYIWJH_cjs.n(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return chunkYBHYIWJH_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunkYBHYIWJH_cjs.n(f),descent:chunkYBHYIWJH_cjs.n(E),lineGap:chunkYBHYIWJH_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunkYBHYIWJH_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunkYBHYIWJH_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:chunkYBHYIWJH_cjs.r({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=chunkYBHYIWJH_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:chunkYBHYIWJH_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkYBHYIWJH_cjs.d?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof chunkYBHYIWJH_cjs.d||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkGVZRSFUY_cjs.q))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkGVZRSFUY_cjs.r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunkBI2HHPJ7_cjs.h("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkYBHYIWJH_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunkYBHYIWJH_cjs.d?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=chunkYBHYIWJH_cjs.Ga(n.style,n.fontSlot),r=chunkYBHYIWJH_cjs.Dd(n)?chunkYBHYIWJH_cjs.Ed(n):chunkYBHYIWJH_cjs.na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkIK6L3RKU_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunk36OE5A2F_cjs.Q(e.shaper,e.environment,i,a,t))return null;let p=chunk36OE5A2F_cjs.P(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=chunkYBHYIWJH_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunk36OE5A2F_cjs.d(),chunk36OE5A2F_cjs.h({...chunk36OE5A2F_cjs.i,maxFontBytes:chunkYBHYIWJH_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunk36OE5A2F_cjs.ga(e,{resolveFont(t){return St(e,o,t)},fallback:chunkYBHYIWJH_cjs.ta()})}async function Lt(e,o,t=[],n=false,a){if(!chunk36OE5A2F_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk36OE5A2F_cjs.k(a,chunk36OE5A2F_cjs.i),s=await At(),i=Et(await chunk36OE5A2F_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunkYBHYIWJH_cjs.sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunk36OE5A2F_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk36OE5A2F_cjs.k(t,chunk36OE5A2F_cjs.i),a=chunk36OE5A2F_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunk36OE5A2F_cjs.o(e)}|${a}`,p=C.get(i);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=chunk36OE5A2F_cjs.n(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await chunk36OE5A2F_cjs.t(e,f,n,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i,p),p.catch(()=>{C.get(i)===p&&C.delete(i);});}let l=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${chunkYBHYIWJH_cjs.sa}`].join("|"),extensionFingerprint:l}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=chunkIK6L3RKU_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkIK6L3RKU_cjs.Ng(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkGVZRSFUY_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunkYBHYIWJH_cjs.h(s))),r=chunkGVZRSFUY_cjs.K(t,{maxFontBytes:chunkYBHYIWJH_cjs.a,aggregateBudget:Fo(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkYBHYIWJH_cjs.c:Math.max(0,chunkYBHYIWJH_cjs.c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunkYBHYIWJH_cjs.c)throw new chunkBI2HHPJ7_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunkYBHYIWJH_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkIK6L3RKU_cjs.pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunk4UOOFSL5_cjs.Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof chunkBI2HHPJ7_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunkBI2HHPJ7_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkBI2HHPJ7_cjs.i(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new chunkBI2HHPJ7_cjs.h("aborted","Export resource settlement was aborted"):new chunkBI2HHPJ7_cjs.h("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t={}){let n=chunk36OE5A2F_cjs.k(t.fontShaping,chunk36OE5A2F_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p=(async()=>{let l=bo(t.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,chunkGVZRSFUY_cjs.c),c=chunkGVZRSFUY_cjs.D(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkGVZRSFUY_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkGVZRSFUY_cjs.c),defaultFamily:chunkGVZRSFUY_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkGVZRSFUY_cjs.f(m??{}),g=chunkGVZRSFUY_cjs.F(x,c),S=chunkGVZRSFUY_cjs.G(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d,void 0,f.dropped);ne(F,t),re(F,t,t.glyphFallbacks);return}let h=await Lt(chunk36OE5A2F_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d,h.resolveFont,f.dropped,S);return ne(b,t),re(b,t,t.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,wo(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new chunkBI2HHPJ7_cjs.h(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=chunkNMV7DRHU_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkGVZRSFUY_cjs.B(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkGVZRSFUY_cjs.y(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkGVZRSFUY_cjs.u(e.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=chunkIK6L3RKU_cjs.ij(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkIK6L3RKU_cjs.jj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkIK6L3RKU_cjs.Lc(r),i=chunkIK6L3RKU_cjs.Kc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkIK6L3RKU_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkIK6L3RKU_cjs.pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=chunkYBHYIWJH_cjs.Nc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=chunkIK6L3RKU_cjs.Aa||c.namespaceUri===chunkIK6L3RKU_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkIK6L3RKU_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkIK6L3RKU_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunkYBHYIWJH_cjs.ke(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===chunkIK6L3RKU_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunkYBHYIWJH_cjs.Qc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkIK6L3RKU_cjs.eh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunkYBHYIWJH_cjs.Sc(n),x){let g=chunkYBHYIWJH_cjs.Pc(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunkYBHYIWJH_cjs.Pc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunkYBHYIWJH_cjs.je(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}chunkYBHYIWJH_cjs.Tc(n);}continue}if(c.namespaceUri===chunkIK6L3RKU_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunkYBHYIWJH_cjs.Rc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunkYBHYIWJH_cjs.Uc(n)&&c.namespaceUri===chunkIK6L3RKU_cjs.pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:chunkIK6L3RKU_cjs.Ba(c,E)});}}chunkYBHYIWJH_cjs.Oc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkIK6L3RKU_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkIK6L3RKU_cjs.pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkIK6L3RKU_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=chunkNMV7DRHU_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(chunkYBHYIWJH_cjs.zc),r.namespaceUri===chunkIK6L3RKU_cjs.pa&&r.localName==="sym"&&t(chunkNMV7DRHU_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkIK6L3RKU_cjs.Yd(r)),r.namespaceUri===chunkIK6L3RKU_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkYBHYIWJH_cjs.ie(s??"")?.font??null);}if(r.namespaceUri===chunkIK6L3RKU_cjs.pa&&r.localName==="p")for(let s of chunkGVZRSFUY_cjs.A(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkYBHYIWJH_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkYBHYIWJH_cjs.a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
|
|
2
|
+
Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkBI2HHPJ7_cjs.h}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkBI2HHPJ7_cjs.d}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkBI2HHPJ7_cjs.c}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkBI2HHPJ7_cjs.i}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=ho;exports.createPackagedFileFetch=Vo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=Eo;exports.openFontBackedDocumentForExport=So;exports.replayMetafile=Yt;
|