@eigenpal/docx-editor-core 1.0.2 → 1.1.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 (266) hide show
  1. package/LICENSE +13 -16
  2. package/README.md +1 -1
  3. package/dist/agent/index.d.mts +4 -5
  4. package/dist/agent/index.d.ts +4 -5
  5. package/dist/agent/index.js +1 -1
  6. package/dist/agent/index.mjs +1 -1
  7. package/dist/{chunk-NLTX7XVR.js → chunk-25KY5HLN.js} +1 -1
  8. package/dist/chunk-44FHVKSI.js +1 -0
  9. package/dist/{chunk-4S5VOHQK.mjs → chunk-5CDBSK2R.mjs} +1 -1
  10. package/dist/chunk-6Y6LON6Y.mjs +1 -0
  11. package/dist/chunk-6ZXL3EIP.mjs +2 -0
  12. package/dist/chunk-73AZQWIE.js +1 -0
  13. package/dist/chunk-7HANRHHL.js +1 -0
  14. package/dist/chunk-7LRR7RKE.mjs +15 -0
  15. package/dist/{chunk-AGNZEOVL.mjs → chunk-7Z2AGPNQ.mjs} +1 -1
  16. package/dist/chunk-BGE57OES.js +1 -0
  17. package/dist/chunk-BOOHU5EW.mjs +1 -0
  18. package/dist/chunk-CA2EYL6T.mjs +1 -0
  19. package/dist/chunk-CTHHUJAB.mjs +2 -0
  20. package/dist/chunk-DLCDDB66.mjs +3 -0
  21. package/dist/chunk-DV6GWBUJ.js +2 -0
  22. package/dist/chunk-E4JMCA5X.js +2 -0
  23. package/dist/chunk-F44ZLDZS.js +4 -0
  24. package/dist/chunk-FCJWLEKT.mjs +1 -0
  25. package/dist/chunk-FDEDN2RC.mjs +0 -0
  26. package/dist/chunk-FEWCI2E5.mjs +1 -0
  27. package/dist/chunk-GFDIPDJ6.mjs +1 -0
  28. package/dist/chunk-GM4USWKO.js +2 -0
  29. package/dist/chunk-GWBVJZVT.js +3 -0
  30. package/dist/chunk-GY5BWVM7.js +1 -0
  31. package/dist/{chunk-7SGC3CXJ.js → chunk-H42RXHT4.js} +1 -1
  32. package/dist/chunk-HMBVSDCH.mjs +1 -0
  33. package/dist/chunk-HQPWFUP5.js +2 -0
  34. package/dist/chunk-HV6HE6YR.js +59 -0
  35. package/dist/chunk-IF4C25FN.mjs +1 -0
  36. package/dist/chunk-IMKU4O3P.js +1 -0
  37. package/dist/chunk-IQG3KLWY.mjs +2 -0
  38. package/dist/{chunk-AFMMYLPX.js → chunk-J4J2Y6EU.js} +2 -2
  39. package/dist/chunk-KGDXHUYC.js +1 -0
  40. package/dist/chunk-KHF4JU7D.mjs +1 -0
  41. package/dist/chunk-LCICADWM.js +2 -0
  42. package/dist/{chunk-GFQM7PKY.js → chunk-LOCW6MR2.js} +1 -1
  43. package/dist/chunk-LTHT4A4S.js +1 -0
  44. package/dist/chunk-MJ6XZFVD.mjs +1 -0
  45. package/dist/chunk-MNOHUTKE.js +15 -0
  46. package/dist/chunk-MP4QSEO2.mjs +1 -0
  47. package/dist/chunk-MZ2XCZAN.mjs +1 -0
  48. package/dist/chunk-OAWTQ3IY.js +1 -0
  49. package/dist/chunk-OEXVWIHW.mjs +2 -0
  50. package/dist/chunk-ONRBRDIC.mjs +59 -0
  51. package/dist/{chunk-6PR4XHQ3.mjs → chunk-ONWOHAFW.mjs} +1 -1
  52. package/dist/{chunk-EXOP727C.mjs → chunk-OUEKNYX5.mjs} +1 -1
  53. package/dist/chunk-OX75Q5ZG.mjs +1 -0
  54. package/dist/chunk-QEACB5VG.js +1 -0
  55. package/dist/chunk-RFC2SXZ6.mjs +4 -0
  56. package/dist/chunk-RFVFX5WK.mjs +1 -0
  57. package/dist/chunk-SORYYVJ7.js +1 -0
  58. package/dist/chunk-TUIEV7Q7.js +1 -0
  59. package/dist/chunk-U74VPTIU.js +1 -0
  60. package/dist/chunk-UOQT6A7P.js +1 -0
  61. package/dist/chunk-V5VDCQDN.mjs +1 -0
  62. package/dist/chunk-VHUVPHPI.mjs +1 -0
  63. package/dist/{chunk-XCMA7AY7.js → chunk-W7GLQ6DV.js} +1 -1
  64. package/dist/chunk-WLHNIXWC.mjs +2 -0
  65. package/dist/chunk-X6HFDXKB.js +1 -0
  66. package/dist/chunk-XPV6VILW.mjs +1 -0
  67. package/dist/chunk-Y3ZQQI4D.js +1 -0
  68. package/dist/chunk-YTDWMXNS.js +1 -0
  69. package/dist/chunk-ZUGNF5KU.js +1 -0
  70. package/dist/chunk-ZX26QZJ5.mjs +1 -0
  71. package/dist/{colorResolver-CVsPLsw1.d.ts → colorResolver-BZ_yScf4.d.ts} +1 -1
  72. package/dist/{colorResolver-C3q7MLLD.d.mts → colorResolver-C6DtsoFI.d.mts} +1 -1
  73. package/dist/content-5Mrz6w_b.d.mts +1360 -0
  74. package/dist/content-CmqAwdFL.d.ts +1360 -0
  75. package/dist/core-plugins.d.mts +3 -4
  76. package/dist/core-plugins.d.ts +3 -4
  77. package/dist/core-plugins.js +1 -1
  78. package/dist/core-plugins.mjs +1 -1
  79. package/dist/core.d.mts +10 -11
  80. package/dist/core.d.ts +10 -11
  81. package/dist/core.js +1 -1
  82. package/dist/core.mjs +1 -1
  83. package/dist/{documentSerializer-Chn7J1WG.d.ts → documentSerializer-BRaaXIHm.d.ts} +1 -1
  84. package/dist/{documentSerializer-C1ueey5d.d.mts → documentSerializer-DgO3A9av.d.mts} +1 -1
  85. package/dist/docx/index.d.mts +3 -4
  86. package/dist/docx/index.d.ts +3 -4
  87. package/dist/docx/index.js +1 -1
  88. package/dist/docx/index.mjs +1 -1
  89. package/dist/docx/parser.d.mts +3 -4
  90. package/dist/docx/parser.d.ts +3 -4
  91. package/dist/docx/parser.js +1 -1
  92. package/dist/docx/parser.mjs +1 -1
  93. package/dist/docx/rezip.d.mts +3 -4
  94. package/dist/docx/rezip.d.ts +3 -4
  95. package/dist/docx/rezip.js +1 -1
  96. package/dist/docx/rezip.mjs +1 -1
  97. package/dist/docx/serializer/index.d.mts +4 -5
  98. package/dist/docx/serializer/index.d.ts +4 -5
  99. package/dist/docx/serializer/index.js +1 -1
  100. package/dist/docx/serializer/index.mjs +1 -1
  101. package/dist/{fontLoader-BOt95Jtf.d.mts → fontLoader-8b4X-AIh.d.mts} +63 -3
  102. package/dist/{fontLoader-QPwbcX5j.d.ts → fontLoader-CK2QLq68.d.ts} +63 -3
  103. package/dist/{formatting-D9I-lFS4.d.mts → formatting-BH4hcZiq.d.mts} +1 -1
  104. package/dist/{formatting-BwpZWdGi.d.ts → formatting-_OXU8gLB.d.ts} +1 -1
  105. package/dist/{headerFooterLayout-DkclHZ0Z.d.mts → headerFooterLayout-72Vz7yp3.d.mts} +94 -3
  106. package/dist/{headerFooterLayout-B3QVg556.d.ts → headerFooterLayout-Ca4ESDHF.d.ts} +94 -3
  107. package/dist/headless.d.mts +9 -9
  108. package/dist/headless.d.ts +9 -9
  109. package/dist/headless.js +1 -1
  110. package/dist/headless.mjs +1 -1
  111. package/dist/layout-bridge/index.d.mts +7 -7
  112. package/dist/layout-bridge/index.d.ts +7 -7
  113. package/dist/layout-bridge/index.js +1 -1
  114. package/dist/layout-bridge/index.mjs +1 -1
  115. package/dist/layout-bridge/measuring/index.d.mts +43 -2
  116. package/dist/layout-bridge/measuring/index.d.ts +43 -2
  117. package/dist/layout-bridge/measuring/index.js +1 -1
  118. package/dist/layout-bridge/measuring/index.mjs +1 -1
  119. package/dist/layout-bridge/tableInsertHover.js +1 -1
  120. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  121. package/dist/layout-bridge/toFlowBlocks.d.mts +11 -3
  122. package/dist/layout-bridge/toFlowBlocks.d.ts +11 -3
  123. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  124. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  125. package/dist/layout-engine/index.d.mts +33 -3
  126. package/dist/layout-engine/index.d.ts +33 -3
  127. package/dist/layout-engine/index.js +1 -1
  128. package/dist/layout-engine/index.mjs +1 -1
  129. package/dist/layout-engine/types.d.mts +53 -0
  130. package/dist/layout-engine/types.d.ts +53 -0
  131. package/dist/layout-painter/index.d.mts +4 -5
  132. package/dist/layout-painter/index.d.ts +4 -5
  133. package/dist/layout-painter/index.js +1 -1
  134. package/dist/layout-painter/index.mjs +1 -1
  135. package/dist/layout-painter/renderPage.d.mts +4 -5
  136. package/dist/layout-painter/renderPage.d.ts +4 -5
  137. package/dist/layout-painter/renderPage.js +1 -1
  138. package/dist/layout-painter/renderPage.mjs +1 -1
  139. package/dist/managers/AutoSaveManager.d.mts +3 -4
  140. package/dist/managers/AutoSaveManager.d.ts +3 -4
  141. package/dist/managers/TableSelectionManager.d.mts +3 -4
  142. package/dist/managers/TableSelectionManager.d.ts +3 -4
  143. package/dist/managers/types.d.mts +3 -4
  144. package/dist/managers/types.d.ts +3 -4
  145. package/dist/{marks-CCPVlQzL.d.mts → marks-BY573yZn.d.mts} +1 -1
  146. package/dist/{marks-BujVxYP4.d.ts → marks-CjC9tF5k.d.ts} +1 -1
  147. package/dist/mcp-cli.mjs +24 -23
  148. package/dist/mcp.d.mts +3 -4
  149. package/dist/mcp.d.ts +3 -4
  150. package/dist/mcp.js +3 -3
  151. package/dist/mcp.mjs +1 -1
  152. package/dist/{nodes-BXi1Uu3e.d.mts → nodes-7753Bgi_.d.mts} +66 -3
  153. package/dist/{nodes-DfKj9kUA.d.ts → nodes-CC_nwkT_.d.ts} +66 -3
  154. package/dist/prosemirror/commands/formatting.d.mts +2 -2
  155. package/dist/prosemirror/commands/formatting.d.ts +2 -2
  156. package/dist/prosemirror/commands/formatting.js +1 -1
  157. package/dist/prosemirror/commands/formatting.mjs +1 -1
  158. package/dist/prosemirror/commands/index.d.mts +82 -8
  159. package/dist/prosemirror/commands/index.d.ts +82 -8
  160. package/dist/prosemirror/commands/index.js +1 -1
  161. package/dist/prosemirror/commands/index.mjs +1 -1
  162. package/dist/prosemirror/commands/paragraph.d.mts +1 -1
  163. package/dist/prosemirror/commands/paragraph.d.ts +1 -1
  164. package/dist/prosemirror/commands/paragraph.js +1 -1
  165. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  166. package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -4
  167. package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -4
  168. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  169. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  170. package/dist/prosemirror/conversion/index.d.mts +11 -4
  171. package/dist/prosemirror/conversion/index.d.ts +11 -4
  172. package/dist/prosemirror/conversion/index.js +1 -1
  173. package/dist/prosemirror/conversion/index.mjs +1 -1
  174. package/dist/prosemirror/editor.css +155 -95
  175. package/dist/prosemirror/extensions/index.d.mts +1 -1
  176. package/dist/prosemirror/extensions/index.d.ts +1 -1
  177. package/dist/prosemirror/extensions/index.js +1 -1
  178. package/dist/prosemirror/extensions/index.mjs +1 -1
  179. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
  180. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
  181. package/dist/prosemirror/index.d.mts +5 -6
  182. package/dist/prosemirror/index.d.ts +5 -6
  183. package/dist/prosemirror/index.js +1 -1
  184. package/dist/prosemirror/index.mjs +1 -1
  185. package/dist/prosemirror/plugins/index.d.mts +122 -18
  186. package/dist/prosemirror/plugins/index.d.ts +122 -18
  187. package/dist/prosemirror/plugins/index.js +1 -1
  188. package/dist/prosemirror/plugins/index.mjs +1 -1
  189. package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
  190. package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
  191. package/dist/prosemirror/schema/index.d.mts +4 -5
  192. package/dist/prosemirror/schema/index.d.ts +4 -5
  193. package/dist/prosemirror/schema/index.js +1 -1
  194. package/dist/prosemirror/schema/index.mjs +1 -1
  195. package/dist/prosemirror/styles/index.d.mts +2 -2
  196. package/dist/prosemirror/styles/index.d.ts +2 -2
  197. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +45 -23
  198. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +45 -23
  199. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
  200. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
  201. package/dist/{selectionContext-85CE0f7a.d.ts → selectionContext-BPAqgNgk.d.ts} +1 -1
  202. package/dist/{selectionContext-Xq3AY7pn.d.mts → selectionContext-CoZat7QZ.d.mts} +1 -1
  203. package/dist/{styles-jqO45PSq.d.ts → styles-BBv7doYK.d.ts} +1 -1
  204. package/dist/{styles-BBoqh07F.d.mts → styles-EI2lxeEN.d.mts} +1 -1
  205. package/dist/types/agentApi.d.mts +1 -1
  206. package/dist/types/agentApi.d.ts +1 -1
  207. package/dist/types/content.d.mts +4 -1167
  208. package/dist/types/content.d.ts +4 -1167
  209. package/dist/types/document.d.mts +25 -8
  210. package/dist/types/document.d.ts +25 -8
  211. package/dist/utils/comments.d.mts +79 -6
  212. package/dist/utils/comments.d.ts +79 -6
  213. package/dist/utils/comments.js +1 -1
  214. package/dist/utils/comments.mjs +1 -1
  215. package/dist/utils/highlightColors.js +1 -1
  216. package/dist/utils/highlightColors.mjs +1 -1
  217. package/dist/utils/index.d.mts +5 -6
  218. package/dist/utils/index.d.ts +5 -6
  219. package/dist/utils/index.js +3 -3
  220. package/dist/utils/index.mjs +3 -3
  221. package/dist/{variableDetector-CAdt8yOr.d.mts → variableDetector-DF3-nxUC.d.mts} +1 -1
  222. package/dist/{variableDetector-W4XEN9YC.d.ts → variableDetector-sBkgVh3f.d.ts} +1 -1
  223. package/package.json +3 -3
  224. package/dist/chunk-2D3UPAMA.mjs +0 -1
  225. package/dist/chunk-2RCMY2GE.mjs +0 -1
  226. package/dist/chunk-3GNIP6IX.mjs +0 -4
  227. package/dist/chunk-44RUAQA2.js +0 -1
  228. package/dist/chunk-5N5DBQJV.mjs +0 -1
  229. package/dist/chunk-5TNMVXDS.mjs +0 -1
  230. package/dist/chunk-6DK4UBGM.js +0 -1
  231. package/dist/chunk-6LOYA7G5.mjs +0 -2
  232. package/dist/chunk-7VCMJCBY.js +0 -2
  233. package/dist/chunk-APFTVA4F.mjs +0 -1
  234. package/dist/chunk-BKHQA6JJ.js +0 -1
  235. package/dist/chunk-BOYVCOLZ.mjs +0 -1
  236. package/dist/chunk-BS35CXMN.js +0 -1
  237. package/dist/chunk-BTOBVF4I.mjs +0 -1
  238. package/dist/chunk-C6GSFUV2.js +0 -2
  239. package/dist/chunk-CP5OSG5Z.mjs +0 -1
  240. package/dist/chunk-CP767TWV.js +0 -1
  241. package/dist/chunk-DV6IEOP5.js +0 -4
  242. package/dist/chunk-IBNUQL57.mjs +0 -2
  243. package/dist/chunk-KBU6QQFU.js +0 -9
  244. package/dist/chunk-LDKESXXK.mjs +0 -3
  245. package/dist/chunk-LTYW3NLX.js +0 -59
  246. package/dist/chunk-NERY274X.js +0 -1
  247. package/dist/chunk-NMSU4MWP.mjs +0 -1
  248. package/dist/chunk-NNQWQOC5.mjs +0 -1
  249. package/dist/chunk-OLKDLRJ4.js +0 -1
  250. package/dist/chunk-P3AXSRLG.mjs +0 -1
  251. package/dist/chunk-P6RNOYAG.mjs +0 -2
  252. package/dist/chunk-R7RR6M4A.mjs +0 -2
  253. package/dist/chunk-RCS6UNIJ.mjs +0 -1
  254. package/dist/chunk-T5RYEG2V.js +0 -1
  255. package/dist/chunk-TRJWRZZD.js +0 -1
  256. package/dist/chunk-TYYOBPNK.js +0 -1
  257. package/dist/chunk-UCZVMHB5.mjs +0 -59
  258. package/dist/chunk-V435QKZB.js +0 -3
  259. package/dist/chunk-VQ2QGHYS.js +0 -2
  260. package/dist/chunk-WZP6ZHBR.js +0 -1
  261. package/dist/chunk-XDH55WXX.mjs +0 -1
  262. package/dist/chunk-Y5HZAMND.mjs +0 -9
  263. package/dist/chunk-YE357WVA.js +0 -1
  264. package/dist/chunk-YGHHSCPR.js +0 -2
  265. package/dist/lists-CdiIk_c1.d.ts +0 -142
  266. package/dist/lists-JDB80qyP.d.mts +0 -142
@@ -1 +0,0 @@
1
- import {e,b,c,a as a$1}from'./chunk-KQTB5Y7P.mjs';import {a}from'./chunk-NMSU4MWP.mjs';import {TextSelection}from'prosemirror-state';function M(e){let{$from:t}=e.selection,o=null,i=null,a=null,l=-1,n=-1;for(let r=t.depth;r>0;r--){let u=t.node(r);if(u.type.name==="tableCell"||u.type.name==="tableHeader"){a=u;let p=t.node(r-1);if(p?.type.name==="tableRow"){let m=0;p.forEach((f,b,g)=>{if(n===-1){if(g===t.index(r-1)){n=m;return}m+=f.attrs.colspan||1;}});}}else if(u.type.name==="tableRow")t.node(r-1)?.type.name==="table"&&(l=t.index(r-1));else if(u.type.name==="table"){o=u,i=t.before(r);break}}return !o||i==null||!a||l<0||n<0?null:{table:o,tablePos:i,cell:a,row:l,col:n,rowspan:a.attrs.rowspan||1,colspan:a.attrs.colspan||1}}function k(e){let t=[],o=[],i=0;for(let a=0;a<e.childCount;a++){let l=e.child(a),n=0;l.forEach(r=>{for(;t[a]?.[n];)n++;let u=r.attrs.rowspan||1,p=r.attrs.colspan||1;o.push({data:r,row:a,col:n,rowspan:u,colspan:p});for(let m=a;m<a+u;m++){let f=t[m]??[];t[m]=f;for(let b=n;b<n+p;b++)f[b]=true;}n+=p,i=Math.max(i,n);});}return {anchors:o,totalCols:i}}function B(e,t,o,i,a){let l={...e.attrs},n=a.reduce((p,m)=>p+m,0),r=a$1(a,t,o),u=o!==(e.attrs.colspan||1)||i!==(e.attrs.rowspan||1);return l.colspan=o,l.rowspan=i,l.colwidth=null,n>0&&(l.width=Math.round(r/n*5e3),l.widthType="pct"),u&&(l._originalFormatting=null),l}function D(e,t,o,i){let a=t+1;for(let l=0;l<e.childCount;l++){let n=e.child(l),r=a+1,u=0;for(let p=0;p<n.childCount;p++){let m=n.child(p);if(l===o&&u===i)return r;u+=m.attrs.colspan||1,r+=m.nodeSize;}a+=n.nodeSize;}return null}function O(e,t){let o=e.attrs.width??9360;return Array.isArray(e.attrs.columnWidths)&&e.attrs.columnWidths.length>0?[...e.attrs.columnWidths]:Array.from({length:t},()=>Math.floor(o/Math.max(t,1)))}function j(e$1){let t=M(e$1);return t?{...e(t.rowspan,t.colspan),capturedCellRow:t.row,capturedCellCol:t.col}:null}function V(e,t,o,i,a,l){if(o<1||i<1)return false;let n=M(e);if(!n||!t)return false;let r=n;if(a!=null&&l!=null&&(a!==n.row||l!==n.col)){let{anchors:c}=k(n.table),d=c.find(x=>x.row===a&&x.col===l);if(!d)return false;r={...n,cell:d.data,row:d.row,col:d.col,rowspan:d.rowspan,colspan:d.colspan};}if(o<r.rowspan||i<r.colspan||o===1&&i===1)return false;let{anchors:u,totalCols:p}=k(r.table),m=O(r.table,p),f=b(m,r.col,r.colspan,i),b$1=u.find(c=>c.row===r.row&&c.col===r.col);if(!b$1)return false;let g=c(u,b$1,o,i,r.table.childCount,c=>{if(c)return b$1.data;let d=b$1.data.type.schema.nodes.paragraph.create(),x=B(b$1.data,0,1,1,f);return b$1.data.type.create(x,d)}),T=r.row+r.rowspan,y=Array.from({length:g.newRowCount},(c,d)=>d<T?{...r.table.child(d)?.attrs??{}}:d<r.row+o?{...r.table.child(T-1)?.attrs??{}}:{...r.table.child(d-g.deltaRows)?.attrs??{}}),C=Array.from({length:g.newRowCount},()=>[]);g.anchors.sort((c,d)=>c.row===d.row?c.col-d.col:c.row-d.row).forEach(c=>{let d=B(c.data,c.col,c.colspan,c.rowspan,f);C[c.row].push(c.data.type.create(d,c.data.content));});let z=C.map((c,d)=>r.table.type.schema.nodes.tableRow.create(y[d],c)),F=r.table.type.create({...r.table.attrs,columnWidths:f},z),h=e.tr.replaceWith(r.tablePos,r.tablePos+r.table.nodeSize,F),w=h.doc.nodeAt(r.tablePos);if(w){let c=D(w,r.tablePos,r.row,r.col);c!=null&&(h=h.setSelection(TextSelection.near(h.doc.resolve(c+1))));}return t(h.scrollIntoView()),true}var s=a.getCommands();function J(e,t){return s.insertTable(e,t)}function $(e,t){return s.addRowAbove()(e,t)}function q(e,t){return s.addRowBelow()(e,t)}function G(e,t){return s.deleteRow()(e,t)}function K(e,t){return s.addColumnLeft()(e,t)}function Q(e,t){return s.addColumnRight()(e,t)}function X(e,t){return s.deleteColumn()(e,t)}function Y(e,t){return s.deleteTable()(e,t)}function Z(e,t){return s.selectTable()(e,t)}function ee(e,t){return s.selectRow()(e,t)}function te(e,t){return s.selectColumn()(e,t)}function re(e,t){return s.mergeCells()(e,t)}function oe(e,t){return s.splitCell()(e,t)}function ne(e,t,o){return s.setCellBorder(e,t,o)}function ae(e,t){return s.setTableBorders(e,t)}function le(e,t){return s.removeTableBorders()(e,t)}function ie(e,t,o){return s.setAllTableBorders(o)(e,t)}function se(e,t,o){return s.setOutsideTableBorders(o)(e,t)}function ce(e,t,o){return s.setInsideTableBorders(o)(e,t)}function de(e){return s.setCellVerticalAlign(e)}function ue(e){return s.setCellMargins(e)}function pe(e){return s.setCellTextDirection(e)}function me(){return s.toggleNoWrap()}function fe(e,t){return s.setRowHeight(e,t)}function be(){return s.toggleHeaderRow()}function ge(){return s.distributeColumns()}function Ce(){return s.autoFitContents()}function Te(e){return s.setTableProperties(e)}function he(e){return s.applyTableStyle(e)}function ye(e){return s.setCellFillColor(e)}function xe(e){return s.setTableBorderColor(e)}function Se(e){return s.setTableBorderWidth(e)}var we=a.getCommands();function ve(e,t,o){return we.setImageWrapType(e,t,o)}function Ee(e){return (t,o)=>{let{from:i,to:a,empty:l}=t.selection;if(l)return false;let n=t.schema.marks.comment;if(!n)return false;if(o){let r=t.tr.addMark(i,a,n.create({commentId:e}));o(r);}return true}}function Ae(e){return (t,o)=>{let i=t.schema.marks.comment;if(!i)return false;if(o){let a=t.tr;t.doc.descendants((l,n)=>{if(l.isText)for(let r of l.marks)r.type===i&&r.attrs.commentId===e&&a.removeMark(n,n+l.nodeSize,r);}),a.steps.length>0&&o(a);}return true}}function I(e,t,o){return (i,a)=>{let l=i.schema.marks.insertion,n=i.schema.marks.deletion;if(!l&&!n)return false;let r=o==="accept"?l:n,u=o==="accept"?n:l;if(a){let p=i.tr,m=[];i.doc.nodesBetween(e,t,(f,b)=>{if(!f.isText)return;let g=b+f.nodeSize,T=Math.max(e,b),y=Math.min(t,g);u&&f.marks.some(C=>C.type===u)&&m.push({from:T,to:y}),r&&f.marks.some(C=>C.type===r)&&p.removeMark(T,y,r);});for(let f of m.reverse())p.delete(f.from,f.to);p.steps.length>0&&a(p);}return true}}function P(e,t){return I(e,t,"accept")}function W(e,t){return I(e,t,"reject")}function Re(){return (e,t)=>P(0,e.doc.content.size)(e,t)}function ke(){return (e,t)=>W(0,e.doc.content.size)(e,t)}function L(e,t){let o=e.schema.marks.insertion,i=e.schema.marks.deletion;if(!o&&!i)return null;let a=null;return e.doc.descendants((l,n)=>{if(a)return false;if(l.isText&&!(n+l.nodeSize<=t)){for(let r of l.marks)if(r.type===o||r.type===i)return a={from:Math.max(n,t),to:n+l.nodeSize,type:r.type===o?"insertion":"deletion"},false}}),!a&&t>0?L(e,0):a}function N(e,t){let o=e.schema.marks.insertion,i=e.schema.marks.deletion;if(!o&&!i)return null;let a=null;return e.doc.descendants((l,n)=>{if(l.isText){if(n>=t)return false;for(let r of l.marks)(r.type===o||r.type===i)&&(a={from:n,to:n+l.nodeSize,type:r.type===o?"insertion":"deletion"});}}),!a&&t<e.doc.content.size?N(e,e.doc.content.size):a}export{be as A,ge as B,Ce as C,Te as D,he as E,ye as F,xe as G,Se as H,ve as I,Ee as J,Ae as K,P as L,W as M,Re as N,ke as O,L as P,N as Q,j as a,V as b,J as c,$ as d,q as e,G as f,K as g,Q as h,X as i,Y as j,Z as k,ee as l,te as m,re as n,oe as o,ne as p,ae as q,le as r,ie as s,se as t,ce as u,de as v,ue as w,pe as x,me as y,fe as z};
@@ -1 +0,0 @@
1
- 'use strict';var chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js');var Xt=1440,q=96,ft=Xt/q,ht=11,gt="Calibri",Yt=1,jt=.8,Gt=.2,z=null;function $(){if(!z){let t=typeof document<"u"?document.createElement("canvas"):null;if(!t)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(z=t.getContext("2d"),!z)throw new Error("Failed to get 2D context from canvas")}return z}function Kt(){z=null;}var ct=new Map;function mt(t){let e=ct.get(t);if(e===void 0){let i=chunkN3Y5BUKV_js.a(t);e={cssFallback:i.cssFallback,singleLineRatio:i.singleLineRatio},ct.set(t,e);}return e}function Vt(t){return mt(t).cssFallback}function D(t){let e=[];t.italic&&e.push("italic"),t.bold&&e.push("bold");let i=t.fontSize??ht,n=W(i);e.push(`${n}px`);let r=t.fontFamily??gt;return e.push(Vt(r)),e.join(" ")}function A(t){let e=t.fontSize??ht,i=t.fontFamily??gt,n=W(e),r=n*jt,o=n*Gt,u=n*Yt;try{let g=$();g.font=D(t);let c=g.measureText("Hg");typeof c.actualBoundingBoxAscent=="number"&&typeof c.actualBoundingBoxDescent=="number"&&(r=c.actualBoundingBoxAscent,o=c.actualBoundingBoxDescent);}catch{}u=Math.max(u,r+o);let f=mt(i).singleLineRatio;return {fontSize:e,ascent:r,descent:o,lineHeight:u,fontFamily:i,singleLineRatio:f}}function S(t,e){if(!t)return 0;let i=$();i.font=D(e);let r=i.measureText(t).width;return e.letterSpacing&&t.length>1&&(r+=e.letterSpacing*(t.length-1)),r}function qt(t,e){let i=S(t,e),n=A(e);return {width:i,height:n.ascent+n.descent,ascent:n.ascent,descent:n.descent}}function J(t,e){let i=A(e);if(!t)return {width:0,charWidths:[],metrics:i};let n=$();n.font=D(e);let r=e.letterSpacing??0,o=[],u=0;for(let f=0;f<t.length;f++){let g=t[f],b=n.measureText(g).width;r&&f<t.length-1&&(b+=r),o.push(b),u+=b;}return {width:u,charWidths:o,metrics:i}}function Jt(t,e){if(e.length===0||t<=0)return 0;let i=0;for(let n=0;n<e.length;n++){let r=e[n],o=i+r/2;if(t<=o)return n;i+=r;}return e.length}function Qt(t,e){if(t<=0||e.length===0)return 0;let i=Math.min(t,e.length),n=0;for(let r=0;r<i;r++)n+=e[r];return n}function te(t){return t/ft}function ee(t){return Math.round(t*ft)}function W(t){return t*q/72}function dt(t){return t*72/q}function ne(t){return W(t/2)}function ie(t){return dt(t)*2}function re(t,e){return t.map(i=>{let n=i.x-i.distLeft,r=i.x+i.width+i.distRight,o=i.y-i.distTop,u=i.y+i.height+i.distBottom,f=0,g=0,c,b=i.wrapText??"bothSides";b==="right"?f=Q(r):b==="left"?g=tt(n,e):b==="largest"?{leftMargin:f,rightMargin:g}=le(n,r,e):oe(n,r,e)?c=se(n,r,e):i.side==="left"?f=Q(r):g=tt(n,e);let p=nt(f,g,e);return {leftMargin:p.leftMargin,rightMargin:p.rightMargin,topY:o,bottomY:u,segments:c}})}function et(t,e){return t.segments?.reduce((n,r)=>n+r.availableWidth,0)??e-t.leftMargin-t.rightMargin}function N(t,e,i,n){if(!i||i.length===0)return {leftMargin:0,rightMargin:0};let r=0,o=0,u,f=n+t,g=f+e;for(let c of i)if(!(g<=c.topY||f>=c.bottomY)){if(c.segments?.length){u=u?ae(u,c.segments):c.segments;continue}r=Math.max(r,c.leftMargin),o=Math.max(o,c.rightMargin);}return {leftMargin:r,rightMargin:o,segments:u}}function ae(t,e){let i=[];for(let n of t)for(let r of e){let o=Math.max(n.leftOffset,r.leftOffset),u=Math.min(n.leftOffset+n.availableWidth,r.leftOffset+r.availableWidth);u>o&&i.push({leftOffset:o,availableWidth:u-o});}return i}function oe(t,e,i){return t>0&&e<i}function se(t,e,i){return [{leftOffset:0,availableWidth:Math.max(0,t)},{leftOffset:Math.max(0,e),availableWidth:Math.max(0,i-e)}].filter(n=>n.availableWidth>1)}function le(t,e,i){let n=Math.max(0,t);return Math.max(0,i-e)>=n?{leftMargin:Q(e),rightMargin:0}:{leftMargin:0,rightMargin:tt(t,i)}}function Q(t){return Math.max(0,t)}function tt(t,e){return Math.max(0,e-t)}function it(t){return t/1440*96}function rt(t){return t/96*1440}function ue(t){let{explicitStops:e=[],defaultTabInterval:i=720,leftIndent:n=0}=t,r=e.filter(p=>p.val!=="clear").filter(p=>p.pos>=n),o=e.filter(p=>p.val==="clear").map(p=>p.pos),u=r.reduce((p,R)=>Math.max(p,R.pos),0),f=[...r];n>0&&!r.some(p=>p.pos<=n)&&(o.some(R=>Math.abs(R-n)<20)||f.push({val:"start",pos:n,leader:"none"}));let c=u>0?Math.max(u,n):n,b=n+14400;for(;c<b;){c+=i;let p=r.some(H=>Math.abs(H.pos-c)<20),R=o.some(H=>Math.abs(H-c)<20),Y=n>0&&Math.abs(c-n)<20;!p&&!R&&!Y&&f.push({val:"start",pos:c,leader:"none"});}return f.sort((p,R)=>p.pos-R.pos)}function pt(t,e,i={}){let{defaultTabInterval:n=720}=e,r=rt(t),u=ue(e).find(c=>c.pos>r);if(!u){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}let g=it(u.pos)-t;if(u.val==="center")g-=(i.followingWidth??0)/2;else if(u.val==="end")g-=i.followingWidth??0;else if(u.val==="decimal")g-=i.decimalPrefixWidth??0;else if(u.val==="bar")return {width:0,leader:u.leader,alignment:"bar"};if(g<1){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}return {width:g,leader:u.leader,alignment:u.val}}var y=11,O="Calibri",ce=1.15,X=1,k=.5;function bt(t,e,i,n=false){let r=1,o=t.length,u=0;for(;r<=o;){let f=r+o>>>1;S(t.slice(0,f),e)<=i?(u=f,r=f+1):o=f-1;}return n&&u===0?1:u}function Z(t){return {fontFamily:t.fontFamily??O,fontSize:t.fontSize??y,bold:t.bold,italic:t.italic,letterSpacing:t.letterSpacing}}function Ft(t,e,i){let n=W(t),r=i?.ascent??n*.8,o=i?.descent??n*.2,u=i?.singleLineRatio??1.15,f=n*u,g;if(e?.lineRule==="exact"&&e.line!==void 0)g=e.line;else if(e?.lineRule==="atLeast"&&e.line!==void 0){let c=f*X;g=Math.max(e.line,c);}else e?.line!==void 0&&e?.lineUnit==="multiplier"?g=f*e.line:e?.line!==void 0&&e?.lineUnit==="px"?g=e.line:g=f*X;return {ascent:r,descent:o,lineHeight:g}}function xt(t,e,i){let n=A({fontSize:t,fontFamily:i??O}),r=Ft(t,e,n),o=e?.lineRule??"auto";if(o==="auto"||o==="atLeast"){let u=W(t),f=Math.max(r.lineHeight,u*ce);if(f!==r.lineHeight)return {...r,lineHeight:f}}return r}function U(t){return t.kind==="text"}function Tt(t){return t.kind==="tab"}function Mt(t){return t.kind==="image"}function Ct(t){return t.kind==="lineBreak"}function St(t){return t.kind==="field"}function fe(t){return !t.text||t.text.replace(/\u00a0/g," ").trim().length===0}function he(t,e){let i=0;for(let n=e+1;n<t.length;n++){let r=t[n];if(Tt(r)||Ct(r))break;if(U(r))i+=S(r.text||"",Z(r));else if(St(r)){let o={fontFamily:r.fontFamily??O,fontSize:r.fontSize??y,bold:r.bold,italic:r.italic};i+=S(r.fallback||"1",o);}else Mt(r)&&(i+=r.width||0);}return i}function ge(t){let e=[];for(let i=0;i<t.length;i++){let n=t[i];(n===" "||n==="-"||n===" ")&&e.push(i+1);}return e}function nt(t,e,i){let n=Math.max(1,i),r=Math.max(0,t),o=Math.max(0,e);return r>=n||o>=n||r+o>=n?{leftMargin:0,rightMargin:0}:{leftMargin:r,rightMargin:o}}function Rt(t,e,i){let n=t.runs,r=t.attrs,o=r?.spacing,u=i?.floatingZones,f=i?.paragraphYOffset??0,g=r?.indent,c=g?.left??0,b=g?.right??0,p=(g?.firstLine??0)-(g?.hanging??0),R=Math.max(1,e-c-b),Y=Math.max(1,R-p),H=0,Zt=W(y)*X,B=N(0,Zt,u,f),Bt=Math.max(1,et(B,Y)),C=[];if(n.length===0){if(r?.suppressEmptyParagraphHeight)return C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:C,totalHeight:0};let s=r?.defaultFontSize??y,l=r?.defaultFontFamily??O,m=xt(s,o,l);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...m});let h=m.lineHeight;return o?.before&&(h+=o.before),o?.after&&(h+=o.after),{kind:"paragraph",lines:C,totalHeight:h}}if(n.length===1&&U(n[0])&&fe(n[0])){let s=n[0],l=s.fontSize??r?.defaultFontSize??y,m=s.fontFamily??r?.defaultFontFamily??O,h=xt(l,o,m);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...h});let d=h.lineHeight;return o?.before&&(d+=o.before),o?.after&&(d+=o.after),{kind:"paragraph",lines:C,totalHeight:d}}let a={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:Bt,leftOffset:B.leftMargin,rightOffset:B.rightMargin,segmentZones:B.segments},ot=()=>{let s=Ft(a.maxFontSize,o,a.maxFontMetrics),l={...s};if(a.maxImageHeightPx>l.lineHeight){let h=a.maxImageHeightPx,d=l.descent;l.lineHeight=h+d*2,l.ascent=h+d;}let m={fromRun:a.fromRun,fromChar:a.fromChar,toRun:a.toRun,toChar:a.toChar,width:a.width,...l};a.leftOffset>0&&(m.leftOffset=a.leftOffset),a.rightOffset>0&&(m.rightOffset=a.rightOffset),a.segmentZones?.length&&(m.segments=$t(m,a.segmentZones)),C.push(m),H+=s.lineHeight;},$t=(s,l)=>{let m=l[0],h=l[1];if(!m)return;if(!h||s.width<=m.availableWidth+k)return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:s.toChar,width:s.width,leftOffset:m.leftOffset,availableWidth:m.availableWidth}];if(s.fromRun!==s.toRun)return;let d=n[s.fromRun];if(!d||!U(d))return;let P=d,x=P.text.slice(s.fromChar,s.toChar),T=Z(P),F=bt(x,T,m.availableWidth);if(F<=0||F>=x.length)return;let w=s.fromChar+F,M=x.slice(0,F),G=x.slice(F);return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:w,width:S(M,T),leftOffset:m.leftOffset,availableWidth:m.availableWidth},{fromRun:s.fromRun,fromChar:w,toRun:s.toRun,toChar:s.toChar,width:S(G,T),leftOffset:h.leftOffset,availableWidth:h.availableWidth}]},L=(s,l)=>{ot();let m=W(y)*X,h=N(H,m,u,f),d=Math.max(1,et(h,R));a={fromRun:s,fromChar:l,toRun:s,toChar:l,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:d,leftOffset:h.leftMargin,rightOffset:h.rightMargin,segmentZones:h.segments};},_=s=>{let l=s.fontSize??y;(!a.maxFontMetrics||l>a.maxFontSize)&&(a.maxFontSize=l,a.maxFontMetrics=A(s));};for(let s=0;s<n.length;s++){let l=n[s];if(Ct(l)){a.toRun=s,a.toChar=0,L(s+1,0);continue}if(Tt(l)){let m=Z(l);_(m);let h=he(n,s),d=a.width+(a.leftOffset??0),P=C.length===0,x=c+(P?p:0)+d,T={explicitStops:r?.tabs,leftIndent:rt(c)},F=pt(x,T,{followingWidth:h}).width;if(d+F>a.availableWidth+k){let w=a.availableWidth-d-h;w>1&&(F=w);}a.width+F>a.availableWidth+k&&(L(s,0),_(m)),a.width+=F,a.toRun=s,a.toChar=1;continue}if(Mt(l)){let m=l.wrapType,h=l.displayMode==="float"||chunkJFZIXFRC_js.c(m);if(l.position&&h){a.toRun=s,a.toChar=1;continue}if(m==="topAndBottom"||l.displayMode==="block"){a.width>0&&L(s,0);let x=l.height,T=l.distTop??6,F=l.distBottom??6;a.toRun=s,a.toChar=1,a.maxImageHeightPx=x+T+F,L(s+1,0);continue}let d=l.width,P=l.height;P>a.maxImageHeightPx&&(a.maxImageHeightPx=P),a.width+d>a.availableWidth+k&&L(s,0),a.width+=d,a.toRun=s,a.toChar=1;continue}if(St(l)){let m=l.fallback||"1",h={fontFamily:l.fontFamily??O,fontSize:l.fontSize??y,bold:l.bold,italic:l.italic};_(h);let d=S(m,h);a.width>0&&a.width+d>a.availableWidth+k&&(L(s,0),_(h)),a.width+=d,a.toRun=s,a.toChar=1;continue}if(U(l)){let m=l,h=m.text,d=Z(m);if(_(d),!h||h.length===0){a.toRun=s,a.toChar=0;continue}let P=ge(h),x=0;for(;x<h.length;){let T=h.length;for(let M of P)if(M>x){T=M;break}let F=h.slice(x,T),w=S(F,d);if(w>a.availableWidth+k){let M=0;for(;M<F.length;){let G=a.availableWidth-a.width+k,Dt=F.slice(M),K=bt(Dt,d,G);if(K===0){if(a.width>0){L(s,x+M),_(d);continue}K=1;}let V=M+K,Nt=F.slice(M,V),Ut=S(Nt,d);a.width+=Ut,a.toRun=s,a.toChar=x+V,M=V,M<F.length&&(L(s,x+M),_(d));}x=T;continue}a.width>0&&a.width+w>a.availableWidth+k&&(L(s,x),_(d)),a.width+=w,a.toRun=s,a.toChar=T,x=T;}}}ot();let st=C.reduce((s,l)=>s+l.lineHeight,0);r?.listMarker&&!r?.listMarkerHidden&&(g?.hanging??0)===0&&C.length>0&&(st+=C[0].lineHeight);let j=st;return o?.before&&(j+=o.before),o?.after&&(j+=o.after),{kind:"paragraph",lines:C,totalHeight:j}}function me(t,e){return t.map(i=>Rt(i,e))}function de(t){let e=Z(t);return J(t.text,e).charWidths}var yt=2e4,v=new Map;function Lt(t,e,i){return `${t}|${e}|${i||0}`}function Pt(){for(;v.size>yt;){let t=v.keys().next().value;if(t===void 0)break;v.delete(t);}}function pe(t,e,i=0){let n=Lt(t,e,i),r=v.get(n);if(r!==void 0)return v.delete(n),v.set(n,r),r.width}function be(t,e,i,n){let r=Lt(t,e,i);v.set(r,{width:n}),Pt();}function wt(){v.clear();}function xe(t){!Number.isFinite(t)||t<=0||(yt=t,Pt());}function Wt(){return v.size}var Fe=1e3,vt=Fe,E=new Map;function Et(t,e,i=false,n=false){return `${t}|${e}|${i}|${n}`}function It(){for(;E.size>vt;){let t=E.keys().next().value;if(t===void 0)break;E.delete(t);}}function Te(t,e,i=false,n=false){let r=Et(t,e,i,n),o=E.get(r);if(o!==void 0)return E.delete(r),E.set(r,o),o}function Me(t,e,i,n,r){let o=Et(t,e,i,n);E.set(o,r),It();}function _t(){E.clear();}function Ce(t){!Number.isFinite(t)||t<=0||(vt=t,It());}function kt(){return E.size}var Se=5e3,Ht=Se,I=new Map;function at(t){let e=[];for(let n of t.runs)n.kind==="text"?e.push(`t:${n.text}|${n.fontFamily}|${n.fontSize}|${n.bold}|${n.italic}`):n.kind==="tab"?e.push(`tab:${n.width}`):n.kind==="image"?e.push(`img:${n.width}x${n.height}`):n.kind==="lineBreak"&&e.push("br");let i=t.attrs;if(i){i.alignment&&e.push(`align:${i.alignment}`),i.indent&&e.push(`indent:${i.indent.left}|${i.indent.right}|${i.indent.firstLine}|${i.indent.hanging}`),i.spacing&&e.push(`spacing:${i.spacing.before}|${i.spacing.after}|${i.spacing.line}|${i.spacing.lineRule}`),i.defaultFontSize!=null&&e.push(`dfs:${i.defaultFontSize}`),i.defaultFontFamily!=null&&e.push(`dff:${i.defaultFontFamily}`);let n=i.borders;if(n){let r=o=>o?`${o.width??""},${o.style??""},${o.color??""}`:"";e.push(`bdr:${r(n.top)}|${r(n.bottom)}|${r(n.left)}|${r(n.right)}`);}i.suppressEmptyParagraphHeight&&e.push("sup");}return e.join("||")}function At(){for(;I.size>Ht;){let t=I.keys().next().value;if(t===void 0)break;I.delete(t);}}function Re(t,e){let i=at(t),n=I.get(i);if(n!==void 0&&n.maxWidth===e)return I.delete(i),I.set(i,n),n.measure}function ye(t,e,i){let n=at(t);I.set(n,{measure:i,maxWidth:e}),At();}function Ot(){I.clear();}function Le(t){!Number.isFinite(t)||t<=0||(Ht=t,At());}function zt(){return I.size}function Pe(){wt(),_t(),Ot();}function we(){return Wt()+kt()+zt()}exports.A=Wt;exports.B=Te;exports.C=Me;exports.D=_t;exports.E=Ce;exports.F=kt;exports.G=at;exports.H=Re;exports.I=ye;exports.J=Ot;exports.K=Le;exports.L=zt;exports.M=Pe;exports.N=we;exports.a=$;exports.b=Kt;exports.c=D;exports.d=A;exports.e=S;exports.f=qt;exports.g=J;exports.h=Jt;exports.i=Qt;exports.j=te;exports.k=ee;exports.l=W;exports.m=dt;exports.n=ne;exports.o=ie;exports.p=re;exports.q=N;exports.r=pt;exports.s=nt;exports.t=Rt;exports.u=me;exports.v=de;exports.w=pe;exports.x=be;exports.y=wt;exports.z=xe;
@@ -1 +0,0 @@
1
- import {f,b,c,d,e,a,p,m as m$1}from'./chunk-UCZVMHB5.mjs';import {g,i,k,l,m}from'./chunk-LDKESXXK.mjs';import {o}from'./chunk-6LOYA7G5.mjs';function W(t,r){let e=j(r),s=new RegExp(`<w:p[\\s][^>]*w14:paraId="${e}"`,"g"),o=[],i;for(;(i=s.exec(t))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<t.length;){let f=t.indexOf("<",n);if(f===-1)break;if(t.startsWith("<w:p",f)){let w=t[f+4];if(w===">"||w===" "||w==="/"){let u=t.indexOf(">",f);if(u===-1)break;if(t[u-1]==="/"){if(a===0)return {start:l,end:u+1};n=u+1;}else a++,n=u+1;}else n=f+1;}else if(t.startsWith("</w:p>",f)){if(a--,a===0)return {start:l,end:f+6};n=f+6;}else n=f+1;}return null}function L(t,r){let e=W(t,r);return e?t.substring(e.start,e.end):null}function Y(t){let r=0,e=/<w:p[\s>]/g,s;for(;(s=e.exec(t))!==null;){let o=s.index,i=t[o+4];(i===">"||i===" ")&&r++;}return r}function B(t){let r=new Map,e=/w14:paraId="([^"]+)"/g,s;for(;(s=e.exec(t))!==null;){let o=s[1];r.set(o,(r.get(o)||0)+1);}return r}function V(t,r,e){if(e.size===0)return {safe:true};let s=B(t),o=B(r);for(let n of e){let a=s.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-original: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-original: ${n}`}}for(let n of e){let a=o.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${n}`}}let i=Y(t),l=Y(r);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function H(t,r,e){if(e.size===0)return t;if(!V(t,r,e).safe)return null;let o=[];for(let l of e){let n=W(t,l);if(!n)return null;let a=L(r,l);if(!a)return null;o.push({start:n.start,end:n.end,newXml:a});}o.sort((l,n)=>n.start-l.start);let i=t;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function j(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){for(let r of t)if(r.type==="paragraph"){for(let e of r.content)if(e.type==="run"){for(let s of e.content)if(s.type==="drawing"&&s.image?.src?.startsWith("data:")&&!s.image?.rId)return true}else if(e.type==="hyperlink"&&e.href&&!e.rId&&!e.anchor)return true}else if(r.type==="table"){for(let e of r.rows)for(let s of e.cells)if(Z(s.content))return true}return false}async function nt(t,r,e$1){let{changedParaIds:s,structuralChange:o$1,hasUntrackedChanges:i$1}=e$1;if(o$1||i$1||!r)return null;let l$1=t.package.document.content;if(Z(l$1))return null;let n=t.package.document.comments,a$1=n&&n.length>0,f$1=f(t);try{let u=await(await import('jszip')).default.loadAsync(r),c$1=new Map;if(s.size>0){let d=u.file("word/document.xml");if(!d)return null;let p=await d.async("text"),y=g(t),g$1=H(p,y,s);if(!g$1)return null;c$1.set("word/document.xml",g$1);}if(a$1){let{xml:d$1,paraInfos:p}=i(n);c$1.set("word/comments.xml",d$1);let y=k(p);y&&c$1.set("word/commentsExtended.xml",y);let g=l(p);g&&c$1.set("word/commentsIds.xml",g);let I=m(p,n);I&&c$1.set("word/commentsExtensible.xml",I);let S=u.file("[Content_Types].xml");if(S){let m=c$1.get("[Content_Types].xml")??await S.async("text"),x=!1,C=[["/word/comments.xml",b],["/word/commentsExtended.xml",c],["/word/commentsIds.xml",d],["/word/commentsExtensible.xml",e]];for(let[h,b]of C)m.includes(h)||(m=m.replace("</Types>",`<Override PartName="${h}" ContentType="${b}"/></Types>`),x=!0);x&&c$1.set("[Content_Types].xml",m);}let T="word/_rels/document.xml.rels",N=u.file(T);if(N){let m=c$1.get(T)??await N.async("text"),x=!1,C=[["comments.xml",o.comments],["commentsExtended.xml",o.commentsExtended],["commentsIds.xml",o.commentsIds],["commentsExtensible.xml",o.commentsExtensible]];for(let[h,b]of C)if(!m.includes(h)){let J=a(m);m=m.replace("</Relationships>",`<Relationship Id="rId${J+1}" Type="${b}" Target="${h}"/></Relationships>`),x=!0;}x&&c$1.set(T,m);}}for(let[d,p]of f$1)c$1.set(d,p);let P=u.file("docProps/core.xml");if(P){let d=await P.async("text");c$1.set("docProps/core.xml",p(d,{updateModifiedDate:!0}));}return await m$1(u,c$1)}catch{return null}}export{V as a,H as b,nt as c};
@@ -1 +0,0 @@
1
- 'use strict';var chunkTYYOBPNK_js=require('./chunk-TYYOBPNK.js'),chunk44RUAQA2_js=require('./chunk-44RUAQA2.js'),chunkBKHQA6JJ_js=require('./chunk-BKHQA6JJ.js'),chunkWZP6ZHBR_js=require('./chunk-WZP6ZHBR.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function N(e,t,a){if(!(!e||e<=0)){if(t==="pct")return a*e/5e3;if(!t||t==="dxa"||t==="auto")return chunk4Q2IP5FW_js.c(e)}}function q(e){return Math.max(1,...e.rows.map(t=>t.cells.reduce((a,o)=>a+Math.max(1,o.colSpan??1),0)))}function J(e,t,a){if(t<=0)return [];let o=a>0?a/t:0;if(e.length===0)return Array(t).fill(o);let n=e.slice(0,t),r=t-n.length;if(r>0){let u=n.filter(g=>g>0),c=u.length>0?u.reduce((g,h)=>g+h,0)/u.length:o;n=n.concat(Array(r).fill(c));}let s=n.reduce((u,c)=>u+(c>0?c:0),0),i=n.filter(u=>u<=0).length;if(s<=0)return Array(t).fill(o);if(i===0)return n;let l=Math.max(0,a-s),f=l>0?l/i:s/Math.max(1,t-i);return n.map(u=>u>0?u:f)}function K(e,t){if(e.pages.length===0)return null;let a=e.pageGap??0,o=0,n=null,r=1/0;for(let s=0;s<e.pages.length;s++){let i=e.pages[s],l=i.size?.h??e.pageSize.h,f=o,u=f+l;if(t.y>=f&&t.y<u)return {pageIndex:s,page:i,pageY:t.y-f};let c=f+l/2,g=Math.abs(t.y-c);g<r&&(r=g,n=s),o=u+a;}if(n!==null){let s=e.pages[n],i=D(e,n);return {pageIndex:n,page:s,pageY:Math.max(0,Math.min(t.y-i,s.size?.h??e.pageSize.h))}}return null}function D(e,t){let a=e.pageGap??0,o=0;for(let n=0;n<t&&n<e.pages.length;n++){let s=e.pages[n].size?.h??e.pageSize.h;o+=s+a;}return o}function Ie(e,t){return K(e,{y:t})?.pageIndex??null}function Q(e,t){return e.findIndex(a=>a.id===t)}function Be(e,t){let a=0;for(let o=e.fromLine;o<e.toLine&&o<t.lines.length;o++)a+=t.lines[o].lineHeight;return a}function ce(e,t,a,o){let n=[...e.page.fragments].sort((r,s)=>{let i=r.y-s.y;return Math.abs(i)>.5?i:r.x-s.x});for(let r of n){let s=Q(t,r.blockId);if(s===-1)continue;let i=t[s],l=a[s];if(!i||!l)continue;let f;if(r.kind==="paragraph"){if(i.kind!=="paragraph"||l.kind!=="paragraph")continue;f=Be(r,l);}else if(r.kind==="table")f=r.height;else if(r.kind==="image")f=r.height;else continue;let u=o.x>=r.x&&o.x<=r.x+r.width,c=o.y>=r.y&&o.y<=r.y+f;if(u&&c)return {fragment:r,block:i,measure:l,pageIndex:e.pageIndex,localX:o.x-r.x,localY:o.y-r.y}}return null}function Re(e,t,a,o){for(let n of e.page.fragments){if(n.kind!=="image")continue;let r=Q(t,n.blockId);if(r===-1)continue;let s=t[r],i=a[r];if(!s||!i)continue;let l=o.x>=n.x&&o.x<=n.x+n.width,f=o.y>=n.y&&o.y<=n.y+n.height;if(l&&f)return {fragment:n,block:s,measure:i,pageIndex:e.pageIndex,localX:o.x-n.x,localY:o.y-n.y}}return null}function ue(e,t,a,o){for(let n of e.page.fragments){if(n.kind!=="table")continue;let r=n,s=o.x>=r.x&&o.x<=r.x+r.width,i=o.y>=r.y&&o.y<=r.y+r.height;if(!s||!i)continue;let l=Q(t,r.blockId);if(l===-1)continue;let f=t[l],u=a[l];if(!f||f.kind!=="table"||!u||u.kind!=="table")continue;let c=f,g=u,h=o.x-r.x,x=o.y-r.y,d=r.headerRowCount??0,p=d>0&&r.continuesFromPrev?chunk44RUAQA2_js.r(g,d):0,m=0,b=-1;if(g.rows.length===0||c.rows.length===0)continue;if(p>0&&x<p){let T=0;for(let w=0;w<d&&w<g.rows.length;w++){let E=g.rows[w];if(x>=T&&x<T+E.height){b=w;break}T+=E.height;}b===-1&&(b=0);}else {let T=x-p;for(let w=r.fromRow;w<r.toRow&&w<g.rows.length;w++){let E=g.rows[w];if(T>=m&&T<m+E.height){b=w;break}m+=E.height;}}if(b===-1&&(b=Math.min(r.toRow-1,g.rows.length-1),b<r.fromRow))continue;let k=g.rows[b],F=c.rows[b];if(!k||!F)continue;let P=0,M=-1;if(k.cells.length===0||F.cells.length===0)continue;for(let T=0;T<k.cells.length;T++){let w=k.cells[T];if(h>=P&&h<P+w.width){M=T;break}P+=w.width;}if(M===-1&&(M=k.cells.length-1,M<0))continue;let H=k.cells[M],R=F.cells[M];if(!H||!R)continue;let y=0;if(p>0&&b<d)for(let T=0;T<b;T++)y+=g.rows[T]?.height??0;else {y=p;for(let T=r.fromRow;T<b;T++)y+=g.rows[T]?.height??0;}let I=0;for(let T=0;T<M;T++)I+=k.cells[T]?.width??0;let C,S;if(R.blocks&&R.blocks.length>0){let T=R.blocks[0],w=H.blocks[0];T.kind==="paragraph"&&w?.kind==="paragraph"&&(C=T,S=w);}let _=h-I,L=x-y;return {fragment:r,block:c,measure:g,pageIndex:e.pageIndex,rowIndex:b,colIndex:M,cellBlock:C,cellMeasure:S,cellLocalX:Math.max(0,_),cellLocalY:Math.max(0,L)}}return null}function Se(e,t,a,o){let n={pageHit:null,fragmentHit:null,tableCellHit:null};if(n.pageHit=K(e,o),!n.pageHit)return n;let r=D(e,n.pageHit.pageIndex),s={x:o.x,y:o.y-r};return n.fragmentHit=ce(n.pageHit,t,a,s),n.fragmentHit?.fragment.kind==="table"&&(n.tableCellHit=ue(n.pageHit,t,a,s)),n}function Le(e){if(e.pages.length===0)return 0;let t=e.pageGap??0,a=0;for(let o=0;o<e.pages.length;o++){let n=e.pages[o];a+=n.size?.h??e.pageSize.h,o<e.pages.length-1&&(a+=t);}return a}function Ee(e,t){return D(e,t)}function Ce(e,t){if(t<0||t>=e.pages.length)return null;let a=D(e,t),n=e.pages[t].size?.h??e.pageSize.h;return {top:a,bottom:a+n}}function Z(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function fe(e,t){let a=[];for(let o=t.fromRun;o<=t.toRun&&o<e.runs.length;o++){let n=e.runs[o];if(n){if(n.kind==="tab"||n.kind==="image"||n.kind==="lineBreak"){a.push(n);continue}if(n.kind==="text"){let r=n.text??"",s=o===t.fromRun,i=o===t.toRun;if(s||i){let l=s?t.fromChar:0,f=i?t.toChar:r.length,u=r.slice(l,f);u.length>0&&a.push({...n,text:u});}else a.push(n);}}}return a}function ge(e,t){let a,o,n=e.pmStart??0,r=0;for(let s=0;s<e.runs.length&&s<=t.toRun;s++){let i=e.runs[s];i&&(s<t.fromRun?i.kind==="text"?r+=(i.text??"").length:(i.kind==="tab"||i.kind==="lineBreak"||i.kind==="image")&&(r+=1):s===t.fromRun&&(r+=t.fromChar,a=n+r,i.kind==="text"&&(r=t.fromChar)));}if(a!==void 0){let s=0;for(let i=t.fromRun;i<=t.toRun&&i<e.runs.length;i++){let l=e.runs[i];if(l)if(l.kind==="text"){let f=l.text??"",u=i===t.fromRun?t.fromChar:0,c=i===t.toRun?t.toChar:f.length;s+=c-u;}else (l.kind==="tab"||l.kind==="lineBreak"||l.kind==="image")&&(s+=1);}o=a+s;}return {pmStart:a,pmEnd:o}}function _e(e,t,a,o){let n=0;for(let r=a;r<o&&r<e.lines.length;r++){let i=e.lines[r].lineHeight;if(t>=n&&t<n+i)return r;n+=i;}return o>a?Math.min(o-1,e.lines.length-1):null}function Ae(e,t,a,o){let{pmStart:n,pmEnd:r}=ge(e,t);if(n===void 0||r===void 0)return {charOffset:0,pmPosition:e.pmStart??0};let s=e.attrs?.alignment??"left",i=0;s==="center"?i=Math.max(0,(o-t.width)/2):s==="right"&&(i=Math.max(0,o-t.width));let l=Math.max(0,a-i);if(l<=0)return {charOffset:0,pmPosition:n};let f=fe(e,t);if(f.length===0)return {charOffset:0,pmPosition:n};let u=0,c=0;for(let h of f){if(h.kind==="tab"){let x=h.width??48,d=u+x;if(l<=d){let p=u+x/2;return l<p?{charOffset:c,pmPosition:n+c}:{charOffset:c+1,pmPosition:n+c+1}}u=d,c+=1;continue}if(h.kind==="image"){let x=h.width,d=u+x;if(l<=d){let p=u+x/2;return l<p?{charOffset:c,pmPosition:n+c}:{charOffset:c+1,pmPosition:n+c+1}}u=d,c+=1;continue}if(h.kind==="lineBreak"){if(l>=u)return {charOffset:c,pmPosition:n+c};c+=1;continue}if(h.kind==="text"){let x=h.text??"";if(x.length===0)continue;let d=Z(h),p=chunkBKHQA6JJ_js.g(x,d),m=u+p.width;if(l<=m){let b=l-u,k=chunkBKHQA6JJ_js.h(b,p.charWidths),F=c+k;return {charOffset:F,pmPosition:n+F}}u=m,c+=x.length;}}return {charOffset:r-n,pmPosition:r}}function $(e){let{fragment:t,block:a,measure:o,localX:n,localY:r}=e;if(t.kind!=="paragraph"||a.kind!=="paragraph"||o.kind!=="paragraph")return null;let s=t,i=a,l=o,f=_e(l,r,s.fromLine,s.toLine);if(f===null)return null;let u=l.lines[f];if(!u)return null;let c=0;for(let k=s.fromLine;k<f;k++)c+=l.lines[k]?.lineHeight??0;let g=i.attrs?.indent,h=g?.left??0,x=g?.right??0,d=Math.max(0,t.width-h-x),p=n-h,{charOffset:m,pmPosition:b}=Ae(i,u,p,d);return {pmPosition:b,charOffset:m,lineIndex:f}}function he(e){let{cellBlock:t,cellMeasure:a,cellLocalX:o,cellLocalY:n}=e;if(!t||!a)return null;let r={fragment:{kind:"paragraph",blockId:t.id,x:0,y:0,width:a.lines.reduce((i,l)=>Math.max(i,l.width),100),fromLine:0,toLine:a.lines.length,height:a.totalHeight},block:t,measure:a,pageIndex:e.pageIndex,localX:o,localY:n};return $(r)?.pmPosition??null}function De(e,t){if(t)return he(t);if(!e)return null;let{fragment:a}=e;return a.kind==="paragraph"?$(e)?.pmPosition??null:a.kind==="image"?a.pmStart??null:null}function de(e,t,a,o){let n=e.pmStart??0,r=e.pmEnd??n;if(a<n||a>r)return null;let s=a-n;for(let i=0;i<t.lines.length;i++){let l=t.lines[i],{pmStart:f,pmEnd:u}=ge(e,l);if(f===void 0||u===void 0)continue;let c=f-n,g=u-n;if(s>=c&&s<=g){let h=s-c,x=fe(e,l),d=0,p=0;for(let m of x)if(m.kind==="tab"){if(h<=p+1)return h<=p?{x:d,lineIndex:i}:{x:d+(m.width??48),lineIndex:i};d+=m.width??48,p+=1;}else if(m.kind==="image"){if(h<=p+1)return h<=p?{x:d,lineIndex:i}:{x:d+m.width,lineIndex:i};d+=m.width,p+=1;}else if(m.kind==="lineBreak"){if(h<=p)return {x:d,lineIndex:i};p+=1;}else if(m.kind==="text"){let b=m.text??"";if(h<=p+b.length){let P=h-p,M=Z(m),H=chunkBKHQA6JJ_js.g(b.slice(0,P),M);return {x:d+H.width,lineIndex:i}}let k=Z(m),F=chunkBKHQA6JJ_js.g(b,k);d+=F.width,p+=b.length;}return {x:d,lineIndex:i}}}return null}function Oe(e,t,a,o,n,r,s){let i=de(e,t,a);if(!i)return null;let l=e.attrs?.alignment??"left",f=e.attrs?.indent,u=f?.left??0,c=f?.right??0,g=Math.max(0,r-u-c),h=t.lines[i.lineIndex];if(!h)return null;let x=0;l==="center"?x=Math.max(0,(g-h.width)/2):l==="right"&&(x=Math.max(0,g-h.width));let d=0;for(let p=s;p<i.lineIndex;p++)d+=t.lines[p]?.lineHeight??0;return {x:o+u+x+i.x,y:n+d,height:h.lineHeight}}function me(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function ee(e,t){return e.findIndex(a=>a.id===t)}function G(e,t){let o=(e.pmStart??0)+1,n=0,r;for(let l=0;l<e.runs.length&&l<=t.toRun;l++){let f=e.runs[l];if(f){if(l<t.fromRun)f.kind==="text"?n+=(f.text??"").length:n+=1;else if(l===t.fromRun){n+=t.fromChar,r=o+n;break}}}r===void 0&&(r=o);let s=0;for(let l=t.fromRun;l<=t.toRun&&l<e.runs.length;l++){let f=e.runs[l];if(f)if(f.kind==="text"){let u=f.text??"",c=l===t.fromRun?t.fromChar:0,g=l===t.toRun?t.toChar:u.length;s+=g-c;}else s+=1;}let i=r+s;return {pmStart:r,pmEnd:i}}function pe(e,t,a,o){let n=[];for(let r=0;r<t.lines.length;r++){let s=t.lines[r],i=G(e,s);i.pmStart===void 0||i.pmEnd===void 0||i.pmEnd>a&&i.pmStart<o&&n.push({line:s,index:r});}return n}function v(e,t,a){let o=G(e,t);return o.pmStart===void 0?0:Math.max(0,a-o.pmStart)}function z(e,t,a,o){let n=0,r=0;for(let s=t.fromRun;s<=t.toRun&&s<e.runs.length;s++){let i=e.runs[s];if(i){if(i.kind==="tab"){let l=i.width??48;if(r+1>=a)return a<=r?n:n+l;n+=l,r+=1;continue}if(i.kind==="image"){let l=i.width;if(r+1>=a)return a<=r?n:n+l;n+=l,r+=1;continue}if(i.kind==="lineBreak"){if(a<=r)return n;r+=1;continue}if(i.kind==="text"){let l=i.text??"",f=s===t.fromRun,u=s===t.toRun,c=f?t.fromChar:0,g=u?t.toChar:l.length,h=l.slice(c,g);if(r+h.length>=a){let p=a-r,m=me(i),b=chunkBKHQA6JJ_js.g(h.slice(0,p),m);return n+b.width}let x=me(i),d=chunkBKHQA6JJ_js.g(h,x);n+=d.width,r+=h.length;}}}return n}function W(e,t){let a=0;for(let o=0;o<t&&o<e.lines.length;o++)a+=e.lines[o].lineHeight;return a}function Xe(e,t,a,o,n){if(o===n)return [];let r=Math.min(o,n),s=Math.max(o,n),i=[];for(let l=0;l<e.pages.length;l++){let f=e.pages[l],u=D(e,l);for(let c of f.fragments){if(c.kind==="paragraph"){let g=ee(t,c.blockId);if(g===-1)continue;let h=t[g],x=a[g];if(!h||h.kind!=="paragraph"||!x||x.kind!=="paragraph")continue;let d=h,p=x,m=c,b=pe(d,p,r,s);for(let{line:k,index:F}of b){if(F<m.fromLine||F>=m.toLine)continue;let P=G(d,k);if(P.pmStart===void 0||P.pmEnd===void 0)continue;let M=Math.max(P.pmStart,r),H=Math.min(P.pmEnd,s);if(M>=H)continue;let R=v(d,k,M),y=v(d,k,H),B=d.attrs?.indent,I=B?.left??0,C=B?.right??0,S=Math.max(0,c.width-I-C),_=z(d,k,R),L=z(d,k,y),T=d.attrs?.alignment??"left",w=0;T==="center"?w=Math.max(0,(S-k.width)/2):T==="right"&&(w=Math.max(0,S-k.width));let E=W(p,F)-W(p,m.fromLine),A=c.x+I+w+Math.min(_,L),V=Math.max(1,Math.abs(L-_)),Y=c.y+E;i.push({x:A,y:Y+u,width:V,height:k.lineHeight,pageIndex:l});}}if(c.kind==="table"){let g=ee(t,c.blockId);if(g===-1)continue;let h=t[g],x=a[g];if(!h||h.kind!=="table"||!x||x.kind!=="table")continue;let d=h,p=x,m=c,b=m.headerRowCount??0,F=b>0&&m.continuesFromPrev?chunk44RUAQA2_js.r(p,b):0;for(let P=m.fromRow;P<m.toRow&&P<d.rows.length;P++){let M=d.rows[P],H=p.rows[P];if(!M||!H)continue;let R=0;for(let y=0;y<M.cells.length;y++){let B=M.cells[y],I=H.cells[y];if(!(!B||!I)){for(let C=0;C<B.blocks.length;C++){let S=B.blocks[C],_=I.blocks[C];if(!S||S.kind!=="paragraph"||!_||_.kind!=="paragraph")continue;let L=S,T=_,w=pe(L,T,r,s),E=0;for(let{line:A,index:V}of w){let Y=G(L,A);if(Y.pmStart===void 0||Y.pmEnd===void 0)continue;let te=Math.max(Y.pmStart,r),ne=Math.min(Y.pmEnd,s);if(te>=ne)continue;let Me=v(L,A,te),ye=v(L,A,ne),re=z(L,A,Me,I.width),oe=z(L,A,ye,I.width),He=W(T,V);i.push({x:m.x+R+Math.min(re,oe),y:m.y+F+E+He+u,width:Math.max(1,Math.abs(oe-re)),height:A.lineHeight,pageIndex:l});}E+=T.totalHeight;}R+=I.width;}}F+=H.height;}}if(c.kind==="image"){let g=c.pmStart??0;(c.pmEnd??g+1)>r&&g<s&&i.push({x:c.x,y:c.y+u,width:c.width,height:c.height,pageIndex:l});}}}return i}function Ye(e,t,a,o){for(let n=0;n<e.pages.length;n++){let r=e.pages[n],s=D(e,n);for(let i of r.fragments){if(i.kind==="paragraph"){let l=ee(t,i.blockId);if(l===-1)continue;let f=t[l],u=a[l];if(!f||f.kind!=="paragraph"||!u||u.kind!=="paragraph")continue;let c=f,g=u,h=i,x=c.pmStart??0,d=c.pmEnd??x;if(o<x||o>d)continue;for(let p=h.fromLine;p<h.toLine;p++){let m=g.lines[p];if(!m)continue;let b=G(c,m);if(!(b.pmStart===void 0||b.pmEnd===void 0)&&o>=b.pmStart&&o<=b.pmEnd){let k=v(c,m,o),F=c.attrs?.indent,P=F?.left??0,M=F?.right??0,H=Math.max(0,i.width-P-M),R=z(c,m,k),y=c.attrs?.alignment??"left",B=0;y==="center"?B=Math.max(0,(H-m.width)/2):y==="right"&&(B=Math.max(0,H-m.width));let I=W(g,p)-W(g,h.fromLine);return {x:i.x+P+B+R,y:i.y+I+s,height:m.lineHeight,pageIndex:n}}}}if(i.kind==="image"){let l=i.pmStart??0,f=i.pmEnd??l+1;if(o>=l&&o<=f){let u=o===l?0:i.width;return {x:i.x+u,y:i.y+s,height:i.height,pageIndex:n}}}}}return null}function ve(e){return e.length<=1?false:new Set(e.map(a=>a.pageIndex)).size>1}function ze(e){let t=new Map;for(let a of e){let o=t.get(a.pageIndex)??[];o.push(a),t.set(a.pageIndex,o);}return t}function We(e){if(e.kind!=="paragraph")return false;let t=e.attrs;return t?!!(t.borders?.top||t.borders?.bottom||t.spacingExplicit?.before||t.spacingExplicit?.after):false}function xe(e){return be(e)}function be(e){let t=new Set;for(let a=1;a<e.length;a++){let o=e[a-1],n=e[a];o.kind==="table"&&n.kind==="paragraph"&&(n.runs.length>0||We(n)||t.add(a));}return e.map((a,o)=>{if(a.kind==="table")return Ge(a);if(a.kind!=="paragraph")return a;let n=t.has(o),r=a.attrs?.spacingExplicit,s=a.attrs?.spacing?.before!=null,i=a.attrs?.spacing?.after!=null,l=s&&!r?.before,f=i&&!r?.after,u=l||f;if(!u&&!n)return a;let c=a.attrs;return u&&c?.spacing&&(c={...c,spacing:{...c.spacing,before:r?.before?c.spacing.before:void 0,after:r?.after?c.spacing.after:void 0}}),n&&(c={...c??{},suppressEmptyParagraphHeight:true}),{...a,attrs:c}})}function Ge(e){let t=false,a=e.rows.map(o=>{let n=false,r=o.cells.map(s=>{let i=be(s.blocks);return i.some((f,u)=>f!==s.blocks[u])?(n=true,{...s,blocks:i}):s});return n?(t=true,{...o,cells:r}):o});return t?{...e,rows:a}:e}function Ue(e){return e?.align??e?.alignment}function ke(e,t,a,o){let n=o.section==="header"?o.margins.header??48:o.pageSize.h-(o.margins.footer??48)-a,r=e.position?.vertical;if(!r)return t;let s=Ue(r),i=r.posOffset!==void 0?chunk4Q2IP5FW_js.e(r.posOffset):void 0;if(r.relativeTo==="page"){if(i!==void 0)return i-n;if(s==="top")return -n;if(s==="bottom")return o.pageSize.h-e.height-n;if(s==="center")return (o.pageSize.h-e.height)/2-n}if(r.relativeTo==="margin"){let l=o.margins.top,f=o.pageSize.h-o.margins.top-o.margins.bottom;if(i!==void 0)return l+i-n;if(s==="top")return l-n;if(s==="bottom")return l+f-e.height-n;if(s==="center")return l+(f-e.height)/2-n}return i!==void 0?t+i:t}function Te(e,t,a,o){let n=0,r=a,s=0;for(let i=0;i<e.length;i++){let l=e[i],f=t[i];if(!(!l||!f)){if(l.kind==="paragraph"&&f.kind==="paragraph"){let u=s,c=u+f.totalHeight;n=Math.min(n,u),r=Math.max(r,c);for(let g of l.runs){if(g.kind!=="image"||!g.position)continue;let h=ke(g,u,a,o);n=Math.min(n,h),r=Math.max(r,h+g.height);}s=c;}else if(l.kind==="table"&&f.kind==="table"){let u=s+f.totalHeight;n=Math.min(n,s),r=Math.max(r,u),s=u;}else if(l.kind==="image"&&f.kind==="image"){let u=s+f.height;n=Math.min(n,s),r=Math.max(r,u),s=u;}else if(l.kind==="textBox"&&f.kind==="textBox"){let u=s+f.height;n=Math.min(n,s),r=Math.max(r,u),s=u;}}}return {visualTop:n,visualBottom:r}}function Ne(e,t,a,o){if(!e||!e.content||e.content.length===0)return;let n=chunkWZP6ZHBR_js.b(e.content,{styles:o.styles??void 0,theme:o.theme??null}),r=chunkTYYOBPNK_js.d(n,{theme:o.theme??void 0});if(r.length===0)return;let s=xe(r),i=o.measureBlocks(s,t),l=i.reduce((c,g)=>g.kind==="paragraph"||g.kind==="table"?c+g.totalHeight:g.kind==="image"||g.kind==="textBox"?c+g.height:c,0),{visualTop:f,visualBottom:u}=Te(r,i,l,a);return {blocks:s,measures:i,height:l,visualTop:f,visualBottom:u}}var Pe=7,Fe=0;function we(e,t){if(e.kind!=="paragraph"||t.kind!=="paragraph")return "totalHeight"in t?t.totalHeight:"height"in t?t.height:0;let a=e.runs.filter(i=>i.kind!=="text"||i.text.length>0);if(!(t.lines.length===1&&a.length>0&&a.every(i=>i.kind==="image")))return t.totalHeight;let n=a.reduce((i,l)=>l.kind==="image"?Math.max(i,l.height):i,0),r=e.attrs?.spacing?.before??0,s=e.attrs?.spacing?.after??0;return r+n+s}function Ve(e){let t=e?.borders?.top?.width??0,a=e?.borders?.bottom?.width??0;return t+a}function je(e,t,a){let o=e.columnWidths??[],n=N(e.width,e.widthType,t),r=q(e),s=n??t;if(e.rows.length>0&&(o=J(o,r,s)),o.length>0&&n){let c=o.reduce((g,h)=>g+h,0);if(c>0&&Math.abs(c-n)>1){let g=n/c;o=o.map(h=>h*g);}}let i=new Map;for(let c=0;c<e.rows.length;c++){let g=e.rows[c];if(!g)continue;let h=0,x=i.get(c)??new Set;for(;x.has(h);)h++;for(let d of g.cells){let p=d.colSpan??1,m=d.rowSpan??1;if(m>1)for(let b=c+1;b<c+m;b++){i.has(b)||i.set(b,new Set);let k=i.get(b);for(let F=0;F<p;F++)k.add(h+F);}for(h+=p;x.has(h);)h++;}}let l=e.rows.map((c,g)=>{let h=0,x=i.get(g)??new Set;for(;x.has(h);)h++;return {cells:c.cells.map(d=>{let p=d.colSpan??1,m=0;for(let P=0;P<p&&h+P<o.length;P++)m+=o[h+P]??0;for(m===0&&(m=(d.width&&d.width>0?d.width:N(d.widthValue,d.widthType,s))??100),h+=p;x.has(h);)h++;let b=d.padding?.left??Pe,k=d.padding?.right??Pe,F=Math.max(1,m-b-k);return {blocks:d.blocks.map(P=>a(P,F)),width:m,height:0,colSpan:d.colSpan,rowSpan:d.rowSpan}}),height:0}});for(let c=0;c<l.length;c++){let g=l[c],h=e.rows[c]?.cells,x=0,d=0;for(let k=0;k<g.cells.length;k++){let F=g.cells[k],P=h?.[k],M=0;for(let y=0;y<F.blocks.length;y++){let B=P?.blocks[y],I=F.blocks[y];!B||!I||(M+=we(B,I));}F.height=M;let H=P?.padding?.top??Fe,R=P?.padding?.bottom??Fe;F.height+=H+R,x=Math.max(x,F.height),d=Math.max(d,Ve(P));}let p=e.rows[c],m=p?.height,b=p?.heightRule;m&&b==="exact"?g.height=m:m?g.height=Math.max(x+d,m):g.height=x+d;}let f=l.reduce((c,g)=>c+g.height,0),u=o.reduce((c,g)=>c+g,0)||n||t;return {kind:"table",rows:l,columnWidths:o,totalWidth:u,totalHeight:f}}var qe=816,Je=1056,Ke=96,Qe=48;function O(e){return Math.round(e/1440*96)}function Ze(e){return {w:e?.pageWidth?O(e.pageWidth):816,h:e?.pageHeight?O(e.pageHeight):1056}}function $e(e){return {top:e?.marginTop?O(e.marginTop):96,right:e?.marginRight?O(e.marginRight):96,bottom:e?.marginBottom?O(e.marginBottom):96,left:e?.marginLeft?O(e.marginLeft):96,header:e?.headerDistance?O(e.headerDistance):48,footer:e?.footerDistance?O(e.footerDistance):48}}function et(e,t){let a={header:null,footer:null,firstHeader:null,firstFooter:null};if(!e?.package)return a;let o=e.package.headers,n=e.package.footers,r=null,s=null,i=null,l=null;if(o&&t?.headerReferences){let f=t.headerReferences.find(c=>c.type==="default");f?.rId&&(r=o.get(f.rId)??null);let u=t.headerReferences.find(c=>c.type==="first");u?.rId&&(i=o.get(u.rId)??null);}if(n&&t?.footerReferences){let f=t.footerReferences.find(c=>c.type==="default");f?.rId&&(s=n.get(f.rId)??null);let u=t.footerReferences.find(c=>c.type==="first");u?.rId&&(l=n.get(u.rId)??null);}return t?.titlePg||(!r&&i&&(r=i),!s&&l&&(s=l)),{header:r,footer:s,firstHeader:i,firstFooter:l}}exports.A=we;exports.B=je;exports.C=qe;exports.D=Je;exports.E=Ke;exports.F=Qe;exports.G=Ze;exports.H=$e;exports.I=et;exports.a=N;exports.b=q;exports.c=J;exports.d=K;exports.e=D;exports.f=Ie;exports.g=ce;exports.h=Re;exports.i=ue;exports.j=Se;exports.k=Le;exports.l=Ee;exports.m=Ce;exports.n=$;exports.o=he;exports.p=De;exports.q=de;exports.r=Oe;exports.s=Xe;exports.t=Ye;exports.u=ve;exports.v=ze;exports.w=xe;exports.x=ke;exports.y=Te;exports.z=Ne;
@@ -1 +0,0 @@
1
- import {d}from'./chunk-5TNMVXDS.mjs';import {q as q$1,g,h}from'./chunk-5N5DBQJV.mjs';import {a as a$2}from'./chunk-7E5VBRDL.mjs';import {r,p,t}from'./chunk-2D3UPAMA.mjs';import {v as v$1}from'./chunk-3GNIP6IX.mjs';import {c as c$1}from'./chunk-2RCMY2GE.mjs';import {b,a,c}from'./chunk-QPFJJPIC.mjs';import {c as c$2}from'./chunk-MOKKS75W.mjs';import {a as a$1}from'./chunk-AMENZY5F.mjs';import {i,e}from'./chunk-VW22RZ6C.mjs';var V={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function lt(e){return e.kind==="paragraph"}function dt(e){return e.kind==="table"}function pt(e){return e.kind==="image"}function ae(e){e.style.position="absolute",e.style.overflow="hidden";}function ct(e,t,n){let o=n.createElement("div");return o.className=`${V.fragment} ${V.paragraph}`,ae(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function gt(e,t,n){let o=n.createElement("div");return o.className=`${V.fragment} ${V.table}`,ae(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function ft(e,t,n){let o=n.createElement("div");return o.className=`${V.fragment} ${V.image}`,ae(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function Ce(e,t,n={}){let o=n.document??document;if(lt(e))return ct(e,t,o);if(dt(e))return gt(e,t,o);if(pt(e))return ft(e,t,o);let r=o.createElement("div");r.className=V.fragment,ae(r);let i=e;return i.blockId!==void 0&&(r.dataset.blockId=String(i.blockId)),i.kind&&(r.dataset.kind=i.kind),r}var E={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function z(e){return e.kind==="text"}function O(e){return e.kind==="tab"}function K(e){return e.kind==="image"}function G(e){return e.kind==="lineBreak"}function Y(e){return e.kind==="field"}function J(e){return !b(e.wrapType)&&e.wrapType!=="topAndBottom"}function U(e){return e.wrapType==="behind"}function v(e){return a(e.wrapType)?true:e.displayMode==="float"}function mt(e){return b(e.wrapType)||e.wrapType==="topAndBottom"?false:c(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}function se(e){return e==="left"?"right":e==="right"?"left":"bothSides"}var Ye={image:"layout-image",imageAnchored:"layout-image-anchored"};function Q(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function ee(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,i=t.cropLeft??0;(n||o||r||i)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${i*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function le(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=Ye.image,e.isAnchored&&a.classList.add(Ye.imageAnchored),a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",e.zIndex!==void 0&&(a.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(a.style.zIndex="-1"),a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let l=i.createElement("img");if(l.src=t.src,l.alt=t.alt??"",l.style.width="100%",l.style.height="100%",l.style.objectFit="contain",l.style.display="block",t.transform&&(l.style.transform=t.transform),l.draggable=false,t.hlinkHref){let d=i.createElement("a");d.href=t.hlinkHref,d.target="_blank",d.rel="noopener noreferrer",d.style.display="block",d.style.width="100%",d.style.height="100%",d.appendChild(l),a.appendChild(d);}else a.appendChild(l);return a}function ht(e,t,n){if(t.fontFamily&&(e.style.fontFamily=a$1(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",i=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=i,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=i;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(i=>!n||!n.has(i));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function j(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function te(e,t,n){let o=t.createElement("span");if(o.className=`${E.run} ${E.text}`,ht(o,e,n),j(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text,r.style.color="inherit",r.style.textDecoration="inherit",e.hyperlink.noDefaultStyle||(e.color||(r.style.color="#0563c1",o.style.color="#0563c1"),e.underline||(r.style.textDecoration="underline")),o.appendChild(r);}else o.textContent=e.text;return o}var ut=1e3;function de(e,t,n,o){let r=t.createElement("span");r.className=`${E.run} ${E.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,j(r,e.pmStart,e.pmEnd);let i=o&&o!=="none"?yt(o):null;if(i){r.style.position="relative",r.textContent="\u200B";let a=t.createElement("span");a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.overflow="hidden",a.style.whiteSpace="nowrap",a.textContent=i.repeat(ut),r.appendChild(a);}else r.textContent="\xA0";return r}function yt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function Xe(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ze(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),i=Math.abs(Math.cos(o));return {w:e*i+t*r,h:e*r+t*i}}function bt(e,t){let n=t.createElement("img");n.className=`${E.run} ${E.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),Q(e)&&ee(n,e);let o=Xe(e.transform);if(o!==0){let r=Ze(e.width,e.height,o),i=t.createElement("span");return i.style.display="inline-block",i.style.position="relative",i.style.width=`${r.w}px`,i.style.height=`${r.h}px`,i.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,j(i,e.pmStart,e.pmEnd),i.appendChild(n),i}return n.style.display="inline-block",n.style.verticalAlign="middle",j(n,e.pmStart,e.pmEnd),n}function Ue(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),Q(e)&&ee(o,e);let r=Xe(e.transform);if(r!==0){let i=Ze(e.width,e.height,r);n.style.height=`${i.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return j(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function pe(e,t){return v(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?Ue(e,t):bt(e,t)}function Re(e,t){let n=t.createElement("br");return n.className=`${E.run} ${E.lineBreak}`,j(n,e.pmStart,e.pmEnd),n}function ce(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={...e,text:o};return te(r,t,n?.resolvedCommentIds)}function Ie(e,t,n){if(z(e))return te(e,t,n?.resolvedCommentIds);if(O(e))return de(e,t,48,void 0);if(K(e))return pe(e,t);if(G(e))return Re(e,t);if(Y(e)&&n)return ce(e,t,n);let o=t.createElement("span");return o.className=E.run,o}function Je(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let i=o[r];if(i)if(z(i)){let a=r===t.fromRun?t.fromChar:0,l=r===t.toRun?t.toChar:i.text.length;if(a>0||l<i.text.length){let d=i.text.slice(a,l);n.push({...i,text:d,pmStart:i.pmStart!==void 0?i.pmStart+a:void 0,pmEnd:i.pmStart!==void 0?i.pmStart+l:void 0});}else n.push(i);}else n.push(i);}return n}function qe(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function xt(e){return {val:e.val,pos:e.pos,leader:e.leader}}function St(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let i=e[r];if(z(i))o+=i.text;else if(Y(i))i.fieldType==="PAGE"&&n?o+=String(n.pageNumber):i.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=i.fallback??"";else if(O(i)||G(i))break}return o}var Tt=.5;function wt(e,t,n,o){let r=0;for(let i=t+1;i<e.length;i++){let a=e[i];if(O(a)||G(a))break;if(z(a))r+=n(a.text||"",a.fontSize,a.fontFamily,a.bold,a.italic);else if(Y(a)){let l;a.fieldType==="PAGE"&&o?l=String(o.pageNumber):a.fieldType==="NUMPAGES"&&o?l=String(o.totalPages):l=a.fallback??"",r+=n(l,a.fontSize,a.fontFamily,a.bold,a.italic);}else K(a)&&!v(a)&&(r+=a.width||0);}return r}function Ft(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,i="Calibri",a=false,l=false)=>{if(!n)return o.length*7;let d=a$1(i).cssFallback,g=r*96/72,s=[];return l&&s.push("italic"),a&&s.push("bold"),s.push(`${g}px`,d),n.font=s.join(" "),n.measureText(o).width}}function ge(e,t,n,o,r$1){let i=o.createElement("div");i.className=E.line,i.style.height=`${t.lineHeight}px`,i.style.lineHeight=`${t.lineHeight}px`;let a=Je(e,t);if(a.length===1&&K(a[0])){let p=a[0].position?.horizontal?.align??n;i.style.display="flex",i.style.alignItems="center",i.style.justifyContent=p==="center"?"center":p==="right"?"flex-end":"flex-start",i.dataset.flexLine="true";}if(a.length===0){let m=o.createElement("span");return m.className=`${E.run} layout-empty-run`,m.innerHTML="&nbsp;",i.appendChild(m),i}let l=n==="justify",d=false;l&&r$1&&(d=!r$1.isLastLine||r$1.paragraphEndsWithLineBreak,d&&(i.style.textAlign="justify",i.style.textAlignLast="justify",i.style.width=`${r$1.availableWidth}px`)),i.style.whiteSpace="pre";let g=a.some(m=>z(m)&&m.highlight);i.style.overflow=g?"hidden":"visible";let s=a.some(O),h,C=Ft(o);if(s){let m=r$1?.tabStops?.map(xt),c=r$1?.leftIndentPx?Math.round(r$1.leftIndentPx*15):0;h={explicitStops:m,leftIndent:c};}let b=0,f=r$1?.leftIndentPx??0;if(r$1?.isFirstLine){let m=r$1?.firstLineIndentPx??0;b=f+m;}else b=f;for(let m=0;m<a.length;m++){let c=a[m];if(O(c)&&h){let p=wt(a,m,C,r$1?.context),y=St(a,m,r$1?.context),u=y.indexOf("."),w=u>=0?C(y.slice(0,u)):0,T=r(b,h,{followingWidth:p,decimalPrefixWidth:w}),x=r$1?.lineRightEdgePx,k=p,I=false;for(let R=m+1;R<a.length&&!G(a[R]);R++)if(O(a[R])){I=true;break}if(x!==void 0&&T.alignment==="end"&&!I&&b+T.width+k>=x-Tt){i.style.display="flex",i.style.alignItems="baseline",i.style.whiteSpace="nowrap",i.style.textIndent="0",i.dataset.flexLine="true",r$1?.isFirstLine&&r$1.firstLineIndentPx&&r$1.firstLineIndentPx<0&&i.firstElementChild instanceof HTMLElement&&(i.firstElementChild.style.marginLeft=`${r$1.firstLineIndentPx}px`);let R=de(c,o,0,T.leader);R.style.flex="1 1 0",R.style.minWidth="0",R.style.width="auto",i.appendChild(R);for(let Z=m+1;Z<a.length;Z++){let L=a[Z];if(O(L)||G(L))break;if(z(L))i.appendChild(te(L,o,r$1?.context?.resolvedCommentIds));else if(Y(L)&&r$1?.context)i.appendChild(ce(L,o,r$1.context));else if(K(L)){if(v(L))continue;let re=qe(L);r$1?.renderedInlineImageKeys?.has(re)||(r$1?.renderedInlineImageKeys?.add(re),i.appendChild(pe(L,o)));}else i.appendChild(Ie(L,o,r$1?.context));}break}let F=T.width;x!==void 0&&b+F+k>x&&(F=Math.max(1,x-b-k));let P=de(c,o,F,T.leader);i.appendChild(P),b+=F;}else if(z(c)){let p=te(c,o,r$1?.context?.resolvedCommentIds);if(c.highlight){let T=(c.fontSize?c.fontSize*96/72:14.67)*1.2,x=Math.max(0,t.lineHeight-T);if(x>0){let k=x/2;p.style.paddingTop=`${k}px`,p.style.paddingBottom=`${k}px`;}}i.appendChild(p);let y=c.fontSize||11,u=c.fontFamily||"Calibri";b+=C(c.text,y,u,c.bold,c.italic);}else if(K(c)){if(v(c))continue;let p=qe(c);if(r$1?.renderedInlineImageKeys?.has(p))continue;r$1?.renderedInlineImageKeys?.add(p);let y=pe(c,o);i.appendChild(y),c.displayMode!=="block"&&c.wrapType!=="topAndBottom"&&(b+=c.width);}else if(G(c)){let p=Re(c,o);i.appendChild(p);}else if(Y(c)&&r$1?.context){let p=ce(c,o,r$1.context);i.appendChild(p);let y=c.fallback??"";c.fieldType==="PAGE"?y=String(r$1.context.pageNumber):c.fieldType==="NUMPAGES"&&(y=String(r$1.context.totalPages));let u=c.fontSize||11,w=c.fontFamily||"Calibri";b+=C(y,u,w,c.bold,c.italic);}else {let p=Ie(c,o,r$1?.context);i.appendChild(p);}}return i}function ne(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function Qe(e,t){return !e&&!t||!e||!t?false:ne(e.top,t.top)&&ne(e.bottom,t.bottom)&&ne(e.left,t.left)&&ne(e.right,t.right)&&ne(e.between,t.between)}function H(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=E.fragment,a.style.position=o.positioning==="absolute"?"absolute":"relative",a.dataset.blockId=String(e.blockId),a.dataset.fromLine=String(e.fromLine),a.dataset.toLine=String(e.toLine),j(a,e.pmStart,e.pmEnd),e.continuesFromPrev&&(a.dataset.continuesFromPrev="true"),e.continuesOnNext&&(a.dataset.continuesOnNext="true");let l=n.lines.slice(e.fromLine,e.toLine),d=t.attrs?.alignment;t.attrs?.styleId&&(a.dataset.styleId=t.attrs.styleId);let g=t.attrs?.bidi;g&&(a.dir="rtl"),d?d==="center"?a.style.textAlign="center":d==="right"?a.style.textAlign="right":d==="left"?a.style.textAlign="left":a.style.textAlign=g?"right":"left":g&&(a.style.textAlign="right");let s=t.attrs?.indent,h=0,C=0;s&&(g?(s.left&&s.left>0&&(C=s.left),s.right&&s.right>0&&(h=s.right)):(s.left&&s.left>0&&(h=s.left),s.right&&s.right>0&&(C=s.right)));let b=t.attrs?.borders;if(b){let w=R=>{switch(R){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};a.style.boxSizing="border-box";let T=R=>`${R.width}px ${w(R.style)} ${R.color}`,x=Qe(r.prevBorders,b),k=Qe(b,r.nextBorders),I=x?b.between:b.top,S=k?void 0:b.bottom,F=i.createElement("div");if(F.className="layout-paragraph-border",F.style.position="absolute",F.style.pointerEvents="none",F.style.boxSizing="border-box",F.style.left=`${h-(b.left?.space??0)}px`,F.style.right=`${C-(b.right?.space??0)}px`,F.style.top=`${-(I?.space??0)}px`,F.style.bottom=`${-(S?.space??0)}px`,I&&(F.style.borderTop=T(I)),S&&(F.style.borderBottom=T(S)),b.left&&(F.style.borderLeft=T(b.left)),b.right&&(F.style.borderRight=T(b.right)),(I||S||b.left||b.right)&&a.appendChild(F),b.bar){let R=i.createElement("div");R.style.position="absolute",R.style.left="-8px",R.style.top="0",R.style.bottom="0",R.style.borderLeft=T(b.bar),a.style.position="relative",a.appendChild(R);}}t.attrs?.shading&&(a.style.backgroundColor=t.attrs.shading);let f=e.width-h-C,c=t.runs[t.runs.length-1]?.kind==="lineBreak",p=n.lines.length,y=0;s?.hanging&&s.hanging>0?y=-s.hanging:s?.firstLine&&s.firstLine>0&&(y=s.firstLine);let u=r.renderedInlineImageKeys??new Set;for(let w=0;w<l.length;w++){let T=l[w],x=e.fromLine+w,k=x===p-1,I=x===0&&!e.continuesFromPrev,S=T.leftOffset??0,F=T.rightOffset??0,P=f;if(I){let M=s?.hanging&&s.hanging>0,B=s?.firstLine&&s.firstLine>0;M&&s?.hanging?P=f+s.hanging:B&&s?.firstLine&&(P=f-s.firstLine);}if(kt(T,t)){let M=i.createElement("div");M.className=`${E.line} layout-line-split`,M.style.position="relative",M.style.height=`${T.lineHeight}px`,M.style.lineHeight=`${T.lineHeight}px`;for(let B of T.segments){let Te={fromRun:B.fromRun,fromChar:B.fromChar,toRun:B.toRun,toChar:B.toChar,width:B.width,ascent:T.ascent,descent:T.descent,lineHeight:T.lineHeight},_=ge(t,Te,d,i,{availableWidth:B.availableWidth,isLastLine:k,isFirstLine:I,paragraphEndsWithLineBreak:c,tabStops:t.attrs?.tabs,leftIndentPx:h,firstLineIndentPx:I?y:0,context:o,renderedInlineImageKeys:u});_.className+=" layout-line-segment",_.style.position="absolute",_.style.left=`${B.leftOffset}px`,_.style.top="0",_.style.width=`${B.availableWidth}px`,M.appendChild(_);}a.appendChild(M);continue}let R=ge(t,T,d,i,{availableWidth:P-S-F,isLastLine:k,isFirstLine:I,paragraphEndsWithLineBreak:c,tabStops:t.attrs?.tabs,leftIndentPx:h,firstLineIndentPx:I?y:0,context:o,renderedInlineImageKeys:u,lineRightEdgePx:e.width-C-F});if(S>0||F>0){S>0&&(R.style.marginLeft=`${S}px`),F>0&&(R.style.marginRight=`${F}px`);let M=P-S-F;M>0&&(R.style.width=`${M}px`);}let Z=s?.hanging&&s.hanging>0,L=s?.firstLine&&s.firstLine>0,re=R.dataset.flexLine==="true";if(I?h>0&&Z?(R.style.paddingLeft=`${h}px`,re||(R.style.textIndent=`-${s.hanging}px`)):h>0&&L?(R.style.paddingLeft=`${h}px`,R.style.textIndent=`${s.firstLine}px`):h>0?R.style.paddingLeft=`${h}px`:L&&(R.style.textIndent=`${s.firstLine}px`):h>0?R.style.paddingLeft=`${h}px`:Z&&(R.style.paddingLeft=`${s.hanging}px`),C>0&&(R.style.paddingRight=`${C}px`),I&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let M=Math.max(0,h-(s?.hanging??0));R.style.paddingLeft=`${M}px`,R.style.textIndent="0";let B;if(!t.attrs.listMarkerFontFamily||!t.attrs.listMarkerFontSize)for(let A=T.fromRun;A<=T.toRun;A++){let we=t.runs[A];if(we&&we.kind==="text"){B=we;break}}let Te=t.attrs.listMarkerFontFamily??B?.fontFamily??t.attrs.defaultFontFamily,_=t.attrs.listMarkerFontSize??B?.fontSize??t.attrs.defaultFontSize,$e=Ct(t.attrs.listMarker,s,i,Te,_);if((s?.hanging??0)>0)R.insertBefore($e,R.firstChild);else {let A=i.createElement("div");A.className="layout-line layout-list-marker-line",A.style.height=`${T.lineHeight}px`,A.style.lineHeight=`${T.lineHeight}px`,A.appendChild($e),a.appendChild(A);}}a.appendChild(R);}return a}function kt(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function Ct(e,t,n,o,r){let i=n.createElement("span");if(i.className="layout-list-marker",o&&(i.style.fontFamily=a$1(o).cssFallback),r){let l=r*96/72;i.style.fontSize=`${l}px`;}i.textContent=e,i.style.textAlign="left",i.style.boxSizing="border-box";let a=t?.hanging??0;return i.style.display="inline-block",a>0&&(i.style.minWidth=`${a}px`),i}function X(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let i=t.createElement("div");i.className=n.itemClass,i.style.position="absolute",i.style.pointerEvents="auto",i.style.top=`${r.y}px`,i.style.left=`${r.x}px`,r.pmStart!==void 0&&(i.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(i.dataset.pmEnd=String(r.pmEnd));let a=t.createElement("img");a.src=r.src,a.style.width=`${r.width}px`,a.style.height=`${r.height}px`,a.style.display="block",r.alt&&(a.alt=r.alt),r.transform&&(a.style.transform=r.transform,a.style.transformOrigin="center center"),Q(r)&&ee(a,r),i.appendChild(a),o.appendChild(i);}return o}var N={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function Rt(e$1,t,n){let o=[],r=0;for(let i=0;i<e$1.blocks.length;i++){let a=e$1.blocks[i];if(a?.kind!=="paragraph"){let g=t.blocks[i];g&&g.kind==="table"&&(r+=g.totalHeight??0);continue}let l=a;for(let g of l.runs){if(g.kind!=="image")continue;let s=g;if(!v(s))continue;let h=s.position,C=s.distTop??0,b=s.distBottom??0,f=s.distLeft??12,m=s.distRight??12,c="left",p=0;if(h?.horizontal){let u=h.horizontal;u.align==="right"?(c="right",p=n-s.width):u.align==="left"?p=0:u.align==="center"?p=(n-s.width)/2:u.posOffset!==void 0&&(p=e(u.posOffset),c=p>n/2?"right":"left");}else s.cssFloat==="right"&&(c="right",p=n-s.width);let y=r;if(h?.vertical){let u=h.vertical;u.posOffset!==void 0?y=r+e(u.posOffset):u.align==="top"&&(y=0);}p=Math.max(0,Math.min(p,n-s.width)),o.push({src:s.src,width:s.width,height:s.height,alt:s.alt,transform:s.transform,x:p,y,side:c,distTop:C,distBottom:b,distLeft:f,distRight:m,wrapText:se(s.cssFloat),wrapType:s.wrapType,pmStart:s.pmStart,pmEnd:s.pmEnd});}let d=t.blocks[i];d&&d.kind==="paragraph"&&(r+=d.totalHeight);}return o}function It(e,t$1,n,o){let r=o.createElement("div");r.className=N.cellContent,r.style.position="relative";let i=e.padding?.left??7,a=e.padding?.right??7,l=Math.max(0,t$1.width-i-a);r.style.width=`${l}px`;let d=Rt(e,t$1,l),g;if(d.length>0){g=d.filter(J).map(f=>{let m=f.x+f.width+f.distRight,c=f.y-f.distTop,p=f.y+f.height+f.distBottom,y=0,u=0,w=f.wrapText??"bothSides";return w==="right"?y=m:w==="left"?u=l-(f.x-f.distLeft):f.side==="left"?y=m:u=l-(f.x-f.distLeft),{leftMargin:y,rightMargin:u,topY:c,bottomY:p}});let b=d.filter(U);b.length>0&&r.appendChild(X(b,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let s=0,h=0;for(let b=0;b<e.blocks.length;b++){let f=e.blocks[b],m=t$1.blocks[b];if(f?.kind==="paragraph"&&m?.kind==="paragraph"){let c=f,p=m,y=c.attrs?.spacing,u=Math.max(h,y?.before??0);s+=u,g&&g.length>0&&(p=t(c,l,{floatingZones:g,paragraphYOffset:s}));let w={blockId:c.id,width:l,height:p.totalHeight,fromLine:0,toLine:p.lines.length,pmStart:c.pmStart,pmEnd:c.pmEnd},T={...n,insideTableCell:true},x=H(w,c,p,T,{document:o});x.style.position="relative",u>0&&(x.style.marginTop=`${u}px`),r.appendChild(x),s+=p.totalHeight,h=y?.after??0;}else if(f?.kind==="table"&&m?.kind==="table"){let c=f,p=m,y=h,u=Pt(c,p,n,o);u.style.position="relative",y>0&&(u.style.marginTop=`${y}px`),r.appendChild(u),s+=y+(m.totalHeight??0),h=0;}}h>0&&(r.style.paddingBottom=`${h}px`);let C=d.filter(b=>!U(b));return C.length>0&&r.appendChild(X(C,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Pt(e,t,n,o){let r=o.createElement("div");r.className=`${N.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let i=[],a=0;for(let g=0;g<t.rows.length;g++)i.push(a),a+=t.rows[g]?.height??0;i.push(a);let l=new Map,d=0;for(let g=0;g<e.rows.length;g++){let s=e.rows[g],h=t.rows[g];if(!s||!h)continue;let C=Pe(s,h,g,d,t.columnWidths,e.rows.length,n,o,l,i);r.appendChild(C),d+=h.height;}return r.style.height=`${d}px`,r}function fe(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,i=n.color??"#000000",a=n.style??"solid";e.style[o]=`${r}px ${a} ${i}`;}}function Et(e,t,n,o,r,i,a){let l=a.createElement("div");l.className=N.cell,l.style.position="absolute",l.style.left=`${n}px`,l.style.top="0",l.style.width=`${t.width}px`,l.style.height=`${o}px`,l.style.overflow="hidden",l.style.boxSizing="border-box";let d=e.padding?.top??1,g=e.padding?.right??7,s=e.padding?.bottom??1,h=e.padding?.left??7;if(l.style.padding=`${d}px ${g}px ${s}px ${h}px`,e.borders&&(r.isFirstRow&&fe(l,"top",e.borders.top),fe(l,"right",e.borders.right),fe(l,"bottom",e.borders.bottom),r.isFirstCol&&fe(l,"left",e.borders.left)),e.background&&(l.style.backgroundColor=e.background),e.noWrap&&(l.style.whiteSpace="nowrap"),e.verticalAlign)switch(l.style.display="flex",l.style.flexDirection="column",e.verticalAlign){case "top":l.style.justifyContent="flex-start";break;case "center":l.style.justifyContent="center";break;case "bottom":l.style.justifyContent="flex-end";break}let C=It(e,t,i,a);if(l.appendChild(C),e.blocks.length>0){let b=e.blocks[0],f=e.blocks[e.blocks.length-1];b&&"pmStart"in b&&b.pmStart!==void 0&&(l.dataset.pmStart=String(b.pmStart)),f&&"pmEnd"in f&&f.pmEnd!==void 0&&(l.dataset.pmEnd=String(f.pmEnd));}return l}function Pe(e,t,n,o,r,i,a,l,d,g,s){let h=l.createElement("div");h.className=N.row,h.style.position="absolute",h.style.left="0",h.style.top=`${o}px`,h.style.width="100%",h.style.height=`${t.height}px`,h.dataset.rowIndex=String(n);let C=new Set;if(d){for(let[,m]of d)if(m.startRow<n&&m.startRow+m.rowSpan>n)for(let c=0;c<m.colSpan;c++)C.add(m.columnIndex+c);}let b=0,f=0;for(;C.has(f);)b+=r[f]??0,f++;for(let m=0;m<e.cells.length;m++){let c=e.cells[m],p=t.cells[m];if(!c||!p)continue;let y=c.colSpan??1,u=c.rowSpan??1,w=t.height;if(u>1&&g){w=0;for(let F=n;F<n+u&&F<g.length-1;F++)w+=(g[F+1]??0)-(g[F]??0);w===0&&(w=t.height*u);}let T=n===0||s===true,k=f===0;f+y>=r.length;let S=Et(c,p,b,w,{isFirstRow:T,isFirstCol:k},a,l);if(S.dataset.cellIndex=String(m),S.dataset.columnIndex=String(f),u>1&&(S.dataset.rowSpan=String(u)),h.appendChild(S),u>1&&d){let F=`${n}-${f}`;d.set(F,{cell:c,cellMeasure:p,columnIndex:f,startRow:n,rowSpan:u,colSpan:y,x:b,totalHeight:w});}for(let F=0;F<y&&f+F<r.length;F++)b+=r[f+F]??0;for(f+=y;C.has(f);)b+=r[f]??0,f++;}return h}function q(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");a.className=N.table,a.style.position=o.positioning==="flow"?"relative":"absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.dataset.blockId=String(e.blockId),a.dataset.fromRow=String(e.fromRow),a.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let l=0;for(let f=0;f<n.columnWidths.length-1;f++){l+=n.columnWidths[f]??0;let m=i.createElement("div");m.className=N.resizeHandle,m.style.position="absolute",m.style.left=`${l-3}px`,m.style.top="0",m.style.width="6px",m.style.height="100%",m.style.cursor="col-resize",m.style.zIndex="10",m.dataset.columnIndex=String(f),m.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(m.dataset.tablePmStart=String(e.pmStart)),a.appendChild(m);}let d=[],g=0;for(let f=0;f<n.rows.length;f++)d.push(g),g+=n.rows[f]?.height??0;d.push(g);let s=new Map,h=e.headerRowCount??0,C=0;if(h>0&&e.continuesFromPrev)for(let f=0;f<h;f++){let m=t.rows[f],c=n.rows[f];if(!m||!c)continue;let p=Pe(m,c,f,C,n.columnWidths,t.rows.length,o,i,s,d,f===0);p.dataset.repeatedHeader="true",a.appendChild(p),C+=c.height;}for(let f=e.fromRow;f<e.toRow;f++){let m=t.rows[f],c=n.rows[f];if(!m||!c)continue;let p=h>0&&e.continuesFromPrev?false:e.continuesFromPrev&&f===e.fromRow,y=Pe(m,c,f,C,n.columnWidths,t.rows.length,o,i,s,d,p);a.appendChild(y),C+=c.height;}let b=0;for(let f=e.fromRow;f<e.toRow;f++)if(b+=n.rows[f]?.height??0,f<e.toRow-1){let m=i.createElement("div");m.className=N.rowResizeHandle,m.style.position="absolute",m.style.left="0",m.style.top=`${b-3}px`,m.style.width="100%",m.style.height="6px",m.style.cursor="row-resize",m.style.zIndex="10",m.dataset.rowIndex=String(f),m.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(m.dataset.tablePmStart=String(e.pmStart)),a.appendChild(m);}if(e.toRow===t.rows.length){let f=i.createElement("div");f.className=N.tableEdgeHandleBottom,f.style.position="absolute",f.style.left="0",f.style.top=`${b-3}px`,f.style.width="100%",f.style.height="6px",f.style.cursor="row-resize",f.style.zIndex="10",f.dataset.rowIndex=String(t.rows.length-1),f.dataset.tableBlockId=String(e.blockId),f.dataset.isEdge="bottom",e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),a.appendChild(f);}if(e.toRow===t.rows.length){let f=n.columnWidths.reduce((c,p)=>c+p,0),m=i.createElement("div");m.className=N.tableEdgeHandleRight,m.style.position="absolute",m.style.left=`${f-3}px`,m.style.top="0",m.style.width="6px",m.style.height="100%",m.style.cursor="col-resize",m.style.zIndex="10",m.dataset.columnIndex=String(n.columnWidths.length-1),m.dataset.tableBlockId=String(e.blockId),m.dataset.isEdge="right",e.pmStart!==void 0&&(m.dataset.tablePmStart=String(e.pmStart)),a.appendChild(m);}return a}var Lt={textBox:"layout-textbox"};function me(e,t,n,o,r={}){let i=r.document??document,a=i.createElement("div");if(a.className=Lt.textBox,a.style.position="absolute",a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.overflow="hidden",a.style.boxSizing="border-box",Bt(a,e),t.fillColor&&(a.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let s=t.outlineStyle||"solid",h=t.outlineColor||"#000000";a.style.border=`${t.outlineWidth}px ${s} ${h}`;}let l=t.margins??a$2;a.style.padding=`${l.top}px ${l.right}px ${l.bottom}px ${l.left}px`,a.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(a.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(a.dataset.pmEnd=String(e.pmEnd));let d=e.width-l.left-l.right,g=0;for(let s=0;s<t.content.length;s++){let h=t.content[s],C=n.innerMeasures[s];if(!C)continue;let b={blockId:h.id,width:d,height:C.totalHeight,pmStart:h.pmStart,pmEnd:h.pmEnd,fromLine:0,toLine:C.lines.length},f=H(b,h,C,{...o,positioning:"flow"},{document:i});a.appendChild(f),g+=C.totalHeight;}return a}function Bt(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function et(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Ee(e,t,n,o){let{x:r,side:i}=Mt(e,n,o),a=$t(e,t,o);return {x:r,y:a,side:i}}function Mt(e$1,t,n){let o=e$1.position?.horizontal;if(!o)return e$1.cssFloat==="right"?{x:t-e$1.width,side:"right"}:{x:0,side:"left"};let r=vt(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e$1.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e$1.width)/2:0,side:"left"};if(o.posOffset!==void 0){let i=r.base+e(o.posOffset);return {x:i,side:i>t/2?"right":"left"}}return {x:r.base,side:"left"}}function vt(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function $t(e$1,t,n){let o=e$1.position?.vertical;if(!o)return t;let r=Ht(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e$1.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e$1.height:t:o.posOffset!==void 0?r.base+e(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function Ht(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,i=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:i,size:r};default:return {base:0,size:i}}}function tt(e){return e?.align??e?.alignment}function At(e$1,t){let n=e$1.position.vertical;if(!n)return e$1.paragraphY;let o=tt(n),r=n.posOffset!==void 0?e(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e$1.height-t.flowTop;if(o==="center")return (t.pageHeight-e$1.height)/2-t.flowTop}if(n.relativeTo==="margin"){let i=t.margins.top,a=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return i+r-t.flowTop;if(o==="top")return i-t.flowTop;if(o==="bottom")return i+a-e$1.height-t.flowTop;if(o==="center")return i+(a-e$1.height)/2-t.flowTop}return r!==void 0?e$1.paragraphY+r:e$1.paragraphY}function zt(e$1,t,n){let o=t.position.horizontal;if(!o){e$1.style.left="0";return}let r=tt(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e$1.style.left=`${e(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e$1.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e$1.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e$1.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e$1.style.left=`${e(o.posOffset)}px`;return}if(r==="right"){e$1.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e$1.style.left=`${(n.contentWidth-t.width)/2}px`;return}e$1.style.left="0";}function nt(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Le(e,t,n,o){let r=n.document??document,i=r.createElement("div");i.style.position="relative";let a=t.contentWidth??600,l=[],d=0;for(let g=0;g<e.blocks.length;g++){let s=e.blocks[g],h=e.measures[g];if(!(!s||!h)){if(s.kind==="paragraph"&&h.kind==="paragraph"){let C=s,b=h,f=C.attrs?.spacing?.before??0,m=d,c=[];for(let w of C.runs)if(w.kind==="image"&&"position"in w&&w.position){let T=w;l.push({src:T.src,width:T.width,height:T.height,alt:T.alt,paragraphY:m,position:T.position});}else c.push(w);let p={...C,runs:c},y={blockId:C.id,width:a,height:b.totalHeight,fromLine:0,toLine:b.lines.length},u=H(y,p,b,{...t,positioning:"absolute"},{document:r});u.style.top=`${d+f}px`,u.style.left="0",u.style.width=`${a}px`,i.appendChild(u),d+=b.totalHeight;}else if(s.kind==="table"&&h.kind==="table"){let C={blockId:s.id,width:h.totalWidth,height:h.totalHeight,fromRow:0,toRow:h.rows.length,pmStart:s.pmStart,pmEnd:s.pmEnd},b=q(C,s,h,{...t,positioning:"absolute"},{document:r});if(s.floating){let{left:f,top:m}=nt(s.floating,o);b.style.top=`${m}px`,b.style.left=`${f}px`,i.appendChild(b);}else b.style.top=`${d}px`,b.style.left="0",i.appendChild(b),d+=h.totalHeight;}}}for(let g of l){let s=r.createElement("img");s.src=g.src,s.width=g.width,s.height=g.height,g.alt&&(s.alt=g.alt),s.style.position="absolute",s.style.display="block",s.style.width=`${g.width}px`,s.style.height=`${g.height}px`,s.style.maxWidth="none",s.style.maxHeight="none",zt(s,g,o),s.style.top=`${At(g,o)}px`,i.appendChild(s);}return i}var he=12,ot=6;function Ot(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Be=8;function Vn(e){let t=[];for(let n of e)if(n.kind==="paragraph")for(let o of n.runs)o.kind==="text"&&o.footnoteRefId!=null&&t.push({footnoteId:o.footnoteRefId,pmPos:o.pmStart??0});return t}function Me(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let i=false;for(let a of r.fragments){let l=a.pmStart??-1,d=a.pmEnd??-1;if(l>=0&&d>=0&&o.pmPos>=l&&o.pmPos<d){let g=n.get(r.number)??[];g.includes(o.footnoteId)||g.push(o.footnoteId),n.set(r.number,g),i=true;break}}if(i)break}return n}function Nt(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Be,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let i=r;return {...i,runs:i.runs.map(a=>(a.kind==="text"||a.kind==="tab")&&a.fontSize==null?{...a,fontSize:Be}:a)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Be,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function Dt(e,t,n,o){let r=c$1(e.content,{styles:o.styles??void 0,theme:o.theme??null}),i=d(r,{theme:o.theme??void 0}),a=Nt(i,t),l=o.measureBlocks(a,n),d$1=l.reduce((g,s)=>s.kind==="paragraph"||s.kind==="table"?g+s.totalHeight:s.kind==="image"||s.kind==="textBox"?g+s.height:g,0);return {id:e.id,displayNumber:t,blocks:a,measures:l,height:d$1}}function Kn(e,t,n,o){let r=new Map,i=new Map;for(let d of e)(d.noteType==="normal"||d.noteType==null)&&i.set(d.id,d);let a=1,l=new Set;for(let d of t){if(l.has(d.footnoteId))continue;l.add(d.footnoteId);let g=i.get(d.footnoteId);g&&(r.set(d.footnoteId,Dt(g,a,n,o)),a++);}return r}function rt(e,t){let n=new Map;for(let[o,r]of e){let i=0;for(let a of r){let l=t.get(a);l&&(i+=l.height);}i>0&&(i+=he,n.set(o,i));}return n}function Yn(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:i,initialLayout:a}=e,l=Me(a.pages,r),d=rt(l,i);if(d.size===0)return {layout:a,pageFootnoteMap:l,converged:true};let g=a,s=false;for(let h=0;h<ot;h++){g=q$1(t,n,{...o,footnoteReservedHeights:d});let C=Me(g.pages,r),b=rt(C,i);if(l=C,Ot(d,b)){d=b,s=true;break}d=b;}s||(g=q$1(t,n,{...o,footnoteReservedHeights:d}),l=Me(g.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${ot} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[h,C]of l){let b=g.pages.find(f=>f.number===h);b&&(b.footnoteIds=C);}return {layout:g,pageFootnoteMap:l,converged:s}}function Un(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let i of n.package.footnotes)i.noteType&&i.noteType!=="normal"||r.set(i.id,i);for(let[i,a]of e){let l=[];for(let d of a){let g=r.get(d);if(!g)continue;let s=t.get(d),h=s?.displayNumber??0;l.push({displayNumber:String(h),text:v$1(g),content:s});}l.length>0&&o.set(i,l);}return o}function _t(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let i=0;for(let a=0;a<e.blocks.length;a++){let l=e.blocks[a],d=e.measures[a];if(!(!l||!d)){if(l.kind==="paragraph"&&d.kind==="paragraph"){let g=l.attrs?.spacing?.before??0,s={blockId:l.id,width:t,height:d.totalHeight,pmStart:l.pmStart,pmEnd:l.pmEnd,fromLine:0,toLine:d.lines.length},h=H(s,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});h.style.top=`${i+g}px`,h.style.left="0",h.style.width=`${t}px`,h.style.height=`${d.totalHeight}px`,r.appendChild(h),i+=d.totalHeight;}else if(l.kind==="table"&&d.kind==="table"){let g={blockId:l.id,width:d.totalWidth,height:d.totalHeight,pmStart:l.pmStart,pmEnd:l.pmEnd,fromRow:0,toRow:d.rows.length},s=q(g,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.totalHeight;}else if(l.kind==="image"&&d.kind==="image"){let g={blockId:l.id,width:d.width,height:d.height,pmStart:l.pmStart,pmEnd:l.pmEnd},s=le(g,l,d,{...n},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.height;}else if(l.kind==="textBox"&&d.kind==="textBox"){let g={blockId:l.id,width:d.width,height:d.height,pmStart:l.pmStart,pmEnd:l.pmEnd},s=me(g,l,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${i}px`,s.style.left="0",r.appendChild(s),i+=d.height;}}}return r}function Wt(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function it(e){let t=he;for(let n of e)n.content&&(t+=n.content.height);return t}function at(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let i=o.createElement("div"),a=.5,l=(he-a)/2;i.style.width="33%",i.style.height=`${a}px`,i.style.backgroundColor="#000",i.style.marginBottom=`${l}px`,i.style.marginTop=`${l}px`,r.appendChild(i);for(let d of e)r.appendChild(d.content?_t(d.content,t,n,o):Wt(d,o));return r}function ve(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let i=n.footnotesByPage.get(e.number);i&&i.length>0&&(r.footnoteArea=i);}return {context:o,pageOptions:r}}function st(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function Gt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function jt(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var ue=2,Vt=8;function Kt(e,t,n={}){let o=e.length,r=n.pageGap??24,i=t,a=i.__pageRenderState,l=Gt(n),d=o>=Vt;if(a&&a.optionsHash===l&&d){let c=a.pageStates,p=a.pageDataMap,y=i.__pageObserver,u=[];for(let x of e)u.push(st(x));let w=a.totalPages!==o,T=Math.min(c.length,e.length);for(let x=0;x<T;x++){let k=c[x],I=u[x];if(k.fingerprint===I&&!w){let P=p.get(k.element);P&&(P.page=e[x]);continue}let S=k.element,F=p.get(S);F&&(F.page=e[x],F.rendered&&Yt(S,p,o,n)),k.fingerprint=I,oe(S,e[x].size.w,e[x].size.h,n),S.dataset.pageNumber=String(e[x].number);}if(e.length>c.length){let x=n.document??document;for(let k=c.length;k<e.length;k++){let I=e[k],S=x.createElement("div");S.className=n.pageClassName??D.page,S.dataset.pageNumber=String(I.number),S.dataset.pageIndex=String(k),oe(S,I.size.w,I.size.h,n),t.appendChild(S),c.push({element:S,fingerprint:u[k]}),p.set(S,{page:I,index:k,rendered:false}),y&&y.observe(S);}}if(e.length<c.length){for(let x=c.length-1;x>=e.length;x--){let k=c[x].element;y&&y.unobserve(k),p.delete(k),t.removeChild(k);}c.length=e.length;}for(let x=0;x<c.length;x++){let k=p.get(c[x].element);k&&(k.index=x);}return a.totalPages=o,a.currentOptions=n,"incremental"}let s=i.__pageObserver;s&&(s.disconnect(),i.__pageObserver=void 0),t.innerHTML="",i.__pageRenderState=void 0,jt(t,r);let h=[],C=[];for(let c=0;c<e.length;c++){let p=e[c];if(C.push(st(p)),d){let u=(n.document??document).createElement("div");u.className=n.pageClassName??D.page,u.dataset.pageNumber=String(p.number),u.dataset.pageIndex=String(c),oe(u,p.size.w,p.size.h,n),t.appendChild(u),h.push(u);}else {let{context:y,pageOptions:u}=ve(p,o,n),w=be(p,y,u);t.appendChild(w),h.push(w);}}if(!d)return "full";let b=new Map;for(let c=0;c<e.length;c++)b.set(h[c],{page:e[c],index:c,rendered:false});let f=new IntersectionObserver(c=>{let p=i.__pageRenderState;if(!p)return;let{currentOptions:y,totalPages:u,pageDataMap:w}=p;for(let I of c){let S=I.target,F=w.get(S);if(F&&I.isIntersecting){ye(S,w,u,y);for(let P=-ue;P<=ue;P++){let R=F.index+P;R>=0&&R<p.pageStates.length&&R!==F.index&&ye(p.pageStates[R].element,w,u,y);}}}let T=window.innerHeight,x=T*3,k=new Set;for(let[I,S]of w){if(!S.rendered)continue;let F=I.getBoundingClientRect();F.bottom>-x&&F.top<T+x&&k.add(S.index);}for(let[I,S]of w){if(!S.rendered)continue;let F=false;for(let P of k)if(Math.abs(S.index-P)<=ue+1){F=true;break}!F&&k.size>0&&Ut(I,w);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let c of h)f.observe(c);i.__pageObserver=f,i.__pageRenderState={pageStates:h.map((c,p)=>({element:c,fingerprint:C[p]})),totalPages:o,optionsHash:l,pageDataMap:b,currentOptions:n};let m=Math.min(e.length,ue+3);for(let c=0;c<m;c++)ye(h[c],b,o,n);return "full"}function ye(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:i,pageOptions:a}=ve(r.page,n,o),l=be(r.page,i,a);for(;l.firstChild;)e.appendChild(l.firstChild);r.rendered=true;}function Yt(e,t,n,o){let r=t.get(e);if(!r)return;let{context:i,pageOptions:a}=ve(r.page,n,o),d=be(r.page,i,a).querySelector(`.${D.content}`),g=e.querySelector(`.${D.content}`);d&&g?e.replaceChild(d,g):(e.innerHTML="",r.rendered=false,ye(e,t,n,o));}function Ut(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}var D={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function oe(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=a$1("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function Xt(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function xe(e){return e?.space!==void 0?i(e.space):0}function Se(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=c$2(t,n,o);for(let[d,g]of Object.entries(r))e.style[d]=String(g);let i=`border${n}Style`,a=`border${n}Width`;if(e.style[i]==="double"){let d=parseFloat(e.style[a]);(!Number.isFinite(d)||d<3)&&(e.style[a]="3px");}}function Zt(e,t,n){let o=t.pageBorders;if(!o||!Xt(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(h=>h&&h.style!=="none"&&h.style!=="nil"))return null;let i=o.offsetFrom??"text",a=xe(o.top),l=xe(o.right),d=xe(o.bottom),g=xe(o.left),s=n.createElement("div");return s.className="layout-page-border",s.style.position="absolute",s.style.pointerEvents="none",s.style.boxSizing="border-box",s.style.zIndex=o.zOrder==="back"?"0":"20",i==="page"?(s.style.top=`${a}px`,s.style.right=`${l}px`,s.style.bottom=`${d}px`,s.style.left=`${g}px`):(s.style.top=`${Math.max(0,e.margins.top-a)}px`,s.style.right=`${Math.max(0,e.margins.right-l)}px`,s.style.bottom=`${Math.max(0,e.margins.bottom-d)}px`,s.style.left=`${Math.max(0,e.margins.left-g)}px`),Se(s,o.top,"Top",t.theme),Se(s,o.bottom,"Bottom",t.theme),Se(s,o.left,"Left",t.theme),Se(s,o.right,"Right",t.theme),s}function qt(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function Jt(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function Qt(e,t,n,o){let r=[];for(let i of e.runs){if(i.kind!=="image")continue;let a=i;if(!v(a))continue;let l=a.distTop??0,d=a.distBottom??0,g=a.distLeft??12,s=a.distRight??12,{x:h,y:C,side:b}=Ee(a,t,n,o);r.push({src:a.src,width:a.width,height:a.height,alt:a.alt,transform:a.transform,side:b,x:h,y:C,distTop:l,distBottom:d,distLeft:g,distRight:s,pmStart:a.pmStart,pmEnd:a.pmEnd,wrapText:se(a.cssFloat),wrapType:a.wrapType,cropTop:a.cropTop,cropRight:a.cropRight,cropBottom:a.cropBottom,cropLeft:a.cropLeft,opacity:a.opacity});}return r}function be(e,t$1,n={}){let o=n.document??document,r=o.createElement("div");r.className=n.pageClassName??D.page,r.dataset.pageNumber=String(e.number),oe(r,e.size.w,e.size.h,n);let i=Zt(e,n,o);i&&n.pageBorders?.zOrder==="back"&&r.appendChild(i);let a=o.createElement("div");a.className=D.content,qt(a,e);let l=et(e),d=l.contentWidth,g$1=[],s=[];for(let p of e.fragments)if(p.kind==="paragraph"&&n.blockLookup){let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind==="paragraph"){let u=y.block,w=p.y-e.margins.top,T=Qt(u,w,d,l);g$1.push(...T);}}for(let p of g$1)J(p)&&s.push({side:p.side,x:p.x,y:p.y,width:p.width,height:p.height,distTop:p.distTop,distBottom:p.distBottom,distLeft:p.distLeft,distRight:p.distRight,wrapText:p.wrapText,wrapType:p.wrapType});if(n.blockLookup)for(let p of e.fragments){if(p.kind!=="table")continue;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind!=="table")continue;let w=y.block.floating;if(!w)continue;let T=p.x-e.margins.left,x=p.y-e.margins.top,k=w.topFromText??0,I=w.bottomFromText??0,S=w.leftFromText??12,F=w.rightFromText??12,P=T<d/2?"left":"right";s.push({side:P,x:T,y:x,width:p.width,height:p.height,distTop:k,distBottom:I,distLeft:S,distRight:F});}if(n.blockLookup)for(let p of e.fragments){if(p.kind!=="textBox")continue;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind!=="textBox")continue;let u=y.block;if(!g(u))continue;let w=p.y-e.margins.top,T=Ee({width:p.width,height:p.height,position:u.position,cssFloat:u.cssFloat},w,d,l);p.x=e.margins.left+T.x,p.y=e.margins.top+T.y,h(u)&&s.push({side:T.side,x:T.x,y:T.y,width:p.width,height:p.height,distTop:u.distTop??0,distBottom:u.distBottom??0,distLeft:u.distLeft??12,distRight:u.distRight??12,wrapText:u.wrapText,wrapType:u.wrapType});}let h$1=s.length>0?p(s,d):[],C=g$1.filter(U),b=g$1.filter(p=>!U(p));if(C.length>0){let p=X(C,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});a.appendChild(p);}let f=p=>{if(p.kind!=="paragraph"||!n.blockLookup||!p.blockId)return;let y=n.blockLookup.get(String(p.blockId));if(y?.block.kind==="paragraph")return y.block.attrs?.borders},m,c=new Map;for(let p=0;p<e.fragments.length;p++){let y=e.fragments[p],u,w={...t$1,section:"body",contentWidth:d},T=y.y-e.margins.top;if(n.blockLookup&&y.blockId){let x=n.blockLookup.get(String(y.blockId));if(y.kind==="paragraph"&&x?.block.kind==="paragraph"&&x?.measure.kind==="paragraph"){let k=x.block,I=p+1<e.fragments.length?f(e.fragments[p+1]):void 0,S=String(y.blockId),F=c.get(S);F||(F=new Set,c.set(S,F));let P=x.measure;h$1.length>0&&(P=t(k,d,{floatingZones:h$1,paragraphYOffset:T})),u=H(y,k,P,w,{document:o,prevBorders:m,nextBorders:I,renderedInlineImageKeys:F}),m=k.attrs?.borders;}else y.kind==="table"&&x?.block.kind==="table"&&x?.measure.kind==="table"?(u=q(y,x.block,x.measure,w,{document:o}),m=void 0):y.kind==="image"&&x?.block.kind==="image"&&x?.measure.kind==="image"?(u=le(y,x.block,x.measure,w,{document:o}),m=void 0):y.kind==="textBox"&&x?.block.kind==="textBox"&&x?.measure.kind==="textBox"?(u=me(y,x.block,x.measure,w,{document:o}),m=void 0):(u=Ce(y,w,{document:o}),m=void 0);}else u=Ce(y,w,{document:o}),m=void 0;Jt(u,y,{left:e.margins.left,top:e.margins.top}),a.appendChild(u);}if(b.length>0){let p=X(b,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});a.appendChild(p);}if(e.columns&&e.columns.separator&&e.columns.count>1){let p=e.columns.count,y=e.columns.gap,u=(d-(p-1)*y)/p,w=e.size.h-e.margins.top-e.margins.bottom;for(let T=0;T<p-1;T++){let x=(T+1)*u+T*y+y/2,k=o.createElement("div");k.style.position="absolute",k.style.left=`${x}px`,k.style.top="0",k.style.height=`${w}px`,k.style.width="0.5px",k.style.backgroundColor="#000",k.style.pointerEvents="none",a.appendChild(k);}}if(n.footnoteArea&&n.footnoteArea.length>0){let p=at(n.footnoteArea,d,t$1,o);p.style.position="absolute";let y=Math.max(e.footnoteReservedHeight??0,it(n.footnoteArea)),u=e.size.h-e.margins.bottom-e.margins.top;p.style.top=`${Math.max(-e.margins.top,u-y)}px`,p.style.left="0",p.style.right="0",a.appendChild(p);}r.appendChild(a);{let y=n.headerDistance??e.margins.header??48,u=e.size.w-e.margins.left-e.margins.right,w=Math.max(e.margins.top-y,48),T=n.headerContent?.visualTop??0,x=n.headerContent?.visualBottom??n.headerContent?.height??0,k=Math.max(x-T,24),I=x>w,S=o.createElement("div");S.className=D.header,S.style.position="absolute",S.style.top=`${y+T}px`,S.style.left=`${e.margins.left}px`,S.style.right=`${e.margins.right}px`,S.style.width=`${u}px`,S.style.height=`${k}px`,S.style.minHeight=`${k}px`;let F=!I;if(n.headerContent&&n.headerContent.blocks.length>0){let P={flowTop:y,flowLeft:e.margins.left,contentWidth:u,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},R=Le(n.headerContent,{...t$1,section:"header",contentWidth:u},n,P);R.style.top=`${-T}px`,R.querySelector("img")&&(F=false),S.appendChild(R);}F&&(S.style.maxHeight=`${w}px`,S.style.overflow="hidden"),r.appendChild(S);}{let y=n.footerDistance??e.margins.footer??48,u=e.size.w-e.margins.left-e.margins.right,w=Math.max(e.margins.bottom-y,48),T=n.footerContent?.visualTop??0,x=n.footerContent?.visualBottom??n.footerContent?.height??0,k=Math.max(x-T,24),I=k>w,S=o.createElement("div");S.className=D.footer,S.style.position="absolute",S.style.top=`${e.size.h-y-k}px`,S.style.left=`${e.margins.left}px`,S.style.right=`${e.margins.right}px`,S.style.width=`${u}px`,S.style.height=`${k}px`,S.style.minHeight=`${k}px`;let F=!I;if(n.footerContent&&n.footerContent.blocks.length>0){let P={flowTop:e.size.h-y-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:u,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},R=Le(n.footerContent,{...t$1,section:"footer",contentWidth:u},n,P);R.style.top=`${-T}px`,R.querySelector("img")&&(F=false),S.appendChild(R);}F&&(S.style.maxHeight=`${w}px`,S.style.overflow="hidden"),r.appendChild(S);}return i&&n.pageBorders?.zOrder!=="back"&&r.appendChild(i),r}export{me as A,nt as B,Kt as C,D,oe as E,be as F,he as a,ot as b,Ot as c,Vn as d,Me as e,Nt as f,Dt as g,Kn as h,rt as i,Yn as j,Un as k,V as l,Ce as m,J as n,U as o,v as p,mt as q,Ye as r,le as s,Je as t,ge as u,H as v,X as w,N as x,q as y,Lt as z};
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkDV6IEOP5_js=require('./chunk-DV6IEOP5.js'),chunkKBU6QQFU_js=require('./chunk-KBU6QQFU.js'),chunkMZOVDLYL_js=require('./chunk-MZOVDLYL.js'),chunk7VCMJCBY_js=require('./chunk-7VCMJCBY.js'),Xe=require('jszip');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Xe__default=/*#__PURE__*/_interopDefault(Xe);async function G(e){let n=await Xe__default.default.loadAsync(e),t={documentXml:null,stylesXml:null,themeXml:null,numberingXml:null,fontTableXml:null,settingsXml:null,webSettingsXml:null,headers:new Map,footers:new Map,footnotesXml:null,endnotesXml:null,commentsXml:null,commentsExtensibleXml:null,commentsExtendedXml:null,documentRels:null,packageRels:null,contentTypesXml:null,corePropsXml:null,appPropsXml:null,customPropsXml:null,media:new Map,fonts:new Map,allXml:new Map,originalZip:n,originalBuffer:e};for(let[o,s]of Object.entries(n.files)){if(s.dir)continue;let i=o.toLowerCase();if(i.endsWith(".xml")||i.endsWith(".rels")){let a=await s.async("text");if(t.allXml.set(o,a),i==="word/document.xml")t.documentXml=a;else if(i==="word/styles.xml")t.stylesXml=a;else if(i==="word/theme/theme1.xml")t.themeXml=a;else if(i==="word/numbering.xml")t.numberingXml=a;else if(i==="word/fonttable.xml")t.fontTableXml=a;else if(i==="word/settings.xml")t.settingsXml=a;else if(i==="word/websettings.xml")t.webSettingsXml=a;else if(i==="word/footnotes.xml")t.footnotesXml=a;else if(i==="word/endnotes.xml")t.endnotesXml=a;else if(i==="word/comments.xml")t.commentsXml=a;else if(i==="word/commentsextensible.xml")t.commentsExtensibleXml=a;else if(i==="word/commentsextended.xml")t.commentsExtendedXml=a;else if(i==="word/_rels/document.xml.rels")t.documentRels=a;else if(i==="_rels/.rels")t.packageRels=a;else if(i==="[content_types].xml")t.contentTypesXml=a;else if(i==="docprops/core.xml")t.corePropsXml=a;else if(i==="docprops/app.xml")t.appPropsXml=a;else if(i==="docprops/custom.xml")t.customPropsXml=a;else if(i.match(/^word\/header\d+\.xml$/)){let c=o.split("/").pop()||o;t.headers.set(c,a);}else if(i.match(/^word\/footer\d+\.xml$/)){let c=o.split("/").pop()||o;t.footers.set(c,a);}}else if(i.startsWith("word/media/")){let a=await s.async("arraybuffer");t.media.set(o,a);}else if(i.startsWith("word/fonts/")){let a=await s.async("arraybuffer");t.fonts.set(o,a);}}return t}function be(e){switch(e.toLowerCase().split(".").pop()){case "png":return "image/png";case "jpg":case "jpeg":return "image/jpeg";case "gif":return "image/gif";case "bmp":return "image/bmp";case "tif":case "tiff":return "image/tiff";case "wmf":return "image/x-wmf";case "emf":return "image/x-emf";case "svg":return "image/svg+xml";case "webp":return "image/webp";default:return "application/octet-stream"}}function K(e,n,t,o){let s={};return e&&e!=="auto"?s.rgb=e:e==="auto"&&(s.auto=true),n&&(s.themeColor=n),t&&(s.themeTint=t),o&&(s.themeShade=o),s}function W(e){if(!e)return;let n={},t=chunk7VCMJCBY_js.j(e,"w","color");t&&t!=="auto"&&(n.color={rgb:t});let o=chunk7VCMJCBY_js.j(e,"w","fill");o&&o!=="auto"&&(n.fill={rgb:o});let s=chunk7VCMJCBY_js.j(e,"w","themeFill");s&&(n.fill=n.fill||{},n.fill.themeColor=s);let i=chunk7VCMJCBY_js.j(e,"w","themeFillTint");i&&n.fill&&(n.fill.themeTint=i);let a=chunk7VCMJCBY_js.j(e,"w","themeFillShade");a&&n.fill&&(n.fill.themeShade=a);let c=chunk7VCMJCBY_js.j(e,"w","val");return c&&(n.pattern=c),Object.keys(n).length>0?n:void 0}function z(e,n){if(!e)return;let t={},o=chunk7VCMJCBY_js.e(e,"w","b");o&&(t.bold=chunk7VCMJCBY_js.m(o));let s=chunk7VCMJCBY_js.e(e,"w","bCs");s&&(t.boldCs=chunk7VCMJCBY_js.m(s));let i=chunk7VCMJCBY_js.e(e,"w","i");i&&(t.italic=chunk7VCMJCBY_js.m(i));let a=chunk7VCMJCBY_js.e(e,"w","iCs");a&&(t.italicCs=chunk7VCMJCBY_js.m(a));let c=chunk7VCMJCBY_js.e(e,"w","u");if(c){let g=chunk7VCMJCBY_js.j(c,"w","val");if(g){t.underline={style:g};let E=chunk7VCMJCBY_js.j(c,"w","color"),k=chunk7VCMJCBY_js.j(c,"w","themeColor");(E||k)&&(t.underline.color=K(E,k,chunk7VCMJCBY_js.j(c,"w","themeTint"),chunk7VCMJCBY_js.j(c,"w","themeShade")));}}let d=chunk7VCMJCBY_js.e(e,"w","strike");d&&(t.strike=chunk7VCMJCBY_js.m(d));let u=chunk7VCMJCBY_js.e(e,"w","dstrike");u&&(t.doubleStrike=chunk7VCMJCBY_js.m(u));let m=chunk7VCMJCBY_js.e(e,"w","vertAlign");if(m){let g=chunk7VCMJCBY_js.j(m,"w","val");(g==="superscript"||g==="subscript"||g==="baseline")&&(t.vertAlign=g);}let h=chunk7VCMJCBY_js.e(e,"w","smallCaps");h&&(t.smallCaps=chunk7VCMJCBY_js.m(h));let p=chunk7VCMJCBY_js.e(e,"w","caps");p&&(t.allCaps=chunk7VCMJCBY_js.m(p));let x=chunk7VCMJCBY_js.e(e,"w","vanish");x&&(t.hidden=chunk7VCMJCBY_js.m(x));let f=chunk7VCMJCBY_js.e(e,"w","color");f&&(t.color=K(chunk7VCMJCBY_js.j(f,"w","val"),chunk7VCMJCBY_js.j(f,"w","themeColor"),chunk7VCMJCBY_js.j(f,"w","themeTint"),chunk7VCMJCBY_js.j(f,"w","themeShade")));let b=chunk7VCMJCBY_js.e(e,"w","highlight");if(b){let g=chunk7VCMJCBY_js.j(b,"w","val");g&&(t.highlight=g);}let C=chunk7VCMJCBY_js.e(e,"w","shd");C&&(t.shading=W(C));let X=chunk7VCMJCBY_js.e(e,"w","sz");if(X){let g=chunk7VCMJCBY_js.l(X,"w","val");g!==void 0&&(t.fontSize=g);}let D=chunk7VCMJCBY_js.e(e,"w","szCs");if(D){let g=chunk7VCMJCBY_js.l(D,"w","val");g!==void 0&&(t.fontSizeCs=g);}let N=chunk7VCMJCBY_js.e(e,"w","rFonts");if(N){t.fontFamily={ascii:chunk7VCMJCBY_js.j(N,"w","ascii")??void 0,hAnsi:chunk7VCMJCBY_js.j(N,"w","hAnsi")??void 0,eastAsia:chunk7VCMJCBY_js.j(N,"w","eastAsia")??void 0,cs:chunk7VCMJCBY_js.j(N,"w","cs")??void 0};let g=chunk7VCMJCBY_js.j(N,"w","asciiTheme");g&&(t.fontFamily.asciiTheme=g,n&&!t.fontFamily.ascii&&(t.fontFamily.ascii=chunkDV6IEOP5_js.b(n,g)));let E=chunk7VCMJCBY_js.j(N,"w","hAnsiTheme");E&&(t.fontFamily.hAnsiTheme=E,n&&!t.fontFamily.hAnsi&&(t.fontFamily.hAnsi=chunkDV6IEOP5_js.b(n,E)));let k=chunk7VCMJCBY_js.j(N,"w","eastAsiaTheme");k&&(t.fontFamily.eastAsiaTheme=k,n&&!t.fontFamily.eastAsia&&(t.fontFamily.eastAsia=chunkDV6IEOP5_js.b(n,k)));let ne=chunk7VCMJCBY_js.j(N,"w","cstheme");ne&&(t.fontFamily.csTheme=ne,n&&!t.fontFamily.cs&&(t.fontFamily.cs=chunkDV6IEOP5_js.b(n,ne)));}let T=chunk7VCMJCBY_js.e(e,"w","spacing");if(T){let g=chunk7VCMJCBY_js.l(T,"w","val");g!==void 0&&(t.spacing=g);}let y=chunk7VCMJCBY_js.e(e,"w","position");if(y){let g=chunk7VCMJCBY_js.l(y,"w","val");g!==void 0&&(t.position=g);}let S=chunk7VCMJCBY_js.e(e,"w","w");if(S){let g=chunk7VCMJCBY_js.l(S,"w","val");g!==void 0&&(t.scale=g);}let F=chunk7VCMJCBY_js.e(e,"w","kern");if(F){let g=chunk7VCMJCBY_js.l(F,"w","val");g!==void 0&&(t.kerning=g);}let M=chunk7VCMJCBY_js.e(e,"w","effect");if(M){let g=chunk7VCMJCBY_js.j(M,"w","val");g&&(t.effect=g);}let L=chunk7VCMJCBY_js.e(e,"w","em");if(L){let g=chunk7VCMJCBY_js.j(L,"w","val");g&&(t.emphasisMark=g);}let I=chunk7VCMJCBY_js.e(e,"w","emboss");I&&(t.emboss=chunk7VCMJCBY_js.m(I));let A=chunk7VCMJCBY_js.e(e,"w","imprint");A&&(t.imprint=chunk7VCMJCBY_js.m(A));let V=chunk7VCMJCBY_js.e(e,"w","outline");V&&(t.outline=chunk7VCMJCBY_js.m(V));let U=chunk7VCMJCBY_js.e(e,"w","shadow");U&&(t.shadow=chunk7VCMJCBY_js.m(U));let j=chunk7VCMJCBY_js.e(e,"w","rtl");j&&(t.rtl=chunk7VCMJCBY_js.m(j));let P=chunk7VCMJCBY_js.e(e,"w","cs");P&&(t.cs=chunk7VCMJCBY_js.m(P));let B=chunk7VCMJCBY_js.e(e,"w","rStyle");if(B){let g=chunk7VCMJCBY_js.j(B,"w","val");g&&(t.styleId=g);}return Object.keys(t).length>0?t:void 0}function R(e){if(!e)return;let n=chunk7VCMJCBY_js.j(e,"w","val");if(!n)return;let t={style:n},o=chunk7VCMJCBY_js.j(e,"w","color"),s=chunk7VCMJCBY_js.j(e,"w","themeColor");(o||s)&&(t.color=K(o,s,chunk7VCMJCBY_js.j(e,"w","themeTint"),chunk7VCMJCBY_js.j(e,"w","themeShade")));let i=chunk7VCMJCBY_js.l(e,"w","sz");i!==void 0&&(t.size=i);let a=chunk7VCMJCBY_js.l(e,"w","space");a!==void 0&&(t.space=a);let c=chunk7VCMJCBY_js.j(e,"w","shadow");c&&(t.shadow=c==="1"||c==="true");let d=chunk7VCMJCBY_js.j(e,"w","frame");return d&&(t.frame=d==="1"||d==="true"),t}function Me(e){if(!e)return;let n=chunk7VCMJCBY_js.f(e,"w","tab");if(n.length===0)return;let t=[];for(let o of n){let s=chunk7VCMJCBY_js.l(o,"w","pos"),i=chunk7VCMJCBY_js.j(o,"w","val");if(s!==void 0&&i){let a={position:s,alignment:i},c=chunk7VCMJCBY_js.j(o,"w","leader");c&&(a.leader=c),t.push(a);}}return t.length>0?t:void 0}function ee(e,n){if(!e)return;let t={},o=chunk7VCMJCBY_js.e(e,"w","jc");if(o){let y=chunk7VCMJCBY_js.j(o,"w","val");y&&(t.alignment=y);}let s=chunk7VCMJCBY_js.e(e,"w","bidi");s&&(t.bidi=chunk7VCMJCBY_js.m(s));let i=chunk7VCMJCBY_js.e(e,"w","spacing");if(i){let y=chunk7VCMJCBY_js.l(i,"w","before");y!==void 0&&(t.spaceBefore=y);let S=chunk7VCMJCBY_js.l(i,"w","after");S!==void 0&&(t.spaceAfter=S);let F=chunk7VCMJCBY_js.l(i,"w","line");F!==void 0&&(t.lineSpacing=F);let M=chunk7VCMJCBY_js.j(i,"w","lineRule");M&&(t.lineSpacingRule=M);let L=chunk7VCMJCBY_js.j(i,"w","beforeAutospacing");L&&(t.beforeAutospacing=L==="1"||L==="true");let I=chunk7VCMJCBY_js.j(i,"w","afterAutospacing");I&&(t.afterAutospacing=I==="1"||I==="true");}let a=chunk7VCMJCBY_js.e(e,"w","ind");if(a){let y=chunk7VCMJCBY_js.l(a,"w","left");y!==void 0&&(t.indentLeft=y);let S=chunk7VCMJCBY_js.l(a,"w","right");S!==void 0&&(t.indentRight=S);let F=chunk7VCMJCBY_js.l(a,"w","firstLine");F!==void 0&&(t.indentFirstLine=F);let M=chunk7VCMJCBY_js.l(a,"w","hanging");M!==void 0&&(t.indentFirstLine=-M,t.hangingIndent=true);}let c=chunk7VCMJCBY_js.e(e,"w","pBdr");if(c){let y={},S=R(chunk7VCMJCBY_js.e(c,"w","top"));S&&(y.top=S);let F=R(chunk7VCMJCBY_js.e(c,"w","bottom"));F&&(y.bottom=F);let M=R(chunk7VCMJCBY_js.e(c,"w","left"));M&&(y.left=M);let L=R(chunk7VCMJCBY_js.e(c,"w","right"));L&&(y.right=L);let I=R(chunk7VCMJCBY_js.e(c,"w","between"));I&&(y.between=I);let A=R(chunk7VCMJCBY_js.e(c,"w","bar"));A&&(y.bar=A),Object.keys(y).length>0&&(t.borders=y);}let d=chunk7VCMJCBY_js.e(e,"w","shd");d&&(t.shading=W(d));let u=chunk7VCMJCBY_js.e(e,"w","tabs");u&&(t.tabs=Me(u));let m=chunk7VCMJCBY_js.e(e,"w","keepNext");m&&(t.keepNext=chunk7VCMJCBY_js.m(m));let h=chunk7VCMJCBY_js.e(e,"w","keepLines");h&&(t.keepLines=chunk7VCMJCBY_js.m(h));let p=chunk7VCMJCBY_js.e(e,"w","widowControl");p&&(t.widowControl=chunk7VCMJCBY_js.m(p));let x=chunk7VCMJCBY_js.e(e,"w","pageBreakBefore");x&&(t.pageBreakBefore=chunk7VCMJCBY_js.m(x));let f=chunk7VCMJCBY_js.e(e,"w","contextualSpacing");f&&(t.contextualSpacing=chunk7VCMJCBY_js.m(f));let b=chunk7VCMJCBY_js.e(e,"w","numPr");if(b){let y=chunk7VCMJCBY_js.e(b,"w","numId"),S=chunk7VCMJCBY_js.e(b,"w","ilvl");if(y||S){if(t.numPr={},y){let F=chunk7VCMJCBY_js.l(y,"w","val");F!==void 0&&(t.numPr.numId=F);}if(S){let F=chunk7VCMJCBY_js.l(S,"w","val");F!==void 0&&(t.numPr.ilvl=F);}}}let C=chunk7VCMJCBY_js.e(e,"w","outlineLvl");if(C){let y=chunk7VCMJCBY_js.l(C,"w","val");y!==void 0&&(t.outlineLevel=y);}let X=chunk7VCMJCBY_js.e(e,"w","pStyle");if(X){let y=chunk7VCMJCBY_js.j(X,"w","val");y&&(t.styleId=y);}let D=chunk7VCMJCBY_js.e(e,"w","suppressLineNumbers");D&&(t.suppressLineNumbers=chunk7VCMJCBY_js.m(D));let N=chunk7VCMJCBY_js.e(e,"w","suppressAutoHyphens");N&&(t.suppressAutoHyphens=chunk7VCMJCBY_js.m(N));let T=chunk7VCMJCBY_js.e(e,"w","rPr");return T&&(t.runProperties=z(T,n)),Object.keys(t).length>0?t:void 0}function H(e){if(!e)return;let n=chunk7VCMJCBY_js.l(e,"w","w"),t=chunk7VCMJCBY_js.j(e,"w","type");if(n!==void 0&&t)return {value:n,type:t}}function ye(e){if(!e)return;let n={},t=R(chunk7VCMJCBY_js.e(e,"w","top"));t&&(n.top=t);let o=R(chunk7VCMJCBY_js.e(e,"w","bottom"));o&&(n.bottom=o);let s=R(chunk7VCMJCBY_js.e(e,"w","left"));s&&(n.left=s);let i=R(chunk7VCMJCBY_js.e(e,"w","right"));i&&(n.right=i);let a=R(chunk7VCMJCBY_js.e(e,"w","insideH"));a&&(n.insideH=a);let c=R(chunk7VCMJCBY_js.e(e,"w","insideV"));return c&&(n.insideV=c),Object.keys(n).length>0?n:void 0}function ve(e){if(!e)return;let n={},t=H(chunk7VCMJCBY_js.e(e,"w","top"));t&&(n.top=t);let o=H(chunk7VCMJCBY_js.e(e,"w","bottom"));o&&(n.bottom=o);let s=H(chunk7VCMJCBY_js.e(e,"w","left"));s&&(n.left=s);let i=H(chunk7VCMJCBY_js.e(e,"w","right"));return i&&(n.right=i),Object.keys(n).length>0?n:void 0}function De(e){if(!e)return;let n={},t=chunk7VCMJCBY_js.j(e,"w","val");if(t){let u=parseInt(t,16);isNaN(u)||(n.firstRow=(u&32)!==0,n.lastRow=(u&64)!==0,n.firstColumn=(u&128)!==0,n.lastColumn=(u&256)!==0,n.noHBand=(u&512)!==0,n.noVBand=(u&1024)!==0);}let o=chunk7VCMJCBY_js.j(e,"w","firstColumn");o&&(n.firstColumn=o==="1");let s=chunk7VCMJCBY_js.j(e,"w","firstRow");s&&(n.firstRow=s==="1");let i=chunk7VCMJCBY_js.j(e,"w","lastColumn");i&&(n.lastColumn=i==="1");let a=chunk7VCMJCBY_js.j(e,"w","lastRow");a&&(n.lastRow=a==="1");let c=chunk7VCMJCBY_js.j(e,"w","noHBand");c&&(n.noHBand=c==="1");let d=chunk7VCMJCBY_js.j(e,"w","noVBand");return d&&(n.noVBand=d==="1"),Object.keys(n).length>0?n:void 0}function re(e,n){if(!e)return;let t={},o=chunk7VCMJCBY_js.e(e,"w","tblW");o&&(t.width=H(o));let s=chunk7VCMJCBY_js.e(e,"w","jc");if(s){let f=chunk7VCMJCBY_js.j(s,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}let i=chunk7VCMJCBY_js.e(e,"w","tblCellSpacing");i&&(t.cellSpacing=H(i));let a=chunk7VCMJCBY_js.e(e,"w","tblInd");a&&(t.indent=H(a));let c=chunk7VCMJCBY_js.e(e,"w","tblBorders");c&&(t.borders=ye(c));let d=chunk7VCMJCBY_js.e(e,"w","tblCellMar");d&&(t.cellMargins=ve(d));let u=chunk7VCMJCBY_js.e(e,"w","tblLayout");if(u){let f=chunk7VCMJCBY_js.j(u,"w","type");(f==="fixed"||f==="autofit")&&(t.layout=f);}let m=chunk7VCMJCBY_js.e(e,"w","tblStyle");if(m){let f=chunk7VCMJCBY_js.j(m,"w","val");f&&(t.styleId=f);}let h=chunk7VCMJCBY_js.e(e,"w","tblLook");h&&(t.look=De(h));let p=chunk7VCMJCBY_js.e(e,"w","shd");p&&(t.shading=W(p));let x=chunk7VCMJCBY_js.e(e,"w","bidiVisual");return x&&(t.bidi=chunk7VCMJCBY_js.m(x)),Object.keys(t).length>0?t:void 0}function se(e){if(!e)return;let n={},t=chunk7VCMJCBY_js.e(e,"w","trHeight");if(t){n.height=H(t);let c=chunk7VCMJCBY_js.j(t,"w","hRule");c&&(n.heightRule=c);}let o=chunk7VCMJCBY_js.e(e,"w","tblHeader");o&&(n.header=chunk7VCMJCBY_js.m(o));let s=chunk7VCMJCBY_js.e(e,"w","cantSplit");s&&(n.cantSplit=chunk7VCMJCBY_js.m(s));let i=chunk7VCMJCBY_js.e(e,"w","jc");if(i){let c=chunk7VCMJCBY_js.j(i,"w","val");(c==="left"||c==="center"||c==="right")&&(n.justification=c);}let a=chunk7VCMJCBY_js.e(e,"w","hidden");return a&&(n.hidden=chunk7VCMJCBY_js.m(a)),Object.keys(n).length>0?n:void 0}function ae(e,n){if(!e)return;let t={},o=chunk7VCMJCBY_js.e(e,"w","tcW");o&&(t.width=H(o));let s=chunk7VCMJCBY_js.e(e,"w","tcBorders");s&&(t.borders=ye(s));let i=chunk7VCMJCBY_js.e(e,"w","tcMar");i&&(t.margins=ve(i));let a=chunk7VCMJCBY_js.e(e,"w","shd");a&&(t.shading=W(a));let c=chunk7VCMJCBY_js.e(e,"w","vAlign");if(c){let f=chunk7VCMJCBY_js.j(c,"w","val");(f==="top"||f==="center"||f==="bottom")&&(t.verticalAlign=f);}let d=chunk7VCMJCBY_js.e(e,"w","textDirection");if(d){let f=chunk7VCMJCBY_js.j(d,"w","val");f&&(t.textDirection=f);}let u=chunk7VCMJCBY_js.e(e,"w","gridSpan");if(u){let f=chunk7VCMJCBY_js.l(u,"w","val");f!==void 0&&(t.gridSpan=f);}let m=chunk7VCMJCBY_js.e(e,"w","vMerge");if(m){let f=chunk7VCMJCBY_js.j(m,"w","val");t.vMerge=f==="restart"?"restart":"continue";}let h=chunk7VCMJCBY_js.e(e,"w","tcFitText");h&&(t.fitText=chunk7VCMJCBY_js.m(h));let p=chunk7VCMJCBY_js.e(e,"w","noWrap");p&&(t.noWrap=chunk7VCMJCBY_js.m(p));let x=chunk7VCMJCBY_js.e(e,"w","hideMark");return x&&(t.hideMark=chunk7VCMJCBY_js.m(x)),Object.keys(t).length>0?t:void 0}function Le(e,n){let t={styleId:chunk7VCMJCBY_js.j(e,"w","styleId")??"",type:chunk7VCMJCBY_js.j(e,"w","type")??"paragraph"},o=chunk7VCMJCBY_js.j(e,"w","default");o&&(t.default=o==="1"||o==="true");let s=chunk7VCMJCBY_js.e(e,"w","name");s&&(t.name=chunk7VCMJCBY_js.j(s,"w","val")??void 0);let i=chunk7VCMJCBY_js.e(e,"w","basedOn");i&&(t.basedOn=chunk7VCMJCBY_js.j(i,"w","val")??void 0);let a=chunk7VCMJCBY_js.e(e,"w","next");a&&(t.next=chunk7VCMJCBY_js.j(a,"w","val")??void 0);let c=chunk7VCMJCBY_js.e(e,"w","link");c&&(t.link=chunk7VCMJCBY_js.j(c,"w","val")??void 0);let d=chunk7VCMJCBY_js.e(e,"w","uiPriority");if(d){let T=chunk7VCMJCBY_js.l(d,"w","val");T!==void 0&&(t.uiPriority=T);}let u=chunk7VCMJCBY_js.e(e,"w","hidden");u&&(t.hidden=chunk7VCMJCBY_js.m(u));let m=chunk7VCMJCBY_js.e(e,"w","semiHidden");m&&(t.semiHidden=chunk7VCMJCBY_js.m(m));let h=chunk7VCMJCBY_js.e(e,"w","unhideWhenUsed");h&&(t.unhideWhenUsed=chunk7VCMJCBY_js.m(h));let p=chunk7VCMJCBY_js.e(e,"w","qFormat");p&&(t.qFormat=chunk7VCMJCBY_js.m(p));let x=chunk7VCMJCBY_js.e(e,"w","personal");x&&(t.personal=chunk7VCMJCBY_js.m(x));let f=chunk7VCMJCBY_js.e(e,"w","pPr");f&&(t.pPr=ee(f,n));let b=chunk7VCMJCBY_js.e(e,"w","rPr");b&&(t.rPr=z(b,n));let C=chunk7VCMJCBY_js.e(e,"w","tblPr");C&&(t.tblPr=re(C));let X=chunk7VCMJCBY_js.e(e,"w","trPr");X&&(t.trPr=se(X));let D=chunk7VCMJCBY_js.e(e,"w","tcPr");D&&(t.tcPr=ae(D));let N=chunk7VCMJCBY_js.f(e,"w","tblStylePr");if(N.length>0){t.tblStylePr=[];for(let T of N){let y=chunk7VCMJCBY_js.j(T,"w","type");if(y){let S={type:y},F=chunk7VCMJCBY_js.e(T,"w","pPr");F&&(S.pPr=ee(F,n));let M=chunk7VCMJCBY_js.e(T,"w","rPr");M&&(S.rPr=z(M,n));let L=chunk7VCMJCBY_js.e(T,"w","tblPr");L&&(S.tblPr=re(L));let I=chunk7VCMJCBY_js.e(T,"w","trPr");I&&(S.trPr=se(I));let A=chunk7VCMJCBY_js.e(T,"w","tcPr");A&&(S.tcPr=ae(A)),t.tblStylePr.push(S);}}}return t}function Ae(e,n){if(!e)return;let t={},o=chunk7VCMJCBY_js.e(e,"w","rPrDefault");if(o){let i=chunk7VCMJCBY_js.e(o,"w","rPr");i&&(t.rPr=z(i,n));}let s=chunk7VCMJCBY_js.e(e,"w","pPrDefault");if(s){let i=chunk7VCMJCBY_js.e(s,"w","pPr");i&&(t.pPr=ee(i,n));}return t.rPr||t.pPr?t:void 0}function ke(e,n){if(!n)return e;if(!e)return n?{...n}:void 0;let t={...e};for(let o of Object.keys(n)){let s=n[o];if(s!==void 0)if(o==="runProperties")t.runProperties=chunkMZOVDLYL_js.a(t.runProperties,n.runProperties);else if(o==="borders"||o==="numPr"||o==="frame"){let i=t[o],a=s;t[o]={...i||{},...a||{}};}else o==="tabs"&&Array.isArray(s)?t.tabs=[...s]:t[o]=s;}return t}function xe(e,n,t,o=new Set){if(o.has(e.styleId)||(o.add(e.styleId),!e.basedOn))return e;let s=n.get(e.basedOn);if(!s)return e;let i=xe(s,n,t,o),a={...e,pPr:ke(i.pPr,e.pPr),rPr:chunkMZOVDLYL_js.a(i.rPr,e.rPr)};return e.type==="table"&&((i.tblPr||e.tblPr)&&(a.tblPr={...i.tblPr||{},...e.tblPr||{}}),(i.trPr||e.trPr)&&(a.trPr={...i.trPr||{},...e.trPr||{}}),(i.tcPr||e.tcPr)&&(a.tcPr={...i.tcPr||{},...e.tcPr||{}})),a}function le(e,n){let t=new Map;try{let o=chunk7VCMJCBY_js.c(e);if(!o)return t;let s=chunk7VCMJCBY_js.f(o,"w","style");for(let i of s){let a=Le(i,n);a.styleId&&t.set(a.styleId,a);}for(let[i,a]of t){let c=xe(a,t,n);t.set(i,c);}}catch(o){console.warn("Failed to parse styles:",o);}return t}function Se(e,n){let t={styles:[]};try{let o=chunk7VCMJCBY_js.c(e);if(!o)return t;let s=chunk7VCMJCBY_js.e(o,"w","docDefaults");t.docDefaults=Ae(s,n);let i=chunk7VCMJCBY_js.e(o,"w","latentStyles");i&&(t.latentStyles={defLockedState:chunk7VCMJCBY_js.j(i,"w","defLockedState")==="1",defUIPriority:chunk7VCMJCBY_js.l(i,"w","defUIPriority"),defSemiHidden:chunk7VCMJCBY_js.j(i,"w","defSemiHidden")==="1",defUnhideWhenUsed:chunk7VCMJCBY_js.j(i,"w","defUnhideWhenUsed")==="1",defQFormat:chunk7VCMJCBY_js.j(i,"w","defQFormat")==="1",count:chunk7VCMJCBY_js.l(i,"w","count")});let a=le(e,n);t.styles=Array.from(a.values());}catch(o){console.warn("Failed to parse style definitions:",o);}return t}function Fe(e){let n={abstractNums:[],nums:[]};if(!e)return ce(n);let t=chunk7VCMJCBY_js.c(e);if(!t)return ce(n);let o=chunk7VCMJCBY_js.f(t,"w","abstractNum");for(let i of o){let a=Ee(i);a&&n.abstractNums.push(a);}let s=chunk7VCMJCBY_js.f(t,"w","num");for(let i of s){let a=Re(i);a&&n.nums.push(a);}return ce(n)}function Ee(e){let n=chunk7VCMJCBY_js.j(e,"w","abstractNumId");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t))return null;let o={abstractNumId:t,levels:[]},s=chunk7VCMJCBY_js.e(e,"w","multiLevelType");if(s){let u=chunk7VCMJCBY_js.j(s,"w","val");(u==="hybridMultilevel"||u==="multilevel"||u==="singleLevel")&&(o.multiLevelType=u);}let i=chunk7VCMJCBY_js.e(e,"w","name");i&&(o.name=chunk7VCMJCBY_js.j(i,"w","val")??void 0);let a=chunk7VCMJCBY_js.e(e,"w","numStyleLink");a&&(o.numStyleLink=chunk7VCMJCBY_js.j(a,"w","val")??void 0);let c=chunk7VCMJCBY_js.e(e,"w","styleLink");c&&(o.styleLink=chunk7VCMJCBY_js.j(c,"w","val")??void 0);let d=chunk7VCMJCBY_js.f(e,"w","lvl");for(let u of d){let m=Pe(u);m&&o.levels.push(m);}return o.levels.sort((u,m)=>u.ilvl-m.ilvl),o}function Re(e){let n=chunk7VCMJCBY_js.j(e,"w","numId");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t))return null;let o=chunk7VCMJCBY_js.e(e,"w","abstractNumId");if(!o)return null;let s=chunk7VCMJCBY_js.j(o,"w","val");if(s===null)return null;let i=parseInt(s,10);if(isNaN(i))return null;let a={numId:t,abstractNumId:i},c=chunk7VCMJCBY_js.f(e,"w","lvlOverride");if(c.length>0){a.levelOverrides=[];for(let d of c){let u=chunk7VCMJCBY_js.j(d,"w","ilvl");if(u===null)continue;let m=parseInt(u,10);if(isNaN(m))continue;let h={ilvl:m},p=chunk7VCMJCBY_js.e(d,"w","startOverride");if(p){let f=chunk7VCMJCBY_js.j(p,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(h.startOverride=b);}}let x=chunk7VCMJCBY_js.e(d,"w","lvl");x&&(h.lvl=Pe(x)??void 0),a.levelOverrides.push(h);}}return a}function Pe(e){let n=chunk7VCMJCBY_js.j(e,"w","ilvl");if(n===null)return null;let t=parseInt(n,10);if(isNaN(t)||t<0||t>8)return null;let o={ilvl:t,numFmt:"decimal",lvlText:""},s=chunk7VCMJCBY_js.e(e,"w","start");if(s){let f=chunk7VCMJCBY_js.j(s,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(o.start=b);}}let i=chunk7VCMJCBY_js.e(e,"w","numFmt");if(i){let f=chunk7VCMJCBY_js.j(i,"w","val");f&&(o.numFmt=Be(f));}let a=chunk7VCMJCBY_js.e(e,"w","lvlText");a&&(o.lvlText=chunk7VCMJCBY_js.j(a,"w","val")??"");let c=chunk7VCMJCBY_js.e(e,"w","lvlJc");if(c){let f=chunk7VCMJCBY_js.j(c,"w","val");(f==="left"||f==="center"||f==="right")&&(o.lvlJc=f);}let d=chunk7VCMJCBY_js.e(e,"w","suff");if(d){let f=chunk7VCMJCBY_js.j(d,"w","val");(f==="tab"||f==="space"||f==="nothing")&&(o.suffix=f);}let u=chunk7VCMJCBY_js.e(e,"w","isLgl");u&&(o.isLgl=chunk7VCMJCBY_js.m(u));let m=chunk7VCMJCBY_js.e(e,"w","lvlRestart");if(m){let f=chunk7VCMJCBY_js.j(m,"w","val");if(f!==null){let b=parseInt(f,10);isNaN(b)||(o.lvlRestart=b);}}let h=chunk7VCMJCBY_js.e(e,"w","legacy");h&&(o.legacy={legacy:chunk7VCMJCBY_js.m(h),legacySpace:chunk7VCMJCBY_js.l(h,"w","legacySpace"),legacyIndent:chunk7VCMJCBY_js.l(h,"w","legacyIndent")});let p=chunk7VCMJCBY_js.e(e,"w","pPr");p&&(o.pPr=Oe(p));let x=chunk7VCMJCBY_js.e(e,"w","rPr");return x&&(o.rPr=Ve(x)),o}function Be(e){return {decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",hex:"hex",chicago:"chicago",bullet:"bullet",none:"none",decimalZero:"decimalZero",ganada:"ganada",chosung:"chosung",ideographDigital:"ideographDigital",japaneseCounting:"japaneseCounting",aiueo:"aiueo",iroha:"iroha",decimalFullWidth:"decimalFullWidth",decimalHalfWidth:"decimalHalfWidth",japaneseLegal:"japaneseLegal",japaneseDigitalTenThousand:"japaneseDigitalTenThousand",decimalEnclosedCircle:"decimalEnclosedCircle",decimalFullWidth2:"decimalFullWidth2",aiueoFullWidth:"aiueoFullWidth",irohaFullWidth:"irohaFullWidth",decimalEnclosedFullstop:"decimalEnclosedFullstop",decimalEnclosedParen:"decimalEnclosedParen",decimalEnclosedCircleChinese:"decimalEnclosedCircleChinese",ideographEnclosedCircle:"ideographEnclosedCircle",ideographTraditional:"ideographTraditional",ideographZodiac:"ideographZodiac",ideographZodiacTraditional:"ideographZodiacTraditional",taiwaneseCounting:"taiwaneseCounting",ideographLegalTraditional:"ideographLegalTraditional",taiwaneseCountingThousand:"taiwaneseCountingThousand",taiwaneseDigital:"taiwaneseDigital",chineseCounting:"chineseCounting",chineseLegalSimplified:"chineseLegalSimplified",chineseCountingThousand:"chineseCountingThousand",koreanDigital:"koreanDigital",koreanCounting:"koreanCounting",koreanLegal:"koreanLegal",koreanDigital2:"koreanDigital2",vietnameseCounting:"vietnameseCounting",russianLower:"russianLower",russianUpper:"russianUpper",numberInDash:"numberInDash",hebrew1:"hebrew1",hebrew2:"hebrew2",arabicAlpha:"arabicAlpha",arabicAbjad:"arabicAbjad",hindiVowels:"hindiVowels",hindiConsonants:"hindiConsonants",hindiNumbers:"hindiNumbers",hindiCounting:"hindiCounting",thaiLetters:"thaiLetters",thaiNumbers:"thaiNumbers",thaiCounting:"thaiCounting"}[e]??"decimal"}function Oe(e){let n={},t=chunk7VCMJCBY_js.e(e,"w","ind");if(t){let s=chunk7VCMJCBY_js.l(t,"w","left"),i=chunk7VCMJCBY_js.l(t,"w","right"),a=chunk7VCMJCBY_js.l(t,"w","start"),c=chunk7VCMJCBY_js.l(t,"w","end"),d=chunk7VCMJCBY_js.l(t,"w","firstLine"),u=chunk7VCMJCBY_js.l(t,"w","hanging"),m=s??a,h=i??c;m!==void 0&&(n.indentLeft=m),h!==void 0&&(n.indentRight=h),u!==void 0?(n.indentFirstLine=-u,n.hangingIndent=true):d!==void 0&&(n.indentFirstLine=d);}let o=chunk7VCMJCBY_js.e(e,"w","tabs");if(o){n.tabs=[];let s=chunk7VCMJCBY_js.f(o,"w","tab");for(let i of s){let a=chunk7VCMJCBY_js.l(i,"w","pos"),c=chunk7VCMJCBY_js.j(i,"w","val"),d=chunk7VCMJCBY_js.j(i,"w","leader");a!==void 0&&c&&n.tabs.push({position:a,alignment:je(c),leader:He(d)});}}return n}function je(e){switch(e){case "left":return "left";case "center":return "center";case "right":return "right";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "num";default:return "left"}}function He(e){if(e)switch(e){case "none":return "none";case "dot":return "dot";case "hyphen":return "hyphen";case "underscore":return "underscore";case "heavy":return "heavy";case "middleDot":return "middleDot";default:return}}function Ve(e){let n={},t=chunk7VCMJCBY_js.e(e,"w","rFonts");t&&(n.fontFamily={ascii:chunk7VCMJCBY_js.j(t,"w","ascii")??void 0,hAnsi:chunk7VCMJCBY_js.j(t,"w","hAnsi")??void 0,eastAsia:chunk7VCMJCBY_js.j(t,"w","eastAsia")??void 0,cs:chunk7VCMJCBY_js.j(t,"w","cs")??void 0});let o=chunk7VCMJCBY_js.e(e,"w","sz");if(o){let d=chunk7VCMJCBY_js.l(o,"w","val");d!==void 0&&(n.fontSize=d);}let s=chunk7VCMJCBY_js.e(e,"w","color");if(s){let d=chunk7VCMJCBY_js.j(s,"w","val"),u=chunk7VCMJCBY_js.j(s,"w","themeColor");d==="auto"?n.color={auto:true}:u?n.color={themeColor:u,themeTint:chunk7VCMJCBY_js.j(s,"w","themeTint")??void 0,themeShade:chunk7VCMJCBY_js.j(s,"w","themeShade")??void 0}:d&&(n.color={rgb:d});}let i=chunk7VCMJCBY_js.e(e,"w","b");i&&(n.bold=chunk7VCMJCBY_js.m(i));let a=chunk7VCMJCBY_js.e(e,"w","i");a&&(n.italic=chunk7VCMJCBY_js.m(a));let c=chunk7VCMJCBY_js.e(e,"w","vanish");return c&&(n.hidden=chunk7VCMJCBY_js.m(c)),n}function ce(e){let n=new Map;for(let o of e.abstractNums)n.set(o.abstractNumId,o);let t=new Map;for(let o of e.nums)t.set(o.numId,o);return {definitions:e,getLevel(o,s){let i=t.get(o);if(!i)return null;if(i.levelOverrides){let c=i.levelOverrides.find(d=>d.ilvl===s);if(c){if(c.lvl)return c.lvl;let d=n.get(i.abstractNumId);if(d){let u=d.levels.find(m=>m.ilvl===s);if(u&&c.startOverride!==void 0)return {...u,start:c.startOverride}}}}let a=n.get(i.abstractNumId);if(!a)return null;if(a.numStyleLink&&a.levels.length===0){for(let c of n.values())if(c.styleLink===a.numStyleLink&&c.levels.length>0){a=c;break}}return a.levels.find(c=>c.ilvl===s)??null},getAbstract(o){return n.get(o)??null},getInstance(o){return t.get(o)??null},hasNumbering(o){return t.has(o)}}}function Ue(e,n){switch(n){case "decimal":case "decimalZero":return e.toString();case "upperRoman":return Ce(e).toUpperCase();case "lowerRoman":return Ce(e).toLowerCase();case "upperLetter":return Te(e).toUpperCase();case "lowerLetter":return Te(e).toLowerCase();case "ordinal":return We(e);case "bullet":return "\u2022";case "none":return "";case "decimalEnclosedParen":return `(${e})`;case "numberInDash":return `-${e}-`;default:return e.toString()}}function Ce(e){if(e<=0||e>3999)return e.toString();let n=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],t="",o=e;for(let[s,i]of n)for(;o>=s;)t+=i,o-=s;return t}function Te(e){if(e<=0)return "";let n="",t=e;for(;t>0;)t--,n=String.fromCharCode(97+t%26)+n,t=Math.floor(t/26);return n}function We(e){let n=["th","st","nd","rd"],t=e%100;return e+(n[(t-20)%10]||n[t]||n[0])}function gt(e,n,t){let o=e;for(let s=1;s<=9;s++){let i=`%${s}`;if(o.includes(i)){let a=s-1,c=n[a]??1,d=t[a]??"decimal",u=Ue(c,d);o=o.replace(i,u);}}return o}function wt(e){if(e.lvlText)return e.lvlText;let n=e.rPr?.fontFamily?.ascii||e.rPr?.fontFamily?.hAnsi;if(n){let t=n.toLowerCase();if(t==="symbol")return "\u2022";if(t.includes("wingding"))return "\u2751"}return "\u2022"}function ht(e){return e.numFmt==="bullet"||e.numFmt==="none"}function ze(e){let n=new Map,t=chunk7VCMJCBY_js.a(e);if(!t)return n;let o=chunk7VCMJCBY_js.e(t,"w16cex","commentsExtensible")??t;for(let s of chunk7VCMJCBY_js.i(o)){if((s.name?.replace(/^.*:/,"")??"")!=="comment")continue;let a=chunk7VCMJCBY_js.j(s,"w16cex","paraId")??chunk7VCMJCBY_js.j(s,"w15","paraId")??s.attributes?.["w16cex:paraId"]??s.attributes?.["w15:paraId"],c=chunk7VCMJCBY_js.j(s,"w16cex","dateUtc")??chunk7VCMJCBY_js.j(s,"w15","dateUtc")??s.attributes?.["w16cex:dateUtc"]??s.attributes?.["w15:dateUtc"];a&&c&&n.set(String(a).toUpperCase(),String(c));}return n}function $e(e){let n=new Map,t=new Map,o=chunk7VCMJCBY_js.a(e);if(!o)return {parentByParaId:n,doneByParaId:t};let s=chunk7VCMJCBY_js.e(o,"w15","commentsEx")??o;for(let i of chunk7VCMJCBY_js.i(s)){if((i.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let c=chunk7VCMJCBY_js.j(i,"w15","paraId")??i.attributes?.["w15:paraId"],d=chunk7VCMJCBY_js.j(i,"w15","paraIdParent")??i.attributes?.["w15:paraIdParent"],u=chunk7VCMJCBY_js.j(i,"w15","done")??i.attributes?.["w15:done"];if(c){let m=String(c).toUpperCase();d&&n.set(m,String(d).toUpperCase()),u==="1"&&t.set(m,true);}}return {parentByParaId:n,doneByParaId:t}}function Ne(e,n,t,o,s,i,a){if(!e)return [];let c=chunk7VCMJCBY_js.a(e);if(!c)return [];let d=i?ze(i):new Map,u=a?$e(a):null,m=chunk7VCMJCBY_js.e(c,"w","comments")??c,h=chunk7VCMJCBY_js.i(m),p=[],x=[];for(let f of h){if((f.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(chunk7VCMJCBY_js.j(f,"w","id")??"0",10),X=chunk7VCMJCBY_js.j(f,"w","author")??"Unknown",D=chunk7VCMJCBY_js.j(f,"w","initials"),N=D!=null?String(D):void 0,T=chunk7VCMJCBY_js.j(f,"w","date"),y=T!=null?String(T):void 0,S=chunk7VCMJCBY_js.j(f,"w14","paraId")??f.attributes?.["w14:paraId"]??chunk7VCMJCBY_js.j(f,"w","paraId"),M=(S?d.get(String(S).toUpperCase()):void 0)??y,L=chunk7VCMJCBY_js.j(f,"w","done")??f.attributes?.["w:done"],I=L==="1"||L==="true"?true:void 0,A=chunk7VCMJCBY_js.j(f,"w16cid","parentId")??chunk7VCMJCBY_js.j(f,"w","parentId")??f.attributes?.["w16cid:parentId"]??f.attributes?.["w:parentId"],V=A!=null?parseInt(String(A),10):void 0,U=[],j="";for(let P of chunk7VCMJCBY_js.i(f))if((P.name?.replace(/^.*:/,"")??"")==="p"){let g=chunkDV6IEOP5_js.I(P,n,t,null,o,s);U.push(g);let E=chunk7VCMJCBY_js.j(P,"w14","paraId")??P.attributes?.["w14:paraId"];E&&(j=String(E).toUpperCase());}I==null&&u&&j&&u.doneByParaId.get(j)&&(I=true),x.push(j),p.push({id:C,author:X,initials:N,date:M,content:U,...I!=null?{done:I}:{},...V!=null&&!isNaN(V)?{parentId:V}:{}});}if(u&&u.parentByParaId.size>0){let f=new Map;for(let b=0;b<p.length;b++){let C=x[b];C&&f.set(C,p[b].id);}for(let b=0;b<p.length;b++){if(p[b].parentId!=null)continue;let C=x[b];if(!C)continue;let X=u.parentByParaId.get(C);if(!X)continue;let D=f.get(X);D!=null&&(p[b]={...p[b],parentId:D});}}return p}async function Ie(e,n={}){let t=e instanceof ArrayBuffer?e:await chunkKBU6QQFU_js.p(e),{onProgress:o=()=>{},preloadFonts:s=true,parseHeadersFooters:i=true,parseNotes:a=true,detectVariables:c=true}=n,d=[];try{let p=function(P,B){let g=performance.now(),E=B(),k=performance.now()-g;return h.push({stage:P,ms:k}),k>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(k)}ms`),E};var u=p;let m=performance.now(),h=[];async function x(P,B){let g=performance.now(),E=await B(),k=performance.now()-g;return h.push({stage:P,ms:k}),k>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(k)}ms`),E}o("Extracting DOCX...",0);let f=await x("unzip",()=>G(t));o("Extracted DOCX",10),o("Parsing relationships...",10);let b=p("relationships",()=>f.documentRels?chunk7VCMJCBY_js.p(f.documentRels):new Map);o("Parsed relationships",15),o("Parsing theme...",15);let C=p("theme",()=>chunkDV6IEOP5_js.a(f.themeXml));o("Parsed theme",20),o("Parsing styles...",20);let X=null,D;p("styles",()=>{f.stylesXml&&(X=le(f.stylesXml,C),D=Se(f.stylesXml,C));}),o("Parsed styles",30),o("Parsing numbering...",30);let N=p("numbering",()=>Fe(f.numberingXml));o("Parsed numbering",35),o("Processing media files...",35);let T=p("media",()=>Ze(f,b));o("Processed media",40),o("Parsing document body...",40);let y={content:[]};p("documentBody",()=>{f.documentXml?y=chunkDV6IEOP5_js.L(f.documentXml,X,C,N,b,T):d.push("No document.xml found in DOCX");}),o("Parsed document body",55);let S,F;if(i){o("Parsing headers/footers...",55);let P=p("headersFooters",()=>_e(f,X,C,N,b,T));S=P.headers,F=P.footers,o("Parsed headers/footers",65);}else o("Skipping headers/footers",65);let M,L;if(a){o("Parsing footnotes/endnotes...",65);let P=p("footnotesEndnotes",()=>Je(f,X,C,N,b,T));M=P.footnotes,L=P.endnotes,o("Parsed footnotes/endnotes",75);}else o("Skipping footnotes/endnotes",75);o("Parsing comments...",75);let I=p("comments",()=>Ne(f.commentsXml,X,C,b,T,f.commentsExtensibleXml,f.commentsExtendedXml));I.length>0&&(y.comments=I);let A;c?(o("Detecting template variables...",75),A=p("variables",()=>chunkDV6IEOP5_js.K(y.content)),o("Detected variables",80)):o("Skipping variable detection",80),s?(o("Loading fonts...",80),await x("fonts",()=>qe(C,D,y)),o("Loaded fonts",95)):o("Skipping font loading",95),o("Assembling document...",95);let U={package:{document:y,styles:D,theme:C,numbering:N.definitions,headers:S,footers:F,footnotes:M,endnotes:L,relationships:b,media:T},originalBuffer:t,templateVariables:A,warnings:d.length>0?d:void 0},j=performance.now()-m;if(j>2e3){let P=h.filter(B=>B.ms>100).map(B=>`${B.stage}: ${Math.round(B.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(j)}ms`+(P?` (${P})`:""));}return o("Complete",100),U}catch(m){let h=m instanceof Error?m.message:String(m);throw console.error("[parseDocx] Failed to parse DOCX:",h,m),new Error(`Failed to parse DOCX: ${h}`)}}function Ze(e,n){let t=new Map;for(let[o,s]of e.media.entries()){let i=o.split("/").pop()||o,a=be(o),c=new Uint8Array(s),d="";for(let x=0;x<c.length;x++)d+=String.fromCharCode(c[x]);let u=btoa(d),m=`data:${a};base64,${u}`,h={path:o,filename:i,mimeType:a,data:s,dataUrl:m};t.set(o,h);let p=o.replace(/^word\//,"");p!==o&&t.set(p,h);}return t}function te(e,n){let t=n.toLowerCase();for(let[o,s]of e.entries())if(o.toLowerCase()===t)return s}function _e(e,n,t,o,s,i){let a=new Map,c=new Map;for(let[d,u]of s.entries())if(u.type===chunk7VCMJCBY_js.o.header&&u.target){let m=u.target.split("/").pop()||u.target,h=te(e.headers,m);if(h){let p=`word/_rels/${m}.rels`,x=te(e.allXml,p),f=x?chunk7VCMJCBY_js.p(x):s,b=chunkDV6IEOP5_js.p(h,"default",n,t,o,f,i);a.set(d,b);}}else if(u.type===chunk7VCMJCBY_js.o.footer&&u.target){let m=u.target.split("/").pop()||u.target,h=te(e.footers,m);if(h){let p=`word/_rels/${m}.rels`,x=te(e.allXml,p),f=x?chunk7VCMJCBY_js.p(x):s,b=chunkDV6IEOP5_js.q(h,"default",n,t,o,f,i);c.set(d,b);}}return {headers:a,footers:c}}function Je(e,n,t,o,s,i){let a=chunkDV6IEOP5_js.r(e.footnotesXml,n,t,o,s,i),c=chunkDV6IEOP5_js.s(e.endnotesXml,n,t,o,s,i);return {footnotes:a.getNormalFootnotes(),endnotes:c.getNormalEndnotes()}}async function qe(e,n,t){let o=new Set;if(e?.fontScheme){let{majorFont:s,minorFont:i}=e.fontScheme;s?.latin&&o.add(s.latin),i?.latin&&o.add(i.latin);}if(n?.docDefaults?.rPr?.fontFamily?.ascii&&o.add(n.docDefaults.rPr.fontFamily.ascii),n?.styles)for(let s of n.styles)s.rPr?.fontFamily?.ascii&&o.add(s.rPr.fontFamily.ascii),s.rPr?.fontFamily?.hAnsi&&o.add(s.rPr.fontFamily.hAnsi);if(t.content){for(let s of t.content)if(s.type==="paragraph")for(let i of s.content)i.type==="run"&&i.formatting?.fontFamily&&(i.formatting.fontFamily.ascii&&o.add(i.formatting.fontFamily.ascii),i.formatting.fontFamily.hAnsi&&o.add(i.formatting.fontFamily.hAnsi));}if(o.size>0)try{await chunkKBU6QQFU_js.l(Array.from(o));}catch(s){console.warn("Failed to load some fonts:",s);}}async function At(e){return Ie(e,{preloadFonts:false,parseHeadersFooters:false,parseNotes:false,detectVariables:true})}async function kt(e,n){return Ie(e,{onProgress:n,preloadFonts:true,parseHeadersFooters:true,parseNotes:true,detectVariables:true})}async function Et(e){let n=await G(e);if(!n.documentXml)return [];let t=chunkDV6IEOP5_js.L(n.documentXml);return chunkDV6IEOP5_js.K(t.content)}async function Rt(e){let n=await G(e),t=n.documentXml?chunkDV6IEOP5_js.K(chunkDV6IEOP5_js.L(n.documentXml).content):[];return {hasDocument:n.documentXml!==null,hasStyles:n.stylesXml!==null,hasTheme:n.themeXml!==null,hasNumbering:n.numberingXml!==null,headerCount:n.headers.size,footerCount:n.footers.size,mediaCount:n.media.size,variableCount:t.length}}
2
- exports.a=Fe;exports.b=Ue;exports.c=gt;exports.d=wt;exports.e=ht;exports.f=Ie;exports.g=At;exports.h=kt;exports.i=Et;exports.j=Rt;
@@ -1 +0,0 @@
1
- import {a}from'./chunk-67LVRQIR.mjs';import {chainCommands}from'prosemirror-commands';import {CellSelection,splitCell,mergeCells,columnResizing,tableEditing}from'prosemirror-tables';import {Selection,PluginKey,Plugin,TextSelection}from'prosemirror-state';import {DecorationSet,Decoration}from'prosemirror-view';var V={Highest:0,High:50,Default:100,Low:150,Lowest:200};function Q(o){return n=>{let e={...o.defaultOptions,...n};return {type:"extension",config:{name:o.name,priority:o.priority??V.Default,options:e},onSchemaReady(t){return o.onSchemaReady(t,e)}}}}function z(o){return n=>{let e={...o.defaultOptions,...n},t=typeof o.nodeSpec=="function"?o.nodeSpec(e):o.nodeSpec;return {type:"node",config:{name:o.name,priority:o.priority??V.Default,options:e,schemaNodeName:o.schemaNodeName,nodeSpec:t},onSchemaReady(r){return o.onSchemaReady?.(r,e)??{}}}}}function ft(o){return n=>{let e={...o.defaultOptions,...n},t=typeof o.markSpec=="function"?o.markSpec(e):o.markSpec;return {type:"mark",config:{name:o.name,priority:o.priority??V.Default,options:e,schemaMarkName:o.schemaMarkName,markSpec:t},onSchemaReady(r){return o.onSchemaReady?.(r,e)??{}}}}}function We(o){switch(o.toLowerCase()){case "solid":return "single";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "groove":return "threeDEngrave";case "ridge":return "threeDEmboss";case "inset":return "inset";case "outset":return "outset";default:return "single"}}function Ve(o){if(!o)return 8;let n=o.trim().toLowerCase();if(n==="thin")return 4;if(n==="medium")return 8;if(n==="thick")return 16;let e=parseFloat(n);return isNaN(e)?8:n.endsWith("pt")?Math.round(e*8):(n.endsWith("px"),Math.round(e*6))}function X(o){if(!o||o==="transparent"||o==="inherit")return null;let n=o.match(/#([0-9a-fA-F]{6})/);if(n)return {rgb:n[1].toUpperCase()};let e=o.match(/#([0-9a-fA-F]{3})$/);if(e){let[r,l,s]=e[1];return {rgb:(r+r+l+l+s+s).toUpperCase()}}let t=o.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);return t?{rgb:[t[1],t[2],t[3]].map(l=>parseInt(l).toString(16).padStart(2,"0")).join("").toUpperCase()}:null}function He(o){let n=(s,d,c)=>{if(!(!s||s==="none"||s==="hidden"))return {style:We(s),color:X(d)||void 0,size:Ve(c)}},e=n(o.borderTopStyle,o.borderTopColor,o.borderTopWidth),t=n(o.borderBottomStyle,o.borderBottomColor,o.borderBottomWidth),r=n(o.borderLeftStyle,o.borderLeftColor,o.borderLeftWidth),l=n(o.borderRightStyle,o.borderRightColor,o.borderRightWidth);return !e&&!t&&!r&&!l?null:{top:e,bottom:t,left:r,right:l}}function Le(o){let n=s=>{if(!s||s==="0px")return;let d=parseFloat(s);if(!(isNaN(d)||d===0))return s.endsWith("pt")?Math.round(d*20):Math.round(d*15)},e=n(o.paddingTop),t=n(o.paddingRight),r=n(o.paddingBottom),l=n(o.paddingLeft);return e===void 0&&t===void 0&&r===void 0&&l===void 0?null:{top:e,right:t,bottom:r,left:l}}function Fe(o){if(o)switch(o.toLowerCase()){case "top":return "top";case "middle":return "center";case "bottom":return "bottom";default:return}}function Ge(o){return X(o)?.rgb}function F(o){let n=o.style,e=He(n),t=Le(n);return {colspan:o.colSpan||1,rowspan:o.rowSpan||1,verticalAlign:o.dataset.valign||Fe(n.verticalAlign)||void 0,backgroundColor:o.dataset.bgcolor||Ge(n.backgroundColor)||void 0,borders:e||void 0,margins:t||void 0}}var Z={content:"tableRow+",group:"block",tableRole:"table",isolating:true,attrs:{styleId:{default:null},width:{default:null},widthType:{default:null},justification:{default:null},columnWidths:{default:null},floating:{default:null},cellMargins:{default:null},look:{default:null},_originalFormatting:{default:null}},parseDOM:[{tag:"table",getAttrs(o){let n=o;return {styleId:n.dataset.styleId||void 0,justification:n.dataset.justification}}}],toDOM(o){let n=o.attrs,e={class:"docx-table"};n.styleId&&(e["data-style-id"]=n.styleId);let t=["border-collapse: collapse"];if(n.width&&n.widthType==="pct")t.push(`width: ${n.width/50}%`),t.push("table-layout: fixed");else if(n.width&&n.widthType==="dxa"){let r=Math.round(n.width/20*1.333);t.push(`width: ${r}px`),t.push("table-layout: fixed");}else t.push("width: 100%"),t.push("table-layout: fixed");return n.justification==="center"?t.push("margin-left: auto","margin-right: auto"):n.justification==="right"&&t.push("margin-left: auto"),e.style=t.join("; "),["table",e,["tbody",0]]}},ee={content:"(tableCell | tableHeader)+",tableRole:"row",attrs:{height:{default:null},heightRule:{default:null},isHeader:{default:false},_originalFormatting:{default:null}},parseDOM:[{tag:"tr"}],toDOM(o){let n=o.attrs,e={};if(n.height){let t=Math.round(n.height/20*1.333);e.style=`height: ${t}px`;}return ["tr",e,0]}},_e={single:"solid",double:"double",dotted:"dotted",dashed:"dashed",thick:"solid",dashSmallGap:"dashed",dotDash:"dashed",dotDotDash:"dotted",triple:"double",thinThickSmallGap:"double",thickThinSmallGap:"double",thinThickThinSmallGap:"double",thinThickMediumGap:"double",thickThinMediumGap:"double",thinThickThinMediumGap:"double",thinThickLargeGap:"double",thickThinLargeGap:"double",thinThickThinLargeGap:"double",wave:"solid",doubleWave:"double",dashDotStroked:"dashed",threeDEmboss:"ridge",threeDEngrave:"groove",outset:"outset",inset:"inset"};function te(o){let n=[],e=o.borders;if(!e)return n;let t=r=>{if(!r||!r.style||r.style==="none"||r.style==="nil")return "none";let l=r.size?Math.max(1,Math.round(r.size/8*1.333)):1,s=_e[r.style]||"solid",d=a(r.color,void 0);return `${l}px ${s} ${d}`};return n.push(`border-top: ${t(e.top)}`),n.push(`border-bottom: ${t(e.bottom)}`),n.push(`border-left: ${t(e.left)}`),n.push(`border-right: ${t(e.right)}`),n}function oe(o){let n=o.margins;if(!n){let d=Math.round(7.1982);return [`padding: ${d}px ${d}px`]}let e=d=>d?Math.round(d/20*1.333):0,t=e(n.top),r=e(n.right),l=e(n.bottom),s=e(n.left);return [`padding: ${t}px ${r}px ${l}px ${s}px`]}function ne(o){if(!o)return [];let n=[];switch(o){case "tbRl":case "tbRlV":n.push("writing-mode: vertical-rl");break;case "btLr":n.push("writing-mode: vertical-lr","transform: rotate(180deg)");break;case "rl":case "rlV":n.push("direction: rtl");break;case "tb":case "tbV":n.push("writing-mode: vertical-lr");break}return n}function re(o){let n=[];if(o.colwidth&&o.colwidth.length>0){let e=o.colwidth.reduce((t,r)=>t+r,0);n.push(`width: ${e}px`);}else if(o.width&&o.widthType==="pct")n.push(`width: ${o.width}%`);else if(o.width){let e=Math.round(o.width/20*1.333);n.push(`width: ${e}px`);}return n}var le={content:"(paragraph | table)+",tableRole:"cell",isolating:true,attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},width:{default:null},widthType:{default:null},verticalAlign:{default:null},backgroundColor:{default:null},borders:{default:null},margins:{default:null},textDirection:{default:null},noWrap:{default:false},_originalFormatting:{default:null},_originalResolvedFill:{default:null}},parseDOM:[{tag:"td",getAttrs:o=>F(o)}],toDOM(o){let n=o.attrs,e={class:"docx-table-cell"};n.colspan>1&&(e.colspan=String(n.colspan)),n.rowspan>1&&(e.rowspan=String(n.rowspan));let t=[];return t.push(...oe(n)),n.noWrap?t.push("white-space: nowrap"):t.push("word-wrap: break-word","overflow-wrap: break-word","overflow: hidden"),t.push(...re(n)),t.push(...te(n)),t.push(...ne(n.textDirection)),n.verticalAlign&&(e["data-valign"]=n.verticalAlign,t.push(`vertical-align: ${n.verticalAlign}`)),n.backgroundColor&&(e["data-bgcolor"]=n.backgroundColor,t.push(`background-color: #${n.backgroundColor}`)),e.style=t.join("; "),["td",e,0]}},se={content:"(paragraph | table)+",tableRole:"header_cell",isolating:true,attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},width:{default:null},widthType:{default:null},verticalAlign:{default:null},backgroundColor:{default:null},borders:{default:null},margins:{default:null},textDirection:{default:null},noWrap:{default:false},_originalFormatting:{default:null},_originalResolvedFill:{default:null}},parseDOM:[{tag:"th",getAttrs:o=>F(o)}],toDOM(o){let n=o.attrs,e={class:"docx-table-header"};n.colspan>1&&(e.colspan=String(n.colspan)),n.rowspan>1&&(e.rowspan=String(n.rowspan));let t=["font-weight: bold"];return t.push(...oe(n)),n.noWrap?t.push("white-space: nowrap"):t.push("word-wrap: break-word","overflow-wrap: break-word","overflow: hidden"),t.push(...re(n)),t.push(...te(n)),t.push(...ne(n.textDirection)),n.verticalAlign&&(e["data-valign"]=n.verticalAlign,t.push(`vertical-align: ${n.verticalAlign}`)),n.backgroundColor&&(e["data-bgcolor"]=n.backgroundColor,t.push(`background-color: #${n.backgroundColor}`)),e.style=t.join("; "),["th",e,0]}};function y(o){let{selection:n}=o,{$from:e}=n,r=n instanceof CellSelection&&n.$anchorCell.pos!==n.$headCell.pos,l,s,d,c,a;for(let f=e.depth;f>0;f--){let g=e.node(f);if(g.type.name==="tableCell"||g.type.name==="tableHeader"){a=g;let h=e.node(f-1);if(h&&h.type.name==="tableRow"){let x=0,C=false;h.forEach((T,w,S)=>{C||(S===e.index(f-1)?(c=x,C=true):x+=T.attrs.colspan||1);});}}else if(g.type.name==="tableRow"){let h=e.node(f-1);h&&h.type.name==="table"&&(d=e.index(f-1));}else if(g.type.name==="table"){l=g,s=e.before(f);break}}if(!l)return {isInTable:false};let i=0,u=0;l.forEach(f=>{if(f.type.name==="tableRow"){i++;let g=0;f.forEach(h=>{g+=h.attrs.colspan||1;}),u=Math.max(u,g);}});let m=!!a&&!r,p,b;if(a){let f=a.attrs;f.backgroundColor&&typeof f.backgroundColor=="string"&&(b=f.backgroundColor);let g=f.borders;if(g)for(let h of ["top","right","bottom","left"]){let x=g[h];if(x?.color&&x.style&&x.style!=="none"&&x.style!=="nil"){p=x.color;break}}}return {isInTable:true,table:l,tablePos:s,rowIndex:d,columnIndex:c,rowCount:i,columnCount:u,hasMultiCellSelection:r,canSplitCell:!!m,cellBorderColor:p,cellBackgroundColor:b}}function G(o){let{$from:n}=o.selection;for(let e=n.depth;e>0;e--){let t=n.node(e);if(t.type.name==="tableCell"||t.type.name==="tableHeader")return true}return false}function ie(o){let{$from:n}=o.selection,e=-1,t=-1,r=-1;for(let l=n.depth;l>0;l--){let s=n.node(l);if(s.type.name==="tableCell"||s.type.name==="tableHeader")e=l;else if(s.type.name==="tableRow")t=l;else if(s.type.name==="table"){r=l;break}}return e===-1||t===-1||r===-1?null:{cellDepth:e,cellPos:n.before(e),rowDepth:t,tableDepth:r}}function Ue(){return (o,n)=>{if(!G(o))return false;let e=ie(o);if(!e)return false;let{$from:t}=o.selection,r=t.node(e.tableDepth),l=t.node(e.rowDepth),s=t.index(e.rowDepth),d=t.index(e.tableDepth);if(s<l.childCount-1){let c=e.cellPos+t.node(e.cellDepth).nodeSize;if(n){let a=c+1+1,i=o.tr.setSelection(Selection.near(o.doc.resolve(a)));n(i.scrollIntoView());}return true}if(d<r.childCount-1){let a=t.before(e.rowDepth)+l.nodeSize;if(n){let i=a+1+1+1,u=o.tr.setSelection(Selection.near(o.doc.resolve(i)));n(u.scrollIntoView());}return true}return false}}function qe(){return (o,n)=>{if(!G(o))return false;let e=ie(o);if(!e)return false;let{$from:t}=o.selection,r=t.node(e.tableDepth),l=t.index(e.rowDepth),s=t.index(e.tableDepth);if(l>0){let c=t.node(e.rowDepth).child(l-1),a=e.cellPos-c.nodeSize;if(n){let i=a+c.nodeSize-2,u=o.tr.setSelection(Selection.near(o.doc.resolve(i),-1));n(u.scrollIntoView());}return true}if(s>0){let d=r.child(s-1),a=t.before(e.rowDepth)-d.nodeSize;if(n){let u=a+d.nodeSize-1-1,m=o.tr.setSelection(Selection.near(o.doc.resolve(u),-1));n(m.scrollIntoView());}return true}return false}}function D(o,n={}){let e=o?.attrs??{};return {colspan:e.colspan||1,rowspan:1,colwidth:e.colwidth,width:e.width,widthType:e.widthType,verticalAlign:e.verticalAlign,backgroundColor:e.backgroundColor,borders:e.borders,margins:e.margins,textDirection:e.textDirection,noWrap:e.noWrap,...n}}function O(o,n){let{$from:e}=o.selection;for(let t=e.depth;t>0;t--){let r=e.node(t);if(r.type.name===n)return {pos:e.before(t),node:r}}return null}function A(o){let n=o.selection;if(n instanceof CellSelection){let t=[];return n.forEachCell((r,l)=>{t.push({pos:l,node:r});}),t}let e=O(o,"tableCell")??O(o,"tableHeader");return e?[e]:[]}function j(o,n){let e=new Map,t=new Map,r=o.childCount,l=0;return o.forEach((s,d,c)=>{if(s.type.name!=="tableRow")return;let a=0;s.forEach((i,u)=>{let m=n+d+u+2,p=i.attrs.colspan||1;e.set(m,{rowIdx:c,colIdx:a,colspan:p,pos:m,node:i}),t.set(`${c},${a}`,m),a+=p;}),l=Math.max(l,a);}),{cellByPos:e,cellByRC:t,totalRows:r,totalCols:l}}function Qe(o){return function(e,t,r="000000",l=9360){let s=[],d=Math.floor(l/t),c=360,a="atLeast",i={style:"single",size:4,color:{rgb:r}},u={top:i,bottom:i,left:i,right:i};for(let p=0;p<e;p++){let b=[];for(let f=0;f<t;f++){let g=o.nodes.paragraph.create(),h={colspan:1,rowspan:1,borders:u,width:d,widthType:"dxa"};b.push(o.nodes.tableCell.create(h,g));}s.push(o.nodes.tableRow.create({height:c,heightRule:a},b));}let m=Array(t).fill(d);return o.nodes.table.create({columnWidths:m,width:l,widthType:"dxa"},s)}}function ae(o){let n=Qe(o);return function(t,r){return (l,s)=>{let{$from:d}=l.selection,c="000000",a=l.storedMarks||d.marks();for(let u of a)if(u.type.name==="textColor"&&u.attrs.rgb){c=u.attrs.rgb;break}let i=d.pos;for(let u=d.depth;u>0;u--){let m=d.node(u);if(m.type.name==="paragraph"||m.type.name==="table"){i=d.after(u);break}}if(s){let u=9360;for(let w=d.depth;w>0;w--){let S=d.node(w);if(S.type.name==="tableCell"||S.type.name==="tableHeader"){let P=S.attrs.width;P&&P>0&&(u=Math.max(P-216,360));break}}let m=n(t,r,c,u),p=o.nodes.paragraph.create(),f=l.doc.resolve(i).nodeBefore?.type.name==="table",g=f?[p,m,p]:[m,p],h=l.tr.insert(i,g),x=i+1;f&&(x+=p.nodeSize);let T=x+1+1;h.setSelection(TextSelection.create(h.doc,T)),s(h.scrollIntoView());}return true}}}function de(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.rowIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=n.tr,l=t.table.child(t.rowIndex),s=[];l.forEach(a=>{let i=o.nodes.paragraph.create(),u=D(a);s.push(o.nodes.tableCell.create(u,i));});let d=o.nodes.tableRow.create({height:l.attrs.height??360,heightRule:l.attrs.heightRule??"atLeast"},s),c=t.tablePos+1;for(let a=0;a<t.rowIndex;a++)c+=t.table.child(a).nodeSize;r.insert(c,d),e(r.scrollIntoView());}return true}}function ce(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.rowIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=n.tr,l=t.table.child(t.rowIndex),s=[];l.forEach(a=>{let i=o.nodes.paragraph.create(),u=D(a);s.push(o.nodes.tableCell.create(u,i));});let d=o.nodes.tableRow.create({height:l.attrs.height??360,heightRule:l.attrs.heightRule??"atLeast"},s),c=t.tablePos+1;for(let a=0;a<=t.rowIndex;a++)c+=t.table.child(a).nodeSize;r.insert(c,d),e(r.scrollIntoView());}return true}}function ue(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.columnIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=n.tr,l=(t.columnCount||1)+1,s=Math.floor(5e3/l),d=[],c=t.tablePos+1;t.table.forEach(i=>{d.push(c),c+=i.nodeSize;}),t.table.forEach((i,u,m)=>{if(i.type.name==="tableRow"){let b=r.mapping.map(d[m])+1,f=0,g=false;if(i.forEach(h=>{if(!g&&f===t.columnIndex){let x=o.nodes.paragraph.create(),C=D(h,{colspan:1,rowspan:1});C.width=s,C.widthType="pct";let T=o.nodes.tableCell.create(C,x);r=r.insert(b,T),g=true;}b+=h.nodeSize,f+=h.attrs.colspan||1;}),!g&&f<=t.columnIndex){let h=o.nodes.paragraph.create(),x=D(i.child(i.childCount-1)??null,{colspan:1,rowspan:1});x.width=s,x.widthType="pct";let C=o.nodes.tableCell.create(x,h);r=r.insert(b,C);}}});let a=r.doc.nodeAt(t.tablePos);if(a&&a.type.name==="table"){let i=a.child(0);if(i&&i.type.name==="tableRow"){let b=t.tablePos+2;i.forEach(f=>{(f.type.name==="tableCell"||f.type.name==="tableHeader")&&(r=r.setNodeMarkup(b,void 0,{...f.attrs,width:s,widthType:"pct"})),b+=f.nodeSize;});}let u=i?.childCount??l,m=a.attrs.width||9360,p=Math.floor(m/Math.max(1,u));r=r.setNodeMarkup(t.tablePos,void 0,{...a.attrs,columnWidths:Array(u).fill(p)});}e(r.scrollIntoView());}return true}}function pe(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.columnIndex===void 0||!t.table||t.tablePos===void 0)return false;if(e){let r=n.tr,l=(t.columnCount||1)+1,s=Math.floor(5e3/l),d=[],c=t.tablePos+1;t.table.forEach(i=>{d.push(c),c+=i.nodeSize;}),t.table.forEach((i,u,m)=>{if(i.type.name==="tableRow"){let b=r.mapping.map(d[m])+1,f=0,g=false;if(i.forEach(h=>{if(b+=h.nodeSize,f+=h.attrs.colspan||1,!g&&f>t.columnIndex){let x=o.nodes.paragraph.create(),C=D(h,{colspan:1,rowspan:1});C.width=s,C.widthType="pct";let T=o.nodes.tableCell.create(C,x);r=r.insert(b,T),g=true;}}),!g){let h=o.nodes.paragraph.create(),x=D(i.child(i.childCount-1)??null,{colspan:1,rowspan:1});x.width=s,x.widthType="pct";let C=o.nodes.tableCell.create(x,h);r=r.insert(b,C);}}});let a=r.doc.nodeAt(t.tablePos);if(a&&a.type.name==="table"){let i=a.child(0);if(i&&i.type.name==="tableRow"){let b=t.tablePos+2;i.forEach(f=>{(f.type.name==="tableCell"||f.type.name==="tableHeader")&&(r=r.setNodeMarkup(b,void 0,{...f.attrs,width:s,widthType:"pct"})),b+=f.nodeSize;});}let u=i?.childCount??l,m=a.attrs.width||9360,p=Math.floor(m/Math.max(1,u));r=r.setNodeMarkup(t.tablePos,void 0,{...a.attrs,columnWidths:Array(u).fill(p)});}e(r.scrollIntoView());}return true}}var fe=(o,n)=>{let e=y(o);if(!e.isInTable||e.rowIndex===void 0||!e.table||e.tablePos===void 0||(e.rowCount||0)<=1)return false;if(n){let t=o.tr,r=e.tablePos+1;for(let s=0;s<e.rowIndex;s++)r+=e.table.child(s).nodeSize;let l=r+e.table.child(e.rowIndex).nodeSize;t.delete(r,l),n(t.scrollIntoView());}return true},me=(o,n)=>{let e=y(o);if(!e.isInTable||e.columnIndex===void 0||!e.table||e.tablePos===void 0||(e.columnCount||0)<=1)return false;if(n){let t=o.tr,r=(e.columnCount||2)-1,l=Math.floor(5e3/r),s=[],d=e.tablePos+1;e.table.forEach(a=>{if(a.type.name==="tableRow"){let i=d+1,u=0;a.forEach(m=>{let p=i,b=i+m.nodeSize,f=m.attrs.colspan||1;u<=e.columnIndex&&e.columnIndex<u+f&&s.push({start:p,end:b}),i=b,u+=f;});}d+=a.nodeSize;}),s.reverse().forEach(({start:a,end:i})=>{t=t.delete(a,i);});let c=t.doc.nodeAt(e.tablePos);if(c&&c.type.name==="table"){let a=c.child(0);if(a&&a.type.name==="tableRow"){let p=e.tablePos+2;a.forEach(b=>{(b.type.name==="tableCell"||b.type.name==="tableHeader")&&(t=t.setNodeMarkup(p,void 0,{...b.attrs,width:l,widthType:"pct"})),p+=b.nodeSize;});}let i=a?.childCount??r,u=c.attrs.width||9360,m=Math.floor(u/Math.max(1,i));t=t.setNodeMarkup(e.tablePos,void 0,{...c.attrs,columnWidths:Array(i).fill(m)});}n(t.scrollIntoView());}return true},be=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(n){let t=o.tr;t.delete(e.tablePos,e.tablePos+e.table.nodeSize),n(t.scrollIntoView());}return true},_=(o,n)=>{let e=o.selection;if(!("$anchorCell"in e&&typeof e.forEachCell=="function"))return false;let r=y(o);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;let l=0;r.table.descendants(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&(l+=1);});let s=0;if(e.forEachCell(()=>{s+=1;}),!(l>0&&s>=l))return false;if(n){let c=o.tr.delete(r.tablePos,r.tablePos+r.table.nodeSize);n(c.scrollIntoView());}return true},K=o=>{let{$from:n,empty:e}=o.selection;if(!e)return false;let t=n.parent;if(t.type.name!=="paragraph"||t.textContent.length>0)return false;let r=n.depth;if(r<1)return false;let l=n.node(r-1),s=n.index(r-1),d=s>0?l.child(s-1):null,c=s+1<l.childCount?l.child(s+1):null,a=d?.type.name==="table",i=c?.type.name==="table";return !!(a||i)};var ge=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(n){let t=e.tablePos+1,r=o.doc.resolve(t),l=o.doc.resolve(e.tablePos+e.table.nodeSize-2),s=CellSelection.create(o.doc,r.pos,l.pos);n(o.tr.setSelection(s));}return true},he=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table||e.rowIndex===void 0)return false;if(n){let r=e.tablePos+1;for(let a=0;a<e.rowIndex;a++){let i=e.table.child(a);r+=i.nodeSize;}let l=e.table.child(e.rowIndex),s=r+1,d=r+l.nodeSize-2,c=CellSelection.create(o.doc,s,d);n(o.tr.setSelection(c));}return true},we=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table||e.columnIndex===void 0)return false;if(n){let t=e.tablePos+1,r=e.table.child(0),l=e.table.child(e.table.childCount-1),s=t+1;for(let i=0;i<e.columnIndex&&i<r.childCount;i++)s+=r.child(i).nodeSize;let d=t;for(let i=0;i<e.table.childCount-1;i++)d+=e.table.child(i).nodeSize;let c=d+1;for(let i=0;i<e.columnIndex&&i<l.childCount;i++)c+=l.child(i).nodeSize;let a=CellSelection.create(o.doc,s,c);n(o.tr.setSelection(a));}return true};var L={top:{adjSide:"bottom",dRow:-1,dCol:0},bottom:{adjSide:"top",dRow:1,dCol:0},left:{adjSide:"right",dRow:0,dCol:-1},right:{adjSide:"left",dRow:0,dCol:1}};function $(o,n){return (e,t)=>{let r=y(e);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;if(t){let l=e.tr,s=r.table,d=r.tablePos,c=n??{style:"single",size:4,color:{rgb:"000000"}},a={style:"none"},{cellByPos:i,cellByRC:u}=j(s,d),m=A(e),p=1/0,b=-1,f=1/0,g=-1;for(let{pos:T}of m){let w=i.get(T);w&&(p=Math.min(p,w.rowIdx),b=Math.max(b,w.rowIdx),f=Math.min(f,w.colIdx),g=Math.max(g,w.colIdx+w.colspan-1));}let h=new Map,x=(T,w)=>h.get(T)??{...w.attrs},C=(T,w)=>{h.set(T,w);};for(let{pos:T}of m){let w=i.get(T);if(!w)continue;let S=w.rowIdx===p,P=w.rowIdx===b,R=w.colIdx===f,E=w.colIdx+w.colspan-1===g,I;switch(o){case "all":I={top:c,bottom:c,left:c,right:c};break;case "outside":I={top:S?c:a,bottom:P?c:a,left:R?c:a,right:E?c:a};break;case "inside":I={top:S?a:c,bottom:P?a:c,left:R?a:c,right:E?a:c};break;case "none":I={top:a,bottom:a,left:a,right:a};break}let B=x(T,w.node),M=B.borders||{};C(T,{...B,borders:{...M,...I}});for(let N of ["top","bottom","left","right"]){let v=I[N];if(!v)continue;let k=L[N],$e=N==="right"?w.colIdx+w.colspan:w.colIdx+k.dCol,W=u.get(`${w.rowIdx+k.dRow},${$e}`);if(W===void 0)continue;let ze=i.get(W),J=x(W,ze.node),je=J.borders||{};C(W,{...J,borders:{...je,[k.adjSide]:v}});}}for(let[T,w]of h)l.setNodeMarkup(l.mapping.map(T),void 0,w);t(l.scrollIntoView());}return true}}function xe(o,n,e){return (t,r)=>{let l=y(t);if(!l.isInTable||l.tablePos===void 0||!l.table)return false;if(r){let s=t.tr,d=A(t),c=n||{style:"none"},a={style:"none"},i=["top","bottom","left","right"],{cellByPos:u,cellByRC:m}=j(l.table,l.tablePos),p=new Map,b=(g,h)=>p.get(g)??{...h.attrs},f=(g,h)=>p.set(g,h);for(let{pos:g,node:h}of d){let x=u.get(g),C=b(g,h),T=C.borders||{},w=o==="all"?i:[o],S=e?{top:a,bottom:a,left:a,right:a}:{...T};for(let P of w)S[P]=c;if(x){let P=e?i:w;for(let R of P){let E=S[R],I=L[R],B=R==="right"?x.colIdx+x.colspan:x.colIdx+I.dCol,M=m.get(`${x.rowIdx+I.dRow},${B}`);if(M!==void 0){let N=u.get(M),v=b(M,N.node),k=v.borders||{};f(M,{...v,borders:{...k,[I.adjSide]:E}});}}}f(g,{...C,borders:S});}for(let[g,h]of p)s.setNodeMarkup(s.mapping.map(g),void 0,h);r(s.scrollIntoView());}return true}}function Ce(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l=A(n),s=o.replace(/^#/,""),d={style:"single",size:4},{cellByPos:c,cellByRC:a}=j(t.table,t.tablePos),i=new Map,u=(p,b)=>i.get(p)??{...b.attrs},m=(p,b)=>i.set(p,b);for(let{pos:p,node:b}of l){let f=c.get(p),g=u(p,b),h=g.borders||{},x={};for(let C of ["top","bottom","left","right"]){let T={...d,...h[C],color:{rgb:s}};if(x[C]=T,f){let w=L[C],S=C==="right"?f.colIdx+f.colspan:f.colIdx+w.dCol,P=a.get(`${f.rowIdx+w.dRow},${S}`);if(P!==void 0){let R=c.get(P),E=u(P,R.node),I=E.borders||{};m(P,{...E,borders:{...I,[w.adjSide]:T}});}}}m(p,{...g,borders:{...h,...x}});}for(let[p,b]of i)r.setNodeMarkup(r.mapping.map(p),void 0,b);e(r.scrollIntoView());}return true}}function ye(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l=A(n),s={style:"single",color:{rgb:"000000"}},{cellByPos:d,cellByRC:c}=j(t.table,t.tablePos),a=new Map,i=(m,p)=>a.get(m)??{...p.attrs},u=(m,p)=>a.set(m,p);for(let{pos:m,node:p}of l){let b=d.get(m),f=i(m,p),g=f.borders||{},h={};for(let x of ["top","bottom","left","right"]){let C={...s,...g[x],size:o};if(h[x]=C,b){let T=L[x],w=x==="right"?b.colIdx+b.colspan:b.colIdx+T.dCol,S=c.get(`${b.rowIdx+T.dRow},${w}`);if(S!==void 0){let P=d.get(S),R=i(S,P.node),E=R.borders||{};u(S,{...R,borders:{...E,[T.adjSide]:C}});}}}u(m,{...f,borders:{...g,...h}});}for(let[m,p]of a)r.setNodeMarkup(r.mapping.map(m),void 0,p);e(r.scrollIntoView());}return true}}function Te(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l=A(n),s=o?o.replace(/^#/,""):null;for(let{pos:d,node:c}of l)r.setNodeMarkup(r.mapping.map(d),void 0,{...c.attrs,backgroundColor:s});e(r.scrollIntoView());}return true}}function Se(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l=A(n);for(let{pos:s,node:d}of l)r.setNodeMarkup(r.mapping.map(s),void 0,{...d.attrs,verticalAlign:o});e(r.scrollIntoView());}return true}}function Re(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l=A(n);for(let{pos:s,node:d}of l){let a={...d.attrs.margins||{},...o};r.setNodeMarkup(r.mapping.map(s),void 0,{...d.attrs,margins:a});}e(r.scrollIntoView());}return true}}function Pe(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l=A(n);for(let{pos:s,node:d}of l)r.setNodeMarkup(r.mapping.map(s),void 0,{...d.attrs,textDirection:o});e(r.scrollIntoView());}return true}}var ke=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(n){let t=o.tr,r=A(o);for(let{pos:l,node:s}of r)t.setNodeMarkup(t.mapping.map(l),void 0,{...s.attrs,noWrap:!s.attrs.noWrap});n(t.scrollIntoView());}return true};function Ie(o,n){return (e,t)=>{let r=y(e);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;if(t){let l=O(e,"tableRow");if(!l)return true;let s=e.tr.setNodeMarkup(l.pos,void 0,{...l.node.attrs,height:o,heightRule:o?n||"atLeast":null});t(s.scrollIntoView());}return true}}var Ee=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table||!e.columnCount)return false;if(n){let t=o.tr,r=e.table,l=e.columnCount,s=r.attrs.columnWidths,d=s?s.reduce((u,m)=>u+m,0):9360,c=Math.floor(d/l),a=e.tablePos+1;r.forEach(u=>{if(u.type.name==="tableRow"){let m=a+1;u.forEach(p=>{(p.type.name==="tableCell"||p.type.name==="tableHeader")&&(t=t.setNodeMarkup(m,void 0,{...p.attrs,width:c,widthType:"dxa",colwidth:null})),m+=p.nodeSize;});}a+=u.nodeSize;});let i=Array(l).fill(c);t=t.setNodeMarkup(e.tablePos,void 0,{...r.attrs,columnWidths:i}),n(t.scrollIntoView());}return true},Me=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(n){let t=o.tr,r=e.table,l=e.tablePos+1;r.forEach(s=>{if(s.type.name==="tableRow"){let d=l+1;s.forEach(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&(t=t.setNodeMarkup(d,void 0,{...c.attrs,width:null,widthType:null,colwidth:null})),d+=c.nodeSize;});}l+=s.nodeSize;}),t=t.setNodeMarkup(e.tablePos,void 0,{...r.attrs,columnWidths:null,width:null,widthType:"auto"}),n(t.scrollIntoView());}return true};function Ne(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l=t.table,s=t.tablePos,d=l.childCount,c=o.look??{firstRow:true,lastRow:false,noHBand:false},a=o.conditionals??{},i=o.tableBorders;r=r.setNodeMarkup(s,void 0,{...l.attrs,styleId:o.styleId});let u=0,m=s+1;for(let p=0;p<d;p++){let b=l.child(p),f=p===0&&!!c.firstRow,g=p===d-1&&!!c.lastRow,h=c.noHBand!==true,x=b.childCount,C;f?C="firstRow":g?C="lastRow":(h&&(C=u%2===0?"band1Horz":"band2Horz"),u++);let T=m+1;for(let w=0;w<x;w++){let S=b.child(w),P=r.mapping.map(T),R=C,E=w===0&&!!c.firstCol,I=w===x-1&&!!c.lastCol;f&&E&&a.nwCell?R="nwCell":f&&I&&a.neCell?R="neCell":g&&E&&a.swCell?R="swCell":g&&I&&a.seCell?R="seCell":E?R="firstCol":I&&(R="lastCol");let B=R?a[R]:void 0,M={...S.attrs};B?.backgroundColor?M.backgroundColor=B.backgroundColor:M.backgroundColor=null;let N={},v=["top","bottom","left","right"];for(let k of v)B?.borders&&B.borders[k]!==void 0?N[k]=B.borders[k]:i&&(k==="top"&&p>0||k==="bottom"&&p<d-1?N[k]=i.insideH??i[k]:k==="left"&&w>0||k==="right"&&w<x-1?N[k]=i.insideV??i[k]:N[k]=i[k]);Object.keys(N).length>0?M.borders=N:M.borders=null,r=r.setNodeMarkup(P,void 0,M),T+=S.nodeSize;}m+=b.nodeSize;}e(r.scrollIntoView());}return true}}function Ae(o){return (n,e)=>{let t=y(n);if(!t.isInTable||t.tablePos===void 0||!t.table)return false;if(e){let r=n.tr,l={...t.table.attrs};"width"in o&&(l.width=o.width),"widthType"in o&&(l.widthType=o.widthType),"justification"in o&&(l.justification=o.justification),r.setNodeMarkup(t.tablePos,void 0,l),e(r.scrollIntoView());}return true}}var Be=(o,n)=>{let e=y(o);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(n){let t=O(o,"tableRow");if(!t)return true;let r=o.tr.setNodeMarkup(t.pos,void 0,{...t.node.attrs,isHeader:!t.node.attrs.isHeader});n(r.scrollIntoView());}return true};function ve(){let o=new PluginKey("activeCell");return new Plugin({key:o,props:{decorations(n){let{selection:e}=n;if(e instanceof CellSelection)return DecorationSet.empty;let{$from:t}=e;for(let r=t.depth;r>0;r--){let l=t.node(r);if(l.type.name==="tableCell"||l.type.name==="tableHeader"){let s=t.before(r);return DecorationSet.create(n.doc,[Decoration.node(s,s+l.nodeSize,{class:"activeCell"})])}}return DecorationSet.empty}}})}function Oe(o){let{schema:n}=o,e=ae(n),t=de(n),r=ce(n),l=ue(n),s=pe(n);return {plugins:[columnResizing({handleWidth:5,cellMinWidth:25,lastColumnResizable:true}),tableEditing(),ve()],keyboardShortcuts:{Backspace:chainCommands(_,K),Delete:chainCommands(_,K)},commands:{insertTable:e,addRowAbove:()=>t,addRowBelow:()=>r,deleteRow:()=>fe,addColumnLeft:()=>l,addColumnRight:()=>s,deleteColumn:()=>me,deleteTable:()=>be,selectTable:()=>ge,selectRow:()=>he,selectColumn:()=>we,mergeCells:()=>mergeCells,splitCell:()=>splitCell,setCellBorder:xe,setTableBorders:$,setCellVerticalAlign:Se,setCellMargins:Re,setCellTextDirection:Pe,toggleNoWrap:()=>ke,setRowHeight:Ie,toggleHeaderRow:()=>Be,distributeColumns:()=>Ee,autoFitContents:()=>Me,setTableProperties:Ae,applyTableStyle:Ne,setCellFillColor:Te,setTableBorderColor:Ce,setTableBorderWidth:ye,removeTableBorders:()=>$("none"),setAllTableBorders:d=>$("all",d),setOutsideTableBorders:d=>$("outside",d),setInsideTableBorders:d=>$("inside",d)}}}var st=z({name:"table",schemaNodeName:"table",nodeSpec:Z}),it=z({name:"tableRow",schemaNodeName:"tableRow",nodeSpec:ee}),at=z({name:"tableCell",schemaNodeName:"tableCell",nodeSpec:le}),dt=z({name:"tableHeader",schemaNodeName:"tableHeader",nodeSpec:se}),ct=Q({name:"tablePlugin",onSchemaReady:Oe});function co(){return [st(),it(),at(),dt(),ct()]}export{V as a,Q as b,z as c,ft as d,y as e,G as f,Ue as g,qe as h,st as i,it as j,at as k,dt as l,ct as m,co as n};
@@ -1 +0,0 @@
1
- 'use strict';var chunkLTYW3NLX_js=require('./chunk-LTYW3NLX.js'),chunkV435QKZB_js=require('./chunk-V435QKZB.js'),chunk7VCMJCBY_js=require('./chunk-7VCMJCBY.js');function W(t,r){let e=j(r),s=new RegExp(`<w:p[\\s][^>]*w14:paraId="${e}"`,"g"),o=[],i;for(;(i=s.exec(t))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<t.length;){let f=t.indexOf("<",n);if(f===-1)break;if(t.startsWith("<w:p",f)){let w=t[f+4];if(w===">"||w===" "||w==="/"){let u=t.indexOf(">",f);if(u===-1)break;if(t[u-1]==="/"){if(a===0)return {start:l,end:u+1};n=u+1;}else a++,n=u+1;}else n=f+1;}else if(t.startsWith("</w:p>",f)){if(a--,a===0)return {start:l,end:f+6};n=f+6;}else n=f+1;}return null}function L(t,r){let e=W(t,r);return e?t.substring(e.start,e.end):null}function Y(t){let r=0,e=/<w:p[\s>]/g,s;for(;(s=e.exec(t))!==null;){let o=s.index,i=t[o+4];(i===">"||i===" ")&&r++;}return r}function B(t){let r=new Map,e=/w14:paraId="([^"]+)"/g,s;for(;(s=e.exec(t))!==null;){let o=s[1];r.set(o,(r.get(o)||0)+1);}return r}function V(t,r,e){if(e.size===0)return {safe:true};let s=B(t),o=B(r);for(let n of e){let a=s.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-original: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-original: ${n}`}}for(let n of e){let a=o.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${n}`}}let i=Y(t),l=Y(r);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function H(t,r,e){if(e.size===0)return t;if(!V(t,r,e).safe)return null;let o=[];for(let l of e){let n=W(t,l);if(!n)return null;let a=L(r,l);if(!a)return null;o.push({start:n.start,end:n.end,newXml:a});}o.sort((l,n)=>n.start-l.start);let i=t;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function j(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){for(let r of t)if(r.type==="paragraph"){for(let e of r.content)if(e.type==="run"){for(let s of e.content)if(s.type==="drawing"&&s.image?.src?.startsWith("data:")&&!s.image?.rId)return true}else if(e.type==="hyperlink"&&e.href&&!e.rId&&!e.anchor)return true}else if(r.type==="table"){for(let e of r.rows)for(let s of e.cells)if(Z(s.content))return true}return false}async function nt(t,r,e){let{changedParaIds:s,structuralChange:o,hasUntrackedChanges:i}=e;if(o||i||!r)return null;let l=t.package.document.content;if(Z(l))return null;let n=t.package.document.comments,a=n&&n.length>0,f=chunkLTYW3NLX_js.f(t);try{let u=await(await import('jszip')).default.loadAsync(r),c=new Map;if(s.size>0){let d=u.file("word/document.xml");if(!d)return null;let p=await d.async("text"),y=chunkV435QKZB_js.g(t),g=H(p,y,s);if(!g)return null;c.set("word/document.xml",g);}if(a){let{xml:d,paraInfos:p}=chunkV435QKZB_js.i(n);c.set("word/comments.xml",d);let y=chunkV435QKZB_js.k(p);y&&c.set("word/commentsExtended.xml",y);let g=chunkV435QKZB_js.l(p);g&&c.set("word/commentsIds.xml",g);let I=chunkV435QKZB_js.m(p,n);I&&c.set("word/commentsExtensible.xml",I);let S=u.file("[Content_Types].xml");if(S){let m=c.get("[Content_Types].xml")??await S.async("text"),x=!1,C=[["/word/comments.xml",chunkLTYW3NLX_js.b],["/word/commentsExtended.xml",chunkLTYW3NLX_js.c],["/word/commentsIds.xml",chunkLTYW3NLX_js.d],["/word/commentsExtensible.xml",chunkLTYW3NLX_js.e]];for(let[h,b]of C)m.includes(h)||(m=m.replace("</Types>",`<Override PartName="${h}" ContentType="${b}"/></Types>`),x=!0);x&&c.set("[Content_Types].xml",m);}let T="word/_rels/document.xml.rels",N=u.file(T);if(N){let m=c.get(T)??await N.async("text"),x=!1,C=[["comments.xml",chunk7VCMJCBY_js.o.comments],["commentsExtended.xml",chunk7VCMJCBY_js.o.commentsExtended],["commentsIds.xml",chunk7VCMJCBY_js.o.commentsIds],["commentsExtensible.xml",chunk7VCMJCBY_js.o.commentsExtensible]];for(let[h,b]of C)if(!m.includes(h)){let J=chunkLTYW3NLX_js.a(m);m=m.replace("</Relationships>",`<Relationship Id="rId${J+1}" Type="${b}" Target="${h}"/></Relationships>`),x=!0;}x&&c.set(T,m);}}for(let[d,p]of f)c.set(d,p);let P=u.file("docProps/core.xml");if(P){let d=await P.async("text");c.set("docProps/core.xml",chunkLTYW3NLX_js.p(d,{updateModifiedDate:!0}));}return await chunkLTYW3NLX_js.m(u,c)}catch{return null}}exports.a=V;exports.b=H;exports.c=nt;