@zeke-02/docx-editor 0.5.3 → 0.5.4
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.
- package/dist/{KeyboardShortcutsDialog-5D_FoAp6.d.ts → KeyboardShortcutsDialog-B0UFuR4w.d.ts} +2 -2
- package/dist/{KeyboardShortcutsDialog-D7ihAj18.d.mts → KeyboardShortcutsDialog-t6JKL4Aj.d.mts} +2 -2
- package/dist/PageSetupDialog-642IAVG2.js +1 -1
- package/dist/PageSetupDialog-ERUQDHAY.mjs +1 -1
- package/dist/PluginHost-HS31VIuo.d.mts +16 -0
- package/dist/PluginHost-zILZO7zX.d.ts +16 -0
- package/dist/{agentApi-D4AZmNfB.d.ts → agentApi-B2Y7kexW.d.ts} +1 -1
- package/dist/{agentApi-C41hiW-n.d.mts → agentApi-BzUJ_kao.d.mts} +1 -1
- package/dist/{chunk-E6MQXELR.js → chunk-HXDMASAR.js} +1 -1
- package/dist/chunk-JFRDFK7V.mjs +260 -0
- package/dist/{chunk-LUJ6HCMH.mjs → chunk-LWOHVYKW.mjs} +1 -1
- package/dist/chunk-MDTA25AN.mjs +60 -0
- package/dist/chunk-NOLMVQNN.mjs +40 -0
- package/dist/chunk-SGTUE33R.js +260 -0
- package/dist/chunk-WO3FIV4B.js +40 -0
- package/dist/{chunk-ONNHQWAX.mjs → chunk-XGJ2EORY.mjs} +1 -1
- package/dist/{chunk-AYMGSTNG.js → chunk-Y3SEHWZ2.js} +1 -1
- package/dist/chunk-YBEVHQCT.js +60 -0
- package/dist/{content-B2MzIMwA.d.mts → content-REFGFfEH.d.mts} +1 -1
- package/dist/{content-B2MzIMwA.d.ts → content-REFGFfEH.d.ts} +1 -1
- package/dist/dialogs.d.mts +4 -4
- package/dist/dialogs.d.ts +4 -4
- package/dist/dialogs.js +1 -1
- package/dist/dialogs.mjs +1 -1
- package/dist/{document-Di1qGqLS.d.mts → document-Cu2vq_wS.d.mts} +1 -1
- package/dist/{document-DZ_ZeZEH.d.ts → document-CxOagoLQ.d.ts} +1 -1
- package/dist/executor-WBHID2RK.mjs +1 -0
- package/dist/{executor-EPEB53SJ.js → executor-Y5VUOAHY.js} +1 -1
- package/dist/{findReplace-pkMskVJU.d.ts → findReplace-Bue0JaXh.d.ts} +1 -1
- package/dist/{findReplace-CpIoILbP.d.mts → findReplace-shXbOjFQ.d.mts} +1 -1
- package/dist/fork.css +1 -0
- package/dist/fork.d.mts +535 -0
- package/dist/fork.d.ts +535 -0
- package/dist/fork.js +1 -0
- package/dist/fork.mjs +1 -0
- package/dist/hooks.d.mts +6 -6
- package/dist/hooks.d.ts +6 -6
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index-B5A-J9GC.d.ts +1119 -0
- package/dist/index-bw-PaozF.d.mts +1119 -0
- package/dist/index.d.mts +11 -1120
- package/dist/index.d.ts +11 -1120
- package/dist/index.js +1 -40
- package/dist/index.mjs +1 -40
- package/dist/plugin-api.d.mts +5 -16
- package/dist/plugin-api.d.ts +5 -16
- package/dist/plugin-api.js +1 -260
- package/dist/plugin-api.mjs +1 -260
- package/dist/{types-DZUhB7Ao.d.mts → types-BF48VxkC.d.mts} +1 -1
- package/dist/{types-DZUhB7Ao.d.ts → types-BF48VxkC.d.ts} +1 -1
- package/dist/{types-Bd_YzkhG.d.mts → types-BnIs4sE7.d.mts} +1 -1
- package/dist/{types-Bd_YzkhG.d.ts → types-BnIs4sE7.d.ts} +1 -1
- package/dist/{types-DcxHFUSc.d.ts → types-CW6HFAX6.d.ts} +1 -1
- package/dist/{types-CkfDgB0O.d.mts → types-DIsDCwTG.d.mts} +1 -1
- package/dist/ui.d.mts +9 -9
- package/dist/ui.d.ts +9 -9
- package/dist/ui.js +1 -1
- package/dist/ui.mjs +1 -1
- package/dist/{useFindReplace-eyhMSZZf.d.ts → useFindReplace-DKy-s3gS.d.ts} +2 -2
- package/dist/{useFindReplace-DDs533b-.d.mts → useFindReplace-vuoKpDKE.d.mts} +2 -2
- package/package.json +7 -7
- package/dist/chunk-47VJOBJD.mjs +0 -60
- package/dist/chunk-IP5NAYHL.js +0 -60
- package/dist/executor-TVJ6K6MW.mjs +0 -1
package/dist/chunk-IP5NAYHL.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkIFPN3NT3_js=require('./chunk-IFPN3NT3.js'),chunkB45ECEGY_js=require('./chunk-B45ECEGY.js'),chunkGGQK26JO_js=require('./chunk-GGQK26JO.js'),chunkE6MQXELR_js=require('./chunk-E6MQXELR.js'),chunkH5NTJZO4_js=require('./chunk-H5NTJZO4.js');var H=class{constructor(t){chunkH5NTJZO4_js.d(this,"listeners",new Set);chunkH5NTJZO4_js.d(this,"snapshot");chunkH5NTJZO4_js.d(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t);}));chunkH5NTJZO4_js.d(this,"getSnapshot",()=>this.snapshot);this.snapshot=t;}setSnapshot(t){this.snapshot=t,this.notify();}notify(){for(let t of this.listeners)t();}};var ut="docx-editor-autosave",In=3e4,En=1440*60*1e3,An=2e3,pt=1;function ft(){try{let e="__docx_editor_test__";return localStorage.setItem(e,"test"),localStorage.removeItem(e),!0}catch{return false}}function ct(e){return JSON.stringify({...e,originalBuffer:null})}function Dn(e){try{let t=JSON.parse(e);return !t||typeof t!="object"||!t.document||!t.savedAt?null:(t.version!==pt&&console.warn("Auto-save data version mismatch, may need migration"),t)}catch{return null}}function Rn(e,t){let n=new Date(e).getTime();return Date.now()-n>t}var ue=class extends H{constructor(n={}){super({status:"idle",lastSaveTime:null,hasRecoveryData:false,isEnabled:true});chunkH5NTJZO4_js.d(this,"storageKey");chunkH5NTJZO4_js.d(this,"interval");chunkH5NTJZO4_js.d(this,"maxAge");chunkH5NTJZO4_js.d(this,"saveOnChange");chunkH5NTJZO4_js.d(this,"debounceDelay");chunkH5NTJZO4_js.d(this,"onSaveCallback");chunkH5NTJZO4_js.d(this,"onErrorCallback");chunkH5NTJZO4_js.d(this,"onRecoveryAvailableCallback");chunkH5NTJZO4_js.d(this,"storageAvailable");chunkH5NTJZO4_js.d(this,"currentDocument",null);chunkH5NTJZO4_js.d(this,"lastSavedJson",null);chunkH5NTJZO4_js.d(this,"intervalTimer",null);chunkH5NTJZO4_js.d(this,"debounceTimer",null);chunkH5NTJZO4_js.d(this,"status","idle");chunkH5NTJZO4_js.d(this,"lastSaveTime",null);chunkH5NTJZO4_js.d(this,"_hasRecoveryData",false);chunkH5NTJZO4_js.d(this,"_isEnabled");this.storageKey=n.storageKey??ut,this.interval=n.interval??In,this.maxAge=n.maxAge??En,this.saveOnChange=n.saveOnChange??true,this.debounceDelay=n.debounceDelay??An,this.onSaveCallback=n.onSave,this.onErrorCallback=n.onError,this.onRecoveryAvailableCallback=n.onRecoveryAvailable,this._isEnabled=true,this.storageAvailable=ft(),this.checkRecoveryData();}onDocumentChanged(n){this.currentDocument=n,this._isEnabled&&this.saveOnChange&&n&&this.storageAvailable&&this.debounceSave();}async save(){if(!this.storageAvailable)return this.onErrorCallback?.(new Error("localStorage is not available")),false;let n=this.currentDocument;if(!n)return false;this.updateStatus("saving");try{let r=ct(n);if(r===this.lastSavedJson)return this.updateStatus("saved"),!0;this.persistToStorage(r),this.lastSavedJson=r;let o=new Date;return this.lastSaveTime=o,this.updateStatus("saved"),this.onSaveCallback?.(o),!0}catch(r){return console.error("Auto-save failed:",r),this.updateStatus("error"),this.onErrorCallback?.(r),false}}clear(){if(this.storageAvailable)try{localStorage.removeItem(this.storageKey),this._hasRecoveryData=!1,this.lastSavedJson=null,this.emitSnapshot();}catch(n){console.error("Failed to clear auto-save:",n);}}getRecoveryData(){if(!this.storageAvailable)return null;try{let n=localStorage.getItem(this.storageKey);if(!n)return null;let r=Dn(n);return r?Rn(r.savedAt,this.maxAge)?(this.clear(),null):r:null}catch{return null}}acceptRecovery(){let n=this.getRecoveryData();return n?(this._hasRecoveryData=false,this.emitSnapshot(),n.document):null}dismissRecovery(){this.clear(),this._hasRecoveryData=false,this.emitSnapshot();}enable(){this._isEnabled=true,this.startInterval(),this.emitSnapshot();}disable(){this._isEnabled=false,this.stopTimers(),this.emitSnapshot();}startInterval(){this.stopTimers(),!(!this._isEnabled||!this.storageAvailable)&&(this.intervalTimer=setInterval(()=>{this.save();},this.interval));}destroy(){if(this.stopTimers(),this._isEnabled&&this.currentDocument&&this.storageAvailable)try{this.persistToStorage(ct(this.currentDocument));}catch(n){console.error("Failed to save on destroy:",n);}}checkRecoveryData(){if(!this.storageAvailable)return;let n=this.getRecoveryData();n&&(this._hasRecoveryData=true,this.emitSnapshot(),this.onRecoveryAvailableCallback?.(n));}persistToStorage(n){let r={document:JSON.parse(n),savedAt:new Date().toISOString(),version:pt};localStorage.setItem(this.storageKey,JSON.stringify(r));}debounceSave(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.save();},this.debounceDelay);}stopTimers(){this.intervalTimer&&(clearInterval(this.intervalTimer),this.intervalTimer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null);}updateStatus(n){this.status=n,this.emitSnapshot();}emitSnapshot(){this.setSnapshot({status:this.status,lastSaveTime:this.lastSaveTime,hasRecoveryData:this._hasRecoveryData,isEnabled:this._isEnabled});}};function mt(e){if(!e)return "Never";let n=new Date().getTime()-e.getTime(),r=Math.floor(n/1e3),o=Math.floor(r/60),i=Math.floor(o/60);return r<10?"Just now":r<60?`${r} seconds ago`:o<60?`${o} minute${o===1?"":"s"} ago`:i<24?`${i} hour${i===1?"":"s"} ago`:e.toLocaleDateString()}function dt(e){return {idle:"Ready",saving:"Saving...",saved:"Saved",error:"Save failed"}[e]}function ht(e=ut){try{let t=localStorage.getItem(e);return t?new Blob([t]).size:0}catch{return 0}}function gt(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function wt(){return ft()}var yt={TABLE_INDEX:"data-table-index",ROW_INDEX:"data-row",COLUMN_INDEX:"data-col",TABLE_CELL:"data-table-cell"};function xt(e,t){if(!e.package?.document?.content)return null;let n=0;for(let r of e.package.document.content)if(r.type==="table"){if(n===t)return r;n++;}return null}function bt(e,t,n){if(!e.package?.document?.content)return e;let r=0,o=e.package.document.content.map(i=>{if(i.type==="table"){if(r===t)return r++,n;r++;}return i});return {...e,package:{...e.package,document:{...e.package.document,content:o}}}}function Tt(e,t){if(!e.package?.document?.content)return e;let n=0,r=e.package.document.content.filter(o=>{if(o.type==="table"){let i=n===t;return n++,!i}return true});return {...e,package:{...e.package,document:{...e.package.document,content:r}}}}var pe=class extends H{constructor(){super({selectedCell:null});}selectCell(t){this.setSnapshot({selectedCell:t});}clearSelection(){this.setSnapshot({selectedCell:null});}isCellSelected(t,n,r){let{selectedCell:o}=this.getSnapshot();return o?o.tableIndex===t&&o.rowIndex===n&&o.columnIndex===r:false}getSelectedCell(){return this.getSnapshot().selectedCell}};function St(e){if(!e||e==="transparent"||e==="inherit")return null;if(e.startsWith("#"))return e.slice(1).toUpperCase();let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(t){let n=parseInt(t[1]).toString(16).padStart(2,"0"),r=parseInt(t[2]).toString(16).padStart(2,"0"),o=parseInt(t[3]).toString(16).padStart(2,"0");return (n+r+o).toUpperCase()}return null}function Ae(e){let t=window.getComputedStyle(e),n={};(t.fontWeight==="bold"||parseInt(t.fontWeight)>=700)&&(n.bold=true),t.fontStyle==="italic"&&(n.italic=true);let r=t.textDecoration||t.textDecorationLine;r&&r.includes("underline")&&(n.underline={style:"single"}),r&&r.includes("line-through")&&(n.strike=true);let o=parseFloat(t.fontSize);!isNaN(o)&&o>0&&(n.fontSize=Math.round(o/1.333*2));let i=t.fontFamily.replace(/["']/g,"").split(",")[0].trim();i&&(n.fontFamily={ascii:i});let s=t.color;if(s&&s!=="rgb(0, 0, 0)"){let l=St(s);l&&(n.color={rgb:l});}let a=t.backgroundColor;if(a&&a!=="transparent"&&a!=="rgba(0, 0, 0, 0)"){let l=Re(a);l&&(n.shading={fill:{rgb:l}});}return Object.keys(n).length>0?n:void 0}function kn(e,t){let n=document.createRange();n.selectNodeContents(e);let r=t.compareBoundaryPoints(Range.START_TO_START,n)>=0&&t.compareBoundaryPoints(Range.START_TO_END,n)<=0,o=t.compareBoundaryPoints(Range.END_TO_START,n)>=0&&t.compareBoundaryPoints(Range.END_TO_END,n)<=0;if(r&&o)return t.toString();if(r){let i=document.createRange();return i.setStart(t.startContainer,t.startOffset),i.selectNodeContents(e),i.setEnd(n.endContainer,n.endOffset),i.toString()}else if(o){let i=document.createRange();return i.selectNodeContents(e),i.setEnd(t.endContainer,t.endOffset),i.setStart(n.startContainer,n.startOffset),i.toString()}else if(t.intersectsNode(e))return e.textContent||"";return ""}function vt(e){let t=e;for(;t;){if(t.nodeType===Node.ELEMENT_NODE){let n=t;if(n.hasAttribute("data-paragraph-index"))return n}t=t.parentNode;}return null}function De(){let e=window.getSelection();if(!e||e.isCollapsed)return [];let t=[],n=e.getRangeAt(0),r=n.commonAncestorContainer,o=r.nodeType===Node.ELEMENT_NODE?r:r.parentElement;if(!o)return t;if(o.querySelectorAll(".docx-run").forEach(s=>{if(n.intersectsNode(s)){let a=kn(s,n);if(a){let l=Ae(s);t.push({type:"run",formatting:l,content:[{type:"text",text:a}]});}}}),t.length===0){let s=e.toString();s&&t.push({type:"run",content:[{type:"text",text:s}]});}return t}function Ct(){let e=window.getSelection();if(!e||e.isCollapsed)return null;let t=De();if(t.length===0)return null;let n=e.toString(),r=e.getRangeAt(0),o=vt(r.startContainer),i=vt(r.endContainer),s=o?parseInt(o.getAttribute("data-paragraph-index")||"0",10):0,a=i?parseInt(i.getAttribute("data-paragraph-index")||"0",10):0;return {text:n,runs:t,startParagraphIndex:s,startRunIndex:0,startOffset:r.startOffset,endParagraphIndex:a,endRunIndex:0,endOffset:r.endOffset,isMultiParagraph:s!==a}}var Re=St;var fe=class extends H{constructor(){super({notifications:[]});chunkH5NTJZO4_js.d(this,"notifications",[]);chunkH5NTJZO4_js.d(this,"idCounter",0);chunkH5NTJZO4_js.d(this,"timers",new Set);}showError(n,r){return this.addNotification(n,"error",r)}showWarning(n,r){return this.addNotification(n,"warning",r)}showInfo(n,r){return this.addNotification(n,"info",r)}dismiss(n){this.notifications=this.notifications.map(o=>o.id===n?{...o,dismissed:true}:o),this.emitSnapshot();let r=setTimeout(()=>{this.timers.delete(r),this.notifications=this.notifications.filter(o=>o.id!==n),this.emitSnapshot();},300);this.timers.add(r);}clearAll(){this.notifications=[];for(let n of this.timers)clearTimeout(n);this.timers.clear(),this.emitSnapshot();}destroy(){for(let n of this.timers)clearTimeout(n);this.timers.clear(),this.notifications=[];}addNotification(n,r,o){let i=`error-${++this.idCounter}-${Date.now()}`,s={id:i,message:n,severity:r,details:o,timestamp:Date.now()};if(this.notifications=[...this.notifications,s],this.emitSnapshot(),r!=="error"){let a=setTimeout(()=>{this.timers.delete(a),this.dismiss(i);},5e3);this.timers.add(a);}return i}emitSnapshot(){this.setSnapshot({notifications:this.notifications});}};function Pt(e,t){let n=`plugin-styles-${e}`,r=document.getElementById(n);r&&r.remove();let o=document.createElement("style");return o.id=n,o.textContent=t,document.head.appendChild(o),()=>{let i=document.getElementById(n);i&&i.remove();}}var me=class extends H{constructor(){super({states:new Map,version:0});chunkH5NTJZO4_js.d(this,"plugins",[]);chunkH5NTJZO4_js.d(this,"pluginStates",new Map);chunkH5NTJZO4_js.d(this,"version",0);}initialize(n,r){this.destroyPlugins(),this.plugins=n;for(let o of n)o.initialize&&!this.pluginStates.has(o.id)&&this.pluginStates.set(o.id,o.initialize(r));this.emitSnapshot();}updateStates(n){let r=false;for(let o of this.plugins)if(o.onStateChange){let i=o.onStateChange(n);i!==void 0&&(this.pluginStates.set(o.id,i),r=true);}return r&&(this.version++,this.emitSnapshot()),r}getPluginState(n){return this.pluginStates.get(n)}setPluginState(n,r){this.pluginStates.set(n,r),this.version++,this.emitSnapshot();}destroy(){this.destroyPlugins(),this.emitSnapshot();}destroyPlugins(){for(let n of this.plugins)n.destroy&&n.destroy();this.pluginStates.clear(),this.plugins=[];}emitSnapshot(){this.setSnapshot({states:new Map(this.pluginStates),version:this.version});}};var $t=chunkH5NTJZO4_js.c(chunkIFPN3NT3_js.a());async function Ft(e){let t=await $t.default.loadAsync(e),n={documentXml:null,stylesXml:null,themeXml:null,numberingXml:null,fontTableXml:null,settingsXml:null,webSettingsXml:null,headers:new Map,footers:new Map,footnotesXml:null,endnotesXml:null,commentsXml:null,commentsExtensibleXml:null,commentsExtendedXml:null,documentRels:null,packageRels:null,contentTypesXml:null,corePropsXml:null,appPropsXml:null,customPropsXml:null,media:new Map,fonts:new Map,allXml:new Map,originalZip:t,originalBuffer:e};for(let[r,o]of Object.entries(t.files)){if(o.dir)continue;let i=r.toLowerCase();if(i.endsWith(".xml")||i.endsWith(".rels")){let s=await o.async("text");if(n.allXml.set(r,s),i==="word/document.xml")n.documentXml=s;else if(i==="word/styles.xml")n.stylesXml=s;else if(i==="word/theme/theme1.xml")n.themeXml=s;else if(i==="word/numbering.xml")n.numberingXml=s;else if(i==="word/fonttable.xml")n.fontTableXml=s;else if(i==="word/settings.xml")n.settingsXml=s;else if(i==="word/websettings.xml")n.webSettingsXml=s;else if(i==="word/footnotes.xml")n.footnotesXml=s;else if(i==="word/endnotes.xml")n.endnotesXml=s;else if(i==="word/comments.xml")n.commentsXml=s;else if(i==="word/commentsextensible.xml")n.commentsExtensibleXml=s;else if(i==="word/commentsextended.xml")n.commentsExtendedXml=s;else if(i==="word/_rels/document.xml.rels")n.documentRels=s;else if(i==="_rels/.rels")n.packageRels=s;else if(i==="[content_types].xml")n.contentTypesXml=s;else if(i==="docprops/core.xml")n.corePropsXml=s;else if(i==="docprops/app.xml")n.appPropsXml=s;else if(i==="docprops/custom.xml")n.customPropsXml=s;else if(i.match(/^word\/header\d+\.xml$/)){let a=r.split("/").pop()||r;n.headers.set(a,s);}else if(i.match(/^word\/footer\d+\.xml$/)){let a=r.split("/").pop()||r;n.footers.set(a,s);}}else if(i.startsWith("word/media/")){let s=await o.async("arraybuffer");n.media.set(r,s);}else if(i.startsWith("word/fonts/")){let s=await o.async("arraybuffer");n.fonts.set(r,s);}}return n}function It(e){switch(e.toLowerCase().split(".").pop()){case "png":return "image/png";case "jpg":case "jpeg":return "image/jpeg";case "gif":return "image/gif";case "bmp":return "image/bmp";case "tif":case "tiff":return "image/tiff";case "wmf":return "image/x-wmf";case "emf":return "image/x-emf";case "svg":return "image/svg+xml";case "webp":return "image/webp";default:return "application/octet-stream"}}function de(e,t){if(!e)return;let n={},r=chunkB45ECEGY_js.d(e,"w","b");r&&(n.bold=chunkB45ECEGY_js.i(r));let o=chunkB45ECEGY_js.d(e,"w","bCs");o&&(n.boldCs=chunkB45ECEGY_js.i(o));let i=chunkB45ECEGY_js.d(e,"w","i");i&&(n.italic=chunkB45ECEGY_js.i(i));let s=chunkB45ECEGY_js.d(e,"w","iCs");s&&(n.italicCs=chunkB45ECEGY_js.i(s));let a=chunkB45ECEGY_js.d(e,"w","u");if(a){let T=chunkB45ECEGY_js.g(a,"w","val");if(T){n.underline={style:T};let z=chunkB45ECEGY_js.g(a,"w","color"),O=chunkB45ECEGY_js.g(a,"w","themeColor");(z||O)&&(n.underline.color=ke(z,O,chunkB45ECEGY_js.g(a,"w","themeTint"),chunkB45ECEGY_js.g(a,"w","themeShade")));}}let l=chunkB45ECEGY_js.d(e,"w","strike");l&&(n.strike=chunkB45ECEGY_js.i(l));let u=chunkB45ECEGY_js.d(e,"w","dstrike");u&&(n.doubleStrike=chunkB45ECEGY_js.i(u));let m=chunkB45ECEGY_js.d(e,"w","vertAlign");if(m){let T=chunkB45ECEGY_js.g(m,"w","val");(T==="superscript"||T==="subscript"||T==="baseline")&&(n.vertAlign=T);}let h=chunkB45ECEGY_js.d(e,"w","smallCaps");h&&(n.smallCaps=chunkB45ECEGY_js.i(h));let g=chunkB45ECEGY_js.d(e,"w","caps");g&&(n.allCaps=chunkB45ECEGY_js.i(g));let x=chunkB45ECEGY_js.d(e,"w","vanish");x&&(n.hidden=chunkB45ECEGY_js.i(x));let p=chunkB45ECEGY_js.d(e,"w","color");p&&(n.color=ke(chunkB45ECEGY_js.g(p,"w","val"),chunkB45ECEGY_js.g(p,"w","themeColor"),chunkB45ECEGY_js.g(p,"w","themeTint"),chunkB45ECEGY_js.g(p,"w","themeShade")));let y=chunkB45ECEGY_js.d(e,"w","highlight");if(y){let T=chunkB45ECEGY_js.g(y,"w","val");T&&(n.highlight=T);}let C=chunkB45ECEGY_js.d(e,"w","shd");C&&(n.shading=he(C));let E=chunkB45ECEGY_js.d(e,"w","sz");if(E){let T=chunkB45ECEGY_js.h(E,"w","val");T!==void 0&&(n.fontSize=T);}let D=chunkB45ECEGY_js.d(e,"w","szCs");if(D){let T=chunkB45ECEGY_js.h(D,"w","val");T!==void 0&&(n.fontSizeCs=T);}let A=chunkB45ECEGY_js.d(e,"w","rFonts");if(A){n.fontFamily={ascii:chunkB45ECEGY_js.g(A,"w","ascii")??void 0,hAnsi:chunkB45ECEGY_js.g(A,"w","hAnsi")??void 0,eastAsia:chunkB45ECEGY_js.g(A,"w","eastAsia")??void 0,cs:chunkB45ECEGY_js.g(A,"w","cs")??void 0};let T=chunkB45ECEGY_js.g(A,"w","asciiTheme");T&&(n.fontFamily.asciiTheme=T,t&&!n.fontFamily.ascii&&(n.fontFamily.ascii=chunkB45ECEGY_js.m(t,T)));let z=chunkB45ECEGY_js.g(A,"w","hAnsiTheme");z&&(n.fontFamily.hAnsiTheme=z,t&&!n.fontFamily.hAnsi&&(n.fontFamily.hAnsi=chunkB45ECEGY_js.m(t,z)));let O=chunkB45ECEGY_js.g(A,"w","eastAsiaTheme");O&&(n.fontFamily.eastAsiaTheme=O,t&&!n.fontFamily.eastAsia&&(n.fontFamily.eastAsia=chunkB45ECEGY_js.m(t,O)));let Fe=chunkB45ECEGY_js.g(A,"w","cstheme");Fe&&(n.fontFamily.csTheme=Fe,t&&!n.fontFamily.cs&&(n.fontFamily.cs=chunkB45ECEGY_js.m(t,Fe)));}let v=chunkB45ECEGY_js.d(e,"w","spacing");if(v){let T=chunkB45ECEGY_js.h(v,"w","val");T!==void 0&&(n.spacing=T);}let b=chunkB45ECEGY_js.d(e,"w","position");if(b){let T=chunkB45ECEGY_js.h(b,"w","val");T!==void 0&&(n.position=T);}let P=chunkB45ECEGY_js.d(e,"w","w");if(P){let T=chunkB45ECEGY_js.h(P,"w","val");T!==void 0&&(n.scale=T);}let I=chunkB45ECEGY_js.d(e,"w","kern");if(I){let T=chunkB45ECEGY_js.h(I,"w","val");T!==void 0&&(n.kerning=T);}let B=chunkB45ECEGY_js.d(e,"w","effect");if(B){let T=chunkB45ECEGY_js.g(B,"w","val");T&&(n.effect=T);}let R=chunkB45ECEGY_js.d(e,"w","em");if(R){let T=chunkB45ECEGY_js.g(R,"w","val");T&&(n.emphasisMark=T);}let k=chunkB45ECEGY_js.d(e,"w","emboss");k&&(n.emboss=chunkB45ECEGY_js.i(k));let N=chunkB45ECEGY_js.d(e,"w","imprint");N&&(n.imprint=chunkB45ECEGY_js.i(N));let q=chunkB45ECEGY_js.d(e,"w","outline");q&&(n.outline=chunkB45ECEGY_js.i(q));let K=chunkB45ECEGY_js.d(e,"w","shadow");K&&(n.shadow=chunkB45ECEGY_js.i(K));let V=chunkB45ECEGY_js.d(e,"w","rtl");V&&(n.rtl=chunkB45ECEGY_js.i(V));let L=chunkB45ECEGY_js.d(e,"w","cs");L&&(n.cs=chunkB45ECEGY_js.i(L));let _=chunkB45ECEGY_js.d(e,"w","rStyle");if(_){let T=chunkB45ECEGY_js.g(_,"w","val");T&&(n.styleId=T);}return Object.keys(n).length>0?n:void 0}function ke(e,t,n,r){let o={};return e&&e!=="auto"?o.rgb=e:e==="auto"&&(o.auto=true),t&&(o.themeColor=t),n&&(o.themeTint=n),r&&(o.themeShade=r),o}function he(e){if(!e)return;let t={},n=chunkB45ECEGY_js.g(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let r=chunkB45ECEGY_js.g(e,"w","fill");r&&r!=="auto"&&(t.fill={rgb:r});let o=chunkB45ECEGY_js.g(e,"w","themeFill");o&&(t.fill=t.fill||{},t.fill.themeColor=o);let i=chunkB45ECEGY_js.g(e,"w","themeFillTint");i&&t.fill&&(t.fill.themeTint=i);let s=chunkB45ECEGY_js.g(e,"w","themeFillShade");s&&t.fill&&(t.fill.themeShade=s);let a=chunkB45ECEGY_js.g(e,"w","val");return a&&(t.pattern=a),Object.keys(t).length>0?t:void 0}function j(e){if(!e)return;let t=chunkB45ECEGY_js.g(e,"w","val");if(!t)return;let n={style:t},r=chunkB45ECEGY_js.g(e,"w","color"),o=chunkB45ECEGY_js.g(e,"w","themeColor");(r||o)&&(n.color=ke(r,o,chunkB45ECEGY_js.g(e,"w","themeTint"),chunkB45ECEGY_js.g(e,"w","themeShade")));let i=chunkB45ECEGY_js.h(e,"w","sz");i!==void 0&&(n.size=i);let s=chunkB45ECEGY_js.h(e,"w","space");s!==void 0&&(n.space=s);let a=chunkB45ECEGY_js.g(e,"w","shadow");a&&(n.shadow=a==="1"||a==="true");let l=chunkB45ECEGY_js.g(e,"w","frame");return l&&(n.frame=l==="1"||l==="true"),n}function Ln(e){if(!e)return;let t=chunkB45ECEGY_js.e(e,"w","tab");if(t.length===0)return;let n=[];for(let r of t){let o=chunkB45ECEGY_js.h(r,"w","pos"),i=chunkB45ECEGY_js.g(r,"w","val");if(o!==void 0&&i){let s={position:o,alignment:i},a=chunkB45ECEGY_js.g(r,"w","leader");a&&(s.leader=a),n.push(s);}}return n.length>0?n:void 0}function Be(e,t){if(!e)return;let n={},r=chunkB45ECEGY_js.d(e,"w","jc");if(r){let b=chunkB45ECEGY_js.g(r,"w","val");b&&(n.alignment=b);}let o=chunkB45ECEGY_js.d(e,"w","bidi");o&&(n.bidi=chunkB45ECEGY_js.i(o));let i=chunkB45ECEGY_js.d(e,"w","spacing");if(i){let b=chunkB45ECEGY_js.h(i,"w","before");b!==void 0&&(n.spaceBefore=b);let P=chunkB45ECEGY_js.h(i,"w","after");P!==void 0&&(n.spaceAfter=P);let I=chunkB45ECEGY_js.h(i,"w","line");I!==void 0&&(n.lineSpacing=I);let B=chunkB45ECEGY_js.g(i,"w","lineRule");B&&(n.lineSpacingRule=B);let R=chunkB45ECEGY_js.g(i,"w","beforeAutospacing");R&&(n.beforeAutospacing=R==="1"||R==="true");let k=chunkB45ECEGY_js.g(i,"w","afterAutospacing");k&&(n.afterAutospacing=k==="1"||k==="true");}let s=chunkB45ECEGY_js.d(e,"w","ind");if(s){let b=chunkB45ECEGY_js.h(s,"w","left");b!==void 0&&(n.indentLeft=b);let P=chunkB45ECEGY_js.h(s,"w","right");P!==void 0&&(n.indentRight=P);let I=chunkB45ECEGY_js.h(s,"w","firstLine");I!==void 0&&(n.indentFirstLine=I);let B=chunkB45ECEGY_js.h(s,"w","hanging");B!==void 0&&(n.indentFirstLine=-B,n.hangingIndent=true);}let a=chunkB45ECEGY_js.d(e,"w","pBdr");if(a){let b={},P=j(chunkB45ECEGY_js.d(a,"w","top"));P&&(b.top=P);let I=j(chunkB45ECEGY_js.d(a,"w","bottom"));I&&(b.bottom=I);let B=j(chunkB45ECEGY_js.d(a,"w","left"));B&&(b.left=B);let R=j(chunkB45ECEGY_js.d(a,"w","right"));R&&(b.right=R);let k=j(chunkB45ECEGY_js.d(a,"w","between"));k&&(b.between=k);let N=j(chunkB45ECEGY_js.d(a,"w","bar"));N&&(b.bar=N),Object.keys(b).length>0&&(n.borders=b);}let l=chunkB45ECEGY_js.d(e,"w","shd");l&&(n.shading=he(l));let u=chunkB45ECEGY_js.d(e,"w","tabs");u&&(n.tabs=Ln(u));let m=chunkB45ECEGY_js.d(e,"w","keepNext");m&&(n.keepNext=chunkB45ECEGY_js.i(m));let h=chunkB45ECEGY_js.d(e,"w","keepLines");h&&(n.keepLines=chunkB45ECEGY_js.i(h));let g=chunkB45ECEGY_js.d(e,"w","widowControl");g&&(n.widowControl=chunkB45ECEGY_js.i(g));let x=chunkB45ECEGY_js.d(e,"w","pageBreakBefore");x&&(n.pageBreakBefore=chunkB45ECEGY_js.i(x));let p=chunkB45ECEGY_js.d(e,"w","contextualSpacing");p&&(n.contextualSpacing=chunkB45ECEGY_js.i(p));let y=chunkB45ECEGY_js.d(e,"w","numPr");if(y){let b=chunkB45ECEGY_js.d(y,"w","numId"),P=chunkB45ECEGY_js.d(y,"w","ilvl");if(b||P){if(n.numPr={},b){let I=chunkB45ECEGY_js.h(b,"w","val");I!==void 0&&(n.numPr.numId=I);}if(P){let I=chunkB45ECEGY_js.h(P,"w","val");I!==void 0&&(n.numPr.ilvl=I);}}}let C=chunkB45ECEGY_js.d(e,"w","outlineLvl");if(C){let b=chunkB45ECEGY_js.h(C,"w","val");b!==void 0&&(n.outlineLevel=b);}let E=chunkB45ECEGY_js.d(e,"w","pStyle");if(E){let b=chunkB45ECEGY_js.g(E,"w","val");b&&(n.styleId=b);}let D=chunkB45ECEGY_js.d(e,"w","suppressLineNumbers");D&&(n.suppressLineNumbers=chunkB45ECEGY_js.i(D));let A=chunkB45ECEGY_js.d(e,"w","suppressAutoHyphens");A&&(n.suppressAutoHyphens=chunkB45ECEGY_js.i(A));let v=chunkB45ECEGY_js.d(e,"w","rPr");return v&&(n.runProperties=de(v,t)),Object.keys(n).length>0?n:void 0}function U(e){if(!e)return;let t=chunkB45ECEGY_js.h(e,"w","w"),n=chunkB45ECEGY_js.g(e,"w","type");if(t!==void 0&&n)return {value:t,type:n}}function Rt(e){if(!e)return;let t={},n=j(chunkB45ECEGY_js.d(e,"w","top"));n&&(t.top=n);let r=j(chunkB45ECEGY_js.d(e,"w","bottom"));r&&(t.bottom=r);let o=j(chunkB45ECEGY_js.d(e,"w","left"));o&&(t.left=o);let i=j(chunkB45ECEGY_js.d(e,"w","right"));i&&(t.right=i);let s=j(chunkB45ECEGY_js.d(e,"w","insideH"));s&&(t.insideH=s);let a=j(chunkB45ECEGY_js.d(e,"w","insideV"));return a&&(t.insideV=a),Object.keys(t).length>0?t:void 0}function kt(e){if(!e)return;let t={},n=U(chunkB45ECEGY_js.d(e,"w","top"));n&&(t.top=n);let r=U(chunkB45ECEGY_js.d(e,"w","bottom"));r&&(t.bottom=r);let o=U(chunkB45ECEGY_js.d(e,"w","left"));o&&(t.left=o);let i=U(chunkB45ECEGY_js.d(e,"w","right"));return i&&(t.right=i),Object.keys(t).length>0?t:void 0}function Mn(e){if(!e)return;let t={},n=chunkB45ECEGY_js.g(e,"w","val");if(n){let u=parseInt(n,16);isNaN(u)||(t.firstRow=(u&32)!==0,t.lastRow=(u&64)!==0,t.firstColumn=(u&128)!==0,t.lastColumn=(u&256)!==0,t.noHBand=(u&512)!==0,t.noVBand=(u&1024)!==0);}let r=chunkB45ECEGY_js.g(e,"w","firstColumn");r&&(t.firstColumn=r==="1");let o=chunkB45ECEGY_js.g(e,"w","firstRow");o&&(t.firstRow=o==="1");let i=chunkB45ECEGY_js.g(e,"w","lastColumn");i&&(t.lastColumn=i==="1");let s=chunkB45ECEGY_js.g(e,"w","lastRow");s&&(t.lastRow=s==="1");let a=chunkB45ECEGY_js.g(e,"w","noHBand");a&&(t.noHBand=a==="1");let l=chunkB45ECEGY_js.g(e,"w","noVBand");return l&&(t.noVBand=l==="1"),Object.keys(t).length>0?t:void 0}function Et(e,t){if(!e)return;let n={},r=chunkB45ECEGY_js.d(e,"w","tblW");r&&(n.width=U(r));let o=chunkB45ECEGY_js.d(e,"w","jc");if(o){let p=chunkB45ECEGY_js.g(o,"w","val");(p==="left"||p==="center"||p==="right")&&(n.justification=p);}let i=chunkB45ECEGY_js.d(e,"w","tblCellSpacing");i&&(n.cellSpacing=U(i));let s=chunkB45ECEGY_js.d(e,"w","tblInd");s&&(n.indent=U(s));let a=chunkB45ECEGY_js.d(e,"w","tblBorders");a&&(n.borders=Rt(a));let l=chunkB45ECEGY_js.d(e,"w","tblCellMar");l&&(n.cellMargins=kt(l));let u=chunkB45ECEGY_js.d(e,"w","tblLayout");if(u){let p=chunkB45ECEGY_js.g(u,"w","type");(p==="fixed"||p==="autofit")&&(n.layout=p);}let m=chunkB45ECEGY_js.d(e,"w","tblStyle");if(m){let p=chunkB45ECEGY_js.g(m,"w","val");p&&(n.styleId=p);}let h=chunkB45ECEGY_js.d(e,"w","tblLook");h&&(n.look=Mn(h));let g=chunkB45ECEGY_js.d(e,"w","shd");g&&(n.shading=he(g));let x=chunkB45ECEGY_js.d(e,"w","bidiVisual");return x&&(n.bidi=chunkB45ECEGY_js.i(x)),Object.keys(n).length>0?n:void 0}function At(e){if(!e)return;let t={},n=chunkB45ECEGY_js.d(e,"w","trHeight");if(n){t.height=U(n);let a=chunkB45ECEGY_js.g(n,"w","hRule");a&&(t.heightRule=a);}let r=chunkB45ECEGY_js.d(e,"w","tblHeader");r&&(t.header=chunkB45ECEGY_js.i(r));let o=chunkB45ECEGY_js.d(e,"w","cantSplit");o&&(t.cantSplit=chunkB45ECEGY_js.i(o));let i=chunkB45ECEGY_js.d(e,"w","jc");if(i){let a=chunkB45ECEGY_js.g(i,"w","val");(a==="left"||a==="center"||a==="right")&&(t.justification=a);}let s=chunkB45ECEGY_js.d(e,"w","hidden");return s&&(t.hidden=chunkB45ECEGY_js.i(s)),Object.keys(t).length>0?t:void 0}function Dt(e,t){if(!e)return;let n={},r=chunkB45ECEGY_js.d(e,"w","tcW");r&&(n.width=U(r));let o=chunkB45ECEGY_js.d(e,"w","tcBorders");o&&(n.borders=Rt(o));let i=chunkB45ECEGY_js.d(e,"w","tcMar");i&&(n.margins=kt(i));let s=chunkB45ECEGY_js.d(e,"w","shd");s&&(n.shading=he(s));let a=chunkB45ECEGY_js.d(e,"w","vAlign");if(a){let p=chunkB45ECEGY_js.g(a,"w","val");(p==="top"||p==="center"||p==="bottom")&&(n.verticalAlign=p);}let l=chunkB45ECEGY_js.d(e,"w","textDirection");if(l){let p=chunkB45ECEGY_js.g(l,"w","val");p&&(n.textDirection=p);}let u=chunkB45ECEGY_js.d(e,"w","gridSpan");if(u){let p=chunkB45ECEGY_js.h(u,"w","val");p!==void 0&&(n.gridSpan=p);}let m=chunkB45ECEGY_js.d(e,"w","vMerge");if(m){let p=chunkB45ECEGY_js.g(m,"w","val");n.vMerge=p==="restart"?"restart":"continue";}let h=chunkB45ECEGY_js.d(e,"w","tcFitText");h&&(n.fitText=chunkB45ECEGY_js.i(h));let g=chunkB45ECEGY_js.d(e,"w","noWrap");g&&(n.noWrap=chunkB45ECEGY_js.i(g));let x=chunkB45ECEGY_js.d(e,"w","hideMark");return x&&(n.hideMark=chunkB45ECEGY_js.i(x)),Object.keys(n).length>0?n:void 0}function Nn(e,t){let n={styleId:chunkB45ECEGY_js.g(e,"w","styleId")??"",type:chunkB45ECEGY_js.g(e,"w","type")??"paragraph"},r=chunkB45ECEGY_js.g(e,"w","default");r&&(n.default=r==="1"||r==="true");let o=chunkB45ECEGY_js.d(e,"w","name");o&&(n.name=chunkB45ECEGY_js.g(o,"w","val")??void 0);let i=chunkB45ECEGY_js.d(e,"w","basedOn");i&&(n.basedOn=chunkB45ECEGY_js.g(i,"w","val")??void 0);let s=chunkB45ECEGY_js.d(e,"w","next");s&&(n.next=chunkB45ECEGY_js.g(s,"w","val")??void 0);let a=chunkB45ECEGY_js.d(e,"w","link");a&&(n.link=chunkB45ECEGY_js.g(a,"w","val")??void 0);let l=chunkB45ECEGY_js.d(e,"w","uiPriority");if(l){let v=chunkB45ECEGY_js.h(l,"w","val");v!==void 0&&(n.uiPriority=v);}let u=chunkB45ECEGY_js.d(e,"w","hidden");u&&(n.hidden=chunkB45ECEGY_js.i(u));let m=chunkB45ECEGY_js.d(e,"w","semiHidden");m&&(n.semiHidden=chunkB45ECEGY_js.i(m));let h=chunkB45ECEGY_js.d(e,"w","unhideWhenUsed");h&&(n.unhideWhenUsed=chunkB45ECEGY_js.i(h));let g=chunkB45ECEGY_js.d(e,"w","qFormat");g&&(n.qFormat=chunkB45ECEGY_js.i(g));let x=chunkB45ECEGY_js.d(e,"w","personal");x&&(n.personal=chunkB45ECEGY_js.i(x));let p=chunkB45ECEGY_js.d(e,"w","pPr");p&&(n.pPr=Be(p,t));let y=chunkB45ECEGY_js.d(e,"w","rPr");y&&(n.rPr=de(y,t));let C=chunkB45ECEGY_js.d(e,"w","tblPr");C&&(n.tblPr=Et(C));let E=chunkB45ECEGY_js.d(e,"w","trPr");E&&(n.trPr=At(E));let D=chunkB45ECEGY_js.d(e,"w","tcPr");D&&(n.tcPr=Dt(D));let A=chunkB45ECEGY_js.e(e,"w","tblStylePr");if(A.length>0){n.tblStylePr=[];for(let v of A){let b=chunkB45ECEGY_js.g(v,"w","type");if(b){let P={type:b},I=chunkB45ECEGY_js.d(v,"w","pPr");I&&(P.pPr=Be(I,t));let B=chunkB45ECEGY_js.d(v,"w","rPr");B&&(P.rPr=de(B,t));let R=chunkB45ECEGY_js.d(v,"w","tblPr");R&&(P.tblPr=Et(R));let k=chunkB45ECEGY_js.d(v,"w","trPr");k&&(P.trPr=At(k));let N=chunkB45ECEGY_js.d(v,"w","tcPr");N&&(P.tcPr=Dt(N)),n.tblStylePr.push(P);}}}return n}function On(e,t){if(!e)return;let n={},r=chunkB45ECEGY_js.d(e,"w","rPrDefault");if(r){let i=chunkB45ECEGY_js.d(r,"w","rPr");i&&(n.rPr=de(i,t));}let o=chunkB45ECEGY_js.d(e,"w","pPrDefault");if(o){let i=chunkB45ECEGY_js.d(o,"w","pPr");i&&(n.pPr=Be(i,t));}return n.rPr||n.pPr?n:void 0}function Xn(e,t){if(!t)return e;if(!e)return t?{...t}:void 0;let n={...e};for(let r of Object.keys(t)){let o=t[r];if(o!==void 0)if(r==="runProperties")n.runProperties=chunkB45ECEGY_js.n(n.runProperties,t.runProperties);else if(r==="borders"||r==="numPr"||r==="frame"){let i=n[r],s=o;n[r]={...i||{},...s||{}};}else r==="tabs"&&Array.isArray(o)?n.tabs=[...o]:n[r]=o;}return n}function Bt(e,t,n,r=new Set){if(r.has(e.styleId)||(r.add(e.styleId),!e.basedOn))return e;let o=t.get(e.basedOn);if(!o)return e;let i=Bt(o,t,n,r),s={...e,pPr:Xn(i.pPr,e.pPr),rPr:chunkB45ECEGY_js.n(i.rPr,e.rPr)};return e.type==="table"&&((i.tblPr||e.tblPr)&&(s.tblPr={...i.tblPr||{},...e.tblPr||{}}),(i.trPr||e.trPr)&&(s.trPr={...i.trPr||{},...e.trPr||{}}),(i.tcPr||e.tcPr)&&(s.tcPr={...i.tcPr||{},...e.tcPr||{}})),s}function Le(e,t){let n=new Map;try{let r=chunkB45ECEGY_js.c(e);if(!r)return n;let o=chunkB45ECEGY_js.e(r,"w","style");for(let i of o){let s=Nn(i,t);s.styleId&&n.set(s.styleId,s);}for(let[i,s]of n){let a=Bt(s,n,t);n.set(i,a);}}catch(r){console.warn("Failed to parse styles:",r);}return n}function Lt(e,t){let n={styles:[]};try{let r=chunkB45ECEGY_js.c(e);if(!r)return n;let o=chunkB45ECEGY_js.d(r,"w","docDefaults");n.docDefaults=On(o,t);let i=chunkB45ECEGY_js.d(r,"w","latentStyles");i&&(n.latentStyles={defLockedState:chunkB45ECEGY_js.g(i,"w","defLockedState")==="1",defUIPriority:chunkB45ECEGY_js.h(i,"w","defUIPriority"),defSemiHidden:chunkB45ECEGY_js.g(i,"w","defSemiHidden")==="1",defUnhideWhenUsed:chunkB45ECEGY_js.g(i,"w","defUnhideWhenUsed")==="1",defQFormat:chunkB45ECEGY_js.g(i,"w","defQFormat")==="1",count:chunkB45ECEGY_js.h(i,"w","count")});let s=Le(e,t);n.styles=Array.from(s.values());}catch(r){console.warn("Failed to parse style definitions:",r);}return n}function Mt(e){let t={abstractNums:[],nums:[]};if(!e)return Me(t);let n=chunkB45ECEGY_js.c(e);if(!n)return Me(t);let r=chunkB45ECEGY_js.e(n,"w","abstractNum");for(let i of r){let s=zn(i);s&&t.abstractNums.push(s);}let o=chunkB45ECEGY_js.e(n,"w","num");for(let i of o){let s=_n(i);s&&t.nums.push(s);}return Me(t)}function zn(e){let t=chunkB45ECEGY_js.g(e,"w","abstractNumId");if(t===null)return null;let n=parseInt(t,10);if(isNaN(n))return null;let r={abstractNumId:n,levels:[]},o=chunkB45ECEGY_js.d(e,"w","multiLevelType");if(o){let u=chunkB45ECEGY_js.g(o,"w","val");(u==="hybridMultilevel"||u==="multilevel"||u==="singleLevel")&&(r.multiLevelType=u);}let i=chunkB45ECEGY_js.d(e,"w","name");i&&(r.name=chunkB45ECEGY_js.g(i,"w","val")??void 0);let s=chunkB45ECEGY_js.d(e,"w","numStyleLink");s&&(r.numStyleLink=chunkB45ECEGY_js.g(s,"w","val")??void 0);let a=chunkB45ECEGY_js.d(e,"w","styleLink");a&&(r.styleLink=chunkB45ECEGY_js.g(a,"w","val")??void 0);let l=chunkB45ECEGY_js.e(e,"w","lvl");for(let u of l){let m=Nt(u);m&&r.levels.push(m);}return r.levels.sort((u,m)=>u.ilvl-m.ilvl),r}function _n(e){let t=chunkB45ECEGY_js.g(e,"w","numId");if(t===null)return null;let n=parseInt(t,10);if(isNaN(n))return null;let r=chunkB45ECEGY_js.d(e,"w","abstractNumId");if(!r)return null;let o=chunkB45ECEGY_js.g(r,"w","val");if(o===null)return null;let i=parseInt(o,10);if(isNaN(i))return null;let s={numId:n,abstractNumId:i},a=chunkB45ECEGY_js.e(e,"w","lvlOverride");if(a.length>0){s.levelOverrides=[];for(let l of a){let u=chunkB45ECEGY_js.g(l,"w","ilvl");if(u===null)continue;let m=parseInt(u,10);if(isNaN(m))continue;let h={ilvl:m},g=chunkB45ECEGY_js.d(l,"w","startOverride");if(g){let p=chunkB45ECEGY_js.g(g,"w","val");if(p!==null){let y=parseInt(p,10);isNaN(y)||(h.startOverride=y);}}let x=chunkB45ECEGY_js.d(l,"w","lvl");x&&(h.lvl=Nt(x)??void 0),s.levelOverrides.push(h);}}return s}function Nt(e){let t=chunkB45ECEGY_js.g(e,"w","ilvl");if(t===null)return null;let n=parseInt(t,10);if(isNaN(n)||n<0||n>8)return null;let r={ilvl:n,numFmt:"decimal",lvlText:""},o=chunkB45ECEGY_js.d(e,"w","start");if(o){let p=chunkB45ECEGY_js.g(o,"w","val");if(p!==null){let y=parseInt(p,10);isNaN(y)||(r.start=y);}}let i=chunkB45ECEGY_js.d(e,"w","numFmt");if(i){let p=chunkB45ECEGY_js.g(i,"w","val");p&&(r.numFmt=jn(p));}let s=chunkB45ECEGY_js.d(e,"w","lvlText");s&&(r.lvlText=chunkB45ECEGY_js.g(s,"w","val")??"");let a=chunkB45ECEGY_js.d(e,"w","lvlJc");if(a){let p=chunkB45ECEGY_js.g(a,"w","val");(p==="left"||p==="center"||p==="right")&&(r.lvlJc=p);}let l=chunkB45ECEGY_js.d(e,"w","suff");if(l){let p=chunkB45ECEGY_js.g(l,"w","val");(p==="tab"||p==="space"||p==="nothing")&&(r.suffix=p);}let u=chunkB45ECEGY_js.d(e,"w","isLgl");u&&(r.isLgl=chunkB45ECEGY_js.i(u));let m=chunkB45ECEGY_js.d(e,"w","lvlRestart");if(m){let p=chunkB45ECEGY_js.g(m,"w","val");if(p!==null){let y=parseInt(p,10);isNaN(y)||(r.lvlRestart=y);}}let h=chunkB45ECEGY_js.d(e,"w","legacy");h&&(r.legacy={legacy:chunkB45ECEGY_js.i(h),legacySpace:chunkB45ECEGY_js.h(h,"w","legacySpace"),legacyIndent:chunkB45ECEGY_js.h(h,"w","legacyIndent")});let g=chunkB45ECEGY_js.d(e,"w","pPr");g&&(r.pPr=Hn(g));let x=chunkB45ECEGY_js.d(e,"w","rPr");return x&&(r.rPr=Un(x)),r}function jn(e){return {decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",hex:"hex",chicago:"chicago",bullet:"bullet",none:"none",decimalZero:"decimalZero",ganada:"ganada",chosung:"chosung",ideographDigital:"ideographDigital",japaneseCounting:"japaneseCounting",aiueo:"aiueo",iroha:"iroha",decimalFullWidth:"decimalFullWidth",decimalHalfWidth:"decimalHalfWidth",japaneseLegal:"japaneseLegal",japaneseDigitalTenThousand:"japaneseDigitalTenThousand",decimalEnclosedCircle:"decimalEnclosedCircle",decimalFullWidth2:"decimalFullWidth2",aiueoFullWidth:"aiueoFullWidth",irohaFullWidth:"irohaFullWidth",decimalEnclosedFullstop:"decimalEnclosedFullstop",decimalEnclosedParen:"decimalEnclosedParen",decimalEnclosedCircleChinese:"decimalEnclosedCircleChinese",ideographEnclosedCircle:"ideographEnclosedCircle",ideographTraditional:"ideographTraditional",ideographZodiac:"ideographZodiac",ideographZodiacTraditional:"ideographZodiacTraditional",taiwaneseCounting:"taiwaneseCounting",ideographLegalTraditional:"ideographLegalTraditional",taiwaneseCountingThousand:"taiwaneseCountingThousand",taiwaneseDigital:"taiwaneseDigital",chineseCounting:"chineseCounting",chineseLegalSimplified:"chineseLegalSimplified",chineseCountingThousand:"chineseCountingThousand",koreanDigital:"koreanDigital",koreanCounting:"koreanCounting",koreanLegal:"koreanLegal",koreanDigital2:"koreanDigital2",vietnameseCounting:"vietnameseCounting",russianLower:"russianLower",russianUpper:"russianUpper",numberInDash:"numberInDash",hebrew1:"hebrew1",hebrew2:"hebrew2",arabicAlpha:"arabicAlpha",arabicAbjad:"arabicAbjad",hindiVowels:"hindiVowels",hindiConsonants:"hindiConsonants",hindiNumbers:"hindiNumbers",hindiCounting:"hindiCounting",thaiLetters:"thaiLetters",thaiNumbers:"thaiNumbers",thaiCounting:"thaiCounting"}[e]??"decimal"}function Hn(e){let t={},n=chunkB45ECEGY_js.d(e,"w","ind");if(n){let o=chunkB45ECEGY_js.h(n,"w","left"),i=chunkB45ECEGY_js.h(n,"w","right"),s=chunkB45ECEGY_js.h(n,"w","start"),a=chunkB45ECEGY_js.h(n,"w","end"),l=chunkB45ECEGY_js.h(n,"w","firstLine"),u=chunkB45ECEGY_js.h(n,"w","hanging"),m=o??s,h=i??a;m!==void 0&&(t.indentLeft=m),h!==void 0&&(t.indentRight=h),u!==void 0?(t.indentFirstLine=-u,t.hangingIndent=true):l!==void 0&&(t.indentFirstLine=l);}let r=chunkB45ECEGY_js.d(e,"w","tabs");if(r){t.tabs=[];let o=chunkB45ECEGY_js.e(r,"w","tab");for(let i of o){let s=chunkB45ECEGY_js.h(i,"w","pos"),a=chunkB45ECEGY_js.g(i,"w","val"),l=chunkB45ECEGY_js.g(i,"w","leader");s!==void 0&&a&&t.tabs.push({position:s,alignment:Vn(a),leader:Wn(l)});}}return t}function Vn(e){switch(e){case "left":return "left";case "center":return "center";case "right":return "right";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "num";default:return "left"}}function Wn(e){if(e)switch(e){case "none":return "none";case "dot":return "dot";case "hyphen":return "hyphen";case "underscore":return "underscore";case "heavy":return "heavy";case "middleDot":return "middleDot";default:return}}function Un(e){let t={},n=chunkB45ECEGY_js.d(e,"w","rFonts");n&&(t.fontFamily={ascii:chunkB45ECEGY_js.g(n,"w","ascii")??void 0,hAnsi:chunkB45ECEGY_js.g(n,"w","hAnsi")??void 0,eastAsia:chunkB45ECEGY_js.g(n,"w","eastAsia")??void 0,cs:chunkB45ECEGY_js.g(n,"w","cs")??void 0});let r=chunkB45ECEGY_js.d(e,"w","sz");if(r){let l=chunkB45ECEGY_js.h(r,"w","val");l!==void 0&&(t.fontSize=l);}let o=chunkB45ECEGY_js.d(e,"w","color");if(o){let l=chunkB45ECEGY_js.g(o,"w","val"),u=chunkB45ECEGY_js.g(o,"w","themeColor");l==="auto"?t.color={auto:true}:u?t.color={themeColor:u,themeTint:chunkB45ECEGY_js.g(o,"w","themeTint")??void 0,themeShade:chunkB45ECEGY_js.g(o,"w","themeShade")??void 0}:l&&(t.color={rgb:l});}let i=chunkB45ECEGY_js.d(e,"w","b");i&&(t.bold=chunkB45ECEGY_js.i(i));let s=chunkB45ECEGY_js.d(e,"w","i");s&&(t.italic=chunkB45ECEGY_js.i(s));let a=chunkB45ECEGY_js.d(e,"w","vanish");return a&&(t.hidden=chunkB45ECEGY_js.i(a)),t}function Me(e){let t=new Map;for(let r of e.abstractNums)t.set(r.abstractNumId,r);let n=new Map;for(let r of e.nums)n.set(r.numId,r);return {definitions:e,getLevel(r,o){let i=n.get(r);if(!i)return null;if(i.levelOverrides){let a=i.levelOverrides.find(l=>l.ilvl===o);if(a){if(a.lvl)return a.lvl;let l=t.get(i.abstractNumId);if(l){let u=l.levels.find(m=>m.ilvl===o);if(u&&a.startOverride!==void 0)return {...u,start:a.startOverride}}}}let s=t.get(i.abstractNumId);if(!s)return null;if(s.numStyleLink&&s.levels.length===0){for(let a of t.values())if(a.styleLink===s.numStyleLink&&a.levels.length>0){s=a;break}}return s.levels.find(a=>a.ilvl===o)??null},getAbstract(r){return t.get(r)??null},getInstance(r){return n.get(r)??null},hasNumbering(r){return n.has(r)}}}function Zn(e){let t=new Map,n=chunkB45ECEGY_js.b(e);if(!n)return t;let r=chunkB45ECEGY_js.d(n,"w16cex","commentsExtensible")??n;for(let o of chunkB45ECEGY_js.f(r)){if((o.name?.replace(/^.*:/,"")??"")!=="comment")continue;let s=chunkB45ECEGY_js.g(o,"w16cex","paraId")??chunkB45ECEGY_js.g(o,"w15","paraId")??o.attributes?.["w16cex:paraId"]??o.attributes?.["w15:paraId"],a=chunkB45ECEGY_js.g(o,"w16cex","dateUtc")??chunkB45ECEGY_js.g(o,"w15","dateUtc")??o.attributes?.["w16cex:dateUtc"]??o.attributes?.["w15:dateUtc"];s&&a&&t.set(String(s).toUpperCase(),String(a));}return t}function Gn(e){let t=new Map,n=new Map,r=chunkB45ECEGY_js.b(e);if(!r)return {parentByParaId:t,doneByParaId:n};let o=chunkB45ECEGY_js.d(r,"w15","commentsEx")??r;for(let i of chunkB45ECEGY_js.f(o)){if((i.name?.replace(/^.*:/,"")??"")!=="commentEx")continue;let a=chunkB45ECEGY_js.g(i,"w15","paraId")??i.attributes?.["w15:paraId"],l=chunkB45ECEGY_js.g(i,"w15","paraIdParent")??i.attributes?.["w15:paraIdParent"],u=chunkB45ECEGY_js.g(i,"w15","done")??i.attributes?.["w15:done"];if(a){let m=String(a).toUpperCase();l&&t.set(m,String(l).toUpperCase()),u==="1"&&n.set(m,true);}}return {parentByParaId:t,doneByParaId:n}}function Ot(e,t,n,r,o,i,s){if(!e)return [];let a=chunkB45ECEGY_js.b(e);if(!a)return [];let l=i?Zn(i):new Map,u=s?Gn(s):null,m=chunkB45ECEGY_js.d(a,"w","comments")??a,h=chunkB45ECEGY_js.f(m),g=[],x=[];for(let p of h){if((p.name?.replace(/^.*:/,"")??"")!=="comment")continue;let C=parseInt(chunkB45ECEGY_js.g(p,"w","id")??"0",10),E=chunkB45ECEGY_js.g(p,"w","author")??"Unknown",D=chunkB45ECEGY_js.g(p,"w","initials"),A=D!=null?String(D):void 0,v=chunkB45ECEGY_js.g(p,"w","date"),b=v!=null?String(v):void 0,P=chunkB45ECEGY_js.g(p,"w14","paraId")??p.attributes?.["w14:paraId"]??chunkB45ECEGY_js.g(p,"w","paraId"),B=(P?l.get(String(P).toUpperCase()):void 0)??b,R=chunkB45ECEGY_js.g(p,"w","done")??p.attributes?.["w:done"],k=R==="1"||R==="true"?true:void 0,N=chunkB45ECEGY_js.g(p,"w16cid","parentId")??chunkB45ECEGY_js.g(p,"w","parentId")??p.attributes?.["w16cid:parentId"]??p.attributes?.["w:parentId"],q=N!=null?parseInt(String(N),10):void 0,K=[],V="";for(let L of chunkB45ECEGY_js.f(p))if((L.name?.replace(/^.*:/,"")??"")==="p"){let T=chunkB45ECEGY_js.s(L,t,n,null,r,o);K.push(T);let z=chunkB45ECEGY_js.g(L,"w14","paraId")??L.attributes?.["w14:paraId"];z&&(V=String(z).toUpperCase());}k==null&&u&&V&&u.doneByParaId.get(V)&&(k=true),x.push(V),g.push({id:C,author:E,initials:A,date:B,content:K,...k!=null?{done:k}:{},...q!=null&&!isNaN(q)?{parentId:q}:{}});}if(u&&u.parentByParaId.size>0){let p=new Map;for(let y=0;y<g.length;y++){let C=x[y];C&&p.set(C,g[y].id);}for(let y=0;y<g.length;y++){if(g[y].parentId!=null)continue;let C=x[y];if(!C)continue;let E=u.parentByParaId.get(C);if(!E)continue;let D=p.get(E);D!=null&&(g[y]={...g[y],parentId:D});}}return g}async function Ne(e,t={}){let n=e instanceof ArrayBuffer?e:await chunkGGQK26JO_js.a(e),{onProgress:r=()=>{},preloadFonts:o=true,parseHeadersFooters:i=true,parseNotes:s=true,detectVariables:a=true}=t,l=[];try{let g=function(L,_){let T=performance.now(),z=_(),O=performance.now()-T;return h.push({stage:L,ms:O}),O>1e3&&console.warn(`[parseDocx] ${L} took ${Math.round(O)}ms`),z};var u=g;let m=performance.now(),h=[];async function x(L,_){let T=performance.now(),z=await _(),O=performance.now()-T;return h.push({stage:L,ms:O}),O>1e3&&console.warn(`[parseDocx] ${L} took ${Math.round(O)}ms`),z}r("Extracting DOCX...",0);let p=await x("unzip",()=>Ft(n));r("Extracted DOCX",10),r("Parsing relationships...",10);let y=g("relationships",()=>p.documentRels?chunkB45ECEGY_js.k(p.documentRels):new Map);r("Parsed relationships",15),r("Parsing theme...",15);let C=g("theme",()=>chunkB45ECEGY_js.l(p.themeXml));r("Parsed theme",20),r("Parsing styles...",20);let E=null,D;g("styles",()=>{p.stylesXml&&(E=Le(p.stylesXml,C),D=Lt(p.stylesXml,C));}),r("Parsed styles",30),r("Parsing numbering...",30);let A=g("numbering",()=>Mt(p.numberingXml));r("Parsed numbering",35),r("Processing media files...",35);let v=g("media",()=>Jn(p,y));r("Processed media",40),r("Parsing document body...",40);let b={content:[]};g("documentBody",()=>{p.documentXml?b=chunkB45ECEGY_js.u(p.documentXml,E,C,A,y,v):l.push("No document.xml found in DOCX");}),r("Parsed document body",55);let P,I;if(i){r("Parsing headers/footers...",55);let L=g("headersFooters",()=>Yn(p,E,C,A,y,v));P=L.headers,I=L.footers,r("Parsed headers/footers",65);}else r("Skipping headers/footers",65);let B,R;if(s){r("Parsing footnotes/endnotes...",65);let L=g("footnotesEndnotes",()=>qn(p,E,C,A,y,v));B=L.footnotes,R=L.endnotes,r("Parsed footnotes/endnotes",75);}else r("Skipping footnotes/endnotes",75);r("Parsing comments...",75);let k=g("comments",()=>Ot(p.commentsXml,E,C,y,v,p.commentsExtensibleXml,p.commentsExtendedXml));k.length>0&&(b.comments=k);let N;a?(r("Detecting template variables...",75),N=g("variables",()=>chunkB45ECEGY_js.t(b.content)),r("Detected variables",80)):r("Skipping variable detection",80),o?(r("Loading fonts...",80),await x("fonts",()=>Kn(C,D,b)),r("Loaded fonts",95)):r("Skipping font loading",95),r("Assembling document...",95);let K={package:{document:b,styles:D,theme:C,numbering:A.definitions,headers:P,footers:I,footnotes:B,endnotes:R,relationships:y,media:v},originalBuffer:n,templateVariables:N,warnings:l.length>0?l:void 0},V=performance.now()-m;if(V>2e3){let L=h.filter(_=>_.ms>100).map(_=>`${_.stage}: ${Math.round(_.ms)}ms`).join(", ");console.warn(`[parseDocx] Total: ${Math.round(V)}ms`+(L?` (${L})`:""));}return r("Complete",100),K}catch(m){let h=m instanceof Error?m.message:String(m);throw console.error("[parseDocx] Failed to parse DOCX:",h,m),new Error(`Failed to parse DOCX: ${h}`)}}function Jn(e,t){let n=new Map;for(let[r,o]of e.media.entries()){let i=r.split("/").pop()||r,s=It(r),a=new Uint8Array(o),l="";for(let x=0;x<a.length;x++)l+=String.fromCharCode(a[x]);let u=btoa(l),m=`data:${s};base64,${u}`,h={path:r,filename:i,mimeType:s,data:o,dataUrl:m};n.set(r,h);let g=r.replace(/^word\//,"");g!==r&&n.set(g,h);}return n}function ge(e,t){let n=t.toLowerCase();for(let[r,o]of e.entries())if(r.toLowerCase()===n)return o}function Yn(e,t,n,r,o,i){let s=new Map,a=new Map;for(let[l,u]of o.entries())if(u.type===chunkB45ECEGY_js.j.header&&u.target){let m=u.target.split("/").pop()||u.target,h=ge(e.headers,m);if(h){let g=`word/_rels/${m}.rels`,x=ge(e.allXml,g),p=x?chunkB45ECEGY_js.k(x):o,y=chunkB45ECEGY_js.o(h,"default",t,n,r,p,i);s.set(l,y);}}else if(u.type===chunkB45ECEGY_js.j.footer&&u.target){let m=u.target.split("/").pop()||u.target,h=ge(e.footers,m);if(h){let g=`word/_rels/${m}.rels`,x=ge(e.allXml,g),p=x?chunkB45ECEGY_js.k(x):o,y=chunkB45ECEGY_js.p(h,"default",t,n,r,p,i);a.set(l,y);}}return {headers:s,footers:a}}function qn(e,t,n,r,o,i){let s=chunkB45ECEGY_js.q(e.footnotesXml,t,n,r,o,i),a=chunkB45ECEGY_js.r(e.endnotesXml,t,n,r,o,i);return {footnotes:s.getNormalFootnotes(),endnotes:a.getNormalEndnotes()}}async function Kn(e,t,n){let r=new Set;if(e?.fontScheme){let{majorFont:o,minorFont:i}=e.fontScheme;o?.latin&&r.add(o.latin),i?.latin&&r.add(i.latin);}if(t?.docDefaults?.rPr?.fontFamily?.ascii&&r.add(t.docDefaults.rPr.fontFamily.ascii),t?.styles)for(let o of t.styles)o.rPr?.fontFamily?.ascii&&r.add(o.rPr.fontFamily.ascii),o.rPr?.fontFamily?.hAnsi&&r.add(o.rPr.fontFamily.hAnsi);if(n.content){for(let o of n.content)if(o.type==="paragraph")for(let i of o.content)i.type==="run"&&i.formatting?.fontFamily&&(i.formatting.fontFamily.ascii&&r.add(i.formatting.fontFamily.ascii),i.formatting.fontFamily.hAnsi&&r.add(i.formatting.fontFamily.hAnsi));}if(r.size>0)try{await chunkGGQK26JO_js.c(Array.from(r));}catch(o){console.warn("Failed to load some fonts:",o);}}function w(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function d(e){return e==null||!Number.isFinite(e)?"0":String(Math.round(e))}var Xt=1e5;function zt(){Xt=1e5;}function _t(e){return e!=null&&e!==""&&e!==0?String(e):String(Xt++)}var Qn=new Set(["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","red","white","yellow"]);function er(e){if(!e)return "";let t=[];return e.auto?t.push('w:val="auto"'):e.rgb&&t.push(`w:val="${e.rgb}"`),e.themeColor&&t.push(`w:themeColor="${e.themeColor}"`),e.themeTint&&t.push(`w:themeTint="${e.themeTint}"`),e.themeShade&&t.push(`w:themeShade="${e.themeShade}"`),t.length===0?"":`<w:color ${t.join(" ")}/>`}function tr(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function Q(e){if(!e)return "";let t=[];if(e.styleId&&t.push(`<w:rStyle w:val="${w(e.styleId)}"/>`),e.fontFamily){let o=[];e.fontFamily.ascii&&o.push(`w:ascii="${w(e.fontFamily.ascii)}"`),e.fontFamily.hAnsi&&o.push(`w:hAnsi="${w(e.fontFamily.hAnsi)}"`),e.fontFamily.eastAsia&&o.push(`w:eastAsia="${w(e.fontFamily.eastAsia)}"`),e.fontFamily.cs&&o.push(`w:cs="${w(e.fontFamily.cs)}"`),e.fontFamily.asciiTheme&&o.push(`w:asciiTheme="${e.fontFamily.asciiTheme}"`),e.fontFamily.hAnsiTheme&&o.push(`w:hAnsiTheme="${e.fontFamily.hAnsiTheme}"`),e.fontFamily.eastAsiaTheme&&o.push(`w:eastAsiaTheme="${e.fontFamily.eastAsiaTheme}"`),e.fontFamily.csTheme&&o.push(`w:csTheme="${e.fontFamily.csTheme}"`),o.length>0&&t.push(`<w:rFonts ${o.join(" ")}/>`);}e.bold===true?t.push("<w:b/>"):e.bold===false&&t.push('<w:b w:val="0"/>'),e.boldCs===true?t.push("<w:bCs/>"):e.boldCs===false&&t.push('<w:bCs w:val="0"/>'),e.italic===true?t.push("<w:i/>"):e.italic===false&&t.push('<w:i w:val="0"/>'),e.italicCs===true?t.push("<w:iCs/>"):e.italicCs===false&&t.push('<w:iCs w:val="0"/>'),e.allCaps&&t.push("<w:caps/>"),e.smallCaps&&t.push("<w:smallCaps/>"),e.strike&&t.push("<w:strike/>"),e.doubleStrike&&t.push("<w:dstrike/>"),e.outline&&t.push("<w:outline/>"),e.shadow&&t.push("<w:shadow/>"),e.emboss&&t.push("<w:emboss/>"),e.imprint&&t.push("<w:imprint/>"),e.hidden&&t.push("<w:vanish/>");let n=er(e.color);if(n&&t.push(n),e.spacing!==void 0&&t.push(`<w:spacing w:val="${d(e.spacing)}"/>`),e.scale!==void 0&&t.push(`<w:w w:val="${d(e.scale)}"/>`),e.kerning!==void 0&&t.push(`<w:kern w:val="${d(e.kerning)}"/>`),e.position!==void 0&&t.push(`<w:position w:val="${d(e.position)}"/>`),e.fontSize!==void 0&&t.push(`<w:sz w:val="${d(e.fontSize)}"/>`),e.fontSizeCs!==void 0&&t.push(`<w:szCs w:val="${d(e.fontSizeCs)}"/>`),e.highlight&&e.highlight!=="none"){if(Qn.has(e.highlight))t.push(`<w:highlight w:val="${e.highlight}"/>`);else if(!e.shading){let o=e.highlight.replace(/^#/,"");/^[0-9a-fA-F]{6}$/.test(o)&&t.push(`<w:shd w:val="clear" w:color="auto" w:fill="${o}"/>`);}}if(e.underline){let o=[`w:val="${e.underline.style}"`];e.underline.color&&(e.underline.color.rgb&&o.push(`w:color="${e.underline.color.rgb}"`),e.underline.color.themeColor&&o.push(`w:themeColor="${e.underline.color.themeColor}"`),e.underline.color.themeTint&&o.push(`w:themeTint="${e.underline.color.themeTint}"`),e.underline.color.themeShade&&o.push(`w:themeShade="${e.underline.color.themeShade}"`)),t.push(`<w:u ${o.join(" ")}/>`);}e.effect&&e.effect!=="none"&&t.push(`<w:effect w:val="${e.effect}"/>`),e.emphasisMark&&e.emphasisMark!=="none"&&t.push(`<w:em w:val="${e.emphasisMark}"/>`);let r=tr(e.shading);return r&&t.push(r),e.vertAlign&&e.vertAlign!=="baseline"&&t.push(`<w:vertAlign w:val="${e.vertAlign}"/>`),e.rtl&&t.push("<w:rtl/>"),e.cs&&t.push("<w:cs/>"),t.length===0?"":`<w:rPr>${t.join("")}</w:rPr>`}function nr(e){return !e.startsWith("<w:rPr>")||!e.endsWith("</w:rPr>")?"":e.slice(7,-8)}function rr(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.info.date=="string"?e.info.date.trim():void 0,i=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,s=[`w:id="${t}"`,`w:author="${w(r)}"`];o&&s.push(`w:date="${w(o)}"`),i&&s.push(`w:rsid="${w(i)}"`);let a=Q(e.previousFormatting)||"<w:rPr/>";return `<w:rPrChange ${s.join(" ")}>${a}</w:rPrChange>`}function or(e,t){let n=Q(e),r=n?nr(n):"",o=(t??[]).map(rr).join(""),i=`${r}${o}`;return i?`<w:rPr>${i}</w:rPr>`:""}function ir(e){return `<w:t${e.preserveSpace||e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${w(e.text)}</w:t>`}function sr(e){return "<w:tab/>"}function ar(e){let t=[];return e.breakType==="page"?t.push('w:type="page"'):e.breakType==="column"?t.push('w:type="column"'):e.breakType==="textWrapping"&&(t.push('w:type="textWrapping"'),e.clear&&e.clear!=="none"&&t.push(`w:clear="${e.clear}"`)),t.length===0?"<w:br/>":`<w:br ${t.join(" ")}/>`}function lr(e){return `<w:sym w:font="${w(e.font)}" w:char="${w(e.char)}"/>`}function cr(e){return e.type==="footnoteRef"?`<w:footnoteReference w:id="${e.id}"/>`:`<w:endnoteReference w:id="${e.id}"/>`}function ur(e){let t=[`w:fldCharType="${e.charType}"`];return e.fldLock&&t.push('w:fldLock="true"'),e.dirty&&t.push('w:dirty="true"'),`<w:fldChar ${t.join(" ")}/>`}function pr(e){return `<w:instrText${e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${w(e.text)}</w:instrText>`}function fr(e){return "<w:softHyphen/>"}function mr(e){return "<w:noBreakHyphen/>"}function Oe(e){if(!e)return "";if(e.rgb)return `<a:srgbClr val="${e.rgb.replace("#","")}"/>`;if(e.themeColor){let t=`<a:schemeClr val="${e.themeColor}"`;return e.themeTint?t+=`><a:tint val="${e.themeTint}"/></a:schemeClr>`:e.themeShade?t+=`><a:shade val="${e.themeShade}"/></a:schemeClr>`:t+="/>",t}return ""}function dr(e){if(!e||e.type==="none")return "<a:noFill/>";if(e.type==="solid"&&e.color)return `<a:solidFill>${Oe(e.color)}</a:solidFill>`;if(e.type==="gradient"&&e.gradient){let t=e.gradient,n=t.stops.map(o=>`<a:gs pos="${o.position}">${Oe(o.color)}</a:gs>`).join(""),r=t.type==="linear"?`<a:lin ang="${(t.angle||0)*6e4}" scaled="1"/>`:"";return `<a:gradFill><a:gsLst>${n}</a:gsLst>${r}</a:gradFill>`}return ""}function jt(e){if(!e)return "";let t=[];e.width!=null&&t.push(`w="${e.width}"`),e.cap&&t.push(`cap="${e.cap}"`);let n=[];return e.color&&n.push(`<a:solidFill>${Oe(e.color)}</a:solidFill>`),e.style&&e.style!=="solid"&&n.push(`<a:prstDash val="${e.style}"/>`),e.headEnd&&n.push(`<a:headEnd type="${e.headEnd.type}"${e.headEnd.width?` w="${e.headEnd.width}"`:""}${e.headEnd.length?` len="${e.headEnd.length}"`:""}/>`),e.tailEnd&&n.push(`<a:tailEnd type="${e.tailEnd.type}"${e.tailEnd.width?` w="${e.tailEnd.width}"`:""}${e.tailEnd.length?` len="${e.tailEnd.length}"`:""}/>`),n.length===0&&t.length===0?"":`<a:ln${t.length?" "+t.join(" "):""}>${n.join("")}</a:ln>`}function Ht(e){let t=[],n=e.horizontal;t.push(`<wp:positionH relativeFrom="${n.relativeTo}">`),n.alignment?t.push(`<wp:align>${n.alignment}</wp:align>`):t.push(`<wp:posOffset>${d(n.posOffset)}</wp:posOffset>`),t.push("</wp:positionH>");let r=e.vertical;return t.push(`<wp:positionV relativeFrom="${r.relativeTo}">`),r.alignment?t.push(`<wp:align>${r.alignment}</wp:align>`):t.push(`<wp:posOffset>${d(r.posOffset)}</wp:posOffset>`),t.push("</wp:positionV>"),t.join("")}function Vt(e){let t=e.wrapText?` wrapText="${e.wrapText}"`:' wrapText="bothSides"';switch(e.type){case "square":return `<wp:wrapSquare${t}/>`;case "tight":return `<wp:wrapTight${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;case "through":return `<wp:wrapThrough${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`;case "topAndBottom":return "<wp:wrapTopAndBottom/>";case "behind":case "inFront":return "<wp:wrapNone/>";default:return "<wp:wrapNone/>"}}function hr(e,t){let n=e.size.width,r=e.size.height,o=e.rId||"rId1",i=t,s=e.filename||`image${i}`,a="";e.transform?.rotation&&(a+=` rot="${Math.round(e.transform.rotation*6e4)}"`),e.transform?.flipH&&(a+=' flipH="1"'),e.transform?.flipV&&(a+=' flipV="1"');let l=e.opacity!==void 0&&e.opacity<1?`<a:alphaModFix amt="${Math.round(Math.max(0,Math.min(1,e.opacity))*1e5)}"/>`:"",u=l?`<a:blip r:embed="${o}">${l}</a:blip>`:`<a:blip r:embed="${o}"/>`,m=[];e.crop?.left&&m.push(`l="${Math.round(e.crop.left*1e5)}"`),e.crop?.top&&m.push(`t="${Math.round(e.crop.top*1e5)}"`),e.crop?.right&&m.push(`r="${Math.round(e.crop.right*1e5)}"`),e.crop?.bottom&&m.push(`b="${Math.round(e.crop.bottom*1e5)}"`);let h=m.length>0?`<a:srcRect ${m.join(" ")}/>`:"";return ['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">','<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">',"<pic:nvPicPr>",`<pic:cNvPr id="${i}" name="${w(s)}"${e.alt?` descr="${w(e.alt)}"`:""}/>`,"<pic:cNvPicPr/>","</pic:nvPicPr>","<pic:blipFill>",u,h,"<a:stretch><a:fillRect/></a:stretch>","</pic:blipFill>","<pic:spPr>",`<a:xfrm${a}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${d(n)}" cy="${d(r)}"/>`,"</a:xfrm>",'<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>',e.outline?jt(e.outline):"","</pic:spPr>","</pic:pic>","</a:graphicData>","</a:graphic>"].join("")}function gr(e){let t=e.image,n=t.wrap.type!=="inline",r=t.size.width,o=t.size.height,i=t.wrap.distT??0,s=t.wrap.distB??0,a=t.wrap.distL??0,l=t.wrap.distR??0,u=t.padding?.left??0,m=t.padding?.top??0,h=t.padding?.right??0,g=t.padding?.bottom??0,x=`<wp:effectExtent l="${d(u)}" t="${d(m)}" r="${d(h)}" b="${d(g)}"/>`,p=_t(t.id),y=t.title||t.filename||`Picture ${p}`,C=hr(t,p);if(!n)return ["<w:drawing>",`<wp:inline distT="${d(i)}" distB="${d(s)}" distL="${d(a)}" distR="${d(l)}">`,`<wp:extent cx="${d(r)}" cy="${d(o)}"/>`,x,`<wp:docPr id="${p}" name="${w(y)}"${t.alt?` descr="${w(t.alt)}"`:""}${t.decorative?' hidden="1"':""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',C,"</wp:inline>","</w:drawing>"].join("");let E=t.wrap.type==="behind"?"1":"0",D=t.position?Ht(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',A=Vt(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${d(i)}" distB="${d(s)}" distL="${d(a)}" distR="${d(l)}" simplePos="0" relativeHeight="251658240" behindDoc="${E}" locked="0" layoutInCell="${t.layoutInCell===false?"0":"1"}" allowOverlap="${t.allowOverlap===false?"0":"1"}">`,'<wp:simplePos x="0" y="0"/>',D,`<wp:extent cx="${d(r)}" cy="${d(o)}"/>`,x,A,`<wp:docPr id="${p}" name="${w(y)}"${t.alt?` descr="${w(t.alt)}"`:""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',C,"</wp:anchor>","</w:drawing>"].join("")}function wr(e){return e.map(t=>G(t)).join("")}function yr(e){let t=e.shape,n=t.size.width,r=t.size.height,o=t.shapeType==="textBox",i=t.wrap&&t.wrap.type!=="inline",s=t.wrap?.distT??0,a=t.wrap?.distB??0,l=t.wrap?.distL??0,u=t.wrap?.distR??0,m=_t(t.id),h=t.name||(o?`TextBox ${m}`:`Shape ${m}`),g="";t.transform?.rotation&&(g+=` rot="${Math.round(t.transform.rotation*6e4)}"`),t.transform?.flipH&&(g+=' flipH="1"'),t.transform?.flipV&&(g+=' flipV="1"');let x=["<wps:spPr>",`<a:xfrm${g}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${d(n)}" cy="${d(r)}"/>`,"</a:xfrm>",`<a:prstGeom prst="${t.shapeType==="textBox"?"rect":t.shapeType}"><a:avLst/></a:prstGeom>`,dr(t.fill),jt(t.outline),"</wps:spPr>"].join(""),p="";if(t.textBody){let v=t.textBody,b=['rot="0"','vert="horz"'];v.anchor&&b.push(`anchor="${v.anchor==="middle"?"ctr":v.anchor}"`),v.anchorCenter&&b.push('anchorCtr="1"'),v.margins&&(v.margins.left!=null&&b.push(`lIns="${d(v.margins.left)}"`),v.margins.top!=null&&b.push(`tIns="${d(v.margins.top)}"`),v.margins.right!=null&&b.push(`rIns="${d(v.margins.right)}"`),v.margins.bottom!=null&&b.push(`bIns="${d(v.margins.bottom)}"`)),o?p=["<wps:txbx><w:txbxContent>",wr(v.content),"</w:txbxContent></wps:txbx>",`<wps:bodyPr ${b.join(" ")}/>`].join(""):p=[`<wps:bodyPr ${b.join(" ")}/>`].join("");}let C=['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">',["<wps:wsp>",`<wps:cNvSpPr${o?' txBox="1"':""}/>`,x,p,"</wps:wsp>"].join(""),"</a:graphicData>","</a:graphic>"].join("");if(!i)return ["<w:drawing>",`<wp:inline distT="${d(s)}" distB="${d(a)}" distL="${d(l)}" distR="${d(u)}">`,`<wp:extent cx="${d(n)}" cy="${d(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',`<wp:docPr id="${m}" name="${w(h)}"/>`,"<wp:cNvGraphicFramePr/>",C,"</wp:inline>","</w:drawing>"].join("");let E=t.wrap?.type==="behind"?"1":"0",D=t.position?Ht(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',A=Vt(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${d(s)}" distB="${d(a)}" distL="${d(l)}" distR="${d(u)}" simplePos="0" relativeHeight="251658240" behindDoc="${E}" locked="0" layoutInCell="1" allowOverlap="1">`,'<wp:simplePos x="0" y="0"/>',D,`<wp:extent cx="${d(n)}" cy="${d(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',A,`<wp:docPr id="${m}" name="${w(h)}"/>`,"<wp:cNvGraphicFramePr/>",C,"</wp:anchor>","</w:drawing>"].join("")}function xr(e){switch(e.type){case "text":return ir(e);case "tab":return sr();case "break":return ar(e);case "symbol":return lr(e);case "footnoteRef":case "endnoteRef":return cr(e);case "fieldChar":return ur(e);case "instrText":return pr(e);case "softHyphen":return fr();case "noBreakHyphen":return mr();case "drawing":return gr(e);case "shape":return yr(e);default:return ""}}function Z(e){let t=[],n=or(e.formatting,e.propertyChanges);n&&t.push(n);for(let r of e.content){let o=xr(r);o&&t.push(o);}return `<w:r>${t.join("")}</w:r>`}function ee(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${d(e.size)}"`),e.space!==void 0&&n.push(`w:space="${d(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function br(e){if(!e)return "";let t=[];if(e.top){let n=ee(e.top,"top");n&&t.push(n);}if(e.left){let n=ee(e.left,"left");n&&t.push(n);}if(e.bottom){let n=ee(e.bottom,"bottom");n&&t.push(n);}if(e.right){let n=ee(e.right,"right");n&&t.push(n);}if(e.between){let n=ee(e.between,"between");n&&t.push(n);}if(e.bar){let n=ee(e.bar,"bar");n&&t.push(n);}return t.length===0?"":`<w:pBdr>${t.join("")}</w:pBdr>`}function Tr(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function vr(e){return !e||e.length===0?"":`<w:tabs>${e.map(n=>{let r=[`w:val="${n.alignment}"`,`w:pos="${d(n.position)}"`];return n.leader&&n.leader!=="none"&&r.push(`w:leader="${n.leader}"`),`<w:tab ${r.join(" ")}/>`}).join("")}</w:tabs>`}function Sr(e){let t=[];return e.spaceBefore!==void 0&&t.push(`w:before="${d(e.spaceBefore)}"`),e.spaceAfter!==void 0&&t.push(`w:after="${d(e.spaceAfter)}"`),e.lineSpacing!==void 0&&t.push(`w:line="${d(e.lineSpacing)}"`),e.lineSpacingRule&&t.push(`w:lineRule="${e.lineSpacingRule}"`),e.beforeAutospacing&&t.push('w:beforeAutospacing="1"'),e.afterAutospacing&&t.push('w:afterAutospacing="1"'),t.length===0?"":`<w:spacing ${t.join(" ")}/>`}function Cr(e){let t=[];return e.indentLeft!==void 0&&t.push(`w:left="${d(e.indentLeft)}"`),e.indentRight!==void 0&&t.push(`w:right="${d(e.indentRight)}"`),e.indentFirstLine!==void 0&&(e.hangingIndent?t.push(`w:hanging="${d(Math.abs(e.indentFirstLine))}"`):e.indentFirstLine!==0&&t.push(`w:firstLine="${d(e.indentFirstLine)}"`)),t.length===0?"":`<w:ind ${t.join(" ")}/>`}function Pr(e){if(!e)return "";let t=[];return e.ilvl!==void 0&&t.push(`<w:ilvl w:val="${d(e.ilvl)}"/>`),e.numId!==void 0&&t.push(`<w:numId w:val="${d(e.numId)}"/>`),t.length===0?"":`<w:numPr>${t.join("")}</w:numPr>`}function $r(e){if(!e)return "";let t=[];return e.width!==void 0&&t.push(`w:w="${d(e.width)}"`),e.height!==void 0&&t.push(`w:h="${d(e.height)}"`),e.hAnchor&&t.push(`w:hAnchor="${e.hAnchor}"`),e.vAnchor&&t.push(`w:vAnchor="${e.vAnchor}"`),e.x!==void 0&&t.push(`w:x="${d(e.x)}"`),e.y!==void 0&&t.push(`w:y="${d(e.y)}"`),e.xAlign&&t.push(`w:xAlign="${e.xAlign}"`),e.yAlign&&t.push(`w:yAlign="${e.yAlign}"`),e.wrap&&t.push(`w:wrap="${e.wrap}"`),t.length===0?"":`<w:framePr ${t.join(" ")}/>`}function Ut(e,t){let n=[];if(e){e.styleId&&n.push(`<w:pStyle w:val="${w(e.styleId)}"/>`),e.keepNext&&n.push("<w:keepNext/>"),e.keepLines&&n.push("<w:keepLines/>"),e.contextualSpacing&&n.push("<w:contextualSpacing/>"),e.pageBreakBefore&&n.push("<w:pageBreakBefore/>");let r=$r(e.frame);r&&n.push(r),e.widowControl===false?n.push('<w:widowControl w:val="0"/>'):e.widowControl===true&&n.push("<w:widowControl/>");let o=Pr(e.numPr);o&&n.push(o);let i=br(e.borders);i&&n.push(i);let s=Tr(e.shading);s&&n.push(s);let a=vr(e.tabs);a&&n.push(a),e.suppressLineNumbers&&n.push("<w:suppressLineNumbers/>"),e.suppressAutoHyphens&&n.push("<w:suppressAutoHyphens/>");let l=Sr(e);l&&n.push(l);let u=Cr(e);if(u&&n.push(u),e.bidi&&n.push("<w:bidi/>"),e.alignment&&n.push(`<w:jc w:val="${e.alignment}"/>`),e.outlineLevel!==void 0&&n.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`),e.runProperties){let m=Q(e.runProperties);m&&n.push(m);}}return t&&t.length>0&&n.push(...t.map(r=>Ir(r))),n.length===0?"":`<w:pPr>${n.join("")}</w:pPr>`}function Fr(e){return !e.startsWith("<w:pPr>")||!e.endsWith("</w:pPr>")?"":e.slice(7,-8)}function Ir(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.info.date=="string"?e.info.date.trim():void 0,i=typeof e.info.rsid=="string"?e.info.rsid.trim():void 0,s=[`w:id="${t}"`,`w:author="${w(r)}"`];o&&s.push(`w:date="${w(o)}"`),i&&s.push(`w:rsid="${w(i)}"`);let a=Ut(e.previousFormatting)||"<w:pPr/>",l=Fr(a),u=l.length>0?`<w:pPr>${l}</w:pPr>`:"<w:pPr/>";return `<w:pPrChange ${s.join(" ")}>${u}</w:pPrChange>`}function Xe(e){let t=[];e.rId&&t.push(`r:id="${e.rId}"`),e.anchor&&t.push(`w:anchor="${w(e.anchor)}"`),e.tooltip&&t.push(`w:tooltip="${w(e.tooltip)}"`),e.target&&t.push(`w:tgtFrame="${w(e.target)}"`),e.history===false&&t.push('w:history="0"'),e.docLocation&&t.push(`w:docLocation="${w(e.docLocation)}"`);let n=e.children.map(o=>o.type==="run"?Z(o):o.type==="bookmarkStart"?Zt(o):o.type==="bookmarkEnd"?Gt(o):"").join("");return `<w:hyperlink${t.length>0?" "+t.join(" "):""}>${n}</w:hyperlink>`}function Zt(e){let t=[`w:id="${e.id}"`,`w:name="${w(e.name)}"`];return e.colFirst!==void 0&&t.push(`w:colFirst="${e.colFirst}"`),e.colLast!==void 0&&t.push(`w:colLast="${e.colLast}"`),`<w:bookmarkStart ${t.join(" ")}/>`}function Gt(e){return `<w:bookmarkEnd w:id="${e.id}"/>`}function Jt(e){let t=[],n=e.content.find(a=>a.type==="run"),r=n?.formatting?Q(n.formatting):"",o=['w:fldCharType="begin"'];e.fldLock&&o.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${o.join(" ")}/></w:r>`);let s=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${s}>${w(e.instruction)}</w:instrText></w:r>`),t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`);for(let a of e.content)a.type==="run"&&t.push(Z(a));return t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function Yt(e){let t=[],n=e.fieldResult?.[0]?.formatting,r=n?Q(n):"",o=['w:fldCharType="begin"'];if(e.fldLock&&o.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${o.join(" ")}/></w:r>`),e.fieldCode.length>0)t.push(...e.fieldCode.map(i=>Z(i)));else {let s=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${s}>${w(e.instruction)}</w:instrText></w:r>`);}return t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`),t.push(...e.fieldResult.map(i=>Z(i))),t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function qt(e){let t=e.properties,n=[];switch(t.alias&&n.push(`<w:alias w:val="${w(t.alias)}"/>`),t.tag&&n.push(`<w:tag w:val="${w(t.tag)}"/>`),t.lock&&t.lock!=="unlocked"&&n.push(`<w:lock w:val="${t.lock}"/>`),t.showingPlaceholder&&n.push("<w:showingPlcHdr/>"),t.sdtType){case "plainText":n.push("<w:text/>");break;case "date":t.dateFormat?n.push(`<w:date w:fullDate="${w(t.dateFormat)}"/>`):n.push("<w:date/>");break;case "dropdown":{let o=(t.listItems??[]).map(i=>`<w:listItem w:displayText="${w(i.displayText)}" w:value="${w(i.value)}"/>`).join("");n.push(`<w:dropDownList>${o}</w:dropDownList>`);break}case "comboBox":{let o=(t.listItems??[]).map(i=>`<w:listItem w:displayText="${w(i.displayText)}" w:value="${w(i.value)}"/>`).join("");n.push(`<w:comboBox>${o}</w:comboBox>`);break}case "checkbox":n.push(`<w14:checkbox><w14:checked w14:val="${t.checked?"1":"0"}"/></w14:checkbox>`);break;case "picture":n.push("<w:picture/>");break}let r=e.content.map(o=>{switch(o.type){case "run":return Z(o);case "hyperlink":return Xe(o);case "simpleField":return Jt(o);case "complexField":return Yt(o);case "inlineSdt":return qt(o);case "mathEquation":return o.ommlXml||"";default:return o}}).join("");return `<w:sdt><w:sdtPr>${n.join("")}</w:sdtPr><w:sdtContent>${r}</w:sdtContent></w:sdt>`}function Wt(e,t){let n=[`w:id="${t.id}"`,`w:name="${w(t.name)}"`];return `<w:${e} ${n.join(" ")}/>`}function we(e,t){let n=t.info,r=Number.isInteger(n.id)&&n.id>=0?n.id:0,o=typeof n.author=="string"?n.author.trim():"",i=o.length>0?o:"Unknown",s=typeof n.date=="string"?n.date.trim():void 0,a=[`w:id="${r}"`,`w:author="${w(i)}"`];s&&a.push(`w:date="${w(s)}"`);let l=t.content.map(u=>u.type==="run"?e==="del"||e==="moveFrom"?Z(u).replace(/<w:t\b/g,"<w:delText").replace(/<\/w:t>/g,"</w:delText>").replace(/<w:instrText\b/g,"<w:delInstrText").replace(/<\/w:instrText>/g,"</w:delInstrText>"):Z(u):u.type==="hyperlink"?Xe(u):"").join("");return `<w:${e} ${a.join(" ")}>${l}</w:${e}>`}function Er(e){switch(e.type){case "run":return Z(e);case "hyperlink":return Xe(e);case "bookmarkStart":return Zt(e);case "bookmarkEnd":return Gt(e);case "simpleField":return Jt(e);case "complexField":return Yt(e);case "inlineSdt":return qt(e);case "commentRangeStart":return `<w:commentRangeStart w:id="${e.id}"/>`;case "commentRangeEnd":return `<w:commentRangeEnd w:id="${e.id}"/><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="${e.id}"/></w:r>`;case "insertion":return we("ins",e);case "deletion":return we("del",e);case "moveFrom":return we("moveFrom",e);case "moveTo":return we("moveTo",e);case "moveFromRangeStart":return Wt("moveFromRangeStart",e);case "moveFromRangeEnd":return `<w:moveFromRangeEnd w:id="${e.id}"/>`;case "moveToRangeStart":return Wt("moveToRangeStart",e);case "moveToRangeEnd":return `<w:moveToRangeEnd w:id="${e.id}"/>`;case "mathEquation":return e.ommlXml||"";default:return ""}}function G(e){let t=[],n=[];e.paraId&&n.push(`w14:paraId="${e.paraId}"`),e.textId&&n.push(`w14:textId="${e.textId}"`);let r=n.length>0?" "+n.join(" "):"",o=Ut(e.formatting,e.propertyChanges);o&&t.push(o);let i=!!e.renderedPageBreakBefore;for(let s of e.content){let a=Er(s);if(a){if(i){let l=Ar(a);l&&(a=l,i=false);}t.push(a);}}return `<w:p${r}>${t.join("")}</w:p>`}function Ar(e){let t=/<w:r(?=[\s>/])[^>]*>/;return t.test(e)?e.replace(t,n=>`${n}<w:lastRenderedPageBreak/>`):null}function Dr(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"?e.author.trim():"",r=n.length>0?n:"Unknown",o=typeof e.date=="string"?e.date.trim():void 0;return {id:t,author:r,date:o}}function Y(e,t){let n=Dr(e),r=[`w:id="${n.id}"`,`w:author="${w(n.author)}"`];return n.date&&r.push(`w:date="${w(n.date)}"`),t&&t.trim().length>0&&r.push(`w:rsid="${w(t.trim())}"`),r.join(" ")}function J(e,t){if(!e)return "";let n=[`w:w="${d(e.value)}"`,`w:type="${e.type}"`];return `<w:${t} ${n.join(" ")}/>`}function te(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${d(e.size)}"`),e.space!==void 0&&n.push(`w:space="${d(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function Kt(e,t){if(!e)return "";let n=[];if(e.top){let r=te(e.top,"top");r&&n.push(r);}if(e.left){let r=te(e.left,"left");r&&n.push(r);}if(e.bottom){let r=te(e.bottom,"bottom");r&&n.push(r);}if(e.right){let r=te(e.right,"right");r&&n.push(r);}if(e.insideH){let r=te(e.insideH,"insideH");r&&n.push(r);}if(e.insideV){let r=te(e.insideV,"insideV");r&&n.push(r);}return n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function Qt(e,t){if(!e)return "";let n=[];return e.top&&n.push(J(e.top,"top")),e.left&&n.push(J(e.left,"left")),e.bottom&&n.push(J(e.bottom,"bottom")),e.right&&n.push(J(e.right,"right")),n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function en(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function Rr(e){if(!e)return "";let t=[];return e.firstRow&&t.push('w:firstRow="1"'),e.lastRow&&t.push('w:lastRow="1"'),e.firstColumn&&t.push('w:firstColumn="1"'),e.lastColumn&&t.push('w:lastColumn="1"'),e.noHBand&&t.push('w:noHBand="1"'),e.noVBand&&t.push('w:noVBand="1"'),t.length===0?"":`<w:tblLook ${t.join(" ")}/>`}function kr(e){if(!e)return "";let t=[];return e.horzAnchor&&t.push(`w:horzAnchor="${e.horzAnchor}"`),e.vertAnchor&&t.push(`w:vertAnchor="${e.vertAnchor}"`),e.tblpX!==void 0&&t.push(`w:tblpX="${d(e.tblpX)}"`),e.tblpXSpec&&t.push(`w:tblpXSpec="${e.tblpXSpec}"`),e.tblpY!==void 0&&t.push(`w:tblpY="${d(e.tblpY)}"`),e.tblpYSpec&&t.push(`w:tblpYSpec="${e.tblpYSpec}"`),e.topFromText!==void 0&&t.push(`w:topFromText="${d(e.topFromText)}"`),e.bottomFromText!==void 0&&t.push(`w:bottomFromText="${d(e.bottomFromText)}"`),e.leftFromText!==void 0&&t.push(`w:leftFromText="${d(e.leftFromText)}"`),e.rightFromText!==void 0&&t.push(`w:rightFromText="${d(e.rightFromText)}"`),t.length===0?"":`<w:tblpPr ${t.join(" ")}/>`}function tn(e,t){let n=[];if(e){e.styleId&&n.push(`<w:tblStyle w:val="${w(e.styleId)}"/>`);let r=kr(e.floating);r&&n.push(r),e.bidi&&n.push("<w:bidiVisual/>");let o=J(e.width,"tblW");o&&n.push(o),e.justification&&n.push(`<w:jc w:val="${e.justification}"/>`);let i=J(e.cellSpacing,"tblCellSpacing");i&&n.push(i);let s=J(e.indent,"tblInd");s&&n.push(s);let a=Kt(e.borders,"tblBorders");a&&n.push(a);let l=Qt(e.cellMargins,"tblCellMar");l&&n.push(l),e.layout&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);let u=en(e.shading);u&&n.push(u);let m=Rr(e.look);m&&n.push(m),e.overlap&&n.push(`<w:tblOverlap w:val="${e.overlap}"/>`);}return t&&t.length>0&&n.push(...t.map(r=>Lr(r))),n.length===0?"":`<w:tblPr>${n.join("")}</w:tblPr>`}function Br(e){return !e.startsWith("<w:tblPr>")||!e.endsWith("</w:tblPr>")?"":e.slice(9,-10)}function Lr(e){let t=Y(e.info,e.info.rsid),n=tn(e.previousFormatting)||"<w:tblPr/>",r=Br(n),o=r.length>0?`<w:tblPr>${r}</w:tblPr>`:"<w:tblPr/>";return `<w:tblPrChange ${t}>${o}</w:tblPrChange>`}function nn(e,t,n){let r=[];if(e){if(e.cantSplit&&r.push("<w:cantSplit/>"),e.header&&r.push("<w:tblHeader/>"),e.height){let o=[`w:val="${d(e.height.value)}"`];e.heightRule&&o.push(`w:hRule="${e.heightRule}"`),r.push(`<w:trHeight ${o.join(" ")}/>`);}e.justification&&r.push(`<w:jc w:val="${e.justification}"/>`),e.hidden&&r.push("<w:hidden/>");}return n&&(n.type==="tableRowInsertion"?r.push(`<w:ins ${Y(n.info)}/>`):n.type==="tableRowDeletion"&&r.push(`<w:del ${Y(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(o=>Nr(o))),r.length===0?"":`<w:trPr>${r.join("")}</w:trPr>`}function Mr(e){return !e.startsWith("<w:trPr>")||!e.endsWith("</w:trPr>")?"":e.slice(8,-9)}function Nr(e){let t=Y(e.info,e.info.rsid),n=nn(e.previousFormatting)||"<w:trPr/>",r=Mr(n),o=r.length>0?`<w:trPr>${r}</w:trPr>`:"<w:trPr/>";return `<w:trPrChange ${t}>${o}</w:trPrChange>`}function Or(e){if(!e)return "";let n=[e.firstRow?"1":"0",e.lastRow?"1":"0",e.firstColumn?"1":"0",e.lastColumn?"1":"0",e.oddVBand?"1":"0",e.evenVBand?"1":"0",e.oddHBand?"1":"0",e.evenHBand?"1":"0",e.nwCell?"1":"0",e.neCell?"1":"0",e.swCell?"1":"0",e.seCell?"1":"0"].join("");return n==="000000000000"?"":`<w:cnfStyle w:val="${n}"/>`}function rn(e,t,n){let r=[];if(e){let o=Or(e.conditionalFormat);o&&r.push(o);let i=J(e.width,"tcW");i&&r.push(i),e.gridSpan&&e.gridSpan>1&&r.push(`<w:gridSpan w:val="${d(e.gridSpan)}"/>`),e.vMerge&&(e.vMerge==="restart"?r.push('<w:vMerge w:val="restart"/>'):r.push("<w:vMerge/>"));let s=Kt(e.borders,"tcBorders");s&&r.push(s);let a=en(e.shading);a&&r.push(a),e.noWrap&&r.push("<w:noWrap/>");let l=Qt(e.margins,"tcMar");l&&r.push(l),e.textDirection&&r.push(`<w:textDirection w:val="${e.textDirection}"/>`),e.fitText&&r.push("<w:tcFitText/>"),e.verticalAlign&&r.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.hideMark&&r.push("<w:hideMark/>");}return n&&(n.type==="tableCellInsertion"?r.push(`<w:cellIns ${Y(n.info)}/>`):n.type==="tableCellDeletion"?r.push(`<w:cellDel ${Y(n.info)}/>`):n.type==="tableCellMerge"&&r.push(`<w:cellMerge ${Y(n.info)}/>`)),t&&t.length>0&&r.push(...t.map(o=>zr(o))),r.length===0?"":`<w:tcPr>${r.join("")}</w:tcPr>`}function Xr(e){return !e.startsWith("<w:tcPr>")||!e.endsWith("</w:tcPr>")?"":e.slice(8,-9)}function zr(e){let t=Y(e.info,e.info.rsid),n=rn(e.previousFormatting)||"<w:tcPr/>",r=Xr(n),o=r.length>0?`<w:tcPr>${r}</w:tcPr>`:"<w:tcPr/>";return `<w:tcPrChange ${t}>${o}</w:tcPrChange>`}function _r(e){return !e||e.length===0?"":`<w:tblGrid>${e.map(n=>`<w:gridCol w:w="${d(n)}"/>`).join("")}</w:tblGrid>`}function jr(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(G(n)):n.type==="table"&&t.push(ie(n));return t.length===0&&t.push("<w:p/>"),t.join("")}function Hr(e){let t=[],n=rn(e.formatting,e.propertyChanges,e.structuralChange);return n&&t.push(n),t.push(jr(e.content)),`<w:tc>${t.join("")}</w:tc>`}function Vr(e){let t=[],n=nn(e.formatting,e.propertyChanges,e.structuralChange);n&&t.push(n);for(let r of e.cells)t.push(Hr(r));return `<w:tr>${t.join("")}</w:tr>`}function ie(e){let t=[],n=tn(e.formatting,e.propertyChanges);n&&t.push(n);let r=_r(e.columnWidths);r&&t.push(r);for(let o of e.rows)t.push(Vr(o));return `<w:tbl>${t.join("")}</w:tbl>`}var X={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function Wr(){let e={wpc:X.wpc,mc:X.mc,o:X.o,r:X.r,m:X.m,v:X.v,wp14:X.wp14,wp:X.wp,w10:X.w10,w:X.w,w14:X.w14,w15:X.w15,wpg:X.wpg,wps:X.wps};return Object.entries(e).map(([t,n])=>`xmlns:${t}="${n}"`).join(" ")}function ye(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${d(e.size)}"`),e.space!==void 0&&n.push(`w:space="${d(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function Ur(e){return `<w:headerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function Zr(e){return `<w:footerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function Gr(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:footnotePr>${t.join("")}</w:footnotePr>`}function Jr(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:endnotePr>${t.join("")}</w:endnotePr>`}function Yr(e){let t=[];return e.pageWidth!==void 0&&t.push(`w:w="${d(e.pageWidth)}"`),e.pageHeight!==void 0&&t.push(`w:h="${d(e.pageHeight)}"`),e.orientation==="landscape"&&t.push('w:orient="landscape"'),t.length===0?"":`<w:pgSz ${t.join(" ")}/>`}function qr(e){let t=[];return e.marginTop!==void 0&&t.push(`w:top="${d(e.marginTop)}"`),e.marginRight!==void 0&&t.push(`w:right="${d(e.marginRight)}"`),e.marginBottom!==void 0&&t.push(`w:bottom="${d(e.marginBottom)}"`),e.marginLeft!==void 0&&t.push(`w:left="${d(e.marginLeft)}"`),e.headerDistance!==void 0&&t.push(`w:header="${d(e.headerDistance)}"`),e.footerDistance!==void 0&&t.push(`w:footer="${d(e.footerDistance)}"`),e.gutter!==void 0&&t.push(`w:gutter="${d(e.gutter)}"`),t.length===0?"":`<w:pgMar ${t.join(" ")}/>`}function Kr(e){if(!e.columnCount&&!e.columns?.length)return "";let t=[];e.columnCount!==void 0&&e.columnCount>1&&t.push(`w:num="${d(e.columnCount)}"`),e.columnSpace!==void 0&&t.push(`w:space="${d(e.columnSpace)}"`),e.equalWidth!==void 0&&t.push(`w:equalWidth="${e.equalWidth?"1":"0"}"`),e.separator&&t.push('w:sep="1"');let n="";return e.columns&&e.columns.length>0&&(n=e.columns.map(o=>{let i=[];return o.width!==void 0&&i.push(`w:w="${d(o.width)}"`),o.space!==void 0&&i.push(`w:space="${d(o.space)}"`),`<w:col ${i.join(" ")}/>`}).join("")),t.length===0&&!n?"":`<w:cols${t.length>0?" "+t.join(" "):""}>${n}</w:cols>`}function Qr(e){if(!e.lineNumbers)return "";let t=e.lineNumbers,n=[];return t.countBy!==void 0&&n.push(`w:countBy="${d(t.countBy)}"`),t.start!==void 0&&n.push(`w:start="${d(t.start)}"`),t.distance!==void 0&&n.push(`w:distance="${d(t.distance)}"`),t.restart&&n.push(`w:restart="${t.restart}"`),n.length===0?"":`<w:lnNumType ${n.join(" ")}/>`}function eo(e){if(!e.pageBorders)return "";let t=e.pageBorders,n=[],r=[];if(t.display&&n.push(`w:display="${t.display}"`),t.offsetFrom&&n.push(`w:offsetFrom="${t.offsetFrom}"`),t.zOrder&&n.push(`w:zOrder="${t.zOrder}"`),t.top){let i=ye(t.top,"top");i&&r.push(i);}if(t.left){let i=ye(t.left,"left");i&&r.push(i);}if(t.bottom){let i=ye(t.bottom,"bottom");i&&r.push(i);}if(t.right){let i=ye(t.right,"right");i&&r.push(i);}return r.length===0?"":`<w:pgBorders${n.length>0?" "+n.join(" "):""}>${r.join("")}</w:pgBorders>`}function to(e){if(!e.docGrid)return "";let t=e.docGrid,n=[];return t.type&&n.push(`w:type="${t.type}"`),t.linePitch!==void 0&&n.push(`w:linePitch="${t.linePitch}"`),t.charSpace!==void 0&&n.push(`w:charSpace="${t.charSpace}"`),n.length===0?"":`<w:docGrid ${n.join(" ")}/>`}function no(e){if(!e)return "";let t=[];if(e.headerReferences)for(let m of e.headerReferences)t.push(Ur(m));if(e.footerReferences)for(let m of e.footerReferences)t.push(Zr(m));let n=Gr(e.footnotePr);n&&t.push(n);let r=Jr(e.endnotePr);r&&t.push(r),e.sectionStart&&t.push(`<w:type w:val="${e.sectionStart}"/>`);let o=Yr(e);o&&t.push(o);let i=qr(e);if(i&&t.push(i),e.paperSrcFirst!==void 0||e.paperSrcOther!==void 0){let m=[];e.paperSrcFirst!==void 0&&m.push(`w:first="${e.paperSrcFirst}"`),e.paperSrcOther!==void 0&&m.push(`w:other="${e.paperSrcOther}"`),t.push(`<w:paperSrc ${m.join(" ")}/>`);}let s=eo(e);s&&t.push(s);let a=Qr(e);a&&t.push(a);let l=Kr(e);l&&t.push(l);let u=to(e);return u&&t.push(u),e.verticalAlign&&t.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.bidi&&t.push("<w:bidi/>"),e.titlePg&&t.push("<w:titlePg/>"),e.evenAndOddHeaders&&t.push("<w:evenAndOddHeaders/>"),t.length===0?"":`<w:sectPr>${t.join("")}</w:sectPr>`}function on(e){if(e.type==="paragraph")return G(e);if(e.type==="table")return ie(e);if(e.type==="blockSdt"){let t=e.content.map(o=>on(o)).join(""),n=e.properties,r=[];return n.alias&&r.push(`<w:alias w:val="${n.alias}"/>`),n.tag&&r.push(`<w:tag w:val="${n.tag}"/>`),`<w:sdt><w:sdtPr>${r.join("")}</w:sdtPr><w:sdtContent>${t}</w:sdtContent></w:sdt>`}return ""}function ro(e){return e.map(t=>on(t)).join("")}function oo(e){let t=[];return t.push(ro(e.content)),e.finalSectionProperties&&t.push(no(e.finalSectionProperties)),t.join("")}function xe(e){zt();let t=[];t.push('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>');let n=Wr();return t.push(`<w:document ${n} mc:Ignorable="w14 w15 wp14">`),t.push("<w:body>"),t.push(oo(e.package.document)),t.push("</w:body>"),t.push("</w:document>"),t.join("")}var $e=chunkH5NTJZO4_js.c(chunkIFPN3NT3_js.a());var io={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function so(){return Object.entries(io).map(([e,t])=>`xmlns:${e}="${t}"`).join(" ")}function ao(e){return e.type==="paragraph"?G(e):e.type==="table"?ie(e):""}function sn(e){let t=e.type==="header"?"w:hdr":"w:ftr",n=so(),r=e.content.map(o=>ao(o)).join("");return r||(r="<w:p><w:pPr/></w:p>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
-
<${t} ${n}>${r}</${t}>`}var be='xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"',Te='mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"';function un(e){let t="<w:r>",n=[];e.formatting?.bold&&n.push("<w:b/>"),e.formatting?.italic&&n.push("<w:i/>"),n.length>0&&(t+=`<w:rPr>${n.join("")}</w:rPr>`);for(let r of e.content)if(r.type==="text"){let o=r.text!==r.text.trim()||r.text.includes(" ");t+=o?`<w:t xml:space="preserve">${w(r.text)}</w:t>`:`<w:t>${w(r.text)}</w:t>`;}else r.type==="break"&&(t+="<w:br/>");return t+="</w:r>",t}function an(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";for(let r of e.content)r.type==="run"&&(n+=un(r));return n+="</w:p>",n}function ln(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";n+='<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r>';for(let r of e.content)r.type==="run"&&(n+=un(r));return n+="</w:p>",n}function cn(e,t){let n=chunkB45ECEGY_js.a(),r=[`w:id="${e.id}"`];if(e.author&&r.push(`w:author="${w(e.author)}"`),e.initials?r.push(`w:initials="${w(e.initials)}"`):r.push('w:initials=""'),e.date){let i=e.date.replace(/\.\d{3}Z$/,"Z");r.push(`w:date="${w(i)}"`);}let o=`<w:comment ${r.join(" ")}>`;if(e.content&&e.content.length>0)if(e.content.length===1)o+=ln(e.content[0],n);else {o+=ln(e.content[0]);for(let i=1;i<e.content.length-1;i++)o+=an(e.content[i]);o+=an(e.content[e.content.length-1],n);}else o+=`<w:p w14:paraId="${n}"><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>`;return o+="</w:comment>",t.push({commentId:e.id,lastParaId:n,durableId:chunkB45ECEGY_js.a(),parentId:e.parentId,done:e.done}),o}function ve(e){if(!e||e.length===0)return {xml:"",paraInfos:[]};let t=[],n=[];for(let i of e)(i.parentId==null?t:n).push(i);let r=[],o=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${be} ${Te}>`;for(let i of t)o+=cn(i,r);for(let i of n)o+=cn(i,r);return o+="</w:comments>",{xml:o,paraInfos:r}}function Se(e){if(e.length===0)return "";let t=new Map;for(let r of e)t.set(r.commentId,r.lastParaId);let n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${be} ${Te}>`;for(let r of e){let o=`w15:paraId="${r.lastParaId}" w15:done="${r.done?"1":"0"}"`;if(r.parentId!=null){let i=t.get(r.parentId);i&&(o+=` w15:paraIdParent="${i}"`);}n+=`<w15:commentEx ${o} />`;}return n+="</w15:commentsEx>",n}function Ce(e){if(e.length===0)return "";let t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cid:commentsIds ${be} ${Te}>`;for(let n of e)t+=`<w16cid:commentId w16cid:paraId="${n.lastParaId}" w16cid:durableId="${n.durableId}" />`;return t+="</w16cid:commentsIds>",t}function Pe(e,t){if(e.length===0)return "";let n=new Map;for(let o of t)n.set(o.id,o);let r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cex:commentsExtensible ${be} ${Te}>`;for(let o of e){let i=n.get(o.commentId);if(!i?.date)continue;let s=o.durableId,a=(i.date.endsWith("Z")?i.date:i.date+"Z").replace(/\.\d{3}Z$/,"Z");r+=`<w16cex:commentExtensible w16cex:durableId="${s}" w16cex:dateUtc="${a}"/>`;}return r+="</w16cex:commentsExtensible>",r}function se(e){let t=0;for(let n of e.matchAll(/Id="rId(\d+)"/g)){let r=parseInt(n[1],10);r>t&&(t=r);}return t}async function lo(e,t,n){let r=e.package.document.comments;if(!r||r.length===0)return;let{xml:o,paraInfos:i}=ve(r);t.file("word/comments.xml",o,{compression:"DEFLATE",compressionOptions:{level:n}});let s=Se(i);s&&t.file("word/commentsExtended.xml",s,{compression:"DEFLATE",compressionOptions:{level:n}});let a=Ce(i);a&&t.file("word/commentsIds.xml",a,{compression:"DEFLATE",compressionOptions:{level:n}});let l=Pe(i,r);l&&t.file("word/commentsExtensible.xml",l,{compression:"DEFLATE",compressionOptions:{level:n}}),await To(t,n);}function pn(e){let t=[];for(let n of e)if(n.type==="paragraph"){for(let r of n.content)if(r.type==="run")for(let o of r.content)o.type==="drawing"&&o.image.src?.startsWith("data:")&&t.push(o.image);}else if(n.type==="table")for(let r of n.rows)for(let o of r.cells)t.push(...pn(o.content));return t}var co={"image/png":"png","image/jpeg":"jpeg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tiff","image/webp":"webp","image/svg+xml":"svg"};function uo(e){let t=e.match(/^data:([^;]+);base64,(.+)$/);if(!t)throw new Error("Invalid data URL");let n=atob(t[2]),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return {data:r.buffer,extension:co[t[1]]||"png"}}var po=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
3
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;function fn(e){return e.startsWith("/")?e.slice(1):`word/${e}`}function fo(e){let t=[{relsPath:"word/_rels/document.xml.rels",blocks:e.package.document.content}],n=e.package.relationships;if(!n)return t;let r=(o,i)=>{if(o)for(let[s,a]of o.entries()){let l=n.get(s);if(!l||l.type!==i||!l.target)continue;let m=fn(l.target).replace(/^word\//,"");t.push({relsPath:`word/_rels/${m}.rels`,blocks:a.content});}};return r(e.package.headers,chunkB45ECEGY_js.j.header),r(e.package.footers,chunkB45ECEGY_js.j.footer),t}async function ze(e,t){let n=e.file(t);return (n?await n.async("text"):po).replace(/<Relationships([^>]*)\/>/,"<Relationships$1></Relationships>")}async function mo(e,t,n){if(t.size===0)return;let r=e.file("[Content_Types].xml");if(!r)return;let o=await r.async("text"),i=false;for(let s of t)if(!o.includes(`Extension="${s}"`)){let a=So(s);o=o.replace("</Types>",`<Default Extension="${s}" ContentType="${a}"/></Types>`),i=true;}i&&e.file("[Content_Types].xml",o,{compression:"DEFLATE",compressionOptions:{level:n}});}function ho(e){let t=0;return e.forEach(n=>{let r=n.match(/^word\/media\/image(\d+)\./);if(r){let o=parseInt(r[1],10);o>t&&(t=o);}}),t}async function go(e,t,n){let r=ho(t),o=new Set;for(let{relsPath:i,blocks:s}of e){let a=pn(s);if(a.length===0)continue;let l=await ze(t,i),u=se(l),m=[];for(let g of a){let{data:x,extension:p}=uo(g.src);r++,u++;let y=`image${r}.${p}`,C=`rId${u}`;t.file(`word/media/${y}`,x,{compression:"DEFLATE",compressionOptions:{level:n}}),m.push(`<Relationship Id="${C}" Type="${chunkB45ECEGY_js.j.image}" Target="media/${y}"/>`),o.add(p),g.rId=C;}let h=l.replace("</Relationships>",m.join("")+"</Relationships>");t.file(i,h,{compression:"DEFLATE",compressionOptions:{level:n}});}await mo(t,o,n);}function mn(e){let t=[];for(let n of e)if(n.type==="paragraph")for(let r of n.content)r.type==="hyperlink"&&r.href&&!r.rId&&!r.anchor&&t.push(r);else if(n.type==="table")for(let r of n.rows)for(let o of r.cells)t.push(...mn(o.content));return t}async function wo(e,t,n){for(let{relsPath:r,blocks:o}of e){let i=mn(o);if(i.length===0)continue;let s=await ze(t,r),a=se(s),l=[];for(let m of i){a++;let h=`rId${a}`;l.push(`<Relationship Id="${h}" Type="${chunkB45ECEGY_js.j.hyperlink}" Target="${w(m.href)}" TargetMode="External"/>`),m.rId=h;}let u=s.replace("</Relationships>",l.join("")+"</Relationships>");t.file(r,u,{compression:"DEFLATE",compressionOptions:{level:n}});}}async function _e(e,t={}){if(!e.originalBuffer)throw new Error("Cannot repack document: no original buffer for round-trip. Use createDocx() for new documents.");let{compressionLevel:n=6,updateModifiedDate:r=true,modifiedBy:o}=t,i=e,s=await $e.default.loadAsync(e.originalBuffer),a=new $e.default;for(let[h,g]of Object.entries(s.files)){if(g.dir){a.folder(h.replace(/\/$/,""));continue}let x=await g.async("arraybuffer");a.file(h,x,{compression:"DEFLATE",compressionOptions:{level:n}});}let l=fo(i);await go(l,a,n),await wo(l,a,n);let u=xe(i);if(a.file("word/document.xml",u,{compression:"DEFLATE",compressionOptions:{level:n}}),vo(i,a,n),await bo(i,a,n),await lo(i,a,n),r){let h="docProps/core.xml",g=s.file(h);if(g){let x=await g.async("text"),p=Ze(x,{updateModifiedDate:r,modifiedBy:o});a.file(h,p,{compression:"DEFLATE",compressionOptions:{level:n}});}}return await a.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:n}})}var yo="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",xo="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",je="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",He="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",Ve="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",We="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";async function bo(e,t,n){let r=e.package.relationships;if(!r)return;let o=[];for(let[u,m]of r){if(!m.target)continue;let h=m.type===chunkB45ECEGY_js.j.header?yo:m.type===chunkB45ECEGY_js.j.footer?xo:null;h&&o.push({rId:u,target:m.target.replace(/^(\/?word\/)/,""),contentType:h,relType:m.type});}if(o.length===0)return;let i=t.file("[Content_Types].xml");if(i){let u=await i.async("text"),m=false;for(let{target:h,contentType:g}of o){let x=`/word/${h}`;u.includes(`PartName="${x}"`)||(u=u.replace("</Types>",`<Override PartName="${x}" ContentType="${g}"/></Types>`),m=true);}m&&t.file("[Content_Types].xml",u,{compression:"DEFLATE",compressionOptions:{level:n}});}let s="word/_rels/document.xml.rels",a=await ze(t,s),l=false;for(let{rId:u,relType:m,target:h}of o)a.includes(`Id="${u}"`)||(a=a.replace("</Relationships>",`<Relationship Id="${u}" Type="${m}" Target="${h}"/></Relationships>`),l=true);l&&t.file(s,a,{compression:"DEFLATE",compressionOptions:{level:n}});}async function To(e,t){let n=[{partName:"/word/comments.xml",contentType:je,target:"comments.xml",relType:chunkB45ECEGY_js.j.comments},{partName:"/word/commentsExtended.xml",contentType:He,target:"commentsExtended.xml",relType:chunkB45ECEGY_js.j.commentsExtended},{partName:"/word/commentsIds.xml",contentType:Ve,target:"commentsIds.xml",relType:chunkB45ECEGY_js.j.commentsIds},{partName:"/word/commentsExtensible.xml",contentType:We,target:"commentsExtensible.xml",relType:chunkB45ECEGY_js.j.commentsExtensible}],r=e.file("[Content_Types].xml");if(r){let s=await r.async("text"),a=false;for(let{partName:l,contentType:u}of n)s.includes(l)||(s=s.replace("</Types>",`<Override PartName="${l}" ContentType="${u}"/></Types>`),a=true);a&&e.file("[Content_Types].xml",s,{compression:"DEFLATE",compressionOptions:{level:t}});}let o="word/_rels/document.xml.rels",i=e.file(o);if(i){let s=await i.async("text"),a=false;for(let{target:l,relType:u}of n)if(!s.includes(l)){let m=`rId${se(s)+1}`;s=s.replace("</Relationships>",`<Relationship Id="${m}" Type="${u}" Target="${l}"/></Relationships>`),a=true;}a&&e.file(o,s,{compression:"DEFLATE",compressionOptions:{level:t}});}}async function dn(e,t,n={}){let{compressionLevel:r=6}=n;for(let[o,i]of t)e.file(o,i,{compression:"DEFLATE",compressionOptions:{level:r}});return e.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:r}})}function Ue(e){let t=new Map,n=e.package.relationships;if(!n)return t;let r=[{map:e.package.headers,type:chunkB45ECEGY_js.j.header},{map:e.package.footers,type:chunkB45ECEGY_js.j.footer}];for(let{map:o,type:i}of r)if(o)for(let[s,a]of o.entries()){let l=n.get(s);l&&l.type===i&&l.target&&t.set(fn(l.target),sn(a));}return t}function vo(e,t,n){let r={level:n};for(let[o,i]of Ue(e))t.file(o,i,{compression:"DEFLATE",compressionOptions:r});}function Ze(e,t){let n=e;if(t.updateModifiedDate){let r=new Date().toISOString();n.includes("<dcterms:modified")?n=n.replace(/<dcterms:modified[^>]*>[^<]*<\/dcterms:modified>/,`<dcterms:modified xsi:type="dcterms:W3CDTF">${r}</dcterms:modified>`):n=n.replace("</cp:coreProperties>",`<dcterms:modified xsi:type="dcterms:W3CDTF">${r}</dcterms:modified></cp:coreProperties>`);}return t.modifiedBy&&(n.includes("<cp:lastModifiedBy")?n=n.replace(/<cp:lastModifiedBy>[^<]*<\/cp:lastModifiedBy>/,`<cp:lastModifiedBy>${w(t.modifiedBy)}</cp:lastModifiedBy>`):n=n.replace("</cp:coreProperties>",`<cp:lastModifiedBy>${w(t.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)),n}function So(e,t){return {png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp",wmf:"image/x-wmf",emf:"image/x-emf"}[e]||"application/octet-stream"}async function Co(){let e=new $e.default;e.file("[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4
|
-
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
|
5
|
-
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
|
|
6
|
-
<Default Extension="xml" ContentType="application/xml"/>
|
|
7
|
-
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
|
|
8
|
-
<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
|
|
9
|
-
<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
|
|
10
|
-
<Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
|
|
11
|
-
</Types>`),e.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
12
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
13
|
-
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
|
|
14
|
-
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
|
|
15
|
-
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
|
|
16
|
-
</Relationships>`),e.file("word/_rels/document.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
17
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
18
|
-
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
|
|
19
|
-
</Relationships>`),e.file("word/document.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
20
|
-
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
|
|
21
|
-
<w:body>
|
|
22
|
-
<w:p>
|
|
23
|
-
<w:r>
|
|
24
|
-
<w:t></w:t>
|
|
25
|
-
</w:r>
|
|
26
|
-
</w:p>
|
|
27
|
-
<w:sectPr>
|
|
28
|
-
<w:pgSz w:w="12240" w:h="15840"/>
|
|
29
|
-
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
|
|
30
|
-
</w:sectPr>
|
|
31
|
-
</w:body>
|
|
32
|
-
</w:document>`),e.file("word/styles.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
33
|
-
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
|
34
|
-
<w:docDefaults>
|
|
35
|
-
<w:rPrDefault>
|
|
36
|
-
<w:rPr>
|
|
37
|
-
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
|
|
38
|
-
<w:sz w:val="22"/>
|
|
39
|
-
</w:rPr>
|
|
40
|
-
</w:rPrDefault>
|
|
41
|
-
<w:pPrDefault>
|
|
42
|
-
<w:pPr>
|
|
43
|
-
<w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
|
|
44
|
-
</w:pPr>
|
|
45
|
-
</w:pPrDefault>
|
|
46
|
-
</w:docDefaults>
|
|
47
|
-
<w:style w:type="paragraph" w:default="1" w:styleId="Normal">
|
|
48
|
-
<w:name w:val="Normal"/>
|
|
49
|
-
</w:style>
|
|
50
|
-
</w:styles>`);let t=new Date().toISOString();return e.file("docProps/core.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
51
|
-
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
52
|
-
<dc:creator>EigenPal DOCX Editor</dc:creator>
|
|
53
|
-
<dcterms:created xsi:type="dcterms:W3CDTF">${t}</dcterms:created>
|
|
54
|
-
<dcterms:modified xsi:type="dcterms:W3CDTF">${t}</dcterms:modified>
|
|
55
|
-
</cp:coreProperties>`),e.file("docProps/app.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
56
|
-
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
|
|
57
|
-
<Application>EigenPal DOCX Editor</Application>
|
|
58
|
-
<AppVersion>1.0.0</AppVersion>
|
|
59
|
-
</Properties>`),e.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:6}})}async function hn(e){let t=await Co(),n={...e,originalBuffer:t};return _e(n)}function yn(e,t){let n=Fo(t),r=new RegExp(`<w:p[\\s][^>]*w14:paraId="${n}"`,"g"),o=[],i;for(;(i=r.exec(e))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let s=o[0],a=s,l=0;for(;a<e.length;){let u=e.indexOf("<",a);if(u===-1)break;if(e.startsWith("<w:p",u)){let m=e[u+4];if(m===">"||m===" "||m==="/"){let h=e.indexOf(">",u);if(h===-1)break;if(e[h-1]==="/"){if(l===0)return {start:s,end:h+1};a=h+1;}else l++,a=h+1;}else a=u+1;}else if(e.startsWith("</w:p>",u)){if(l--,l===0)return {start:s,end:u+6};a=u+6;}else a=u+1;}return null}function Po(e,t){let n=yn(e,t);return n?e.substring(n.start,n.end):null}function gn(e){let t=0,n=/<w:p[\s>]/g,r;for(;(r=n.exec(e))!==null;){let o=r.index,i=e[o+4];(i===">"||i===" ")&&t++;}return t}function wn(e){let t=new Map,n=/w14:paraId="([^"]+)"/g,r;for(;(r=n.exec(e))!==null;){let o=r[1];t.set(o,(t.get(o)||0)+1);}return t}function $o(e,t,n){if(n.size===0)return {safe:true};let r=wn(e),o=wn(t);for(let a of n){let l=r.get(a)||0;if(l===0)return {safe:false,reason:`paraId-not-found-in-original: ${a}`};if(l>1)return {safe:false,reason:`duplicate-paraId-in-original: ${a}`}}for(let a of n){let l=o.get(a)||0;if(l===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${a}`};if(l>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${a}`}}let i=gn(e),s=gn(t);return i!==s?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${s}`}:{safe:true}}function xn(e,t,n){if(n.size===0)return e;if(!$o(e,t,n).safe)return null;let o=[];for(let s of n){let a=yn(e,s);if(!a)return null;let l=Po(t,s);if(!l)return null;o.push({start:a.start,end:a.end,newXml:l});}o.sort((s,a)=>a.start-s.start);let i=e;for(let{start:s,end:a,newXml:l}of o)i=i.substring(0,s)+l+i.substring(a);return i}function Fo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bn(e){for(let t of e)if(t.type==="paragraph"){for(let n of t.content)if(n.type==="run"){for(let r of n.content)if(r.type==="drawing"&&r.image?.src?.startsWith("data:")&&!r.image?.rId)return true}else if(n.type==="hyperlink"&&n.href&&!n.rId&&!n.anchor)return true}else if(t.type==="table"){for(let n of t.rows)for(let r of n.cells)if(bn(r.content))return true}return false}async function Tn(e,t,n){let{changedParaIds:r,structuralChange:o,hasUntrackedChanges:i}=n;if(o||i||!t)return null;let s=e.package.document.content;if(bn(s))return null;let a=e.package.document.comments,l=a&&a.length>0,u=Ue(e);try{let h=await(await import('./lib-U35UU4OU.js')).default.loadAsync(t),g=new Map;if(r.size>0){let p=h.file("word/document.xml");if(!p)return null;let y=await p.async("text"),C=xe(e),E=xn(y,C,r);if(!E)return null;g.set("word/document.xml",E);}if(l){let{xml:p,paraInfos:y}=ve(a);g.set("word/comments.xml",p);let C=Se(y);C&&g.set("word/commentsExtended.xml",C);let E=Ce(y);E&&g.set("word/commentsIds.xml",E);let D=Pe(y,a);D&&g.set("word/commentsExtensible.xml",D);let A=h.file("[Content_Types].xml");if(A){let P=g.get("[Content_Types].xml")??await A.async("text"),I=!1,B=[["/word/comments.xml",je],["/word/commentsExtended.xml",He],["/word/commentsIds.xml",Ve],["/word/commentsExtensible.xml",We]];for(let[R,k]of B)P.includes(R)||(P=P.replace("</Types>",`<Override PartName="${R}" ContentType="${k}"/></Types>`),I=!0);I&&g.set("[Content_Types].xml",P);}let v="word/_rels/document.xml.rels",b=h.file(v);if(b){let P=g.get(v)??await b.async("text"),I=!1,B=[["comments.xml",chunkB45ECEGY_js.j.comments],["commentsExtended.xml",chunkB45ECEGY_js.j.commentsExtended],["commentsIds.xml",chunkB45ECEGY_js.j.commentsIds],["commentsExtensible.xml",chunkB45ECEGY_js.j.commentsExtensible]];for(let[R,k]of B)if(!P.includes(R)){let N=se(P);P=P.replace("</Relationships>",`<Relationship Id="rId${N+1}" Type="${k}" Target="${R}"/></Relationships>`),I=!0;}I&&g.set(v,P);}}for(let[p,y]of u)g.set(p,y);let x=h.file("docProps/core.xml");if(x){let p=await x.async("text");g.set("docProps/core.xml",Ze(p,{updateModifiedDate:!0}));}return await dn(h,g)}catch{return null}}function Cn(e){return Io(e).variables}function Io(e){let t=[],n={body:[],headers:[],footers:[],footnotes:[],endnotes:[],textBoxes:[]};if(e.package?.document){let o=Eo(e.package.document);o.forEach(i=>{t.push({name:i,location:"body"});}),n.body=Array.from(new Set(o)).sort();}if(e.package?.document?.sections&&e.package.document.sections.forEach((o,i)=>{o.properties.headerReferences&&o.properties.headerReferences.forEach(s=>{});}),e.package?.footnotes){let o=Sn(e.package.footnotes);o.forEach(i=>{t.push({name:i,location:"footnote"});}),n.footnotes=Array.from(new Set(o)).sort();}if(e.package?.endnotes){let o=Sn(e.package.endnotes);o.forEach(i=>{t.push({name:i,location:"endnote"});}),n.endnotes=Array.from(new Set(o)).sort();}e.templateVariables&&e.templateVariables.forEach(o=>{t.some(i=>i.name===o)||t.push({name:o,location:"body"});});let r=new Set;return t.forEach(o=>r.add(o.name)),{variables:Array.from(r).sort(),totalOccurrences:t.length,byLocation:n,occurrences:t}}function Eo(e){let t=[];if(e.content&&t.push(...vn(e.content)),e.sections)for(let n of e.sections)n.content&&t.push(...vn(n.content));return t}function vn(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(...Ge(n)):n.type==="table"&&t.push(...Pn(n));return t}function Ge(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="run"?t.push(...ae(n)):n.type==="hyperlink"?t.push(...Ao(n)):n.type==="simpleField"?t.push(...Do(n)):n.type==="complexField"&&t.push(...Ro(n));return t}function ae(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="text"&&n.text&&t.push(...$n(n.text));return t}function Ao(e){let t=[];if(!e.children)return t;for(let n of e.children)n.type==="run"&&t.push(...ae(n));return t}function Do(e){let t=[];if(e.instruction&&t.push(...$n(e.instruction)),e.content)for(let n of e.content)n.type==="run"&&t.push(...ae(n));return t}function Ro(e){let t=[];if(e.fieldCode)for(let n of e.fieldCode)n.type==="run"&&t.push(...ae(n));if(e.fieldResult)for(let n of e.fieldResult)n.type==="run"&&t.push(...ae(n));return t}function Pn(e){let t=[];if(!e.rows)return t;for(let n of e.rows)if(n.cells)for(let r of n.cells)t.push(...ko(r));return t}function ko(e){let t=[];if(!e.content)return t;for(let n of e.content)n.type==="paragraph"?t.push(...Ge(n)):n.type==="table"&&t.push(...Pn(n));return t}function Sn(e){let t=[];for(let n of e)if(n.content)for(let r of n.content)r.type==="paragraph"&&t.push(...Ge(r));return t}var Bo=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function $n(e){if(!e)return [];let t=[],n=new RegExp(Bo),r;for(;(r=n.exec(e))!==null;)t.push(r[1]);return t}var Fn=class e{constructor(t){chunkH5NTJZO4_js.d(this,"_document");chunkH5NTJZO4_js.d(this,"_pendingVariables");t instanceof ArrayBuffer||ArrayBuffer.isView(t)?this._document={package:{document:{content:[]}},originalBuffer:t instanceof ArrayBuffer?t:t.buffer}:this._document=t,this._pendingVariables={};}static async fromBuffer(t){let n=await Ne(t);return new e(n)}static fromDocument(t){return new e(t)}getDocument(){return this._document}getText(){let t=this._document.package.document;return this._getBodyText(t)}getFormattedText(){let t=[],n=this._document.package.document;for(let r of n.content)r.type==="paragraph"&&this._extractParagraphSegments(r,t);return t}getVariables(){return Cn(this._document)}getStyles(){let t=this._document.package.styles;if(!t?.styles)return [];let n=[];for(let[r,o]of Object.entries(t.styles))if(typeof o=="object"&&o!==null){let i=o;n.push({id:r,name:i.name||r,type:i.type==="numbering"?"paragraph":i.type||"paragraph",builtIn:i.default});}return n}getPageCount(){let t=this.getWordCount();return Math.max(1,Math.ceil(t/500))}getWordCount(){return this.getText().split(/\s+/).filter(r=>r.length>0).length}getCharacterCount(t=true){let n=this.getText();return t?n.length:n.replace(/\s/g,"").length}getParagraphCount(){return this._document.package.document.content.filter(t=>t.type==="paragraph").length}getTableCount(){return this._document.package.document.content.filter(t=>t.type==="table").length}getAgentContext(t=100){let n=this._document.package.document,r=n.content.filter(s=>s.type==="paragraph"),o=r.map((s,a)=>{let l=this._getParagraphText(s),u=s.formatting?.styleId;return {index:a,preview:l.slice(0,t),style:u,isHeading:u?.toLowerCase().includes("heading")||false,headingLevel:this._parseHeadingLevel(u),isListItem:!!s.listRendering,isEmpty:l.trim().length===0}}),i=(n.sections||[]).map((s,a)=>({index:a,paragraphCount:s.content?.length||0,pageSize:s.properties?.pageWidth&&s.properties?.pageHeight?{width:s.properties.pageWidth,height:s.properties.pageHeight}:void 0,isLandscape:s.properties?.orientation==="landscape",hasHeader:!!s.properties?.headerReferences?.length,hasFooter:!!s.properties?.footerReferences?.length}));return {paragraphCount:r.length,wordCount:this.getWordCount(),characterCount:this.getCharacterCount(),variables:this.getVariables(),variableCount:this.getVariables().length,availableStyles:this.getStyles(),outline:o,sections:i,hasTables:this.getTableCount()>0,hasImages:this._hasImages(),hasHyperlinks:this._hasHyperlinks()}}insertText(t,n,r={}){let o={type:"insertText",position:t,text:n,formatting:r.formatting};return this._executeCommand(o)}replaceRange(t,n,r={}){let o={type:"replaceText",range:t,text:n,formatting:r.formatting};return this._executeCommand(o)}deleteRange(t){let n={type:"deleteText",range:t};return this._executeCommand(n)}applyFormatting(t,n){let r={type:"formatText",range:t,formatting:n};return this._executeCommand(r)}applyStyle(t,n){let r={type:"applyStyle",paragraphIndex:t,styleId:n};return this._executeCommand(r)}applyParagraphFormatting(t,n){let r={type:"formatParagraph",paragraphIndex:t,formatting:n};return this._executeCommand(r)}insertTable(t,n,r,o={}){let i={type:"insertTable",position:t,rows:n,columns:r,data:o.data,hasHeader:o.hasHeader};return this._executeCommand(i)}insertImage(t,n,r={}){let o={type:"insertImage",position:t,src:n,width:r.width,height:r.height,alt:r.alt};return this._executeCommand(o)}insertHyperlink(t,n,r={}){let o={type:"insertHyperlink",range:t,url:n,displayText:r.displayText,tooltip:r.tooltip};return this._executeCommand(o)}removeHyperlink(t){let n={type:"removeHyperlink",range:t};return this._executeCommand(n)}insertParagraphBreak(t){let n={type:"insertParagraphBreak",position:t};return this._executeCommand(n)}mergeParagraphs(t,n){let r={type:"mergeParagraphs",paragraphIndex:t,count:n};return this._executeCommand(r)}setVariable(t,n){return this._pendingVariables[t]=n,this}setVariables(t){for(let[n,r]of Object.entries(t))this._pendingVariables[n]=r;return this}getPendingVariables(){return {...this._pendingVariables}}clearPendingVariables(){return this._pendingVariables={},this}async applyVariables(t){let n={...this._pendingVariables,...t};if(Object.keys(n).length===0)return this;let r=this._document.originalBuffer;if(!r)throw new Error("Cannot apply variables: no original buffer for processing");let{processTemplate:o}=await import('./processTemplate-BTBTR7AM.js'),i=o(r,n),s=await Ne(i),a=new e(s);return a._pendingVariables={},a}async toBuffer(t){if(this._document.originalBuffer){if(t?.selective){let r=await Tn(this._document,this._document.originalBuffer,t.selective);if(r)return this._document.originalBuffer=r,r}let n=await _e(this._document);return this._document.originalBuffer=n,n}return hn(this._document)}async toBlob(t="application/vnd.openxmlformats-officedocument.wordprocessingml.document"){let n=await this.toBuffer();return new Blob([n],{type:t})}executeCommands(t){return new e(chunkE6MQXELR_js.b(this._document,t))}_executeCommand(t){let n=new e(chunkE6MQXELR_js.a(this._document,t));return n._pendingVariables={...this._pendingVariables},n}_getBodyText(t){let n=[];for(let r of t.content)r.type==="paragraph"?n.push(this._getParagraphText(r)):r.type==="table"&&n.push(this._getTableText(r));return n.join(`
|
|
60
|
-
`)}_getParagraphText(t){let n=[];for(let r of t.content)r.type==="run"?n.push(this._getRunText(r)):r.type==="hyperlink"&&n.push(this._getHyperlinkText(r));return n.join("")}_getRunText(t){return t.content.filter(n=>n.type==="text").map(n=>n.text).join("")}_getHyperlinkText(t){let n=[];for(let r of t.children)r.type==="run"&&n.push(this._getRunText(r));return n.join("")}_getTableText(t){let n=[];for(let r of t.rows)for(let o of r.cells)for(let i of o.content)i.type==="paragraph"&&n.push(this._getParagraphText(i));return n.join(" ")}_extractParagraphSegments(t,n){for(let r of t.content)if(r.type==="run"){let o=this._getRunText(r);o&&n.push({text:o,formatting:r.formatting});}else if(r.type==="hyperlink"){let o=r.href||"";for(let i of r.children)if(i.type==="run"){let s=this._getRunText(i);s&&n.push({text:s,formatting:i.formatting,isHyperlink:true,hyperlinkUrl:o});}}}_parseHeadingLevel(t){if(!t)return;let n=t.match(/heading\s*(\d)/i);if(n)return parseInt(n[1],10)}_hasImages(){let t=this._document.package.document;for(let n of t.content)if(n.type==="paragraph"){for(let r of n.content)if(r.type==="run"){for(let o of r.content)if(o.type==="drawing")return true}}return false}_hasHyperlinks(){let t=this._document.package.document;for(let n of t.content)if(n.type==="paragraph"){for(let r of n.content)if(r.type==="hyperlink")return true}return false}};function fs(e,t){if(!t||!t.trim())return null;let n=null;return e.descendants((r,o)=>n!==null?false:r.attrs?.paraId===t&&r.isTextblock?(n=o,false):true),n}exports.a=Ne;exports.b=Fn;exports.c=fs;exports.d=ue;exports.e=mt;exports.f=dt;exports.g=ht;exports.h=gt;exports.i=wt;exports.j=yt;exports.k=xt;exports.l=bt;exports.m=Tt;exports.n=pe;exports.o=De;exports.p=Ct;exports.q=fe;exports.r=Pt;exports.s=me;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as executeCommand,b as executeCommands}from'./chunk-ONNHQWAX.mjs';import'./chunk-FWPVBFKQ.mjs';import'./chunk-TAUMSKRE.mjs';
|