@eigenpal/docx-editor-core 1.0.0 → 1.0.1

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 (77) hide show
  1. package/dist/agent/index.js +1 -1
  2. package/dist/agent/index.mjs +1 -1
  3. package/dist/chunk-3GNIP6IX.mjs +4 -0
  4. package/dist/chunk-7UTXBQKF.mjs +1 -0
  5. package/dist/{chunk-CKXAHSJQ.js → chunk-AFMMYLPX.js} +2 -2
  6. package/dist/{chunk-J7ULKGU2.mjs → chunk-AGNZEOVL.mjs} +1 -1
  7. package/dist/chunk-BD4CYYFB.js +1 -0
  8. package/dist/{chunk-6ILFFGGS.js → chunk-C6GSFUV2.js} +1 -1
  9. package/dist/chunk-DN36K5JU.mjs +1 -0
  10. package/dist/{chunk-CWAP26GB.js → chunk-DV6IEOP5.js} +3 -3
  11. package/dist/{chunk-23CP3TOP.js → chunk-GH5N36F7.js} +1 -1
  12. package/dist/chunk-GNPLUGUG.mjs +1 -0
  13. package/dist/chunk-HVZMO3BU.js +1 -0
  14. package/dist/chunk-ITVXBQGR.mjs +1 -0
  15. package/dist/{chunk-S7IKPRC3.js → chunk-KSYEBTYE.js} +1 -1
  16. package/dist/{chunk-ZRZ2VRQQ.mjs → chunk-LDAOONXZ.mjs} +1 -1
  17. package/dist/{chunk-36VIYQHD.mjs → chunk-N3GIC2UI.mjs} +1 -1
  18. package/dist/{chunk-FC6QL3E6.js → chunk-NFYCMDM5.js} +1 -1
  19. package/dist/chunk-P3AXSRLG.mjs +1 -0
  20. package/dist/chunk-PK4PDRTA.js +1 -0
  21. package/dist/{chunk-VKTCTMIO.mjs → chunk-R7RR6M4A.mjs} +1 -1
  22. package/dist/{chunk-BGC7QKP5.mjs → chunk-RSMS6OTE.mjs} +1 -1
  23. package/dist/chunk-TZJUO3NW.js +1 -0
  24. package/dist/chunk-YE357WVA.js +1 -0
  25. package/dist/core-plugins.js +1 -1
  26. package/dist/core-plugins.mjs +1 -1
  27. package/dist/core.d.mts +1 -1
  28. package/dist/core.d.ts +1 -1
  29. package/dist/core.js +1 -1
  30. package/dist/core.mjs +1 -1
  31. package/dist/docx/index.js +1 -1
  32. package/dist/docx/index.mjs +1 -1
  33. package/dist/docx/parser.js +1 -1
  34. package/dist/docx/parser.mjs +1 -1
  35. package/dist/headless.js +1 -1
  36. package/dist/headless.mjs +1 -1
  37. package/dist/layout-bridge/index.d.mts +1 -1
  38. package/dist/layout-bridge/index.d.ts +1 -1
  39. package/dist/layout-bridge/index.js +1 -1
  40. package/dist/layout-bridge/index.mjs +1 -1
  41. package/dist/layout-bridge/measuring/index.d.mts +17 -1
  42. package/dist/layout-bridge/measuring/index.d.ts +17 -1
  43. package/dist/layout-bridge/measuring/index.js +1 -1
  44. package/dist/layout-bridge/measuring/index.mjs +1 -1
  45. package/dist/layout-bridge/tableInsertHover.js +1 -1
  46. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  47. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  48. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  49. package/dist/layout-engine/types.d.mts +8 -4
  50. package/dist/layout-engine/types.d.ts +8 -4
  51. package/dist/layout-painter/index.js +1 -1
  52. package/dist/layout-painter/index.mjs +1 -1
  53. package/dist/layout-painter/renderPage.d.mts +7 -0
  54. package/dist/layout-painter/renderPage.d.ts +7 -0
  55. package/dist/layout-painter/renderPage.js +1 -1
  56. package/dist/layout-painter/renderPage.mjs +1 -1
  57. package/dist/mcp-cli.mjs +15 -15
  58. package/dist/mcp.js +2 -2
  59. package/dist/mcp.mjs +1 -1
  60. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  61. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  62. package/dist/prosemirror/conversion/index.js +1 -1
  63. package/dist/prosemirror/conversion/index.mjs +1 -1
  64. package/dist/prosemirror/index.js +1 -1
  65. package/dist/prosemirror/index.mjs +1 -1
  66. package/package.json +1 -1
  67. package/dist/chunk-4AJYHCPB.js +0 -2
  68. package/dist/chunk-7GHQ4YCJ.mjs +0 -1
  69. package/dist/chunk-BWHUD2XC.mjs +0 -4
  70. package/dist/chunk-DY2MJCSV.js +0 -1
  71. package/dist/chunk-G6Y4UZMJ.mjs +0 -1
  72. package/dist/chunk-LMF2ELOB.js +0 -1
  73. package/dist/chunk-N27FJQTG.js +0 -1
  74. package/dist/chunk-UIROUI5I.mjs +0 -1
  75. package/dist/chunk-UOFQYE2L.mjs +0 -1
  76. package/dist/chunk-V7BKPX67.mjs +0 -2
  77. package/dist/chunk-Y7JZPBBW.js +0 -1
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-BGC7QKP5.mjs';import'./chunk-ZRZ2VRQQ.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-V7BKPX67.mjs';import'./chunk-7GHQ4YCJ.mjs';import'./chunk-5N5DBQJV.mjs';import'./chunk-7E5VBRDL.mjs';import'./chunk-YMZ3F2FZ.mjs';import'./chunk-G6Y4UZMJ.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-36VIYQHD.mjs';export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'./chunk-O5X22KZ6.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'./chunk-CKKO4JWE.mjs';export{b as docxtemplaterPlugin}from'./chunk-J7ULKGU2.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-4EHBV73E.mjs';export{f as serializeDocumentBody,g as serializeDocx,e as serializeSectionProperties}from'./chunk-ZYESB4KC.mjs';export{a as PluginRegistry,b as pluginRegistry,c as registerPlugins}from'./chunk-3NRMSZX2.mjs';export{f as parseDocx}from'./chunk-VKTCTMIO.mjs';import'./chunk-BWHUD2XC.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-UIROUI5I.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-JKVXID22.mjs';import'./chunk-LVD6HXRF.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-6VUYFDHY.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 m=L(s);m&&(e.color={rgb:m});}let l=o.backgroundColor;if(l&&l!=="transparent"&&l!=="rgba(0, 0, 0, 0)"){let m=S(l);m&&(e.shading={fill:{rgb:m}});}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 m=h(s);o.push({type:"run",formatting:m,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{z as convertHeaderFooterToContent}from'./chunk-RSMS6OTE.mjs';import'./chunk-LDAOONXZ.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-ITVXBQGR.mjs';import'./chunk-DN36K5JU.mjs';import'./chunk-5N5DBQJV.mjs';import'./chunk-7E5VBRDL.mjs';import'./chunk-YMZ3F2FZ.mjs';import'./chunk-7UTXBQKF.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-N3GIC2UI.mjs';export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'./chunk-O5X22KZ6.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-4EHBV73E.mjs';export{f as serializeDocumentBody,g as serializeDocx,e as serializeSectionProperties}from'./chunk-ZYESB4KC.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-GNPLUGUG.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-JKVXID22.mjs';import'./chunk-LVD6HXRF.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-6VUYFDHY.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 +1 @@
1
- 'use strict';var chunkWLQEPVDR_js=require('../chunk-WLQEPVDR.js'),chunkWNTT4MGC_js=require('../chunk-WNTT4MGC.js');require('../chunk-CCWOLPZE.js');var chunk6ILFFGGS_js=require('../chunk-6ILFFGGS.js'),chunkCWAP26GB_js=require('../chunk-CWAP26GB.js');require('../chunk-KBU6QQFU.js'),require('../chunk-MZOVDLYL.js');var chunkYGHHSCPR_js=require('../chunk-YGHHSCPR.js'),chunk7VCMJCBY_js=require('../chunk-7VCMJCBY.js');require('../chunk-T4CPTPRP.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=chunkCWAP26GB_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 chunkWLQEPVDR_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkWLQEPVDR_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkWLQEPVDR_js.a}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkWNTT4MGC_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkWNTT4MGC_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkWNTT4MGC_js.l}});Object.defineProperty(exports,"formatNumber",{enumerable:true,get:function(){return chunk6ILFFGGS_js.b}});Object.defineProperty(exports,"getBulletCharacter",{enumerable:true,get:function(){return chunk6ILFFGGS_js.d}});Object.defineProperty(exports,"isBulletLevel",{enumerable:true,get:function(){return chunk6ILFFGGS_js.e}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunk6ILFFGGS_js.f}});Object.defineProperty(exports,"parseNumbering",{enumerable:true,get:function(){return chunk6ILFFGGS_js.a}});Object.defineProperty(exports,"renderListMarker",{enumerable:true,get:function(){return chunk6ILFFGGS_js.c}});Object.defineProperty(exports,"getEndnoteText",{enumerable:true,get:function(){return chunkCWAP26GB_js.w}});Object.defineProperty(exports,"getFootnoteText",{enumerable:true,get:function(){return chunkCWAP26GB_js.v}});Object.defineProperty(exports,"getHyperlinkRuns",{enumerable:true,get:function(){return chunkCWAP26GB_js.G}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkCWAP26GB_js.B}});Object.defineProperty(exports,"getHyperlinkUrl",{enumerable:true,get:function(){return chunkCWAP26GB_js.E}});Object.defineProperty(exports,"getTableColumnCount",{enumerable:true,get:function(){return chunkCWAP26GB_js.j}});Object.defineProperty(exports,"getTableRowCount",{enumerable:true,get:function(){return chunkCWAP26GB_js.k}});Object.defineProperty(exports,"hasContent",{enumerable:true,get:function(){return chunkCWAP26GB_js.F}});Object.defineProperty(exports,"hasHeaderRow",{enumerable:true,get:function(){return chunkCWAP26GB_js.n}});Object.defineProperty(exports,"isCellMergeContinuation",{enumerable:true,get:function(){return chunkCWAP26GB_js.l}});Object.defineProperty(exports,"isCellMergeStart",{enumerable:true,get:function(){return chunkCWAP26GB_js.m}});Object.defineProperty(exports,"isExternalLink",{enumerable:true,get:function(){return chunkCWAP26GB_js.C}});Object.defineProperty(exports,"isInternalLink",{enumerable:true,get:function(){return chunkCWAP26GB_js.D}});Object.defineProperty(exports,"isSeparatorEndnote",{enumerable:true,get:function(){return chunkCWAP26GB_js.y}});Object.defineProperty(exports,"isSeparatorFootnote",{enumerable:true,get:function(){return chunkCWAP26GB_js.x}});Object.defineProperty(exports,"parseBorderSpec",{enumerable:true,get:function(){return chunkCWAP26GB_js.d}});Object.defineProperty(exports,"parseCellMargins",{enumerable:true,get:function(){return chunkCWAP26GB_js.f}});Object.defineProperty(exports,"parseEndnoteProperties",{enumerable:true,get:function(){return chunkCWAP26GB_js.u}});Object.defineProperty(exports,"parseEndnotes",{enumerable:true,get:function(){return chunkCWAP26GB_js.s}});Object.defineProperty(exports,"parseFloatingTableProperties",{enumerable:true,get:function(){return chunkCWAP26GB_js.i}});Object.defineProperty(exports,"parseFootnoteProperties",{enumerable:true,get:function(){return chunkCWAP26GB_js.t}});Object.defineProperty(exports,"parseFootnotes",{enumerable:true,get:function(){return chunkCWAP26GB_js.r}});Object.defineProperty(exports,"parseHyperlink",{enumerable:true,get:function(){return chunkCWAP26GB_js.A}});Object.defineProperty(exports,"parseShading",{enumerable:true,get:function(){return chunkCWAP26GB_js.g}});Object.defineProperty(exports,"parseTableBorders",{enumerable:true,get:function(){return chunkCWAP26GB_js.e}});Object.defineProperty(exports,"parseTableLook",{enumerable:true,get:function(){return chunkCWAP26GB_js.h}});Object.defineProperty(exports,"parseTableMeasurement",{enumerable:true,get:function(){return chunkCWAP26GB_js.c}});Object.defineProperty(exports,"parseTableProperties",{enumerable:true,get:function(){return chunkCWAP26GB_js.o}});Object.defineProperty(exports,"resolveHyperlinkUrl",{enumerable:true,get:function(){return chunkCWAP26GB_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 chunkWLQEPVDR_js=require('../chunk-WLQEPVDR.js'),chunkWNTT4MGC_js=require('../chunk-WNTT4MGC.js');require('../chunk-CCWOLPZE.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-T4CPTPRP.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 chunkWLQEPVDR_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkWLQEPVDR_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkWLQEPVDR_js.a}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkWNTT4MGC_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkWNTT4MGC_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkWNTT4MGC_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 +1 @@
1
- export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-O5X22KZ6.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'../chunk-4EHBV73E.mjs';import'../chunk-ZYESB4KC.mjs';export{b as formatNumber,d as getBulletCharacter,e as isBulletLevel,f as parseDocx,a as parseNumbering,c as renderListMarker}from'../chunk-VKTCTMIO.mjs';import {z}from'../chunk-BWHUD2XC.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-BWHUD2XC.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-6VUYFDHY.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-O5X22KZ6.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'../chunk-4EHBV73E.mjs';import'../chunk-ZYESB4KC.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-6VUYFDHY.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 +1 @@
1
- 'use strict';var chunk6ILFFGGS_js=require('../chunk-6ILFFGGS.js');require('../chunk-CWAP26GB.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 chunk6ILFFGGS_js.h}});Object.defineProperty(exports,"getDocxSummary",{enumerable:true,get:function(){return chunk6ILFFGGS_js.j}});Object.defineProperty(exports,"getDocxVariables",{enumerable:true,get:function(){return chunk6ILFFGGS_js.i}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunk6ILFFGGS_js.f}});Object.defineProperty(exports,"quickParseDocx",{enumerable:true,get:function(){return chunk6ILFFGGS_js.g}});
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 +1 @@
1
- export{h as fullParseDocx,j as getDocxSummary,i as getDocxVariables,f as parseDocx,g as quickParseDocx}from'../chunk-VKTCTMIO.mjs';import'../chunk-BWHUD2XC.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-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';
package/dist/headless.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkOCAX2KJQ_js=require('./chunk-OCAX2KJQ.js'),chunkXXU7YQVV_js=require('./chunk-XXU7YQVV.js'),chunkS7IKPRC3_js=require('./chunk-S7IKPRC3.js'),chunkWLQEPVDR_js=require('./chunk-WLQEPVDR.js'),chunkNXLJVVVE_js=require('./chunk-NXLJVVVE.js'),chunkCKXAHSJQ_js=require('./chunk-CKXAHSJQ.js'),chunkU4UCHBZ7_js=require('./chunk-U4UCHBZ7.js'),chunkESI4BSBF_js=require('./chunk-ESI4BSBF.js'),chunkTE2AF7FM_js=require('./chunk-TE2AF7FM.js'),chunkWNTT4MGC_js=require('./chunk-WNTT4MGC.js'),chunkCCWOLPZE_js=require('./chunk-CCWOLPZE.js'),chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),chunk6ILFFGGS_js=require('./chunk-6ILFFGGS.js');require('./chunk-CWAP26GB.js'),require('./chunk-KBU6QQFU.js'),require('./chunk-MZOVDLYL.js'),require('./chunk-YGHHSCPR.js'),require('./chunk-7VCMJCBY.js');var chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js');require('./chunk-T4CPTPRP.js'),require('./chunk-Q4CKLXWA.js');var chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');require('./chunk-DC7S76ZX.js');var je="0.0.2";Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.g}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.f}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.v}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.i}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.e}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.h}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.l}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.n}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.c}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.u}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.a}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.t}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.b}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.d}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.k}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.j}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.r}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.q}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.s}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.o}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.m}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.p}});Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkXXU7YQVV_js.g}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkXXU7YQVV_js.d}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.a}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkXXU7YQVV_js.h}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.b}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkXXU7YQVV_js.f}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkXXU7YQVV_js.e}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.c}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkS7IKPRC3_js.a}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkS7IKPRC3_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkS7IKPRC3_js.g}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunkS7IKPRC3_js.e}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunkS7IKPRC3_js.b}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunkS7IKPRC3_js.c}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkS7IKPRC3_js.d}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkS7IKPRC3_js.f}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunkS7IKPRC3_js.i}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkWLQEPVDR_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkWLQEPVDR_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkWLQEPVDR_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,"isZodSchema",{enumerable:true,get:function(){return chunkCKXAHSJQ_js.a}});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,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESI4BSBF_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkESI4BSBF_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkESI4BSBF_js.i}});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 chunkWNTT4MGC_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkWNTT4MGC_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkWNTT4MGC_js.l}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkCCWOLPZE_js.f}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkCCWOLPZE_js.g}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkCCWOLPZE_js.e}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunk4BFNWPKW_js.d}});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 chunk6ILFFGGS_js.f}});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,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});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,"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.VERSION=je;
1
+ 'use strict';var chunkOCAX2KJQ_js=require('./chunk-OCAX2KJQ.js'),chunkXXU7YQVV_js=require('./chunk-XXU7YQVV.js'),chunkKSYEBTYE_js=require('./chunk-KSYEBTYE.js'),chunkWLQEPVDR_js=require('./chunk-WLQEPVDR.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'),chunkWNTT4MGC_js=require('./chunk-WNTT4MGC.js'),chunkCCWOLPZE_js=require('./chunk-CCWOLPZE.js'),chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),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');var chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js');require('./chunk-T4CPTPRP.js'),require('./chunk-Q4CKLXWA.js');var chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');require('./chunk-DC7S76ZX.js');var je="0.0.2";Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.g}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.f}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.v}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.i}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.e}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.h}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.l}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.n}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.c}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.u}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.a}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.t}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.b}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.d}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.k}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.j}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.r}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.q}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.s}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.o}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.m}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunkOCAX2KJQ_js.p}});Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkXXU7YQVV_js.g}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkXXU7YQVV_js.d}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.a}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkXXU7YQVV_js.h}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.b}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkXXU7YQVV_js.f}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkXXU7YQVV_js.e}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.c}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkKSYEBTYE_js.a}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkKSYEBTYE_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkKSYEBTYE_js.g}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunkKSYEBTYE_js.e}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunkKSYEBTYE_js.b}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunkKSYEBTYE_js.c}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkKSYEBTYE_js.d}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkKSYEBTYE_js.f}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunkKSYEBTYE_js.i}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkWLQEPVDR_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkWLQEPVDR_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkWLQEPVDR_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,"isZodSchema",{enumerable:true,get:function(){return chunkAFMMYLPX_js.a}});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,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESI4BSBF_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkESI4BSBF_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkESI4BSBF_js.i}});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 chunkWNTT4MGC_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkWNTT4MGC_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkWNTT4MGC_js.l}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkCCWOLPZE_js.f}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkCCWOLPZE_js.g}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkCCWOLPZE_js.e}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunk4BFNWPKW_js.d}});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,"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,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});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,"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.VERSION=je;
package/dist/headless.mjs CHANGED
@@ -1 +1 @@
1
- export{g as countCharacters,f as countWords,v as getBlockIndexForParagraph,i as getBodyCharacterCount,e as getBodyText,h as getBodyWordCount,l as getFormattingAtPosition,n as getHyperlinkAtPosition,c as getHyperlinkText,u as getParagraphAtIndex,a as getParagraphText,t as getParagraphs,b as getRunText,d as getTableText,k as getTextAfter,j as getTextBefore,r as hasHyperlinks,q as hasImages,s as hasTables,o as isHeadingStyle,m as isPositionInHyperlink,p as parseHeadingLevel}from'./chunk-FWTP7BN7.mjs';export{g as DEFAULT_AI_ACTIONS,d as comparePositions,a as createCollapsedRange,h as createCommand,b as createRange,f as getActionDescription,e as getActionLabel,c as isPositionInRange}from'./chunk-MVZOTKNL.mjs';export{a as DocumentAgent,h as buildExtendedSelectionContext,g as buildSelectionContext,e as buildSelectionContextFromContext,b as createAgent,c as createAgentFromDocument,d as getAgentContext,f as getDocumentSummary,i as getSelectionFormattingSummary}from'./chunk-36VIYQHD.mjs';export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'./chunk-O5X22KZ6.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'./chunk-CKKO4JWE.mjs';export{a as isZodSchema}from'./chunk-J7ULKGU2.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{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,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-4EHBV73E.mjs';export{f as serializeDocumentBody,g as serializeDocx,e as serializeSectionProperties}from'./chunk-ZYESB4KC.mjs';export{a as PluginRegistry,d as createPluginRegistrar,b as pluginRegistry,c as registerPlugins}from'./chunk-3NRMSZX2.mjs';export{f as parseDocx}from'./chunk-VKTCTMIO.mjs';import'./chunk-BWHUD2XC.mjs';import'./chunk-Y5HZAMND.mjs';import'./chunk-ILJUDEZ5.mjs';import'./chunk-IBNUQL57.mjs';import'./chunk-6LOYA7G5.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,g as getContrastingColor,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,c as resolveHighlightColor,d as resolveShadingColor}from'./chunk-67LVRQIR.mjs';import'./chunk-6VUYFDHY.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'./chunk-QYUPLKLP.mjs';var je="0.0.2";export{je as VERSION};
1
+ export{g as countCharacters,f as countWords,v as getBlockIndexForParagraph,i as getBodyCharacterCount,e as getBodyText,h as getBodyWordCount,l as getFormattingAtPosition,n as getHyperlinkAtPosition,c as getHyperlinkText,u as getParagraphAtIndex,a as getParagraphText,t as getParagraphs,b as getRunText,d as getTableText,k as getTextAfter,j as getTextBefore,r as hasHyperlinks,q as hasImages,s as hasTables,o as isHeadingStyle,m as isPositionInHyperlink,p as parseHeadingLevel}from'./chunk-FWTP7BN7.mjs';export{g as DEFAULT_AI_ACTIONS,d as comparePositions,a as createCollapsedRange,h as createCommand,b as createRange,f as getActionDescription,e as getActionLabel,c as isPositionInRange}from'./chunk-MVZOTKNL.mjs';export{a as DocumentAgent,h as buildExtendedSelectionContext,g as buildSelectionContext,e as buildSelectionContextFromContext,b as createAgent,c as createAgentFromDocument,d as getAgentContext,f as getDocumentSummary,i as getSelectionFormattingSummary}from'./chunk-N3GIC2UI.mjs';export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'./chunk-O5X22KZ6.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'./chunk-CKKO4JWE.mjs';export{a as isZodSchema}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{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,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-4EHBV73E.mjs';export{f as serializeDocumentBody,g as serializeDocx,e as serializeSectionProperties}from'./chunk-ZYESB4KC.mjs';export{a as PluginRegistry,d as createPluginRegistrar,b as pluginRegistry,c as registerPlugins}from'./chunk-3NRMSZX2.mjs';export{f as parseDocx}from'./chunk-R7RR6M4A.mjs';import'./chunk-3GNIP6IX.mjs';import'./chunk-Y5HZAMND.mjs';import'./chunk-ILJUDEZ5.mjs';import'./chunk-IBNUQL57.mjs';import'./chunk-6LOYA7G5.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,g as getContrastingColor,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,c as resolveHighlightColor,d as resolveShadingColor}from'./chunk-67LVRQIR.mjs';import'./chunk-6VUYFDHY.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'./chunk-QYUPLKLP.mjs';var je="0.0.2";export{je as VERSION};
@@ -10,7 +10,7 @@
10
10
  */
11
11
  export { ToFlowBlocksOptions, convertBorderSpecToLayout, resetBlockIdCounter, resolveListTemplate, toFlowBlocks } from './toFlowBlocks.mjs';
12
12
  import { TableBlock, Fragment, FlowBlock, Measure, Page, TableFragment, TableMeasure, ParagraphBlock, ParagraphMeasure, Layout, PageMargins } from '../layout-engine/types.mjs';
13
- export { FloatingExclusionRect, FloatingImageZone, FloatingLineSegmentZone, FontMetrics, FontStyle, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.mjs';
13
+ export { FloatingExclusionRect, FloatingImageZone, FloatingLineSegmentZone, FontMetrics, FontStyle, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.mjs';
14
14
  export { DomCaretPosition, DomSelectionRect, clickToPositionDom, getCaretPositionFromDom, getSelectionRectsFromDom, clickToPositionDom as mouseToPosition } from './clickToPositionDom.mjs';
15
15
  export { C as ConvertFootnoteOptions, a as ConvertHeaderFooterOptions, F as FOOTNOTE_SEPARATOR_HEIGHT, H as HeaderFooterMetrics, M as MAX_FOOTNOTE_LAYOUT_PASSES, b as MeasureBlocksFn, S as StabilizeFootnoteLayoutArgs, c as StabilizeFootnoteLayoutResult, j as applyFootnotePresentation, d as buildFootnoteContentMap, e as buildFootnoteRenderItems, f as calculateFootnoteReservedHeights, k as calculateHeaderFooterVisualBounds, g as collectFootnoteRefs, l as convertFootnoteToContent, h as convertHeaderFooterToContent, i as footnoteReservedHeightsEqual, m as mapFootnotesToPages, n as normalizeHeaderFooterMeasureBlocks, r as resolveHeaderFooterVisualTop, s as stabilizeFootnoteLayout } from '../headerFooterLayout-DkclHZ0Z.mjs';
16
16
  export { TABLE_INSERT_EDGE_PROXIMITY, TABLE_INSERT_HIDE_DELAY_MS, TableInsertHoverHit, TableInsertHoverInput, detectTableInsertHover } from './tableInsertHover.mjs';
@@ -10,7 +10,7 @@
10
10
  */
11
11
  export { ToFlowBlocksOptions, convertBorderSpecToLayout, resetBlockIdCounter, resolveListTemplate, toFlowBlocks } from './toFlowBlocks.js';
12
12
  import { TableBlock, Fragment, FlowBlock, Measure, Page, TableFragment, TableMeasure, ParagraphBlock, ParagraphMeasure, Layout, PageMargins } from '../layout-engine/types.js';
13
- export { FloatingExclusionRect, FloatingImageZone, FloatingLineSegmentZone, FontMetrics, FontStyle, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.js';
13
+ export { FloatingExclusionRect, FloatingImageZone, FloatingLineSegmentZone, FontMetrics, FontStyle, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.js';
14
14
  export { DomCaretPosition, DomSelectionRect, clickToPositionDom, getCaretPositionFromDom, getSelectionRectsFromDom, clickToPositionDom as mouseToPosition } from './clickToPositionDom.js';
15
15
  export { C as ConvertFootnoteOptions, a as ConvertHeaderFooterOptions, F as FOOTNOTE_SEPARATOR_HEIGHT, H as HeaderFooterMetrics, M as MAX_FOOTNOTE_LAYOUT_PASSES, b as MeasureBlocksFn, S as StabilizeFootnoteLayoutArgs, c as StabilizeFootnoteLayoutResult, j as applyFootnotePresentation, d as buildFootnoteContentMap, e as buildFootnoteRenderItems, f as calculateFootnoteReservedHeights, k as calculateHeaderFooterVisualBounds, g as collectFootnoteRefs, l as convertFootnoteToContent, h as convertHeaderFooterToContent, i as footnoteReservedHeightsEqual, m as mapFootnotesToPages, n as normalizeHeaderFooterMeasureBlocks, r as resolveHeaderFooterVisualTop, s as stabilizeFootnoteLayout } from '../headerFooterLayout-B3QVg556.js';
16
16
  export { TABLE_INSERT_EDGE_PROXIMITY, TABLE_INSERT_HIDE_DELAY_MS, TableInsertHoverHit, TableInsertHoverInput, detectTableInsertHover } from './tableInsertHover.js';
@@ -1 +1 @@
1
- 'use strict';var chunkFC6QL3E6_js=require('../chunk-FC6QL3E6.js'),chunk23CP3TOP_js=require('../chunk-23CP3TOP.js'),chunk4AJYHCPB_js=require('../chunk-4AJYHCPB.js'),chunkN27FJQTG_js=require('../chunk-N27FJQTG.js');require('../chunk-44RUAQA2.js'),require('../chunk-DROCYKAR.js');var chunk7RDCZLTU_js=require('../chunk-7RDCZLTU.js'),chunkDY2MJCSV_js=require('../chunk-DY2MJCSV.js');require('../chunk-CWAP26GB.js'),require('../chunk-Y7JZPBBW.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-SUXJX72X.js'),require('../chunk-DFZTUQ7O.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-NERY274X.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-T4CPTPRP.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"DEFAULT_BODY_MARGIN_PX",{enumerable:true,get:function(){return chunkFC6QL3E6_js.E}});Object.defineProperty(exports,"DEFAULT_HF_DISTANCE_PX",{enumerable:true,get:function(){return chunkFC6QL3E6_js.F}});Object.defineProperty(exports,"DEFAULT_PAGE_HEIGHT_PX",{enumerable:true,get:function(){return chunkFC6QL3E6_js.D}});Object.defineProperty(exports,"DEFAULT_PAGE_WIDTH_PX",{enumerable:true,get:function(){return chunkFC6QL3E6_js.C}});Object.defineProperty(exports,"calculateHeaderFooterVisualBounds",{enumerable:true,get:function(){return chunkFC6QL3E6_js.y}});Object.defineProperty(exports,"clickToPosition",{enumerable:true,get:function(){return chunkFC6QL3E6_js.p}});Object.defineProperty(exports,"clickToPositionInParagraph",{enumerable:true,get:function(){return chunkFC6QL3E6_js.n}});Object.defineProperty(exports,"clickToPositionInTableCell",{enumerable:true,get:function(){return chunkFC6QL3E6_js.o}});Object.defineProperty(exports,"convertHeaderFooterToContent",{enumerable:true,get:function(){return chunkFC6QL3E6_js.z}});Object.defineProperty(exports,"countTableColumns",{enumerable:true,get:function(){return chunkFC6QL3E6_js.b}});Object.defineProperty(exports,"getCaretPosition",{enumerable:true,get:function(){return chunkFC6QL3E6_js.t}});Object.defineProperty(exports,"getMargins",{enumerable:true,get:function(){return chunkFC6QL3E6_js.H}});Object.defineProperty(exports,"getPageBounds",{enumerable:true,get:function(){return chunkFC6QL3E6_js.m}});Object.defineProperty(exports,"getPageIndexAtY",{enumerable:true,get:function(){return chunkFC6QL3E6_js.f}});Object.defineProperty(exports,"getPageSize",{enumerable:true,get:function(){return chunkFC6QL3E6_js.G}});Object.defineProperty(exports,"getPageTop",{enumerable:true,get:function(){return chunkFC6QL3E6_js.e}});Object.defineProperty(exports,"getPositionRect",{enumerable:true,get:function(){return chunkFC6QL3E6_js.r}});Object.defineProperty(exports,"getScrollYForPage",{enumerable:true,get:function(){return chunkFC6QL3E6_js.l}});Object.defineProperty(exports,"getTotalDocumentHeight",{enumerable:true,get:function(){return chunkFC6QL3E6_js.k}});Object.defineProperty(exports,"groupRectsByPage",{enumerable:true,get:function(){return chunkFC6QL3E6_js.v}});Object.defineProperty(exports,"hitTest",{enumerable:true,get:function(){return chunkFC6QL3E6_js.j}});Object.defineProperty(exports,"hitTestFragment",{enumerable:true,get:function(){return chunkFC6QL3E6_js.g}});Object.defineProperty(exports,"hitTestImageFragment",{enumerable:true,get:function(){return chunkFC6QL3E6_js.h}});Object.defineProperty(exports,"hitTestPage",{enumerable:true,get:function(){return chunkFC6QL3E6_js.d}});Object.defineProperty(exports,"hitTestTableCell",{enumerable:true,get:function(){return chunkFC6QL3E6_js.i}});Object.defineProperty(exports,"isMultiPageSelection",{enumerable:true,get:function(){return chunkFC6QL3E6_js.u}});Object.defineProperty(exports,"measureTableBlock",{enumerable:true,get:function(){return chunkFC6QL3E6_js.B}});Object.defineProperty(exports,"measureTableCellBlockVisualHeight",{enumerable:true,get:function(){return chunkFC6QL3E6_js.A}});Object.defineProperty(exports,"normalizeHeaderFooterMeasureBlocks",{enumerable:true,get:function(){return chunkFC6QL3E6_js.w}});Object.defineProperty(exports,"normalizeTableColumnWidths",{enumerable:true,get:function(){return chunkFC6QL3E6_js.c}});Object.defineProperty(exports,"positionToX",{enumerable:true,get:function(){return chunkFC6QL3E6_js.q}});Object.defineProperty(exports,"resolveHeaderFooter",{enumerable:true,get:function(){return chunkFC6QL3E6_js.I}});Object.defineProperty(exports,"resolveHeaderFooterVisualTop",{enumerable:true,get:function(){return chunkFC6QL3E6_js.x}});Object.defineProperty(exports,"resolveTableWidthPx",{enumerable:true,get:function(){return chunkFC6QL3E6_js.a}});Object.defineProperty(exports,"selectionToRects",{enumerable:true,get:function(){return chunkFC6QL3E6_js.s}});Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunk23CP3TOP_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunk23CP3TOP_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunk23CP3TOP_js.c}});Object.defineProperty(exports,"FOOTNOTE_SEPARATOR_HEIGHT",{enumerable:true,get:function(){return chunk4AJYHCPB_js.a}});Object.defineProperty(exports,"MAX_FOOTNOTE_LAYOUT_PASSES",{enumerable:true,get:function(){return chunk4AJYHCPB_js.b}});Object.defineProperty(exports,"applyFootnotePresentation",{enumerable:true,get:function(){return chunk4AJYHCPB_js.f}});Object.defineProperty(exports,"buildFootnoteContentMap",{enumerable:true,get:function(){return chunk4AJYHCPB_js.h}});Object.defineProperty(exports,"buildFootnoteRenderItems",{enumerable:true,get:function(){return chunk4AJYHCPB_js.k}});Object.defineProperty(exports,"calculateFootnoteReservedHeights",{enumerable:true,get:function(){return chunk4AJYHCPB_js.i}});Object.defineProperty(exports,"collectFootnoteRefs",{enumerable:true,get:function(){return chunk4AJYHCPB_js.d}});Object.defineProperty(exports,"convertFootnoteToContent",{enumerable:true,get:function(){return chunk4AJYHCPB_js.g}});Object.defineProperty(exports,"footnoteReservedHeightsEqual",{enumerable:true,get:function(){return chunk4AJYHCPB_js.c}});Object.defineProperty(exports,"mapFootnotesToPages",{enumerable:true,get:function(){return chunk4AJYHCPB_js.e}});Object.defineProperty(exports,"stabilizeFootnoteLayout",{enumerable:true,get:function(){return chunk4AJYHCPB_js.j}});Object.defineProperty(exports,"convertBorderSpecToLayout",{enumerable:true,get:function(){return chunkN27FJQTG_js.b}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkN27FJQTG_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkN27FJQTG_js.c}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkN27FJQTG_js.d}});Object.defineProperty(exports,"clickToPositionDom",{enumerable:true,get:function(){return chunk7RDCZLTU_js.e}});Object.defineProperty(exports,"findBodyEmptyRuns",{enumerable:true,get:function(){return chunk7RDCZLTU_js.b}});Object.defineProperty(exports,"findBodyPmAnchor",{enumerable:true,get:function(){return chunk7RDCZLTU_js.d}});Object.defineProperty(exports,"findBodyPmAnchors",{enumerable:true,get:function(){return chunk7RDCZLTU_js.c}});Object.defineProperty(exports,"findBodyPmSpans",{enumerable:true,get:function(){return chunk7RDCZLTU_js.a}});Object.defineProperty(exports,"getCaretPositionFromDom",{enumerable:true,get:function(){return chunk7RDCZLTU_js.g}});Object.defineProperty(exports,"getSelectionRectsFromDom",{enumerable:true,get:function(){return chunk7RDCZLTU_js.f}});Object.defineProperty(exports,"mouseToPosition",{enumerable:true,get:function(){return chunk7RDCZLTU_js.e}});Object.defineProperty(exports,"buildFontString",{enumerable:true,get:function(){return chunkDY2MJCSV_js.c}});Object.defineProperty(exports,"clearAllCaches",{enumerable:true,get:function(){return chunkDY2MJCSV_js.K}});Object.defineProperty(exports,"clearFontMetricsCache",{enumerable:true,get:function(){return chunkDY2MJCSV_js.B}});Object.defineProperty(exports,"clearParagraphMeasureCache",{enumerable:true,get:function(){return chunkDY2MJCSV_js.H}});Object.defineProperty(exports,"clearTextWidthCache",{enumerable:true,get:function(){return chunkDY2MJCSV_js.w}});Object.defineProperty(exports,"findCharacterAtX",{enumerable:true,get:function(){return chunkDY2MJCSV_js.h}});Object.defineProperty(exports,"getCachedFontMetrics",{enumerable:true,get:function(){return chunkDY2MJCSV_js.z}});Object.defineProperty(exports,"getCachedParagraphMeasure",{enumerable:true,get:function(){return chunkDY2MJCSV_js.F}});Object.defineProperty(exports,"getCachedTextWidth",{enumerable:true,get:function(){return chunkDY2MJCSV_js.u}});Object.defineProperty(exports,"getCanvasContext",{enumerable:true,get:function(){return chunkDY2MJCSV_js.a}});Object.defineProperty(exports,"getFloatingMargins",{enumerable:true,get:function(){return chunkDY2MJCSV_js.q}});Object.defineProperty(exports,"getFontCacheSize",{enumerable:true,get:function(){return chunkDY2MJCSV_js.D}});Object.defineProperty(exports,"getFontMetrics",{enumerable:true,get:function(){return chunkDY2MJCSV_js.d}});Object.defineProperty(exports,"getParagraphCacheSize",{enumerable:true,get:function(){return chunkDY2MJCSV_js.J}});Object.defineProperty(exports,"getRunCharWidths",{enumerable:true,get:function(){return chunkDY2MJCSV_js.t}});Object.defineProperty(exports,"getTextCacheSize",{enumerable:true,get:function(){return chunkDY2MJCSV_js.y}});Object.defineProperty(exports,"getTotalCacheSize",{enumerable:true,get:function(){return chunkDY2MJCSV_js.L}});Object.defineProperty(exports,"getXForCharacter",{enumerable:true,get:function(){return chunkDY2MJCSV_js.i}});Object.defineProperty(exports,"halfPtToPx",{enumerable:true,get:function(){return chunkDY2MJCSV_js.n}});Object.defineProperty(exports,"hashParagraphBlock",{enumerable:true,get:function(){return chunkDY2MJCSV_js.E}});Object.defineProperty(exports,"measureParagraph",{enumerable:true,get:function(){return chunkDY2MJCSV_js.r}});Object.defineProperty(exports,"measureParagraphs",{enumerable:true,get:function(){return chunkDY2MJCSV_js.s}});Object.defineProperty(exports,"measureRun",{enumerable:true,get:function(){return chunkDY2MJCSV_js.g}});Object.defineProperty(exports,"measureText",{enumerable:true,get:function(){return chunkDY2MJCSV_js.f}});Object.defineProperty(exports,"measureTextWidth",{enumerable:true,get:function(){return chunkDY2MJCSV_js.e}});Object.defineProperty(exports,"ptToPx",{enumerable:true,get:function(){return chunkDY2MJCSV_js.l}});Object.defineProperty(exports,"pxToHalfPt",{enumerable:true,get:function(){return chunkDY2MJCSV_js.o}});Object.defineProperty(exports,"pxToPt",{enumerable:true,get:function(){return chunkDY2MJCSV_js.m}});Object.defineProperty(exports,"pxToTwips",{enumerable:true,get:function(){return chunkDY2MJCSV_js.k}});Object.defineProperty(exports,"rectsToFloatingZones",{enumerable:true,get:function(){return chunkDY2MJCSV_js.p}});Object.defineProperty(exports,"resetCanvasContext",{enumerable:true,get:function(){return chunkDY2MJCSV_js.b}});Object.defineProperty(exports,"setCachedFontMetrics",{enumerable:true,get:function(){return chunkDY2MJCSV_js.A}});Object.defineProperty(exports,"setCachedParagraphMeasure",{enumerable:true,get:function(){return chunkDY2MJCSV_js.G}});Object.defineProperty(exports,"setCachedTextWidth",{enumerable:true,get:function(){return chunkDY2MJCSV_js.v}});Object.defineProperty(exports,"setFontCacheSize",{enumerable:true,get:function(){return chunkDY2MJCSV_js.C}});Object.defineProperty(exports,"setParagraphCacheSize",{enumerable:true,get:function(){return chunkDY2MJCSV_js.I}});Object.defineProperty(exports,"setTextCacheSize",{enumerable:true,get:function(){return chunkDY2MJCSV_js.x}});Object.defineProperty(exports,"twipsToPx",{enumerable:true,get:function(){return chunkDY2MJCSV_js.j}});
1
+ 'use strict';var chunkNFYCMDM5_js=require('../chunk-NFYCMDM5.js'),chunkGH5N36F7_js=require('../chunk-GH5N36F7.js'),chunkPK4PDRTA_js=require('../chunk-PK4PDRTA.js'),chunkBD4CYYFB_js=require('../chunk-BD4CYYFB.js');require('../chunk-44RUAQA2.js'),require('../chunk-DROCYKAR.js');var chunk7RDCZLTU_js=require('../chunk-7RDCZLTU.js'),chunkTZJUO3NW_js=require('../chunk-TZJUO3NW.js');require('../chunk-DV6IEOP5.js'),require('../chunk-HVZMO3BU.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-SUXJX72X.js'),require('../chunk-DFZTUQ7O.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-NERY274X.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-T4CPTPRP.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"DEFAULT_BODY_MARGIN_PX",{enumerable:true,get:function(){return chunkNFYCMDM5_js.E}});Object.defineProperty(exports,"DEFAULT_HF_DISTANCE_PX",{enumerable:true,get:function(){return chunkNFYCMDM5_js.F}});Object.defineProperty(exports,"DEFAULT_PAGE_HEIGHT_PX",{enumerable:true,get:function(){return chunkNFYCMDM5_js.D}});Object.defineProperty(exports,"DEFAULT_PAGE_WIDTH_PX",{enumerable:true,get:function(){return chunkNFYCMDM5_js.C}});Object.defineProperty(exports,"calculateHeaderFooterVisualBounds",{enumerable:true,get:function(){return chunkNFYCMDM5_js.y}});Object.defineProperty(exports,"clickToPosition",{enumerable:true,get:function(){return chunkNFYCMDM5_js.p}});Object.defineProperty(exports,"clickToPositionInParagraph",{enumerable:true,get:function(){return chunkNFYCMDM5_js.n}});Object.defineProperty(exports,"clickToPositionInTableCell",{enumerable:true,get:function(){return chunkNFYCMDM5_js.o}});Object.defineProperty(exports,"convertHeaderFooterToContent",{enumerable:true,get:function(){return chunkNFYCMDM5_js.z}});Object.defineProperty(exports,"countTableColumns",{enumerable:true,get:function(){return chunkNFYCMDM5_js.b}});Object.defineProperty(exports,"getCaretPosition",{enumerable:true,get:function(){return chunkNFYCMDM5_js.t}});Object.defineProperty(exports,"getMargins",{enumerable:true,get:function(){return chunkNFYCMDM5_js.H}});Object.defineProperty(exports,"getPageBounds",{enumerable:true,get:function(){return chunkNFYCMDM5_js.m}});Object.defineProperty(exports,"getPageIndexAtY",{enumerable:true,get:function(){return chunkNFYCMDM5_js.f}});Object.defineProperty(exports,"getPageSize",{enumerable:true,get:function(){return chunkNFYCMDM5_js.G}});Object.defineProperty(exports,"getPageTop",{enumerable:true,get:function(){return chunkNFYCMDM5_js.e}});Object.defineProperty(exports,"getPositionRect",{enumerable:true,get:function(){return chunkNFYCMDM5_js.r}});Object.defineProperty(exports,"getScrollYForPage",{enumerable:true,get:function(){return chunkNFYCMDM5_js.l}});Object.defineProperty(exports,"getTotalDocumentHeight",{enumerable:true,get:function(){return chunkNFYCMDM5_js.k}});Object.defineProperty(exports,"groupRectsByPage",{enumerable:true,get:function(){return chunkNFYCMDM5_js.v}});Object.defineProperty(exports,"hitTest",{enumerable:true,get:function(){return chunkNFYCMDM5_js.j}});Object.defineProperty(exports,"hitTestFragment",{enumerable:true,get:function(){return chunkNFYCMDM5_js.g}});Object.defineProperty(exports,"hitTestImageFragment",{enumerable:true,get:function(){return chunkNFYCMDM5_js.h}});Object.defineProperty(exports,"hitTestPage",{enumerable:true,get:function(){return chunkNFYCMDM5_js.d}});Object.defineProperty(exports,"hitTestTableCell",{enumerable:true,get:function(){return chunkNFYCMDM5_js.i}});Object.defineProperty(exports,"isMultiPageSelection",{enumerable:true,get:function(){return chunkNFYCMDM5_js.u}});Object.defineProperty(exports,"measureTableBlock",{enumerable:true,get:function(){return chunkNFYCMDM5_js.B}});Object.defineProperty(exports,"measureTableCellBlockVisualHeight",{enumerable:true,get:function(){return chunkNFYCMDM5_js.A}});Object.defineProperty(exports,"normalizeHeaderFooterMeasureBlocks",{enumerable:true,get:function(){return chunkNFYCMDM5_js.w}});Object.defineProperty(exports,"normalizeTableColumnWidths",{enumerable:true,get:function(){return chunkNFYCMDM5_js.c}});Object.defineProperty(exports,"positionToX",{enumerable:true,get:function(){return chunkNFYCMDM5_js.q}});Object.defineProperty(exports,"resolveHeaderFooter",{enumerable:true,get:function(){return chunkNFYCMDM5_js.I}});Object.defineProperty(exports,"resolveHeaderFooterVisualTop",{enumerable:true,get:function(){return chunkNFYCMDM5_js.x}});Object.defineProperty(exports,"resolveTableWidthPx",{enumerable:true,get:function(){return chunkNFYCMDM5_js.a}});Object.defineProperty(exports,"selectionToRects",{enumerable:true,get:function(){return chunkNFYCMDM5_js.s}});Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunkGH5N36F7_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunkGH5N36F7_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunkGH5N36F7_js.c}});Object.defineProperty(exports,"FOOTNOTE_SEPARATOR_HEIGHT",{enumerable:true,get:function(){return chunkPK4PDRTA_js.a}});Object.defineProperty(exports,"MAX_FOOTNOTE_LAYOUT_PASSES",{enumerable:true,get:function(){return chunkPK4PDRTA_js.b}});Object.defineProperty(exports,"applyFootnotePresentation",{enumerable:true,get:function(){return chunkPK4PDRTA_js.f}});Object.defineProperty(exports,"buildFootnoteContentMap",{enumerable:true,get:function(){return chunkPK4PDRTA_js.h}});Object.defineProperty(exports,"buildFootnoteRenderItems",{enumerable:true,get:function(){return chunkPK4PDRTA_js.k}});Object.defineProperty(exports,"calculateFootnoteReservedHeights",{enumerable:true,get:function(){return chunkPK4PDRTA_js.i}});Object.defineProperty(exports,"collectFootnoteRefs",{enumerable:true,get:function(){return chunkPK4PDRTA_js.d}});Object.defineProperty(exports,"convertFootnoteToContent",{enumerable:true,get:function(){return chunkPK4PDRTA_js.g}});Object.defineProperty(exports,"footnoteReservedHeightsEqual",{enumerable:true,get:function(){return chunkPK4PDRTA_js.c}});Object.defineProperty(exports,"mapFootnotesToPages",{enumerable:true,get:function(){return chunkPK4PDRTA_js.e}});Object.defineProperty(exports,"stabilizeFootnoteLayout",{enumerable:true,get:function(){return chunkPK4PDRTA_js.j}});Object.defineProperty(exports,"convertBorderSpecToLayout",{enumerable:true,get:function(){return chunkBD4CYYFB_js.b}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkBD4CYYFB_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkBD4CYYFB_js.c}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkBD4CYYFB_js.d}});Object.defineProperty(exports,"clickToPositionDom",{enumerable:true,get:function(){return chunk7RDCZLTU_js.e}});Object.defineProperty(exports,"findBodyEmptyRuns",{enumerable:true,get:function(){return chunk7RDCZLTU_js.b}});Object.defineProperty(exports,"findBodyPmAnchor",{enumerable:true,get:function(){return chunk7RDCZLTU_js.d}});Object.defineProperty(exports,"findBodyPmAnchors",{enumerable:true,get:function(){return chunk7RDCZLTU_js.c}});Object.defineProperty(exports,"findBodyPmSpans",{enumerable:true,get:function(){return chunk7RDCZLTU_js.a}});Object.defineProperty(exports,"getCaretPositionFromDom",{enumerable:true,get:function(){return chunk7RDCZLTU_js.g}});Object.defineProperty(exports,"getSelectionRectsFromDom",{enumerable:true,get:function(){return chunk7RDCZLTU_js.f}});Object.defineProperty(exports,"mouseToPosition",{enumerable:true,get:function(){return chunk7RDCZLTU_js.e}});Object.defineProperty(exports,"buildFontString",{enumerable:true,get:function(){return chunkTZJUO3NW_js.c}});Object.defineProperty(exports,"clampFloatingWrapMargins",{enumerable:true,get:function(){return chunkTZJUO3NW_js.r}});Object.defineProperty(exports,"clearAllCaches",{enumerable:true,get:function(){return chunkTZJUO3NW_js.L}});Object.defineProperty(exports,"clearFontMetricsCache",{enumerable:true,get:function(){return chunkTZJUO3NW_js.C}});Object.defineProperty(exports,"clearParagraphMeasureCache",{enumerable:true,get:function(){return chunkTZJUO3NW_js.I}});Object.defineProperty(exports,"clearTextWidthCache",{enumerable:true,get:function(){return chunkTZJUO3NW_js.x}});Object.defineProperty(exports,"findCharacterAtX",{enumerable:true,get:function(){return chunkTZJUO3NW_js.h}});Object.defineProperty(exports,"getCachedFontMetrics",{enumerable:true,get:function(){return chunkTZJUO3NW_js.A}});Object.defineProperty(exports,"getCachedParagraphMeasure",{enumerable:true,get:function(){return chunkTZJUO3NW_js.G}});Object.defineProperty(exports,"getCachedTextWidth",{enumerable:true,get:function(){return chunkTZJUO3NW_js.v}});Object.defineProperty(exports,"getCanvasContext",{enumerable:true,get:function(){return chunkTZJUO3NW_js.a}});Object.defineProperty(exports,"getFloatingMargins",{enumerable:true,get:function(){return chunkTZJUO3NW_js.q}});Object.defineProperty(exports,"getFontCacheSize",{enumerable:true,get:function(){return chunkTZJUO3NW_js.E}});Object.defineProperty(exports,"getFontMetrics",{enumerable:true,get:function(){return chunkTZJUO3NW_js.d}});Object.defineProperty(exports,"getParagraphCacheSize",{enumerable:true,get:function(){return chunkTZJUO3NW_js.K}});Object.defineProperty(exports,"getRunCharWidths",{enumerable:true,get:function(){return chunkTZJUO3NW_js.u}});Object.defineProperty(exports,"getTextCacheSize",{enumerable:true,get:function(){return chunkTZJUO3NW_js.z}});Object.defineProperty(exports,"getTotalCacheSize",{enumerable:true,get:function(){return chunkTZJUO3NW_js.M}});Object.defineProperty(exports,"getXForCharacter",{enumerable:true,get:function(){return chunkTZJUO3NW_js.i}});Object.defineProperty(exports,"halfPtToPx",{enumerable:true,get:function(){return chunkTZJUO3NW_js.n}});Object.defineProperty(exports,"hashParagraphBlock",{enumerable:true,get:function(){return chunkTZJUO3NW_js.F}});Object.defineProperty(exports,"measureParagraph",{enumerable:true,get:function(){return chunkTZJUO3NW_js.s}});Object.defineProperty(exports,"measureParagraphs",{enumerable:true,get:function(){return chunkTZJUO3NW_js.t}});Object.defineProperty(exports,"measureRun",{enumerable:true,get:function(){return chunkTZJUO3NW_js.g}});Object.defineProperty(exports,"measureText",{enumerable:true,get:function(){return chunkTZJUO3NW_js.f}});Object.defineProperty(exports,"measureTextWidth",{enumerable:true,get:function(){return chunkTZJUO3NW_js.e}});Object.defineProperty(exports,"ptToPx",{enumerable:true,get:function(){return chunkTZJUO3NW_js.l}});Object.defineProperty(exports,"pxToHalfPt",{enumerable:true,get:function(){return chunkTZJUO3NW_js.o}});Object.defineProperty(exports,"pxToPt",{enumerable:true,get:function(){return chunkTZJUO3NW_js.m}});Object.defineProperty(exports,"pxToTwips",{enumerable:true,get:function(){return chunkTZJUO3NW_js.k}});Object.defineProperty(exports,"rectsToFloatingZones",{enumerable:true,get:function(){return chunkTZJUO3NW_js.p}});Object.defineProperty(exports,"resetCanvasContext",{enumerable:true,get:function(){return chunkTZJUO3NW_js.b}});Object.defineProperty(exports,"setCachedFontMetrics",{enumerable:true,get:function(){return chunkTZJUO3NW_js.B}});Object.defineProperty(exports,"setCachedParagraphMeasure",{enumerable:true,get:function(){return chunkTZJUO3NW_js.H}});Object.defineProperty(exports,"setCachedTextWidth",{enumerable:true,get:function(){return chunkTZJUO3NW_js.w}});Object.defineProperty(exports,"setFontCacheSize",{enumerable:true,get:function(){return chunkTZJUO3NW_js.D}});Object.defineProperty(exports,"setParagraphCacheSize",{enumerable:true,get:function(){return chunkTZJUO3NW_js.J}});Object.defineProperty(exports,"setTextCacheSize",{enumerable:true,get:function(){return chunkTZJUO3NW_js.y}});Object.defineProperty(exports,"twipsToPx",{enumerable:true,get:function(){return chunkTZJUO3NW_js.j}});
@@ -1 +1 @@
1
- export{E as DEFAULT_BODY_MARGIN_PX,F as DEFAULT_HF_DISTANCE_PX,D as DEFAULT_PAGE_HEIGHT_PX,C as DEFAULT_PAGE_WIDTH_PX,y as calculateHeaderFooterVisualBounds,p as clickToPosition,n as clickToPositionInParagraph,o as clickToPositionInTableCell,z as convertHeaderFooterToContent,b as countTableColumns,t as getCaretPosition,H as getMargins,m as getPageBounds,f as getPageIndexAtY,G as getPageSize,e as getPageTop,r as getPositionRect,l as getScrollYForPage,k as getTotalDocumentHeight,v as groupRectsByPage,j as hitTest,g as hitTestFragment,h as hitTestImageFragment,d as hitTestPage,i as hitTestTableCell,u as isMultiPageSelection,B as measureTableBlock,A as measureTableCellBlockVisualHeight,w as normalizeHeaderFooterMeasureBlocks,c as normalizeTableColumnWidths,q as positionToX,I as resolveHeaderFooter,x as resolveHeaderFooterVisualTop,a as resolveTableWidthPx,s as selectionToRects}from'../chunk-BGC7QKP5.mjs';export{a as TABLE_INSERT_EDGE_PROXIMITY,b as TABLE_INSERT_HIDE_DELAY_MS,c as detectTableInsertHover}from'../chunk-ZRZ2VRQQ.mjs';export{a as FOOTNOTE_SEPARATOR_HEIGHT,b as MAX_FOOTNOTE_LAYOUT_PASSES,f as applyFootnotePresentation,h as buildFootnoteContentMap,k as buildFootnoteRenderItems,i as calculateFootnoteReservedHeights,d as collectFootnoteRefs,g as convertFootnoteToContent,c as footnoteReservedHeightsEqual,e as mapFootnotesToPages,j as stabilizeFootnoteLayout}from'../chunk-V7BKPX67.mjs';export{b as convertBorderSpecToLayout,a as resetBlockIdCounter,c as resolveListTemplate,d as toFlowBlocks}from'../chunk-7GHQ4YCJ.mjs';import'../chunk-5N5DBQJV.mjs';import'../chunk-7E5VBRDL.mjs';export{e as clickToPositionDom,b as findBodyEmptyRuns,d as findBodyPmAnchor,c as findBodyPmAnchors,a as findBodyPmSpans,g as getCaretPositionFromDom,f as getSelectionRectsFromDom,e as mouseToPosition}from'../chunk-YMZ3F2FZ.mjs';export{c as buildFontString,K as clearAllCaches,B as clearFontMetricsCache,H as clearParagraphMeasureCache,w as clearTextWidthCache,h as findCharacterAtX,z as getCachedFontMetrics,F as getCachedParagraphMeasure,u as getCachedTextWidth,a as getCanvasContext,q as getFloatingMargins,D as getFontCacheSize,d as getFontMetrics,J as getParagraphCacheSize,t as getRunCharWidths,y as getTextCacheSize,L as getTotalCacheSize,i as getXForCharacter,n as halfPtToPx,E as hashParagraphBlock,r as measureParagraph,s as measureParagraphs,g as measureRun,f as measureText,e as measureTextWidth,l as ptToPx,o as pxToHalfPt,m as pxToPt,k as pxToTwips,p as rectsToFloatingZones,b as resetCanvasContext,A as setCachedFontMetrics,G as setCachedParagraphMeasure,v as setCachedTextWidth,C as setFontCacheSize,I as setParagraphCacheSize,x as setTextCacheSize,j as twipsToPx}from'../chunk-G6Y4UZMJ.mjs';import'../chunk-BWHUD2XC.mjs';import'../chunk-UIROUI5I.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-JKVXID22.mjs';import'../chunk-LVD6HXRF.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-CP5OSG5Z.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-6VUYFDHY.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{E as DEFAULT_BODY_MARGIN_PX,F as DEFAULT_HF_DISTANCE_PX,D as DEFAULT_PAGE_HEIGHT_PX,C as DEFAULT_PAGE_WIDTH_PX,y as calculateHeaderFooterVisualBounds,p as clickToPosition,n as clickToPositionInParagraph,o as clickToPositionInTableCell,z as convertHeaderFooterToContent,b as countTableColumns,t as getCaretPosition,H as getMargins,m as getPageBounds,f as getPageIndexAtY,G as getPageSize,e as getPageTop,r as getPositionRect,l as getScrollYForPage,k as getTotalDocumentHeight,v as groupRectsByPage,j as hitTest,g as hitTestFragment,h as hitTestImageFragment,d as hitTestPage,i as hitTestTableCell,u as isMultiPageSelection,B as measureTableBlock,A as measureTableCellBlockVisualHeight,w as normalizeHeaderFooterMeasureBlocks,c as normalizeTableColumnWidths,q as positionToX,I as resolveHeaderFooter,x as resolveHeaderFooterVisualTop,a as resolveTableWidthPx,s as selectionToRects}from'../chunk-RSMS6OTE.mjs';export{a as TABLE_INSERT_EDGE_PROXIMITY,b as TABLE_INSERT_HIDE_DELAY_MS,c as detectTableInsertHover}from'../chunk-LDAOONXZ.mjs';export{a as FOOTNOTE_SEPARATOR_HEIGHT,b as MAX_FOOTNOTE_LAYOUT_PASSES,f as applyFootnotePresentation,h as buildFootnoteContentMap,k as buildFootnoteRenderItems,i as calculateFootnoteReservedHeights,d as collectFootnoteRefs,g as convertFootnoteToContent,c as footnoteReservedHeightsEqual,e as mapFootnotesToPages,j as stabilizeFootnoteLayout}from'../chunk-ITVXBQGR.mjs';export{b as convertBorderSpecToLayout,a as resetBlockIdCounter,c as resolveListTemplate,d as toFlowBlocks}from'../chunk-DN36K5JU.mjs';import'../chunk-5N5DBQJV.mjs';import'../chunk-7E5VBRDL.mjs';export{e as clickToPositionDom,b as findBodyEmptyRuns,d as findBodyPmAnchor,c as findBodyPmAnchors,a as findBodyPmSpans,g as getCaretPositionFromDom,f as getSelectionRectsFromDom,e as mouseToPosition}from'../chunk-YMZ3F2FZ.mjs';export{c as buildFontString,r as clampFloatingWrapMargins,L as clearAllCaches,C as clearFontMetricsCache,I as clearParagraphMeasureCache,x as clearTextWidthCache,h as findCharacterAtX,A as getCachedFontMetrics,G as getCachedParagraphMeasure,v as getCachedTextWidth,a as getCanvasContext,q as getFloatingMargins,E as getFontCacheSize,d as getFontMetrics,K as getParagraphCacheSize,u as getRunCharWidths,z as getTextCacheSize,M as getTotalCacheSize,i as getXForCharacter,n as halfPtToPx,F as hashParagraphBlock,s as measureParagraph,t as measureParagraphs,g as measureRun,f as measureText,e as measureTextWidth,l as ptToPx,o as pxToHalfPt,m as pxToPt,k as pxToTwips,p as rectsToFloatingZones,b as resetCanvasContext,B as setCachedFontMetrics,H as setCachedParagraphMeasure,w as setCachedTextWidth,D as setFontCacheSize,J as setParagraphCacheSize,y as setTextCacheSize,j as twipsToPx}from'../chunk-7UTXBQKF.mjs';import'../chunk-3GNIP6IX.mjs';import'../chunk-GNPLUGUG.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-JKVXID22.mjs';import'../chunk-LVD6HXRF.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-CP5OSG5Z.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-6VUYFDHY.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -202,6 +202,22 @@ interface MeasureParagraphOptions {
202
202
  /** Y offset of this paragraph relative to the exclusion zones (default: 0) */
203
203
  paragraphYOffset?: number;
204
204
  }
205
+ /**
206
+ * When a float's wrap margins consume the entire content width (or more),
207
+ * there is no horizontal strip beside it for body text. Word renders the
208
+ * following lines at full content width instead of squeezing them into a
209
+ * 1-pixel column. Unchecked margins from near-full-width tables/images can
210
+ * exceed contentWidth and collapse every line to ~1 glyph (the "single
211
+ * character per line after a wide floating table" bug).
212
+ *
213
+ * Returned margins are zeroed when:
214
+ * - either side alone is >= contentWidth (no strip on that side at all), or
215
+ * - their sum is >= contentWidth (no strip exists between the two sides).
216
+ */
217
+ declare function clampFloatingWrapMargins(leftMargin: number, rightMargin: number, contentWidth: number): {
218
+ leftMargin: number;
219
+ rightMargin: number;
220
+ };
205
221
  /**
206
222
  * Measure a paragraph block and compute line breaks
207
223
  *
@@ -317,4 +333,4 @@ declare function clearAllCaches(): void;
317
333
  */
318
334
  declare function getTotalCacheSize(): number;
319
335
 
320
- export { type FloatingExclusionRect, type FloatingImageZone, type FloatingLineSegmentZone, type FontMetrics, type FontStyle, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };
336
+ export { type FloatingExclusionRect, type FloatingImageZone, type FloatingLineSegmentZone, type FontMetrics, type FontStyle, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };
@@ -202,6 +202,22 @@ interface MeasureParagraphOptions {
202
202
  /** Y offset of this paragraph relative to the exclusion zones (default: 0) */
203
203
  paragraphYOffset?: number;
204
204
  }
205
+ /**
206
+ * When a float's wrap margins consume the entire content width (or more),
207
+ * there is no horizontal strip beside it for body text. Word renders the
208
+ * following lines at full content width instead of squeezing them into a
209
+ * 1-pixel column. Unchecked margins from near-full-width tables/images can
210
+ * exceed contentWidth and collapse every line to ~1 glyph (the "single
211
+ * character per line after a wide floating table" bug).
212
+ *
213
+ * Returned margins are zeroed when:
214
+ * - either side alone is >= contentWidth (no strip on that side at all), or
215
+ * - their sum is >= contentWidth (no strip exists between the two sides).
216
+ */
217
+ declare function clampFloatingWrapMargins(leftMargin: number, rightMargin: number, contentWidth: number): {
218
+ leftMargin: number;
219
+ rightMargin: number;
220
+ };
205
221
  /**
206
222
  * Measure a paragraph block and compute line breaks
207
223
  *
@@ -317,4 +333,4 @@ declare function clearAllCaches(): void;
317
333
  */
318
334
  declare function getTotalCacheSize(): number;
319
335
 
320
- export { type FloatingExclusionRect, type FloatingImageZone, type FloatingLineSegmentZone, type FontMetrics, type FontStyle, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };
336
+ export { type FloatingExclusionRect, type FloatingImageZone, type FloatingLineSegmentZone, type FontMetrics, type FontStyle, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };