@embedpdf/engine-core 3.0.0-next.1 → 3.0.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/{AbortError-CjSasIlL.js → AbortError-8-9JAX1Y.js} +2 -2
  2. package/dist/{AbortError-CjSasIlL.js.map → AbortError-8-9JAX1Y.js.map} +1 -1
  3. package/dist/{AbortError-ByBflvEl.cjs → AbortError-CRSooKsk.cjs} +2 -2
  4. package/dist/{AbortError-ByBflvEl.cjs.map → AbortError-CRSooKsk.cjs.map} +1 -1
  5. package/dist/{AnnotationListSnapshot-W0RCsyDE.d.cts → AnnotationListSnapshot-DDxHpJQU.d.cts} +538 -41
  6. package/dist/{AnnotationListSnapshot-W0RCsyDE.d.ts → AnnotationListSnapshot-DDxHpJQU.d.ts} +538 -41
  7. package/dist/{DocumentSecurityService-Df79fgpe.d.cts → DocumentSecurityService-BV4_YXkU.d.cts} +33 -2
  8. package/dist/{DocumentSecurityService-B-tULKNY.d.ts → DocumentSecurityService-o9aeTHwT.d.ts} +33 -2
  9. package/dist/{Engine-D9loFZc1.d.cts → Engine-D9je6GdU.d.cts} +50 -19
  10. package/dist/{Engine-B7Oe7f5i.d.ts → Engine-DOoVem7_.d.ts} +50 -19
  11. package/dist/{subtype-qejjVr6h.cjs → PageInsertBlankInput-CzShuSJI.cjs} +184 -1
  12. package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +1 -0
  13. package/dist/{subtype-BvAzLCGC.js → PageInsertBlankInput-WKY0tr6S.js} +149 -2
  14. package/dist/PageInsertBlankInput-WKY0tr6S.js.map +1 -0
  15. package/dist/{builders-C548U47M.js → builders-B_KufGJ9.js} +547 -169
  16. package/dist/builders-B_KufGJ9.js.map +1 -0
  17. package/dist/{builders-BvikWRuO.cjs → builders-Cp_rlGob.cjs} +603 -225
  18. package/dist/builders-Cp_rlGob.cjs.map +1 -0
  19. package/dist/conformance.cjs +822 -198
  20. package/dist/conformance.cjs.map +1 -1
  21. package/dist/conformance.d.cts +124 -6
  22. package/dist/conformance.d.ts +124 -6
  23. package/dist/conformance.js +777 -157
  24. package/dist/conformance.js.map +1 -1
  25. package/dist/{fold-CB4fAOOy.js → fold-BfyxxwS6.js} +162 -3
  26. package/dist/fold-BfyxxwS6.js.map +1 -0
  27. package/dist/{fold-IaMph3CO.cjs → fold-C7I5GpBz.cjs} +235 -4
  28. package/dist/fold-C7I5GpBz.cjs.map +1 -0
  29. package/dist/index.cjs +36 -18
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +4 -4
  33. package/dist/runtime.cjs +41 -23
  34. package/dist/runtime.cjs.map +1 -1
  35. package/dist/runtime.d.cts +103 -5
  36. package/dist/runtime.d.ts +103 -5
  37. package/dist/runtime.js +5 -5
  38. package/dist/{schemas-B_1VyFsm.cjs → schemas-D1pxEv3t.cjs} +138 -32
  39. package/dist/schemas-D1pxEv3t.cjs.map +1 -0
  40. package/dist/{schemas-9OpSSeM6.js → schemas-DAnu8tuW.js} +95 -13
  41. package/dist/schemas-DAnu8tuW.js.map +1 -0
  42. package/dist/wire.cjs +89 -3
  43. package/dist/wire.cjs.map +1 -1
  44. package/dist/wire.d.cts +99 -15
  45. package/dist/wire.d.ts +99 -15
  46. package/dist/wire.js +83 -4
  47. package/dist/wire.js.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/builders-BvikWRuO.cjs.map +0 -1
  50. package/dist/builders-C548U47M.js.map +0 -1
  51. package/dist/fold-CB4fAOOy.js.map +0 -1
  52. package/dist/fold-IaMph3CO.cjs.map +0 -1
  53. package/dist/schemas-9OpSSeM6.js.map +0 -1
  54. package/dist/schemas-B_1VyFsm.cjs.map +0 -1
  55. package/dist/subtype-BvAzLCGC.js.map +0 -1
  56. package/dist/subtype-qejjVr6h.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { $a as AnnotationIdentityQuality, $i as LayerScopes, $n as searchRectsForRange, $o as pdfQuadCorners, $r as ListBoxFieldDraft, $s as revisionTokensEqual, Aa as EmbeddedFileItem, Ac as PdfSize, Ai as AnnotationCreateResult, An as HighlightDraft, Ao as PageImageHandle, Ar as FormFieldDeleteResult, As as filterMatches, At as LineDraft, B as StampAnnotationDTO, Ba as BinarySource, Bc as PdfPageActions, Bi as changesAnnotationList, Bn as PageFlattenStatus, Bo as PageRenderOptions, Br as FormFieldDisplay, Bs as CollabEntity, Bt as PolygonPatch, C as RedactDraft, Ca as GeometryStyleDraftFields, Cc as InkList, Ci as ToggleFieldWidget, Cn as UnderlineAnnotationDTO, Co as AnnotationAppearancesQuery, Cr as SearchQuery, Cs as CollabTarget, Ct as LinkAnnotationDTO, Da as AttachmentFileBase, Dc as PdfQuad, Di as FormWidgetRef, Do as WeakAnnotationState, Dr as SearchSnippet, Ds as checkSetGroup, E as WidgetDraft, Ea as AttachmentContent, Ec as PdfPoint, Ei as FormFieldRef, Eo as UNKNOWN_WEAK_ANNOTATION_STATE, Er as SearchSliceBudget, Es as checkCollab, Fa as normalizeAnnotationPatch, Fc as PdfActionTree, Fi as AppearanceImpact, Fn as RedactionApplyScope, Fo as PageNetworkRenderFormat, Fr as FormWidgetLinkResult, Fs as validateScopeArray, Ft as PolylineAnnotationDTO, Ga as ANNOTATION_SUBTYPES, Gi as CacheDelta, Gn as PageRotateResult, Go as PageGeometryGlyph, Gr as FormFieldPatch, Gs as ParsedCollab, Gt as VertexPatchFields, H as StampFit, Ha as WireResource, Hc as DocumentMetadataTrapped, Hi as shiftsExistingAnnotationIndices, Hn as PageInsertResult, Ho as PageRenderTarget, Hr as FormFieldValue, Hs as DocCapability, Ht as PolygonDraft, Ia as BinaryMetadata, Ic as PdfActionType, Ii as AppearanceOutcome, In as RedactionApplyStatus, Io as PageRaster, Ir as FormEffect, Is as PDF_BITS, It as PolylineDraft, J as TextPatch, Ja as PDF_SUBTYPE_TO_CODE, Ji as PdfLinkTargetWritable, Jn as PageMoveResult, Jo as PageTextSnapshot, Jr as TextFieldPatch, Js as ParsedWildcard, Ka as AnnotationSubtype, Ki as MutationMeta, Kn as PageRotateInput, Ko as PageGeometryRun, Kr as ListBoxFieldPatch, Ks as ParsedScope, La as BinaryMimeType, Lc as PdfActionWarning, Li as appearanceImpactOf, Ln as PageFlattenInput, Lo as PageRenderBackground, Lr as FormEffectResult, Ls as decodePdfBits, M as FileAttachmentPatch, Ma as NormalizedDraft, Mc as DocumentActionsSnapshot, Mi as AnnotationMoveResult, Mn as MetadataUpdateResult, Mo as PageImageOptions, Mr as FormImportResult, Ms as MissingIdentity, N as FileAttachmentAnnotationDTO, Na as NormalizedPatch, Nc as NamedJavaScriptAction, Ni as AnnotationUpdateResult, Nn as RedactionApplyItemResult, No as PageImageResult, Nr as FormRepairResult, Ns as PermissionDenied, Oa as AttachmentFileInfo, Oc as PdfRect, Oi as decodeFieldRefKey, On as HighlightPatch, Oo as knownWeakAnnotationState, Or as FormDataExport, Os as expandRawScope, Ot as LinePatch, Pa as normalizeAnnotationDraft, Pc as PdfActionNode, Pi as AppearanceAction, Pn as RedactionApplyResult, Po as PageImageSource, Pr as FormSetValueResult, Ps as parseScope, Pt as PolylinePatch, Qa as AnnotationBase, Qi as LayerScopePlane, Qn as searchContentEpoch, Qo as pdfQuadBounds, Qr as FormFieldOptionInput, Qs as RevisionToken, R as StampPatch, Ra as sniffBinaryMetadata, Rc as PdfAnnotationActions, Ri as semanticEqual, Rn as PageFlattenItemResult, Ro as PageRenderEncodedFormat, Rr as FormEffectStatus, Rs as AnnotationActor, S as RedactAnnotationDTO, Sa as FilledStylePatchFields, Sc as CalloutLine, Si as TextFieldDTO, Sn as UnderlinePatch, So as AnnotationAppearanceRenderOptions, Sr as SearchMode, Ss as pdfPermissions, St as LinkPatch, T as WidgetAnnotationDTO, Ta as GeometryStylePatchFields, Tc as LinePoints, Ti as FormValueEntry, To as PageState, Tr as SearchSlice, Ts as checkCapability, U as StampWireDraft, Ua as WireResourceMap, Ui as AnnotationListMutationMeta, Un as PageDeleteResult, Uo as PageRenderViewport, Ur as CheckboxFieldPatch, Us as IdentityClaims, Ut as VertexAnnotationFields, V as StampDraft, Va as ResourceRef, Vc as DocumentMetadata, Vi as invalidatesWeakIndexRefs, Vn as PageFlattenUsage, Vo as PageRenderQuery, Vr as FormDataFormat, Vs as CollabFilter, Vt as PolygonAnnotationDTO, Wa as resolveBinarySource, Wi as RefetchReason, Wn as PageDeleteInput, Wo as createPageImageHandle, Wr as ComboBoxFieldPatch, Ws as ParsedCapability, Wt as VertexDraftFields, X as NoteIcon, Xa as subtypeFromCode, Xi as DocumentManifest, Xn as PageMoveInput, Xo as PdfQuadCorners, Xr as ComboBoxFieldDraft, Xs as AnnotationDraftBase, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as PdfAnnotationSubtypeCode, Yi as PdfDestination, Yn as PageStructureCache, Yo as PdfOriginSize, Yr as CheckboxFieldDraft, Ys as PdfBits, Yt as SquarePatch, Z as TextDraft, Za as AnnotationPatchBase, Zi as ManifestPage, Zn as canonicalSearchQuery, Zo as normalizePdfRect, Zr as FormFieldDraft, Zs as AnnotationRef, Zt as SquareDraft, _a as ColorStyleDraftFields, _c as Rotation, _i as FormFieldOrigin, _n as SquigglyAnnotationDTO, _o as AnnotationAppearanceImagesResult, _r as SEARCH_FOLD_VERSION, _s as OpenOptions, aa as AnnotationKindModule, ac as BlendMode, ai as WidgetAppearance, an as ShapeDraftFields, ao as SerializedEngineError, ar as SearchQueryValidation, as as pdfRectWidth, b as UnsupportedAnnotationDTO, ba as FilledStyleDraftFields, bc as StrikeoutIntent, bi as RadioFieldDTO, bo as AnnotationAppearanceMode, br as toOriginalRange, bs as collab, c as AnnotationKind, ca as PatchOfKind, cc as FreeTextFont, ci as WidgetStyleFields, co as EngineErrorCode, cr as matchRegex, cs as PageLayout, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as AttachmentsCache, dc as LineEnding, di as ComboBoxFieldDTO, dn as StrikeoutAnnotationDTO, do as FontSpec, dr as foldOptionsFor, ds as OpenInput, ea as AnnotationRelationKind, ec as PageObjectNumber, ei as RadioFieldDraft, eo as AnnotationStableId, er as SEARCH_SNIPPET_CONTEXT, es as pdfQuadFromCorners, fa as normalizeAttachmentFileSource, fc as LineEndings, fi as FormFieldBase, fn as StrikeoutDraft, fo as DEFAULT_PDF_SAVE_MODE, fr as matchLiteral, fs as OpenInputById, ga as WireAttachmentFile, gc as Rect, gi as FormFieldOption, gn as SquigglyPatch, go as AnnotationAppearanceImageOptions, gr as FoldedText, gs as OpenInputToken, ha as FileAttachmentWireDraft, hc as Point, hi as FormFieldFlags, ho as AnnotationAppearanceImage, hr as FoldOptions, hs as OpenInputLayerSource, ht as InkDraft, i as AnnotationDTO, ia as refKey, ic as AnnotationReplyType, ii as FormSnapshot, in as ShapeAnnotationFields, io as EngineErrorOptions, ir as SearchQueryIssue, is as pdfRectToOriginSize, ja as EmbeddedFileRef, jc as ActionReadBudget, ji as AnnotationDeleteResult, jn as MetadataCache, jo as PageImageObjectUrl, jr as FormFieldUpdateResult, js as InvalidScope, ka as AttachmentFileSource, kc as PdfRotation, ki as encodeFieldRefKey, kn as HighlightAnnotationDTO, ko as PageImageBlobSource, kr as FormFieldCreateResult, ks as expandedCapabilities, kt as LineAnnotationDTO, l as AnnotationPatch, la as AttachmentCreateResult, lc as FreeTextIntent, li as WidgetStylePatchFields, lo as FontHandle, lr as validateSearchQuery, ls as PageRotation, lt as FreeTextDraft, m as WireAnnotationPatch, ma as FileAttachmentIcon, mc as PdfRectDifferences, mi as FormFieldFamily, mo as CachePins, mr as wordBefore, ms as OpenInputLayerBytes, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as buildThreads, nc as AnnotationBorderStyle, ni as WidgetPlacement, nn as CircleAnnotationDTO, no as encodeStableIdKey, nr as matchPageText, ns as pdfRectHeight, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as DTOOfKind, oc as CaretIntent, on as ShapePatchFields, oo as deserializeError, or as SearchRegexIssue, os as PageListSnapshot, p as WireAnnotationDraft, pa as FileAttachmentDraft, pc as NO_ANNOTATION_FLAGS, pi as FormFieldDTO, po as PdfSaveMode, pr as wordAt, ps as OpenInputBytes, pt as InkPatch, qa as PDF_CODE_TO_SUBTYPE, qi as PdfLinkTarget, qn as PageMoveCache, qo as PageGeometrySnapshot, qr as RadioFieldPatch, qs as ParsedVirtual, ra as classifyRelation, rc as AnnotationFlags, ri as FormKind, rn as CircleDraft, ro as EngineError, rr as SEARCH_REGEX_MAX_LENGTH, rs as pdfRectSize, rt as CaretDraft, sa as DraftOfKind, sc as Color, si as WidgetStyleDraftFields, so as serializeError, sr as SearchRegexValidation, ss as PageBoxes, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as AnnotationThread, tc as isValidPageObjectNumber, ti as TextFieldDraft, tn as CirclePatch, to as decodeStableIdKey, tr as buildSnippet, ts as pdfRectFromOriginSize, tt as CaretPatch, ua as AttachmentDeleteResult, uc as InkIntent, ui as CheckboxFieldDTO, un as StrikeoutPatch, uo as FontKey, ur as validateSearchRegex, us as MetadataPatch, v as UnsupportedPatch, va as ColorStyleFields, vc as Size, vi as ListBoxFieldDTO, vn as SquigglyDraft, vo as AnnotationAppearanceManifest, vr as SearchMatchRange, vs as TokenSource, w as WidgetPatch, wa as GeometryStyleFields, wc as InkStroke, wi as UnknownFieldDTO, wn as UnderlineDraft, wo as AnnotationAppearancesResult, wr as SearchRequest, ws as checkAnyCapability, wt as LinkDraft, x as RedactPatch, xa as FilledStyleFields, xc as TextAlignment, xi as SignatureFieldDTO, xo as AnnotationAppearanceRaster, xr as SearchMatch, xs as materializePdfPermissions, y as UnsupportedDraft, ya as ColorStylePatchFields, yc as StandardFont, yi as PushButtonFieldDTO, yo as AnnotationAppearanceManifestEntry, yr as foldText, ys as caps, z as StampWirePatch, za as BinaryPayload, zc as PdfFieldActions, zi as AnnotationMutationKind, zn as PageFlattenResult, zo as PageRenderFormat, zr as FormEffectsResult, zs as CollabAction } from "./AnnotationListSnapshot-W0RCsyDE.cjs";
2
- export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, type AnnotationIdentityQuality, type AnnotationKind, type AnnotationKindModule, type AnnotationListMutationMeta, type AnnotationListPageSnapshot, type AnnotationListSnapshotAllPages, type AnnotationMoveResult, type AnnotationMutationKind, type AnnotationPatch, type AnnotationPatchBase, type AnnotationRef, type AnnotationRelationKind, type AnnotationReplyType, type AnnotationStableId, type AnnotationSubtype, type AnnotationSubtypeOfKind, type AnnotationThread, type AnnotationUpdateResult, type AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, type FileAttachmentAnnotationDTO, type FileAttachmentDraft, type FileAttachmentIcon, type FileAttachmentPatch, type FileAttachmentWireDraft, type FilledStyleDraftFields, type FilledStyleFields, type FilledStylePatchFields, type FoldOptions, type FoldedText, type FontHandle, type FontKey, type FontSpec, type FormDataExport, type FormDataFormat, type FormEffect, type FormEffectResult, type FormEffectStatus, type FormEffectsResult, type FormFieldBase, type FormFieldCreateResult, type FormFieldDTO, type FormFieldDeleteResult, type FormFieldDisplay, type FormFieldDraft, type FormFieldFamily, type FormFieldFlags, type FormFieldOption, type FormFieldOptionInput, type FormFieldOrigin, type FormFieldPatch, type FormFieldRef, type FormFieldUpdateResult, type FormFieldValue, type FormImportResult, type FormKind, type FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, type LayerScopePlane, type LayerScopes, type LineAnnotationDTO, type LineDraft, type LineEnding, type LineEndings, type LinePatch, type LinePoints, type LinkAnnotationDTO, type LinkDraft, type LinkPatch, type ListBoxFieldDTO, type ListBoxFieldDraft, type ListBoxFieldPatch, type ManifestPage, type MetadataCache, type MetadataPatch, type MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputToken, type OpenOptions, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PatchOfKind, type PdfActionNode, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, PermissionDenied, type Point, type PolygonAnnotationDTO, type PolygonDraft, type PolygonPatch, type PolylineAnnotationDTO, type PolylineDraft, type PolylinePatch, type PushButtonFieldDTO, type RadioFieldDTO, type RadioFieldDraft, type RadioFieldPatch, type Rect, type RedactAnnotationDTO, type RedactDraft, type RedactPatch, type RedactionApplyItemResult, type RedactionApplyResult, type RedactionApplyScope, type RedactionApplyStatus, type RefetchReason, type ResourceRef, type RevisionToken, type Rotation, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, type SearchMatch, type SearchMatchRange, type SearchMode, type SearchQuery, type SearchQueryIssue, type SearchQueryValidation, type SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, type SignatureFieldDTO, type Size, type SquareAnnotationDTO, type SquareDraft, type SquarePatch, type SquigglyAnnotationDTO, type SquigglyDraft, type SquigglyPatch, type StampAnnotationDTO, type StampDraft, type StampFit, type StampPatch, type StampWireDraft, type StampWirePatch, type StandardFont, type StrikeoutAnnotationDTO, type StrikeoutDraft, type StrikeoutIntent, type StrikeoutPatch, type TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, type TextPatch, type ToggleFieldWidget, type TokenSource, UNKNOWN_WEAK_ANNOTATION_STATE, type UnderlineAnnotationDTO, type UnderlineDraft, type UnderlinePatch, type UnknownFieldDTO, type UnsupportedAnnotationDTO, type UnsupportedDraft, type UnsupportedPatch, type VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, type WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WireResource, type WireResourceMap, appearanceImpactOf, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandedCapabilities, filterMatches, foldOptionsFor, foldText, invalidatesWeakIndexRefs, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sniffBinaryMetadata, subtypeFromCode, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
1
+ import { $a as NormalizedPatch, $c as StandardFont, $i as AnnotationMutationKind, $n as canonicalSearchQuery, $o as PageImageResult, $r as FormEffectsResult, $s as caps, Aa as AttachmentDeleteResult, Ac as AnnotationDraftBase, Ai as FormFieldOption, An as HighlightDraft, Ao as FontKey, Ar as SearchSnippet, As as normalizePdfRect, At as LineDraft, B as StampAnnotationDTO, Ba as FilledStyleDraftFields, Bc as CaretIntent, Bi as FormFieldRef, Bn as PageFlattenStatus, Bo as AnnotationAppearanceMode, Br as textGlyphQuad, Bs as PageBoxes, Bt as PolygonPatch, C as RedactDraft, Ca as classifyRelation, Cc as IdentityClaims, Ci as WidgetStylePatchFields, Cn as UnderlineAnnotationDTO, Co as EngineError, Cr as toOriginalRange, Cs as boundaryTextOffset, Ct as LinkAnnotationDTO, Da as DraftOfKind, Dc as ParsedVirtual, Di as FormFieldDTO, Do as serializeError, Dr as SearchRequest, Ds as sliceTextByChars, E as WidgetDraft, Ea as DTOOfKind, Ec as ParsedScope, Ei as FormFieldBase, Eo as deserializeError, Er as SearchQuery, Es as charRangeForTextOffsets, Fa as FileAttachmentWireDraft, Fc as isValidPageObjectNumber, Fi as SignatureFieldDTO, Fn as RedactionApplyScope, Fo as AnnotationAppearanceImage, Fr as TextLayoutRun, Fs as pdfRectHeight, Ft as PolylineAnnotationDTO, Ga as GeometryStylePatchFields, Gc as LineEnding, Gi as AnnotationDeleteResult, Gn as PageDeleteResult, Go as PageState, Gr as FormFieldUpdateResult, Gs as OpenInputById, Gt as VertexPatchFields, H as StampFit, Ha as FilledStylePatchFields, Hc as FreeTextFont, Hi as decodeFieldRefKey, Hn as PAGE_INSERT_BLANK_MAX_COUNT, Ho as AnnotationAppearanceRenderOptions, Hr as FormDataExport, Hs as PageRotation, Ht as PolygonDraft, Ia as WireAttachmentFile, Ic as AnnotationBorderStyle, Ii as TextFieldDTO, In as RedactionApplyStatus, Io as AnnotationAppearanceImageOptions, Ir as buildPageTextLayout, Is as pdfRectSize, It as PolylineDraft, J as TextPatch, Ja as AttachmentFileInfo, Jc as PdfRectDifferences, Ji as AppearanceAction, Jn as PageRotateInput, Jo as knownWeakAnnotationState, Jr as FormSetValueResult, Js as OpenInputLayerSource, Ka as AttachmentContent, Kc as LineEndings, Ki as AnnotationMoveResult, Kn as PageDeleteInput, Ko as UNKNOWN_WEAK_ANNOTATION_STATE, Kr as FormImportResult, Ks as OpenInputBytes, La as ColorStyleDraftFields, Lc as AnnotationFlags, Li as ToggleFieldWidget, Ln as PageFlattenInput, Lo as AnnotationAppearanceImagesResult, Lr as expandTextRangeToLine, Ls as pdfRectToOriginSize, M as FileAttachmentPatch, Ma as normalizeAttachmentFileSource, Mc as RevisionToken, Mi as ListBoxFieldDTO, Mn as MetadataUpdateResult, Mo as DEFAULT_PDF_SAVE_MODE, Mr as PdfTextSegment, Ms as pdfQuadCorners, N as FileAttachmentAnnotationDTO, Na as FileAttachmentDraft, Nc as revisionTokensEqual, Ni as PushButtonFieldDTO, Nn as RedactionApplyItemResult, No as PdfSaveMode, Nr as TextLayoutFrame, Ns as pdfQuadFromCorners, Oa as PatchOfKind, Oc as ParsedWildcard, Oi as FormFieldFamily, On as HighlightPatch, Oo as EngineErrorCode, Or as SearchSlice, Os as PdfOriginSize, Ot as LinePatch, Pa as FileAttachmentIcon, Pc as PageObjectNumber, Pi as RadioFieldDTO, Pn as RedactionApplyResult, Po as CachePins, Pr as TextLayoutGlyph, Ps as pdfRectFromOriginSize, Pt as PolylinePatch, Qa as NormalizedDraft, Qc as Size, Qi as semanticEqual, Qn as PageMoveInput, Qo as PageImageOptions, Qr as FormEffectStatus, Qs as TokenSource, R as StampPatch, Ra as ColorStyleFields, Rc as AnnotationReplyType, Ri as UnknownFieldDTO, Rn as PageFlattenItemResult, Ro as AnnotationAppearanceManifest, Rr as expandTextRangeToWord, Rs as pdfRectWidth, S as RedactAnnotationDTO, Sa as buildThreads, Sc as DocCapability, Si as WidgetStyleFields, Sl as DocumentMetadataTrapped, Sn as UnderlinePatch, So as encodeStableIdKey, Sr as foldText, Ss as CharMapAnchor, St as LinkPatch, T as WidgetAnnotationDTO, Ta as AnnotationKindModule, Tc as ParsedCollab, Ti as ComboBoxFieldDTO, To as SerializedEngineError, Tr as SearchMode, Ts as charMapViolation, U as StampWireDraft, Ua as GeometryStyleDraftFields, Uc as FreeTextIntent, Ui as encodeFieldRefKey, Un as PageInsertBlankSpec, Uo as AnnotationAppearancesQuery, Ur as FormFieldCreateResult, Us as MetadataPatch, Ut as VertexAnnotationFields, V as StampDraft, Va as FilledStyleFields, Vc as Color, Vi as FormWidgetRef, Vn as PageFlattenUsage, Vo as AnnotationAppearanceRaster, Vr as textSegmentsForRange, Vs as PageLayout, Vt as PolygonAnnotationDTO, Wa as GeometryStyleFields, Wc as InkIntent, Wi as AnnotationCreateResult, Wn as PageInsertResult, Wo as AnnotationAppearancesResult, Wr as FormFieldDeleteResult, Ws as OpenInput, Wt as VertexDraftFields, X as NoteIcon, Xa as EmbeddedFileItem, Xc as Rect, Xi as AppearanceOutcome, Xn as PageMoveResult, Xo as PageImageHandle, Xr as FormEffect, Xs as OpenInputToken, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as AttachmentFileSource, Yc as Point, Yi as AppearanceImpact, Yn as PageMoveCache, Yo as PageImageBlobSource, Yr as FormWidgetLinkResult, Ys as OpenInputShare, Yt as SquarePatch, Z as TextDraft, Za as EmbeddedFileRef, Zc as Rotation, Zi as appearanceImpactOf, Zn as PageStructureCache, Zo as PageImageObjectUrl, Zr as FormEffectResult, Zs as OpenOptions, Zt as SquareDraft, _a as ReviewStatus, _c as decodePdfBits, _i as FormKind, _l as PdfActionWarning, _n as SquigglyAnnotationDTO, _o as AnnotationPatchBase, _r as wordBefore, _s as glyphLooseBounds, aa as CacheDelta, ac as checkCapability, ai as FormFieldPatch, al as LinePoints, an as ShapeDraftFields, ao as BinaryPayload, ar as matchPageText, as as PageRenderFormat, b as UnsupportedAnnotationDTO, ba as AnnotationRelationKind, bc as CollabEntity, bl as PdfPageActions, bo as AnnotationStableId, br as SEARCH_FOLD_VERSION, bs as PageTextSnapshot, c as AnnotationKind, ca as PdfLinkTargetWritable, cc as expandRawScope, ci as TextFieldPatch, cl as PdfRect, co as WireResource, cr as SearchQueryValidation, cs as PageRenderTarget, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as ManifestPage, dc as InvalidScope, di as FormFieldDraft, dl as ActionReadBudget, dn as StrikeoutAnnotationDTO, do as ANNOTATION_SUBTYPES, dr as matchRegex, ds as PageGeometryGlyph, ea as changesAnnotationList, ec as collab, ei as FormFieldDisplay, el as StrikeoutIntent, eo as normalizeAnnotationDraft, er as searchContentEpoch, es as PageImageSource, fa as LayerScopePlane, fc as MissingIdentity, fi as FormFieldOptionInput, fl as DocumentActionsSnapshot, fn as StrikeoutDraft, fo as AnnotationSubtype, fr as validateSearchQuery, fs as PageGeometryRun, ga as CommentThreadReview, gc as PDF_BITS, gi as WidgetPlacement, gl as PdfActionType, gn as SquigglyPatch, go as subtypeFromCode, gr as wordAt, gs as UprightGeometryRun, ha as CommentThread, hc as validateScopeArray, hi as TextFieldDraft, hl as PdfActionTree, ho as PdfAnnotationSubtypeCode, hr as matchLiteral, hs as RotatedGeometryRun, ht as InkDraft, i as AnnotationDTO, ia as RefetchReason, ic as checkAnyCapability, ii as ComboBoxFieldPatch, il as InkStroke, in as ShapeAnnotationFields, io as sniffBinaryMetadata, ir as buildSnippet, is as PageRenderEncodedFormat, ja as AttachmentsCache, jc as AnnotationRef, ji as FormFieldOrigin, jn as MetadataCache, jo as FontSpec, jr as PageTextLayout, js as pdfQuadBounds, ka as AttachmentCreateResult, kc as PdfBits, ki as FormFieldFlags, kn as HighlightAnnotationDTO, ko as FontHandle, kr as SearchSliceBudget, ks as PdfQuadCorners, kt as LineAnnotationDTO, l as AnnotationPatch, la as PdfDestination, lc as expandedCapabilities, li as CheckboxFieldDraft, ll as PdfRotation, lo as WireResourceMap, lr as SearchRegexIssue, ls as PageRenderViewport, lt as FreeTextDraft, m as WireAnnotationPatch, ma as BuildCommentThreadsOptions, mc as parseScope, mi as RadioFieldDraft, ml as PdfActionNode, mo as PDF_SUBTYPE_TO_CODE, mr as foldOptionsFor, ms as RotatedGeometryGlyph, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as shiftsExistingAnnotationIndices, nc as pdfPermissions, ni as FormFieldValue, nl as CalloutLine, nn as CircleAnnotationDTO, no as BinaryMetadata, nr as searchSegmentsForRange, ns as PageRaster, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as MutationMeta, oc as checkCollab, oi as ListBoxFieldPatch, ol as PdfPoint, on as ShapePatchFields, oo as BinarySource, or as SEARCH_REGEX_MAX_LENGTH, os as PageRenderOptions, p as WireAnnotationDraft, pa as LayerScopes, pc as PermissionDenied, pi as ListBoxFieldDraft, pl as NamedJavaScriptAction, po as PDF_CODE_TO_SUBTYPE, pr as validateSearchRegex, ps as PageGeometrySnapshot, pt as InkPatch, qa as AttachmentFileBase, qc as NO_ANNOTATION_FLAGS, qi as AnnotationUpdateResult, qn as PageRotateResult, qo as WeakAnnotationState, qr as FormRepairResult, qs as OpenInputLayerBytes, ra as AnnotationListMutationMeta, rc as CollabTarget, ri as CheckboxFieldPatch, rl as InkList, rn as CircleDraft, ro as BinaryMimeType, rr as SEARCH_SNIPPET_CONTEXT, rs as PageRenderBackground, rt as CaretDraft, sa as PdfLinkTarget, sc as checkSetGroup, si as RadioFieldPatch, sl as PdfQuad, so as ResourceRef, sr as SearchQueryIssue, ss as PageRenderQuery, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as invalidatesWeakIndexRefs, tc as materializePdfPermissions, ti as FormDataFormat, tl as TextAlignment, tn as CirclePatch, to as normalizeAnnotationPatch, tr as searchRectsForRange, ts as PageNetworkRenderFormat, tt as CaretPatch, ua as DocumentManifest, uc as filterMatches, ui as ComboBoxFieldDraft, ul as PdfSize, un as StrikeoutPatch, uo as resolveBinarySource, ur as SearchRegexValidation, us as createPageImageHandle, v as UnsupportedPatch, va as buildCommentThreads, vc as AnnotationActor, vi as FormSnapshot, vl as PdfAnnotationActions, vn as SquigglyDraft, vo as AnnotationBase, vr as FoldOptions, vs as glyphLooseQuad, w as WidgetPatch, wa as refKey, wc as ParsedCapability, wi as CheckboxFieldDTO, wn as UnderlineDraft, wo as EngineErrorOptions, wr as SearchMatch, ws as charBoundaryAtTextOffset, wt as LinkDraft, x as RedactPatch, xa as AnnotationThread, xc as CollabFilter, xi as WidgetStyleDraftFields, xl as DocumentMetadata, xo as decodeStableIdKey, xr as SearchMatchRange, xs as CharBoundaryBias, y as UnsupportedDraft, ya as isStateAnnotation, yc as CollabAction, yi as WidgetAppearance, yl as PdfFieldActions, yo as AnnotationIdentityQuality, yr as FoldedText, ys as isRotatedGeometryRun, z as StampWirePatch, za as ColorStylePatchFields, zc as BlendMode, zi as FormValueEntry, zn as PageFlattenResult, zo as AnnotationAppearanceManifestEntry, zr as textGlyphAt, zs as PageListSnapshot } from "./AnnotationListSnapshot-DDxHpJQU.cjs";
2
+ export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, type AnnotationIdentityQuality, type AnnotationKind, type AnnotationKindModule, type AnnotationListMutationMeta, type AnnotationListPageSnapshot, type AnnotationListSnapshotAllPages, type AnnotationMoveResult, type AnnotationMutationKind, type AnnotationPatch, type AnnotationPatchBase, type AnnotationRef, type AnnotationRelationKind, type AnnotationReplyType, type AnnotationStableId, type AnnotationSubtype, type AnnotationSubtypeOfKind, type AnnotationThread, type AnnotationUpdateResult, type AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type BuildCommentThreadsOptions, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CharBoundaryBias, type CharMapAnchor, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, type CommentThread, type CommentThreadReview, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, type FileAttachmentAnnotationDTO, type FileAttachmentDraft, type FileAttachmentIcon, type FileAttachmentPatch, type FileAttachmentWireDraft, type FilledStyleDraftFields, type FilledStyleFields, type FilledStylePatchFields, type FoldOptions, type FoldedText, type FontHandle, type FontKey, type FontSpec, type FormDataExport, type FormDataFormat, type FormEffect, type FormEffectResult, type FormEffectStatus, type FormEffectsResult, type FormFieldBase, type FormFieldCreateResult, type FormFieldDTO, type FormFieldDeleteResult, type FormFieldDisplay, type FormFieldDraft, type FormFieldFamily, type FormFieldFlags, type FormFieldOption, type FormFieldOptionInput, type FormFieldOrigin, type FormFieldPatch, type FormFieldRef, type FormFieldUpdateResult, type FormFieldValue, type FormImportResult, type FormKind, type FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, type LayerScopePlane, type LayerScopes, type LineAnnotationDTO, type LineDraft, type LineEnding, type LineEndings, type LinePatch, type LinePoints, type LinkAnnotationDTO, type LinkDraft, type LinkPatch, type ListBoxFieldDTO, type ListBoxFieldDraft, type ListBoxFieldPatch, type ManifestPage, type MetadataCache, type MetadataPatch, type MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputShare, type OpenInputToken, type OpenOptions, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertBlankSpec, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextLayout, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PatchOfKind, type PdfActionNode, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, type PdfTextSegment, PermissionDenied, type Point, type PolygonAnnotationDTO, type PolygonDraft, type PolygonPatch, type PolylineAnnotationDTO, type PolylineDraft, type PolylinePatch, type PushButtonFieldDTO, type RadioFieldDTO, type RadioFieldDraft, type RadioFieldPatch, type Rect, type RedactAnnotationDTO, type RedactDraft, type RedactPatch, type RedactionApplyItemResult, type RedactionApplyResult, type RedactionApplyScope, type RedactionApplyStatus, type RefetchReason, type ResourceRef, type ReviewStatus, type RevisionToken, type RotatedGeometryGlyph, type RotatedGeometryRun, type Rotation, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, type SearchMatch, type SearchMatchRange, type SearchMode, type SearchQuery, type SearchQueryIssue, type SearchQueryValidation, type SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, type SignatureFieldDTO, type Size, type SquareAnnotationDTO, type SquareDraft, type SquarePatch, type SquigglyAnnotationDTO, type SquigglyDraft, type SquigglyPatch, type StampAnnotationDTO, type StampDraft, type StampFit, type StampPatch, type StampWireDraft, type StampWirePatch, type StandardFont, type StrikeoutAnnotationDTO, type StrikeoutDraft, type StrikeoutIntent, type StrikeoutPatch, type TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, type TextLayoutFrame, type TextLayoutGlyph, type TextLayoutRun, type TextPatch, type ToggleFieldWidget, type TokenSource, UNKNOWN_WEAK_ANNOTATION_STATE, type UnderlineAnnotationDTO, type UnderlineDraft, type UnderlinePatch, type UnknownFieldDTO, type UnsupportedAnnotationDTO, type UnsupportedDraft, type UnsupportedPatch, type UprightGeometryRun, type VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, type WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WireResource, type WireResourceMap, appearanceImpactOf, boundaryTextOffset, buildCommentThreads, buildPageTextLayout, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, charBoundaryAtTextOffset, charMapViolation, charRangeForTextOffsets, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandTextRangeToLine, expandTextRangeToWord, expandedCapabilities, filterMatches, foldOptionsFor, foldText, glyphLooseBounds, glyphLooseQuad, invalidatesWeakIndexRefs, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, sniffBinaryMetadata, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $a as AnnotationIdentityQuality, $i as LayerScopes, $n as searchRectsForRange, $o as pdfQuadCorners, $r as ListBoxFieldDraft, $s as revisionTokensEqual, Aa as EmbeddedFileItem, Ac as PdfSize, Ai as AnnotationCreateResult, An as HighlightDraft, Ao as PageImageHandle, Ar as FormFieldDeleteResult, As as filterMatches, At as LineDraft, B as StampAnnotationDTO, Ba as BinarySource, Bc as PdfPageActions, Bi as changesAnnotationList, Bn as PageFlattenStatus, Bo as PageRenderOptions, Br as FormFieldDisplay, Bs as CollabEntity, Bt as PolygonPatch, C as RedactDraft, Ca as GeometryStyleDraftFields, Cc as InkList, Ci as ToggleFieldWidget, Cn as UnderlineAnnotationDTO, Co as AnnotationAppearancesQuery, Cr as SearchQuery, Cs as CollabTarget, Ct as LinkAnnotationDTO, Da as AttachmentFileBase, Dc as PdfQuad, Di as FormWidgetRef, Do as WeakAnnotationState, Dr as SearchSnippet, Ds as checkSetGroup, E as WidgetDraft, Ea as AttachmentContent, Ec as PdfPoint, Ei as FormFieldRef, Eo as UNKNOWN_WEAK_ANNOTATION_STATE, Er as SearchSliceBudget, Es as checkCollab, Fa as normalizeAnnotationPatch, Fc as PdfActionTree, Fi as AppearanceImpact, Fn as RedactionApplyScope, Fo as PageNetworkRenderFormat, Fr as FormWidgetLinkResult, Fs as validateScopeArray, Ft as PolylineAnnotationDTO, Ga as ANNOTATION_SUBTYPES, Gi as CacheDelta, Gn as PageRotateResult, Go as PageGeometryGlyph, Gr as FormFieldPatch, Gs as ParsedCollab, Gt as VertexPatchFields, H as StampFit, Ha as WireResource, Hc as DocumentMetadataTrapped, Hi as shiftsExistingAnnotationIndices, Hn as PageInsertResult, Ho as PageRenderTarget, Hr as FormFieldValue, Hs as DocCapability, Ht as PolygonDraft, Ia as BinaryMetadata, Ic as PdfActionType, Ii as AppearanceOutcome, In as RedactionApplyStatus, Io as PageRaster, Ir as FormEffect, Is as PDF_BITS, It as PolylineDraft, J as TextPatch, Ja as PDF_SUBTYPE_TO_CODE, Ji as PdfLinkTargetWritable, Jn as PageMoveResult, Jo as PageTextSnapshot, Jr as TextFieldPatch, Js as ParsedWildcard, Ka as AnnotationSubtype, Ki as MutationMeta, Kn as PageRotateInput, Ko as PageGeometryRun, Kr as ListBoxFieldPatch, Ks as ParsedScope, La as BinaryMimeType, Lc as PdfActionWarning, Li as appearanceImpactOf, Ln as PageFlattenInput, Lo as PageRenderBackground, Lr as FormEffectResult, Ls as decodePdfBits, M as FileAttachmentPatch, Ma as NormalizedDraft, Mc as DocumentActionsSnapshot, Mi as AnnotationMoveResult, Mn as MetadataUpdateResult, Mo as PageImageOptions, Mr as FormImportResult, Ms as MissingIdentity, N as FileAttachmentAnnotationDTO, Na as NormalizedPatch, Nc as NamedJavaScriptAction, Ni as AnnotationUpdateResult, Nn as RedactionApplyItemResult, No as PageImageResult, Nr as FormRepairResult, Ns as PermissionDenied, Oa as AttachmentFileInfo, Oc as PdfRect, Oi as decodeFieldRefKey, On as HighlightPatch, Oo as knownWeakAnnotationState, Or as FormDataExport, Os as expandRawScope, Ot as LinePatch, Pa as normalizeAnnotationDraft, Pc as PdfActionNode, Pi as AppearanceAction, Pn as RedactionApplyResult, Po as PageImageSource, Pr as FormSetValueResult, Ps as parseScope, Pt as PolylinePatch, Qa as AnnotationBase, Qi as LayerScopePlane, Qn as searchContentEpoch, Qo as pdfQuadBounds, Qr as FormFieldOptionInput, Qs as RevisionToken, R as StampPatch, Ra as sniffBinaryMetadata, Rc as PdfAnnotationActions, Ri as semanticEqual, Rn as PageFlattenItemResult, Ro as PageRenderEncodedFormat, Rr as FormEffectStatus, Rs as AnnotationActor, S as RedactAnnotationDTO, Sa as FilledStylePatchFields, Sc as CalloutLine, Si as TextFieldDTO, Sn as UnderlinePatch, So as AnnotationAppearanceRenderOptions, Sr as SearchMode, Ss as pdfPermissions, St as LinkPatch, T as WidgetAnnotationDTO, Ta as GeometryStylePatchFields, Tc as LinePoints, Ti as FormValueEntry, To as PageState, Tr as SearchSlice, Ts as checkCapability, U as StampWireDraft, Ua as WireResourceMap, Ui as AnnotationListMutationMeta, Un as PageDeleteResult, Uo as PageRenderViewport, Ur as CheckboxFieldPatch, Us as IdentityClaims, Ut as VertexAnnotationFields, V as StampDraft, Va as ResourceRef, Vc as DocumentMetadata, Vi as invalidatesWeakIndexRefs, Vn as PageFlattenUsage, Vo as PageRenderQuery, Vr as FormDataFormat, Vs as CollabFilter, Vt as PolygonAnnotationDTO, Wa as resolveBinarySource, Wi as RefetchReason, Wn as PageDeleteInput, Wo as createPageImageHandle, Wr as ComboBoxFieldPatch, Ws as ParsedCapability, Wt as VertexDraftFields, X as NoteIcon, Xa as subtypeFromCode, Xi as DocumentManifest, Xn as PageMoveInput, Xo as PdfQuadCorners, Xr as ComboBoxFieldDraft, Xs as AnnotationDraftBase, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as PdfAnnotationSubtypeCode, Yi as PdfDestination, Yn as PageStructureCache, Yo as PdfOriginSize, Yr as CheckboxFieldDraft, Ys as PdfBits, Yt as SquarePatch, Z as TextDraft, Za as AnnotationPatchBase, Zi as ManifestPage, Zn as canonicalSearchQuery, Zo as normalizePdfRect, Zr as FormFieldDraft, Zs as AnnotationRef, Zt as SquareDraft, _a as ColorStyleDraftFields, _c as Rotation, _i as FormFieldOrigin, _n as SquigglyAnnotationDTO, _o as AnnotationAppearanceImagesResult, _r as SEARCH_FOLD_VERSION, _s as OpenOptions, aa as AnnotationKindModule, ac as BlendMode, ai as WidgetAppearance, an as ShapeDraftFields, ao as SerializedEngineError, ar as SearchQueryValidation, as as pdfRectWidth, b as UnsupportedAnnotationDTO, ba as FilledStyleDraftFields, bc as StrikeoutIntent, bi as RadioFieldDTO, bo as AnnotationAppearanceMode, br as toOriginalRange, bs as collab, c as AnnotationKind, ca as PatchOfKind, cc as FreeTextFont, ci as WidgetStyleFields, co as EngineErrorCode, cr as matchRegex, cs as PageLayout, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as AttachmentsCache, dc as LineEnding, di as ComboBoxFieldDTO, dn as StrikeoutAnnotationDTO, do as FontSpec, dr as foldOptionsFor, ds as OpenInput, ea as AnnotationRelationKind, ec as PageObjectNumber, ei as RadioFieldDraft, eo as AnnotationStableId, er as SEARCH_SNIPPET_CONTEXT, es as pdfQuadFromCorners, fa as normalizeAttachmentFileSource, fc as LineEndings, fi as FormFieldBase, fn as StrikeoutDraft, fo as DEFAULT_PDF_SAVE_MODE, fr as matchLiteral, fs as OpenInputById, ga as WireAttachmentFile, gc as Rect, gi as FormFieldOption, gn as SquigglyPatch, go as AnnotationAppearanceImageOptions, gr as FoldedText, gs as OpenInputToken, ha as FileAttachmentWireDraft, hc as Point, hi as FormFieldFlags, ho as AnnotationAppearanceImage, hr as FoldOptions, hs as OpenInputLayerSource, ht as InkDraft, i as AnnotationDTO, ia as refKey, ic as AnnotationReplyType, ii as FormSnapshot, in as ShapeAnnotationFields, io as EngineErrorOptions, ir as SearchQueryIssue, is as pdfRectToOriginSize, ja as EmbeddedFileRef, jc as ActionReadBudget, ji as AnnotationDeleteResult, jn as MetadataCache, jo as PageImageObjectUrl, jr as FormFieldUpdateResult, js as InvalidScope, ka as AttachmentFileSource, kc as PdfRotation, ki as encodeFieldRefKey, kn as HighlightAnnotationDTO, ko as PageImageBlobSource, kr as FormFieldCreateResult, ks as expandedCapabilities, kt as LineAnnotationDTO, l as AnnotationPatch, la as AttachmentCreateResult, lc as FreeTextIntent, li as WidgetStylePatchFields, lo as FontHandle, lr as validateSearchQuery, ls as PageRotation, lt as FreeTextDraft, m as WireAnnotationPatch, ma as FileAttachmentIcon, mc as PdfRectDifferences, mi as FormFieldFamily, mo as CachePins, mr as wordBefore, ms as OpenInputLayerBytes, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as buildThreads, nc as AnnotationBorderStyle, ni as WidgetPlacement, nn as CircleAnnotationDTO, no as encodeStableIdKey, nr as matchPageText, ns as pdfRectHeight, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as DTOOfKind, oc as CaretIntent, on as ShapePatchFields, oo as deserializeError, or as SearchRegexIssue, os as PageListSnapshot, p as WireAnnotationDraft, pa as FileAttachmentDraft, pc as NO_ANNOTATION_FLAGS, pi as FormFieldDTO, po as PdfSaveMode, pr as wordAt, ps as OpenInputBytes, pt as InkPatch, qa as PDF_CODE_TO_SUBTYPE, qi as PdfLinkTarget, qn as PageMoveCache, qo as PageGeometrySnapshot, qr as RadioFieldPatch, qs as ParsedVirtual, ra as classifyRelation, rc as AnnotationFlags, ri as FormKind, rn as CircleDraft, ro as EngineError, rr as SEARCH_REGEX_MAX_LENGTH, rs as pdfRectSize, rt as CaretDraft, sa as DraftOfKind, sc as Color, si as WidgetStyleDraftFields, so as serializeError, sr as SearchRegexValidation, ss as PageBoxes, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as AnnotationThread, tc as isValidPageObjectNumber, ti as TextFieldDraft, tn as CirclePatch, to as decodeStableIdKey, tr as buildSnippet, ts as pdfRectFromOriginSize, tt as CaretPatch, ua as AttachmentDeleteResult, uc as InkIntent, ui as CheckboxFieldDTO, un as StrikeoutPatch, uo as FontKey, ur as validateSearchRegex, us as MetadataPatch, v as UnsupportedPatch, va as ColorStyleFields, vc as Size, vi as ListBoxFieldDTO, vn as SquigglyDraft, vo as AnnotationAppearanceManifest, vr as SearchMatchRange, vs as TokenSource, w as WidgetPatch, wa as GeometryStyleFields, wc as InkStroke, wi as UnknownFieldDTO, wn as UnderlineDraft, wo as AnnotationAppearancesResult, wr as SearchRequest, ws as checkAnyCapability, wt as LinkDraft, x as RedactPatch, xa as FilledStyleFields, xc as TextAlignment, xi as SignatureFieldDTO, xo as AnnotationAppearanceRaster, xr as SearchMatch, xs as materializePdfPermissions, y as UnsupportedDraft, ya as ColorStylePatchFields, yc as StandardFont, yi as PushButtonFieldDTO, yo as AnnotationAppearanceManifestEntry, yr as foldText, ys as caps, z as StampWirePatch, za as BinaryPayload, zc as PdfFieldActions, zi as AnnotationMutationKind, zn as PageFlattenResult, zo as PageRenderFormat, zr as FormEffectsResult, zs as CollabAction } from "./AnnotationListSnapshot-W0RCsyDE.js";
2
- export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, type AnnotationIdentityQuality, type AnnotationKind, type AnnotationKindModule, type AnnotationListMutationMeta, type AnnotationListPageSnapshot, type AnnotationListSnapshotAllPages, type AnnotationMoveResult, type AnnotationMutationKind, type AnnotationPatch, type AnnotationPatchBase, type AnnotationRef, type AnnotationRelationKind, type AnnotationReplyType, type AnnotationStableId, type AnnotationSubtype, type AnnotationSubtypeOfKind, type AnnotationThread, type AnnotationUpdateResult, type AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, type FileAttachmentAnnotationDTO, type FileAttachmentDraft, type FileAttachmentIcon, type FileAttachmentPatch, type FileAttachmentWireDraft, type FilledStyleDraftFields, type FilledStyleFields, type FilledStylePatchFields, type FoldOptions, type FoldedText, type FontHandle, type FontKey, type FontSpec, type FormDataExport, type FormDataFormat, type FormEffect, type FormEffectResult, type FormEffectStatus, type FormEffectsResult, type FormFieldBase, type FormFieldCreateResult, type FormFieldDTO, type FormFieldDeleteResult, type FormFieldDisplay, type FormFieldDraft, type FormFieldFamily, type FormFieldFlags, type FormFieldOption, type FormFieldOptionInput, type FormFieldOrigin, type FormFieldPatch, type FormFieldRef, type FormFieldUpdateResult, type FormFieldValue, type FormImportResult, type FormKind, type FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, type LayerScopePlane, type LayerScopes, type LineAnnotationDTO, type LineDraft, type LineEnding, type LineEndings, type LinePatch, type LinePoints, type LinkAnnotationDTO, type LinkDraft, type LinkPatch, type ListBoxFieldDTO, type ListBoxFieldDraft, type ListBoxFieldPatch, type ManifestPage, type MetadataCache, type MetadataPatch, type MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputToken, type OpenOptions, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PatchOfKind, type PdfActionNode, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, PermissionDenied, type Point, type PolygonAnnotationDTO, type PolygonDraft, type PolygonPatch, type PolylineAnnotationDTO, type PolylineDraft, type PolylinePatch, type PushButtonFieldDTO, type RadioFieldDTO, type RadioFieldDraft, type RadioFieldPatch, type Rect, type RedactAnnotationDTO, type RedactDraft, type RedactPatch, type RedactionApplyItemResult, type RedactionApplyResult, type RedactionApplyScope, type RedactionApplyStatus, type RefetchReason, type ResourceRef, type RevisionToken, type Rotation, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, type SearchMatch, type SearchMatchRange, type SearchMode, type SearchQuery, type SearchQueryIssue, type SearchQueryValidation, type SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, type SignatureFieldDTO, type Size, type SquareAnnotationDTO, type SquareDraft, type SquarePatch, type SquigglyAnnotationDTO, type SquigglyDraft, type SquigglyPatch, type StampAnnotationDTO, type StampDraft, type StampFit, type StampPatch, type StampWireDraft, type StampWirePatch, type StandardFont, type StrikeoutAnnotationDTO, type StrikeoutDraft, type StrikeoutIntent, type StrikeoutPatch, type TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, type TextPatch, type ToggleFieldWidget, type TokenSource, UNKNOWN_WEAK_ANNOTATION_STATE, type UnderlineAnnotationDTO, type UnderlineDraft, type UnderlinePatch, type UnknownFieldDTO, type UnsupportedAnnotationDTO, type UnsupportedDraft, type UnsupportedPatch, type VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, type WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WireResource, type WireResourceMap, appearanceImpactOf, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandedCapabilities, filterMatches, foldOptionsFor, foldText, invalidatesWeakIndexRefs, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sniffBinaryMetadata, subtypeFromCode, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
1
+ import { $a as NormalizedPatch, $c as StandardFont, $i as AnnotationMutationKind, $n as canonicalSearchQuery, $o as PageImageResult, $r as FormEffectsResult, $s as caps, Aa as AttachmentDeleteResult, Ac as AnnotationDraftBase, Ai as FormFieldOption, An as HighlightDraft, Ao as FontKey, Ar as SearchSnippet, As as normalizePdfRect, At as LineDraft, B as StampAnnotationDTO, Ba as FilledStyleDraftFields, Bc as CaretIntent, Bi as FormFieldRef, Bn as PageFlattenStatus, Bo as AnnotationAppearanceMode, Br as textGlyphQuad, Bs as PageBoxes, Bt as PolygonPatch, C as RedactDraft, Ca as classifyRelation, Cc as IdentityClaims, Ci as WidgetStylePatchFields, Cn as UnderlineAnnotationDTO, Co as EngineError, Cr as toOriginalRange, Cs as boundaryTextOffset, Ct as LinkAnnotationDTO, Da as DraftOfKind, Dc as ParsedVirtual, Di as FormFieldDTO, Do as serializeError, Dr as SearchRequest, Ds as sliceTextByChars, E as WidgetDraft, Ea as DTOOfKind, Ec as ParsedScope, Ei as FormFieldBase, Eo as deserializeError, Er as SearchQuery, Es as charRangeForTextOffsets, Fa as FileAttachmentWireDraft, Fc as isValidPageObjectNumber, Fi as SignatureFieldDTO, Fn as RedactionApplyScope, Fo as AnnotationAppearanceImage, Fr as TextLayoutRun, Fs as pdfRectHeight, Ft as PolylineAnnotationDTO, Ga as GeometryStylePatchFields, Gc as LineEnding, Gi as AnnotationDeleteResult, Gn as PageDeleteResult, Go as PageState, Gr as FormFieldUpdateResult, Gs as OpenInputById, Gt as VertexPatchFields, H as StampFit, Ha as FilledStylePatchFields, Hc as FreeTextFont, Hi as decodeFieldRefKey, Hn as PAGE_INSERT_BLANK_MAX_COUNT, Ho as AnnotationAppearanceRenderOptions, Hr as FormDataExport, Hs as PageRotation, Ht as PolygonDraft, Ia as WireAttachmentFile, Ic as AnnotationBorderStyle, Ii as TextFieldDTO, In as RedactionApplyStatus, Io as AnnotationAppearanceImageOptions, Ir as buildPageTextLayout, Is as pdfRectSize, It as PolylineDraft, J as TextPatch, Ja as AttachmentFileInfo, Jc as PdfRectDifferences, Ji as AppearanceAction, Jn as PageRotateInput, Jo as knownWeakAnnotationState, Jr as FormSetValueResult, Js as OpenInputLayerSource, Ka as AttachmentContent, Kc as LineEndings, Ki as AnnotationMoveResult, Kn as PageDeleteInput, Ko as UNKNOWN_WEAK_ANNOTATION_STATE, Kr as FormImportResult, Ks as OpenInputBytes, La as ColorStyleDraftFields, Lc as AnnotationFlags, Li as ToggleFieldWidget, Ln as PageFlattenInput, Lo as AnnotationAppearanceImagesResult, Lr as expandTextRangeToLine, Ls as pdfRectToOriginSize, M as FileAttachmentPatch, Ma as normalizeAttachmentFileSource, Mc as RevisionToken, Mi as ListBoxFieldDTO, Mn as MetadataUpdateResult, Mo as DEFAULT_PDF_SAVE_MODE, Mr as PdfTextSegment, Ms as pdfQuadCorners, N as FileAttachmentAnnotationDTO, Na as FileAttachmentDraft, Nc as revisionTokensEqual, Ni as PushButtonFieldDTO, Nn as RedactionApplyItemResult, No as PdfSaveMode, Nr as TextLayoutFrame, Ns as pdfQuadFromCorners, Oa as PatchOfKind, Oc as ParsedWildcard, Oi as FormFieldFamily, On as HighlightPatch, Oo as EngineErrorCode, Or as SearchSlice, Os as PdfOriginSize, Ot as LinePatch, Pa as FileAttachmentIcon, Pc as PageObjectNumber, Pi as RadioFieldDTO, Pn as RedactionApplyResult, Po as CachePins, Pr as TextLayoutGlyph, Ps as pdfRectFromOriginSize, Pt as PolylinePatch, Qa as NormalizedDraft, Qc as Size, Qi as semanticEqual, Qn as PageMoveInput, Qo as PageImageOptions, Qr as FormEffectStatus, Qs as TokenSource, R as StampPatch, Ra as ColorStyleFields, Rc as AnnotationReplyType, Ri as UnknownFieldDTO, Rn as PageFlattenItemResult, Ro as AnnotationAppearanceManifest, Rr as expandTextRangeToWord, Rs as pdfRectWidth, S as RedactAnnotationDTO, Sa as buildThreads, Sc as DocCapability, Si as WidgetStyleFields, Sl as DocumentMetadataTrapped, Sn as UnderlinePatch, So as encodeStableIdKey, Sr as foldText, Ss as CharMapAnchor, St as LinkPatch, T as WidgetAnnotationDTO, Ta as AnnotationKindModule, Tc as ParsedCollab, Ti as ComboBoxFieldDTO, To as SerializedEngineError, Tr as SearchMode, Ts as charMapViolation, U as StampWireDraft, Ua as GeometryStyleDraftFields, Uc as FreeTextIntent, Ui as encodeFieldRefKey, Un as PageInsertBlankSpec, Uo as AnnotationAppearancesQuery, Ur as FormFieldCreateResult, Us as MetadataPatch, Ut as VertexAnnotationFields, V as StampDraft, Va as FilledStyleFields, Vc as Color, Vi as FormWidgetRef, Vn as PageFlattenUsage, Vo as AnnotationAppearanceRaster, Vr as textSegmentsForRange, Vs as PageLayout, Vt as PolygonAnnotationDTO, Wa as GeometryStyleFields, Wc as InkIntent, Wi as AnnotationCreateResult, Wn as PageInsertResult, Wo as AnnotationAppearancesResult, Wr as FormFieldDeleteResult, Ws as OpenInput, Wt as VertexDraftFields, X as NoteIcon, Xa as EmbeddedFileItem, Xc as Rect, Xi as AppearanceOutcome, Xn as PageMoveResult, Xo as PageImageHandle, Xr as FormEffect, Xs as OpenInputToken, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as AttachmentFileSource, Yc as Point, Yi as AppearanceImpact, Yn as PageMoveCache, Yo as PageImageBlobSource, Yr as FormWidgetLinkResult, Ys as OpenInputShare, Yt as SquarePatch, Z as TextDraft, Za as EmbeddedFileRef, Zc as Rotation, Zi as appearanceImpactOf, Zn as PageStructureCache, Zo as PageImageObjectUrl, Zr as FormEffectResult, Zs as OpenOptions, Zt as SquareDraft, _a as ReviewStatus, _c as decodePdfBits, _i as FormKind, _l as PdfActionWarning, _n as SquigglyAnnotationDTO, _o as AnnotationPatchBase, _r as wordBefore, _s as glyphLooseBounds, aa as CacheDelta, ac as checkCapability, ai as FormFieldPatch, al as LinePoints, an as ShapeDraftFields, ao as BinaryPayload, ar as matchPageText, as as PageRenderFormat, b as UnsupportedAnnotationDTO, ba as AnnotationRelationKind, bc as CollabEntity, bl as PdfPageActions, bo as AnnotationStableId, br as SEARCH_FOLD_VERSION, bs as PageTextSnapshot, c as AnnotationKind, ca as PdfLinkTargetWritable, cc as expandRawScope, ci as TextFieldPatch, cl as PdfRect, co as WireResource, cr as SearchQueryValidation, cs as PageRenderTarget, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as ManifestPage, dc as InvalidScope, di as FormFieldDraft, dl as ActionReadBudget, dn as StrikeoutAnnotationDTO, do as ANNOTATION_SUBTYPES, dr as matchRegex, ds as PageGeometryGlyph, ea as changesAnnotationList, ec as collab, ei as FormFieldDisplay, el as StrikeoutIntent, eo as normalizeAnnotationDraft, er as searchContentEpoch, es as PageImageSource, fa as LayerScopePlane, fc as MissingIdentity, fi as FormFieldOptionInput, fl as DocumentActionsSnapshot, fn as StrikeoutDraft, fo as AnnotationSubtype, fr as validateSearchQuery, fs as PageGeometryRun, ga as CommentThreadReview, gc as PDF_BITS, gi as WidgetPlacement, gl as PdfActionType, gn as SquigglyPatch, go as subtypeFromCode, gr as wordAt, gs as UprightGeometryRun, ha as CommentThread, hc as validateScopeArray, hi as TextFieldDraft, hl as PdfActionTree, ho as PdfAnnotationSubtypeCode, hr as matchLiteral, hs as RotatedGeometryRun, ht as InkDraft, i as AnnotationDTO, ia as RefetchReason, ic as checkAnyCapability, ii as ComboBoxFieldPatch, il as InkStroke, in as ShapeAnnotationFields, io as sniffBinaryMetadata, ir as buildSnippet, is as PageRenderEncodedFormat, ja as AttachmentsCache, jc as AnnotationRef, ji as FormFieldOrigin, jn as MetadataCache, jo as FontSpec, jr as PageTextLayout, js as pdfQuadBounds, ka as AttachmentCreateResult, kc as PdfBits, ki as FormFieldFlags, kn as HighlightAnnotationDTO, ko as FontHandle, kr as SearchSliceBudget, ks as PdfQuadCorners, kt as LineAnnotationDTO, l as AnnotationPatch, la as PdfDestination, lc as expandedCapabilities, li as CheckboxFieldDraft, ll as PdfRotation, lo as WireResourceMap, lr as SearchRegexIssue, ls as PageRenderViewport, lt as FreeTextDraft, m as WireAnnotationPatch, ma as BuildCommentThreadsOptions, mc as parseScope, mi as RadioFieldDraft, ml as PdfActionNode, mo as PDF_SUBTYPE_TO_CODE, mr as foldOptionsFor, ms as RotatedGeometryGlyph, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as shiftsExistingAnnotationIndices, nc as pdfPermissions, ni as FormFieldValue, nl as CalloutLine, nn as CircleAnnotationDTO, no as BinaryMetadata, nr as searchSegmentsForRange, ns as PageRaster, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as MutationMeta, oc as checkCollab, oi as ListBoxFieldPatch, ol as PdfPoint, on as ShapePatchFields, oo as BinarySource, or as SEARCH_REGEX_MAX_LENGTH, os as PageRenderOptions, p as WireAnnotationDraft, pa as LayerScopes, pc as PermissionDenied, pi as ListBoxFieldDraft, pl as NamedJavaScriptAction, po as PDF_CODE_TO_SUBTYPE, pr as validateSearchRegex, ps as PageGeometrySnapshot, pt as InkPatch, qa as AttachmentFileBase, qc as NO_ANNOTATION_FLAGS, qi as AnnotationUpdateResult, qn as PageRotateResult, qo as WeakAnnotationState, qr as FormRepairResult, qs as OpenInputLayerBytes, ra as AnnotationListMutationMeta, rc as CollabTarget, ri as CheckboxFieldPatch, rl as InkList, rn as CircleDraft, ro as BinaryMimeType, rr as SEARCH_SNIPPET_CONTEXT, rs as PageRenderBackground, rt as CaretDraft, sa as PdfLinkTarget, sc as checkSetGroup, si as RadioFieldPatch, sl as PdfQuad, so as ResourceRef, sr as SearchQueryIssue, ss as PageRenderQuery, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as invalidatesWeakIndexRefs, tc as materializePdfPermissions, ti as FormDataFormat, tl as TextAlignment, tn as CirclePatch, to as normalizeAnnotationPatch, tr as searchRectsForRange, ts as PageNetworkRenderFormat, tt as CaretPatch, ua as DocumentManifest, uc as filterMatches, ui as ComboBoxFieldDraft, ul as PdfSize, un as StrikeoutPatch, uo as resolveBinarySource, ur as SearchRegexValidation, us as createPageImageHandle, v as UnsupportedPatch, va as buildCommentThreads, vc as AnnotationActor, vi as FormSnapshot, vl as PdfAnnotationActions, vn as SquigglyDraft, vo as AnnotationBase, vr as FoldOptions, vs as glyphLooseQuad, w as WidgetPatch, wa as refKey, wc as ParsedCapability, wi as CheckboxFieldDTO, wn as UnderlineDraft, wo as EngineErrorOptions, wr as SearchMatch, ws as charBoundaryAtTextOffset, wt as LinkDraft, x as RedactPatch, xa as AnnotationThread, xc as CollabFilter, xi as WidgetStyleDraftFields, xl as DocumentMetadata, xo as decodeStableIdKey, xr as SearchMatchRange, xs as CharBoundaryBias, y as UnsupportedDraft, ya as isStateAnnotation, yc as CollabAction, yi as WidgetAppearance, yl as PdfFieldActions, yo as AnnotationIdentityQuality, yr as FoldedText, ys as isRotatedGeometryRun, z as StampWirePatch, za as ColorStylePatchFields, zc as BlendMode, zi as FormValueEntry, zn as PageFlattenResult, zo as AnnotationAppearanceManifestEntry, zr as textGlyphAt, zs as PageListSnapshot } from "./AnnotationListSnapshot-DDxHpJQU.js";
2
+ export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, type AnnotationIdentityQuality, type AnnotationKind, type AnnotationKindModule, type AnnotationListMutationMeta, type AnnotationListPageSnapshot, type AnnotationListSnapshotAllPages, type AnnotationMoveResult, type AnnotationMutationKind, type AnnotationPatch, type AnnotationPatchBase, type AnnotationRef, type AnnotationRelationKind, type AnnotationReplyType, type AnnotationStableId, type AnnotationSubtype, type AnnotationSubtypeOfKind, type AnnotationThread, type AnnotationUpdateResult, type AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type BuildCommentThreadsOptions, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CharBoundaryBias, type CharMapAnchor, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, type CommentThread, type CommentThreadReview, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, type FileAttachmentAnnotationDTO, type FileAttachmentDraft, type FileAttachmentIcon, type FileAttachmentPatch, type FileAttachmentWireDraft, type FilledStyleDraftFields, type FilledStyleFields, type FilledStylePatchFields, type FoldOptions, type FoldedText, type FontHandle, type FontKey, type FontSpec, type FormDataExport, type FormDataFormat, type FormEffect, type FormEffectResult, type FormEffectStatus, type FormEffectsResult, type FormFieldBase, type FormFieldCreateResult, type FormFieldDTO, type FormFieldDeleteResult, type FormFieldDisplay, type FormFieldDraft, type FormFieldFamily, type FormFieldFlags, type FormFieldOption, type FormFieldOptionInput, type FormFieldOrigin, type FormFieldPatch, type FormFieldRef, type FormFieldUpdateResult, type FormFieldValue, type FormImportResult, type FormKind, type FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, type LayerScopePlane, type LayerScopes, type LineAnnotationDTO, type LineDraft, type LineEnding, type LineEndings, type LinePatch, type LinePoints, type LinkAnnotationDTO, type LinkDraft, type LinkPatch, type ListBoxFieldDTO, type ListBoxFieldDraft, type ListBoxFieldPatch, type ManifestPage, type MetadataCache, type MetadataPatch, type MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputShare, type OpenInputToken, type OpenOptions, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertBlankSpec, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextLayout, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PatchOfKind, type PdfActionNode, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, type PdfTextSegment, PermissionDenied, type Point, type PolygonAnnotationDTO, type PolygonDraft, type PolygonPatch, type PolylineAnnotationDTO, type PolylineDraft, type PolylinePatch, type PushButtonFieldDTO, type RadioFieldDTO, type RadioFieldDraft, type RadioFieldPatch, type Rect, type RedactAnnotationDTO, type RedactDraft, type RedactPatch, type RedactionApplyItemResult, type RedactionApplyResult, type RedactionApplyScope, type RedactionApplyStatus, type RefetchReason, type ResourceRef, type ReviewStatus, type RevisionToken, type RotatedGeometryGlyph, type RotatedGeometryRun, type Rotation, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, type SearchMatch, type SearchMatchRange, type SearchMode, type SearchQuery, type SearchQueryIssue, type SearchQueryValidation, type SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, type SignatureFieldDTO, type Size, type SquareAnnotationDTO, type SquareDraft, type SquarePatch, type SquigglyAnnotationDTO, type SquigglyDraft, type SquigglyPatch, type StampAnnotationDTO, type StampDraft, type StampFit, type StampPatch, type StampWireDraft, type StampWirePatch, type StandardFont, type StrikeoutAnnotationDTO, type StrikeoutDraft, type StrikeoutIntent, type StrikeoutPatch, type TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, type TextLayoutFrame, type TextLayoutGlyph, type TextLayoutRun, type TextPatch, type ToggleFieldWidget, type TokenSource, UNKNOWN_WEAK_ANNOTATION_STATE, type UnderlineAnnotationDTO, type UnderlineDraft, type UnderlinePatch, type UnknownFieldDTO, type UnsupportedAnnotationDTO, type UnsupportedDraft, type UnsupportedPatch, type UprightGeometryRun, type VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, type WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WireResource, type WireResourceMap, appearanceImpactOf, boundaryTextOffset, buildCommentThreads, buildPageTextLayout, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, charBoundaryAtTextOffset, charMapViolation, charRangeForTextOffsets, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandTextRangeToLine, expandTextRangeToWord, expandedCapabilities, filterMatches, foldOptionsFor, foldText, glyphLooseBounds, glyphLooseQuad, invalidatesWeakIndexRefs, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, sniffBinaryMetadata, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as pdfRectWidth, A as refKey, B as decodeStableIdKey, C as appearanceImpactOf, D as shiftsExistingAnnotationIndices, E as invalidatesWeakIndexRefs, F as resolveBinarySource, G as normalizePdfRect, H as isValidPageObjectNumber, I as NO_ANNOTATION_FLAGS, J as pdfQuadFromCorners, K as pdfQuadBounds, L as UNKNOWN_WEAK_ANNOTATION_STATE, M as normalizeAnnotationPatch, N as normalizeAttachmentFileSource, O as buildThreads, P as sniffBinaryMetadata, Q as pdfRectToOriginSize, R as knownWeakAnnotationState, S as encodeFieldRefKey, T as changesAnnotationList, U as DEFAULT_PDF_SAVE_MODE, V as encodeStableIdKey, W as createPageImageHandle, X as pdfRectHeight, Y as pdfRectFromOriginSize, Z as pdfRectSize, _ as foldOptionsFor, a as PDF_BITS, b as wordBefore, c as searchContentEpoch, d as buildSnippet, f as matchPageText, g as validateSearchRegex, h as validateSearchQuery, i as pdfPermissions, j as normalizeAnnotationDraft, k as classifyRelation, l as searchRectsForRange, m as matchRegex, n as collab, o as decodePdfBits, p as SEARCH_REGEX_MAX_LENGTH, q as pdfQuadCorners, r as materializePdfPermissions, s as canonicalSearchQuery, t as caps, u as SEARCH_SNIPPET_CONTEXT, v as matchLiteral, w as semanticEqual, x as decodeFieldRefKey, y as wordAt, z as revisionTokensEqual } from "./builders-C548U47M.js";
2
- import { a as subtypeFromCode, i as PdfAnnotationSubtypeCode, n as PDF_CODE_TO_SUBTYPE, o as EngineErrorCode, r as PDF_SUBTYPE_TO_CODE, t as ANNOTATION_SUBTYPES } from "./subtype-BvAzLCGC.js";
3
- import { a as deserializeError, i as EngineError, n as foldText, o as serializeError, r as toOriginalRange, t as SEARCH_FOLD_VERSION } from "./fold-CB4fAOOy.js";
1
+ import { _ as pdfRectSize, a as deserializeError, c as glyphLooseBounds, d as normalizePdfRect, f as pdfQuadBounds, g as pdfRectHeight, h as pdfRectFromOriginSize, i as EngineError, l as glyphLooseQuad, m as pdfQuadFromCorners, n as foldText, o as serializeError, p as pdfQuadCorners, r as toOriginalRange, t as SEARCH_FOLD_VERSION, u as isRotatedGeometryRun, v as pdfRectToOriginSize, y as pdfRectWidth } from "./fold-BfyxxwS6.js";
2
+ import { a as charRangeForTextOffsets, c as PDF_CODE_TO_SUBTYPE, d as subtypeFromCode, f as EngineErrorCode, i as charMapViolation, l as PDF_SUBTYPE_TO_CODE, n as boundaryTextOffset, o as sliceTextByChars, r as charBoundaryAtTextOffset, s as ANNOTATION_SUBTYPES, t as PAGE_INSERT_BLANK_MAX_COUNT, u as PdfAnnotationSubtypeCode } from "./PageInsertBlankInput-WKY0tr6S.js";
3
+ import { $ as createPageImageHandle, A as appearanceImpactOf, B as normalizeAnnotationDraft, C as validateSearchRegex, D as wordBefore, E as wordAt, F as buildCommentThreads, G as NO_ANNOTATION_FLAGS, H as normalizeAttachmentFileSource, I as isStateAnnotation, J as revisionTokensEqual, K as UNKNOWN_WEAK_ANNOTATION_STATE, L as buildThreads, M as changesAnnotationList, N as invalidatesWeakIndexRefs, O as decodeFieldRefKey, P as shiftsExistingAnnotationIndices, Q as DEFAULT_PDF_SAVE_MODE, R as classifyRelation, S as validateSearchQuery, T as matchLiteral, U as sniffBinaryMetadata, V as normalizeAnnotationPatch, W as resolveBinarySource, X as encodeStableIdKey, Y as decodeStableIdKey, Z as isValidPageObjectNumber, _ as SEARCH_SNIPPET_CONTEXT, a as PDF_BITS, b as SEARCH_REGEX_MAX_LENGTH, c as searchContentEpoch, d as buildPageTextLayout, f as expandTextRangeToLine, g as textSegmentsForRange, h as textGlyphQuad, i as pdfPermissions, j as semanticEqual, k as encodeFieldRefKey, l as searchRectsForRange, m as textGlyphAt, n as collab, o as decodePdfBits, p as expandTextRangeToWord, q as knownWeakAnnotationState, r as materializePdfPermissions, s as canonicalSearchQuery, t as caps, u as searchSegmentsForRange, v as buildSnippet, w as foldOptionsFor, x as matchRegex, y as matchPageText, z as refKey } from "./builders-B_KufGJ9.js";
4
4
  import { a as expandRawScope, c as parseScope, d as MissingIdentity, f as PermissionDenied, i as checkSetGroup, l as validateScopeArray, n as checkCapability, o as expandedCapabilities, r as checkCollab, s as filterMatches, t as checkAnyCapability, u as InvalidScope } from "./resolver-DiPMTfcy.js";
5
- export { ANNOTATION_SUBTYPES, DEFAULT_PDF_SAVE_MODE, EngineError, EngineErrorCode, InvalidScope, MissingIdentity, NO_ANNOTATION_FLAGS, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, PdfAnnotationSubtypeCode, PermissionDenied, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, UNKNOWN_WEAK_ANNOTATION_STATE, appearanceImpactOf, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandedCapabilities, filterMatches, foldOptionsFor, foldText, invalidatesWeakIndexRefs, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sniffBinaryMetadata, subtypeFromCode, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
5
+ export { ANNOTATION_SUBTYPES, DEFAULT_PDF_SAVE_MODE, EngineError, EngineErrorCode, InvalidScope, MissingIdentity, NO_ANNOTATION_FLAGS, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, PdfAnnotationSubtypeCode, PermissionDenied, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, UNKNOWN_WEAK_ANNOTATION_STATE, appearanceImpactOf, boundaryTextOffset, buildCommentThreads, buildPageTextLayout, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, charBoundaryAtTextOffset, charMapViolation, charRangeForTextOffsets, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandTextRangeToLine, expandTextRangeToWord, expandedCapabilities, filterMatches, foldOptionsFor, foldText, glyphLooseBounds, glyphLooseQuad, invalidatesWeakIndexRefs, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, sniffBinaryMetadata, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
package/dist/runtime.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_builders = require("./builders-BvikWRuO.cjs");
3
- const require_subtype = require("./subtype-qejjVr6h.cjs");
4
- const require_fold = require("./fold-IaMph3CO.cjs");
2
+ const require_fold = require("./fold-C7I5GpBz.cjs");
3
+ const require_PageInsertBlankInput = require("./PageInsertBlankInput-CzShuSJI.cjs");
4
+ const require_builders = require("./builders-Cp_rlGob.cjs");
5
5
  const require_resolver = require("./resolver-DAZWVoJL.cjs");
6
- const require_AbortError = require("./AbortError-ByBflvEl.cjs");
6
+ const require_AbortError = require("./AbortError-CRSooKsk.cjs");
7
7
  //#region src/promise/AbortablePromise.ts
8
8
  let _Symbol$species;
9
9
  _Symbol$species = Symbol.species;
@@ -231,13 +231,13 @@ const CONTINUOUS_RENDER_POLICY = { kind: "continuous" };
231
231
  */
232
232
  function snapFullPageViewport(policy, viewport, opts) {
233
233
  if (policy.kind === "continuous") return viewport;
234
- if (policy.fullPage.widths.length === 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "render policy has an empty width ladder");
234
+ if (policy.fullPage.widths.length === 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "render policy has an empty width ladder");
235
235
  const widths = [...policy.fullPage.widths].sort((a, b) => a - b);
236
236
  let requested;
237
237
  if (viewport.kind === "width") requested = viewport.width;
238
238
  else {
239
239
  const pageWidth = opts?.pageWidth;
240
- if (pageWidth === void 0 || pageWidth <= 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "snapping a scale viewport to a width lattice requires opts.pageWidth");
240
+ if (pageWidth === void 0 || pageWidth <= 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "snapping a scale viewport to a width lattice requires opts.pageWidth");
241
241
  requested = (viewport.scale ?? 1) * pageWidth;
242
242
  }
243
243
  return {
@@ -255,7 +255,7 @@ function snapFullPageViewport(policy, viewport, opts) {
255
255
  */
256
256
  function snapAppearanceScale(policy, scale) {
257
257
  if (policy.kind === "continuous" || policy.appearances === void 0) return scale;
258
- if (policy.appearances.scales.length === 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "render policy has an empty appearance-scale lattice");
258
+ if (policy.appearances.scales.length === 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "render policy has an empty appearance-scale lattice");
259
259
  const scales = [...policy.appearances.scales].sort((a, b) => a - b);
260
260
  return scales.find((s) => s >= scale) ?? scales[scales.length - 1];
261
261
  }
@@ -271,7 +271,7 @@ function snapAppearanceScale(policy, scale) {
271
271
  */
272
272
  function snapTileScale(policy, scale) {
273
273
  if (policy.kind === "continuous" || policy.tiles === void 0) return scale;
274
- if (policy.tiles.scales.length === 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "render policy has an empty tile-scale lattice");
274
+ if (policy.tiles.scales.length === 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "render policy has an empty tile-scale lattice");
275
275
  const scales = [...policy.tiles.scales].sort((a, b) => a - b);
276
276
  return scales.find((s) => s >= scale) ?? scales[scales.length - 1];
277
277
  }
@@ -357,21 +357,22 @@ function wirePack(payload, transfer = EMPTY_TRANSFER) {
357
357
  };
358
358
  }
359
359
  //#endregion
360
- exports.ANNOTATION_SUBTYPES = require_subtype.ANNOTATION_SUBTYPES;
360
+ exports.ANNOTATION_SUBTYPES = require_PageInsertBlankInput.ANNOTATION_SUBTYPES;
361
361
  exports.AbortError = require_AbortError.AbortError;
362
362
  exports.AbortablePromise = AbortablePromise;
363
363
  exports.CONTINUOUS_RENDER_POLICY = CONTINUOUS_RENDER_POLICY;
364
364
  exports.DEFAULT_PDF_SAVE_MODE = require_builders.DEFAULT_PDF_SAVE_MODE;
365
365
  exports.EMPTY_TRANSFER = EMPTY_TRANSFER;
366
366
  exports.EngineError = require_fold.EngineError;
367
- exports.EngineErrorCode = require_subtype.EngineErrorCode;
367
+ exports.EngineErrorCode = require_PageInsertBlankInput.EngineErrorCode;
368
368
  exports.InvalidScope = require_resolver.InvalidScope;
369
369
  exports.MissingIdentity = require_resolver.MissingIdentity;
370
370
  exports.NO_ANNOTATION_FLAGS = require_builders.NO_ANNOTATION_FLAGS;
371
+ exports.PAGE_INSERT_BLANK_MAX_COUNT = require_PageInsertBlankInput.PAGE_INSERT_BLANK_MAX_COUNT;
371
372
  exports.PDF_BITS = require_builders.PDF_BITS;
372
- exports.PDF_CODE_TO_SUBTYPE = require_subtype.PDF_CODE_TO_SUBTYPE;
373
- exports.PDF_SUBTYPE_TO_CODE = require_subtype.PDF_SUBTYPE_TO_CODE;
374
- exports.PdfAnnotationSubtypeCode = require_subtype.PdfAnnotationSubtypeCode;
373
+ exports.PDF_CODE_TO_SUBTYPE = require_PageInsertBlankInput.PDF_CODE_TO_SUBTYPE;
374
+ exports.PDF_SUBTYPE_TO_CODE = require_PageInsertBlankInput.PDF_SUBTYPE_TO_CODE;
375
+ exports.PdfAnnotationSubtypeCode = require_PageInsertBlankInput.PdfAnnotationSubtypeCode;
375
376
  exports.PermissionDenied = require_resolver.PermissionDenied;
376
377
  exports.SEARCH_FOLD_VERSION = require_fold.SEARCH_FOLD_VERSION;
377
378
  exports.SEARCH_REGEX_MAX_LENGTH = require_builders.SEARCH_REGEX_MAX_LENGTH;
@@ -379,11 +380,17 @@ exports.SEARCH_SNIPPET_CONTEXT = require_builders.SEARCH_SNIPPET_CONTEXT;
379
380
  exports.UNKNOWN_WEAK_ANNOTATION_STATE = require_builders.UNKNOWN_WEAK_ANNOTATION_STATE;
380
381
  exports.advisoryFromPdfBits = advisoryFromPdfBits;
381
382
  exports.appearanceImpactOf = require_builders.appearanceImpactOf;
383
+ exports.boundaryTextOffset = require_PageInsertBlankInput.boundaryTextOffset;
384
+ exports.buildCommentThreads = require_builders.buildCommentThreads;
385
+ exports.buildPageTextLayout = require_builders.buildPageTextLayout;
382
386
  exports.buildSnippet = require_builders.buildSnippet;
383
387
  exports.buildThreads = require_builders.buildThreads;
384
388
  exports.canonicalSearchQuery = require_builders.canonicalSearchQuery;
385
389
  exports.caps = require_builders.caps;
386
390
  exports.changesAnnotationList = require_builders.changesAnnotationList;
391
+ exports.charBoundaryAtTextOffset = require_PageInsertBlankInput.charBoundaryAtTextOffset;
392
+ exports.charMapViolation = require_PageInsertBlankInput.charMapViolation;
393
+ exports.charRangeForTextOffsets = require_PageInsertBlankInput.charRangeForTextOffsets;
387
394
  exports.checkAnyCapability = require_resolver.checkAnyCapability;
388
395
  exports.checkCapability = require_resolver.checkCapability;
389
396
  exports.checkCollab = require_resolver.checkCollab;
@@ -398,12 +405,18 @@ exports.deserializeError = require_fold.deserializeError;
398
405
  exports.encodeFieldRefKey = require_builders.encodeFieldRefKey;
399
406
  exports.encodeStableIdKey = require_builders.encodeStableIdKey;
400
407
  exports.expandRawScope = require_resolver.expandRawScope;
408
+ exports.expandTextRangeToLine = require_builders.expandTextRangeToLine;
409
+ exports.expandTextRangeToWord = require_builders.expandTextRangeToWord;
401
410
  exports.expandedCapabilities = require_resolver.expandedCapabilities;
402
411
  exports.filterMatches = require_resolver.filterMatches;
403
412
  exports.foldOptionsFor = require_builders.foldOptionsFor;
404
413
  exports.foldText = require_fold.foldText;
414
+ exports.glyphLooseBounds = require_fold.glyphLooseBounds;
415
+ exports.glyphLooseQuad = require_fold.glyphLooseQuad;
405
416
  exports.invalidatesWeakIndexRefs = require_builders.invalidatesWeakIndexRefs;
406
417
  exports.isAbortError = require_AbortError.isAbortError;
418
+ exports.isRotatedGeometryRun = require_fold.isRotatedGeometryRun;
419
+ exports.isStateAnnotation = require_builders.isStateAnnotation;
407
420
  exports.isValidPageObjectNumber = require_builders.isValidPageObjectNumber;
408
421
  exports.knownWeakAnnotationState = require_builders.knownWeakAnnotationState;
409
422
  exports.matchLiteral = require_builders.matchLiteral;
@@ -413,18 +426,18 @@ exports.materializePdfPermissions = require_builders.materializePdfPermissions;
413
426
  exports.normalizeAnnotationDraft = require_builders.normalizeAnnotationDraft;
414
427
  exports.normalizeAnnotationPatch = require_builders.normalizeAnnotationPatch;
415
428
  exports.normalizeAttachmentFileSource = require_builders.normalizeAttachmentFileSource;
416
- exports.normalizePdfRect = require_builders.normalizePdfRect;
429
+ exports.normalizePdfRect = require_fold.normalizePdfRect;
417
430
  exports.parseScope = require_resolver.parseScope;
418
431
  exports.passwordPromptFromState = passwordPromptFromState;
419
432
  exports.pdfPermissions = require_builders.pdfPermissions;
420
- exports.pdfQuadBounds = require_builders.pdfQuadBounds;
421
- exports.pdfQuadCorners = require_builders.pdfQuadCorners;
422
- exports.pdfQuadFromCorners = require_builders.pdfQuadFromCorners;
423
- exports.pdfRectFromOriginSize = require_builders.pdfRectFromOriginSize;
424
- exports.pdfRectHeight = require_builders.pdfRectHeight;
425
- exports.pdfRectSize = require_builders.pdfRectSize;
426
- exports.pdfRectToOriginSize = require_builders.pdfRectToOriginSize;
427
- exports.pdfRectWidth = require_builders.pdfRectWidth;
433
+ exports.pdfQuadBounds = require_fold.pdfQuadBounds;
434
+ exports.pdfQuadCorners = require_fold.pdfQuadCorners;
435
+ exports.pdfQuadFromCorners = require_fold.pdfQuadFromCorners;
436
+ exports.pdfRectFromOriginSize = require_fold.pdfRectFromOriginSize;
437
+ exports.pdfRectHeight = require_fold.pdfRectHeight;
438
+ exports.pdfRectSize = require_fold.pdfRectSize;
439
+ exports.pdfRectToOriginSize = require_fold.pdfRectToOriginSize;
440
+ exports.pdfRectWidth = require_fold.pdfRectWidth;
428
441
  exports.permissionInfoFromProbe = permissionInfoFromProbe;
429
442
  exports.permissionInfoWithAdvisory = permissionInfoWithAdvisory;
430
443
  exports.refKey = require_builders.refKey;
@@ -432,16 +445,21 @@ exports.resolveBinarySource = require_builders.resolveBinarySource;
432
445
  exports.revisionTokensEqual = require_builders.revisionTokensEqual;
433
446
  exports.searchContentEpoch = require_builders.searchContentEpoch;
434
447
  exports.searchRectsForRange = require_builders.searchRectsForRange;
448
+ exports.searchSegmentsForRange = require_builders.searchSegmentsForRange;
435
449
  exports.securityStateFromHead = securityStateFromHead;
436
450
  exports.securityStateFromProbe = securityStateFromProbe;
437
451
  exports.semanticEqual = require_builders.semanticEqual;
438
452
  exports.serializeError = require_fold.serializeError;
439
453
  exports.shiftsExistingAnnotationIndices = require_builders.shiftsExistingAnnotationIndices;
454
+ exports.sliceTextByChars = require_PageInsertBlankInput.sliceTextByChars;
440
455
  exports.snapAppearanceScale = snapAppearanceScale;
441
456
  exports.snapFullPageViewport = snapFullPageViewport;
442
457
  exports.snapTileScale = snapTileScale;
443
458
  exports.sniffBinaryMetadata = require_builders.sniffBinaryMetadata;
444
- exports.subtypeFromCode = require_subtype.subtypeFromCode;
459
+ exports.subtypeFromCode = require_PageInsertBlankInput.subtypeFromCode;
460
+ exports.textGlyphAt = require_builders.textGlyphAt;
461
+ exports.textGlyphQuad = require_builders.textGlyphQuad;
462
+ exports.textSegmentsForRange = require_builders.textSegmentsForRange;
445
463
  exports.toOriginalRange = require_fold.toOriginalRange;
446
464
  exports.validateScopeArray = require_resolver.validateScopeArray;
447
465
  exports.validateSearchQuery = require_builders.validateSearchQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.cjs","names":["AbortError","EngineError","EngineErrorCode"],"sources":["../src/promise/AbortablePromise.ts","../src/engine/document-security-state.ts","../src/engine/DocumentRenderService.ts","../src/engine/passwordPrompt.ts","../src/wire/WirePack.ts"],"sourcesContent":["import { AbortError } from './AbortError';\n\nexport type AbortableExecutor<T, P> = (\n resolve: (value: T | PromiseLike<T>) => void,\n reject: (reason: unknown) => void,\n progress: (p: P) => void,\n signal: AbortSignal,\n) => void;\n\n/**\n * Awaitable Promise subclass with abort and progress.\n *\n * Symbol.species returns plain Promise so chained .then/.catch/.finally\n * return regular promises and never try to synthesize a new\n * AbortablePromise (which would have no executor).\n *\n * Settlement contract:\n * - The first settlement wins. resolve/reject handed to the executor\n * are wrapped so that any subsequent call (whether by the executor,\n * by abort(), or by both racing) becomes a silent no-op.\n * - abort() rejects the public promise with AbortError immediately,\n * even if the executor never observes the AbortSignal. The executor\n * still receives the AbortSignal so it can stop real work\n * cooperatively (release a queue slot, abort fetch, post a worker\n * abort, etc.). Anything the executor does after that — including\n * a late resolve(value), a late reject(error), or a rejected inner\n * Promise inside AbortablePromise.run — is dropped silently.\n * - abort() after settlement is a no-op.\n */\nexport class AbortablePromise<T, P = never> extends Promise<T> {\n static override get [Symbol.species](): PromiseConstructor {\n return Promise;\n }\n\n readonly signal: AbortSignal;\n\n private readonly _ctrl: AbortController;\n private readonly _progressCbs: Set<(p: P) => void>;\n private readonly _state: { settled: boolean };\n private readonly _internalReject: (reason: unknown) => void;\n\n constructor(executor: AbortableExecutor<T, P>) {\n const ctrl = new AbortController();\n const progressCbs = new Set<(p: P) => void>();\n const state = { settled: false };\n let capturedReject!: (reason: unknown) => void;\n\n super((resolve, reject) => {\n capturedReject = reject;\n\n const wrappedResolve = (value: T | PromiseLike<T>) => {\n if (state.settled) return;\n state.settled = true;\n resolve(value);\n };\n const wrappedReject = (reason: unknown) => {\n if (state.settled) return;\n state.settled = true;\n reject(reason);\n };\n const progress = (p: P) => {\n if (state.settled) return;\n for (const cb of progressCbs) {\n try {\n cb(p);\n } catch {\n // ignore subscriber errors\n }\n }\n };\n\n executor(wrappedResolve, wrappedReject, progress, ctrl.signal);\n });\n\n this._ctrl = ctrl;\n this.signal = ctrl.signal;\n this._progressCbs = progressCbs;\n this._state = state;\n this._internalReject = capturedReject;\n }\n\n /**\n * Abort the underlying operation.\n *\n * - If the promise has already settled, this is a no-op.\n * - Otherwise the public promise rejects synchronously with an\n * AbortError (wrapping the supplied reason if it is not already an\n * AbortError) and the AbortSignal fires for any cooperative\n * cancellation the executor wired up.\n */\n abort(reason?: unknown): void {\n if (this._state.settled) return;\n if (this._ctrl.signal.aborted) return;\n\n const err = reason instanceof AbortError ? reason : new AbortError(reason);\n\n // Mark settled before signalling so any abort listener the executor\n // attached cannot race a late resolve/reject through the wrapped\n // settlers (they all consult state.settled).\n this._state.settled = true;\n this._ctrl.abort(err);\n this._internalReject(err);\n }\n\n /**\n * Subscribe to progress events. Returns an unsubscribe function.\n */\n onProgress(cb: (p: P) => void): () => void {\n this._progressCbs.add(cb);\n return () => {\n this._progressCbs.delete(cb);\n };\n }\n\n /**\n * Wrap a value in an already-resolved AbortablePromise. Mirrors Promise.resolve.\n */\n static resolveValue<T>(value: T | PromiseLike<T>): AbortablePromise<T> {\n return new AbortablePromise<T>((resolve) => resolve(value));\n }\n\n /**\n * Wrap a thrown reason in an already-rejected AbortablePromise.\n */\n static rejectReason<T = never>(reason: unknown): AbortablePromise<T> {\n return new AbortablePromise<T>((_resolve, reject) => reject(reason));\n }\n\n /**\n * Run an async function as an AbortablePromise so callers get .abort() and .signal.\n * The async function receives the AbortSignal (and a progress emitter) so it can\n * cooperate with the abort.\n *\n * If abort() fires while the inner async function is still running, the\n * public promise rejects with AbortError immediately. The inner async\n * function's eventual settlement (resolve or reject) is funneled through\n * the wrapped settlers and silently dropped — including a late rejection\n * from the underlying work, which prevents an UnhandledRejection because\n * the .then(resolve, reject) below \"handles\" it via the no-op.\n */\n static run<T, P = never>(\n fn: (signal: AbortSignal, progress: (p: P) => void) => Promise<T>,\n ): AbortablePromise<T, P> {\n return new AbortablePromise<T, P>((resolve, reject, progress, signal) => {\n fn(signal, progress).then(resolve, reject);\n });\n }\n}\n","import type {\n DocumentAccessReason,\n DocumentSecurityState,\n PdfPermissionAdvisory,\n PdfPermissionInfo,\n} from './DocumentSecurityService';\nimport type { PdfBits } from '../auth/scope';\nimport type { DocumentSecurityProbeInfo } from '../wire/worker-protocol';\n\nexport interface DocumentHeadLike {\n encryption: {\n state: DocumentSecurityState['encryption']['state'];\n requiresPassword: boolean | null;\n };\n permissions: DocumentSecurityState['permissions'];\n access: DocumentSecurityState['access'];\n}\n\nexport function securityStateFromHead(head: DocumentHeadLike): DocumentSecurityState {\n return {\n encryption: {\n state: head.encryption.state,\n requiresPassword: head.encryption.requiresPassword,\n },\n permissions: { ...head.permissions },\n access: {\n required: head.access.required,\n reasons: [...head.access.reasons],\n ...(head.access.endpoint ? { endpoint: head.access.endpoint } : {}),\n },\n };\n}\n\nexport function permissionInfoFromProbe(info: DocumentSecurityProbeInfo): PdfPermissionInfo | null {\n if (info.pdfPermissionsBits === null) return null;\n return {\n known: true,\n bits: info.pdfPermissionsBits,\n allAllowed: info.pdfPermissionsAllAllowed,\n openedAs: info.pdfOpenedAs,\n securityHandlerRevision: info.securityHandlerRevision,\n };\n}\n\n/**\n * Same as {@link permissionInfoFromProbe} but additionally populates\n * `flags` (typed PdfBits view) and `advisory` (capability-shaped\n * booleans for UI badges). Used by routes that have a decoded `PdfBits`\n * in hand — notably `/access`, which always does.\n *\n * Returns `null` for the same reason as the base function — when the\n * PDF hasn't been probed yet so bits are unknown.\n */\nexport function permissionInfoWithAdvisory(\n info: DocumentSecurityProbeInfo,\n pdfBits: PdfBits,\n): PdfPermissionInfo | null {\n const base = permissionInfoFromProbe(info);\n if (!base) return null;\n return {\n ...base,\n flags: pdfBits,\n advisory: advisoryFromPdfBits(pdfBits),\n };\n}\n\n/**\n * Translate a {@link PdfBits} view into the capability-shaped\n * {@link PdfPermissionAdvisory}. The rules here MUST mirror the bit\n * combinations the scope resolver uses for `pdf.permissions`\n * expansion — `doc.print.high` requires bit 12 AND bit 3, etc.\n */\nexport function advisoryFromPdfBits(b: PdfBits): PdfPermissionAdvisory {\n return {\n canPrint: b.bit3,\n canPrintHigh: b.bit12 && b.bit3,\n canCopy: b.bit5,\n canAnnotate: b.bit6,\n canFillForms: b.bit6 || b.bit9,\n canModifyForms: b.bit6 && b.bit4,\n canModifyPages: b.bit4,\n canAssemble: b.bit11,\n };\n}\n\nexport function securityStateFromProbe(\n info: DocumentSecurityProbeInfo,\n opts: { accessEndpoint?: string; cdnRequired?: boolean } = {},\n): DocumentSecurityState {\n const permission = permissionInfoFromProbe(info);\n const reasons: DocumentAccessReason[] = [];\n if (info.encryptionRequiresPassword === true && !permission) reasons.push('password');\n if (opts.cdnRequired) reasons.push('cdn');\n if (info.encryptionState === 'unknown') reasons.push('permissions-unknown');\n\n return {\n encryption: {\n state: info.encryptionState,\n requiresPassword: info.encryptionRequiresPassword,\n },\n permissions: {\n known: permission?.known ?? false,\n bits: permission?.bits ?? null,\n allAllowed: permission?.allAllowed ?? null,\n openedAs: permission?.openedAs ?? null,\n securityHandlerRevision: permission?.securityHandlerRevision ?? null,\n canUpgradeToOwner: info.encryptionState === 'encrypted' && info.pdfOpenedAs !== 'owner',\n },\n access: {\n required: reasons.length > 0,\n reasons,\n ...(reasons.length > 0 && opts.accessEndpoint ? { endpoint: opts.accessEndpoint } : {}),\n },\n };\n}\n","import { EngineError } from '../errors/EngineError';\nimport { EngineErrorCode } from '../errors/EngineErrorCode';\nimport type { PageRenderViewport } from '../dto/PageRender';\n\n/**\n * The engine's render-parameter policy.\n *\n * - `continuous` — any viewport renders exactly as requested. The LOCAL\n * engine always answers this: rendering is in-process, there is no\n * shared cache to protect, and exactness is the local product promise.\n * - `lattice` — the deployment treats a finite set of render points as\n * durable, CDN-shared artifacts. The bounded quantity\n * is OUTPUT PIXELS, never zoom:\n *\n * - `fullPage.widths` — full-page renders quantize on `viewport.width`\n * (a scale lattice bounds artifact COUNT but not SIZE: PDF page space\n * is effectively unbounded, so scale 1 of a poster page is a memory\n * bomb while width caps the dominant dimension by construction).\n * - `tiles` — RESERVED for the deep-zoom vertical: a scale-based\n * pyramid × fixed tile size, where per-job cost is constant. Absent\n * until the tiling plugin ships; reserving the shape keeps the SDK\n * contract from churning twice.\n * - `maxRenderPixels` — the worker-side output budget for degenerate\n * geometry (width bounds width, not height).\n *\n * The SDK never conforms a request implicitly — the same `render.image`\n * call must not return different pixels on local vs cloud. Conformance is\n * the caller's visible choice via {@link snapFullPageViewport}.\n */\nexport type EngineRenderPolicy =\n | { readonly kind: 'continuous' }\n | {\n readonly kind: 'lattice';\n readonly fullPage: { readonly widths: readonly number[] };\n readonly tiles?: {\n readonly tileSizes: readonly number[];\n readonly scales: readonly number[];\n };\n /**\n * Annotation-appearance lattice — SCALE-based, unlike full pages:\n * an appearance is sized by `annotation.rect × scale`, rects span\n * orders of magnitude (a 4pt caret vs a page-sized stamp), and the\n * composite must track the PAGE's effective render scale or\n * annotations sit blurry on a crisp raster. Small images → the\n * ladder affords finer, taller steps than pages ever could.\n */\n readonly appearances?: { readonly scales: readonly number[] };\n readonly maxRenderPixels?: number;\n readonly formats: readonly ('webp' | 'png')[];\n readonly background: 'white';\n readonly enforced: boolean;\n };\n\nexport const CONTINUOUS_RENDER_POLICY: EngineRenderPolicy = { kind: 'continuous' };\n\n/**\n * Document-scoped render policy surface (`doc.render`). Async because the\n * cloud engine learns its policy from `/v1/access`; the local engine\n * resolves immediately with `continuous`.\n *\n * Per-page rendering itself stays on `page(pon).render` — this service\n * carries POLICY, not pixels.\n */\nexport interface DocumentRenderService {\n policy(): Promise<EngineRenderPolicy>;\n}\n\n/**\n * Conform a FULL-PAGE viewport to a render policy — the ONE snap\n * implementation, shared by every engine and plugin. Pure and explicit\n * by design:\n *\n * - `continuous` → identity (local/cloud plugin code stays byte-identical).\n * - `lattice` → returns a `width`-kind viewport at the smallest ladder\n * width ≥ the requested detail (snap UP: always crisp, CSS downscales\n * for free), capped at the largest width — detail beyond the cap is the\n * tile pyramid's job, by design.\n * - `scale`-kind requests convert through the page's width in PDF user\n * units — pass `opts.pageWidth` (the caller has it from the layout);\n * omitting it for a scale viewport under a lattice policy is a\n * programmer error and throws `InvalidArg`.\n */\nexport function snapFullPageViewport(\n policy: EngineRenderPolicy,\n viewport: PageRenderViewport,\n opts?: { pageWidth?: number },\n): PageRenderViewport {\n if (policy.kind === 'continuous') return viewport;\n if (policy.fullPage.widths.length === 0) {\n throw new EngineError(EngineErrorCode.InvalidArg, 'render policy has an empty width ladder');\n }\n const widths = [...policy.fullPage.widths].sort((a, b) => a - b);\n\n let requested: number;\n if (viewport.kind === 'width') {\n requested = viewport.width;\n } else {\n const pageWidth = opts?.pageWidth;\n if (pageWidth === undefined || pageWidth <= 0) {\n throw new EngineError(\n EngineErrorCode.InvalidArg,\n 'snapping a scale viewport to a width lattice requires opts.pageWidth',\n );\n }\n requested = (viewport.scale ?? 1) * pageWidth;\n }\n\n const snapped = widths.find((width) => width >= requested) ?? widths[widths.length - 1]!;\n return { kind: 'width', width: snapped };\n}\n\n/**\n * Conform an annotation-appearance scale to the policy's appearance\n * lattice. Same discipline as {@link snapFullPageViewport}: identity on\n * continuous (and when the policy carries no appearance block), snap UP,\n * cap at the largest point. Callers derive `scale` from the page's\n * effective render scale (`snappedWidth / pageWidth`, × devicePixelRatio\n * as needed) so composites stay crisp against the page raster.\n */\nexport function snapAppearanceScale(policy: EngineRenderPolicy, scale: number): number {\n if (policy.kind === 'continuous' || policy.appearances === undefined) return scale;\n if (policy.appearances.scales.length === 0) {\n throw new EngineError(\n EngineErrorCode.InvalidArg,\n 'render policy has an empty appearance-scale lattice',\n );\n }\n const scales = [...policy.appearances.scales].sort((a, b) => a - b);\n return scales.find((s) => s >= scale) ?? scales[scales.length - 1]!;\n}\n\n/**\n * Conform a tile-pyramid scale to the policy's tile lattice — the third\n * member of the `snap<PolicyBlock><Quantity>` family. Identity on\n * continuous and while the deployment doesn't advertise a `tiles` block\n * (the block is reserved until the deep-zoom vertical ships server-side;\n * the tiling client uses its own default pyramid then — see\n * plugin-render). Snap UP, cap at the largest scale: per-tile cost is\n * constant by construction (`tileSize²` pixels regardless of level), so\n * the cap bounds artifact COUNT, not memory.\n */\nexport function snapTileScale(policy: EngineRenderPolicy, scale: number): number {\n if (policy.kind === 'continuous' || policy.tiles === undefined) return scale;\n if (policy.tiles.scales.length === 0) {\n throw new EngineError(\n EngineErrorCode.InvalidArg,\n 'render policy has an empty tile-scale lattice',\n );\n }\n const scales = [...policy.tiles.scales].sort((a, b) => a - b);\n return scales.find((s) => s >= scale) ?? scales[scales.length - 1]!;\n}\n","/**\n * Unified \"should I ask the user for a password?\" shape.\n *\n * A PDF has two distinct password moments:\n * 1. **Required** — the document is encrypted and we couldn't read\n * anything anonymously. The dev MUST gather a password and call\n * `unlock()` before any other operation succeeds.\n * 2. **Optional** — the document is open and readable, but more\n * permissions become available with the owner password. The dev\n * MAY surface an \"unlock for full access\" affordance.\n *\n * Plus the trivial third state: **none** — nothing to do.\n *\n * The discriminated union encodes the invariants:\n * - `required` and `optional` cannot both be true (a doc you can't\n * read can't be \"upgraded\" — you have to read first).\n * - `hint` is only present when meaningful (no hint in the `none` arm,\n * mandatory `owner` hint in `optional` since that's the only thing\n * an upgrade asks for).\n *\n * Computed identically on local + cloud via\n * {@link passwordPromptFromState} so the dev's UI gating code is\n * engine-agnostic.\n */\nimport type { DocumentSecurityState } from './DocumentSecurityService';\n\nexport type PasswordPrompt =\n | { readonly state: 'none' }\n | { readonly state: 'required'; readonly hint: 'user' | 'owner' | null }\n | { readonly state: 'optional'; readonly hint: 'owner' };\n\n/**\n * Derive the high-level password prompt from the raw security state.\n *\n * The function is pure and total — every `DocumentSecurityState`\n * maps to exactly one `PasswordPrompt`. Use this as the SINGLE source\n * of truth wherever the SDK exposes a \"do you need a password?\" flag:\n * both `LocalDocumentSecurityService` and `CloudDocumentSecurityService`\n * call it, so the contract can never drift.\n *\n * Mapping rules (top to bottom; first match wins):\n *\n * 1. encryption.state === 'none'\n * → { state: 'none' } the document isn't encrypted\n *\n * 2. !permissions.known\n * → { state: 'required', hint: null } we haven't probed yet; can't\n * tell user-vs-owner; show\n * generic prompt\n *\n * 3. requiresPassword && openedAs === 'none'\n * → { state: 'required', hint: 'user' } encrypted, anonymous open\n * failed → user pwd needed\n *\n * 4. openedAs === 'owner'\n * → { state: 'none' } already at the top — nothing more\n * to unlock\n *\n * 5. permissions.canUpgradeToOwner === true\n * → { state: 'optional', hint: 'owner' } open as user (or as none\n * for owner-pwd-only docs)\n * but more is available\n *\n * 6. fallthrough → { state: 'none' } open and nothing more available\n */\nexport function passwordPromptFromState(state: DocumentSecurityState): PasswordPrompt {\n if (state.encryption.state === 'none') {\n return { state: 'none' };\n }\n\n if (!state.permissions.known) {\n return { state: 'required', hint: null };\n }\n\n if (state.encryption.requiresPassword && state.permissions.openedAs === 'none') {\n return { state: 'required', hint: 'user' };\n }\n\n if (state.permissions.openedAs === 'owner') {\n return { state: 'none' };\n }\n\n if (state.permissions.canUpgradeToOwner) {\n return { state: 'optional', hint: 'owner' };\n }\n\n return { state: 'none' };\n}\n","/**\n * Wire-level packaging for messages crossing a Web Worker / Node\n * `worker_thread` boundary.\n *\n * `WirePack<P>` is the typed pair every producer hands to a transport:\n * the structured payload (validated against the wire schema) and an\n * explicit, ordered list of `Transferable` objects that the producer\n * intends to move (zero-copy) to the receiver.\n *\n * Why this is a first-class type and not a transport-side argument:\n *\n * - **Producer is the only one who knows.** Whether a particular\n * `ArrayBuffer` should be moved (zero-copy, sender's reference\n * detached) or copied (structured-cloned, both sides retain\n * access) is a semantic decision belonging to the code that\n * produced the buffer. Inferring it later — by walking the\n * payload looking for `ArrayBuffer` instances and assuming they\n * should all be transferred — is the v2 footgun this design\n * replaces.\n *\n * - **Type-checked at the boundary.** A handler returning\n * `WirePack<RenderResult>` cannot forget to declare its\n * transfer list; the producer literally writes\n * `wirePack({ ..., pixels }, [pixels.buffer])` in a single\n * return statement. Forgetting yields a structurally identical\n * copy (slow but correct), never a silent leak.\n *\n * - **Symmetric across the boundary.** Same `WirePack<P>` on the\n * request path (main → worker) and the response path (worker →\n * main). Inline transports treat `transfer` as a no-op since\n * there's no thread boundary to cross.\n *\n * - **Schema-orthogonal.** Zod schemas validate `payload` and\n * nothing else. `transfer` is not data; it's a memory-ownership\n * manifest, and the design keeps those concerns separate.\n *\n * The receiver of a `postMessage(payload, { transfer })` call gets\n * the payload back **with the listed buffers already moved into it**\n * — there's no second argument on the receiving end. So `WirePack`\n * only ever travels the producer-to-transport leg of the trip; the\n * consumer side just sees the unwrapped `payload`.\n */\nexport interface WirePack<P> {\n readonly payload: P;\n readonly transfer: readonly Transferable[];\n}\n\n/**\n * Singleton empty transfer list. Frozen so accidental in-place\n * mutation throws in strict mode rather than silently mutating the\n * default for future calls.\n */\nexport const EMPTY_TRANSFER: readonly Transferable[] = Object.freeze([]);\n\n/**\n * Producer-side helper: pair a typed payload with its transfer list.\n *\n * The `transfer` argument is optional; omitting it (or passing `[]`)\n * is the explicit, type-checked way to say \"I declare this message\n * carries no transferables.\" That's structurally identical to the\n * shape the v2 walker generated for non-binary messages, but here\n * the declaration is at construction time, in the producer's own\n * code, where the knowledge actually lives.\n *\n * wirePack({ kind: 'metadata.read', jobId, docId })\n * wirePack({ kind: 'open.fatMem', jobId, docId, bytes }, [bytes])\n * wirePack({ tag: 'page.render', pixels }, [pixels.buffer])\n */\nexport function wirePack<P>(\n payload: P,\n transfer: readonly Transferable[] = EMPTY_TRANSFER,\n): WirePack<P> {\n return { payload, transfer };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"runtime.cjs","names":["AbortError","EngineError","EngineErrorCode"],"sources":["../src/promise/AbortablePromise.ts","../src/engine/document-security-state.ts","../src/engine/DocumentRenderService.ts","../src/engine/passwordPrompt.ts","../src/wire/WirePack.ts"],"sourcesContent":["import { AbortError } from './AbortError';\n\nexport type AbortableExecutor<T, P> = (\n resolve: (value: T | PromiseLike<T>) => void,\n reject: (reason: unknown) => void,\n progress: (p: P) => void,\n signal: AbortSignal,\n) => void;\n\n/**\n * Awaitable Promise subclass with abort and progress.\n *\n * Symbol.species returns plain Promise so chained .then/.catch/.finally\n * return regular promises and never try to synthesize a new\n * AbortablePromise (which would have no executor).\n *\n * Settlement contract:\n * - The first settlement wins. resolve/reject handed to the executor\n * are wrapped so that any subsequent call (whether by the executor,\n * by abort(), or by both racing) becomes a silent no-op.\n * - abort() rejects the public promise with AbortError immediately,\n * even if the executor never observes the AbortSignal. The executor\n * still receives the AbortSignal so it can stop real work\n * cooperatively (release a queue slot, abort fetch, post a worker\n * abort, etc.). Anything the executor does after that — including\n * a late resolve(value), a late reject(error), or a rejected inner\n * Promise inside AbortablePromise.run — is dropped silently.\n * - abort() after settlement is a no-op.\n */\nexport class AbortablePromise<T, P = never> extends Promise<T> {\n static override get [Symbol.species](): PromiseConstructor {\n return Promise;\n }\n\n readonly signal: AbortSignal;\n\n private readonly _ctrl: AbortController;\n private readonly _progressCbs: Set<(p: P) => void>;\n private readonly _state: { settled: boolean };\n private readonly _internalReject: (reason: unknown) => void;\n\n constructor(executor: AbortableExecutor<T, P>) {\n const ctrl = new AbortController();\n const progressCbs = new Set<(p: P) => void>();\n const state = { settled: false };\n let capturedReject!: (reason: unknown) => void;\n\n super((resolve, reject) => {\n capturedReject = reject;\n\n const wrappedResolve = (value: T | PromiseLike<T>) => {\n if (state.settled) return;\n state.settled = true;\n resolve(value);\n };\n const wrappedReject = (reason: unknown) => {\n if (state.settled) return;\n state.settled = true;\n reject(reason);\n };\n const progress = (p: P) => {\n if (state.settled) return;\n for (const cb of progressCbs) {\n try {\n cb(p);\n } catch {\n // ignore subscriber errors\n }\n }\n };\n\n executor(wrappedResolve, wrappedReject, progress, ctrl.signal);\n });\n\n this._ctrl = ctrl;\n this.signal = ctrl.signal;\n this._progressCbs = progressCbs;\n this._state = state;\n this._internalReject = capturedReject;\n }\n\n /**\n * Abort the underlying operation.\n *\n * - If the promise has already settled, this is a no-op.\n * - Otherwise the public promise rejects synchronously with an\n * AbortError (wrapping the supplied reason if it is not already an\n * AbortError) and the AbortSignal fires for any cooperative\n * cancellation the executor wired up.\n */\n abort(reason?: unknown): void {\n if (this._state.settled) return;\n if (this._ctrl.signal.aborted) return;\n\n const err = reason instanceof AbortError ? reason : new AbortError(reason);\n\n // Mark settled before signalling so any abort listener the executor\n // attached cannot race a late resolve/reject through the wrapped\n // settlers (they all consult state.settled).\n this._state.settled = true;\n this._ctrl.abort(err);\n this._internalReject(err);\n }\n\n /**\n * Subscribe to progress events. Returns an unsubscribe function.\n */\n onProgress(cb: (p: P) => void): () => void {\n this._progressCbs.add(cb);\n return () => {\n this._progressCbs.delete(cb);\n };\n }\n\n /**\n * Wrap a value in an already-resolved AbortablePromise. Mirrors Promise.resolve.\n */\n static resolveValue<T>(value: T | PromiseLike<T>): AbortablePromise<T> {\n return new AbortablePromise<T>((resolve) => resolve(value));\n }\n\n /**\n * Wrap a thrown reason in an already-rejected AbortablePromise.\n */\n static rejectReason<T = never>(reason: unknown): AbortablePromise<T> {\n return new AbortablePromise<T>((_resolve, reject) => reject(reason));\n }\n\n /**\n * Run an async function as an AbortablePromise so callers get .abort() and .signal.\n * The async function receives the AbortSignal (and a progress emitter) so it can\n * cooperate with the abort.\n *\n * If abort() fires while the inner async function is still running, the\n * public promise rejects with AbortError immediately. The inner async\n * function's eventual settlement (resolve or reject) is funneled through\n * the wrapped settlers and silently dropped — including a late rejection\n * from the underlying work, which prevents an UnhandledRejection because\n * the .then(resolve, reject) below \"handles\" it via the no-op.\n */\n static run<T, P = never>(\n fn: (signal: AbortSignal, progress: (p: P) => void) => Promise<T>,\n ): AbortablePromise<T, P> {\n return new AbortablePromise<T, P>((resolve, reject, progress, signal) => {\n fn(signal, progress).then(resolve, reject);\n });\n }\n}\n","import type {\n DocumentAccessReason,\n DocumentSecurityState,\n PdfPermissionAdvisory,\n PdfPermissionInfo,\n} from './DocumentSecurityService';\nimport type { PdfBits } from '../auth/scope';\nimport type { DocumentSecurityProbeInfo } from '../wire/worker-protocol';\n\nexport interface DocumentHeadLike {\n encryption: {\n state: DocumentSecurityState['encryption']['state'];\n requiresPassword: boolean | null;\n };\n permissions: DocumentSecurityState['permissions'];\n access: DocumentSecurityState['access'];\n}\n\nexport function securityStateFromHead(head: DocumentHeadLike): DocumentSecurityState {\n return {\n encryption: {\n state: head.encryption.state,\n requiresPassword: head.encryption.requiresPassword,\n },\n permissions: { ...head.permissions },\n access: {\n required: head.access.required,\n reasons: [...head.access.reasons],\n ...(head.access.endpoint ? { endpoint: head.access.endpoint } : {}),\n },\n };\n}\n\nexport function permissionInfoFromProbe(info: DocumentSecurityProbeInfo): PdfPermissionInfo | null {\n if (info.pdfPermissionsBits === null) return null;\n return {\n known: true,\n bits: info.pdfPermissionsBits,\n allAllowed: info.pdfPermissionsAllAllowed,\n openedAs: info.pdfOpenedAs,\n securityHandlerRevision: info.securityHandlerRevision,\n };\n}\n\n/**\n * Same as {@link permissionInfoFromProbe} but additionally populates\n * `flags` (typed PdfBits view) and `advisory` (capability-shaped\n * booleans for UI badges). Used by routes that have a decoded `PdfBits`\n * in hand — notably `/access`, which always does.\n *\n * Returns `null` for the same reason as the base function — when the\n * PDF hasn't been probed yet so bits are unknown.\n */\nexport function permissionInfoWithAdvisory(\n info: DocumentSecurityProbeInfo,\n pdfBits: PdfBits,\n): PdfPermissionInfo | null {\n const base = permissionInfoFromProbe(info);\n if (!base) return null;\n return {\n ...base,\n flags: pdfBits,\n advisory: advisoryFromPdfBits(pdfBits),\n };\n}\n\n/**\n * Translate a {@link PdfBits} view into the capability-shaped\n * {@link PdfPermissionAdvisory}. The rules here MUST mirror the bit\n * combinations the scope resolver uses for `pdf.permissions`\n * expansion — `doc.print.high` requires bit 12 AND bit 3, etc.\n */\nexport function advisoryFromPdfBits(b: PdfBits): PdfPermissionAdvisory {\n return {\n canPrint: b.bit3,\n canPrintHigh: b.bit12 && b.bit3,\n canCopy: b.bit5,\n canAnnotate: b.bit6,\n canFillForms: b.bit6 || b.bit9,\n canModifyForms: b.bit6 && b.bit4,\n canModifyPages: b.bit4,\n canAssemble: b.bit11,\n };\n}\n\nexport function securityStateFromProbe(\n info: DocumentSecurityProbeInfo,\n opts: { accessEndpoint?: string; cdnRequired?: boolean } = {},\n): DocumentSecurityState {\n const permission = permissionInfoFromProbe(info);\n const reasons: DocumentAccessReason[] = [];\n if (info.encryptionRequiresPassword === true && !permission) reasons.push('password');\n if (opts.cdnRequired) reasons.push('cdn');\n if (info.encryptionState === 'unknown') reasons.push('permissions-unknown');\n\n return {\n encryption: {\n state: info.encryptionState,\n requiresPassword: info.encryptionRequiresPassword,\n },\n permissions: {\n known: permission?.known ?? false,\n bits: permission?.bits ?? null,\n allAllowed: permission?.allAllowed ?? null,\n openedAs: permission?.openedAs ?? null,\n securityHandlerRevision: permission?.securityHandlerRevision ?? null,\n canUpgradeToOwner: info.encryptionState === 'encrypted' && info.pdfOpenedAs !== 'owner',\n },\n access: {\n required: reasons.length > 0,\n reasons,\n ...(reasons.length > 0 && opts.accessEndpoint ? { endpoint: opts.accessEndpoint } : {}),\n },\n };\n}\n","import { EngineError } from '../errors/EngineError';\nimport { EngineErrorCode } from '../errors/EngineErrorCode';\nimport type { PageRenderViewport } from '../dto/PageRender';\n\n/**\n * The engine's render-parameter policy.\n *\n * - `continuous` — any viewport renders exactly as requested. The LOCAL\n * engine always answers this: rendering is in-process, there is no\n * shared cache to protect, and exactness is the local product promise.\n * - `lattice` — the deployment treats a finite set of render points as\n * durable, CDN-shared artifacts. The bounded quantity\n * is OUTPUT PIXELS, never zoom:\n *\n * - `fullPage.widths` — full-page renders quantize on `viewport.width`\n * (a scale lattice bounds artifact COUNT but not SIZE: PDF page space\n * is effectively unbounded, so scale 1 of a poster page is a memory\n * bomb while width caps the dominant dimension by construction).\n * - `tiles` — RESERVED for the deep-zoom vertical: a scale-based\n * pyramid × fixed tile size, where per-job cost is constant. Absent\n * until the tiling plugin ships; reserving the shape keeps the SDK\n * contract from churning twice.\n * - `maxRenderPixels` — the worker-side output budget for degenerate\n * geometry (width bounds width, not height).\n *\n * The SDK never conforms a request implicitly — the same `render.image`\n * call must not return different pixels on local vs cloud. Conformance is\n * the caller's visible choice via {@link snapFullPageViewport}.\n */\nexport type EngineRenderPolicy =\n | { readonly kind: 'continuous' }\n | {\n readonly kind: 'lattice';\n readonly fullPage: { readonly widths: readonly number[] };\n readonly tiles?: {\n readonly tileSizes: readonly number[];\n readonly scales: readonly number[];\n };\n /**\n * Annotation-appearance lattice — SCALE-based, unlike full pages:\n * an appearance is sized by `annotation.rect × scale`, rects span\n * orders of magnitude (a 4pt caret vs a page-sized stamp), and the\n * composite must track the PAGE's effective render scale or\n * annotations sit blurry on a crisp raster. Small images → the\n * ladder affords finer, taller steps than pages ever could.\n */\n readonly appearances?: { readonly scales: readonly number[] };\n readonly maxRenderPixels?: number;\n readonly formats: readonly ('webp' | 'png')[];\n readonly background: 'white';\n readonly enforced: boolean;\n };\n\nexport const CONTINUOUS_RENDER_POLICY: EngineRenderPolicy = { kind: 'continuous' };\n\n/**\n * Document-scoped render policy surface (`doc.render`). Async because the\n * cloud engine learns its policy from `/v1/access`; the local engine\n * resolves immediately with `continuous`.\n *\n * Per-page rendering itself stays on `page(pon).render` — this service\n * carries POLICY, not pixels.\n */\nexport interface DocumentRenderService {\n policy(): Promise<EngineRenderPolicy>;\n}\n\n/**\n * Conform a FULL-PAGE viewport to a render policy — the ONE snap\n * implementation, shared by every engine and plugin. Pure and explicit\n * by design:\n *\n * - `continuous` → identity (local/cloud plugin code stays byte-identical).\n * - `lattice` → returns a `width`-kind viewport at the smallest ladder\n * width ≥ the requested detail (snap UP: always crisp, CSS downscales\n * for free), capped at the largest width — detail beyond the cap is the\n * tile pyramid's job, by design.\n * - `scale`-kind requests convert through the page's width in PDF user\n * units — pass `opts.pageWidth` (the caller has it from the layout);\n * omitting it for a scale viewport under a lattice policy is a\n * programmer error and throws `InvalidArg`.\n */\nexport function snapFullPageViewport(\n policy: EngineRenderPolicy,\n viewport: PageRenderViewport,\n opts?: { pageWidth?: number },\n): PageRenderViewport {\n if (policy.kind === 'continuous') return viewport;\n if (policy.fullPage.widths.length === 0) {\n throw new EngineError(EngineErrorCode.InvalidArg, 'render policy has an empty width ladder');\n }\n const widths = [...policy.fullPage.widths].sort((a, b) => a - b);\n\n let requested: number;\n if (viewport.kind === 'width') {\n requested = viewport.width;\n } else {\n const pageWidth = opts?.pageWidth;\n if (pageWidth === undefined || pageWidth <= 0) {\n throw new EngineError(\n EngineErrorCode.InvalidArg,\n 'snapping a scale viewport to a width lattice requires opts.pageWidth',\n );\n }\n requested = (viewport.scale ?? 1) * pageWidth;\n }\n\n const snapped = widths.find((width) => width >= requested) ?? widths[widths.length - 1]!;\n return { kind: 'width', width: snapped };\n}\n\n/**\n * Conform an annotation-appearance scale to the policy's appearance\n * lattice. Same discipline as {@link snapFullPageViewport}: identity on\n * continuous (and when the policy carries no appearance block), snap UP,\n * cap at the largest point. Callers derive `scale` from the page's\n * effective render scale (`snappedWidth / pageWidth`, × devicePixelRatio\n * as needed) so composites stay crisp against the page raster.\n */\nexport function snapAppearanceScale(policy: EngineRenderPolicy, scale: number): number {\n if (policy.kind === 'continuous' || policy.appearances === undefined) return scale;\n if (policy.appearances.scales.length === 0) {\n throw new EngineError(\n EngineErrorCode.InvalidArg,\n 'render policy has an empty appearance-scale lattice',\n );\n }\n const scales = [...policy.appearances.scales].sort((a, b) => a - b);\n return scales.find((s) => s >= scale) ?? scales[scales.length - 1]!;\n}\n\n/**\n * Conform a tile-pyramid scale to the policy's tile lattice — the third\n * member of the `snap<PolicyBlock><Quantity>` family. Identity on\n * continuous and while the deployment doesn't advertise a `tiles` block\n * (the block is reserved until the deep-zoom vertical ships server-side;\n * the tiling client uses its own default pyramid then — see\n * plugin-render). Snap UP, cap at the largest scale: per-tile cost is\n * constant by construction (`tileSize²` pixels regardless of level), so\n * the cap bounds artifact COUNT, not memory.\n */\nexport function snapTileScale(policy: EngineRenderPolicy, scale: number): number {\n if (policy.kind === 'continuous' || policy.tiles === undefined) return scale;\n if (policy.tiles.scales.length === 0) {\n throw new EngineError(\n EngineErrorCode.InvalidArg,\n 'render policy has an empty tile-scale lattice',\n );\n }\n const scales = [...policy.tiles.scales].sort((a, b) => a - b);\n return scales.find((s) => s >= scale) ?? scales[scales.length - 1]!;\n}\n","/**\n * Unified \"should I ask the user for a password?\" shape.\n *\n * A PDF has two distinct password moments:\n * 1. **Required** — the document is encrypted and we couldn't read\n * anything anonymously. The dev MUST gather a password and call\n * `unlock()` before any other operation succeeds.\n * 2. **Optional** — the document is open and readable, but more\n * permissions become available with the owner password. The dev\n * MAY surface an \"unlock for full access\" affordance.\n *\n * Plus the trivial third state: **none** — nothing to do.\n *\n * The discriminated union encodes the invariants:\n * - `required` and `optional` cannot both be true (a doc you can't\n * read can't be \"upgraded\" — you have to read first).\n * - `hint` is only present when meaningful (no hint in the `none` arm,\n * mandatory `owner` hint in `optional` since that's the only thing\n * an upgrade asks for).\n *\n * Computed identically on local + cloud via\n * {@link passwordPromptFromState} so the dev's UI gating code is\n * engine-agnostic.\n */\nimport type { DocumentSecurityState } from './DocumentSecurityService';\n\nexport type PasswordPrompt =\n | { readonly state: 'none' }\n | { readonly state: 'required'; readonly hint: 'user' | 'owner' | null }\n | { readonly state: 'optional'; readonly hint: 'owner' };\n\n/**\n * Derive the high-level password prompt from the raw security state.\n *\n * The function is pure and total — every `DocumentSecurityState`\n * maps to exactly one `PasswordPrompt`. Use this as the SINGLE source\n * of truth wherever the SDK exposes a \"do you need a password?\" flag:\n * both `LocalDocumentSecurityService` and `CloudDocumentSecurityService`\n * call it, so the contract can never drift.\n *\n * Mapping rules (top to bottom; first match wins):\n *\n * 1. encryption.state === 'none'\n * → { state: 'none' } the document isn't encrypted\n *\n * 2. !permissions.known\n * → { state: 'required', hint: null } we haven't probed yet; can't\n * tell user-vs-owner; show\n * generic prompt\n *\n * 3. requiresPassword && openedAs === 'none'\n * → { state: 'required', hint: 'user' } encrypted, anonymous open\n * failed → user pwd needed\n *\n * 4. openedAs === 'owner'\n * → { state: 'none' } already at the top — nothing more\n * to unlock\n *\n * 5. permissions.canUpgradeToOwner === true\n * → { state: 'optional', hint: 'owner' } open as user (or as none\n * for owner-pwd-only docs)\n * but more is available\n *\n * 6. fallthrough → { state: 'none' } open and nothing more available\n */\nexport function passwordPromptFromState(state: DocumentSecurityState): PasswordPrompt {\n if (state.encryption.state === 'none') {\n return { state: 'none' };\n }\n\n if (!state.permissions.known) {\n return { state: 'required', hint: null };\n }\n\n if (state.encryption.requiresPassword && state.permissions.openedAs === 'none') {\n return { state: 'required', hint: 'user' };\n }\n\n if (state.permissions.openedAs === 'owner') {\n return { state: 'none' };\n }\n\n if (state.permissions.canUpgradeToOwner) {\n return { state: 'optional', hint: 'owner' };\n }\n\n return { state: 'none' };\n}\n","/**\n * Wire-level packaging for messages crossing a Web Worker / Node\n * `worker_thread` boundary.\n *\n * `WirePack<P>` is the typed pair every producer hands to a transport:\n * the structured payload (validated against the wire schema) and an\n * explicit, ordered list of `Transferable` objects that the producer\n * intends to move (zero-copy) to the receiver.\n *\n * Why this is a first-class type and not a transport-side argument:\n *\n * - **Producer is the only one who knows.** Whether a particular\n * `ArrayBuffer` should be moved (zero-copy, sender's reference\n * detached) or copied (structured-cloned, both sides retain\n * access) is a semantic decision belonging to the code that\n * produced the buffer. Inferring it later — by walking the\n * payload looking for `ArrayBuffer` instances and assuming they\n * should all be transferred — is the v2 footgun this design\n * replaces.\n *\n * - **Type-checked at the boundary.** A handler returning\n * `WirePack<RenderResult>` cannot forget to declare its\n * transfer list; the producer literally writes\n * `wirePack({ ..., pixels }, [pixels.buffer])` in a single\n * return statement. Forgetting yields a structurally identical\n * copy (slow but correct), never a silent leak.\n *\n * - **Symmetric across the boundary.** Same `WirePack<P>` on the\n * request path (main → worker) and the response path (worker →\n * main). Inline transports treat `transfer` as a no-op since\n * there's no thread boundary to cross.\n *\n * - **Schema-orthogonal.** Zod schemas validate `payload` and\n * nothing else. `transfer` is not data; it's a memory-ownership\n * manifest, and the design keeps those concerns separate.\n *\n * The receiver of a `postMessage(payload, { transfer })` call gets\n * the payload back **with the listed buffers already moved into it**\n * — there's no second argument on the receiving end. So `WirePack`\n * only ever travels the producer-to-transport leg of the trip; the\n * consumer side just sees the unwrapped `payload`.\n */\nexport interface WirePack<P> {\n readonly payload: P;\n readonly transfer: readonly Transferable[];\n}\n\n/**\n * Singleton empty transfer list. Frozen so accidental in-place\n * mutation throws in strict mode rather than silently mutating the\n * default for future calls.\n */\nexport const EMPTY_TRANSFER: readonly Transferable[] = Object.freeze([]);\n\n/**\n * Producer-side helper: pair a typed payload with its transfer list.\n *\n * The `transfer` argument is optional; omitting it (or passing `[]`)\n * is the explicit, type-checked way to say \"I declare this message\n * carries no transferables.\" That's structurally identical to the\n * shape the v2 walker generated for non-binary messages, but here\n * the declaration is at construction time, in the producer's own\n * code, where the knowledge actually lives.\n *\n * wirePack({ kind: 'metadata.read', jobId, docId })\n * wirePack({ kind: 'open.fatMem', jobId, docId, bytes }, [bytes])\n * wirePack({ tag: 'page.render', pixels }, [pixels.buffer])\n */\nexport function wirePack<P>(\n payload: P,\n transfer: readonly Transferable[] = EMPTY_TRANSFER,\n): WirePack<P> {\n return { payload, transfer };\n}\n"],"mappings":"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"}