@docx-editor.dev/core 2.15.1 → 2.16.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.
Files changed (100) hide show
  1. package/README.md +9 -15
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +11 -9
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +12 -16
  7. package/dist/binding.js +1 -1
  8. package/dist/{chunk-Q4AB7E4O.cjs → chunk-4MIFIUEV.cjs} +1 -1
  9. package/dist/chunk-66DTF4TD.cjs +2 -0
  10. package/dist/chunk-67U2OZS7.cjs +2 -0
  11. package/dist/chunk-6EGMDUL7.js +21 -0
  12. package/dist/chunk-ABXCIZVW.js +2 -0
  13. package/dist/chunk-AEIAYDCG.js +1 -0
  14. package/dist/{chunk-YL4Q5LZP.cjs → chunk-BPSGGVP5.cjs} +1 -1
  15. package/dist/chunk-CMV2MTDE.js +5 -0
  16. package/dist/chunk-DYPT6YDY.js +1 -0
  17. package/dist/chunk-EWV5JMJY.cjs +21 -0
  18. package/dist/chunk-FAD7DH6Q.cjs +1 -0
  19. package/dist/chunk-GHNTGVKG.cjs +11 -0
  20. package/dist/chunk-GQVKCK33.js +2 -0
  21. package/dist/chunk-I4ENGOOZ.js +1 -0
  22. package/dist/chunk-IZHDCQUC.js +20 -0
  23. package/dist/chunk-KEXMDQ2Z.js +1 -0
  24. package/dist/chunk-KQEUFAAG.cjs +20 -0
  25. package/dist/chunk-QVJO5FUR.js +11 -0
  26. package/dist/chunk-SIUUTE5M.js +2 -0
  27. package/dist/chunk-TDHR2QLH.cjs +1 -0
  28. package/dist/{chunk-PXKZUTHX.cjs → chunk-WGHVIB6B.cjs} +2 -2
  29. package/dist/chunk-XKQTITOJ.cjs +5 -0
  30. package/dist/{chunk-KXPVOPR5.js → chunk-YKDRBDI2.js} +1 -1
  31. package/dist/chunk-YRTRPSSA.cjs +1 -0
  32. package/dist/collaboration/replication.cjs +1 -1
  33. package/dist/collaboration/replication.d.ts +4 -4
  34. package/dist/collaboration/replication.js +1 -1
  35. package/dist/collaboration.d.ts +4 -4
  36. package/dist/contracts/editor.d.ts +9 -7
  37. package/dist/contracts/interaction.d.ts +73 -10
  38. package/dist/contracts/modules.d.ts +8 -8
  39. package/dist/{custom-node-writes-C9ArIlJh.d.ts → custom-node-writes-4WOL8JB_.d.ts} +2 -2
  40. package/dist/{editor-sRxrFJd8.d.ts → editor-PDx0fqSo.d.ts} +26 -125
  41. package/dist/editor-scope-DZJT4ukT.d.ts +53 -0
  42. package/dist/editor.cjs +1 -1
  43. package/dist/editor.css +1 -1
  44. package/dist/editor.d.ts +32 -26
  45. package/dist/editor.js +1 -1
  46. package/dist/export.cjs +2 -2
  47. package/dist/export.d.ts +24 -12
  48. package/dist/export.js +2 -2
  49. package/dist/{font-resolver-BYEHQGTw.d.ts → font-resolver-CdqOugwZ.d.ts} +2 -2
  50. package/dist/{headless-document-view-DELC4E5v.d.ts → headless-document-view-C9ONlGtf.d.ts} +2 -2
  51. package/dist/{hf-references-DTrHkktY.d.ts → hf-references-BZVHctVD.d.ts} +1 -1
  52. package/dist/{index-C3Gvq4jN.d.ts → index-BVb4a6O3.d.ts} +74 -28
  53. package/dist/index.cjs +1 -1
  54. package/dist/index.d.ts +20 -18
  55. package/dist/index.js +1 -1
  56. package/dist/{layout-shaping-DoGR5cf8.d.ts → layout-shaping-D_U5z-Qh.d.ts} +1 -1
  57. package/dist/layout.cjs +1 -1
  58. package/dist/layout.d.ts +270 -459
  59. package/dist/layout.js +1 -1
  60. package/dist/{note-properties-DSe8igrz.d.ts → note-properties-BosjbkGC.d.ts} +1 -1
  61. package/dist/{omml-equation-BpRmfDAf.d.ts → omml-equation-oLlbPpVy.d.ts} +1 -1
  62. package/dist/output.cjs +1 -1
  63. package/dist/output.d.ts +6 -6
  64. package/dist/output.js +1 -1
  65. package/dist/{protocol-DZzKxH5r.d.ts → protocol-CUsqt13U.d.ts} +28 -6
  66. package/dist/{review-items-DYRx187i.d.ts → review-items-kC-YI70C.d.ts} +1 -1
  67. package/dist/{review-reads-LbGUdNzn.d.ts → review-reads-DdvADsmp.d.ts} +8 -7
  68. package/dist/{revision-projection-DHRJH48u.d.ts → revision-projection-CN_DiOl_.d.ts} +1 -1
  69. package/dist/{semantic-cell-selection-BXVWCBYm.d.ts → semantic-cell-selection-BMrXDniV.d.ts} +4 -4
  70. package/dist/{semantic-interaction-DZsDmPg5.d.ts → semantic-interaction-NGeYzYCN.d.ts} +1 -1
  71. package/dist/{semantic-paint-f7SqN4oW.d.ts → semantic-paint-CM8F-8pH.d.ts} +2 -2
  72. package/dist/{semantic-records-EIdwId-a.d.ts → semantic-records-BreR44Ki.d.ts} +1231 -947
  73. package/dist/store.cjs +1 -1
  74. package/dist/store.d.ts +80 -20
  75. package/dist/store.js +1 -1
  76. package/dist/{tree-op-types-egdarvH_.d.ts → tree-op-types-C5rZzoAz.d.ts} +131 -53
  77. package/dist/{tree-package-fragment-DjkH4ESI.d.ts → tree-package-fragment-DDQHk8sv.d.ts} +3 -3
  78. package/dist/{tree-session-contract-CGOOgPjW.d.ts → tree-session-contract-dKgbKH9A.d.ts} +18 -8
  79. package/dist/{tree-store-DKJB0IcA.d.ts → tree-store-DU192chS.d.ts} +1 -1
  80. package/package.json +2 -2
  81. package/dist/chunk-24APKZAN.cjs +0 -11
  82. package/dist/chunk-2YH4MSHX.cjs +0 -2
  83. package/dist/chunk-5Y7AADI6.js +0 -1
  84. package/dist/chunk-AREFLNUP.js +0 -11
  85. package/dist/chunk-AS7YZNQE.cjs +0 -2
  86. package/dist/chunk-AVGCKH6A.cjs +0 -20
  87. package/dist/chunk-CDYVDQRI.cjs +0 -5
  88. package/dist/chunk-HOEWFH5U.cjs +0 -1
  89. package/dist/chunk-KFELX7CN.js +0 -2
  90. package/dist/chunk-LGFKIF4M.cjs +0 -1
  91. package/dist/chunk-M52QXFKI.js +0 -1
  92. package/dist/chunk-MNUKSXRO.js +0 -1
  93. package/dist/chunk-PBOIGBDO.js +0 -2
  94. package/dist/chunk-PMHGONET.cjs +0 -1
  95. package/dist/chunk-QJYH6AYD.js +0 -1
  96. package/dist/chunk-QRC37MWG.cjs +0 -20
  97. package/dist/chunk-RJSB6RJ7.js +0 -20
  98. package/dist/chunk-SB54HLFJ.js +0 -20
  99. package/dist/chunk-XCESLTJL.js +0 -2
  100. package/dist/chunk-Z4527AXR.js +0 -5
package/README.md CHANGED
@@ -50,7 +50,7 @@ layout pass, and the paint step directly.
50
50
  | `./store` | The canonical tree and its transactional store. |
51
51
  | `./layout` | The DOM-free layout pass. |
52
52
  | `./output` | Serialization. |
53
- | `./export` | Reusable, DOM-free semantic layout sessions for Markdown, PDF, and future exporters. |
53
+ | `./export` | Document layout sessions for exporters. No DOM required. |
54
54
  | `./automation` | The object model behind `@docx-editor.dev/editor-api`. |
55
55
  | `./collaboration` | Provider-neutral collaboration session contracts. |
56
56
  | `./collaboration/replication` | Replication helpers for collaboration providers. |
@@ -70,17 +70,14 @@ Nodes are typed where layout needs them and generic everywhere else, preserving
70
70
  verbatim. Content the engine does not model is carried rather than dropped, so a document full
71
71
  of unknown extensions still opens, edits, and saves.
72
72
 
73
- Export sessions use the editor's reader-safe revision view by default: `all-markup` keeps both
74
- halves of pending tracked changes visible. Pass `displayMode: 'proposed'` or
75
- `displayMode: 'original'` explicitly when the exporter should present a resolved view instead.
73
+ Export sessions default to `all-markup`, which shows inserted and deleted text.
74
+ Use `displayMode: 'proposed'` for the accepted view or `displayMode: 'original'` for the rejected view.
76
75
 
77
- ### Building a physical-page exporter
76
+ ### Build a paginated exporter
78
77
 
79
- Use the document-aware font composition root for Markdown, PDF, or any exporter whose page breaks
80
- matter. `openDocumentForExport(bytes)` without a measurer intentionally uses deterministic
81
- fixed-width approximation. `openFontBackedDocumentForExport` discovers the document's actual run,
82
- style, header, footer, note, field, symbol, and equation families, then binds the resolved shaping
83
- snapshot to the layout session.
78
+ For exports that need accurate page breaks, use `openFontBackedDocumentForExport`. It resolves
79
+ the fonts used throughout the document before layout. Without a measurer,
80
+ `openDocumentForExport(bytes)` uses a fixed-width approximation.
84
81
 
85
82
  ```ts
86
83
  import { readFile } from 'node:fs/promises';
@@ -105,11 +102,8 @@ try {
105
102
  }
106
103
  ```
107
104
 
108
- Keep font retrieval, substitution, cancellation, diagnostics, and memory ownership in this Core
109
- lane. Format adapters should consume the resulting semantic pages; Markdown binds Core source
110
- artifacts to string offsets, while PDF can bind the same artifacts to page rectangles. For a live
111
- `HeadlessDocumentView`, pass the revision-stable measurer already used by its editor rather than
112
- starting asynchronous document-specific font resolution against mutable state.
105
+ Let Core manage fonts, resources, and layout. Build your output from the returned pages.
106
+ For a live `HeadlessDocumentView`, pass the editor's revision-stable measurer.
113
107
 
114
108
  ## Fidelity
115
109
 
@@ -1 +1 @@
1
- 'use strict';var chunkLGFKIF4M_cjs=require('./chunk-LGFKIF4M.cjs');require('./chunk-Q4AB7E4O.cjs');var chunk2YH4MSHX_cjs=require('./chunk-2YH4MSHX.cjs'),chunkYL4Q5LZP_cjs=require('./chunk-YL4Q5LZP.cjs'),chunk24APKZAN_cjs=require('./chunk-24APKZAN.cjs');var N=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),b=Object.freeze({kind:"body"});function U(t,e={}){let s=chunk24APKZAN_cjs.Wb(t,e.limits??{});if(!s.ok)return {ok:false,reason:s.reason,...s.detail?{detail:s.detail}:{}};let u=s.package.parts.get(s.package.mainDocumentPart);if(!u)return {ok:false,reason:"no-main-document-part",detail:s.package.mainDocumentPart};let m=new chunk2YH4MSHX_cjs.G(s.package,chunk24APKZAN_cjs.Cb(u)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=chunkLGFKIF4M_cjs.g({port:n,capabilities:N});return f&&(l=f.attach(chunkYL4Q5LZP_cjs.b(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,s){let u=t.partFor(s);return u?chunk24APKZAN_cjs.xa(t,()=>{let m=chunk24APKZAN_cjs.Jd(t.currentPackage(),e,u.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,s=()=>{}){let u=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?chunk24APKZAN_cjs.b.mutationAgent:chunk24APKZAN_cjs.b.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {revision:()=>t.packageRevision,currentPackage:()=>u?t.currentPackage():null,apply(n,a=b){if(!u)return {ok:false,reason:"disposed"};let r=n(i=>chunk24APKZAN_cjs.Eb(e?.identity.actorId,()=>W(t,i,a)));if(r===null)return {ok:false,reason:"unsupported-target"};let p=e?.gateOperations(r,a);if(p)return {ok:false,reason:p};let o=e?t.partFor(a)?.name:void 0,d=t.transact(a,i=>{for(let A of r)i.apply(A);o&&i.applyPackage(A=>chunkYL4Q5LZP_cjs.a(A,o,r));},f());return d.ok?l({ok:true,changed:d.change!==null}):{ok:false,reason:d.detail?`${d.reason}: ${d.detail}`:d.reason}},applyLifecycle(n){if(!u)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=chunk24APKZAN_cjs.Eb(e?.identity.actorId,()=>t.applyLifecycleOp(n));return r.ok?l({ok:true,changed:r.change!==null}):{ok:false,reason:r.detail?`${r.reason}: ${r.detail}`:r.reason}},applyCommentWrites(n,a){if(!u)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};if(p.store.graftPackage(()=>t.currentPackage()),n.every(i=>i.kind==="delete")){let i=n.find(k=>k.kind==="delete"),A=chunk24APKZAN_cjs.Eb(e?.identity.actorId,()=>chunk2YH4MSHX_cjs.T(t,n.flatMap(k=>k.kind==="delete"?[{commentId:k.commentId,...k.parentCommentId===void 0?{}:{parentCommentId:k.parentCommentId}}]:[]),a,i?.kind==="delete"?i.noteId:void 0));return A?l({ok:true,changed:A}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let o=n[0];if(o.kind==="create"||o.kind==="reply"){let i=chunk24APKZAN_cjs.Eb(e?.identity.actorId,()=>chunk2YH4MSHX_cjs.R(t,{anchor:o.anchor,author:o.author,text:o.text,...o.date===void 0?{}:{date:o.date},...o.kind==="reply"?{replyToCommentId:o.parentCommentId}:{}},a));return i.ok?l({ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=chunk24APKZAN_cjs.Eb(e?.identity.actorId,()=>chunk2YH4MSHX_cjs.S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!u)return {ok:false,reason:"disposed"};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};let o=chunk24APKZAN_cjs.Eb(e?.identity.actorId,()=>chunk2YH4MSHX_cjs.$(t,n,a));return o.ok?l({ok:true,changed:o.change!==null}):{ok:false,reason:o.detail?`${o.reason}: ${o.detail}`:o.reason}},save:()=>u?chunk24APKZAN_cjs.Xb(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){s(),u=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkLGFKIF4M_cjs.c}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkLGFKIF4M_cjs.b}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkLGFKIF4M_cjs.d}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkLGFKIF4M_cjs.a}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkLGFKIF4M_cjs.f}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkLGFKIF4M_cjs.e}});exports.SERVER_AUTOMATION_CAPABILITIES=N;exports.createServerAutomationHost=U;
1
+ 'use strict';var chunkTDHR2QLH_cjs=require('./chunk-TDHR2QLH.cjs');require('./chunk-4MIFIUEV.cjs');var chunk67U2OZS7_cjs=require('./chunk-67U2OZS7.cjs'),chunkBPSGGVP5_cjs=require('./chunk-BPSGGVP5.cjs'),chunkGHNTGVKG_cjs=require('./chunk-GHNTGVKG.cjs');var N=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),b=Object.freeze({kind:"body"});function U(t,e={}){let i=chunkGHNTGVKG_cjs.cc(t,e.limits??{});if(!i.ok)return {ok:false,reason:i.reason,...i.limit===void 0?{}:{limit:i.limit},...i.detail?{detail:i.detail}:{}};let s=i.package.parts.get(i.package.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-part",detail:i.package.mainDocumentPart};let m=new chunk67U2OZS7_cjs.G(i.package,chunkGHNTGVKG_cjs.Kb(s)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=chunkTDHR2QLH_cjs.g({port:n,capabilities:N});return f&&(l=f.attach(chunkBPSGGVP5_cjs.b(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,i){let s=t.partFor(i);return s?chunkGHNTGVKG_cjs.Ba(t,()=>{let m=chunkGHNTGVKG_cjs.nf(t.currentPackage(),e,s.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,i=()=>{}){let s=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?chunkGHNTGVKG_cjs.b.mutationAgent:chunkGHNTGVKG_cjs.b.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {localChangeTracking:true,revision:()=>t.packageRevision,currentPackage:()=>s?t.currentPackage():null,apply(n,a=b){if(!s)return {ok:false,reason:"disposed"};let r=n(u=>chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>W(t,u,a)));if(r===null)return {ok:false,reason:"unsupported-target"};let p=e?.gateOperations(r,a);if(p)return {ok:false,reason:p};let o=e?t.partFor(a)?.name:void 0,d=t.transact(a,u=>{for(let A of r)u.apply(A);o&&u.applyPackage(A=>chunkBPSGGVP5_cjs.a(A,o,r));},f());return d.ok?l({ok:true,changed:d.change!==null}):{ok:false,reason:d.detail?`${d.reason}: ${d.detail}`:d.reason}},applyLifecycle(n){if(!s)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>t.applyLifecycleOp(n));return r.ok?l({ok:true,changed:r.change!==null}):{ok:false,reason:r.detail?`${r.reason}: ${r.detail}`:r.reason}},applyCommentWrites(n,a){if(!s)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};if(p.store.graftPackage(()=>t.currentPackage()),n.every(u=>u.kind==="delete")){let u=n.find(y=>y.kind==="delete"),A=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_cjs.T(t,n.flatMap(y=>y.kind==="delete"?[{commentId:y.commentId,...y.parentCommentId===void 0?{}:{parentCommentId:y.parentCommentId}}]:[]),a,u?.kind==="delete"?u.noteId:void 0));return A?l({ok:true,changed:A}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let o=n[0];if(o.kind==="create"||o.kind==="reply"){let u=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_cjs.R(t,{anchor:o.anchor,author:o.author,text:o.text,...o.date===void 0?{}:{date:o.date},...o.kind==="reply"?{replyToCommentId:o.parentCommentId}:{}},a));return u.ok?l({ok:true,changed:true,..."commentId"in u?{commentId:u.commentId}:{}}):{ok:false,reason:u.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_cjs.S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!s)return {ok:false,reason:"disposed"};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};let o=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_cjs.$(t,n,a));return o.ok?l({ok:true,changed:o.change!==null}):{ok:false,reason:o.detail?`${o.reason}: ${o.detail}`:o.reason}},save:()=>s?chunkGHNTGVKG_cjs.dc(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){i(),s=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.b}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.a}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.c}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.f}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.e}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.d}});exports.SERVER_AUTOMATION_CAPABILITIES=N;exports.createServerAutomationHost=U;
@@ -1,11 +1,11 @@
1
- import { A as AutomationCapabilities, a as AutomationHost } from './protocol-DZzKxH5r.js';
2
- export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-DZzKxH5r.js';
3
- import { H as HeaderFooterVariant } from './hf-references-DTrHkktY.js';
4
- import { N as NoteKind } from './tree-store-DKJB0IcA.js';
5
- import { f as OoxmlPackageLimits, g as OoxmlPackageRejection } from './tree-op-types-egdarvH_.js';
1
+ import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CUsqt13U.js';
2
+ export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-CUsqt13U.js';
3
+ import { H as HeaderFooterVariant } from './hf-references-BZVHctVD.js';
4
+ import { N as NoteKind } from './tree-store-DU192chS.js';
5
+ import { f as OoxmlPackageLimits, g as OoxmlPackageRejection } from './tree-op-types-C5rZzoAz.js';
6
6
  import { CollaborationModuleContribution } from './collaboration.js';
7
7
  import './contracts/types.js';
8
- import './tree-package-fragment-DjkH4ESI.js';
8
+ import './tree-package-fragment-DDQHk8sv.js';
9
9
  import './collaboration/replication.js';
10
10
  import './failure-BnGjoXf0.js';
11
11
 
@@ -51,6 +51,7 @@ type ServerAutomationHostResult = {
51
51
  } | {
52
52
  readonly ok: false;
53
53
  readonly reason: ServerAutomationHostRejection;
54
+ readonly limit?: 'zip.maxTotalBytes' | 'zip.maxRatio';
54
55
  readonly detail?: string;
55
56
  };
56
57
  /**
@@ -60,10 +61,11 @@ type ServerAutomationHostResult = {
60
61
  */
61
62
  interface ServerAutomationHostOptions {
62
63
  /**
63
- * Tighter budgets for the bounded reader — zip ratio, part count, XML depth.
64
+ * Budgets for the bounded reader — archive size, part count, and XML elements.
64
65
  *
65
- * Exposed because a server opening documents it did not author is exactly where a caller
66
- * may want smaller limits than the defaults. Omitted means the engine's own defaults.
66
+ * Omitted means the engine defaults. Lower budgets for untrusted input, or raise
67
+ * `xml.maxElements` for larger documents when the host has sufficient memory.
68
+ * Engine ceilings still apply.
67
69
  */
68
70
  readonly limits?: OoxmlPackageLimits;
69
71
  /**
@@ -1 +1 @@
1
- import {g}from'./chunk-5Y7AADI6.js';export{c as AUTOMATION_COMMAND_OPERATIONS,b as AUTOMATION_QUERY_OPERATIONS,d as AUTOMATION_SOLITARY_OPERATIONS,a as HEADER_FOOTER_VARIANTS,f as isAutomationCommand,e as isSolitaryAutomationCommand}from'./chunk-5Y7AADI6.js';import'./chunk-QJYH6AYD.js';import {G,$,T,R,S}from'./chunk-KFELX7CN.js';import {b as b$1,a}from'./chunk-KXPVOPR5.js';import {Wb,Cb,Xb,Eb,xa,Jd,b as b$2}from'./chunk-AREFLNUP.js';var N=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),b=Object.freeze({kind:"body"});function U(t,e={}){let s=Wb(t,e.limits??{});if(!s.ok)return {ok:false,reason:s.reason,...s.detail?{detail:s.detail}:{}};let u=s.package.parts.get(s.package.mainDocumentPart);if(!u)return {ok:false,reason:"no-main-document-part",detail:s.package.mainDocumentPart};let m=new G(s.package,Cb(u)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=g({port:n,capabilities:N});return f&&(l=f.attach(b$1(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,s){let u=t.partFor(s);return u?xa(t,()=>{let m=Jd(t.currentPackage(),e,u.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,s=()=>{}){let u=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?b$2.mutationAgent:b$2.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {revision:()=>t.packageRevision,currentPackage:()=>u?t.currentPackage():null,apply(n,a$1=b){if(!u)return {ok:false,reason:"disposed"};let r=n(i=>Eb(e?.identity.actorId,()=>W(t,i,a$1)));if(r===null)return {ok:false,reason:"unsupported-target"};let p=e?.gateOperations(r,a$1);if(p)return {ok:false,reason:p};let o=e?t.partFor(a$1)?.name:void 0,d=t.transact(a$1,i=>{for(let A of r)i.apply(A);o&&i.applyPackage(A=>a(A,o,r));},f());return d.ok?l({ok:true,changed:d.change!==null}):{ok:false,reason:d.detail?`${d.reason}: ${d.detail}`:d.reason}},applyLifecycle(n){if(!u)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=Eb(e?.identity.actorId,()=>t.applyLifecycleOp(n));return r.ok?l({ok:true,changed:r.change!==null}):{ok:false,reason:r.detail?`${r.reason}: ${r.detail}`:r.reason}},applyCommentWrites(n,a){if(!u)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};if(p.store.graftPackage(()=>t.currentPackage()),n.every(i=>i.kind==="delete")){let i=n.find(k=>k.kind==="delete"),A=Eb(e?.identity.actorId,()=>T(t,n.flatMap(k=>k.kind==="delete"?[{commentId:k.commentId,...k.parentCommentId===void 0?{}:{parentCommentId:k.parentCommentId}}]:[]),a,i?.kind==="delete"?i.noteId:void 0));return A?l({ok:true,changed:A}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let o=n[0];if(o.kind==="create"||o.kind==="reply"){let i=Eb(e?.identity.actorId,()=>R(t,{anchor:o.anchor,author:o.author,text:o.text,...o.date===void 0?{}:{date:o.date},...o.kind==="reply"?{replyToCommentId:o.parentCommentId}:{}},a));return i.ok?l({ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=Eb(e?.identity.actorId,()=>S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!u)return {ok:false,reason:"disposed"};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};let o=Eb(e?.identity.actorId,()=>$(t,n,a));return o.ok?l({ok:true,changed:o.change!==null}):{ok:false,reason:o.detail?`${o.reason}: ${o.detail}`:o.reason}},save:()=>u?Xb(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){s(),u=false;}}}export{N as SERVER_AUTOMATION_CAPABILITIES,U as createServerAutomationHost};
1
+ import {g}from'./chunk-KEXMDQ2Z.js';export{b as AUTOMATION_COMMAND_OPERATIONS,a as AUTOMATION_QUERY_OPERATIONS,c as AUTOMATION_SOLITARY_OPERATIONS,f as HEADER_FOOTER_VARIANTS,e as isAutomationCommand,d as isSolitaryAutomationCommand}from'./chunk-KEXMDQ2Z.js';import'./chunk-I4ENGOOZ.js';import {G,$,T,R,S}from'./chunk-GQVKCK33.js';import {b as b$1,a}from'./chunk-YKDRBDI2.js';import {cc,Kb,dc,Mb,Ba,nf,b as b$2}from'./chunk-QVJO5FUR.js';var N=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),b=Object.freeze({kind:"body"});function U(t,e={}){let i=cc(t,e.limits??{});if(!i.ok)return {ok:false,reason:i.reason,...i.limit===void 0?{}:{limit:i.limit},...i.detail?{detail:i.detail}:{}};let s=i.package.parts.get(i.package.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-part",detail:i.package.mainDocumentPart};let m=new G(i.package,Kb(s)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=g({port:n,capabilities:N});return f&&(l=f.attach(b$1(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,i){let s=t.partFor(i);return s?Ba(t,()=>{let m=nf(t.currentPackage(),e,s.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,i=()=>{}){let s=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?b$2.mutationAgent:b$2.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {localChangeTracking:true,revision:()=>t.packageRevision,currentPackage:()=>s?t.currentPackage():null,apply(n,a$1=b){if(!s)return {ok:false,reason:"disposed"};let r=n(u=>Mb(e?.identity.actorId,()=>W(t,u,a$1)));if(r===null)return {ok:false,reason:"unsupported-target"};let p=e?.gateOperations(r,a$1);if(p)return {ok:false,reason:p};let o=e?t.partFor(a$1)?.name:void 0,d=t.transact(a$1,u=>{for(let A of r)u.apply(A);o&&u.applyPackage(A=>a(A,o,r));},f());return d.ok?l({ok:true,changed:d.change!==null}):{ok:false,reason:d.detail?`${d.reason}: ${d.detail}`:d.reason}},applyLifecycle(n){if(!s)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=Mb(e?.identity.actorId,()=>t.applyLifecycleOp(n));return r.ok?l({ok:true,changed:r.change!==null}):{ok:false,reason:r.detail?`${r.reason}: ${r.detail}`:r.reason}},applyCommentWrites(n,a){if(!s)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};if(p.store.graftPackage(()=>t.currentPackage()),n.every(u=>u.kind==="delete")){let u=n.find(y=>y.kind==="delete"),A=Mb(e?.identity.actorId,()=>T(t,n.flatMap(y=>y.kind==="delete"?[{commentId:y.commentId,...y.parentCommentId===void 0?{}:{parentCommentId:y.parentCommentId}}]:[]),a,u?.kind==="delete"?u.noteId:void 0));return A?l({ok:true,changed:A}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let o=n[0];if(o.kind==="create"||o.kind==="reply"){let u=Mb(e?.identity.actorId,()=>R(t,{anchor:o.anchor,author:o.author,text:o.text,...o.date===void 0?{}:{date:o.date},...o.kind==="reply"?{replyToCommentId:o.parentCommentId}:{}},a));return u.ok?l({ok:true,changed:true,..."commentId"in u?{commentId:u.commentId}:{}}):{ok:false,reason:u.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=Mb(e?.identity.actorId,()=>S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!s)return {ok:false,reason:"disposed"};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};let o=Mb(e?.identity.actorId,()=>$(t,n,a));return o.ok?l({ok:true,changed:o.change!==null}):{ok:false,reason:o.detail?`${o.reason}: ${o.detail}`:o.reason}},save:()=>s?dc(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){i(),s=false;}}}export{N as SERVER_AUTOMATION_CAPABILITIES,U as createServerAutomationHost};
package/dist/binding.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkCDYVDQRI_cjs=require('./chunk-CDYVDQRI.cjs');require('./chunk-PMHGONET.cjs'),require('./chunk-FGBADUSK.cjs'),require('./chunk-PXKZUTHX.cjs'),require('./chunk-Q4AB7E4O.cjs'),require('./chunk-2YH4MSHX.cjs'),require('./chunk-YL4Q5LZP.cjs'),require('./chunk-24APKZAN.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkCDYVDQRI_cjs.e}});
1
+ 'use strict';var chunkXKQTITOJ_cjs=require('./chunk-XKQTITOJ.cjs');require('./chunk-YRTRPSSA.cjs'),require('./chunk-FGBADUSK.cjs'),require('./chunk-WGHVIB6B.cjs'),require('./chunk-4MIFIUEV.cjs'),require('./chunk-67U2OZS7.cjs'),require('./chunk-BPSGGVP5.cjs'),require('./chunk-GHNTGVKG.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.e}});
package/dist/binding.d.ts CHANGED
@@ -1,25 +1,21 @@
1
1
  import { Node, Schema } from 'prosemirror-model';
2
- import { q as OoxmlProperty, g as OoxmlPackageRejection } from './tree-op-types-egdarvH_.js';
3
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-CGOOgPjW.js';
4
- 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-CGOOgPjW.js';
2
+ import { q as OoxmlProperty, g as OoxmlPackageRejection } from './tree-op-types-C5rZzoAz.js';
3
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-dKgbKH9A.js';
4
+ 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-dKgbKH9A.js';
5
5
  import { ReviewModuleContribution } from './contracts/modules.js';
6
- export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-DjkH4ESI.js';
6
+ export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-DDQHk8sv.js';
7
7
  import { EditorView } from 'prosemirror-view';
8
8
  import './contracts/types.js';
9
- import './hf-references-DTrHkktY.js';
10
- import './custom-node-writes-C9ArIlJh.js';
11
- import './tree-store-DKJB0IcA.js';
12
- import './headless-document-view-DELC4E5v.js';
13
- import './review-items-DYRx187i.js';
9
+ import './hf-references-BZVHctVD.js';
10
+ import './custom-node-writes-4WOL8JB_.js';
11
+ import './tree-store-DU192chS.js';
12
+ import './headless-document-view-C9ONlGtf.js';
13
+ import './review-items-kC-YI70C.js';
14
14
  import './collaboration/replication.js';
15
- import './editor-sRxrFJd8.js';
16
- import './contracts/document.js';
17
- import './semantic-interaction-DZsDmPg5.js';
18
- import './semantic-records-EIdwId-a.js';
19
- import './revision-projection-DHRJH48u.js';
20
- import './omml-equation-BpRmfDAf.js';
21
- import './failure-BnGjoXf0.js';
15
+ import './editor-scope-DZJT4ukT.js';
22
16
  import './collaboration.js';
17
+ import './failure-BnGjoXf0.js';
18
+ import './revision-projection-CN_DiOl_.js';
23
19
 
24
20
  /** Attributes carried by a projected paragraph. */
25
21
  interface ParagraphAttrs {
package/dist/binding.js CHANGED
@@ -1 +1 @@
1
- export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-Z4527AXR.js';import'./chunk-M52QXFKI.js';import'./chunk-VP7SDFCM.js';import'./chunk-PBOIGBDO.js';import'./chunk-QJYH6AYD.js';import'./chunk-KFELX7CN.js';import'./chunk-KXPVOPR5.js';import'./chunk-AREFLNUP.js';
1
+ export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-CMV2MTDE.js';import'./chunk-AEIAYDCG.js';import'./chunk-VP7SDFCM.js';import'./chunk-ABXCIZVW.js';import'./chunk-I4ENGOOZ.js';import'./chunk-GQVKCK33.js';import'./chunk-YKDRBDI2.js';import'./chunk-QVJO5FUR.js';
@@ -1 +1 @@
1
- 'use strict';var chunk2YH4MSHX_cjs=require('./chunk-2YH4MSHX.cjs'),chunk24APKZAN_cjs=require('./chunk-24APKZAN.cjs');var _=4096,L=chunk24APKZAN_cjs.$c*16;function I(){return {out:[],runs:[],length:0}}function D(e,n,s,t){if(n.length===0||s===t)return;let o=e.runs[e.runs.length-1];if(o?.runId===n&&o.end===s){e.runs[e.runs.length-1]={runId:n,start:o.start,end:t};return}e.runs.push({runId:n,start:s,end:t});}function M(e,n,s,t){if(n.length>t.left)return false;if(t.left-=n.length,n.length>0){let o=e.length;e.out.push(n),e.length+=n.length,D(e,s,o,e.length);}return true}function v(e,n){let s=e.length;n.text.length>0&&e.out.push(n.text),e.length+=n.text.length;for(let t of n.runs)D(e,t.runId,s+t.start,s+t.end);}function O(e){return {text:e.out.join(""),runs:e.runs}}function j(){return {text:chunk24APKZAN_cjs.Jc,runs:[]}}function W(e){for(let n of e)if(!n.separated)return false;return true}function H(e,n=0,s=e.length,t){let o=new Set,l=new Map,r=new Map,d=t?[t]:[];t&&o.add(t);for(let a=n;a<s;a+=1){let i=e[a].node;if(chunk24APKZAN_cjs.Oc(i,"begin")){d.push(i.id);continue}if(chunk24APKZAN_cjs.Oc(i,"separate")){let u=d[d.length-1];u&&(o.add(u),l.set(i.id,u));continue}if(chunk24APKZAN_cjs.Oc(i,"end")){let u=d.pop();u&&(o.add(u),r.set(i.id,u));}}return {activeBegins:o,separateBegin:l,endBegin:r}}function z(e,n,s){if(chunk24APKZAN_cjs.Oc(s,"begin"))return n.activeBegins.has(s.id)&&e.push({beginId:s.id,separated:false}),true;if(chunk24APKZAN_cjs.Oc(s,"separate")){let t=n.separateBegin.get(s.id),o=e[e.length-1];return t&&o?.beginId===t&&(o.separated=true),true}if(chunk24APKZAN_cjs.Oc(s,"end")){let t=n.endBegin.get(s.id),o=e[e.length-1];return t&&o?.beginId===t&&e.pop(),true}return false}function J(e,n,s,t){let o=[];if(!chunk24APKZAN_cjs._c(e,o,s))return null;let l=o.reverse(),r=I();for(;l.length>0;){let d=l.pop();if(n==="original"&&d.hiddenInOriginal)continue;if(chunk24APKZAN_cjs.Rc(d.node)){let i=[];if(!chunk24APKZAN_cjs._c(d.node,i,s))return null;for(let u=i.length-1;u>=0;u-=1)l.push(i[u]);continue}if(chunk24APKZAN_cjs.Pc(d.node))continue;let a=chunk24APKZAN_cjs.Zc(d.node);if(!M(r,a,d.runId,t))return null}return O(r)}function K(e,n,s,t,o){let l=I(),r=[],d=H(e);for(let a of e){let i=a.node;if(z(r,d,i)||chunk24APKZAN_cjs.Pc(i)||!W(r)||n==="original"&&a.hiddenInOriginal)continue;if(chunk24APKZAN_cjs.Rc(i)){let c=o>=chunk24APKZAN_cjs.ad?J(i,n,s,t):X(i,n,s,t,o+1);if(c===null)return null;v(l,c);continue}let u=chunk24APKZAN_cjs.Zc(i);if(!M(l,u,a.runId,t))return null}return O(l)}function X(e,n,s,t,o){let l=[];return chunk24APKZAN_cjs._c(e,l,s)?K(l,n,s,t,o):null}function Y(e,n,s){let t=n.node;if(e.owned.has(t.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),chunk24APKZAN_cjs.Oc(t,"begin"))return t.id!==e.span.node.id&&e.markers.activeBegins.has(t.id)&&e.states.push({beginId:t.id,separated:false}),false;if(chunk24APKZAN_cjs.Oc(t,"separate")){let l=e.markers.separateBegin.get(t.id),r=e.states[e.states.length-1];return l&&r?.beginId===l&&(r.separated=true),false}if(chunk24APKZAN_cjs.Oc(t,"end")){if(t.id===e.endId)return true;let l=e.markers.endBegin.get(t.id),r=e.states[e.states.length-1];return l&&r?.beginId===l&&e.states.pop(),false}if(e.overflow||chunk24APKZAN_cjs.Pc(t)||chunk24APKZAN_cjs.Rc(t)||!e.owned.has(t.id)||!W(e.states)||s==="original"&&n.hiddenInOriginal)return false;let o=chunk24APKZAN_cjs.Zc(t);return M(e.result,o,n.runId,e.chars)||(e.overflow=true),false}function U(e,n,s="allMarkup"){let t=new Map,o=new Map,l=new Map;for(let i of n)i.kind==="complex"?o.set(i.node.id,i):l.set(i.node.id,i);let r=[];chunk24APKZAN_cjs._c(e,r);let d=new Map;for(let i=0;i<r.length;i+=1)d.set(r[i].node.id,i);let a=null;for(let i=0;i<r.length;i+=1){let u=r[i],c=l.get(u.node.id);if(c){let f={left:_},p={left:L},g=X(c.node,s,f,p,0);t.set(c.node.id,g??j());}if(a===null){let f=o.get(u.node.id);if(!f)continue;let p=new Set(f.removeNodeIds),g=-1;for(let R=f.removeNodeIds.length-1;R>=0;R-=1){let m=d.get(f.removeNodeIds[R]);if(!(m===void 0||m<=i)&&chunk24APKZAN_cjs.Oc(r[m].node,"end")){g=m;break}}let x=r[g];if(!x){t.set(f.node.id,j());continue}a={span:f,owned:p,states:[{beginId:f.node.id,separated:false}],markers:H(r,i+1,g,f.node.id),endId:x.node.id,result:I(),chars:{left:L},nodesLeft:_,overflow:false};}Y(a,u,s)&&(t.set(a.span.node.id,a.overflow?j():O(a.result)),a=null);}return a!==null&&t.set(a.span.node.id,j()),t}function Z(e){let n=[],s=0;for(let t of e){let o=s+t.text.length;t.resultRuns?n.push({text:t.text,rawStart:t.rawStart,rawEnd:t.rawEnd,resultRuns:t.resultRuns,projectedStart:s,projectedEnd:o,expansion:t.text.length!==t.rawEnd-t.rawStart}):n.push({text:t.text,rawStart:t.rawStart,rawEnd:t.rawEnd,projectedStart:s,projectedEnd:o,expansion:t.text.length!==t.rawEnd-t.rawStart}),s=o;}return n}function $(e,n){return n<=e.rawStart?e.projectedStart:n>=e.rawEnd?e.projectedEnd:e.expansion?e.projectedStart:e.projectedStart+n-e.rawStart}function G(e,n){return e.expansion?e.rawStart:e.rawStart+n-e.projectedStart}function Q(e,n){return e.expansion?e.rawEnd:e.rawStart+n-e.projectedStart}function B(e){let n=Z(e),s="";for(let t of e)s+=t.text;return {text:s,projectedOffset(t){let o=0;for(let l of n){if(t<=l.rawEnd)return $(l,t);o=l.projectedEnd;}return o},rawRange(t,o){if(t<0||t>=o||o>s.length)return null;let l=n.find(d=>t>=d.projectedStart&&t<d.projectedEnd),r=n.find(d=>o>d.projectedStart&&o<=d.projectedEnd);return !l||!r?null:{start:G(l,t),end:Q(r,o)}},sliceRaw(t,o){if(t>=o)return "";let l="";for(let r of n){if(r.expansion){t<=r.rawStart&&o>=r.rawEnd&&(l+=r.text);continue}let d=Math.max(t,r.rawStart),a=Math.min(o,r.rawEnd);d<a&&(l+=r.text.slice(d-r.rawStart,a-r.rawStart));}return l},resultRunAddressAt(t){let o=n.find(r=>r.resultRuns!==void 0&&t>=r.projectedStart&&t<r.projectedEnd);if(!o?.resultRuns)return null;let l=t-o.projectedStart;for(let r of o.resultRuns)if(l>=r.start&&l<r.end)return {runId:r.runId,offset:l-r.start};return null},findOccurrences(t,o,l={}){let r=[];if(o<=0||!chunk2YH4MSHX_cjs.Ra(t)||s.length===0)return {matches:r,truncated:false};let d=l.matchCase===true,a=l.wholeWord===true,i=d?t:chunk2YH4MSHX_cjs.Pa(t),u=d?s:chunk2YH4MSHX_cjs.Pa(s),c=Math.min(s.length,l.to??s.length),f=new Set,p=u.indexOf(i,Math.max(0,l.from??0));for(;p>=0;){let g=p+i.length;if(g>c)return {matches:r,truncated:false};if(!a||chunk2YH4MSHX_cjs.Qa(s,p,g)){let x=n.find(b=>p>=b.projectedStart&&p<b.projectedEnd),R=n.find(b=>g>b.projectedStart&&g<=b.projectedEnd);if(!x||!R)return {matches:r,truncated:false};let m=x===R&&x.expansion?x:null;if(!m||!f.has(m)){if(r.length>=o)return {matches:r,truncated:true};r.push({start:p,length:i.length,rawStart:G(x,p),rawEnd:Q(R,g)}),m&&f.add(m);}}p=u.indexOf(i,g);}return {matches:r,truncated:false}}}}function q(e){return e.length===0?B([]):B([{text:e,rawStart:0,rawEnd:e.length}])}function ee(e,n,s="allMarkup"){if(!n.includes(chunk24APKZAN_cjs.Jc))return n.length===0?[]:[{text:n,rawStart:0,rawEnd:n.length}];let t=chunk24APKZAN_cjs.cd(e),o=chunk24APKZAN_cjs.Oe(e,t),l=U(e,t,s),r=new Map;for(let i of t)r.set(i.node.id,i);let d=[],a=0;for(let i of o){let u=r.get(i.node.id);if(!u)continue;a<i.start&&d.push({text:n.slice(a,i.start),rawStart:a,rawEnd:i.start});let c=l.get(u.node.id);u.kind==="simple"&&c?d.push({text:c.text,rawStart:i.start,rawEnd:i.end,resultRuns:c.runs}):d.push({text:c?.text??chunk24APKZAN_cjs.Jc,rawStart:i.start,rawEnd:i.end}),a=i.end;}return a<n.length&&d.push({text:n.slice(a),rawStart:a,rawEnd:n.length}),d}function le(e,n,s="allMarkup"){return n.includes(chunk24APKZAN_cjs.Jc)?B(ee(e,n,s)):q(n)}exports.a=B;exports.b=q;exports.c=ee;exports.d=le;
1
+ 'use strict';var chunk67U2OZS7_cjs=require('./chunk-67U2OZS7.cjs'),chunkGHNTGVKG_cjs=require('./chunk-GHNTGVKG.cjs');var _=4096,L=chunkGHNTGVKG_cjs.ne*16;function I(){return {out:[],runs:[],length:0}}function D(e,n,s,t){if(n.length===0||s===t)return;let o=e.runs[e.runs.length-1];if(o?.runId===n&&o.end===s){e.runs[e.runs.length-1]={runId:n,start:o.start,end:t};return}e.runs.push({runId:n,start:s,end:t});}function M(e,n,s,t){if(n.length>t.left)return false;if(t.left-=n.length,n.length>0){let o=e.length;e.out.push(n),e.length+=n.length,D(e,s,o,e.length);}return true}function v(e,n){let s=e.length;n.text.length>0&&e.out.push(n.text),e.length+=n.text.length;for(let t of n.runs)D(e,t.runId,s+t.start,s+t.end);}function O(e){return {text:e.out.join(""),runs:e.runs}}function j(){return {text:chunkGHNTGVKG_cjs.Xd,runs:[]}}function W(e){for(let n of e)if(!n.separated)return false;return true}function H(e,n=0,s=e.length,t){let o=new Set,l=new Map,r=new Map,d=t?[t]:[];t&&o.add(t);for(let a=n;a<s;a+=1){let i=e[a].node;if(chunkGHNTGVKG_cjs.ae(i,"begin")){d.push(i.id);continue}if(chunkGHNTGVKG_cjs.ae(i,"separate")){let u=d[d.length-1];u&&(o.add(u),l.set(i.id,u));continue}if(chunkGHNTGVKG_cjs.ae(i,"end")){let u=d.pop();u&&(o.add(u),r.set(i.id,u));}}return {activeBegins:o,separateBegin:l,endBegin:r}}function z(e,n,s){if(chunkGHNTGVKG_cjs.ae(s,"begin"))return n.activeBegins.has(s.id)&&e.push({beginId:s.id,separated:false}),true;if(chunkGHNTGVKG_cjs.ae(s,"separate")){let t=n.separateBegin.get(s.id),o=e[e.length-1];return t&&o?.beginId===t&&(o.separated=true),true}if(chunkGHNTGVKG_cjs.ae(s,"end")){let t=n.endBegin.get(s.id),o=e[e.length-1];return t&&o?.beginId===t&&e.pop(),true}return false}function J(e,n,s,t){let o=[];if(!chunkGHNTGVKG_cjs.me(e,o,s))return null;let l=o.reverse(),r=I();for(;l.length>0;){let d=l.pop();if(n==="original"&&d.hiddenInOriginal)continue;if(chunkGHNTGVKG_cjs.de(d.node)){let i=[];if(!chunkGHNTGVKG_cjs.me(d.node,i,s))return null;for(let u=i.length-1;u>=0;u-=1)l.push(i[u]);continue}if(chunkGHNTGVKG_cjs.be(d.node))continue;let a=chunkGHNTGVKG_cjs.le(d.node);if(!M(r,a,d.runId,t))return null}return O(r)}function K(e,n,s,t,o){let l=I(),r=[],d=H(e);for(let a of e){let i=a.node;if(z(r,d,i)||chunkGHNTGVKG_cjs.be(i)||!W(r)||n==="original"&&a.hiddenInOriginal)continue;if(chunkGHNTGVKG_cjs.de(i)){let c=o>=chunkGHNTGVKG_cjs.oe?J(i,n,s,t):X(i,n,s,t,o+1);if(c===null)return null;v(l,c);continue}let u=chunkGHNTGVKG_cjs.le(i);if(!M(l,u,a.runId,t))return null}return O(l)}function X(e,n,s,t,o){let l=[];return chunkGHNTGVKG_cjs.me(e,l,s)?K(l,n,s,t,o):null}function Y(e,n,s){let t=n.node;if(e.owned.has(t.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),chunkGHNTGVKG_cjs.ae(t,"begin"))return t.id!==e.span.node.id&&e.markers.activeBegins.has(t.id)&&e.states.push({beginId:t.id,separated:false}),false;if(chunkGHNTGVKG_cjs.ae(t,"separate")){let l=e.markers.separateBegin.get(t.id),r=e.states[e.states.length-1];return l&&r?.beginId===l&&(r.separated=true),false}if(chunkGHNTGVKG_cjs.ae(t,"end")){if(t.id===e.endId)return true;let l=e.markers.endBegin.get(t.id),r=e.states[e.states.length-1];return l&&r?.beginId===l&&e.states.pop(),false}if(e.overflow||chunkGHNTGVKG_cjs.be(t)||chunkGHNTGVKG_cjs.de(t)||!e.owned.has(t.id)||!W(e.states)||s==="original"&&n.hiddenInOriginal)return false;let o=chunkGHNTGVKG_cjs.le(t);return M(e.result,o,n.runId,e.chars)||(e.overflow=true),false}function U(e,n,s="allMarkup"){let t=new Map,o=new Map,l=new Map;for(let i of n)i.kind==="complex"?o.set(i.node.id,i):l.set(i.node.id,i);let r=[];chunkGHNTGVKG_cjs.me(e,r);let d=new Map;for(let i=0;i<r.length;i+=1)d.set(r[i].node.id,i);let a=null;for(let i=0;i<r.length;i+=1){let u=r[i],c=l.get(u.node.id);if(c){let f={left:_},p={left:L},g=X(c.node,s,f,p,0);t.set(c.node.id,g??j());}if(a===null){let f=o.get(u.node.id);if(!f)continue;let p=new Set(f.removeNodeIds),g=-1;for(let R=f.removeNodeIds.length-1;R>=0;R-=1){let m=d.get(f.removeNodeIds[R]);if(!(m===void 0||m<=i)&&chunkGHNTGVKG_cjs.ae(r[m].node,"end")){g=m;break}}let x=r[g];if(!x){t.set(f.node.id,j());continue}a={span:f,owned:p,states:[{beginId:f.node.id,separated:false}],markers:H(r,i+1,g,f.node.id),endId:x.node.id,result:I(),chars:{left:L},nodesLeft:_,overflow:false};}Y(a,u,s)&&(t.set(a.span.node.id,a.overflow?j():O(a.result)),a=null);}return a!==null&&t.set(a.span.node.id,j()),t}function Z(e){let n=[],s=0;for(let t of e){let o=s+t.text.length;t.resultRuns?n.push({text:t.text,rawStart:t.rawStart,rawEnd:t.rawEnd,resultRuns:t.resultRuns,projectedStart:s,projectedEnd:o,expansion:t.text.length!==t.rawEnd-t.rawStart}):n.push({text:t.text,rawStart:t.rawStart,rawEnd:t.rawEnd,projectedStart:s,projectedEnd:o,expansion:t.text.length!==t.rawEnd-t.rawStart}),s=o;}return n}function $(e,n){return n<=e.rawStart?e.projectedStart:n>=e.rawEnd?e.projectedEnd:e.expansion?e.projectedStart:e.projectedStart+n-e.rawStart}function G(e,n){return e.expansion?e.rawStart:e.rawStart+n-e.projectedStart}function Q(e,n){return e.expansion?e.rawEnd:e.rawStart+n-e.projectedStart}function B(e){let n=Z(e),s="";for(let t of e)s+=t.text;return {text:s,projectedOffset(t){let o=0;for(let l of n){if(t<=l.rawEnd)return $(l,t);o=l.projectedEnd;}return o},rawRange(t,o){if(t<0||t>=o||o>s.length)return null;let l=n.find(d=>t>=d.projectedStart&&t<d.projectedEnd),r=n.find(d=>o>d.projectedStart&&o<=d.projectedEnd);return !l||!r?null:{start:G(l,t),end:Q(r,o)}},sliceRaw(t,o){if(t>=o)return "";let l="";for(let r of n){if(r.expansion){t<=r.rawStart&&o>=r.rawEnd&&(l+=r.text);continue}let d=Math.max(t,r.rawStart),a=Math.min(o,r.rawEnd);d<a&&(l+=r.text.slice(d-r.rawStart,a-r.rawStart));}return l},resultRunAddressAt(t){let o=n.find(r=>r.resultRuns!==void 0&&t>=r.projectedStart&&t<r.projectedEnd);if(!o?.resultRuns)return null;let l=t-o.projectedStart;for(let r of o.resultRuns)if(l>=r.start&&l<r.end)return {runId:r.runId,offset:l-r.start};return null},findOccurrences(t,o,l={}){let r=[];if(o<=0||!chunk67U2OZS7_cjs.Ra(t)||s.length===0)return {matches:r,truncated:false};let d=l.matchCase===true,a=l.wholeWord===true,i=d?t:chunk67U2OZS7_cjs.Pa(t),u=d?s:chunk67U2OZS7_cjs.Pa(s),c=Math.min(s.length,l.to??s.length),f=new Set,p=u.indexOf(i,Math.max(0,l.from??0));for(;p>=0;){let g=p+i.length;if(g>c)return {matches:r,truncated:false};if(!a||chunk67U2OZS7_cjs.Qa(s,p,g)){let x=n.find(b=>p>=b.projectedStart&&p<b.projectedEnd),R=n.find(b=>g>b.projectedStart&&g<=b.projectedEnd);if(!x||!R)return {matches:r,truncated:false};let m=x===R&&x.expansion?x:null;if(!m||!f.has(m)){if(r.length>=o)return {matches:r,truncated:true};r.push({start:p,length:i.length,rawStart:G(x,p),rawEnd:Q(R,g)}),m&&f.add(m);}}p=u.indexOf(i,g);}return {matches:r,truncated:false}}}}function q(e){return e.length===0?B([]):B([{text:e,rawStart:0,rawEnd:e.length}])}function ee(e,n,s="allMarkup"){if(!n.includes(chunkGHNTGVKG_cjs.Xd))return n.length===0?[]:[{text:n,rawStart:0,rawEnd:n.length}];let t=chunkGHNTGVKG_cjs.qe(e),o=chunkGHNTGVKG_cjs.Le(e,t),l=U(e,t,s),r=new Map;for(let i of t)r.set(i.node.id,i);let d=[],a=0;for(let i of o){let u=r.get(i.node.id);if(!u)continue;a<i.start&&d.push({text:n.slice(a,i.start),rawStart:a,rawEnd:i.start});let c=l.get(u.node.id);u.kind==="simple"&&c?d.push({text:c.text,rawStart:i.start,rawEnd:i.end,resultRuns:c.runs}):d.push({text:c?.text??chunkGHNTGVKG_cjs.Xd,rawStart:i.start,rawEnd:i.end}),a=i.end;}return a<n.length&&d.push({text:n.slice(a),rawStart:a,rawEnd:n.length}),d}function le(e,n,s="allMarkup"){return n.includes(chunkGHNTGVKG_cjs.Xd)?B(ee(e,n,s)):q(n)}exports.a=B;exports.b=q;exports.c=ee;exports.d=le;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkEWV5JMJY_cjs=require('./chunk-EWV5JMJY.cjs');var $=8,Se={color:"painted",background:"painted",spanClassName:"painted",avatarUrl:"card-only"},Re=Object.keys(Se),gt=Re.filter(t=>Se[t]==="painted"),xt=new Set(["http","https","data","blob"]),bt=/^([a-zA-Z][a-zA-Z0-9+.-]*):/;function mt(t){let e=t.replace(/[\u0000-\u0020\u007f]/g,"");if(e.length===0)return;let n=bt.exec(e);if(n)return !xt.has(n[1].toLowerCase())||/^data:/i.test(e)&&!/^data:image\/(?!svg)/i.test(e)?void 0:e;let o=i=>e[i]==="/"||e[i]==="\\";return o(0)&&o(1)?void 0:e}function vt(t){if(typeof t=="string")return t.length>0?{color:t}:null;if(t===null||typeof t!="object")return null;let e={},n=Object.prototype.hasOwnProperty;for(let o of Re){if(!n.call(t,o))continue;let i=t[o];if(!(typeof i!="string"||i.length===0)){if(o==="avatarUrl"){let r=mt(i);r!==void 0&&(e.avatarUrl=r);continue}e[o]=i;}}return Object.keys(e).length>0?e:null}function U(t){return `var(--doc-review-author-${t%$})`}function we(t){let e=new Map;if(t===void 0||t==="kind"||t==="author")return e;for(let[n,o]of Object.entries(t.authors)){let i=vt(o);i&&e.set(n,i);}return e}function On(t,e){let n=we(e);return [...t].map(([o,i])=>{let r=n.get(o);return {author:o,slot:i,color:r?.color??U(i),...r?{style:r}:{}}})}var St=128;function z(t,e,n=St){let o=e.length<n?e.length:n,i=t;for(let r=0;r<o;r+=1)i=Math.imul(i^e.charCodeAt(r),16777619);return Math.imul(i^e.length,16777619)}function Rt(t,e,n){let o=z(2166136261,n);for(let i of t.keys())o=z(o,i);for(let[i,r]of e){o=z(o,i);for(let a of gt)o=z(o,r[a]??"",1/0);}return `${t.size}.${e.size}.${(o>>>0).toString(36)}`}function ke(t){return t===null?"kind":t.key}var X=new WeakMap;function Ae(t,e,n){if(t==="kind")return null;let o=X.get(e);if(o&&o.option===t&&o.authorSlots===n)return o.context;let i=we(t),r=t===void 0||t==="author"?"author":t.others??"author";if(i.size===0&&r==="kind")return X.set(e,{option:t,authorSlots:n,context:null}),null;let a=n??kt(e),s=new Map;for(let[d,c]of i){if(!c.spanClassName)continue;let y=c.spanClassName.split(/\s+/).filter(u=>u.length>0);y.length>0&&s.set(d,y);}let l={authorSlots:a,styles:i,classTokens:s,others:r,key:Rt(a,i,r)};return X.set(e,{option:t,authorSlots:n,context:l}),l}var me=new WeakMap;function wt(t){let e=me.get(t);if(e)return e;let n=[],o=new Set,i=r=>{r===""||o.has(r)||(o.add(r),n.push(r));};for(let r of chunkEWV5JMJY_cjs.Aa(t)){for(let s of r.lines)for(let l of s.spans){let d=l.revisions;if(d!==void 0)for(let c=0;c<d.length;c+=1)i(d[c].author);for(let c of l.props){if(c.localName!=="rPrChange"&&c.localName!=="pPrChange")continue;let y=c.attributes?.author;i(y??"");break}}for(let s of r.lines){let l=s.drawings;if(l!==void 0)for(let d=0;d<l.length;d+=1){let c=l[d].revisions;if(c!==void 0)for(let y=0;y<c.length;y+=1)i(c[y].author);}}let a=r.markRevisions;if(a)for(let s=0;s<a.length;s+=1)i(a[s].author);}return me.set(t,n),n}var ve=new WeakMap;function kt(t){let e=ve.get(t);if(e)return e;let n=new Map,o=i=>{for(let r of wt(i))n.has(r)||n.set(r,n.size);};for(let i of t.pages){o(i.fragments),i.header&&o(i.header.fragments),i.footer&&o(i.footer.fragments);for(let r of [i.footnotes,i.endnotes])if(r){r.separator&&o(r.separator.fragments);for(let a of r.notes)o(a.fragments);}for(let r of [i.anchoredDrawings,i.header?.anchoredDrawings,i.footer?.anchoredDrawings])if(r)for(let a of r){let s=a.revisions;if(s!==void 0)for(let l=0;l<s.length;l+=1){let d=s[l].author;d!==""&&!n.has(d)&&n.set(d,n.size);}a.textboxStory&&o(a.textboxStory.fragments);}}return ve.set(t,n),n}function At(t,e){let n=null;for(let o of e)o===""||t.has(o)||(n===null&&(n=new Map(t)),n.has(o)||n.set(o,n.size));return n??t}function Kn(){let t=new Map,e=0;return {resolve(n,o){let i=At(n,o);for(let r of i.keys())t.has(r)||(t.set(r,e),e+=1);return new Map([...i.keys()].map(r=>[r,t.get(r)]).sort((r,a)=>r[1]-a[1]))}}}function _(t,e,n){if(t===void 0||t.length===0)return null;let o=t[t.length-1],i=t.some(s=>s.kind==="delete"||s.kind==="moveFrom"),r=o.kind,a=r==="delete"||r==="moveFrom"?"line-through":r==="insert"||r==="moveTo"?"underline":null;return {attribution:o,line:i&&a==="underline"?"line-through":a,decorationStyle:r==="moveFrom"||r==="moveTo"?"double":r==="insert"?"dashed":"solid",color:i?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",authorColor:n?.get(o.author)?.color??U(e?.get(o.author)??0),deleted:i}}function Ee(t,e,n,o,i,r){for(let a of [n.footnotes,n.endnotes])a&&e.append(Et(t,n,a,o,i,r));}function Et(t,e,n,o,i,r){let a=t.createElement("div");if(a.className="docx-notes",a.dataset.docxNotes=n.kind,a.dataset.docxNotesPlacement=n.placement,a.style.position="absolute",a.style.left=`${(n.box.x-e.box.x)*o.scale}px`,a.style.top=`${(n.box.y-e.box.y)*o.scale}px`,a.style.width=`${n.box.width*o.scale}px`,a.style.height=`${n.box.height*o.scale}px`,n.separator){let s=t.createElement("div");s.className="docx-note-separator",s.dataset.docxNoteSeparator=n.separator.kind,s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left=`${(n.separator.box.x-n.box.x)*o.scale}px`,s.style.top=`${(n.separator.box.y-n.box.y)*o.scale}px`,s.style.width=`${n.separator.box.width*o.scale}px`,s.style.height=`${Math.max(n.separator.box.height,.75)*o.scale}px`;let l=n.separator.ruleStyle;if(l||n.separator.synthetic||n.separator.fragments.length===0)Lt(s,t,l??"single",o.scale);else for(let d of n.separator.fragments)s.append(d.kind==="table"?r(t,d,o):i(t,d,o));a.append(s);}for(let s of n.notes){let l=t.createElement("div");l.className="docx-note",l.dataset.docxNote=s.noteKind,l.dataset.docxNoteId=String(s.noteId),l.dataset.docxNoteScope=s.scopeId,s.mark!==null&&(l.dataset.docxNoteMark=s.mark),s.continuation&&(l.dataset.docxNoteContinuation=""),l.setAttribute("role","doc-footnote"),l.style.position="absolute",l.style.left=`${(s.box.x-n.box.x)*o.scale}px`,l.style.top=`${(s.box.y-n.box.y)*o.scale}px`,l.style.width=`${s.box.width*o.scale}px`,l.style.height=`${s.box.height*o.scale}px`;for(let d of s.fragments)l.append(d.kind==="table"?r(t,d,o):i(t,d,o));a.append(l);}return a}function Lt(t,e,n,o){t.dataset.docxNoteRule=n;let i=Math.max(1,o*.75);if(n==="single"){t.style.borderTop=`${i}px solid currentColor`,t.style.opacity="0.85";return}t.style.opacity="0.85";let r=Math.max(1,o*1.25);for(let a of [0,i+r]){let s=e.createElement("div");s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top=`${a}px`,s.style.height="0",s.style.borderTop=`${i}px solid currentColor`,t.append(s);}}function j(t,e,n){return !!n.activeHeaderFooterRId&&!!t.rId&&n.activeHeaderFooterRId===t.rId&&(n.activeHeaderFooterPageIndex===void 0||n.activeHeaderFooterPageIndex===e)}function Y(t,e,n){return n?t.kind==="footer"?Math.max(t.box.height,e.box.y+e.box.height-t.box.y):Math.max(t.box.height,e.contentBox.y-t.box.y):t.box.height}function Le(t,e){for(let{record:n,element:o,materialized:i}of t){if(!i)continue;let r=o.querySelector(":scope > .docx-page-content");r&&(e.activeHeaderFooterRId?r.setAttribute("contenteditable","false"):r.removeAttribute("contenteditable"));for(let a of o.querySelectorAll(":scope > .docx-hf:not(.docx-hf--placeholder)")){let s=Pt(n,a);if(!s)continue;let l=j(s,n.index,e);$t(a,n,s,l,e.scale);}for(let a of o.querySelectorAll(":scope > [data-docx-hf-front]")){let s=Pe(n,a.dataset.docxHfFront);$e(a,!!s&&j(s,n.index,e));}}}function Pt(t,e){return Pe(t,e.dataset.docxHf)}function Pe(t,e){if(e==="header")return t.header;if(e==="footer")return t.footer}function $t(t,e,n,o,i){o?(t.dataset.docxHfActive="",t.setAttribute("contenteditable","true")):(delete t.dataset.docxHfActive,t.setAttribute("contenteditable","false")),t.style.height=`${Y(n,e,o)*i}px`,$e(t,o);}function $e(t,e){let n=t.querySelectorAll(t instanceof Element&&t.classList.contains("docx-drawing-layer")?":scope > *":":scope > .docx-drawing-layer > *");for(let o of n){o.style.pointerEvents=e?"auto":"none";for(let i of o.querySelectorAll(".docx-drawing"))i.style.pointerEvents=e?"auto":"none";}}var Tt=0;function Te(t,e,n,o){if(o===void 0||!Number.isFinite(o)||o<0||o>1)return;let i="http://www.w3.org/2000/svg",r=(y,u)=>{let h=t.createElementNS(i,y);for(let[p,f]of Object.entries(u))h.setAttribute(p,f);return h},a=`docx-bilevel-${++Tt}`,s=r("svg",{width:"0",height:"0","aria-hidden":"true"});s.style.position="absolute",s.style.pointerEvents="none";let l=r("filter",{id:a,"color-interpolation-filters":"sRGB"});l.append(r("feColorMatrix",{type:"saturate",values:"0"}));let d=r("feComponentTransfer",{}),c=Array.from({length:256},(y,u)=>u/255>=o?1:0).join(" ");for(let y of ["R","G","B"])d.append(r(`feFunc${y}`,{type:"discrete",tableValues:c}));l.append(d),s.append(l),e.append(s),n.style.filter=`${n.style.filter} url(#${a})`.trim();}var Dt=new Map([["image/svg+xml","SVG"],["image/tiff","TIFF"],["image/x-emf","EMF"],["image/x-wmf","WMF"]]),Mt="Unknown",G=new WeakMap,J=new WeakMap,Ht=256;function He(t,e){let n=G.get(t);if(n)return n;let o=new Map,i=new Map;return n=Object.freeze({urlForReady(r,a){let s=o.get(r.resourceKey);if(s)return s;let l;try{l=e.create(r,a);}catch(d){if(d instanceof Error&&d.message.startsWith("PaintImageUrlSource:"))return null;throw d}return o.set(r.resourceKey,l),l},imageFor(r,a,s){let l=i.get(r);if(l&&l.resourceKey===a)return l.element;let d=s.createElement("img");return i.size<Ht&&i.set(r,{element:d,resourceKey:a,...l?.readyElement?{readyElement:l.readyElement}:{}}),d},imageForPending(r){return i.get(r)?.element??null},readyElementFor(r){return i.get(r)?.readyElement??null},rememberReadyElement(r,a){let s=i.get(r);s&&i.set(r,{...s,readyElement:a});},reconcile(r,a){for(let[s,l]of o)r.has(s)||(e.revoke(l),o.delete(s));for(let[s,l]of i)a.has(s)||(l.element.removeAttribute("src"),i.delete(s));},revokeAll(){for(let r of o.values())e.revoke(r);o.clear();for(let r of i.values())r.element.removeAttribute("src");i.clear();}}),G.set(t,n),n}function Q(t,e){return `${e.paintInstance??""}|${t.drawingNodeId}`}function Yn(t){G.get(t)?.revokeAll(),G.delete(t);}function w(t){return Number.isFinite(t)?String(t):"0"}function Ie(t,e){if(t.length<3||e.width<=0||e.height<=0)return null;let n=[];for(let o of t){if(!Number.isFinite(o.x)||!Number.isFinite(o.y))return null;let i=(o.x-e.x)/e.width*100,r=(o.y-e.y)/e.height*100;n.push(`${w(i)}% ${w(r)}%`);}return `polygon(${n.join(", ")})`}function Ce(t){let e=t.geometry.contentBounds;return chunkEWV5JMJY_cjs.tc({transform:t.transform,contentWidth:e.width,contentHeight:e.height})}function Fe(t){let{effects:e}=t,n=[];if(e.grayscale&&n.push("grayscale(1)"),e.brightness!==0&&Number.isFinite(e.brightness)){let o=1+e.brightness/100;Number.isFinite(o)&&n.push(`brightness(${w(Math.max(0,o))})`);}if(e.contrast!==0&&Number.isFinite(e.contrast)){let o=1+e.contrast/100;Number.isFinite(o)&&n.push(`contrast(${w(Math.max(0,o))})`);}return n.length>0?n.join(" "):void 0}function Be(t,e){let{crop:n}=t,o=Math.max(0,Math.min(1,n.left)),i=Math.max(0,Math.min(1,n.top)),r=Math.max(0,Math.min(1,n.right)),a=Math.max(0,Math.min(1,n.bottom)),s=Math.max(1e-4,1-o-r),l=Math.max(1e-4,1-i-a);return Object.freeze({width:`${w(1/s*100)}%`,height:`${w(1/l*100)}%`,left:`${w(-o/s*100)}%`,top:`${w(-i/l*100)}%`})}function It(t,e){let{resource:n}=t;switch(n.kind){case "external":return e.externalResource;case "missing":return e.missingResource;case "pending":return e.pendingResource;case "unrenderable":switch(n.reason){case "unsupported-format":return e.unsupportedFormat(Dt.get(n.mime)??Mt);case "non-picture-graphic":return e.nonPictureGraphic(t.placeholderGraphicKind??"graphic");case "signature-mismatch":return e.contentMismatch;case "decode-failed":return e.decodeFailed;case "resource-limit":return e.resourceLimit;default:return e.invalidResource}default:return e.invalidResource}}function M(t,e,n){let{accessibility:o}=e;o.hidden||(t.setAttribute("role",n?"link":"img"),o.label?t.setAttribute("aria-label",o.label):n||t.setAttribute("aria-hidden","true"));}function N(t,e,n,o){let i=o?.x??0,r=o?.y??0;t.style.position="absolute",t.style.left=`${(e.x-i)*n}px`,t.style.top=`${(e.y-r)*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`,t.style.boxSizing="border-box",t.style.overflow="hidden",t.style.pointerEvents="auto";}function Ct(t,e,n,o,i){let r=t.paintBounds,a=t.geometry.contentBounds,s=Be(t);return [o,n.scale,i?.x??0,i?.y??0,r.x,r.y,r.width,r.height,a.x,a.y,a.width,a.height,Ie(t.geometry.clipPolygon??[],r)??"",Fe(t)??"",t.effects.bilevel??"",Ce(t)??"",s.width,s.height,s.left,s.top,n.inertLinks?"":t.hyperlinkHref??"",t.accessibility.label??""].join("|")}function B(t,e,n,o){let i=t.createElement("div");i.className="docx-drawing docx-drawing-placeholder",i.dataset.drawingNodeId=e.drawingNodeId,N(i,e.paintBounds,n.scale,o);let r=t.createElement("div");r.className="docx-drawing-placeholder-card";let a=t.createElement("span");return a.className="docx-drawing-placeholder-label",a.textContent=It(e,n.strings),r.append(a),i.append(r),e.hyperlinkHref&&!n.inertLinks?(i.dataset.docxDrawingLink=e.drawingNodeId,i.dataset.docxDrawingLinkKind="external",i.dataset.docxDrawingLinkHref=e.hyperlinkHref,i.setAttribute("tabindex","-1"),M(i,e,true)):M(i,e,false),i}function Ft(t,e,n,o,i,r){let a=e.resource;if(a.kind!=="ready")return B(t,e,n,r);let s=Q(e,n),l=i?.readyElementFor?.(s)??t.createElement("div"),d=Ct(e,a,n,o,r);if(J.get(l)===d)return l;l.className="docx-drawing docx-drawing-ready",l.style.cssText="",l.dataset.drawingNodeId=e.drawingNodeId,delete l.dataset.docxDrawingLink,delete l.dataset.docxDrawingLinkKind,delete l.dataset.docxDrawingLinkHref,l.removeAttribute("aria-hidden"),l.removeAttribute("aria-label"),l.removeAttribute("role"),l.removeAttribute("tabindex"),N(l,e.paintBounds,n.scale,r);let c=Ie(e.geometry.clipPolygon??[],e.paintBounds);c&&(l.style.clipPath=c);let y=t.createElement("div");y.className="docx-drawing-image-frame",y.style.position="absolute";let u=e.geometry.contentBounds,h=e.paintBounds;y.style.left=`${(u.x-h.x)*n.scale}px`,y.style.top=`${(u.y-h.y)*n.scale}px`,y.style.width=`${u.width*n.scale}px`,y.style.height=`${u.height*n.scale}px`;let p=Fe(e);p&&(y.style.filter=p);let f=t.createElement("div");f.className="docx-drawing-transform-stage",f.style.position="relative",f.style.width="100%",f.style.height="100%";let k=Ce(e);k&&(f.style.transform=k,f.style.transformOrigin="0 0");let R=t.createElement("div");R.className="docx-drawing-crop-viewport",R.style.position="relative",R.style.width="100%",R.style.height="100%",R.style.overflow="hidden";let S=i?.imageFor?.(s,a.resourceKey,t)??t.createElement("img");S.className="docx-drawing-image",S.setAttribute("draggable","false"),S.getAttribute("src")!==o&&S.setAttribute("src",o),S.setAttribute("alt","");let L=Be(e);return S.style.position="absolute",S.style.width=L.width,S.style.height=L.height,S.style.left=L.left,S.style.top=L.top,S.style.maxWidth="none",S.style.maxHeight="none",R.append(S),f.append(R),y.append(f),l.replaceChildren(y),Te(t,l,y,e.effects.bilevel),e.hyperlinkHref&&!n.inertLinks?(l.dataset.docxDrawingLink=e.drawingNodeId,l.dataset.docxDrawingLinkKind="external",l.dataset.docxDrawingLinkHref=e.hyperlinkHref,l.setAttribute("tabindex","-1"),M(l,e,true)):M(l,e,false),i?.rememberReadyElement?.(s,l),J.set(l,d),l}var Z="http://www.w3.org/2000/svg";function Bt(t,e,n,o){let i=e.vectorShape,r=t.createElement("div");r.className="docx-drawing docx-drawing-shape",r.dataset.drawingNodeId=e.drawingNodeId,N(r,e.paintBounds,n.scale,o);let a=e.geometry.contentBounds,s=e.paintBounds,l=t.createElement("div");l.className="docx-drawing-image-frame",l.style.position="absolute",l.style.left=`${(a.x-s.x)*n.scale}px`,l.style.top=`${(a.y-s.y)*n.scale}px`,l.style.width=`${a.width*n.scale}px`,l.style.height=`${a.height*n.scale}px`;let d=t.createElementNS(Z,"svg");d.setAttribute("viewBox",`0 0 ${w(Math.max(1,i.extentEmu.cx))} ${w(Math.max(1,i.extentEmu.cy))}`),d.setAttribute("preserveAspectRatio","none"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.style.display="block",d.style.overflow="visible";for(let c of i.components){let y=t.createElementNS(Z,"path"),u=c.subpathsEmu.map((h,p)=>`M${h.map(f=>`${w(f.x)} ${w(f.y)}`).join("L")}${c.subpathsClosed?.[p]===false?"":"Z"}`).join("");if(y.setAttribute("d",u),y.setAttribute("fill",c.fillHex!==null?`#${c.fillHex}`:"none"),y.setAttribute("fill-rule","evenodd"),c.fillAlpha<1&&y.setAttribute("fill-opacity",w(Math.max(0,c.fillAlpha))),c.strokeHex!==null&&(y.setAttribute("stroke",`#${c.strokeHex}`),y.setAttribute("stroke-width",w(Math.max(1,c.strokeWidthEmu))),c.strokeAlpha<1&&y.setAttribute("stroke-opacity",w(Math.max(0,c.strokeAlpha)))),d.append(y),c.strokeHex!==null)for(let h of c.arrowheadsEmu??[]){let p=t.createElementNS(Z,"path");p.setAttribute("d",`M${h.map(f=>`${w(f.x)} ${w(f.y)}`).join("L")}Z`),p.setAttribute("fill",`#${c.strokeHex}`),p.setAttribute("fill-opacity",w(Math.max(0,Math.min(1,c.strokeAlpha)))),p.setAttribute("data-docx-line-end","triangle"),d.append(p);}}return l.append(d),r.append(l),e.hyperlinkHref&&!n.inertLinks?(r.dataset.docxDrawingLink=e.drawingNodeId,r.dataset.docxDrawingLinkKind="external",r.dataset.docxDrawingLinkHref=e.hyperlinkHref,r.setAttribute("tabindex","-1"),M(r,e,true)):M(r,e,false),r}function Nt(t,e,n,o,i){let r=o.scale,a=t.createElement("div");a.className="docx-drawing docx-drawing-textbox",a.dataset.drawingNodeId=e.drawingNodeId,a.setAttribute("contenteditable","false"),N(a,e.paintBounds,o.scale,i),a.style.overflow="hidden";let s=(e.x-e.paintBounds.x)*r,l=(e.y-e.paintBounds.y)*r;if(n.fillHex!==null||n.strokeHex!==null){let c=t.createElement("div");c.className="docx-drawing-textbox-box",c.style.position="absolute",c.style.left=`${s}px`,c.style.top=`${l}px`,c.style.width=`${e.width*r}px`,c.style.height=`${e.height*r}px`,c.style.boxSizing="border-box",n.fillHex!==null&&(c.style.backgroundColor=`#${n.fillHex}`),n.strokeHex!==null&&(c.style.border=`${Math.max(n.strokeWidthPt*r,.5)}px solid #${n.strokeHex}`),a.append(c);}let d=t.createElement("div");d.className="docx-drawing-textbox-content",d.style.position="absolute",d.style.left=`${s+n.contentOffset.x*r}px`,d.style.top=`${l+n.contentOffset.y*r}px`,d.style.width=`${n.contentWidth*r}px`,d.style.height=`${Math.max(0,n.contentHeight)*r}px`,d.style.overflow="hidden";for(let c of n.fragments)d.append(o.paintStoryFragment(t,c));for(let c of d.querySelectorAll("[data-paragraph-id]"))delete c.dataset.paragraphId;return a.append(d),M(a,e,false),a}function Ot(t,e,n){let o=n.revisionStyles,i=_(e.revisions,o?.authorSlots,o?.styles);if(!i){if(t.dataset.revisionKind===void 0)return;t.classList.remove("docx-drawing--revision","docx-drawing--revision-insertion","docx-drawing--revision-deletion"),delete t.dataset.revisionKind,delete t.dataset.revisionId,delete t.dataset.reviewAuthor,delete t.dataset.revisionDate,delete t.dataset.reviewAuthorSlot,t.style.outlineColor="";return}let{attribution:r}=i;t.classList.add("docx-drawing--revision",i.deleted?"docx-drawing--revision-deletion":"docx-drawing--revision-insertion"),t.classList.remove(i.deleted?"docx-drawing--revision-insertion":"docx-drawing--revision-deletion"),t.dataset.revisionKind=r.kind,t.dataset.revisionId=r.id,r.author!==""?t.dataset.reviewAuthor=r.author:delete t.dataset.reviewAuthor,r.date!==void 0?t.dataset.revisionDate=r.date:delete t.dataset.revisionDate;let a=o?.styles.get(r.author),s=o!==void 0&&(a?.color!==void 0||o.others==="author");o?t.dataset.reviewAuthorSlot=String((o.authorSlots.get(r.author)??0)%$):delete t.dataset.reviewAuthorSlot,t.style.outlineColor=s?i.authorColor:"";}function Ne(t,e,n,o,i){let r=Kt(t,e,n,o,i);return r&&Ot(r,e,n),r}function Kt(t,e,n,o,i){if(e.accessibility.hidden||e.paintBounds.width<=0||e.paintBounds.height<=0)return null;if(e.kind==="anchoredDrawing"&&e.textboxStory!==void 0&&n.paintStoryFragment!==void 0)return Nt(t,e,e.textboxStory,n,i);if(e.vectorShape&&e.vectorShape.subpathsEmu.length>0)return Bt(t,e,n,i);let{resource:r}=e;if(r.kind==="ready"){if(!n.imageUrlPort||!o)return B(t,e,n,i);let a=o.urlForReady(r.validatedHandle,r.mime);return a?Ft(t,e,n,a,o,i):B(t,e,n,i)}if(r.kind==="pending"){let a=o?.readyElementFor?.(Q(e,n))??o?.imageForPending?.(Q(e,n))?.closest(".docx-drawing-ready");return a?(J.delete(a),a.dataset.drawingNodeId=e.drawingNodeId,N(a,e.paintBounds,n.scale,i),a):B(t,e,n,i)}return B(t,e,n,i)}function Oe(t,e,n,o,i){let r=[];for(let a of e.drawings??[]){let s=Ne(t,a,n,o,i);s&&r.push(s);}return Object.freeze(r)}function Ke(t,e,n,o,i,r){let a=[];for(let s of e){if(chunkEWV5JMJY_cjs.uc(s)!==n)continue;let l=Ne(t,s,o,i,r);l&&(l.dataset.drawingLayer=n,a.push(l));}return Object.freeze(a)}function zt(t,e){chunkEWV5JMJY_cjs.Da(t,({host:n})=>chunkEWV5JMJY_cjs.Fa(n,e));}var De=new WeakMap;function Ut(t){let e=De.get(t);if(e)return e;let n=[],o=[];zt(t,r=>{r.resource.kind==="ready"&&n.push(r.resource.resourceKey),o.push(`p${t.index}|${r.drawingNodeId}`);});let i=Object.freeze({resourceKeys:Object.freeze(n),elementKeys:Object.freeze(o)});return De.set(t,i),i}var Me=new WeakMap;function ze(t){let e=Me.get(t);if(e)return e;let n=new Set,o=new Set;for(let r of t.pages){let a=Ut(r);for(let s of a.resourceKeys)n.add(s);for(let s of a.elementKeys)o.add(s);}let i=Object.freeze({resourceKeys:n,elementKeys:o});return Me.set(t,i),i}function Ue(t){return ze(t).resourceKeys}function _e(t){return ze(t).elementKeys}function je(t){return [t.missingResource,t.externalResource,t.invalidResource,t.contentMismatch,t.decodeFailed,t.resourceLimit,t.pendingResource,t.unsupportedFormat("probe"),t.nonPictureGraphic("probe")].join("\0")}var ee=Object.freeze({unsupportedFormat:t=>`Unsupported image format (${t})`,nonPictureGraphic:t=>`Unsupported graphic (${t})`,missingResource:"Image missing",externalResource:"External image not loaded",invalidResource:"Invalid image",contentMismatch:"Image content does not match its type",decodeFailed:"Image could not be decoded",resourceLimit:"Image exceeds size limits",pendingResource:"Loading image"});function Zn(t){return Object.freeze({unsupportedFormat:e=>t("image.unsupportedFormat",{format:e}),nonPictureGraphic:e=>t("image.nonPictureGraphic",{kind:e}),missingResource:t("image.missingResource"),externalResource:t("image.externalResource"),invalidResource:t("image.invalidResource"),contentMismatch:t("image.contentMismatch"),decodeFailed:t("image.decodeFailed"),resourceLimit:t("image.resourceLimit"),pendingResource:t("image.pendingResource")})}function _t(t,e,n){t.style.position="absolute",t.style.left=`${e.x*n}px`,t.style.top=`${e.y*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`;}function Ge(t,e,n,o){let i=t.createElement("span");return i.className=e,i.setAttribute("aria-hidden","true"),i.style.position="absolute",i.style.display="block",i.style.left=`${n.x*o}px`,i.style.top=`${n.y*o}px`,i.style.width=`${n.width*o}px`,i.style.height=`${n.height*o}px`,i.style.backgroundColor="currentColor",i.style.pointerEvents="none",i}function E(t,e,n,o,i=0,r=0,a=[]){let s=i+n.box.x,l=r+n.box.y,d=[...a,n.kind];switch(n.kind){case "text":case "fallback":{let c=t.createElement("span");c.className=["docx-equation-node",...d.map(y=>`docx-equation-${y}`)].join(" "),_t(c,{x:s,y:l,width:n.box.width,height:n.box.height},o),c.textContent=n.text,c.style.display="block",c.style.fontSize=`${n.fontSizePt*o}px`,c.style.lineHeight=`${n.box.height*o}px`,c.style.whiteSpace="pre",e.append(c);break}case "row":for(let c of n.items)E(t,e,c,o,s,l,d);break;case "fraction":E(t,e,n.numerator,o,s,l,d),e.append(Ge(t,"docx-equation-fraction-bar",{...n.bar,x:s+n.bar.x,y:l+n.bar.y},o)),E(t,e,n.denominator,o,s,l,d);break;case "radical":E(t,e,n.sign,o,s,l,d),n.degree&&E(t,e,n.degree,o,s,l,d),e.append(Ge(t,"docx-equation-radical-bar",{...n.bar,x:s+n.bar.x,y:l+n.bar.y},o)),E(t,e,n.radicand,o,s,l,d);break;case "script":E(t,e,n.base,o,s,l,d),n.subscript&&E(t,e,n.subscript,o,s,l,d),n.superscript&&E(t,e,n.superscript,o,s,l,d);break;case "nary":E(t,e,n.operator,o,s,l,d),n.lowerLimit&&E(t,e,n.lowerLimit,o,s,l,d),n.upperLimit&&E(t,e,n.upperLimit,o,s,l,d),E(t,e,n.body,o,s,l,d);break}}function We(t,e,n,o){let i=n.geometry;e.className="layout-run docx-equation",e.dataset.docxEquation=n.sourceNodeId,e.setAttribute("contenteditable","false"),e.setAttribute("role","math"),n.fallbackText&&e.setAttribute("aria-label",n.fallbackText),e.style.position="relative",e.style.display="inline-block",e.style.width=`${i.box.width*o}px`,e.style.height=`${i.box.height*o}px`,e.style.lineHeight="0",e.style.pointerEvents="auto",e.style.userSelect="none",e.style.verticalAlign=`${-(i.box.height-i.baseline)*o}px`;let r=t.createDocumentFragment();E(t,r,i,o),e.append(r);}function qe(t,e,n,o){let i=n.lineEndWhitespace===true;if((n.style.horizontalScalePercent!==100||n.text===" "||i)&&(e.style.width=`${n.box.width*o}px`),!i||(e.style.clipPath="inset(-1em 0)",n.style.horizontalScalePercent===100))return e;let r=t.createElement("span");return r.dataset.docxClippedFill="",r.style.display="inline-block",r.style.transform=e.style.transform,r.style.transformOrigin=e.style.transformOrigin,r.style.textDecorationLine=e.style.textDecorationLine,r.style.textDecorationStyle=e.style.textDecorationStyle,r.style.textDecorationColor=e.style.textDecorationColor,r.style.textDecorationThickness=e.style.textDecorationThickness,e.style.removeProperty("transform"),e.style.removeProperty("transform-origin"),e.style.removeProperty("text-decoration-line"),e.style.removeProperty("text-decoration-style"),e.style.removeProperty("text-decoration-color"),e.style.removeProperty("text-decoration-thickness"),e.append(r),r}function Ve(t,e,n){let o=e.textOutline;if(!o||!Number.isFinite(n)||n<=0||!Number.isFinite(o.widthPt)||o.widthPt<=0||o.widthPt>1584||!/^[0-9a-f]{6}$/i.test(o.color))return;let i=o.widthPt*n;Number.isFinite(i)&&(t.setProperty("-webkit-text-stroke-width",`${i}px`),t.setProperty("-webkit-text-stroke-color",`#${o.color}`));}var jt=/^[0-9A-Fa-f]{6}$/;function Gt(t){switch(t){case "dashed":return "dashed";case "dotted":return "dotted";case "double":case "triple":return "solid";default:return "solid"}}function Xe(t){return t&&jt.test(t)?t:"000000"}function te(t,e){let n=t.createElement("div");return n.className=e,n.setAttribute("aria-hidden","true"),n.setAttribute("contenteditable","false"),n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.right="0",n.style.bottom="0",n.style.overflow="visible",n.style.pointerEvents="none",n.style.boxSizing="border-box",n}function W(t,e,n,o){if(!n)return;let i=`#${Xe(n.color)}`,r=`${Math.max(0,n.widthPt*o)}px`;if(t.style[`border${e}Width`]=r,t.style[`border${e}Color`]=i,n.style==="double"||n.style==="triple"){t.style[`border${e}Style`]="none";return}t.style[`border${e}Style`]=Gt(n.style);}function ne(t,e,n,o,i){let r=t.createElement("div");r.className=i,r.dataset.edge=n.side,r.dataset.stroke=n.role,r.style.position="absolute",r.style.left=`${n.x*o}px`,r.style.top=`${n.y*o}px`,r.style.width=`${n.width*o}px`,r.style.height=`${n.height*o}px`,r.style.pointerEvents="none",r.style.backgroundColor=`#${Xe(n.color)}`,n.cssStyle!=="solid"&&(r.dataset.cssStyle=n.cssStyle),e.append(r);}function Wt(t){let e=new Set;for(let n of t)e.add(`${n.side}\0${n.role}`);return e}function qt(t,e,n,o){let i=Wt(n),r=u=>i.has(`${u}\0middle`),a=te(t,"docx-table-border-double"),s=te(t,"docx-table-border-triple"),l=te(t,"docx-table-border-edge"),d=false,c=false,y=false;for(let u of n){if(u.role==="edge"){y=true,ne(t,l,u,o,"docx-table-border-edge-stroke");continue}if(r(u.side)){c=true,ne(t,s,u,o,"docx-table-border-triple-stroke");continue}(u.role==="outer"||u.role==="inner")&&(d=true,ne(t,a,u,o,"docx-table-border-double-stroke"));}d&&e.append(a),c&&e.append(s),y&&e.append(l);}function Ye(t,e,n,o){W(e,"Top",n?.top,o),W(e,"Right",n?.right,o),W(e,"Bottom",n?.bottom,o),W(e,"Left",n?.left,o),n?.strokes&&n.strokes.length>0&&qt(t,e,n.strokes,o);}function Ze(t,e,n,o){if(e.textDirection!=="btLr")return o;let i=t.createElement("div");return i.className="docx-table-cell-content-btlr",i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width=`${e.box.height*n}px`,i.style.height=`${e.box.width*n}px`,i.style.transformOrigin="0 0",i.style.transform=`translateY(${e.box.height*n}px) rotate(-90deg)`,o.append(i),i}var oe="when-selected",Je=new WeakMap,Qe=0;function Vt(t){let e=Je.get(t);return e||(Qe+=1,e=`alias${Qe}`,Je.set(t,e)),e}function lt(t){return {...t,drawingStrings:t.drawingStrings??ee,urlRegistry:t.urlRegistry??null}}function Xt(t){let e={...t,inertLinks:true};return Object.freeze({scale:t.scale,strings:t.drawingStrings,...t.imageUrlPort?{imageUrlPort:t.imageUrlPort}:{},...t.inertLinks?{inertLinks:true}:{},...t.paintInstance?{paintInstance:t.paintInstance}:{},...t.revisionStyles?{revisionStyles:t.revisionStyles}:{},paintStoryFragment:(n,o)=>o.kind==="table"?C(n,o,e):I(n,o,e)})}function dt(t){return Object.freeze({ctx:Xt(t),urlRegistry:t.urlRegistry})}function et(t,e,n,o,i,r){V(t,e,chunkEWV5JMJY_cjs.Ca(n),o,i,r);}function V(t,e,n,o,i,r,a=true,s){if(n.length===0)return;let l=dt(o),d=t.createElement("div");d.className=r==="behind"?"docx-drawing-layer docx-drawing-layer-behind":"docx-drawing-layer docx-drawing-layer-front",d.style.position="absolute",d.style.inset="0",d.style.pointerEvents="none",s&&(d.dataset.docxHfFront=s);for(let c of Ke(t,n,r,l.ctx,l.urlRegistry,i)){if(c.style.pointerEvents=a?"auto":"none",!a)for(let y of c.querySelectorAll(".docx-drawing"))y.style.pointerEvents="none";d.append(c);}d.childElementCount>0&&e.append(d);}function ct(t){return t.horizontalFrame==="page"||t.verticalFrame==="page"}function yt(t,e,n){let o=e.paintBounds,i=chunkEWV5JMJY_cjs.ya(e,t.box,n),r=i.x-e.x,a=i.y-e.y,s=l=>Object.freeze({x:l.x+r,y:l.y+a,width:l.width,height:l.height});return Object.freeze({...e,x:e.x+r,y:e.y+a,paintBounds:s(o),hitBounds:s(e.hitBounds),geometry:Object.freeze({...e.geometry,contentBounds:s(e.geometry.contentBounds),paintBounds:s(e.geometry.paintBounds),...e.geometry.clipPolygon?{clipPolygon:Object.freeze(e.geometry.clipPolygon.map(l=>Object.freeze({x:l.x+r,y:l.y+a})))}:{}})})}function Yt(t,e,n,o,i,r){let a=o.map(l=>yt(n,l,r)),s=t.createElement("div");s.className="docx-hf-behind-layer",s.dataset.docxHfBehind=n.kind,s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",V(t,s,a,i,r,"behind",false),s.childElementCount>0&&e.append(s);}function Zt(t,e,n,o,i,r,a,s=false){let l=o.filter(ct).map(d=>yt(n,d,r));V(t,e,l,i,r,a,s,n.kind);}var F=/^[0-9A-Fa-f]{6}$/,tt=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,Jt=new Map(Object.entries({single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"})),Qt=new Map(Object.entries({black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"}));function en(t){return t.doubleStrike?"double":t.strike?"single":"none"}function tn(t){return t==="thick"||t.endsWith("Heavy")}function ut(t){if(!t.underline)return null;let e=t.underline.color&&F.test(t.underline.color)?t.underline.color:null;return {cssStyle:Jt.get(t.underline.variant)??"solid",color:e,heavy:tn(t.underline.variant)}}function pt(t,e,n,o){t.textDecorationLine=e,t.textDecorationStyle=n,o.color&&(t.textDecorationColor=`#${o.color}`),o.heavy&&(t.textDecorationThickness=`max(${2*o.scale}px, 0.12em)`);}function nt(t,e,n){e!=="none"&&pt(t,"line-through",e==="double"?"double":"solid",{scale:n});}function ot(t,e,n){pt(t,"underline",e.cssStyle,{color:e.color,heavy:e.heavy,scale:n});}function nn(t,e,n){let o=e.color?`#${e.color}`:"currentColor";t.borderBottomWidth=`${(e.heavy?2:1)*n}px`,t.borderBottomStyle=e.cssStyle==="wavy"?"solid":e.cssStyle,t.borderBottomColor=o;}function q(t,e,n){let o=t.style,i=n.scale;Ve(o,e,i);let r=e.verticalAlign==="baseline"?1:.75;o.fontSize=`${e.fontSizePt*r*i}px`,e.bold&&(o.fontWeight="bold"),e.italic&&(o.fontStyle="italic");let a=e.fontFamily&&tt.test(e.fontFamily)?e.fontFamily:n.defaultFontFamily&&tt.test(n.defaultFontFamily)?n.defaultFontFamily:null;if(a){let d=n.fontAlias?.(a);o.fontFamily=d?`"${d}", "${a}", ${chunkEWV5JMJY_cjs.He}`:`"${a}", ${chunkEWV5JMJY_cjs.He}`;}e.color&&F.test(e.color)&&(o.color=`#${e.color}`);let s=e.highlight?Qt.get(e.highlight):void 0;s?(o.backgroundColor=s,t.dataset.highlight=e.highlight??""):e.shading&&F.test(e.shading)&&(o.backgroundColor=`#${e.shading}`),e.caps&&(o.textTransform="uppercase"),e.smallCaps&&(o.fontVariant="small-caps");let l=chunkEWV5JMJY_cjs.V(e);l!==0&&(o.position="relative",o.top=`${-l*i}px`),e.characterSpacingPt!==0&&(o.letterSpacing=`${e.characterSpacingPt*i}px`),e.horizontalScalePercent!==100&&(o.transformOrigin="left",o.transform=`scaleX(${e.horizontalScalePercent/100})`);}function ht(t,e,n,o,i){let r=n===" "?null:ut(o),a=en(o),s=e;if(r&&a!=="none"){let l=t.createElement("span");l.dataset.docxDeco="underline",ot(l.style,r,i);let d=t.createElement("span");d.dataset.docxDeco="strike",nt(d.style,a,i),l.append(d),e.append(l),s=d;}else r?ot(e.style,r,i):a!=="none"&&nt(e.style,a,i);s.textContent=n;}function T(t,e,n,o){let i=t.createElement(e);return i.style.position="absolute",i.style.left=`${n.x*o}px`,i.style.top=`${n.y*o}px`,i.style.width=`${n.width*o}px`,i.style.height=`${n.height*o}px`,i}function on(t,e,n){let o=e.fieldAtom;!o||(t.dataset.fieldAtom=o.formField?"form":"field",!(o.formField?n.shadeFormFields!==false:(n.fieldShading??oe)!=="never"))||(t.classList.add("docx-field-atom"),(o.formField||(n.fieldShading??oe)==="always")&&t.classList.add("docx-field-atom--shaded"));}function rt(t,e,n){let o=chunkEWV5JMJY_cjs.Ab(e.props),i=n.revisionStyles,r=_(e.revisions,i?.authorSlots,i?.styles);if(!(!r&&!o)){if(r){let{attribution:a}=r;t.classList.add("docx-revision",`docx-revision-${a.kind}`),t.dataset.revisionKind=a.kind,t.dataset.revisionId=a.id,a.author!==""&&(t.dataset.reviewAuthor=a.author),a.date!==void 0&&(t.dataset.revisionDate=a.date);let s=i?.styles.get(a.author);if(i){t.dataset.reviewAuthorSlot=String((i.authorSlots.get(a.author)??0)%$);let c=i.classTokens.get(a.author);if(c)for(let y=0;y<c.length;y+=1)t.classList.add(c[y]);}let d=i!==void 0&&(s?.color!==void 0||i.others==="author")?r.authorColor:r.color;t.style.color=d,t.style.backgroundColor=s?.background??(r.deleted?"var(--doc-revision-deletion-wash)":"var(--doc-revision-insertion-wash)"),r.line&&(t.style.textDecorationLine=r.line,t.style.textDecorationStyle=r.decorationStyle,t.style.textDecorationColor=d);return}if(t.classList.add("docx-revision","docx-revision-format"),t.dataset.revisionKind="format",t.dataset.revisionId=o.id,o.author!==""&&(t.dataset.reviewAuthor=o.author),o.date!==void 0&&(t.dataset.revisionDate=o.date),i){let a=i.styles.get(o.author);t.dataset.reviewAuthorSlot=String((i.authorSlots.get(o.author)??0)%$);let s=i.classTokens.get(o.author);if(s)for(let l=0;l<s.length;l+=1)t.classList.add(s[l]);a?.color!==void 0&&(t.style.color=a.color),a?.background!==void 0&&(t.style.backgroundColor=a.background);}}}function rn(t,e,n,o){let i=chunkEWV5JMJY_cjs.xb(e),r=t.createElement("span");r.className=`docx-revision-pmark docx-revision-pmark-${i.kind}`,r.setAttribute("aria-hidden","true"),r.contentEditable="false",r.dataset.revisionKind=i.kind,r.dataset.revisionId=i.id,i.author!==""&&(r.dataset.reviewAuthor=i.author),r.dataset.revisionIds=e.map(d=>d.id).join(" "),r.dataset.revisionKinds=e.map(d=>d.kind).join(" "),r.textContent="\xB6",r.style.position="absolute",r.style.pointerEvents="none",r.style.marginLeft=`${2*n}px`;let a=chunkEWV5JMJY_cjs.yb(i),s=o?.styles.get(i.author),l=o?(o.authorSlots.get(i.author)??0)%$:0;if(o){r.dataset.reviewAuthorSlot=String(l);let d=o.classTokens.get(i.author);if(d)for(let c=0;c<d.length;c+=1)r.classList.add(d[c]);}return r.style.color=s?.color??(o?.others==="author"?U(l):a?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)"),a&&(r.style.textDecorationLine="line-through"),r}function an(t,e,n){let o=[],i=e.lines[e.lines.length-1];for(let a of e.lines){let s=[...a.spans.flatMap(u=>u.revisions??[]),...(a.drawings??[]).flatMap(u=>u.revisions??[]),...a.anchorRevisions??[],...a===i?e.markRevisions??[]:[]];if(s.length===0)continue;let l=s.some(u=>u.kind==="delete"||u.kind==="moveFrom"),d=a.box.y-e.box.y,c=d+a.box.height,y=o[o.length-1];if(y&&y.deleted===l&&d<=y.bottom+.5){y.bottom=Math.max(y.bottom,c);continue}o.push({top:d,bottom:c,deleted:l});}if(o.length===0)return null;let r=t.createElement("div");r.className="docx-change-bars",r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.inset="0",r.style.pointerEvents="none";for(let a of o){let s=t.createElement("div");s.className=`docx-change-bar docx-change-bar-${a.deleted?"deletion":"insertion"}`,s.style.position="absolute",s.style.top=`${a.top*n}px`,s.style.height=`${(a.bottom-a.top)*n}px`,s.style.left=`${(-e.box.x-sn)*n}px`,s.style.width=`${ln*n}px`,s.style.pointerEvents="none",s.style.backgroundColor=a.deleted?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",r.append(s);}return r}var sn=7.5,ln=1.5;function dn(t,e,n,o,i){let r=t.createElement("span"),a=chunkEWV5JMJY_cjs.ga(e.style,e.fontSlot);if(e.equation)return r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end),q(r,a,n),We(t,r,e.equation,n.scale),rt(r,e,n),r;r.className="layout-run layout-run-text",r.style.display="inline-block",r.style.verticalAlign="baseline",r.style.boxSizing="border-box",r.style.height=`${o*n.scale}px`,r.style.paddingTop=`${i*n.scale}px`,r.style.lineHeight=`${(o-i)*n.scale}px`,e.range.end>e.range.start?(r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end)):(r.setAttribute("aria-hidden","true"),r.contentEditable="false"),q(r,a,n),on(r,e,n),rt(r,e,n);let s=qe(t,r,e,n.scale);if(e.text===" "){r.style.overflow="hidden",r.style.verticalAlign="top";let l=ut(e.style);l&&e.tabLeader!=="underscore"&&(r.dataset.docxTabUnderline="",nn(r.style,l,n.scale));}return ht(t,s,e.text,e.style,n.scale),e.projected&&(r.dataset.docxField="",r.setAttribute("contenteditable","false"),e.noteNav?(r.style.userSelect="none",e.noteNav.direction==="to-note"?(r.dataset.docxNoteRef="",r.dataset.docxNoteScope=e.noteNav.scopeId,e.text.length>0&&r.setAttribute("aria-description",e.text)):(r.dataset.docxNoteMarkBack="",r.dataset.docxNoteScope=e.noteNav.scopeId)):(r.style.pointerEvents="none",r.style.userSelect="none")),r}function it(t,e,n){let o=t.createElement("a");return o.className="docx-hyperlink",o.dataset.docxLink=e.id,o.dataset.docxLinkKind=e.kind,o.setAttribute("tabindex","-1"),!n.inertLinks&&e.href&&(o.setAttribute("href",e.href),e.kind==="external"&&o.setAttribute("rel","noopener noreferrer")),e.tooltip&&o.setAttribute("title",e.tooltip),o.style.display="inline-block",o.style.verticalAlign="baseline",o.style.textDecoration="none",o.style.color="inherit",o}function cn(t,e,n){let o=n.scale,i=t.createElement("div");i.className="docx-line layout-line",i.dataset.lineId=e.id,i.dataset.paragraphId=e.range.paragraphId,i.style.position="absolute",i.style.top=`${e.box.y*o}px`,i.style.left=`${e.contentX*o}px`,i.style.height=`${e.box.height*o}px`,i.style.fontSize="0",i.style.whiteSpace="pre",i.style.overflow="visible";let r=e.leading??0,a=Math.min(Math.max(r,...e.spans.map(v=>v.box.height+r),e.spans.length===0?e.box.height-(e.trailingSpacing??0):0),e.box.height),s=Math.max(0,e.box.height-a);i.style.boxSizing="border-box",i.style.paddingBottom=`${s*o}px`,i.style.lineHeight=`${(e.box.height-s)*o}px`;let l=null,d=null,c=null,y=new Map;for(let[v,b]of chunkEWV5JMJY_cjs.Oa(e).entries())y.set(b.paragraphId,v);let u=v=>y.get(v)??0,h=[...e.drawings??[]].sort((v,b)=>u(v.paragraphId)-u(b.paragraphId)||v.start-b.start),p=0,f=(v,b)=>{for(;p<h.length&&(u(h[p].paragraphId)<u(v)||u(h[p].paragraphId)===u(v)&&h[p].start<b);){let x=h[p],g=Math.max(0,x.advanceEnd-x.advanceStart),m=t.createElement("span");m.className="docx-inline-drawing-advance",m.dataset.docxMarker="",m.setAttribute("contenteditable","false"),m.setAttribute("aria-hidden","true"),m.style.display="inline-block",m.style.width=`${g*o}px`,m.style.height=`${x.baselineOffset*o}px`,m.style.lineHeight="0",m.style.pointerEvents="none",m.style.verticalAlign="baseline",i.append(m),p+=1,l=null,d=null;}},k=v=>{let b=v.wrapAdvanceBefore??0;if(b<=.001)return;let x=t.createElement("span");x.className="docx-wrap-advance",x.dataset.docxMarker="",x.setAttribute("contenteditable","false"),x.setAttribute("aria-hidden","true"),x.style.display="inline-block",x.style.width=`${b*o}px`,x.style.height="0",x.style.lineHeight="0",x.style.pointerEvents="none",x.style.verticalAlign="baseline",i.append(x),l=null,d=null;},R=0,S=false;for(let[v,b]of e.spans.entries()){f(b.range.paragraphId,b.range.start),k(b);let x=Math.min(b.box.height+r,e.box.height),g=dn(t,b,n,x,r);R>0&&!S&&(g.style.marginLeft=`${R*o}px`);let m=e.spans[v+1],D=yn(e,v+1,u);S=D>0&&m!==void 0&&pn(b,m),S&&(g.style.wordSpacing=`${D*o}px`),R=D;let A=b.link;if(!A){l=null,d=null,c=null,i.append(g);continue}if(b.fieldAtom){l!==null&&d===A.id&&c===b.range.start||(l=it(t,A,n),d=A.id,c=b.range.start,i.append(l)),l.append(g);continue}(!l||d!==A.id||c!==null)&&(l=it(t,A,n),d=A.id,c=null,i.append(l)),l.append(g);}if(f(chunkEWV5JMJY_cjs.Oa(e)[chunkEWV5JMJY_cjs.Oa(e).length-1]?.paragraphId??e.range.paragraphId,Number.POSITIVE_INFINITY),e.spans.length===0){let v=t.createElement("br");v.style.lineHeight=`${e.box.height*o}px`,i.append(v);}let L=Object.freeze({x:e.contentX,y:e.box.y,width:e.box.width,height:e.box.height}),P=dt(lt(n));if(e.drawings&&e.drawings.length>0)for(let v of Oe(t,e,P.ctx,P.urlRegistry,L))i.append(v);return i}function yn(t,e,n){if(e<=0||e>=t.spans.length)return 0;let o=t.spans[e-1],i=t.spans[e],r=n(o.range.paragraphId),a=n(i.range.paragraphId);if(t.drawings?.some(d=>{let c=n(d.paragraphId),y=c>r||c===r&&d.start>=o.range.start,u=c<a||c===a&&d.start<i.range.start;return y&&u}))return 0;let l=i.box.x-(o.box.x+o.box.width)-(i.wrapAdvanceBefore??0);return l>.001?l:0}var un=/[\t\n\r \u00A0\u1361\u{10100}-\u{10102}\u{1039F}\u{1091F}]/u;function pn(t,e){return !t.text.endsWith(" ")||t.style.horizontalScalePercent!==100||!hn(t,e)||(e.wrapAdvanceBefore??0)>.001?false:!un.test(t.text.slice(0,-1))}function hn(t,e){return !t.link&&!e.link?true:!t.link||!e.link||t.link.id!==e.link.id||!!t.fieldAtom!=!!e.fieldAtom?false:!t.fieldAtom||t.range.start===e.range.start}function I(t,e,n){let o=n.scale,i=T(t,"div",e.box,o);i.className="docx-paragraph-fragment layout-paragraph",e.clipToBox&&(i.style.overflow="hidden"),i.dataset.paragraphId=e.paragraphId,i.dataset.fragmentIndex=String(e.fragmentIndex),n.readOnlyParagraphIds?.has(e.paragraphId)&&(i.classList.add("docx-generated-region"),i.dataset.docxReadOnly="",i.setAttribute("contenteditable","false"),i.setAttribute("aria-readonly","true")),n.emptyTocPlaceholderIds?.has(e.paragraphId)&&(i.classList.add("docx-toc-empty-placeholder"),i.dataset.docxTocEmpty=""),e.shading&&F.test(e.shading)&&e.shadingBox&&i.append(bn(t,e,o)),e.marker&&i.append(fn(t,e,n));for(let a of e.lines)for(let s of a.spans){if(!s.tabLeader)continue;let l=xn(t,e,a,s,n);l&&i.append(l);}let r=an(t,e,o);if(r&&i.append(r),e.markRevisions&&e.markRevisions.length>0){let a=rn(t,e.markRevisions,o,n.revisionStyles),s=e.lines[e.lines.length-1];if(s){let l=s.spans[s.spans.length-1];a.style.top=`${(s.box.y-e.box.y)*o}px`,a.style.left=`${((l?l.box.x+l.box.width:s.contentX)-e.box.x)*o}px`,i.append(a);}}for(let a of e.lines){let s=cn(t,a,n);s.style.top=`${(a.box.y-e.box.y)*o}px`,s.style.left=`${(a.contentX-e.box.x)*o}px`,i.append(s);}if(e.borders)for(let a of e.borders)i.append(at(t,e,a,o));else e.bottomBorder&&i.append(at(t,e,{side:"bottom",edge:e.bottomBorder.edge,box:e.bottomBorder.box},o));return i}function fn(t,e,n){let o=e.marker,i=n.scale,r=e.lines[0]?.leading??0,a=T(t,"span",o.box,i);a.className="docx-list-marker",a.dataset.docxMarker="",a.setAttribute("contenteditable","false"),a.setAttribute("aria-hidden","true"),a.style.left=`${(o.box.x-e.box.x)*i}px`,a.style.top=`${(o.box.y-e.box.y)*i}px`,a.style.display="block",a.style.overflow="visible",a.style.whiteSpace="pre";let s=e.lines[0],l=s?Math.max(r,...s.spans.map(u=>u.box.height+r),s.spans.length===0?s.box.height-(s.trailingSpacing??0):0):o.box.height,d=Math.min(l,o.box.height),c=Math.max(0,o.box.height-d);a.style.fontSize="0",a.style.boxSizing="border-box",a.style.paddingBottom=`${c*i}px`,a.style.lineHeight=`${d*i}px`;let y=t.createElement("span");return y.style.display="inline-block",y.style.verticalAlign="baseline",y.style.boxSizing="border-box",y.style.height=`${d*i}px`,y.style.paddingTop=`${r*i}px`,y.style.lineHeight=`${(d-r)*i}px`,q(y,o.style,n),ht(t,y,o.text,o.style,i),a.append(y),a}var gn=512;function xn(t,e,n,o,i){let r=o.tabLeader?chunkEWV5JMJY_cjs.Pb.get(o.tabLeader):void 0;if(!r||o.box.width<=0)return null;let a=i.scale,s=t.createElement("div");s.className="docx-tab-leader",s.dataset.docxTabLeader="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",o.tabLeader==="underscore"&&(s.style.zIndex="1"),s.style.left=`${(o.box.x-e.box.x)*a}px`,s.style.top=`${(n.box.y-e.box.y)*a}px`,s.style.width=`${o.box.width*a}px`,s.style.height=`${n.box.height*a}px`,s.style.overflow="hidden",s.style.whiteSpace="pre",s.style.pointerEvents="none",s.style.userSelect="none";let l=n.leading??0,d=Math.min(o.box.height+l,n.box.height),c=Math.max(0,n.box.height-d);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${c*a}px`,s.style.lineHeight=`${(n.box.height-c)*a}px`;let y=t.createElement("span");y.style.display="inline-block",y.style.verticalAlign="baseline",q(y,o.style,i),y.style.boxSizing="border-box",y.style.height=`${d*a}px`,y.style.paddingTop=`${l*a}px`,y.style.lineHeight=`${(d-l)*a}px`,o.tabLeader==="heavy"&&(y.style.fontWeight="bold");let u=o.tabLeaderAdvancePt&&o.tabLeaderAdvancePt>0?o.tabLeaderAdvancePt:Math.max(.5,o.style.fontSizePt*.2),h=Math.min(gn,Math.max(1,Math.floor(o.box.width/u)+2));return y.textContent=r.repeat(h),y.style.letterSpacing="0",s.append(y),s}function bn(t,e,n){let o=e.shadingBox,i=T(t,"div",o,n);return i.className="docx-paragraph-shading",i.setAttribute("aria-hidden","true"),i.style.left=`${(o.x-e.box.x)*n}px`,i.style.top=`${(o.y-e.box.y)*n}px`,i.style.backgroundColor=`#${e.shading}`,i}function at(t,e,n,o){let i=T(t,"div",n.box,o);i.className=`docx-paragraph-border docx-paragraph-border-${n.side}`,i.setAttribute("aria-hidden","true");let r=(n.box.x-e.box.x)*o,a=(n.box.y-e.box.y)*o,s=n.side==="left"||n.side==="right"||n.side==="bar",l=(s?n.box.width:n.box.height)*o,c=mn(n.edge.val)?l:Math.max(1,l);i.style.left=`${n.side==="right"?r-(c-l):r}px`,i.style.top=`${n.side==="bottom"?a-(c-l):a}px`,s?i.style.width=`${c}px`:i.style.height=`${c}px`;let y=n.edge.color&&F.test(n.edge.color)?n.edge.color:"000000";return i.style.backgroundColor=`#${y}`,vn(i,n.edge.val,y,s,c,o),i}function mn(t){return t==="double"||t==="triple"||t==="doubleWave"||t.startsWith("thinThick")||t.startsWith("thickThin")}function vn(t,e,n,o,i,r){switch(e){case "dashed":case "dashSmallGap":case "dotDash":case "dotDotDash":case "dashDotStroked":{let a=Math.max(4,4*r);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 60%, transparent 60%)`,t.style.backgroundSize=o?`100% ${a}px`:`${a}px 100%`;return}case "dotted":{let a=Math.max(3,3*r);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 35%, transparent 35%)`,t.style.backgroundSize=o?`100% ${a}px`:`${a}px 100%`;return}case "double":case "doubleWave":case "triple":case "thinThickSmallGap":case "thickThinSmallGap":case "thinThickThinSmallGap":case "thinThickMediumGap":case "thickThinMediumGap":case "thinThickThinMediumGap":case "thinThickLargeGap":case "thickThinLargeGap":case "thinThickThinLargeGap":{let a=Math.max(1,i/3);t.style.backgroundColor="transparent",o?(t.style.borderLeft=`${a}px solid #${n}`,t.style.borderRight=`${a}px solid #${n}`):(t.style.borderTop=`${a}px solid #${n}`,t.style.borderBottom=`${a}px solid #${n}`),t.style.boxSizing="border-box";return}case "threeDEmboss":case "ridge":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px ridge #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "threeDEngrave":case "groove":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px groove #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "inset":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px inset #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "outset":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px outset #${n}`,o?t.style.width="0px":t.style.height="0px";return}default:return}}function Sn(t,e,n,o){let i=o.scale,r=T(t,"div",e.box,i);if(r.className="docx-table-cell",r.style.left=`${(e.box.x-n.x)*i}px`,r.style.top=`${(e.box.y-n.y)*i}px`,r.style.boxSizing="border-box",r.style.overflow="visible",r.dataset.cellId=e.id,r.dataset.gridColumn=String(e.gridColumn),r.dataset.gridSpan=String(e.gridSpan),e.rowSpan&&e.rowSpan>1&&(r.dataset.rowSpan=String(e.rowSpan)),e.paintInert||e.vMergeContinue)return r.dataset.vMergeContinue="true",r.style.border="none",r.style.backgroundColor="transparent",r;r.style.border="none",Ye(t,r,e.borders,i),e.shading&&F.test(e.shading)&&(r.style.backgroundColor=`#${e.shading}`);let a=Ze(t,e,i,r);for(let s of e.blocks){let l=s.kind==="table"?C(t,s,o):I(t,s,o);l.style.left=`${(s.box.x-e.box.x)*i}px`,l.style.top=`${(s.box.y-e.box.y)*i}px`,a.append(l);}return r}function C(t,e,n){let o=n.scale,i=T(t,"div",e.box,o);i.className="docx-table-fragment layout-table",i.dataset.tableId=e.tableId,i.dataset.fragmentIndex=String(e.fragmentIndex),i.style.overflow="visible";for(let r of e.rows){let a=T(t,"div",r.box,o);a.className="docx-table-row",r.revisionKind&&(a.classList.add("docx-table-row--revision",r.revisionKind==="insert"?"layout-revision-ins":"layout-revision-del"),a.dataset.revisionKind=r.revisionKind,r.revisionId!==void 0&&(a.dataset.revisionId=r.revisionId),r.revisionAuthor!==void 0&&(a.dataset.reviewAuthor=r.revisionAuthor),r.revisionDate!==void 0&&(a.dataset.revisionDate=r.revisionDate)),a.dataset.rowId=r.id,r.isHeaderRepeat&&(a.dataset.headerRepeat="true"),a.style.left=`${(r.box.x-e.box.x)*o}px`,a.style.top=`${(r.box.y-e.box.y)*o}px`,a.style.overflow="visible";for(let s of r.cells)a.append(Sn(t,s,r.box,n));i.append(a);}return i}function Rn(t,e,n,o,i){let r={...n,paintInstance:`p${e.index}`},a=T(t,"div",e.box,r.scale);if(a.className="docx-page",a.style.fontFamily=chunkEWV5JMJY_cjs.He,a.dataset.pageIndex=String(e.index),r.ariaHidden&&(a.setAttribute("aria-hidden","true"),a.setAttribute("role","presentation")),a.dataset.materialized=String(o),!o)return a;let s=Object.freeze({x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height}),l=Object.freeze({x:-(e.contentBox.x-e.box.x),y:-(e.contentBox.y-e.box.y),width:e.box.width,height:e.box.height});et(t,a,e,r,l,"behind");for(let y of [e.header,e.footer])y?.anchoredDrawings?.length&&Yt(t,a,y,y.anchoredDrawings,r,{x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height});let d=t.createElement("div");d.className="docx-page-content",d.style.position="absolute",d.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,d.style.top=`${(e.contentBox.y-e.box.y)*r.scale}px`,d.style.width=`${e.contentBox.width*r.scale}px`,d.style.height=`${e.contentBox.height*r.scale}px`,r.activeHeaderFooterRId&&d.setAttribute("contenteditable","false");for(let y of e.columnSeparators??[]){let u=t.createElement("div");u.className="docx-column-separator",u.setAttribute("contenteditable","false"),u.style.position="absolute",u.style.left=`${y.x*r.scale}px`,u.style.top=`${y.y*r.scale}px`,u.style.width=`${y.width*r.scale}px`,u.style.height=`${y.height*r.scale}px`,u.style.backgroundColor="currentColor",u.style.pointerEvents="none",d.append(u);}let c=i?new Map:null;for(let y of e.fragments){let u=y.kind==="table"?C(t,y,r):I(t,y,r);c?.set(y,u),d.append(u);}i&&c&&(i.content=d,i.blocks=c),a.append(d),et(t,a,e,r,l,"inFront"),Ee(t,a,e,r,I,C);for(let y of ["header","footer"]){if(e[y])continue;let u=t.createElement("div");u.className="docx-hf docx-hf--placeholder",u.dataset.docxHf=y,u.setAttribute("contenteditable","false");let h=y==="header"?e.contentBox.y-e.box.y:e.box.y+e.box.height-(e.contentBox.y+e.contentBox.height),p=Math.min(h,wn);if(p<=0)continue;let f=Math.max(0,Math.min(kn,h-p)),k=y==="header"?f:e.box.height-f-p;u.style.position="absolute",u.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,u.style.top=`${k*r.scale}px`,u.style.width=`${e.contentBox.width*r.scale}px`,u.style.height=`${p*r.scale}px`,a.append(u);}for(let y of [e.header,e.footer]){if(!y)continue;let u=y.anchoredDrawings??[],h=j(y,e.index,r),p=t.createElement("div");p.className="docx-hf",p.dataset.docxHf=y.kind,y.rId&&(p.dataset.docxRId=y.rId),h?(p.dataset.docxHfActive="",p.setAttribute("contenteditable","true")):p.setAttribute("contenteditable","false"),p.style.position="absolute",p.style.left=`${(y.box.x-e.box.x)*r.scale}px`,p.style.top=`${(y.box.y-e.box.y)*r.scale}px`,p.style.width=`${y.box.width*r.scale}px`;let f=Y(y,e,h);p.style.height=`${f*r.scale}px`,p.style.overflow="visible";let k=(e.box.x-y.box.x)*r.scale,R=(e.box.y-y.box.y)*r.scale,S=k+e.box.width*r.scale,L=R+e.box.height*r.scale;p.style.clipPath=`polygon(${k}px ${R}px, ${S}px ${R}px, ${S}px ${L}px, ${k}px ${L}px)`;let P=Object.freeze({x:0,y:0,width:y.box.width,height:y.box.height}),v=u.filter(g=>!ct(g)),b={...r,inertLinks:true};for(let g of y.fragments)p.append(g.kind==="table"?C(t,g,b):I(t,g,b));V(t,p,v,lt(r),P,"inFront",h),a.append(p);let x=t.createElement("div");x.className="docx-hf-edit-hint",x.dataset.docxHfHint=y.kind,x.setAttribute("contenteditable","false"),x.style.position="absolute",x.style.left=p.style.left,x.style.width=p.style.width,x.style.top=y.kind==="header"?`${(y.box.y+y.box.height-e.box.y)*r.scale}px`:`${(y.box.y-e.box.y)*r.scale}px`,y.kind==="footer"&&(x.style.transform="translateY(-100%)"),a.append(x),Zt(t,a,y,u,r,s,"inFront",h);}return Ln(t,a,e,r),a}var wn=30,kn=36,An=16,En=new Set(["dropdown","comboBox","date","checkbox"]);function Ln(t,e,n,o){let i=o.contentControlChrome,r=i?.suppressedIds,a=(n.contentControls??[]).filter(u=>r?.has(u.id)!==true),s=[...a,...(i?.additionalBoundaries??[]).filter(u=>r?.has(u.id)!==true&&!a.some(h=>h.id===u.id))];if(s.length===0)return;let l=i?.showAll===true,d=i?.activeIds,c=i?.hoverIds,y=i?.tocControlIds;for(let u of s){let h=y?.has(u.id)===true,p=!h&&d?.has(u.id)===true,f=c?.has(u.id)===true;e.append(Pn(t,n,u,o.scale,p,f,l||p||h&&f,i?.checkedIds?.has(u.id),h,i?.readOnly===true));}}function Pn(t,e,n,o,i,r,a,s,l,d){let c=t.createElement("div");c.className="docx-content-control-chrome",c.dataset.docxContentControl=n.id,c.dataset.docxMarker="",c.dataset.controlType=n.controlType,c.dataset.lock=n.effectiveLock,n.bound&&(c.dataset.bound=""),n.placeholder&&(c.dataset.placeholder=""),l&&(c.dataset.docxToc=""),d&&(c.dataset.readOnly=""),i&&(c.dataset.active=""),r&&(c.dataset.hover=""),a&&(c.dataset.boundaryVisible=""),c.setAttribute("contenteditable","false"),c.setAttribute("role","group"),n.alias&&(c.dataset.alias=n.alias),n.tag&&(c.dataset.tag=n.tag),n.alias&&c.setAttribute("aria-label",n.alias),c.style.position="absolute",c.style.inset="0",c.style.pointerEvents="none",c.style.zIndex="2";let y=e.contentBox.x-e.box.x,u=e.contentBox.y-e.box.y;for(let p of n.fragments){if(p.pageIndex!==e.index)continue;let f=t.createElement("div");f.className="docx-content-control-boundary",f.dataset.docxMarker="",f.setAttribute("contenteditable","false"),f.setAttribute("aria-hidden","true"),f.style.position="absolute",f.style.left=`${(y+p.box.x)*o}px`,f.style.top=`${(u+p.box.y)*o}px`,f.style.width=`${Math.max(p.box.width,1)*o}px`,f.style.height=`${Math.max(p.box.height,1)*o}px`,f.style.pointerEvents="none",c.append(f);}let h=n.fragments.find(p=>p.pageIndex===e.index);if(h&&n.alias){let p=t.createElement("div");p.className="docx-content-control-label",p.dataset.docxMarker="",p.setAttribute("contenteditable","false"),p.setAttribute("aria-hidden","true"),p.textContent=n.alias,p.style.position="absolute",p.style.left=`${(y+h.box.x)*o}px`,p.style.top=`${Math.max(0,(u+h.box.y)*o-An)}px`,p.style.pointerEvents="none",c.append(p);}if(h&&En.has(n.controlType)){let p=t.createElement("button");p.type="button",p.className="docx-content-control-widget",p.dataset.docxMarker="",p.dataset.docxCcWidget=n.controlType,p.dataset.docxCcId=n.id,p.setAttribute("contenteditable","false"),p.setAttribute("tabindex","-1"),n.controlType==="checkbox"?p.setAttribute("role","checkbox"):n.controlType==="dropdown"||n.controlType==="comboBox"?p.setAttribute("role","listbox"):n.controlType==="date"&&p.setAttribute("role","button"),n.alias&&(p.dataset.name=n.alias),n.alias&&p.setAttribute("aria-label",n.alias),n.controlType==="checkbox"&&(p.setAttribute("data-checked",s?"true":"false"),p.setAttribute("aria-checked",s?"true":"false"));let f=n.effectiveLock==="contentLocked"||n.effectiveLock==="sdtContentLocked";(d||f||n.bound)&&(p.disabled=true,p.dataset.disabledReason=d?"readOnly":n.bound?"bound":"locked",p.setAttribute("aria-disabled","true")),p.style.position="absolute",p.style.left=`${(y+h.box.x+h.box.width)*o-18}px`,p.style.top=`${(u+h.box.y)*o}px`,p.style.width="16px",p.style.height="16px",p.style.pointerEvents="auto",p.style.padding="0",p.style.margin="0",p.style.cursor=p.disabled?"not-allowed":"pointer",c.append(p);}return c}var re=new WeakMap;function So(t){re.delete(t);}function $n(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Tn(t,e){let n=Object.keys(t);if(n.length!==Object.keys(e).length)return false;for(let o of n){let i=t[o],r=e[o];if(i!==r)return false}return true}function Dn(t,e){if(t.length!==e.length)return false;for(let n=0;n<t.length;n+=1)if(t[n]!==e[n])return false;return true}function Mn(t,e){if(t===e)return false;let n=new Set([...Object.keys(t),...Object.keys(e)]);for(let o of n){if(o==="fragments")continue;let i=t[o],r=e[o];if(i!==r&&!(Array.isArray(i)&&Array.isArray(r)&&Dn(i,r))&&!(typeof i=="object"&&typeof r=="object"&&i!==null&&r!==null&&!Array.isArray(i)&&!Array.isArray(r)&&Tn(i,r)))return false}return true}var st="docx-column-separator";function Hn(t,e,n,o){let i=e.content,r=e.blocks;if(!i||!r||i.parentElement!==e.element)return null;let a={...o,paintInstance:`p${n.index}`},s=new Map,l=[];for(let u of n.fragments){let h=r.get(u)??(u.kind==="table"?C(t,u,a):I(t,u,a));s.set(u,h),l.push(h);}let d=new Set(l),c=i.firstChild;for(;c;){let u=c.nextSibling,h=c;!d.has(h)&&h.classList?.contains(st)!==true&&c.remove(),c=u;}let y=i.firstChild;for(;y&&y.classList?.contains(st);)y=y.nextSibling;for(let u of l){if(u===y){y=y.nextSibling;continue}i.insertBefore(u,y);}return {record:n,materialized:true,element:e.element,content:i,blocks:s}}function In(t,e,n,o){let i=t.element;return !t.materialized&&$n(t.record.box,e.box)&&i.style.left===`${e.box.x*n}px`&&i.style.top===`${e.box.y*n}px`&&i.style.width===`${e.box.width*n}px`&&i.style.height===`${e.box.height*n}px`&&i.getAttribute("aria-hidden")===(o?"true":null)}function Cn(t,e,n={}){Fn(t,e,n);}function Fn(t,e,n,o){let i=n.contentControlChrome,r=i?`${i.showAll===true?"1":"0"}:${i.activeIds?[...i.activeIds].sort().join(","):""}:${i.checkedIds?[...i.checkedIds].sort().join(","):""}:${i.tocControlIds?[...i.tocControlIds].sort().join(","):""}:${i.suppressedIds?[...i.suppressedIds].sort().join(","):""}:${i.readOnly===true?"ro":""}`:"",a=n.drawingStrings??ee,s=n.imageUrlPort!==void 0?He(t,n.imageUrlPort):null,l=i?.additionalBoundaries?i.additionalBoundaries.flatMap(g=>g.fragments.map(m=>`${g.id}:${m.pageIndex}:${m.box.x}:${m.box.y}:${m.box.width}:${m.box.height}`)).sort().join(","):"",d=n.readOnlyParagraphIds?[...n.readOnlyParagraphIds].sort().join(","):"",c=n.emptyTocPlaceholderIds?[...n.emptyTocPlaceholderIds].sort().join(","):"",y=i?.tocControlIds?[...i.tocControlIds].sort().join(","):"",u=Ae(n.revisionStyles,e,o),h={scale:n.scale??96/72,ariaHidden:n.ariaHidden??true,drawingStrings:a,urlRegistry:s,...n.fontAlias?{fontAlias:n.fontAlias}:{},...n.readOnlyParagraphIds?{readOnlyParagraphIds:n.readOnlyParagraphIds}:{},...n.emptyTocPlaceholderIds?{emptyTocPlaceholderIds:n.emptyTocPlaceholderIds}:{},...n.defaultFontFamily?{defaultFontFamily:n.defaultFontFamily}:{},...n.fieldShading?{fieldShading:n.fieldShading}:{},...n.shadeFormFields!==void 0?{shadeFormFields:n.shadeFormFields}:{},...u?{revisionStyles:u}:{},...n.imageUrlPort?{imageUrlPort:n.imageUrlPort}:{},...n.activeHeaderFooterRId?{activeHeaderFooterRId:n.activeHeaderFooterRId}:{},...n.activeHeaderFooterPageIndex!==void 0?{activeHeaderFooterPageIndex:n.activeHeaderFooterPageIndex}:{},...i?{contentControlChrome:i}:{}},p=t.ownerDocument,f=`${h.scale}|${h.ariaHidden}|${h.fontAlias?Vt(h.fontAlias):""}|${h.defaultFontFamily??""}|cc:${r}:${l}|toc:${y}|ro:${d}|tocEmpty:${c}|${n.imageUrlPort?"url":""}|${je(a)}|rev:${ke(u)}`,k=re.get(t),R=k?.parameters===f,S=R?new Map(k.pages.map(g=>[g.record,g])):null,L=k?new Map(k.pages.map(g=>[g.record.index,g])):null,P=e.pages.map(g=>{let m=n.materialize?.has(g.index)??true,D=S?.get(g);if(D&&D.materialized===m)return D;let A=L?.get(g.index);if(!m&&A&&In(A,g,h.scale,h.ariaHidden))return {record:g,materialized:false,element:A.element};if(R&&m&&A?.materialized&&Mn(A.record,g)){let ie=Hn(p,A,g,h);if(ie)return ie}let H={},ft=Rn(p,g,h,m,H);return {record:g,materialized:m,element:ft,...H.content?{content:H.content}:{},...H.blocks?{blocks:H.blocks}:{}}});re.set(t,{parameters:f,pages:P}),t.dataset.revision=String(e.revision),s&&s.reconcile(Ue(e),_e(e));let v=new Set(P.map(g=>g.element)),b=t.firstChild;for(;b;){let g=b.nextSibling;v.has(b)||b.remove(),b=g;}let x=t.firstChild;for(let g of P){if(g.element===x){x=x.nextSibling;continue}t.insertBefore(g.element,x);}Le(P,h);}function Bn(t,e,n,o){let i=t.ownerDocument,r=o.scale,a=[];for(let s of n){let l=e.pages[s.pageIndex];if(!l)continue;let d=i.createElement("div");d.className=s.className??o.className??"docx-cell-selection-rect",d.style.position="absolute";let c=o.pageOffsetX?.get(s.pageIndex)??0;d.style.left=`${(l.contentBox.x+s.x+c)*r}px`,d.style.top=`${(l.contentBox.y+s.y)*r}px`,d.style.width=`${s.width*r}px`,d.style.height=`${s.height*r}px`,s.reviewAuthor&&(d.dataset.reviewAuthor=s.reviewAuthor.author,d.dataset.reviewAuthorSlot=String(s.reviewAuthor.slot%$),d.style.setProperty("--doc-review-author-current",s.reviewAuthor.color)),a.push(d);}t.replaceChildren(...a);}
2
+ exports.a=U;exports.b=we;exports.c=On;exports.d=kt;exports.e=Kn;exports.f=Yn;exports.g=je;exports.h=ee;exports.i=Zn;exports.j=oe;exports.k=Qt;exports.l=So;exports.m=Cn;exports.n=Fn;exports.o=Bn;