@arbidocs/blocks 0.4.100 → 0.4.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/index.cjs +207 -207
- package/dist/agents/index.js +2 -2
- package/dist/{chunk-NJX774HB.js → chunk-5NQIBJPP.js} +3 -3
- package/dist/{chunk-NJX774HB.js.map → chunk-5NQIBJPP.js.map} +1 -1
- package/dist/chunk-6MG62I5B.cjs +272 -0
- package/dist/chunk-6MG62I5B.cjs.map +1 -0
- package/dist/{chunk-NW3LFDZL.cjs → chunk-DDYXFALG.cjs} +3 -3
- package/dist/{chunk-NW3LFDZL.cjs.map → chunk-DDYXFALG.cjs.map} +1 -1
- package/dist/chunk-EQB3WELX.js +269 -0
- package/dist/chunk-EQB3WELX.js.map +1 -0
- package/dist/{chunk-B7P73VHX.cjs → chunk-FAGQTB3D.cjs} +30 -214
- package/dist/chunk-FAGQTB3D.cjs.map +1 -0
- package/dist/{chunk-6HZNFOHW.js → chunk-G5JH2YMQ.js} +3 -3
- package/dist/{chunk-6HZNFOHW.js.map → chunk-G5JH2YMQ.js.map} +1 -1
- package/dist/{chunk-72PQ42YI.js → chunk-MYALCKDR.js} +34 -217
- package/dist/chunk-MYALCKDR.js.map +1 -0
- package/dist/{chunk-O24WPHLD.cjs → chunk-Y5XW57U4.cjs} +5 -5
- package/dist/{chunk-O24WPHLD.cjs.map → chunk-Y5XW57U4.cjs.map} +1 -1
- package/dist/{chunk-E2QWWLK5.js → chunk-YGREW5TZ.js} +3 -3
- package/dist/{chunk-E2QWWLK5.js.map → chunk-YGREW5TZ.js.map} +1 -1
- package/dist/{chunk-IE55TWIG.cjs → chunk-ZT2EBBSC.cjs} +5 -5
- package/dist/{chunk-IE55TWIG.cjs.map → chunk-ZT2EBBSC.cjs.map} +1 -1
- package/dist/connect/docx.cjs +6 -6
- package/dist/connect/docx.js +4 -4
- package/dist/connect/index.cjs +3 -3
- package/dist/connect/index.js +2 -2
- package/dist/document-tools/AdoptSignatureDialog.d.ts +25 -0
- package/dist/document-tools/DocumentToolButtons.d.ts +2 -0
- package/dist/document-tools/SignatureRequestBanner.d.ts +18 -0
- package/dist/document-tools/index.cjs +175 -0
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.ts +3 -1
- package/dist/document-tools/index.js +168 -3
- package/dist/document-tools/index.js.map +1 -1
- package/dist/document-tools/viewer/GuidedSigningViewer.d.ts +26 -0
- package/dist/document-tools/viewer/SignatureFieldsOverlay.d.ts +41 -0
- package/dist/document-tools/viewer/SignatureRequestEditor.d.ts +26 -0
- package/dist/document-tools/viewer/index.cjs +983 -0
- package/dist/document-tools/viewer/index.cjs.map +1 -1
- package/dist/document-tools/viewer/index.d.ts +3 -0
- package/dist/document-tools/viewer/index.js +983 -5
- package/dist/document-tools/viewer/index.js.map +1 -1
- package/dist/docx/NativeDocxEditor.d.ts +1 -1
- package/dist/docx/definitions/DefinedTerms.d.ts +1 -12
- package/dist/docx/definitions/commands.d.ts +3 -27
- package/dist/docx/index.cjs +35 -39
- package/dist/docx/index.d.ts +1 -1
- package/dist/docx/index.js +3 -3
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +253 -253
- package/dist/index.js +3 -3
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/workflow-canvas/index.cjs +9 -9
- package/dist/workflow-canvas/index.js +2 -2
- package/node_modules/@arbidocs/coedit/LICENSE +21 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.cjs +751 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.d.cts +192 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.d.ts +192 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.js +716 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +1759 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.cts +39 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.ts +39 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +1736 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/index.cjs +1692 -0
- package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/index.d.cts +16 -0
- package/node_modules/@arbidocs/coedit/dist/index.d.ts +16 -0
- package/node_modules/@arbidocs/coedit/dist/index.js +1664 -0
- package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/server.cjs +1852 -0
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +43 -0
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +43 -0
- package/node_modules/@arbidocs/coedit/dist/server.js +1822 -0
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/session-Cf9iu1Vt.d.cts +82 -0
- package/node_modules/@arbidocs/coedit/dist/session-Cf9iu1Vt.d.ts +82 -0
- package/node_modules/@arbidocs/coedit/dist/template.cjs +1627 -0
- package/node_modules/@arbidocs/coedit/dist/template.cjs.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/template.d.cts +125 -0
- package/node_modules/@arbidocs/coedit/dist/template.d.ts +125 -0
- package/node_modules/@arbidocs/coedit/dist/template.js +1612 -0
- package/node_modules/@arbidocs/coedit/dist/template.js.map +1 -0
- package/node_modules/@arbidocs/coedit/dist/versions-DXiFQMA6.d.cts +8 -0
- package/node_modules/@arbidocs/coedit/dist/versions-DXiFQMA6.d.ts +8 -0
- package/node_modules/@arbidocs/coedit/package.json +68 -0
- package/node_modules/@docx-editor.dev/core/LICENSE +201 -0
- package/node_modules/@docx-editor.dev/core/README.md +125 -0
- package/node_modules/@docx-editor.dev/core/THIRD_PARTY_NOTICES.md +56 -0
- package/node_modules/@docx-editor.dev/core/dist/automation.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/automation.d.ts +162 -0
- package/node_modules/@docx-editor.dev/core/dist/automation.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/binding.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/binding.d.ts +164 -0
- package/node_modules/@docx-editor.dev/core/dist/binding.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2GO5T2JU.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-2RC2EPND.js +3 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-4GBTELJV.cjs +28 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-4R3TEXMN.js +18 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-5CSUYANV.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6APGXLBB.cjs +3 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6AWEKBLB.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6EYYL7FL.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-6JIJOZDW.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-BTQKU64Q.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-E7BQA6UP.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-EO4C5QJW.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ETTO6GK3.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-FIJZIQXA.cjs +18 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-FRXAOVTB.js +28 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-J6BVWIDB.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-JGNVNT2A.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-K5U2PLDP.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-KKIJG3C6.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-LWDSDCMO.js +27 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-NBCVVZOM.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-O2AL2HSJ.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-O5INAWZQ.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-QMLCVPCD.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-RCHS4ZEH.cjs +27 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-RIYSCEFQ.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-S6J4O5XP.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-SRPILEWV.cjs +5 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-TSLBZ26X.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-UKVVUHZL.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-VDNNLG6X.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-VHAVHCQY.js +7 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-VX43VBAX.cjs +7 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-Z6WBFXJU.js +5 -0
- package/node_modules/@docx-editor.dev/core/dist/chunk-ZUHOMK52.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.d.ts +270 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration.d.ts +269 -0
- package/node_modules/@docx-editor.dev/core/dist/collaboration.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/document.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/document.d.ts +290 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/document.js +0 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/editor.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/editor.d.ts +22 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/editor.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.d.ts +103 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.js +0 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/modules.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/modules.d.ts +143 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/modules.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/types.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/types.d.ts +11 -0
- package/node_modules/@docx-editor.dev/core/dist/contracts/types.js +0 -0
- package/node_modules/@docx-editor.dev/core/dist/custom-node-writes-cvL5rhcD.d.ts +323 -0
- package/node_modules/@docx-editor.dev/core/dist/dist-PKZR6RSH.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/document-protection-BAGVGqaP.d.ts +20 -0
- package/node_modules/@docx-editor.dev/core/dist/editor-Ci7IZGmG.d.ts +2448 -0
- package/node_modules/@docx-editor.dev/core/dist/editor-scope-OHPwVQ5l.d.ts +84 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.css +15 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.d.ts +1394 -0
- package/node_modules/@docx-editor.dev/core/dist/editor.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/export.cjs +2 -0
- package/node_modules/@docx-editor.dev/core/dist/export.d.ts +391 -0
- package/node_modules/@docx-editor.dev/core/dist/export.js +2 -0
- package/node_modules/@docx-editor.dev/core/dist/failure-NS2lsya4.d.ts +115 -0
- package/node_modules/@docx-editor.dev/core/dist/font-resolver-BVQB14qT.d.ts +256 -0
- package/node_modules/@docx-editor.dev/core/dist/harfbuzz.wasm +0 -0
- package/node_modules/@docx-editor.dev/core/dist/headless-document-view-qH331moE.d.ts +143 -0
- package/node_modules/@docx-editor.dev/core/dist/image-resources-BN-hUgCn.d.ts +211 -0
- package/node_modules/@docx-editor.dev/core/dist/index-Bsg7oIKP.d.ts +3869 -0
- package/node_modules/@docx-editor.dev/core/dist/index.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/index.d.ts +53 -0
- package/node_modules/@docx-editor.dev/core/dist/index.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/layout-shaping-BEyuiQOk.d.ts +246 -0
- package/node_modules/@docx-editor.dev/core/dist/layout.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/layout.d.ts +3151 -0
- package/node_modules/@docx-editor.dev/core/dist/layout.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/node-module-shim-TTKTT66I.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/note-properties-4Y9o6Gyk.d.ts +68 -0
- package/node_modules/@docx-editor.dev/core/dist/omml-equation-CuzBL5DD.d.ts +85 -0
- package/node_modules/@docx-editor.dev/core/dist/output.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/output.d.ts +97 -0
- package/node_modules/@docx-editor.dev/core/dist/output.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/protocol-Bqk4Izjc.d.ts +1651 -0
- package/node_modules/@docx-editor.dev/core/dist/review-pane-D9jm8DcY.d.ts +128 -0
- package/node_modules/@docx-editor.dev/core/dist/review-paragraph-order-DT-n6ouC.d.ts +85 -0
- package/node_modules/@docx-editor.dev/core/dist/revision-projection-DZ4kKVev.d.ts +242 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-cell-selection-D9D1KSXq.d.ts +464 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-interaction-CIC-PooQ.d.ts +135 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-paint-BME37OMv.d.ts +326 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-record-queries-CBlZqZNa.d.ts +177 -0
- package/node_modules/@docx-editor.dev/core/dist/semantic-records-4B3WwFAi.d.ts +3532 -0
- package/node_modules/@docx-editor.dev/core/dist/store.cjs +1 -0
- package/node_modules/@docx-editor.dev/core/dist/store.d.ts +2706 -0
- package/node_modules/@docx-editor.dev/core/dist/store.js +1 -0
- package/node_modules/@docx-editor.dev/core/dist/tree-package-fragment-BeeKxDw8.d.ts +1201 -0
- package/node_modules/@docx-editor.dev/core/dist/tree-session-contract-CVbmlMlq.d.ts +664 -0
- package/node_modules/@docx-editor.dev/core/dist/types-barrel-D3xCgQX6.d.ts +4269 -0
- package/node_modules/@docx-editor.dev/core/licenses/HarfBuzz-COPYING.txt +42 -0
- package/node_modules/@docx-editor.dev/core/package.json +140 -0
- package/node_modules/@docx-editor.dev/react/LICENSE +201 -0
- package/node_modules/@docx-editor.dev/react/README.md +141 -0
- package/node_modules/@docx-editor.dev/react/THIRD_PARTY_NOTICES.md +18 -0
- package/node_modules/@docx-editor.dev/react/dist/index.d.mts +4928 -0
- package/node_modules/@docx-editor.dev/react/dist/index.d.ts +4928 -0
- package/node_modules/@docx-editor.dev/react/dist/index.js +4 -0
- package/node_modules/@docx-editor.dev/react/dist/index.mjs +4 -0
- package/node_modules/@docx-editor.dev/react/package.json +74 -0
- package/node_modules/@docx-editor.dev/react/src/styles/editor.css +6 -0
- package/node_modules/@docx-editor.dev/react/src/styles/zIndex.ts +28 -0
- package/package.json +26 -15
- package/src/docx/README.md +2 -3
- package/dist/chunk-72PQ42YI.js.map +0 -1
- package/dist/chunk-B7P73VHX.cjs.map +0 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@docx-editor.dev/core/binding` — the canonical tree ↔ ProseMirror binding.
|
|
3
|
+
*
|
|
4
|
+
* Forward: project one revision of the tree into a ProseMirror doc. Reverse: explain an edited
|
|
5
|
+
* doc as the smallest set of tree ops, or REFUSE. The reverse direction never reconstructs the
|
|
6
|
+
* tree from the projection, so anything the projection does not model stays carried by the tree.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
import { Node, Schema } from 'prosemirror-model';
|
|
12
|
+
import { X as OoxmlProperty, Y as OoxmlPackageRejection } from './types-barrel-D3xCgQX6.js';
|
|
13
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-CVbmlMlq.js';
|
|
14
|
+
export { D as DocumentStyleEntry, M as MapResult, 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-CVbmlMlq.js';
|
|
15
|
+
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
16
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-BeeKxDw8.js';
|
|
17
|
+
import { EditorView } from 'prosemirror-view';
|
|
18
|
+
import './editor-scope-OHPwVQ5l.js';
|
|
19
|
+
import './image-resources-BN-hUgCn.js';
|
|
20
|
+
import './custom-node-writes-cvL5rhcD.js';
|
|
21
|
+
import './headless-document-view-qH331moE.js';
|
|
22
|
+
import './collaboration/replication.js';
|
|
23
|
+
import './revision-projection-DZ4kKVev.js';
|
|
24
|
+
import './review-pane-D9jm8DcY.js';
|
|
25
|
+
import './collaboration.js';
|
|
26
|
+
import './failure-NS2lsya4.js';
|
|
27
|
+
|
|
28
|
+
/** Attributes carried by a projected paragraph. */
|
|
29
|
+
interface ParagraphAttrs {
|
|
30
|
+
/** The canonical tree node id this paragraph projects. */
|
|
31
|
+
readonly nodeId: string | null;
|
|
32
|
+
/** Accepted `w:pPr` children, as authored. */
|
|
33
|
+
readonly props: readonly OoxmlProperty[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The ProseMirror schema the canonical tree projects into.
|
|
37
|
+
*
|
|
38
|
+
* Deliberately minimal. It models only what an editing surface must manipulate directly —
|
|
39
|
+
* paragraphs, text, tabs, breaks, and run properties as marks — because everything it does NOT
|
|
40
|
+
* model stays on the tree and is preserved losslessly there. Widening this schema moves content
|
|
41
|
+
* out of the tree's custody, which is the opposite of what it is for.
|
|
42
|
+
*
|
|
43
|
+
* The node and mark unions are written out rather than inferred from the spec below. Inferred,
|
|
44
|
+
* tsup's dts worker emits their members in an order that varies run to run, so the generated
|
|
45
|
+
* `binding.api.md` differed between builds of identical source and `api:check` failed at random.
|
|
46
|
+
* An explicit annotation pins the emitted order. Adding a node or mark to the spec means adding
|
|
47
|
+
* it here too — the compiler rejects the assignment otherwise.
|
|
48
|
+
*/
|
|
49
|
+
declare const treeSchema: Schema<'doc' | 'paragraph' | 'text' | 'tab' | 'hardBreak' | 'pageBreak' | 'unknownInline', 'runProps'>;
|
|
50
|
+
/** The accepted run properties carried by a text node, or an empty list. */
|
|
51
|
+
declare function runPropsOf(node: Node): readonly OoxmlProperty[];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Binding-only session methods that exchange ProseMirror projections.
|
|
55
|
+
*
|
|
56
|
+
* Editor surfaces expose {@link TreeDocxSessionView}. Only the binding lane sees this extension.
|
|
57
|
+
*/
|
|
58
|
+
interface TreeDocxSession extends TreeDocxSessionView {
|
|
59
|
+
/** Project the current BODY revision into a ProseMirror doc. */
|
|
60
|
+
projectDoc(): Node;
|
|
61
|
+
/** Re-project incrementally from the last committed change, reusing untouched paragraphs. */
|
|
62
|
+
reconcile(previousDoc: Node): Node;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the last commit changed the BLOCK SEQUENCE (a split, join, insert or delete).
|
|
65
|
+
*
|
|
66
|
+
* A host needs this to decide whether the view must be re-projected at all. After a pure
|
|
67
|
+
* text edit, the view already holds what the model holds. Re-projecting wastes work and
|
|
68
|
+
* races the next keystroke.
|
|
69
|
+
*/
|
|
70
|
+
lastCommitWasStructural(): boolean;
|
|
71
|
+
/** Map an edited BODY doc to tree ops and commit them as one transaction. */
|
|
72
|
+
applyPmDoc(doc: Node): TreeApplyResult;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Why bytes could not be opened: any bounded-reader rejection, plus the package that parsed but
|
|
77
|
+
* carried no main document tree.
|
|
78
|
+
*/
|
|
79
|
+
type TreeSessionRejection = OoxmlPackageRejection | 'no-main-document-tree';
|
|
80
|
+
/**
|
|
81
|
+
* An open session, or a typed refusal.
|
|
82
|
+
*
|
|
83
|
+
* A result rather than a throw: every failure here is a property of the FILE, and a host needs to
|
|
84
|
+
* tell "this is not a package" from "this package is malicious" from "this document has no body".
|
|
85
|
+
*/
|
|
86
|
+
type OpenTreeSessionResult = {
|
|
87
|
+
readonly ok: true;
|
|
88
|
+
readonly session: TreeDocxSession;
|
|
89
|
+
} | {
|
|
90
|
+
readonly ok: false;
|
|
91
|
+
readonly reason: TreeSessionRejection;
|
|
92
|
+
readonly detail?: string;
|
|
93
|
+
};
|
|
94
|
+
interface OpenTreeSessionOptions {
|
|
95
|
+
/**
|
|
96
|
+
* The review module's derivation hooks, contributed through the editor's
|
|
97
|
+
* `EditorModule` seam. Absent — the free engine — the session's
|
|
98
|
+
* `reviewItems()` reports the typed empty queue; parse, preservation, and
|
|
99
|
+
* `hasReviewContent` are unaffected.
|
|
100
|
+
*/
|
|
101
|
+
readonly reviewModel?: ReviewModuleContribution;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Open DOCX bytes into a tree-backed session.
|
|
105
|
+
*
|
|
106
|
+
* Returns a typed rejection rather than throwing: every failure here is a property of the FILE,
|
|
107
|
+
* and a host needs to tell "this is not a package" from "this package is malicious" from "this
|
|
108
|
+
* document has no body".
|
|
109
|
+
*
|
|
110
|
+
* The read is BOUNDED — decompression ratio, part count, XML depth and element counts are all
|
|
111
|
+
* capped — because the bytes are untrusted by definition.
|
|
112
|
+
*/
|
|
113
|
+
declare function openTreeSession(bytes: Uint8Array, options?: OpenTreeSessionOptions): OpenTreeSessionResult;
|
|
114
|
+
/** The origin a host should use when committing a reconciliation rather than a user edit. */
|
|
115
|
+
declare const PROJECTION_ORIGIN: "dev.docx-editor.core.origin.projection";
|
|
116
|
+
|
|
117
|
+
/** How a tree surface is mounted. */
|
|
118
|
+
interface TreeSurfaceOptions {
|
|
119
|
+
/** Called after every commit or refusal, so a host can show revision and rejection state. */
|
|
120
|
+
readonly onChange?: (state: TreeSurfaceState) => void;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Everything observable about a mounted tree surface.
|
|
124
|
+
*
|
|
125
|
+
* `lastRejection` is part of the state rather than a thrown error because a refused edit is an
|
|
126
|
+
* ordinary outcome here — the binding refuses anything it cannot explain, and the host shows why
|
|
127
|
+
* instead of the edit vanishing.
|
|
128
|
+
*/
|
|
129
|
+
interface TreeSurfaceState {
|
|
130
|
+
readonly revision: number;
|
|
131
|
+
readonly canUndo: boolean;
|
|
132
|
+
readonly canRedo: boolean;
|
|
133
|
+
/** The reason the last transaction was refused, or null when the last one committed. */
|
|
134
|
+
readonly lastRejection: string | null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* A mounted ProseMirror view bound to a {@link TreeDocxSession}.
|
|
138
|
+
*
|
|
139
|
+
* Every committed transaction becomes tree ops through the binding; a transaction the binding
|
|
140
|
+
* cannot explain is refused and reported through {@link TreeSurfaceState.lastRejection}, leaving
|
|
141
|
+
* the tree untouched.
|
|
142
|
+
*/
|
|
143
|
+
interface TreeSurface {
|
|
144
|
+
readonly view: EditorView;
|
|
145
|
+
state(): TreeSurfaceState;
|
|
146
|
+
undo(): void;
|
|
147
|
+
redo(): void;
|
|
148
|
+
/** Toggle one accepted run property across the current selection. */
|
|
149
|
+
toggleRunProperty(localName: string, attributes?: Record<string, string>): void;
|
|
150
|
+
destroy(): void;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Mount an editable ProseMirror view over a session's body story.
|
|
154
|
+
*
|
|
155
|
+
* The reference binding, not the production surface — `mountPaginatedSurface` is what the shipped
|
|
156
|
+
* editor uses. This one exists to exercise the tree↔ProseMirror contract directly, without
|
|
157
|
+
* pagination or painting in the way.
|
|
158
|
+
*
|
|
159
|
+
* Call {@link TreeSurface.destroy} to release the view.
|
|
160
|
+
*/
|
|
161
|
+
declare function mountTreeSurface(mount: HTMLElement, session: TreeDocxSession, options?: TreeSurfaceOptions): TreeSurface;
|
|
162
|
+
|
|
163
|
+
export { PROJECTION_ORIGIN, TreeApplyResult, TreeDocxSessionView, mountTreeSurface, openTreeSession, runPropsOf, treeSchema };
|
|
164
|
+
export type { OpenTreeSessionResult, ParagraphAttrs, TreeDocxSession, TreeSessionRejection, TreeSurface, TreeSurfaceOptions, TreeSurfaceState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{l as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,m as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-Z6WBFXJU.js';import'./chunk-5CSUYANV.js';import'./chunk-E7BQA6UP.js';import'./chunk-TSLBZ26X.js';import'./chunk-J6BVWIDB.js';import'./chunk-ETTO6GK3.js';import'./chunk-4R3TEXMN.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkFIJZIQXA_cjs=require('./chunk-FIJZIQXA.cjs');var W=new Set(["document","hdr","ftr","footnotes","endnotes"]),$=24,J=512,U=chunkFIJZIQXA_cjs.ub($);function V(r){let n=r.root;return n.namespaceUri===chunkFIJZIQXA_cjs.la&&W.has(n.localName)}function Y(r){let n=[],e=t=>{if(t.kind!=="textValue"){t.namespaceUri===chunkFIJZIQXA_cjs.la&&t.localName==="p"&&n.push(t);for(let a of t.children)e(a);}};return e(r.root),n}function H(r){let n=chunkFIJZIQXA_cjs.Eb(r);let e=[],t=new Set;for(let a of Y(n)){let i=chunkFIJZIQXA_cjs.wb(a);if(!i||!chunkFIJZIQXA_cjs.vb(i))continue;let o=i.toUpperCase();if(t.has(o))continue;t.add(o);let s=chunkFIJZIQXA_cjs.Vi(n,a.id);s!==null&&e.push(Object.freeze({paragraphId:o,nodeId:a.id,text:s}));}return Object.freeze(e)}function q(r){let n=U.get(r.root);if(n)return n;let e=chunkFIJZIQXA_cjs.Eb(r);let t=new Map,a=new Set,i=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===chunkFIJZIQXA_cjs.la&&o.localName==="p"){let s=chunkFIJZIQXA_cjs.wb(o);if(s&&chunkFIJZIQXA_cjs.vb(s)){let p=s.toUpperCase();a.has(p)||(a.add(p),o.kind==="paragraph"&&t.set(p,o.id));}}for(let s of o.children)i(s);}};return i(e.root),U.set(r.root,t),t}function _(r,n){if(r.length!==n.length)return false;for(let e=0;e<r.length;e+=1)if(r[e].root!==n[e])return false;return true}function B(r){let n=new Map,e=null,t=(i,o,s)=>{for(n.delete(i),n.set(i,{partName:o.name,root:o.root,nodeId:s});n.size>J;){let p=n.keys().next();if(p.done)break;n.delete(p.value);}},a=(i,o)=>{let s=n.get(i);if(!s)return null;let p=o.find(d=>d.name===s.partName);if(!p)return null;if(p.root===s.root)return {part:p,nodeId:s.nodeId};let l=chunkFIJZIQXA_cjs.Ta(p,s.nodeId);if(!l||l.kind!=="paragraph")return null;let c=chunkFIJZIQXA_cjs.wb(l);return !c||c.toUpperCase()!==i?null:(t(i,p,s.nodeId),{part:p,nodeId:s.nodeId})};return i=>{let o=r(),s=a(i,o);if(s)return s;if(e&&e.ids.has(i)&&_(o,e.roots))return null;for(let p of o){let l=q(p).get(i);if(l!==void 0)return t(i,p,l),{part:p,nodeId:l}}return (!e||!_(o,e.roots))&&(e={roots:o.map(p=>p.root),ids:new Set}),e.ids.size<J&&e.ids.add(i),null}}function L(r,n){return chunkFIJZIQXA_cjs.Ma(r,n)}var F=Object.freeze({kind:"body"}),Q=1e6;function O(r,n){if(n<=0||n>=r.length)return false;let e=r.charCodeAt(n-1),t=r.charCodeAt(n);return e>=55296&&e<=56319&&t>=56320&&t<=57343}function K(r,n,e){if(n===e)return [];let t=0,a=Math.min(n.length,e.length);for(;t<a&&n.charCodeAt(t)===e.charCodeAt(t);)t+=1;for(;t>0&&(O(n,t)||O(e,t));)t-=1;let i=0;for(;i<n.length-t&&i<e.length-t&&n.charCodeAt(n.length-i-1)===e.charCodeAt(e.length-i-1);)i+=1;for(;i>0&&(O(n,n.length-i)||O(e,e.length-i));)i-=1;let o=n.length-t-i,s=e.slice(t,e.length-i),p=[];return o>0&&p.push({op:"deleteText",paragraphId:r,start:t,end:t+o}),s.length>0&&p.push({op:"insertText",paragraphId:r,offset:t,text:s}),Object.freeze(p)}function tt(r){let n=t=>!!t&&t.kind!=="textValue"&&t.namespaceUri===chunkFIJZIQXA_cjs.la&&t.localName==="t"&&t.attributes.every(a=>a.namespaceUri===chunkFIJZIQXA_cjs.ma&&a.localName==="space")&&t.children.every(a=>a.kind==="textValue"),e=[];for(let t of r){let a=e.at(-1);if(!n(a)||!n(t)){e.push(t);continue}let i=a.children.map(o=>o.kind==="textValue"?o.value:"").join("")+t.children.map(o=>o.kind==="textValue"?o.value:"").join("");e[e.length-1]={...a,attributes:/^\s|\s$/.test(i)?[{kind:"xmlSpace",namespaceUri:chunkFIJZIQXA_cjs.ma,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:a.children[0]?.id??`${a.id}/text`,kind:"textValue",value:i}]};}return e}function G(r){if(r.kind==="textValue")return r;let n=false,e=r.children.map(t=>{let a=G(t);return a!==t&&(n=true),a});if(r.namespaceUri===chunkFIJZIQXA_cjs.la&&r.localName==="r"){let t=tt(e);(t.length!==e.length||t.some((a,i)=>a!==e[i]))&&(e=[...t],n=true);}return n?{...r,children:e}:r}function et(r,n,e){let t=r.parts.get(n);if(!t)return r;let a=false,i=new Set;for(let o of e)(o.op==="insertText"||o.op==="deleteText")&&!o.revision&&i.add(o.paragraphId);for(let o of i){let s=chunkFIJZIQXA_cjs.Ta(t,o);if(!s||s.kind==="textValue")continue;let p=G(s);if(p===s)continue;let l=chunkFIJZIQXA_cjs.Za(t,o,p,{deferValidation:true});l.ok&&(t=l.part,a=true);}return a?chunkFIJZIQXA_cjs.Fe(r,t):r}function rt(r,n){let e=n.documentId.trim();if(e.length===0||e.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let t=()=>H(r.bodyStore().part),a,i=()=>{let l=r.bodyStore().part,c=r.currentPackage();if(a?.pkg===c&&a.body===l)return a.parts;let d=[l];for(let g of c.parts.values())g===l||!V(g)||d.push(g);return a={pkg:c,body:l,parts:Object.freeze(d)},a.parts},o=B(i),s=(l,c)=>{if(l.length===0)return {ok:true,changed:false};let d=t(),g=new Set,P=[];for(let u of l){if(typeof u.text!="string"||u.text.length>Q)return {ok:false,reason:"collaboration-text-limit"};if(typeof u.paragraphId!="string"||u.paragraphId.length===0||u.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let m=u.paragraphId.toUpperCase();if(g.has(m))return {ok:false,reason:"duplicate-paragraph-id"};g.add(m);let N=d.filter(X=>X.paragraphId===m);if(N.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let M=N[0];P.push(...K(M.nodeId,M.text,u.text));}if(P.length===0)return {ok:true,changed:false};let x=r.transact(F,u=>{for(let m of P)u.apply(m);u.applyPackage(m=>et(m,m.mainDocumentPart,P));},{origin:c.origin,actorId:c.actorId,operationId:c.operationId,recordsHistory:false});return x.ok?{ok:true,changed:x.change!==null}:{ok:false,reason:x.detail??x.reason}};return Object.freeze({documentId:e,paragraphs:t,paragraphByNodeId(l){return t().find(c=>c.nodeId===l)??null},paragraphTextOf(l){for(let c of i()){let d=chunkFIJZIQXA_cjs.Vi(c,l);if(d!==null)return d}return null},paragraphByStableId(l){let c=l.toUpperCase(),d=o(c);if(!d)return null;let g=chunkFIJZIQXA_cjs.Vi(d.part,d.nodeId);return g===null?null:Object.freeze({paragraphId:c,nodeId:d.nodeId,text:g})},applyParagraphText(l,c,d){return s([{paragraphId:l,text:c}],d)},applyParagraphTexts:s,applyRemotePackage(l,c){let d=r.publishRemotePackage(l,c);return d.ok?{ok:true,changed:d.change!==null}:{ok:false,reason:d.detail??d.reason}},revision:()=>r.packageRevision,subscribe:l=>r.subscribe(l),observePrimitiveJournal:l=>L(r,l),hasPendingJournals:()=>chunkFIJZIQXA_cjs.Ka(r),flushPendingJournals:()=>{chunkFIJZIQXA_cjs.La(r);},save:()=>chunkFIJZIQXA_cjs.Ee(r.currentPackage()),binaryPart(l){let c=r.currentPackage();return c.partBytes.get(l)??c.partBytes.get(l.startsWith("/")?l.slice(1):`/${l}`)??null}})}function nt(r,n,e){if(n===e||r>n.length)return Math.min(r,e.length);let t=0;for(;t<n.length&&t<e.length&&n[t]===e[t];)t+=1;let a=0;for(;a<n.length-t&&a<e.length-t&&n[n.length-1-a]===e[e.length-1-a];)a+=1;if(r<=t)return Math.min(r,e.length);if(r>n.length-a)return Math.min(e.length,r+e.length-n.length);let i=at(n,e,t,a),o=i.offsets.get(r);return o===void 0&&(o=(i.table?st(i.table,r,n,e,t):null)??ct(r,n,e,t,a)??t,i.offsets.set(r,o)),o}var f=[],ot=16;function at(r,n,e,t){let a=f.findIndex(o=>o.before===r&&o.after===n);if(a>=0){let[o]=f.splice(a,1);return f.push(o),o}let i={before:r,after:n,table:lt(r,n,e,t),offsets:new Map};return f.length>=ot&&f.shift(),f.push(i),i}var it=1<<18;function lt(r,n,e,t){let a=r.length-t-e,i=n.length-t-e;if(a*i>it)return null;let o=i+1,s=new Uint32Array((a+1)*o);for(let p=a-1;p>=0;p-=1)for(let l=i-1;l>=0;l-=1)s[p*o+l]=r[e+p]===n[e+l]?s[(p+1)*o+l+1]+1:Math.max(s[(p+1)*o+l],s[p*o+l+1]);return {lengths:s,width:o,columns:i}}function st(r,n,e,t,a){let{lengths:i,width:o,columns:s}=r,p=n-a,l=0,c=0;for(;l<p;)c<s&&e[a+l]===t[a+c]?(l+=1,c+=1):c>=s||i[(l+1)*o+c]>=i[l*o+c+1]?l+=1:c+=1;return a+c}var pt=[32,16,8,4];function ct(r,n,e,t,a){let i=e.slice(t,e.length-a),o=s=>{let p=i.indexOf(s);return p>=0&&i.indexOf(s,p+1)<0?p:null};for(let s of pt){let p=n.slice(Math.max(t,r-s),r);if(p.length===s){let c=o(p);if(c!==null)return t+c+p.length}let l=n.slice(r,Math.min(n.length-a,r+s));if(l.length===s){let c=o(l);if(c!==null)return t+c}}return null}exports.a=et;exports.b=rt;exports.c=nt;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {pe,n,l,j as j$1,k as k$1,p,i,o,s,g,f as f$1,ma as ma$1,qa,Sa,Ca,Ie as Ie$1,He,fa as fa$1,ha as ha$1,gc,ec,dc,sc,Tc,Za,D as D$1,C,Ad,zd,Pa,xa,De,Bd,r,a,b,e as e$1,c as c$1,m,Fa,La,qd,zc,Vc,Sc,bc,fc,ya as ya$1,h,ga as ga$1,wa}from'./chunk-FRXAOVTB.js';import {f as f$2,Xk,$b,Zb,cc,_b,zj,ch,_k,Zk,Yk,Nb,Xb,c as c$2,b as b$1}from'./chunk-4R3TEXMN.js';var qn=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let d=i*2n;(d>t||d===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let c=r?-a:a,s=Number(c);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Ye=(e,t,n$1,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n$1)||n$1<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");if(e===0||n$1===0)return n(0);let o=e*n$1;if(Number.isSafeInteger(o)){let a=Math.abs(o),i=a%t,c=(a-i)/t;return r!=="towardZero"&&(i>t-i||i===t-i&&(r==="halfAwayFromZero"||r==="halfToEven"&&c%2!==0))&&(c+=1),n(c===0?0:o<0?-c:c)}return n(qn(BigInt(e)*BigInt(n$1),BigInt(t),r))},Xt=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>Ye(i,a,o,r)},jt=(e,t,n)=>{let r=t*n,o=e*2;return a=>a*r/o};var Zn=4096,Yt=e=>typeof e=="number"?String(e):JSON.stringify(e)??typeof e,ve=class{constructor(t){this.onRestart=t;}onRestart;#e=new Map;keyOf(t,n){let r$1=r(n),o=this.#e.get(r$1);o===void 0&&(this.#e.size>=Zn&&(this.#e.clear(),this.onRestart()),o=this.#e.size,this.#e.set(r$1,o));let a=`${o}\0${Yt(t.fontSizeHalfPoints)}\0${Yt(t.bidiLevel)}\0`,i=t.context;return !i||i.before===""&&i.after===""?`${a}-${t.text}`:`${a}c${i.before.length},${i.after.length}\0${i.before}${i.after}${t.text}`}clear(){this.#e.clear();}};var Z=Object.freeze({name:"HarfBuzz",version:"14.4.0"}),ie=null,oe=null;function qe(){return ie?Promise.resolve():oe||(oe=import('./dist-PKZR6RSH.js').then(e=>{let t=e.versionString();if(t!==Z.version)throw new O("shapingLibraryMismatch",{diagnostic:f(Z.version,t)});ie=e;}).catch(e$1=>{throw oe=null,e$1 instanceof O?e$1:c(e$1)?new O("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new O("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),oe)}function Jn(){return ie!==null}function Qn(){if(!ie)throw new O("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return ie}var O=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},er=16*1024*1024,tr=1e6,nr=1e6,rr=1e6,or=4,ar=512,ir=1024*1024,sr=16*1024*1024,cr=32*1024*1024,lr=64*1024*1024,dr=64*1024*1024,ur=1e6,pr=1e6,fr=1e6,yr=64,mr=4096,hr=4*1024*1024,gr=64*1024*1024,Sr=64*1024*1024,br=256*1024*1024,xr=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),$t=["cmap","head","hhea","hmtx","maxp"],Rr=(e,t)=>e[t]<<8|e[t+1],Fr=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,Cr=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Fr(e,12+t*4):0,vr=(e,t)=>{let n=Cr(e,t),r=Rr(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},Er=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Lr=(e,t)=>{let n=l(e,t);if(!n.valid)return n;let r=vr(e,t);for(let o of $t)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},Ze=Lr,k=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},Or=(e,t,n$1)=>{if(t.length===0)return [];let r=[],o=0;for(;o<t.length;){let a=t[o].cluster,i=o+1,c=t[o].advanceX;for(;i<t.length&&t[i].cluster===a;)c+=t[i].advanceX,i+=1;let s=n(c);r.push({textStart:a,textEnd:n$1==="rtl"?t[o-1]?.cluster??e.length:t[i]?.cluster??e.length,glyphStart:o,glyphEnd:i,advance:s,caretEdges:Object.freeze([n(0),s]),fontSpan:0}),o=i;}return r},N=64,U=8,W=8,qt=32,Je=N+2*U,Tr=N+U+W,Ir=N+U+2*W,Br=N+U+W,Zt=N+8*U,Jt=N+8*W+U,wr=N+6*W+U,Ar=N+3*W+2*U,Pr=N+3*W,se=e=>N+e.length*Uint16Array.BYTES_PER_ELEMENT,Qe=e=>Br+se(e),ae=e=>qt+e*U,_r=(e,t)=>Je+se(e)+Tr+Qe(t),Mr=e=>Zt+se(e)+ae(e.length)+e.length*Jt,kr=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return Zt+se(e.text)+ae(e.glyphs.length)+e.glyphs.length*Jt+ae(e.clusters.length)+e.clusters.length*wr+e.clusters.reduce((n,r)=>n+ae(r.caretEdges.length),0)+ae(e.fontSpans.length)+e.fontSpans.length*Ar+(e.exactAdvancesX===void 0?0:qt+e.exactAdvancesX.length*W)+Pr+[...t].reduce((n,r)=>n+Qe(r.path),0)},zr=(e,t)=>Je+se(e)+Ir+t,$e=class{#e;#p;#f;#y;#m;#R;#h;#l=0;#F;#g;#S;#c;#b;#d;#t;#o=new Map;#i=new Map;#s=new Map;#n=new Map;#C=new ve(()=>{this.#n.clear(),this.#r=0,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0}));});#a=0;#r=0;#x=0;#u;constructor(t,n){this.#e=t,this.#p=k(n.maxFontBytes??er,"maximum font bytes",dr),this.#f=k(n.maxInputUtf16??tr,"maximum input UTF-16 code units",ur),this.#y=k(n.maxCodepoints??nr,"maximum input code points",pr),this.#m=k(n.maxGlyphs??rr,"maximum shaped glyphs",fr),this.#h=k(n.maxCachedFontBytes??64*1024*1024,"maximum cached font bytes",64*1024*1024),this.#R=k(n.maxCachedFaces??or,"maximum cached faces",yr),this.#F=k(n.maxCachedShapes??ar,"maximum cached shape results",mr),this.#g=k(n.maxOutlineBytes??ir,"maximum outline bytes",hr),this.#S=k(n.maxCachedOutlineBytes??sr,"maximum cached outline bytes",gr),this.#c=k(n.maxShapedRunBytes??cr,"maximum shaped run bytes",Sr),this.#b=k(n.maxCachedShapeBytes??lr,"maximum cached shape bytes",br),this.#d=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#u=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#l=0,this.#i.clear(),this.#s.clear(),this.#n.clear(),this.#C.clear(),this.#a=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#u=void 0;}#E(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=j$1(t);for(let l of $t)if(!o.has(l))throw new O("malformedFont",{diagnostic:`missing required ${l} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(Er(n)),i=new this.#e.Face(a,t.faceIndex),c=new this.#e.Font(i),s=c.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new O("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});c.setScale(i.upem,i.upem);let d={identity:t.identity,blob:a,face:i,font:c,unitsPerEm:i.upem,byteLength:n.byteLength};if(n.byteLength<=this.#h){for(;this.#o.size>=this.#R||this.#l+n.byteLength>this.#h;){let l=this.#o.keys().next().value;if(l===void 0)break;this.#l-=this.#o.get(l).byteLength,this.#o.delete(l),this.#d?.(Object.freeze({kind:"evicted",identity:l}));}this.#o.set(t.identity,d),this.#l+=n.byteLength;}return this.#d?.(Object.freeze({kind:"created",identity:t.identity})),d}#L(t,n){let r=this.#i.get(t.identity)?.get(n);if(r)return this.#s.delete(r),this.#s.set(r,void 0),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#a})),r.outline;this.#t?.onOutlinePathCall?.();let o=t.font.glyphToPath(n),a=Qe(o);if(a>this.#g)throw new O("outlineOverLimit",{limit:this.#g,actual:a});let i=Object.freeze({path:o,unitsPerEm:t.unitsPerEm}),c=_r(t.identity,o)+3*Je+2*W;if(c>this.#S)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#a})),i;for(;this.#a+c>this.#S;){let l=this.#s.keys().next().value;if(l===void 0)break;this.#s.delete(l);let f=this.#i.get(l.identity);f.delete(l.glyphId),f.size===0&&this.#i.delete(l.identity),this.#a-=l.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#a}));}let s=this.#i.get(t.identity);s||this.#i.set(t.identity,s=new Map);let d={outline:i,bytes:c,identity:t.identity,glyphId:n};return s.set(n,d),this.#s.set(d,void 0),this.#a+=c,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#a})),i}#v(t){if(t.length>this.#f)throw new O("textOverLimit",{limit:this.#f,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#y)throw new O("codepointsOverLimit",{limit:this.#y,actual:n})}}shape(t){if(!this.#u)throw new O("disposed");if(k$1(t.environment.font),t.environment.font.byteLength>this.#p)throw new O("fontOverLimit",{limit:this.#p,actual:t.environment.font.byteLength});this.#v(t.text);let n$1=Mr(t.text);if(n$1>this.#c)throw new O("shapedRunOverLimit",{limit:this.#c,actual:n$1});let r=p(t.environment),o$1=this.#C.keyOf(t,r),a=this.#n.get(o$1);if(a)return this.#x-a.stamp>=Math.max(1,this.#n.size>>1)&&(this.#n.delete(o$1),this.#n.set(o$1,a),a.stamp=++this.#x),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==Z.name||r.shapingLibrary.version!==Z.version)throw new O("shapingLibraryMismatch");if(r.normalization!=="none")throw new O("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r.direction==="rtl"))throw new O("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new O("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new O("unsupportedFallback");let i$1=i(r.font),c=j$1(r.font);if([...xr].some(y=>c.has(y))&&!c.has("glyf")&&!c.has("CFF "))throw new O("unsupportedColorFont");let s$1=t.text;this.#v(s$1);let d=t.context?.before??"",l=t.context?.after??"",f=o,h=Math.max(String(d).length,String(l).length);if(typeof d!="string"||typeof l!="string"||h>f)throw new O("textOverLimit",{limit:f,actual:h});try{let y=this.#E(r.font,i$1),{face:b,font:x}=y,m=this.#u;m.reset(),d||l?m.addText(d+s$1+l,d.length,s$1.length):m.addText(s$1),m.setDirection(r.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),m.setScript(r.script),m.setLanguage(r.language),m.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let g=Object.entries(r.features).map(([B,G])=>new this.#e.Feature(B,G));this.#t?.onShapeCall?.(),this.#e.shape(x,m,g);let S=m.getLength();if(S>this.#m)throw new O("glyphOverLimit",{limit:this.#m,actual:S});let F=m.getGlyphInfos(),v=m.getGlyphPositions(),C=Xt(b.upem,t.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),I=jt(b.upem,t.fontSizeHalfPoints,r.fixedPointScale),p=[],u=n(0),R=n(0),E=new Map,L=F.map((B,G)=>{let ee=v[G];p.push(I(ee?.xAdvance??0));let pt=C(ee?.xAdvance??0),ft=C(ee?.yAdvance??0),$n={id:B.codepoint,cluster:B.cluster-d.length,originX:u,originY:R,advanceX:pt,advanceY:ft,offsetX:C(ee?.xOffset??0),offsetY:C(ee?.yOffset??0),outline:E.get(B.codepoint)??(()=>{let yt=this.#L(y,B.codepoint);return E.set(B.codepoint,yt),yt})()};return u=n(u+pt),R=n(R+ft),$n}),T=x.hExtents(),P=s({text:s$1,direction:r.direction,bidiLevel:t.bidiLevel,glyphs:L,exactAdvancesX:p,clusters:Or(s$1,L,r.direction),fontSpans:L.length===0?[]:[{glyphStart:0,glyphEnd:L.length,font:r.font,fallbackIndex:null}],metrics:{ascent:C(T.ascender),descent:C(-T.descender),lineGap:C(T.lineGap)}},r),A=kr(P);if(A>this.#c)throw new O("shapedRunOverLimit",{limit:this.#c,actual:A});let M=zr(o$1,A);if(M>this.#b)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),P;for(;this.#n.size>=this.#F||this.#r+M>this.#b;){let B=this.#n.keys().next().value;if(B===void 0)break;let G=this.#n.get(B);this.#n.delete(B),this.#r-=G.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o$1,{run:P,bytes:M,stamp:++this.#x}),this.#r+=M,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),P}catch(y){throw y instanceof O?y:new O("malformedFont",{diagnostic:y instanceof Error?y.message:"HarfBuzz shaping failed"})}}},et=(e={})=>new $e(Qn(),e);var tt=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:32,maxCachedFontBytes:64*1024*1024,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024}),Ba=Object.freeze({...tt,maxCachedShapes:4096});function Qt(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${f$2(new TextEncoder().encode(JSON.stringify(n)))}`}var Nr=Object.freeze({}),en=b,Dr="16.0.0",Hr="none",Gr=1e3,Ur="halfToEven",rn="cluster-edges-only",Wr="Latn",Kr=new Uint8Array(0);var K=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function Vr(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a$1=e.substitutions,i=e.defaultFont,c=e.language;if(!Number.isSafeInteger(r)||r<=0||r>a)throw new K(`Font byte ceiling must not exceed the engine hard maximum of ${a}`);let s=o.length,d=a$1?.length??0;if(s===0||s>b)throw new K(`Font source count must be between 1 and ${b}`);if(d>en)throw new K(`Font substitution count must not exceed ${en}`);let l=0,f=[];for(let b=0;b<s;b+=1){let x=o[b],m=x.request,g$1=x.availability,S=x.id,F=x.hash,v=x.faceIndex,C=g$1==="forbidden",I=C?Kr:x.bytes;if(!C){if(typeof S!="string"||S.length===0)throw new TypeError("Resolved font id must not be empty");let p;try{p=e$1(I);}catch{throw new K(`Font source ${S} must provide genuine bytes`)}if(p>r)throw new K(`Font source ${S} exceeds the per-font byte ceiling`);if(l+=p,l>c$1)throw new K(`Font sources exceed the aggregate byte ceiling of ${c$1}`)}f.push(t&&g(x)!==void 0?x:Object.freeze({request:Object.freeze({family:m.family,weight:m.weight,style:m.style}),id:S,bytes:I,hash:F,faceIndex:v,...g$1?{availability:g$1}:{}}));}let h;if(a$1){h=[];for(let b=0;b<d;b+=1){let x=a$1[b],m=x.from,g=x.to,S=x.lineMetrics;h.push(Object.freeze({from:Object.freeze({family:m.family,weight:m.weight,style:m.style}),to:Object.freeze({family:g.family,weight:g.weight,style:g.style}),...S?{lineMetrics:Object.freeze({heightEm:S.heightEm,baselineEm:S.baselineEm})}:{}}));}}let y={epoch:n,maxFontBytes:r,sources:Object.freeze(f),substitutions:h?Object.freeze(h):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:c};return Object.freeze(y)}function tn(e,t){let n=e.map((o,a)=>({value:o,index:a,key:h(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function Xr(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function nn(e,t){let n=s=>({family:s.family,weight:s.weight,style:s.style}),r=t?e.sources:tn(e.sources,s=>s.request),o=e.substitutions??[],a=t?o:tn(o,s=>s.from),i={sources:r.map(s=>{let d=s.availability??"available",l={request:n(s.request),availability:d};if(d==="forbidden")return {...l,...t?{id:s.id,faceIndex:s.faceIndex,declaredHash:s.hash}:{}};let f=g(s);if(f==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...l,...t?{id:s.id}:{},faceIndex:s.faceIndex,declaredHash:s.hash,actualHash:f,byteLength:s.bytes.byteLength}}),substitutions:a.map(s=>({from:n(s.from),to:n(s.to),lineMetrics:s.lineMetrics?{heightEm:s.lineMetrics.heightEm,baselineEm:s.lineMetrics.baselineEm}:null})),defaultFont:Xr(e.defaultFont,t),language:e.language||"en"},c={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?c:{},...i}}var jr=Symbol("prepared-layout-font-configuration"),Ee=new WeakMap;function Yr(e){return Ee.has(e)}function $r(e){let t=Ee.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function ka(e){let t=Ee.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function nt(e,t){return on(e,t,false)}function za(e,t){return on(e,t,true)}function on(e,t,n){let r=Vr(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(f=>n&&g(f)!==void 0?f:f$1(f,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a=new TextEncoder,i=nn(o,true),c=a.encode(JSON.stringify(i)),s=nn(o,false),d=a.encode(JSON.stringify(s)),l=Object.freeze({[jr]:true,fingerprint:`font-config:${f$2(c)}`});return Ee.set(l,{configuration:o,sharedShapingFingerprint:`shared-font-config:${f$2(d)}`}),l}function qr(e){return nt(e).fingerprint}function Zr(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:Qt(t),ligatureCaretPolicy:rn,fallback:ga$1}));return `shaping:${f$2(n)}`}async function an(e,t,n,r,o=false){let i=Yr(e)?e:nt(e,t),c=$r(i),{epoch:s,maxFontBytes:d,sources:l,substitutions:f,defaultFont:h}=c,y=c.language||"en",b=i.fingerprint,x=m({epoch:s,maxFontBytes:d,resources:l,substitutions:f,validateFont:Ze,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await qe();let m$1=Object.freeze({script:Wr,variationAxes:Object.freeze({}),shapingLibrary:Z,unicodeDataVersion:Dr,normalization:Hr,language:y,features:Nr,...o?{documentLigatures:true}:{},fixedPointScale:Gr,roundingMode:Ur});return Object.freeze({fonts:x,shaper:n??et(r),defaultFont:h,environment:m$1,ligatureCaretPolicy:rn,operation:Object.freeze({resourceEpoch:x.epoch,configEpoch:s,extensionFingerprint:b,shapingHash:Zr(m$1,r),producerVersion:1})})}async function Jr(e,t){return an(e,t,void 0,tt)}async function Na(e,t,n,r,o=false){return an(e,r,t,n,o)}function Qr(e){e.shaper.dispose?.();}function rt(e){let t=new Set([0,e.text.length]);for(let r of ma$1(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function Le(e,t){return rt(e).includes(t)}function eo(e,t){return Le(e,t)}function to(e,t,n){return n>=t&&Le(e,t)&&Le(e,n)}function no(e){let t=ma$1(e.text);return rt(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var at="und";function dn(){return typeof Intl.Segmenter=="function"}function ro(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${at})`);return e}function un(){let e=new(ro())(at,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var oo=/^[\p{L}\p{N}']$/u,ao=/^\s$/u;function sn(e){return oo.test(e)}function cn(e){return ao.test(e)}function ot(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function pn(e){let t=ma$1(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(cn(o.text)){let a=r+1;for(;a<t.length&&cn(t[a].text);)a+=1;n.push(ot(t,r,a,false)),r=a;continue}if(sn(o.text)){let a=r+1;for(;a<t.length&&sn(t[a].text);)a+=1;n.push(ot(t,r,a,true)),r=a;continue}n.push(ot(t,r,r+1,false)),r+=1;}return n}function fn(){return {segment:pn}}function yn(e={}){let t=e.isIntlAvailable??dn,n=e.createIntlBoundary??un,r=e.createFallbackBoundary??fn;if(!t())return r();try{return n()}catch{return r()}}var ln;function mn(){return ln??=yn(),ln}function io(e,t=mn()){return t.segment(e)}function so(e,t){return t.map(n=>({graphemeFrom:qa(e,n.utf16From),graphemeTo:qa(e,n.utf16To),wordLike:n.wordLike}))}var hn={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},ct=Object.keys(hn),gn=ct.filter(e=>hn[e]==="coarse-gate"),Oe=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},J=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},co={resourceEpoch:Oe,configEpoch:Oe,extensionFingerprint:J,shapingHash:J,producerVersion:Oe},lo=(e,t)=>{co[t](e[t],t);},Q=e=>{for(let t of ct)lo(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},uo=(e,t)=>{let n=Q(e),r=Q(t),o=ct.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},it=e=>{let t=e.map(({key:n,fingerprint:r})=>(J(n,"resource dependency key"),J(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},po=e=>(Oe(e.revision,"revision"),J(e.dependencyFingerprint,"dependencyFingerprint"),J(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:it(e.resourceDependencies),...Q(e)})),fo=(e,t)=>{let n=it(e),r=it(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],c=r[a];if(i?.key!==c?.key||i?.fingerprint!==c?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??c.key}}return null};function yo(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=fo(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of gn)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var st=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=yo(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:po(r)});}evictEpoch(t){let n=Q(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;gn.some(c=>i[c]!==n[c])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=Q(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>n.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function Sn(e){return e.projected===true?null:e.range}function ho(e,t,n){let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:c}=e,s=o==="header"||o==="footer"?d=>wa(d,e.origin,{x:r.box.x,y:r.box.y}):void 0;Fa(a,(d,l)=>{let{textboxDepth:f,textboxOwner:h,textboxPath:y,storyOrigin:b}=l,x=f===0?o:"textbox";for(let m of d.lines){let g=[...La(m)].sort((S,F)=>(t.get(S.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(F.paragraphId)??Number.MAX_SAFE_INTEGER));for(let S of g)for(let F of S.spans)n({page:r,story:x,rootStory:o,root:e,storyOrigin:b,absoluteBox:Object.freeze({x:b.x+F.box.x,y:b.y+F.box.y,width:F.box.width,height:F.box.height}),noteScopeId:i,noteAreaKind:c,textboxDepth:f,textboxOwner:h,textboxPath:y,paragraph:d,paragraphId:S.paragraphId,line:m,span:F,sourceRange:Sn(F)});}},e.origin,s);}function go(e,t){let n=new Map(Sa(e).map((r,o)=>[r,o]));Ca(e,r=>ho(r,n,t));}var bo=1,bn=4,j=Object.freeze({top:0,right:0,bottom:0,left:0}),xn=new WeakMap;function xo(e,t){let n=Ro(e);return n===j?t:Ie$1(t,n)}function Ro(e){let t=e.vectorShape;if(!t)return j;let{cx:n,cy:r}=t.extentEmu;if(!(n>=0)||!(r>=0)||n===0&&r===0)return j;let o=xn.get(t);if(o||(o=Fo(t),xn.set(t,o)),o===j)return j;let a=e.paintBounds,i=e.geometry.contentBounds;if(!(a.width>0||i.width<=0)||!(a.height>0||i.height<=0))return j;let c=n>0?i.width/n:i.height/r,s=r>0?i.height/r:i.width/n,d=(f,h,y)=>{if(y<-1e-3)return 0;let b=f*h-Math.max(0,y);return Number.isFinite(b)&&b>0?b:0},l={left:d(o.left,c,i.x-a.x),top:d(o.top,s,i.y-a.y),right:d(o.right,c,a.x+a.width-(i.x+i.width)),bottom:d(o.bottom,s,a.y+a.height-(i.y+i.height))};return l.left||l.top||l.right||l.bottom?Object.freeze(l):j}function Fo(e){let{cx:t,cy:n}=e.extentEmu,r=0,o=0,a=t,i=n,c=(l,f)=>{r=Math.min(r,l),a=Math.max(a,l),o=Math.min(o,f),i=Math.max(i,f);},s=bo,d=l=>l.x>=-s&&l.x<=t+s&&l.y>=-s&&l.y<=n+s;for(let l of e.components){if(l.strokeHex===null||l.strokeInset===true)continue;let f=Math.max(1,He(l.strokeWidthEmu))/2;l.subpathsEmu.forEach((h,y)=>{let b=l.subpathsClosed?.[y]!==false,x=Co(h,b),m=b&&x.length>2?x.length:x.length-1,g=[];for(let F=0;F<m;F+=1){let v=x[F],C=x[(F+1)%x.length],I=Math.hypot(C.x-v.x,C.y-v.y),p={x:-(C.y-v.y)/I,y:(C.x-v.x)/I};if(g.push(p),!!vo(v,C,-s,t+s,-s,n+s))for(let u=0;u<2;u+=1){let R=V[u],E=v.x+(C.x-v.x)*R,L=v.y+(C.y-v.y)*R;c(E+p.x*f,L+p.y*f),c(E-p.x*f,L-p.y*f);}}let S=b&&x.length>2?g.length:g.length-1;for(let F=0;F<S;F+=1){let v=x[(F+1)%x.length];if(!d(v))continue;let C=g[F],I=g[(F+1)%g.length],p=1+C.x*I.x+C.y*I.y;if(p<2/(bn*bn))continue;let u=C.y*-I.x- -C.x*I.y;if(u===0)continue;let R=u>0?-1:1;c(v.x+R*(C.x+I.x)*f/p,v.y+R*(C.y+I.y)*f/p);}});for(let h of l.arrowheadsEmu??[])if(!(!h[0]||!d(h[0])))for(let y of h)c(y.x,y.y);}return r>=0&&o>=0&&a<=t&&i<=n?j:Object.freeze({left:-r,top:-o,right:a-t,bottom:i-n})}function Co(e,t){let n=[];for(let a of e){let i=n[n.length-1];(!i||i.x!==a.x||i.y!==a.y)&&n.push(a);}let r=n[0],o=n[n.length-1];return t&&n.length>1&&r.x===o.x&&r.y===o.y&&n.pop(),n}var V=new Float64Array(2);function vo(e,t,n,r,o,a){let i=t.x-e.x,c=t.y-e.y;return V[0]=0,V[1]=1,Te(-i,e.x-n)&&Te(i,r-e.x)&&Te(-c,e.y-o)&&Te(c,a-e.y)}function Te(e,t){if(e===0)return t>=0;let n=t/e;return e<0?V[0]=Math.max(V[0],n):V[1]=Math.min(V[1],n),V[0]<=V[1]}function D(e){return (e.kerningEnabled??e.kerningMinPt>0)&&e.kerningMinPt>0&&e.fontSizePt>=e.kerningMinPt}var vn="Calibri, Carlito, Helvetica, Arial, sans-serif",oi=new Map([["calibri","Carlito"]]),Eo=65536,Lo=256;function Rn(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function Fn(e){let t=new Map,n=0;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>e;){let a=t.keys().next();if(a.done)break;t.delete(a.value),n+=1;}},get size(){return t.size},get evictions(){return n}}}var Cn=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function En(e=null){return e!=null&&typeof e.measureText=="function"}function Ln(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??vn,r=e.context??null;if(!En(r))return null;let o=r,a=Fn(Rn(e.maxWidthEntries,Eo)),i=Fn(Rn(e.maxMetricsEntries,Lo)),c=e.fontAlias,s=l=>{let f=l.fontFamily&&Cn.test(l.fontFamily)?l.fontFamily:null,h=f?c?.(f):void 0,y=h&&Cn.test(h)?h:null,b=f?y?`"${y}", "${f}", ${n}`:`"${f}", ${n}`:n,x=l.bold?"bold":"normal",m=l.italic?"italic":"normal",g=l.smallCaps?"small-caps":"normal",S=l.fontSizePt*fa$1(l)*t;return `${m} ${g} ${x} ${S}px ${b}`},d=(l,f,h)=>l/t*(h.horizontalScalePercent/100)+f.length*h.characterSpacingPt;return {measure(l,f){if(l.length===0)return 0;let h=s(f),y=`${h}\0${D(f)}\0${l}`,b=a.get(y);if(b!==void 0)return d(b,l,f);o.font=h,"fontKerning"in o&&(o.fontKerning=D(f)?"normal":"none");let x=o.measureText(l).width;return a.set(y,x),d(x,l,f)},inkBounds(l,f){if(!l||l.length>2||f.shaping?.direction==="rtl"||ma$1(l).length!==1)return;o.font=s(f),"fontKerning"in o&&(o.fontKerning=D(f)?"normal":"none");let h=o.textAlign,y=o.direction,b;try{h!==void 0&&(o.textAlign="left"),y!==void 0&&(o.direction="ltr"),b=o.measureText(l);}finally{h!==void 0&&(o.textAlign=h),y!==void 0&&(o.direction=y);}let x=b.actualBoundingBoxLeft,m=b.actualBoundingBoxRight;if(x===void 0||m===void 0||!Number.isFinite(x)||!Number.isFinite(m))return;let g=f.horizontalScalePercent/(100*t);return {left:-x*g,right:m*g}},lineMetrics(l){let f=l.fontSizePt*fa$1(l),h=s(l),y=i.get(h);if(y)return y;let b=f*1.15,x=f*.8;o.font=h,"fontKerning"in o&&(o.fontKerning=D(l)?"normal":"none");let m=o.measureText("Hxg"),g=m.fontBoundingBoxAscent,S=m.fontBoundingBoxDescent;if(typeof g=="number"&&Number.isFinite(g)&&g>0&&(x=g/t,typeof S=="number"&&Number.isFinite(S)&&S>=0)){let v=(g+S)/t;v>0&&(b=Math.max(v,b));}b>0||(b=f*1.15);let F={height:b,baseline:x};return i.set(h,F),F}}}function Oo(e=1,t={}){let n=Ln({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:ha$1(),producer:"fixed-measurer"}}function To(e){let t;return n=>{t===void 0&&(t=gc(e.pages)?.hosts??null);let r=t?.get(n);return r?ec(r.pageNumber,r.format):null}}function On(e,t){let n=qd(e,t.displayMode??Za),r=zc({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:ch(t.package,"footnote"),endnotesPart:ch(t.package,"endnote")}:void 0,a=Vc(n,r,o,t.package?Sc(t.package,e,n):void 0,t.displayMode??Za);return {blocks:n,notes:o,context:a}}function Tn(e,t,n,r,o){for(let a of t){if(r.length>=Xk)return;if(n.tokenForParagraph(a.id)!==""&&_k(e,a.id)===null)for(let i of Zk(a)){if(r.length>=Xk)return;if(!i.rewritable)continue;let c=bc(i.instruction);if(c===null)continue;let s=n.liveValueOf(i.fieldNodeId,c);if(s===null&&o&&n.pageRefProjectionOf){let d=n.pageRefProjectionOf(i.fieldNodeId,c);if(d){let l=o(d.targetParagraphId);l!==null&&l.length>0&&fc(d.calibration,d.cached,l,Number.NaN)&&(s=l);}}s===null||s===i.cachedText||s.length>Yk||s.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:s});}}}function Io(e,t){let{blocks:n,context:r}=On(e,t);if(r===null)return null;let o=[];return Tn(e,dc(sc(n)),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function mi(e,t){let{notes:n,context:r}=On(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:c}of a){if(!c)continue;let s=[];for(let d of Tc(c,t.displayMode??Za)){if(s.length>=Xk)break;Tn(c,dc(sc(d)),r,s);}s.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:s}});}return o}function Bo(e){return e.box}function In(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)In(o,t);}function wo(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>Nb*4)){for(let c of o.children)if(c.kind!=="textValue"){if(c.kind==="paragraph"){for(let s of r)t.get(s)?.push(c.id);n(c,c.id,i+1);continue}if(c.kind==="contentControl"){t.set(c.id,[]),r.push(c.id);let s=Xb(c);s&&n(s,a,i+1),r.pop();let d=t.get(c.id);d&&d.length===0&&a!==null&&d.push(a);continue}n(c,a,i+1);}}},r=[];return n(e,null,0),t}function Ao(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function Po(e,t){let n=$b(e.root);if(n.length===0)return _o;let r=new Map;t.pages.forEach((i,c)=>{(d=>{for(let l of d){let f=new Set;In(l,f);for(let h of f){let y=r.get(h)??[];y.push({pageIndex:c,box:Bo(l)}),r.set(h,y);}}})(i.fragments);});let o=wo(e.root),a=[];for(let i of n){let c=Zb(i.node),s=[...i.ancestors.map(h=>Zb(h).lock),c.lock],d=o.get(i.node.id)??[],l=new Map;for(let h of d)for(let y of r.get(h)??[]){let b=l.get(y.pageIndex);l.set(y.pageIndex,b?Ao(b,y.box):y.box);}let f=[...l.entries()].sort((h,y)=>h[0]-y[0]).map(([h,y])=>({pageIndex:h,...y}));a.push({controlId:i.node.id,type:c.type,level:_b(i.node),depth:i.depth,lock:c.lock,effectiveLock:cc(s),showingPlaceholder:c.showingPlaceholder,temporary:c.temporary,...c.tag===void 0?{}:{tag:c.tag},...c.alias===void 0?{}:{alias:c.alias},...c.id===void 0?{}:{id:c.id},...c.dataBinding===void 0?{}:{dataBinding:c.dataBinding},paragraphIds:d,fragments:f});}return a}var _o=Object.freeze([]);function wn(e,t,n){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return n<o.range.end;let i=a.filter(c=>c.range.paragraphId===t);return i.length===a.length?n<o.range.end:i.length>0&&n<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function Vo(e,t){let n=new Map;for(let r of e.pages)for(let[o,a]of Xo(r,t))n.has(o)||n.set(o,a);return n}var Bn=new WeakMap;function Xo(e,t){let n=Bn.get(t);n||(n=new WeakMap,Bn.set(t,n));let r=n.get(e);if(r)return r;let o=new Map;for(let a of t(e)){let i=new Set([a.paragraphId]);for(let c of a.lines??[])for(let s of c.spans??[])i.add(s.range.paragraphId);for(let c of i)o.has(c)||o.set(c,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return n.set(e,o),o}function jo(e,t){let n=zj(e);if(!n)return null;let r=t.get(n.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+wn(r,n.start.paragraphId,n.start.offset)}:null}var An=new WeakMap;function Yo(e){let t=An.get(e);if(t!==void 0)return t;let n=i(e),r=new DataView(n.buffer,n.byteOffset,n.byteLength),o=false,a=r.getUint32(0)===1953784678?r.getUint32(12+e.faceIndex*4):0,i$1=r.getUint16(a+4);for(let c=0;c<i$1;c++){let s=a+12+c*16;if(r.getUint32(s)!==1330851634)continue;let d=r.getUint32(s+8),l=r.getUint32(s+12);l>=86&&d<=n.byteLength-l&&r.getUint16(d)>=1&&(o=(r.getUint32(d+78)&1966080)!==0);break}return An.set(e,o),o}function Pn(e,t,n,r,o){if(r>o||Math.abs(n.height-t)>o||!Yo(e))return n;let a=t*.3;return {height:n.height+a,baseline:n.baseline+a/2}}var $o="abcdefghijklmnopqrstuvwxyz";function H(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function X(e,t,n,r,o){let a=r.shaping?.context;return e.shape({text:o,fontSizeHalfPoints:H(r),bidiLevel:r.shaping?.direction==="rtl"?1:0,environment:qo(t,n,r),...a?{context:a}:{}})}var _n=new WeakMap;function qo(e,t,n){if(!Object.isFrozen(e)||!Object.isFrozen(e.features)||!Object.isFrozen(e.variationAxes)||!Object.isFrozen(e.shapingLibrary))return Mn(e,t,n);let r=n.shaping?.direction??"ltr",o=n.shaping?.script,a=`${r}|${o??""}|${D(n)?1:0}|${e.documentLigatures?D$1(n):""}|${n.smallCaps?1:0}`,i=_n.get(e);i||_n.set(e,i=new WeakMap);let c=i.get(t);c||i.set(t,c=new Map);let s=c.get(a);return s||c.set(a,s=Mn(e,t,n)),s}function Mn(e,t,n){return p({...e,font:t,direction:n.shaping?.direction??"ltr",script:n.shaping?.script==="Zyyy"?e.script:n.shaping?.script??e.script,features:{...e.features,kern:D(n)?1:0,...e.documentLigatures?C(n):{},...n.smallCaps?{smcp:1}:{}},fallbackOrder:[]})}function Ie(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let c of $o){let s=X(e,t,n,{...r,smallCaps:!0},c),d=X(e,t,n,{...r,smallCaps:!1},c);if(!(s.glyphs.length!==d.glyphs.length||s.glyphs.some((f,h)=>f.id!==d.glyphs[h]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}function kn(e,t,n,r,o){let a=new WeakMap;return (i,c)=>{let s=fa$1(c),d=a.get(i);d||(d=new Map,a.set(i,d));let l=H(c),f=d.get(l);if(f)return s===1?f:{height:f.height*s,baseline:f.baseline*s};let h,y=true,b=i.substitution?.lineMetrics;if(b){let x=l/2;h={height:b.heightEm*x,baseline:b.baselineEm*x};}else try{let x=X(e,t,i,c,""),m=x.metrics.ascent/t.fixedPointScale,g=x.metrics.descent/t.fixedPointScale,S=l/2,F=m+g,v=S*r,C=F>v?v/F:1,I=F*C,p=Math.min(Math.max(0,x.metrics.lineGap/t.fixedPointScale),I*o),u=I+p;u>0?h=Pn(i,S,{height:u,baseline:m*C+p},p,2/t.fixedPointScale):(h=n.lineMetrics(c),y=!1);}catch{h=n.lineMetrics(c),y=false;}return y?(d.set(l,h),s===1?h:{height:h.height*s,baseline:h.baseline*s}):h}}var lt=2048,Zo=32,Jo=new Map([["symbol",{ascent:2059,descent:450,advances:[512,682,1460,1024,1124,1706,1593,899,682,682,1024,1124,512,1124,512,569,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,569,569,1124,1124,1124,909,1124,1479,1366,1479,1253,1251,1563,1235,1479,682,1292,1479,1405,1821,1479,1479,1573,1518,1139,1212,1251,1413,899,1573,1321,1628,1251,682,1767,682,1348,1024,1024,1292,1124,1124,1012,899,1067,842,1235,674,1235,1124,1124,1180,1067,1124,1124,1067,1124,1235,899,1180,1460,1405,1010,1405,1012,983,410,983,1124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1270,506,1124,342,1460,1024,1542,1542,1542,1542,2134,2021,1235,2021,1235,819,1124,842,1124,1124,1460,1012,942,1124,1124,1124,1124,2048,1235,2048,1348,1686,1405,1628,2021,1573,1573,1686,1573,1573,1460,1460,1460,1460,1460,1460,1460,1573,1460,1618,1618,1823,1686,1124,512,1460,1235,1235,2134,2021,1235,2021,1235,1012,674,1618,1618,1610,1460,786,786,786,786,786,786,1012,1012,1012,1012,0,674,561,1405,1405,1405,786,786,786,786,786,786,1012,1012,1012,0]}],["wingdings",{ascent:1841,descent:432,advances:[2048,2110,2344,2665,2752,1830,2492,938,2220,1826,2319,2319,2399,2399,2951,2956,2245,2751,1431,1431,1826,1135,1233,2196,1941,2208,1924,1825,1826,1826,1825,1863,1863,1203,1624,1381,1381,1929,1929,1124,1124,1826,1727,1727,1727,2275,1352,1739,2230,1819,1803,1332,1665,1529,1529,1480,1420,1627,1813,1826,1834,1825,2368,2159,1974,2233,1927,1911,1937,2099,1902,2245,2181,1597,2150,2603,1529,1951,1529,1825,1825,1825,1825,937,1529,2020,1825,1183,2171,2171,1825,1826,1826,1086,1086,0,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,2048,2048,2048,2048,2048,2048,2048,2048,641,937,641,1825,1825,1825,1825,1825,1951,937,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2146,2146,2146,2146,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2566,2566,1627,1627,1825,1825,1825,1825,1825,1825,2006,2006,1825,1825,1589,1589,1589,1589,2186,2186,1825,1825,1787,1787,1787,1787,1825,1825,1660,1660,2171,1660,1601,1601,1601,1601,987,789,1301,1609,1826,1826,2119]}],["wingdings 2",{ascent:1727,descent:432,advances:[2048,2110,2090,2073,2086,2344,2045,2220,989,1431,1431,1826,1431,1431,1826,1431,1431,1826,1431,1431,2320,2246,1826,1826,1826,2320,2170,2170,1381,1381,1938,1938,1938,1938,1928,1928,1928,1928,1047,1047,1047,1047,1178,1178,1178,1178,1826,1321,1568,1826,1826,1826,1826,1825,1825,1826,1826,2226,1727,1548,1579,984,1035,864,1018,2048,2048,2048,2048,2048,2048,2048,2048,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,0,1899,1899,1453,1453,1673,1332,1431,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2048,2048,542,740,1135,1825,1825,1825,1825,1825,1825,1825,542,740,1135,1825,1825,1825,1825,1825,1825,1825,1825,1825,624,764,903,1461,2020,2020,2020,2020,2020,542,641,740,1135,1529,1529,1085,1085,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1496,1825,0,0,0,0,0,0]}],["wingdings 3",{ascent:1900,descent:432,advances:[2048,1825,1825,1135,1135,1444,1444,1444,1444,1825,1825,1135,1135,1677,1677,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1825,1825,1455,1455,1455,1455,2010,2010,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2220,1825,1751,1114,1115,1660,1660,1930,1930,1930,1930,1924,1924,1924,1924,1930,1930,1931,1931,1825,1825,1232,1232,1444,1444,1444,1444,1825,1232,2005,2005,2005,2005,1801,1801,1801,1801,1801,1801,1801,1801,1085,1085,1825,0,1825,1825,1825,1825,1825,1627,1627,1825,1825,1825,1825,789,789,1825,1825,987,987,1825,1825,1184,1184,1825,1825,1579,1579,1825,1825,888,888,1825,1825,1381,1381,1825,1825,1875,1875,1825,1825,1825,1825,1825,1825,1825,789,592,493,394,1825,1825,1825,1825,1825,1085,1085,1381,1381,1628,1628,1184,1184,900,900,1825,1825,1019,1019,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1291,1291,1291,1291,1961,1961,1825,1825,1540,1540,1540,1540,2096,2096,1825,1825,1688,1688,1688,1688,2277,2277,1825,1825,1885,1885,1885,1885,543,543,1234,1234,766,766,1234,1234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],["webdings",{ascent:1638,descent:410,advances:[1024,2048,2048,2048,2048,2028,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1100,1100,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1144,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,0,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2500,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1377,1377,2048,1726,1058,2048,2048,2048,2048,877,1240,2048,2048,2048,2048,1357,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2645,2048,2048,2048,2048]}]]);function Qo(e){if(b$1(e))return Jo.get(e.toLowerCase())}function zn(e,t,n,r){let o=H(r)/2*fa$1(r)*(r.horizontalScalePercent/100)/lt,a=[];for(let i=0;i<n.length;i++){let c=c$2(n.charCodeAt(i),t),s=c===null?0:e.advances[c-Zo]??0;if(s===0)return;a.push(s*o+r.characterSpacingPt);}return a}function Nn(e){let t=new WeakMap,n=r=>{let o=t.get(r);return o===void 0&&(o=Qo(r.fontFamily)??null,t.set(r,o)),o};return {...e,measure(r,o){let a=n(o),i=a&&zn(a,o.fontFamily,r,o);if(!i)return e.measure(r,o);let c=0;for(let s of i)c+=s;return c},caretAdvances(r,o){let a=n(o),i=a&&zn(a,o.fontFamily,r,o);if(!i)return e.caretAdvances?.(r,o);let c=[0];for(let s of i)c.push(c[c.length-1]+s);return c},lineMetrics(r,o){let a=n(r);if(!a)return e.lineMetrics(r,o);let i=H(r)/2*fa$1(r);return {height:(a.ascent+a.descent)*i/lt,baseline:a.ascent*i/lt}}}}var dt=new WeakMap;function ea(e){let t=dt.get(e);if(t!==void 0)return t??void 0;let n=e.path;if(!n.startsWith("M")||n.length>1e6||/[^MLQCZ0-9eE+.,\s-]/u.test(n))return;let r=1/0,o=-1/0,a=n.matchAll(/([MLQCZ])([^MLQCZ]*)/gu);for(let c of a){let s=c[1]==="Z"?0:c[1]==="C"?6:c[1]==="Q"?4:2,d=c[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(d.length!==s||d.some(l=>!Number.isFinite(l))){dt.set(e,null);return}for(let l=0;l<d.length;l+=2)r=Math.min(r,d[l]),o=Math.max(o,d[l]);}let i=Number.isFinite(r)&&Number.isFinite(o)?{left:r,right:o}:void 0;return dt.set(e,i??null),i}function Dn(e,t,n,r){if(e.clusters.length!==1||e.glyphs.length===0)return;let o=1/0,a=-1/0;for(let c of e.glyphs){if(c.id===0)return;let s=ea(c.outline),d=c.outline.unitsPerEm;if(!s||!(d>0))return;let l=(c.originX+c.offsetX)/n;o=Math.min(o,l+s.left*t*(c.drawScale??1)/d),a=Math.max(a,l+s.right*t*(c.drawScale??1)/d);}let i={left:o*r,right:a*r};return Number.isFinite(i.left)&&Number.isFinite(i.right)?i:void 0}function ta(e,t,n){if(t<12)return null;if(e.getUint32(0)!==1953784678)return 0;let o=12+(Number.isSafeInteger(n)&&n>0?n:0)*4;if(o+4>t)return null;let a=e.getUint32(o);return a+12<=t?a:null}function Hn(e,t,n,r,o){let a=e.getUint16(n+4);if(a>4096||n+12+a*16>t)return null;for(let i=0;i<a;i+=1){let c=n+12+i*16;if(e.getUint32(c)!==r)continue;let s=e.getUint32(c+8),d=e.getUint32(c+12);return d<o||s+d>t?null:s}return null}function Gn(e,t){let n=e.byteLength,r=new DataView(e.buffer,e.byteOffset,n),o=ta(r,n,t);if(o===null)return null;let a=Hn(r,n,o,1751474532,54);if(a===null)return null;let i=r.getUint16(a+18);if(i<=0)return null;let c=Hn(r,n,o,1330851634,30);if(c===null)return null;let s=r.getInt16(c+26)/i,d=r.getInt16(c+28)/i;return !(s>0)||s>1||!(Math.abs(d)<=1)?null:{offsetEm:d,thicknessEm:s}}var na=.5,ra=4,Un=4096;function Wn(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o}=e,a=Nn(e.fallback),i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},c=new WeakMap,s=new WeakMap,d=kn(r,i,a,ra,na),l=new WeakMap,f=new WeakMap,h=new Array(Un),y=0,b=(p,u,R)=>{let E=h[y];E&&E.cache.delete(E.text),p.set(u,R),h[y]={cache:p,text:u},y=(y+1)%Un;},x=p=>{let u=l.get(p);if(u!==void 0)return u;let R=o(p);return l.set(p,R),R},m=(p,u,R)=>{let E=R?s:c,L=E.get(p);L||(L=new Map,E.set(p,L));let T=L.get(u);return T||(T=new Map,L.set(u,T)),T},g=new WeakMap,S=p=>{if(!p.shaping?.wordSpacingPt)return p;let u=g.get(p);return u||(u={...p,shaping:{...p.shaping,wordSpacingPt:void 0}},g.set(p,u)),u},F=(p,u)=>u.shaping?.wordSpacingPt?Bd(p)*u.shaping.wordSpacingPt:0,v=(p,u)=>a.measure(p,S(u))+F(p,u),C=(p,u)=>{let R=Math.max(0,a.measure(p,S(u))),E=a.caretAdvances?.(p,S(u))??zd(p,R);if(!E||E.length!==p.length+1)return zd(p,v(p,u));let L=Math.max(0,v(p,u)),T=0,P=0;return E.map((A,M)=>{if(M===0)return 0;p[M-1]===" "&&P++;let B=A+P*(u.shaping?.wordSpacingPt??0);return T=Math.max(T,Math.min(L,Number.isFinite(B)?B:T)),M===p.length?L:T})},I=new WeakMap;return {hasResolvedFont(p){return x(p)!==null},strikeoutMetrics(p){let u=x(p);if(!u)return;let R=I.get(u);if(R===void 0&&(R=Gn(u.bytes,u.faceIndex),I.set(u,R)),!R)return;let E=H(p)/2*fa$1(p);return {offsetPt:R.offsetEm*E,thicknessPt:R.thicknessEm*E}},measure(p,u){if(p.length===0)return 0;let R=x(u);if(!R)return v(p,u);let E=m(R,H(u),u.smallCaps),L=u.shaping?.context,T=u.shaping?`1:${JSON.stringify(L?[u.shaping.script,u.shaping.direction,p,L.before,L.after]:[u.shaping.script,u.shaping.direction,p])}`:`0:${p}`,P=`${D(u)?1:0}:${D$1(u)}:${T}`,A=E.get(P);if(A===void 0){let M=0;try{if(u.smallCaps&&!Ie(r,i,R,u,f))return v(p,u);let B=X(r,i,R,u,p);if(B.glyphs.some(G=>G.id===0))return v(p,u);for(let G of B.glyphs)M+=G.advanceX;}catch{return v(p,u)}A=M/i.fixedPointScale,b(E,P,A);}return A*fa$1(u)*(u.horizontalScalePercent/100)+p.length*u.characterSpacingPt+F(p,u)},inkBounds(p,u){if(!p||p.length>2||u.shaping?.direction==="rtl"||ma$1(p).length!==1)return;let R=x(u);if(!R)return a.inkBounds?.(p,u);try{if(u.smallCaps&&!Ie(r,i,R,u,f))return a.inkBounds?.(p,u);let E=X(r,i,R,u,p);return Dn(E,H(u)/2,i.fixedPointScale,fa$1(u)*u.horizontalScalePercent/100)}catch{return}},caretAdvances(p,u){let R=x(u);if(!R)return C(p,u);try{if(u.smallCaps&&!Ie(r,i,R,u,f))return C(p,u);let E=X(r,i,R,u,p);return E.glyphs.some(L=>L.id===0)?C(p,u):Ad(p,E,fa$1(u)*(u.horizontalScalePercent/100)/i.fixedPointScale,u.characterSpacingPt,u.shaping?.wordSpacingPt??0)??zd(p,E.glyphs.reduce((L,T)=>L+T.advanceX,0)*fa$1(u)*(u.horizontalScalePercent/100)/i.fixedPointScale+p.length*u.characterSpacingPt+F(p,u))}catch{return C(p,u)}},lineMetrics(p,u){let R=x(p);if(!R)return a.lineMetrics(p,u);if(!u||/^[\t\n\r\f ]*$/.test(u))return d(R,p);try{let E=X(r,i,R,p,u),L=0,T=0;for(let P of E.fontSpans){let A=d(P.font,p);L=Math.max(L,A.baseline),T=Math.max(T,A.height-A.baseline);}if(L+T>0)return {height:L+T,baseline:L}}catch{}return d(R,p)}}}function oa(e,t){return Wn({...t,shaper:e.shaper,environment:e.environment})}function aa(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let s of t.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,c=-1;for(let s of t.pages){let d=s.box.y;d+s.box.height>=n.top&&d<=a&&(i===-1&&(i=s.index),c=s.index);}if(i===-1){let s=ia(t,n.top);s!==null&&(i=s,c=s);}if(i!==-1){let s=Math.max(0,i-o),d=Math.min(t.pages.length-1,c+o);for(let l=s;l<=d;l+=1)r.add(l);}for(let s of e.pinnedPages??[])s>=0&&s<t.pages.length&&r.add(s);return r}function ia(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var Kn=["text-local","paragraph-local","flow-structural","global"];function Vn(e,t){return Kn.indexOf(t)>Kn.indexOf(e)?t:e}function sa(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function ca(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,c=null,s=0,d=0;function l(m){let g=e.runCooperatively;if(!g)return t(m);let S=g(m);c=S;try{for(;;){let F=S.step();if(F)return F;if(n()!==m.revision)return S.cancel(),d+=1,null;if(c!==S)return null}}finally{c===S&&(c=null);}}function f(m){let g=y(n());g.impact=Vn(g.impact,m.impact),g.structural=g.structural||m.structural;for(let S of m.paragraphIds)g.paragraphIds.add(S);for(let S of m.created)g.created.add(S);for(let S of m.deleted)g.deleted.add(S);for(let S of m.dependencyKeys)g.dependencyKeys.add(S);}let h=m=>({impact:m.impact,paragraphIds:m.paragraphIds,created:m.created,deleted:m.deleted,dependencyKeys:m.dependencyKeys,structural:m.structural,revision:m.revision});function y(m){return a||(a=sa(m)),a.revision=Math.max(a.revision,m),a}function b(){!o||i||(i=o(()=>{i=null,x();}));}function x(){i&&(i(),i=null),c&&(c.cancel(),c=null,d+=1);let m=a;if(!m)return false;a=null;let g=h(m),S=l(g);return !S||S.revision!==n()?(s+=1,f(g),b(),false):(r(S,g),true)}return {notify(m){let g=y(n());g.impact=Vn(g.impact,m.impact);for(let S of m.dirty)g.paragraphIds.add(S);for(let S of m.created)g.created.add(S),g.paragraphIds.add(S);for(let S of m.deleted)g.deleted.add(S),g.paragraphIds.add(S);for(let S of m.dependencyKeys)g.dependencyKeys.add(S);for(let S of m.splitJoin)g.structural=true,"split"in S?(g.paragraphIds.add(S.split.from),g.paragraphIds.add(S.split.tail)):(g.paragraphIds.add(S.join.kept),g.paragraphIds.add(S.join.removed));(m.impact==="flow-structural"||m.impact==="global")&&(g.structural=true),b();},invalidateAll(m,g){let S=y(m);S.impact="flow-structural",S.structural=true,g&&S.dependencyKeys.add(g),b();},flush:x,pending:()=>a?h(a):null,cancel(){i?.(),i=null,c?.cancel(),c=null,a=null;},get staleDiscards(){return s},get cancelledRuns(){return d}}}var Xn=new WeakMap;function $(e){let t=Xn.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=new Map,i=(s,d,l,f)=>{for(let h of s){if(h.kind==="paragraph")continue;let y=h.tableId;a.set(y,Math.max(a.get(y)??0,(h.columnEdges?.length??1)-1));let b=o.get(y);b||(b=new Map,o.set(y,b),n.set(y,[]),r.set(y,new Map));for(let x of h.rows){let m=b.get(x.id);m===void 0&&(m=b.size,b.set(x.id,m),r.get(y).set(m,x.cells));for(let g of x.cells)n.get(y).push({pageIndex:d,tableId:y,row:x,cell:g,rowIndex:m,isHeaderRepeat:x.isHeaderRepeat,offsetX:l,offsetY:f}),i(g.blocks,d,l,f);}}};for(let s of e.pages){i(s.fragments,s.index,0,0);for(let d of [s.header,s.footer])d&&i(d.fragments,s.index,d.box.x-s.contentBox.x,d.box.y-s.contentBox.y);for(let d of [s.footnotes,s.endnotes])if(d)for(let l of d.notes)i(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);}let c=new Map;for(let[s,d]of n)c.set(s,{placed:d,rows:r.get(s)??new Map,columnCount:a.get(s)??0});return Xn.set(e,c),c}function la(e){let t=e.columnCount;for(let n of e.rows.values())for(let r of n)t=Math.max(t,Y(r).to+1);return t}var Y=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function da(e,t,n){if(t.tableId!==n.tableId)return null;let r=$(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min(Y(t).from,Y(n).from),c=Math.max(Y(t).to,Y(n).to),s=y=>{let{from:b,to:x}=Y(y);return x>=i&&b<=c},d=y=>(r.rows.get(y)??[]).some(b=>b.vMergeContinue&&s(b)),l=r.rows.size+la(r)+2;for(let y=0;!(y>l);y+=1){let b=false;for(let[x,m]of r.rows)if(!(x<o||x>a))for(let g of m){if(!s(g))continue;let{from:S,to:F}=Y(g);S<i&&(i=S,b=true),F>c&&(c=F,b=true);}for(;o>0&&d(o);)o-=1,b=true;for(;d(a+1);)a+=1,b=true;if(!b)break}let f=[],h=new Set;for(let y of r.placed){if(y.isHeaderRepeat||y.rowIndex<o||y.rowIndex>a)continue;let{from:b,to:x}=Y(y.cell);x<i||b>c||h.has(y.cell.id)||(h.add(y.cell.id),f.push(y.cell.id));}return f.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:f,rows:{from:o,to:a},columns:{from:i,to:c},text:ua(e,t.tableId,f)}}function os(e,t){return Yn(e,t,true)}function Be(e,t){return Yn(e,t,false)}function Yn(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of $(e).values())for(let c of i.placed)if(!(c.isHeaderRepeat||!r.has(c.cell.id)))for(let s of c.cell.blocks)n&&s.kind!=="paragraph"||ce(s,o,a);return o}function ce(e,t,n){if(e.kind==="paragraph"){for(let r of Pa(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)ce(a,t,n);}function ua(e,t,n){let r=Be(e,n),o=r[0],a=r[r.length-1];return !o||!a?pa(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:pe(e,a).length}}}function pa(e,t){let n=$(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let c of o.cell.blocks)ce(c,a,new Set);let i=a[0];if(i){let c={paragraphId:i,offset:0};return {anchor:c,head:c}}}for(let o of e.pages)for(let a of xa(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function fa(e){let t=[...xa(e)];for(let n of [e.header,e.footer])n&&t.push(...ya$1(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...ya$1(r.fragments));return t}function ya(e,t){let n=new Set(Be(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of fa(a))if(n.has(i.paragraphId))for(let c of i.lines)for(let s of c.spans){let d=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(d)||(o.add(d),r.push(s));}return r}function ma(e,t){let n=new Set(t),r=[];for(let o of $(e).values())for(let a of o.placed)n.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function ha(e,t,n=pe){let r=$(e).get(t.tableId);if(!r)return "";let o=new Set(t.cellIds),a=r.placed.some(s=>s.cell.logicalGridColumn!==void 0),i=new Map,c=new Set;for(let s of r.placed){if(s.isHeaderRepeat||!o.has(s.cell.id)||c.has(s.cell.id))continue;c.add(s.cell.id);let d=Be(e,[s.cell.id]).map(h=>n(e,h)).join(`
|
|
2
|
+
`),l=i.get(s.rowIndex),f=s.cell.gridColumn+(a?Math.max(1,s.cell.gridSpan)-1:0);l?l.set(f,d):i.set(s.rowIndex,new Map([[f,d]]));}return [...i.keys()].sort((s,d)=>s-d).map(s=>{let d=i.get(s),l=[];for(let f=0;f<=t.columns.to-t.columns.from;f+=1){let h=a?t.columns.to-f:t.columns.from+f;l.push(d.get(h)??"");}return l.join(" ")}).join(`
|
|
3
|
+
`)}function ut(e,t){return De(e,t)}function as(e,t,n){if(n){let a=ut(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let c=$(e).get(n.tableId);if(!c)return null;for(let s of c.placed)if(s.cell.id===i)return {tableId:n.tableId,rowId:s.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:s.cell.logicalGridColumn??s.cell.gridColumn,isHeaderRepeat:s.isHeaderRepeat};return null}let r=ut(e,t);if(!r)return null;let o=$(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let c of a.cell.blocks)ce(c,i,new Set);if(i.includes(t))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.logicalGridColumn??a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}var jn=new WeakMap;function is(e,t){let n=jn.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of $(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let c=[];for(let d of i.cell.blocks)ce(d,c,new Set);let s={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let d of c){let l=r.get(d);l&&l.tableId.length>=o.length||r.set(d,s);}}return jn.set(e,r),r.get(t)??null}function ga(e,t,n){if(![e,t,n].every(Number.isFinite)||t<=0||n<=0)return {offsetPt:0,count:0};let r=Math.ceil(e/n-1e-9)*n;if(!Number.isFinite(r))return {offsetPt:0,count:0};let o=Math.max(0,r-e);return {offsetPt:o,count:Math.min(8192,Math.max(0,Math.floor((t-o)/n+1e-9)))}}export{Wn as $,pn as A,fn as B,yn as C,mn as D,io as E,so as F,Q as G,uo as H,st as I,Sn as J,go as K,xo as L,D as M,vn as N,oi as O,En as P,Ln as Q,Oo as R,To as S,Io as T,mi as U,Po as V,wn as W,Vo as X,jo as Y,X as Z,Ie as _,Ye as a,oa as aa,Z as b,aa as ba,qe as c,ca,Jn as d,da,O as e,os as ea,Ze as f,Be as fa,et as g,ya as ga,Ba as h,ma as ha,K as i,ha as ia,Yr as j,ut as ja,$r as k,as as ka,ka as l,is as la,nt as m,ga as ma,za as n,qr as o,Jr as p,Na as q,Qr as r,rt as s,Le as t,eo as u,to as v,no as w,at as x,dn as y,un as z};
|