@docx-editor.dev/core 2.31.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +16 -16
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +17 -15
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-BWvaVEhD.d.ts → chrome-print-CznJ0ucN.d.ts} +58 -23
- package/dist/chunk-25EXMBV2.cjs +5 -0
- package/dist/chunk-2CWQY27B.cjs +1 -0
- package/dist/chunk-3IEXDEFH.cjs +7 -0
- package/dist/chunk-65XBN67F.cjs +2 -0
- package/dist/{chunk-5JPIEN54.cjs → chunk-6NVZNB7O.cjs} +2 -2
- package/dist/chunk-6UDJUI3W.cjs +2 -0
- package/dist/chunk-ACLR4DMK.js +1 -0
- package/dist/{chunk-2E2RPEKX.js → chunk-B2BEELUE.js} +1 -1
- package/dist/chunk-DDFHKQFU.js +30 -0
- package/dist/{chunk-MOYYRVFV.cjs → chunk-E4IAO4CY.cjs} +1 -1
- package/dist/chunk-ETDZFNMI.js +2 -0
- package/dist/chunk-FDSL5OJU.cjs +30 -0
- package/dist/chunk-FS7CMYLT.js +4 -0
- package/dist/chunk-GDS24SZN.js +30 -0
- package/dist/chunk-GIY6NT2X.js +5 -0
- package/dist/chunk-GWM3AKUD.js +18 -0
- package/dist/chunk-HDOXACHP.js +2 -0
- package/dist/chunk-IILEENID.js +1 -0
- package/dist/chunk-L5TYBFDB.js +1 -0
- package/dist/chunk-MNF2K7NN.cjs +30 -0
- package/dist/chunk-O324RB6R.cjs +1 -0
- package/dist/chunk-OKMEMSKB.cjs +1 -0
- package/dist/chunk-QXJKYNYZ.js +1 -0
- package/dist/chunk-RALTVLB6.js +2 -0
- package/dist/chunk-SRVKFUFI.js +3 -0
- package/dist/chunk-TELQ52LG.cjs +1 -0
- package/dist/chunk-TJHE5EET.cjs +1 -0
- package/dist/chunk-UMMRURPE.js +7 -0
- package/dist/chunk-WN7ICTA5.js +1 -0
- package/dist/{chunk-XSTGE3NI.cjs → chunk-XJYZVGQR.cjs} +1 -1
- package/dist/chunk-ZGTIE3QJ.cjs +4 -0
- package/dist/chunk-ZOZI27AW.cjs +18 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +20 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.cjs +1 -1
- package/dist/collaboration.d.ts +5 -5
- package/dist/collaboration.js +1 -1
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +13 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +15 -12
- package/dist/contracts/types.d.ts +135 -2
- package/dist/{custom-node-writes-TeUvMP13.d.ts → custom-node-writes-CLJKGD9t.d.ts} +7 -2
- package/dist/{diagnostic-context-DJ0P1uZE.d.ts → diagnostic-context-BtDUY3v2.d.ts} +1 -1
- package/dist/{diagnostic-hints-C9JlLz1L.d.ts → diagnostic-hints-DK8-V0fk.d.ts} +2 -2
- package/dist/{document-protection-C8x3P2J6.d.ts → document-protection-NaniLHWF.d.ts} +1 -1
- package/dist/{editor-B2ShlO23.d.ts → editor-DZwOTmlR.d.ts} +104 -239
- package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
- package/dist/{editor-scope-C7ke1KJG.d.ts → editor-scope-B3L-1ALc.d.ts} +1 -1
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +2 -2
- package/dist/editor.d.ts +74 -30
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +9 -15
- package/dist/export.js +1 -1
- package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
- package/dist/{font-resolver-CWh40DYp.d.ts → font-resolver-BlQNGdvR.d.ts} +1 -1
- package/dist/{headless-document-view-qOpaCF82.d.ts → headless-document-view-Bcz9_Qva.d.ts} +115 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +27 -25
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-CWS3j0Xr.d.ts → layout-shaping-E5J4Z1Gf.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +24 -17
- package/dist/layout.js +1 -1
- package/dist/{note-properties-QsKh24sM.d.ts → note-properties-Ds5R2_3F.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +11 -7
- package/dist/output.js +1 -1
- package/dist/{protocol-COZJUKUY.d.ts → protocol-DKa4qt7F.d.ts} +75 -5
- package/dist/{review-paragraph-order-C_QbCKcH.d.ts → review-paragraph-order-Dc17w_6v.d.ts} +1 -1
- package/dist/revision-projection-Cn6rZJ7H.d.ts +258 -0
- package/dist/{semantic-cell-selection-Cub9FDa8.d.ts → semantic-cell-selection-BaUR0iJ4.d.ts} +2 -2
- package/dist/{semantic-interaction-dApRIYpt.d.ts → semantic-interaction-CJoHLoOl.d.ts} +1 -1
- package/dist/{semantic-paint-DLzA8sjP.d.ts → semantic-paint-BPw_n0li.d.ts} +7 -4
- package/dist/{semantic-record-queries-3yp9o11g.d.ts → semantic-record-queries-C0rJ3sB4.d.ts} +1 -1
- package/dist/{semantic-records-B-akgRch.d.ts → semantic-records-BvN-WWst.d.ts} +216 -406
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +13 -14
- package/dist/store.js +1 -1
- package/dist/{types-barrel-CkF2JbU4.d.ts → tree-op-types-C_S2niXW.d.ts} +117 -26
- package/dist/{tree-package-store-B8l8DX3Z.d.ts → tree-package-store-CRHvMyNj.d.ts} +2 -2
- package/dist/{tree-session-contract-DeLRqohz.d.ts → tree-session-contract-D1awo_dA.d.ts} +5 -5
- package/dist/unsupported-elements-CVos5cqe.d.ts +23 -0
- package/docs/accept-reject-without-scrolling.md +95 -0
- package/docs/comment-on-found-text.md +72 -0
- package/docs/custom-review-cards.md +178 -0
- package/docs/highlight-ranges.md +48 -0
- package/docs/index.md +36 -0
- package/docs/propose-rewrite.md +247 -0
- package/docs/tracked-replacement.md +68 -0
- package/package.json +3 -2
- package/dist/chunk-243W4WW2.cjs +0 -2
- package/dist/chunk-4S24UOPG.js +0 -30
- package/dist/chunk-5SO5QDMV.cjs +0 -2
- package/dist/chunk-6IDOVU6L.cjs +0 -1
- package/dist/chunk-6JIJOZDW.js +0 -1
- package/dist/chunk-BTQKU64Q.cjs +0 -1
- package/dist/chunk-DBOOTED4.cjs +0 -30
- package/dist/chunk-EOTAXOJY.cjs +0 -5
- package/dist/chunk-FDAKJ2SJ.cjs +0 -30
- package/dist/chunk-FNNOJNGY.js +0 -3
- package/dist/chunk-FT33HRZP.js +0 -5
- package/dist/chunk-HC6YNKUI.cjs +0 -1
- package/dist/chunk-HZ66UCIS.js +0 -2
- package/dist/chunk-IBRBNT37.cjs +0 -1
- package/dist/chunk-IVIN7X43.js +0 -30
- package/dist/chunk-LZY6B6IV.js +0 -4
- package/dist/chunk-N6B3BXCL.js +0 -1
- package/dist/chunk-Q5K2GGNG.js +0 -2
- package/dist/chunk-R2XINWVE.js +0 -7
- package/dist/chunk-SUEXVBPR.js +0 -1
- package/dist/chunk-T2QQHG5C.js +0 -18
- package/dist/chunk-VWIJKH4A.js +0 -1
- package/dist/chunk-WO4V6PNS.cjs +0 -18
- package/dist/chunk-XMJKFURD.cjs +0 -4
- package/dist/chunk-YQWMI6J5.cjs +0 -7
- package/dist/chunk-ZCJS7D7S.js +0 -2
- package/dist/omml-equation-BsLAa2lX.d.ts +0 -115
package/README.md
CHANGED
|
@@ -114,6 +114,30 @@ Treat DOCX files as untrusted input. The engine validates URLs and limits XML en
|
|
|
114
114
|
|
|
115
115
|
Anything you render from document data (a font name, a hyperlink target, a comment body) is still attacker-controlled at your boundary. Render it as text; do not build markup or URLs from it.
|
|
116
116
|
|
|
117
|
+
## Which API for which job
|
|
118
|
+
|
|
119
|
+
| Job | Use |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| Build a review UI in the browser | The React or Vue adapter hooks, plus the review hooks and `DocxEditorReview` from `@docx-editor.dev/pro/react` or `@docx-editor.dev/pro/vue`. |
|
|
122
|
+
| Edit in a headless, server, or agent pipeline | The editing API in `@docx-editor.dev/editor-api`, which follows the Office.js object model. |
|
|
123
|
+
|
|
124
|
+
| Task | Browser host (React or Vue) | Headless, server, or agent |
|
|
125
|
+
| --- | --- | --- |
|
|
126
|
+
| [Comment on found text](https://www.docx-editor.dev/docs/2.x/recipes/comment-on-found-text) | `editor.findMatches`, `editor.selectMatch`, then `useReview().comment` | `body.search`, then `Range.insertComment` |
|
|
127
|
+
| Reply to a thread | `useReview().reply(item, text)` | `Comment.reply(text)` |
|
|
128
|
+
| [Record a tracked replacement](https://www.docx-editor.dev/docs/2.x/recipes/tracked-replacement) | Suggesting mode, then `editor.exec({ type: 'replaceMatch', match, text })` | `document.changeTrackingMode = 'TrackMineOnly'`, then `Range.insertText(text, 'Replace')` |
|
|
129
|
+
| [Propose an AI rewrite as tracked changes](https://www.docx-editor.dev/docs/2.x/recipes/propose-rewrite) | The same code through `DocxEditor.createBrowser` from `@docx-editor.dev/editor-api/browser` | `prepareRewrite` from `@docx-editor.dev/editor-api/agent` |
|
|
130
|
+
| [Accept or reject a change](https://www.docx-editor.dev/docs/2.x/recipes/accept-reject-without-scrolling) | `useReview().accept(item)` or `useReview().reject(item)` | `Revision.accept()` or `Revision.reject()` |
|
|
131
|
+
| [Open or reveal a change without scrolling](https://www.docx-editor.dev/docs/2.x/recipes/accept-reject-without-scrolling) | `useReview().setActive(key, { reveal: false })` | Not applicable: no viewport |
|
|
132
|
+
| [Highlight ranges](https://www.docx-editor.dev/docs/2.x/recipes/highlight-ranges) | `useHighlights(name, source, options)` | Not applicable |
|
|
133
|
+
| [Custom review rail cards](https://www.docx-editor.dev/docs/2.x/recipes/custom-review-cards) | `DocxEditorReview` with `preset` set to `false`, `useReview().items`, `useStackedReviewPositions`, and `useReviewRailMetrics` | Not applicable |
|
|
134
|
+
| Comment-on-selection button | `DocxEditorReview.AddComment` as a direct child of `DocxEditorReview`, or `useEditorCommand('review.addComment')` | Not applicable |
|
|
135
|
+
| Page setup and paragraph dialogs from a custom toolbar | `DocxEditor.PageSetupDialog` or `DocxEditor.ParagraphDialog` with `open` and a close handler (`onClose` in React, `@close` in Vue); enable the button from `usePageSetup().isEnabled` or `useParagraphFormat().isEnabled` | `Section.pageSetup`, and `Paragraph` properties such as `alignment` |
|
|
136
|
+
|
|
137
|
+
The review hooks need `reviewModule()` from `@docx-editor.dev/pro` in the editor's modules, and an editor `author` for comments and tracked changes. The editing API takes its author from the `author` option of `DocxEditor.createServer`, imported from `@docx-editor.dev/editor-api`, or of `DocxEditor.createBrowser`, imported from `@docx-editor.dev/editor-api/browser`.
|
|
138
|
+
|
|
139
|
+
This package ships the task recipes in [`docs/index.md`](./docs/index.md). They are also on the site: [Task recipes](https://www.docx-editor.dev/docs/2.x/recipes).
|
|
140
|
+
|
|
117
141
|
## Documentation
|
|
118
142
|
|
|
119
143
|
- [Core overview](https://www.docx-editor.dev/docs/2.x/core)
|
package/dist/automation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk3IEXDEFH_cjs=require('./chunk-3IEXDEFH.cjs');require('./chunk-TELQ52LG.cjs'),require('./chunk-FDSL5OJU.cjs'),require('./chunk-6UDJUI3W.cjs'),require('./chunk-OKMEMSKB.cjs'),require('./chunk-TJHE5EET.cjs'),require('./chunk-65XBN67F.cjs'),require('./chunk-O324RB6R.cjs'),require('./chunk-ZOZI27AW.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.f}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.e}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.g}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.d}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.o}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.w}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.x}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.m}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.y}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.p}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.A}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.z}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.s}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.C}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.D}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.B}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.r}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.i}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.h}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.t}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.k}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.v}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.u}});
|
package/dist/automation.d.ts
CHANGED
|
@@ -11,21 +11,21 @@
|
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-
|
|
15
|
-
export { c as AutomationAlignment, d as
|
|
16
|
-
import { c as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
import {
|
|
20
|
-
|
|
14
|
+
import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-DKa4qt7F.js';
|
|
15
|
+
export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as AutomationTextProjection, T as AutomationUnsubscribe, U as AutomationValue } from './protocol-DKa4qt7F.js';
|
|
16
|
+
import { c as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-CRHvMyNj.js';
|
|
17
|
+
import { aD as OoxmlPackageLimits, aB as OoxmlPackageRejection } from './tree-op-types-C_S2niXW.js';
|
|
18
|
+
export { aE as AutomationTableMutation, J as RevisionAuthorEntry, K as RevisionAuthorResult, L as RevisionAuthorSkipReason, M as RevisionBatchEntry, Q as RevisionBatchResult, T as RevisionBatchSkipDetail, U as RevisionBatchSkipReason, V as RevisionSiteRefusal } from './tree-op-types-C_S2niXW.js';
|
|
19
|
+
import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-BvN-WWst.js';
|
|
20
|
+
import { H as HeadlessDocumentView } from './headless-document-view-Bcz9_Qva.js';
|
|
21
21
|
import { CollaborationModuleContribution } from './collaboration.js';
|
|
22
|
-
import { B as ByteSizeBucket, b as CountBucket, f as DocumentOpenDiagnosticCode, j as ReviewDiagnosticCode, E as EditDiagnosticCode } from './diagnostic-hints-
|
|
23
|
-
export { C as CollaborationDiagnosticCode, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-
|
|
24
|
-
export { a as diagnosticCause, d as diagnosticCauses, b as diagnosticErrorName, c as documentPartKind, e as exceptionCause } from './diagnostic-context-
|
|
25
|
-
export {
|
|
26
|
-
import './
|
|
22
|
+
import { B as ByteSizeBucket, b as CountBucket, f as DocumentOpenDiagnosticCode, j as ReviewDiagnosticCode, E as EditDiagnosticCode } from './diagnostic-hints-DK8-V0fk.js';
|
|
23
|
+
export { C as CollaborationDiagnosticCode, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-DK8-V0fk.js';
|
|
24
|
+
export { a as diagnosticCause, d as diagnosticCauses, b as diagnosticErrorName, c as documentPartKind, e as exceptionCause } from './diagnostic-context-BtDUY3v2.js';
|
|
25
|
+
export { c as HistoryGroup, H as HistoryGroupOutcome } from './editor-scope-B3L-1ALc.js';
|
|
26
|
+
import './revision-projection-Cn6rZJ7H.js';
|
|
27
27
|
import './collaboration/replication.js';
|
|
28
|
-
import './failure-
|
|
28
|
+
import './failure-6KGFrDO9.js';
|
|
29
29
|
|
|
30
30
|
/** The variants a section can declare furniture for. */
|
|
31
31
|
declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
|
|
@@ -62,9 +62,9 @@ type AutomationShapeOwnerStory = {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
/** Operations that read. They never open a transaction. */
|
|
65
|
-
declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getBookmarkNames", "getBookmarkRangeByName", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getReviewItemRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
|
|
65
|
+
declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getMergedTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getFieldResult", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getTextRanges", "expandSpan", "getReviewedText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getBookmarkNames", "getBookmarkRangeByName", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getReviewItemRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
|
|
66
66
|
/** Operations that write. Every one of these goes through the single transaction path. */
|
|
67
|
-
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "setFieldCode", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "insertBookmark", "deleteBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "resolveRevisionBatch", "setRevisionAuthorBatch", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
|
|
67
|
+
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "splitTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "insertOoxml", "setFieldCode", "setFieldResult", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "insertBookmark", "deleteBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "resolveRevisionBatch", "setRevisionAuthorBatch", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
|
|
68
68
|
/**
|
|
69
69
|
* Commands that commit as a PACKAGE transaction and therefore share a batch with nothing.
|
|
70
70
|
*
|
|
@@ -202,4 +202,4 @@ interface DiagnosticEmitter<E> {
|
|
|
202
202
|
declare function createDiagnosticEmitter<E>(listeners: () => Iterable<(event: E) => unknown>, now?: () => number): DiagnosticEmitter<E>;
|
|
203
203
|
|
|
204
204
|
export { AUTOMATION_COMMAND_OPERATIONS, AUTOMATION_QUERY_OPERATIONS, AUTOMATION_SOLITARY_OPERATIONS, AutomationCapabilities, AutomationHost, AutomationOperation, ByteSizeBucket, ContentLockPolicy, CountBucket, DocumentOpenDiagnosticCode, EditDiagnosticCode, HEADER_FOOTER_VARIANTS, ReviewDiagnosticCode, SERVER_AUTOMATION_CAPABILITIES, byteSizeBucket, countBucket, createAutomationPaginationProvider, createDiagnosticEmitter, createServerAutomationHost, isAutomationCommand, isSolitaryAutomationCommand, openDiagnosticCode, paginationSnapshotOf, reviewDiagnosticCode, storeEditDiagnosticCode };
|
|
205
|
-
export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationStoryId, DiagnosticEmitter, DiagnosticPayload, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
|
|
205
|
+
export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationShapeOwnerStory, AutomationStoryId, DiagnosticEmitter, DiagnosticPayload, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
|
package/dist/automation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{f as AUTOMATION_COMMAND_OPERATIONS,e as AUTOMATION_QUERY_OPERATIONS,g as AUTOMATION_SOLITARY_OPERATIONS,d as HEADER_FOOTER_VARIANTS,o as SERVER_AUTOMATION_CAPABILITIES,w as byteSizeBucket,x as countBucket,m as createAutomationPaginationProvider,y as createDiagnosticEmitter,p as createServerAutomationHost,A as diagnosticCause,z as diagnosticCauses,s as diagnosticCodes,C as diagnosticErrorName,D as documentPartKind,B as exceptionCause,r as explainDiagnostic,i as isAutomationCommand,h as isSolitaryAutomationCommand,t as openDiagnosticCode,k as paginationSnapshotOf,v as reviewDiagnosticCode,u as storeEditDiagnosticCode}from'./chunk-UMMRURPE.js';import'./chunk-QXJKYNYZ.js';import'./chunk-DDFHKQFU.js';import'./chunk-ETDZFNMI.js';import'./chunk-L5TYBFDB.js';import'./chunk-ACLR4DMK.js';import'./chunk-HDOXACHP.js';import'./chunk-IILEENID.js';import'./chunk-GWM3AKUD.js';
|
package/dist/binding.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk25EXMBV2_cjs=require('./chunk-25EXMBV2.cjs');require('./chunk-XJYZVGQR.cjs'),require('./chunk-6UDJUI3W.cjs'),require('./chunk-OKMEMSKB.cjs'),require('./chunk-TJHE5EET.cjs'),require('./chunk-65XBN67F.cjs'),require('./chunk-O324RB6R.cjs'),require('./chunk-ZOZI27AW.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.n}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.o}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.l}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.e}});
|
package/dist/binding.d.ts
CHANGED
|
@@ -9,26 +9,28 @@
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
import { Node, Schema } from 'prosemirror-model';
|
|
12
|
-
import {
|
|
13
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
14
|
-
export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-
|
|
15
|
-
import { C as ContentLockPolicy } from './tree-package-store-
|
|
16
|
-
export { S as StoryScope,
|
|
12
|
+
import { az as OoxmlProperty, aA as OoxmlPackageResult, aB as OoxmlPackageRejection } from './tree-op-types-C_S2niXW.js';
|
|
13
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-D1awo_dA.js';
|
|
14
|
+
export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-D1awo_dA.js';
|
|
15
|
+
import { C as ContentLockPolicy } from './tree-package-store-CRHvMyNj.js';
|
|
16
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-store-CRHvMyNj.js';
|
|
17
17
|
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
18
18
|
import { EditorView } from 'prosemirror-view';
|
|
19
|
-
import './editor-scope-
|
|
20
|
-
import './custom-node-writes-
|
|
21
|
-
import './headless-document-view-
|
|
19
|
+
import './editor-scope-B3L-1ALc.js';
|
|
20
|
+
import './custom-node-writes-CLJKGD9t.js';
|
|
21
|
+
import './headless-document-view-Bcz9_Qva.js';
|
|
22
22
|
import './collaboration/replication.js';
|
|
23
|
-
import './
|
|
24
|
-
import './
|
|
25
|
-
import './
|
|
26
|
-
import './
|
|
27
|
-
import './
|
|
23
|
+
import './revision-projection-Cn6rZJ7H.js';
|
|
24
|
+
import './contracts/types.js';
|
|
25
|
+
import './failure-6KGFrDO9.js';
|
|
26
|
+
import './document-protection-NaniLHWF.js';
|
|
27
|
+
import './editor-DZwOTmlR.js';
|
|
28
|
+
import './editor-fonts-D_-vjuJi.js';
|
|
29
|
+
import './diagnostic-hints-DK8-V0fk.js';
|
|
28
30
|
import './contracts/document.js';
|
|
29
31
|
import './contracts/interaction.js';
|
|
30
|
-
import './semantic-interaction-
|
|
31
|
-
import './
|
|
32
|
+
import './semantic-interaction-CJoHLoOl.js';
|
|
33
|
+
import './semantic-records-BvN-WWst.js';
|
|
32
34
|
import './collaboration.js';
|
|
33
35
|
|
|
34
36
|
/** Attributes carried by a projected paragraph. */
|
package/dist/binding.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{n as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,o as mountTreeSurface,l as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-GIY6NT2X.js';import'./chunk-B2BEELUE.js';import'./chunk-ETDZFNMI.js';import'./chunk-L5TYBFDB.js';import'./chunk-ACLR4DMK.js';import'./chunk-HDOXACHP.js';import'./chunk-IILEENID.js';import'./chunk-GWM3AKUD.js';
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { c as FontConfigurationFragment, g as FontResolver, M as MarkedFontResolver, f as FontResolutionRequest } from './font-resolver-
|
|
2
|
-
import {
|
|
3
|
-
import { V as ViewScope, a as EditorExecOptions } from './editor-scope-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { c as FontConfigurationFragment, g as FontResolver, M as MarkedFontResolver, f as FontResolutionRequest } from './font-resolver-BlQNGdvR.js';
|
|
2
|
+
import { F as FontConfiguration, a as FontFaceRequest, b as FontSource } from './editor-fonts-D_-vjuJi.js';
|
|
3
|
+
import { V as ViewScope, a as EditorExecOptions } from './editor-scope-B3L-1ALc.js';
|
|
4
|
+
import { au as TreeDocOp, b0 as TextFormFieldRange, b1 as TextFormFieldOptions, ad as ImageDecodePort, ao as Unsubscribe, E as ExecResult, aa as DrawingPositionInput, b2 as DrawingTransform, G as ParagraphTabStop, y as IndentFormatting, F as ParagraphFlags, A as ParagraphDisagreements, aJ as DrawingTreeDocOp, an as SupportedImageMime, am as SelectionPin, a5 as OoxmlPackage, g as ReviewRevisionKind, aH as PackageWatermarkWrite, ag as ImageWrapTarget } from './tree-op-types-C_S2niXW.js';
|
|
5
|
+
import { e as BookmarkStory, u as DocumentSource, aP as ZoomMode, J as EditorFontError, x as Editor, b as EditorCommand, C as CanResult, aw as SelectedImageState, _ as FormatPainterSurfaceState, f as BookmarkSummary, au as ScrollPlacement, aN as TrackedChangePredicate, aM as TrackedChangeFilterMode, a9 as ImageContext, aA as TableBorderEdgeTarget, aB as TableBorderSpec, aC as TableBorderStyle, aH as TableContext } from './editor-DZwOTmlR.js';
|
|
6
|
+
import { T as TextMeasurer, f as UnsupportedElementRule, S as SemanticLayout, C as ContentControlBoundaryRecord, t as SectionProperties } from './semantic-records-BvN-WWst.js';
|
|
7
|
+
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-Cn6rZJ7H.js';
|
|
8
|
+
import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-store-CRHvMyNj.js';
|
|
9
|
+
import { ReviewPaneOptions } from './contracts/types.js';
|
|
7
10
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
8
|
-
import { F as FieldShadingMode,
|
|
11
|
+
import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-BPw_n0li.js';
|
|
9
12
|
import { ReviewModuleContribution, EditorModule } from './contracts/modules.js';
|
|
10
|
-
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-
|
|
13
|
+
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-CJoHLoOl.js';
|
|
11
14
|
import { CollaborationModuleContribution, EditorCollaborationSession, CollaborationRemoteSelection } from './collaboration.js';
|
|
12
|
-
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-
|
|
13
|
-
import { B as BookmarkIndex } from './custom-node-writes-
|
|
14
|
-
import { C as CellSelection } from './semantic-cell-selection-
|
|
15
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
16
|
-
import {
|
|
15
|
+
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-Ds5R2_3F.js';
|
|
16
|
+
import { B as BookmarkIndex } from './custom-node-writes-CLJKGD9t.js';
|
|
17
|
+
import { C as CellSelection } from './semantic-cell-selection-BaUR0iJ4.js';
|
|
18
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-D1awo_dA.js';
|
|
19
|
+
import { a as CollaborationStatus } from './failure-6KGFrDO9.js';
|
|
17
20
|
|
|
18
21
|
/**
|
|
19
22
|
* A blank document, freshly zipped per call (the caller may hand the
|
|
@@ -400,6 +403,7 @@ interface PaginatedSurfaceOptions {
|
|
|
400
403
|
* revision markup paints, whatever the {@link revisionDisplayMode} leaves visible.
|
|
401
404
|
*/
|
|
402
405
|
readonly revisionStyles?: RevisionStyles;
|
|
406
|
+
readonly unsupportedElementRules?: readonly UnsupportedElementRule[];
|
|
403
407
|
readonly revisionMarkup?: ResolvedRevisionMarkup;
|
|
404
408
|
/**
|
|
405
409
|
* The review module's derivation hooks for this surface's session. Absent,
|
|
@@ -506,8 +510,8 @@ interface PaginatedSurfaceOptions {
|
|
|
506
510
|
}
|
|
507
511
|
|
|
508
512
|
/**
|
|
509
|
-
* Receives the element that shows the loading indicator
|
|
510
|
-
* document lays out its remaining pages.
|
|
513
|
+
* Receives the element that shows the loading indicator below the laid-out pages, while a
|
|
514
|
+
* large document lays out its remaining pages.
|
|
511
515
|
*
|
|
512
516
|
* @example
|
|
513
517
|
* ```ts
|
|
@@ -524,8 +528,8 @@ interface OpeningIndicatorHost {
|
|
|
524
528
|
/**
|
|
525
529
|
* Called with the indicator element when the first pages show, and with `null` when the
|
|
526
530
|
* remaining pages are laid out or the open is abandoned. The element is empty while a host
|
|
527
|
-
* is set: render the host's content into it. It is centered
|
|
528
|
-
*
|
|
531
|
+
* is set: render the host's content into it. It is centered in a band below the last
|
|
532
|
+
* laid-out page, as wide as the page, and scrolls with the document.
|
|
529
533
|
*/
|
|
530
534
|
publish(element: HTMLElement | null): void;
|
|
531
535
|
}
|
|
@@ -629,6 +633,8 @@ interface DocxEditorConfig {
|
|
|
629
633
|
* the proposed view still marks surviving insertions.
|
|
630
634
|
*/
|
|
631
635
|
revisionStyles?: RevisionStyles;
|
|
636
|
+
/** Ordered unsupported-content registrations; the first matching rule reserves a layout box. */
|
|
637
|
+
unsupportedElementRules?: readonly UnsupportedElementRule[];
|
|
632
638
|
/** Initial local revision presentation and tracking preferences. */
|
|
633
639
|
revisionMarkup?: RevisionMarkupOptions;
|
|
634
640
|
/** Initial review projection. Markup modes require a review module. */
|
|
@@ -812,6 +818,17 @@ interface AttachOptions {
|
|
|
812
818
|
* need. Production adapters program against `Editor` for everything else.
|
|
813
819
|
*/
|
|
814
820
|
interface DocxEditorInstance extends Editor {
|
|
821
|
+
/**
|
|
822
|
+
* Replace host font resources without replacing the document or its edit history.
|
|
823
|
+
* Old resolution is cancelled. Existing host faces are removed before the new
|
|
824
|
+
* resolver runs; no answer keeps the bounded fallback. Document-embedded faces
|
|
825
|
+
* remain independent of host fonts. Failures report through `onFontError`.
|
|
826
|
+
*
|
|
827
|
+
* The session, selection, undo, protection, and collaboration state stay intact.
|
|
828
|
+
* Throws after `destroy()`. This does not grant permission to load native fonts.
|
|
829
|
+
* @public
|
|
830
|
+
*/
|
|
831
|
+
setFonts(fonts: DocxEditorConfig['fonts']): Promise<void>;
|
|
815
832
|
/** Bumps on mount, detach, destroy, and document reload — guards async image intents. */
|
|
816
833
|
readonly mountGeneration: number;
|
|
817
834
|
/**
|
|
@@ -1033,6 +1050,8 @@ interface DocxEditorInstance extends Editor {
|
|
|
1033
1050
|
* of calling it. Call it directly from headless and non-React hosts.
|
|
1034
1051
|
*/
|
|
1035
1052
|
setRevisionStyles(styles: RevisionStyles): void;
|
|
1053
|
+
/** Replace registrations while preserving document edits and undo history. */
|
|
1054
|
+
setUnsupportedElementRules(rules: readonly UnsupportedElementRule[]): void;
|
|
1036
1055
|
/** Merge local preferences and emit revisionMarkupChange after a change.
|
|
1037
1056
|
* Invalid settings throw TypeError without changing the previous settings.
|
|
1038
1057
|
*/
|
|
@@ -2088,16 +2107,17 @@ interface PaginatedSurface {
|
|
|
2088
2107
|
* caret-preserving edits (Backspace, Delete, Enter) and IME composition, and is
|
|
2089
2108
|
* discarded when the caret moves elsewhere or the document is undone. A property the
|
|
2090
2109
|
* store cannot author is refused at arm time rather than left to poison the keystroke.
|
|
2110
|
+
* Returns the document's refusal reason, or null when the write landed, armed, or did nothing.
|
|
2091
2111
|
*/
|
|
2092
|
-
toggleRunProperty(localName: string, attributes?: Record<string, string>):
|
|
2112
|
+
toggleRunProperty(localName: string, attributes?: Record<string, string>): string | null;
|
|
2093
2113
|
/**
|
|
2094
2114
|
* SET a run property over the selection, rather than toggling it.
|
|
2095
2115
|
*
|
|
2096
2116
|
* Font family, size and colour are values, not switches: picking Arial twice must leave
|
|
2097
2117
|
* the text in Arial, which a toggle would not. Arms at a collapsed caret on the same
|
|
2098
|
-
* terms as `toggleRunProperty
|
|
2118
|
+
* terms as `toggleRunProperty`, and returns a refusal the same way.
|
|
2099
2119
|
*/
|
|
2100
|
-
setRunProperty(localName: string, attributes?: Record<string, string>):
|
|
2120
|
+
setRunProperty(localName: string, attributes?: Record<string, string>): string | null;
|
|
2101
2121
|
/**
|
|
2102
2122
|
* Set a property on every paragraph the selection touches — alignment, style, spacing.
|
|
2103
2123
|
*
|
|
@@ -2348,6 +2368,7 @@ interface PaginatedSurface {
|
|
|
2348
2368
|
*/
|
|
2349
2369
|
setRevisionMarkup(settings: ResolvedRevisionMarkup): void;
|
|
2350
2370
|
setRevisionStyles(colors: RevisionStyles | undefined): void;
|
|
2371
|
+
setUnsupportedElementRules(rules: readonly UnsupportedElementRule[]): void;
|
|
2351
2372
|
/** Toggle paragraph-end furniture without layout or document changes. */
|
|
2352
2373
|
setShowParagraphMarks(show: boolean): void;
|
|
2353
2374
|
/**
|
|
@@ -3561,6 +3582,20 @@ declare const CHROME_GROUPS: readonly [{
|
|
|
3561
3582
|
readonly state: {
|
|
3562
3583
|
readonly kind: 'value';
|
|
3563
3584
|
};
|
|
3585
|
+
}, {
|
|
3586
|
+
readonly id: 'mergeCells';
|
|
3587
|
+
readonly labelKey: 'table.mergeCells';
|
|
3588
|
+
readonly paths: readonly string[];
|
|
3589
|
+
readonly state: {
|
|
3590
|
+
readonly kind: 'command';
|
|
3591
|
+
};
|
|
3592
|
+
}, {
|
|
3593
|
+
readonly id: 'splitCell';
|
|
3594
|
+
readonly labelKey: 'table.splitCell';
|
|
3595
|
+
readonly paths: readonly string[];
|
|
3596
|
+
readonly state: {
|
|
3597
|
+
readonly kind: 'command';
|
|
3598
|
+
};
|
|
3564
3599
|
}];
|
|
3565
3600
|
}, {
|
|
3566
3601
|
readonly id: 'paragraph';
|
|
@@ -3739,7 +3774,7 @@ type ChromeGroupId = 'history' | 'zoom' | 'styles' | 'font' | 'text' | 'script'
|
|
|
3739
3774
|
*
|
|
3740
3775
|
* @public
|
|
3741
3776
|
*/
|
|
3742
|
-
type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'direction.ltr' | 'direction.rtl' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.revisionMarkup' | 'review.comments' | 'review.addComment' | 'review.paragraphMarks' | 'review.bookmarks' | 'review.protectDocument' | 'review.simpleMarkup' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'file.exportMarkdown' | 'file.exportPdf' | 'file.print' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.textBox' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc' | 'insert.bookmark' | 'insert.goToBookmark' | 'insert.watermark';
|
|
3777
|
+
type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'direction.ltr' | 'direction.rtl' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.revisionMarkup' | 'review.comments' | 'review.addComment' | 'review.paragraphMarks' | 'review.bookmarks' | 'review.protectDocument' | 'review.simpleMarkup' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'table.mergeCells' | 'table.splitCell' | 'file.open' | 'file.save' | 'file.exportMarkdown' | 'file.exportPdf' | 'file.print' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.textBox' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc' | 'insert.bookmark' | 'insert.goToBookmark' | 'insert.watermark';
|
|
3743
3778
|
/**
|
|
3744
3779
|
* Every control id in the chrome, as a literal union. Unique WITHIN a group, not
|
|
3745
3780
|
* globally (`image.insert` / `table.insert`) — key consumers on {@link ChromeSlotId}.
|
|
@@ -4209,5 +4244,5 @@ interface ChromePrintJob {
|
|
|
4209
4244
|
*/
|
|
4210
4245
|
declare function runChromePrint(editor: Pick<Editor, 'save'> & Partial<Pick<Editor, 'snapshot'>>, handlers?: ChromeExportHandlers, container?: Document | Element): Promise<ChromePrintJob>;
|
|
4211
4246
|
|
|
4212
|
-
export {
|
|
4213
|
-
export type {
|
|
4247
|
+
export { blankDocumentBytes as $, CHROME_GROUPS as C, bindHistoryGroup as _, chromeMenuSlots as a0, commandForSlot as a1, commandForSlotValue as a2, createDocxEditor as a3, createFontSource as a4, customFonts as a5, isChromePrintShortcut as a6, loadFonts as a7, runChromeExport as a8, runChromePrint as a9, TABLE_BORDER_STYLE_OPTIONS as aR, TABLE_BORDER_TARGET_OPTIONS as aS, TABLE_BORDER_WIDTH_OPTIONS as aT, TABLE_CHROME_SLOT_IDS as aU, runToolbarCommand as aa, toolbarCommandState as ab, CHROME_UNAVAILABLE_KEY as aj, DEFAULT_TABLE_CHROME_DRAFT as ap, EMU_PER_POINT as ar, IMAGE_OVERLAY_NUDGE_PT as aw, IMAGE_OVERLAY_NUDGE_SHIFT_PT as ax, applyTableChromePick as b3, canExecuteImageCommand as b4, captureImageMutationPreconditions as b5, chromeControlCount as b6, chromeProbeForSlot as b7, chromeSlotId as b8, chromeSlotIsToggle as b9, selectedImageStateOf as bA, surfacePaintScale as bB, tableChromeIconPaths as bC, tableChromeLabelKeyForTarget as bD, tableChromeToolbarState as bE, tableChromeVisible as bF, tableCommandToolbarState as bG, toolbarCommandStates as bH, commandExecOptions as ba, commandForTableChromeSlotValue as bb, computeImageResizeResult as bc, computeMovedImagePosition as bd, computeResizedImageExtentEmu as be, createImageOverlayScrollPort as bf, cssPixelsToLayoutPoints as bg, defaultChromeGroups as bh, defaultTableLabel as bi, emuToOverlayPoints as bj, equationAtPosition as bk, executeImageCommand as bl, finalizeImageOverlayInteraction as bm, formattingBarChromeGroups as bn, isStaleImageInteractionCommit as bo, isTableChromeSlot as bp, layoutPointsToCssPixels as bq, overlayFrameToSheetCssPixels as br, overlayHostOrigin as bs, pointsToEmu as bt, probeTableChromeCommand as bu, resizePreservesAspect as bv, runSave as bw, runTableChromeCommand as bx, runTableCommand as by, selectedDrawingOverlayTargetOf as bz, CHROME_MENUS as c, ChromeExportError as d, ChromePrintError as o };
|
|
4248
|
+
export type { AttachOptions as A, BookmarkChromeHandlers as B, DocxEditorConfig as D, EquationActivation as E, FontLoadFailure as F, FontLoadFailureReason as G, FontMeasurementState as H, FontUrlSource as I, GoToChromeHandlers as J, HistoryGroupBinding as K, HistoryGroupBindingOptions as L, HyperlinkActivation as M, HyperlinkChromeHandlers as N, InvalidTextFormFieldChromeHandlers as O, InvalidTextFormFieldSession as P, LoadFontsRequest as Q, LoadFontsResult as R, LockedControlNavigation as S, PopupChromeRegistrationOptions as T, SurfaceEquation as U, SurfaceHyperlink as V, TableChromeSlotId as W, ToolbarCommandState as X, ToolbarValueMap as Y, ToolbarValueSlot as Z, BookmarkMarkInfo as a, TableInteractionLabelKey as a$, ImageResizeHandle as aA, ImageResizeResult as aB, OpeningIndicatorHost as aC, OverlayFrameRect as aD, PaginatedSurfaceState as aE, ParagraphPropertyEdit as aF, RemoteCaretLabelAnchor as aG, RemoteCaretLabelHost as aH, ReviewWriteIntent as aI, RunTableChromeCommandResult as aJ, SectionAnchor as aK, SectionBreakInsertType as aL, SelectedDrawingOverlayTarget as aM, SurfaceInsertImageInput as aN, SurfaceNavigation as aO, SurfaceOverlayCoordinates as aP, SurfaceParagraphFormat as aQ, TableBorderStyleOption as aV, TableBorderTargetOption as aW, TableBorderTargetValue as aX, TableBorderWidthOption as aY, TableChromeDraft as aZ, TableChromePick as a_, PaginatedSurfaceOptions as ac, OpenPaginatedResult as ad, PaginatedSurface as ae, TableCommandPlan as af, SurfaceFormatting as ag, AnchorFrameOrigin as ah, BookmarkMarkOptionsSource as ai, ChromeControl as ak, ChromeControlId as al, ChromeControlState as am, ChromeGroup as an, ChromeGroupId as ao, DrawingSelectionIntent as aq, EditorCommandExecute as as, EquationOps as at, FinalizedImageOverlayInteraction as au, HyperlinkOps as av, ImageInteractionSession as ay, ImageOverlayScrollPort as az, BookmarkMarkOptions as b, TextFormFieldChromeHandlers as b0, TextFormFieldDialogSession as b1, ToolbarSlotValue as b2, ChromeExportFormat as e, ChromeExportHandlers as f, ChromeExportResult as g, ChromeExportView as h, ChromeMenu as i, ChromeMenuEntry as j, ChromeMenuId as k, ChromeMenuItemEntry as l, ChromeMenuSeparatorEntry as m, ChromeMenuSubmenuEntry as n, ChromePrintErrorCode as p, ChromePrintJob as q, ChromePrintOptions as r, ChromeSlotId as s, CommentDraftChromeHandlers as t, ContentControlWidgetChromeHandlers as u, ContentControlWidgetSession as v, CustomFontsOptions as w, CustomFontsResolver as x, DocxEditorInstance as y, EquationChromeHandlers as z };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use strict';var chunkXJYZVGQR_cjs=require('./chunk-XJYZVGQR.cjs'),chunk6UDJUI3W_cjs=require('./chunk-6UDJUI3W.cjs'),chunkOKMEMSKB_cjs=require('./chunk-OKMEMSKB.cjs'),chunkTJHE5EET_cjs=require('./chunk-TJHE5EET.cjs'),chunk65XBN67F_cjs=require('./chunk-65XBN67F.cjs'),chunkO324RB6R_cjs=require('./chunk-O324RB6R.cjs'),chunkZOZI27AW_cjs=require('./chunk-ZOZI27AW.cjs'),prosemirrorModel=require('prosemirror-model'),prosemirrorState=require('prosemirror-state'),prosemirrorView=require('prosemirror-view'),prosemirrorKeymap=require('prosemirror-keymap'),prosemirrorCommands=require('prosemirror-commands');function Y(t){return t.attributes?.val}function U(t){let e=Y(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var nr=/^[0-9A-Fa-f]{6}$/,or=/^\d{1,6}$/;function Ve(t){return t===void 0||t==="auto"?null:nr.test(t)?`#${t}`:null}var rr={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"},ar={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 sr(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function Gn(t,e=false){let n=chunkZOZI27AW_cjs.sd(t);return n===null||Math.abs(n)>999999||!e&&n<0?null:n}function q(t,e=false){let n=Gn(t,e);return n===null?null:`${n/20}pt`}function Jn(t){let e=[],n=[],r=null,a=null;for(let o of t)switch(o.localName){case "b":e.push(`font-weight:${U(o)?"bold":"normal"}`);break;case "i":e.push(`font-style:${U(o)?"italic":"normal"}`);break;case "u":{let s=Y(o)??"single";if(s==="none"||!U(o))break;n.push("underline"),r=rr[s]??"solid",a=Ve(o.attributes?.color);break}case "strike":U(o)&&n.push("line-through");break;case "dstrike":U(o)&&n.push("line-through");break;case "caps":U(o)&&e.push("text-transform:uppercase");break;case "smallCaps":U(o)&&e.push("font-variant:small-caps");break;case "vertAlign":{let s=Y(o);s==="superscript"?e.push("vertical-align:super","font-size:0.75em"):s==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let s=Ve(Y(o));s&&e.push(`color:${s}`);break}case "highlight":{let s=ar[Y(o)??""];s&&e.push(`background-color:${s}`);break}case "sz":{let s=Y(o);s!==void 0&&or.test(s)&&e.push(`font-size:${Number(s)/2}pt`);break}case "rFonts":{let s=sr(o.attributes?.ascii??o.attributes?.hAnsi);s&&e.push(`font-family:${s}`);break}case "spacing":{let s=q(Y(o),true);s&&e.push(`letter-spacing:${s}`);break}}return n.length>0&&(e.push(`text-decoration-line:${[...new Set(n)].join(" ")}`),r&&e.push(`text-decoration-style:${r}`),a&&e.push(`text-decoration-color:${a}`)),e.join(";")}var ir={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function Kn(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let r=ir[Y(n)??""];r&&e.push(`text-align:${r}`);break}case "ind":{let r=q(n.attributes?.left??n.attributes?.start,true),a=q(n.attributes?.right??n.attributes?.end,true),o=q(n.attributes?.firstLine),s=q(n.attributes?.hanging);r&&e.push(`margin-left:${r}`),a&&e.push(`margin-right:${a}`),o?e.push(`text-indent:${o}`):s&&e.push(`text-indent:-${s}`);break}case "spacing":{let r=q(n.attributes?.before),a=q(n.attributes?.after);r&&e.push(`margin-top:${r}`),a&&e.push(`margin-bottom:${a}`);let o=Gn(n.attributes?.line),s=n.attributes?.lineRule;o!==null&&s!=="exact"&&s!=="atLeast"?e.push(`line-height:${(o/240).toFixed(3)}`):o!==null&&e.push(`line-height:${o/20}pt`);break}case "shd":{let r=Ve(n.attributes?.fill);r&&e.push(`background-color:${r}`);break}case "pageBreakBefore":U(n)&&e.push("break-before:page");break;}return e.join(";")}var N=new prosemirrorModel.Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=Kn(t.attrs.props??[]);return ["p",{"data-node-id":String(t.attrs.nodeId??""),...e?{style:e}:{}},0]},parseDOM:[{tag:"p",getAttrs:t=>typeof t=="string"?null:{nodeId:t.getAttribute("data-node-id")||null,props:[]}}]},text:{group:"inline"},tab:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"tab",class:"docx-tab"},"\u2192"],parseDOM:[{tag:'span[data-token="tab"]'}]},hardBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["br"],parseDOM:[{tag:"br"}]},pageBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"page-break",class:"docx-page-break"}],parseDOM:[{tag:'span[data-token="page-break"]'}]},unknownInline:{inline:true,group:"inline",atom:true,selectable:false,draggable:false,attrs:{nodeId:{default:null},label:{default:""}},toDOM:t=>["span",{"data-token":"unknown","data-node-id":String(t.attrs.nodeId??""),contenteditable:"false",class:"docx-unknown-inline",title:String(t.attrs.label||"Content this editor cannot edit yet. It is preserved.")}],parseDOM:[{tag:'span[data-token="unknown"]',getAttrs:t=>typeof t=="string"?false:{nodeId:t.getAttribute("data-node-id")||null,label:""}}]}},marks:{runProps:{attrs:{props:{default:[]}},excludes:"runProps",toDOM:t=>{let e=t.attrs.props??[],n=Jn(e);return ["span",{"data-run-props":dr(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=cr(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function dr(t){return JSON.stringify(Array.isArray(t)?t:[])}function cr(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let n=[];for(let r of e){if(typeof r!="object"||r===null)return null;let a=r;if(typeof a.localName!="string"||a.attributes!==void 0&&(typeof a.attributes!="object"||a.attributes===null))return null;n.push(a.attributes===void 0?{localName:a.localName}:{localName:a.localName,attributes:a.attributes});}return n}catch{return null}}function qe(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function Ce(t,e){return JSON.stringify(De(t))===JSON.stringify(De(e))}function De(t){return [...t].map(e=>({localName:e.localName,attributes:Object.fromEntries(Object.entries(e.attributes??{}).sort(([n],[r])=>n<r?-1:1))})).sort((e,n)=>e.localName<n.localName?-1:1)}function Ze(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue"||n.namespaceUri!==chunkZOZI27AW_cjs.pa||n.localName==="rPrChange"||n.localName==="pPrChange")continue;let r={};for(let a of n.attributes)a.namespaceUri===chunkZOZI27AW_cjs.pa&&(r[a.localName]=a.value);e.push(Object.keys(r).length>0?{localName:n.localName,attributes:r}:{localName:n.localName});}return e}function Xn(t){return t.kind==="textValue"?"":`${{drawing:"Picture",pict:"Picture",object:"Embedded object",fldSimple:"Field",hyperlink:"Hyperlink",sdt:"Content control",tbl:"Table"}[t.localName]??t.localName} \u2014 preserved, not editable yet`}function F(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let s=o.children.find(d=>d.kind==="runProperties"),l=Ze(s);for(let d of o.children)if(d.kind!=="runProperties"){if(d.kind==="tab"){e.push({kind:"tab"});continue}if(d.kind==="hardBreak"){e.push(chunkZOZI27AW_cjs.sb(d)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(d.kind==="text"){let p="";for(let m of d.children)m.kind==="textValue"&&(p+=m.value);p.length>0&&e.push({kind:"text",text:p,props:l});continue}e.push({kind:"unknown",nodeId:d.id,label:Xn(d),modelLength:d.kind==="drawing"||chunkZOZI27AW_cjs.Qd(d)||chunkZOZI27AW_cjs.vd(d)||chunkZOZI27AW_cjs.jb(d)!==null?1:0});}},r=o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:Xn(o),modelLength:0});},a=(o,s)=>{for(let l of o)if(!(l.kind==="textValue"||l.kind==="paragraphProperties")&&!(s>=chunkZOZI27AW_cjs.Aa)){if(chunkZOZI27AW_cjs.Ca(l)&&!chunkZOZI27AW_cjs.za(l.kind)&&s<chunkZOZI27AW_cjs.Aa){a(l.children.filter(d=>!chunkZOZI27AW_cjs.xh(l,d)),chunkZOZI27AW_cjs.Ba(l,s));continue}if(chunkZOZI27AW_cjs.Yc(l)){let d=chunkZOZI27AW_cjs._c(l);d&&a(d,chunkZOZI27AW_cjs.Ba(l,s));continue}r(l);}};return a(t.children,0),e}function le(t){let e=[],n=r=>{if(r.kind!=="textValue"){if(r.kind==="body"){for(let a of r.children)a.kind==="paragraph"&&e.push(a);return}for(let a of r.children)n(a);}};return n(t.root),e}var Qn=chunkZOZI27AW_cjs.yb(16),Vn=chunkZOZI27AW_cjs.xb();function ur(t,e){let n=Vn.get(t);if(!n){let r=[];chunkZOZI27AW_cjs.Wc([t],r,0),n=Object.freeze(r),Vn.set(t,n,n.length);}for(let r of n)e.push(r);}function B(t){let e=Qn.get(t);if(e)return e;let n=[];for(let r of chunkZOZI27AW_cjs.Sc(t))if(r.root.kind!=="textValue")for(let a of r.root.children)ur(a,n);return Qn.set(t,n),n}function Z(t){let e=le(t).map(n=>{let r=n.kind==="textValue"?void 0:n.children.find(o=>o.kind==="paragraphProperties"),a=F(n).map(o=>{switch(o.kind){case "text":return N.text(o.text,o.props.length>0?[N.marks.runProps.create({props:o.props})]:[]);case "tab":return N.node("tab");case "hardBreak":return N.node("hardBreak");case "pageBreak":return N.node("pageBreak");default:return N.node("unknownInline",{nodeId:o.nodeId,label:o.label})}});return N.node("paragraph",{nodeId:n.id,props:Ze(r)},a)});return N.node("doc",null,e.length>0?e:[N.node("paragraph")])}function pr(t,e){let n=[];return t.forEach(r=>{if(r.isText&&r.text){n.push({kind:"text",text:r.text,props:qe(r)});return}r.type.name==="tab"?n.push({kind:"tab"}):r.type.name==="hardBreak"?n.push({kind:"hardBreak"}):r.type.name==="pageBreak"?n.push({kind:"pageBreak"}):r.type.name==="unknownInline"&&n.push({kind:"unknown",nodeId:String(r.attrs.nodeId??""),label:String(r.attrs.label??""),modelLength:e.has(String(r.attrs.nodeId??""))?1:0});}),n}function M(t){let e="";for(let n of t)n.kind==="text"?e+=n.text:n.kind==="tab"?e+=" ":n.kind==="hardBreak"?e+=`
|
|
2
|
+
`:n.kind==="pageBreak"?e+=chunkZOZI27AW_cjs.qb:n.modelLength===1&&(e+=chunkZOZI27AW_cjs.vf);return e}function j(t){let e=[],n=0;for(let r of t)r.kind==="text"?n+=r.text.length:r.kind==="tab"||r.kind==="hardBreak"||r.kind==="pageBreak"?n+=1:(e.push(`${r.nodeId}@${n}`),n+=r.modelLength);return e}function fr(t,e){if(t===e)return null;let n=0,r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n+=1;let a=t.length,o=e.length;for(;a>n&&o>n&&t[a-1]===e[o-1];)a-=1,o-=1;return {start:n,endBefore:a,endAfter:o}}function qn(t){let e=[];for(let n of t)if(n.kind==="text")for(let r=0;r<n.text.length;r+=1)e.push(n.props);else n.kind==="tab"||n.kind==="hardBreak"||n.kind==="pageBreak"?e.push(e[e.length-1]??[]):n.kind==="unknown"&&n.modelLength===1&&e.push([]);return e}function mr(t,e,n,r,a){let o=[],s=M(e),l=M(n),d=fr(s,l),p=[],m=0,f=false;for(let g of e){if(g.kind!=="unknown"){m+=g.kind==="text"?g.text.length:1;continue}let c=m;g.modelLength===1&&d&&(d.start<m+1&&d.endBefore>m&&(f=true),d.endBefore<=m&&(c+=d.endAfter-d.endBefore)),p.push(`${g.nodeId}@${c}`),m+=g.modelLength;}if(f||JSON.stringify(p)!==JSON.stringify(j(n)))return {ok:false,reason:"unknown-content-moved",detail:t};if(Ce(r,a)||o.push({op:"setParagraphProperties",paragraphId:t,properties:De(a)}),d&&(d.endBefore>d.start&&o.push({op:"deleteText",paragraphId:t,start:d.start,end:d.endBefore}),d.endAfter>d.start)){let g=l.slice(d.start,d.endAfter),c=d.start,y="",x=()=>{y.length!==0&&(o.push({op:"insertText",paragraphId:t,offset:c,text:y}),c+=y.length,y="");};for(let O of g)O===" "?(x(),o.push({op:"insertTab",paragraphId:t,offset:c}),c+=1):O===`
|
|
3
|
+
`?(x(),o.push({op:"insertHardBreak",paragraphId:t,offset:c}),c+=1):O===chunkZOZI27AW_cjs.qb?(x(),o.push({op:"insertPageBreak",paragraphId:t,offset:c}),c+=1):y+=O;x();}if(!d){let g=qn(e),c=qn(n),y=0;for(;y<c.length;){if(Ce(g[y]??[],c[y])){y+=1;continue}let x=y,O=c[y];for(;y<c.length&&Ce(c[y],O)&&!Ce(g[y]??[],c[y]);)y+=1;o.push({op:"setRunProperties",paragraphId:t,start:x,end:y,properties:De(O)});}}return {ok:true,ops:o}}function et(t,e){let n=le(t),r=new Set;for(let l of n)for(let d of F(l))d.kind==="unknown"&&d.modelLength===1&&r.add(d.nodeId);let a=l=>pr(l,r),o=[];if(e.forEach(l=>{l.type.name==="paragraph"&&o.push(l);}),o.length!==e.childCount)return {ok:false,reason:"unsupported-node"};let s=o.length-n.length;if(s===0){let l=[];for(let[d,p]of o.entries()){let m=n[d];if(p.attrs.nodeId!==m.id)return {ok:false,reason:"paragraph-reordered",detail:String(p.attrs.nodeId)};let f=mr(m.id,F(m),a(p),Ze(m.kind==="textValue"?void 0:m.children.find(g=>g.kind==="paragraphProperties")),p.attrs.props??[]);if(!f.ok)return f;l.push(...f.ops);}return {ok:true,ops:l}}return s===1?gr(n,o,a):s===-1?yr(n,o,a):{ok:false,reason:"paragraph-count-unexplained",detail:String(s)}}function gr(t,e,n){for(let r=0;r<t.length;r+=1){let a=t[r],o=e[r],s=e[r+1];if(!o||!s||o.attrs.nodeId!==a.id)continue;let l=s.attrs.nodeId;if(l!==null&&l!==a.id)continue;let d=n(o),p=n(s),m=F(a),f=M(d);if(f+M(p)===M(m)&&JSON.stringify(j([...d,...p]))===JSON.stringify(j(m))&&Zn(t,e,r,n)&&eo(t,e,r+1,r+2,n))return {ok:true,ops:[{op:"splitParagraph",paragraphId:a.id,offset:f.length}]}}return {ok:false,reason:"split-not-clean"}}function yr(t,e,n){for(let r=0;r+1<t.length;r+=1){let a=t[r],o=t[r+1],s=e[r];if(!s||s.attrs.nodeId!==a.id)continue;let l=[...F(a),...F(o)],d=n(s);if(M(d)===M(l)&&JSON.stringify(j(d))===JSON.stringify(j(l))&&Zn(t,e,r,n)&&eo(t,e,r+2,r+1,n))return {ok:true,ops:[{op:"joinParagraphs",firstId:a.id,secondId:o.id}]}}return {ok:false,reason:"join-not-clean"}}function Zn(t,e,n,r){for(let a=0;a<n;a+=1){let o=e[a],s=t[a];if(!o||o.attrs.nodeId!==s.id||M(r(o))!==M(F(s))||JSON.stringify(j(r(o)))!==JSON.stringify(j(F(s))))return false}return true}function eo(t,e,n,r,a){for(let o=0;n+o<t.length;o+=1){let s=t[n+o],l=e[r+o];if(!l||l.attrs.nodeId!==s.id||M(a(l))!==M(F(s))||JSON.stringify(j(a(l)))!==JSON.stringify(j(F(s))))return false}return true}function hr(t,e){return chunkZOZI27AW_cjs.Xa(t,e)!==null}function tt(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return Z(e);let r=new Map;t.forEach(d=>{let p=d.attrs.nodeId;typeof p=="string"&&r.set(p,d);});let a=new Set(n.dirty),o=le(e);if(o.length!==t.childCount)return Z(e);let s=Z(e),l=[];for(let[d,p]of o.entries()){let m=r.get(p.id);l.push(m&&!a.has(p.id)?m:s.child(d));}return N.node("doc",null,l)}var xr=8*1024*1024;function to(){let t=new WeakMap;function*e(r){let a=t.get(r);if(a)return a.slice();let o=yield*chunkZOZI27AW_cjs.Me(r);return t=new WeakMap,o.byteLength<=xr&&t.set(r,o.slice()),o}return Object.assign(r=>{let a=e(r);for(;;){let o=a.next();if(o.done)return o.value}},{steps:e})}function oo(t){return B(t).map(e=>chunkZOZI27AW_cjs.Tk(t,e.id)??"").join(`
|
|
4
|
+
`)}var kr=64,no=new WeakMap;function nt(t,e=0){if(e>kr)return false;let n=no.get(t);if(n!==void 0)return n;let r=false;for(let a of t.children)if(a.kind!=="textValue"&&(a.kind==="commentRangeStart"||a.kind==="commentReference"||nt(a,e+1))){r=true;break}return chunkZOZI27AW_cjs.vb(t)&&no.set(t,r),r}var Pr="/word/numbering.xml";function Or(t,e,n){if(t.relationships!==e.relationships||t.contentTypes!==e.contentTypes||t.parts.size!==e.parts.size)return false;for(let[r,a]of e.parts)if(!(r===n||r===Pr)&&t.parts.get(r)!==a)return false;return true}function Rr(t,e){let n=t.kind==="revision"?t.ranges[0]??null:t.range;if(!n)return null;let r=e.get(n.start.paragraphId);return r===void 0?null:r}function ro(t,e,n,r){for(let s of e)if(s.ranges.length===0)return false;let a=new Set;for(let s of t)s.kind!=="revision"||s.ranges.length>0||ot(s,n)||a.add(chunkZOZI27AW_cjs.Fj(s));for(let s of e)if(a.has(chunkZOZI27AW_cjs.Fj(s)))return false;let o=new Set(e.flatMap(s=>chunkZOZI27AW_cjs.Ej(s)));for(let s of t)if(s.kind==="revision"&&ot(s,n)&&chunkZOZI27AW_cjs.Ej(s).some(l=>!o.has(l)&&chunkZOZI27AW_cjs.Xa(r,l)))return false;return true}function ao(t,e,n,r,a=s=>s,o){let s=o?Sr(t,o,n):new Map;if(!s)return null;let l=e.get(n);if(l===void 0)return r.length===0?[...t]:null;let d=[],p=null,{groups:m,absorbed:f}=vr(t,e,n,r),g=a(f.size>0?r.filter(c=>!f.has(c)):r);for(let c of t){let y=c.kind==="revision"&&m.get(c)||c.kind==="comment"&&s.get(c)||c;if(y.kind==="revision"&&ot(y,n)){p===null&&(p=d.length);continue}if(p===null){let x=Rr(y,e);x!==null&&x>l&&(p=d.length);}d.push(y);}if(p===null&&(p=d.length),g.length>0){let c=g.length<2?[...g]:[...g].sort((y,x)=>chunkZOZI27AW_cjs.Mj(y,e)-chunkZOZI27AW_cjs.Mj(x,e));d.splice(p,0,...c);}if(m.size>0||s.size>0){let c=[];d.forEach((x,O)=>{(x.kind==="revision"?x.ranges[0]?.start:x.range?.start)?.paragraphId===n&&c.push(O);});let y=c.map(x=>d[x]).sort((x,O)=>chunkZOZI27AW_cjs.Mj(x,e)-chunkZOZI27AW_cjs.Mj(O,e));c.forEach((x,O)=>d[x]=y[O]);}return chunkZOZI27AW_cjs.wk(d)}function Sr(t,e,n){let r=new Map,a;for(let o of t){if(o.kind!=="comment"||!io(o,n))continue;let s=o.range;if(!s||o.orphaned)return null;if(!a){let m=chunkZOZI27AW_cjs.Xa(e,n);if(!m||m.kind!=="paragraph")return null;a=chunkZOZI27AW_cjs.ni(m);}let l=m=>{let f=a.filter(g=>g.commentId===o.id&&g.kind===m);return f.length===1?f[0].offset:void 0},d=s.start.paragraphId===n?l("start"):s.start.offset,p=s.end.paragraphId===n?l("end"):s.end.offset;if(d===void 0||p===void 0)return null;d===s.start.offset&&p===s.end.offset||r.set(o,{...o,range:{...s,start:{...s.start,offset:d},end:{...s.end,offset:p}}});}return r}function ot(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function so(t){return t.revisionKind==="format"&&t.formattingKind==="pPrChange"}function vr(t,e,n,r){let a=new Map,o=new Set,s=new Map;for(let l of t)if(l.kind==="revision"&&so(l)&&lo(l,n))for(let d of chunkZOZI27AW_cjs.Ej(l))s.set(d,l);if(s.size===0)return {groups:a,absorbed:o};for(let l of r){let d=chunkZOZI27AW_cjs.Ej(l),p=d.length>0?s.get(d[0]):void 0;if(!p||!d.every(g=>s.get(g)===p))continue;o.add(l);let m=a.get(p)??p,f=[...m.ranges.filter(g=>g.start.paragraphId!==n),...l.ranges].sort((g,c)=>(e.get(g.start.paragraphId)??0)-(e.get(c.start.paragraphId)??0)||g.start.offset-c.start.offset);a.set(p,chunkZOZI27AW_cjs.Dj({...m,ranges:f},chunkZOZI27AW_cjs.Ej(p)));}return {groups:a,absorbed:o}}function io(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function br(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function lo(t,e){return t.ranges.length===0||!t.ranges.some(r=>r.start.paragraphId===e||r.end.paragraphId===e)?false:!t.ranges.every(r=>r.start.paragraphId===e&&r.end.paragraphId===e)}function co(t,e,n){return t.fromRevision!==e.bodyRevision||n.currentPackageRevision!==e.packageRevision+1&&(n.changePackage!==n.currentPackage||!Or(e.pkg,n.currentPackage,n.part.name))||t.story!==void 0&&t.story.kind!=="body"||t.impact==="global"?false:e.commentsPart===n.commentsPart&&e.commentsExtendedPart===n.commentsExtendedPart}function uo(t,e){let n=chunkZOZI27AW_cjs.Ya(t,e);if(!n)return false;let r=n.children.findIndex(o=>o.id===e),a=n.children[r-1];return a?.kind==="paragraph"&&chunkZOZI27AW_cjs.lk({...t,root:a}).some(o=>o.paragraphMark)}function po(t,e,n,r){if(!co(t,e,r)||t.splitJoin.length!==1)return false;let a=t.splitJoin[0],o,s;if("split"in a){if(t.deleted.length>0||t.created.length!==1||t.created[0]!==a.split.tail)return false;o=s=[a.split.from,a.split.tail];}else {if(t.created.length>0||t.deleted.length!==1||t.deleted[0]!==a.join.removed)return false;o=[a.join.kept,a.join.removed],s=[a.join.kept];}for(let d of s){let p=chunkZOZI27AW_cjs.Xa(r.part,d);if(!p||p.kind!=="paragraph"||chunkZOZI27AW_cjs.lk({...r.part,root:p}).length>0)return false}if(uo(r.part,s[0]))return false;let l=d=>d!==void 0&&o.includes(d);for(let d of n){let p=d.kind==="revision"?d.ranges:d.range?[d.range]:[];for(let m of p)if(l(m.start.paragraphId)||l(m.end.paragraphId))return false}return true}function Ir(t,e,n){let r=chunkZOZI27AW_cjs.dc(n);if(r.length===0)return false;let a=t.parts.get(e.name),o=a?chunkZOZI27AW_cjs.Xa(a,n.id):null;if(!o)return true;let s=new Set(chunkZOZI27AW_cjs.dc(o).map(l=>l.node));return r.some(l=>!s.has(l.node))}function Tr(t,e,n){let r=new Set(n.flatMap(a=>a.kind==="custom"?[a.id]:[]));if(r.size===0)return false;for(let a=chunkZOZI27AW_cjs.Ya(t,e);a;a=chunkZOZI27AW_cjs.Ya(t,a.id))if(a.kind==="contentControl"&&r.has(a.id))return true;return false}function fo(t,e,n,r){if(!co(t,e,r)||t.dirty.length!==1||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0)return null;let{part:a}=r,o=t.dirty[0],s=chunkZOZI27AW_cjs.Xa(a,o);if(!s||s.kind!=="paragraph"||t.impact!=="text-local"&&(chunkZOZI27AW_cjs.lk({...a,root:s}).length>0||t.impact==="flow-structural"&&chunkZOZI27AW_cjs.Ya(a,o)?.localName!=="body")||Ir(e.pkg,a,s)||Tr(a,o,n)||uo(a,o))return null;for(let l of n){if(l.kind==="comment"){if(io(l,o)&&t.impact!=="text-local")return null;continue}if(l.kind==="custom"){if(l.range?.start.paragraphId===o)return null;continue}if(br(l,o)||lo(l,o)&&!(t.impact==="text-local"&&so(l)))return null}return o}function wr(t,e){if(t.size!==e.size)return false;for(let[n,r]of t){let a=e.get(n);if(!a||a.nodeId!==r.nodeId||a.label!==r.label||a.data!==r.data)return false}return true}function Nr(t,e){return t.root===e.root&&t.commentsPart===e.commentsPart&&t.commentsExtendedPart===e.commentsExtendedPart&&t.stylesPart===e.stylesPart&&t.numberingRoot===e.numberingRoot&&t.furnitureParts.length===e.furnitureParts.length&&t.furnitureParts.every((n,r)=>n===e.furnitureParts[r])&&wr(t.customNodePayloads,e.customNodePayloads)}function mo(){let t=[];return {get(e){let n=t.findIndex(a=>Nr(a.inputs,e));if(n<0)return;let[r]=t.splice(n,1);return t.unshift(r),r.items},set(e,n){let r=t.findIndex(a=>a.inputs.root===e.root);r>=0&&t.splice(r,1),t.unshift({inputs:e,items:n}),t.length>8&&(t.length=8);}}}var ho=new WeakMap;function Va(t,e){return ho.set(t,e),t}function Er(t){return t?ho.get(t):void 0}var de=new WeakMap,xo={sites:new Set,paragraphs:new Map,key:"",spanning:new Set};function Mr(t){return de.get(t)??xo}function Cr(t){return t.kind==="revision"&&t.revisionKind==="format"&&(t.formattingKind==="pPrChange"||t.formattingKind==="rPrChange")}function go(t,e){if(t.size!==e.size)return false;for(let n of e)if(!t.has(n))return false;return true}function Dr(t,e){if(t.size!==e.size)return false;for(let[n,r]of e)if(t.get(n)!==r)return false;return true}function yo(t,e){return t.key===e.key&&go(t.sites,e.sites)&&Dr(t.paragraphs,e.paragraphs)&&go(t.spanning,e.spanning)?t:e}function ko(t,e,n,r){let a=Er(t),o={pkg:e,stylesRoot:n.stylesPart?.root??null,numberingRoot:n.numberingRoot},s=r?Mr(r.items):xo,l=chunkOKMEMSKB_cjs.c(o.stylesRoot,o.numberingRoot),d=null,p=r!==null&&r.stylesPart===n.stylesPart&&(r.numberingRoot===n.numberingRoot||s.sites.size===0&&!r.items.some(Cr));return {filtered:m=>{if(!a)return m;let f=a(m,o),g=new Set(f.map(y=>y.id)),c=chunkOKMEMSKB_cjs.a(m.filter(y=>!g.has(y.id)));return d={result:f,removed:c.sites,paragraphs:c.paragraphs,spanning:c.spanning,touched:chunkOKMEMSKB_cjs.b(m),kept:chunkOKMEMSKB_cjs.a(f).sites},f},sameFilter:p,patchable:m=>p&&!s.spanning.has(m),publish:m=>{if(!a||de.has(m))return m;let f=d;if(f?.result===m){let x={sites:new Set(f.removed),paragraphs:f.paragraphs,key:l,spanning:new Set(f.spanning)};return de.set(m,yo(s,x)),m}if(!f)return de.set(m,s.key===l?s:{...s,key:l}),m;if(s.key===l&&f.removed.length===0&&!f.kept.some(x=>s.sites.has(x)))return de.set(m,s),m;let g=new Set(s.sites);for(let x of f.kept)g.delete(x);for(let x of f.removed)g.add(x);let c=new Map(s.paragraphs);for(let x of f.touched)c.delete(x);for(let[x,O]of f.paragraphs)c.set(x,O);let y=new Set(s.spanning);for(let x of f.touched)y.delete(x);for(let x of f.spanning)y.add(x);return de.set(m,yo(s,{sites:g,paragraphs:c,key:l,spanning:y})),m}}}var Ro=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,Ar=["ascii","hAnsi","cs","eastAsia"],Fr=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],Br=128,Lr=/[\u0000-\u001F\u007F-\u009F]/;function C(t){return t.kind!=="textValue"}function ee(t,e){return t.attributes.find(n=>n.localName===e)?.value}function So(t,e){let n=new Map;for(let a of t)for(let o of a.children)if(C(o))for(let[s,l]of Io(o,e))n.has(s)||n.set(s,l);let r=[...n.values()];return r.sort((a,o)=>a<o?-1:a>o?1:0),r}var rt=new WeakMap,vo=16,bo=32;function Io(t,e,n=0){let r=e?.major??null,a=e?.minor??null,o=e?.majorEastAsia??null,s=e?.minorEastAsia??null,l=e?.majorBidi??null,d=e?.minorBidi??null,p=rt.get(t);if(p&&p.major===r&&p.minor===a&&p.majorEastAsia===o&&p.minorEastAsia===s&&p.majorBidi===l&&p.minorBidi===d)return p.byFold;if(t.children.length>=vo&&n<bo&&t.localName!=="rFonts"){let c=new Map;for(let y of t.children)if(C(y))for(let[x,O]of Io(y,e,n+1))c.has(x)||c.set(x,O);return rt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:d,byFold:c}),c}let m=new Map,f=c=>{if(!c||!Ro.test(c))return;let y=c.toLowerCase();m.has(y)||m.set(y,c);},g=[t];for(;g.length>0;){let c=g.pop();if(C(c)){if(c.localName==="rFonts"){for(let y of Ar)f(ee(c,y));if(e)for(let y of Fr)f(chunk65XBN67F_cjs.ya(ee(c,y),e));}for(let y=c.children.length-1;y>=0;y-=1)g.push(c.children[y]);}}return rt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:d,byFold:m}),m}function To(t){let e=new Map;for(let r of t)for(let a of r.children)if(C(a))for(let[o,s]of wo(a))e.has(o)||e.set(o,s);let n=[...e.values()];return n.sort((r,a)=>r<a?-1:r>a?1:0),n}var Po=new WeakMap,_r=new Map;function wo(t,e=0){let n=Po.get(t);if(n)return n;let r=s=>{let l=s.size===0?_r:s;return Po.set(t,l),l},a=new Map;if(t.children.length>=vo&&e<bo&&t.localName!=="sym"){for(let s of t.children)if(C(s))for(let[l,d]of wo(s,e+1))a.has(l)||a.set(l,d);return r(a)}let o=[t];for(;o.length>0;){let s=o.pop();if(C(s)){if(s.localName==="sym"&&s.namespaceUri===chunkZOZI27AW_cjs.pa){let l=s.attributes.find(p=>p.localName==="font"&&(p.namespaceUri===chunkZOZI27AW_cjs.pa||p.namespaceUri===""))?.value,d=chunkXJYZVGQR_cjs.c(l);d!==null&&!a.has(d.toLowerCase())&&a.set(d.toLowerCase(),d);}for(let l=s.children.length-1;l>=0;l-=1)o.push(s.children[l]);}}return r(a)}function No(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(C(n)){if(n.localName==="t"&&n.namespaceUri===chunkZOZI27AW_cjs.pa){for(let r of n.children)if(!C(r)&&r.value.length>0)return true;continue}for(let r of n.children)e.push(r);}}return false}var Hr=new Set(["paragraph","character","table","numbering"]),jr=/^[0-9A-Fa-f]{6}$/,zr=16,Oo=new Map([["normal",0],["title",1],["subtitle",2],["heading 1",11],["heading 2",12],["heading 3",13],["heading 4",14],["heading 5",15],["heading 6",16],["heading 7",17],["heading 8",18],["heading 9",19]]);function Eo(t){return t.children}function at(t,e){for(let n of Eo(t))if(C(n)&&n.localName===e)return n}function $r(t){return Oo.get(t.name.toLowerCase())??Oo.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function st(t){return t===void 0||t.length===0||t.length>Br||Lr.test(t)?null:t}function Mo(t,e){if(!t)return [];let n=new Map;for(let o of t.children){if(!C(o)||o.localName!=="style")continue;let s=st(ee(o,"styleId"));s!==null&&!n.has(s)&&n.set(s,o);}let r=o=>{let s=false,l=false,d=null,p=false,m=false,f=new Set,g=o;for(let x=0;x<zr&&g!==null&&!f.has(g);x+=1){f.add(g);let O=n.get(g);if(!O)break;let S=at(O,"rPr");for(let b of S?Eo(S):[]){if(!C(b))continue;let I=ee(b,"val"),E=I!=="0"&&I!=="false"&&I!=="off";b.localName==="b"&&!p?(s=E,p=true):b.localName==="i"&&!m?(l=E,m=true):b.localName==="color"&&d===null&&I&&jr.test(I)&&(d=I);}let v=at(O,"basedOn");g=v?st(ee(v,"val")):null;}let c=e?.(o),y=c?.fontFamily??null;return {fontFamily:y!==null&&Ro.test(y)?y:null,fontSizePt:c?.fontSizeHalfPoints!=null&&c.fontSizeHalfPoints>0?c.fontSizeHalfPoints/2:null,bold:s,italic:l,color:d}},a=[];for(let[o,s]of n){let l=ee(s,"type");if(l===void 0||!Hr.has(l))continue;let d=at(s,"name"),p=st(d?ee(d,"val"):void 0);a.push({styleId:o,name:p??o,type:l,preview:r(o)});}return a.map((o,s)=>({entry:o,index:s,rank:$r(o)})).sort((o,s)=>o.rank-s.rank||o.index-s.index).map(o=>o.entry)}var Wr=128,Ur=/[\u0000-\u001F\u007F-\u009F]/,Yr=/[\u0000-\u001F\u007F-\u009F]/g,Gr=200;function lt(t){return t.kind!=="textValue"}function Co(t,e){for(let n of t.children)if(lt(n)&&n.localName===e)return n}function it(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Jr(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!lt(n)||n.localName!=="style"||it(n,"type")!=="paragraph")continue;let r=it(n,"styleId");if(r===void 0||r.length===0||r.length>Wr||Ur.test(r))continue;let a=chunkTJHE5EET_cjs.a(n);a!==null&&e.set(r,a);}return e}function dt(t){let e=Co(t,"pPr"),n=e?Co(e,"pStyle"):void 0;return n?it(n,"val"):void 0}function Do(t,e){let n=Jr(e);if(n.size===0)return [];let r=[];for(let a of le(t)){if(!lt(a))continue;let o=dt(a);if(o===void 0)continue;let s=n.get(o);if(s===void 0)continue;let l=chunkZOZI27AW_cjs.Tk(t,a.id)??"",d=a.kind==="paragraph"?chunkZOZI27AW_cjs.Vk(a,l):l,p=chunkZOZI27AW_cjs.pb(d).replace(Yr," ").trim().slice(0,Gr);p.length!==0&&r.push({text:p,level:s,blockId:a.id});}return r}function Kr(t,e,n){let r=new Map,a=n(t);for(let o of a){let s=r.get(o.hostParagraphId);s?s.push(o):r.set(o.hostParagraphId,[o]);}return r}function Xr(t,e,n){let r=[];for(let a of chunkZOZI27AW_cjs.Vc(t.root)){let o=e.get(a.id);if(o)for(let s of o)r.push(s);}return r}function Ao(t,e,n=chunkZOZI27AW_cjs.Di){let r=[],a=new Map;for(let o of t){if(r.push(o),o.scope?.kind==="note")continue;let s=a.get(o.part);s||(s=Kr(o.part,e,n),a.set(o.part,s));for(let l of Xr(o,s)){let d=o.scope;r.push({part:o.part,root:l.root,scope:{kind:"frame",id:l.root.id,drawingNodeId:l.drawingNodeId,hostParagraphId:l.hostParagraphId,...d?.kind==="headerFooter"?{owner:d}:{}}});}}return r}var Ae=48,Qr=/[\u0000-\u001F\u007F-\u009F]/g;function Vr(t){let e=[],n=chunkZOZI27AW_cjs.rg(t),r=new Map;for(let a of n.segments)chunkZOZI27AW_cjs.Df(a.node)&&r.set(a.node.id,a.formatRunIds??[]);return chunkZOZI27AW_cjs.dd(t.children,0,a=>{if(a.kind==="run"){e.push({id:a.id,start:n.spanOf(a)?.start??0});return}if(chunkZOZI27AW_cjs.Df(a))for(let o of r.get(a.id)??[]){let s=n.spanOf(o);s&&e.push({id:o,start:s.start});}},{descendRevisions:true}),e}function qr(t){let e=chunkZOZI27AW_cjs.Uc(t);return e?[{part:t,root:e}]:[]}function Zr(t,e){let n=[];for(let r of ["header","footer"])for(let a of t){let o=r==="header"?a.headers:a.footers;for(let[s,l]of o){if(!chunkZOZI27AW_cjs.jf(a,s)||e.has(l.part))continue;e.add(l.part);let d=chunkZOZI27AW_cjs.Sc(l.part).find(p=>p.kind===r);d&&n.push({part:l.part,root:d.root,scope:{kind:"headerFooter",rId:l.rId}});}}return n}function Fo(t,e,n){if(!t)return [];let r=[];for(let a of chunkZOZI27AW_cjs.Oc(t.root)){let o=chunkZOZI27AW_cjs.Cc(a);!chunkZOZI27AW_cjs.Ec(a)||o===null||!n.has(o)||r.push({part:t,root:a,scope:{kind:"note",id:chunkZOZI27AW_cjs.sc(e,o)}});}return r}function ea(t,e){let n=qr(t);if(e){let r=new Set;for(let a of Zr(e.headerFooterBySection,r))n.push(a);for(let a of Fo(e.footnotes,"footnote",e.referencedNoteIds.footnote))n.push(a);for(let a of Fo(e.endnotes,"endnote",e.referencedNoteIds.endnote))n.push(a);}return Ao(n)}function Bo(t,e){if(t.length===0)return {index:0,offset:e};for(let n=t.length-1;n>=0;n-=1){let r=t[n].start;if(e>=r)return {index:n,offset:e-r}}return {index:0,offset:e}}function ta(t,e,n){let r=t.findIndex(a=>a.id===e);return r<0?null:{index:r,offset:n}}function ct(t,e){return chunkZOZI27AW_cjs.pb(t).replace(Qr," ").slice(0,e)}var na=1e3;function Lo(t,e,n={},r){let a=n.limit!==void 0&&Number.isInteger(n.limit)&&n.limit>0?Math.min(n.limit,2e3):2e3,o={...n.matchCase===void 0?{}:{matchCase:n.matchCase},...n.wholeWord===void 0?{}:{wholeWord:n.wholeWord}},s=e.slice(0,na),l=s.map(()=>({matches:[],truncated:false})),d=s.map((m,f)=>chunk65XBN67F_cjs.pa(m)?f:-1);if(d=d.filter(m=>m>=0),d.length===0)return l;let p=n.stories==="body"?void 0:r;for(let m of ea(t,p)){let f=0;for(let g of chunkZOZI27AW_cjs.Vc(m.root)){if(g.kind!=="paragraph")continue;let c=f;f+=1;let y=chunkZOZI27AW_cjs.Tk(m.part,g.id)??"",x=chunk6UDJUI3W_cjs.d(g,y);if(x.text.length===0)continue;let O=null,S=false;for(let v of d){let b=l[v],I=a-b.matches.length,E=x.findOccurrences(s[v],Math.max(I,1),o);if(I===0&&E.matches.length>0){b.truncated=true,S=true;continue}for(let w of E.matches){let L=w.start+w.length;O??=Vr(g);let _=x.resultRunAddressAt(w.start),G=_?ta(O,_.runId,_.offset)??Bo(O,w.rawStart):Bo(O,w.rawStart);b.matches.push({blockId:g.id,start:w.rawStart,length:w.rawEnd-w.rawStart,paragraphIndex:c,runIndex:G.index,runOffset:G.offset,...m.scope?{scope:m.scope}:{},text:ct(x.displaySlice(w.start,L),256),contextBefore:ct(x.displaySlice(Math.max(0,w.start-Ae),w.start),Ae),contextAfter:ct(x.displaySlice(L,L+Ae),Ae)});}E.truncated&&(b.truncated=true,S=true);}if(S&&(d=d.filter(v=>!l[v].truncated)),d.length===0)return l}}return l}var oa=32;function _o(t){let e=null;return((n,r)=>{let a=t.revision(),o=typeof n!="string",s=`${r?.matchCase===true?"c":""}${r?.wholeWord===true?"w":""}`,l=`${r?.limit??""}:${r?.stories??"all"}`,d=JSON.stringify([s,l,n]);e?.revision!==a&&(e={revision:a,results:new Map});let p=e.results.get(d);if(p)return p;let m=t.bodyPart(),f=t.currentPackage(),g={footnote:new Set,endnote:new Set};for(let x of chunkZOZI27AW_cjs.rh(m))g[x.noteKind].add(x.noteId);let c=Lo(m,o?n:[n],r,{headerFooterBySection:t.headerFooterBySection(),footnotes:chunkZOZI27AW_cjs.qh(f,"footnote")??null,endnotes:chunkZOZI27AW_cjs.qh(f,"endnote")??null,referencedNoteIds:g}),y=o?c:c[0];return e.results.size>=oa&&e.results.delete(e.results.keys().next().value),e.results.set(d,y),y})}var ra=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];function ce(t,e=null,n=null){return chunk65XBN67F_cjs.xa(t,e,n)}function Ho(t){let e=chunkZOZI27AW_cjs.Jd(t),n=[];for(let r of ra){let a=e.get(r);if(!a)return [];n.push({slot:r,hex:a});}return n}var jo=new WeakMap;function pt(t){let e=jo.get(t);if(e!==void 0)return e;let n=chunkZOZI27AW_cjs.Ab(t),r=n===null||!chunkZOZI27AW_cjs.zb(n)?null:n;return jo.set(t,r),r}var ut=class{#e;#t;constructor(e,n){this.#e=e,this.#t=n;}get size(){return this.#e.size}get(e){if(this.#e.has(e))return this.#t.find(n=>e.startsWith(`${n.name}#`))}has(e){return this.get(e)!==void 0}*entries(){for(let e of this.#e.keys()){let n=this.get(e);n&&(yield [e,n]);}}keys(){return this.#e.keys()}*values(){for(let[,e]of this.entries())yield e;}[Symbol.iterator](){return this.entries()}forEach(e,n){for(let[r,a]of this.entries())e.call(n,a,r,this);}};function zo(t,e){return Object.freeze({...t,partByNode:new ut(t.ordinalByNode,e)})}function $o(t){let e=new Map,n=new Map,r=new Map,a=new Set,o=new Map,s=new Map,l=0;for(let d of t)for(let p of B(d)){r.set(p.id,l),o.set(p.id,d),l+=1;let m=pt(p);if(m===null)continue;e.set(p.id,m);let f=m.toUpperCase(),g=s.get(f);g?(g.push(p.id),a.add(f)):(s.set(f,[p.id]),n.set(f,p.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:r,ambiguousParaIds:a,partByNode:o,claimantsByParaId:s})}function Wo(t,e){let n=t.indexOf("#");if(n<=0)return null;let r=t.slice(0,n),a=e.body.name===r?e.body:void 0;a??=e.openStories.find(l=>l.name===r);let o=a?void 0:e.otherStories.find(l=>l.name===r);if(a??=o?e.normalize(o):void 0,!a)return null;let s=chunkZOZI27AW_cjs.Xa(a,t);return s?.kind==="paragraph"?pt(s):null}function ft(t){return t.historyToken??t.historyGroup}var Uo={committed:false,rejected:false,opCount:0};function z(t,e){return e===void 0?{committed:false,rejected:true,opCount:t}:{committed:false,rejected:true,opCount:t,reason:e}}function Yo(t,e,n={}){let r=e.filter(m=>m.ops.length>0),a=n.partOps??[],o=[...r,...a].reduce((m,f)=>m+f.ops.length,0);if(o===0)return n.packageEdits?.length?z(0,"invalidArgs"):Uo;if([...r,...a].some(m=>m.ops.some(chunkZOZI27AW_cjs._g))||[...r,...a].some(m=>m.ops.some(chunkZOZI27AW_cjs.hi)))return z(o,"invalidArgs");let[s,...l]=r,d=[];for(let m of l){let f=t.partFor(m.scope);if(!f)return z(o,"unknown-part");d.push({partName:f.name,ops:m.ops});}let p=t.transact(s?.scope??{kind:"body"},m=>{for(let f of n.packageEdits??[])m.applyPackage(f);for(let f of s?.ops??[])m.apply(f);for(let f of d)for(let g of f.ops)m.applyTo(f.partName,g);for(let f of a)for(let g of f.ops)m.applyTo(f.partName,g);},{...n,historyGroup:ft(n)});return p.ok?{committed:true,rejected:false,opCount:o}:z(o,p.reason)}function Go(t,e,n,r,a,o){let s=o.partOps??[],l=e.length+s.reduce((f,g)=>f+g.ops.length,0);if(l===0&&!o.packageEdits?.length)return Uo;if(s.some(f=>f.ops.some(g=>chunkZOZI27AW_cjs._g(g)||chunkZOZI27AW_cjs.hi(g))))return z(l,"invalidArgs");let d=e.filter(f=>chunkZOZI27AW_cjs._g(f)||chunkZOZI27AW_cjs.hi(f)).length;if(d>0){if(s.length||o.packageEdits?.length||d!==e.length||e.length!==1)return z(e.length,"invalidArgs");let f=t.applyLifecycleOp(e[0],{actorId:o.actorId,historyGroup:ft(o)});return f.ok?{committed:true,rejected:false,opCount:1}:z(1,f.detail??f.reason)}let p=o.recordsHistory===false&&o.actorId&&o.operationId?t.partFor(a)?.name:void 0,m=t.transact(a,f=>{n!==void 0&&f.selectionBefore(n),r!==void 0&&f.selectionAfter(r);for(let g of o.packageEdits??[])f.applyPackage(g);for(let g of e)f.apply(g);for(let g of s)for(let c of g.ops)f.applyTo(g.partName,c);p&&f.applyPackage(g=>chunkO324RB6R_cjs.a(g,p,e));},{...o,historyGroup:ft(o)});return m.ok?{committed:true,rejected:false,opCount:l}:z(l,m.reason)}var aa=Object.freeze([]);function sa(t,e={}){return ia(chunkZOZI27AW_cjs.Je(t),e)}function ia(t,e={}){if(!t.ok)return t;let n=t.package,r=n.parts.get(n.mainDocumentPart);if(!r)return {ok:false,reason:"no-main-document-tree",detail:n.mainDocumentPart};let a=chunkZOZI27AW_cjs.Ib(r),o=new chunk65XBN67F_cjs.Q(n,chunk65XBN67F_cjs.ra(n,a),e.contentLockPolicy?{contentLockPolicy:e.contentLockPolicy}:{}),s=null,l=null,d=null,p=null,m=null;o.subscribe(i=>{p=i,m=o.currentPackage();});let f=()=>o.bodyStore(),g=()=>o.currentPackage(),c=to(),y=Object.freeze({kind:"body"}),x=(i,u)=>{let h=u?.find(P=>P.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");if(!h)return;let k=chunkZOZI27AW_cjs.N(h);return k.mode==="Internal"&&k.target.ok?i.parts.get(k.target.partName):void 0},O=(i,u,h)=>{if(i.mainRelationships!==h||i.settingsPart!==x(u,h))return false;for(let k of i.resolution)for(let P of [k.headers,k.footers])for(let R of P.values())if(u.parts.get(R.partName)!==R.part)return false;return true},S=()=>{let i=g(),u=i.relationships.get(i.mainDocumentPart);if(s&&p&&m===i&&O(s,i,u)&&s.packageRevision===p.fromRevision&&o.packageRevision===p.toRevision&&p.story?.kind==="body"&&p.impact==="text-local"&&p.created.length===0&&p.deleted.length===0&&p.splitJoin.length===0&&(s={...s,packageRevision:o.packageRevision,pkg:i,mainRelationships:u,settingsPart:x(i,u)}),!s||s.packageRevision!==o.packageRevision||s.pkg!==i){let h=chunkZOZI27AW_cjs.mf(i);s={packageRevision:o.packageRevision,pkg:i,mainRelationships:u,settingsPart:x(i,u),resolution:h,parts:chunkZOZI27AW_cjs.lf(h)};}return s},v="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",b=null,I=()=>{let i=g(),u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===v),h;if(u){let P=chunkZOZI27AW_cjs.N(u);P.mode==="Internal"&&P.target.ok&&(h=i.parts.get(P.target.partName));}h??=i.parts.get("/word/styles.xml");let k=h?.root??null;return k!==b&&(b=k,me=null,K=null),b},E=null,w=null,L=()=>{let i=g();return E===i||(E=i,w=chunkZOZI27AW_cjs.gd(i)),w},_="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",G=null,Oe=null,J=()=>{let i=g();if(G===i)return Oe;G=i;let u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===_),h;if(u){let P=chunkZOZI27AW_cjs.N(u);P.mode==="Internal"&&P.target.ok&&(h=i.parts.get(P.target.partName));}h??=i.parts.get("/word/settings.xml");let k=h?.root??null;return k!==Oe&&(Oe=k,Se=null,me=null,K=null),Oe},Ko="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Xo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",mt=(i,u)=>{let h=g(),k=(h.relationships.get("/")??[]).find(R=>R.type===i),P;if(k){let R=chunkZOZI27AW_cjs.N(k);R.mode==="Internal"&&R.target.ok&&(P=h.parts.get(R.target.partName));}return P??h.parts.get(u)},gt=null,Fe=chunkZOZI27AW_cjs.Bi,Qo=()=>{let i=g();if(gt===i)return Fe;gt=i;let u=mt(Ko,"/docProps/core.xml"),h=mt(Xo,"/docProps/app.xml");return Fe=chunkZOZI27AW_cjs.Ci(u?.root??null,h?.root??null),Fe},Vo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",yt=null,Re=null,te=()=>{let i=g();if(yt===i)return Re;yt=i;let u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===Vo),h;if(u){let P=chunkZOZI27AW_cjs.N(u);P.mode==="Internal"&&P.target.ok&&(h=i.parts.get(P.target.partName));}h??=i.parts.get("/word/theme/theme1.xml");let k=h?.root??null;return k!==Re&&(Re=k,Se=null,Be=null,me=null,K=null),Re},qo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",ht=null,xt=()=>{let i=g(),u=(i.relationships.get(i.mainDocumentPart)??[]).find(P=>P.type===qo),h=u?chunkZOZI27AW_cjs.N(u):null;return (h?.mode==="Internal"&&h.target.ok?i.parts.get(h.target.partName):void 0)??i.parts.get("/word/fontTable.xml")},Zo=()=>(ht??=Object.freeze(chunkZOZI27AW_cjs.qf(g(),xt())),ht),ue=null,ne=null,pe=null,fe=null,me=null,Be=null,Se=null,kt=()=>{let i=[f().part.root],u=new Set;for(let h of $())u.has(h)||(u.add(h),i.push(h.root));return i},Le=()=>{let i=kt(),u=I();return u&&i.splice(1,0,u),i},K=null,ve=null,ge=null,oe=null,Pt=new WeakMap,be=null,Ot=i=>{let u=Pt.get(i);if(u)return u;let h=chunkZOZI27AW_cjs.Ib(i);return Pt.set(i,h),h},Rt=()=>{let i=o.packageRevision,u=o.openStoryToken();if(!oe||oe.revision!==i||oe.openStories!==u){let h=o.openStoryParts(),k=new Set(h.map(D=>D.name)),P=$().filter(D=>!k.has(D.name)).map(Ot),R=[f().part,...h,...P],T=oe,H=T!==null&&p!==null&&T.openStories===u&&T.revision===p.fromRevision&&i===p.toRevision&&p.impact==="text-local"&&p.created.length===0&&p.deleted.length===0&&p.splitJoin.length===0&&T.parts.length===R.length&&T.parts.every((D,X)=>D.name===R[X]?.name);oe={revision:i,openStories:u,parts:R,index:H&&T?zo(T.index,R):$o(R)};}return oe.index},St=mo(),er=()=>{let i=f().part.name,u=new Map;for(let h of [f().part,...$()])for(let[k,P]of chunk65XBN67F_cjs.ha(g(),h.name,i))u.set(k,P);return u},tr=()=>[f().part,...$()],$=()=>{let i=[],u=new Set;for(let k of S().parts)for(let P of [k.headers,k.footers])for(let R of P.values())u.has(R)||(u.add(R),i.push(R));let h=g();for(let k of ["footnote","endnote"]){let P=chunkZOZI27AW_cjs.qh(h,k);!P||u.has(P)||(u.add(P),i.push(P));}return i},vt={ok:true,session:{editable:B(f().part).length>0,paragraphIds:()=>B(f().part).map(i=>i.id),paragraphIdsIn(i=y){let u=o.partFor(i);return u?B(u).map(h=>h.id):[]},part:()=>f().part,partFor:i=>o.partFor(i),currentPackage:g,collaborationPort:i=>chunkO324RB6R_cjs.b(o,{documentId:i,interactive:true}),applyTreeOps(i,u,h,k=y,P={}){return Go(o,i,u,h,k,P)},applyTreeOpsAtomic(i,u={}){return Yo(o,i,u)},projectDoc:()=>Z(f().part),reconcile:i=>tt(i,f().part,p),lastCommitWasStructural:()=>p!==null&&(p.created.length>0||p.deleted.length>0||p.splitJoin.length>0||p.impact==="global"),applyPmDoc(i){let u=f(),h=et(u.part,i);if(!h.ok)return {committed:false,rejected:true,opCount:0,reason:h.reason};if(h.ops.length===0)return {committed:false,rejected:false,opCount:0};let k=o.transact(y,P=>{for(let R of h.ops)P.apply(R);});return k.ok?{committed:true,rejected:false,opCount:h.ops.length}:{committed:false,rejected:true,opCount:h.ops.length,reason:k.reason}},storyParts:tr,bodyText:()=>oo(f().part),storyText(i){let u=o.partFor(i);return u?B(u).map(h=>chunkZOZI27AW_cjs.Tk(u,h.id)??"").join(`
|
|
5
|
+
`):null},revision:()=>f().revision,revisionFor:i=>o.revisionFor(i),packageRevision:()=>o.packageRevision,canUndo:()=>o.canUndo,canRedo:()=>o.canRedo,undo:()=>{let i=o.selectionForUndo();return o.undo()===null?null:i},redo:()=>{let i=o.selectionForRedo();return o.redo()===null?null:i},beginComposition:(i=y)=>{o.beginComposition(i);},endComposition:()=>o.endComposition(),subscribe(i){return o.subscribe(i)},save(){return c(g())},saveSteps(){return c.steps(g())},headerFooterParts:()=>{let i=S().parts;return i[i.length-1]??chunkZOZI27AW_cjs.of(g())},headerFooterPartsBySection:()=>S().parts,headerFooterResolutionBySection:()=>S().resolution,documentFonts(){return ue&&ue.revision===o.packageRevision||(ue={revision:o.packageRevision,fonts:So(Le(),ce(te(),J()))}),ue.fonts},symbolFontFamilies(){return pe&&pe.revision===o.packageRevision||(pe={revision:o.packageRevision,fonts:To(Le())}),pe.fonts},renderedFontFamilies(){let i=I();return ne&&ne.revision===o.packageRevision&&ne.styles===i||(ne={revision:o.packageRevision,styles:i,families:chunkXJYZVGQR_cjs.f(kt(),i,ce(te(),J()))}),ne.families},rendersText(){return fe&&fe.revision===o.packageRevision||(fe={revision:o.packageRevision,rendersText:No(Le())}),fe.rendersText},documentStyles(){let i=I(),u=te(),h=J();K??=chunkXJYZVGQR_cjs.d(i,ce(u,h));let k=K;return me??=Mo(i,P=>k(P)),me},stylesRoot:()=>I(),documentThemeFonts(){let i=te(),u=J();return Se??=ce(i,u,xt()?.root??null),Se},numberingRoot:()=>L(),settingsRoot:()=>J(),documentProperties:()=>Qo(),trackingSettings:()=>chunkZOZI27AW_cjs.yi(J()),documentThemeColors(){let i=te();return Be??=Ho(i),Be},effectiveRunDefaults(i,u){let h=I(),k=te(),P=J();K??=chunkXJYZVGQR_cjs.d(h,ce(k,P));let R=f();if(!ve||ve.revision!==R.revision){let T=new Map;for(let H of B(R.part))H.kind!=="textValue"&&T.set(H.id,dt(H)??null);ve={revision:R.revision,byId:T};}return K(ve.byId.get(i)??null,u)},documentOutline(){let i=f();return ge&&ge.revision===i.revision||(ge={revision:i.revision,outline:Do(i.part,I())}),ge.outline},findText:_o({revision:()=>o.packageRevision,bodyPart:()=>f().part,currentPackage:g,headerFooterBySection:()=>S().resolution}),embeddedFonts:Zo,paragraphAnchors:Rt,paraIdOf:i=>Wo(i,{body:f().part,openStories:o.openStoryParts(),otherStories:$(),normalize:Ot}),nodeIdOf:i=>Rt().nodeByParaId.get(i.toUpperCase())??null,relationshipTarget:(i,u=y)=>{let h=g(),k=o.partFor(u);return k?chunkZOZI27AW_cjs.Vg(h,k.name,i):null},bookmarks:()=>{let i=o.packageRevision;if(!be||be.revision!==i){let u=new Map(chunkZOZI27AW_cjs.wg(f().part));for(let h of $())for(let[k,P]of chunkZOZI27AW_cjs.wg(h))u.has(k)||u.set(k,P);be={revision:i,index:u};}return be.index},ensureHyperlinkRelationship(i,u=y){let h=o.partFor(u);return h?chunkZOZI27AW_cjs.Ra(o,()=>{let k=g(),P=chunkZOZI27AW_cjs.Ug(k,i,h.name);return P?(P.pkg!==k&&o.replacePackageShell(P.pkg),P.relationshipId):null},k=>k!==null):null},reviewItems(){let i=e.reviewModel;if(!i)return aa;let u=f(),h=`${o.packageRevision}:${u.revision}`;if(l&&l.revisionKey===h)return l.items;let k=g(),P=k.parts.get(chunk65XBN67F_cjs.Z(k,u.part.name)),R=k.parts.get(chunk65XBN67F_cjs._(k,u.part.name)),T={root:u.part.root,commentsPart:P,commentsExtendedPart:R,stylesPart:chunkZOZI27AW_cjs.fd(k),numberingRoot:L(),furnitureParts:$(),customNodePayloads:er()},{stylesPart:H,numberingRoot:D}=T,X=ko(i,k,T,l),bt=()=>St.get(T)??X.filtered(i.collectReviewItems({storyPart:u.part,furnitureParts:T.furnitureParts,stylesPart:T.stylesPart,commentsPart:P,commentsExtendedPart:R,customNodePayloads:T.customNodePayloads})),It={part:u.part,commentsPart:P,commentsExtendedPart:R,currentPackageRevision:o.packageRevision,currentPackage:k,changePackage:m},re,ye=null;if(l&&p&&X.sameFilter&&po(p,l,l.items,It))re=l.items;else {let ae=l&&p?fo(p,l,l.items,It):null,_e=ae&&l&&X.patchable(ae)?i.revisionItemsOfParagraph(u.part,ae):null;if(ae&&l&&_e&&ro(l.items,_e,ae,u.part)){ye=l.paragraphOrder??chunkZOZI27AW_cjs.qj(u.part);let Tt=ao(l.items,ye,ae,_e,X.filtered,u.part);Tt||(ye=chunkZOZI27AW_cjs.qj(u.part)),re=Tt??bt();}else ye=chunkZOZI27AW_cjs.qj(u.part),re=bt();}return St.set(T,re=X.publish(re)),l={revisionKey:h,bodyRevision:u.revision,packageRevision:o.packageRevision,items:re,paragraphOrder:ye,commentsPart:P,commentsExtendedPart:R,pkg:k,stylesPart:H,numberingRoot:D},l.items},hasReviewContent(){let i=o.packageRevision;if(!d||d.revision!==i){let u=chunkZOZI27AW_cjs.fd(g()),h=[f().part,...$(),...u?[u]:[]];d={revision:i,present:h.some(k=>nt(k.root)||chunkZOZI27AW_cjs.lk(k).length>0)};}return d.present},replyToComment(i,u,h,k,P,R=y,T,H={}){let D=chunk65XBN67F_cjs.$(o,{anchor:{paragraphId:u.paragraphId,start:u.start,end:u.end,...u.endParagraphId===void 0?{}:{endParagraphId:u.endParagraphId}},author:k,text:h,...P===void 0?{}:{date:P},...i===null?{}:{replyToCommentId:i},...T===void 0?{}:{actorId:T}},R,H.historyToken);return D.ok?D.commentId:null},setCommentResolved(i,u,h={}){return chunk65XBN67F_cjs.aa(o,i,u,h.historyToken).ok},deleteComment(i,u=y,h,k){return this.deleteComments([{commentId:i}],u,h,k)},deleteComments(i,u=y,h,k={}){return chunk65XBN67F_cjs.ba(o,i,u,h,k.historyToken)},insertCustomNode(i,u=y,h={}){return chunk65XBN67F_cjs.ja(o,i,u,h.historyToken)},removeCustomNode(i,u=y){return chunk65XBN67F_cjs.ka(o,i,u)},sweepCustomNodePayloads(i){return chunkZOZI27AW_cjs.Ra(o,()=>{let u=f(),h=chunk65XBN67F_cjs.ga(o.currentPackage(),u.part.name,i);return h.ok?h.removed.length===0?{ok:true,removed:[]}:(o.replacePackageShell(h.pkg),{ok:true,removed:h.removed}):{ok:false,reason:h.reason}},u=>u.ok&&u.removed.length>0)},ensureListDefinition(i){return chunkZOZI27AW_cjs.Ra(o,()=>{let u=chunkZOZI27AW_cjs.Ig(g(),i);return u?(o.replacePackageShell(u.pkg),E=null,w=null,u.numId):null},u=>u!==null)},ensureNumberingLevel(i,u,h){return chunkZOZI27AW_cjs.Ra(o,()=>{let k=g(),P=chunkZOZI27AW_cjs.Jg(k,i,u,h);return P?P!==k?(o.replacePackageShell(P),E=null,w=null,{ok:true,changed:true}):{ok:true,changed:false}:{ok:false,changed:false}},k=>k.changed).ok},insertImage(i,u){return o.insertImage(i,u)},replaceImage(i,u,h,k,P,R){return o.replaceImage(i,u,h,k,P,R)},deleteImage(i,u){return o.deleteImage(i,u)},deleteImageTracked(i,u,h){return o.deleteImageTracked(i,u,h)},applyImageProperties(i,u){return o.applyImageProperties(i,u)},applyFragmentPaste(i,u){return o.applyFragmentPaste(i,u)}}};return chunkZOZI27AW_cjs.Xl(vt.session,o),vt}var la=chunkZOZI27AW_cjs.g.projection;function ka(t,e,n){let r=t.filter(a=>a.localName!==e);return r.length!==t.length?r:[...r,n?{localName:e,attributes:n}:{localName:e}]}function Pa(t,e,n={}){let r=null,a=false,o=()=>n.onChange?.(s()),s=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:r}),l=c=>{a=true;let y=p.state.tr.replaceWith(0,p.state.doc.content.size,c.content);y.setMeta("addToHistory",false),p.dispatch(y),a=false;},d=c=>()=>(c()&&(l(e.projectDoc()),o()),true),p=new prosemirrorView.EditorView(t,{state:prosemirrorState.EditorState.create({doc:e.projectDoc(),plugins:[prosemirrorKeymap.keymap({...prosemirrorCommands.baseKeymap,Home:prosemirrorCommands.selectTextblockStart,End:prosemirrorCommands.selectTextblockEnd,"Mod-z":d(()=>e.undo()!==null),"Mod-y":d(()=>e.redo()!==null),"Shift-Mod-z":d(()=>e.redo()!==null),"Mod-b":(c,y)=>g(c,y,"b"),"Mod-i":(c,y)=>g(c,y,"i"),"Mod-u":(c,y)=>g(c,y,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:c=>(m(c),false),beforeinput:(c,y)=>{let x=y;if(c.composing)return false;m(c);let O=x.inputType;if(O==="insertText"&&x.data!=null){x.preventDefault();let{from:S,to:v}=c.state.selection;return c.dispatch(c.state.tr.insertText(x.data,S,v)),true}if(O==="deleteContentBackward"){x.preventDefault();let{from:S,empty:v}=c.state.selection;return v?S>0?c.dispatch(c.state.tr.delete(S-1,S)):prosemirrorCommands.joinBackward(c.state,c.dispatch):prosemirrorCommands.deleteSelection(c.state,c.dispatch),true}if(O==="deleteContentForward"){x.preventDefault();let{from:S,to:v,empty:b}=c.state.selection;return b?v<c.state.doc.content.size?c.dispatch(c.state.tr.delete(S,S+1)):prosemirrorCommands.joinForward(c.state,c.dispatch):prosemirrorCommands.deleteSelection(c.state,c.dispatch),true}return O==="insertParagraph"?(x.preventDefault(),prosemirrorCommands.splitBlock(c.state,c.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),o(),false)},dispatchTransaction(c){let y=p.state.apply(c);if(a||!c.docChanged){p.updateState(y);return}let x=e.applyPmDoc(y.doc);if(x.rejected){r=String(x.reason??"rejected"),p.updateState(y),l(e.projectDoc()),o();return}r=null,p.updateState(x.committed&&e.lastCommitWasStructural()?f(y):y),o();}});function m(c){if(c.composing||a)return;let y=c.dom.ownerDocument.getSelection(),x=y?.anchorNode,O=y?.focusNode;if(!(!y||!x||!O)&&!(!c.dom.contains(x)||!c.dom.contains(O)))try{let S=c.posAtDOM(x,y.anchorOffset),v=c.posAtDOM(O,y.focusOffset),b=c.state.selection;if(b.anchor===S&&b.head===v)return;let I=prosemirrorState.TextSelection.create(c.state.doc,S,v);c.dispatch(c.state.tr.setSelection(I).setMeta("addToHistory",!1));}catch{}}function f(c){let y=e.paragraphIds(),x=c.tr,O=false,S=0;return c.doc.forEach((v,b)=>{let I=y[S];S+=1,!(v.type.name!=="paragraph"||I===void 0)&&v.attrs.nodeId!==I&&(x=x.setNodeMarkup(b,void 0,{...v.attrs,nodeId:I}),O=true);}),O?c.apply(x.setMeta("addToHistory",false)):c}function g(c,y,x,O){let S=N.marks.runProps;if(!y)return true;let{from:v,to:b,empty:I}=c.selection;if(I)return true;let w=c.doc.resolve(v).marks().find(G=>G.type===S)?.attrs.props??[],L=ka(w,x,O),_=c.tr;return _.removeMark(v,b,S),L.length>0&&_.addMark(v,b,S.create({props:L})),y(_),true}return {view:p,state:s,undo:()=>d(()=>e.undo()!==null)(),redo:()=>d(()=>e.redo()!==null)(),toggleRunProperty(c,y){g(p.state,p.dispatch.bind(p),c,y);},destroy:()=>p.destroy()}}exports.a=N;exports.b=qe;exports.c=le;exports.d=B;exports.e=Z;exports.f=et;exports.g=hr;exports.h=tt;exports.i=dt;exports.j=Va;exports.k=Mr;exports.l=sa;exports.m=ia;exports.n=la;exports.o=Pa;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var y=/^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,C=/^var\(--doc-review-author-[0-9]{1,2}\)$/;function f(o){if(o!==void 0&&!(o.length>64)&&(y.test(o)||C.test(o)))return o}var g={"already-initialized":true,"authentication-failed":true,"baseline-digest-mismatch":true,"baseline-too-large":true,"blob-digest-mismatch":true,"blob-read":true,"blob-store-full":true,"blob-too-large":true,"collaboration-format-mismatch":true,"collaboration-session-destroyed":true,"collaboration-session-not-attached":true,"collaboration-session-not-ready":true,"collaboration-text-limit":true,"concurrent-seed":true,"document-id-mismatch":true,"duplicate-paragraph-id":true,"experimental-collaboration-body-text-only":true,"experimental-collaboration-existing-paragraphs-only":true,"experimental-collaboration-text-only":true,"experimental-collaboration-untracked-text-only":true,"immutable-baseline-changed":true,"immutable-metadata-changed":true,"initialization-aborted":true,"initialization-timeout":true,"invalid-baseline":true,"invalid-blob-descriptor":true,"invalid-bound":true,"invalid-document-id":true,"invalid-identity":true,"invalid-identity-color":true,"invalid-logical-id":true,"invalid-relationships":true,"invalid-saved-room":true,"invalid-session-id":true,"invalid-shared-metadata":true,"invalid-string":true,"local-mirror-failed":true,"materialize-dropped-content":true,"missing-blob":true,"missing-local-blob":true,"missing-root":true,"no-main-document-part":true,"not-initialized":true,"paragraph-set-mismatch":true,"port-already-attached":true,"protocol-version-mismatch":true,"prototype-key":true,"remote-apply-failed":true,"room-generation-changed":true,"saved-room-unavailable":true,"schema-version-mismatch":true,"shared-schema-invalid":true,"text-too-long":true,"too-many-attributes":true,"too-many-children":true,"too-many-nodes":true,"too-many-parts":true,"too-many-relationships":true,transport:true,"transport-disconnected":true,"tree-too-deep":true,"unknown-logical-id":true,"unknown-paragraph-id":true,"unsafe-part-name":true,"unsupported-root-key":true};function h(o){return Object.hasOwn(g,o)}function S(o,e){return o===e?true:!o||!e?false:o.code===e.code&&o.detail===e.detail}function v(o,e){return Object.freeze(e!==void 0&&e.length>0?{code:o,detail:e}:{code:o})}function x(o="initializing"){let e=o,a,l,d=0,r=false,n=false,s=Object.freeze({status:e,reason:a,lastFailure:l,failureCount:d,recovering:r,waiting:n}),u=()=>{s=Object.freeze({status:e,reason:a,lastFailure:l,failureCount:d,recovering:r,waiting:n});};return {status:()=>e,snapshot:()=>s,set(t,c,p,m=false){let i=c===void 0?void 0:v(c,p),b=t==="error"&&m;return e===t&&S(a,i)&&r===b?false:(e=t,a=i,r=b,t==="error"&&i&&(l=i,d+=1),u(),true)},setWaiting(t){return n===t?false:(n=t,u(),true)}}}exports.a=f;exports.b=h;exports.c=x;
|