@eigenpal/docx-editor-core 1.4.0 → 1.5.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 (276) hide show
  1. package/dist/agent/index.d.mts +7 -6
  2. package/dist/agent/index.d.ts +7 -6
  3. package/dist/agent/index.js +1 -1
  4. package/dist/agent/index.mjs +1 -1
  5. package/dist/chunk-2LVK7EF5.mjs +2 -0
  6. package/dist/chunk-3HENAL6V.mjs +2 -0
  7. package/dist/{chunk-BUEMXRXH.js → chunk-3SJQRYO7.js} +1 -1
  8. package/dist/chunk-4JPHW7ZI.js +2 -0
  9. package/dist/chunk-4RQAAKQI.mjs +1 -0
  10. package/dist/{chunk-OF373DBR.mjs → chunk-5HA66FH4.mjs} +1 -1
  11. package/dist/chunk-5WINQXA3.js +1 -0
  12. package/dist/{chunk-3QPKTG2Y.js → chunk-6KM4VW4L.js} +2 -2
  13. package/dist/chunk-AA6D2C6R.js +4 -0
  14. package/dist/{chunk-7CZEZ3UL.mjs → chunk-AMJNIGO2.mjs} +1 -1
  15. package/dist/chunk-BTSL4AYY.js +1 -0
  16. package/dist/{chunk-HPAUUQAX.mjs → chunk-CBKJOPOW.mjs} +1 -1
  17. package/dist/chunk-CDBKFBC2.mjs +15 -0
  18. package/dist/chunk-COV4LHQ7.js +1 -0
  19. package/dist/chunk-DZ3FN3JI.js +2 -0
  20. package/dist/chunk-ENIWJBS7.mjs +2 -0
  21. package/dist/{chunk-55XWETY4.mjs → chunk-EZNVVB63.mjs} +1 -1
  22. package/dist/{chunk-CHN26LLL.mjs → chunk-F24WZXN4.mjs} +1 -1
  23. package/dist/{chunk-ZBCFIW2V.js → chunk-GB7RICH6.js} +1 -1
  24. package/dist/{chunk-CZSAC65M.js → chunk-GFM6PERG.js} +1 -1
  25. package/dist/chunk-GKAXYZCE.mjs +1 -0
  26. package/dist/chunk-H57LNDBH.js +1 -0
  27. package/dist/chunk-IGYHDSM7.mjs +1 -0
  28. package/dist/{chunk-BH3ACQ3M.js → chunk-JQUIUKRO.js} +3 -3
  29. package/dist/chunk-L6ZRNW7Y.mjs +1 -0
  30. package/dist/{chunk-Q4IEATDJ.js → chunk-LJ2TB6CY.js} +1 -1
  31. package/dist/{chunk-DFUWJHKF.mjs → chunk-M3UL6EUU.mjs} +3 -3
  32. package/dist/chunk-M7KTKPGO.mjs +1 -0
  33. package/dist/chunk-MA3HLGFO.js +1 -0
  34. package/dist/chunk-ND33YQGU.js +1 -0
  35. package/dist/{chunk-KXVCCT2A.js → chunk-NPFFCPZ6.js} +1 -1
  36. package/dist/chunk-NTBZRITU.mjs +1 -0
  37. package/dist/{chunk-SCK6ZM5V.js → chunk-O2643IUW.js} +1 -1
  38. package/dist/chunk-P7HWOJC5.js +2 -0
  39. package/dist/{chunk-YNUPP7UG.mjs → chunk-PYDX4MOT.mjs} +2 -2
  40. package/dist/{chunk-CHTIWTHQ.mjs → chunk-QUM4DFRE.mjs} +1 -1
  41. package/dist/chunk-QVRMX2AC.js +15 -0
  42. package/dist/chunk-QXSDGNJ4.js +1 -0
  43. package/dist/{chunk-FYRJTDC4.mjs → chunk-QZPVZY6S.mjs} +1 -1
  44. package/dist/chunk-RT52EYG3.mjs +4 -0
  45. package/dist/chunk-SHYNWAW6.mjs +1 -0
  46. package/dist/chunk-SKBHY5MK.mjs +1 -0
  47. package/dist/chunk-SNTAAXXA.mjs +1 -0
  48. package/dist/chunk-T4O4PFJD.mjs +1 -0
  49. package/dist/chunk-TAQTZAVZ.js +1 -0
  50. package/dist/{chunk-2SGJZYQF.js → chunk-TDYWEVAE.js} +1 -1
  51. package/dist/{chunk-6IZOFIQH.js → chunk-TV6JLFY5.js} +1 -1
  52. package/dist/chunk-UKMKGIME.js +1 -0
  53. package/dist/chunk-UXPY65AC.js +1 -0
  54. package/dist/chunk-VDKSZ5BQ.mjs +1 -0
  55. package/dist/chunk-VJFIAFZ5.mjs +1 -0
  56. package/dist/chunk-WQRWRWSK.js +1 -0
  57. package/dist/chunk-WWVIVYX6.mjs +1 -0
  58. package/dist/chunk-WXSGCEBZ.js +1 -0
  59. package/dist/{chunk-GGUHM74A.mjs → chunk-WYFK4QOF.mjs} +1 -1
  60. package/dist/chunk-X6AICTHN.js +1 -0
  61. package/dist/chunk-YHXVNJK5.mjs +1 -0
  62. package/dist/{chunk-J3YFJDZD.js → chunk-ZETEPB7I.js} +1 -1
  63. package/dist/{colorResolver-8A-qj-LP.d.ts → colorResolver-C696sd9x.d.ts} +1 -1
  64. package/dist/{colorResolver-BCvxTlLF.d.mts → colorResolver-DCBfI4ld.d.mts} +1 -1
  65. package/dist/{content-3xF4WDE8.d.mts → content-BlWiORm-.d.mts} +3 -147
  66. package/dist/{content-C8fc_tL6.d.ts → content-eG_Rtl0l.d.ts} +3 -147
  67. package/dist/{contentControlValues-DGDKD589.d.ts → contentControlValues-CO7pUqOf.d.ts} +1 -1
  68. package/dist/{contentControlValues-DjWvoJQ-.d.mts → contentControlValues-DfYN9BZ8.d.mts} +1 -1
  69. package/dist/core-plugins.d.mts +4 -3
  70. package/dist/core-plugins.d.ts +4 -3
  71. package/dist/core-plugins.js +1 -1
  72. package/dist/core-plugins.mjs +1 -1
  73. package/dist/core.d.mts +11 -10
  74. package/dist/core.d.ts +11 -10
  75. package/dist/core.js +1 -1
  76. package/dist/core.mjs +1 -1
  77. package/dist/{documentStyles-qR0VR2s0.d.mts → documentStyles-1G0xTl1v.d.mts} +1 -1
  78. package/dist/{documentStyles-C7k_8Sye.d.ts → documentStyles-Bw98BwEy.d.ts} +1 -1
  79. package/dist/docx/index.d.mts +7 -67
  80. package/dist/docx/index.d.ts +7 -67
  81. package/dist/docx/index.js +1 -1
  82. package/dist/docx/index.mjs +1 -1
  83. package/dist/docx/parser.d.mts +4 -3
  84. package/dist/docx/parser.d.ts +4 -3
  85. package/dist/docx/parser.js +1 -1
  86. package/dist/docx/parser.mjs +1 -1
  87. package/dist/docx/rezip.d.mts +4 -3
  88. package/dist/docx/rezip.d.ts +4 -3
  89. package/dist/docx/rezip.js +1 -1
  90. package/dist/docx/rezip.mjs +1 -1
  91. package/dist/docx/serializer/index.d.mts +5 -4
  92. package/dist/docx/serializer/index.d.ts +5 -4
  93. package/dist/docx/serializer/index.js +1 -1
  94. package/dist/docx/serializer/index.mjs +1 -1
  95. package/dist/editor/index.d.mts +4 -3
  96. package/dist/editor/index.d.ts +4 -3
  97. package/dist/editor/index.js +1 -1
  98. package/dist/editor/index.mjs +1 -1
  99. package/dist/{fontLoader-CUS1BPv7.d.mts → fontLoader-3MFD_Hj2.d.mts} +48 -5
  100. package/dist/{fontLoader-Dl9SEKex.d.ts → fontLoader-C6VvBUVB.d.ts} +48 -5
  101. package/dist/{formatting-BH4hcZiq.d.mts → formatting-DFtuRFQY.d.mts} +13 -0
  102. package/dist/{formatting-_OXU8gLB.d.ts → formatting-JhqWT_XM.d.ts} +13 -0
  103. package/dist/{headerFooterLayout-CU6hvszp.d.mts → headerFooterLayout-DJb-dV7X.d.mts} +2 -2
  104. package/dist/{headerFooterLayout-AtAOhM8E.d.ts → headerFooterLayout-bdHWlU6g.d.ts} +2 -2
  105. package/dist/headless.d.mts +9 -8
  106. package/dist/headless.d.ts +9 -8
  107. package/dist/headless.js +1 -1
  108. package/dist/headless.mjs +1 -1
  109. package/dist/layout-bridge/clickToPositionDom.js +1 -1
  110. package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
  111. package/dist/layout-bridge/index.d.mts +5 -4
  112. package/dist/layout-bridge/index.d.ts +5 -4
  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 +3 -2
  116. package/dist/layout-bridge/measuring/index.d.ts +3 -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 +4 -3
  122. package/dist/layout-bridge/toFlowBlocks.d.ts +4 -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 +4 -3
  126. package/dist/layout-engine/index.d.ts +4 -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 +21 -9
  130. package/dist/layout-engine/types.d.ts +21 -9
  131. package/dist/layout-painter/index.d.mts +5 -4
  132. package/dist/layout-painter/index.d.ts +5 -4
  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 +5 -4
  136. package/dist/layout-painter/renderPage.d.ts +5 -4
  137. package/dist/layout-painter/renderPage.js +1 -1
  138. package/dist/layout-painter/renderPage.mjs +1 -1
  139. package/dist/lists-Bn29SzeS.d.ts +148 -0
  140. package/dist/lists-CyGxd5Y2.d.mts +148 -0
  141. package/dist/managers/AutoSaveManager.d.mts +4 -3
  142. package/dist/managers/AutoSaveManager.d.ts +4 -3
  143. package/dist/managers/TableSelectionManager.d.mts +4 -3
  144. package/dist/managers/TableSelectionManager.d.ts +4 -3
  145. package/dist/managers/types.d.mts +4 -3
  146. package/dist/managers/types.d.ts +4 -3
  147. package/dist/{marks-BY573yZn.d.mts → marks-CzrbFi4o.d.mts} +1 -1
  148. package/dist/{marks-CjC9tF5k.d.ts → marks-Dq1QsxKA.d.ts} +1 -1
  149. package/dist/mcp-cli.mjs +23 -23
  150. package/dist/mcp.d.mts +4 -3
  151. package/dist/mcp.d.ts +4 -3
  152. package/dist/mcp.js +3 -3
  153. package/dist/mcp.mjs +7 -7
  154. package/dist/{nodes-75Q9GBxV.d.ts → nodes-BJef4KFW.d.ts} +17 -2
  155. package/dist/{nodes-cEI7hVY2.d.mts → nodes-RfTS-NSv.d.mts} +17 -2
  156. package/dist/numberingParser-ZSQ3SDCV.d.ts +81 -0
  157. package/dist/numberingParser-nSPZlzKr.d.mts +81 -0
  158. package/dist/prosemirror/applyFormatting.d.mts +5 -2
  159. package/dist/prosemirror/applyFormatting.d.ts +5 -2
  160. package/dist/prosemirror/applyFormatting.js +1 -1
  161. package/dist/prosemirror/applyFormatting.mjs +1 -1
  162. package/dist/prosemirror/cellDragSelection.d.mts +46 -0
  163. package/dist/prosemirror/cellDragSelection.d.ts +46 -0
  164. package/dist/prosemirror/cellDragSelection.js +1 -0
  165. package/dist/prosemirror/cellDragSelection.mjs +1 -0
  166. package/dist/prosemirror/commands/formatting.d.mts +2 -2
  167. package/dist/prosemirror/commands/formatting.d.ts +2 -2
  168. package/dist/prosemirror/commands/formatting.js +1 -1
  169. package/dist/prosemirror/commands/formatting.mjs +1 -1
  170. package/dist/prosemirror/commands/index.d.mts +32 -3
  171. package/dist/prosemirror/commands/index.d.ts +32 -3
  172. package/dist/prosemirror/commands/index.js +1 -1
  173. package/dist/prosemirror/commands/index.mjs +1 -1
  174. package/dist/prosemirror/commands/paragraph.d.mts +11 -1
  175. package/dist/prosemirror/commands/paragraph.d.ts +11 -1
  176. package/dist/prosemirror/commands/paragraph.js +1 -1
  177. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  178. package/dist/prosemirror/commentIdAllocator.d.mts +3 -2
  179. package/dist/prosemirror/commentIdAllocator.d.ts +3 -2
  180. package/dist/prosemirror/commentOps.d.mts +3 -2
  181. package/dist/prosemirror/commentOps.d.ts +3 -2
  182. package/dist/prosemirror/conversion/fromProseDoc.d.mts +4 -3
  183. package/dist/prosemirror/conversion/fromProseDoc.d.ts +4 -3
  184. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  185. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  186. package/dist/prosemirror/conversion/index.d.mts +4 -3
  187. package/dist/prosemirror/conversion/index.d.ts +4 -3
  188. package/dist/prosemirror/conversion/index.js +1 -1
  189. package/dist/prosemirror/conversion/index.mjs +1 -1
  190. package/dist/prosemirror/editor.css +13 -0
  191. package/dist/prosemirror/extensions/index.d.mts +1 -1
  192. package/dist/prosemirror/extensions/index.d.ts +1 -1
  193. package/dist/prosemirror/extensions/index.js +1 -1
  194. package/dist/prosemirror/extensions/index.mjs +1 -1
  195. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
  196. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
  197. package/dist/prosemirror/index.d.mts +20 -10
  198. package/dist/prosemirror/index.d.ts +20 -10
  199. package/dist/prosemirror/index.js +3 -3
  200. package/dist/prosemirror/index.mjs +3 -3
  201. package/dist/prosemirror/plugins/index.d.mts +5 -4
  202. package/dist/prosemirror/plugins/index.d.ts +5 -4
  203. package/dist/prosemirror/plugins/index.js +1 -1
  204. package/dist/prosemirror/plugins/index.mjs +1 -1
  205. package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
  206. package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
  207. package/dist/prosemirror/queries.d.mts +45 -3
  208. package/dist/prosemirror/queries.d.ts +45 -3
  209. package/dist/prosemirror/queries.js +2 -2
  210. package/dist/prosemirror/queries.mjs +2 -2
  211. package/dist/prosemirror/schema/index.d.mts +5 -4
  212. package/dist/prosemirror/schema/index.d.ts +5 -4
  213. package/dist/prosemirror/schema/index.js +1 -1
  214. package/dist/prosemirror/schema/index.mjs +1 -1
  215. package/dist/prosemirror/styles/index.d.mts +2 -2
  216. package/dist/prosemirror/styles/index.d.ts +2 -2
  217. package/dist/prosemirror/tableResize.js +1 -1
  218. package/dist/prosemirror/tableResize.mjs +1 -1
  219. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +3 -2
  220. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +3 -2
  221. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
  222. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
  223. package/dist/{sectionPropertiesSerializer-D86QlzlT.d.mts → sectionPropertiesSerializer-C8XCmzE4.d.mts} +1 -1
  224. package/dist/{sectionPropertiesSerializer-uXyGONxu.d.ts → sectionPropertiesSerializer-S8J1V9mb.d.ts} +1 -1
  225. package/dist/{selectionContext-BPAqgNgk.d.ts → selectionContext-BJZZW1JA.d.ts} +1 -1
  226. package/dist/{selectionContext-CoZat7QZ.d.mts → selectionContext-BjMyVQZO.d.mts} +1 -1
  227. package/dist/{styles-BOJ93SAm.d.mts → styles-Dqec8Aw6.d.mts} +1 -1
  228. package/dist/{styles-BWqX2AS-.d.ts → styles-gEujs7j6.d.ts} +1 -1
  229. package/dist/types/agentApi.d.mts +1 -1
  230. package/dist/types/agentApi.d.ts +1 -1
  231. package/dist/types/content.d.mts +3 -2
  232. package/dist/types/content.d.ts +3 -2
  233. package/dist/types/document.d.mts +7 -5
  234. package/dist/types/document.d.ts +7 -5
  235. package/dist/utils/comments.d.mts +3 -2
  236. package/dist/utils/comments.d.ts +3 -2
  237. package/dist/utils/index.d.mts +6 -5
  238. package/dist/utils/index.d.ts +6 -5
  239. package/dist/utils/index.js +3 -3
  240. package/dist/utils/index.mjs +3 -3
  241. package/dist/{variableDetector-CaY-sDau.d.mts → variableDetector-CN9_pUR_.d.mts} +1 -1
  242. package/dist/{variableDetector-1mxzPfs2.d.ts → variableDetector-o4Rb2Csy.d.ts} +1 -1
  243. package/package.json +9 -1
  244. package/dist/chunk-2WGTGBBS.js +0 -2
  245. package/dist/chunk-3G44SFHX.mjs +0 -4
  246. package/dist/chunk-77GRQUSK.js +0 -1
  247. package/dist/chunk-7LRR7RKE.mjs +0 -15
  248. package/dist/chunk-CRMZH7U7.mjs +0 -2
  249. package/dist/chunk-D3PRIF3Y.mjs +0 -1
  250. package/dist/chunk-EM33RGHT.mjs +0 -1
  251. package/dist/chunk-ESCPS4AO.mjs +0 -1
  252. package/dist/chunk-EUZLYQRB.mjs +0 -1
  253. package/dist/chunk-EV4LVK4X.js +0 -1
  254. package/dist/chunk-FW23IMBF.mjs +0 -1
  255. package/dist/chunk-HKN2NKOG.mjs +0 -1
  256. package/dist/chunk-INDYZOOS.js +0 -1
  257. package/dist/chunk-IUJCUITW.mjs +0 -1
  258. package/dist/chunk-IYKBX24M.js +0 -1
  259. package/dist/chunk-JHTURDPX.mjs +0 -1
  260. package/dist/chunk-KAOLVBLH.js +0 -1
  261. package/dist/chunk-L5NPEM7C.js +0 -1
  262. package/dist/chunk-LERLET2D.js +0 -4
  263. package/dist/chunk-MNOHUTKE.js +0 -15
  264. package/dist/chunk-NAFMAKLK.js +0 -2
  265. package/dist/chunk-OEC6SBDV.mjs +0 -1
  266. package/dist/chunk-OTHV7YV2.js +0 -2
  267. package/dist/chunk-QAJSNLJR.mjs +0 -1
  268. package/dist/chunk-RSU4HTC6.js +0 -1
  269. package/dist/chunk-TUIEV7Q7.js +0 -1
  270. package/dist/chunk-U67MWOPZ.mjs +0 -1
  271. package/dist/chunk-UE2ZKRYB.mjs +0 -2
  272. package/dist/chunk-WVERBZZU.js +0 -1
  273. package/dist/chunk-WWNOXNEX.mjs +0 -2
  274. package/dist/chunk-XLB6AC5Q.js +0 -1
  275. package/dist/chunk-YPQACU4A.js +0 -1
  276. package/dist/chunk-ZX26QZJ5.mjs +0 -1
@@ -0,0 +1 @@
1
+ import {c,b,i}from'./chunk-MJ6XZFVD.mjs';import {a}from'./chunk-67LVRQIR.mjs';import {chainCommands}from'prosemirror-commands';import {splitCell,mergeCells,columnResizing,tableEditing,CellSelection,selectedRect}from'prosemirror-tables';import {PluginKey,Plugin,TextSelection,Selection}from'prosemirror-state';import {DecorationSet,Decoration}from'prosemirror-view';function He(n){switch(n.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 Le(n){if(!n)return 8;let t=n.trim().toLowerCase();if(t==="thin")return 4;if(t==="medium")return 8;if(t==="thick")return 16;let e=parseFloat(t);return isNaN(e)?8:t.endsWith("pt")?Math.round(e*8):(t.endsWith("px"),Math.round(e*6))}function X(n){if(!n||n==="transparent"||n==="inherit")return null;let t=n.match(/#([0-9a-fA-F]{6})/);if(t)return {rgb:t[1].toUpperCase()};let e=n.match(/#([0-9a-fA-F]{3})$/);if(e){let[r,l,s]=e[1];return {rgb:(r+r+l+l+s+s).toUpperCase()}}let o=n.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);return o?{rgb:[o[1],o[2],o[3]].map(l=>parseInt(l).toString(16).padStart(2,"0")).join("").toUpperCase()}:null}function Fe(n){let t=(s,i,c)=>{if(!(!s||s==="none"||s==="hidden"))return {style:He(s),color:X(i)||void 0,size:Le(c)}},e=t(n.borderTopStyle,n.borderTopColor,n.borderTopWidth),o=t(n.borderBottomStyle,n.borderBottomColor,n.borderBottomWidth),r=t(n.borderLeftStyle,n.borderLeftColor,n.borderLeftWidth),l=t(n.borderRightStyle,n.borderRightColor,n.borderRightWidth);return !e&&!o&&!r&&!l?null:{top:e,bottom:o,left:r,right:l}}function Oe(n){let t=s=>{if(!s||s==="0px")return;let i=parseFloat(s);if(!(isNaN(i)||i===0))return s.endsWith("pt")?Math.round(i*20):Math.round(i*15)},e=t(n.paddingTop),o=t(n.paddingRight),r=t(n.paddingBottom),l=t(n.paddingLeft);return e===void 0&&o===void 0&&r===void 0&&l===void 0?null:{top:e,right:o,bottom:r,left:l}}function Ge(n){if(n)switch(n.toLowerCase()){case "top":return "top";case "middle":return "center";case "bottom":return "bottom";default:return}}function _e(n){return X(n)?.rgb}function O(n){let t=n.style,e=Fe(t),o=Oe(t);return {colspan:n.colSpan||1,rowspan:n.rowSpan||1,verticalAlign:n.dataset.valign||Ge(t.verticalAlign)||void 0,backgroundColor:n.dataset.bgcolor||_e(t.backgroundColor)||void 0,borders:e||void 0,margins:o||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},tableLayout:{default:null},floating:{default:null},cellMargins:{default:null},look:{default:null},_originalFormatting:{default:null},tblPrChange:{default:null}},parseDOM:[{tag:"table",getAttrs(n){let t=n;return {styleId:t.dataset.styleId||void 0,justification:t.dataset.justification}}}],toDOM(n){let t=n.attrs,e={class:"docx-table"};t.styleId&&(e["data-style-id"]=t.styleId);let o=["border-collapse: collapse"];if(t.width&&t.widthType==="pct")o.push(`width: ${t.width/50}%`),o.push("table-layout: fixed");else if(t.width&&t.widthType==="dxa"){let r=Math.round(t.width/20*1.333);o.push(`width: ${r}px`),o.push("table-layout: fixed");}else o.push("width: 100%"),o.push("table-layout: fixed");if(t.justification==="center"?o.push("margin-left: auto","margin-right: auto"):t.justification==="right"&&o.push("margin-left: auto"),e.style=o.join("; "),Array.isArray(t.tblPrChange)&&t.tblPrChange.length>0){let r=t.tblPrChange[0];e.class+=" ep-revision-prop-change",e["data-revision-id"]=String(r.info.id),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date);}return ["table",e,["tbody",0]]}},ee={content:"(tableCell | tableHeader)+",tableRole:"row",attrs:{height:{default:null},heightRule:{default:null},isHeader:{default:false},_originalFormatting:{default:null},trIns:{default:null},trDel:{default:null},trPrChange:{default:null}},parseDOM:[{tag:"tr"}],toDOM(n){let t=n.attrs,e={};if(t.height){let o=Math.round(t.height/20*1.333);e.style=`height: ${o}px`;}if(t.trIns||t.trDel){let o=t.trIns??t.trDel,r=t.trIns?"ep-revision-ins":"ep-revision-del";e.class="ep-revision-row "+r,e["data-revision-id"]=String(o.revisionId),e["data-revision-author"]=o.author,o.date&&(e["data-revision-date"]=o.date);}else if(Array.isArray(t.trPrChange)&&t.trPrChange.length>0){let o=t.trPrChange[0];e.class="ep-revision-prop-change",e["data-revision-id"]=String(o.info.id),e["data-revision-author"]=o.info.author,o.info.date&&(e["data-revision-date"]=o.info.date);}return ["tr",e,0]}},Ue={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(n){let t=[],e=n.borders;if(!e)return t;let o=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=Ue[r.style]||"solid",i=a(r.color,void 0);return `${l}px ${s} ${i}`};return t.push(`border-top: ${o(e.top)}`),t.push(`border-bottom: ${o(e.bottom)}`),t.push(`border-left: ${o(e.left)}`),t.push(`border-right: ${o(e.right)}`),t}function oe(n){let t=n.margins;if(!t){let i=Math.round(7.1982);return [`padding: ${i}px ${i}px`]}let e=i=>i?Math.round(i/20*1.333):0,o=e(t.top),r=e(t.right),l=e(t.bottom),s=e(t.left);return [`padding: ${o}px ${r}px ${l}px ${s}px`]}function ne(n){if(!n)return [];let t=[];switch(n){case "tbRl":case "tbRlV":t.push("writing-mode: vertical-rl");break;case "btLr":t.push("writing-mode: vertical-lr","transform: rotate(180deg)");break;case "rl":case "rlV":t.push("direction: rtl");break;case "tb":case "tbV":t.push("writing-mode: vertical-lr");break}return t}function re(n){let t=[];if(n.colwidth&&n.colwidth.length>0){let e=n.colwidth.reduce((o,r)=>o+r,0);t.push(`width: ${e}px`);}else if(n.width&&n.widthType==="pct")t.push(`width: ${n.width}%`);else if(n.width){let e=Math.round(n.width/20*1.333);t.push(`width: ${e}px`);}return t}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},cellMarker:{default:null},tcPrChange:{default:null}},parseDOM:[{tag:"td",getAttrs:n=>O(n)}],toDOM(n){let t=n.attrs,e={class:"docx-table-cell"};if(t.cellMarker){let r=t.cellMarker,l=r.kind==="ins"?"ep-revision-ins":r.kind==="del"?"ep-revision-del":"ep-revision-merge";e.class=`${e.class} ep-revision-cell ${l}`,e["data-revision-id"]=String(r.info.revisionId),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date),r.kind==="merge"&&(e["data-vmerge"]=r.vMerge);}else if(Array.isArray(t.tcPrChange)&&t.tcPrChange.length>0){let r=t.tcPrChange[0];e.class=`${e.class} ep-revision-prop-change`,e["data-revision-id"]=String(r.info.id),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date);}t.colspan>1&&(e.colspan=String(t.colspan)),t.rowspan>1&&(e.rowspan=String(t.rowspan));let o=[];return o.push(...oe(t)),t.noWrap?o.push("white-space: nowrap"):o.push("word-wrap: break-word","overflow-wrap: break-word","overflow: hidden"),o.push(...re(t)),o.push(...te(t)),o.push(...ne(t.textDirection)),t.verticalAlign&&(e["data-valign"]=t.verticalAlign,o.push(`vertical-align: ${t.verticalAlign}`)),t.backgroundColor&&(e["data-bgcolor"]=t.backgroundColor,o.push(`background-color: #${t.backgroundColor}`)),e.style=o.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},cellMarker:{default:null},tcPrChange:{default:null}},parseDOM:[{tag:"th",getAttrs:n=>O(n)}],toDOM(n){let t=n.attrs,e={class:"docx-table-header"};if(t.colspan>1&&(e.colspan=String(t.colspan)),t.rowspan>1&&(e.rowspan=String(t.rowspan)),t.cellMarker){let r=t.cellMarker,l=r.kind==="ins"?"ep-revision-ins":r.kind==="del"?"ep-revision-del":"ep-revision-merge";e.class=`${e.class} ep-revision-cell ${l}`,e["data-revision-id"]=String(r.info.revisionId),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date),r.kind==="merge"&&(e["data-vmerge"]=r.vMerge);}else if(Array.isArray(t.tcPrChange)&&t.tcPrChange.length>0){let r=t.tcPrChange[0];e.class=`${e.class} ep-revision-prop-change`,e["data-revision-id"]=String(r.info.id),e["data-revision-author"]=r.info.author,r.info.date&&(e["data-revision-date"]=r.info.date);}let o=["font-weight: bold"];return o.push(...oe(t)),t.noWrap?o.push("white-space: nowrap"):o.push("word-wrap: break-word","overflow-wrap: break-word","overflow: hidden"),o.push(...re(t)),o.push(...te(t)),o.push(...ne(t.textDirection)),t.verticalAlign&&(e["data-valign"]=t.verticalAlign,o.push(`vertical-align: ${t.verticalAlign}`)),t.backgroundColor&&(e["data-bgcolor"]=t.backgroundColor,o.push(`background-color: #${t.backgroundColor}`)),e.style=o.join("; "),["th",e,0]}};function y(n){let{selection:t}=n,{$from:e}=t,r=t instanceof CellSelection&&t.$anchorCell.pos!==t.$headCell.pos,l,s,i,c,a;for(let m=e.depth;m>0;m--){let h=e.node(m);if(h.type.name==="tableCell"||h.type.name==="tableHeader"){a=h;let g=e.node(m-1);if(g&&g.type.name==="tableRow"){let w=0,x=false;g.forEach((S,C,P)=>{x||(P===e.index(m-1)?(c=w,x=true):w+=S.attrs.colspan||1);});}}else if(h.type.name==="tableRow"){let g=e.node(m-1);g&&g.type.name==="table"&&(i=e.index(m-1));}else if(h.type.name==="table"){l=h,s=e.before(m);break}}if(!l)return {isInTable:false};let d=0,u=0;l.forEach(m=>{if(m.type.name==="tableRow"){d++;let h=0;m.forEach(g=>{h+=g.attrs.colspan||1;}),u=Math.max(u,h);}});let f=!!a&&!r,p,b;if(a){let m=a.attrs;m.backgroundColor&&typeof m.backgroundColor=="string"&&(b=m.backgroundColor);let h=m.borders;if(h)for(let g of ["top","right","bottom","left"]){let w=h[g];if(w?.color&&w.style&&w.style!=="none"&&w.style!=="nil"){p=w.color;break}}}return {isInTable:true,table:l,tablePos:s,rowIndex:i,columnIndex:c,rowCount:d,columnCount:u,hasMultiCellSelection:r,canSplitCell:!!f,cellBorderColor:p,cellBackgroundColor:b}}function G(n){let{$from:t}=n.selection;for(let e=t.depth;e>0;e--){let o=t.node(e);if(o.type.name==="tableCell"||o.type.name==="tableHeader")return true}return false}function ae(n){let{$from:t}=n.selection,e=-1,o=-1,r=-1;for(let l=t.depth;l>0;l--){let s=t.node(l);if(s.type.name==="tableCell"||s.type.name==="tableHeader")e=l;else if(s.type.name==="tableRow")o=l;else if(s.type.name==="table"){r=l;break}}return e===-1||o===-1||r===-1?null:{cellDepth:e,cellPos:t.before(e),rowDepth:o,tableDepth:r}}function qe(){return (n,t)=>{if(!G(n))return false;let e=ae(n);if(!e)return false;let{$from:o}=n.selection,r=o.node(e.tableDepth),l=o.node(e.rowDepth),s=o.index(e.rowDepth),i=o.index(e.tableDepth);if(s<l.childCount-1){let c=e.cellPos+o.node(e.cellDepth).nodeSize;if(t){let a=c+1+1,d=n.tr.setSelection(Selection.near(n.doc.resolve(a)));t(d.scrollIntoView());}return true}if(i<r.childCount-1){let a=o.before(e.rowDepth)+l.nodeSize;if(t){let d=a+1+1+1,u=n.tr.setSelection(Selection.near(n.doc.resolve(d)));t(u.scrollIntoView());}return true}return false}}function Je(){return (n,t)=>{if(!G(n))return false;let e=ae(n);if(!e)return false;let{$from:o}=n.selection,r=o.node(e.tableDepth),l=o.index(e.rowDepth),s=o.index(e.tableDepth);if(l>0){let c=o.node(e.rowDepth).child(l-1),a=e.cellPos-c.nodeSize;if(t){let d=a+c.nodeSize-2,u=n.tr.setSelection(Selection.near(n.doc.resolve(d),-1));t(u.scrollIntoView());}return true}if(s>0){let i=r.child(s-1),a=o.before(e.rowDepth)-i.nodeSize;if(t){let u=a+i.nodeSize-1-1,f=n.tr.setSelection(Selection.near(n.doc.resolve(u),-1));t(f.scrollIntoView());}return true}return false}}function E(n,t={}){let e=n?.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,...t}}function z(n,t){let{$from:e}=n.selection;for(let o=e.depth;o>0;o--){let r=e.node(o);if(r.type.name===t)return {pos:e.before(o),node:r}}return null}function B(n){let t=n.selection;if(t instanceof CellSelection){let o=[];return t.forEachCell((r,l)=>{o.push({pos:l,node:r});}),o}let e=z(n,"tableCell")??z(n,"tableHeader");return e?[e]:[]}function V(n,t){let e=new Map,o=new Map,r=n.childCount,l=0;return n.forEach((s,i,c)=>{if(s.type.name!=="tableRow")return;let a=0;s.forEach((d,u)=>{let f=t+i+u+2,p=d.attrs.colspan||1;e.set(f,{rowIdx:c,colIdx:a,colspan:p,pos:f,node:d}),o.set(`${c},${a}`,f),a+=p;}),l=Math.max(l,a);}),{cellByPos:e,cellByRC:o,totalRows:r,totalCols:l}}function ie(n,t,e){let o=[];return t.forEach(r=>{let l=n.nodes.paragraph.create(),i={...E(r),cellMarker:{kind:"ins",info:e}};o.push(n.nodes.tableCell.create(i,l));}),n.nodes.tableRow.create({height:t.attrs.height??360,heightRule:t.attrs.heightRule??"atLeast",isHeader:t.attrs.isHeader??false,trIns:e},o)}function Xe(n){return function(e,o,r="000000",l=9360,s){let i=[],c=Math.floor(l/o),a=360,d="atLeast",u={style:"single",size:4,color:{rgb:r}},f={top:u,bottom:u,left:u,right:u};for(let b=0;b<e;b++){let m=[];for(let g=0;g<o;g++){let w=n.nodes.paragraph.create(),x={colspan:1,rowspan:1,borders:f,width:c,widthType:"dxa"};s&&(x.cellMarker={kind:"ins",info:s}),m.push(n.nodes.tableCell.create(x,w));}let h={height:a,heightRule:d};s&&(h.trIns=s),i.push(n.nodes.tableRow.create(h,m));}let p=Array(o).fill(c);return n.nodes.table.create({columnWidths:p,width:l,widthType:"dxa",tableLayout:"fixed"},i)}}function de(n){let t=Xe(n);return function(o,r){return (l,s)=>{let{$from:i$1}=l.selection,c="000000",a=l.storedMarks||i$1.marks();for(let u of a)if(u.type.name==="textColor"&&u.attrs.rgb){c=u.attrs.rgb;break}let d=i$1.pos;for(let u=i$1.depth;u>0;u--){let f=i$1.node(u);if(f.type.name==="paragraph"||f.type.name==="table"){d=i$1.after(u);break}}if(s){let u=9360;for(let P=i$1.depth;P>0;P--){let R=i$1.node(P);if(R.type.name==="tableCell"||R.type.name==="tableHeader"){let T=R.attrs.width;T&&T>0&&(u=Math.max(T-216,360));break}}let f=i(l),p=t(o,r,c,u,f),b=n.nodes.paragraph.create(),h=l.doc.resolve(d).nodeBefore?.type.name==="table",g=h?[b,p,b]:[p,b],w=l.tr.insert(d,g),x=d+1;h&&(x+=b.nodeSize);let C=x+1+1;w.setSelection(TextSelection.create(w.doc,C)),s(w.scrollIntoView());}return true}}}function ce(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.rowIndex===void 0||!o.table||o.tablePos===void 0)return false;if(e){let r=t.tr,l=o.table.child(o.rowIndex),s=i(t),i$1;if(s)i$1=ie(n,l,s);else {let a=[];l.forEach(d=>{let u=n.nodes.paragraph.create(),f=E(d);a.push(n.nodes.tableCell.create(f,u));}),i$1=n.nodes.tableRow.create({height:l.attrs.height??360,heightRule:l.attrs.heightRule??"atLeast"},a);}let c=o.tablePos+1;for(let a=0;a<o.rowIndex;a++)c+=o.table.child(a).nodeSize;r.insert(c,i$1),e(r.scrollIntoView());}return true}}function ue(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.rowIndex===void 0||!o.table||o.tablePos===void 0)return false;if(e){let r=t.tr,l=o.table.child(o.rowIndex),s=i(t),i$1;if(s)i$1=ie(n,l,s);else {let a=[];l.forEach(d=>{let u=n.nodes.paragraph.create(),f=E(d);a.push(n.nodes.tableCell.create(f,u));}),i$1=n.nodes.tableRow.create({height:l.attrs.height??360,heightRule:l.attrs.heightRule??"atLeast"},a);}let c=o.tablePos+1;for(let a=0;a<=o.rowIndex;a++)c+=o.table.child(a).nodeSize;r.insert(c,i$1),e(r.scrollIntoView());}return true}}function fe(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.columnIndex===void 0||!o.table||o.tablePos===void 0)return false;if(e){let r=t.tr,l=(o.columnCount||1)+1,s=Math.floor(5e3/l),i=[],c=o.tablePos+1;o.table.forEach(d=>{i.push(c),c+=d.nodeSize;}),o.table.forEach((d,u,f)=>{if(d.type.name==="tableRow"){let b=r.mapping.map(i[f])+1,m=0,h=false;if(d.forEach(g=>{if(!h&&m===o.columnIndex){let w=n.nodes.paragraph.create(),x=E(g,{colspan:1,rowspan:1});x.width=s,x.widthType="pct";let S=n.nodes.tableCell.create(x,w);r=r.insert(b,S),h=true;}b+=g.nodeSize,m+=g.attrs.colspan||1;}),!h&&m<=o.columnIndex){let g=n.nodes.paragraph.create(),w=E(d.child(d.childCount-1)??null,{colspan:1,rowspan:1});w.width=s,w.widthType="pct";let x=n.nodes.tableCell.create(w,g);r=r.insert(b,x);}}});let a=r.doc.nodeAt(o.tablePos);if(a&&a.type.name==="table"){let d=a.child(0);if(d&&d.type.name==="tableRow"){let b=o.tablePos+2;d.forEach(m=>{(m.type.name==="tableCell"||m.type.name==="tableHeader")&&(r=r.setNodeMarkup(b,void 0,{...m.attrs,width:s,widthType:"pct"})),b+=m.nodeSize;});}let u=d?.childCount??l,f=a.attrs.width||9360,p=Math.floor(f/Math.max(1,u));r=r.setNodeMarkup(o.tablePos,void 0,{...a.attrs,columnWidths:Array(u).fill(p)});}e(r.scrollIntoView());}return true}}function pe(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.columnIndex===void 0||!o.table||o.tablePos===void 0)return false;if(e){let r=t.tr,l=(o.columnCount||1)+1,s=Math.floor(5e3/l),i=[],c=o.tablePos+1;o.table.forEach(d=>{i.push(c),c+=d.nodeSize;}),o.table.forEach((d,u,f)=>{if(d.type.name==="tableRow"){let b=r.mapping.map(i[f])+1,m=0,h=false;if(d.forEach(g=>{if(b+=g.nodeSize,m+=g.attrs.colspan||1,!h&&m>o.columnIndex){let w=n.nodes.paragraph.create(),x=E(g,{colspan:1,rowspan:1});x.width=s,x.widthType="pct";let S=n.nodes.tableCell.create(x,w);r=r.insert(b,S),h=true;}}),!h){let g=n.nodes.paragraph.create(),w=E(d.child(d.childCount-1)??null,{colspan:1,rowspan:1});w.width=s,w.widthType="pct";let x=n.nodes.tableCell.create(w,g);r=r.insert(b,x);}}});let a=r.doc.nodeAt(o.tablePos);if(a&&a.type.name==="table"){let d=a.child(0);if(d&&d.type.name==="tableRow"){let b=o.tablePos+2;d.forEach(m=>{(m.type.name==="tableCell"||m.type.name==="tableHeader")&&(r=r.setNodeMarkup(b,void 0,{...m.attrs,width:s,widthType:"pct"})),b+=m.nodeSize;});}let u=d?.childCount??l,f=a.attrs.width||9360,p=Math.floor(f/Math.max(1,u));r=r.setNodeMarkup(o.tablePos,void 0,{...a.attrs,columnWidths:Array(u).fill(p)});}e(r.scrollIntoView());}return true}}var be=(n,t)=>{let e=y(n);if(!e.isInTable||e.rowIndex===void 0||!e.table||e.tablePos===void 0||(e.rowCount||0)<=1)return false;let o=e.rowCount??0,r=selectedRect(n),l=Math.max(0,Math.min(r.top,o-1)),s=Math.min(Math.max(r.bottom-1,l),o-1);if(t){let i$1=n.tr,c=e.table,a=i(n);if(!a&&l===0&&s>=o-1)return i$1.delete(e.tablePos,e.tablePos+c.nodeSize),t(i$1.scrollIntoView()),true;let d=[],u=e.tablePos+1;if(c.forEach(f=>{d.push(u),u+=f.nodeSize;}),a)for(let f=l;f<=s;f++){let p=c.child(f),b=d[f];i$1.setNodeMarkup(b,void 0,{...p.attrs,trDel:a});let m=b+1;p.forEach(h=>{(h.type.name==="tableCell"||h.type.name==="tableHeader")&&i$1.setNodeMarkup(m,void 0,{...h.attrs,cellMarker:{kind:"del",info:a}}),m+=h.nodeSize;});}else for(let f=s;f>=l;f--){let p=c.child(f),b=d[f];i$1.delete(b,b+p.nodeSize);}t(i$1.scrollIntoView());}return true},me=(n,t)=>{let e=y(n);if(!e.isInTable||e.columnIndex===void 0||!e.table||e.tablePos===void 0||(e.columnCount||0)<=1)return false;if(t){let o=n.tr,r=(e.columnCount||2)-1,l=Math.floor(5e3/r),s=[],i=e.tablePos+1;e.table.forEach(a=>{if(a.type.name==="tableRow"){let d=i+1,u=0;a.forEach(f=>{let p=d,b=d+f.nodeSize,m=f.attrs.colspan||1;u<=e.columnIndex&&e.columnIndex<u+m&&s.push({start:p,end:b}),d=b,u+=m;});}i+=a.nodeSize;}),s.reverse().forEach(({start:a,end:d})=>{o=o.delete(a,d);});let c=o.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")&&(o=o.setNodeMarkup(p,void 0,{...b.attrs,width:l,widthType:"pct"})),p+=b.nodeSize;});}let d=a?.childCount??r,u=c.attrs.width||9360,f=Math.floor(u/Math.max(1,d));o=o.setNodeMarkup(e.tablePos,void 0,{...c.attrs,columnWidths:Array(d).fill(f)});}t(o.scrollIntoView());}return true},he=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(t){let o=n.tr;o.delete(e.tablePos,e.tablePos+e.table.nodeSize),t(o.scrollIntoView());}return true},_=(n,t)=>{let e=n.selection;if(!("$anchorCell"in e&&typeof e.forEachCell=="function"))return false;let r=y(n);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(t){let c=n.tr.delete(r.tablePos,r.tablePos+r.table.nodeSize);t(c.scrollIntoView());}return true},U=n=>{let{$from:t,empty:e}=n.selection;if(!e)return false;let o=t.parent;if(o.type.name!=="paragraph"||o.textContent.length>0)return false;let r=t.depth;if(r<1)return false;let l=t.node(r-1),s=t.index(r-1),i=s>0?l.child(s-1):null,c=s+1<l.childCount?l.child(s+1):null,a=i?.type.name==="table",d=c?.type.name==="table";return !!(a||d)};var ge=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(t){let o=e.tablePos+1,r=n.doc.resolve(o),l=n.doc.resolve(e.tablePos+e.table.nodeSize-2),s=CellSelection.create(n.doc,r.pos,l.pos);t(n.tr.setSelection(s));}return true},we=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table||e.rowIndex===void 0)return false;if(t){let r=e.tablePos+1;for(let a=0;a<e.rowIndex;a++){let d=e.table.child(a);r+=d.nodeSize;}let l=e.table.child(e.rowIndex),s=r+1,i=r+l.nodeSize-2,c=CellSelection.create(n.doc,s,i);t(n.tr.setSelection(c));}return true},Ce=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table||e.columnIndex===void 0)return false;if(t){let o=e.tablePos+1,r=e.table.child(0),l=e.table.child(e.table.childCount-1),s=o+1;for(let d=0;d<e.columnIndex&&d<r.childCount;d++)s+=r.child(d).nodeSize;let i=o;for(let d=0;d<e.table.childCount-1;d++)i+=e.table.child(d).nodeSize;let c=i+1;for(let d=0;d<e.columnIndex&&d<l.childCount;d++)c+=l.child(d).nodeSize;let a=CellSelection.create(n.doc,s,c);t(n.tr.setSelection(a));}return true};var F={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 W(n,t){return (e,o)=>{let r=y(e);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;if(o){let l=e.tr,s=r.table,i=r.tablePos,c=t??{style:"single",size:4,color:{rgb:"000000"}},a={style:"none"},{cellByPos:d,cellByRC:u}=V(s,i),f=B(e),p=1/0,b=-1,m=1/0,h=-1;for(let{pos:S}of f){let C=d.get(S);C&&(p=Math.min(p,C.rowIdx),b=Math.max(b,C.rowIdx),m=Math.min(m,C.colIdx),h=Math.max(h,C.colIdx+C.colspan-1));}let g=new Map,w=(S,C)=>g.get(S)??{...C.attrs},x=(S,C)=>{g.set(S,C);};for(let{pos:S}of f){let C=d.get(S);if(!C)continue;let P=C.rowIdx===p,R=C.rowIdx===b,T=C.colIdx===m,M=C.colIdx+C.colspan-1===h,k;switch(n){case "all":k={top:c,bottom:c,left:c,right:c};break;case "outside":k={top:P?c:a,bottom:R?c:a,left:T?c:a,right:M?c:a};break;case "inside":k={top:P?a:c,bottom:R?a:c,left:T?a:c,right:M?a:c};break;case "none":k={top:a,bottom:a,left:a,right:a};break}let N=w(S,C.node),v=N.borders||{};x(S,{...N,borders:{...v,...k}});for(let A of ["top","bottom","left","right"]){let $=k[A];if(!$)continue;let I=F[A],We=A==="right"?C.colIdx+C.colspan:C.colIdx+I.dCol,H=u.get(`${C.rowIdx+I.dRow},${We}`);if(H===void 0)continue;let je=d.get(H),J=w(H,je.node),Ve=J.borders||{};x(H,{...J,borders:{...Ve,[I.adjSide]:$}});}}for(let[S,C]of g)l.setNodeMarkup(l.mapping.map(S),void 0,C);o(l.scrollIntoView());}return true}}function xe(n,t,e){return (o,r)=>{let l=y(o);if(!l.isInTable||l.tablePos===void 0||!l.table)return false;if(r){let s=o.tr,i=B(o),c=t||{style:"none"},a={style:"none"},d=["top","bottom","left","right"],{cellByPos:u,cellByRC:f}=V(l.table,l.tablePos),p=new Map,b=(h,g)=>p.get(h)??{...g.attrs},m=(h,g)=>p.set(h,g);for(let{pos:h,node:g}of i){let w=u.get(h),x=b(h,g),S=x.borders||{},C=n==="all"?d:[n],P=e?{top:a,bottom:a,left:a,right:a}:{...S};for(let R of C)P[R]=c;if(w){let R=e?d:C;for(let T of R){let M=P[T],k=F[T],N=T==="right"?w.colIdx+w.colspan:w.colIdx+k.dCol,v=f.get(`${w.rowIdx+k.dRow},${N}`);if(v!==void 0){let A=u.get(v),$=b(v,A.node),I=$.borders||{};m(v,{...$,borders:{...I,[k.adjSide]:M}});}}}m(h,{...x,borders:P});}for(let[h,g]of p)s.setNodeMarkup(s.mapping.map(h),void 0,g);r(s.scrollIntoView());}return true}}function ye(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l=B(t),s=n.replace(/^#/,""),i={style:"single",size:4},{cellByPos:c,cellByRC:a}=V(o.table,o.tablePos),d=new Map,u=(p,b)=>d.get(p)??{...b.attrs},f=(p,b)=>d.set(p,b);for(let{pos:p,node:b}of l){let m=c.get(p),h=u(p,b),g=h.borders||{},w={};for(let x of ["top","bottom","left","right"]){let S={...i,...g[x],color:{rgb:s}};if(w[x]=S,m){let C=F[x],P=x==="right"?m.colIdx+m.colspan:m.colIdx+C.dCol,R=a.get(`${m.rowIdx+C.dRow},${P}`);if(R!==void 0){let T=c.get(R),M=u(R,T.node),k=M.borders||{};f(R,{...M,borders:{...k,[C.adjSide]:S}});}}}f(p,{...h,borders:{...g,...w}});}for(let[p,b]of d)r.setNodeMarkup(r.mapping.map(p),void 0,b);e(r.scrollIntoView());}return true}}function Se(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l=B(t),s={style:"single",color:{rgb:"000000"}},{cellByPos:i,cellByRC:c}=V(o.table,o.tablePos),a=new Map,d=(f,p)=>a.get(f)??{...p.attrs},u=(f,p)=>a.set(f,p);for(let{pos:f,node:p}of l){let b=i.get(f),m=d(f,p),h=m.borders||{},g={};for(let w of ["top","bottom","left","right"]){let x={...s,...h[w],size:n};if(g[w]=x,b){let S=F[w],C=w==="right"?b.colIdx+b.colspan:b.colIdx+S.dCol,P=c.get(`${b.rowIdx+S.dRow},${C}`);if(P!==void 0){let R=i.get(P),T=d(P,R.node),M=T.borders||{};u(P,{...T,borders:{...M,[S.adjSide]:x}});}}}u(f,{...m,borders:{...h,...g}});}for(let[f,p]of a)r.setNodeMarkup(r.mapping.map(f),void 0,p);e(r.scrollIntoView());}return true}}function Te(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l=B(t),s=n?n.replace(/^#/,""):null;for(let{pos:i,node:c}of l)r.setNodeMarkup(r.mapping.map(i),void 0,{...c.attrs,backgroundColor:s});e(r.scrollIntoView());}return true}}function Pe(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l=B(t);for(let{pos:s,node:i}of l)r.setNodeMarkup(r.mapping.map(s),void 0,{...i.attrs,verticalAlign:n});e(r.scrollIntoView());}return true}}function Re(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l=B(t);for(let{pos:s,node:i}of l){let a={...i.attrs.margins||{},...n};r.setNodeMarkup(r.mapping.map(s),void 0,{...i.attrs,margins:a});}e(r.scrollIntoView());}return true}}function Ie(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l=B(t);for(let{pos:s,node:i}of l)r.setNodeMarkup(r.mapping.map(s),void 0,{...i.attrs,textDirection:n});e(r.scrollIntoView());}return true}}var ke=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(t){let o=n.tr,r=B(n);for(let{pos:l,node:s}of r)o.setNodeMarkup(o.mapping.map(l),void 0,{...s.attrs,noWrap:!s.attrs.noWrap});t(o.scrollIntoView());}return true};function Me(n,t){return (e,o)=>{let r=y(e);if(!r.isInTable||r.tablePos===void 0||!r.table)return false;if(o){let l=z(e,"tableRow");if(!l)return true;let s=e.tr.setNodeMarkup(l.pos,void 0,{...l.node.attrs,height:n,heightRule:n?t||"atLeast":null});o(s.scrollIntoView());}return true}}var ve=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table||!e.columnCount)return false;if(t){let o=n.tr,r=e.table,l=e.columnCount,s=r.attrs.columnWidths,i=s?s.reduce((u,f)=>u+f,0):9360,c=Math.floor(i/l),a=e.tablePos+1;r.forEach(u=>{if(u.type.name==="tableRow"){let f=a+1;u.forEach(p=>{(p.type.name==="tableCell"||p.type.name==="tableHeader")&&(o=o.setNodeMarkup(f,void 0,{...p.attrs,width:c,widthType:"dxa",colwidth:null})),f+=p.nodeSize;});}a+=u.nodeSize;});let d=Array(l).fill(c);o=o.setNodeMarkup(e.tablePos,void 0,{...r.attrs,columnWidths:d}),t(o.scrollIntoView());}return true},Ae=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(t){let o=n.tr,r=e.table,l=e.tablePos+1;r.forEach(s=>{if(s.type.name==="tableRow"){let i=l+1;s.forEach(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&(o=o.setNodeMarkup(i,void 0,{...c.attrs,width:null,widthType:null,colwidth:null})),i+=c.nodeSize;});}l+=s.nodeSize;}),o=o.setNodeMarkup(e.tablePos,void 0,{...r.attrs,columnWidths:null,width:null,widthType:"auto"}),t(o.scrollIntoView());}return true};function Be(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l=o.table,s=o.tablePos,i=l.childCount,c=n.look??{firstRow:true,lastRow:false,noHBand:false},a=n.conditionals??{},d=n.tableBorders;r=r.setNodeMarkup(s,void 0,{...l.attrs,styleId:n.styleId});let u=0,f=s+1;for(let p=0;p<i;p++){let b=l.child(p),m=p===0&&!!c.firstRow,h=p===i-1&&!!c.lastRow,g=c.noHBand!==true,w=b.childCount,x;m?x="firstRow":h?x="lastRow":(g&&(x=u%2===0?"band1Horz":"band2Horz"),u++);let S=f+1;for(let C=0;C<w;C++){let P=b.child(C),R=r.mapping.map(S),T=x,M=C===0&&!!c.firstCol,k=C===w-1&&!!c.lastCol;m&&M&&a.nwCell?T="nwCell":m&&k&&a.neCell?T="neCell":h&&M&&a.swCell?T="swCell":h&&k&&a.seCell?T="seCell":M?T="firstCol":k&&(T="lastCol");let N=T?a[T]:void 0,v={...P.attrs};N?.backgroundColor?v.backgroundColor=N.backgroundColor:v.backgroundColor=null;let A={},$=["top","bottom","left","right"];for(let I of $)N?.borders&&N.borders[I]!==void 0?A[I]=N.borders[I]:d&&(I==="top"&&p>0||I==="bottom"&&p<i-1?A[I]=d.insideH??d[I]:I==="left"&&C>0||I==="right"&&C<w-1?A[I]=d.insideV??d[I]:A[I]=d[I]);Object.keys(A).length>0?v.borders=A:v.borders=null,r=r.setNodeMarkup(R,void 0,v),S+=P.nodeSize;}f+=b.nodeSize;}e(r.scrollIntoView());}return true}}function Ne(n){return (t,e)=>{let o=y(t);if(!o.isInTable||o.tablePos===void 0||!o.table)return false;if(e){let r=t.tr,l={...o.table.attrs};"width"in n&&(l.width=n.width),"widthType"in n&&(l.widthType=n.widthType),"justification"in n&&(l.justification=n.justification),r.setNodeMarkup(o.tablePos,void 0,l),e(r.scrollIntoView());}return true}}var Ee=(n,t)=>{let e=y(n);if(!e.isInTable||e.tablePos===void 0||!e.table)return false;if(t){let o=z(n,"tableRow");if(!o)return true;let r=n.tr.setNodeMarkup(o.pos,void 0,{...o.node.attrs,isHeader:!o.node.attrs.isHeader});t(r.scrollIntoView());}return true};function $e(){let n=new PluginKey("activeCell");return new Plugin({key:n,props:{decorations(t){let{selection:e}=t;if(e instanceof CellSelection)return DecorationSet.empty;let{$from:o}=e;for(let r=o.depth;r>0;r--){let l=o.node(r);if(l.type.name==="tableCell"||l.type.name==="tableHeader"){let s=o.before(r);return DecorationSet.create(t.doc,[Decoration.node(s,s+l.nodeSize,{class:"activeCell"})])}}return DecorationSet.empty}}})}function ze(n){let{schema:t}=n,e=de(t),o=ce(t),r=ue(t),l=fe(t),s=pe(t);return {plugins:[columnResizing({handleWidth:5,cellMinWidth:25,lastColumnResizable:true}),tableEditing(),$e()],keyboardShortcuts:{Backspace:chainCommands(_,U),Delete:chainCommands(_,U)},commands:{insertTable:e,addRowAbove:()=>o,addRowBelow:()=>r,deleteRow:()=>be,addColumnLeft:()=>l,addColumnRight:()=>s,deleteColumn:()=>me,deleteTable:()=>he,selectTable:()=>ge,selectRow:()=>we,selectColumn:()=>Ce,mergeCells:()=>mergeCells,splitCell:()=>splitCell,setCellBorder:xe,setTableBorders:W,setCellVerticalAlign:Pe,setCellMargins:Re,setCellTextDirection:Ie,toggleNoWrap:()=>ke,setRowHeight:Me,toggleHeaderRow:()=>Ee,distributeColumns:()=>ve,autoFitContents:()=>Ae,setTableProperties:Ne,applyTableStyle:Be,setCellFillColor:Te,setTableBorderColor:ye,setTableBorderWidth:Se,removeTableBorders:()=>W("none"),setAllTableBorders:i=>W("all",i),setOutsideTableBorders:i=>W("outside",i),setInsideTableBorders:i=>W("inside",i)}}}var it=c({name:"table",schemaNodeName:"table",nodeSpec:Z}),dt=c({name:"tableRow",schemaNodeName:"tableRow",nodeSpec:ee}),ct=c({name:"tableCell",schemaNodeName:"tableCell",nodeSpec:le}),ut=c({name:"tableHeader",schemaNodeName:"tableHeader",nodeSpec:se}),ft=b({name:"tablePlugin",onSchemaReady:ze});function fo(){return [it(),dt(),ct(),ut(),ft()]}export{y as a,G as b,qe as c,Je as d,it as e,dt as f,ct as g,ut as h,ft as i,fo as j};
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');var pe={accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",dk1:"dk1",lt1:"lt1",dk2:"dk2",lt2:"lt2",tx1:"text1",tx2:"text2",bg1:"background1",bg2:"background2",hlink:"hlink",folHlink:"folHlink"},G={black:"000000",white:"FFFFFF",red:"FF0000",green:"00FF00",blue:"0000FF",yellow:"FFFF00",cyan:"00FFFF",magenta:"FF00FF"};function J(e,n){let t=chunk3R7QHNI5_js.i(n),i=t.find(r=>r.name==="a:shade");if(i){let r=chunk3R7QHNI5_js.j(i,null,"val");r&&(e.themeShade=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}let o=t.find(r=>r.name==="a:tint");if(o){let r=chunk3R7QHNI5_js.j(o,null,"val");r&&(e.themeTint=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}return e}function K(e){if(!e)return;let n=chunk3R7QHNI5_js.i(e),t=n.find(l=>l.name==="a:srgbClr");if(t){let l=chunk3R7QHNI5_js.j(t,null,"val");if(l)return J({rgb:l},t)}let i=n.find(l=>l.name==="a:schemeClr");if(i){let l=chunk3R7QHNI5_js.j(i,null,"val");if(l){let u={themeColor:pe[l]??"dk1"};return J(u,i)}}let o=n.find(l=>l.name==="a:sysClr");if(o)return {rgb:chunk3R7QHNI5_js.j(o,null,"lastClr")??"000000"};let r=n.find(l=>l.name==="a:prstClr");if(r){let l=chunk3R7QHNI5_js.j(r,null,"val");if(l&&G[l])return {rgb:G[l]}}}function N(e){if(!e)return;let n=chunk3R7QHNI5_js.i(e);if(n.find(i=>i.name==="a:noFill"))return {type:"none"};let t=n.find(i=>i.name==="a:solidFill");if(t)return {type:"solid",color:K(t)};if(n.find(i=>i.name==="a:gradFill"))return {type:"gradient"}}function S(e){let n=e?chunk3R7QHNI5_js.h(e,"a:ln"):null;if(!n)return;let t=chunk3R7QHNI5_js.i(n);if(t.find(u=>u.name==="a:noFill"))return;let i={},o=chunk3R7QHNI5_js.j(n,null,"w");o&&(i.width=parseInt(o,10));let r=t.find(u=>u.name==="a:solidFill");r&&(i.color=K(r));let l=t.find(u=>u.name==="a:prstDash");if(l){let u=chunk3R7QHNI5_js.j(l,null,"val");u&&(i.style=u);}return i}function L(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"relativeFrom")??"column",t=chunk3R7QHNI5_js.h(e,"wp:align");if(t){let o=chunk3R7QHNI5_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk3R7QHNI5_js.h(e,"wp:posOffset");if(i){let o=chunk3R7QHNI5_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function z(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"relativeFrom")??"paragraph",t=chunk3R7QHNI5_js.h(e,"wp:align");if(t){let o=chunk3R7QHNI5_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk3R7QHNI5_js.h(e,"wp:posOffset");if(i){let o=chunk3R7QHNI5_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function Q(e){let n=chunk3R7QHNI5_js.h(e,"wp:positionH"),t=chunk3R7QHNI5_js.h(e,"wp:positionV");if(!(!n&&!t))return {horizontal:L(n)??{relativeTo:"column"},vertical:z(t)??{relativeTo:"paragraph"}}}var W=["wp:wrapNone","wp:wrapSquare","wp:wrapTight","wp:wrapThrough","wp:wrapTopAndBottom"];function D(e,n,t){if(!e){let p={type:n?"behind":"inFront"};return t?.distT!==void 0&&(p.distT=t.distT),t?.distB!==void 0&&(p.distB=t.distB),t?.distL!==void 0&&(p.distL=t.distL),t?.distR!==void 0&&(p.distR=t.distR),p}let o=(e.name||"").replace("wp:",""),r;switch(o){case "wrapNone":r=n?"behind":"inFront";break;case "wrapSquare":r="square";break;case "wrapTight":r="tight";break;case "wrapThrough":r="through";break;case "wrapTopAndBottom":r="topAndBottom";break;default:r="square";}let l={type:r},u=chunk3R7QHNI5_js.j(e,null,"wrapText");u&&(l.wrapText=u);let s=chunk3R7QHNI5_js.l(e,null,"distT")??t?.distT,c=chunk3R7QHNI5_js.l(e,null,"distB")??t?.distB,m=chunk3R7QHNI5_js.l(e,null,"distL")??t?.distL,g=chunk3R7QHNI5_js.l(e,null,"distR")??t?.distR;return s!==void 0&&(l.distT=s),c!==void 0&&(l.distB=c),m!==void 0&&(l.distL=m),g!==void 0&&(l.distR=g),l}function Y(e){let n=chunk3R7QHNI5_js.i(e),t=chunk3R7QHNI5_js.j(e,null,"behindDoc")==="1",i=n.find(r=>W.includes(r.name??"")),o={distT:chunk3R7QHNI5_js.l(e,null,"distT")??void 0,distB:chunk3R7QHNI5_js.l(e,null,"distB")??void 0,distL:chunk3R7QHNI5_js.l(e,null,"distL")??void 0,distR:chunk3R7QHNI5_js.l(e,null,"distR")??void 0};return D(i??null,t,o)}var ce={accent1:"5B9BD5",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"4472C4",accent6:"70AD47",dk1:"000000",lt1:"FFFFFF",dk2:"1F497D",lt2:"EEECE1",text1:"000000",text2:"1F497D",background1:"FFFFFF",background2:"EEECE1",hlink:"0563C1",folHlink:"954F72"};function H(e){if(e){if(e.rgb)return `#${e.rgb}`;if(e.themeColor)return `#${ce[e.themeColor]??"000000"}`}}var k=91440;function Z(e){if(!e)return {};let n={},t=chunk3R7QHNI5_js.l(e,null,"lIns"),i=chunk3R7QHNI5_js.l(e,null,"rIns"),o=chunk3R7QHNI5_js.l(e,null,"tIns"),r=chunk3R7QHNI5_js.l(e,null,"bIns");return (t!==void 0||i!==void 0||o!==void 0||r!==void 0)&&(n.margins={left:t,right:i,top:o,bottom:r}),n}function ve(e){if(!e)return {paragraphElements:[],tableElements:[]};let n=chunk3R7QHNI5_js.g(e,"p"),t=chunk3R7QHNI5_js.g(e,"tbl");return {paragraphElements:n,tableElements:t}}function Be(e,n,t,i,o,r,l,u){if(!e)return [];let s=[],c=chunk3R7QHNI5_js.i(e);for(let m of c){let g=m.name||"",p=g.indexOf(":"),T=p>=0?g.substring(p+1):g;if(T==="p"){let b=n(m,i,o,r,l);s.push(b);}}return s}function ee(e){let t=chunk3R7QHNI5_js.i(e).find(u=>u.name==="wp:inline"||u.name==="wp:anchor");if(!t)return false;let i=chunk3R7QHNI5_js.h(t,"a:graphic");if(!i)return false;let o=chunk3R7QHNI5_js.h(i,"a:graphicData");if(!o)return false;let r=chunk3R7QHNI5_js.h(o,"wps:wsp");return r?chunk3R7QHNI5_js.h(r,"wps:txbx")!==null:false}function Ce(e){return chunk3R7QHNI5_js.h(e,"wps:txbx")!==null}function Me(e){let t=chunk3R7QHNI5_js.i(e).find(x=>x.name==="wp:inline"||x.name==="wp:anchor");if(!t)return null;let i=t.name==="wp:anchor",o=chunk3R7QHNI5_js.h(t,"a:graphic");if(!o)return null;let r=chunk3R7QHNI5_js.h(o,"a:graphicData");if(!r)return null;let l=chunk3R7QHNI5_js.h(r,"wps:wsp");if(!l||!chunk3R7QHNI5_js.h(l,"wps:txbx"))return null;let s=chunk3R7QHNI5_js.i(l),c=s.find(x=>x.name==="wps:spPr"),m=s.find(x=>x.name==="wps:bodyPr"),g=chunk3R7QHNI5_js.h(t,"wp:extent"),p=chunk3R7QHNI5_js.l(g,null,"cx")??0,T=chunk3R7QHNI5_js.l(g,null,"cy")??0,b={width:p,height:T},C=chunk3R7QHNI5_js.h(t,"wp:docPr"),P=C?chunk3R7QHNI5_js.j(C,null,"id")??void 0:void 0,v=N(c??null),B=S(c??null),E=Z(m??null),y={type:"textBox",size:b,content:[]};if(P&&(y.id=P),v&&(y.fill=v),B&&(y.outline=B),E.margins&&(y.margins=E.margins),i){let x=Q(t);x&&(y.position=x);let h=Y(t);h&&(y.wrap=h);}return y}function Re(e){let n=chunk3R7QHNI5_js.h(e,"wps:txbx");return n?chunk3R7QHNI5_js.h(n,"w:txbxContent"):null}function Xe(e,n,t,i){if(!chunk3R7QHNI5_js.h(e,"wps:txbx"))return null;let r=chunk3R7QHNI5_js.i(e),l=r.find(b=>b.name==="wps:spPr"),u=r.find(b=>b.name==="wps:bodyPr"),s=r.find(b=>b.name==="wps:cNvPr"),c=s?chunk3R7QHNI5_js.j(s,null,"id")??void 0:void 0,m=N(l??null),g=S(l??null),p=Z(u??null),T={type:"textBox",size:n,content:[]};return c&&(T.id=c),m&&(T.fill=m),g&&(T.outline=g),p.margins&&(T.margins=p.margins),t&&(T.position=t),i&&(T.wrap=i),T}function ke(e){return chunk4Q2IP5FW_js.e(e.size.width)}function Ae(e){return chunk4Q2IP5FW_js.e(e.size.height)}function Oe(e){return {width:chunk4Q2IP5FW_js.e(e.size.width),height:chunk4Q2IP5FW_js.e(e.size.height)}}function Ne(e){let n=e.margins;return {top:chunk4Q2IP5FW_js.e(n?.top??k),bottom:chunk4Q2IP5FW_js.e(n?.bottom??k),left:chunk4Q2IP5FW_js.e(n?.left??k),right:chunk4Q2IP5FW_js.e(n?.right??k)}}function Se(e){return e.position!==void 0||e.wrap!==void 0}function Le(e){return e.fill!==void 0&&e.fill.type!=="none"}function ze(e){return e.outline!==void 0}function We(e){return e.content.length>0}function De(e){let n=[];for(let t of e.content){let i=[];for(let o of t.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&i.push(r.text);n.push(i.join(""));}return n.join(`
1
+ 'use strict';var chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js');var pe={accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",dk1:"dk1",lt1:"lt1",dk2:"dk2",lt2:"lt2",tx1:"text1",tx2:"text2",bg1:"background1",bg2:"background2",hlink:"hlink",folHlink:"folHlink"},G={black:"000000",white:"FFFFFF",red:"FF0000",green:"00FF00",blue:"0000FF",yellow:"FFFF00",cyan:"00FFFF",magenta:"FF00FF"};function J(e,n){let t=chunk3R7QHNI5_js.i(n),i=t.find(r=>r.name==="a:shade");if(i){let r=chunk3R7QHNI5_js.j(i,null,"val");r&&(e.themeShade=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}let o=t.find(r=>r.name==="a:tint");if(o){let r=chunk3R7QHNI5_js.j(o,null,"val");r&&(e.themeTint=Math.round(parseInt(r,10)/1e5*255).toString(16).padStart(2,"0").toUpperCase());}return e}function K(e){if(!e)return;let n=chunk3R7QHNI5_js.i(e),t=n.find(l=>l.name==="a:srgbClr");if(t){let l=chunk3R7QHNI5_js.j(t,null,"val");if(l)return J({rgb:l},t)}let i=n.find(l=>l.name==="a:schemeClr");if(i){let l=chunk3R7QHNI5_js.j(i,null,"val");if(l){let u={themeColor:pe[l]??"dk1"};return J(u,i)}}let o=n.find(l=>l.name==="a:sysClr");if(o)return {rgb:chunk3R7QHNI5_js.j(o,null,"lastClr")??"000000"};let r=n.find(l=>l.name==="a:prstClr");if(r){let l=chunk3R7QHNI5_js.j(r,null,"val");if(l&&G[l])return {rgb:G[l]}}}function N(e){if(!e)return;let n=chunk3R7QHNI5_js.i(e);if(n.find(i=>i.name==="a:noFill"))return {type:"none"};let t=n.find(i=>i.name==="a:solidFill");if(t)return {type:"solid",color:K(t)};if(n.find(i=>i.name==="a:gradFill"))return {type:"gradient"}}function S(e){let n=e?chunk3R7QHNI5_js.h(e,"a:ln"):null;if(!n)return;let t=chunk3R7QHNI5_js.i(n);if(t.find(u=>u.name==="a:noFill"))return;let i={},o=chunk3R7QHNI5_js.j(n,null,"w");o&&(i.width=parseInt(o,10));let r=t.find(u=>u.name==="a:solidFill");r&&(i.color=K(r));let l=t.find(u=>u.name==="a:prstDash");if(l){let u=chunk3R7QHNI5_js.j(l,null,"val");u&&(i.style=u);}return i}function L(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"relativeFrom")??"column",t=chunk3R7QHNI5_js.h(e,"wp:align");if(t){let o=chunk3R7QHNI5_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk3R7QHNI5_js.h(e,"wp:posOffset");if(i){let o=chunk3R7QHNI5_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function z(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"relativeFrom")??"paragraph",t=chunk3R7QHNI5_js.h(e,"wp:align");if(t){let o=chunk3R7QHNI5_js.k(t);return {relativeTo:n,alignment:o}}let i=chunk3R7QHNI5_js.h(e,"wp:posOffset");if(i){let o=chunk3R7QHNI5_js.k(i),r=parseInt(o,10);return {relativeTo:n,posOffset:isNaN(r)?0:r}}return {relativeTo:n}}function Q(e){let n=chunk3R7QHNI5_js.h(e,"wp:positionH"),t=chunk3R7QHNI5_js.h(e,"wp:positionV");if(!(!n&&!t))return {horizontal:L(n)??{relativeTo:"column"},vertical:z(t)??{relativeTo:"paragraph"}}}var W=["wp:wrapNone","wp:wrapSquare","wp:wrapTight","wp:wrapThrough","wp:wrapTopAndBottom"];function D(e,n,t){if(!e){let p={type:n?"behind":"inFront"};return t?.distT!==void 0&&(p.distT=t.distT),t?.distB!==void 0&&(p.distB=t.distB),t?.distL!==void 0&&(p.distL=t.distL),t?.distR!==void 0&&(p.distR=t.distR),p}let o=(e.name||"").replace("wp:",""),r;switch(o){case "wrapNone":r=n?"behind":"inFront";break;case "wrapSquare":r="square";break;case "wrapTight":r="tight";break;case "wrapThrough":r="through";break;case "wrapTopAndBottom":r="topAndBottom";break;default:r="square";}let l={type:r},u=chunk3R7QHNI5_js.j(e,null,"wrapText");u&&(l.wrapText=u);let s=chunk3R7QHNI5_js.l(e,null,"distT")??t?.distT,c=chunk3R7QHNI5_js.l(e,null,"distB")??t?.distB,m=chunk3R7QHNI5_js.l(e,null,"distL")??t?.distL,g=chunk3R7QHNI5_js.l(e,null,"distR")??t?.distR;return s!==void 0&&(l.distT=s),c!==void 0&&(l.distB=c),m!==void 0&&(l.distL=m),g!==void 0&&(l.distR=g),l}function Y(e){let n=chunk3R7QHNI5_js.i(e),t=chunk3R7QHNI5_js.j(e,null,"behindDoc")==="1",i=n.find(r=>W.includes(r.name??"")),o={distT:chunk3R7QHNI5_js.l(e,null,"distT")??void 0,distB:chunk3R7QHNI5_js.l(e,null,"distB")??void 0,distL:chunk3R7QHNI5_js.l(e,null,"distL")??void 0,distR:chunk3R7QHNI5_js.l(e,null,"distR")??void 0};return D(i??null,t,o)}var ce={accent1:"5B9BD5",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"4472C4",accent6:"70AD47",dk1:"000000",lt1:"FFFFFF",dk2:"1F497D",lt2:"EEECE1",text1:"000000",text2:"1F497D",background1:"FFFFFF",background2:"EEECE1",hlink:"0563C1",folHlink:"954F72"};function H(e){if(e){if(e.rgb)return `#${e.rgb}`;if(e.themeColor)return `#${ce[e.themeColor]??"000000"}`}}var k=91440;function Z(e){if(!e)return {};let n={},t=chunk3R7QHNI5_js.l(e,null,"lIns"),i=chunk3R7QHNI5_js.l(e,null,"rIns"),o=chunk3R7QHNI5_js.l(e,null,"tIns"),r=chunk3R7QHNI5_js.l(e,null,"bIns");return (t!==void 0||i!==void 0||o!==void 0||r!==void 0)&&(n.margins={left:t,right:i,top:o,bottom:r}),n}function ve(e){if(!e)return {paragraphElements:[],tableElements:[]};let n=chunk3R7QHNI5_js.g(e,"p"),t=chunk3R7QHNI5_js.g(e,"tbl");return {paragraphElements:n,tableElements:t}}function Be(e,n,t,i,o,r,l,u){if(!e)return [];let s=[],c=chunk3R7QHNI5_js.i(e);for(let m of c){let g=m.name||"",p=g.indexOf(":"),T=p>=0?g.substring(p+1):g;if(T==="p"){let b=n(m,i,o,r,l);s.push(b);}}return s}function ee(e){let t=chunk3R7QHNI5_js.i(e).find(u=>u.name==="wp:inline"||u.name==="wp:anchor");if(!t)return false;let i=chunk3R7QHNI5_js.h(t,"a:graphic");if(!i)return false;let o=chunk3R7QHNI5_js.h(i,"a:graphicData");if(!o)return false;let r=chunk3R7QHNI5_js.h(o,"wps:wsp");return r?chunk3R7QHNI5_js.h(r,"wps:txbx")!==null:false}function Ce(e){return chunk3R7QHNI5_js.h(e,"wps:txbx")!==null}function Me(e){let t=chunk3R7QHNI5_js.i(e).find(x=>x.name==="wp:inline"||x.name==="wp:anchor");if(!t)return null;let i=t.name==="wp:anchor",o=chunk3R7QHNI5_js.h(t,"a:graphic");if(!o)return null;let r=chunk3R7QHNI5_js.h(o,"a:graphicData");if(!r)return null;let l=chunk3R7QHNI5_js.h(r,"wps:wsp");if(!l||!chunk3R7QHNI5_js.h(l,"wps:txbx"))return null;let s=chunk3R7QHNI5_js.i(l),c=s.find(x=>x.name==="wps:spPr"),m=s.find(x=>x.name==="wps:bodyPr"),g=chunk3R7QHNI5_js.h(t,"wp:extent"),p=chunk3R7QHNI5_js.l(g,null,"cx")??0,T=chunk3R7QHNI5_js.l(g,null,"cy")??0,b={width:p,height:T},C=chunk3R7QHNI5_js.h(t,"wp:docPr"),P=C?chunk3R7QHNI5_js.j(C,null,"id")??void 0:void 0,v=N(c??null),B=S(c??null),E=Z(m??null),y={type:"textBox",size:b,content:[]};if(P&&(y.id=P),v&&(y.fill=v),B&&(y.outline=B),E.margins&&(y.margins=E.margins),i){let x=Q(t);x&&(y.position=x);let h=Y(t);h&&(y.wrap=h);}return y}function Re(e){let n=chunk3R7QHNI5_js.h(e,"wps:txbx");return n?chunk3R7QHNI5_js.h(n,"w:txbxContent"):null}function Xe(e,n,t,i){if(!chunk3R7QHNI5_js.h(e,"wps:txbx"))return null;let r=chunk3R7QHNI5_js.i(e),l=r.find(b=>b.name==="wps:spPr"),u=r.find(b=>b.name==="wps:bodyPr"),s=r.find(b=>b.name==="wps:cNvPr"),c=s?chunk3R7QHNI5_js.j(s,null,"id")??void 0:void 0,m=N(l??null),g=S(l??null),p=Z(u??null),T={type:"textBox",size:n,content:[]};return c&&(T.id=c),m&&(T.fill=m),g&&(T.outline=g),p.margins&&(T.margins=p.margins),t&&(T.position=t),i&&(T.wrap=i),T}function ke(e){return chunk4Q2IP5FW_js.e(e.size.width)}function Ae(e){return chunk4Q2IP5FW_js.e(e.size.height)}function Oe(e){return {width:chunk4Q2IP5FW_js.e(e.size.width),height:chunk4Q2IP5FW_js.e(e.size.height)}}function Ne(e){let n=e.margins;return {top:chunk4Q2IP5FW_js.e(n?.top??k),bottom:chunk4Q2IP5FW_js.e(n?.bottom??k),left:chunk4Q2IP5FW_js.e(n?.left??k),right:chunk4Q2IP5FW_js.e(n?.right??k)}}function Se(e){return e.position!==void 0||e.wrap!==void 0}function Le(e){return e.fill!==void 0&&e.fill.type!=="none"}function ze(e){return e.outline!==void 0}function We(e){return e.content.length>0}function De(e){let n=[];for(let t of e.content){let i=[];for(let o of t.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&i.push(r.text);n.push(i.join(""));}return n.join(`
2
2
  `)}function He(e){if(!(!e.fill||e.fill.type!=="solid"))return H(e.fill.color)}function Ve(e){if(e.outline?.color)return H(e.outline.color)}function _e(e){return e.outline?.width?chunk4Q2IP5FW_js.e(e.outline.width):0}function me(e){if(!e)return;let n=parseInt(e,10);if(!isNaN(n))return n/6e4}function ge(e,n){let t=chunk3R7QHNI5_js.i(e);for(let i of t)if(n.includes(i.name||""))return i;return null}function ne(e){if(!e)return {width:0,height:0};let n=chunk3R7QHNI5_js.l(e,null,"cx")??0,t=chunk3R7QHNI5_js.l(e,null,"cy")??0;return {width:n,height:t}}function te(e){if(!e)return;let n=chunk3R7QHNI5_js.l(e,null,"l")??0,t=chunk3R7QHNI5_js.l(e,null,"t")??0,i=chunk3R7QHNI5_js.l(e,null,"r")??0,o=chunk3R7QHNI5_js.l(e,null,"b")??0;if(!(n===0&&t===0&&i===0&&o===0))return {left:n,top:t,right:i,bottom:o}}function ie(e){if(!e)return {};let n=chunk3R7QHNI5_js.j(e,null,"id")??void 0,t=chunk3R7QHNI5_js.j(e,null,"name")??void 0,i=chunk3R7QHNI5_js.j(e,null,"descr")??void 0,o=chunk3R7QHNI5_js.j(e,null,"title")??void 0,r=chunk3R7QHNI5_js.j(e,null,"decorative")==="1",l=chunk3R7QHNI5_js.e(e,"a","hlinkClick"),u=l?chunk3R7QHNI5_js.j(l,"r","id")??void 0:void 0;return {id:n,name:t,alt:i,title:o,decorative:r||void 0,hlinkRId:u}}function re(e){if(!e)return;let n=chunk3R7QHNI5_js.j(e,null,"rot"),t=chunk3R7QHNI5_js.j(e,null,"flipH")==="1",i=chunk3R7QHNI5_js.j(e,null,"flipV")==="1",o=me(n);if(o===void 0&&!t&&!i)return;let r={};return o!==void 0&&(r.rotation=o),t&&(r.flipH=true),i&&(r.flipV=true),r}function oe(e){let n=chunk3R7QHNI5_js.h(e,"a:graphic");if(!n)return {blipFill:null,blip:null};let t=chunk3R7QHNI5_js.h(n,"a:graphicData");if(!t)return {blipFill:null,blip:null};let i=chunk3R7QHNI5_js.h(t,"pic:pic");if(!i)return {blipFill:null,blip:null};let o=chunk3R7QHNI5_js.h(i,"pic:blipFill");return o?{blipFill:o,blip:chunk3R7QHNI5_js.h(o,"a:blip")}:{blipFill:null,blip:null}}function le(e){if(!e)return;let n=chunk3R7QHNI5_js.h(e,"a:srcRect");if(!n)return;let t=s=>{let c=chunk3R7QHNI5_js.l(n,null,s);if(!(c===void 0||c===0))return c/1e5},i=t("l"),o=t("t"),r=t("r"),l=t("b");if(i===void 0&&o===void 0&&r===void 0&&l===void 0)return;let u={};return i!==void 0&&(u.left=i),o!==void 0&&(u.top=o),r!==void 0&&(u.right=r),l!==void 0&&(u.bottom=l),u}function ae(e){if(!e)return;let n=chunk3R7QHNI5_js.h(e,"a:alphaModFix");if(!n)return;let t=chunk3R7QHNI5_js.l(n,null,"amt");if(!(t===void 0||t>=1e5))return Math.max(0,Math.min(1,t/1e5))}function se(e){if(!e)return "";let n=chunk3R7QHNI5_js.j(e,"r","embed");if(n)return n;let t=chunk3R7QHNI5_js.j(e,null,"embed");if(t)return t;let i=chunk3R7QHNI5_js.j(e,"r","link");return i||""}function ue(e){let n=chunk3R7QHNI5_js.h(e,"a:graphic");if(!n)return null;let t=chunk3R7QHNI5_js.h(n,"a:graphicData");if(!t)return null;let i=chunk3R7QHNI5_js.h(t,"pic:pic");if(!i)return null;let o=chunk3R7QHNI5_js.h(i,"pic:spPr");return o?chunk3R7QHNI5_js.h(o,"a:xfrm"):null}function xe(e){if(!e)return e;let n=e.replace(/^\/+/,"");return n.startsWith("media/")?n=`word/${n}`:n.startsWith("word/")||(n=`word/${n}`),n}function he(e){let n=e.split(".").pop()?.toLowerCase()??"";return {png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",tif:"image/tiff",webp:"image/webp",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf"}[n]??"application/octet-stream"}function de(e,n,t){if(!e||!n)return {};let i=n.get(e);if(!i)return {};let o=i.target;if(!o)return {};let r=xe(o),l=o.split("/").pop(),u=(s,c)=>{let m=c.toLowerCase();for(let[g,p]of s.entries())if(g.toLowerCase()===m)return p};if(t){let s=u(t,r);if(s)return {src:s.dataUrl||s.base64,mimeType:s.mimeType,filename:l};let c=o.replace(/^\/+/,""),m=u(t,c);if(m)return {src:m.dataUrl||m.base64,mimeType:m.mimeType,filename:l};let g=`word/${c}`,p=u(t,g);if(p)return {src:p.dataUrl||p.base64,mimeType:p.mimeType,filename:l}}return {mimeType:he(o),filename:l}}function Te(e,n,t){let i=chunk3R7QHNI5_js.h(e,"wp:extent"),o=ne(i),r=chunk3R7QHNI5_js.h(e,"wp:effectExtent"),l=te(r),u=chunk3R7QHNI5_js.h(e,"wp:docPr"),s=ie(u),{blip:c,blipFill:m}=oe(e),g=se(c),p=le(m),T=ae(c),b=de(g,n,t),C=ue(e),P=re(C),v=chunk3R7QHNI5_js.l(e,null,"distT")??void 0,B=chunk3R7QHNI5_js.l(e,null,"distB")??void 0,E=chunk3R7QHNI5_js.l(e,null,"distL")??void 0,y=chunk3R7QHNI5_js.l(e,null,"distR")??void 0,x={type:"inline"};v!==void 0&&(x.distT=v),B!==void 0&&(x.distB=B),E!==void 0&&(x.distL=E),y!==void 0&&(x.distR=y);let h={type:"image",rId:g,size:o,wrap:x};if(s.id&&(h.id=s.id),s.alt&&(h.alt=s.alt),s.title&&(h.title=s.title),s.decorative&&(h.decorative=true),b.src&&(h.src=b.src),b.mimeType&&(h.mimeType=b.mimeType),b.filename&&(h.filename=b.filename),l&&(h.padding=l),P&&(h.transform=P),p&&(h.crop=p),T!==void 0&&(h.opacity=T),s.hlinkRId&&n){let X=chunkZ3LGMBJC_js.d(n,s.hlinkRId);X&&(h.hlinkHref=X);}return h}function be(e,n,t){let i=chunk3R7QHNI5_js.h(e,"wp:extent"),o=ne(i),r=chunk3R7QHNI5_js.h(e,"wp:effectExtent"),l=te(r),u=chunk3R7QHNI5_js.h(e,"wp:docPr"),s=ie(u),c=chunk3R7QHNI5_js.j(e,null,"behindDoc")==="1",m=chunk3R7QHNI5_js.j(e,null,"layoutInCell"),g=m===null?void 0:m==="1",p=chunk3R7QHNI5_js.j(e,null,"allowOverlap"),T=p===null?void 0:p==="1",b={distT:chunk3R7QHNI5_js.l(e,null,"distT")??void 0,distB:chunk3R7QHNI5_js.l(e,null,"distB")??void 0,distL:chunk3R7QHNI5_js.l(e,null,"distL")??void 0,distR:chunk3R7QHNI5_js.l(e,null,"distR")??void 0},C=ge(e,W),P=D(C,c,b),v=chunk3R7QHNI5_js.h(e,"wp:positionH"),B=chunk3R7QHNI5_js.h(e,"wp:positionV"),E=L(v),y=z(B),x;(E||y)&&(x={horizontal:E??{relativeTo:"column"},vertical:y??{relativeTo:"paragraph"}});let{blip:h,blipFill:X}=oe(e),V=se(h),_=le(X),U=ae(h),M=de(V,n,t),fe=ue(e),j=re(fe),I={type:"image",rId:V,size:o,wrap:P};if(s.id&&(I.id=s.id),s.alt&&(I.alt=s.alt),s.title&&(I.title=s.title),s.decorative&&(I.decorative=true),M.src&&(I.src=M.src),M.mimeType&&(I.mimeType=M.mimeType),M.filename&&(I.filename=M.filename),x&&(I.position=x),l&&(I.padding=l),j&&(I.transform=j),_&&(I.crop=_),U!==void 0&&(I.opacity=U),g!==void 0&&(I.layoutInCell=g),T!==void 0&&(I.allowOverlap=T),s.hlinkRId&&n){let q=chunkZ3LGMBJC_js.d(n,s.hlinkRId);q&&(I.hlinkHref=q);}return I}function we(e,n,t){if(ee(e))return null;let i=chunk3R7QHNI5_js.i(e);for(let o of i){let r=o.name||"";if(r==="wp:inline"||r==="wp:anchor")return r==="wp:inline"?Te(o,n,t):be(o,n,t)}return null}function Qe(e,n,t){return we(e,n,t)}function Ye(e){return e.wrap.type==="inline"}function Ze(e){return e.wrap.type!=="inline"}function en(e){return e.wrap.type==="behind"}function nn(e){return e.wrap.type==="inFront"}function tn(e){return chunk4Q2IP5FW_js.e(e.size.width)}function rn(e){return chunk4Q2IP5FW_js.e(e.size.height)}function on(e){return e.decorative===true}function ln(e){return {top:chunk4Q2IP5FW_js.e(e.wrap.distT),bottom:chunk4Q2IP5FW_js.e(e.wrap.distB),left:chunk4Q2IP5FW_js.e(e.wrap.distL),right:chunk4Q2IP5FW_js.e(e.wrap.distR)}}exports.A=Ye;exports.B=Ze;exports.C=en;exports.D=nn;exports.E=tn;exports.F=rn;exports.G=on;exports.H=ln;exports.a=K;exports.b=N;exports.c=Q;exports.d=Y;exports.e=H;exports.f=ve;exports.g=Be;exports.h=ee;exports.i=Ce;exports.j=Me;exports.k=Re;exports.l=Xe;exports.m=ke;exports.n=Ae;exports.o=Oe;exports.p=Ne;exports.q=Se;exports.r=Le;exports.s=ze;exports.t=We;exports.u=De;exports.v=He;exports.w=Ve;exports.x=_e;exports.y=we;exports.z=Qe;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkAA6D2C6R_js=require('./chunk-AA6D2C6R.js'),chunkFIGLFSNR_js=require('./chunk-FIGLFSNR.js'),chunkQVRMX2AC_js=require('./chunk-QVRMX2AC.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunkGSKMHXHG_js=require('./chunk-GSKMHXHG.js'),chunkH57LNDBH_js=require('./chunk-H57LNDBH.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js'),He=require('jszip');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var He__default=/*#__PURE__*/_interopDefault(He);async function G(t){let n=await He__default.default.loadAsync(t),e={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:t};for(let[o,i]of Object.entries(n.files)){if(i.dir)continue;let r=o.toLowerCase();if(r.endsWith(".xml")||r.endsWith(".rels")){let a=await i.async("text");if(e.allXml.set(o,a),r==="word/document.xml")e.documentXml=a;else if(r==="word/styles.xml")e.stylesXml=a;else if(r==="word/theme/theme1.xml")e.themeXml=a;else if(r==="word/numbering.xml")e.numberingXml=a;else if(r==="word/fonttable.xml")e.fontTableXml=a;else if(r==="word/settings.xml")e.settingsXml=a;else if(r==="word/websettings.xml")e.webSettingsXml=a;else if(r==="word/footnotes.xml")e.footnotesXml=a;else if(r==="word/endnotes.xml")e.endnotesXml=a;else if(r==="word/comments.xml")e.commentsXml=a;else if(r==="word/commentsextensible.xml")e.commentsExtensibleXml=a;else if(r==="word/commentsextended.xml")e.commentsExtendedXml=a;else if(r==="word/_rels/document.xml.rels")e.documentRels=a;else if(r==="_rels/.rels")e.packageRels=a;else if(r==="[content_types].xml")e.contentTypesXml=a;else if(r==="docprops/core.xml")e.corePropsXml=a;else if(r==="docprops/app.xml")e.appPropsXml=a;else if(r==="docprops/custom.xml")e.customPropsXml=a;else if(r.match(/^word\/header\d+\.xml$/)){let c=o.split("/").pop()||o;e.headers.set(c,a);}else if(r.match(/^word\/footer\d+\.xml$/)){let c=o.split("/").pop()||o;e.footers.set(c,a);}}else if(r.startsWith("word/media/")){let a=await i.async("arraybuffer");e.media.set(o,a);}else if(r.startsWith("word/fonts/")){let a=await i.async("arraybuffer");e.fonts.set(o,a);}}return e}function Me(t){switch(t.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 Y(t,n,e,o){let i={};return t&&t!=="auto"?i.rgb=t:t==="auto"&&(i.auto=true),n&&(i.themeColor=n),e&&(i.themeTint=e),o&&(i.themeShade=o),i}function W(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.j(t,"w","color");e&&e!=="auto"&&(n.color={rgb:e});let o=chunk3R7QHNI5_js.j(t,"w","fill");o&&o!=="auto"&&(n.fill={rgb:o});let i=chunk3R7QHNI5_js.j(t,"w","themeFill");i&&(n.fill=n.fill||{},n.fill.themeColor=i);let r=chunk3R7QHNI5_js.j(t,"w","themeFillTint");r&&n.fill&&(n.fill.themeTint=r);let a=chunk3R7QHNI5_js.j(t,"w","themeFillShade");a&&n.fill&&(n.fill.themeShade=a);let c=chunk3R7QHNI5_js.j(t,"w","val");return c&&(n.pattern=c),Object.keys(n).length>0?n:void 0}function $(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","b");o&&(e.bold=chunk3R7QHNI5_js.m(o));let i=chunk3R7QHNI5_js.e(t,"w","bCs");i&&(e.boldCs=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","i");r&&(e.italic=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(t,"w","iCs");a&&(e.italicCs=chunk3R7QHNI5_js.m(a));let c=chunk3R7QHNI5_js.e(t,"w","u");if(c){let m=chunk3R7QHNI5_js.j(c,"w","val");if(m){e.underline={style:m};let P=chunk3R7QHNI5_js.j(c,"w","color"),I=chunk3R7QHNI5_js.j(c,"w","themeColor");(P||I)&&(e.underline.color=Y(P,I,chunk3R7QHNI5_js.j(c,"w","themeTint"),chunk3R7QHNI5_js.j(c,"w","themeShade")));}}let g=chunk3R7QHNI5_js.e(t,"w","strike");g&&(e.strike=chunk3R7QHNI5_js.m(g));let d=chunk3R7QHNI5_js.e(t,"w","dstrike");d&&(e.doubleStrike=chunk3R7QHNI5_js.m(d));let h=chunk3R7QHNI5_js.e(t,"w","vertAlign");if(h){let m=chunk3R7QHNI5_js.j(h,"w","val");(m==="superscript"||m==="subscript"||m==="baseline")&&(e.vertAlign=m);}let b=chunk3R7QHNI5_js.e(t,"w","smallCaps");b&&(e.smallCaps=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","caps");u&&(e.allCaps=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","vanish");S&&(e.hidden=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","color");f&&(e.color=Y(chunk3R7QHNI5_js.j(f,"w","val"),chunk3R7QHNI5_js.j(f,"w","themeColor"),chunk3R7QHNI5_js.j(f,"w","themeTint"),chunk3R7QHNI5_js.j(f,"w","themeShade")));let y=chunk3R7QHNI5_js.e(t,"w","highlight");if(y){let m=chunk3R7QHNI5_js.j(y,"w","val");m&&(e.highlight=m);}let C=chunk3R7QHNI5_js.e(t,"w","shd");C&&(e.shading=W(C));let D=chunk3R7QHNI5_js.e(t,"w","sz");if(D){let m=chunk3R7QHNI5_js.l(D,"w","val");m!==void 0&&(e.fontSize=m);}let B=chunk3R7QHNI5_js.e(t,"w","szCs");if(B){let m=chunk3R7QHNI5_js.l(B,"w","val");m!==void 0&&(e.fontSizeCs=m);}let v=chunk3R7QHNI5_js.e(t,"w","rFonts");if(v){e.fontFamily={ascii:chunk3R7QHNI5_js.j(v,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(v,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(v,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(v,"w","cs")??void 0};let m=chunk3R7QHNI5_js.j(v,"w","asciiTheme");m&&(e.fontFamily.asciiTheme=m,n&&!e.fontFamily.ascii&&(e.fontFamily.ascii=chunkAA6D2C6R_js.b(n,m)));let P=chunk3R7QHNI5_js.j(v,"w","hAnsiTheme");P&&(e.fontFamily.hAnsiTheme=P,n&&!e.fontFamily.hAnsi&&(e.fontFamily.hAnsi=chunkAA6D2C6R_js.b(n,P)));let I=chunk3R7QHNI5_js.j(v,"w","eastAsiaTheme");I&&(e.fontFamily.eastAsiaTheme=I,n&&!e.fontFamily.eastAsia&&(e.fontFamily.eastAsia=chunkAA6D2C6R_js.b(n,I)));let U=chunk3R7QHNI5_js.j(v,"w","cstheme");U&&(e.fontFamily.csTheme=U,n&&!e.fontFamily.cs&&(e.fontFamily.cs=chunkAA6D2C6R_js.b(n,U)));}let X=chunk3R7QHNI5_js.e(t,"w","spacing");if(X){let m=chunk3R7QHNI5_js.l(X,"w","val");m!==void 0&&(e.spacing=m);}let p=chunk3R7QHNI5_js.e(t,"w","position");if(p){let m=chunk3R7QHNI5_js.l(p,"w","val");m!==void 0&&(e.position=m);}let x=chunk3R7QHNI5_js.e(t,"w","w");if(x){let m=chunk3R7QHNI5_js.l(x,"w","val");m!==void 0&&(e.scale=m);}let F=chunk3R7QHNI5_js.e(t,"w","kern");if(F){let m=chunk3R7QHNI5_js.l(F,"w","val");m!==void 0&&(e.kerning=m);}let A=chunk3R7QHNI5_js.e(t,"w","effect");if(A){let m=chunk3R7QHNI5_js.j(A,"w","val");m&&(e.effect=m);}let k=chunk3R7QHNI5_js.e(t,"w","em");if(k){let m=chunk3R7QHNI5_js.j(k,"w","val");m&&(e.emphasisMark=m);}let M=chunk3R7QHNI5_js.e(t,"w","emboss");M&&(e.emboss=chunk3R7QHNI5_js.m(M));let R=chunk3R7QHNI5_js.e(t,"w","imprint");R&&(e.imprint=chunk3R7QHNI5_js.m(R));let V=chunk3R7QHNI5_js.e(t,"w","outline");V&&(e.outline=chunk3R7QHNI5_js.m(V));let L=chunk3R7QHNI5_js.e(t,"w","shadow");L&&(e.shadow=chunk3R7QHNI5_js.m(L));let N=chunk3R7QHNI5_js.e(t,"w","rtl");N&&(e.rtl=chunk3R7QHNI5_js.m(N));let H=chunk3R7QHNI5_js.e(t,"w","cs");H&&(e.cs=chunk3R7QHNI5_js.m(H));let _=chunk3R7QHNI5_js.e(t,"w","rStyle");if(_){let m=chunk3R7QHNI5_js.j(_,"w","val");m&&(e.styleId=m);}return Object.keys(e).length>0?e:void 0}function E(t){if(!t)return;let n=chunk3R7QHNI5_js.j(t,"w","val");if(!n)return;let e={style:n},o=chunk3R7QHNI5_js.j(t,"w","color"),i=chunk3R7QHNI5_js.j(t,"w","themeColor");(o||i)&&(e.color=Y(o,i,chunk3R7QHNI5_js.j(t,"w","themeTint"),chunk3R7QHNI5_js.j(t,"w","themeShade")));let r=chunk3R7QHNI5_js.l(t,"w","sz");r!==void 0&&(e.size=r);let a=chunk3R7QHNI5_js.l(t,"w","space");a!==void 0&&(e.space=a);let c=chunk3R7QHNI5_js.j(t,"w","shadow");c&&(e.shadow=c==="1"||c==="true");let g=chunk3R7QHNI5_js.j(t,"w","frame");return g&&(e.frame=g==="1"||g==="true"),e}function je(t){if(!t)return;let n=chunk3R7QHNI5_js.f(t,"w","tab");if(n.length===0)return;let e=[];for(let o of n){let i=chunk3R7QHNI5_js.l(o,"w","pos"),r=chunk3R7QHNI5_js.j(o,"w","val");if(i!==void 0&&r){let a={position:i,alignment:r},c=chunk3R7QHNI5_js.j(o,"w","leader");c&&(a.leader=c),e.push(a);}}return e.length>0?e:void 0}function K(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","jc");if(o){let p=chunk3R7QHNI5_js.j(o,"w","val");p&&(e.alignment=p);}let i=chunk3R7QHNI5_js.e(t,"w","bidi");i&&(e.bidi=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","spacing");if(r){let p=chunk3R7QHNI5_js.l(r,"w","before");p!==void 0&&(e.spaceBefore=p);let x=chunk3R7QHNI5_js.l(r,"w","after");x!==void 0&&(e.spaceAfter=x);let F=chunk3R7QHNI5_js.l(r,"w","line");F!==void 0&&(e.lineSpacing=F);let A=chunk3R7QHNI5_js.j(r,"w","lineRule");A&&(e.lineSpacingRule=A);let k=chunk3R7QHNI5_js.j(r,"w","beforeAutospacing");k&&(e.beforeAutospacing=k==="1"||k==="true");let M=chunk3R7QHNI5_js.j(r,"w","afterAutospacing");M&&(e.afterAutospacing=M==="1"||M==="true");}let a=chunk3R7QHNI5_js.e(t,"w","ind");if(a){let p=chunk3R7QHNI5_js.l(a,"w","left");p!==void 0&&(e.indentLeft=p);let x=chunk3R7QHNI5_js.l(a,"w","right");x!==void 0&&(e.indentRight=x);let F=chunk3R7QHNI5_js.l(a,"w","firstLine");F!==void 0&&(e.indentFirstLine=F);let A=chunk3R7QHNI5_js.l(a,"w","hanging");A!==void 0&&(e.indentFirstLine=-A,e.hangingIndent=true);}let c=chunk3R7QHNI5_js.e(t,"w","pBdr");if(c){let p={},x=E(chunk3R7QHNI5_js.e(c,"w","top"));x&&(p.top=x);let F=E(chunk3R7QHNI5_js.e(c,"w","bottom"));F&&(p.bottom=F);let A=E(chunk3R7QHNI5_js.e(c,"w","left"));A&&(p.left=A);let k=E(chunk3R7QHNI5_js.e(c,"w","right"));k&&(p.right=k);let M=E(chunk3R7QHNI5_js.e(c,"w","between"));M&&(p.between=M);let R=E(chunk3R7QHNI5_js.e(c,"w","bar"));R&&(p.bar=R),Object.keys(p).length>0&&(e.borders=p);}let g=chunk3R7QHNI5_js.e(t,"w","shd");g&&(e.shading=W(g));let d=chunk3R7QHNI5_js.e(t,"w","tabs");d&&(e.tabs=je(d));let h=chunk3R7QHNI5_js.e(t,"w","keepNext");h&&(e.keepNext=chunk3R7QHNI5_js.m(h));let b=chunk3R7QHNI5_js.e(t,"w","keepLines");b&&(e.keepLines=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","widowControl");u&&(e.widowControl=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","pageBreakBefore");S&&(e.pageBreakBefore=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","contextualSpacing");f&&(e.contextualSpacing=chunk3R7QHNI5_js.m(f));let y=chunk3R7QHNI5_js.e(t,"w","numPr");if(y){let p=chunk3R7QHNI5_js.e(y,"w","numId"),x=chunk3R7QHNI5_js.e(y,"w","ilvl");if(p||x){if(e.numPr={},p){let F=chunk3R7QHNI5_js.l(p,"w","val");F!==void 0&&(e.numPr.numId=F);}if(x){let F=chunk3R7QHNI5_js.l(x,"w","val");F!==void 0&&(e.numPr.ilvl=F);}}}let C=chunk3R7QHNI5_js.e(t,"w","outlineLvl");if(C){let p=chunk3R7QHNI5_js.l(C,"w","val");p!==void 0&&(e.outlineLevel=p);}let D=chunk3R7QHNI5_js.e(t,"w","pStyle");if(D){let p=chunk3R7QHNI5_js.j(D,"w","val");p&&(e.styleId=p);}let B=chunk3R7QHNI5_js.e(t,"w","suppressLineNumbers");B&&(e.suppressLineNumbers=chunk3R7QHNI5_js.m(B));let v=chunk3R7QHNI5_js.e(t,"w","suppressAutoHyphens");v&&(e.suppressAutoHyphens=chunk3R7QHNI5_js.m(v));let X=chunk3R7QHNI5_js.e(t,"w","rPr");return X&&(e.runProperties=$(X,n)),Object.keys(e).length>0?e:void 0}function j(t){if(!t)return;let n=chunk3R7QHNI5_js.l(t,"w","w"),e=chunk3R7QHNI5_js.j(t,"w","type");if(n!==void 0&&e)return {value:n,type:e}}function De(t){if(!t)return;let n={},e=E(chunk3R7QHNI5_js.e(t,"w","top"));e&&(n.top=e);let o=E(chunk3R7QHNI5_js.e(t,"w","bottom"));o&&(n.bottom=o);let i=E(chunk3R7QHNI5_js.e(t,"w","left"));i&&(n.left=i);let r=E(chunk3R7QHNI5_js.e(t,"w","right"));r&&(n.right=r);let a=E(chunk3R7QHNI5_js.e(t,"w","insideH"));a&&(n.insideH=a);let c=E(chunk3R7QHNI5_js.e(t,"w","insideV"));return c&&(n.insideV=c),Object.keys(n).length>0?n:void 0}function Ae(t){if(!t)return;let n={},e=j(chunk3R7QHNI5_js.e(t,"w","top"));e&&(n.top=e);let o=j(chunk3R7QHNI5_js.e(t,"w","bottom"));o&&(n.bottom=o);let i=j(chunk3R7QHNI5_js.e(t,"w","left"));i&&(n.left=i);let r=j(chunk3R7QHNI5_js.e(t,"w","right"));return r&&(n.right=r),Object.keys(n).length>0?n:void 0}function Le(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.j(t,"w","val");if(e){let d=parseInt(e,16);isNaN(d)||(n.firstRow=(d&32)!==0,n.lastRow=(d&64)!==0,n.firstColumn=(d&128)!==0,n.lastColumn=(d&256)!==0,n.noHBand=(d&512)!==0,n.noVBand=(d&1024)!==0);}let o=chunk3R7QHNI5_js.j(t,"w","firstColumn");o&&(n.firstColumn=o==="1");let i=chunk3R7QHNI5_js.j(t,"w","firstRow");i&&(n.firstRow=i==="1");let r=chunk3R7QHNI5_js.j(t,"w","lastColumn");r&&(n.lastColumn=r==="1");let a=chunk3R7QHNI5_js.j(t,"w","lastRow");a&&(n.lastRow=a==="1");let c=chunk3R7QHNI5_js.j(t,"w","noHBand");c&&(n.noHBand=c==="1");let g=chunk3R7QHNI5_js.j(t,"w","noVBand");return g&&(n.noVBand=g==="1"),Object.keys(n).length>0?n:void 0}function le(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","tblW");o&&(e.width=j(o));let i=chunk3R7QHNI5_js.e(t,"w","jc");if(i){let f=chunk3R7QHNI5_js.j(i,"w","val");(f==="left"||f==="center"||f==="right")&&(e.justification=f);}let r=chunk3R7QHNI5_js.e(t,"w","tblCellSpacing");r&&(e.cellSpacing=j(r));let a=chunk3R7QHNI5_js.e(t,"w","tblInd");a&&(e.indent=j(a));let c=chunk3R7QHNI5_js.e(t,"w","tblBorders");c&&(e.borders=De(c));let g=chunk3R7QHNI5_js.e(t,"w","tblCellMar");g&&(e.cellMargins=Ae(g));let d=chunk3R7QHNI5_js.e(t,"w","tblLayout");if(d){let f=chunk3R7QHNI5_js.j(d,"w","type");(f==="fixed"||f==="autofit")&&(e.layout=f);}let h=chunk3R7QHNI5_js.e(t,"w","tblStyle");if(h){let f=chunk3R7QHNI5_js.j(h,"w","val");f&&(e.styleId=f);}let b=chunk3R7QHNI5_js.e(t,"w","tblLook");b&&(e.look=Le(b));let u=chunk3R7QHNI5_js.e(t,"w","shd");u&&(e.shading=W(u));let S=chunk3R7QHNI5_js.e(t,"w","bidiVisual");return S&&(e.bidi=chunk3R7QHNI5_js.m(S)),Object.keys(e).length>0?e:void 0}function ce(t){if(!t)return;let n={},e=chunk3R7QHNI5_js.e(t,"w","trHeight");if(e){n.height=j(e);let c=chunk3R7QHNI5_js.j(e,"w","hRule");c&&(n.heightRule=c);}let o=chunk3R7QHNI5_js.e(t,"w","tblHeader");o&&(n.header=chunk3R7QHNI5_js.m(o));let i=chunk3R7QHNI5_js.e(t,"w","cantSplit");i&&(n.cantSplit=chunk3R7QHNI5_js.m(i));let r=chunk3R7QHNI5_js.e(t,"w","jc");if(r){let c=chunk3R7QHNI5_js.j(r,"w","val");(c==="left"||c==="center"||c==="right")&&(n.justification=c);}let a=chunk3R7QHNI5_js.e(t,"w","hidden");return a&&(n.hidden=chunk3R7QHNI5_js.m(a)),Object.keys(n).length>0?n:void 0}function fe(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","tcW");o&&(e.width=j(o));let i=chunk3R7QHNI5_js.e(t,"w","tcBorders");i&&(e.borders=De(i));let r=chunk3R7QHNI5_js.e(t,"w","tcMar");r&&(e.margins=Ae(r));let a=chunk3R7QHNI5_js.e(t,"w","shd");a&&(e.shading=W(a));let c=chunk3R7QHNI5_js.e(t,"w","vAlign");if(c){let f=chunk3R7QHNI5_js.j(c,"w","val");(f==="top"||f==="center"||f==="bottom")&&(e.verticalAlign=f);}let g=chunk3R7QHNI5_js.e(t,"w","textDirection");if(g){let f=chunk3R7QHNI5_js.j(g,"w","val");f&&(e.textDirection=f);}let d=chunk3R7QHNI5_js.e(t,"w","gridSpan");if(d){let f=chunk3R7QHNI5_js.l(d,"w","val");f!==void 0&&(e.gridSpan=f);}let h=chunk3R7QHNI5_js.e(t,"w","vMerge");if(h){let f=chunk3R7QHNI5_js.j(h,"w","val");e.vMerge=f==="restart"?"restart":"continue";}let b=chunk3R7QHNI5_js.e(t,"w","tcFitText");b&&(e.fitText=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","noWrap");u&&(e.noWrap=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","hideMark");return S&&(e.hideMark=chunk3R7QHNI5_js.m(S)),Object.keys(e).length>0?e:void 0}function Ue(t,n){let e={styleId:chunk3R7QHNI5_js.j(t,"w","styleId")??"",type:chunk3R7QHNI5_js.j(t,"w","type")??"paragraph"},o=chunk3R7QHNI5_js.j(t,"w","default");o&&(e.default=o==="1"||o==="true");let i=chunk3R7QHNI5_js.e(t,"w","name");i&&(e.name=chunk3R7QHNI5_js.j(i,"w","val")??void 0);let r=chunk3R7QHNI5_js.e(t,"w","basedOn");r&&(e.basedOn=chunk3R7QHNI5_js.j(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(t,"w","next");a&&(e.next=chunk3R7QHNI5_js.j(a,"w","val")??void 0);let c=chunk3R7QHNI5_js.e(t,"w","link");c&&(e.link=chunk3R7QHNI5_js.j(c,"w","val")??void 0);let g=chunk3R7QHNI5_js.e(t,"w","uiPriority");if(g){let X=chunk3R7QHNI5_js.l(g,"w","val");X!==void 0&&(e.uiPriority=X);}let d=chunk3R7QHNI5_js.e(t,"w","hidden");d&&(e.hidden=chunk3R7QHNI5_js.m(d));let h=chunk3R7QHNI5_js.e(t,"w","semiHidden");h&&(e.semiHidden=chunk3R7QHNI5_js.m(h));let b=chunk3R7QHNI5_js.e(t,"w","unhideWhenUsed");b&&(e.unhideWhenUsed=chunk3R7QHNI5_js.m(b));let u=chunk3R7QHNI5_js.e(t,"w","qFormat");u&&(e.qFormat=chunk3R7QHNI5_js.m(u));let S=chunk3R7QHNI5_js.e(t,"w","personal");S&&(e.personal=chunk3R7QHNI5_js.m(S));let f=chunk3R7QHNI5_js.e(t,"w","pPr");f&&(e.pPr=K(f,n));let y=chunk3R7QHNI5_js.e(t,"w","rPr");y&&(e.rPr=$(y,n));let C=chunk3R7QHNI5_js.e(t,"w","tblPr");C&&(e.tblPr=le(C));let D=chunk3R7QHNI5_js.e(t,"w","trPr");D&&(e.trPr=ce(D));let B=chunk3R7QHNI5_js.e(t,"w","tcPr");B&&(e.tcPr=fe(B));let v=chunk3R7QHNI5_js.f(t,"w","tblStylePr");if(v.length>0){e.tblStylePr=[];for(let X of v){let p=chunk3R7QHNI5_js.j(X,"w","type");if(p){let x={type:p},F=chunk3R7QHNI5_js.e(X,"w","pPr");F&&(x.pPr=K(F,n));let A=chunk3R7QHNI5_js.e(X,"w","rPr");A&&(x.rPr=$(A,n));let k=chunk3R7QHNI5_js.e(X,"w","tblPr");k&&(x.tblPr=le(k));let M=chunk3R7QHNI5_js.e(X,"w","trPr");M&&(x.trPr=ce(M));let R=chunk3R7QHNI5_js.e(X,"w","tcPr");R&&(x.tcPr=fe(R)),e.tblStylePr.push(x);}}}return e}function Oe(t,n){if(!t)return;let e={},o=chunk3R7QHNI5_js.e(t,"w","rPrDefault");if(o){let r=chunk3R7QHNI5_js.e(o,"w","rPr");r&&(e.rPr=$(r,n));}let i=chunk3R7QHNI5_js.e(t,"w","pPrDefault");if(i){let r=chunk3R7QHNI5_js.e(i,"w","pPr");r&&(e.pPr=K(r,n));}return e.rPr||e.pPr?e:void 0}function ze(t,n){if(!n)return t;if(!t)return n?{...n}:void 0;let e={...t};for(let o of Object.keys(n)){let i=n[o];if(i!==void 0)if(o==="runProperties")e.runProperties=chunkGSKMHXHG_js.b(e.runProperties,n.runProperties);else if(o==="borders"||o==="numPr"||o==="frame"){let r=e[o],a=i;e[o]={...r||{},...a||{}};}else o==="tabs"&&Array.isArray(i)?e.tabs=[...i]:e[o]=i;}return e}function Be(t,n,e,o=new Set){if(o.has(t.styleId)||(o.add(t.styleId),!t.basedOn))return t;let i=n.get(t.basedOn);if(!i)return t;let r=Be(i,n,e,o),a={...t,pPr:ze(r.pPr,t.pPr),rPr:chunkGSKMHXHG_js.b(r.rPr,t.rPr)};return t.type==="table"&&((r.tblPr||t.tblPr)&&(a.tblPr={...r.tblPr||{},...t.tblPr||{}}),(r.trPr||t.trPr)&&(a.trPr={...r.trPr||{},...t.trPr||{}}),(r.tcPr||t.tcPr)&&(a.tcPr={...r.tcPr||{},...t.tcPr||{}})),a}function ue(t,n){let e=new Map;try{let o=chunk3R7QHNI5_js.c(t);if(!o)return e;let i=chunk3R7QHNI5_js.f(o,"w","style");for(let r of i){let a=Ue(r,n);a.styleId&&e.set(a.styleId,a);}for(let[r,a]of e){let c=Be(a,e,n);e.set(r,c);}}catch(o){console.warn("Failed to parse styles:",o);}return e}function ke(t,n){let e={styles:[]};try{let o=chunk3R7QHNI5_js.c(t);if(!o)return e;let i=chunk3R7QHNI5_js.e(o,"w","docDefaults");e.docDefaults=Oe(i,n);let r=chunk3R7QHNI5_js.e(o,"w","latentStyles");r&&(e.latentStyles={defLockedState:chunk3R7QHNI5_js.j(r,"w","defLockedState")==="1",defUIPriority:chunk3R7QHNI5_js.l(r,"w","defUIPriority"),defSemiHidden:chunk3R7QHNI5_js.j(r,"w","defSemiHidden")==="1",defUnhideWhenUsed:chunk3R7QHNI5_js.j(r,"w","defUnhideWhenUsed")==="1",defQFormat:chunk3R7QHNI5_js.j(r,"w","defQFormat")==="1",count:chunk3R7QHNI5_js.l(r,"w","count")});let a=ue(t,n);e.styles=Array.from(a.values());}catch(o){console.warn("Failed to parse style definitions:",o);}return e}var Ie=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function Re(t){let n=[],e;for(Ie.lastIndex=0;(e=Ie.exec(t))!==null;){let o=e[1].trim();o&&!n.includes(o)&&n.push(o);}return n}function ee(t){let n=[];for(let e of t)if(e.type==="paragraph"){let o=chunkAA6D2C6R_js.N(e),i=Re(o);for(let r of i)n.includes(r)||n.push(r);}else if(e.type==="table"){let o=Ee(e);for(let i of o)n.includes(i)||n.push(i);}return n}function Ee(t){let n=[];for(let e of t.rows)for(let o of e.cells)for(let i of o.content)if(i.type==="paragraph"){let r=chunkAA6D2C6R_js.N(i),a=Re(r);for(let c of a)n.includes(c)||n.push(c);}else if(i.type==="table"){let r=Ee(i);for(let a of r)n.includes(a)||n.push(a);}return n}function We(t,n){let e=[],o=[];for(let i of t)o.push(i),i.type==="paragraph"&&i.sectionProperties&&(e.push({properties:i.sectionProperties,content:o}),o=[]);return (o.length>0||e.length===0)&&e.push({properties:n??chunkAA6D2C6R_js.C(),content:o}),e}function te(t,n=null,e=null,o=null,i=null,r=null){let a={content:[]};if(!t)return a;let c=chunk3R7QHNI5_js.a(t);if(!c)return a;let g=(c.elements??[]).find(u=>u.type==="element"&&(u.name==="w:document"||u.name?.endsWith(":document")));if(!g)return a;let d=chunk3R7QHNI5_js.e(g,"w","body");if(!d)return a;a.content=chunkAA6D2C6R_js.q(d,n,e,o,i,r);let h=chunk3R7QHNI5_js.e(d,"w","sectPr");h&&(a.finalSectionProperties=chunkAA6D2C6R_js.B(h,i));let b=We(a.content,a.finalSectionProperties);return a.sections=chunkAA6D2C6R_js.D(b),a.finalSectionProperties&&a.sections.length>0&&(a.finalSectionProperties=a.sections[a.sections.length-1].properties),a}function $e(t){let n=new Map,e=chunk3R7QHNI5_js.a(t);if(!e)return n;let o=chunk3R7QHNI5_js.e(e,"w16cex","commentsExtensible")??e;for(let i of chunk3R7QHNI5_js.i(o)){if((i.name?.replace(/^.*:/,"")??"")!=="comment")continue;let a=chunk3R7QHNI5_js.j(i,"w16cex","paraId")??chunk3R7QHNI5_js.j(i,"w15","paraId")??i.attributes?.["w16cex:paraId"]??i.attributes?.["w15:paraId"],c=chunk3R7QHNI5_js.j(i,"w16cex","dateUtc")??chunk3R7QHNI5_js.j(i,"w15","dateUtc")??i.attributes?.["w16cex:dateUtc"]??i.attributes?.["w15:dateUtc"];a&&c&&n.set(String(a).toUpperCase(),String(c));}return n}function _e(t){let n=new Map,e=new Map,o=chunk3R7QHNI5_js.a(t);if(!o)return {parentByParaId:n,doneByParaId:e};let i=chunk3R7QHNI5_js.e(o,"w15","commentsEx")??o;for(let r of chunk3R7QHNI5_js.i(i)){if((r.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let c=chunk3R7QHNI5_js.j(r,"w15","paraId")??r.attributes?.["w15:paraId"],g=chunk3R7QHNI5_js.j(r,"w15","paraIdParent")??r.attributes?.["w15:paraIdParent"],d=chunk3R7QHNI5_js.j(r,"w15","done")??r.attributes?.["w15:done"];if(c){let h=String(c).toUpperCase();g&&n.set(h,String(g).toUpperCase()),d==="1"&&e.set(h,true);}}return {parentByParaId:n,doneByParaId:e}}function Ne(t,n,e,o,i,r,a){if(!t)return [];let c=chunk3R7QHNI5_js.a(t);if(!c)return [];let g=r?$e(r):new Map,d=a?_e(a):null,h=chunk3R7QHNI5_js.e(c,"w","comments")??c,b=chunk3R7QHNI5_js.i(h),u=[],S=[];for(let f of b){if((f.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(chunk3R7QHNI5_js.j(f,"w","id")??"0",10),D=chunk3R7QHNI5_js.j(f,"w","author")??"Unknown",B=chunk3R7QHNI5_js.j(f,"w","initials"),v=B!=null?String(B):void 0,X=chunk3R7QHNI5_js.j(f,"w","date"),p=X!=null?String(X):void 0,x=chunk3R7QHNI5_js.j(f,"w14","paraId")??f.attributes?.["w14:paraId"]??chunk3R7QHNI5_js.j(f,"w","paraId"),A=(x?g.get(String(x).toUpperCase()):void 0)??p,k=chunk3R7QHNI5_js.j(f,"w","done")??f.attributes?.["w:done"],M=k==="1"||k==="true"?true:void 0,R=chunk3R7QHNI5_js.j(f,"w16cid","parentId")??chunk3R7QHNI5_js.j(f,"w","parentId")??f.attributes?.["w16cid:parentId"]??f.attributes?.["w:parentId"],V=R!=null?parseInt(String(R),10):void 0,L=[],N="";for(let H of chunk3R7QHNI5_js.i(f))if((H.name?.replace(/^.*:/,"")??"")==="p"){let m=chunkAA6D2C6R_js.O(H,n,e,null,o,i);L.push(m);let P=chunk3R7QHNI5_js.j(H,"w14","paraId")??H.attributes?.["w14:paraId"];P&&(N=String(P).toUpperCase());}M==null&&d&&N&&d.doneByParaId.get(N)&&(M=true),S.push(N),u.push({id:C,author:D,initials:v,date:A,content:L,...M!=null?{done:M}:{},...V!=null&&!isNaN(V)?{parentId:V}:{}});}if(d&&d.parentByParaId.size>0){let f=new Map;for(let y=0;y<u.length;y++){let C=S[y];C&&f.set(C,u[y].id);}for(let y=0;y<u.length;y++){if(u[y].parentId!=null)continue;let C=S[y];if(!C)continue;let D=d.parentByParaId.get(C);if(!D)continue;let B=f.get(D);B!=null&&(u[y]={...u[y],parentId:B});}}return u}async function Ve(t,n={}){let e=t instanceof ArrayBuffer?t:await chunkQVRMX2AC_js.u(t),{onProgress:o=()=>{},preloadFonts:i=true,parseHeadersFooters:r=true,parseNotes:a=true,detectVariables:c=true}=n,g=[];try{let u=function(P,I){let U=performance.now(),oe=I(),O=performance.now()-U;return b.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe};var d=u;let h=performance.now(),b=[];async function S(P,I){let U=performance.now(),oe=await I(),O=performance.now()-U;return b.push({stage:P,ms:O}),O>1e3&&console.warn(`[parseDocx] ${P} took ${Math.round(O)}ms`),oe}o("Extracting DOCX...",0);let f=await S("unzip",()=>G(e));o("Extracted DOCX",10),o("Parsing relationships...",10);let y=u("relationships",()=>f.documentRels?chunkZ3LGMBJC_js.b(f.documentRels):new Map);o("Parsed relationships",15),o("Parsing theme...",15);let C=u("theme",()=>chunkAA6D2C6R_js.a(f.themeXml));o("Parsed theme",20),o("Parsing styles...",20);let D=null,B;u("styles",()=>{f.stylesXml&&(D=ue(f.stylesXml,C),B=ke(f.stylesXml,C));}),o("Parsed styles",30),o("Parsing numbering...",30);let v=u("numbering",()=>chunkH57LNDBH_js.a(f.numberingXml)),X=u("settings",()=>chunkFIGLFSNR_js.b(f.settingsXml));o("Parsed numbering",35),o("Processing media files...",35);let p=u("media",()=>Ze(f,y));o("Processed media",40),o("Parsing document body...",40);let x={content:[]};u("documentBody",()=>{f.documentXml?x=te(f.documentXml,D,C,v,y,p):g.push("No document.xml found in DOCX");}),o("Parsed document body",55);let F,A;if(r){o("Parsing headers/footers...",55);let P=u("headersFooters",()=>qe(f,D,C,v,y,p));F=P.headers,A=P.footers,o("Parsed headers/footers",65);}else o("Skipping headers/footers",65);let k,M,R,V;if(a){o("Parsing footnotes/endnotes...",65);let P=u("footnotesEndnotes",()=>Je(f,D,C,v,y,p));k=P.footnotes,M=P.endnotes,R=P.footnoteSeparators,V=P.endnoteSeparators,o("Parsed footnotes/endnotes",75);}else o("Skipping footnotes/endnotes",75);o("Parsing comments...",75);let L=u("comments",()=>Ne(f.commentsXml,D,C,y,p,f.commentsExtensibleXml,f.commentsExtendedXml));L.length>0&&(x.comments=L);let N;c?(o("Detecting template variables...",75),N=u("variables",()=>ee(x.content)),o("Detected variables",80)):o("Skipping variable detection",80),i?(o("Loading fonts...",80),await S("fonts",()=>Qe(C,B,x)),o("Loaded fonts",95)):o("Skipping font loading",95),o("Assembling document...",95);let _={package:{document:x,styles:B,theme:C,numbering:v.definitions,settings:X,headers:F,footers:A,footnotes:k,endnotes:M,footnoteSeparators:R,endnoteSeparators:V,relationships:y,media:p},originalBuffer:e,templateVariables:N,warnings:g.length>0?g:void 0},m=performance.now()-h;if(m>2e3){let P=b.filter(I=>I.ms>100).map(I=>`${I.stage}: ${Math.round(I.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(m)}ms`+(P?` (${P})`:""));}return o("Complete",100),_}catch(h){let b=h instanceof Error?h.message:String(h);throw console.error("[parseDocx] Failed to parse DOCX:",b,h),new Error(`Failed to parse DOCX: ${b}`)}}function Ze(t,n){let e=new Map;for(let[o,i]of t.media.entries()){let r=o.split("/").pop()||o,a=Me(o),c=new Uint8Array(i),g="";for(let S=0;S<c.length;S++)g+=String.fromCharCode(c[S]);let d=btoa(g),h=`data:${a};base64,${d}`,b={path:o,filename:r,mimeType:a,data:i,dataUrl:h};e.set(o,b);let u=o.replace(/^word\//,"");u!==o&&e.set(u,b);}return e}function ne(t,n){let e=n.toLowerCase();for(let[o,i]of t.entries())if(o.toLowerCase()===e)return i}function qe(t,n,e,o,i,r){let a=new Map,c=new Map;for(let[g,d]of i.entries())if(d.type===chunkZ3LGMBJC_js.a.header&&d.target){let h=d.target.split("/").pop()||d.target,b=ne(t.headers,h);if(b){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?chunkZ3LGMBJC_js.b(S):i,y=chunkAA6D2C6R_js.r(b,"default",n,e,o,f,r);a.set(g,y);}}else if(d.type===chunkZ3LGMBJC_js.a.footer&&d.target){let h=d.target.split("/").pop()||d.target,b=ne(t.footers,h);if(b){let u=`word/_rels/${h}.rels`,S=ne(t.allXml,u),f=S?chunkZ3LGMBJC_js.b(S):i,y=chunkAA6D2C6R_js.s(b,"default",n,e,o,f,r);c.set(g,y);}}return {headers:a,footers:c}}function Je(t,n,e,o,i,r){let a=chunkAA6D2C6R_js.t(t.footnotesXml,n,e,o,i,r),c=chunkAA6D2C6R_js.u(t.endnotesXml,n,e,o,i,r);return {footnotes:a.getNormalFootnotes(),endnotes:c.getNormalEndnotes(),footnoteSeparators:a.footnotes.filter(chunkAA6D2C6R_js.z),endnoteSeparators:c.endnotes.filter(chunkAA6D2C6R_js.A)}}async function Qe(t,n,e){let o=new Set;if(t?.fontScheme){let{majorFont:i,minorFont:r}=t.fontScheme;i?.latin&&o.add(i.latin),r?.latin&&o.add(r.latin);}if(n?.docDefaults?.rPr?.fontFamily?.ascii&&o.add(n.docDefaults.rPr.fontFamily.ascii),n?.styles)for(let i of n.styles)i.rPr?.fontFamily?.ascii&&o.add(i.rPr.fontFamily.ascii),i.rPr?.fontFamily?.hAnsi&&o.add(i.rPr.fontFamily.hAnsi);if(e.content){for(let i of e.content)if(i.type==="paragraph")for(let r of i.content)r.type==="run"&&r.formatting?.fontFamily&&(r.formatting.fontFamily.ascii&&o.add(r.formatting.fontFamily.ascii),r.formatting.fontFamily.hAnsi&&o.add(r.formatting.fontFamily.hAnsi));}if(o.size>0)try{await chunkQVRMX2AC_js.q(Array.from(o));}catch(i){console.warn("Failed to load some fonts:",i);}}async function Et(t){return Ve(t,{preloadFonts:false,parseHeadersFooters:false,parseNotes:false,detectVariables:true})}async function Nt(t,n){return Ve(t,{onProgress:n,preloadFonts:true,parseHeadersFooters:true,parseNotes:true,detectVariables:true})}async function Vt(t){let n=await G(t);if(!n.documentXml)return [];let e=te(n.documentXml);return ee(e.content)}async function Ht(t){let n=await G(t),e=n.documentXml?ee(te(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:e.length}}
2
+ exports.a=Ve;exports.b=Et;exports.c=Nt;exports.d=Vt;exports.e=Ht;
@@ -1,5 +1,5 @@
1
- import {c}from'./chunk-FYRJTDC4.mjs';import {a as a$1}from'./chunk-ARHPXIBJ.mjs';import {b,a as a$2}from'./chunk-CUY2THAO.mjs';import {i,t}from'./chunk-CHN26LLL.mjs';import {f}from'./chunk-UE2ZKRYB.mjs';import {a}from'./chunk-QYUPLKLP.mjs';var P=class o{constructor(t){a(this,"_document");a(this,"_pendingVariables");t instanceof ArrayBuffer||ArrayBuffer.isView(t)?this._document={package:{document:{content:[]}},originalBuffer:t instanceof ArrayBuffer?t:t.buffer}:this._document=t,this._pendingVariables={};}static async fromBuffer(t){let e=await f(t);return new o(e)}static fromDocument(t){return new o(t)}getDocument(){return this._document}getText(){let t=this._document.package.document;return this._getBodyText(t)}getFormattedText(){let t=[],e=this._document.package.document;for(let n of e.content)n.type==="paragraph"&&this._extractParagraphSegments(n,t);return t}getVariables(){return a$1(this._document)}getStyles(){let t=this._document.package.styles;if(!t?.styles)return [];let e=[];for(let[n,r]of Object.entries(t.styles))if(typeof r=="object"&&r!==null){let a=r;e.push({id:n,name:a.name||n,type:a.type==="numbering"?"paragraph":a.type||"paragraph",builtIn:a.default});}return e}getPageCount(){let t=this.getWordCount();return Math.max(1,Math.ceil(t/500))}getWordCount(){return this.getText().split(/\s+/).filter(n=>n.length>0).length}getCharacterCount(t=true){let e=this.getText();return t?e.length:e.replace(/\s/g,"").length}getParagraphCount(){return this._document.package.document.content.filter(t=>t.type==="paragraph").length}getTableCount(){return this._document.package.document.content.filter(t=>t.type==="table").length}getAgentContext(t=100){let e=this._document.package.document,n=e.content.filter(i=>i.type==="paragraph"),r=n.map((i,s)=>{let c=this._getParagraphText(i),p=i.formatting?.styleId;return {index:s,preview:c.slice(0,t),style:p,isHeading:p?.toLowerCase().includes("heading")||false,headingLevel:this._parseHeadingLevel(p),isListItem:!!i.listRendering,isEmpty:c.trim().length===0}}),a=(e.sections||[]).map((i,s)=>({index:s,paragraphCount:i.content?.length||0,pageSize:i.properties?.pageWidth&&i.properties?.pageHeight?{width:i.properties.pageWidth,height:i.properties.pageHeight}:void 0,isLandscape:i.properties?.orientation==="landscape",hasHeader:!!i.properties?.headerReferences?.length,hasFooter:!!i.properties?.footerReferences?.length}));return {paragraphCount:n.length,wordCount:this.getWordCount(),characterCount:this.getCharacterCount(),variables:this.getVariables(),variableCount:this.getVariables().length,availableStyles:this.getStyles(),outline:r,sections:a,hasTables:this.getTableCount()>0,hasImages:this._hasImages(),hasHyperlinks:this._hasHyperlinks()}}insertText(t,e,n={}){let r={type:"insertText",position:t,text:e,formatting:n.formatting};return this._executeCommand(r)}replaceRange(t,e,n={}){let r={type:"replaceText",range:t,text:e,formatting:n.formatting};return this._executeCommand(r)}deleteRange(t){let e={type:"deleteText",range:t};return this._executeCommand(e)}applyFormatting(t,e){let n={type:"formatText",range:t,formatting:e};return this._executeCommand(n)}applyStyle(t,e){let n={type:"applyStyle",paragraphIndex:t,styleId:e};return this._executeCommand(n)}applyParagraphFormatting(t,e){let n={type:"formatParagraph",paragraphIndex:t,formatting:e};return this._executeCommand(n)}insertTable(t,e,n,r={}){let a={type:"insertTable",position:t,rows:e,columns:n,data:r.data,hasHeader:r.hasHeader};return this._executeCommand(a)}insertImage(t,e,n={}){let r={type:"insertImage",position:t,src:e,width:n.width,height:n.height,alt:n.alt};return this._executeCommand(r)}insertHyperlink(t,e,n={}){let r={type:"insertHyperlink",range:t,url:e,displayText:n.displayText,tooltip:n.tooltip};return this._executeCommand(r)}removeHyperlink(t){let e={type:"removeHyperlink",range:t};return this._executeCommand(e)}insertParagraphBreak(t){let e={type:"insertParagraphBreak",position:t};return this._executeCommand(e)}mergeParagraphs(t,e){let n={type:"mergeParagraphs",paragraphIndex:t,count:e};return this._executeCommand(n)}setVariable(t,e){return this._pendingVariables[t]=e,this}setVariables(t){for(let[e,n]of Object.entries(t))this._pendingVariables[e]=n;return this}getPendingVariables(){return {...this._pendingVariables}}clearPendingVariables(){return this._pendingVariables={},this}async applyVariables(t){let e={...this._pendingVariables,...t};if(Object.keys(e).length===0)return this;let n=this._document.originalBuffer;if(!n)throw new Error("Cannot apply variables: no original buffer for processing");let{processTemplate:r}=await import('./processTemplate-GPFDLQMX.mjs'),a=r(n,e),i=await f(a),s=new o(i);return s._pendingVariables={},s}async toBuffer(t$1){if(this._document.originalBuffer){if(t$1?.selective){let n=await c(this._document,this._document.originalBuffer,t$1.selective);if(n)return this._document.originalBuffer=n,n}let e=await i(this._document);return this._document.originalBuffer=e,e}return t(this._document)}async toBlob(t="application/vnd.openxmlformats-officedocument.wordprocessingml.document"){let e=await this.toBuffer();return new Blob([e],{type:t})}executeCommands(t){return new o(b(this._document,t))}_executeCommand(t){let e=new o(a$2(this._document,t));return e._pendingVariables={...this._pendingVariables},e}_getBodyText(t){let e=[];for(let n of t.content)n.type==="paragraph"?e.push(this._getParagraphText(n)):n.type==="table"&&e.push(this._getTableText(n));return e.join(`
2
- `)}_getParagraphText(t){let e=[];for(let n of t.content)n.type==="run"?e.push(this._getRunText(n)):n.type==="hyperlink"&&e.push(this._getHyperlinkText(n));return e.join("")}_getRunText(t){return t.content.filter(e=>e.type==="text").map(e=>e.text).join("")}_getHyperlinkText(t){let e=[];for(let n of t.children)n.type==="run"&&e.push(this._getRunText(n));return e.join("")}_getTableText(t){let e=[];for(let n of t.rows)for(let r of n.cells)for(let a of r.content)a.type==="paragraph"&&e.push(this._getParagraphText(a));return e.join(" ")}_extractParagraphSegments(t,e){for(let n of t.content)if(n.type==="run"){let r=this._getRunText(n);r&&e.push({text:r,formatting:n.formatting});}else if(n.type==="hyperlink"){let r=n.href||"";for(let a of n.children)if(a.type==="run"){let i=this._getRunText(a);i&&e.push({text:i,formatting:a.formatting,isHyperlink:true,hyperlinkUrl:r});}}}_parseHeadingLevel(t){if(!t)return;let e=t.match(/heading\s*(\d)/i);if(e)return parseInt(e[1],10)}_hasImages(){let t=this._document.package.document;for(let e of t.content)if(e.type==="paragraph"){for(let n of e.content)if(n.type==="run"){for(let r of n.content)if(r.type==="drawing")return true}}return false}_hasHyperlinks(){let t=this._document.package.document;for(let e of t.content)if(e.type==="paragraph"){for(let n of e.content)if(n.type==="hyperlink")return true}return false}};async function Ct(o){return P.fromBuffer(o)}function kt(o){return P.fromDocument(o)}function M(o,t={}){let{outlineMaxChars:e=100,maxOutlineParagraphs:n=50}=t,r=o.package.document,a=r.content.filter(y=>y.type==="paragraph"),i=z(a,e,n),s=a$1(o),c=W(o),p=$(r),u=U(r),d=G(r),f=r.content.some(y=>y.type==="table"),x=K(r),l=N(r);return {paragraphCount:a.length,wordCount:u,characterCount:d,variables:s,variableCount:s.length,availableStyles:c,outline:i,sections:p,hasTables:f,hasImages:x,hasHyperlinks:l}}function At(o,t,e={}){let{contextChars:n=200,includeSuggestions:r=true}=e,i=o.package.document.content.filter(m=>m.type==="paragraph"),s=i[t.start.paragraphIndex];if(!s)throw new Error(`Paragraph not found at index ${t.start.paragraphIndex}`);let c=g(s),p="";if(t.start.paragraphIndex===t.end.paragraphIndex)p=c.slice(t.start.offset,t.end.offset);else {let m=[];for(let b=t.start.paragraphIndex;b<=t.end.paragraphIndex;b++){let H=i[b];if(!H)continue;let _=g(H);b===t.start.paragraphIndex?m.push(_.slice(t.start.offset)):b===t.end.paragraphIndex?m.push(_.slice(0,t.end.offset)):m.push(_);}p=m.join(`
1
+ import {c}from'./chunk-QZPVZY6S.mjs';import {a as a$2}from'./chunk-ARHPXIBJ.mjs';import {b,a as a$3}from'./chunk-CUY2THAO.mjs';import {i,t}from'./chunk-F24WZXN4.mjs';import {a as a$1}from'./chunk-3HENAL6V.mjs';import {a}from'./chunk-QYUPLKLP.mjs';var P=class o{constructor(t){a(this,"_document");a(this,"_pendingVariables");t instanceof ArrayBuffer||ArrayBuffer.isView(t)?this._document={package:{document:{content:[]}},originalBuffer:t instanceof ArrayBuffer?t:t.buffer}:this._document=t,this._pendingVariables={};}static async fromBuffer(t){let e=await a$1(t);return new o(e)}static fromDocument(t){return new o(t)}getDocument(){return this._document}getText(){let t=this._document.package.document;return this._getBodyText(t)}getFormattedText(){let t=[],e=this._document.package.document;for(let n of e.content)n.type==="paragraph"&&this._extractParagraphSegments(n,t);return t}getVariables(){return a$2(this._document)}getStyles(){let t=this._document.package.styles;if(!t?.styles)return [];let e=[];for(let[n,r]of Object.entries(t.styles))if(typeof r=="object"&&r!==null){let a=r;e.push({id:n,name:a.name||n,type:a.type==="numbering"?"paragraph":a.type||"paragraph",builtIn:a.default});}return e}getPageCount(){let t=this.getWordCount();return Math.max(1,Math.ceil(t/500))}getWordCount(){return this.getText().split(/\s+/).filter(n=>n.length>0).length}getCharacterCount(t=true){let e=this.getText();return t?e.length:e.replace(/\s/g,"").length}getParagraphCount(){return this._document.package.document.content.filter(t=>t.type==="paragraph").length}getTableCount(){return this._document.package.document.content.filter(t=>t.type==="table").length}getAgentContext(t=100){let e=this._document.package.document,n=e.content.filter(i=>i.type==="paragraph"),r=n.map((i,s)=>{let c=this._getParagraphText(i),p=i.formatting?.styleId;return {index:s,preview:c.slice(0,t),style:p,isHeading:p?.toLowerCase().includes("heading")||false,headingLevel:this._parseHeadingLevel(p),isListItem:!!i.listRendering,isEmpty:c.trim().length===0}}),a=(e.sections||[]).map((i,s)=>({index:s,paragraphCount:i.content?.length||0,pageSize:i.properties?.pageWidth&&i.properties?.pageHeight?{width:i.properties.pageWidth,height:i.properties.pageHeight}:void 0,isLandscape:i.properties?.orientation==="landscape",hasHeader:!!i.properties?.headerReferences?.length,hasFooter:!!i.properties?.footerReferences?.length}));return {paragraphCount:n.length,wordCount:this.getWordCount(),characterCount:this.getCharacterCount(),variables:this.getVariables(),variableCount:this.getVariables().length,availableStyles:this.getStyles(),outline:r,sections:a,hasTables:this.getTableCount()>0,hasImages:this._hasImages(),hasHyperlinks:this._hasHyperlinks()}}insertText(t,e,n={}){let r={type:"insertText",position:t,text:e,formatting:n.formatting};return this._executeCommand(r)}replaceRange(t,e,n={}){let r={type:"replaceText",range:t,text:e,formatting:n.formatting};return this._executeCommand(r)}deleteRange(t){let e={type:"deleteText",range:t};return this._executeCommand(e)}applyFormatting(t,e){let n={type:"formatText",range:t,formatting:e};return this._executeCommand(n)}applyStyle(t,e){let n={type:"applyStyle",paragraphIndex:t,styleId:e};return this._executeCommand(n)}applyParagraphFormatting(t,e){let n={type:"formatParagraph",paragraphIndex:t,formatting:e};return this._executeCommand(n)}insertTable(t,e,n,r={}){let a={type:"insertTable",position:t,rows:e,columns:n,data:r.data,hasHeader:r.hasHeader};return this._executeCommand(a)}insertImage(t,e,n={}){let r={type:"insertImage",position:t,src:e,width:n.width,height:n.height,alt:n.alt};return this._executeCommand(r)}insertHyperlink(t,e,n={}){let r={type:"insertHyperlink",range:t,url:e,displayText:n.displayText,tooltip:n.tooltip};return this._executeCommand(r)}removeHyperlink(t){let e={type:"removeHyperlink",range:t};return this._executeCommand(e)}insertParagraphBreak(t){let e={type:"insertParagraphBreak",position:t};return this._executeCommand(e)}mergeParagraphs(t,e){let n={type:"mergeParagraphs",paragraphIndex:t,count:e};return this._executeCommand(n)}setVariable(t,e){return this._pendingVariables[t]=e,this}setVariables(t){for(let[e,n]of Object.entries(t))this._pendingVariables[e]=n;return this}getPendingVariables(){return {...this._pendingVariables}}clearPendingVariables(){return this._pendingVariables={},this}async applyVariables(t){let e={...this._pendingVariables,...t};if(Object.keys(e).length===0)return this;let n=this._document.originalBuffer;if(!n)throw new Error("Cannot apply variables: no original buffer for processing");let{processTemplate:r}=await import('./processTemplate-GPFDLQMX.mjs'),a=r(n,e),i=await a$1(a),s=new o(i);return s._pendingVariables={},s}async toBuffer(t$1){if(this._document.originalBuffer){if(t$1?.selective){let n=await c(this._document,this._document.originalBuffer,t$1.selective);if(n)return this._document.originalBuffer=n,n}let e=await i(this._document);return this._document.originalBuffer=e,e}return t(this._document)}async toBlob(t="application/vnd.openxmlformats-officedocument.wordprocessingml.document"){let e=await this.toBuffer();return new Blob([e],{type:t})}executeCommands(t){return new o(b(this._document,t))}_executeCommand(t){let e=new o(a$3(this._document,t));return e._pendingVariables={...this._pendingVariables},e}_getBodyText(t){let e=[];for(let n of t.content)n.type==="paragraph"?e.push(this._getParagraphText(n)):n.type==="table"&&e.push(this._getTableText(n));return e.join(`
2
+ `)}_getParagraphText(t){let e=[];for(let n of t.content)n.type==="run"?e.push(this._getRunText(n)):n.type==="hyperlink"&&e.push(this._getHyperlinkText(n));return e.join("")}_getRunText(t){return t.content.filter(e=>e.type==="text").map(e=>e.text).join("")}_getHyperlinkText(t){let e=[];for(let n of t.children)n.type==="run"&&e.push(this._getRunText(n));return e.join("")}_getTableText(t){let e=[];for(let n of t.rows)for(let r of n.cells)for(let a of r.content)a.type==="paragraph"&&e.push(this._getParagraphText(a));return e.join(" ")}_extractParagraphSegments(t,e){for(let n of t.content)if(n.type==="run"){let r=this._getRunText(n);r&&e.push({text:r,formatting:n.formatting});}else if(n.type==="hyperlink"){let r=n.href||"";for(let a of n.children)if(a.type==="run"){let i=this._getRunText(a);i&&e.push({text:i,formatting:a.formatting,isHyperlink:true,hyperlinkUrl:r});}}}_parseHeadingLevel(t){if(!t)return;let e=t.match(/heading\s*(\d)/i);if(e)return parseInt(e[1],10)}_hasImages(){let t=this._document.package.document;for(let e of t.content)if(e.type==="paragraph"){for(let n of e.content)if(n.type==="run"){for(let r of n.content)if(r.type==="drawing")return true}}return false}_hasHyperlinks(){let t=this._document.package.document;for(let e of t.content)if(e.type==="paragraph"){for(let n of e.content)if(n.type==="hyperlink")return true}return false}};async function Ct(o){return P.fromBuffer(o)}function kt(o){return P.fromDocument(o)}function M(o,t={}){let{outlineMaxChars:e=100,maxOutlineParagraphs:n=50}=t,r=o.package.document,a=r.content.filter(y=>y.type==="paragraph"),i=z(a,e,n),s=a$2(o),c=W(o),p=$(r),u=U(r),d=G(r),f=r.content.some(y=>y.type==="table"),x=K(r),l=N(r);return {paragraphCount:a.length,wordCount:u,characterCount:d,variables:s,variableCount:s.length,availableStyles:c,outline:i,sections:p,hasTables:f,hasImages:x,hasHyperlinks:l}}function At(o,t,e={}){let{contextChars:n=200,includeSuggestions:r=true}=e,i=o.package.document.content.filter(m=>m.type==="paragraph"),s=i[t.start.paragraphIndex];if(!s)throw new Error(`Paragraph not found at index ${t.start.paragraphIndex}`);let c=g(s),p="";if(t.start.paragraphIndex===t.end.paragraphIndex)p=c.slice(t.start.offset,t.end.offset);else {let m=[];for(let b=t.start.paragraphIndex;b<=t.end.paragraphIndex;b++){let H=i[b];if(!H)continue;let _=g(H);b===t.start.paragraphIndex?m.push(_.slice(t.start.offset)):b===t.end.paragraphIndex?m.push(_.slice(0,t.end.offset)):m.push(_);}p=m.join(`
3
3
  `);}let u=Y(i,t.start.paragraphIndex,t.start.offset,n),d=Z(i,t.end.paragraphIndex,t.end.offset,n),f=tt(s,t.start.offset),x=s.formatting||{},l={index:t.start.paragraphIndex,fullText:c,style:s.formatting?.styleId,wordCount:v(c)},y=false,A=et(s,t.start.offset),S=r?nt(p):[];return {selectedText:p,range:t,formatting:f,paragraphFormatting:x,textBefore:u,textAfter:d,paragraph:l,inTable:y,inHyperlink:A,suggestedActions:S}}function L(o){let t=M(o,{outlineMaxChars:50,maxOutlineParagraphs:10}),e=[`Document with ${t.paragraphCount} paragraphs, ${t.wordCount} words.`];t.hasTables&&e.push("Contains tables."),t.hasImages&&e.push("Contains images."),t.hasHyperlinks&&e.push("Contains hyperlinks."),t.variableCount>0&&e.push(`Has ${t.variableCount} template variables: ${t.variables.join(", ")}`);let n=t.outline.filter(r=>r.isHeading);if(n.length>0){e.push(`
4
4
  Headings:`);for(let r of n.slice(0,5)){let a=r.headingLevel||1;e.push(`${" ".repeat(a-1)}- ${r.preview}`);}n.length>5&&e.push(` ... and ${n.length-5} more headings`);}return e.join(" ")}function z(o,t,e){let n=[];for(let r=0;r<Math.min(o.length,e);r++){let a=o[r],i=g(a),s=a.formatting?.styleId;n.push({index:r,preview:i.slice(0,t),style:s,isHeading:Q(s),headingLevel:X(s),isListItem:!!a.listRendering,isEmpty:i.trim().length===0});}return n}function W(o){let t=o.package.styles;if(!t?.styles)return [];let e=[];for(let[n,r]of Object.entries(t.styles))if(typeof r=="object"&&r!==null){let a=r;e.push({id:n,name:a.name||n,type:a.type==="numbering"?"paragraph":a.type||"paragraph",builtIn:a.default});}return e}function $(o){return o.sections?o.sections.map((t,e)=>({index:e,paragraphCount:t.content?.length||0,pageSize:t.properties?.pageWidth&&t.properties?.pageHeight?{width:t.properties.pageWidth,height:t.properties.pageHeight}:void 0,isLandscape:t.properties?.orientation==="landscape",hasHeader:!!t.properties?.headerReferences?.length,hasFooter:!!t.properties?.footerReferences?.length})):[]}function U(o){let t=0;for(let e of o.content)if(e.type==="paragraph"){let n=g(e);t+=v(n);}else e.type==="table"&&(t+=q(e));return t}function v(o){return o.split(/\s+/).filter(e=>e.length>0).length}function G(o){let t=0;for(let e of o.content)if(e.type==="paragraph"){let n=g(e);t+=n.length;}else e.type==="table"&&(t+=J(e));return t}function q(o){let t=0;for(let e of o.rows)for(let n of e.cells)for(let r of n.content)if(r.type==="paragraph"){let a=g(r);t+=v(a);}return t}function J(o){let t=0;for(let e of o.rows)for(let n of e.cells)for(let r of n.content)if(r.type==="paragraph"){let a=g(r);t+=a.length;}return t}function g(o){let t=[];for(let e of o.content)e.type==="run"?t.push(T(e)):e.type==="hyperlink"&&t.push(F(e));return t.join("")}function T(o){return o.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function F(o){let t=[];for(let e of o.children)e.type==="run"&&t.push(T(e));return t.join("")}function K(o){for(let t of o.content)if(t.type==="paragraph"){for(let e of t.content)if(e.type==="run"){for(let n of e.content)if(n.type==="drawing")return true}}return false}function N(o){for(let t of o.content)if(t.type==="paragraph"){for(let e of t.content)if(e.type==="hyperlink")return true}return false}function Q(o){return o?o.toLowerCase().includes("heading"):false}function X(o){if(!o)return;let t=o.match(/heading\s*(\d)/i);if(t)return parseInt(t[1],10)}function Y(o,t,e,n){let r=[],a=0,i=o[t];if(i){let p=g(i).slice(0,e);r.unshift(p),a+=p.length;}for(let c=t-1;c>=0&&a<n;c--){let p=o[c];if(!p)continue;let u=g(p);r.unshift(u),a+=u.length;}let s=r.join(`
5
5
  `);return s.length>n?"..."+s.slice(-n):s}function Z(o,t,e,n){let r=[],a=0,i=o[t];if(i){let p=g(i).slice(e);r.push(p),a+=p.length;}for(let c=t+1;c<o.length&&a<n;c++){let p=o[c];if(!p)continue;let u=g(p);r.push(u),a+=u.length;}let s=r.join(`
@@ -1 +1 @@
1
- import {a}from'./chunk-QAJSNLJR.mjs';var e=a.getCommands();function g(t){return e.setAlignment(t)}var l=e.alignLeft(),u=e.alignCenter(),x=e.alignRight(),C=e.alignJustify();function f(t,n="auto"){return e.setLineSpacing(t,n)}var S=e.singleSpacing(),L=e.oneAndHalfSpacing(),b=e.doubleSpacing();function y(t=720){return e.increaseIndent(t)}function v(t=720){return e.decreaseIndent(t)}function A(t){return e.setIndentLeft(t)}function I(t){return e.setIndentRight(t)}function h(t,n){return e.setIndentFirstLine(t,n)}var R=e.toggleBulletList(),T=e.toggleNumberedList(),P=e.increaseListLevel(),B=e.decreaseListLevel(),k=e.removeList();function E(t){return e.setSpaceBefore(t)}function F(t){return e.setSpaceAfter(t)}function H(t,n){return e.applyStyle(t,n)}var J=e.clearStyle();function N(t){return e.insertSectionBreak(t)}var O=e.removeSectionBreak();function M(t,n="left",r="none"){return e.addTabStop(t,n,r)}function j(t){return e.removeTabStop(t)}var q=e.setRtl(),w=e.setLtr(),z=e.generateTOC();export{j as A,q as B,w as C,z as D,g as a,l as b,u as c,x as d,C as e,f,S as g,L as h,b as i,y as j,v as k,A as l,I as m,h as n,R as o,T as p,P as q,B as r,k as s,E as t,F as u,H as v,J as w,N as x,O as y,M as z};
1
+ import {a}from'./chunk-SNTAAXXA.mjs';var e=a.getCommands();function g(t){return e.setAlignment(t)}var l=e.alignLeft(),u=e.alignCenter(),x=e.alignRight(),C=e.alignJustify();function f(t,n="auto"){return e.setLineSpacing(t,n)}var S=e.singleSpacing(),L=e.oneAndHalfSpacing(),b=e.doubleSpacing();function y(t=720){return e.increaseIndent(t)}function v(t=720){return e.decreaseIndent(t)}function A(t){return e.setIndentLeft(t)}function I(t){return e.setIndentRight(t)}function h(t,n){return e.setIndentFirstLine(t,n)}var R=e.toggleBulletList(),T=e.toggleNumberedList(),P=e.increaseListLevel(),B=e.decreaseListLevel(),k=e.removeList();function E(t){return e.setSpaceBefore(t)}function F(t){return e.setSpaceAfter(t)}function H(t,n){return e.applyStyle(t,n)}var J=e.clearStyle();function N(t){return e.insertSectionBreak(t)}var O=e.removeSectionBreak();function M(t,n="left",r="none"){return e.addTabStop(t,n,r)}function j(t){return e.removeTabStop(t)}var q=e.setRtl(),w=e.setLtr(),z=e.generateTOC();export{j as A,q as B,w as C,z as D,g as a,l as b,u as c,x as d,C as e,f,S as g,L as h,b as i,y as j,v as k,A as l,I as m,h as n,R as o,T as p,P as q,B as r,k as s,E as t,F as u,H as v,J as w,N as x,O as y,M as z};
@@ -0,0 +1,15 @@
1
+ 'use strict';var l=new Set,m=new Map,C=new Set,c=new Map,b=new Set,p=new Set,u=false,h=true,F=new Set,w=new Set;function y(e,t){let n=e instanceof Error?e.message:String(e),r=new Error(`[font] ${t}: ${n}`,{cause:e});if(p.size>0)for(let o of p)try{o(r);}catch(i){console.error("Font error subscriber threw:",i);}else console.warn(r.message);}function v(e,t="normal"){return `${e.trim()}|${t}`}function x(e){return F.has(e)?false:w.has(e)?true:R(e)?(w.add(e),queueMicrotask(()=>A([e])),true):false}function B(e){let t=`${e}|`,n=[];for(let[r,o]of c)r.startsWith(t)&&n.push(o);return n}function k(e,t){C.add(e),l.add(t),A([t]);}function L(e,t=[400,700],n=["normal","italic"]){let r=encodeURIComponent(e),o=[];for(let a of n){let s=a==="italic"?1:0;for(let f of t)o.push(`${s},${f}`);}o.sort();let i=o.join(";");return `https://fonts.googleapis.com/css2?family=${r}:ital,wght@${i}&display=swap`}async function P(e,t){if(typeof document>"u")return false;let n=e.trim();if(l.has(n))return true;let r=m.get(n);if(r)return r;if(!t&&x(n))return true;let o=B(n);if(!h&&o.length===0)return false;let i=(async()=>{u=true;try{if(o.length>0&&(await Promise.all(o),l.has(n)||!t&&x(n)))return !0;if(!h)return !1;let a=L(n,t?.weights,t?.styles),s=document.createElement("link");return s.rel="stylesheet",s.href=a,await new Promise(d=>{let $=setTimeout(()=>d(!1),5e3);s.onload=()=>{clearTimeout($),d(!0);},s.onerror=()=>{clearTimeout($),d(!1);},document.head.appendChild(s);})?(await S(n,3e3),l.add(n),A([n]),!0):!1}catch(a){return y(a,`failed to load "${n}"`),false}finally{m.delete(n),m.size===0&&c.size===0&&(u=false);}})();return m.set(n,i),i}async function T(e,t){let n=e.filter(r=>!l.has(r.trim()));n.length!==0&&await Promise.all(n.map(r=>P(r,t)));}function G(e){let t=e.trim();return l.has(t)||w.has(t)}function j(e){h=e;}function _(){return h}function V(){return u}function J(){return Array.from(new Set([...l,...w]))}function K(e){return b.add(e),()=>{b.delete(e);}}function A(e){for(let t of b)try{t(e);}catch(n){y(n,"load callback threw");}}function X(e){return p.add(e),()=>{p.delete(e);}}async function S(e,t){if("fonts"in document)try{let n=`400 16px "${e}"`;return await Promise.race([document.fonts.load(n),new Promise(r=>setTimeout(r,t))]),document.fonts.check(n)}catch{}return await new Promise(n=>setTimeout(n,100)),true}var g,E=new Map,z="abcdefghijklmnopqrstuvwxyz0123456789";function M(){return g===void 0&&(g=document.createElement("canvas").getContext("2d"),g&&(g.textBaseline="top")),g}function R(e,t="sans-serif"){if(typeof document>"u")return false;let n=M();if(!n)return false;let r=i=>(n.font=i,n.measureText(z).width),o=i=>{let a=E.get(i);return a===void 0&&(a=r(`72px ${i}`),E.set(i,a)),r(`72px "${e}", ${i}`)!==a};return o(t)||o(t==="sans-serif"?"serif":"sans-serif")}async function H(e,t,n){if(typeof document>"u")return false;let r=e.trim(),o=v(r,n?.weight);if(F.add(r),C.has(o))return true;let i=c.get(o);if(i)return i;let a=(async()=>{u=true;try{let s=new Blob([t],{type:"font/ttf"}),f=URL.createObjectURL(s),d=document.createElement("style");return d.textContent=`
2
+ @font-face {
3
+ font-family: "${r}";
4
+ src: url(${f}) format('truetype');
5
+ font-weight: ${n?.weight??"normal"};
6
+ font-display: swap;
7
+ }
8
+ `,document.head.appendChild(d),await S(r,3e3),k(o,r),!0}catch(s){return y(s,`failed to load "${r}" from buffer`),false}finally{c.delete(o),m.size===0&&c.size===0&&(u=false);}})();return c.set(o,a),a}function U(e){let t=e.split("?")[0].split("#")[0].toLowerCase();return t.endsWith(".woff2")?"woff2":t.endsWith(".woff")?"woff":t.endsWith(".otf")?"opentype":"truetype"}async function D(e,t,n){if(typeof document>"u")return false;if(/[<>]/.test(t))return y(new Error(`invalid src URL for "${e}": contains '<' or '>'`),"rejected src"),false;let r=e.trim(),o=v(r,n?.weight);if(F.add(r),C.has(o))return true;let i=c.get(o);if(i)return i;let a=(async()=>{u=true;try{let s=document.createElement("style");return s.textContent=`
9
+ @font-face {
10
+ font-family: "${r}";
11
+ src: url(${JSON.stringify(t)}) format('${U(t)}');
12
+ font-weight: ${n?.weight??"normal"};
13
+ font-display: swap;
14
+ }
15
+ `,document.head.appendChild(s),await S(r,3e3),k(o,r),!0}catch(s){return y(s,`failed to load "${r}" from ${t}`),false}finally{c.delete(o),m.size===0&&c.size===0&&(u=false);}})();return c.set(o,a),a}async function Q(e){!e||e.length===0||await Promise.all(e.map(t=>D(t.family,t.src,{weight:t.weight})));}var I={Calibri:"Carlito",Cambria:"Caladea",Arial:"Arimo","Times New Roman":"Tinos","Courier New":"Cousine",Garamond:"EB Garamond","Book Antiqua":"EB Garamond",Georgia:"Tinos",Verdana:"Open Sans",Tahoma:"Open Sans","Trebuchet MS":"Source Sans Pro","Century Gothic":"Poppins","Franklin Gothic":"Libre Franklin",Palatino:"EB Garamond","Palatino Linotype":"EB Garamond","Lucida Sans":"Open Sans","Segoe UI":"Open Sans",Impact:"Anton","Comic Sans MS":"Comic Neue",Consolas:"Inconsolata","Lucida Console":"Inconsolata",Monaco:"Fira Code"};function O(e){let t=e.trim();return I[t]||t}async function W(e){let t=e.trim(),n=O(t);if(n!==t){if(!F.has(t)&&G(t)||x(t))return true;let r=await P(n);return r&&l.add(t),r}return P(n)}async function N(e){let t=[...new Set(e.map(n=>n.trim()))];await Promise.all(t.map(n=>W(n)));}async function Y(){await T(["Carlito","Caladea","Arimo","Tinos","Cousine","EB Garamond"]);}function q(e){let t=new Set,n=e;if(!n?.package)return t;let r=n.package?.document?.content;if(Array.isArray(r)){for(let i of r)if(i?.type==="paragraph"&&Array.isArray(i.content)){for(let a of i.content)if(a?.type==="run"&&a.formatting?.fontFamily){let{ascii:s,hAnsi:f}=a.formatting.fontFamily;s&&t.add(s),f&&f!==s&&t.add(f);}}}let o=n.package?.styles?.styles;if(Array.isArray(o)){for(let i of o)if(i?.runProperties?.fontFamily){let{ascii:a,hAnsi:s}=i.runProperties.fontFamily;a&&t.add(a),s&&s!==a&&t.add(s);}}return t}async function Z(e){let t=q(e);t.size!==0&&await N(Array.from(t));}async function te(e){if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array){let t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(e),t}if(e instanceof Blob)return e.arrayBuffer();throw new TypeError(`Unsupported DocxInput type: ${typeof e}`)}exports.a=P;exports.b=T;exports.c=G;exports.d=j;exports.e=_;exports.f=V;exports.g=J;exports.h=K;exports.i=X;exports.j=R;exports.k=H;exports.l=D;exports.m=Q;exports.n=I;exports.o=O;exports.p=W;exports.q=N;exports.r=Y;exports.s=q;exports.t=Z;exports.u=te;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkBTSL4AYY_js=require('./chunk-BTSL4AYY.js'),chunkZETEPB7I_js=require('./chunk-ZETEPB7I.js'),chunkTAQTZAVZ_js=require('./chunk-TAQTZAVZ.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkAA6D2C6R_js=require('./chunk-AA6D2C6R.js'),chunkUXPY65AC_js=require('./chunk-UXPY65AC.js'),chunkBHBOAP6Z_js=require('./chunk-BHBOAP6Z.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function tt(e,t,n,o,r){let a=new Map,i=[];for(let m of e.fragments){let s=o(m);if(s.length===0||!("height"in m))continue;let b=m.y-e.margins.top,g=b+m.height;s.forEach((u,E)=>{let y=`${E}:${u.id}`,p=a.get(y);p?(p.top=Math.min(p.top,b),p.bottom=Math.max(p.bottom,g)):(a.set(y,{group:u,depth:E,top:b,bottom:g}),i.push(y));});}let d=2,l=[];for(let m of i){let{group:s,depth:b,top:g,bottom:u}=a.get(m),E=b*(d+1),y=r.createElement("div");y.className="layout-block-sdt-box",y.dataset.sdtGroupId=s.id,y.dataset.sdtType=s.sdtType,y.dataset.sdtDepth=String(b+1),s.tag!=null&&(y.dataset.sdtTag=s.tag),s.alias!=null&&(y.dataset.sdtAlias=s.alias),s.lock!=null&&(y.dataset.sdtLock=s.lock),y.style.position="absolute",y.style.left=`${E}px`,y.style.top=`${g-d}px`,y.style.width=`${n-E*2}px`,y.style.height=`${u-g+d*2}px`;let p=s.alias||s.tag||s.sdtType;if(p){let F=r.createElement("span");F.className="layout-block-sdt-label",F.textContent=p,y.appendChild(F);}let w=wt(s.sdtType);if(w&&s.tag!=null&&!s.bound&&s.lock!=="contentLocked"&&s.lock!=="sdtContentLocked"){let F=r.createElement("button");F.type="button",F.className="layout-sdt-widget",F.dataset.sdtWidget=w,F.dataset.sdtTag=s.tag,F.dataset.sdtGroupId=s.id,F.setAttribute("aria-label",`${w} control ${s.alias||s.tag}`),w==="dropdown"?F.setAttribute("aria-haspopup","listbox"):w==="date"&&F.setAttribute("aria-haspopup","dialog"),F.textContent=w==="dropdown"?"\u25BE":w==="date"?"\u{1F4C5}":s.checked?"\u2612":"\u2610",y.appendChild(F);}if(s.repeatingItem&&!s.bound){let F=r.createElement("div");F.className="layout-sdt-repeat-controls";for(let c of ["add","remove"]){let x=r.createElement("button");x.type="button",x.className="layout-sdt-repeat-btn",x.dataset.sdtRepeat=c,x.dataset.sdtGroupId=s.id,x.setAttribute("aria-label",c==="add"?"Add item":"Remove item"),x.textContent=c==="add"?"\uFF0B":"\u2715",F.appendChild(x);}y.appendChild(F);}t.appendChild(y),l.push(y);}Tt(t,l);}function wt(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function Tt(e,t){if(t.length===0||typeof e.addEventListener!="function")return;let n=(d,l)=>{for(let m of t){let s=m.getBoundingClientRect(),b=d>=s.left&&d<=s.right&&l>=s.top&&l<=s.bottom;b!==m.classList.contains("is-active")&&m.classList.toggle("is-active",b);}},o=typeof requestAnimationFrame=="function"?requestAnimationFrame:d=>d(),r=false,a=0,i=0;e.addEventListener("mousemove",d=>{a=d.clientX,i=d.clientY,!r&&(r=true,o(()=>{r=false,n(a,i);}));}),e.addEventListener("mouseleave",()=>{for(let d of t)d.classList.remove("is-active");});}function Tn(e,t,n){let o=new Set,r=e.content.size,a=i=>{let d=e.resolve(Math.max(0,Math.min(i,r)));for(let l=1;l<=d.depth;l++)d.node(l).type.name==="blockSdt"&&o.add(`sdt@${d.before(l)}`);};return a(t),n!==t&&a(n),o}function In(e,t){let n=e.querySelectorAll(".layout-block-sdt-box");for(let o of n){let r=o.dataset.sdtGroupId,a=r!=null&&t.has(r);a!==o.classList.contains("is-focused")&&o.classList.toggle("is-focused",a);}}var U={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function It(e){return e.kind==="paragraph"}function Ft(e){return e.kind==="table"}function Ct(e){return e.kind==="image"}function fe(e){e.style.position="absolute",e.style.overflow="hidden";}function Rt(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.paragraph}`,fe(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 Et(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.table}`,fe(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 Lt(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.image}`,fe(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 Ie(e,t,n={}){let o=n.document??document;if(It(e))return Rt(e,t,o);if(Ft(e))return Et(e,t,o);if(Ct(e))return Lt(e,t,o);let r=o.createElement("div");r.className=U.fragment,fe(r);let a=e;return a.blockId!==void 0&&(r.dataset.blockId=String(a.blockId)),a.kind&&(r.dataset.kind=a.kind),r}var P={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 A(e){return e.kind==="text"}function N(e){return e.kind==="tab"}function j(e){return e.kind==="image"}function W(e){return e.kind==="lineBreak"}function X(e){return e.kind==="field"}var nt={image:"layout-image",imageAnchored:"layout-image-anchored"};function oe(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function re(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,a=t.cropLeft??0;(n||o||r||a)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${a*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function Z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=nt.image,e.isAnchored&&i.classList.add(nt.imageAnchored),i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",e.zIndex!==void 0&&(i.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(i.style.zIndex="-1"),i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let d=a.createElement("img");if(d.src=t.src,d.alt=t.alt??"",d.style.width="100%",d.style.height="100%",d.style.objectFit="contain",d.style.display="block",t.transform&&(d.style.transform=t.transform),d.draggable=false,t.hlinkHref){let l=a.createElement("a");l.href=t.hlinkHref,l.target="_blank",l.rel="noopener noreferrer",l.style.display="block",l.style.width="100%",l.style.height="100%",l.appendChild(d),i.appendChild(l);}else i.appendChild(d);return i}function vt(e,t,n){if(t.fontFamily&&(e.style.fontFamily=chunkN3Y5BUKV_js.a(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",a=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=a,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=a;}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(a=>!n||!n.has(a));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 z(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function Pt(e,t){let n=t.inlineSdtWidget;n&&(e.classList.add("layout-inline-sdt-widget"),e.dataset.sdtWidget=n.kind,e.dataset.sdtGroupId=n.groupId,e.dataset.sdtPos=String(n.pos),n.tag&&(e.dataset.sdtTag=n.tag),n.alias&&(e.dataset.sdtAlias=n.alias),typeof n.checked=="boolean"&&(e.dataset.sdtChecked=String(n.checked),e.setAttribute("aria-checked",String(n.checked))),e.setAttribute("role","checkbox"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",n.alias||n.tag||"Checkbox content control"));}function ie(e,t,n){let o=t.createElement("span");if(o.className=`${P.run} ${P.text}`,vt(o,e,n),z(o,e.pmStart,e.pmEnd),Pt(o,e),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 Bt=1e3;function ge(e,t,n,o){let r=t.createElement("span");r.className=`${P.run} ${P.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,z(r,e.pmStart,e.pmEnd);let a=o&&o!=="none"?Mt(o):null;if(a){r.style.position="relative",r.textContent="\u200B";let i=t.createElement("span");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i.textContent=a.repeat(Bt),r.appendChild(i);}else r.textContent="\xA0";return r}function Mt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function it(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function at(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)),a=Math.abs(Math.cos(o));return {w:e*a+t*r,h:e*r+t*a}}function ot(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function $t(e,t){let n=t.createElement("img");n.className=`${P.run} ${P.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"),oe(e)&&re(n,e);let o=it(e.transform);if(o!==0){let r=at(e.width,e.height,o),a=t.createElement("span");return a.style.display="inline-block",a.style.position="relative",a.style.width=`${r.w}px`,a.style.height=`${r.h}px`,a.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`,ot(a,e),z(a,e.pmStart,e.pmEnd),a.appendChild(n),a}return n.style.display="inline-block",n.style.verticalAlign="middle",e.width>0&&e.height>0&&(n.style.height="auto",n.style.aspectRatio=`${e.width} / ${e.height}`,n.style.maxWidth="100%"),ot(n,e),z(n,e.pmStart,e.pmEnd),n}function rt(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"),oe(e)&&re(o,e);let r=it(e.transform);if(r!==0){let a=at(e.width,e.height,r);n.style.height=`${a.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 z(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function me(e,t){let n;return chunkZETEPB7I_js.c(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?n=rt(e,t):n=$t(e,t),Ht(n,e),n}function Ht(e,t){if(t.isInsertion)e.style.outline="2px solid #2e7d32",e.style.outlineOffset="1px",e.classList.add("docx-insertion");else if(t.isDeletion)e.style.outline="2px solid #c62828",e.style.outlineOffset="1px",e.style.opacity="0.6",e.classList.add("docx-deletion");else return;t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId));}function Fe(e,t){let n=t.createElement("br");return n.className=`${P.run} ${P.lineBreak}`,z(n,e.pmStart,e.pmEnd),n}function ue(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 ie(r,t,n?.resolvedCommentIds)}function Ce(e,t,n){if(A(e))return ie(e,t,n?.resolvedCommentIds);if(N(e))return ge(e,t,48,void 0);if(j(e))return me(e,t);if(W(e))return Fe(e,t);if(X(e)&&n)return ue(e,t,n);let o=t.createElement("span");return o.className=P.run,o}function dt(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let a=o[r];if(a)if(A(a)){let i=r===t.fromRun?t.fromChar:0,d=r===t.toRun?t.toChar:a.text.length;if(i>0||d<a.text.length){let l=a.text.slice(i,d);n.push({...a,text:l,pmStart:a.pmStart!==void 0?a.pmStart+i:void 0,pmEnd:a.pmStart!==void 0?a.pmStart+d:void 0});}else n.push(a);}else n.push(a);}return n}function st(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function lt(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function At(e){return {val:e.val,pos:e.pos,leader:e.leader}}function Ot(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let a=e[r];if(A(a))o+=a.text;else if(X(a))a.fieldType==="PAGE"&&n?o+=String(n.pageNumber):a.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=a.fallback??"";else if(N(a)||W(a))break}return o}var zt=.5;function Dt(e,t,n,o){let r=0;for(let a=t+1;a<e.length;a++){let i=e[a];if(N(i)||W(i))break;if(A(i))r+=n(i.text||"",i.fontSize,i.fontFamily,i.bold,i.italic);else if(X(i)){let d;i.fieldType==="PAGE"&&o?d=String(o.pageNumber):i.fieldType==="NUMPAGES"&&o?d=String(o.totalPages):d=i.fallback??"",r+=n(d,i.fontSize,i.fontFamily,i.bold,i.italic);}else j(i)&&!chunkZETEPB7I_js.c(i)&&(r+=i.width||0);}return r}function Nt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,a="Calibri",i=false,d=false)=>{if(!n)return o.length*7;let l=chunkN3Y5BUKV_js.a(a).cssFallback,m=r*96/72,s=[];return d&&s.push("italic"),i&&s.push("bold"),s.push(`${m}px`,l),n.font=s.join(" "),n.measureText(o).width}}function he(e,t,n,o,r){let a=o.createElement("div");a.className=P.line,a.style.height=`${t.lineHeight}px`,a.style.lineHeight=`${t.lineHeight}px`;let i=dt(e,t);if(i.length===1&&j(i[0])){let w=i[0].position?.horizontal?.align??n;a.style.display="flex",a.style.alignItems="center",a.style.justifyContent=st(w),a.dataset.flexLine="true";}else i.some(j)&&(a.style.display="flex",a.style.alignItems="baseline",a.style.justifyContent=st(n),a.style.lineHeight="normal",a.dataset.flexLine="true");if(i.length===0){let y=o.createElement("span");return y.className=`${P.run} layout-empty-run`,y.innerHTML="&nbsp;",a.appendChild(y),a}let d=n==="justify",l=false;d&&r&&(l=!r.isLastLine||r.paragraphEndsWithLineBreak,l&&(a.style.textAlign="justify",a.style.textAlignLast="justify",a.style.width=`${r.availableWidth}px`)),a.style.whiteSpace="pre";let m=i.some(y=>A(y)&&y.highlight);a.style.overflow=m?"hidden":"visible";let s=i.some(N),b,g=Nt(o);if(s){let y=r?.tabStops?.map(At),p=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;b={explicitStops:y,leftIndent:p};}let u=0,E=r?.leftIndentPx??0;if(r?.isFirstLine){let y=r?.firstLineIndentPx??0;u=E+y;}else u=E;for(let y=0;y<i.length;y++){let p=i[y];if(N(p)&&b){let w=Dt(i,y,g,r?.context),F=Ot(i,y,r?.context),c=F.indexOf("."),x=c>=0?g(F.slice(0,c)):0,T=chunkTAQTZAVZ_js.v(u,b,{followingWidth:w,decimalPrefixWidth:x}),S=r?.lineRightEdgePx,k=w,f=false;for(let I=y+1;I<i.length&&!W(i[I]);I++)if(N(i[I])){f=true;break}if(S!==void 0&&T.alignment==="end"&&!f&&u+T.width+k>=S-zt){a.style.display="flex",a.style.alignItems="baseline",a.style.whiteSpace="nowrap",a.style.textIndent="0",a.dataset.flexLine="true",r?.isFirstLine&&r.firstLineIndentPx&&r.firstLineIndentPx<0&&a.firstElementChild instanceof HTMLElement&&(a.firstElementChild.style.marginLeft=`${r.firstLineIndentPx}px`);let I=ge(p,o,0,T.leader);I.style.flex="1 1 0",I.style.minWidth="0",I.style.width="auto",a.appendChild(I);for(let v=y+1;v<i.length;v++){let L=i[v];if(N(L)||W(L))break;if(A(L))a.appendChild(ie(L,o,r?.context?.resolvedCommentIds));else if(X(L)&&r?.context)a.appendChild(ue(L,o,r.context));else if(j(L)){if(chunkZETEPB7I_js.c(L))continue;let B=lt(L);r?.renderedInlineImageKeys?.has(B)||(r?.renderedInlineImageKeys?.add(B),a.appendChild(me(L,o)));}else a.appendChild(Ce(L,o,r?.context));}break}let R=T.width;S!==void 0&&u+R+k>S&&(R=Math.max(1,S-u-k));let C=ge(p,o,R,T.leader);a.appendChild(C),u+=R;}else if(A(p)){let w=ie(p,o,r?.context?.resolvedCommentIds);if(p.highlight){let T=(p.fontSize?p.fontSize*96/72:14.67)*1.2,S=Math.max(0,t.lineHeight-T);if(S>0){let k=S/2;w.style.paddingTop=`${k}px`,w.style.paddingBottom=`${k}px`;}}a.appendChild(w);let F=p.fontSize||11,c=p.fontFamily||"Calibri";u+=g(p.text,F,c,p.bold,p.italic);}else if(j(p)){if(chunkZETEPB7I_js.c(p))continue;let w=lt(p);if(r?.renderedInlineImageKeys?.has(w))continue;r?.renderedInlineImageKeys?.add(w);let F=me(p,o);a.appendChild(F),p.displayMode!=="block"&&p.wrapType!=="topAndBottom"&&(u+=p.width);}else if(W(p)){let w=Fe(p,o);a.appendChild(w);}else if(X(p)&&r?.context){let w=ue(p,o,r.context);a.appendChild(w);let F=p.fallback??"";p.fieldType==="PAGE"?F=String(r.context.pageNumber):p.fieldType==="NUMPAGES"&&(F=String(r.context.totalPages));let c=p.fontSize||11,x=p.fontFamily||"Calibri";u+=g(F,c,x,p.bold,p.italic);}else {let w=Ce(p,o,r?.context);a.appendChild(w);}}if(!a.querySelector("span[data-pm-start][data-pm-end]")){let y=i.find(W);if(y?.pmStart!==void 0){let p=o.createElement("span");p.className=P.run,z(p,y.pmStart,y.pmStart),p.textContent="\u200B",a.insertBefore(p,a.firstChild);}}return a}function ae(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function ct(e,t){return !e&&!t||!e||!t?false:ae(e.top,t.top)&&ae(e.bottom,t.bottom)&&ae(e.left,t.left)&&ae(e.right,t.right)&&ae(e.between,t.between)}var Wt=/[\u0590-\u085F\u08A0-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,_t=/[\u0041-\u005A\u0061-\u007A\u00C0-\u02B8\u0370-\u0589\u10A0-\u10FF\u1E00-\u1FFF]/;function Gt(e){let t=(e.runs??[]).filter(A);if(!t.some(n=>n.rtl))return false;for(let n of t)for(let o of n.text){if(Wt.test(o))return true;if(_t.test(o))return false}return true}function D(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=P.fragment,i.style.position=o.positioning==="absolute"?"absolute":"relative",i.dataset.blockId=String(e.blockId),i.dataset.fromLine=String(e.fromLine),i.dataset.toLine=String(e.toLine),z(i,e.pmStart,e.pmEnd),e.continuesFromPrev&&(i.dataset.continuesFromPrev="true"),e.continuesOnNext&&(i.dataset.continuesOnNext="true");let d=t.attrs?.pPrIns,l=t.attrs?.pPrDel;if(d||l){let S=d??l;i.classList.add("layout-revision-pmark"),i.classList.add(d?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionId=String(S.revisionId),i.dataset.revisionAuthor=S.author,S.date&&(i.dataset.revisionDate=S.date);}let m=n.lines.slice(e.fromLine,e.toLine),s=t.attrs?.alignment;t.attrs?.styleId&&(i.dataset.styleId=t.attrs.styleId);let b=!!t.attrs?.bidi||Gt(t);b&&(i.dir="rtl"),s?s==="center"?i.style.textAlign="center":s==="right"?i.style.textAlign="right":s==="left"?i.style.textAlign="left":i.style.textAlign=b?"right":"left":b&&(i.style.textAlign="right");let g=t.attrs?.indent,u=0,E=0;g&&(b?(g.left&&g.left>0&&(E=g.left),g.right&&g.right>0&&(u=g.right)):(g.left&&g.left>0&&(u=g.left),g.right&&g.right>0&&(E=g.right)));let y=t.attrs?.borders;if(y){let S=L=>{switch(L){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"}};i.style.boxSizing="border-box";let k=L=>`${L.width}px ${S(L.style)} ${L.color}`,f=ct(r.prevBorders,y),h=ct(y,r.nextBorders),R=f?y.between:y.top,C=h?void 0:y.bottom,I=a.createElement("div");if(I.className="layout-paragraph-border",I.style.position="absolute",I.style.pointerEvents="none",I.style.boxSizing="border-box",I.style.left=`${u-(y.left?.space??0)}px`,I.style.right=`${E-(y.right?.space??0)}px`,I.style.top=`${-(R?.space??0)}px`,I.style.bottom=`${-(C?.space??0)}px`,R&&(I.style.borderTop=k(R)),C&&(I.style.borderBottom=k(C)),y.left&&(I.style.borderLeft=k(y.left)),y.right&&(I.style.borderRight=k(y.right)),(R||C||y.left||y.right)&&i.appendChild(I),y.bar){let L=a.createElement("div");L.style.position="absolute",L.style.left="-8px",L.style.top="0",L.style.bottom="0",L.style.borderLeft=k(y.bar),i.style.position="relative",i.appendChild(L);}}t.attrs?.shading&&(i.style.backgroundColor=t.attrs.shading);let p=e.width-u-E,F=t.runs[t.runs.length-1]?.kind==="lineBreak",c=n.lines.length,x=0;g?.hanging&&g.hanging>0?x=-g.hanging:g?.firstLine&&g.firstLine>0&&(x=g.firstLine);let T=r.renderedInlineImageKeys??new Set;for(let S=0;S<m.length;S++){let k=m[S],f=e.fromLine+S,h=f===c-1,R=f===0&&!e.continuesFromPrev,C=k.leftOffset??0,I=k.rightOffset??0,v=p;if(R){let M=g?.hanging&&g.hanging>0,$=g?.firstLine&&g.firstLine>0;M&&g?.hanging?v=p+g.hanging:$&&g?.firstLine&&(v=p-g.firstLine);}if(Yt(k,t)){let M=a.createElement("div");M.className=`${P.line} layout-line-split`,M.style.position="relative",M.style.height=`${k.lineHeight}px`,M.style.lineHeight=`${k.lineHeight}px`;for(let $ of k.segments){let te={fromRun:$.fromRun,fromChar:$.fromChar,toRun:$.toRun,toChar:$.toChar,width:$.width,ascent:k.ascent,descent:k.descent,lineHeight:k.lineHeight},Y=he(t,te,s,a,{availableWidth:$.availableWidth,isLastLine:h,isFirstLine:R,paragraphEndsWithLineBreak:F,tabStops:t.attrs?.tabs,leftIndentPx:u,firstLineIndentPx:R?x:0,context:o,renderedInlineImageKeys:T});Y.className+=" layout-line-segment",Y.style.position="absolute",Y.style.left=`${$.leftOffset}px`,Y.style.top="0",Y.style.width=`${$.availableWidth}px`,M.appendChild(Y);}i.appendChild(M);continue}let L=he(t,k,s,a,{availableWidth:v-C-I,isLastLine:h,isFirstLine:R,paragraphEndsWithLineBreak:F,tabStops:t.attrs?.tabs,leftIndentPx:u,firstLineIndentPx:R?x:0,context:o,renderedInlineImageKeys:T,lineRightEdgePx:e.width-E-I});if(C>0||I>0){C>0&&(L.style.marginLeft=`${C}px`),I>0&&(L.style.marginRight=`${I}px`);let M=v-C-I;M>0&&(L.style.width=`${M}px`);}k.floatSkipBefore&&k.floatSkipBefore>0&&(L.style.marginTop=`${k.floatSkipBefore}px`);let B=g?.hanging&&g.hanging>0,Oe=g?.firstLine&&g.firstLine>0,St=L.dataset.flexLine==="true";if(R?u>0&&B?(L.style.paddingLeft=`${u}px`,St||(L.style.textIndent=`-${g.hanging}px`)):u>0&&Oe?(L.style.paddingLeft=`${u}px`,L.style.textIndent=`${g.firstLine}px`):u>0?L.style.paddingLeft=`${u}px`:Oe&&(L.style.textIndent=`${g.firstLine}px`):u>0?L.style.paddingLeft=`${u}px`:B&&(L.style.paddingLeft=`${g.hanging}px`),E>0&&(L.style.paddingRight=`${E}px`),R&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let M=g?.hanging??0,$=g?.firstLine??0,te=M>0?u-M:u+$;L.style.paddingLeft=`${Math.max(0,te)}px`,L.style.textIndent="0";let{fontFamily:Y,fontSize:kt}=chunkTAQTZAVZ_js.w(t),ze=jt(t.attrs.listMarker,chunkTAQTZAVZ_js.x(t),a,Y,kt,t.attrs.listMarkerRevision);te<0&&u>0&&(ze.style.marginLeft=`${te}px`),L.insertBefore(ze,L.firstChild);}i.appendChild(L);}if((d||l)&&!e.continuesOnNext){let S=i.lastElementChild;if(S){let k=a.createElement("span");k.className="layout-revision-pmark-glyph",d?k.classList.add("layout-revision-ins"):k.classList.add("layout-revision-del"),k.textContent="\xB6",k.setAttribute("aria-hidden","true"),S.appendChild(k);}}return i}function Yt(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function jt(e,t,n,o,r,a){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=chunkN3Y5BUKV_js.a(o).cssFallback,i.style.fontSize=`${r*96/72}px`,i.style.textAlign="left",i.style.boxSizing="border-box",i.style.display="inline-block",i.style.minWidth=`${t}px`,i.textContent=e,a==="ins"?i.style.color="#2e7d32":a==="del"&&(i.style.color="#c62828",i.style.textDecoration="line-through"),i}function q(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 a=t.createElement("div");a.className=n.itemClass,a.style.position="absolute",a.style.pointerEvents="auto",a.style.top=`${r.y}px`,a.style.left=`${r.x}px`,r.pmStart!==void 0&&(a.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(a.dataset.pmEnd=String(r.pmEnd));let i=t.createElement("img");i.src=r.src,i.style.width=`${r.width}px`,i.style.height=`${r.height}px`,i.style.display="block",i.style.maxWidth="none",i.style.maxHeight="none",r.alt&&(i.alt=r.alt),r.transform&&(i.style.transform=r.transform,i.style.transformOrigin="center center"),oe(r)&&re(i,r),a.appendChild(i),o.appendChild(a);}return o}function pt(e,t,n){let o=[],r=0;for(let a=0;a<e.blocks.length;a++){let i=e.blocks[a];if(i?.kind!=="paragraph"){let m=t.blocks[a];m&&m.kind==="table"&&(r+=m.totalHeight??0);continue}let d=i;for(let m of d.runs){if(m.kind!=="image")continue;let s=m;if(!chunkZETEPB7I_js.c(s))continue;let b=s.position,g=s.distTop??0,u=s.distBottom??0,E=s.distLeft??12,y=s.distRight??12,p="left",w=0;if(b?.horizontal){let c=b.horizontal;c.align==="right"?(p="right",w=n-s.width):c.align==="left"?w=0:c.align==="center"?w=(n-s.width)/2:c.posOffset!==void 0&&(w=chunk4Q2IP5FW_js.e(c.posOffset),p=w>n/2?"right":"left");}else s.cssFloat==="right"&&(p="right",w=n-s.width);let F=r;if(b?.vertical){let c=b.vertical;c.posOffset!==void 0?F=r+chunk4Q2IP5FW_js.e(c.posOffset):c.align==="top"&&(F=0);}w=Math.max(0,Math.min(w,n-s.width)),o.push({src:s.src,width:s.width,height:s.height,alt:s.alt,transform:s.transform,x:w,y:F,side:p,distTop:g,distBottom:u,distLeft:E,distRight:y,wrapText:chunkZETEPB7I_js.e(s.cssFloat),wrapType:s.wrapType,pmStart:s.pmStart,pmEnd:s.pmEnd});}let l=t.blocks[a];l&&l.kind==="paragraph"&&(r+=l.totalHeight);}return o}function Re(e){return !!e&&e.style!=="none"&&e.style!=="nil"&&e.width!==0}function J(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!Re(n))e.style[o]="none";else {let r=n.width??1,a=n.color??"#000000",i=n.style??"solid";e.style[o]=`${r}px ${i} ${a}`;}}function Ee(e){let t=[],n=0;for(let o of e)t.push(Math.round(n)),n+=o?.height??0;return t.push(Math.round(n)),t}function ft(e,t){let n=e.createElement("div");n.className="layout-table-cut-border",n.style.position="absolute",n.style.left=`${t.x}px`,n.style.width=`${t.width}px`;let o=t.border.width??1;return n.style.top=`${t.edge==="bottom"?t.topY-o:t.topY}px`,J(n,"top",t.border),n}function Le(e,t,n,o){e.classList.add(`ep-revision-${t}`,`ep-revision-${n}`),e.dataset.revisionId=String(o.revisionId),e.dataset.revisionAuthor=o.author,o.date&&(e.dataset.revisionDate=o.date);}var _={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 Kt(e,t,n,o){let r=o.createElement("div");r.className=_.cellContent,r.style.position="relative";let a=e.padding?.left??7,i=e.padding?.right??7,d=Math.max(0,t.width-a-i);r.style.width=`${d}px`;let l=pt(e,t,d),m;if(l.length>0){m=l.filter(chunkZETEPB7I_js.a).map(E=>{let y=E.x+E.width+E.distRight,p=E.y-E.distTop,w=E.y+E.height+E.distBottom,F=0,c=0,x=E.wrapText??"bothSides";return x==="right"?F=y:x==="left"?c=d-(E.x-E.distLeft):E.side==="left"?F=y:c=d-(E.x-E.distLeft),{leftMargin:F,rightMargin:c,topY:p,bottomY:w}});let u=l.filter(chunkZETEPB7I_js.b);u.length>0&&r.appendChild(q(u,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let s=0,b=0;for(let u=0;u<e.blocks.length;u++){let E=e.blocks[u],y=t.blocks[u];if(E?.kind==="paragraph"&&y?.kind==="paragraph"){let p=E,w=y,F=p.attrs?.spacing,c=Math.max(b,F?.before??0);s+=c,m&&m.length>0&&(w=chunkTAQTZAVZ_js.z(p,d,{floatingZones:m,paragraphYOffset:s}));let x={blockId:p.id,width:d,height:w.totalHeight,fromLine:0,toLine:w.lines.length,pmStart:p.pmStart,pmEnd:p.pmEnd},T={...n,insideTableCell:true},S=D(x,p,w,T,{document:o});S.style.position="relative",c>0&&(S.style.marginTop=`${c}px`),r.appendChild(S),s+=w.totalHeight,b=F?.after??0;}else if(E?.kind==="table"&&y?.kind==="table"){let p=E,w=y,F=b,c=Vt(p,w,n,o);c.style.position="relative",F>0&&(c.style.marginTop=`${F}px`),r.appendChild(c),s+=F+(y.totalHeight??0),b=0;}}b>0&&(r.style.paddingBottom=`${b}px`);let g=l.filter(u=>!chunkZETEPB7I_js.b(u));return g.length>0&&r.appendChild(q(g,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Vt(e,t,n,o){let r=o.createElement("div");r.className=`${_.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 a=e.rows[0],i=a?.trackedIns,d=a?.trackedDel,l=(g,u)=>!!g&&!!u&&(g.author??"")===(u.author??"")&&(g.date??null)===(u.date??null),m=e.rows.length>0&&e.rows.every(g=>i?l(g.trackedIns,i):d?l(g.trackedDel,d):false);if(m){let g=i??d,u=i?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${u}`),r.dataset.revisionId=String(g.revisionId),r.dataset.revisionAuthor=g.author,g.date&&(r.dataset.revisionDate=g.date);}let s=Ee(t.rows),b=new Map;for(let g=0;g<e.rows.length;g++){let u=e.rows[g],E=t.rows[g];if(!u||!E)continue;let y=ve(u,E,g,s[g]??0,t.columnWidths,e.rows.length,n,o,b,s,void 0,m);r.appendChild(y);}return r.style.height=`${s[e.rows.length]??0}px`,r}function gt(e,t,n,o,r,a,i,d){let l=i.createElement("div");l.className=_.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==d&&Le(l,"cell",e.trackedMarker.kind,e.trackedMarker.info),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 m=e.padding?.top??1,s=e.padding?.right??7,b=e.padding?.bottom??1,g=e.padding?.left??7;l.style.padding=`${m}px ${s}px ${b}px ${g}px`,e.borders&&(r.isFirstRow&&J(l,"top",e.borders.top),J(l,"right",e.borders.right),J(l,"bottom",e.borders.bottom),r.isFirstCol&&J(l,"left",e.borders.left)),e.background&&(l.style.backgroundColor=e.background),e.noWrap&&(l.style.whiteSpace="nowrap");let u=(t.height??0)>=o-.5;if(e.verticalAlign&&!u)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 E=Kt(e,t,a,i);if(l.appendChild(E),e.blocks.length>0){let y=e.blocks[0],p=e.blocks[e.blocks.length-1];y&&"pmStart"in y&&y.pmStart!==void 0&&(l.dataset.pmStart=String(y.pmStart)),p&&"pmEnd"in p&&p.pmEnd!==void 0&&(l.dataset.pmEnd=String(p.pmEnd));}return l}function Ut(e,t){return chunkTAQTZAVZ_js.b(e).map(n=>{let o=0;for(let r=0;r<n.columnIndex;r++)o+=t[r]??0;return {rowIndex:n.rowIndex,cellIndex:n.cellIndex,columnIndex:n.columnIndex,x:o,colSpan:n.colSpan,rowSpan:n.rowSpan,cell:e.rows[n.rowIndex].cells[n.cellIndex]}})}function ve(e,t,n,o,r,a,i,d,l,m,s,b){let g=d.createElement("div");g.className=_.row,b||(e.trackedDel?Le(g,"row","del",e.trackedDel):e.trackedIns&&Le(g,"row","ins",e.trackedIns));let u=m&&m.length>n+1?(m[n+1]??0)-(m[n]??0):t.height;g.style.position="absolute",g.style.left="0",g.style.top=`${o}px`,g.style.width="100%",g.style.height=`${u}px`,g.dataset.rowIndex=String(n);let E=new Set;if(l){for(let[,w]of l)if(w.startRow<n&&w.startRow+w.rowSpan>n)for(let F=0;F<w.colSpan;F++)E.add(w.columnIndex+F);}let y=0,p=0;for(;E.has(p);)y+=r[p]??0,p++;for(let w=0;w<e.cells.length;w++){let F=e.cells[w],c=t.cells[w];if(!F||!c)continue;let x=F.colSpan??1,T=F.rowSpan??1,S=u;if(T>1&&m){S=0;for(let I=n;I<n+T&&I<m.length-1;I++)S+=(m[I+1]??0)-(m[I]??0);S===0&&(S=t.height*T);}let k=n===0||s===true,h=p===0;p+x>=r.length;let C=gt(F,c,y,S,{isFirstRow:k,isFirstCol:h},i,d,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(C.dataset.cellIndex=String(w),C.dataset.columnIndex=String(p),T>1&&(C.dataset.rowSpan=String(T)),g.appendChild(C),T>1&&l){let I=`${n}-${p}`;l.set(I,{cell:F,cellMeasure:c,columnIndex:p,startRow:n,rowSpan:T,colSpan:x,x:y,totalHeight:S});}for(let I=0;I<x&&p+I<r.length;I++)y+=r[p+I]??0;for(p+=x;E.has(p);)y+=r[p]??0,p++;}return g}function Q(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=_.table,i.style.position=o.positioning==="flow"?"relative":"absolute",i.style.width=`${e.width}px`,i.style.overflow="hidden",i.dataset.blockId=String(e.blockId),i.dataset.fromRow=String(e.fromRow),i.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let d=t.rows[0],l=d?.trackedIns,m=d?.trackedDel,s=(f,h)=>!!f&&!!h&&(f.author??"")===(h.author??"")&&(f.date??null)===(h.date??null),b=t.rows.length>0&&t.rows.every(f=>l?s(f.trackedIns,l):m?s(f.trackedDel,m):false);if(b){let f=l??m,h=l?"ins":"del";i.classList.add("ep-revision-table",`ep-revision-${h}`),i.dataset.revisionId=String(f.revisionId),i.dataset.revisionAuthor=f.author,f.date&&(i.dataset.revisionDate=f.date),i.style.overflowX="visible",i.style.overflowY="hidden";}let g=0;for(let f=0;f<n.columnWidths.length-1;f++){g+=n.columnWidths[f]??0;let h=a.createElement("div");h.className=_.resizeHandle,h.style.position="absolute",h.style.left=`${g-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(f),h.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),i.appendChild(h);}let u=Ee(n.rows),E=Ut(t,n.columnWidths),y=e.headerRowCount??0,p=0;if(y>0&&e.continuesFromPrev){let f=new Map;for(let h=0;h<y;h++){let R=t.rows[h],C=n.rows[h];if(!R||!C)continue;let I=ve(R,C,h,p,n.columnWidths,t.rows.length,o,a,f,u,h===0,b);I.dataset.repeatedHeader="true",i.appendChild(I),p+=C.height;}}let w=(u[e.fromRow]??0)+(e.topClip??0),F=f=>p+(f-w),c=e.bottomClip!==void 0?Math.round(e.height):F(u[e.toRow]??0);i.style.height=`${c}px`;let x=new Map,T=y>0&&e.continuesFromPrev;for(let f of E){if(f.rowSpan<=1||f.rowIndex>=e.fromRow||f.rowIndex+f.rowSpan<=e.fromRow||T&&f.rowIndex<y)continue;let h=n.rows[f.rowIndex]?.cells?.[f.cellIndex];if(!h)continue;let R=0;for(let B=f.rowIndex;B<f.rowIndex+f.rowSpan&&B<u.length-1;B++)R+=(u[B+1]??0)-(u[B]??0);x.set(`${f.rowIndex}-${f.columnIndex}`,{cell:f.cell,cellMeasure:h,columnIndex:f.columnIndex,startRow:f.rowIndex,rowSpan:f.rowSpan,colSpan:f.colSpan,x:f.x,totalHeight:R});f.rowIndex+f.rowSpan>=t.rows.length;let I=f.columnIndex===0;f.columnIndex+f.colSpan>=n.columnWidths.length;let L=gt(f.cell,h,f.x,R,{isFirstRow:false,isFirstCol:I},o,a);L.style.top=`${F(u[f.rowIndex]??0)}px`,L.dataset.columnIndex=String(f.columnIndex),L.dataset.vmergeContinuation="true",delete L.dataset.pmStart,delete L.dataset.pmEnd,i.appendChild(L);}for(let f=e.fromRow;f<e.toRow;f++){let h=t.rows[f],R=n.rows[f];if(!h||!R)continue;let C=y>0&&e.continuesFromPrev?false:e.continuesFromPrev&&f===e.fromRow&&!e.topClip,I=ve(h,R,f,F(u[f]??0),n.columnWidths,t.rows.length,o,a,x,u,C,b);i.appendChild(I);}let S=(f,h,R,C)=>{for(let I of E){if(I.rowIndex>f||I.rowIndex+I.rowSpan-1<f||C&&!(h==="bottom"?I.rowIndex+I.rowSpan-1>f:I.rowIndex<f))continue;let v=I.cell.borders?.[h];if(!Re(v))continue;let L=0;for(let B=0;B<I.colSpan;B++)L+=n.columnWidths[I.columnIndex+B]??0;i.appendChild(ft(a,{x:I.x,topY:R,width:L,edge:h,border:v}));}};e.topClip?S(e.fromRow,"top",p,false):e.continuesFromPrev&&S(e.fromRow,"top",p,true),e.bottomClip!==void 0?S(e.toRow-1,"bottom",c,false):e.continuesOnNext&&S(e.toRow-1,"bottom",c,true);for(let f=e.fromRow;f<e.toRow-1;f++){let h=F(u[f+1]??0);if(h<=p||h>=e.height)continue;let R=a.createElement("div");R.className=_.rowResizeHandle,R.style.position="absolute",R.style.left="0",R.style.top=`${h-3}px`,R.style.width="100%",R.style.height="6px",R.style.cursor="row-resize",R.style.zIndex="10",R.dataset.rowIndex=String(f),R.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(R.dataset.tablePmStart=String(e.pmStart)),i.appendChild(R);}let k=e.toRow===t.rows.length&&e.bottomClip===void 0;if(k){let f=a.createElement("div");f.className=_.tableEdgeHandleBottom,f.style.position="absolute",f.style.left="0",f.style.top=`${F(u[e.toRow]??0)-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)),i.appendChild(f);}if(k){let f=n.columnWidths.reduce((R,C)=>R+C,0),h=a.createElement("div");h.className=_.tableEdgeHandleRight,h.style.position="absolute",h.style.left=`${f-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(n.columnWidths.length-1),h.dataset.tableBlockId=String(e.blockId),h.dataset.isEdge="right",e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),i.appendChild(h);}return i}var Xt={textBox:"layout-textbox"};function ee(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");if(i.className=Xt.textBox,i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.style.boxSizing="border-box",qt(i,e),t.fillColor&&(i.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let s=t.outlineStyle||"solid",b=t.outlineColor||"#000000";i.style.border=`${t.outlineWidth}px ${s} ${b}`;}let d=t.margins??chunkDROCYKAR_js.a;i.style.padding=`${d.top}px ${d.right}px ${d.bottom}px ${d.left}px`,i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let l=e.width-d.left-d.right,m=0;for(let s=0;s<t.content.length;s++){let b=t.content[s],g=n.innerMeasures[s];if(!g)continue;let u={blockId:b.id,width:l,height:g.totalHeight,pmStart:b.pmStart,pmEnd:b.pmEnd,fromLine:0,toLine:g.lines.length},E=D(u,b,g,{...o,positioning:"flow"},{document:a});i.appendChild(E),m+=g.totalHeight;}return i}function qt(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}var Zt="layout-watermark-layer";function Jt(e,t){let n=Math.max(e.trim().length,1),o=t/(n*.62);return Math.max(24,Math.min(o,180))}function Qt(e,t,n){let o=n.createElement("div");o.style.position="absolute",o.style.top="50%",o.style.left="50%",o.style.whiteSpace="nowrap",o.style.fontWeight="bold",o.style.color=e.color,o.style.fontFamily=chunkN3Y5BUKV_js.a(e.font).cssFallback,o.style.userSelect="none";let r=t.size.w-t.margins.left-t.margins.right,a=e.layout==="diagonal"?r*1.3:r,i=e.fontSize!==void 0?e.fontSize*96/72:Jt(e.text,a);o.style.fontSize=`${i}px`,o.style.lineHeight="1",o.style.opacity=e.semitransparent?"0.5":"0.85";let d=e.layout==="diagonal"?-45:0;return o.style.transform=`translate(-50%, -50%) rotate(${d}deg)`,o.style.transformOrigin="center center",o.textContent=e.text,o}function en(e,t,n){if(!e.dataUrl)return null;let o=n.createElement("img");o.src=e.dataUrl,o.alt="",o.style.position="absolute",o.style.top="50%",o.style.left="50%",o.style.transform="translate(-50%, -50%)";let r=t.size.w-t.margins.left-t.margins.right,a=e.widthEmu!==void 0?e.widthEmu/(914400/96):r*.75;return o.style.width=`${a*(e.scale||1)}px`,o.style.height="auto",e.washout&&(o.style.opacity="0.5",o.style.filter="brightness(1.4) contrast(0.4)"),o}function mt(e,t,n=document){let o=e.kind==="text"?Qt(e,t,n):en(e,t,n);if(!o)return null;let r=n.createElement("div");return r.className=Zt,r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.inset="0",r.style.overflow="hidden",r.style.pointerEvents="none",r.style.zIndex="0",r.appendChild(o),r}function ut(e){return e?.align??e?.alignment}function tn(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=ut(n),r=n.posOffset!==void 0?chunk4Q2IP5FW_js.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.height-t.flowTop;if(o==="center")return (t.pageHeight-e.height)/2-t.flowTop}if(n.relativeTo==="margin"){let a=t.margins.top,i=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return a+r-t.flowTop;if(o==="top")return a-t.flowTop;if(o==="bottom")return a+i-e.height-t.flowTop;if(o==="center")return a+(i-e.height)/2-t.flowTop}return r!==void 0?e.paragraphY+r:e.paragraphY}function Pe(e,t,n){if(!t)return "0";let o=ut(t);if(t.relativeTo==="page"){if(t.posOffset!==void 0)return `${chunk4Q2IP5FW_js.e(t.posOffset)-n.flowLeft}px`;if(o==="right")return `${n.pageWidth-e-n.flowLeft}px`;if(o==="center")return `${(n.pageWidth-e)/2-n.flowLeft}px`;if(o==="left")return `${-n.flowLeft}px`}return t.posOffset!==void 0?`${chunk4Q2IP5FW_js.e(t.posOffset)}px`:o==="right"?`${n.contentWidth-e}px`:o==="center"?`${(n.contentWidth-e)/2}px`:"0"}function nn(e,t,n){e.style.left=Pe(t.width,t.position.horizontal,n);}function ht(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 Be(e,t,n,o){let r=n.document??document,a=r.createElement("div");a.style.position="relative";let i=t.contentWidth??600,d=[],l=0;for(let m=0;m<e.blocks.length;m++){let s=e.blocks[m],b=e.measures[m];if(!(!s||!b))if(s.kind==="paragraph"){if(b.kind!=="paragraph")continue;let g=s,u=b,E=g.attrs?.spacing?.before??0,y=l,p=[];for(let x of g.runs)if(x.kind==="image"&&"position"in x&&x.position){let T=x;d.push({src:T.src,width:T.width,height:T.height,alt:T.alt,paragraphY:y,position:T.position});}else p.push(x);let w={...g,runs:p},F={blockId:g.id,width:i,height:u.totalHeight,fromLine:0,toLine:u.lines.length,pmStart:g.pmStart,pmEnd:g.pmEnd},c=D(F,w,u,{...t,positioning:"absolute"},{document:r});c.style.top=`${l+E}px`,c.style.left="0",c.style.width=`${i}px`,a.appendChild(c),l+=u.totalHeight;}else if(s.kind==="table"){if(b.kind!=="table")continue;let g={blockId:s.id,width:b.totalWidth,height:b.totalHeight,fromRow:0,toRow:b.rows.length,pmStart:s.pmStart,pmEnd:s.pmEnd},u=Q(g,s,b,{...t,positioning:"absolute"},{document:r});if(s.floating){let{left:E,top:y}=ht(s.floating,o);u.style.top=`${y}px`,u.style.left=`${E}px`,a.appendChild(u);}else u.style.top=`${l}px`,u.style.left="0",a.appendChild(u),l+=b.totalHeight;}else if(s.kind==="image"){if(b.kind!=="image")continue;let g={blockId:s.id,width:b.width,height:b.height,pmStart:s.pmStart,pmEnd:s.pmEnd},u=Z(g,s,b,{...t},{document:r});u.style.top=`${l}px`,u.style.left="0",a.appendChild(u),l+=b.height;}else if(s.kind==="textBox"){if(b.kind!=="textBox")continue;let g={blockId:s.id,width:b.width,height:b.height,pmStart:s.pmStart,pmEnd:s.pmEnd},u=ee(g,s,b,{...t,positioning:"absolute"},{document:r});u.style.top=`${l}px`,u.style.left=Pe(b.width,s.position?.horizontal,o),a.appendChild(u),s.displayMode!=="float"&&(l+=b.height);}else s.kind==="sectionBreak"||s.kind==="pageBreak"||s.kind==="columnBreak"||chunkDROCYKAR_js.c(s,"renderHeaderFooterContent");}for(let m of d){let s=r.createElement("img");s.src=m.src,s.width=m.width,s.height=m.height,m.alt&&(s.alt=m.alt),s.style.position="absolute",s.style.display="block",s.style.width=`${m.width}px`,s.style.height=`${m.height}px`,s.style.maxWidth="none",s.style.maxHeight="none",nn(s,m,o),s.style.top=`${tn(m,o)}px`,a.appendChild(s);}return a}var be=12,Me=6;function on(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}function rn(e,t){for(let[n,o]of t)if((e.get(n)??0)<o)return false;return true}function an(e,t){let n=new Map(e);for(let[o,r]of t)n.set(o,Math.max(n.get(o)??0,r));return n}var $e=8;function Io(e){let t=[],n=o=>{for(let r of o)if(r.kind==="paragraph")for(let a of r.runs)a.kind==="text"&&a.footnoteRefId!=null&&t.push({footnoteId:a.footnoteRefId,pmPos:a.pmStart??0});else if(r.kind==="table")for(let a of r.rows)for(let i of a.cells)n(i.blocks);else r.kind==="textBox"&&n(r.content);};return n(e),t}function ye(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let a=false;for(let i of r.fragments){let d=i.pmStart??-1,l=i.pmEnd??-1;if(d>=0&&l>=0&&o.pmPos>=d&&o.pmPos<l){let m=n.get(r.number)??[];m.includes(o.footnoteId)||m.push(o.footnoteId),n.set(r.number,m),a=true;break}}if(a)break}return n}function sn(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:$e,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let a=r;return {...a,runs:a.runs.map(i=>(i.kind==="text"||i.kind==="tab")&&i.fontSize==null?{...i,fontSize:$e}:i)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:$e,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function ln(e,t,n,o){let r=chunkUXPY65AC_js.c(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),a=chunkBTSL4AYY_js.c(r,{theme:o.theme??void 0}),i=sn(a,t),d=o.measureBlocks(i,n),l=d.reduce((m,s)=>s.kind==="paragraph"||s.kind==="table"?m+s.totalHeight:s.kind==="image"||s.kind==="textBox"?m+s.height:m,0);return {id:e.id,displayNumber:t,blocks:i,measures:d,height:l}}function Fo(e,t,n,o){let r=new Map,a=new Map;for(let l of e)(l.noteType==="normal"||l.noteType==null)&&a.set(l.id,l);let i=1,d=new Set;for(let l of t){if(d.has(l.footnoteId))continue;d.add(l.footnoteId);let m=a.get(l.footnoteId);m&&(r.set(l.footnoteId,ln(m,i,n,o)),i++);}return r}function He(e,t){let n=new Map;for(let[o,r]of e){let a=0;for(let i of r){let d=t.get(i);d&&(a+=d.height);}a>0&&(a+=be,n.set(o,a));}return n}function Co(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:a,initialLayout:i}=e,d=ye(i.pages,r),l=He(d,a);if(l.size===0)return {layout:i,pageFootnoteMap:d,converged:true};let m=i,s=false;for(let b=0;b<Me;b++){m=chunkTAQTZAVZ_js.U(t,n,{...o,footnoteReservedHeights:l});let g=ye(m.pages,r),u=He(g,a);if(d=g,on(l,u)){l=u,s=true;break}l=u;}if(!s){let b=l,g=false;for(let u=0;u<Me;u++){m=chunkTAQTZAVZ_js.U(t,n,{...o,footnoteReservedHeights:b}),d=ye(m.pages,r);let E=He(d,a);if(rn(b,E)){g=true;break}b=an(b,E);}g||(m=chunkTAQTZAVZ_js.U(t,n,{...o,footnoteReservedHeights:b}),d=ye(m.pages,r)),console.warn(`[docx-editor] footnote layout did not stabilize within ${Me} passes; settling with conservative page reservations. If footnotes appear misplaced, please file a bug with the document.`);}for(let[b,g]of d){let u=m.pages.find(E=>E.number===b);u&&(u.footnoteIds=g);}return {layout:m,pageFootnoteMap:d,converged:s}}function Ro(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let a of n.package.footnotes)a.noteType&&a.noteType!=="normal"||r.set(a.id,a);for(let[a,i]of e){let d=[];for(let l of i){let m=r.get(l);if(!m)continue;let s=t.get(l),b=s?.displayNumber??0;d.push({displayNumber:String(b),text:chunkAA6D2C6R_js.x(m),content:s});}d.length>0&&o.set(a,d);}return o}function dn(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 a=0;for(let i=0;i<e.blocks.length;i++){let d=e.blocks[i],l=e.measures[i];if(!(!d||!l)){if(d.kind==="paragraph"&&l.kind==="paragraph"){let m=d.attrs?.spacing?.before??0,s={blockId:d.id,width:t,height:l.totalHeight,pmStart:d.pmStart,pmEnd:d.pmEnd,fromLine:0,toLine:l.lines.length},b=D(s,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});b.style.top=`${a+m}px`,b.style.left="0",b.style.width=`${t}px`,b.style.height=`${l.totalHeight}px`,r.appendChild(b),a+=l.totalHeight;}else if(d.kind==="table"&&l.kind==="table"){let m={blockId:d.id,width:l.totalWidth,height:l.totalHeight,pmStart:d.pmStart,pmEnd:d.pmEnd,fromRow:0,toRow:l.rows.length},s=Q(m,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.totalHeight;}else if(d.kind==="image"&&l.kind==="image"){let m={blockId:d.id,width:l.width,height:l.height,pmStart:d.pmStart,pmEnd:d.pmEnd},s=Z(m,d,l,{...n},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.height;}else if(d.kind==="textBox"&&l.kind==="textBox"){let m={blockId:d.id,width:l.width,height:l.height,pmStart:d.pmStart,pmEnd:d.pmEnd},s=ee(m,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.height;}}}return r}function cn(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 yt(e){let t=be;for(let n of e)n.content&&(t+=n.content.height);return t}function bt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let a=o.createElement("div"),i=.5,d=(be-i)/2;a.style.width="33%",a.style.height=`${i}px`,a.style.backgroundColor="#000",a.style.marginBottom=`${d}px`,a.style.marginTop=`${d}px`,r.appendChild(a);for(let l of e)r.appendChild(l.content?dn(l.content,t,n,o):cn(l,o));return r}function Ae(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 a=n.footnotesByPage.get(e.number);a&&a.length>0&&(r.footnoteArea=a);}return {context:o,pageOptions:r}}function xt(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 pn(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 fn(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 xe=2,gn=8;function mn(e,t,n={}){let o=e.length,r=n.pageGap??24,a=t,i=a.__pageRenderState,d=pn(n),l=o>=gn;if(i&&i.optionsHash===d&&l){let p=i.pageStates,w=i.pageDataMap,F=a.__pageObserver,c=[];for(let S of e)c.push(xt(S));let x=i.totalPages!==o,T=Math.min(p.length,e.length);for(let S=0;S<T;S++){let k=p[S],f=c[S];if(k.fingerprint===f&&!x){let C=w.get(k.element);C&&(C.page=e[S]);continue}let h=k.element,R=w.get(h);R&&(R.page=e[S],R.rendered&&un(h,w,o,n)),k.fingerprint=f,le(h,e[S].size.w,e[S].size.h,n),h.dataset.pageNumber=String(e[S].number);}if(e.length>p.length){let S=n.document??document;for(let k=p.length;k<e.length;k++){let f=e[k],h=S.createElement("div");h.className=n.pageClassName??G.page,h.dataset.pageNumber=String(f.number),h.dataset.pageIndex=String(k),le(h,f.size.w,f.size.h,n),t.appendChild(h),p.push({element:h,fingerprint:c[k]}),w.set(h,{page:f,index:k,rendered:false}),F&&F.observe(h);}}if(e.length<p.length){for(let S=p.length-1;S>=e.length;S--){let k=p[S].element;F&&F.unobserve(k),w.delete(k),t.removeChild(k);}p.length=e.length;}for(let S=0;S<p.length;S++){let k=w.get(p[S].element);k&&(k.index=S);}return i.totalPages=o,i.currentOptions=n,"incremental"}let s=a.__pageObserver;s&&(s.disconnect(),a.__pageObserver=void 0),t.innerHTML="",a.__pageRenderState=void 0,fn(t,r);let b=[],g=[];for(let p=0;p<e.length;p++){let w=e[p];if(g.push(xt(w)),l){let c=(n.document??document).createElement("div");c.className=n.pageClassName??G.page,c.dataset.pageNumber=String(w.number),c.dataset.pageIndex=String(p),le(c,w.size.w,w.size.h,n),t.appendChild(c),b.push(c);}else {let{context:F,pageOptions:c}=Ae(w,o,n),x=Se(w,F,c);t.appendChild(x),b.push(x);}}if(!l)return "full";let u=new Map;for(let p=0;p<e.length;p++)u.set(b[p],{page:e[p],index:p,rendered:false});let E=new IntersectionObserver(p=>{let w=a.__pageRenderState;if(!w)return;let{currentOptions:F,totalPages:c,pageDataMap:x}=w;for(let f of p){let h=f.target,R=x.get(h);if(R&&f.isIntersecting){se(h,x,c,F);for(let C=-xe;C<=xe;C++){let I=R.index+C;I>=0&&I<w.pageStates.length&&I!==R.index&&se(w.pageStates[I].element,x,c,F);}}}let T=window.innerHeight,S=T*3,k=new Set;for(let[f,h]of x){if(!h.rendered)continue;let R=f.getBoundingClientRect();R.bottom>-S&&R.top<T+S&&k.add(h.index);}for(let[f,h]of x){if(!h.rendered)continue;let R=false;for(let C of k)if(Math.abs(h.index-C)<=xe+1){R=true;break}!R&&k.size>0&&hn(f,x);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let p of b)E.observe(p);a.__pageObserver=E,a.__pageRenderState={pageStates:b.map((p,w)=>({element:p,fingerprint:g[w]})),totalPages:o,optionsHash:d,pageDataMap:u,currentOptions:n};let y=Math.min(e.length,xe+3);for(let p=0;p<y;p++)se(b[p],u,o,n);return "full"}function se(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:a,pageOptions:i}=Ae(r.page,n,o),d=Se(r.page,a,i);for(;d.firstChild;)e.appendChild(d.firstChild);r.rendered=true;}function un(e,t,n,o){let r=t.get(e);if(!r)return;let{context:a,pageOptions:i}=Ae(r.page,n,o),l=Se(r.page,a,i).querySelector(`.${G.content}`),m=e.querySelector(`.${G.content}`);l&&m?e.replaceChild(l,m):(e.innerHTML="",r.rendered=false,se(e,t,n,o));}function hn(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}function yn(e){let n=e.__pageRenderState;if(!n)return 0;let{pageStates:o,totalPages:r,currentOptions:a,pageDataMap:i}=n,d=0;for(let{element:l}of o){let m=i.get(l);!m||m.rendered||(se(l,i,r,a),d++);}return d}var G={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function le(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=chunkN3Y5BUKV_js.a("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 bn(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function ke(e){return e?.space!==void 0?chunk4Q2IP5FW_js.i(e.space):0}function we(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=chunkBHBOAP6Z_js.c(t,n,o);for(let[l,m]of Object.entries(r))e.style[l]=String(m);let a=`border${n}Style`,i=`border${n}Width`;if(e.style[a]==="double"){let l=parseFloat(e.style[i]);(!Number.isFinite(l)||l<3)&&(e.style[i]="3px");}}function xn(e,t,n){let o=t.pageBorders;if(!o||!bn(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(b=>b&&b.style!=="none"&&b.style!=="nil"))return null;let a=o.offsetFrom??"text",i=ke(o.top),d=ke(o.right),l=ke(o.bottom),m=ke(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",a==="page"?(s.style.top=`${i}px`,s.style.right=`${d}px`,s.style.bottom=`${l}px`,s.style.left=`${m}px`):(s.style.top=`${Math.max(0,e.margins.top-i)}px`,s.style.right=`${Math.max(0,e.margins.right-d)}px`,s.style.bottom=`${Math.max(0,e.margins.bottom-l)}px`,s.style.left=`${Math.max(0,e.margins.left-m)}px`),we(s,o.top,"Top",t.theme),we(s,o.bottom,"Bottom",t.theme),we(s,o.left,"Left",t.theme),we(s,o.right,"Right",t.theme),s}function Sn(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 kn(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`;let o=t.y-n.top;e.style.top=`${t.kind==="table"?Math.round(o):o}px`,e.style.width=`${t.width}px`,"height"in t&&t.kind!=="table"&&(e.style.height=`${t.height}px`);}function wn(e,t,n,o){let r=[];for(let a of e.runs){if(a.kind!=="image")continue;let i=a;if(!chunkZETEPB7I_js.c(i))continue;let d=i.distTop??0,l=i.distBottom??0,m=i.distLeft??12,s=i.distRight??12,{x:b,y:g,side:u}=chunkZETEPB7I_js.g(i,t,n,o);r.push({src:i.src,width:i.width,height:i.height,alt:i.alt,transform:i.transform,side:u,x:b,y:g,distTop:d,distBottom:l,distLeft:m,distRight:s,pmStart:i.pmStart,pmEnd:i.pmEnd,wrapText:chunkZETEPB7I_js.e(i.cssFloat),wrapType:i.wrapType,cropTop:i.cropTop,cropRight:i.cropRight,cropBottom:i.cropBottom,cropLeft:i.cropLeft,opacity:i.opacity});}return r}function Se(e,t,n={}){let o=n.document??document,r=o.createElement("div");if(r.className=n.pageClassName??G.page,r.dataset.pageNumber=String(e.number),le(r,e.size.w,e.size.h,n),n.watermark){let c=mt(n.watermark,e,o);c&&r.appendChild(c);}let a=xn(e,n,o);a&&n.pageBorders?.zOrder==="back"&&r.appendChild(a);let i=o.createElement("div");i.className=G.content,Sn(i,e);let d=chunkZETEPB7I_js.f(e),l=d.contentWidth,m=[],s=[];for(let c of e.fragments)if(c.kind==="paragraph"&&n.blockLookup){let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind==="paragraph"){let T=x.block,S=c.y-e.margins.top,k=wn(T,S,l,d);m.push(...k);}}for(let c of m)chunkZETEPB7I_js.a(c)&&s.push({side:c.side,x:c.x,y:c.y,width:c.width,height:c.height,distTop:c.distTop,distBottom:c.distBottom,distLeft:c.distLeft,distRight:c.distRight,wrapText:c.wrapText,wrapType:c.wrapType});if(n.blockLookup)for(let c of e.fragments){if(c.kind!=="table")continue;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind!=="table")continue;let S=x.block.floating;if(!S)continue;let k=c.x-e.margins.left,f=c.y-e.margins.top,h=S.topFromText??0,R=S.bottomFromText??0,C=S.leftFromText??12,I=S.rightFromText??12,v=k<l/2?"left":"right";s.push({side:v,x:k,y:f,width:c.width,height:c.height,distTop:h,distBottom:R,distLeft:C,distRight:I});}if(n.blockLookup)for(let c of e.fragments){if(c.kind!=="textBox")continue;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind!=="textBox")continue;let T=x.block;if(!chunkTAQTZAVZ_js.I(T))continue;let S=c.y-e.margins.top,k=chunkZETEPB7I_js.g({width:c.width,height:c.height,position:T.position,cssFloat:T.cssFloat},S,l,d);c.x=e.margins.left+k.x,c.y=e.margins.top+k.y,!(!chunkTAQTZAVZ_js.J(T)&&!chunkTAQTZAVZ_js.K(T))&&s.push({side:k.side,x:k.x,y:k.y,width:c.width,height:c.height,distTop:T.distTop??0,distBottom:T.distBottom??0,distLeft:T.distLeft??12,distRight:T.distRight??12,wrapText:T.wrapText,wrapType:T.wrapType});}let b=s.length>0?chunkTAQTZAVZ_js.t(s,l):[],g=m.filter(chunkZETEPB7I_js.b),u=m.filter(c=>!chunkZETEPB7I_js.b(c));if(g.length>0){let c=q(g,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});i.appendChild(c);}let E=c=>{if(c.kind!=="paragraph"||!n.blockLookup||!c.blockId)return;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind==="paragraph")return x.block.attrs?.borders},y,p=new Map,w=c=>!n.blockLookup||!c.blockId?[]:n.blockLookup.get(String(c.blockId))?.block.sdtGroups??[],F=(c,x)=>{if(x.length===0)return;let T=x[x.length-1];c.classList.add("layout-block-sdt"),c.dataset.sdtGroupId=T.id,c.dataset.sdtType=T.sdtType,c.dataset.sdtDepth=String(x.length),T.tag!=null&&(c.dataset.sdtTag=T.tag),T.alias!=null&&(c.dataset.sdtAlias=T.alias),T.lock!=null&&(c.dataset.sdtLock=T.lock);};for(let c=0;c<e.fragments.length;c++){let x=e.fragments[c],T,S={...t,section:"body",contentWidth:l},k=x.y-e.margins.top;if(n.blockLookup&&x.blockId){let f=n.blockLookup.get(String(x.blockId));if(x.kind==="paragraph"&&f?.block.kind==="paragraph"&&f?.measure.kind==="paragraph"){let h=f.block,R=c+1<e.fragments.length?E(e.fragments[c+1]):void 0,C=String(x.blockId),I=p.get(C);I||(I=new Set,p.set(C,I));let v=f.measure;b.length>0&&(v=chunkTAQTZAVZ_js.z(h,l,{floatingZones:b,paragraphYOffset:k})),T=D(x,h,v,S,{document:o,prevBorders:y,nextBorders:R,renderedInlineImageKeys:I}),y=h.attrs?.borders;}else x.kind==="table"&&f?.block.kind==="table"&&f?.measure.kind==="table"?(T=Q(x,f.block,f.measure,S,{document:o}),y=void 0):x.kind==="image"&&f?.block.kind==="image"&&f?.measure.kind==="image"?(T=Z(x,f.block,f.measure,S,{document:o}),y=void 0):x.kind==="textBox"&&f?.block.kind==="textBox"&&f?.measure.kind==="textBox"?(T=ee(x,f.block,f.measure,S,{document:o}),y=void 0):(T=Ie(x,S,{document:o}),y=void 0);}else T=Ie(x,S,{document:o}),y=void 0;kn(T,x,{left:e.margins.left,top:e.margins.top}),F(T,w(x)),i.appendChild(T);}if(tt(e,i,l,w,o),u.length>0){let c=q(u,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});i.appendChild(c);}if(e.columns&&e.columns.separator&&e.columns.count>1){let c=e.columns.count,x=e.columns.gap,T=(l-(c-1)*x)/c,S=e.size.h-e.margins.top-e.margins.bottom;for(let k=0;k<c-1;k++){let f=(k+1)*T+k*x+x/2,h=o.createElement("div");h.style.position="absolute",h.style.left=`${f}px`,h.style.top="0",h.style.height=`${S}px`,h.style.width="0.5px",h.style.backgroundColor="#000",h.style.pointerEvents="none",i.appendChild(h);}}if(n.footnoteArea&&n.footnoteArea.length>0){let c=bt(n.footnoteArea,l,t,o);c.style.position="absolute";let x=Math.max(e.footnoteReservedHeight??0,yt(n.footnoteArea)),T=e.size.h-e.margins.bottom-e.margins.top;c.style.top=`${Math.max(-e.margins.top,T-x)}px`,c.style.left="0",c.style.right="0",i.appendChild(c);}r.appendChild(i);{let x=n.headerDistance??e.margins.header??48,T=e.size.w-e.margins.left-e.margins.right,S=Math.max(e.margins.top-x,48),k=n.headerContent?.visualTop??0,f=n.headerContent?.visualBottom??n.headerContent?.height??0,h=Math.max(f-k,24),R=f>S,C=o.createElement("div");C.className=G.header,C.style.position="absolute",C.style.top=`${x+k}px`,C.style.left=`${e.margins.left}px`,C.style.right=`${e.margins.right}px`,C.style.width=`${T}px`,C.style.height=`${h}px`,C.style.minHeight=`${h}px`;let I=!R;if(n.headerContent&&n.headerContent.blocks.length>0){let v={flowTop:x,flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},L=Be(n.headerContent,{...t,section:"header",contentWidth:T},n,v);L.style.top=`${-k}px`,L.querySelector("img")&&(I=false),C.appendChild(L);}I&&(C.style.maxHeight=`${S}px`,C.style.overflow="hidden"),r.appendChild(C);}{let x=n.footerDistance??e.margins.footer??48,T=e.size.w-e.margins.left-e.margins.right,S=Math.max(e.margins.bottom-x,48),k=n.footerContent?.visualTop??0,f=n.footerContent?.visualBottom??n.footerContent?.height??0,h=Math.max(f-k,24),R=h>S,C=o.createElement("div");C.className=G.footer,C.style.position="absolute",C.style.top=`${e.size.h-x-h}px`,C.style.left=`${e.margins.left}px`,C.style.right=`${e.margins.right}px`,C.style.width=`${T}px`,C.style.height=`${h}px`,C.style.minHeight=`${h}px`;let I=!R;if(n.footerContent&&n.footerContent.blocks.length>0){let v={flowTop:e.size.h-x-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},L=Be(n.footerContent,{...t,section:"footer",contentWidth:T},n,v);L.style.top=`${-k}px`,L.querySelector("img")&&(I=false),C.appendChild(L);}I&&(C.style.maxHeight=`${S}px`,C.style.overflow="hidden"),r.appendChild(C);}return a&&n.pageBorders?.zOrder!=="back"&&r.appendChild(a),r}exports.A=ht;exports.B=mn;exports.C=yn;exports.D=G;exports.E=le;exports.F=Se;exports.a=be;exports.b=Me;exports.c=on;exports.d=Io;exports.e=ye;exports.f=sn;exports.g=ln;exports.h=Fo;exports.i=He;exports.j=Co;exports.k=Ro;exports.l=Tn;exports.m=In;exports.n=U;exports.o=Ie;exports.p=nt;exports.q=Z;exports.r=dt;exports.s=he;exports.t=D;exports.u=q;exports.v=_;exports.w=Q;exports.x=Xt;exports.y=ee;exports.z=Pe;
@@ -1,2 +1,2 @@
1
- import {g,a as a$1,c,d,e,f,b,q as q$1,n as n$1}from'./chunk-CHN26LLL.mjs';import {h,j as j$1,l,m,n}from'./chunk-WWNOXNEX.mjs';import {a}from'./chunk-W77JXDEV.mjs';function Z(e,s){let r=G(s),t=new RegExp(`<w:p[\\s][^>]*w14:paraId="${r}"`,"g"),o=[],i;for(;(i=t.exec(e))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<e.length;){let m=e.indexOf("<",n);if(m===-1)break;if(e.startsWith("<w:p",m)){let y=e[m+4];if(y===">"||y===" "||y==="/"){let f=e.indexOf(">",m);if(f===-1)break;if(e[f-1]==="/"){if(a===0)return {start:l,end:f+1};n=f+1;}else a++,n=f+1;}else n=m+1;}else if(e.startsWith("</w:p>",m)){if(a--,a===0)return {start:l,end:m+6};n=m+6;}else n=m+1;}return null}function j(e,s){let r=Z(e,s);return r?e.substring(r.start,r.end):null}function H(e){let s=0,r=/<w:p[\s>]/g,t;for(;(t=r.exec(e))!==null;){let o=t.index,i=e[o+4];(i===">"||i===" ")&&s++;}return s}function W(e){let s=new Map,r=/w14:paraId="([^"]+)"/g,t;for(;(t=r.exec(e))!==null;){let o=t[1];s.set(o,(s.get(o)||0)+1);}return s}function q(e,s,r){if(r.size===0)return {safe:true};let t=W(e),o=W(s);for(let n of r){let a=t.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 r){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=H(e),l=H(s);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function J(e,s,r){if(r.size===0)return e;if(!q(e,s,r).safe)return null;let o=[];for(let l of r){let n=Z(e,l);if(!n)return null;let a=j(s,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=e;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function G(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L(e){let s=r=>r.content.some(t=>t.type==="drawing"&&t.image?.src?.startsWith("data:")&&!t.image?.rId);for(let r of e)if(r.type==="paragraph")for(let t of r.content)if(t.type==="run"){if(s(t))return true}else {if(t.type==="hyperlink"&&t.href&&!t.rId&&!t.anchor)return true;if(t.type==="insertion"||t.type==="deletion"||t.type==="moveFrom"||t.type==="moveTo"){for(let o of t.content)if(o.type==="run"&&s(o))return true}}else if(r.type==="table"){for(let t of r.rows)for(let o of t.cells)if(L(o.content))return true}return false}async function oe(e$1,s,r){let{changedParaIds:t,structuralChange:o,hasUntrackedChanges:i}=r;if(o||i||!s)return null;let l$1=e$1.package.document.content;if(L(l$1))return null;let n$2=e$1.package.document.comments,a$2=n$2&&n$2.length>0,m$1=g(e$1);try{let f$1=await(await import('jszip')).default.loadAsync(s),u=new Map,I=e$1.package.relationships;if(I)for(let c of I.values()){if(!c.target||c.type!==a.header&&c.type!==a.footer)continue;let d=a$1(c.target).replace(/^\//,"");if(!f$1.file(d))return null}if(t.size>0){let c=f$1.file("word/document.xml");if(!c)return null;let d=await c.async("text"),w=h(e$1),x=J(d,w,t);if(!x)return null;u.set("word/document.xml",x);}if(a$2){let{xml:c$1,paraInfos:d$1}=j$1(n$2);u.set("word/comments.xml",c$1);let w=l(d$1);w&&u.set("word/commentsExtended.xml",w);let x=m(d$1);x&&u.set("word/commentsIds.xml",x);let S=n(d$1,n$2);S&&u.set("word/commentsExtensible.xml",S);let N=f$1.file("[Content_Types].xml");if(N){let p=u.get("[Content_Types].xml")??await N.async("text"),h=!1,C=[["/word/comments.xml",c],["/word/commentsExtended.xml",d],["/word/commentsIds.xml",e],["/word/commentsExtensible.xml",f]];for(let[E,b]of C)p.includes(E)||(p=p.replace("</Types>",`<Override PartName="${E}" ContentType="${b}"/></Types>`),h=!0);h&&u.set("[Content_Types].xml",p);}let T="word/_rels/document.xml.rels",O=f$1.file(T);if(O){let p=u.get(T)??await O.async("text"),h=!1,C=[["comments.xml",a.comments],["commentsExtended.xml",a.commentsExtended],["commentsIds.xml",a.commentsIds],["commentsExtensible.xml",a.commentsExtensible]];for(let[E,b$1]of C)if(!p.includes(E)){let V=b(p);p=p.replace("</Relationships>",`<Relationship Id="rId${V+1}" Type="${b$1}" Target="${E}"/></Relationships>`),h=!0;}h&&u.set(T,p);}}for(let[c,d]of m$1)u.set(c,d);let P=f$1.file("docProps/core.xml");if(P){let c=await P.async("text");u.set("docProps/core.xml",q$1(c,{updateModifiedDate:!0}));}return await n$1(f$1,u)}catch{return null}}
1
+ import {g,a as a$1,c,d,e,f,b,q as q$1,n as n$1}from'./chunk-F24WZXN4.mjs';import {h,j as j$1,l,m,n}from'./chunk-2LVK7EF5.mjs';import {a}from'./chunk-W77JXDEV.mjs';function Z(e,s){let r=G(s),t=new RegExp(`<w:p[\\s][^>]*w14:paraId="${r}"`,"g"),o=[],i;for(;(i=t.exec(e))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<e.length;){let m=e.indexOf("<",n);if(m===-1)break;if(e.startsWith("<w:p",m)){let y=e[m+4];if(y===">"||y===" "||y==="/"){let f=e.indexOf(">",m);if(f===-1)break;if(e[f-1]==="/"){if(a===0)return {start:l,end:f+1};n=f+1;}else a++,n=f+1;}else n=m+1;}else if(e.startsWith("</w:p>",m)){if(a--,a===0)return {start:l,end:m+6};n=m+6;}else n=m+1;}return null}function j(e,s){let r=Z(e,s);return r?e.substring(r.start,r.end):null}function H(e){let s=0,r=/<w:p[\s>]/g,t;for(;(t=r.exec(e))!==null;){let o=t.index,i=e[o+4];(i===">"||i===" ")&&s++;}return s}function W(e){let s=new Map,r=/w14:paraId="([^"]+)"/g,t;for(;(t=r.exec(e))!==null;){let o=t[1];s.set(o,(s.get(o)||0)+1);}return s}function q(e,s,r){if(r.size===0)return {safe:true};let t=W(e),o=W(s);for(let n of r){let a=t.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 r){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=H(e),l=H(s);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function J(e,s,r){if(r.size===0)return e;if(!q(e,s,r).safe)return null;let o=[];for(let l of r){let n=Z(e,l);if(!n)return null;let a=j(s,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=e;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function G(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L(e){let s=r=>r.content.some(t=>t.type==="drawing"&&t.image?.src?.startsWith("data:")&&!t.image?.rId);for(let r of e)if(r.type==="paragraph")for(let t of r.content)if(t.type==="run"){if(s(t))return true}else {if(t.type==="hyperlink"&&t.href&&!t.rId&&!t.anchor)return true;if(t.type==="insertion"||t.type==="deletion"||t.type==="moveFrom"||t.type==="moveTo"){for(let o of t.content)if(o.type==="run"&&s(o))return true}}else if(r.type==="table"){for(let t of r.rows)for(let o of t.cells)if(L(o.content))return true}return false}async function oe(e$1,s,r){let{changedParaIds:t,structuralChange:o,hasUntrackedChanges:i}=r;if(o||i||!s)return null;let l$1=e$1.package.document.content;if(L(l$1))return null;let n$2=e$1.package.document.comments,a$2=n$2&&n$2.length>0,m$1=g(e$1);try{let f$1=await(await import('jszip')).default.loadAsync(s),u=new Map,I=e$1.package.relationships;if(I)for(let c of I.values()){if(!c.target||c.type!==a.header&&c.type!==a.footer)continue;let d=a$1(c.target).replace(/^\//,"");if(!f$1.file(d))return null}if(t.size>0){let c=f$1.file("word/document.xml");if(!c)return null;let d=await c.async("text"),w=h(e$1),x=J(d,w,t);if(!x)return null;u.set("word/document.xml",x);}if(a$2){let{xml:c$1,paraInfos:d$1}=j$1(n$2);u.set("word/comments.xml",c$1);let w=l(d$1);w&&u.set("word/commentsExtended.xml",w);let x=m(d$1);x&&u.set("word/commentsIds.xml",x);let S=n(d$1,n$2);S&&u.set("word/commentsExtensible.xml",S);let N=f$1.file("[Content_Types].xml");if(N){let p=u.get("[Content_Types].xml")??await N.async("text"),h=!1,C=[["/word/comments.xml",c],["/word/commentsExtended.xml",d],["/word/commentsIds.xml",e],["/word/commentsExtensible.xml",f]];for(let[E,b]of C)p.includes(E)||(p=p.replace("</Types>",`<Override PartName="${E}" ContentType="${b}"/></Types>`),h=!0);h&&u.set("[Content_Types].xml",p);}let T="word/_rels/document.xml.rels",O=f$1.file(T);if(O){let p=u.get(T)??await O.async("text"),h=!1,C=[["comments.xml",a.comments],["commentsExtended.xml",a.commentsExtended],["commentsIds.xml",a.commentsIds],["commentsExtensible.xml",a.commentsExtensible]];for(let[E,b$1]of C)if(!p.includes(E)){let V=b(p);p=p.replace("</Relationships>",`<Relationship Id="rId${V+1}" Type="${b$1}" Target="${E}"/></Relationships>`),h=!0;}h&&u.set(T,p);}}for(let[c,d]of m$1)u.set(c,d);let P=f$1.file("docProps/core.xml");if(P){let c=await P.async("text");u.set("docProps/core.xml",q$1(c,{updateModifiedDate:!0}));}return await n$1(f$1,u)}catch{return null}}
2
2
  export{q as a,J as b,oe as c};