@eigenpal/docx-editor-core 1.0.2 → 1.0.3

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 (209) hide show
  1. package/README.md +1 -1
  2. package/dist/agent/index.d.mts +4 -4
  3. package/dist/agent/index.d.ts +4 -4
  4. package/dist/agent/index.js +1 -1
  5. package/dist/agent/index.mjs +1 -1
  6. package/dist/chunk-2IE6UDHJ.mjs +2 -0
  7. package/dist/chunk-3AZWLVLC.js +1 -0
  8. package/dist/chunk-3JXR6YU4.mjs +1 -0
  9. package/dist/{chunk-LTYW3NLX.js → chunk-3NLVHZMT.js} +2 -2
  10. package/dist/chunk-5SU4HPQS.mjs +1 -0
  11. package/dist/{chunk-6PR4XHQ3.mjs → chunk-7PX32GLB.mjs} +1 -1
  12. package/dist/{chunk-AFMMYLPX.js → chunk-ABBG4WD2.js} +2 -2
  13. package/dist/chunk-AHXPHBMT.js +1 -0
  14. package/dist/chunk-B6LYBJ4H.mjs +1 -0
  15. package/dist/chunk-BFB4PRS4.mjs +1 -0
  16. package/dist/chunk-BRHHK4MG.mjs +2 -0
  17. package/dist/chunk-CUXXRGPQ.mjs +1 -0
  18. package/dist/chunk-D536HC5M.js +2 -0
  19. package/dist/{chunk-GFQM7PKY.js → chunk-D5E5TA74.js} +1 -1
  20. package/dist/chunk-EPX7BBJD.js +2 -0
  21. package/dist/chunk-EQVNAHL7.mjs +1 -0
  22. package/dist/{chunk-EXOP727C.mjs → chunk-EV6W6KXG.mjs} +1 -1
  23. package/dist/chunk-FCJWLEKT.mjs +1 -0
  24. package/dist/{chunk-XDH55WXX.mjs → chunk-G7AKYAKU.mjs} +1 -1
  25. package/dist/{chunk-AGNZEOVL.mjs → chunk-GHQS3I2W.mjs} +1 -1
  26. package/dist/chunk-HAAMO2Z2.mjs +1 -0
  27. package/dist/chunk-HL5PQT3A.mjs +2 -0
  28. package/dist/chunk-IMKU4O3P.js +1 -0
  29. package/dist/chunk-IN6IYQ2X.js +1 -0
  30. package/dist/chunk-IO6HZ7KR.js +2 -0
  31. package/dist/{chunk-CP767TWV.js → chunk-N3EIZN65.js} +1 -1
  32. package/dist/chunk-NO5LW2DQ.mjs +1 -0
  33. package/dist/chunk-OTDF6PZK.js +1 -0
  34. package/dist/chunk-QMLIXLZJ.mjs +4 -0
  35. package/dist/chunk-QVEAQOMR.mjs +2 -0
  36. package/dist/{chunk-APFTVA4F.mjs → chunk-QXHL67FG.mjs} +1 -1
  37. package/dist/{chunk-XCMA7AY7.js → chunk-SAFW7UQZ.js} +1 -1
  38. package/dist/chunk-TGPS3SRR.mjs +1 -0
  39. package/dist/chunk-TMISJEGL.js +1 -0
  40. package/dist/chunk-TRQN2SFW.mjs +59 -0
  41. package/dist/chunk-UGXSKZVM.js +1 -0
  42. package/dist/chunk-V6SWUCTS.js +2 -0
  43. package/dist/chunk-X3NB7STJ.js +1 -0
  44. package/dist/{chunk-7SGC3CXJ.js → chunk-XBHF5Q2F.js} +1 -1
  45. package/dist/chunk-XBIKSAH6.js +1 -0
  46. package/dist/{chunk-6DK4UBGM.js → chunk-XOH7YAYL.js} +1 -1
  47. package/dist/{chunk-4S5VOHQK.mjs → chunk-XWQB6APW.mjs} +1 -1
  48. package/dist/chunk-Y7I5QDCN.mjs +1 -0
  49. package/dist/chunk-YCDB5TA6.js +4 -0
  50. package/dist/chunk-YVYB4YCI.js +1 -0
  51. package/dist/{chunk-NLTX7XVR.js → chunk-Z4SJCSTS.js} +1 -1
  52. package/dist/{colorResolver-CVsPLsw1.d.ts → colorResolver-BZ_yScf4.d.ts} +1 -1
  53. package/dist/{colorResolver-C3q7MLLD.d.mts → colorResolver-C6DtsoFI.d.mts} +1 -1
  54. package/dist/core-plugins.d.mts +3 -3
  55. package/dist/core-plugins.d.ts +3 -3
  56. package/dist/core-plugins.js +1 -1
  57. package/dist/core-plugins.mjs +1 -1
  58. package/dist/core.d.mts +6 -6
  59. package/dist/core.d.ts +6 -6
  60. package/dist/core.js +1 -1
  61. package/dist/core.mjs +1 -1
  62. package/dist/docx/index.d.mts +3 -3
  63. package/dist/docx/index.d.ts +3 -3
  64. package/dist/docx/index.js +1 -1
  65. package/dist/docx/index.mjs +1 -1
  66. package/dist/docx/parser.d.mts +3 -3
  67. package/dist/docx/parser.d.ts +3 -3
  68. package/dist/docx/parser.js +1 -1
  69. package/dist/docx/parser.mjs +1 -1
  70. package/dist/docx/rezip.d.mts +3 -3
  71. package/dist/docx/rezip.d.ts +3 -3
  72. package/dist/docx/rezip.js +1 -1
  73. package/dist/docx/rezip.mjs +1 -1
  74. package/dist/docx/serializer/index.d.mts +3 -3
  75. package/dist/docx/serializer/index.d.ts +3 -3
  76. package/dist/{formatting-D9I-lFS4.d.mts → formatting-BH4hcZiq.d.mts} +1 -1
  77. package/dist/{formatting-BwpZWdGi.d.ts → formatting-_OXU8gLB.d.ts} +1 -1
  78. package/dist/{headerFooterLayout-B3QVg556.d.ts → headerFooterLayout-B5LyDpSM.d.ts} +20 -1
  79. package/dist/{headerFooterLayout-DkclHZ0Z.d.mts → headerFooterLayout-DVFcJ832.d.mts} +20 -1
  80. package/dist/headless.d.mts +5 -5
  81. package/dist/headless.d.ts +5 -5
  82. package/dist/headless.js +1 -1
  83. package/dist/headless.mjs +1 -1
  84. package/dist/layout-bridge/index.d.mts +5 -5
  85. package/dist/layout-bridge/index.d.ts +5 -5
  86. package/dist/layout-bridge/index.js +1 -1
  87. package/dist/layout-bridge/index.mjs +1 -1
  88. package/dist/layout-bridge/measuring/index.d.mts +39 -2
  89. package/dist/layout-bridge/measuring/index.d.ts +39 -2
  90. package/dist/layout-bridge/measuring/index.js +1 -1
  91. package/dist/layout-bridge/measuring/index.mjs +1 -1
  92. package/dist/layout-bridge/tableInsertHover.js +1 -1
  93. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  94. package/dist/layout-bridge/toFlowBlocks.d.mts +10 -3
  95. package/dist/layout-bridge/toFlowBlocks.d.ts +10 -3
  96. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  97. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  98. package/dist/layout-engine/index.d.mts +30 -3
  99. package/dist/layout-engine/index.d.ts +30 -3
  100. package/dist/layout-engine/index.js +1 -1
  101. package/dist/layout-engine/index.mjs +1 -1
  102. package/dist/layout-engine/types.d.mts +9 -0
  103. package/dist/layout-engine/types.d.ts +9 -0
  104. package/dist/layout-painter/index.d.mts +4 -4
  105. package/dist/layout-painter/index.d.ts +4 -4
  106. package/dist/layout-painter/index.js +1 -1
  107. package/dist/layout-painter/index.mjs +1 -1
  108. package/dist/layout-painter/renderPage.d.mts +4 -4
  109. package/dist/layout-painter/renderPage.d.ts +4 -4
  110. package/dist/layout-painter/renderPage.js +1 -1
  111. package/dist/layout-painter/renderPage.mjs +1 -1
  112. package/dist/{lists-JDB80qyP.d.mts → lists-CvG_iVK3.d.mts} +8 -2
  113. package/dist/{lists-CdiIk_c1.d.ts → lists-UTp_tk7B.d.ts} +8 -2
  114. package/dist/managers/AutoSaveManager.d.mts +3 -3
  115. package/dist/managers/AutoSaveManager.d.ts +3 -3
  116. package/dist/managers/TableSelectionManager.d.mts +3 -3
  117. package/dist/managers/TableSelectionManager.d.ts +3 -3
  118. package/dist/managers/types.d.mts +3 -3
  119. package/dist/managers/types.d.ts +3 -3
  120. package/dist/{marks-CCPVlQzL.d.mts → marks-BY573yZn.d.mts} +1 -1
  121. package/dist/{marks-BujVxYP4.d.ts → marks-CjC9tF5k.d.ts} +1 -1
  122. package/dist/mcp-cli.mjs +23 -23
  123. package/dist/mcp.d.mts +3 -3
  124. package/dist/mcp.d.ts +3 -3
  125. package/dist/mcp.js +3 -3
  126. package/dist/mcp.mjs +1 -1
  127. package/dist/{nodes-BXi1Uu3e.d.mts → nodes-CL8M0L-a.d.mts} +4 -2
  128. package/dist/{nodes-DfKj9kUA.d.ts → nodes-D7PTUJ2N.d.ts} +4 -2
  129. package/dist/prosemirror/commands/formatting.d.mts +2 -2
  130. package/dist/prosemirror/commands/formatting.d.ts +2 -2
  131. package/dist/prosemirror/commands/formatting.js +1 -1
  132. package/dist/prosemirror/commands/formatting.mjs +1 -1
  133. package/dist/prosemirror/commands/index.d.mts +2 -2
  134. package/dist/prosemirror/commands/index.d.ts +2 -2
  135. package/dist/prosemirror/commands/index.js +1 -1
  136. package/dist/prosemirror/commands/index.mjs +1 -1
  137. package/dist/prosemirror/commands/paragraph.d.mts +1 -1
  138. package/dist/prosemirror/commands/paragraph.d.ts +1 -1
  139. package/dist/prosemirror/commands/paragraph.js +1 -1
  140. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  141. package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -3
  142. package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -3
  143. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  144. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  145. package/dist/prosemirror/conversion/index.d.mts +11 -3
  146. package/dist/prosemirror/conversion/index.d.ts +11 -3
  147. package/dist/prosemirror/conversion/index.js +1 -1
  148. package/dist/prosemirror/conversion/index.mjs +1 -1
  149. package/dist/prosemirror/extensions/index.d.mts +1 -1
  150. package/dist/prosemirror/extensions/index.d.ts +1 -1
  151. package/dist/prosemirror/extensions/index.js +1 -1
  152. package/dist/prosemirror/extensions/index.mjs +1 -1
  153. package/dist/prosemirror/index.d.mts +5 -5
  154. package/dist/prosemirror/index.d.ts +5 -5
  155. package/dist/prosemirror/index.js +1 -1
  156. package/dist/prosemirror/index.mjs +1 -1
  157. package/dist/prosemirror/plugins/index.d.mts +1 -1
  158. package/dist/prosemirror/plugins/index.d.ts +1 -1
  159. package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
  160. package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
  161. package/dist/prosemirror/schema/index.d.mts +4 -4
  162. package/dist/prosemirror/schema/index.d.ts +4 -4
  163. package/dist/prosemirror/schema/index.js +1 -1
  164. package/dist/prosemirror/schema/index.mjs +1 -1
  165. package/dist/prosemirror/styles/index.d.mts +2 -2
  166. package/dist/prosemirror/styles/index.d.ts +2 -2
  167. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -2
  168. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -2
  169. package/dist/{selectionContext-85CE0f7a.d.ts → selectionContext-BPAqgNgk.d.ts} +1 -1
  170. package/dist/{selectionContext-Xq3AY7pn.d.mts → selectionContext-CoZat7QZ.d.mts} +1 -1
  171. package/dist/{styles-jqO45PSq.d.ts → styles-BBv7doYK.d.ts} +1 -1
  172. package/dist/{styles-BBoqh07F.d.mts → styles-EI2lxeEN.d.mts} +1 -1
  173. package/dist/types/agentApi.d.mts +1 -1
  174. package/dist/types/agentApi.d.ts +1 -1
  175. package/dist/types/content.d.mts +2 -2
  176. package/dist/types/content.d.ts +2 -2
  177. package/dist/types/document.d.mts +25 -6
  178. package/dist/types/document.d.ts +25 -6
  179. package/dist/utils/comments.d.mts +2 -2
  180. package/dist/utils/comments.d.ts +2 -2
  181. package/dist/utils/index.d.mts +4 -4
  182. package/dist/utils/index.d.ts +4 -4
  183. package/package.json +1 -1
  184. package/dist/chunk-2D3UPAMA.mjs +0 -1
  185. package/dist/chunk-2RCMY2GE.mjs +0 -1
  186. package/dist/chunk-3GNIP6IX.mjs +0 -4
  187. package/dist/chunk-44RUAQA2.js +0 -1
  188. package/dist/chunk-5N5DBQJV.mjs +0 -1
  189. package/dist/chunk-5TNMVXDS.mjs +0 -1
  190. package/dist/chunk-6LOYA7G5.mjs +0 -2
  191. package/dist/chunk-7VCMJCBY.js +0 -2
  192. package/dist/chunk-BKHQA6JJ.js +0 -1
  193. package/dist/chunk-BOYVCOLZ.mjs +0 -1
  194. package/dist/chunk-BS35CXMN.js +0 -1
  195. package/dist/chunk-BTOBVF4I.mjs +0 -1
  196. package/dist/chunk-C6GSFUV2.js +0 -2
  197. package/dist/chunk-DV6IEOP5.js +0 -4
  198. package/dist/chunk-IBNUQL57.mjs +0 -2
  199. package/dist/chunk-NMSU4MWP.mjs +0 -1
  200. package/dist/chunk-OLKDLRJ4.js +0 -1
  201. package/dist/chunk-P6RNOYAG.mjs +0 -2
  202. package/dist/chunk-R7RR6M4A.mjs +0 -2
  203. package/dist/chunk-RCS6UNIJ.mjs +0 -1
  204. package/dist/chunk-T5RYEG2V.js +0 -1
  205. package/dist/chunk-TYYOBPNK.js +0 -1
  206. package/dist/chunk-UCZVMHB5.mjs +0 -59
  207. package/dist/chunk-VQ2QGHYS.js +0 -2
  208. package/dist/chunk-WZP6ZHBR.js +0 -1
  209. package/dist/chunk-YGHHSCPR.js +0 -2
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkTE2VQJZG_js=require('./chunk-TE2VQJZG.js'),chunk4G6AJ4ZM_js=require('./chunk-4G6AJ4ZM.js'),chunkY74ANBPV_js=require('./chunk-Y74ANBPV.js'),chunkBS35CXMN_js=require('./chunk-BS35CXMN.js');require('./chunk-GFQM7PKY.js');var chunkT5RYEG2V_js=require('./chunk-T5RYEG2V.js');require('./chunk-TYYOBPNK.js'),require('./chunk-44RUAQA2.js'),require('./chunk-DROCYKAR.js'),require('./chunk-7RDCZLTU.js'),require('./chunk-BKHQA6JJ.js');var chunkKESNGXGO_js=require('./chunk-KESNGXGO.js'),chunkNLTX7XVR_js=require('./chunk-NLTX7XVR.js'),chunkCP767TWV_js=require('./chunk-CP767TWV.js'),chunkNXLJVVVE_js=require('./chunk-NXLJVVVE.js'),chunkAFMMYLPX_js=require('./chunk-AFMMYLPX.js'),chunkU4UCHBZ7_js=require('./chunk-U4UCHBZ7.js'),chunkESI4BSBF_js=require('./chunk-ESI4BSBF.js'),chunkTE2AF7FM_js=require('./chunk-TE2AF7FM.js'),chunkLTYW3NLX_js=require('./chunk-LTYW3NLX.js'),chunkV435QKZB_js=require('./chunk-V435QKZB.js'),chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),chunkC6GSFUV2_js=require('./chunk-C6GSFUV2.js');require('./chunk-DV6IEOP5.js');var chunkKBU6QQFU_js=require('./chunk-KBU6QQFU.js'),chunkI6PMX4BO_js=require('./chunk-I6PMX4BO.js');require('./chunk-WZP6ZHBR.js'),require('./chunk-D4RPOJC7.js'),require('./chunk-IP2VXNWG.js'),require('./chunk-JFZIXFRC.js'),require('./chunk-MZOVDLYL.js'),require('./chunk-YGHHSCPR.js'),require('./chunk-7VCMJCBY.js'),require('./chunk-OLKDLRJ4.js'),require('./chunk-VQ2QGHYS.js'),require('./chunk-BHBOAP6Z.js'),require('./chunk-MZ7LW5CH.js'),require('./chunk-N3Y5BUKV.js'),require('./chunk-6LVPRTB6.js'),require('./chunk-NERY274X.js');var chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js');require('./chunk-C2BAPYGJ.js'),require('./chunk-Q4CKLXWA.js');var chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js'),chunkDC7S76ZX_js=require('./chunk-DC7S76ZX.js');function L(i){if(!i||i==="transparent"||i==="inherit")return null;if(i.startsWith("#"))return i.slice(1).toUpperCase();let o=i.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o){let e=parseInt(o[1]).toString(16).padStart(2,"0"),t=parseInt(o[2]).toString(16).padStart(2,"0"),n=parseInt(o[3]).toString(16).padStart(2,"0");return (e+t+n).toUpperCase()}return null}function h(i){let o=window.getComputedStyle(i),e={};(o.fontWeight==="bold"||parseInt(o.fontWeight)>=700)&&(e.bold=true),o.fontStyle==="italic"&&(e.italic=true);let t=o.textDecoration||o.textDecorationLine;t&&t.includes("underline")&&(e.underline={style:"single"}),t&&t.includes("line-through")&&(e.strike=true);let n=parseFloat(o.fontSize);!isNaN(n)&&n>0&&(e.fontSize=Math.round(n/1.333*2));let r=o.fontFamily.replace(/["']/g,"").split(",")[0].trim();r&&(e.fontFamily={ascii:r});let s=o.color;if(s&&s!=="rgb(0, 0, 0)"){let c=L(s);c&&(e.color={rgb:c});}let l=o.backgroundColor;if(l&&l!=="transparent"&&l!=="rgba(0, 0, 0, 0)"){let c=S(l);c&&(e.shading={fill:{rgb:c}});}return Object.keys(e).length>0?e:void 0}function Lt(i,o){let e=document.createRange();e.selectNodeContents(i);let t=o.compareBoundaryPoints(Range.START_TO_START,e)>=0&&o.compareBoundaryPoints(Range.START_TO_END,e)<=0,n=o.compareBoundaryPoints(Range.END_TO_START,e)>=0&&o.compareBoundaryPoints(Range.END_TO_END,e)<=0;if(t&&n)return o.toString();if(t){let r=document.createRange();return r.setStart(o.startContainer,o.startOffset),r.selectNodeContents(i),r.setEnd(e.endContainer,e.endOffset),r.toString()}else if(n){let r=document.createRange();return r.selectNodeContents(i),r.setEnd(o.endContainer,o.endOffset),r.setStart(e.startContainer,e.startOffset),r.toString()}else if(o.intersectsNode(i))return i.textContent||"";return ""}function F(i){let o=i;for(;o;){if(o.nodeType===Node.ELEMENT_NODE){let e=o;if(e.hasAttribute("data-paragraph-index"))return e}o=o.parentNode;}return null}function f(){let i=window.getSelection();if(!i||i.isCollapsed)return [];let o=[],e=i.getRangeAt(0),t=e.commonAncestorContainer,n=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;if(!n)return o;if(n.querySelectorAll(".docx-run").forEach(s=>{if(e.intersectsNode(s)){let l=Lt(s,e);if(l){let c=h(s);o.push({type:"run",formatting:c,content:[{type:"text",text:l}]});}}}),o.length===0){let s=i.toString();s&&o.push({type:"run",content:[{type:"text",text:s}]});}return o}function A(){let i=window.getSelection();if(!i||i.isCollapsed)return null;let o=f();if(o.length===0)return null;let e=i.toString(),t=i.getRangeAt(0),n=F(t.startContainer),r=F(t.endContainer),s=n?parseInt(n.getAttribute("data-paragraph-index")||"0",10):0,l=r?parseInt(r.getAttribute("data-paragraph-index")||"0",10):0;return {text:e,runs:o,startParagraphIndex:s,startRunIndex:0,startOffset:t.startOffset,endParagraphIndex:l,endRunIndex:0,endOffset:t.endOffset,isMultiParagraph:s!==l}}var S=L;var d=class extends chunkY74ANBPV_js.a{constructor(){super({notifications:[]});chunkDC7S76ZX_js.a(this,"notifications",[]);chunkDC7S76ZX_js.a(this,"idCounter",0);chunkDC7S76ZX_js.a(this,"timers",new Set);}showError(e,t){return this.addNotification(e,"error",t)}showWarning(e,t){return this.addNotification(e,"warning",t)}showInfo(e,t){return this.addNotification(e,"info",t)}dismiss(e){this.notifications=this.notifications.map(n=>n.id===e?{...n,dismissed:true}:n),this.emitSnapshot();let t=setTimeout(()=>{this.timers.delete(t),this.notifications=this.notifications.filter(n=>n.id!==e),this.emitSnapshot();},300);this.timers.add(t);}clearAll(){this.notifications=[];for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.emitSnapshot();}destroy(){for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.notifications=[];}addNotification(e,t,n){let r=`error-${++this.idCounter}-${Date.now()}`,s={id:r,message:e,severity:t,details:n,timestamp:Date.now()};if(this.notifications=[...this.notifications,s],this.emitSnapshot(),t!=="error"){let l=setTimeout(()=>{this.timers.delete(l),this.dismiss(r);},5e3);this.timers.add(l);}return r}emitSnapshot(){this.setSnapshot({notifications:this.notifications});}};function z(i,o){let e=`plugin-styles-${i}`,t=document.getElementById(e);t&&t.remove();let n=document.createElement("style");return n.id=e,n.textContent=o,document.head.appendChild(n),()=>{let r=document.getElementById(e);r&&r.remove();}}var u=class extends chunkY74ANBPV_js.a{constructor(){super({states:new Map,version:0});chunkDC7S76ZX_js.a(this,"plugins",[]);chunkDC7S76ZX_js.a(this,"pluginStates",new Map);chunkDC7S76ZX_js.a(this,"version",0);}initialize(e,t){this.destroyPlugins(),this.plugins=e;for(let n of e)n.initialize&&!this.pluginStates.has(n.id)&&this.pluginStates.set(n.id,n.initialize(t));this.emitSnapshot();}updateStates(e){let t=false;for(let n of this.plugins)if(n.onStateChange){let r=n.onStateChange(e);r!==void 0&&(this.pluginStates.set(n.id,r),t=true);}return t&&(this.version++,this.emitSnapshot()),t}getPluginState(e){return this.pluginStates.get(e)}setPluginState(e,t){this.pluginStates.set(e,t),this.version++,this.emitSnapshot();}destroy(){this.destroyPlugins(),this.emitSnapshot();}destroyPlugins(){for(let e of this.plugins)e.destroy&&e.destroy();this.pluginStates.clear(),this.plugins=[];}emitSnapshot(){this.setSnapshot({states:new Map(this.pluginStates),version:this.version});}};var p=class extends chunkY74ANBPV_js.a{constructor(){super({hasLayout:false,selectionRects:[],caretPosition:null,selectedImageInfo:null,isFocused:false,isDragging:false,isResizingColumn:false,isImageInteracting:false,version:0});chunkDC7S76ZX_js.a(this,"_hasLayout",false);chunkDC7S76ZX_js.a(this,"_selectionRects",[]);chunkDC7S76ZX_js.a(this,"_caretPosition",null);chunkDC7S76ZX_js.a(this,"_isDragging",false);chunkDC7S76ZX_js.a(this,"_dragAnchor",null);chunkDC7S76ZX_js.a(this,"_columnResize",{isResizing:false,startX:0,columnIndex:0,tablePmStart:0,originalWidths:{left:0,right:0}});chunkDC7S76ZX_js.a(this,"_selectedImageInfo",null);chunkDC7S76ZX_js.a(this,"_isImageInteracting",false);chunkDC7S76ZX_js.a(this,"_isFocused",false);chunkDC7S76ZX_js.a(this,"_version",0);}setLayoutReady(e){this._hasLayout=e,this.emitSnapshot();}updateSelection(e,t){this._selectionRects=e,this._caretPosition=t,this.emitSnapshot();}startDrag(e){this._isDragging=true,this._dragAnchor=e,this.emitSnapshot();}endDrag(){this._isDragging=false,this._dragAnchor=null,this.emitSnapshot();}getDragAnchor(){return this._dragAnchor}startColumnResize(e,t,n,r){this._columnResize={isResizing:true,startX:n,columnIndex:t,tablePmStart:e,originalWidths:r},this.emitSnapshot();}endColumnResize(){this._columnResize={...this._columnResize,isResizing:false},this.emitSnapshot();}getColumnResize(){return this._columnResize}setSelectedImage(e){this._selectedImageInfo=e,this.emitSnapshot();}clearSelectedImage(){this._selectedImageInfo=null,this._isImageInteracting=false,this.emitSnapshot();}setImageInteracting(e){this._isImageInteracting=e,this.emitSnapshot();}setFocused(e){this._isFocused=e,this.emitSnapshot();}emitSnapshot(){this._version++,this.setSnapshot({hasLayout:this._hasLayout,selectionRects:this._selectionRects,caretPosition:this._caretPosition,selectedImageInfo:this._selectedImageInfo,isFocused:this._isFocused,isDragging:this._isDragging,isResizingColumn:this._columnResize.isResizing,isImageInteracting:this._isImageInteracting,version:this._version});}};var g=class extends chunkY74ANBPV_js.a{constructor(e={}){let t=e.initialZoom??1;super({loadingState:"idle",parseError:null,isReady:false,zoom:t,fontsLoaded:false,version:0});chunkDC7S76ZX_js.a(this,"_loadingState","idle");chunkDC7S76ZX_js.a(this,"_parseError",null);chunkDC7S76ZX_js.a(this,"_zoom");chunkDC7S76ZX_js.a(this,"_fontsLoaded",false);chunkDC7S76ZX_js.a(this,"_document",null);chunkDC7S76ZX_js.a(this,"_version",0);chunkDC7S76ZX_js.a(this,"onChangeCallback");chunkDC7S76ZX_js.a(this,"onErrorCallback");this._zoom=t,this.onChangeCallback=e.onChange,this.onErrorCallback=e.onError;}setParsingStarted(){this._loadingState="parsing",this._parseError=null,this.emitSnapshot();}setDocumentLoaded(e){this._document=e,this._loadingState="loading-fonts",this._parseError=null,this.emitSnapshot();}setFontsLoaded(){this._fontsLoaded=true,this._loadingState="ready",this.emitSnapshot();}setLoadError(e){this._loadingState="error",this._parseError=e.message,this.onErrorCallback?.(e),this.emitSnapshot();}getDocument(){return this._document}updateDocument(e){this._document=e,this.onChangeCallback?.(e),this.emitSnapshot();}setZoom(e){this._zoom=Math.max(.25,Math.min(4,e)),this.emitSnapshot();}getZoom(){return this._zoom}emitSnapshot(){this._version++,this.setSnapshot({loadingState:this._loadingState,parseError:this._parseError,isReady:this._loadingState==="ready",zoom:this._zoom,fontsLoaded:this._fontsLoaded,version:this._version});}};var to="0.0.2";Object.defineProperty(exports,"AutoSaveManager",{enumerable:true,get:function(){return chunkTE2VQJZG_js.a}});Object.defineProperty(exports,"formatLastSaveTime",{enumerable:true,get:function(){return chunkTE2VQJZG_js.b}});Object.defineProperty(exports,"formatStorageSize",{enumerable:true,get:function(){return chunkTE2VQJZG_js.e}});Object.defineProperty(exports,"getAutoSaveStatusLabel",{enumerable:true,get:function(){return chunkTE2VQJZG_js.c}});Object.defineProperty(exports,"getAutoSaveStorageSize",{enumerable:true,get:function(){return chunkTE2VQJZG_js.d}});Object.defineProperty(exports,"isAutoSaveSupported",{enumerable:true,get:function(){return chunkTE2VQJZG_js.f}});Object.defineProperty(exports,"TABLE_DATA_ATTRIBUTES",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.a}});Object.defineProperty(exports,"TableSelectionManager",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.f}});Object.defineProperty(exports,"deleteTableFromDocument",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.e}});Object.defineProperty(exports,"findTableFromClick",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.b}});Object.defineProperty(exports,"getTableFromDocument",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.c}});Object.defineProperty(exports,"updateTableInDocument",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.d}});Object.defineProperty(exports,"Subscribable",{enumerable:true,get:function(){return chunkY74ANBPV_js.a}});Object.defineProperty(exports,"convertHeaderFooterToContent",{enumerable:true,get:function(){return chunkBS35CXMN_js.z}});Object.defineProperty(exports,"FOOTNOTE_SEPARATOR_HEIGHT",{enumerable:true,get:function(){return chunkT5RYEG2V_js.a}});Object.defineProperty(exports,"MAX_FOOTNOTE_LAYOUT_PASSES",{enumerable:true,get:function(){return chunkT5RYEG2V_js.b}});Object.defineProperty(exports,"buildFootnoteContentMap",{enumerable:true,get:function(){return chunkT5RYEG2V_js.h}});Object.defineProperty(exports,"buildFootnoteRenderItems",{enumerable:true,get:function(){return chunkT5RYEG2V_js.k}});Object.defineProperty(exports,"calculateFootnoteReservedHeights",{enumerable:true,get:function(){return chunkT5RYEG2V_js.i}});Object.defineProperty(exports,"collectFootnoteRefs",{enumerable:true,get:function(){return chunkT5RYEG2V_js.d}});Object.defineProperty(exports,"footnoteReservedHeightsEqual",{enumerable:true,get:function(){return chunkT5RYEG2V_js.c}});Object.defineProperty(exports,"mapFootnotesToPages",{enumerable:true,get:function(){return chunkT5RYEG2V_js.e}});Object.defineProperty(exports,"stabilizeFootnoteLayout",{enumerable:true,get:function(){return chunkT5RYEG2V_js.j}});Object.defineProperty(exports,"countPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.n}});Object.defineProperty(exports,"createColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.b}});Object.defineProperty(exports,"createHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.g}});Object.defineProperty(exports,"createLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.c}});Object.defineProperty(exports,"createPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.a}});Object.defineProperty(exports,"createPageBreakParagraph",{enumerable:true,get:function(){return chunkKESNGXGO_js.e}});Object.defineProperty(exports,"createPageBreakRun",{enumerable:true,get:function(){return chunkKESNGXGO_js.d}});Object.defineProperty(exports,"findPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.o}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunkKESNGXGO_js.m}});Object.defineProperty(exports,"insertHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.h}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.f}});Object.defineProperty(exports,"isBreakContent",{enumerable:true,get:function(){return chunkKESNGXGO_js.l}});Object.defineProperty(exports,"isColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.j}});Object.defineProperty(exports,"isLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.k}});Object.defineProperty(exports,"isPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.i}});Object.defineProperty(exports,"removePageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.p}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkNLTX7XVR_js.a}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkNLTX7XVR_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkNLTX7XVR_js.g}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkNLTX7XVR_js.d}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkNLTX7XVR_js.f}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkCP767TWV_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkCP767TWV_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkCP767TWV_js.a}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkNXLJVVVE_js.b}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkNXLJVVVE_js.a}});Object.defineProperty(exports,"docxtemplaterPlugin",{enumerable:true,get:function(){return chunkAFMMYLPX_js.b}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.a}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.b}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.c}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.d}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.m}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.e}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.i}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.f}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.g}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.j}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.l}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.k}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.h}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkESI4BSBF_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkESI4BSBF_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.f}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkTE2AF7FM_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkTE2AF7FM_js.b}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkLTYW3NLX_js.l}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkV435QKZB_js.f}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkV435QKZB_js.g}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkV435QKZB_js.e}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunk4BFNWPKW_js.c}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkC6GSFUV2_js.f}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkKBU6QQFU_js.g}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.e}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkKBU6QQFU_js.c}});Object.defineProperty(exports,"isFontsLoading",{enumerable:true,get:function(){return chunkKBU6QQFU_js.d}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkKBU6QQFU_js.a}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkKBU6QQFU_js.h}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.b}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkKBU6QQFU_js.f}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.m}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkKBU6QQFU_js.p}});Object.defineProperty(exports,"findParagraphByParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.b}});Object.defineProperty(exports,"findStartPosForParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.a}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.m}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.r}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.j}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.i}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.k}});Object.defineProperty(exports,"ensureHexPrefix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.n}});Object.defineProperty(exports,"generateThemeTintShadeMatrix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.q}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});Object.defineProperty(exports,"getThemeTintShadeHex",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.p}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.e}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.f}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.l}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.h}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.c}});Object.defineProperty(exports,"resolveHighlightToCss",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.o}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.g}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.p}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.j}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.d}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.i}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.h}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.c}});exports.EditorCoordinator=g;exports.ErrorManager=d;exports.LayoutCoordinator=p;exports.PluginLifecycleManager=u;exports.VERSION=to;exports.createSelectionFromDOM=A;exports.extractFormattingFromElement=h;exports.getSelectionRuns=f;exports.injectStyles=z;exports.rgbToHex=S;
1
+ 'use strict';var chunkTE2VQJZG_js=require('./chunk-TE2VQJZG.js'),chunk4G6AJ4ZM_js=require('./chunk-4G6AJ4ZM.js'),chunkY74ANBPV_js=require('./chunk-Y74ANBPV.js'),chunkAHXPHBMT_js=require('./chunk-AHXPHBMT.js');require('./chunk-D5E5TA74.js');var chunkOTDF6PZK_js=require('./chunk-OTDF6PZK.js');require('./chunk-3AZWLVLC.js'),require('./chunk-7RDCZLTU.js'),require('./chunk-UGXSKZVM.js'),require('./chunk-XBIKSAH6.js'),require('./chunk-IMKU4O3P.js'),require('./chunk-DROCYKAR.js');var chunkKESNGXGO_js=require('./chunk-KESNGXGO.js'),chunkZ4SJCSTS_js=require('./chunk-Z4SJCSTS.js'),chunkN3EIZN65_js=require('./chunk-N3EIZN65.js'),chunkNXLJVVVE_js=require('./chunk-NXLJVVVE.js'),chunkABBG4WD2_js=require('./chunk-ABBG4WD2.js'),chunkU4UCHBZ7_js=require('./chunk-U4UCHBZ7.js'),chunkESI4BSBF_js=require('./chunk-ESI4BSBF.js'),chunkTE2AF7FM_js=require('./chunk-TE2AF7FM.js'),chunk3NLVHZMT_js=require('./chunk-3NLVHZMT.js'),chunkV435QKZB_js=require('./chunk-V435QKZB.js'),chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),chunkV6SWUCTS_js=require('./chunk-V6SWUCTS.js');require('./chunk-YCDB5TA6.js'),require('./chunk-IN6IYQ2X.js');var chunkKBU6QQFU_js=require('./chunk-KBU6QQFU.js'),chunkI6PMX4BO_js=require('./chunk-I6PMX4BO.js');require('./chunk-X3NB7STJ.js'),require('./chunk-D4RPOJC7.js'),require('./chunk-IP2VXNWG.js'),require('./chunk-JFZIXFRC.js'),require('./chunk-MZOVDLYL.js'),require('./chunk-EPX7BBJD.js'),require('./chunk-D536HC5M.js'),require('./chunk-TMISJEGL.js'),require('./chunk-YVYB4YCI.js'),require('./chunk-IO6HZ7KR.js'),require('./chunk-BHBOAP6Z.js'),require('./chunk-MZ7LW5CH.js'),require('./chunk-N3Y5BUKV.js'),require('./chunk-6LVPRTB6.js'),require('./chunk-NERY274X.js');var chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js');require('./chunk-C2BAPYGJ.js'),require('./chunk-Q4CKLXWA.js');var chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js'),chunkDC7S76ZX_js=require('./chunk-DC7S76ZX.js');function L(i){if(!i||i==="transparent"||i==="inherit")return null;if(i.startsWith("#"))return i.slice(1).toUpperCase();let o=i.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o){let e=parseInt(o[1]).toString(16).padStart(2,"0"),t=parseInt(o[2]).toString(16).padStart(2,"0"),n=parseInt(o[3]).toString(16).padStart(2,"0");return (e+t+n).toUpperCase()}return null}function h(i){let o=window.getComputedStyle(i),e={};(o.fontWeight==="bold"||parseInt(o.fontWeight)>=700)&&(e.bold=true),o.fontStyle==="italic"&&(e.italic=true);let t=o.textDecoration||o.textDecorationLine;t&&t.includes("underline")&&(e.underline={style:"single"}),t&&t.includes("line-through")&&(e.strike=true);let n=parseFloat(o.fontSize);!isNaN(n)&&n>0&&(e.fontSize=Math.round(n/1.333*2));let r=o.fontFamily.replace(/["']/g,"").split(",")[0].trim();r&&(e.fontFamily={ascii:r});let s=o.color;if(s&&s!=="rgb(0, 0, 0)"){let c=L(s);c&&(e.color={rgb:c});}let l=o.backgroundColor;if(l&&l!=="transparent"&&l!=="rgba(0, 0, 0, 0)"){let c=S(l);c&&(e.shading={fill:{rgb:c}});}return Object.keys(e).length>0?e:void 0}function Lt(i,o){let e=document.createRange();e.selectNodeContents(i);let t=o.compareBoundaryPoints(Range.START_TO_START,e)>=0&&o.compareBoundaryPoints(Range.START_TO_END,e)<=0,n=o.compareBoundaryPoints(Range.END_TO_START,e)>=0&&o.compareBoundaryPoints(Range.END_TO_END,e)<=0;if(t&&n)return o.toString();if(t){let r=document.createRange();return r.setStart(o.startContainer,o.startOffset),r.selectNodeContents(i),r.setEnd(e.endContainer,e.endOffset),r.toString()}else if(n){let r=document.createRange();return r.selectNodeContents(i),r.setEnd(o.endContainer,o.endOffset),r.setStart(e.startContainer,e.startOffset),r.toString()}else if(o.intersectsNode(i))return i.textContent||"";return ""}function F(i){let o=i;for(;o;){if(o.nodeType===Node.ELEMENT_NODE){let e=o;if(e.hasAttribute("data-paragraph-index"))return e}o=o.parentNode;}return null}function f(){let i=window.getSelection();if(!i||i.isCollapsed)return [];let o=[],e=i.getRangeAt(0),t=e.commonAncestorContainer,n=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;if(!n)return o;if(n.querySelectorAll(".docx-run").forEach(s=>{if(e.intersectsNode(s)){let l=Lt(s,e);if(l){let c=h(s);o.push({type:"run",formatting:c,content:[{type:"text",text:l}]});}}}),o.length===0){let s=i.toString();s&&o.push({type:"run",content:[{type:"text",text:s}]});}return o}function A(){let i=window.getSelection();if(!i||i.isCollapsed)return null;let o=f();if(o.length===0)return null;let e=i.toString(),t=i.getRangeAt(0),n=F(t.startContainer),r=F(t.endContainer),s=n?parseInt(n.getAttribute("data-paragraph-index")||"0",10):0,l=r?parseInt(r.getAttribute("data-paragraph-index")||"0",10):0;return {text:e,runs:o,startParagraphIndex:s,startRunIndex:0,startOffset:t.startOffset,endParagraphIndex:l,endRunIndex:0,endOffset:t.endOffset,isMultiParagraph:s!==l}}var S=L;var d=class extends chunkY74ANBPV_js.a{constructor(){super({notifications:[]});chunkDC7S76ZX_js.a(this,"notifications",[]);chunkDC7S76ZX_js.a(this,"idCounter",0);chunkDC7S76ZX_js.a(this,"timers",new Set);}showError(e,t){return this.addNotification(e,"error",t)}showWarning(e,t){return this.addNotification(e,"warning",t)}showInfo(e,t){return this.addNotification(e,"info",t)}dismiss(e){this.notifications=this.notifications.map(n=>n.id===e?{...n,dismissed:true}:n),this.emitSnapshot();let t=setTimeout(()=>{this.timers.delete(t),this.notifications=this.notifications.filter(n=>n.id!==e),this.emitSnapshot();},300);this.timers.add(t);}clearAll(){this.notifications=[];for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.emitSnapshot();}destroy(){for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.notifications=[];}addNotification(e,t,n){let r=`error-${++this.idCounter}-${Date.now()}`,s={id:r,message:e,severity:t,details:n,timestamp:Date.now()};if(this.notifications=[...this.notifications,s],this.emitSnapshot(),t!=="error"){let l=setTimeout(()=>{this.timers.delete(l),this.dismiss(r);},5e3);this.timers.add(l);}return r}emitSnapshot(){this.setSnapshot({notifications:this.notifications});}};function z(i,o){let e=`plugin-styles-${i}`,t=document.getElementById(e);t&&t.remove();let n=document.createElement("style");return n.id=e,n.textContent=o,document.head.appendChild(n),()=>{let r=document.getElementById(e);r&&r.remove();}}var u=class extends chunkY74ANBPV_js.a{constructor(){super({states:new Map,version:0});chunkDC7S76ZX_js.a(this,"plugins",[]);chunkDC7S76ZX_js.a(this,"pluginStates",new Map);chunkDC7S76ZX_js.a(this,"version",0);}initialize(e,t){this.destroyPlugins(),this.plugins=e;for(let n of e)n.initialize&&!this.pluginStates.has(n.id)&&this.pluginStates.set(n.id,n.initialize(t));this.emitSnapshot();}updateStates(e){let t=false;for(let n of this.plugins)if(n.onStateChange){let r=n.onStateChange(e);r!==void 0&&(this.pluginStates.set(n.id,r),t=true);}return t&&(this.version++,this.emitSnapshot()),t}getPluginState(e){return this.pluginStates.get(e)}setPluginState(e,t){this.pluginStates.set(e,t),this.version++,this.emitSnapshot();}destroy(){this.destroyPlugins(),this.emitSnapshot();}destroyPlugins(){for(let e of this.plugins)e.destroy&&e.destroy();this.pluginStates.clear(),this.plugins=[];}emitSnapshot(){this.setSnapshot({states:new Map(this.pluginStates),version:this.version});}};var p=class extends chunkY74ANBPV_js.a{constructor(){super({hasLayout:false,selectionRects:[],caretPosition:null,selectedImageInfo:null,isFocused:false,isDragging:false,isResizingColumn:false,isImageInteracting:false,version:0});chunkDC7S76ZX_js.a(this,"_hasLayout",false);chunkDC7S76ZX_js.a(this,"_selectionRects",[]);chunkDC7S76ZX_js.a(this,"_caretPosition",null);chunkDC7S76ZX_js.a(this,"_isDragging",false);chunkDC7S76ZX_js.a(this,"_dragAnchor",null);chunkDC7S76ZX_js.a(this,"_columnResize",{isResizing:false,startX:0,columnIndex:0,tablePmStart:0,originalWidths:{left:0,right:0}});chunkDC7S76ZX_js.a(this,"_selectedImageInfo",null);chunkDC7S76ZX_js.a(this,"_isImageInteracting",false);chunkDC7S76ZX_js.a(this,"_isFocused",false);chunkDC7S76ZX_js.a(this,"_version",0);}setLayoutReady(e){this._hasLayout=e,this.emitSnapshot();}updateSelection(e,t){this._selectionRects=e,this._caretPosition=t,this.emitSnapshot();}startDrag(e){this._isDragging=true,this._dragAnchor=e,this.emitSnapshot();}endDrag(){this._isDragging=false,this._dragAnchor=null,this.emitSnapshot();}getDragAnchor(){return this._dragAnchor}startColumnResize(e,t,n,r){this._columnResize={isResizing:true,startX:n,columnIndex:t,tablePmStart:e,originalWidths:r},this.emitSnapshot();}endColumnResize(){this._columnResize={...this._columnResize,isResizing:false},this.emitSnapshot();}getColumnResize(){return this._columnResize}setSelectedImage(e){this._selectedImageInfo=e,this.emitSnapshot();}clearSelectedImage(){this._selectedImageInfo=null,this._isImageInteracting=false,this.emitSnapshot();}setImageInteracting(e){this._isImageInteracting=e,this.emitSnapshot();}setFocused(e){this._isFocused=e,this.emitSnapshot();}emitSnapshot(){this._version++,this.setSnapshot({hasLayout:this._hasLayout,selectionRects:this._selectionRects,caretPosition:this._caretPosition,selectedImageInfo:this._selectedImageInfo,isFocused:this._isFocused,isDragging:this._isDragging,isResizingColumn:this._columnResize.isResizing,isImageInteracting:this._isImageInteracting,version:this._version});}};var g=class extends chunkY74ANBPV_js.a{constructor(e={}){let t=e.initialZoom??1;super({loadingState:"idle",parseError:null,isReady:false,zoom:t,fontsLoaded:false,version:0});chunkDC7S76ZX_js.a(this,"_loadingState","idle");chunkDC7S76ZX_js.a(this,"_parseError",null);chunkDC7S76ZX_js.a(this,"_zoom");chunkDC7S76ZX_js.a(this,"_fontsLoaded",false);chunkDC7S76ZX_js.a(this,"_document",null);chunkDC7S76ZX_js.a(this,"_version",0);chunkDC7S76ZX_js.a(this,"onChangeCallback");chunkDC7S76ZX_js.a(this,"onErrorCallback");this._zoom=t,this.onChangeCallback=e.onChange,this.onErrorCallback=e.onError;}setParsingStarted(){this._loadingState="parsing",this._parseError=null,this.emitSnapshot();}setDocumentLoaded(e){this._document=e,this._loadingState="loading-fonts",this._parseError=null,this.emitSnapshot();}setFontsLoaded(){this._fontsLoaded=true,this._loadingState="ready",this.emitSnapshot();}setLoadError(e){this._loadingState="error",this._parseError=e.message,this.onErrorCallback?.(e),this.emitSnapshot();}getDocument(){return this._document}updateDocument(e){this._document=e,this.onChangeCallback?.(e),this.emitSnapshot();}setZoom(e){this._zoom=Math.max(.25,Math.min(4,e)),this.emitSnapshot();}getZoom(){return this._zoom}emitSnapshot(){this._version++,this.setSnapshot({loadingState:this._loadingState,parseError:this._parseError,isReady:this._loadingState==="ready",zoom:this._zoom,fontsLoaded:this._fontsLoaded,version:this._version});}};var to="0.0.2";Object.defineProperty(exports,"AutoSaveManager",{enumerable:true,get:function(){return chunkTE2VQJZG_js.a}});Object.defineProperty(exports,"formatLastSaveTime",{enumerable:true,get:function(){return chunkTE2VQJZG_js.b}});Object.defineProperty(exports,"formatStorageSize",{enumerable:true,get:function(){return chunkTE2VQJZG_js.e}});Object.defineProperty(exports,"getAutoSaveStatusLabel",{enumerable:true,get:function(){return chunkTE2VQJZG_js.c}});Object.defineProperty(exports,"getAutoSaveStorageSize",{enumerable:true,get:function(){return chunkTE2VQJZG_js.d}});Object.defineProperty(exports,"isAutoSaveSupported",{enumerable:true,get:function(){return chunkTE2VQJZG_js.f}});Object.defineProperty(exports,"TABLE_DATA_ATTRIBUTES",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.a}});Object.defineProperty(exports,"TableSelectionManager",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.f}});Object.defineProperty(exports,"deleteTableFromDocument",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.e}});Object.defineProperty(exports,"findTableFromClick",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.b}});Object.defineProperty(exports,"getTableFromDocument",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.c}});Object.defineProperty(exports,"updateTableInDocument",{enumerable:true,get:function(){return chunk4G6AJ4ZM_js.d}});Object.defineProperty(exports,"Subscribable",{enumerable:true,get:function(){return chunkY74ANBPV_js.a}});Object.defineProperty(exports,"convertHeaderFooterToContent",{enumerable:true,get:function(){return chunkAHXPHBMT_js.w}});Object.defineProperty(exports,"FOOTNOTE_SEPARATOR_HEIGHT",{enumerable:true,get:function(){return chunkOTDF6PZK_js.a}});Object.defineProperty(exports,"MAX_FOOTNOTE_LAYOUT_PASSES",{enumerable:true,get:function(){return chunkOTDF6PZK_js.b}});Object.defineProperty(exports,"buildFootnoteContentMap",{enumerable:true,get:function(){return chunkOTDF6PZK_js.h}});Object.defineProperty(exports,"buildFootnoteRenderItems",{enumerable:true,get:function(){return chunkOTDF6PZK_js.k}});Object.defineProperty(exports,"calculateFootnoteReservedHeights",{enumerable:true,get:function(){return chunkOTDF6PZK_js.i}});Object.defineProperty(exports,"collectFootnoteRefs",{enumerable:true,get:function(){return chunkOTDF6PZK_js.d}});Object.defineProperty(exports,"footnoteReservedHeightsEqual",{enumerable:true,get:function(){return chunkOTDF6PZK_js.c}});Object.defineProperty(exports,"mapFootnotesToPages",{enumerable:true,get:function(){return chunkOTDF6PZK_js.e}});Object.defineProperty(exports,"stabilizeFootnoteLayout",{enumerable:true,get:function(){return chunkOTDF6PZK_js.j}});Object.defineProperty(exports,"countPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.n}});Object.defineProperty(exports,"createColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.b}});Object.defineProperty(exports,"createHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.g}});Object.defineProperty(exports,"createLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.c}});Object.defineProperty(exports,"createPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.a}});Object.defineProperty(exports,"createPageBreakParagraph",{enumerable:true,get:function(){return chunkKESNGXGO_js.e}});Object.defineProperty(exports,"createPageBreakRun",{enumerable:true,get:function(){return chunkKESNGXGO_js.d}});Object.defineProperty(exports,"findPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.o}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunkKESNGXGO_js.m}});Object.defineProperty(exports,"insertHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.h}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.f}});Object.defineProperty(exports,"isBreakContent",{enumerable:true,get:function(){return chunkKESNGXGO_js.l}});Object.defineProperty(exports,"isColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.j}});Object.defineProperty(exports,"isLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.k}});Object.defineProperty(exports,"isPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.i}});Object.defineProperty(exports,"removePageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.p}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkZ4SJCSTS_js.a}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkZ4SJCSTS_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkZ4SJCSTS_js.g}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkZ4SJCSTS_js.d}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkZ4SJCSTS_js.f}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkN3EIZN65_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkN3EIZN65_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkN3EIZN65_js.a}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkNXLJVVVE_js.b}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkNXLJVVVE_js.a}});Object.defineProperty(exports,"docxtemplaterPlugin",{enumerable:true,get:function(){return chunkABBG4WD2_js.b}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.a}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.b}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.c}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.d}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.m}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.e}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.i}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.f}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.g}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.j}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.l}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.k}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.h}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkESI4BSBF_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkESI4BSBF_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.f}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkTE2AF7FM_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkTE2AF7FM_js.b}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunk3NLVHZMT_js.l}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkV435QKZB_js.f}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkV435QKZB_js.g}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkV435QKZB_js.e}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunk4BFNWPKW_js.c}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkV6SWUCTS_js.f}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkKBU6QQFU_js.g}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.e}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkKBU6QQFU_js.c}});Object.defineProperty(exports,"isFontsLoading",{enumerable:true,get:function(){return chunkKBU6QQFU_js.d}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkKBU6QQFU_js.a}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkKBU6QQFU_js.h}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.b}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkKBU6QQFU_js.f}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.m}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkKBU6QQFU_js.p}});Object.defineProperty(exports,"findParagraphByParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.b}});Object.defineProperty(exports,"findStartPosForParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.a}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.m}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.r}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.j}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.i}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.k}});Object.defineProperty(exports,"ensureHexPrefix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.n}});Object.defineProperty(exports,"generateThemeTintShadeMatrix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.q}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});Object.defineProperty(exports,"getThemeTintShadeHex",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.p}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.e}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.f}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.l}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.h}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.c}});Object.defineProperty(exports,"resolveHighlightToCss",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.o}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.g}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.p}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.j}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.d}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.i}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.h}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.c}});exports.EditorCoordinator=g;exports.ErrorManager=d;exports.LayoutCoordinator=p;exports.PluginLifecycleManager=u;exports.VERSION=to;exports.createSelectionFromDOM=A;exports.extractFormattingFromElement=h;exports.getSelectionRuns=f;exports.injectStyles=z;exports.rgbToHex=S;
package/dist/core.mjs CHANGED
@@ -1 +1 @@
1
- export{a as AutoSaveManager,b as formatLastSaveTime,e as formatStorageSize,c as getAutoSaveStatusLabel,d as getAutoSaveStorageSize,f as isAutoSaveSupported}from'./chunk-6NQSIC27.mjs';export{a as TABLE_DATA_ATTRIBUTES,f as TableSelectionManager,e as deleteTableFromDocument,b as findTableFromClick,c as getTableFromDocument,d as updateTableInDocument}from'./chunk-JHZ3HLSR.mjs';import {a}from'./chunk-D6GO7UGD.mjs';export{a as Subscribable}from'./chunk-D6GO7UGD.mjs';export{z as convertHeaderFooterToContent}from'./chunk-RCS6UNIJ.mjs';import'./chunk-6PR4XHQ3.mjs';export{a as FOOTNOTE_SEPARATOR_HEIGHT,b as MAX_FOOTNOTE_LAYOUT_PASSES,h as buildFootnoteContentMap,k as buildFootnoteRenderItems,i as calculateFootnoteReservedHeights,d as collectFootnoteRefs,c as footnoteReservedHeightsEqual,e as mapFootnotesToPages,j as stabilizeFootnoteLayout}from'./chunk-BTOBVF4I.mjs';import'./chunk-5TNMVXDS.mjs';import'./chunk-5N5DBQJV.mjs';import'./chunk-7E5VBRDL.mjs';import'./chunk-YMZ3F2FZ.mjs';import'./chunk-2D3UPAMA.mjs';export{n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,o as findPageBreaks,m as hasPageBreakBefore,h as insertHorizontalRule,f as insertPageBreak,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak}from'./chunk-WTFLNYAT.mjs';export{a as DocumentAgent,h as buildExtendedSelectionContext,g as buildSelectionContext,d as getAgentContext,f as getDocumentSummary}from'./chunk-EXOP727C.mjs';export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'./chunk-BOYVCOLZ.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'./chunk-CKKO4JWE.mjs';export{b as docxtemplaterPlugin}from'./chunk-AGNZEOVL.mjs';export{a as detectVariables,b as detectVariablesDetailed,c as detectVariablesInBody,d as detectVariablesInParagraph,m as documentHasVariables,e as extractVariablesFromText,i as formatVariable,f as hasTemplateVariables,g as isValidVariableName,j as parseVariable,l as removeVariables,k as replaceVariables,h as sanitizeVariableName}from'./chunk-ARHPXIBJ.mjs';export{e as getTemplateTags,a as processTemplate,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-CGJ6S3AH.mjs';export{a as executeCommand,b as executeCommands}from'./chunk-CUY2THAO.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'./chunk-UCZVMHB5.mjs';export{f as serializeDocumentBody,g as serializeDocx,e as serializeSectionProperties}from'./chunk-LDKESXXK.mjs';export{a as PluginRegistry,b as pluginRegistry,c as registerPlugins}from'./chunk-3NRMSZX2.mjs';export{f as parseDocx}from'./chunk-R7RR6M4A.mjs';import'./chunk-3GNIP6IX.mjs';export{g as canRenderFont,e as getLoadedFonts,c as isFontLoaded,d as isFontsLoading,a as loadFont,h as loadFontFromBuffer,b as loadFonts,f as onFontsLoaded,m as preloadCommonFonts,p as toArrayBuffer}from'./chunk-Y5HZAMND.mjs';export{b as findParagraphByParaId,a as findStartPosForParaId}from'./chunk-3SXJPJSV.mjs';import'./chunk-2RCMY2GE.mjs';import'./chunk-LBKMYD3M.mjs';import'./chunk-NBLJPT54.mjs';import'./chunk-QPFJJPIC.mjs';import'./chunk-ILJUDEZ5.mjs';import'./chunk-IBNUQL57.mjs';import'./chunk-6LOYA7G5.mjs';import'./chunk-NMSU4MWP.mjs';import'./chunk-P6RNOYAG.mjs';import'./chunk-MOKKS75W.mjs';import'./chunk-OZMNIX6U.mjs';import'./chunk-AMENZY5F.mjs';import'./chunk-BGY3CB37.mjs';import'./chunk-CP5OSG5Z.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,n as ensureHexPrefix,q as generateThemeTintShadeMatrix,g as getContrastingColor,p as getThemeTintShadeHex,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,c as resolveHighlightColor,o as resolveHighlightToCss,d as resolveShadingColor}from'./chunk-67LVRQIR.mjs';import'./chunk-LE67NTCN.mjs';import'./chunk-VQWZHPWI.mjs';export{e as emuToPixels,g as emuToTwips,p as formatPx,j as halfPointsToPixels,f as pixelsToEmu,d as pixelsToTwips,i as pointsToPixels,h as twipsToEmu,c as twipsToPixels}from'./chunk-VW22RZ6C.mjs';import {a as a$1}from'./chunk-QYUPLKLP.mjs';function L(i){if(!i||i==="transparent"||i==="inherit")return null;if(i.startsWith("#"))return i.slice(1).toUpperCase();let o=i.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o){let e=parseInt(o[1]).toString(16).padStart(2,"0"),t=parseInt(o[2]).toString(16).padStart(2,"0"),n=parseInt(o[3]).toString(16).padStart(2,"0");return (e+t+n).toUpperCase()}return null}function h(i){let o=window.getComputedStyle(i),e={};(o.fontWeight==="bold"||parseInt(o.fontWeight)>=700)&&(e.bold=true),o.fontStyle==="italic"&&(e.italic=true);let t=o.textDecoration||o.textDecorationLine;t&&t.includes("underline")&&(e.underline={style:"single"}),t&&t.includes("line-through")&&(e.strike=true);let n=parseFloat(o.fontSize);!isNaN(n)&&n>0&&(e.fontSize=Math.round(n/1.333*2));let r=o.fontFamily.replace(/["']/g,"").split(",")[0].trim();r&&(e.fontFamily={ascii:r});let s=o.color;if(s&&s!=="rgb(0, 0, 0)"){let c=L(s);c&&(e.color={rgb:c});}let l=o.backgroundColor;if(l&&l!=="transparent"&&l!=="rgba(0, 0, 0, 0)"){let c=S(l);c&&(e.shading={fill:{rgb:c}});}return Object.keys(e).length>0?e:void 0}function Lt(i,o){let e=document.createRange();e.selectNodeContents(i);let t=o.compareBoundaryPoints(Range.START_TO_START,e)>=0&&o.compareBoundaryPoints(Range.START_TO_END,e)<=0,n=o.compareBoundaryPoints(Range.END_TO_START,e)>=0&&o.compareBoundaryPoints(Range.END_TO_END,e)<=0;if(t&&n)return o.toString();if(t){let r=document.createRange();return r.setStart(o.startContainer,o.startOffset),r.selectNodeContents(i),r.setEnd(e.endContainer,e.endOffset),r.toString()}else if(n){let r=document.createRange();return r.selectNodeContents(i),r.setEnd(o.endContainer,o.endOffset),r.setStart(e.startContainer,e.startOffset),r.toString()}else if(o.intersectsNode(i))return i.textContent||"";return ""}function F(i){let o=i;for(;o;){if(o.nodeType===Node.ELEMENT_NODE){let e=o;if(e.hasAttribute("data-paragraph-index"))return e}o=o.parentNode;}return null}function f(){let i=window.getSelection();if(!i||i.isCollapsed)return [];let o=[],e=i.getRangeAt(0),t=e.commonAncestorContainer,n=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;if(!n)return o;if(n.querySelectorAll(".docx-run").forEach(s=>{if(e.intersectsNode(s)){let l=Lt(s,e);if(l){let c=h(s);o.push({type:"run",formatting:c,content:[{type:"text",text:l}]});}}}),o.length===0){let s=i.toString();s&&o.push({type:"run",content:[{type:"text",text:s}]});}return o}function A(){let i=window.getSelection();if(!i||i.isCollapsed)return null;let o=f();if(o.length===0)return null;let e=i.toString(),t=i.getRangeAt(0),n=F(t.startContainer),r=F(t.endContainer),s=n?parseInt(n.getAttribute("data-paragraph-index")||"0",10):0,l=r?parseInt(r.getAttribute("data-paragraph-index")||"0",10):0;return {text:e,runs:o,startParagraphIndex:s,startRunIndex:0,startOffset:t.startOffset,endParagraphIndex:l,endRunIndex:0,endOffset:t.endOffset,isMultiParagraph:s!==l}}var S=L;var d=class extends a{constructor(){super({notifications:[]});a$1(this,"notifications",[]);a$1(this,"idCounter",0);a$1(this,"timers",new Set);}showError(e,t){return this.addNotification(e,"error",t)}showWarning(e,t){return this.addNotification(e,"warning",t)}showInfo(e,t){return this.addNotification(e,"info",t)}dismiss(e){this.notifications=this.notifications.map(n=>n.id===e?{...n,dismissed:true}:n),this.emitSnapshot();let t=setTimeout(()=>{this.timers.delete(t),this.notifications=this.notifications.filter(n=>n.id!==e),this.emitSnapshot();},300);this.timers.add(t);}clearAll(){this.notifications=[];for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.emitSnapshot();}destroy(){for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.notifications=[];}addNotification(e,t,n){let r=`error-${++this.idCounter}-${Date.now()}`,s={id:r,message:e,severity:t,details:n,timestamp:Date.now()};if(this.notifications=[...this.notifications,s],this.emitSnapshot(),t!=="error"){let l=setTimeout(()=>{this.timers.delete(l),this.dismiss(r);},5e3);this.timers.add(l);}return r}emitSnapshot(){this.setSnapshot({notifications:this.notifications});}};function z(i,o){let e=`plugin-styles-${i}`,t=document.getElementById(e);t&&t.remove();let n=document.createElement("style");return n.id=e,n.textContent=o,document.head.appendChild(n),()=>{let r=document.getElementById(e);r&&r.remove();}}var u=class extends a{constructor(){super({states:new Map,version:0});a$1(this,"plugins",[]);a$1(this,"pluginStates",new Map);a$1(this,"version",0);}initialize(e,t){this.destroyPlugins(),this.plugins=e;for(let n of e)n.initialize&&!this.pluginStates.has(n.id)&&this.pluginStates.set(n.id,n.initialize(t));this.emitSnapshot();}updateStates(e){let t=false;for(let n of this.plugins)if(n.onStateChange){let r=n.onStateChange(e);r!==void 0&&(this.pluginStates.set(n.id,r),t=true);}return t&&(this.version++,this.emitSnapshot()),t}getPluginState(e){return this.pluginStates.get(e)}setPluginState(e,t){this.pluginStates.set(e,t),this.version++,this.emitSnapshot();}destroy(){this.destroyPlugins(),this.emitSnapshot();}destroyPlugins(){for(let e of this.plugins)e.destroy&&e.destroy();this.pluginStates.clear(),this.plugins=[];}emitSnapshot(){this.setSnapshot({states:new Map(this.pluginStates),version:this.version});}};var p=class extends a{constructor(){super({hasLayout:false,selectionRects:[],caretPosition:null,selectedImageInfo:null,isFocused:false,isDragging:false,isResizingColumn:false,isImageInteracting:false,version:0});a$1(this,"_hasLayout",false);a$1(this,"_selectionRects",[]);a$1(this,"_caretPosition",null);a$1(this,"_isDragging",false);a$1(this,"_dragAnchor",null);a$1(this,"_columnResize",{isResizing:false,startX:0,columnIndex:0,tablePmStart:0,originalWidths:{left:0,right:0}});a$1(this,"_selectedImageInfo",null);a$1(this,"_isImageInteracting",false);a$1(this,"_isFocused",false);a$1(this,"_version",0);}setLayoutReady(e){this._hasLayout=e,this.emitSnapshot();}updateSelection(e,t){this._selectionRects=e,this._caretPosition=t,this.emitSnapshot();}startDrag(e){this._isDragging=true,this._dragAnchor=e,this.emitSnapshot();}endDrag(){this._isDragging=false,this._dragAnchor=null,this.emitSnapshot();}getDragAnchor(){return this._dragAnchor}startColumnResize(e,t,n,r){this._columnResize={isResizing:true,startX:n,columnIndex:t,tablePmStart:e,originalWidths:r},this.emitSnapshot();}endColumnResize(){this._columnResize={...this._columnResize,isResizing:false},this.emitSnapshot();}getColumnResize(){return this._columnResize}setSelectedImage(e){this._selectedImageInfo=e,this.emitSnapshot();}clearSelectedImage(){this._selectedImageInfo=null,this._isImageInteracting=false,this.emitSnapshot();}setImageInteracting(e){this._isImageInteracting=e,this.emitSnapshot();}setFocused(e){this._isFocused=e,this.emitSnapshot();}emitSnapshot(){this._version++,this.setSnapshot({hasLayout:this._hasLayout,selectionRects:this._selectionRects,caretPosition:this._caretPosition,selectedImageInfo:this._selectedImageInfo,isFocused:this._isFocused,isDragging:this._isDragging,isResizingColumn:this._columnResize.isResizing,isImageInteracting:this._isImageInteracting,version:this._version});}};var g=class extends a{constructor(e={}){let t=e.initialZoom??1;super({loadingState:"idle",parseError:null,isReady:false,zoom:t,fontsLoaded:false,version:0});a$1(this,"_loadingState","idle");a$1(this,"_parseError",null);a$1(this,"_zoom");a$1(this,"_fontsLoaded",false);a$1(this,"_document",null);a$1(this,"_version",0);a$1(this,"onChangeCallback");a$1(this,"onErrorCallback");this._zoom=t,this.onChangeCallback=e.onChange,this.onErrorCallback=e.onError;}setParsingStarted(){this._loadingState="parsing",this._parseError=null,this.emitSnapshot();}setDocumentLoaded(e){this._document=e,this._loadingState="loading-fonts",this._parseError=null,this.emitSnapshot();}setFontsLoaded(){this._fontsLoaded=true,this._loadingState="ready",this.emitSnapshot();}setLoadError(e){this._loadingState="error",this._parseError=e.message,this.onErrorCallback?.(e),this.emitSnapshot();}getDocument(){return this._document}updateDocument(e){this._document=e,this.onChangeCallback?.(e),this.emitSnapshot();}setZoom(e){this._zoom=Math.max(.25,Math.min(4,e)),this.emitSnapshot();}getZoom(){return this._zoom}emitSnapshot(){this._version++,this.setSnapshot({loadingState:this._loadingState,parseError:this._parseError,isReady:this._loadingState==="ready",zoom:this._zoom,fontsLoaded:this._fontsLoaded,version:this._version});}};var to="0.0.2";export{g as EditorCoordinator,d as ErrorManager,p as LayoutCoordinator,u as PluginLifecycleManager,to as VERSION,A as createSelectionFromDOM,h as extractFormattingFromElement,f as getSelectionRuns,z as injectStyles,S as rgbToHex};
1
+ export{a as AutoSaveManager,b as formatLastSaveTime,e as formatStorageSize,c as getAutoSaveStatusLabel,d as getAutoSaveStorageSize,f as isAutoSaveSupported}from'./chunk-6NQSIC27.mjs';export{a as TABLE_DATA_ATTRIBUTES,f as TableSelectionManager,e as deleteTableFromDocument,b as findTableFromClick,c as getTableFromDocument,d as updateTableInDocument}from'./chunk-JHZ3HLSR.mjs';import {a}from'./chunk-D6GO7UGD.mjs';export{a as Subscribable}from'./chunk-D6GO7UGD.mjs';export{w as convertHeaderFooterToContent}from'./chunk-CUXXRGPQ.mjs';import'./chunk-7PX32GLB.mjs';export{a as FOOTNOTE_SEPARATOR_HEIGHT,b as MAX_FOOTNOTE_LAYOUT_PASSES,h as buildFootnoteContentMap,k as buildFootnoteRenderItems,i as calculateFootnoteReservedHeights,d as collectFootnoteRefs,c as footnoteReservedHeightsEqual,e as mapFootnotesToPages,j as stabilizeFootnoteLayout}from'./chunk-BFB4PRS4.mjs';import'./chunk-5SU4HPQS.mjs';import'./chunk-YMZ3F2FZ.mjs';import'./chunk-HAAMO2Z2.mjs';import'./chunk-EQVNAHL7.mjs';import'./chunk-FCJWLEKT.mjs';import'./chunk-7E5VBRDL.mjs';export{n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,o as findPageBreaks,m as hasPageBreakBefore,h as insertHorizontalRule,f as insertPageBreak,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak}from'./chunk-WTFLNYAT.mjs';export{a as DocumentAgent,h as buildExtendedSelectionContext,g as buildSelectionContext,d as getAgentContext,f as getDocumentSummary}from'./chunk-EV6W6KXG.mjs';export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'./chunk-Y7I5QDCN.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'./chunk-CKKO4JWE.mjs';export{b as docxtemplaterPlugin}from'./chunk-GHQS3I2W.mjs';export{a as detectVariables,b as detectVariablesDetailed,c as detectVariablesInBody,d as detectVariablesInParagraph,m as documentHasVariables,e as extractVariablesFromText,i as formatVariable,f as hasTemplateVariables,g as isValidVariableName,j as parseVariable,l as removeVariables,k as replaceVariables,h as sanitizeVariableName}from'./chunk-ARHPXIBJ.mjs';export{e as getTemplateTags,a as processTemplate,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-CGJ6S3AH.mjs';export{a as executeCommand,b as executeCommands}from'./chunk-CUY2THAO.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'./chunk-TRQN2SFW.mjs';export{f as serializeDocumentBody,g as serializeDocx,e as serializeSectionProperties}from'./chunk-LDKESXXK.mjs';export{a as PluginRegistry,b as pluginRegistry,c as registerPlugins}from'./chunk-3NRMSZX2.mjs';export{f as parseDocx}from'./chunk-2IE6UDHJ.mjs';import'./chunk-QMLIXLZJ.mjs';import'./chunk-3JXR6YU4.mjs';export{g as canRenderFont,e as getLoadedFonts,c as isFontLoaded,d as isFontsLoading,a as loadFont,h as loadFontFromBuffer,b as loadFonts,f as onFontsLoaded,m as preloadCommonFonts,p as toArrayBuffer}from'./chunk-Y5HZAMND.mjs';export{b as findParagraphByParaId,a as findStartPosForParaId}from'./chunk-3SXJPJSV.mjs';import'./chunk-NO5LW2DQ.mjs';import'./chunk-LBKMYD3M.mjs';import'./chunk-NBLJPT54.mjs';import'./chunk-QPFJJPIC.mjs';import'./chunk-ILJUDEZ5.mjs';import'./chunk-QVEAQOMR.mjs';import'./chunk-HL5PQT3A.mjs';import'./chunk-B6LYBJ4H.mjs';import'./chunk-TGPS3SRR.mjs';import'./chunk-BRHHK4MG.mjs';import'./chunk-MOKKS75W.mjs';import'./chunk-OZMNIX6U.mjs';import'./chunk-AMENZY5F.mjs';import'./chunk-BGY3CB37.mjs';import'./chunk-CP5OSG5Z.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,n as ensureHexPrefix,q as generateThemeTintShadeMatrix,g as getContrastingColor,p as getThemeTintShadeHex,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,c as resolveHighlightColor,o as resolveHighlightToCss,d as resolveShadingColor}from'./chunk-67LVRQIR.mjs';import'./chunk-LE67NTCN.mjs';import'./chunk-VQWZHPWI.mjs';export{e as emuToPixels,g as emuToTwips,p as formatPx,j as halfPointsToPixels,f as pixelsToEmu,d as pixelsToTwips,i as pointsToPixels,h as twipsToEmu,c as twipsToPixels}from'./chunk-VW22RZ6C.mjs';import {a as a$1}from'./chunk-QYUPLKLP.mjs';function L(i){if(!i||i==="transparent"||i==="inherit")return null;if(i.startsWith("#"))return i.slice(1).toUpperCase();let o=i.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o){let e=parseInt(o[1]).toString(16).padStart(2,"0"),t=parseInt(o[2]).toString(16).padStart(2,"0"),n=parseInt(o[3]).toString(16).padStart(2,"0");return (e+t+n).toUpperCase()}return null}function h(i){let o=window.getComputedStyle(i),e={};(o.fontWeight==="bold"||parseInt(o.fontWeight)>=700)&&(e.bold=true),o.fontStyle==="italic"&&(e.italic=true);let t=o.textDecoration||o.textDecorationLine;t&&t.includes("underline")&&(e.underline={style:"single"}),t&&t.includes("line-through")&&(e.strike=true);let n=parseFloat(o.fontSize);!isNaN(n)&&n>0&&(e.fontSize=Math.round(n/1.333*2));let r=o.fontFamily.replace(/["']/g,"").split(",")[0].trim();r&&(e.fontFamily={ascii:r});let s=o.color;if(s&&s!=="rgb(0, 0, 0)"){let c=L(s);c&&(e.color={rgb:c});}let l=o.backgroundColor;if(l&&l!=="transparent"&&l!=="rgba(0, 0, 0, 0)"){let c=S(l);c&&(e.shading={fill:{rgb:c}});}return Object.keys(e).length>0?e:void 0}function Lt(i,o){let e=document.createRange();e.selectNodeContents(i);let t=o.compareBoundaryPoints(Range.START_TO_START,e)>=0&&o.compareBoundaryPoints(Range.START_TO_END,e)<=0,n=o.compareBoundaryPoints(Range.END_TO_START,e)>=0&&o.compareBoundaryPoints(Range.END_TO_END,e)<=0;if(t&&n)return o.toString();if(t){let r=document.createRange();return r.setStart(o.startContainer,o.startOffset),r.selectNodeContents(i),r.setEnd(e.endContainer,e.endOffset),r.toString()}else if(n){let r=document.createRange();return r.selectNodeContents(i),r.setEnd(o.endContainer,o.endOffset),r.setStart(e.startContainer,e.startOffset),r.toString()}else if(o.intersectsNode(i))return i.textContent||"";return ""}function F(i){let o=i;for(;o;){if(o.nodeType===Node.ELEMENT_NODE){let e=o;if(e.hasAttribute("data-paragraph-index"))return e}o=o.parentNode;}return null}function f(){let i=window.getSelection();if(!i||i.isCollapsed)return [];let o=[],e=i.getRangeAt(0),t=e.commonAncestorContainer,n=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;if(!n)return o;if(n.querySelectorAll(".docx-run").forEach(s=>{if(e.intersectsNode(s)){let l=Lt(s,e);if(l){let c=h(s);o.push({type:"run",formatting:c,content:[{type:"text",text:l}]});}}}),o.length===0){let s=i.toString();s&&o.push({type:"run",content:[{type:"text",text:s}]});}return o}function A(){let i=window.getSelection();if(!i||i.isCollapsed)return null;let o=f();if(o.length===0)return null;let e=i.toString(),t=i.getRangeAt(0),n=F(t.startContainer),r=F(t.endContainer),s=n?parseInt(n.getAttribute("data-paragraph-index")||"0",10):0,l=r?parseInt(r.getAttribute("data-paragraph-index")||"0",10):0;return {text:e,runs:o,startParagraphIndex:s,startRunIndex:0,startOffset:t.startOffset,endParagraphIndex:l,endRunIndex:0,endOffset:t.endOffset,isMultiParagraph:s!==l}}var S=L;var d=class extends a{constructor(){super({notifications:[]});a$1(this,"notifications",[]);a$1(this,"idCounter",0);a$1(this,"timers",new Set);}showError(e,t){return this.addNotification(e,"error",t)}showWarning(e,t){return this.addNotification(e,"warning",t)}showInfo(e,t){return this.addNotification(e,"info",t)}dismiss(e){this.notifications=this.notifications.map(n=>n.id===e?{...n,dismissed:true}:n),this.emitSnapshot();let t=setTimeout(()=>{this.timers.delete(t),this.notifications=this.notifications.filter(n=>n.id!==e),this.emitSnapshot();},300);this.timers.add(t);}clearAll(){this.notifications=[];for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.emitSnapshot();}destroy(){for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.notifications=[];}addNotification(e,t,n){let r=`error-${++this.idCounter}-${Date.now()}`,s={id:r,message:e,severity:t,details:n,timestamp:Date.now()};if(this.notifications=[...this.notifications,s],this.emitSnapshot(),t!=="error"){let l=setTimeout(()=>{this.timers.delete(l),this.dismiss(r);},5e3);this.timers.add(l);}return r}emitSnapshot(){this.setSnapshot({notifications:this.notifications});}};function z(i,o){let e=`plugin-styles-${i}`,t=document.getElementById(e);t&&t.remove();let n=document.createElement("style");return n.id=e,n.textContent=o,document.head.appendChild(n),()=>{let r=document.getElementById(e);r&&r.remove();}}var u=class extends a{constructor(){super({states:new Map,version:0});a$1(this,"plugins",[]);a$1(this,"pluginStates",new Map);a$1(this,"version",0);}initialize(e,t){this.destroyPlugins(),this.plugins=e;for(let n of e)n.initialize&&!this.pluginStates.has(n.id)&&this.pluginStates.set(n.id,n.initialize(t));this.emitSnapshot();}updateStates(e){let t=false;for(let n of this.plugins)if(n.onStateChange){let r=n.onStateChange(e);r!==void 0&&(this.pluginStates.set(n.id,r),t=true);}return t&&(this.version++,this.emitSnapshot()),t}getPluginState(e){return this.pluginStates.get(e)}setPluginState(e,t){this.pluginStates.set(e,t),this.version++,this.emitSnapshot();}destroy(){this.destroyPlugins(),this.emitSnapshot();}destroyPlugins(){for(let e of this.plugins)e.destroy&&e.destroy();this.pluginStates.clear(),this.plugins=[];}emitSnapshot(){this.setSnapshot({states:new Map(this.pluginStates),version:this.version});}};var p=class extends a{constructor(){super({hasLayout:false,selectionRects:[],caretPosition:null,selectedImageInfo:null,isFocused:false,isDragging:false,isResizingColumn:false,isImageInteracting:false,version:0});a$1(this,"_hasLayout",false);a$1(this,"_selectionRects",[]);a$1(this,"_caretPosition",null);a$1(this,"_isDragging",false);a$1(this,"_dragAnchor",null);a$1(this,"_columnResize",{isResizing:false,startX:0,columnIndex:0,tablePmStart:0,originalWidths:{left:0,right:0}});a$1(this,"_selectedImageInfo",null);a$1(this,"_isImageInteracting",false);a$1(this,"_isFocused",false);a$1(this,"_version",0);}setLayoutReady(e){this._hasLayout=e,this.emitSnapshot();}updateSelection(e,t){this._selectionRects=e,this._caretPosition=t,this.emitSnapshot();}startDrag(e){this._isDragging=true,this._dragAnchor=e,this.emitSnapshot();}endDrag(){this._isDragging=false,this._dragAnchor=null,this.emitSnapshot();}getDragAnchor(){return this._dragAnchor}startColumnResize(e,t,n,r){this._columnResize={isResizing:true,startX:n,columnIndex:t,tablePmStart:e,originalWidths:r},this.emitSnapshot();}endColumnResize(){this._columnResize={...this._columnResize,isResizing:false},this.emitSnapshot();}getColumnResize(){return this._columnResize}setSelectedImage(e){this._selectedImageInfo=e,this.emitSnapshot();}clearSelectedImage(){this._selectedImageInfo=null,this._isImageInteracting=false,this.emitSnapshot();}setImageInteracting(e){this._isImageInteracting=e,this.emitSnapshot();}setFocused(e){this._isFocused=e,this.emitSnapshot();}emitSnapshot(){this._version++,this.setSnapshot({hasLayout:this._hasLayout,selectionRects:this._selectionRects,caretPosition:this._caretPosition,selectedImageInfo:this._selectedImageInfo,isFocused:this._isFocused,isDragging:this._isDragging,isResizingColumn:this._columnResize.isResizing,isImageInteracting:this._isImageInteracting,version:this._version});}};var g=class extends a{constructor(e={}){let t=e.initialZoom??1;super({loadingState:"idle",parseError:null,isReady:false,zoom:t,fontsLoaded:false,version:0});a$1(this,"_loadingState","idle");a$1(this,"_parseError",null);a$1(this,"_zoom");a$1(this,"_fontsLoaded",false);a$1(this,"_document",null);a$1(this,"_version",0);a$1(this,"onChangeCallback");a$1(this,"onErrorCallback");this._zoom=t,this.onChangeCallback=e.onChange,this.onErrorCallback=e.onError;}setParsingStarted(){this._loadingState="parsing",this._parseError=null,this.emitSnapshot();}setDocumentLoaded(e){this._document=e,this._loadingState="loading-fonts",this._parseError=null,this.emitSnapshot();}setFontsLoaded(){this._fontsLoaded=true,this._loadingState="ready",this.emitSnapshot();}setLoadError(e){this._loadingState="error",this._parseError=e.message,this.onErrorCallback?.(e),this.emitSnapshot();}getDocument(){return this._document}updateDocument(e){this._document=e,this.onChangeCallback?.(e),this.emitSnapshot();}setZoom(e){this._zoom=Math.max(.25,Math.min(4,e)),this.emitSnapshot();}getZoom(){return this._zoom}emitSnapshot(){this._version++,this.setSnapshot({loadingState:this._loadingState,parseError:this._parseError,isReady:this._loadingState==="ready",zoom:this._zoom,fontsLoaded:this._fontsLoaded,version:this._version});}};var to="0.0.2";export{g as EditorCoordinator,d as ErrorManager,p as LayoutCoordinator,u as PluginLifecycleManager,to as VERSION,A as createSelectionFromDOM,h as extractFormattingFromElement,f as getSelectionRuns,z as injectStyles,S as rgbToHex};
@@ -17,10 +17,10 @@ export { createDocx, default as repackDocx, updateMultipleFiles } from './rezip.
17
17
  export { a as attemptSelectiveSave } from '../selectiveSave-jinP_4xa.mjs';
18
18
  export { b as buildPatchedDocumentXml, v as validatePatchSafety } from '../selectiveXmlPatch-ypkxlTD_.mjs';
19
19
  import { Image, Endnote, Footnote, EndnoteProperties, FootnoteProperties, Run, FieldType, Field, SimpleField, Hyperlink, Shape, Table, TableCell, Paragraph, TextBox, ImageSize, ImagePosition, ImageWrap, BlockContent, Comment } from '../types/content.mjs';
20
- import { b as RelationshipMap, M as MediaFile, S as Style, T as Theme } from '../styles-BBoqh07F.mjs';
20
+ import { b as RelationshipMap, M as MediaFile, S as Style, T as Theme } from '../styles-EI2lxeEN.mjs';
21
21
  import { Element } from 'xml-js';
22
- import { N as NumberingDefinitions, L as ListLevel, A as AbstractNumbering, d as NumberingInstance, c as NumberFormat } from '../lists-JDB80qyP.mjs';
23
- import { e as TabStopAlignment, c as TabLeader, d as TabStop, C as CellMargins, F as FloatingTableProperties, f as TableBorders, i as TableLook, j as TableMeasurement, h as TableFormatting } from '../formatting-D9I-lFS4.mjs';
22
+ import { N as NumberingDefinitions, L as ListLevel, A as AbstractNumbering, d as NumberingInstance, a as NumberFormat } from '../lists-CvG_iVK3.mjs';
23
+ import { i as TabStopAlignment, h as TabLeader, e as TabStop, C as CellMargins, F as FloatingTableProperties, j as TableBorders, f as TableLook, k as TableMeasurement, a as TableFormatting } from '../formatting-BH4hcZiq.mjs';
24
24
  export { emuToPixels, pixelsToEmu } from '../utils/units.mjs';
25
25
  import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.mjs';
26
26
  import '../types/document.mjs';
@@ -17,10 +17,10 @@ export { createDocx, default as repackDocx, updateMultipleFiles } from './rezip.
17
17
  export { a as attemptSelectiveSave } from '../selectiveSave-CWaPEv0B.js';
18
18
  export { b as buildPatchedDocumentXml, v as validatePatchSafety } from '../selectiveXmlPatch-ypkxlTD_.js';
19
19
  import { Image, Endnote, Footnote, EndnoteProperties, FootnoteProperties, Run, FieldType, Field, SimpleField, Hyperlink, Shape, Table, TableCell, Paragraph, TextBox, ImageSize, ImagePosition, ImageWrap, BlockContent, Comment } from '../types/content.js';
20
- import { b as RelationshipMap, M as MediaFile, S as Style, T as Theme } from '../styles-jqO45PSq.js';
20
+ import { b as RelationshipMap, M as MediaFile, S as Style, T as Theme } from '../styles-BBv7doYK.js';
21
21
  import { Element } from 'xml-js';
22
- import { N as NumberingDefinitions, L as ListLevel, A as AbstractNumbering, d as NumberingInstance, c as NumberFormat } from '../lists-CdiIk_c1.js';
23
- import { e as TabStopAlignment, c as TabLeader, d as TabStop, C as CellMargins, F as FloatingTableProperties, f as TableBorders, i as TableLook, j as TableMeasurement, h as TableFormatting } from '../formatting-BwpZWdGi.js';
22
+ import { N as NumberingDefinitions, L as ListLevel, A as AbstractNumbering, d as NumberingInstance, a as NumberFormat } from '../lists-UTp_tk7B.js';
23
+ import { i as TabStopAlignment, h as TabLeader, e as TabStop, C as CellMargins, F as FloatingTableProperties, j as TableBorders, f as TableLook, k as TableMeasurement, a as TableFormatting } from '../formatting-_OXU8gLB.js';
24
24
  export { emuToPixels, pixelsToEmu } from '../utils/units.js';
25
25
  import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.js';
26
26
  import '../types/document.js';
@@ -1 +1 @@
1
- 'use strict';var chunkCP767TWV_js=require('../chunk-CP767TWV.js'),chunkLTYW3NLX_js=require('../chunk-LTYW3NLX.js');require('../chunk-V435QKZB.js');var chunkC6GSFUV2_js=require('../chunk-C6GSFUV2.js'),chunkDV6IEOP5_js=require('../chunk-DV6IEOP5.js');require('../chunk-KBU6QQFU.js'),require('../chunk-MZOVDLYL.js');var chunkYGHHSCPR_js=require('../chunk-YGHHSCPR.js'),chunk7VCMJCBY_js=require('../chunk-7VCMJCBY.js');require('../chunk-C2BAPYGJ.js'),require('../chunk-Q4CKLXWA.js');var chunk4Q2IP5FW_js=require('../chunk-4Q2IP5FW.js');require('../chunk-DC7S76ZX.js');var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=chunk7VCMJCBY_js.j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=chunk7VCMJCBY_js.j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=chunk7VCMJCBY_js.j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=chunk7VCMJCBY_js.f(e,"w","r");for(let u of l){let c=chunkDV6IEOP5_js.z(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=chunkYGHHSCPR_js.b(e);if(n){if(n.type==="gradient"&&e){let r=chunk7VCMJCBY_js.i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=chunk7VCMJCBY_js.i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=chunk7VCMJCBY_js.h(t,"a:fillRef");if(o){if(chunk7VCMJCBY_js.j(o,null,"idx")==="0")return {type:"none"};let i=chunkYGHHSCPR_js.a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=chunk7VCMJCBY_js.i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=chunk7VCMJCBY_js.j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i=t.find(l=>l.name==="a:path");if(i){let l=chunk7VCMJCBY_js.j(i,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a=t.find(l=>l.name==="a:gsLst"),s=[];if(a){let l=chunk7VCMJCBY_js.g(a,"gs");for(let u of l){let c=chunk7VCMJCBY_js.j(u,null,"pos"),p=c?parseInt(c,10):0,m=chunkYGHHSCPR_js.a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?chunk7VCMJCBY_js.h(e,"a:ln"):null;if(!n){if(t){let f=chunk7VCMJCBY_js.h(t,"a:lnRef");if(f){if(chunk7VCMJCBY_js.j(f,null,"idx")==="0")return;let g=chunkYGHHSCPR_js.a(f);if(g)return {color:g,width:9525}}}return}let o=chunk7VCMJCBY_js.i(n);if(o.find(f=>f.name==="a:noFill"))return;let i={},a=chunk7VCMJCBY_js.j(n,null,"w");a&&(i.width=parseInt(a,10));let s=chunk7VCMJCBY_js.j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i.join="bevel":c?i.join="round":u&&(i.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i.color=chunkYGHHSCPR_js.a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=chunk7VCMJCBY_js.j(m,null,"val");f&&(i.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i.tailEnd=X(T)),i}function X(e){let t=chunk7VCMJCBY_js.j(e,null,"type")??"none",n=chunk7VCMJCBY_js.j(e,null,"w"),o=chunk7VCMJCBY_js.j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=chunk7VCMJCBY_js.h(e,"a:ext"),n=chunk7VCMJCBY_js.l(t,null,"cx")??0,o=chunk7VCMJCBY_js.l(t,null,"cy")??0,r={width:n,height:o},i=chunk7VCMJCBY_js.h(e,"a:off"),a;if(i){let m=chunk7VCMJCBY_js.l(i,null,"x")??0,y=chunk7VCMJCBY_js.l(i,null,"y")??0;a={x:m,y};}let s=chunk7VCMJCBY_js.j(e,null,"rot"),l=chunk7VCMJCBY_js.j(e,null,"flipH")==="1",u=chunk7VCMJCBY_js.j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l||u)&&(p={},c!==void 0&&(p.rotation=c),l&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=chunk7VCMJCBY_js.h(e,"a:prstGeom");if(t){let o=chunk7VCMJCBY_js.j(t,null,"prst");if(o)return o}return chunk7VCMJCBY_js.h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=chunk7VCMJCBY_js.j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=chunk7VCMJCBY_js.j(e,null,"rot");o&&(t.rotation=H(o));let r=chunk7VCMJCBY_js.j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}chunk7VCMJCBY_js.j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=chunk7VCMJCBY_js.h(e,"a:noAutofit"),a=chunk7VCMJCBY_js.h(e,"a:normAutofit"),s=chunk7VCMJCBY_js.h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l=chunk7VCMJCBY_js.l(e,null,"lIns"),u=chunk7VCMJCBY_js.l(e,null,"rIns"),c=chunk7VCMJCBY_js.l(e,null,"tIns"),p=chunk7VCMJCBY_js.l(e,null,"bIns");return (l!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=chunk7VCMJCBY_js.g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=chunk7VCMJCBY_js.i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i=t.find(g=>g.name==="wps:txbx"),a=i?chunk7VCMJCBY_js.h(i,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?chunk7VCMJCBY_js.h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=chunk7VCMJCBY_js.j(n,null,"id")??void 0,f=chunk7VCMJCBY_js.j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=chunk7VCMJCBY_js.i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=chunk7VCMJCBY_js.h(n,"a:graphic");if(!r)return null;let i=chunk7VCMJCBY_js.h(r,"a:graphicData");if(!i)return null;let a=chunk7VCMJCBY_js.h(i,"wps:wsp");if(!a)return null;let s=W(a),l=chunk7VCMJCBY_js.h(n,"wp:extent");if(l){let c=chunk7VCMJCBY_js.l(l,null,"cx")??0,p=chunk7VCMJCBY_js.l(l,null,"cy")??0;s.size={width:c,height:p};}if(o){let c=chunkYGHHSCPR_js.c(n);c&&(s.position=c);let p=chunkYGHHSCPR_js.d(n);p&&(s.wrap=p);}let u=chunk7VCMJCBY_js.h(n,"wp:docPr");if(u){let c=chunk7VCMJCBY_js.j(u,null,"id"),p=chunk7VCMJCBY_js.j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=chunk7VCMJCBY_js.i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=chunk7VCMJCBY_js.h(n,"a:graphic");if(!o)return false;let r=chunk7VCMJCBY_js.h(o,"a:graphicData");return r?chunk7VCMJCBY_js.h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e){return chunk4Q2IP5FW_js.e(e.size.width)}function Bt(e){return chunk4Q2IP5FW_js.e(e.size.height)}function vt(e){return {width:chunk4Q2IP5FW_js.e(e.size.width),height:chunk4Q2IP5FW_js.e(e.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e){return e.outline?.width?chunk4Q2IP5FW_js.e(e.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return chunkYGHHSCPR_js.e(e.fill.color)}function Wt(e){if(e.outline?.color)return chunkYGHHSCPR_js.e(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=chunk7VCMJCBY_js.l(e,"w","pos"),n=chunk7VCMJCBY_js.j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=chunk7VCMJCBY_js.j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=chunk7VCMJCBY_js.f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=chunk7VCMJCBY_js.e(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkCP767TWV_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkCP767TWV_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkCP767TWV_js.a}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkLTYW3NLX_js.l}});Object.defineProperty(exports,"formatNumber",{enumerable:true,get:function(){return chunkC6GSFUV2_js.b}});Object.defineProperty(exports,"getBulletCharacter",{enumerable:true,get:function(){return chunkC6GSFUV2_js.d}});Object.defineProperty(exports,"isBulletLevel",{enumerable:true,get:function(){return chunkC6GSFUV2_js.e}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkC6GSFUV2_js.f}});Object.defineProperty(exports,"parseNumbering",{enumerable:true,get:function(){return chunkC6GSFUV2_js.a}});Object.defineProperty(exports,"renderListMarker",{enumerable:true,get:function(){return chunkC6GSFUV2_js.c}});Object.defineProperty(exports,"getEndnoteText",{enumerable:true,get:function(){return chunkDV6IEOP5_js.w}});Object.defineProperty(exports,"getFootnoteText",{enumerable:true,get:function(){return chunkDV6IEOP5_js.v}});Object.defineProperty(exports,"getHyperlinkRuns",{enumerable:true,get:function(){return chunkDV6IEOP5_js.G}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkDV6IEOP5_js.B}});Object.defineProperty(exports,"getHyperlinkUrl",{enumerable:true,get:function(){return chunkDV6IEOP5_js.E}});Object.defineProperty(exports,"getTableColumnCount",{enumerable:true,get:function(){return chunkDV6IEOP5_js.j}});Object.defineProperty(exports,"getTableRowCount",{enumerable:true,get:function(){return chunkDV6IEOP5_js.k}});Object.defineProperty(exports,"hasContent",{enumerable:true,get:function(){return chunkDV6IEOP5_js.F}});Object.defineProperty(exports,"hasHeaderRow",{enumerable:true,get:function(){return chunkDV6IEOP5_js.n}});Object.defineProperty(exports,"isCellMergeContinuation",{enumerable:true,get:function(){return chunkDV6IEOP5_js.l}});Object.defineProperty(exports,"isCellMergeStart",{enumerable:true,get:function(){return chunkDV6IEOP5_js.m}});Object.defineProperty(exports,"isExternalLink",{enumerable:true,get:function(){return chunkDV6IEOP5_js.C}});Object.defineProperty(exports,"isInternalLink",{enumerable:true,get:function(){return chunkDV6IEOP5_js.D}});Object.defineProperty(exports,"isSeparatorEndnote",{enumerable:true,get:function(){return chunkDV6IEOP5_js.y}});Object.defineProperty(exports,"isSeparatorFootnote",{enumerable:true,get:function(){return chunkDV6IEOP5_js.x}});Object.defineProperty(exports,"parseBorderSpec",{enumerable:true,get:function(){return chunkDV6IEOP5_js.d}});Object.defineProperty(exports,"parseCellMargins",{enumerable:true,get:function(){return chunkDV6IEOP5_js.f}});Object.defineProperty(exports,"parseEndnoteProperties",{enumerable:true,get:function(){return chunkDV6IEOP5_js.u}});Object.defineProperty(exports,"parseEndnotes",{enumerable:true,get:function(){return chunkDV6IEOP5_js.s}});Object.defineProperty(exports,"parseFloatingTableProperties",{enumerable:true,get:function(){return chunkDV6IEOP5_js.i}});Object.defineProperty(exports,"parseFootnoteProperties",{enumerable:true,get:function(){return chunkDV6IEOP5_js.t}});Object.defineProperty(exports,"parseFootnotes",{enumerable:true,get:function(){return chunkDV6IEOP5_js.r}});Object.defineProperty(exports,"parseHyperlink",{enumerable:true,get:function(){return chunkDV6IEOP5_js.A}});Object.defineProperty(exports,"parseShading",{enumerable:true,get:function(){return chunkDV6IEOP5_js.g}});Object.defineProperty(exports,"parseTableBorders",{enumerable:true,get:function(){return chunkDV6IEOP5_js.e}});Object.defineProperty(exports,"parseTableLook",{enumerable:true,get:function(){return chunkDV6IEOP5_js.h}});Object.defineProperty(exports,"parseTableMeasurement",{enumerable:true,get:function(){return chunkDV6IEOP5_js.c}});Object.defineProperty(exports,"parseTableProperties",{enumerable:true,get:function(){return chunkDV6IEOP5_js.o}});Object.defineProperty(exports,"resolveHyperlinkUrl",{enumerable:true,get:function(){return chunkDV6IEOP5_js.H}});Object.defineProperty(exports,"extractTextBoxContentElements",{enumerable:true,get:function(){return chunkYGHHSCPR_js.f}});Object.defineProperty(exports,"getImageHeightPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.F}});Object.defineProperty(exports,"getImageWidthPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.E}});Object.defineProperty(exports,"getTextBoxContentElement",{enumerable:true,get:function(){return chunkYGHHSCPR_js.k}});Object.defineProperty(exports,"getTextBoxDimensionsPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.o}});Object.defineProperty(exports,"getTextBoxHeightPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.n}});Object.defineProperty(exports,"getTextBoxMarginsPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.p}});Object.defineProperty(exports,"getTextBoxOutlineWidthPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.x}});Object.defineProperty(exports,"getTextBoxText",{enumerable:true,get:function(){return chunkYGHHSCPR_js.u}});Object.defineProperty(exports,"getTextBoxWidthPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.m}});Object.defineProperty(exports,"getWrapDistancesPx",{enumerable:true,get:function(){return chunkYGHHSCPR_js.H}});Object.defineProperty(exports,"hasTextBoxContent",{enumerable:true,get:function(){return chunkYGHHSCPR_js.t}});Object.defineProperty(exports,"hasTextBoxFill",{enumerable:true,get:function(){return chunkYGHHSCPR_js.r}});Object.defineProperty(exports,"hasTextBoxOutline",{enumerable:true,get:function(){return chunkYGHHSCPR_js.s}});Object.defineProperty(exports,"isBehindText",{enumerable:true,get:function(){return chunkYGHHSCPR_js.C}});Object.defineProperty(exports,"isDecorativeImage",{enumerable:true,get:function(){return chunkYGHHSCPR_js.G}});Object.defineProperty(exports,"isFloatingImage",{enumerable:true,get:function(){return chunkYGHHSCPR_js.B}});Object.defineProperty(exports,"isFloatingTextBox",{enumerable:true,get:function(){return chunkYGHHSCPR_js.q}});Object.defineProperty(exports,"isInFrontOfText",{enumerable:true,get:function(){return chunkYGHHSCPR_js.D}});Object.defineProperty(exports,"isInlineImage",{enumerable:true,get:function(){return chunkYGHHSCPR_js.A}});Object.defineProperty(exports,"isShapeTextBox",{enumerable:true,get:function(){return chunkYGHHSCPR_js.i}});Object.defineProperty(exports,"isTextBoxDrawing",{enumerable:true,get:function(){return chunkYGHHSCPR_js.h}});Object.defineProperty(exports,"parseDrawing",{enumerable:true,get:function(){return chunkYGHHSCPR_js.y}});Object.defineProperty(exports,"parseImage",{enumerable:true,get:function(){return chunkYGHHSCPR_js.z}});Object.defineProperty(exports,"parseTextBox",{enumerable:true,get:function(){return chunkYGHHSCPR_js.j}});Object.defineProperty(exports,"parseTextBoxContent",{enumerable:true,get:function(){return chunkYGHHSCPR_js.g}});Object.defineProperty(exports,"parseTextBoxFromShape",{enumerable:true,get:function(){return chunkYGHHSCPR_js.l}});Object.defineProperty(exports,"resolveTextBoxFillColor",{enumerable:true,get:function(){return chunkYGHHSCPR_js.v}});Object.defineProperty(exports,"resolveTextBoxOutlineColor",{enumerable:true,get:function(){return chunkYGHHSCPR_js.w}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});exports.DEFAULT_TAB_ALIGNMENT=L;exports.DEFAULT_TAB_INTERVAL_TWIPS=R;exports.DEFAULT_TAB_LEADER=Vt;exports.KNOWN_FIELD_TYPES=M;exports.calculateTabWidth=jt;exports.calculateTabWidthWithAlignment=zt;exports.createComplexFieldContext=dt;exports.getFieldDisplayValue=ft;exports.getFormatSwitch=pt;exports.getLeaderCharacter=Kt;exports.getNextTabStop=D;exports.getOutlineWidthPx=Xt;exports.getShapeDimensionsPx=vt;exports.getShapeHeightPx=Bt;exports.getShapeWidthPx=Nt;exports.hasFill=kt;exports.hasMergeFormat=ct;exports.hasOutline=Ut;exports.hasTextContent=Pt;exports.hasVisibleLeader=Yt;exports.injectReplyRangeMarkers=Jt;exports.injectTCReplyRangeMarkers=Zt;exports.isDateTimeField=gt;exports.isDocPropertyField=Tt;exports.isFloatingShape=Ot;exports.isKnownFieldType=at;exports.isLineShape=Lt;exports.isMergeField=yt;exports.isPageNumberField=mt;exports.isReferenceField=xt;exports.isShapeDrawing=Rt;exports.isTextBoxShape=Dt;exports.isTocField=St;exports.isTotalPagesField=ht;exports.mergeTabStops=_t;exports.parseFieldInstruction=st;exports.parseFieldType=I;exports.parseShape=W;exports.parseShapeFromDrawing=It;exports.parseSimpleField=ut;exports.parseTabStop=V;exports.parseTabStops=G;exports.parseTabStopsFromParagraphProperties=Gt;exports.resolveFillColor=Ht;exports.resolveOutlineColor=Wt;
1
+ 'use strict';var chunkN3EIZN65_js=require('../chunk-N3EIZN65.js'),chunk3NLVHZMT_js=require('../chunk-3NLVHZMT.js');require('../chunk-V435QKZB.js');var chunkV6SWUCTS_js=require('../chunk-V6SWUCTS.js'),chunkYCDB5TA6_js=require('../chunk-YCDB5TA6.js');require('../chunk-IN6IYQ2X.js'),require('../chunk-KBU6QQFU.js'),require('../chunk-MZOVDLYL.js');var chunkEPX7BBJD_js=require('../chunk-EPX7BBJD.js');require('../chunk-D536HC5M.js');var chunkTMISJEGL_js=require('../chunk-TMISJEGL.js');require('../chunk-C2BAPYGJ.js'),require('../chunk-Q4CKLXWA.js');var chunk4Q2IP5FW_js=require('../chunk-4Q2IP5FW.js');require('../chunk-DC7S76ZX.js');var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=chunkTMISJEGL_js.j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=chunkTMISJEGL_js.j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=chunkTMISJEGL_js.j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=chunkTMISJEGL_js.f(e,"w","r");for(let u of l){let c=chunkYCDB5TA6_js.E(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=chunkEPX7BBJD_js.b(e);if(n){if(n.type==="gradient"&&e){let r=chunkTMISJEGL_js.i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=chunkTMISJEGL_js.i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=chunkTMISJEGL_js.h(t,"a:fillRef");if(o){if(chunkTMISJEGL_js.j(o,null,"idx")==="0")return {type:"none"};let i=chunkEPX7BBJD_js.a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=chunkTMISJEGL_js.i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=chunkTMISJEGL_js.j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i=t.find(l=>l.name==="a:path");if(i){let l=chunkTMISJEGL_js.j(i,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a=t.find(l=>l.name==="a:gsLst"),s=[];if(a){let l=chunkTMISJEGL_js.g(a,"gs");for(let u of l){let c=chunkTMISJEGL_js.j(u,null,"pos"),p=c?parseInt(c,10):0,m=chunkEPX7BBJD_js.a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?chunkTMISJEGL_js.h(e,"a:ln"):null;if(!n){if(t){let f=chunkTMISJEGL_js.h(t,"a:lnRef");if(f){if(chunkTMISJEGL_js.j(f,null,"idx")==="0")return;let g=chunkEPX7BBJD_js.a(f);if(g)return {color:g,width:9525}}}return}let o=chunkTMISJEGL_js.i(n);if(o.find(f=>f.name==="a:noFill"))return;let i={},a=chunkTMISJEGL_js.j(n,null,"w");a&&(i.width=parseInt(a,10));let s=chunkTMISJEGL_js.j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i.join="bevel":c?i.join="round":u&&(i.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i.color=chunkEPX7BBJD_js.a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=chunkTMISJEGL_js.j(m,null,"val");f&&(i.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i.tailEnd=X(T)),i}function X(e){let t=chunkTMISJEGL_js.j(e,null,"type")??"none",n=chunkTMISJEGL_js.j(e,null,"w"),o=chunkTMISJEGL_js.j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=chunkTMISJEGL_js.h(e,"a:ext"),n=chunkTMISJEGL_js.l(t,null,"cx")??0,o=chunkTMISJEGL_js.l(t,null,"cy")??0,r={width:n,height:o},i=chunkTMISJEGL_js.h(e,"a:off"),a;if(i){let m=chunkTMISJEGL_js.l(i,null,"x")??0,y=chunkTMISJEGL_js.l(i,null,"y")??0;a={x:m,y};}let s=chunkTMISJEGL_js.j(e,null,"rot"),l=chunkTMISJEGL_js.j(e,null,"flipH")==="1",u=chunkTMISJEGL_js.j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l||u)&&(p={},c!==void 0&&(p.rotation=c),l&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=chunkTMISJEGL_js.h(e,"a:prstGeom");if(t){let o=chunkTMISJEGL_js.j(t,null,"prst");if(o)return o}return chunkTMISJEGL_js.h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=chunkTMISJEGL_js.j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=chunkTMISJEGL_js.j(e,null,"rot");o&&(t.rotation=H(o));let r=chunkTMISJEGL_js.j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}chunkTMISJEGL_js.j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=chunkTMISJEGL_js.h(e,"a:noAutofit"),a=chunkTMISJEGL_js.h(e,"a:normAutofit"),s=chunkTMISJEGL_js.h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l=chunkTMISJEGL_js.l(e,null,"lIns"),u=chunkTMISJEGL_js.l(e,null,"rIns"),c=chunkTMISJEGL_js.l(e,null,"tIns"),p=chunkTMISJEGL_js.l(e,null,"bIns");return (l!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=chunkTMISJEGL_js.g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=chunkTMISJEGL_js.i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i=t.find(g=>g.name==="wps:txbx"),a=i?chunkTMISJEGL_js.h(i,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?chunkTMISJEGL_js.h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=chunkTMISJEGL_js.j(n,null,"id")??void 0,f=chunkTMISJEGL_js.j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=chunkTMISJEGL_js.i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=chunkTMISJEGL_js.h(n,"a:graphic");if(!r)return null;let i=chunkTMISJEGL_js.h(r,"a:graphicData");if(!i)return null;let a=chunkTMISJEGL_js.h(i,"wps:wsp");if(!a)return null;let s=W(a),l=chunkTMISJEGL_js.h(n,"wp:extent");if(l){let c=chunkTMISJEGL_js.l(l,null,"cx")??0,p=chunkTMISJEGL_js.l(l,null,"cy")??0;s.size={width:c,height:p};}if(o){let c=chunkEPX7BBJD_js.c(n);c&&(s.position=c);let p=chunkEPX7BBJD_js.d(n);p&&(s.wrap=p);}let u=chunkTMISJEGL_js.h(n,"wp:docPr");if(u){let c=chunkTMISJEGL_js.j(u,null,"id"),p=chunkTMISJEGL_js.j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=chunkTMISJEGL_js.i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=chunkTMISJEGL_js.h(n,"a:graphic");if(!o)return false;let r=chunkTMISJEGL_js.h(o,"a:graphicData");return r?chunkTMISJEGL_js.h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e){return chunk4Q2IP5FW_js.e(e.size.width)}function Bt(e){return chunk4Q2IP5FW_js.e(e.size.height)}function vt(e){return {width:chunk4Q2IP5FW_js.e(e.size.width),height:chunk4Q2IP5FW_js.e(e.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e){return e.outline?.width?chunk4Q2IP5FW_js.e(e.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return chunkEPX7BBJD_js.e(e.fill.color)}function Wt(e){if(e.outline?.color)return chunkEPX7BBJD_js.e(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=chunkTMISJEGL_js.l(e,"w","pos"),n=chunkTMISJEGL_js.j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=chunkTMISJEGL_js.j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=chunkTMISJEGL_js.f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=chunkTMISJEGL_js.e(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkN3EIZN65_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkN3EIZN65_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkN3EIZN65_js.a}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunk3NLVHZMT_js.l}});Object.defineProperty(exports,"formatNumber",{enumerable:true,get:function(){return chunkV6SWUCTS_js.b}});Object.defineProperty(exports,"getBulletCharacter",{enumerable:true,get:function(){return chunkV6SWUCTS_js.d}});Object.defineProperty(exports,"isBulletLevel",{enumerable:true,get:function(){return chunkV6SWUCTS_js.e}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkV6SWUCTS_js.f}});Object.defineProperty(exports,"parseNumbering",{enumerable:true,get:function(){return chunkV6SWUCTS_js.a}});Object.defineProperty(exports,"renderListMarker",{enumerable:true,get:function(){return chunkV6SWUCTS_js.c}});Object.defineProperty(exports,"getEndnoteText",{enumerable:true,get:function(){return chunkYCDB5TA6_js.y}});Object.defineProperty(exports,"getFootnoteText",{enumerable:true,get:function(){return chunkYCDB5TA6_js.x}});Object.defineProperty(exports,"getHyperlinkRuns",{enumerable:true,get:function(){return chunkYCDB5TA6_js.L}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkYCDB5TA6_js.G}});Object.defineProperty(exports,"getHyperlinkUrl",{enumerable:true,get:function(){return chunkYCDB5TA6_js.J}});Object.defineProperty(exports,"getTableColumnCount",{enumerable:true,get:function(){return chunkYCDB5TA6_js.j}});Object.defineProperty(exports,"getTableRowCount",{enumerable:true,get:function(){return chunkYCDB5TA6_js.k}});Object.defineProperty(exports,"hasContent",{enumerable:true,get:function(){return chunkYCDB5TA6_js.K}});Object.defineProperty(exports,"hasHeaderRow",{enumerable:true,get:function(){return chunkYCDB5TA6_js.n}});Object.defineProperty(exports,"isCellMergeContinuation",{enumerable:true,get:function(){return chunkYCDB5TA6_js.l}});Object.defineProperty(exports,"isCellMergeStart",{enumerable:true,get:function(){return chunkYCDB5TA6_js.m}});Object.defineProperty(exports,"isExternalLink",{enumerable:true,get:function(){return chunkYCDB5TA6_js.H}});Object.defineProperty(exports,"isInternalLink",{enumerable:true,get:function(){return chunkYCDB5TA6_js.I}});Object.defineProperty(exports,"isSeparatorEndnote",{enumerable:true,get:function(){return chunkYCDB5TA6_js.A}});Object.defineProperty(exports,"isSeparatorFootnote",{enumerable:true,get:function(){return chunkYCDB5TA6_js.z}});Object.defineProperty(exports,"parseBorderSpec",{enumerable:true,get:function(){return chunkYCDB5TA6_js.d}});Object.defineProperty(exports,"parseCellMargins",{enumerable:true,get:function(){return chunkYCDB5TA6_js.f}});Object.defineProperty(exports,"parseEndnoteProperties",{enumerable:true,get:function(){return chunkYCDB5TA6_js.w}});Object.defineProperty(exports,"parseEndnotes",{enumerable:true,get:function(){return chunkYCDB5TA6_js.u}});Object.defineProperty(exports,"parseFloatingTableProperties",{enumerable:true,get:function(){return chunkYCDB5TA6_js.i}});Object.defineProperty(exports,"parseFootnoteProperties",{enumerable:true,get:function(){return chunkYCDB5TA6_js.v}});Object.defineProperty(exports,"parseFootnotes",{enumerable:true,get:function(){return chunkYCDB5TA6_js.t}});Object.defineProperty(exports,"parseHyperlink",{enumerable:true,get:function(){return chunkYCDB5TA6_js.F}});Object.defineProperty(exports,"parseShading",{enumerable:true,get:function(){return chunkYCDB5TA6_js.g}});Object.defineProperty(exports,"parseTableBorders",{enumerable:true,get:function(){return chunkYCDB5TA6_js.e}});Object.defineProperty(exports,"parseTableLook",{enumerable:true,get:function(){return chunkYCDB5TA6_js.h}});Object.defineProperty(exports,"parseTableMeasurement",{enumerable:true,get:function(){return chunkYCDB5TA6_js.c}});Object.defineProperty(exports,"parseTableProperties",{enumerable:true,get:function(){return chunkYCDB5TA6_js.o}});Object.defineProperty(exports,"resolveHyperlinkUrl",{enumerable:true,get:function(){return chunkYCDB5TA6_js.M}});Object.defineProperty(exports,"extractTextBoxContentElements",{enumerable:true,get:function(){return chunkEPX7BBJD_js.f}});Object.defineProperty(exports,"getImageHeightPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.F}});Object.defineProperty(exports,"getImageWidthPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.E}});Object.defineProperty(exports,"getTextBoxContentElement",{enumerable:true,get:function(){return chunkEPX7BBJD_js.k}});Object.defineProperty(exports,"getTextBoxDimensionsPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.o}});Object.defineProperty(exports,"getTextBoxHeightPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.n}});Object.defineProperty(exports,"getTextBoxMarginsPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.p}});Object.defineProperty(exports,"getTextBoxOutlineWidthPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.x}});Object.defineProperty(exports,"getTextBoxText",{enumerable:true,get:function(){return chunkEPX7BBJD_js.u}});Object.defineProperty(exports,"getTextBoxWidthPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.m}});Object.defineProperty(exports,"getWrapDistancesPx",{enumerable:true,get:function(){return chunkEPX7BBJD_js.H}});Object.defineProperty(exports,"hasTextBoxContent",{enumerable:true,get:function(){return chunkEPX7BBJD_js.t}});Object.defineProperty(exports,"hasTextBoxFill",{enumerable:true,get:function(){return chunkEPX7BBJD_js.r}});Object.defineProperty(exports,"hasTextBoxOutline",{enumerable:true,get:function(){return chunkEPX7BBJD_js.s}});Object.defineProperty(exports,"isBehindText",{enumerable:true,get:function(){return chunkEPX7BBJD_js.C}});Object.defineProperty(exports,"isDecorativeImage",{enumerable:true,get:function(){return chunkEPX7BBJD_js.G}});Object.defineProperty(exports,"isFloatingImage",{enumerable:true,get:function(){return chunkEPX7BBJD_js.B}});Object.defineProperty(exports,"isFloatingTextBox",{enumerable:true,get:function(){return chunkEPX7BBJD_js.q}});Object.defineProperty(exports,"isInFrontOfText",{enumerable:true,get:function(){return chunkEPX7BBJD_js.D}});Object.defineProperty(exports,"isInlineImage",{enumerable:true,get:function(){return chunkEPX7BBJD_js.A}});Object.defineProperty(exports,"isShapeTextBox",{enumerable:true,get:function(){return chunkEPX7BBJD_js.i}});Object.defineProperty(exports,"isTextBoxDrawing",{enumerable:true,get:function(){return chunkEPX7BBJD_js.h}});Object.defineProperty(exports,"parseDrawing",{enumerable:true,get:function(){return chunkEPX7BBJD_js.y}});Object.defineProperty(exports,"parseImage",{enumerable:true,get:function(){return chunkEPX7BBJD_js.z}});Object.defineProperty(exports,"parseTextBox",{enumerable:true,get:function(){return chunkEPX7BBJD_js.j}});Object.defineProperty(exports,"parseTextBoxContent",{enumerable:true,get:function(){return chunkEPX7BBJD_js.g}});Object.defineProperty(exports,"parseTextBoxFromShape",{enumerable:true,get:function(){return chunkEPX7BBJD_js.l}});Object.defineProperty(exports,"resolveTextBoxFillColor",{enumerable:true,get:function(){return chunkEPX7BBJD_js.v}});Object.defineProperty(exports,"resolveTextBoxOutlineColor",{enumerable:true,get:function(){return chunkEPX7BBJD_js.w}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});exports.DEFAULT_TAB_ALIGNMENT=L;exports.DEFAULT_TAB_INTERVAL_TWIPS=R;exports.DEFAULT_TAB_LEADER=Vt;exports.KNOWN_FIELD_TYPES=M;exports.calculateTabWidth=jt;exports.calculateTabWidthWithAlignment=zt;exports.createComplexFieldContext=dt;exports.getFieldDisplayValue=ft;exports.getFormatSwitch=pt;exports.getLeaderCharacter=Kt;exports.getNextTabStop=D;exports.getOutlineWidthPx=Xt;exports.getShapeDimensionsPx=vt;exports.getShapeHeightPx=Bt;exports.getShapeWidthPx=Nt;exports.hasFill=kt;exports.hasMergeFormat=ct;exports.hasOutline=Ut;exports.hasTextContent=Pt;exports.hasVisibleLeader=Yt;exports.injectReplyRangeMarkers=Jt;exports.injectTCReplyRangeMarkers=Zt;exports.isDateTimeField=gt;exports.isDocPropertyField=Tt;exports.isFloatingShape=Ot;exports.isKnownFieldType=at;exports.isLineShape=Lt;exports.isMergeField=yt;exports.isPageNumberField=mt;exports.isReferenceField=xt;exports.isShapeDrawing=Rt;exports.isTextBoxShape=Dt;exports.isTocField=St;exports.isTotalPagesField=ht;exports.mergeTabStops=_t;exports.parseFieldInstruction=st;exports.parseFieldType=I;exports.parseShape=W;exports.parseShapeFromDrawing=It;exports.parseSimpleField=ut;exports.parseTabStop=V;exports.parseTabStops=G;exports.parseTabStopsFromParagraphProperties=Gt;exports.resolveFillColor=Ht;exports.resolveOutlineColor=Wt;
@@ -1 +1 @@
1
- export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-BOYVCOLZ.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'../chunk-UCZVMHB5.mjs';import'../chunk-LDKESXXK.mjs';export{b as formatNumber,d as getBulletCharacter,e as isBulletLevel,f as parseDocx,a as parseNumbering,c as renderListMarker}from'../chunk-R7RR6M4A.mjs';import {z}from'../chunk-3GNIP6IX.mjs';export{w as getEndnoteText,v as getFootnoteText,G as getHyperlinkRuns,B as getHyperlinkText,E as getHyperlinkUrl,j as getTableColumnCount,k as getTableRowCount,F as hasContent,n as hasHeaderRow,l as isCellMergeContinuation,m as isCellMergeStart,C as isExternalLink,D as isInternalLink,y as isSeparatorEndnote,x as isSeparatorFootnote,d as parseBorderSpec,f as parseCellMargins,u as parseEndnoteProperties,s as parseEndnotes,i as parseFloatingTableProperties,t as parseFootnoteProperties,r as parseFootnotes,A as parseHyperlink,g as parseShading,e as parseTableBorders,h as parseTableLook,c as parseTableMeasurement,o as parseTableProperties,H as resolveHyperlinkUrl}from'../chunk-3GNIP6IX.mjs';import'../chunk-Y5HZAMND.mjs';import'../chunk-ILJUDEZ5.mjs';import {c,d,e as e$1,b,a}from'../chunk-IBNUQL57.mjs';export{f as extractTextBoxContentElements,F as getImageHeightPx,E as getImageWidthPx,k as getTextBoxContentElement,o as getTextBoxDimensionsPx,n as getTextBoxHeightPx,p as getTextBoxMarginsPx,x as getTextBoxOutlineWidthPx,u as getTextBoxText,m as getTextBoxWidthPx,H as getWrapDistancesPx,t as hasTextBoxContent,r as hasTextBoxFill,s as hasTextBoxOutline,C as isBehindText,G as isDecorativeImage,B as isFloatingImage,q as isFloatingTextBox,D as isInFrontOfText,A as isInlineImage,i as isShapeTextBox,h as isTextBoxDrawing,y as parseDrawing,z as parseImage,j as parseTextBox,g as parseTextBoxContent,l as parseTextBoxFromShape,v as resolveTextBoxFillColor,w as resolveTextBoxOutlineColor}from'../chunk-IBNUQL57.mjs';import {j,f,i,h,l,e as e$2,g}from'../chunk-6LOYA7G5.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VQWZHPWI.mjs';import {e}from'../chunk-VW22RZ6C.mjs';export{e as emuToPixels,f as pixelsToEmu}from'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=f(e,"w","r");for(let u of l){let c=z(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=b(e);if(n){if(n.type==="gradient"&&e){let r=i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=h(t,"a:fillRef");if(o){if(j(o,null,"idx")==="0")return {type:"none"};let i=a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i$1=t.find(l=>l.name==="a:path");if(i$1){let l=j(i$1,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a$1=t.find(l=>l.name==="a:gsLst"),s=[];if(a$1){let l=g(a$1,"gs");for(let u of l){let c=j(u,null,"pos"),p=c?parseInt(c,10):0,m=a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?h(e,"a:ln"):null;if(!n){if(t){let f=h(t,"a:lnRef");if(f){if(j(f,null,"idx")==="0")return;let g=a(f);if(g)return {color:g,width:9525}}}return}let o=i(n);if(o.find(f=>f.name==="a:noFill"))return;let i$1={},a$1=j(n,null,"w");a$1&&(i$1.width=parseInt(a$1,10));let s=j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i$1.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i$1.join="bevel":c?i$1.join="round":u&&(i$1.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i$1.color=a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=j(m,null,"val");f&&(i$1.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i$1.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i$1.tailEnd=X(T)),i$1}function X(e){let t=j(e,null,"type")??"none",n=j(e,null,"w"),o=j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=h(e,"a:ext"),n=l(t,null,"cx")??0,o=l(t,null,"cy")??0,r={width:n,height:o},i=h(e,"a:off"),a;if(i){let m=l(i,null,"x")??0,y=l(i,null,"y")??0;a={x:m,y};}let s=j(e,null,"rot"),l$1=j(e,null,"flipH")==="1",u=j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l$1||u)&&(p={},c!==void 0&&(p.rotation=c),l$1&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=h(e,"a:prstGeom");if(t){let o=j(t,null,"prst");if(o)return o}return h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=j(e,null,"rot");o&&(t.rotation=H(o));let r=j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=h(e,"a:noAutofit"),a=h(e,"a:normAutofit"),s=h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l$1=l(e,null,"lIns"),u=l(e,null,"rIns"),c=l(e,null,"tIns"),p=l(e,null,"bIns");return (l$1!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l$1,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i$1=t.find(g=>g.name==="wps:txbx"),a=i$1?h(i$1,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=j(n,null,"id")??void 0,f=j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=h(n,"a:graphic");if(!r)return null;let i$1=h(r,"a:graphicData");if(!i$1)return null;let a=h(i$1,"wps:wsp");if(!a)return null;let s=W(a),l$1=h(n,"wp:extent");if(l$1){let c=l(l$1,null,"cx")??0,p=l(l$1,null,"cy")??0;s.size={width:c,height:p};}if(o){let c$1=c(n);c$1&&(s.position=c$1);let p=d(n);p&&(s.wrap=p);}let u=h(n,"wp:docPr");if(u){let c=j(u,null,"id"),p=j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=h(n,"a:graphic");if(!o)return false;let r=h(o,"a:graphicData");return r?h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e$1){return e(e$1.size.width)}function Bt(e$1){return e(e$1.size.height)}function vt(e$1){return {width:e(e$1.size.width),height:e(e$1.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e$1){return e$1.outline?.width?e(e$1.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return e$1(e.fill.color)}function Wt(e){if(e.outline?.color)return e$1(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=l(e,"w","pos"),n=j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=e$2(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}export{L as DEFAULT_TAB_ALIGNMENT,R as DEFAULT_TAB_INTERVAL_TWIPS,Vt as DEFAULT_TAB_LEADER,M as KNOWN_FIELD_TYPES,jt as calculateTabWidth,zt as calculateTabWidthWithAlignment,dt as createComplexFieldContext,ft as getFieldDisplayValue,pt as getFormatSwitch,Kt as getLeaderCharacter,D as getNextTabStop,Xt as getOutlineWidthPx,vt as getShapeDimensionsPx,Bt as getShapeHeightPx,Nt as getShapeWidthPx,kt as hasFill,ct as hasMergeFormat,Ut as hasOutline,Pt as hasTextContent,Yt as hasVisibleLeader,Jt as injectReplyRangeMarkers,Zt as injectTCReplyRangeMarkers,gt as isDateTimeField,Tt as isDocPropertyField,Ot as isFloatingShape,at as isKnownFieldType,Lt as isLineShape,yt as isMergeField,mt as isPageNumberField,xt as isReferenceField,Rt as isShapeDrawing,Dt as isTextBoxShape,St as isTocField,ht as isTotalPagesField,_t as mergeTabStops,st as parseFieldInstruction,I as parseFieldType,W as parseShape,It as parseShapeFromDrawing,ut as parseSimpleField,V as parseTabStop,G as parseTabStops,Gt as parseTabStopsFromParagraphProperties,Ht as resolveFillColor,Wt as resolveOutlineColor};
1
+ export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-Y7I5QDCN.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'../chunk-TRQN2SFW.mjs';import'../chunk-LDKESXXK.mjs';export{b as formatNumber,d as getBulletCharacter,e as isBulletLevel,f as parseDocx,a as parseNumbering,c as renderListMarker}from'../chunk-2IE6UDHJ.mjs';import {E}from'../chunk-QMLIXLZJ.mjs';export{y as getEndnoteText,x as getFootnoteText,L as getHyperlinkRuns,G as getHyperlinkText,J as getHyperlinkUrl,j as getTableColumnCount,k as getTableRowCount,K as hasContent,n as hasHeaderRow,l as isCellMergeContinuation,m as isCellMergeStart,H as isExternalLink,I as isInternalLink,A as isSeparatorEndnote,z as isSeparatorFootnote,d as parseBorderSpec,f as parseCellMargins,w as parseEndnoteProperties,u as parseEndnotes,i as parseFloatingTableProperties,v as parseFootnoteProperties,t as parseFootnotes,F as parseHyperlink,g as parseShading,e as parseTableBorders,h as parseTableLook,c as parseTableMeasurement,o as parseTableProperties,M as resolveHyperlinkUrl}from'../chunk-QMLIXLZJ.mjs';import'../chunk-3JXR6YU4.mjs';import'../chunk-Y5HZAMND.mjs';import'../chunk-ILJUDEZ5.mjs';import {c,d,e as e$1,b,a}from'../chunk-QVEAQOMR.mjs';export{f as extractTextBoxContentElements,F as getImageHeightPx,E as getImageWidthPx,k as getTextBoxContentElement,o as getTextBoxDimensionsPx,n as getTextBoxHeightPx,p as getTextBoxMarginsPx,x as getTextBoxOutlineWidthPx,u as getTextBoxText,m as getTextBoxWidthPx,H as getWrapDistancesPx,t as hasTextBoxContent,r as hasTextBoxFill,s as hasTextBoxOutline,C as isBehindText,G as isDecorativeImage,B as isFloatingImage,q as isFloatingTextBox,D as isInFrontOfText,A as isInlineImage,i as isShapeTextBox,h as isTextBoxDrawing,y as parseDrawing,z as parseImage,j as parseTextBox,g as parseTextBoxContent,l as parseTextBoxFromShape,v as resolveTextBoxFillColor,w as resolveTextBoxOutlineColor}from'../chunk-QVEAQOMR.mjs';import'../chunk-HL5PQT3A.mjs';import {j,f,i,h,l,e as e$2,g}from'../chunk-B6LYBJ4H.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VQWZHPWI.mjs';import {e}from'../chunk-VW22RZ6C.mjs';export{e as emuToPixels,f as pixelsToEmu}from'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=f(e,"w","r");for(let u of l){let c=E(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=b(e);if(n){if(n.type==="gradient"&&e){let r=i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=h(t,"a:fillRef");if(o){if(j(o,null,"idx")==="0")return {type:"none"};let i=a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i$1=t.find(l=>l.name==="a:path");if(i$1){let l=j(i$1,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a$1=t.find(l=>l.name==="a:gsLst"),s=[];if(a$1){let l=g(a$1,"gs");for(let u of l){let c=j(u,null,"pos"),p=c?parseInt(c,10):0,m=a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?h(e,"a:ln"):null;if(!n){if(t){let f=h(t,"a:lnRef");if(f){if(j(f,null,"idx")==="0")return;let g=a(f);if(g)return {color:g,width:9525}}}return}let o=i(n);if(o.find(f=>f.name==="a:noFill"))return;let i$1={},a$1=j(n,null,"w");a$1&&(i$1.width=parseInt(a$1,10));let s=j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i$1.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i$1.join="bevel":c?i$1.join="round":u&&(i$1.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i$1.color=a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=j(m,null,"val");f&&(i$1.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i$1.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i$1.tailEnd=X(T)),i$1}function X(e){let t=j(e,null,"type")??"none",n=j(e,null,"w"),o=j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=h(e,"a:ext"),n=l(t,null,"cx")??0,o=l(t,null,"cy")??0,r={width:n,height:o},i=h(e,"a:off"),a;if(i){let m=l(i,null,"x")??0,y=l(i,null,"y")??0;a={x:m,y};}let s=j(e,null,"rot"),l$1=j(e,null,"flipH")==="1",u=j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l$1||u)&&(p={},c!==void 0&&(p.rotation=c),l$1&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=h(e,"a:prstGeom");if(t){let o=j(t,null,"prst");if(o)return o}return h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=j(e,null,"rot");o&&(t.rotation=H(o));let r=j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=h(e,"a:noAutofit"),a=h(e,"a:normAutofit"),s=h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l$1=l(e,null,"lIns"),u=l(e,null,"rIns"),c=l(e,null,"tIns"),p=l(e,null,"bIns");return (l$1!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l$1,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i$1=t.find(g=>g.name==="wps:txbx"),a=i$1?h(i$1,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=j(n,null,"id")??void 0,f=j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=h(n,"a:graphic");if(!r)return null;let i$1=h(r,"a:graphicData");if(!i$1)return null;let a=h(i$1,"wps:wsp");if(!a)return null;let s=W(a),l$1=h(n,"wp:extent");if(l$1){let c=l(l$1,null,"cx")??0,p=l(l$1,null,"cy")??0;s.size={width:c,height:p};}if(o){let c$1=c(n);c$1&&(s.position=c$1);let p=d(n);p&&(s.wrap=p);}let u=h(n,"wp:docPr");if(u){let c=j(u,null,"id"),p=j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=h(n,"a:graphic");if(!o)return false;let r=h(o,"a:graphicData");return r?h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e$1){return e(e$1.size.width)}function Bt(e$1){return e(e$1.size.height)}function vt(e$1){return {width:e(e$1.size.width),height:e(e$1.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e$1){return e$1.outline?.width?e(e$1.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return e$1(e.fill.color)}function Wt(e){if(e.outline?.color)return e$1(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=l(e,"w","pos"),n=j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=e$2(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}export{L as DEFAULT_TAB_ALIGNMENT,R as DEFAULT_TAB_INTERVAL_TWIPS,Vt as DEFAULT_TAB_LEADER,M as KNOWN_FIELD_TYPES,jt as calculateTabWidth,zt as calculateTabWidthWithAlignment,dt as createComplexFieldContext,ft as getFieldDisplayValue,pt as getFormatSwitch,Kt as getLeaderCharacter,D as getNextTabStop,Xt as getOutlineWidthPx,vt as getShapeDimensionsPx,Bt as getShapeHeightPx,Nt as getShapeWidthPx,kt as hasFill,ct as hasMergeFormat,Ut as hasOutline,Pt as hasTextContent,Yt as hasVisibleLeader,Jt as injectReplyRangeMarkers,Zt as injectTCReplyRangeMarkers,gt as isDateTimeField,Tt as isDocPropertyField,Ot as isFloatingShape,at as isKnownFieldType,Lt as isLineShape,yt as isMergeField,mt as isPageNumberField,xt as isReferenceField,Rt as isShapeDrawing,Dt as isTextBoxShape,St as isTocField,ht as isTotalPagesField,_t as mergeTabStops,st as parseFieldInstruction,I as parseFieldType,W as parseShape,It as parseShapeFromDrawing,ut as parseSimpleField,V as parseTabStop,G as parseTabStops,Gt as parseTabStopsFromParagraphProperties,Ht as resolveFillColor,Wt as resolveOutlineColor};
@@ -22,11 +22,11 @@
22
22
  import { Document } from '../types/document.mjs';
23
23
  import { D as DocxInput } from '../docxInput-DTbCa48g.mjs';
24
24
  import '../colors-C3vA7HUU.mjs';
25
- import '../formatting-D9I-lFS4.mjs';
26
- import '../lists-JDB80qyP.mjs';
25
+ import '../formatting-BH4hcZiq.mjs';
26
+ import '../lists-CvG_iVK3.mjs';
27
27
  import '../types/content.mjs';
28
28
  import './wrapTypes.mjs';
29
- import '../styles-BBoqh07F.mjs';
29
+ import '../styles-EI2lxeEN.mjs';
30
30
 
31
31
  /**
32
32
  * Main Parser Orchestrator - Unified parseDocx function
@@ -22,11 +22,11 @@
22
22
  import { Document } from '../types/document.js';
23
23
  import { D as DocxInput } from '../docxInput-DTbCa48g.js';
24
24
  import '../colors-C3vA7HUU.js';
25
- import '../formatting-BwpZWdGi.js';
26
- import '../lists-CdiIk_c1.js';
25
+ import '../formatting-_OXU8gLB.js';
26
+ import '../lists-UTp_tk7B.js';
27
27
  import '../types/content.js';
28
28
  import './wrapTypes.js';
29
- import '../styles-jqO45PSq.js';
29
+ import '../styles-BBv7doYK.js';
30
30
 
31
31
  /**
32
32
  * Main Parser Orchestrator - Unified parseDocx function
@@ -1 +1 @@
1
- 'use strict';var chunkC6GSFUV2_js=require('../chunk-C6GSFUV2.js');require('../chunk-DV6IEOP5.js'),require('../chunk-KBU6QQFU.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-YGHHSCPR.js'),require('../chunk-7VCMJCBY.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"fullParseDocx",{enumerable:true,get:function(){return chunkC6GSFUV2_js.h}});Object.defineProperty(exports,"getDocxSummary",{enumerable:true,get:function(){return chunkC6GSFUV2_js.j}});Object.defineProperty(exports,"getDocxVariables",{enumerable:true,get:function(){return chunkC6GSFUV2_js.i}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkC6GSFUV2_js.f}});Object.defineProperty(exports,"quickParseDocx",{enumerable:true,get:function(){return chunkC6GSFUV2_js.g}});
1
+ 'use strict';var chunkV6SWUCTS_js=require('../chunk-V6SWUCTS.js');require('../chunk-YCDB5TA6.js'),require('../chunk-IN6IYQ2X.js'),require('../chunk-KBU6QQFU.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-EPX7BBJD.js'),require('../chunk-D536HC5M.js'),require('../chunk-TMISJEGL.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"fullParseDocx",{enumerable:true,get:function(){return chunkV6SWUCTS_js.h}});Object.defineProperty(exports,"getDocxSummary",{enumerable:true,get:function(){return chunkV6SWUCTS_js.j}});Object.defineProperty(exports,"getDocxVariables",{enumerable:true,get:function(){return chunkV6SWUCTS_js.i}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkV6SWUCTS_js.f}});Object.defineProperty(exports,"quickParseDocx",{enumerable:true,get:function(){return chunkV6SWUCTS_js.g}});
@@ -1 +1 @@
1
- export{h as fullParseDocx,j as getDocxSummary,i as getDocxVariables,f as parseDocx,g as quickParseDocx}from'../chunk-R7RR6M4A.mjs';import'../chunk-3GNIP6IX.mjs';import'../chunk-Y5HZAMND.mjs';import'../chunk-ILJUDEZ5.mjs';import'../chunk-IBNUQL57.mjs';import'../chunk-6LOYA7G5.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{h as fullParseDocx,j as getDocxSummary,i as getDocxVariables,f as parseDocx,g as quickParseDocx}from'../chunk-2IE6UDHJ.mjs';import'../chunk-QMLIXLZJ.mjs';import'../chunk-3JXR6YU4.mjs';import'../chunk-Y5HZAMND.mjs';import'../chunk-ILJUDEZ5.mjs';import'../chunk-QVEAQOMR.mjs';import'../chunk-HL5PQT3A.mjs';import'../chunk-B6LYBJ4H.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -38,11 +38,11 @@
38
38
  import JSZip from 'jszip';
39
39
  import { Document } from '../types/document.mjs';
40
40
  import '../colors-C3vA7HUU.mjs';
41
- import '../formatting-D9I-lFS4.mjs';
42
- import '../lists-JDB80qyP.mjs';
41
+ import '../formatting-BH4hcZiq.mjs';
42
+ import '../lists-CvG_iVK3.mjs';
43
43
  import '../types/content.mjs';
44
44
  import './wrapTypes.mjs';
45
- import '../styles-BBoqh07F.mjs';
45
+ import '../styles-EI2lxeEN.mjs';
46
46
 
47
47
  /**
48
48
  * DOCX Unzipper
@@ -38,11 +38,11 @@
38
38
  import JSZip from 'jszip';
39
39
  import { Document } from '../types/document.js';
40
40
  import '../colors-C3vA7HUU.js';
41
- import '../formatting-BwpZWdGi.js';
42
- import '../lists-CdiIk_c1.js';
41
+ import '../formatting-_OXU8gLB.js';
42
+ import '../lists-UTp_tk7B.js';
43
43
  import '../types/content.js';
44
44
  import './wrapTypes.js';
45
- import '../styles-jqO45PSq.js';
45
+ import '../styles-BBv7doYK.js';
46
46
 
47
47
  /**
48
48
  * DOCX Unzipper
@@ -1 +1 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkLTYW3NLX_js=require('../chunk-LTYW3NLX.js');require('../chunk-V435QKZB.js'),require('../chunk-7VCMJCBY.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"COMMENTS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkLTYW3NLX_js.b}});Object.defineProperty(exports,"COMMENTS_EXTENDED_CONTENT_TYPE",{enumerable:true,get:function(){return chunkLTYW3NLX_js.c}});Object.defineProperty(exports,"COMMENTS_EXTENSIBLE_CONTENT_TYPE",{enumerable:true,get:function(){return chunkLTYW3NLX_js.e}});Object.defineProperty(exports,"COMMENTS_IDS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkLTYW3NLX_js.d}});Object.defineProperty(exports,"addMedia",{enumerable:true,get:function(){return chunkLTYW3NLX_js.o}});Object.defineProperty(exports,"addRelationship",{enumerable:true,get:function(){return chunkLTYW3NLX_js.n}});Object.defineProperty(exports,"applyUpdatesToZip",{enumerable:true,get:function(){return chunkLTYW3NLX_js.m}});Object.defineProperty(exports,"collectHeaderFooterUpdates",{enumerable:true,get:function(){return chunkLTYW3NLX_js.f}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.s}});Object.defineProperty(exports,"createEmptyDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.g}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkLTYW3NLX_js.t}});Object.defineProperty(exports,"findMaxRId",{enumerable:true,get:function(){return chunkLTYW3NLX_js.a}});Object.defineProperty(exports,"isDocxBuffer",{enumerable:true,get:function(){return chunkLTYW3NLX_js.r}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.h}});Object.defineProperty(exports,"repackDocxFromRaw",{enumerable:true,get:function(){return chunkLTYW3NLX_js.i}});Object.defineProperty(exports,"updateCoreProperties",{enumerable:true,get:function(){return chunkLTYW3NLX_js.p}});Object.defineProperty(exports,"updateDocumentXml",{enumerable:true,get:function(){return chunkLTYW3NLX_js.j}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkLTYW3NLX_js.l}});Object.defineProperty(exports,"updateXmlFile",{enumerable:true,get:function(){return chunkLTYW3NLX_js.k}});Object.defineProperty(exports,"validateDocx",{enumerable:true,get:function(){return chunkLTYW3NLX_js.q}});
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunk3NLVHZMT_js=require('../chunk-3NLVHZMT.js');require('../chunk-V435QKZB.js'),require('../chunk-D536HC5M.js'),require('../chunk-TMISJEGL.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"COMMENTS_CONTENT_TYPE",{enumerable:true,get:function(){return chunk3NLVHZMT_js.b}});Object.defineProperty(exports,"COMMENTS_EXTENDED_CONTENT_TYPE",{enumerable:true,get:function(){return chunk3NLVHZMT_js.c}});Object.defineProperty(exports,"COMMENTS_EXTENSIBLE_CONTENT_TYPE",{enumerable:true,get:function(){return chunk3NLVHZMT_js.e}});Object.defineProperty(exports,"COMMENTS_IDS_CONTENT_TYPE",{enumerable:true,get:function(){return chunk3NLVHZMT_js.d}});Object.defineProperty(exports,"addMedia",{enumerable:true,get:function(){return chunk3NLVHZMT_js.o}});Object.defineProperty(exports,"addRelationship",{enumerable:true,get:function(){return chunk3NLVHZMT_js.n}});Object.defineProperty(exports,"applyUpdatesToZip",{enumerable:true,get:function(){return chunk3NLVHZMT_js.m}});Object.defineProperty(exports,"collectHeaderFooterUpdates",{enumerable:true,get:function(){return chunk3NLVHZMT_js.f}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.s}});Object.defineProperty(exports,"createEmptyDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.g}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunk3NLVHZMT_js.t}});Object.defineProperty(exports,"findMaxRId",{enumerable:true,get:function(){return chunk3NLVHZMT_js.a}});Object.defineProperty(exports,"isDocxBuffer",{enumerable:true,get:function(){return chunk3NLVHZMT_js.r}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.h}});Object.defineProperty(exports,"repackDocxFromRaw",{enumerable:true,get:function(){return chunk3NLVHZMT_js.i}});Object.defineProperty(exports,"updateCoreProperties",{enumerable:true,get:function(){return chunk3NLVHZMT_js.p}});Object.defineProperty(exports,"updateDocumentXml",{enumerable:true,get:function(){return chunk3NLVHZMT_js.j}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunk3NLVHZMT_js.l}});Object.defineProperty(exports,"updateXmlFile",{enumerable:true,get:function(){return chunk3NLVHZMT_js.k}});Object.defineProperty(exports,"validateDocx",{enumerable:true,get:function(){return chunk3NLVHZMT_js.q}});
@@ -1 +1 @@
1
- export{b as COMMENTS_CONTENT_TYPE,c as COMMENTS_EXTENDED_CONTENT_TYPE,e as COMMENTS_EXTENSIBLE_CONTENT_TYPE,d as COMMENTS_IDS_CONTENT_TYPE,o as addMedia,n as addRelationship,m as applyUpdatesToZip,f as collectHeaderFooterUpdates,s as createDocx,g as createEmptyDocx,t as default,a as findMaxRId,r as isDocxBuffer,h as repackDocx,i as repackDocxFromRaw,p as updateCoreProperties,j as updateDocumentXml,l as updateMultipleFiles,k as updateXmlFile,q as validateDocx}from'../chunk-UCZVMHB5.mjs';import'../chunk-LDKESXXK.mjs';import'../chunk-6LOYA7G5.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{b as COMMENTS_CONTENT_TYPE,c as COMMENTS_EXTENDED_CONTENT_TYPE,e as COMMENTS_EXTENSIBLE_CONTENT_TYPE,d as COMMENTS_IDS_CONTENT_TYPE,o as addMedia,n as addRelationship,m as applyUpdatesToZip,f as collectHeaderFooterUpdates,s as createDocx,g as createEmptyDocx,t as default,a as findMaxRId,r as isDocxBuffer,h as repackDocx,i as repackDocxFromRaw,p as updateCoreProperties,j as updateDocumentXml,l as updateMultipleFiles,k as updateXmlFile,q as validateDocx}from'../chunk-TRQN2SFW.mjs';import'../chunk-LDKESXXK.mjs';import'../chunk-HL5PQT3A.mjs';import'../chunk-B6LYBJ4H.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -10,9 +10,9 @@ export { a as serializeDocument, s as serializeDocumentBody, b as serializeSecti
10
10
  import { Paragraph, Run, Table, HeaderFooter, Comment } from '../../types/content.mjs';
11
11
  import '../../types/document.mjs';
12
12
  import '../../colors-C3vA7HUU.mjs';
13
- import '../../formatting-D9I-lFS4.mjs';
14
- import '../../lists-JDB80qyP.mjs';
15
- import '../../styles-BBoqh07F.mjs';
13
+ import '../../formatting-BH4hcZiq.mjs';
14
+ import '../../lists-CvG_iVK3.mjs';
15
+ import '../../styles-EI2lxeEN.mjs';
16
16
  import '../wrapTypes.mjs';
17
17
 
18
18
  /**
@@ -10,9 +10,9 @@ export { a as serializeDocument, s as serializeDocumentBody, b as serializeSecti
10
10
  import { Paragraph, Run, Table, HeaderFooter, Comment } from '../../types/content.js';
11
11
  import '../../types/document.js';
12
12
  import '../../colors-C3vA7HUU.js';
13
- import '../../formatting-BwpZWdGi.js';
14
- import '../../lists-CdiIk_c1.js';
15
- import '../../styles-jqO45PSq.js';
13
+ import '../../formatting-_OXU8gLB.js';
14
+ import '../../lists-UTp_tk7B.js';
15
+ import '../../styles-BBv7doYK.js';
16
16
  import '../wrapTypes.js';
17
17
 
18
18
  /**
@@ -407,4 +407,4 @@ interface TableCellFormatting {
407
407
  conditionalFormat?: ConditionalFormatStyle;
408
408
  }
409
409
 
410
- export type { CellMargins as C, EmphasisMark as E, FloatingTableProperties as F, LineSpacingRule as L, ParagraphFormatting as P, SpacingExplicit as S, TextFormatting as T, UnderlineStyle as U, ConditionalFormatStyle as a, ParagraphAlignment as b, TabLeader as c, TabStop as d, TabStopAlignment as e, TableBorders as f, TableCellFormatting as g, TableFormatting as h, TableLook as i, TableMeasurement as j, TableRowFormatting as k, TableWidthType as l, TextEffect as m };
410
+ export type { CellMargins as C, EmphasisMark as E, FloatingTableProperties as F, LineSpacingRule as L, ParagraphFormatting as P, SpacingExplicit as S, TextFormatting as T, UnderlineStyle as U, TableFormatting as a, TableRowFormatting as b, TableCellFormatting as c, ParagraphAlignment as d, TabStop as e, TableLook as f, ConditionalFormatStyle as g, TabLeader as h, TabStopAlignment as i, TableBorders as j, TableMeasurement as k, TableWidthType as l, TextEffect as m };