@docx-editor.dev/core 2.9.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +7 -7
- package/dist/binding.d.ts +7 -7
- package/dist/binding.js +1 -1
- package/dist/chunk-6JWP2H7K.js +2 -0
- package/dist/chunk-6KNLLEUW.cjs +18 -0
- package/dist/chunk-7ADTI533.cjs +10 -0
- package/dist/chunk-7ETDCPF6.cjs +2 -0
- package/dist/chunk-7I3BSGGS.js +1 -0
- package/dist/{chunk-XMHWBL3K.cjs → chunk-7UU5YFCD.cjs} +1 -1
- package/dist/chunk-CKDAK3MV.js +10 -0
- package/dist/chunk-DIMEYVNS.js +2 -0
- package/dist/{chunk-IEXDXWTA.cjs → chunk-H2656QDI.cjs} +1 -1
- package/dist/chunk-KQGENNL5.cjs +15 -0
- package/dist/chunk-LIXPSV4T.js +18 -0
- package/dist/{chunk-DKMKH77K.cjs → chunk-O4UULRAQ.cjs} +5 -5
- package/dist/chunk-SIIFNE6U.js +15 -0
- package/dist/chunk-VXYECPKA.js +5 -0
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.d.cts +3 -3
- package/dist/contracts/modules.d.ts +3 -3
- package/dist/{custom-node-writes-QyVZdTUA.d.ts → custom-node-writes-D6SGwebL.d.ts} +20 -4
- package/dist/{custom-node-writes-7ERv0f_X.d.cts → custom-node-writes-Dy3b20PS.d.cts} +20 -4
- package/dist/{editor-PUlv5Pp7.d.ts → editor-Cvd7Geoc.d.ts} +4 -4
- package/dist/{editor-CojjwMmF.d.cts → editor-cAEf1uXW.d.cts} +4 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +14 -5
- package/dist/editor.d.cts +18 -18
- package/dist/editor.d.ts +18 -18
- package/dist/editor.js +1 -1
- package/dist/{image-resources-eZqD_-vC.d.ts → image-resources-BgA9EQxY.d.ts} +1 -1
- package/dist/{image-resources-DQOiwOuE.d.cts → image-resources-BiA-IXgo.d.cts} +1 -1
- package/dist/{index-oN-v8DQ5.d.ts → index-DRqY5JVF.d.ts} +58 -12
- package/dist/{index-DGPSeLI0.d.cts → index-wb-iOxfh.d.cts} +58 -12
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +334 -306
- package/dist/layout.d.ts +334 -306
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +5 -5
- package/dist/output.d.ts +5 -5
- package/dist/output.js +1 -1
- package/dist/{review-items-DpsqTHio.d.cts → review-items-B8tffIXj.d.cts} +1 -1
- package/dist/{review-items-D5SPFtsO.d.ts → review-items-bdGxFWNA.d.ts} +1 -1
- package/dist/{review-reads-CP106AHp.d.cts → review-reads-Bxz03tHG.d.cts} +1 -1
- package/dist/{review-reads-B2Ji3fVU.d.ts → review-reads-CHODU0LI.d.ts} +1 -1
- package/dist/{semantic-cell-selection-DJPjBWzf.d.cts → semantic-cell-selection-BPzx6DdT.d.cts} +2 -2
- package/dist/{semantic-cell-selection-BWhVAk5B.d.ts → semantic-cell-selection-CsHcr-yk.d.ts} +2 -2
- package/dist/{semantic-interaction-BjOcDB06.d.cts → semantic-interaction-BfWDD_0V.d.cts} +1 -1
- package/dist/{semantic-interaction-Cca1-X_a.d.ts → semantic-interaction-D-RZ9Ust.d.ts} +1 -1
- package/dist/{semantic-paint-Ur7pAINj.d.cts → semantic-paint-Bd7EqzXV.d.cts} +2 -2
- package/dist/{semantic-paint-CufpIQFw.d.ts → semantic-paint-WhVtSDJK.d.ts} +2 -2
- package/dist/{semantic-records-Cc1MJrhM.d.ts → semantic-records-DCt-ZwKU.d.ts} +22 -4
- package/dist/{semantic-records-C3Z76KeN.d.cts → semantic-records-DadVT_E1.d.cts} +22 -4
- package/dist/{shaped-measurer-CwlTPDJO.d.ts → shaped-measurer-B9f4A7QA.d.ts} +1 -1
- package/dist/{shaped-measurer-CYSK20E2.d.cts → shaped-measurer-CninrHr_.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +131 -131
- package/dist/store.d.ts +131 -131
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-XMVsJSpe.d.ts → tree-op-types-CnRb7AYo.d.ts} +22 -1
- package/dist/{tree-op-types-B0-sCtw-.d.cts → tree-op-types-D1vNJ7XC.d.cts} +22 -1
- package/dist/{tree-session-D945D43B.d.cts → tree-session-Df02ajqc.d.cts} +5 -5
- package/dist/{tree-session-DBJgmdmc.d.ts → tree-session-ZuBFOhIh.d.ts} +5 -5
- package/dist/{tree-store-C6vc8E_2.d.cts → tree-store-B_sJBMIS.d.cts} +1 -1
- package/dist/{tree-store-ClA-qng4.d.ts → tree-store-DgETo6Mf.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-2RDMWJPF.cjs +0 -2
- package/dist/chunk-5VC5HGJA.js +0 -2
- package/dist/chunk-A2JIBG75.js +0 -1
- package/dist/chunk-DTQPINIM.js +0 -15
- package/dist/chunk-HHFMXG25.js +0 -2
- package/dist/chunk-IMMAG4QP.cjs +0 -10
- package/dist/chunk-KBCC66CI.js +0 -5
- package/dist/chunk-P5YSGSYC.cjs +0 -15
- package/dist/chunk-Q66ZJFRE.js +0 -18
- package/dist/chunk-TP4EHWEX.cjs +0 -18
- package/dist/chunk-VUJGPCPU.js +0 -10
package/dist/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{j as Budget,i as BudgetError,z as COMPARATORS,l as CancellationController,k as CancellationError,P as DEFAULT_VIEW_SETTINGS,o as DeterministicClock,v as DeterministicMemoryMeter,a as ID_KINDS,t as LIMIT_KEYS,s as LIMIT_SPECS,N as NO_TRACKING_SETTINGS,n as PortRegistry,m as PortResolutionError,g as RegistryError,p as SequentialIdentity,w as assertLimitInvariants,c as assertValidId,q as beginOperation,x as canonicalize,A as compareArtifacts,e as compareSemVer,F as deobfuscateFont,K as diffSemanticDigests,I as digestPart,r as endOperation,L as ensureListDefinition,M as ensureNumberingLevel,B as fingerprint,E as hashAuthored,b as isValidId,u as makeLimitCounter,d as parseSemVer,G as readEmbeddedFonts,O as readTrackingSettings,Q as readViewSettings,D as replayFixture,h as resolve,H as resolveTocRowHeadings,f as satisfies,J as semanticDigest,y as stableHash,C as validateFixture,T as withExportedCustomNodes}from'./chunk-5VC5HGJA.js';export{Hf as ACCEPTED_PARAGRAPH_PROPERTIES,Gf as ACCEPTED_RUN_PROPERTIES,h as ALL_FROZEN_IDS,dg as AUTHORABLE_PARAGRAPH_PROPERTIES,eg as AUTHORABLE_RUN_PROPERTIES,p as BoundedCounter,c as CANONICAL_MUTATION_ORIGINS,je as CONTENT_CONTROL_ID_MAX,Be as CONTENT_CONTROL_PROPERTY_ORDER,if as CUSTOM_NODE_XPATH_PREFIX,Ve as CUSTOM_XML_PROPS_REL,We as CUSTOM_XML_PROPS_TYPE,Ue as CUSTOM_XML_REL,G as DANGEROUS_KEYS,Xe as DATASTORE_NAMESPACE_URI,Ed as DEFAULT_ENDNOTE_PROPERTIES,Dd as DEFAULT_FOOTNOTE_PROPERTIES,m as DEFAULT_IMAGE_RESOURCE_LIMITS,j as DEFAULT_LIMITS,Nf as DEFAULT_MAX_EDITABLE_STORY_PARTS,Bb as DEFAULT_OMML_LIMITS,nb as DEFAULT_OOXML_PACKAGE_LIMITS,Ca as DEFAULT_ZIP_LIMITS,g as DEPENDENCY_KEY_IDS,H as DangerousKeyError,Zb as FIELD_ATOM_CHAR,i as HARD_CEILINGS,Ga as HYPERLINK_RELATIONSHIP_TYPE,C as IMAGE_RELATIONSHIP_TYPE,l as IMAGE_RESOURCE_HARD_CEILINGS,Na as IMAGE_WRAP_TARGETS,Q as INERT_EXECUTABLE_KINDS,o as LimitExceededError,ie as MAX_CONTENT_CONTROLS_PER_PART,he as MAX_CONTENT_CONTROL_NESTING,Zf as MAX_CUSTOM_NODE_LABEL_LENGTH,Yf as MAX_CUSTOM_NODE_PAYLOAD_LENGTH,zd as MAX_NOTES_PER_PART,Yd as MAX_NOTE_REFERENCE_PARTS,Xd as MAX_NOTE_REFERENCE_SCAN,Ee as MAX_STORY_SDT_NESTING,_a as MAX_SVG_SNIFF_BYTES,d as NON_CANONICAL_ORIGINS,ad as NOTE_ATOM_CHAR,ed as NOTE_CONTINUATION_SEPARATOR_ID,cd as NOTE_ID_MAX,bd as NOTE_ID_MIN,dd as NOTE_SEPARATOR_ID,Ab as OFFICE_MATH_NAMESPACE_URI,Fa as OFFICE_RELATIONSHIP_NAMESPACE_URI,qa as OOXML_NODE_IDENTITY_RULES,b as ORIGIN_IDS,Ub as PAGE_BREAK_CHAR,aa as PrefixAllocator,e as RESULT_IDS,f as RUNTIME_PORT_IDS,Jg as SEARCH_MATCH_LIMIT,Ig as SEARCH_QUERY_MAX,uf as TABLE_BORDER_STYLES,Fc as TOC_LEVEL_INDENT_TWIPS,tc as TOC_MAX_BOOKMARKS_PER_REFRESH,sc as TOC_MAX_ENTRIES,uc as TOC_MAX_FIELD_NESTING,rc as TOC_MAX_INSTRUCTION_CHARS,vc as TOC_MAX_PAGE_PASSES,If as TREE_DOC_OP_KINDS,Ac as TWIPS_PER_POINT,Mf as TreeDocumentStore,Of as TreePackageStore,Le as W15_NAMESPACE_URI,ca as WML_NAMESPACE_URI,ea as XMLNS_NAMESPACE_URI,da as XML_NAMESPACE_URI,Tf as addComment,De as allocateContentControlId,jb as allocateDrawingPropertyId,Ad as allocateNoteId,Ba as applyEdits,$c as applyHeaderFooterLifecycleOp,fe as applyNoteLifecycleOp,Kf as applyTreeOp,t as asciiFold,$ as assertValidQName,pc as atomicFieldSpansOf,yd as atomicNoteSpansOf,Xc as authorableHyperlinkTarget,Kd as authoredDocumentEndnoteProperties,Jd as authoredDocumentFootnoteProperties,Hd as authoredEndnotePropertiesFromSectPr,Gd as authoredFootnotePropertiesFromSectPr,hg as authoredProperties,He as bodyStoryRoot,Lc as bookmarkPairNodes,mf as boundCustomXmlNodeIdOf,kf as boundCustomXmlNodeIds,lf as boundCustomXmlNodeIdsInPackage,zc as buildBookmarkIndex,A as buildContentTypeIndex,D as buildRelationshipSet,Ic as buildTocContentControl,Hc as buildTocEntryParagraph,na as canonicalOoxmlFingerprint,ge as cascadeDeletedNoteReferences,Te as cascadeEmptiedComments,X as childElements,Lb as collectFlowBlocks,sa as collectNodeIds,$d as collectNoteReferences,ae as collectPackageNoteReferences,Eg as collectReviewItems,nf as collectRevisionSites,Pb as collectSectionPropertyNodes,Je as collectStoryParagraphs,Me as commentAnchorsOfStory,Ag as commentBodyText,Bg as commentInitials,Dg as commentItemsOf,Wf as commentPartNameOf,Xf as commentsExtendedPartNameOf,Ne as commentsOfPart,P as containsCssFetch,ne as contentControlContentChildren,re as contentControlContentNodeOf,Jb as contentControlContentOf,qe as contentControlEndPropertiesNodeOf,ue as contentControlLevelOf,pe as contentControlPropertiesNodeOf,te as contentControlPropertiesOf,xe as contentControlTextOf,ve as contentControlsIn,rb as contentTypesPartBytes,ib as createImageResourceCache,ta as createNodeIdAllocator,Zd as createNoteReferenceScanBudget,vd as customMarkFollows,jf as customNodeBinding,bg as customNodePayloadsByControl,cg as customNodePayloadsOf,Ze as customXmlDataParts,gf as customXmlLabelXPath,bf as customXmlNodes,hf as customXmlPrefixMappings,Ye as datastoreItemIdFor,Hg as deepParagraphOrderOfPart,Qe as deleteCommentThread,Oc as deriveOoxmlIndexes,xc as detectBodyTocs,v as detectDuplicateNames,be as diagnoseNoteReferences,jg as directParagraphMarkProperties,ig as directParagraphProperties,Cf as drawingOpImpact,Yc as ensureHyperlinkRelationship,Eb as equationExpressionToLinearMath,O as escapeCssString,M as escapeXml,z as extensionKey,jc as fieldAtomText,ic as fieldOnOffAttribute,we as findContentControl,_e as findCustomXmlDataPart,yc as findDetectedToc,W as findElement,va as findNode,Cd as findNoteById,Ng as findOccurrences,vg as firstReviewRange,oe as flattenContentControls,_b as fldCharType,hc as fldSimpleInstr,Rc as fnv1a32,Kg as foldCase,gd as formatNoteScopeId,ng as formatOwnedRunIds,Yb as hardBreakAttributes,Vb as hardBreakKind,Xb as hardBreakText,Pe as hasAnyComment,$a as hasBoundedSvgRoot,Vf as hasCommentPart,lc as hasLegacyFormFieldData,ua as hasNode,Ia as hyperlinkAnchorOf,Ja as hyperlinkRelationshipIdOf,Ka as hyperlinkTargetOf,hb as imageResourceLookupFor,Mc as indexStyles,Vd as inlineControlEndingAt,Wd as inlineControlStartingAt,ya as insertChildren,_f as insertCustomNodeWrite,gc as instrTextValue,fg as isAuthorableRunProperty,Hb as isContentControl,Ib as isContentControlContent,le as isContentControlContentNode,ke as isContentControlNode,me as isContentControlWrapper,ha as isContentRevisionKind,od as isContinuationSeparatorNode,I as isDangerousKey,Ff as isDrawingTreeDocOp,jd as isEndnotesNode,S as isEvaluableField,kc as isFieldChrome,cc as isFldChar,$b as isFldCharNode,fc as isFldSimple,bc as isFldSimpleNode,id as isFootnotesNode,_c as isHeaderFooterLifecycleOp,Ha as isHyperlinkNode,R as isInertExecutable,dc as isInstrText,ac as isInstrTextNode,Nd as isLegalEndnotePosition,qc as isLegalFldCharType,Od as isLegalFootnotePosition,Pd as isLegalNumRestart,sd as isNormalNote,xd as isNoteAtomNode,ee as isNoteLifecycleOp,kd as isNoteNode,md as isNoteRefNode,ld as isNoteReferenceNode,Wb as isPageBreakNode,ia as isRangeMarkerKind,Mg as isSearchableQuery,nd as isSeparatorNode,Ge as isStoryPart,y as isValidMime,Z as isValidNCName,Pc as isValidParaId,_ as isValidQName,Lg as isWholeWord,Fb as linearMathToOmml,Fg as linkRevisionReplies,gb as liveDrawingReferenceCount,sg as locateSites,ze as lockForbidsEdit,Ae as lockForbidsRemoval,lg as mergedFontProperty,og as mergedMultiSettingProperty,pg as mergedParagraphMarkProperties,kg as mergedProperties,Sc as mintParaId,Vc as mintedParagraphIdentityAttributes,de as normalNoteIds,Wc as normalizeParagraphIdentity,r as normalizePartName,wd as noteAtomText,qd as noteIdOf,pd as noteKindOf,ud as noteRefKindOf,td as noteReferenceKindOf,rd as noteTypeOf,Bd as notesOf,ce as notesPartHasId,J as nullRecord,oa as ooxmlTreesEqual,Ce as orderedContentControlProperties,Qc as paraIdOf,Ud as paragraphOffsetIndex,Gg as paragraphOrderOfPart,Lf as paragraphTextOf,wa as parentNodeOf,Fd as parseAuthoredNoteProperties,se as parseContentControlId,Db as parseLinearMath,fd as parseNoteId,hd as parseNoteScopeId,wc as parseTocInstruction,u as partNameKey,Kc as planTocEntries,Cc as points,Ec as pointsToTwips,Ua as projectDrawing,Cb as projectOmmlEquation,gg as propertyContainer,cf as readCustomXmlNode,ja as readOnOffChild,ob as readOoxmlPackage,ra as readOoxmlPart,V as readXml,Da as readZip,Zc as relationshipTargetIn,sb as relationshipsOf,ub as relsPartNameFor,$f as removeCustomNodeWrite,Aa as removeNode,xa as replaceChildren,za as replaceNode,ye as resolveContentControlLock,B as resolveContentType,tb as resolveContentTypeOf,Md as resolveEndnoteProperties,Ld as resolveFootnoteProperties,Tb as resolveHeaderFooterParts,Sb as resolveHeaderFooterPartsBySection,Rb as resolveHeaderFooterResolutionBySection,F as resolveImageRelationship,n as resolveImageResourceLimits,w as resolveInternalTarget,k as resolveLimits,_d as resolveNotesPart,E as resolveRelationship,tg as reviewItemKey,ug as reviewItemRanges,Cg as revisionItemsOf,mg as runAddressRanges,qg as runPropertyEdits,rg as runsCovering,L as sanitizeHref,T as scrubExport,Td as segmentsOf,ka as serializeOoxmlPart,Uf as setCommentResolved,Id as settingsPartOf,ab as sniffImageMime,Ie as storyParagraphs,Fe as storyRootsOf,Nc as stylesPartOf,ag as sweepCustomNodePayloads,Y as textContent,Oe as threadStateOfPart,K as toSafeRecord,Jc as tocEntryText,Gc as tocLeftIndentTwips,Bc as twips,Dc as twipsToPoints,Tc as usedParaIds,Df as validateDrawingOp,x as validateExternalTarget,cb as validateGifHeader,db as validateJpegHeader,pa as validateOoxmlPart,zb as validatePackageInvariants,bb as validatePngHeader,fb as validateRasterHeader,Jf as validateTreeOp,Uc as w14RootPrefix,Nb as walkAllStoryParagraphs,Ob as walkParagraphInline,Mb as walkStoryBlocks,kb as withBinaryPart,vb as withContentTypeOverride,$e as withCustomXmlDataPart,df as withCustomXmlNode,lb as withEmbeddedImage,yb as withNewPart,qb as withPart,xb as withRelationship,af as withoutCustomXmlDataPart,ef as withoutCustomXmlNode,ff as withoutOrphanCustomXmlNodes,mb as withoutUnreferencedImagePart,Ef as wrapTargetToAnchorSpec,pb as writeOoxmlPackage,Ea as writeZip}from'./chunk-VUJGPCPU.js';
|
|
1
|
+
export{j as Budget,i as BudgetError,z as COMPARATORS,l as CancellationController,k as CancellationError,P as DEFAULT_VIEW_SETTINGS,o as DeterministicClock,v as DeterministicMemoryMeter,a as ID_KINDS,t as LIMIT_KEYS,s as LIMIT_SPECS,N as NO_TRACKING_SETTINGS,n as PortRegistry,m as PortResolutionError,g as RegistryError,p as SequentialIdentity,w as assertLimitInvariants,c as assertValidId,q as beginOperation,x as canonicalize,A as compareArtifacts,e as compareSemVer,F as deobfuscateFont,K as diffSemanticDigests,I as digestPart,r as endOperation,L as ensureListDefinition,M as ensureNumberingLevel,B as fingerprint,E as hashAuthored,b as isValidId,u as makeLimitCounter,d as parseSemVer,G as readEmbeddedFonts,O as readTrackingSettings,Q as readViewSettings,D as replayFixture,h as resolve,H as resolveTocRowHeadings,f as satisfies,J as semanticDigest,y as stableHash,C as validateFixture,T as withExportedCustomNodes}from'./chunk-DIMEYVNS.js';export{he as ACCEPTED_PARAGRAPH_PROPERTIES,ge as ACCEPTED_RUN_PROPERTIES,h as ALL_FROZEN_IDS,gg as AUTHORABLE_PARAGRAPH_PROPERTIES,hg as AUTHORABLE_RUN_PROPERTIES,p as BoundedCounter,c as CANONICAL_MUTATION_ORIGINS,oe as CONTENT_CONTROL_ID_MAX,Ge as CONTENT_CONTROL_PROPERTY_ORDER,nf as CUSTOM_NODE_XPATH_PREFIX,_e as CUSTOM_XML_PROPS_REL,$e as CUSTOM_XML_PROPS_TYPE,Ze as CUSTOM_XML_REL,G as DANGEROUS_KEYS,af as DATASTORE_NAMESPACE_URI,Ed as DEFAULT_ENDNOTE_PROPERTIES,Dd as DEFAULT_FOOTNOTE_PROPERTIES,m as DEFAULT_IMAGE_RESOURCE_LIMITS,j as DEFAULT_LIMITS,Qf as DEFAULT_MAX_EDITABLE_STORY_PARTS,Bb as DEFAULT_OMML_LIMITS,nb as DEFAULT_OOXML_PACKAGE_LIMITS,Ca as DEFAULT_ZIP_LIMITS,g as DEPENDENCY_KEY_IDS,H as DangerousKeyError,Zb as FIELD_ATOM_CHAR,i as HARD_CEILINGS,Ga as HYPERLINK_RELATIONSHIP_TYPE,C as IMAGE_RELATIONSHIP_TYPE,l as IMAGE_RESOURCE_HARD_CEILINGS,Na as IMAGE_WRAP_TARGETS,Q as INERT_EXECUTABLE_KINDS,o as LimitExceededError,ne as MAX_CONTENT_CONTROLS_PER_PART,me as MAX_CONTENT_CONTROL_NESTING,ag as MAX_CUSTOM_NODE_LABEL_LENGTH,$f as MAX_CUSTOM_NODE_PAYLOAD_LENGTH,zd as MAX_NOTES_PER_PART,Yd as MAX_NOTE_REFERENCE_PARTS,Xd as MAX_NOTE_REFERENCE_SCAN,Je as MAX_STORY_SDT_NESTING,_a as MAX_SVG_SNIFF_BYTES,d as NON_CANONICAL_ORIGINS,ad as NOTE_ATOM_CHAR,ed as NOTE_CONTINUATION_SEPARATOR_ID,cd as NOTE_ID_MAX,bd as NOTE_ID_MIN,dd as NOTE_SEPARATOR_ID,Ab as OFFICE_MATH_NAMESPACE_URI,Fa as OFFICE_RELATIONSHIP_NAMESPACE_URI,qa as OOXML_NODE_IDENTITY_RULES,b as ORIGIN_IDS,Ub as PAGE_BREAK_CHAR,aa as PrefixAllocator,e as RESULT_IDS,f as RUNTIME_PORT_IDS,Mg as SEARCH_MATCH_LIMIT,Lg as SEARCH_QUERY_MAX,yf as TABLE_BORDER_STYLES,Fc as TOC_LEVEL_INDENT_TWIPS,tc as TOC_MAX_BOOKMARKS_PER_REFRESH,sc as TOC_MAX_ENTRIES,uc as TOC_MAX_FIELD_NESTING,rc as TOC_MAX_INSTRUCTION_CHARS,vc as TOC_MAX_PAGE_PASSES,ie as TREE_DOC_OP_KINDS,Ac as TWIPS_PER_POINT,Pf as TreeDocumentStore,Rf as TreePackageStore,Qe as W15_NAMESPACE_URI,ca as WML_NAMESPACE_URI,ea as XMLNS_NAMESPACE_URI,da as XML_NAMESPACE_URI,Wf as addComment,Ie as allocateContentControlId,jb as allocateDrawingPropertyId,Ad as allocateNoteId,Ba as applyEdits,$c as applyHeaderFooterLifecycleOp,ke as applyNoteLifecycleOp,Nf as applyTreeOp,t as asciiFold,$ as assertValidQName,pc as atomicFieldSpansOf,yd as atomicNoteSpansOf,Xc as authorableHyperlinkTarget,Kd as authoredDocumentEndnoteProperties,Jd as authoredDocumentFootnoteProperties,Hd as authoredEndnotePropertiesFromSectPr,Gd as authoredFootnotePropertiesFromSectPr,kg as authoredProperties,Me as bodyStoryRoot,Lc as bookmarkPairNodes,rf as boundCustomXmlNodeIdOf,pf as boundCustomXmlNodeIds,qf as boundCustomXmlNodeIdsInPackage,zc as buildBookmarkIndex,A as buildContentTypeIndex,D as buildRelationshipSet,Ic as buildTocContentControl,Hc as buildTocEntryParagraph,na as canonicalOoxmlFingerprint,le as cascadeDeletedNoteReferences,Ye as cascadeEmptiedComments,X as childElements,Lb as collectFlowBlocks,sa as collectNodeIds,$d as collectNoteReferences,ae as collectPackageNoteReferences,Hg as collectReviewItems,sf as collectRevisionSites,Pb as collectSectionPropertyNodes,Oe as collectStoryParagraphs,Re as commentAnchorsOfStory,Dg as commentBodyText,Eg as commentInitials,Gg as commentItemsOf,Zf as commentPartNameOf,_f as commentsExtendedPartNameOf,Se as commentsOfPart,P as containsCssFetch,se as contentControlContentChildren,we as contentControlContentNodeOf,Jb as contentControlContentOf,ve as contentControlEndPropertiesNodeOf,ze as contentControlLevelOf,ue as contentControlPropertiesNodeOf,ye as contentControlPropertiesOf,Ce as contentControlTextOf,Ae as contentControlsIn,rb as contentTypesPartBytes,ib as createImageResourceCache,ta as createNodeIdAllocator,Zd as createNoteReferenceScanBudget,vd as customMarkFollows,of as customNodeBinding,eg as customNodePayloadsByControl,fg as customNodePayloadsOf,cf as customXmlDataParts,lf as customXmlLabelXPath,gf as customXmlNodes,mf as customXmlPrefixMappings,bf as datastoreItemIdFor,Kg as deepParagraphOrderOfPart,Ve as deleteCommentThread,Oc as deriveOoxmlIndexes,xc as detectBodyTocs,v as detectDuplicateNames,be as diagnoseNoteReferences,mg as directParagraphMarkProperties,lg as directParagraphProperties,Hf as drawingOpImpact,Yc as ensureHyperlinkRelationship,Eb as equationExpressionToLinearMath,O as escapeCssString,M as escapeXml,z as extensionKey,jc as fieldAtomText,ic as fieldOnOffAttribute,Be as findContentControl,df as findCustomXmlDataPart,yc as findDetectedToc,W as findElement,va as findNode,Cd as findNoteById,Qg as findOccurrences,yg as firstReviewRange,te as flattenContentControls,_b as fldCharType,hc as fldSimpleInstr,Rc as fnv1a32,Ng as foldCase,gd as formatNoteScopeId,qg as formatOwnedRunIds,Yb as hardBreakAttributes,Vb as hardBreakKind,Xb as hardBreakText,Ue as hasAnyComment,$a as hasBoundedSvgRoot,Yf as hasCommentPart,lc as hasLegacyFormFieldData,ua as hasNode,Ia as hyperlinkAnchorOf,Ja as hyperlinkRelationshipIdOf,Ka as hyperlinkTargetOf,hb as imageResourceLookupFor,Mc as indexStyles,Vd as inlineControlEndingAt,Wd as inlineControlStartingAt,ya as insertChildren,bg as insertCustomNodeWrite,gc as instrTextValue,ig as isAuthorableRunProperty,Hb as isContentControl,Ib as isContentControlContent,qe as isContentControlContentNode,pe as isContentControlNode,re as isContentControlWrapper,ha as isContentRevisionKind,od as isContinuationSeparatorNode,I as isDangerousKey,Kf as isDrawingTreeDocOp,jd as isEndnotesNode,S as isEvaluableField,kc as isFieldChrome,cc as isFldChar,$b as isFldCharNode,fc as isFldSimple,bc as isFldSimpleNode,id as isFootnotesNode,_c as isHeaderFooterLifecycleOp,Ha as isHyperlinkNode,R as isInertExecutable,dc as isInstrText,ac as isInstrTextNode,Nd as isLegalEndnotePosition,qc as isLegalFldCharType,Od as isLegalFootnotePosition,Pd as isLegalNumRestart,sd as isNormalNote,xd as isNoteAtomNode,je as isNoteLifecycleOp,kd as isNoteNode,md as isNoteRefNode,ld as isNoteReferenceNode,Wb as isPageBreakNode,ia as isRangeMarkerKind,Pg as isSearchableQuery,nd as isSeparatorNode,Le as isStoryPart,y as isValidMime,Z as isValidNCName,Pc as isValidParaId,_ as isValidQName,Og as isWholeWord,Fb as linearMathToOmml,Ig as linkRevisionReplies,gb as liveDrawingReferenceCount,vg as locateSites,Ee as lockForbidsEdit,Fe as lockForbidsRemoval,og as mergedFontProperty,rg as mergedMultiSettingProperty,sg as mergedParagraphMarkProperties,ng as mergedProperties,Sc as mintParaId,Vc as mintedParagraphIdentityAttributes,de as normalNoteIds,Wc as normalizeParagraphIdentity,r as normalizePartName,wd as noteAtomText,qd as noteIdOf,pd as noteKindOf,ud as noteRefKindOf,td as noteReferenceKindOf,rd as noteTypeOf,Bd as notesOf,ce as notesPartHasId,J as nullRecord,oa as ooxmlTreesEqual,He as orderedContentControlProperties,Qc as paraIdOf,Ud as paragraphOffsetIndex,Jg as paragraphOrderOfPart,Of as paragraphTextOf,wa as parentNodeOf,Fd as parseAuthoredNoteProperties,xe as parseContentControlId,Db as parseLinearMath,fd as parseNoteId,hd as parseNoteScopeId,wc as parseTocInstruction,u as partNameKey,Kc as planTocEntries,Cc as points,Ec as pointsToTwips,Ua as projectDrawing,Cb as projectOmmlEquation,jg as propertyContainer,hf as readCustomXmlNode,ja as readOnOffChild,ob as readOoxmlPackage,ra as readOoxmlPart,V as readXml,Da as readZip,Zc as relationshipTargetIn,sb as relationshipsOf,ub as relsPartNameFor,cg as removeCustomNodeWrite,Aa as removeNode,xa as replaceChildren,za as replaceNode,De as resolveContentControlLock,B as resolveContentType,tb as resolveContentTypeOf,Md as resolveEndnoteProperties,Ld as resolveFootnoteProperties,Tb as resolveHeaderFooterParts,Sb as resolveHeaderFooterPartsBySection,Rb as resolveHeaderFooterResolutionBySection,F as resolveImageRelationship,n as resolveImageResourceLimits,w as resolveInternalTarget,k as resolveLimits,_d as resolveNotesPart,E as resolveRelationship,wg as reviewItemKey,xg as reviewItemRanges,Fg as revisionItemsOf,pg as runAddressRanges,tg as runPropertyEdits,ug as runsCovering,L as sanitizeHref,T as scrubExport,Td as segmentsOf,ka as serializeOoxmlPart,Xf as setCommentResolved,Id as settingsPartOf,ab as sniffImageMime,Ne as storyParagraphs,Ke as storyRootsOf,Nc as stylesPartOf,dg as sweepCustomNodePayloads,Y as textContent,Te as threadStateOfPart,K as toSafeRecord,Jc as tocEntryText,Gc as tocLeftIndentTwips,Bc as twips,Dc as twipsToPoints,Tc as usedParaIds,If as validateDrawingOp,x as validateExternalTarget,cb as validateGifHeader,db as validateJpegHeader,pa as validateOoxmlPart,zb as validatePackageInvariants,bb as validatePngHeader,fb as validateRasterHeader,Lf as validateTreeOp,Uc as w14RootPrefix,Nb as walkAllStoryParagraphs,Ob as walkParagraphInline,Mb as walkStoryBlocks,kb as withBinaryPart,vb as withContentTypeOverride,ef as withCustomXmlDataPart,if as withCustomXmlNode,lb as withEmbeddedImage,yb as withNewPart,qb as withPart,xb as withRelationship,ff as withoutCustomXmlDataPart,jf as withoutCustomXmlNode,kf as withoutOrphanCustomXmlNodes,mb as withoutUnreferencedImagePart,Jf as wrapTargetToAnchorSpec,pb as writeOoxmlPackage,Ea as writeZip}from'./chunk-CKDAK3MV.js';
|
|
@@ -815,14 +815,20 @@ type TreeDocOp = {
|
|
|
815
815
|
readonly op: 'insertTab';
|
|
816
816
|
readonly paragraphId: string;
|
|
817
817
|
readonly offset: number;
|
|
818
|
+
/** Write this as a TRACKED insertion, on the same terms as `insertText`. */
|
|
819
|
+
readonly revision?: RevisionAttributionInput;
|
|
818
820
|
} | {
|
|
819
821
|
readonly op: 'insertHardBreak';
|
|
820
822
|
readonly paragraphId: string;
|
|
821
823
|
readonly offset: number;
|
|
824
|
+
/** Write this as a TRACKED insertion, on the same terms as `insertText`. */
|
|
825
|
+
readonly revision?: RevisionAttributionInput;
|
|
822
826
|
} | {
|
|
823
827
|
readonly op: 'insertPageBreak';
|
|
824
828
|
readonly paragraphId: string;
|
|
825
829
|
readonly offset: number;
|
|
830
|
+
/** Write this as a TRACKED insertion, on the same terms as `insertText`. */
|
|
831
|
+
readonly revision?: RevisionAttributionInput;
|
|
826
832
|
} | {
|
|
827
833
|
/**
|
|
828
834
|
* Insert an allowlisted page-number complex field at a UTF-16 offset.
|
|
@@ -834,6 +840,14 @@ type TreeDocOp = {
|
|
|
834
840
|
readonly paragraphId: string;
|
|
835
841
|
readonly offset: number;
|
|
836
842
|
readonly field: 'PAGE' | 'NUMPAGES' | 'SECTIONPAGES' | 'PAGE_X_OF_Y';
|
|
843
|
+
/**
|
|
844
|
+
* Write this as a TRACKED insertion, on the same terms as `insertText`.
|
|
845
|
+
*
|
|
846
|
+
* The whole field — every `w:fldChar`, the instruction, the `PAGE_X_OF_Y` literal —
|
|
847
|
+
* goes into ONE `w:ins`, because the field is one proposal: rejecting it must take
|
|
848
|
+
* the complete atom back, never leave a `begin` standing without its `end`.
|
|
849
|
+
*/
|
|
850
|
+
readonly revision?: RevisionAttributionInput;
|
|
837
851
|
} | {
|
|
838
852
|
/**
|
|
839
853
|
* Move a numbered paragraph to another `w:numPr/w:ilvl`.
|
|
@@ -1255,6 +1269,13 @@ type TreeDocOp = {
|
|
|
1255
1269
|
readonly noteKind: 'footnote' | 'endnote';
|
|
1256
1270
|
readonly paragraphId: string;
|
|
1257
1271
|
readonly offset: number;
|
|
1272
|
+
/**
|
|
1273
|
+
* Write the citing REFERENCE as a tracked insertion (`w:ins` around the reference
|
|
1274
|
+
* run), on the same terms as `insertText`. The note body itself is not revision
|
|
1275
|
+
* markup: rejecting the reference removes it, and the body cascade sweeps the
|
|
1276
|
+
* orphaned note exactly as an untracked reference deletion does.
|
|
1277
|
+
*/
|
|
1278
|
+
readonly revision?: RevisionAttributionInput;
|
|
1258
1279
|
} | {
|
|
1259
1280
|
/**
|
|
1260
1281
|
* Delete a note body and every matching reference (body, HF, other notes).
|
|
@@ -1565,4 +1586,4 @@ type TreeOpResult = {
|
|
|
1565
1586
|
readonly detail?: string;
|
|
1566
1587
|
};
|
|
1567
1588
|
|
|
1568
|
-
export {
|
|
1589
|
+
export { contentControlPropertiesNodeOf as $, ACCEPTED_PARAGRAPH_PROPERTIES as A, type ContentControlProperties as B, type ContentControlKind as C, type DrawingProjection as D, type HyperlinkKind as E, type HyperlinkTarget as F, MAX_CONTENT_CONTROL_NESTING as G, HYPERLINK_RELATIONSHIP_TYPE as H, type ImpactClass as I, OFFICE_RELATIONSHIP_NAMESPACE_URI as J, type RelationshipTargetResolver as K, TABLE_BORDER_STYLES as L, MAX_CONTENT_CONTROLS_PER_PART as M, TREE_DOC_OP_KINDS as N, type OoxmlProperty as O, type TabStopWrite as P, type TreeDocOpKind as Q, type RevisionAddress as R, type SourceCrop as S, type TreeDocOp as T, type TreeOpEffect as U, type VectorShapeProjection as V, allocateContentControlId as W, contentControlContentChildren as X, contentControlContentNodeOf as Y, contentControlEndPropertiesNodeOf as Z, contentControlLevelOf as _, type TreeOpRejection as a, contentControlPropertiesOf as a0, contentControlTextOf as a1, contentControlsIn as a2, findContentControl as a3, flattenContentControls as a4, hyperlinkAnchorOf as a5, hyperlinkRelationshipIdOf as a6, hyperlinkTargetOf as a7, isContentControlContentNode as a8, isContentControlNode as a9, isContentControlWrapper as aa, isHyperlinkNode as ab, lockForbidsEdit as ac, lockForbidsRemoval as ad, orderedContentControlProperties as ae, parseContentControlId as af, projectDrawing as ag, resolveContentControlLock as ah, type ImageWrapTarget as b, type DrawingKind as c, type DrawingPositionInput as d, type DrawingLocks as e, type DrawingHorizontalReferenceFrame as f, type DrawingVerticalReferenceFrame as g, type RevisionAttributionInput as h, type DrawingTreeDocOp as i, type TreeDocColorValue as j, IMAGE_WRAP_TARGETS as k, type DrawingAccessibility as l, type DrawingTransform as m, type TableBorderStyle as n, type ContentControlLevel as o, type ContentControlLock as p, type ContentControlDataBinding as q, type TreeOpResult as r, ACCEPTED_RUN_PROPERTIES as s, CONTENT_CONTROL_ID_MAX as t, CONTENT_CONTROL_PROPERTY_ORDER as u, type ContentControlCheckbox as v, type ContentControlCheckboxState as w, type ContentControlDateFormat as x, type ContentControlEntry as y, type ContentControlListItem as z };
|
|
@@ -815,14 +815,20 @@ type TreeDocOp = {
|
|
|
815
815
|
readonly op: 'insertTab';
|
|
816
816
|
readonly paragraphId: string;
|
|
817
817
|
readonly offset: number;
|
|
818
|
+
/** Write this as a TRACKED insertion, on the same terms as `insertText`. */
|
|
819
|
+
readonly revision?: RevisionAttributionInput;
|
|
818
820
|
} | {
|
|
819
821
|
readonly op: 'insertHardBreak';
|
|
820
822
|
readonly paragraphId: string;
|
|
821
823
|
readonly offset: number;
|
|
824
|
+
/** Write this as a TRACKED insertion, on the same terms as `insertText`. */
|
|
825
|
+
readonly revision?: RevisionAttributionInput;
|
|
822
826
|
} | {
|
|
823
827
|
readonly op: 'insertPageBreak';
|
|
824
828
|
readonly paragraphId: string;
|
|
825
829
|
readonly offset: number;
|
|
830
|
+
/** Write this as a TRACKED insertion, on the same terms as `insertText`. */
|
|
831
|
+
readonly revision?: RevisionAttributionInput;
|
|
826
832
|
} | {
|
|
827
833
|
/**
|
|
828
834
|
* Insert an allowlisted page-number complex field at a UTF-16 offset.
|
|
@@ -834,6 +840,14 @@ type TreeDocOp = {
|
|
|
834
840
|
readonly paragraphId: string;
|
|
835
841
|
readonly offset: number;
|
|
836
842
|
readonly field: 'PAGE' | 'NUMPAGES' | 'SECTIONPAGES' | 'PAGE_X_OF_Y';
|
|
843
|
+
/**
|
|
844
|
+
* Write this as a TRACKED insertion, on the same terms as `insertText`.
|
|
845
|
+
*
|
|
846
|
+
* The whole field — every `w:fldChar`, the instruction, the `PAGE_X_OF_Y` literal —
|
|
847
|
+
* goes into ONE `w:ins`, because the field is one proposal: rejecting it must take
|
|
848
|
+
* the complete atom back, never leave a `begin` standing without its `end`.
|
|
849
|
+
*/
|
|
850
|
+
readonly revision?: RevisionAttributionInput;
|
|
837
851
|
} | {
|
|
838
852
|
/**
|
|
839
853
|
* Move a numbered paragraph to another `w:numPr/w:ilvl`.
|
|
@@ -1255,6 +1269,13 @@ type TreeDocOp = {
|
|
|
1255
1269
|
readonly noteKind: 'footnote' | 'endnote';
|
|
1256
1270
|
readonly paragraphId: string;
|
|
1257
1271
|
readonly offset: number;
|
|
1272
|
+
/**
|
|
1273
|
+
* Write the citing REFERENCE as a tracked insertion (`w:ins` around the reference
|
|
1274
|
+
* run), on the same terms as `insertText`. The note body itself is not revision
|
|
1275
|
+
* markup: rejecting the reference removes it, and the body cascade sweeps the
|
|
1276
|
+
* orphaned note exactly as an untracked reference deletion does.
|
|
1277
|
+
*/
|
|
1278
|
+
readonly revision?: RevisionAttributionInput;
|
|
1258
1279
|
} | {
|
|
1259
1280
|
/**
|
|
1260
1281
|
* Delete a note body and every matching reference (body, HF, other notes).
|
|
@@ -1565,4 +1586,4 @@ type TreeOpResult = {
|
|
|
1565
1586
|
readonly detail?: string;
|
|
1566
1587
|
};
|
|
1567
1588
|
|
|
1568
|
-
export {
|
|
1589
|
+
export { contentControlPropertiesNodeOf as $, ACCEPTED_PARAGRAPH_PROPERTIES as A, type ContentControlProperties as B, type ContentControlKind as C, type DrawingProjection as D, type HyperlinkKind as E, type HyperlinkTarget as F, MAX_CONTENT_CONTROL_NESTING as G, HYPERLINK_RELATIONSHIP_TYPE as H, type ImpactClass as I, OFFICE_RELATIONSHIP_NAMESPACE_URI as J, type RelationshipTargetResolver as K, TABLE_BORDER_STYLES as L, MAX_CONTENT_CONTROLS_PER_PART as M, TREE_DOC_OP_KINDS as N, type OoxmlProperty as O, type TabStopWrite as P, type TreeDocOpKind as Q, type RevisionAddress as R, type SourceCrop as S, type TreeDocOp as T, type TreeOpEffect as U, type VectorShapeProjection as V, allocateContentControlId as W, contentControlContentChildren as X, contentControlContentNodeOf as Y, contentControlEndPropertiesNodeOf as Z, contentControlLevelOf as _, type TreeOpRejection as a, contentControlPropertiesOf as a0, contentControlTextOf as a1, contentControlsIn as a2, findContentControl as a3, flattenContentControls as a4, hyperlinkAnchorOf as a5, hyperlinkRelationshipIdOf as a6, hyperlinkTargetOf as a7, isContentControlContentNode as a8, isContentControlNode as a9, isContentControlWrapper as aa, isHyperlinkNode as ab, lockForbidsEdit as ac, lockForbidsRemoval as ad, orderedContentControlProperties as ae, parseContentControlId as af, projectDrawing as ag, resolveContentControlLock as ah, type ImageWrapTarget as b, type DrawingKind as c, type DrawingPositionInput as d, type DrawingLocks as e, type DrawingHorizontalReferenceFrame as f, type DrawingVerticalReferenceFrame as g, type RevisionAttributionInput as h, type DrawingTreeDocOp as i, type TreeDocColorValue as j, IMAGE_WRAP_TARGETS as k, type DrawingAccessibility as l, type DrawingTransform as m, type TableBorderStyle as n, type ContentControlLevel as o, type ContentControlLock as p, type ContentControlDataBinding as q, type TreeOpResult as r, ACCEPTED_RUN_PROPERTIES as s, CONTENT_CONTROL_ID_MAX as t, CONTENT_CONTROL_PROPERTY_ORDER as u, type ContentControlCheckbox as v, type ContentControlCheckboxState as w, type ContentControlDateFormat as x, type ContentControlEntry as y, type ContentControlListItem as z };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-
|
|
2
|
-
import { S as StoryScope, a as StoryTargetRejection, D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, b as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind, c as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput } from './custom-node-writes-
|
|
1
|
+
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-BiA-IXgo.cjs';
|
|
2
|
+
import { S as StoryScope, a as StoryTargetRejection, D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, b as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind, c as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput } from './custom-node-writes-Dy3b20PS.cjs';
|
|
3
3
|
import { Node } from 'prosemirror-model';
|
|
4
4
|
import { O as OoxmlPart, a as OoxmlNode, c as OoxmlPackage, b as OoxmlElement, o as OoxmlPackageRejection } from './ooxml-package-CdEy9ufK.cjs';
|
|
5
5
|
import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-Dvk6De4Q.cjs';
|
|
6
|
-
import {
|
|
7
|
-
import { T as
|
|
8
|
-
import { a as ReviewItem } from './review-items-
|
|
6
|
+
import { T as TreeDocOp } from './tree-op-types-D1vNJ7XC.cjs';
|
|
7
|
+
import { S as SelectionMark, T as TreeModelChange, D as DocumentProperties } from './tree-store-B_sJBMIS.cjs';
|
|
8
|
+
import { a as ReviewItem } from './review-items-B8tffIXj.cjs';
|
|
9
9
|
import { ReviewModuleContribution } from './contracts/modules.cjs';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-
|
|
2
|
-
import { S as StoryScope, a as StoryTargetRejection, D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, b as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind, c as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput } from './custom-node-writes-
|
|
1
|
+
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-BgA9EQxY.js';
|
|
2
|
+
import { S as StoryScope, a as StoryTargetRejection, D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, b as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind, c as InsertImageInput, d as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput } from './custom-node-writes-D6SGwebL.js';
|
|
3
3
|
import { Node } from 'prosemirror-model';
|
|
4
4
|
import { O as OoxmlPart, a as OoxmlNode, c as OoxmlPackage, b as OoxmlElement, o as OoxmlPackageRejection } from './ooxml-package-CdEy9ufK.js';
|
|
5
5
|
import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-z5Y4N1ab.js';
|
|
6
|
-
import {
|
|
7
|
-
import { T as
|
|
8
|
-
import { a as ReviewItem } from './review-items-
|
|
6
|
+
import { T as TreeDocOp } from './tree-op-types-CnRb7AYo.js';
|
|
7
|
+
import { S as SelectionMark, T as TreeModelChange, D as DocumentProperties } from './tree-store-DgETo6Mf.js';
|
|
8
|
+
import { a as ReviewItem } from './review-items-bdGxFWNA.js';
|
|
9
9
|
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as OoxmlPart, c as OoxmlPackage } from './ooxml-package-CdEy9ufK.cjs';
|
|
2
|
-
import { I as ImpactClass, T as TreeDocOp, a as TreeOpRejection } from './tree-op-types-
|
|
2
|
+
import { I as ImpactClass, T as TreeDocOp, a as TreeOpRejection } from './tree-op-types-D1vNJ7XC.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The document metadata Word's document-property fields render.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as OoxmlPart, c as OoxmlPackage } from './ooxml-package-CdEy9ufK.js';
|
|
2
|
-
import { I as ImpactClass, T as TreeDocOp, a as TreeOpRejection } from './tree-op-types-
|
|
2
|
+
import { I as ImpactClass, T as TreeDocOp, a as TreeOpRejection } from './tree-op-types-CnRb7AYo.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The document metadata Word's document-property fields render.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docx-editor.dev/core",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Framework-agnostic core for docx-editor.dev: OOXML parse/serialize, the canonical document tree, layout and paint, and the Editor contract the adapters render.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"directory": "packages/core"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@docx-editor.dev/i18n": "^2.9.
|
|
89
|
+
"@docx-editor.dev/i18n": "^2.9.2",
|
|
90
90
|
"bidi-js": "1.0.3",
|
|
91
91
|
"emf-converter": "2.0.2",
|
|
92
92
|
"fast-xml-parser": "^5.10.1",
|
package/dist/chunk-2RDMWJPF.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkTP4EHWEX_cjs=require('./chunk-TP4EHWEX.cjs');var M=8,fe={color:"painted",background:"painted",spanClassName:"painted",avatarUrl:"card-only"},ge=Object.keys(fe),lt=ge.filter(t=>fe[t]==="painted"),dt=new Set(["http","https","data","blob"]),ct=/^([a-zA-Z][a-zA-Z0-9+.-]*):/;function yt(t){let e=t.replace(/[\u0000-\u0020\u007f]/g,"");if(e.length===0)return;let n=ct.exec(e);if(n)return !dt.has(n[1].toLowerCase())||/^data:/i.test(e)&&!/^data:image\/(?!svg)/i.test(e)?void 0:e;let o=a=>e[a]==="/"||e[a]==="\\";return o(0)&&o(1)?void 0:e}function ut(t){if(typeof t=="string")return t.length>0?{color:t}:null;if(t===null||typeof t!="object")return null;let e={},n=Object.prototype.hasOwnProperty;for(let o of ge){if(!n.call(t,o))continue;let a=t[o];if(!(typeof a!="string"||a.length===0)){if(o==="avatarUrl"){let r=yt(a);r!==void 0&&(e.avatarUrl=r);continue}e[o]=a;}}return Object.keys(e).length>0?e:null}function _(t){return `var(--doc-review-author-${t%M})`}function xe(t){let e=new Map;if(t===void 0||t==="kind"||t==="author")return e;for(let[n,o]of Object.entries(t.authors)){let a=ut(o);a&&e.set(n,a);}return e}function En(t,e){let n=xe(e);return [...t].map(([o,a])=>{let r=n.get(o);return {author:o,slot:a,color:r?.color??_(a),...r?{style:r}:{}}})}var ht=128;function U(t,e,n=ht){let o=e.length<n?e.length:n,a=t;for(let r=0;r<o;r+=1)a=Math.imul(a^e.charCodeAt(r),16777619);return Math.imul(a^e.length,16777619)}function pt(t,e,n){let o=U(2166136261,n);for(let a of t.keys())o=U(o,a);for(let[a,r]of e){o=U(o,a);for(let i of lt)o=U(o,r[i]??"",1/0);}return `${t.size}.${e.size}.${(o>>>0).toString(36)}`}function be(t){return t===null?"kind":t.key}var V=new WeakMap;function me(t,e,n){if(t==="kind")return null;let o=V.get(e);if(o&&o.option===t&&o.authorSlots===n)return o.context;let a=xe(t),r=t===void 0||t==="author"?"author":t.others??"author";if(a.size===0&&r==="kind")return V.set(e,{option:t,authorSlots:n,context:null}),null;let i=n??gt(e),s=new Map;for(let[d,c]of a){if(!c.spanClassName)continue;let y=c.spanClassName.split(/\s+/).filter(u=>u.length>0);y.length>0&&s.set(d,y);}let l={authorSlots:i,styles:a,classTokens:s,others:r,key:pt(i,a,r)};return V.set(e,{option:t,authorSlots:n,context:l}),l}var he=new WeakMap;function ft(t){let e=he.get(t);if(e)return e;let n=[],o=new Set,a=r=>{r===""||o.has(r)||(o.add(r),n.push(r));};for(let r of chunkTP4EHWEX_cjs.Z(t)){for(let s of r.lines)for(let l of s.spans){let d=l.revisions;if(d!==void 0)for(let c=0;c<d.length;c+=1)a(d[c].author);for(let c of l.props){if(c.localName!=="rPrChange"&&c.localName!=="pPrChange")continue;let y=c.attributes?.author;a(y??"");break}}let i=r.markRevisions;if(i)for(let s=0;s<i.length;s+=1)a(i[s].author);}return he.set(t,n),n}var pe=new WeakMap;function gt(t){let e=pe.get(t);if(e)return e;let n=new Map,o=a=>{for(let r of ft(a))n.has(r)||n.set(r,n.size);};for(let a of t.pages){o(a.fragments),a.header&&o(a.header.fragments),a.footer&&o(a.footer.fragments);for(let r of [a.footnotes,a.endnotes])if(r){r.separator&&o(r.separator.fragments);for(let i of r.notes)o(i.fragments);}for(let r of [a.anchoredDrawings,a.header?.anchoredDrawings,a.footer?.anchoredDrawings])if(r)for(let i of r)i.textboxStory&&o(i.textboxStory.fragments);}return pe.set(t,n),n}function xt(t,e){let n=null;for(let o of e)o===""||t.has(o)||(n===null&&(n=new Map(t)),n.has(o)||n.set(o,n.size));return n??t}function Pn(){let t=new Map,e=0;return {resolve(n,o){let a=xt(n,o);for(let r of a.keys())t.has(r)||(t.set(r,e),e+=1);return new Map([...a.keys()].map(r=>[r,t.get(r)]).sort((r,i)=>r[1]-i[1]))}}}function ve(t,e,n){if(t===void 0||t.length===0)return null;let o=t[t.length-1],a=t.some(s=>s.kind==="delete"||s.kind==="moveFrom"),r=o.kind,i=r==="delete"||r==="moveFrom"?"line-through":r==="insert"||r==="moveTo"?"underline":null;return {attribution:o,line:a&&i==="underline"?"line-through":i,decorationStyle:r==="moveFrom"||r==="moveTo"?"double":r==="insert"?"dashed":"solid",color:a?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",authorColor:n?.get(o.author)?.color??_(e?.get(o.author)??0),deleted:a}}function Re(t,e,n,o,a,r){for(let i of [n.footnotes,n.endnotes])i&&e.append(bt(t,n,i,o,a,r));}function bt(t,e,n,o,a,r){let i=t.createElement("div");if(i.className="docx-notes",i.dataset.docxNotes=n.kind,i.dataset.docxNotesPlacement=n.placement,i.style.position="absolute",i.style.left=`${(n.box.x-e.box.x)*o.scale}px`,i.style.top=`${(n.box.y-e.box.y)*o.scale}px`,i.style.width=`${n.box.width*o.scale}px`,i.style.height=`${n.box.height*o.scale}px`,n.separator){let s=t.createElement("div");s.className="docx-note-separator",s.dataset.docxNoteSeparator=n.separator.kind,s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left=`${(n.separator.box.x-n.box.x)*o.scale}px`,s.style.top=`${(n.separator.box.y-n.box.y)*o.scale}px`,s.style.width=`${n.separator.box.width*o.scale}px`,s.style.height=`${Math.max(n.separator.box.height,.75)*o.scale}px`;let l=n.separator.ruleStyle;if(l||n.separator.synthetic||n.separator.fragments.length===0)mt(s,t,l??"single",o.scale);else for(let d of n.separator.fragments)s.append(d.kind==="table"?r(t,d,o):a(t,d,o));i.append(s);}for(let s of n.notes){let l=t.createElement("div");l.className="docx-note",l.dataset.docxNote=s.noteKind,l.dataset.docxNoteId=String(s.noteId),l.dataset.docxNoteScope=s.scopeId,s.mark!==null&&(l.dataset.docxNoteMark=s.mark),s.continuation&&(l.dataset.docxNoteContinuation=""),l.setAttribute("role","doc-footnote"),l.style.position="absolute",l.style.left=`${(s.box.x-n.box.x)*o.scale}px`,l.style.top=`${(s.box.y-n.box.y)*o.scale}px`,l.style.width=`${s.box.width*o.scale}px`,l.style.height=`${s.box.height*o.scale}px`;for(let d of s.fragments)l.append(d.kind==="table"?r(t,d,o):a(t,d,o));i.append(l);}return i}function mt(t,e,n,o){t.dataset.docxNoteRule=n;let a=Math.max(1,o*.75);if(n==="single"){t.style.borderTop=`${a}px solid currentColor`,t.style.opacity="0.85";return}t.style.opacity="0.85";let r=Math.max(1,o*1.25);for(let i of [0,a+r]){let s=e.createElement("div");s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top=`${i}px`,s.style.height="0",s.style.borderTop=`${a}px solid currentColor`,t.append(s);}}function K(t,e,n){return !!n.activeHeaderFooterRId&&!!t.rId&&n.activeHeaderFooterRId===t.rId&&(n.activeHeaderFooterPageIndex===void 0||n.activeHeaderFooterPageIndex===e)}function X(t,e,n){return n?t.kind==="footer"?Math.max(t.box.height,e.box.y+e.box.height-t.box.y):Math.max(t.box.height,e.contentBox.y-t.box.y):t.box.height}function Se(t,e){for(let{record:n,element:o,materialized:a}of t){if(!a)continue;let r=o.querySelector(":scope > .docx-page-content");r&&(e.activeHeaderFooterRId?r.setAttribute("contenteditable","false"):r.removeAttribute("contenteditable"));for(let i of o.querySelectorAll(":scope > .docx-hf:not(.docx-hf--placeholder)")){let s=vt(n,i);if(!s)continue;let l=K(s,n.index,e);Rt(i,n,s,l,e.scale);}for(let i of o.querySelectorAll(":scope > [data-docx-hf-front]")){let s=we(n,i.dataset.docxHfFront);ke(i,!!s&&K(s,n.index,e));}}}function vt(t,e){return we(t,e.dataset.docxHf)}function we(t,e){if(e==="header")return t.header;if(e==="footer")return t.footer}function Rt(t,e,n,o,a){o?(t.dataset.docxHfActive="",t.setAttribute("contenteditable","true")):(delete t.dataset.docxHfActive,t.setAttribute("contenteditable","false")),t.style.height=`${X(n,e,o)*a}px`,ke(t,o);}function ke(t,e){let n=t.querySelectorAll(t instanceof Element&&t.classList.contains("docx-drawing-layer")?":scope > *":":scope > .docx-drawing-layer > *");for(let o of n){o.style.pointerEvents=e?"auto":"none";for(let a of o.querySelectorAll(".docx-drawing"))a.style.pointerEvents=e?"auto":"none";}}var Ae=Object.freeze({"image/svg+xml":"SVG","image/tiff":"TIFF","image/x-emf":"EMF","image/x-wmf":"WMF",unknown:"Unknown"}),j=new WeakMap,Y=new WeakMap,St=256;function Le(t,e){let n=j.get(t);if(n)return n;let o=new Map,a=new Map;return n=Object.freeze({urlForReady(r,i){let s=o.get(r.resourceKey);if(s)return s;let l=e.create(r,i);return o.set(r.resourceKey,l),l},imageFor(r,i,s){let l=a.get(r);if(l&&l.resourceKey===i)return l.element;let d=s.createElement("img");return a.size<St&&a.set(r,{element:d,resourceKey:i,...l?.readyElement?{readyElement:l.readyElement}:{}}),d},imageForPending(r){return a.get(r)?.element??null},readyElementFor(r){return a.get(r)?.readyElement??null},rememberReadyElement(r,i){let s=a.get(r);s&&a.set(r,{...s,readyElement:i});},reconcile(r,i){for(let[s,l]of o)r.has(s)||(e.revoke(l),o.delete(s));for(let[s,l]of a)i.has(s)||(l.element.removeAttribute("src"),a.delete(s));},revokeAll(){for(let r of o.values())e.revoke(r);o.clear();for(let r of a.values())r.element.removeAttribute("src");a.clear();}}),j.set(t,n),n}function Z(t,e){return `${e.paintInstance??""}|${t.drawingNodeId}`}function Dn(t){j.get(t)?.revokeAll(),j.delete(t);}function E(t){return Number.isFinite(t)?String(t):"0"}function $e(t,e){if(t.length<3||e.width<=0||e.height<=0)return null;let n=[];for(let o of t){if(!Number.isFinite(o.x)||!Number.isFinite(o.y))return null;let a=(o.x-e.x)/e.width*100,r=(o.y-e.y)/e.height*100;n.push(`${E(a)}% ${E(r)}%`);}return `polygon(${n.join(", ")})`}function Te(t){let e=t.geometry.contentBounds;return chunkTP4EHWEX_cjs.zb({transform:t.transform,contentWidth:e.width,contentHeight:e.height})}function Me(t){let{effects:e}=t,n=[];if(e.grayscale&&n.push("grayscale(1)"),e.brightness!==0&&Number.isFinite(e.brightness)){let o=1+e.brightness/100;Number.isFinite(o)&&n.push(`brightness(${E(Math.max(0,o))})`);}if(e.contrast!==0&&Number.isFinite(e.contrast)){let o=1+e.contrast/100;Number.isFinite(o)&&n.push(`contrast(${E(Math.max(0,o))})`);}return n.length>0?n.join(" "):void 0}function He(t,e){let{crop:n}=t,o=Math.max(0,Math.min(1,n.left)),a=Math.max(0,Math.min(1,n.top)),r=Math.max(0,Math.min(1,n.right)),i=Math.max(0,Math.min(1,n.bottom)),s=Math.max(1e-4,1-o-r),l=Math.max(1e-4,1-a-i);return Object.freeze({width:`${E(1/s*100)}%`,height:`${E(1/l*100)}%`,left:`${E(-o/s*100)}%`,top:`${E(-a/l*100)}%`})}function wt(t,e){let{resource:n}=t;switch(n.kind){case "external":return e.externalResource;case "missing":return e.missingResource;case "pending":return e.pendingResource;case "unrenderable":switch(n.reason){case "unsupported-format":return e.unsupportedFormat(Ae[n.mime]??Ae.unknown);case "non-picture-graphic":return e.nonPictureGraphic(t.placeholderGraphicKind??"graphic");case "signature-mismatch":return e.contentMismatch;case "decode-failed":return e.decodeFailed;case "resource-limit":return e.resourceLimit;default:return e.invalidResource}default:return e.invalidResource}}function H(t,e,n){let{accessibility:o}=e;o.hidden||(t.setAttribute("role",n?"link":"img"),o.label?t.setAttribute("aria-label",o.label):n||t.setAttribute("aria-hidden","true"));}function N(t,e,n,o){let a=o?.x??0,r=o?.y??0;t.style.position="absolute",t.style.left=`${(e.x-a)*n}px`,t.style.top=`${(e.y-r)*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`,t.style.boxSizing="border-box",t.style.overflow="hidden",t.style.pointerEvents="auto";}function kt(t,e,n,o,a){let r=t.paintBounds,i=t.geometry.contentBounds,s=He(t);return [o,n.scale,a?.x??0,a?.y??0,r.x,r.y,r.width,r.height,i.x,i.y,i.width,i.height,$e(t.geometry.clipPolygon??[],r)??"",Me(t)??"",Te(t)??"",s.width,s.height,s.left,s.top,n.inertLinks?"":t.hyperlinkHref??"",t.accessibility.label??""].join("|")}function B(t,e,n,o){let a=t.createElement("div");a.className="docx-drawing docx-drawing-placeholder",a.dataset.drawingNodeId=e.drawingNodeId,N(a,e.paintBounds,n.scale,o);let r=t.createElement("div");r.className="docx-drawing-placeholder-card";let i=t.createElement("span");return i.className="docx-drawing-placeholder-label",i.textContent=wt(e,n.strings),r.append(i),a.append(r),e.hyperlinkHref&&!n.inertLinks?(a.dataset.docxDrawingLink=e.drawingNodeId,a.dataset.docxDrawingLinkKind="external",a.dataset.docxDrawingLinkHref=e.hyperlinkHref,a.setAttribute("tabindex","-1"),H(a,e,true)):H(a,e,false),a}function At(t,e,n,o,a,r){let i=e.resource;if(i.kind!=="ready")return B(t,e,n,r);let s=Z(e,n),l=a?.readyElementFor?.(s)??t.createElement("div"),d=kt(e,i,n,o,r);if(Y.get(l)===d)return l;l.className="docx-drawing docx-drawing-ready",l.style.cssText="",l.dataset.drawingNodeId=e.drawingNodeId,delete l.dataset.docxDrawingLink,delete l.dataset.docxDrawingLinkKind,delete l.dataset.docxDrawingLinkHref,l.removeAttribute("aria-hidden"),l.removeAttribute("aria-label"),l.removeAttribute("role"),l.removeAttribute("tabindex"),N(l,e.paintBounds,n.scale,r);let c=$e(e.geometry.clipPolygon??[],e.paintBounds);c&&(l.style.clipPath=c);let y=t.createElement("div");y.className="docx-drawing-image-frame",y.style.position="absolute";let u=e.geometry.contentBounds,p=e.paintBounds;y.style.left=`${(u.x-p.x)*n.scale}px`,y.style.top=`${(u.y-p.y)*n.scale}px`,y.style.width=`${u.width*n.scale}px`,y.style.height=`${u.height*n.scale}px`;let h=Me(e);h&&(y.style.filter=h);let g=t.createElement("div");g.className="docx-drawing-transform-stage",g.style.position="relative",g.style.width="100%",g.style.height="100%";let w=Te(e);w&&(g.style.transform=w,g.style.transformOrigin="0 0");let S=t.createElement("div");S.className="docx-drawing-crop-viewport",S.style.position="relative",S.style.width="100%",S.style.height="100%",S.style.overflow="hidden";let R=a?.imageFor?.(s,i.resourceKey,t)??t.createElement("img");R.className="docx-drawing-image",R.setAttribute("draggable","false"),R.getAttribute("src")!==o&&R.setAttribute("src",o),R.setAttribute("alt","");let P=He(e);return R.style.position="absolute",R.style.width=P.width,R.style.height=P.height,R.style.left=P.left,R.style.top=P.top,R.style.maxWidth="none",R.style.maxHeight="none",S.append(R),g.append(S),y.append(g),l.replaceChildren(y),e.hyperlinkHref&&!n.inertLinks?(l.dataset.docxDrawingLink=e.drawingNodeId,l.dataset.docxDrawingLinkKind="external",l.dataset.docxDrawingLinkHref=e.hyperlinkHref,l.setAttribute("tabindex","-1"),H(l,e,true)):H(l,e,false),a?.rememberReadyElement?.(s,l),Y.set(l,d),l}var Ee="http://www.w3.org/2000/svg";function Et(t,e,n,o){let a=e.vectorShape,r=t.createElement("div");r.className="docx-drawing docx-drawing-shape",r.dataset.drawingNodeId=e.drawingNodeId,N(r,e.paintBounds,n.scale,o);let i=e.geometry.contentBounds,s=e.paintBounds,l=t.createElement("div");l.className="docx-drawing-image-frame",l.style.position="absolute",l.style.left=`${(i.x-s.x)*n.scale}px`,l.style.top=`${(i.y-s.y)*n.scale}px`,l.style.width=`${i.width*n.scale}px`,l.style.height=`${i.height*n.scale}px`;let d=t.createElementNS(Ee,"svg");d.setAttribute("viewBox",`0 0 ${E(Math.max(1,a.extentEmu.cx))} ${E(Math.max(1,a.extentEmu.cy))}`),d.setAttribute("preserveAspectRatio","none"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.style.display="block";let c=t.createElementNS(Ee,"path"),y=a.subpathsEmu.map(u=>`M${u.map(p=>`${E(p.x)} ${E(p.y)}`).join("L")}Z`).join("");return c.setAttribute("d",y),c.setAttribute("fill",a.fillHex!==null?`#${a.fillHex}`:"none"),c.setAttribute("fill-rule","evenodd"),a.strokeHex!==null&&(c.setAttribute("stroke",`#${a.strokeHex}`),c.setAttribute("stroke-width",E(Math.max(1,a.strokeWidthEmu)))),d.append(c),l.append(d),r.append(l),e.hyperlinkHref&&!n.inertLinks?(r.dataset.docxDrawingLink=e.drawingNodeId,r.dataset.docxDrawingLinkKind="external",r.dataset.docxDrawingLinkHref=e.hyperlinkHref,r.setAttribute("tabindex","-1"),H(r,e,true)):H(r,e,false),r}function Pt(t,e,n,o,a){let r=o.scale,i=t.createElement("div");i.className="docx-drawing docx-drawing-textbox",i.dataset.drawingNodeId=e.drawingNodeId,i.setAttribute("contenteditable","false"),N(i,e.paintBounds,o.scale,a),i.style.overflow="hidden";let s=(e.x-e.paintBounds.x)*r,l=(e.y-e.paintBounds.y)*r;if(n.fillHex!==null||n.strokeHex!==null){let c=t.createElement("div");c.className="docx-drawing-textbox-box",c.style.position="absolute",c.style.left=`${s}px`,c.style.top=`${l}px`,c.style.width=`${e.width*r}px`,c.style.height=`${e.height*r}px`,c.style.boxSizing="border-box",n.fillHex!==null&&(c.style.backgroundColor=`#${n.fillHex}`),n.strokeHex!==null&&(c.style.border=`${Math.max(n.strokeWidthPt*r,.5)}px solid #${n.strokeHex}`),i.append(c);}let d=t.createElement("div");d.className="docx-drawing-textbox-content",d.style.position="absolute",d.style.left=`${s+n.contentOffset.x*r}px`,d.style.top=`${l+n.contentOffset.y*r}px`,d.style.width=`${n.contentWidth*r}px`,d.style.height=`${Math.max(0,n.contentHeight)*r}px`,d.style.overflow="hidden";for(let c of n.fragments)d.append(o.paintStoryFragment(t,c));for(let c of d.querySelectorAll("[data-paragraph-id]"))delete c.dataset.paragraphId;return i.append(d),H(i,e,false),i}function De(t,e,n,o,a){if(e.accessibility.hidden||e.paintBounds.width<=0||e.paintBounds.height<=0)return null;if(e.kind==="anchoredDrawing"&&e.textboxStory!==void 0&&n.paintStoryFragment!==void 0)return Pt(t,e,e.textboxStory,n,a);if(e.vectorShape&&e.vectorShape.subpathsEmu.length>0)return Et(t,e,n,a);let{resource:r}=e;if(r.kind==="ready"){if(!n.imageUrlPort||!o)return B(t,e,n,a);let i=o.urlForReady(r.validatedHandle,r.mime);return i?At(t,e,n,i,o,a):B(t,e,n,a)}if(r.kind==="pending"){let i=o?.readyElementFor?.(Z(e,n))??o?.imageForPending?.(Z(e,n))?.closest(".docx-drawing-ready");return i?(Y.delete(i),i.dataset.drawingNodeId=e.drawingNodeId,N(i,e.paintBounds,n.scale,a),i):B(t,e,n,a)}return B(t,e,n,a)}function Ie(t,e,n,o,a){let r=[];for(let i of e.drawings??[]){let s=De(t,i,n,o,a);s&&r.push(s);}return Object.freeze(r)}function Ce(t,e,n,o,a,r){let i=[];for(let s of e){if(chunkTP4EHWEX_cjs.Ab(s)!==n)continue;let l=De(t,s,o,a,r);l&&(l.dataset.drawingLayer=n,i.push(l));}return Object.freeze(i)}var Lt=16;function $t(t,e){let n=a=>{if(a.kind==="table"){for(let r of a.rows)for(let i of r.cells)for(let s of i.blocks)n(s);return}for(let r of a.lines)for(let i of r.drawings??[])e(i);},o=(a,r=0)=>{if(!(r>Lt)){for(let i of a.anchoredDrawings??[])e(i),i.textboxStory&&o(i.textboxStory,r+1);for(let i of a.fragments)n(i);}};o({fragments:t.fragments,...t.anchoredDrawings?{anchoredDrawings:t.anchoredDrawings}:{}});for(let a of [t.header,t.footer])a&&o(a);for(let a of [t.footnotes,t.endnotes])if(a){a.separator&&o(a.separator);for(let r of a.notes)o(r);}}var Pe=new WeakMap;function Fe(t){let e=Pe.get(t);if(e)return e;let n=[],o=[];$t(t,r=>{r.resource.kind==="ready"&&n.push(r.resource.resourceKey),o.push(`p${t.index}|${r.drawingNodeId}`);});let a=Object.freeze({resourceKeys:Object.freeze(n),elementKeys:Object.freeze(o)});return Pe.set(t,a),a}function Be(t){let e=new Set;for(let n of t.pages)for(let o of Fe(n).resourceKeys)e.add(o);return e}function Ne(t){let e=new Set;for(let n of t.pages)for(let o of Fe(n).elementKeys)e.add(o);return e}function Oe(t){return [t.missingResource,t.externalResource,t.invalidResource,t.contentMismatch,t.decodeFailed,t.resourceLimit,t.pendingResource,t.unsupportedFormat("probe"),t.nonPictureGraphic("probe")].join("\0")}var J=Object.freeze({unsupportedFormat:t=>`Unsupported image format (${t})`,nonPictureGraphic:t=>`Unsupported graphic (${t})`,missingResource:"Image missing",externalResource:"External image not loaded",invalidResource:"Invalid image",contentMismatch:"Image content does not match its type",decodeFailed:"Image could not be decoded",resourceLimit:"Image exceeds size limits",pendingResource:"Loading image"});function In(t){return Object.freeze({unsupportedFormat:e=>t("image.unsupportedFormat",{format:e}),nonPictureGraphic:e=>t("image.nonPictureGraphic",{kind:e}),missingResource:t("image.missingResource"),externalResource:t("image.externalResource"),invalidResource:t("image.invalidResource"),contentMismatch:t("image.contentMismatch"),decodeFailed:t("image.decodeFailed"),resourceLimit:t("image.resourceLimit"),pendingResource:t("image.pendingResource")})}function Tt(t,e,n){t.style.position="absolute",t.style.left=`${e.x*n}px`,t.style.top=`${e.y*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`;}function ze(t,e,n,o){let a=t.createElement("span");return a.className=e,a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.display="block",a.style.left=`${n.x*o}px`,a.style.top=`${n.y*o}px`,a.style.width=`${n.width*o}px`,a.style.height=`${n.height*o}px`,a.style.backgroundColor="currentColor",a.style.pointerEvents="none",a}function A(t,e,n,o,a=0,r=0,i=[]){let s=a+n.box.x,l=r+n.box.y,d=[...i,n.kind];switch(n.kind){case "text":case "fallback":{let c=t.createElement("span");c.className=["docx-equation-node",...d.map(y=>`docx-equation-${y}`)].join(" "),Tt(c,{x:s,y:l,width:n.box.width,height:n.box.height},o),c.textContent=n.text,c.style.display="block",c.style.fontSize=`${n.fontSizePt*o}px`,c.style.lineHeight=`${n.box.height*o}px`,c.style.whiteSpace="pre",e.append(c);break}case "row":for(let c of n.items)A(t,e,c,o,s,l,d);break;case "fraction":A(t,e,n.numerator,o,s,l,d),e.append(ze(t,"docx-equation-fraction-bar",{...n.bar,x:s+n.bar.x,y:l+n.bar.y},o)),A(t,e,n.denominator,o,s,l,d);break;case "radical":A(t,e,n.sign,o,s,l,d),n.degree&&A(t,e,n.degree,o,s,l,d),e.append(ze(t,"docx-equation-radical-bar",{...n.bar,x:s+n.bar.x,y:l+n.bar.y},o)),A(t,e,n.radicand,o,s,l,d);break;case "script":A(t,e,n.base,o,s,l,d),n.subscript&&A(t,e,n.subscript,o,s,l,d),n.superscript&&A(t,e,n.superscript,o,s,l,d);break;case "nary":A(t,e,n.operator,o,s,l,d),n.lowerLimit&&A(t,e,n.lowerLimit,o,s,l,d),n.upperLimit&&A(t,e,n.upperLimit,o,s,l,d),A(t,e,n.body,o,s,l,d);break}}function Ue(t,e,n,o){let a=n.geometry;e.className="layout-run docx-equation",e.dataset.docxEquation=n.sourceNodeId,e.setAttribute("contenteditable","false"),e.setAttribute("role","math"),n.fallbackText&&e.setAttribute("aria-label",n.fallbackText),e.style.position="relative",e.style.display="inline-block",e.style.width=`${a.box.width*o}px`,e.style.height=`${a.box.height*o}px`,e.style.lineHeight="0",e.style.pointerEvents="auto",e.style.userSelect="none",e.style.verticalAlign=`${-(a.box.height-a.baseline)*o}px`;let r=t.createDocumentFragment();A(t,r,a,o),e.append(r);}var Mt=/^[0-9A-Fa-f]{6}$/;function Ht(t){switch(t){case "dashed":return "dashed";case "dotted":return "dotted";case "double":case "triple":return "solid";default:return "solid"}}function _e(t){return t&&Mt.test(t)?t:"000000"}function Q(t,e){let n=t.createElement("div");return n.className=e,n.setAttribute("aria-hidden","true"),n.setAttribute("contenteditable","false"),n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.right="0",n.style.bottom="0",n.style.overflow="visible",n.style.pointerEvents="none",n.style.boxSizing="border-box",n}function G(t,e,n,o){if(!n)return;let a=`#${_e(n.color)}`,r=`${Math.max(0,n.widthPt*o)}px`;if(t.style[`border${e}Width`]=r,t.style[`border${e}Color`]=a,n.style==="double"||n.style==="triple"){t.style[`border${e}Style`]="none";return}t.style[`border${e}Style`]=Ht(n.style);}function ee(t,e,n,o,a){let r=t.createElement("div");r.className=a,r.dataset.edge=n.side,r.dataset.stroke=n.role,r.style.position="absolute",r.style.left=`${n.x*o}px`,r.style.top=`${n.y*o}px`,r.style.width=`${n.width*o}px`,r.style.height=`${n.height*o}px`,r.style.pointerEvents="none",r.style.backgroundColor=`#${_e(n.color)}`,n.cssStyle!=="solid"&&(r.dataset.cssStyle=n.cssStyle),e.append(r);}function Dt(t){let e=new Set;for(let n of t)e.add(`${n.side}\0${n.role}`);return e}function It(t,e,n,o){let a=Dt(n),r=u=>a.has(`${u}\0middle`),i=Q(t,"docx-table-border-double"),s=Q(t,"docx-table-border-triple"),l=Q(t,"docx-table-border-edge"),d=false,c=false,y=false;for(let u of n){if(u.role==="edge"){y=true,ee(t,l,u,o,"docx-table-border-edge-stroke");continue}if(r(u.side)){c=true,ee(t,s,u,o,"docx-table-border-triple-stroke");continue}(u.role==="outer"||u.role==="inner")&&(d=true,ee(t,i,u,o,"docx-table-border-double-stroke"));}d&&e.append(i),c&&e.append(s),y&&e.append(l);}function Ke(t,e,n,o){G(e,"Top",n?.top,o),G(e,"Right",n?.right,o),G(e,"Bottom",n?.bottom,o),G(e,"Left",n?.left,o),n?.strokes&&n.strokes.length>0&&It(t,e,n.strokes,o);}var te="when-selected",je=new WeakMap,Ge=0;function Ct(t){let e=je.get(t);return e||(Ge+=1,e=`alias${Ge}`,je.set(t,e)),e}function et(t){return {...t,drawingStrings:t.drawingStrings??J,urlRegistry:t.urlRegistry??null}}function Ft(t){let e={...t,inertLinks:true};return Object.freeze({scale:t.scale,strings:t.drawingStrings,...t.imageUrlPort?{imageUrlPort:t.imageUrlPort}:{},...t.inertLinks?{inertLinks:true}:{},...t.paintInstance?{paintInstance:t.paintInstance}:{},paintStoryFragment:(n,o)=>o.kind==="table"?C(n,o,e):I(n,o,e)})}function tt(t){return Object.freeze({ctx:Ft(t),urlRegistry:t.urlRegistry})}function We(t,e,n,o,a,r){q(t,e,chunkTP4EHWEX_cjs.$(n),o,a,r);}function q(t,e,n,o,a,r,i=true,s){if(n.length===0)return;let l=tt(o),d=t.createElement("div");d.className=r==="behind"?"docx-drawing-layer docx-drawing-layer-behind":"docx-drawing-layer docx-drawing-layer-front",d.style.position="absolute",d.style.inset="0",d.style.pointerEvents="none",s&&(d.dataset.docxHfFront=s);for(let c of Ce(t,n,r,l.ctx,l.urlRegistry,a)){if(c.style.pointerEvents=i?"auto":"none",!i)for(let y of c.querySelectorAll(".docx-drawing"))y.style.pointerEvents="none";d.append(c);}d.childElementCount>0&&e.append(d);}function nt(t){return t.horizontalFrame==="page"||t.verticalFrame==="page"}function ot(t,e,n){let o=e.paintBounds,a=e.horizontalFrame==="page"?n.x+(o.x-e.horizontalFrameOrigin):t.box.x+o.x,r=e.verticalFrame==="page"?n.y+(o.y-e.verticalFrameOrigin):t.box.y+o.y,i=a-o.x,s=r-o.y,l=d=>Object.freeze({x:d.x+i,y:d.y+s,width:d.width,height:d.height});return Object.freeze({...e,x:e.x+i,y:e.y+s,paintBounds:l(o),hitBounds:l(e.hitBounds),geometry:Object.freeze({...e.geometry,contentBounds:l(e.geometry.contentBounds),paintBounds:l(e.geometry.paintBounds),...e.geometry.clipPolygon?{clipPolygon:Object.freeze(e.geometry.clipPolygon.map(d=>Object.freeze({x:d.x+i,y:d.y+s})))}:{}})})}function Bt(t,e,n,o,a,r){let i=o.map(l=>ot(n,l,r)),s=t.createElement("div");s.className="docx-hf-behind-layer",s.dataset.docxHfBehind=n.kind,s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",q(t,s,i,a,r,"behind",false),s.childElementCount>0&&e.append(s);}function Nt(t,e,n,o,a,r,i,s=false){let l=o.filter(nt).map(d=>ot(n,d,r));q(t,e,l,a,r,i,s,n.kind);}var F=/^[0-9A-Fa-f]{6}$/,qe=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,Ot=new Map(Object.entries({single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"})),zt=new Map(Object.entries({black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"}));function Ut(t){return t.doubleStrike?"double":t.strike?"single":"none"}function _t(t){return t==="thick"||t.endsWith("Heavy")}function rt(t){if(!t.underline)return null;let e=t.underline.color&&F.test(t.underline.color)?t.underline.color:null;return {cssStyle:Ot.get(t.underline.variant)??"solid",color:e,heavy:_t(t.underline.variant)}}function at(t,e,n,o){t.textDecorationLine=e,t.textDecorationStyle=n,o.color&&(t.textDecorationColor=`#${o.color}`),o.heavy&&(t.textDecorationThickness=`max(${2*o.scale}px, 0.12em)`);}function Ve(t,e,n){e!=="none"&&at(t,"line-through",e==="double"?"double":"solid",{scale:n});}function Xe(t,e,n){at(t,"underline",e.cssStyle,{color:e.color,heavy:e.heavy,scale:n});}function Kt(t,e,n){let o=e.color?`#${e.color}`:"currentColor";t.borderBottomWidth=`${(e.heavy?2:1)*n}px`,t.borderBottomStyle=e.cssStyle==="wavy"?"solid":e.cssStyle,t.borderBottomColor=o;}function W(t,e,n){let o=t.style,a=n.scale,r=e.verticalAlign==="baseline"?1:.75;o.fontSize=`${e.fontSizePt*r*a}px`,e.bold&&(o.fontWeight="bold"),e.italic&&(o.fontStyle="italic");let i=e.fontFamily&&qe.test(e.fontFamily)?e.fontFamily:n.defaultFontFamily&&qe.test(n.defaultFontFamily)?n.defaultFontFamily:null;if(i){let d=n.fontAlias?.(i);o.fontFamily=d?`"${d}", "${i}", ${chunkTP4EHWEX_cjs.Gd}`:`"${i}", ${chunkTP4EHWEX_cjs.Gd}`;}e.color&&F.test(e.color)&&(o.color=`#${e.color}`);let s=e.highlight?zt.get(e.highlight):void 0;s?(o.backgroundColor=s,t.dataset.highlight=e.highlight??""):e.shading&&F.test(e.shading)&&(o.backgroundColor=`#${e.shading}`),e.caps&&(o.textTransform="uppercase"),e.smallCaps&&(o.fontVariant="small-caps");let l=chunkTP4EHWEX_cjs.kb(e);l!==0&&(o.position="relative",o.top=`${-l*a}px`),e.characterSpacingPt!==0&&(o.letterSpacing=`${e.characterSpacingPt*a}px`),e.horizontalScalePercent!==100&&(o.transformOrigin="left",o.transform=`scaleX(${e.horizontalScalePercent/100})`);}function it(t,e,n,o,a){let r=n===" "?null:rt(o),i=Ut(o),s=e;if(r&&i!=="none"){let l=t.createElement("span");l.dataset.docxDeco="underline",Xe(l.style,r,a);let d=t.createElement("span");d.dataset.docxDeco="strike",Ve(d.style,i,a),l.append(d),e.append(l),s=d;}else r?Xe(e.style,r,a):i!=="none"&&Ve(e.style,i,a);s.textContent=n;}function $(t,e,n,o){let a=t.createElement(e);return a.style.position="absolute",a.style.left=`${n.x*o}px`,a.style.top=`${n.y*o}px`,a.style.width=`${n.width*o}px`,a.style.height=`${n.height*o}px`,a}function jt(t,e,n){let o=e.fieldAtom;!o||(t.dataset.fieldAtom=o.formField?"form":"field",!(o.formField?n.shadeFormFields!==false:(n.fieldShading??te)!=="never"))||(t.classList.add("docx-field-atom"),(o.formField||(n.fieldShading??te)==="always")&&t.classList.add("docx-field-atom--shaded"));}function Ye(t,e,n){let o=chunkTP4EHWEX_cjs.sb(e.props),a=n.revisionStyles,r=ve(e.revisions,a?.authorSlots,a?.styles);if(!(!r&&!o)){if(r){let{attribution:i}=r;t.classList.add("docx-revision",`docx-revision-${i.kind}`),t.dataset.revisionKind=i.kind,t.dataset.revisionId=i.id,i.author!==""&&(t.dataset.reviewAuthor=i.author),i.date!==void 0&&(t.dataset.revisionDate=i.date);let s=a?.styles.get(i.author);if(a){t.dataset.reviewAuthorSlot=String((a.authorSlots.get(i.author)??0)%M);let c=a.classTokens.get(i.author);if(c)for(let y=0;y<c.length;y+=1)t.classList.add(c[y]);}let d=a!==void 0&&(s?.color!==void 0||a.others==="author")?r.authorColor:r.color;t.style.color=d,t.style.backgroundColor=s?.background??(r.deleted?"var(--doc-revision-deletion-wash)":"var(--doc-revision-insertion-wash)"),r.line&&(t.style.textDecorationLine=r.line,t.style.textDecorationStyle=r.decorationStyle,t.style.textDecorationColor=d);return}if(t.classList.add("docx-revision","docx-revision-format"),t.dataset.revisionKind="format",t.dataset.revisionId=o.id,o.author!==""&&(t.dataset.reviewAuthor=o.author),o.date!==void 0&&(t.dataset.revisionDate=o.date),a){let i=a.styles.get(o.author);t.dataset.reviewAuthorSlot=String((a.authorSlots.get(o.author)??0)%M);let s=a.classTokens.get(o.author);if(s)for(let l=0;l<s.length;l+=1)t.classList.add(s[l]);i?.color!==void 0&&(t.style.color=i.color),i?.background!==void 0&&(t.style.backgroundColor=i.background);}}}function Gt(t,e,n,o){let a=chunkTP4EHWEX_cjs.pb(e),r=t.createElement("span");r.className=`docx-revision-pmark docx-revision-pmark-${a.kind}`,r.setAttribute("aria-hidden","true"),r.contentEditable="false",r.dataset.revisionKind=a.kind,r.dataset.revisionId=a.id,a.author!==""&&(r.dataset.reviewAuthor=a.author),r.dataset.revisionIds=e.map(d=>d.id).join(" "),r.dataset.revisionKinds=e.map(d=>d.kind).join(" "),r.textContent="\xB6",r.style.position="absolute",r.style.pointerEvents="none",r.style.marginLeft=`${2*n}px`;let i=chunkTP4EHWEX_cjs.qb(a),s=o?.styles.get(a.author),l=o?(o.authorSlots.get(a.author)??0)%M:0;if(o){r.dataset.reviewAuthorSlot=String(l);let d=o.classTokens.get(a.author);if(d)for(let c=0;c<d.length;c+=1)r.classList.add(d[c]);}return r.style.color=s?.color??(o?.others==="author"?_(l):i?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)"),i&&(r.style.textDecorationLine="line-through"),r}function Wt(t,e,n){let o=[],a=e.lines[e.lines.length-1];for(let i of e.lines){let s=[...i.spans.flatMap(u=>u.revisions??[]),...i===a?e.markRevisions??[]:[]];if(s.length===0)continue;let l=s.some(u=>u.kind==="delete"||u.kind==="moveFrom"),d=i.box.y-e.box.y,c=d+i.box.height,y=o[o.length-1];if(y&&y.deleted===l&&d<=y.bottom+.5){y.bottom=Math.max(y.bottom,c);continue}o.push({top:d,bottom:c,deleted:l});}if(o.length===0)return null;let r=t.createElement("div");r.className="docx-change-bars",r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.inset="0",r.style.pointerEvents="none";for(let i of o){let s=t.createElement("div");s.className=`docx-change-bar docx-change-bar-${i.deleted?"deletion":"insertion"}`,s.style.position="absolute",s.style.top=`${i.top*n}px`,s.style.height=`${(i.bottom-i.top)*n}px`,s.style.left=`${(-e.box.x-qt)*n}px`,s.style.width=`${Vt*n}px`,s.style.pointerEvents="none",s.style.backgroundColor=i.deleted?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",r.append(s);}return r}var qt=7.5,Vt=1.5;function Xt(t,e,n,o,a){let r=t.createElement("span");if(e.equation)return r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end),W(r,e.style,n),Ue(t,r,e.equation,n.scale),Ye(r,e,n),r;if(r.className="layout-run layout-run-text",r.style.display="inline-block",r.style.verticalAlign="baseline",r.style.boxSizing="border-box",r.style.height=`${o*n.scale}px`,r.style.paddingTop=`${a*n.scale}px`,r.style.lineHeight=`${(o-a)*n.scale}px`,e.range.end>e.range.start?(r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end)):(r.setAttribute("aria-hidden","true"),r.contentEditable="false"),W(r,e.style,n),jt(r,e,n),Ye(r,e,n),(e.style.horizontalScalePercent!==100||e.text===" ")&&(r.style.width=`${e.box.width*n.scale}px`),e.text===" "){r.style.overflow="hidden",r.style.verticalAlign="top";let i=rt(e.style);i&&(r.dataset.docxTabUnderline="",Kt(r.style,i,n.scale));}return it(t,r,e.text,e.style,n.scale),e.projected&&(r.dataset.docxField="",r.setAttribute("contenteditable","false"),e.noteNav?(r.style.userSelect="none",e.noteNav.direction==="to-note"?(r.dataset.docxNoteRef="",r.dataset.docxNoteScope=e.noteNav.scopeId,e.text.length>0&&r.setAttribute("aria-description",e.text)):(r.dataset.docxNoteMarkBack="",r.dataset.docxNoteScope=e.noteNav.scopeId)):(r.style.pointerEvents="none",r.style.userSelect="none")),r}function Ze(t,e,n){let o=t.createElement("a");return o.className="docx-hyperlink",o.dataset.docxLink=e.id,o.dataset.docxLinkKind=e.kind,o.setAttribute("tabindex","-1"),!n.inertLinks&&e.href&&(o.setAttribute("href",e.href),e.kind==="external"&&o.setAttribute("rel","noopener noreferrer")),e.tooltip&&o.setAttribute("title",e.tooltip),o.style.display="inline-block",o.style.verticalAlign="baseline",o.style.textDecoration="none",o.style.color="inherit",o}function Yt(t,e,n){let o=n.scale,a=t.createElement("div");a.className="docx-line layout-line",a.dataset.lineId=e.id,a.dataset.paragraphId=e.range.paragraphId,a.style.position="absolute",a.style.top=`${e.box.y*o}px`,a.style.left=`${e.contentX*o}px`,a.style.height=`${e.box.height*o}px`,a.style.fontSize="0",a.style.whiteSpace="pre",a.style.overflow="visible";let r=e.leading??0,i=Math.min(Math.max(r,...e.spans.map(v=>v.box.height+r),e.spans.length===0?e.box.height-(e.trailingSpacing??0):0),e.box.height),s=Math.max(0,e.box.height-i);a.style.boxSizing="border-box",a.style.paddingBottom=`${s*o}px`,a.style.lineHeight=`${(e.box.height-s)*o}px`;let l=null,d=null,c=null,y=new Map;for(let[v,b]of chunkTP4EHWEX_cjs.uc(e).entries())y.set(b.paragraphId,v);let u=v=>y.get(v)??0,p=[...e.drawings??[]].sort((v,b)=>u(v.paragraphId)-u(b.paragraphId)||v.start-b.start),h=0,g=(v,b)=>{for(;h<p.length&&(u(p[h].paragraphId)<u(v)||u(p[h].paragraphId)===u(v)&&p[h].start<b);){let x=p[h],f=Math.max(0,x.advanceEnd-x.advanceStart),m=t.createElement("span");m.className="docx-inline-drawing-advance",m.dataset.docxMarker="",m.setAttribute("contenteditable","false"),m.setAttribute("aria-hidden","true"),m.style.display="inline-block",m.style.width=`${f*o}px`,m.style.height=`${x.baselineOffset*o}px`,m.style.lineHeight="0",m.style.pointerEvents="none",m.style.verticalAlign="baseline",a.append(m),h+=1,l=null,d=null;}},w=v=>{let b=v.wrapAdvanceBefore??0;if(b<=.001)return;let x=t.createElement("span");x.className="docx-wrap-advance",x.dataset.docxMarker="",x.setAttribute("contenteditable","false"),x.setAttribute("aria-hidden","true"),x.style.display="inline-block",x.style.width=`${b*o}px`,x.style.height="0",x.style.lineHeight="0",x.style.pointerEvents="none",x.style.verticalAlign="baseline",a.append(x),l=null,d=null;},S=0,R=false;for(let[v,b]of e.spans.entries()){g(b.range.paragraphId,b.range.start),w(b);let x=Math.min(b.box.height+r,e.box.height),f=Xt(t,b,n,x,r);S>0&&!R&&(f.style.marginLeft=`${S*o}px`);let m=e.spans[v+1],T=Zt(e,v+1,u);R=T>0&&m!==void 0&&Qt(b,m),R&&(f.style.wordSpacing=`${T*o}px`),S=T;let k=b.link;if(!k){l=null,d=null,c=null,a.append(f);continue}if(b.fieldAtom){l!==null&&d===k.id&&c===b.range.start||(l=Ze(t,k,n),d=k.id,c=b.range.start,a.append(l)),l.append(f);continue}(!l||d!==k.id||c!==null)&&(l=Ze(t,k,n),d=k.id,c=null,a.append(l)),l.append(f);}if(g(chunkTP4EHWEX_cjs.uc(e)[chunkTP4EHWEX_cjs.uc(e).length-1]?.paragraphId??e.range.paragraphId,Number.POSITIVE_INFINITY),e.spans.length===0){let v=t.createElement("br");v.style.lineHeight=`${e.box.height*o}px`,a.append(v);}let P=Object.freeze({x:e.contentX,y:e.box.y,width:e.box.width,height:e.box.height}),L=tt(et(n));if(e.drawings&&e.drawings.length>0)for(let v of Ie(t,e,L.ctx,L.urlRegistry,P))a.append(v);return a}function Zt(t,e,n){if(e<=0||e>=t.spans.length)return 0;let o=t.spans[e-1],a=t.spans[e],r=n(o.range.paragraphId),i=n(a.range.paragraphId);if(t.drawings?.some(d=>{let c=n(d.paragraphId),y=c>r||c===r&&d.start>=o.range.start,u=c<i||c===i&&d.start<a.range.start;return y&&u}))return 0;let l=a.box.x-(o.box.x+o.box.width)-(a.wrapAdvanceBefore??0);return l>.25?l:0}var Jt=/[\t\n\r \u00A0\u1361\u{10100}-\u{10102}\u{1039F}\u{1091F}]/u;function Qt(t,e){return !t.text.endsWith(" ")||t.style.horizontalScalePercent!==100||!en(t,e)||(e.wrapAdvanceBefore??0)>.001?false:!Jt.test(t.text.slice(0,-1))}function en(t,e){return !t.link&&!e.link?true:!t.link||!e.link||t.link.id!==e.link.id||!!t.fieldAtom!=!!e.fieldAtom?false:!t.fieldAtom||t.range.start===e.range.start}function I(t,e,n){let o=n.scale,a=$(t,"div",e.box,o);a.className="docx-paragraph-fragment layout-paragraph",a.dataset.paragraphId=e.paragraphId,a.dataset.fragmentIndex=String(e.fragmentIndex),n.readOnlyParagraphIds?.has(e.paragraphId)&&(a.classList.add("docx-generated-region"),a.dataset.docxReadOnly="",a.setAttribute("contenteditable","false"),a.setAttribute("aria-readonly","true")),n.emptyTocPlaceholderIds?.has(e.paragraphId)&&(a.classList.add("docx-toc-empty-placeholder"),a.dataset.docxTocEmpty=""),e.shading&&F.test(e.shading)&&e.shadingBox&&a.append(rn(t,e,o)),e.marker&&a.append(tn(t,e,n));for(let i of e.lines)for(let s of i.spans){if(!s.tabLeader)continue;let l=on(t,e,i,s,n);l&&a.append(l);}let r=Wt(t,e,o);if(r&&a.append(r),e.markRevisions&&e.markRevisions.length>0){let i=Gt(t,e.markRevisions,o,n.revisionStyles),s=e.lines[e.lines.length-1];if(s){let l=s.spans[s.spans.length-1];i.style.top=`${(s.box.y-e.box.y)*o}px`,i.style.left=`${((l?l.box.x+l.box.width:s.contentX)-e.box.x)*o}px`,a.append(i);}}for(let i of e.lines){let s=Yt(t,i,n);s.style.top=`${(i.box.y-e.box.y)*o}px`,s.style.left=`${(i.contentX-e.box.x)*o}px`,a.append(s);}if(e.borders)for(let i of e.borders)a.append(Je(t,e,i,o));else e.bottomBorder&&a.append(Je(t,e,{side:"bottom",edge:e.bottomBorder.edge,box:e.bottomBorder.box},o));return a}function tn(t,e,n){let o=e.marker,a=n.scale,r=e.lines[0]?.leading??0,i=$(t,"span",o.box,a);i.className="docx-list-marker",i.dataset.docxMarker="",i.setAttribute("contenteditable","false"),i.setAttribute("aria-hidden","true"),i.style.left=`${(o.box.x-e.box.x)*a}px`,i.style.top=`${(o.box.y-e.box.y)*a}px`,i.style.display="block",i.style.overflow="visible",i.style.whiteSpace="pre";let s=e.lines[0],l=s?Math.max(r,...s.spans.map(u=>u.box.height+r),s.spans.length===0?s.box.height-(s.trailingSpacing??0):0):o.box.height,d=Math.min(l,o.box.height),c=Math.max(0,o.box.height-d);i.style.fontSize="0",i.style.boxSizing="border-box",i.style.paddingBottom=`${c*a}px`,i.style.lineHeight=`${d*a}px`;let y=t.createElement("span");return y.style.display="inline-block",y.style.verticalAlign="baseline",y.style.boxSizing="border-box",y.style.height=`${d*a}px`,y.style.paddingTop=`${r*a}px`,y.style.lineHeight=`${(d-r)*a}px`,W(y,o.style,n),it(t,y,o.text,o.style,a),i.append(y),i}var nn=512;function on(t,e,n,o,a){let r=o.tabLeader?chunkTP4EHWEX_cjs.Ma.get(o.tabLeader):void 0;if(!r||o.box.width<=0)return null;let i=a.scale,s=t.createElement("div");s.className="docx-tab-leader",s.dataset.docxTabLeader="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left=`${(o.box.x-e.box.x)*i}px`,s.style.top=`${(n.box.y-e.box.y)*i}px`,s.style.width=`${o.box.width*i}px`,s.style.height=`${n.box.height*i}px`,s.style.overflow="hidden",s.style.whiteSpace="pre",s.style.pointerEvents="none",s.style.userSelect="none";let l=n.leading??0,d=Math.min(o.box.height+l,n.box.height),c=Math.max(0,n.box.height-d);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${c*i}px`,s.style.lineHeight=`${(n.box.height-c)*i}px`;let y=t.createElement("span");y.style.display="inline-block",y.style.verticalAlign="baseline",W(y,o.style,a),y.style.boxSizing="border-box",y.style.height=`${d*i}px`,y.style.paddingTop=`${l*i}px`,y.style.lineHeight=`${(d-l)*i}px`,o.tabLeader==="heavy"&&(y.style.fontWeight="bold");let u=o.tabLeaderAdvancePt&&o.tabLeaderAdvancePt>0?o.tabLeaderAdvancePt:Math.max(.5,o.style.fontSizePt*.2),p=Math.min(nn,Math.max(1,Math.floor(o.box.width/u)+2));return y.textContent=r.repeat(p),y.style.letterSpacing="0",s.append(y),s}function rn(t,e,n){let o=e.shadingBox,a=$(t,"div",o,n);return a.className="docx-paragraph-shading",a.setAttribute("aria-hidden","true"),a.style.left=`${(o.x-e.box.x)*n}px`,a.style.top=`${(o.y-e.box.y)*n}px`,a.style.backgroundColor=`#${e.shading}`,a}function Je(t,e,n,o){let a=$(t,"div",n.box,o);a.className=`docx-paragraph-border docx-paragraph-border-${n.side}`,a.setAttribute("aria-hidden","true");let r=(n.box.x-e.box.x)*o,i=(n.box.y-e.box.y)*o,s=n.side==="left"||n.side==="right"||n.side==="bar",l=(s?n.box.width:n.box.height)*o,c=an(n.edge.val)?l:Math.max(1,l);a.style.left=`${n.side==="right"?r-(c-l):r}px`,a.style.top=`${n.side==="bottom"?i-(c-l):i}px`,s?a.style.width=`${c}px`:a.style.height=`${c}px`;let y=n.edge.color&&F.test(n.edge.color)?n.edge.color:"000000";return a.style.backgroundColor=`#${y}`,sn(a,n.edge.val,y,s,c,o),a}function an(t){return t==="double"||t==="triple"||t==="doubleWave"||t.startsWith("thinThick")||t.startsWith("thickThin")}function sn(t,e,n,o,a,r){switch(e){case "dashed":case "dashSmallGap":case "dotDash":case "dotDotDash":case "dashDotStroked":{let i=Math.max(4,4*r);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 60%, transparent 60%)`,t.style.backgroundSize=o?`100% ${i}px`:`${i}px 100%`;return}case "dotted":{let i=Math.max(3,3*r);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 35%, transparent 35%)`,t.style.backgroundSize=o?`100% ${i}px`:`${i}px 100%`;return}case "double":case "doubleWave":case "triple":case "thinThickSmallGap":case "thickThinSmallGap":case "thinThickThinSmallGap":case "thinThickMediumGap":case "thickThinMediumGap":case "thinThickThinMediumGap":case "thinThickLargeGap":case "thickThinLargeGap":case "thinThickThinLargeGap":{let i=Math.max(1,a/3);t.style.backgroundColor="transparent",o?(t.style.borderLeft=`${i}px solid #${n}`,t.style.borderRight=`${i}px solid #${n}`):(t.style.borderTop=`${i}px solid #${n}`,t.style.borderBottom=`${i}px solid #${n}`),t.style.boxSizing="border-box";return}case "threeDEmboss":case "ridge":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px ridge #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "threeDEngrave":case "groove":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px groove #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "inset":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px inset #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "outset":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,a)}px outset #${n}`,o?t.style.width="0px":t.style.height="0px";return}default:return}}function ln(t,e,n,o){let a=o.scale,r=$(t,"div",e.box,a);if(r.className="docx-table-cell",r.style.left=`${(e.box.x-n.x)*a}px`,r.style.top=`${(e.box.y-n.y)*a}px`,r.style.boxSizing="border-box",r.style.overflow="visible",r.dataset.cellId=e.id,r.dataset.gridColumn=String(e.gridColumn),r.dataset.gridSpan=String(e.gridSpan),e.rowSpan&&e.rowSpan>1&&(r.dataset.rowSpan=String(e.rowSpan)),e.paintInert||e.vMergeContinue)return r.dataset.vMergeContinue="true",r.style.border="none",r.style.backgroundColor="transparent",r;r.style.border="none",Ke(t,r,e.borders,a),e.shading&&F.test(e.shading)&&(r.style.backgroundColor=`#${e.shading}`);for(let i of e.blocks){let s=i.kind==="table"?C(t,i,o):I(t,i,o);s.style.left=`${(i.box.x-e.box.x)*a}px`,s.style.top=`${(i.box.y-e.box.y)*a}px`,r.append(s);}return r}function C(t,e,n){let o=n.scale,a=$(t,"div",e.box,o);a.className="docx-table-fragment layout-table",a.dataset.tableId=e.tableId,a.dataset.fragmentIndex=String(e.fragmentIndex),a.style.overflow="visible";for(let r of e.rows){let i=$(t,"div",r.box,o);i.className="docx-table-row",r.revisionKind&&(i.classList.add("docx-table-row--revision",r.revisionKind==="insert"?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionKind=r.revisionKind,r.revisionId!==void 0&&(i.dataset.revisionId=r.revisionId),r.revisionAuthor!==void 0&&(i.dataset.reviewAuthor=r.revisionAuthor),r.revisionDate!==void 0&&(i.dataset.revisionDate=r.revisionDate)),i.dataset.rowId=r.id,r.isHeaderRepeat&&(i.dataset.headerRepeat="true"),i.style.left=`${(r.box.x-e.box.x)*o}px`,i.style.top=`${(r.box.y-e.box.y)*o}px`,i.style.overflow="visible";for(let s of r.cells)i.append(ln(t,s,r.box,n));a.append(i);}return a}function dn(t,e,n,o,a){let r={...n,paintInstance:`p${e.index}`},i=$(t,"div",e.box,r.scale);if(i.className="docx-page",i.style.fontFamily=chunkTP4EHWEX_cjs.Gd,i.dataset.pageIndex=String(e.index),r.ariaHidden&&(i.setAttribute("aria-hidden","true"),i.setAttribute("role","presentation")),i.dataset.materialized=String(o),!o)return i;let s=Object.freeze({x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height}),l=Object.freeze({x:-(e.contentBox.x-e.box.x),y:-(e.contentBox.y-e.box.y),width:e.box.width,height:e.box.height});We(t,i,e,r,l,"behind");for(let y of [e.header,e.footer])y?.anchoredDrawings?.length&&Bt(t,i,y,y.anchoredDrawings,r,{x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height});let d=t.createElement("div");d.className="docx-page-content",d.style.position="absolute",d.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,d.style.top=`${(e.contentBox.y-e.box.y)*r.scale}px`,d.style.width=`${e.contentBox.width*r.scale}px`,d.style.height=`${e.contentBox.height*r.scale}px`,r.activeHeaderFooterRId&&d.setAttribute("contenteditable","false");for(let y of e.columnSeparators??[]){let u=t.createElement("div");u.className="docx-column-separator",u.setAttribute("contenteditable","false"),u.style.position="absolute",u.style.left=`${y.x*r.scale}px`,u.style.top=`${y.y*r.scale}px`,u.style.width=`${y.width*r.scale}px`,u.style.height=`${y.height*r.scale}px`,u.style.backgroundColor="currentColor",u.style.pointerEvents="none",d.append(u);}let c=a?new Map:null;for(let y of e.fragments){let u=y.kind==="table"?C(t,y,r):I(t,y,r);c?.set(y,u),d.append(u);}a&&c&&(a.content=d,a.blocks=c),i.append(d),We(t,i,e,r,l,"inFront"),Re(t,i,e,r,I,C);for(let y of ["header","footer"]){if(e[y])continue;let u=t.createElement("div");u.className="docx-hf docx-hf--placeholder",u.dataset.docxHf=y,u.setAttribute("contenteditable","false");let p=y==="header"?e.contentBox.y-e.box.y:e.box.y+e.box.height-(e.contentBox.y+e.contentBox.height),h=Math.min(p,cn);if(h<=0)continue;let g=Math.max(0,Math.min(yn,p-h)),w=y==="header"?g:e.box.height-g-h;u.style.position="absolute",u.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,u.style.top=`${w*r.scale}px`,u.style.width=`${e.contentBox.width*r.scale}px`,u.style.height=`${h*r.scale}px`,i.append(u);}for(let y of [e.header,e.footer]){if(!y)continue;let u=y.anchoredDrawings??[],p=K(y,e.index,r),h=t.createElement("div");h.className="docx-hf",h.dataset.docxHf=y.kind,y.rId&&(h.dataset.docxRId=y.rId),p?(h.dataset.docxHfActive="",h.setAttribute("contenteditable","true")):h.setAttribute("contenteditable","false"),h.style.position="absolute",h.style.left=`${(y.box.x-e.box.x)*r.scale}px`,h.style.top=`${(y.box.y-e.box.y)*r.scale}px`,h.style.width=`${y.box.width*r.scale}px`;let g=X(y,e,p);h.style.height=`${g*r.scale}px`,h.style.overflow="visible";let w=(e.box.x-y.box.x)*r.scale,S=(e.box.y-y.box.y)*r.scale,R=w+e.box.width*r.scale,P=S+e.box.height*r.scale;h.style.clipPath=`polygon(${w}px ${S}px, ${R}px ${S}px, ${R}px ${P}px, ${w}px ${P}px)`;let L=Object.freeze({x:0,y:0,width:y.box.width,height:y.box.height}),v=u.filter(f=>!nt(f)),b={...r,inertLinks:true};for(let f of y.fragments)h.append(f.kind==="table"?C(t,f,b):I(t,f,b));q(t,h,v,et(r),L,"inFront",p),i.append(h);let x=t.createElement("div");x.className="docx-hf-edit-hint",x.dataset.docxHfHint=y.kind,x.setAttribute("contenteditable","false"),x.style.position="absolute",x.style.left=h.style.left,x.style.width=h.style.width,x.style.top=y.kind==="header"?`${(y.box.y+y.box.height-e.box.y)*r.scale}px`:`${(y.box.y-e.box.y)*r.scale}px`,y.kind==="footer"&&(x.style.transform="translateY(-100%)"),i.append(x),Nt(t,i,y,u,r,s,"inFront",p);}return pn(t,i,e,r),i}var cn=30,yn=36,un=16,hn=new Set(["dropdown","comboBox","date","checkbox"]);function pn(t,e,n,o){let a=o.contentControlChrome,r=a?.suppressedIds,i=(n.contentControls??[]).filter(u=>r?.has(u.id)!==true),s=[...i,...(a?.additionalBoundaries??[]).filter(u=>r?.has(u.id)!==true&&!i.some(p=>p.id===u.id))];if(s.length===0)return;let l=a?.showAll===true,d=a?.activeIds,c=a?.hoverIds,y=a?.tocControlIds;for(let u of s){let p=y?.has(u.id)===true,h=!p&&d?.has(u.id)===true,g=c?.has(u.id)===true;e.append(fn(t,n,u,o.scale,h,g,l||h||p&&g,a?.checkedIds?.has(u.id),p,a?.readOnly===true));}}function fn(t,e,n,o,a,r,i,s,l,d){let c=t.createElement("div");c.className="docx-content-control-chrome",c.dataset.docxContentControl=n.id,c.dataset.docxMarker="",c.dataset.controlType=n.controlType,c.dataset.lock=n.effectiveLock,n.bound&&(c.dataset.bound=""),n.placeholder&&(c.dataset.placeholder=""),l&&(c.dataset.docxToc=""),d&&(c.dataset.readOnly=""),a&&(c.dataset.active=""),r&&(c.dataset.hover=""),i&&(c.dataset.boundaryVisible=""),c.setAttribute("contenteditable","false"),c.setAttribute("role","group"),n.alias&&(c.dataset.alias=n.alias),n.tag&&(c.dataset.tag=n.tag),n.alias&&c.setAttribute("aria-label",n.alias),c.style.position="absolute",c.style.inset="0",c.style.pointerEvents="none",c.style.zIndex="2";let y=e.contentBox.x-e.box.x,u=e.contentBox.y-e.box.y;for(let h of n.fragments){if(h.pageIndex!==e.index)continue;let g=t.createElement("div");g.className="docx-content-control-boundary",g.dataset.docxMarker="",g.setAttribute("contenteditable","false"),g.setAttribute("aria-hidden","true"),g.style.position="absolute",g.style.left=`${(y+h.box.x)*o}px`,g.style.top=`${(u+h.box.y)*o}px`,g.style.width=`${Math.max(h.box.width,1)*o}px`,g.style.height=`${Math.max(h.box.height,1)*o}px`,g.style.pointerEvents="none",c.append(g);}let p=n.fragments.find(h=>h.pageIndex===e.index);if(p&&n.alias){let h=t.createElement("div");h.className="docx-content-control-label",h.dataset.docxMarker="",h.setAttribute("contenteditable","false"),h.setAttribute("aria-hidden","true"),h.textContent=n.alias,h.style.position="absolute",h.style.left=`${(y+p.box.x)*o}px`,h.style.top=`${Math.max(0,(u+p.box.y)*o-un)}px`,h.style.pointerEvents="none",c.append(h);}if(p&&hn.has(n.controlType)){let h=t.createElement("button");h.type="button",h.className="docx-content-control-widget",h.dataset.docxMarker="",h.dataset.docxCcWidget=n.controlType,h.dataset.docxCcId=n.id,h.setAttribute("contenteditable","false"),h.setAttribute("tabindex","-1"),n.controlType==="checkbox"?h.setAttribute("role","checkbox"):n.controlType==="dropdown"||n.controlType==="comboBox"?h.setAttribute("role","listbox"):n.controlType==="date"&&h.setAttribute("role","button"),n.alias&&(h.dataset.name=n.alias),n.alias&&h.setAttribute("aria-label",n.alias),n.controlType==="checkbox"&&(h.setAttribute("data-checked",s?"true":"false"),h.setAttribute("aria-checked",s?"true":"false"));let g=n.effectiveLock==="contentLocked"||n.effectiveLock==="sdtContentLocked";(d||g||n.bound)&&(h.disabled=true,h.dataset.disabledReason=d?"readOnly":n.bound?"bound":"locked",h.setAttribute("aria-disabled","true")),h.style.position="absolute",h.style.left=`${(y+p.box.x+p.box.width)*o-18}px`,h.style.top=`${(u+p.box.y)*o}px`,h.style.width="16px",h.style.height="16px",h.style.pointerEvents="auto",h.style.padding="0",h.style.margin="0",h.style.cursor=h.disabled?"not-allowed":"pointer",c.append(h);}return c}var ne=new WeakMap;function Xn(t){ne.delete(t);}function gn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xn(t,e){let n=Object.keys(t);if(n.length!==Object.keys(e).length)return false;for(let o of n){let a=t[o],r=e[o];if(a!==r)return false}return true}function bn(t,e){if(t.length!==e.length)return false;for(let n=0;n<t.length;n+=1)if(t[n]!==e[n])return false;return true}function mn(t,e){if(t===e)return false;let n=new Set([...Object.keys(t),...Object.keys(e)]);for(let o of n){if(o==="fragments")continue;let a=t[o],r=e[o];if(a!==r&&!(Array.isArray(a)&&Array.isArray(r)&&bn(a,r))&&!(typeof a=="object"&&typeof r=="object"&&a!==null&&r!==null&&!Array.isArray(a)&&!Array.isArray(r)&&xn(a,r)))return false}return true}var Qe="docx-column-separator";function vn(t,e,n,o){let a=e.content,r=e.blocks;if(!a||!r||a.parentElement!==e.element)return null;let i={...o,paintInstance:`p${n.index}`},s=new Map,l=[];for(let u of n.fragments){let p=r.get(u)??(u.kind==="table"?C(t,u,i):I(t,u,i));s.set(u,p),l.push(p);}let d=new Set(l),c=a.firstChild;for(;c;){let u=c.nextSibling,p=c;!d.has(p)&&p.classList?.contains(Qe)!==true&&c.remove(),c=u;}let y=a.firstChild;for(;y&&y.classList?.contains(Qe);)y=y.nextSibling;for(let u of l){if(u===y){y=y.nextSibling;continue}a.insertBefore(u,y);}return {record:n,materialized:true,element:e.element,content:a,blocks:s}}function Rn(t,e,n,o){let a=t.element;return !t.materialized&&gn(t.record.box,e.box)&&a.style.left===`${e.box.x*n}px`&&a.style.top===`${e.box.y*n}px`&&a.style.width===`${e.box.width*n}px`&&a.style.height===`${e.box.height*n}px`&&a.getAttribute("aria-hidden")===(o?"true":null)}function Sn(t,e,n={}){wn(t,e,n);}function wn(t,e,n,o){let a=n.contentControlChrome,r=a?`${a.showAll===true?"1":"0"}:${a.activeIds?[...a.activeIds].sort().join(","):""}:${a.checkedIds?[...a.checkedIds].sort().join(","):""}:${a.tocControlIds?[...a.tocControlIds].sort().join(","):""}:${a.suppressedIds?[...a.suppressedIds].sort().join(","):""}:${a.readOnly===true?"ro":""}`:"",i=n.drawingStrings??J,s=n.imageUrlPort!==void 0?Le(t,n.imageUrlPort):null,l=a?.additionalBoundaries?a.additionalBoundaries.flatMap(f=>f.fragments.map(m=>`${f.id}:${m.pageIndex}:${m.box.x}:${m.box.y}:${m.box.width}:${m.box.height}`)).sort().join(","):"",d=n.readOnlyParagraphIds?[...n.readOnlyParagraphIds].sort().join(","):"",c=n.emptyTocPlaceholderIds?[...n.emptyTocPlaceholderIds].sort().join(","):"",y=a?.tocControlIds?[...a.tocControlIds].sort().join(","):"",u=me(n.revisionStyles,e,o),p={scale:n.scale??96/72,ariaHidden:n.ariaHidden??true,drawingStrings:i,urlRegistry:s,...n.fontAlias?{fontAlias:n.fontAlias}:{},...n.readOnlyParagraphIds?{readOnlyParagraphIds:n.readOnlyParagraphIds}:{},...n.emptyTocPlaceholderIds?{emptyTocPlaceholderIds:n.emptyTocPlaceholderIds}:{},...n.defaultFontFamily?{defaultFontFamily:n.defaultFontFamily}:{},...n.fieldShading?{fieldShading:n.fieldShading}:{},...n.shadeFormFields!==void 0?{shadeFormFields:n.shadeFormFields}:{},...u?{revisionStyles:u}:{},...n.imageUrlPort?{imageUrlPort:n.imageUrlPort}:{},...n.activeHeaderFooterRId?{activeHeaderFooterRId:n.activeHeaderFooterRId}:{},...n.activeHeaderFooterPageIndex!==void 0?{activeHeaderFooterPageIndex:n.activeHeaderFooterPageIndex}:{},...a?{contentControlChrome:a}:{}},h=t.ownerDocument,g=`${p.scale}|${p.ariaHidden}|${p.fontAlias?Ct(p.fontAlias):""}|${p.defaultFontFamily??""}|cc:${r}:${l}|toc:${y}|ro:${d}|tocEmpty:${c}|${n.imageUrlPort?"url":""}|${Oe(i)}|rev:${be(u)}`,w=ne.get(t),S=w?.parameters===g,R=S?new Map(w.pages.map(f=>[f.record,f])):null,P=w?new Map(w.pages.map(f=>[f.record.index,f])):null,L=e.pages.map(f=>{let m=n.materialize?.has(f.index)??true,T=R?.get(f);if(T&&T.materialized===m)return T;let k=P?.get(f.index);if(!m&&k&&Rn(k,f,p.scale,p.ariaHidden))return {record:f,materialized:false,element:k.element};if(S&&m&&k?.materialized&&mn(k.record,f)){let oe=vn(h,k,f,p);if(oe)return oe}let D={},st=dn(h,f,p,m,D);return {record:f,materialized:m,element:st,...D.content?{content:D.content}:{},...D.blocks?{blocks:D.blocks}:{}}});ne.set(t,{parameters:g,pages:L}),t.dataset.revision=String(e.revision),s&&s.reconcile(Be(e),Ne(e));let v=new Set(L.map(f=>f.element)),b=t.firstChild;for(;b;){let f=b.nextSibling;v.has(b)||b.remove(),b=f;}let x=t.firstChild;for(let f of L){if(f.element===x){x=x.nextSibling;continue}t.insertBefore(f.element,x);}Se(L,p);}function kn(t,e,n,o){let a=t.ownerDocument,r=o.scale,i=[];for(let s of n){let l=e.pages[s.pageIndex];if(!l)continue;let d=a.createElement("div");d.className=s.className??o.className??"docx-cell-selection-rect",d.style.position="absolute";let c=o.pageOffsetX?.get(s.pageIndex)??0;d.style.left=`${(l.contentBox.x+s.x+c)*r}px`,d.style.top=`${(l.contentBox.y+s.y)*r}px`,d.style.width=`${s.width*r}px`,d.style.height=`${s.height*r}px`,s.reviewAuthor&&(d.dataset.reviewAuthor=s.reviewAuthor.author,d.dataset.reviewAuthorSlot=String(s.reviewAuthor.slot%M),d.style.setProperty("--doc-review-author-current",s.reviewAuthor.color)),i.push(d);}t.replaceChildren(...i);}
|
|
2
|
-
exports.a=xe;exports.b=En;exports.c=gt;exports.d=Pn;exports.e=Dn;exports.f=J;exports.g=In;exports.h=te;exports.i=Xn;exports.j=Sn;exports.k=wn;exports.l=kn;
|
package/dist/chunk-5VC5HGJA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {c,d,p,f,k as k$1,j as j$1,i,zc,Jc,va,ta,ya,ra,u,V as V$1,ve,te as te$1,wa,Aa,re as re$1,xa,qb,lf,ff,bf,Ze,wb,Ia,U as U$1,Qc,ca,w,la,na,Xb,jc,Hb,Jb,ma,ba,ga,fa}from'./chunk-VUJGPCPU.js';import {strFromU8,strToU8}from'fflate';var Ft=["extension","capability","command","query","schema","dependencyKey","runtimePort","result","origin"],Bt=/^[a-z0-9]+(?:-[a-z0-9]+)*(?:\.[a-z0-9]+(?:-[a-z0-9]+)*)+$/,Ut=/^@[a-z0-9.-]+\/[a-z0-9.-]+(?:#[a-z0-9]+(?:[/._-][a-z0-9]+)*)?$/;function it(e){return Bt.test(e)||Ut.test(e)}function J(e,t){if(!it(e))throw new Error(`invalid ${t??"registry"} id ${JSON.stringify(e)}: must be reverse-domain (dev.docx-editor.core.x) or package-owned (@scope/pkg#kind/name)`)}var Ht=/^(\d+)\.(\d+)\.(\d+)$/;function S(e){let t=Ht.exec(e);if(!t)throw new Error(`invalid semantic version: ${JSON.stringify(e)}`);return {major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3])}}function q(e,t){return e.major!==t.major?e.major<t.major?-1:1:e.minor!==t.minor?e.minor<t.minor?-1:1:e.patch!==t.patch?e.patch<t.patch?-1:1:0}function Q(e,t){let n=S(e),r=t.trim();if(r==="*")return true;if(r.startsWith("^")){let o=S(r.slice(1));return q(n,o)<0?false:o.major>0?n.major===o.major:o.minor>0?n.major===0&&n.minor===o.minor:n.major===0&&n.minor===0}if(r.includes(" ")){let o=r.split(/\s+/);if(o.length!==2)throw new Error(`unsupported version range: ${JSON.stringify(t)}`);let s=true;for(let a of o){let i=a.startsWith(">=")?">=":a.startsWith("<")?"<":null;if(!i)throw new Error(`unsupported version range: ${JSON.stringify(t)}`);let d=S(a.slice(i.length)),l=q(n,d);i===">="?s=s&&l>=0:s=s&&l<0;}return s}return q(n,S(r))===0}var h=class extends Error{constructor(n,r,o=[]){super(r);this.code=n;this.responsible=o;this.name="RegistryError";}code;responsible},Me=(e,t)=>`${e}:${t}`;function Vt(e,t={}){let n=new Map;for(let l of e){if(J(l.id,"extension"),at(l.version,l.id),n.has(l.id))throw new h("duplicate-extension",`duplicate extension id ${l.id}`,[l.id]);n.set(l.id,l);for(let c of l.contributions)J(c.id,c.kind),at(c.version,`${l.id} \u2192 ${c.id}`),c.replaces&&Kt(c.replaces.targetRange,`${l.id} \u2192 replaces ${c.replaces.targetId}`);}for(let l of e){for(let c of l.dependencies??[])if(!n.has(c))throw new h("missing-dependency",`${l.id} requires missing extension ${c}`,[l.id,c]);for(let c of l.conflicts??[])if(n.has(c)){let p=[l.id,c].sort();throw new h("conflict",`extensions ${p[0]} and ${p[1]} conflict`,p)}}Xt(n);let r=new Set(t.availablePorts??[]);for(let l of e)for(let c of l.contributions)c.kind==="runtimePort"&&r.add(c.id);for(let l of e)for(let c of l.requiredPorts??[])if(!r.has(c))throw new h("missing-port",`${l.id} requires unavailable port ${c}`,[l.id,c]);let o=new Map,s=new Map,a=new Map;for(let l of e)for(let c of l.contributions){let p=Me(c.kind,c.id);if(c.replaces){let u=Me(c.kind,c.replaces.targetId),m=a.get(u)??[];m.push({ext:l.id,c}),a.set(u,m);continue}if(s.has(p)){let u=[o.get(p),l.id].sort();throw new h("id-collision",`${c.kind} id ${c.id} registered by both ${u[0]} and ${u[1]}`,u)}s.set(p,c),o.set(p,l.id);}let i=new Map(s);for(let[l,c]of a){let p=s.get(l);if(!p){let f=c[0];throw new h("replacement-target-missing",`${f.ext} replaces missing target ${f.c.replaces.targetId}`,[f.ext,f.c.replaces.targetId])}let u=p.replaceable??{kind:"none"};for(let{ext:f,c:y}of c){if(!Q(p.version,y.replaces.targetRange))throw new h("replacement-version-mismatch",`${f} replaces ${y.replaces.targetId}@${p.version} outside range ${y.replaces.targetRange}`,[f,y.replaces.targetId]);if(u.kind==="none")throw new h("unauthorized-replacement",`${y.replaces.targetId} does not authorize replacement (attempted by ${f})`,[f,y.replaces.targetId])}let m=jt(p,c);i.set(l,m);}return {extensions:n,contributions:i,get:(l,c)=>i.get(Me(l,c))}}function jt(e,t){let n=e.replaceable??{kind:"none"};if(t.length===1)return t[0].c;if(n.kind==="priority"){let o=[...t].sort((i,d)=>(d.c.replaces.priority??0)-(i.c.replaces.priority??0)),s=o[0].c.replaces.priority??0,a=o.filter(i=>(i.c.replaces.priority??0)===s);if(a.length>1){let i=a.map(d=>d.ext).sort();throw new h("ambiguous-replacement",`multiple replacers of ${e.id} share top priority ${s}: ${i.join(", ")}`,i)}return o[0].c}let r=t.map(o=>o.ext).sort();throw new h("ambiguous-replacement",`multiple replacers of ${e.id}: ${r.join(", ")}`,r)}function Xt(e){let o=new Map,s=[],a=i=>{o.set(i,1),s.push(i);let d=[...e.get(i)?.dependencies??[]].sort();for(let l of d){let c=o.get(l)??0;if(c===1){let p=s.indexOf(l),u=[...s.slice(p),l];throw new h("dependency-cycle",`dependency cycle: ${u.join(" -> ")}`,u)}c===0&&a(l);}s.pop(),o.set(i,2);};for(let i of [...e.keys()].sort())(o.get(i)??0)===0&&a(i);}function at(e,t){try{S(e);}catch{throw new h("invalid-version",`invalid version ${JSON.stringify(e)} in ${t}`,[t])}}function Kt(e,t){try{Q("0.0.0",e);}catch{throw new h("invalid-version",`invalid version range ${JSON.stringify(e)} in ${t}`,[t])}}var T=class extends Error{constructor(t){super(t),this.name="BudgetError";}},U=class e{constructor(t,n){this.label=t;this.capacity=n;this.used=new p(`${t}.budget`,n);}label;capacity;used;children=new Set;activeReservations=0;cleanups=[];disposed=false;carveAmount=0;parent;get inUse(){return this.used.current}get available(){return this.used.remaining}get isDisposed(){return this.disposed}reserve(t){this.assertLive(),this.used.add(t),this.activeReservations+=1;let n=false,r=this;return {amount:t,get released(){return n},release(){n||(n=true,r.used.release(t),r.activeReservations-=1);}}}child(t,n){this.assertLive(),this.used.add(n);let r=new e(t,n);return r.parent=this,r.carveAmount=n,this.children.add(r),r}onRelease(t){this.assertLive(),this.cleanups.push(t);}dispose(){if(this.disposed)return;if(this.children.size>0)throw new T(`${this.label}: cannot release with ${this.children.size} child budget(s) outstanding`);if(this.activeReservations>0)throw new T(`${this.label}: cannot release with ${this.activeReservations} reservation(s) outstanding`);let t=[];for(let n=this.cleanups.length-1;n>=0;n--)try{this.cleanups[n]();}catch(r){t.push(r);}if(this.disposed=true,this.parent&&(this.parent.children.delete(this),this.parent.used.release(this.carveAmount),this.parent=void 0),t.length>0)throw new T(`${this.label}: ${t.length} cleanup error(s); first: ${String(t[0])}`)}assertLive(){if(this.disposed)throw new T(`${this.label}: budget already released`)}};var Z=class extends Error{constructor(n,r){super(r?`cancelled: ${r}`:"cancelled");this.derivedOnly=n;this.name="CancellationError";}derivedOnly},H=class{_cancelled=false;_phase="pre-publication";_reason;cancel(t){this._cancelled=true,t!==void 0&&(this._reason=t);}markPublished(){this._phase="post-publication";}get isCancelled(){return this._cancelled}get phase(){return this._phase}get isPublished(){return this._phase==="post-publication"}get derivedOnly(){return this._cancelled&&this._phase==="post-publication"}get token(){let t=this;return {get isCancelled(){return t._cancelled},get phase(){return t._phase},get derivedOnly(){return t.derivedOnly},checkpoint(){if(t._cancelled)throw new Z(t.derivedOnly,t._reason)}}}};var ee=class extends Error{constructor(n){super(`runtime port not available: ${n}`);this.portId=n;this.name="PortResolutionError";}portId},Le=class{ports=new Map;provide(t,n){return this.ports.set(t,n),this}has(t){return this.ports.has(t)}resolve(t){if(!this.ports.has(t))throw new ee(t);return this.ports.get(t)}missing(t){return t.filter(n=>!this.ports.has(n))}availablePorts(){return [...this.ports.keys()]}clock(){return this.resolve(f.clock)}identity(){return this.resolve(f.identity)}},Fe=class{constructor(t=0,n=1){this.step=n;this.t=t;}step;t;now(){let t=this.t;return this.t+=this.step,t}},Be=class{constructor(t="id"){this.prefix=t;}prefix;n=0;newId(){return this.n+=1,`${this.prefix}-${this.n}`}};function Gt(e){let t=k$1(e.limits),n=Object.freeze({...e.config??{}}),r=e.capacity??t.maxDecompressedBytes,o=e.id??"op",s={id:o,limits:t,config:n,ports:e.ports,budget:new U(`op:${o}`,r),cancellation:new H};return Object.freeze(s)}function zt(e){e.budget.dispose();}var He=Object.freeze({maxRecursionDepth:{unit:"depth",phase:"xml-parse"},maxElementCount:{unit:"count",phase:"xml-parse"},maxPartCount:{unit:"count",phase:"package-read"},maxDecompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressionRatio:{unit:"ratio",phase:"package-read"},maxChunkBytes:{unit:"bytes",phase:"package-read"},maxPaginationPasses:{unit:"passes",phase:"layout"},maxQueueDepth:{unit:"count",phase:"output"}}),st=Object.keys(He);function Wt(e,t){return new p(`${He[t].phase}:${t}`,e[t])}var Ue=class{counter;current=0;peak=0;constructor(t){this.counter=new p("memory",t);}allocate(t){this.counter.add(t),this.current+=t,this.current>this.peak&&(this.peak=this.current);}free(t){this.counter.release(t),this.current=Math.max(0,this.current-t);}get currentBytes(){return this.current}get peakBytes(){return this.peak}reset(){this.counter.release(this.current),this.current=0;}};function Yt(){for(let e of st){let t=j$1[e],n=i[e];if(!Number.isFinite(t)||t<=0)throw new Error(`default ${e} must be finite > 0`);if(!Number.isFinite(n)||n<=0)throw new Error(`ceiling ${e} must be finite > 0`);if(t>n)throw new Error(`default ${e} exceeds ceiling`)}}function V(e,t=new Set){let n=new WeakSet,r=o=>{if(o===null)return "null";let s=typeof o;if(s==="boolean")return o?"true":"false";if(s==="number"){let a=o;if(!Number.isFinite(a))throw new Error(`non-finite number is not comparable: ${a}`);return Object.is(a,-0)?"0":String(a)}if(s==="string")return JSON.stringify(o);if(s==="bigint")return `${o.toString()}n`;if(Array.isArray(o))return `[${o.map(r).join(",")}]`;if(s==="object"){let a=o;if(n.has(a))throw new Error("cannot canonicalize a cyclic structure");n.add(a);let d=Object.keys(a).filter(l=>!t.has(l)).sort().map(l=>`${JSON.stringify(l)}:${r(a[l])}`).join(",");return n.delete(a),`{${d}}`}throw new Error(`unsupported value type in comparator input: ${s}`)};return r(e)}function Ve(e,t){let n=V(e,t),r=0xcbf29ce484222325n,o=0x100000001b3n,s=0xffffffffffffffffn;for(let a=0;a<n.length;a++)r^=BigInt(n.charCodeAt(a)),r=r*o&s;return r.toString(16).padStart(16,"0")}var R="dev.docx-editor.core.comparator",je={authoredState:{id:`${R}.authored-state`,mode:"canonical-exact",ephemera:["revision","provenance","producedAt","commitId"],note:"canonical normalized authored records; ephemera excluded"},anchor:{id:`${R}.anchor`,mode:"exact",ephemera:[],note:"internal anchor identity/affinity compares exactly"},yjsStateVector:{id:`${R}.yjs-state-vector`,mode:"sync-optimization-only",ephemera:[],note:"exchange optimization only; never proves update or delete-set coverage"},shapedRun:{id:`${R}.shaped-run`,mode:"exact",ephemera:[],note:"glyph ids, clusters, and fixed-point advances compare exactly"},paginationFingerprint:{id:`${R}.pagination-fingerprint`,mode:"exact",ephemera:[],note:"page/column boundaries, break causes, fixed-point geometry compare exactly"},semanticTree:{id:`${R}.semantic-tree`,mode:"exact",ephemera:[],note:"reading order, roles, headings, alt text compare exactly"},hitTest:{id:`${R}.hit-test`,mode:"exact",ephemera:[],note:"resolved hit target and cluster affinity compare exactly"},pdfSemantics:{id:`${R}.pdf-semantics`,mode:"canonical-exact",ephemera:["objectNumber","producer","creationDate","modDate","subsetTag"],note:"canonical semantic PDF objects; container ephemera excluded"},rasterCheckpoint:{id:`${R}.raster-checkpoint`,mode:"tolerance",ephemera:[],note:"documented unavoidable raster comparison; explicit tolerance only"},benchmarkEvidence:{id:`${R}.benchmark-evidence`,mode:"sync-optimization-only",ephemera:[],note:"diagnostic evidence, not an equivalence basis"}};function Xe(e,t,n,r={}){let o=je[e];switch(o.mode){case "sync-optimization-only":throw new Error(`${o.id} is not an equivalence basis (${o.note})`);case "tolerance":{if(r.epsilon===void 0)throw new Error(`${o.id} requires an explicit epsilon`);return {equal:lt(t,n,r.epsilon)}}case "exact":case "canonical-exact":{let s=o.mode==="canonical-exact"?new Set(o.ephemera):new Set,a=V(t,s),i=V(n,s);return a===i?{equal:true}:{equal:false,left:a,right:i}}}}function Ke(e,t){let n=je[e];if(n.mode==="tolerance"||n.mode==="sync-optimization-only")throw new Error(`${n.id} has no canonical fingerprint (${n.mode})`);let r=n.mode==="canonical-exact"?new Set(n.ephemera):void 0;return Ve(t,r)}function lt(e,t,n){return typeof e=="number"&&typeof t=="number"?Number.isFinite(e)&&Number.isFinite(t)&&Math.abs(e-t)<=n:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,o)=>lt(r,t[o],n)):false}var dt=new Set([...c,...d]),ct=/^[0-9a-f]{16}$/,Jt=/^[0-9a-f]*$/;function Ge(e){let t=[],n=o=>t.push(o);e.formatVersion!==1&&n(`unsupported formatVersion ${e.formatVersion}`),e.documentId||n("documentId is required"),e.source.kind==="docx"&&!/^[0-9a-f]{64}$/.test(e.source.sha256)&&n("docx source requires a 64-hex sha256");let r=-1;e.steps.forEach((o,s)=>{let a=`step[${s}]`;dt.has(o.origin)||n(`${a}: unknown origin ${o.origin}`),(!Number.isInteger(o.baseRevision)||o.baseRevision<0)&&n(`${a}: baseRevision must be a non-negative integer`),o.baseRevision<r&&n(`${a}: baseRevision regressed below ${r}`);let i=o.expect;i.outcome==="applied"?(i.committedRevision===void 0?n(`${a}: applied step needs committedRevision`):i.committedRevision<=o.baseRevision?n(`${a}: committedRevision ${i.committedRevision} must exceed baseRevision ${o.baseRevision}`):r=i.committedRevision,i.modelChange&&qt(i.modelChange,a,n)):(i.committedRevision!==void 0&&n(`${a}: ${i.outcome} step must not commit a revision`),i.authoredStateHash!==void 0&&n(`${a}: ${i.outcome} step must not change authored state`)),i.authoredStateHash!==void 0&&!ct.test(i.authoredStateHash)&&n(`${a}: authoredStateHash must be 16-hex`),i.outputHash!==void 0&&!ct.test(i.outputHash)&&n(`${a}: outputHash must be 16-hex`);});for(let o of [...e.snapshots??[],...e.updates??[]])o.documentId!==e.documentId&&n(`envelope documentId ${o.documentId} != ${e.documentId}`),Jt.test(o.bytesHex)||n("envelope bytesHex must be hex"),o.bytesHex.length!==o.byteLength*2&&n(`envelope byteLength ${o.byteLength} disagrees with ${o.bytesHex.length/2} decoded bytes`);return {valid:t.length===0,errors:t}}function qt(e,t,n){dt.has(e.origin)||n(`${t}: modelChange origin ${e.origin} unknown`),e.toRevision<=e.fromRevision&&n(`${t}: modelChange revision must advance`);}function Qt(e,t){let n=Ge(e);if(!n.valid)return {ok:false,mismatches:n.errors};let r=[];return t.init(e),e.steps.forEach((o,s)=>{let a=`step[${s}]`,i=t.applyStep(o),d=o.expect;if(i.outcome!==d.outcome){r.push(`${a}: outcome ${i.outcome} != expected ${d.outcome}`);return}if(d.outcome==="applied"&&(i.committedRevision!==d.committedRevision&&r.push(`${a}: revision ${i.committedRevision} != expected ${d.committedRevision}`),d.authoredStateHash!==void 0))if(i.authoredState===void 0)r.push(`${a}: store returned no authored state to hash`);else {Xe("authoredState",i.authoredState,i.authoredState).equal||r.push(`${a}: authored state is not self-consistent`);let c=pt(i.authoredState);c!==d.authoredStateHash&&r.push(`${a}: authoredStateHash ${c} != expected ${d.authoredStateHash}`);}}),{ok:r.length===0,mismatches:r}}function pt(e){return Ke("authoredState",e)}var Zt=new Map([["embedRegular","regular"],["embedBold","bold"],["embedItalic","italic"],["embedBoldItalic","boldItalic"]]),en=32;function ft(e,t){let n=t.replace(/[^0-9a-fA-F]/g,"");if(n.length!==32)return null;let r=new Uint8Array(16);for(let a=0;a<16;a+=1){let i=Number.parseInt(n.slice(a*2,a*2+2),16);if(Number.isNaN(i))return null;r[15-a]=i;}let o=new Uint8Array(e),s=Math.min(en,o.length);for(let a=0;a<s;a+=1)o[a]=o[a]^r[a%16];return o}var ze=(e,t)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes??[])if(n.localName===t)return n.value}},ut=e=>e.kind==="textValue"?[]:e.children??[],mt=e=>e.kind==="textValue"||!("localName"in e)?"":e.localName;function tn(e,t,n){for(let r of e.relationships.get(t)??[]){if(r.id!==n)continue;if(r.targetMode==="External")return null;let o=w(t,r.rawTarget);return o.ok?o.partName:null}return null}function nn(e,t,n={}){if(!t)return [];let r=n.maxFontBytes??16*1024*1024,o=n.maxFonts??64,s=[],a=new Map,i=d=>{if(!(s.length>=o)){if(mt(d)==="font"){let l=ze(d,"name");if(l&&l.length<=128)for(let c of ut(d)){if(s.length>=o)return;let p=Zt.get(mt(c));if(!p)continue;let u=ze(c,"id"),m=ze(c,"fontKey");if(!u||!m)continue;let f=tn(e,t.name,u);if(!f)continue;let y=e.partBytes.get(f);if(!y||y.length===0||y.length>r)continue;let g=a.get(f);if(g){s.push({family:l,style:p,bytes:g,partName:f});continue}let v=ft(y,m);v&&(a.set(f,v),s.push({family:l,style:p,bytes:v,partName:f}));}}for(let l of ut(d))i(l);}};return i(t.root),s}function yt(e){if(e.kind!=="textValue")for(let t of e.children){if(t.kind==="textValue")continue;if(t.kind==="hyperlink"){let r=Ia(t);if(r!==void 0&&r.length>0)return r}let n=yt(t);if(n!==void 0)return n}}function rn(e){let t="",n=false,r=o=>{if(!(n||o.kind==="textValue")){if(o.kind==="tab"||o.localName==="ptab"||o.localName==="tab"){n=true;return}if(o.kind==="text"||o.localName==="t"){for(let s of o.children)s.kind==="textValue"&&(t+=s.value);return}for(let s of o.children)r(s);}};return r(e),Jc(t)}function on(e,t,n,r){let o=n.filter(d=>{if(r.has(d.blockId))return false;let l=d.level+1;return l>=t.instruction.outlineStart&&l<=t.instruction.outlineEnd}),s=new Set(o.map(d=>d.blockId)),a=zc(e),i=new Map;for(let d of o){let l=Jc(d.text),c=i.get(l);c?c.push(d.blockId):i.set(l,[d.blockId]);}return t.resultParagraphIds.map(d=>{let l=va(e,d);if(!l||l.kind==="textValue")return null;let c=yt(l),p=c===void 0?void 0:a.get(c);if(p&&s.has(p.paragraphId)){let f=i.get(Jc(o.find(g=>g.blockId===p.paragraphId)?.text??"")),y=f?.indexOf(p.paragraphId)??-1;return f&&y>=0&&f.splice(y,1),p.paragraphId}let u=rn(l);if(u.length===0)return null;let m=i.get(u);return !m||m.length===0?null:m.shift()??null})}function C(e){return e.namespaceUri===ca?e.localName:`{${e.namespaceUri}}${e.localName}`}function I(e){let t=[];for(let n of e.attributes)t.push(n.namespaceUri===""||n.namespaceUri===ca?`${n.localName}=${n.value}`:`{${n.namespaceUri}}${n.localName}=${n.value}`);return t.sort(),t}function ht(e,t){let n=I(e),r=n.length>0?`${C(e)}(${n.join(",")})`:C(e);if(t>=U$1)return r;let o=[];for(let s of e.children){if(s.kind==="textValue"){s.value!==""&&o.push(`#${s.value}`);continue}o.push(ht(s,t+1));}return o.sort(),o.length>0?`${r}[${o.join(",")}]`:r}function gt(e){if(!e)return [];let t=[];for(let n of e.children)n.namespaceUri===ca&&t.push(ht(n,1));return t.sort(),t}function We(e){if(e.kind==="textValue")return e.value;if(e.kind==="tab")return " ";if(e.kind==="hardBreak")return Xb(e);if(e.kind==="drawing")return jc();if(e.kind==="runProperties"||e.kind==="paragraphProperties"||e.kind==="generic")return "";if(e.kind==="hyperlink"||Hb(e)){let n="",r=e.kind==="hyperlink"?e.children:Jb(e)??[];for(let o of r)n+=We(o);return n}let t="";for(let n of e.children)t+=We(n);return t}function x(e,t){let n=new Map(e);for(let r of t.namespaceBindings)n.set(r.prefix,r.namespaceUri);return n}function j(e,t){try{return ma(e,t)}catch(n){if(n instanceof ga&&n.reason==="undeclared-prefix")return `generic-refusal:undeclared-prefix:{${e.namespaceUri}}${e.localName}`;throw n}}function Ye(e,t,n=la){if(e.kind==="textValue")return;if(e.kind==="runProperties"||e.kind==="paragraphProperties"){let o=x(n,e),s=[];for(let a of e.children)a.namespaceUri!==ca&&s.push(j(a,o));s.sort(),t.push(...s);return}if(e.kind==="generic"){t.push(j(e,n));return}if(Hb(e)){t.push(na(e));return}if(e.kind==="bookmarkStart"||e.kind==="bookmarkEnd"){t.push(ma(e,n));return}if(e.kind==="drawing"){t.push(xt(e));return}if(ba(e.kind))return;let r=x(n,e);for(let o of e.children)Ye(o,t,r);}function an(e){return `hyperlink(${e.attributes.map(n=>`${n.namespaceUri}|${n.localName}=${n.value}`).sort().join(",")})`}function sn(e){for(let t of e.children)if(t.kind==="pictureBlipFill")for(let n of t.children){if(n.kind!=="pictureBlip")continue;let r=n.attributes.find(s=>s.localName==="embed"&&s.namespaceUri===fa)?.value,o=n.attributes.find(s=>s.localName==="link"&&s.namespaceUri===fa)?.value;if(r!==void 0)return `embed=${r}`;if(o!==void 0)return `link=${o}`}}function te(e,t,n){if(e.kind==="textValue")return `#${e.value}`;if(t>=U$1)return C(e);let r=x(n,e);if(e.kind==="generic")return j(e,r);let o=I(e),s=o.length>0?`${C(e)}(${o.join(",")})`:C(e),a=[];for(let i of e.children)i.kind!=="textValue"&&a.push(te(i,t+1,r));return a.sort(),a.length>0?`${s}[${a.join(",")}]`:s}function ln(e,t,n){let r=x(n,e),o=[];for(let s of e.children)if(s.kind!=="textValue"){if(s.kind==="pictureBlipFill"){let a=s.children,i=a.find(l=>l.kind==="pictureBlip"),d=a.filter(l=>l.kind!=="pictureBlip").map(l=>te(l,t+1,r));if(d.sort(),i&&i.kind==="pictureBlip"){let l=I(i),c=l.length>0?`pictureBlip(${l.join(",")})`:"pictureBlip";o.push(d.length>0?`${c}[${d.join(",")}]`:c);}else for(let l of a)o.push(te(l,t+1,r));continue}o.push(te(s,t+1,r));}return o.sort(),o}function Je(e,t,n){if(e.kind==="textValue")return `#${e.value}`;if(t>=U$1)return C(e);let r=x(n,e);if(e.kind==="drawingDocPr"){let i=I(e);return i.length>0?`docPr(${i.join(",")})`:"docPr"}if(e.kind==="picture"){let i=sn(e),d=ln(e,t+1,r),l=i===void 0?"picture":`picture(${i})`;return d.length>0?`${l}[${d.join(",")}]`:l}let o=I(e),s=o.length>0?`${C(e)}(${o.join(",")})`:C(e),a=[];for(let i of e.children){if(i.kind==="picture"){a.push(Je(i,t+1,r));continue}if(i.kind==="generic"){a.push(j(i,r));continue}i.kind!=="textValue"&&a.push(Je(i,t+1,r));}return a.length>0?`${s}[${a.join(",")}]`:s}function xt(e){let t=x(la,e),n=e.children.find(i=>i.kind==="inlineDrawing"||i.kind==="anchoredDrawing");if(!n||n.kind==="textValue")return `drawing(${I(e).join(",")})`;let r=x(t,n),o=I(n),s=o.length>0?`${n.kind}(${o.join(",")})`:n.kind,a=[];for(let i of n.children){if(i.kind==="generic"){a.push(j(i,r));continue}i.kind!=="textValue"&&a.push(Je(i,1,r));}return a.length>0?`drawing[${s};${a.join(";")}]`:`drawing[${s}]`}function cn(e,t,n){let r=e.children.find(c=>c.kind==="paragraphProperties"),o=[],s="",a=[],i=x(la,e),d=(c,p)=>{if(c.kind==="run"){let u=x(p,c),m=c.children.find(f=>f.kind==="runProperties");o.push(gt(m)),s+=We(c);for(let f of c.children)Ye(f,a,u);return}if(c.kind==="drawing"){a.push(xt(c));return}if(c.kind==="hyperlink"){a.push(an(c));let u=x(p,c);for(let m of c.children)d(m,u);return}if(c.kind==="contentControl"){a.push(na({...c,children:c.children.filter(m=>m.kind!=="contentControlContent")}));let u=x(p,c);for(let m of c.children){if(m.kind!=="contentControlContent")continue;let f=x(u,m);for(let y of m.children)d(y,f);}return}Ye(c,a,p);};for(let c of e.children)d(c,i);let l=Qc(e);return {ordinal:t,path:n,paraId:l===null?null:l.toUpperCase(),text:s,paragraphProperties:gt(r),runProperties:o,genericStructure:a}}function dn(e){if(e.localName==="hdr"||e.localName==="ftr"||e.kind==="body")return e;for(let t of e.children)if(t.kind!=="textValue"&&(t.kind==="body"||t.localName==="hdr"||t.localName==="ftr"))return t;return e}function Nt(e,t,n,r,o,s){if(s>U$1)return;let a=0;for(let i of e.children){if(i.kind==="textValue"){i.value.trim()!==""&&o.push(`${t}/#text ${i.value}`);continue}let d=t===""?String(a):`${t}/${a}`;if(a+=1,i.kind==="paragraph"){n.push(i),r.push(d),o.push(`${d} p`);continue}let l=I(i);o.push(l.length>0?`${d} ${C(i)}(${l.join(",")})`:`${d} ${C(i)}`),Nt(i,d,n,r,o,s+1);}}function Ot(e){let t=dn(e.root),n=[],r=[],o=[];Nt(t,"",n,r,o,0);let s=n.map((a,i)=>cn(a,i,r[i]));return {partName:e.name,paragraphs:s,structure:o}}function pn(e){let t=[];for(let n of e){let r=Ot(n);r&&t.push(r);}return {stories:t}}function un(e,t){let n=[],r=(s,a,i)=>{n.push({path:s,before:JSON.stringify(a)??"undefined",after:JSON.stringify(i)??"undefined"});};e.stories.length!==t.stories.length&&r("stories.length",e.stories.length,t.stories.length);let o=Math.min(e.stories.length,t.stories.length);for(let s=0;s<o;s+=1){let a=e.stories[s],i=t.stories[s],d=p=>`${a.partName}${p}`;a.paragraphs.length!==i.paragraphs.length&&r(d(".paragraphs.length"),a.paragraphs.length,i.paragraphs.length);let l=Math.min(a.paragraphs.length,i.paragraphs.length);for(let p=0;p<l;p+=1){let u=a.paragraphs[p],m=i.paragraphs[p];u.text!==m.text&&r(d(`.p[${p}].text`),u.text,m.text),u.path!==m.path&&r(d(`.p[${p}].path`),u.path,m.path),u.paraId!==m.paraId&&r(d(`.p[${p}].paraId`),u.paraId,m.paraId),JSON.stringify(u.paragraphProperties)!==JSON.stringify(m.paragraphProperties)&&r(d(`.p[${p}].paragraphProperties`),u.paragraphProperties,m.paragraphProperties),JSON.stringify(u.runProperties)!==JSON.stringify(m.runProperties)&&r(d(`.p[${p}].runProperties`),u.runProperties,m.runProperties),JSON.stringify(u.genericStructure)!==JSON.stringify(m.genericStructure)&&r(d(`.p[${p}].genericStructure`),u.genericStructure,m.genericStructure);}a.structure.length!==i.structure.length&&r(d(".structure.length"),a.structure.length,i.structure.length);let c=Math.min(a.structure.length,i.structure.length);for(let p=0;p<c;p+=1)a.structure[p]!==i.structure[p]&&r(d(`.structure[${p}]`),a.structure[p],i.structure[p]);}return n}var X="http://schemas.openxmlformats.org/wordprocessingml/2006/main",yn="http://schemas.openxmlformats.org/package/2006/relationships",Rt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",A="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",gn="application/vnd.openxmlformats-package.relationships+xml",hn="http://schemas.openxmlformats.org/package/2006/content-types",Ct="/[Content_Types].xml",b="/word/numbering.xml",bt=[{text:"\uF0B7",font:"Symbol"},{text:"o",font:"Courier New"},{text:"\uF0A7",font:"Wingdings"}],Et=["decimal","lowerLetter","lowerRoman"],qe=9;function Tt(e,t){let n=720*(t+1),r='<w:start w:val="1"/>';if(e==="bullet"){let a=bt[t%bt.length];return `<w:lvl w:ilvl="${t}">${r}<w:numFmt w:val="bullet"/><w:lvlText w:val="${a.text}"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="${n}" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:ascii="${a.font}" w:hAnsi="${a.font}" w:hint="default"/></w:rPr></w:lvl>`}let o=Et[t%Et.length],s=o==="lowerRoman";return `<w:lvl w:ilvl="${t}">${r}<w:numFmt w:val="${o}"/><w:lvlText w:val="%${t+1}."/><w:lvlJc w:val="${s?"right":"left"}"/><w:pPr><w:ind w:left="${n}" w:hanging="${s?180:360}"/></w:pPr></w:lvl>`}function xn(e,t){let n=Array.from({length:qe},(r,o)=>Tt(e,o)).join("");return `<w:abstractNum w:abstractNumId="${t}"><w:multiLevelType w:val="${e==="bullet"?"hybridMultilevel":"multilevel"}"/>${n}</w:abstractNum>`}function Nn(){let e=ra(`<w:numbering xmlns:w="${X}"></w:numbering>`,{name:b,contentType:A});return e.ok?e.part:null}var P=(e,t)=>{let n=[];for(let r of e.children)r.kind==="textValue"||r.localName!==t||r.namespaceUri===X&&n.push(r);return n},N=(e,t)=>e.attributes.find(n=>n.localName===t)?.value;function vt(e,t){let n=ra(`<w:numbering xmlns:w="${X}">${e}</w:numbering>`,{name:b,contentType:A});if(!n.ok)return null;let r=[];for(let o of n.part.root.children)o.kind!=="textValue"&&r.push(o);if(r.length!==t.length)return null;for(let o=0;o<t.length;o+=1){let s=r[o],a=t[o];if(s.namespaceUri!==X||s.localName!==a.localName||a.attribute&&N(s,a.attribute.localName)!==a.attribute.value)return null}return r}var Pt=["numPicBullet","abstractNum","num","numIdMacAtCleanup"];function It(e,t,n){let r=t.indexOf(n);if(r===-1)return e.length;let o=0;return e.forEach((s,a)=>{if(s.kind==="textValue")return;let i=t.indexOf(s.localName);i!==-1&&i<=r&&(o=a+1);}),o}function kt(e,t){let n=0;for(let r of e){let o=N(r,t);!o||!/^\d{1,9}$/.test(o)||(n=Math.max(n,Number(o)));}return n+1}function On(e,t){let n=e.parts.get(b),r=n??Nn();if(!r)return null;let o=r.root,s=P(o,"abstractNum"),a=P(o,"num"),i=t==="bullet"?"bullet":"decimal",d=s.find(O=>{let D=N(O,"abstractNumId");if(!D||!/^\d{1,9}$/.test(D))return false;let et=P(O,"lvl").find(nt=>N(nt,"ilvl")==="0"||N(nt,"ilvl")===void 0),tt=et?P(et,"numFmt")[0]:void 0;return tt!==void 0&&N(tt,"val")===i}),c=(d?Number(N(d,"abstractNumId")):null)??kt(s,"abstractNumId"),p=kt(a,"numId"),u=d===void 0,m=vt((u?xn(t,c):"")+`<w:num w:numId="${p}"><w:abstractNumId w:val="${c}"/></w:num>`,u?[{localName:"abstractNum",attribute:{localName:"abstractNumId",value:String(c)}},{localName:"num",attribute:{localName:"numId",value:String(p)}}]:[{localName:"num",attribute:{localName:"numId",value:String(p)}}]);if(!m)return null;let f=ta(r),y=m.map(O=>ne(O,f)),g=u?y[0]:void 0,v=y[u?1:0];if(u&&!g||!v)return null;let ae=r;if(g){let O=ya(r,o.id,It(o.children,Pt,"abstractNum"),[g]);if(!O.ok)return null;ae=O.part;}let Ze=ya(ae,o.id,It(ae.root.children,Pt,"num"),[v]);if(!Ze.ok)return null;let se=Object.freeze({...e,parts:new Map([...e.parts,[b,Ze.part]])});if(!n){let O=En(se);if(!O)return null;let D=Sn(O);if(!D)return null;se=D;}return {pkg:se,numId:String(p)}}var Rn=["nsid","multiLevelType","tmpl","name","styleLink","numStyleLink","lvl"];function wt(e){let t=N(e,"ilvl");return t===void 0||!/^\d{1,9}$/.test(t)?null:Number(t)}function Cn(e,t){let n=0;return e.forEach((r,o)=>{if(r.kind!=="textValue"){if(r.localName==="lvl"&&r.namespaceUri===X){(wt(r)??0)<t&&(n=o+1);return}Rn.includes(r.localName)&&(n=o+1);}}),n}function bn(e,t,n,r){if(!Number.isInteger(n)||n<0||n>=qe||t.length===0||t.length>64)return null;let o=e.parts.get(b);if(!o)return null;let s=o.root,a=P(s,"num").find(f=>N(f,"numId")===t),i=a?P(a,"abstractNumId")[0]:void 0,d=i?N(i,"val"):void 0;if(!d)return null;let l=P(s,"abstractNum").find(f=>N(f,"abstractNumId")===d);if(!l||P(l,"numStyleLink").length>0)return null;let c=P(l,"lvl");if(c.some(f=>wt(f)===n))return e;if(c.length>=qe)return null;let p=vt(Tt(r,n),[{localName:"lvl",attribute:{localName:"ilvl",value:String(n)}}]);if(!p)return null;let u=ta(o),m=ya(o,l.id,Cn(l.children,n),[ne(p[0],u)]);return m.ok?Object.freeze({...e,parts:new Map([...e.parts,[b,m.part]])}):null}function ne(e,t){return e.kind==="textValue"?{...e,id:t()}:{...e,id:t(),children:e.children.map(n=>ne(n,t))}}function En(e){let t=e.mainDocumentPart,n=Pn(t),r=e.parts.get(n),o=In(e),s=ra(`<Relationships xmlns="${yn}"><Relationship Id="${o}" Type="${Rt}" Target="numbering.xml"/></Relationships>`,{name:n,contentType:gn});if(!s.ok)return null;let a=e.relationships.get(t)??[],i={ownerPart:t,id:o,type:Rt,rawTarget:"numbering.xml",targetMode:"Internal",order:a.reduce((u,m)=>Math.max(u,m.order),-1)+1},d=new Map([...e.relationships,[t,[...a,i]]]);if(!r)return Object.freeze({...e,parts:new Map([...e.parts,[n,s.part]]),relationships:d});let l=ta(r),c=s.part.root.children[0];if(!c)return null;let p=ya(r,r.root.id,r.root.children.length,[ne(c,l)]);return p.ok?Object.freeze({...e,parts:new Map([...e.parts,[n,p.part]]),relationships:d}):null}function Pn(e){let t=e.lastIndexOf("/");return `${e.slice(0,t)}/_rels/${e.slice(t+1)}.rels`}function In(e){let t=0;for(let n of e.relationships.values())for(let r of n){let o=/^rId(\d{1,9})$/.exec(r.id);o&&(t=Math.max(t,Number(o[1])));}for(let n of e.externalTargets){let r=/^rId(\d{1,9})$/.exec(n.id);r&&(t=Math.max(t,Number(r[1])));}return `rId${t+1}`}var kn=`<Override PartName="${b}" ContentType="${A}"/>`;function Sn(e){let t=e.contentTypes.overrides.get(u(b));if(t===A)return e;if(t!==void 0)return null;let n=e.partBytes.get(Ct);if(!n)return null;let r=strFromU8(n),o=St(r);if(!o)return null;let s=r.lastIndexOf(`</${o.rootName}>`);if(s===-1)return null;let a=r.slice(0,s)+kn+r.slice(s),i=St(a);if(!i||i.rootName!==o.rootName)return null;let d=[...o.children,_t("Override",{PartName:b,ContentType:A})];return i.children.length!==d.length||i.children.some((l,c)=>l!==d[c])?null:Object.freeze({...e,partBytes:new Map([...e.partBytes,[Ct,strToU8(a)]]),contentTypes:Object.freeze({defaults:e.contentTypes.defaults,overrides:new Map([...e.contentTypes.overrides,[u(b),A]])})})}function St(e){let t=V$1(e);if(!t.ok)return null;let n=t.nodes.filter(i=>i.type==="element");if(n.length!==1)return null;let r=n[0],o=r.name.indexOf(":"),s=o===-1?"":r.name.slice(0,o);if(r.name.slice(o+1)!=="Types"||r.attributes[s?`xmlns:${s}`:"xmlns"]!==hn)return null;let a=[];for(let i of r.children)i.type==="element"&&a.push(_t(i.name,i.attributes));return {rootName:r.name,children:a}}function _t(e,t){let n=Object.entries(t).map(([r,o])=>`${r}=${o}`).sort();return [e,...n].join("")}function re(e){return e!=null&&e.kind!=="textValue"}function Qe(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===ca&&n.localName===t)return n;return null}function oe(e,t){for(let n of e.attributes)if(n.namespaceUri===ca&&n.localName===t)return n.value}function $(e,t){let n=Qe(e,t);if(!n)return false;let r=oe(n,"val");return r===void 0?true:r!=="0"&&r!=="false"&&r!=="off"}var At=Object.freeze({trackRevisions:false,restrictedToTrackedChanges:false,doNotTrackMoves:false,doNotTrackFormatting:false});function Tn(e){if(!re(e))return At;let t=Qe(e,"documentProtection"),n=t===null?void 0:oe(t,"enforcement"),r=n!==void 0&&n!=="0"&&n!=="false"&&n!=="off";return {trackRevisions:$(e,"trackRevisions"),restrictedToTrackedChanges:r&&t!==null&&oe(t,"edit")==="trackedChanges",doNotTrackMoves:$(e,"doNotTrackMoves"),doNotTrackFormatting:$(e,"doNotTrackFormatting")}}var $t=Object.freeze({doNotShadeFormData:false});function vn(e){return re(e)?{doNotShadeFormData:$(e,"doNotShadeFormData")}:$t}function wn(e,t){let n=e.parts.get(t.storyPartName);if(!n)return {ok:false,reason:`no story part named ${t.storyPartName}`};let r=[];for(let d of ve(n.root)){let l=te$1(d.node).tag;if(l===void 0||l.length===0)continue;let c=t.decide(l);c!=="keep"&&r.push({nodeId:d.node.id,policy:c});}let o=n,s=0,a=0;for(let{nodeId:d,policy:l}of r){let c=wa(o,d);if(!c)continue;if(l==="remove"){let g=Aa(o,d,{deferValidation:true});if(!g.ok)return {ok:false,reason:`a node could not be removed: ${Dt(g)}`};o=g.part,a+=1;continue}let p=c.children.find(g=>g.id===d);if(!p)continue;let u=re$1(p),m=u?u.children:[],f=c.children.flatMap(g=>g.id===d?m:[g]),y=xa(o,c.id,f,{deferValidation:true});if(!y.ok)return {ok:false,reason:`a node could not be unwrapped: ${Dt(y)}`};o=y.part,s+=1;}let i=o===n?e:qb(e,o);if(!i.parts.has(t.storyPartName))return {ok:false,reason:"the story went missing during the export"};for(let d of t.namespaces)for(let l of An(i,t.storyPartName,d)){let c=lf(i,l.itemId),p=ff(i,l.partName,c);if(p.pkg===i&&p.removed.length===0&&!_n(i,l.partName,c))return {ok:false,reason:`the payloads in ${d} could not be removed`};if(i=p.pkg,c.size>0)continue;let u=$n(i,l);if(!u.ok)return {ok:false,reason:`the payload store for ${d} could not be removed`};i=u.pkg;}return {ok:true,pkg:i,unwrapped:s,removed:a}}function _n(e,t,n){return bf(e,t).every(r=>n.has(r.id))}function Dt(e){return e.issues.map(t=>t.code).join(", ")||"the edit was refused"}function An(e,t,n){return Ze(e,t).filter(r=>r.namespaceUri===n)}function $n(e,t){let n=wb(e,t.partName);if(!n.ok)return {pkg:e,ok:false};let r=wb(n.pkg,t.propsPartName);return r.ok?{pkg:r.pkg,ok:true}:{pkg:e,ok:false}}var ie="http://purl.org/dc/elements/1.1/",Mt="http://schemas.openxmlformats.org/package/2006/metadata/core-properties",Lt="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties";var Ip=Object.freeze({});function k(e,t,n){if(e.kind!=="textValue")for(let r of e.children){if(r.kind==="textValue"||r.namespaceUri!==t||r.localName!==n)continue;let o=r.children.find(a=>a.kind==="textValue");if(!o||o.kind!=="textValue")return;let s=o.value.trim();return s.length===0?void 0:s.length>4096?s.slice(0,4096):s}}function kp(e,t){let n={};if(e&&e.kind!=="textValue"){let r=k(e,ie,"title");r!==void 0&&(n.title=r);let o=k(e,ie,"creator");o!==void 0&&(n.creator=o);let s=k(e,ie,"subject");s!==void 0&&(n.subject=s);let a=k(e,ie,"description");a!==void 0&&(n.description=a);let i=k(e,Mt,"keywords");i!==void 0&&(n.keywords=i);let d=k(e,Mt,"lastModifiedBy");d!==void 0&&(n.lastModifiedBy=d);}if(t&&t.kind!=="textValue"){let r=k(t,Lt,"Company");r!==void 0&&(n.company=r);let o=k(t,Lt,"Manager");o!==void 0&&(n.manager=o);}return n}
|
|
2
|
-
export{Xe as A,Ke as B,Ge as C,Qt as D,pt as E,ft as F,nn as G,on as H,Ot as I,pn as J,un as K,On as L,bn as M,At as N,Tn as O,$t as P,vn as Q,Ip as R,kp as S,wn as T,Ft as a,it as b,J as c,S as d,q as e,Q as f,h as g,Vt as h,T as i,U as j,Z as k,H as l,ee as m,Le as n,Fe as o,Be as p,Gt as q,zt as r,He as s,st as t,Wt as u,Ue as v,Yt as w,V as x,Ve as y,je as z};
|