@eigenpal/docx-editor-core 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.mts +42 -6
- package/dist/agent/index.d.ts +42 -6
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-2EQGBVPV.js +2 -0
- package/dist/chunk-2XP6GLA4.mjs +1 -0
- package/dist/{chunk-CTHHUJAB.mjs → chunk-44JKHPGF.mjs} +1 -1
- package/dist/{chunk-J4J2Y6EU.js → chunk-4QEETB7U.js} +2 -2
- package/dist/{chunk-GFDIPDJ6.mjs → chunk-5BLQHXWK.mjs} +1 -1
- package/dist/{chunk-UOQT6A7P.js → chunk-5M7TI6TV.js} +1 -1
- package/dist/chunk-6JKM7TWJ.mjs +1 -0
- package/dist/{chunk-7Z2AGPNQ.mjs → chunk-7BVHKWEW.mjs} +1 -1
- package/dist/chunk-7OW3VCZE.mjs +1 -0
- package/dist/chunk-7ZN4WI5N.mjs +4 -0
- package/dist/{chunk-GY5BWVM7.js → chunk-AMB6Y77B.js} +1 -1
- package/dist/{chunk-H42RXHT4.js → chunk-BXWOLARZ.js} +1 -1
- package/dist/chunk-C45EFOVP.js +1 -0
- package/dist/chunk-CCPBNE2F.mjs +2 -0
- package/dist/{chunk-5CDBSK2R.mjs → chunk-D62KS7QG.mjs} +1 -1
- package/dist/chunk-DI6CRWSW.mjs +1 -0
- package/dist/chunk-EQAORQC3.mjs +1 -0
- package/dist/chunk-FO6IX2DB.js +6 -0
- package/dist/chunk-FW23IMBF.mjs +1 -0
- package/dist/{chunk-BGE57OES.js → chunk-FYKRDDKG.js} +1 -1
- package/dist/chunk-GSKMHXHG.js +1 -0
- package/dist/{chunk-MZ2XCZAN.mjs → chunk-GUQFNJHE.mjs} +1 -1
- package/dist/chunk-ICE6NC3S.mjs +1 -0
- package/dist/chunk-IFUED5ZS.mjs +1 -0
- package/dist/chunk-ISKTBM4L.js +1 -0
- package/dist/{chunk-73AZQWIE.js → chunk-IYKBX24M.js} +1 -1
- package/dist/chunk-KOEWROYV.mjs +6 -0
- package/dist/{chunk-IF4C25FN.mjs → chunk-KRN6YSR2.mjs} +1 -1
- package/dist/chunk-KZXZWGFX.mjs +1 -0
- package/dist/chunk-L24C5TEX.mjs +1 -0
- package/dist/chunk-L72YAV5N.js +3 -0
- package/dist/chunk-LK6I3HMH.mjs +0 -0
- package/dist/chunk-LWH66Q7Q.js +1 -0
- package/dist/{chunk-ONRBRDIC.mjs → chunk-MERJFGEP.mjs} +1 -1
- package/dist/chunk-PVAVS3IU.js +1 -0
- package/dist/{chunk-OUEKNYX5.mjs → chunk-QKLY4F2J.mjs} +1 -1
- package/dist/{chunk-LCICADWM.js → chunk-QYF7BRG3.js} +1 -1
- package/dist/chunk-ROG4MNOR.js +4 -0
- package/dist/{chunk-LOCW6MR2.js → chunk-RORPREG3.js} +1 -1
- package/dist/{chunk-HV6HE6YR.js → chunk-SZIOF5SG.js} +3 -3
- package/dist/{chunk-W7GLQ6DV.js → chunk-THLJYXFB.js} +1 -1
- package/dist/{chunk-25KY5HLN.js → chunk-U4WUDHDK.js} +1 -1
- package/dist/{chunk-KGDXHUYC.js → chunk-U4XMGWF7.js} +1 -1
- package/dist/chunk-U67MWOPZ.mjs +1 -0
- package/dist/chunk-VMRUBLPI.js +1 -0
- package/dist/chunk-WLDI6N3B.mjs +3 -0
- package/dist/chunk-WVERBZZU.js +1 -0
- package/dist/chunk-XCKTBNKN.js +1 -0
- package/dist/chunk-Z5MJYQSD.mjs +1 -0
- package/dist/chunk-ZBFNOJGY.js +1 -0
- package/dist/{content-5Mrz6w_b.d.mts → content-CE-ZdMwG.d.mts} +167 -109
- package/dist/{content-CmqAwdFL.d.ts → content-CYXJ2tfQ.d.ts} +167 -109
- package/dist/contentControlValues-DAwTWfgR.d.mts +187 -0
- package/dist/contentControlValues-gyVPsi6m.d.ts +187 -0
- package/dist/core-plugins.d.mts +1 -1
- package/dist/core-plugins.d.ts +1 -1
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +6 -6
- package/dist/core.d.ts +6 -6
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{documentSerializer-DgO3A9av.d.mts → documentSerializer-Bghq9rFI.d.mts} +1 -1
- package/dist/{documentSerializer-BRaaXIHm.d.ts → documentSerializer-C4lFC60P.d.ts} +1 -1
- package/dist/documentStyles-D87dxl18.d.mts +34 -0
- package/dist/documentStyles-DToJv9co.d.ts +34 -0
- package/dist/docx/index.d.mts +1 -1
- package/dist/docx/index.d.ts +1 -1
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +1 -1
- package/dist/docx/parser.d.ts +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +1 -1
- package/dist/docx/rezip.d.ts +1 -1
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +2 -2
- package/dist/docx/serializer/index.d.ts +2 -2
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/{fontLoader-CK2QLq68.d.ts → fontLoader-Cm02v7PO.d.ts} +1 -1
- package/dist/{fontLoader-8b4X-AIh.d.mts → fontLoader-Z7pqeNvZ.d.mts} +1 -1
- package/dist/{headerFooterLayout-Ca4ESDHF.d.ts → headerFooterLayout-Bd58Tum3.d.ts} +1 -1
- package/dist/{headerFooterLayout-72Vz7yp3.d.mts → headerFooterLayout-CuIJiIzi.d.mts} +1 -1
- package/dist/headless.d.mts +5 -4
- package/dist/headless.d.ts +5 -4
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +2 -2
- package/dist/layout-bridge/index.d.ts +2 -2
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +1 -1
- package/dist/layout-bridge/measuring/index.d.ts +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.mts +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.ts +1 -1
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +2 -2
- package/dist/layout-engine/index.d.ts +2 -2
- package/dist/layout-engine/types.d.mts +31 -2
- package/dist/layout-engine/types.d.ts +31 -2
- package/dist/layout-painter/index.d.mts +4 -3
- package/dist/layout-painter/index.d.ts +4 -3
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +27 -3
- package/dist/layout-painter/renderPage.d.ts +27 -3
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +1 -1
- package/dist/managers/AutoSaveManager.d.ts +1 -1
- package/dist/managers/TableSelectionManager.d.mts +1 -1
- package/dist/managers/TableSelectionManager.d.ts +1 -1
- package/dist/managers/types.d.mts +1 -1
- package/dist/managers/types.d.ts +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-CC_nwkT_.d.ts → nodes-BNkRKBBX.d.ts} +1 -1
- package/dist/{nodes-7753Bgi_.d.mts → nodes-Bz-UHhLE.d.mts} +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +2 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +2 -2
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +3 -3
- package/dist/prosemirror/conversion/index.d.ts +3 -3
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +147 -0
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +94 -6
- package/dist/prosemirror/index.d.ts +94 -6
- package/dist/prosemirror/index.js +3 -1
- package/dist/prosemirror/index.mjs +3 -1
- package/dist/prosemirror/plugins/index.d.mts +4 -1
- package/dist/prosemirror/plugins/index.d.ts +4 -1
- package/dist/prosemirror/plugins/index.js +1 -1
- package/dist/prosemirror/plugins/index.mjs +1 -1
- package/dist/prosemirror/schema/index.d.mts +2 -2
- package/dist/prosemirror/schema/index.d.ts +2 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +9 -0
- package/dist/prosemirror/styles/index.d.ts +9 -0
- package/dist/prosemirror/styles/index.js +1 -1
- package/dist/prosemirror/styles/index.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +1 -1
- package/dist/types/content.d.mts +1 -1
- package/dist/types/content.d.ts +1 -1
- package/dist/types/document.d.mts +2 -2
- package/dist/types/document.d.ts +2 -2
- package/dist/utils/comments.d.mts +1 -1
- package/dist/utils/comments.d.ts +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/{variableDetector-DF3-nxUC.d.mts → variableDetector-C7BLz9sJ.d.mts} +1 -1
- package/dist/{variableDetector-sBkgVh3f.d.ts → variableDetector-HPZbJ_gw.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-CA2EYL6T.mjs +0 -1
- package/dist/chunk-D4RPOJC7.js +0 -1
- package/dist/chunk-DLCDDB66.mjs +0 -3
- package/dist/chunk-F44ZLDZS.js +0 -4
- package/dist/chunk-FEWCI2E5.mjs +0 -1
- package/dist/chunk-FWTP7BN7.mjs +0 -4
- package/dist/chunk-GM4USWKO.js +0 -2
- package/dist/chunk-GWBVJZVT.js +0 -3
- package/dist/chunk-HMBVSDCH.mjs +0 -1
- package/dist/chunk-ILJUDEZ5.mjs +0 -1
- package/dist/chunk-IP2VXNWG.js +0 -1
- package/dist/chunk-IQG3KLWY.mjs +0 -2
- package/dist/chunk-KHF4JU7D.mjs +0 -1
- package/dist/chunk-LBKMYD3M.mjs +0 -1
- package/dist/chunk-MZOVDLYL.js +0 -1
- package/dist/chunk-NBLJPT54.mjs +0 -1
- package/dist/chunk-OAWTQ3IY.js +0 -1
- package/dist/chunk-OCAX2KJQ.js +0 -4
- package/dist/chunk-ONWOHAFW.mjs +0 -1
- package/dist/chunk-OX75Q5ZG.mjs +0 -1
- package/dist/chunk-Q4CKLXWA.js +0 -1
- package/dist/chunk-RFC2SXZ6.mjs +0 -4
- package/dist/chunk-RFVFX5WK.mjs +0 -1
- package/dist/chunk-V5VDCQDN.mjs +0 -1
- package/dist/chunk-VHUVPHPI.mjs +0 -1
- package/dist/chunk-VQWZHPWI.mjs +0 -1
- package/dist/chunk-X6HFDXKB.js +0 -1
- package/dist/chunk-Y3ZQQI4D.js +0 -1
- package/dist/chunk-YTDWMXNS.js +0 -1
- package/dist/chunk-ZUGNF5KU.js +0 -1
- /package/dist/{chunk-U74VPTIU.js → chunk-53VKL6CG.js} +0 -0
- /package/dist/{chunk-FDEDN2RC.mjs → chunk-DTTWBKGN.mjs} +0 -0
package/dist/chunk-LBKMYD3M.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-QPFJJPIC.mjs';import {e,f as f$1}from'./chunk-VW22RZ6C.mjs';function l(t){return !!t.wrap&&t.wrap.type!=="inline"}function c(t){let i=t.wrap?.type??"inline",e$1=t.wrap?.wrapText,a=t.position?.horizontal?.alignment;return {displayMode:s(i),cssFloat:d(i,e$1,a),wrapType:i,wrapText:e$1,anchorTarget:l(t)?"followingBlock":void 0,position:t.position?f(t.position):void 0,distTop:t.wrap?.distT!=null?e(t.wrap.distT):void 0,distBottom:t.wrap?.distB!=null?e(t.wrap.distB):void 0,distLeft:t.wrap?.distL!=null?e(t.wrap.distL):void 0,distRight:t.wrap?.distR!=null?e(t.wrap.distR):void 0}}function m(t){return t.anchorTarget==="followingBlock"||p(t)}function x(t){let i=t.position;if(!(!i?.horizontal&&!i?.vertical))return {horizontal:{relativeTo:i.horizontal?.relativeTo??"margin",alignment:i.horizontal?.align,posOffset:i.horizontal?.posOffset},vertical:{relativeTo:i.vertical?.relativeTo??"paragraph",alignment:i.vertical?.align,posOffset:i.vertical?.posOffset}}}function h(t){let i=t.wrapType??(t.displayMode==="float"?"square":"inline");if(!i||i==="inline")return;let e={type:i};return t.wrapText&&(e.wrapText=t.wrapText),t.distTop!=null&&(e.distT=f$1(t.distTop)),t.distBottom!=null&&(e.distB=f$1(t.distBottom)),t.distLeft!=null&&(e.distL=f$1(t.distLeft)),t.distRight!=null&&(e.distR=f$1(t.distRight)),e}function s(t){return t==="inline"?"inline":t==="topAndBottom"?"block":"float"}function p(t){return t.displayMode==="float"||a(t.wrapType)}function d(t,i,e){return t==="inline"||t==="topAndBottom"?"none":i==="left"?"right":i==="right"||e==="left"?"left":e==="right"?"right":"none"}function f(t){return {horizontal:t.horizontal?{relativeTo:t.horizontal.relativeTo,posOffset:t.horizontal.posOffset,align:t.horizontal.alignment}:void 0,vertical:t.vertical?{relativeTo:t.vertical.relativeTo,posOffset:t.vertical.posOffset,align:t.vertical.alignment}:void 0}}export{l as a,c as b,m as c,x as d,h as e};
|
package/dist/chunk-MZOVDLYL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkQ4CKLXWA_js=require('./chunk-Q4CKLXWA.js');function a(t,i){if(!i&&!t)return;if(!i)return t;if(!t)return {...i};let r={...t};for(let e of Object.keys(i)){let n=i[e];if(n!==void 0){if(e==="fontFamily"&&typeof n=="object"&&n!==null){r.fontFamily=chunkQ4CKLXWA_js.a(t.fontFamily,n);continue}if(e==="color"&&typeof n=="object"&&n!==null){let o=n,l=!!(o.rgb||o.themeColor||o.themeTint||o.themeShade);(!o.auto||l)&&(r.color=o);continue}if(typeof n=="object"&&n!==null&&!Array.isArray(n)){r[e]={...t[e]??{},...n};continue}r[e]=n;}}return r}exports.a=a;
|
package/dist/chunk-NBLJPT54.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-ILJUDEZ5.mjs';import {a}from'./chunk-QYUPLKLP.mjs';var y={styleId:"Normal",type:"paragraph",name:"Normal",default:true,pPr:{spaceAfter:160,lineSpacing:259,lineSpacingRule:"auto"}},s=class{constructor(t){a(this,"stylesById");a(this,"docDefaults");a(this,"defaultParagraphStyle");a(this,"defaultTableStyle");a(this,"defaultCharacterStyle");if(this.stylesById=new Map,this.docDefaults=t?.docDefaults,t?.styles)for(let e of t.styles)e.styleId&&this.stylesById.set(e.styleId,e);this.defaultParagraphStyle=this.findDefaultStyle("paragraph"),this.defaultTableStyle=this.findDefaultStyle("table"),this.defaultCharacterStyle=this.findDefaultStyle("character");}getStyle(t){return this.stylesById.get(t)}getParagraphStyles(){let t=[];for(let e of this.stylesById.values())e.type==="paragraph"&&!e.hidden&&!e.semiHidden&&t.push(e);return t.sort((e,r)=>{let a=e.uiPriority??99,n=r.uiPriority??99;return a!==n?a-n:(e.name??e.styleId).localeCompare(r.name??r.styleId)})}hasParagraphStyle(t){return this.stylesById.get(t)?.type==="paragraph"}resolveParagraphStyle(t){let e={};if(this.docDefaults?.pPr&&(e.paragraphFormatting={...this.docDefaults.pPr}),this.docDefaults?.rPr&&(e.runFormatting={...this.docDefaults.rPr}),!t)return this.defaultParagraphStyle&&this.mergeStyleIntoResult(e,this.defaultParagraphStyle),e;let r=this.stylesById.get(t);return r?(this.mergeStyleIntoResult(e,r),e):(this.defaultParagraphStyle&&this.mergeStyleIntoResult(e,this.defaultParagraphStyle),e)}getTableStyles(){let t=[];for(let e of this.stylesById.values())e.type==="table"&&!e.hidden&&!e.semiHidden&&t.push(e);return t.sort((e,r)=>{let a=e.uiPriority??99,n=r.uiPriority??99;return a!==n?a-n:(e.name??e.styleId).localeCompare(r.name??r.styleId)})}resolveRunStyle(t){let e={};if(this.docDefaults?.rPr&&(e={...this.docDefaults.rPr}),this.defaultCharacterStyle?.rPr&&(e=this.mergeTextFormatting(e,this.defaultCharacterStyle.rPr)??e),!t)return Object.keys(e).length>0?e:void 0;let r=this.stylesById.get(t);if(!r?.rPr)return Object.keys(e).length>0?e:void 0;let a=this.mergeTextFormatting(e,r.rPr);return a&&Object.keys(a).length>0?a:void 0}getRunStyleOwnProperties(t){if(!t)return;let e=this.stylesById.get(t);if(e?.rPr)return Object.keys(e.rPr).length>0?{...e.rPr}:void 0}getDocDefaults(){return this.docDefaults}getDefaultParagraphStyle(){return this.defaultParagraphStyle}getDefaultTableStyle(){return this.defaultTableStyle}getDefaultCharacterStyle(){return this.defaultCharacterStyle}hasStyle(t){return this.stylesById.has(t)}findDefaultStyle(t){for(let e of this.stylesById.values())if(e.type===t&&e.default)return e;if(t==="paragraph")return this.stylesById.get("Normal")??y}mergeStyleIntoResult(t,e){e.pPr&&(t.paragraphFormatting=this.mergeParagraphFormatting(t.paragraphFormatting,e.pPr)),e.rPr&&(t.runFormatting=this.mergeTextFormatting(t.runFormatting,e.rPr));}mergeParagraphFormatting(t,e){if(!e)return t;if(!t)return e?{...e}:void 0;let r={...t};for(let a of Object.keys(e)){let n=e[a];if(n!==void 0)if(a==="runProperties")r.runProperties=this.mergeTextFormatting(r.runProperties,e.runProperties);else if(a==="borders"||a==="numPr"||a==="frame"){let d=r[a],u=n;r[a]={...d||{},...u||{}};}else a==="tabs"&&Array.isArray(n)?r.tabs=[...n]:r[a]=n;}return r}mergeTextFormatting(t,e){return a$1(t,e)}};function f(l){return new s(l)}export{s as a,f as b};
|
package/dist/chunk-OAWTQ3IY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkGM4USWKO_js=require('./chunk-GM4USWKO.js');var t=new chunkGM4USWKO_js.q(chunkGM4USWKO_js.p());t.buildSchema();t.initializeRuntime();var s=t,n=t.getSchema();exports.a=s;exports.b=n;
|
package/dist/chunk-OCAX2KJQ.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
'use strict';function u(e){let t=[];for(let n of e.content)n.type==="run"?t.push(p(n)):n.type==="hyperlink"&&t.push(l(n));return t.join("")}function p(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function l(e){let t=[];for(let n of e.children)n.type==="run"&&t.push(p(n));return t.join("")}function h(e){let t=[];for(let n of e.rows)for(let r of n.cells)for(let o of r.content)o.type==="paragraph"&&t.push(u(o));return t.join(" ")}function m(e){let t=[];for(let n of e.content)n.type==="paragraph"?t.push(u(n)):n.type==="table"&&t.push(h(n));return t.join(`
|
|
2
|
-
`)}function g(e){return e.split(/\s+/).filter(n=>n.length>0).length}function b(e,t=true){return t?e.length:e.replace(/\s/g,"").length}function k(e){let t=0;for(let n of e.content)n.type==="paragraph"?t+=g(u(n)):n.type==="table"&&(t+=x(n));return t}function x(e){let t=0;for(let n of e.rows)for(let r of n.cells)for(let o of r.content)o.type==="paragraph"&&(t+=g(u(o)));return t}function P(e){let t=0;for(let n of e.content)n.type==="paragraph"?t+=u(n).length:n.type==="table"&&(t+=y(n));return t}function y(e){let t=0;for(let n of e.rows)for(let r of n.cells)for(let o of r.content)o.type==="paragraph"&&(t+=u(o).length);return t}function T(e,t,n){let r=[],o=0,c=e[t.paragraphIndex];if(c){let a=u(c).slice(0,t.offset);r.unshift(a),o+=a.length;}for(let f=t.paragraphIndex-1;f>=0&&o<n;f--){let a=e[f];if(!a)continue;let s=u(a);r.unshift(s),o+=s.length;}let i=r.join(`
|
|
3
|
-
`);return i.length>n?"..."+i.slice(-n):i}function B(e,t,n){let r=[],o=0,c=e[t.paragraphIndex];if(c){let a=u(c).slice(t.offset);r.push(a),o+=a.length;}for(let f=t.paragraphIndex+1;f<e.length&&o<n;f++){let a=e[f];if(!a)continue;let s=u(a);r.push(s),o+=s.length;}let i=r.join(`
|
|
4
|
-
`);return i.length>n?i.slice(0,n)+"...":i}function w(e,t){let n=0;for(let r of e.content)if(r.type==="run"){let o=p(r),c=n+o.length;if(t>=n&&t<c)return r.formatting||{};n=c;}else if(r.type==="hyperlink"){let o=l(r),c=n+o.length;if(t>=n&&t<c){for(let i of r.children)if(i.type==="run")return i.formatting||{}}n=c;}return {}}function D(e,t){let n=0;for(let r of e.content)if(r.type==="run"){let o=p(r);n+=o.length;}else if(r.type==="hyperlink"){let o=l(r),c=n,i=n+o.length;if(t>=c&&t<i)return true;n=i;}return false}function H(e,t){let n=0;for(let r of e.content)if(r.type==="run"){let o=p(r);n+=o.length;}else if(r.type==="hyperlink"){let o=l(r),c=n,i=n+o.length;if(t>=c&&t<i)return r;n=i;}}function I(e){return e?e.toLowerCase().includes("heading"):false}function j(e){if(!e)return;let t=e.match(/heading\s*(\d)/i);if(t)return parseInt(t[1],10)}function C(e){for(let t of e.content)if(t.type==="paragraph"){for(let n of t.content)if(n.type==="run"){for(let r of n.content)if(r.type==="drawing")return true}}return false}function A(e){for(let t of e.content)if(t.type==="paragraph"){for(let n of t.content)if(n.type==="hyperlink")return true}return false}function E(e){return e.content.some(t=>t.type==="table")}function d(e){return e.content.filter(t=>t.type==="paragraph")}function F(e,t){return d(e)[t]}function O(e,t){let n=0;for(let r=0;r<e.content.length;r++)if(e.content[r].type==="paragraph"){if(n===t)return r;n++;}return -1}exports.a=u;exports.b=p;exports.c=l;exports.d=h;exports.e=m;exports.f=g;exports.g=b;exports.h=k;exports.i=P;exports.j=T;exports.k=B;exports.l=w;exports.m=D;exports.n=H;exports.o=I;exports.p=j;exports.q=C;exports.r=A;exports.s=E;exports.t=d;exports.u=F;exports.v=O;
|
package/dist/chunk-ONWOHAFW.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {t,z}from'./chunk-RFVFX5WK.mjs';var O=30,F=200,y=24,R=10,B=10,C=24;function N(_){let{mouseX:n,mouseY:l,pagesContainer:d,target:L,hfEditMode:m,edgeProximity:r=O}=_,T=`.${t.table}`,H=`.${t.row}`,p=`.${t.cell}`,h=`.${z.header}`,M=`.${z.footer}`,E=t=>{let o=!!t.closest(h),e=!!t.closest(M);return !o&&!e?!m:o?m==="header":m==="footer"},c=L.closest(T);if(c&&!E(c)&&(c=null),!c){let t=d.querySelectorAll(T);for(let o of Array.from(t)){if(!E(o))continue;let e=o.getBoundingClientRect(),s=n>=e.left-r&&n<e.left,A=l>=e.top-r&&l<e.top,P=n>=e.left-r&&n<=e.right,I=l>=e.top-r&&l<=e.bottom;if(s&&I||A&&P){c=o;break}}}if(!c)return null;let i=c.getBoundingClientRect(),b=n<i.left+r&&n>=i.left-r,g=l<i.top+r&&l>=i.top-r;if(!b&&!g)return null;let u=c.querySelectorAll(`:scope > ${H}`);if(u.length===0)return null;let S=t=>t&&Number(t.dataset.pmStart)||0;if(b)for(let t=0;t<u.length;t++){let o=u[t].getBoundingClientRect();if(l>=o.top&&l<=o.bottom){let e=u[t].querySelector(p),s=S(e);if(!s)break;return {type:"row",clientX:i.left-y,clientY:o.top+o.height/2-R,cellPmPos:s}}}if(g){let t=u[0].querySelectorAll(`:scope > ${p}`);for(let o=0;o<t.length;o++){let e=t[o].getBoundingClientRect();if(n>=e.left&&n<=e.right){let s=S(t[o]);if(!s)break;return {type:"column",clientX:e.left+e.width/2-B,clientY:i.top-C,cellPmPos:s}}}}return null}export{O as a,F as b,N as c};
|
package/dist/chunk-OX75Q5ZG.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a,b as b$1}from'./chunk-CA2EYL6T.mjs';import {e}from'./chunk-VHUVPHPI.mjs';function y(e$1){return e(e$1,b$1)}var t=a.getCommands(),F=t.toggleBold(),f=t.toggleItalic(),S=t.toggleUnderline(),H=t.toggleStrike(),T=t.toggleSuperscript(),h=t.toggleSubscript();function M(e){return t.setTextColor(e)}var A=t.clearTextColor();function v(e){return t.setHighlight(e)}var z=t.clearHighlight();function U(e){return t.setFontSize(e)}var b=t.clearFontSize();function B(e){return t.setFontFamily(e)}var I=t.clearFontFamily();function R(e,o){return t.setUnderlineStyle(e,o)}function _(e,o){return t.setHyperlink(e,o)}var j=t.removeHyperlink();function q(e,o,i){return t.insertHyperlink(e,o,i)}export{y as a,F as b,f as c,S as d,H as e,T as f,h as g,M as h,A as i,v as j,z as k,U as l,b as m,B as n,I as o,R as p,_ as q,j as r,q as s};
|
package/dist/chunk-Q4CKLXWA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';function d(o,a){let t=o?{...o}:{},n=a,r=[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","csTheme"]],s=new Set;for(let[e,i]of r)s.add(e),s.add(i),(n[e]!==void 0||n[i]!==void 0)&&(delete t[e],delete t[i],n[e]!==void 0&&(t[e]=n[e]),n[i]!==void 0&&(t[i]=n[i]));for(let e of Object.keys(n))!s.has(e)&&n[e]!==void 0&&(t[e]=n[e]);return t}exports.a=d;
|
package/dist/chunk-RFC2SXZ6.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import {h,j as j$2,k,g,z}from'./chunk-6ZXL3EIP.mjs';import {c as c$1}from'./chunk-OEXVWIHW.mjs';import {c,j as j$1,e,l,i,a,f,m,d,b,n,k as k$1}from'./chunk-WLHNIXWC.mjs';var He={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},Q={majorFont:{latin:"Calibri Light",ea:"",cs:"",fonts:{}},minorFont:{latin:"Calibri",ea:"",cs:"",fonts:{}}},me={name:"Office Theme",colorScheme:He,fontScheme:Q},ft=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function ct(e){if(!e)return null;switch(d(e.name||"")){case "srgbClr":return j$1(e,"a","val")??j$1(e,null,"val")??null;case "sysClr":{let n=j$1(e,"a","lastClr")??j$1(e,null,"lastClr");if(n)return n;switch(j$1(e,"a","val")??j$1(e,null,"val")){case "windowText":case "menuText":case "captionText":case "btnText":return "000000";case "window":case "menu":case "btnFace":case "btnHighlight":return "FFFFFF";case "highlight":return "0078D7";case "highlightText":return "FFFFFF";case "grayText":return "808080";default:return null}}case "schemeClr":{j$1(e,"a","val")??j$1(e,null,"val");return null}default:return null}}function pt(e$1){let t={...He};if(!e$1)return t;for(let n of ft){let r=e(e$1,"a",n);if(r){let o=i(r);if(o.length>0){let a=ct(o[0]);a&&(t[n]=a);}}}return t}function Be(e$1){let t={latin:"",ea:"",cs:"",fonts:{}};if(!e$1)return t;let n=e(e$1,"a","latin");n&&(t.latin=j$1(n,"a","typeface")??j$1(n,null,"typeface")??"");let r=e(e$1,"a","ea");r&&(t.ea=j$1(r,"a","typeface")??j$1(r,null,"typeface")??"");let o=e(e$1,"a","cs");o&&(t.cs=j$1(o,"a","typeface")??j$1(o,null,"typeface")??"");let a=f(e$1,"a","font");for(let u of a){let l=j$1(u,"a","script")??j$1(u,null,"script"),f=j$1(u,"a","typeface")??j$1(u,null,"typeface");l&&f&&(t.fonts=t.fonts||{},t.fonts[l]=f);}return t}function dt(e$1){let t={...Q};if(!e$1)return t;let n=e(e$1,"a","majorFont");n&&(t.majorFont=Be(n));let r=e(e$1,"a","minorFont");return r&&(t.minorFont=Be(r)),t}function Sn(e$1){if(!e$1)return {...me};try{let t=c(e$1);if(!t)return {...me};let n=j$1(t,"a","name")??j$1(t,null,"name")??"Office Theme",r=e(t,"a","themeElements"),o=e(r,"a","clrScheme"),a=pt(o),u=e(r,"a","fontScheme"),l=dt(u);return {name:n,colorScheme:a,fontScheme:l}}catch(t){return console.warn("Failed to parse theme:",t),{...me}}}function mt(e,t="latin"){if(!e?.fontScheme?.majorFont)return Q.majorFont?.latin??"Calibri Light";let n=e.fontScheme.majorFont;return t==="latin"?n.latin||"Calibri Light":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri Light"}function ve(e,t="latin"){if(!e?.fontScheme?.minorFont)return Q.minorFont?.latin??"Calibri";let n=e.fontScheme.minorFont;return t==="latin"?n.latin||"Calibri":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri"}function _(e,t){if(!t)return "Calibri";let n=t.toLowerCase().includes("major"),r=t.toLowerCase().includes("minor"),o="latin",a=t.toLowerCase();return a.includes("eastasia")?o="ea":(a.includes("bidi")||a.includes("cs"))&&(o="cs"),n?mt(e,o):r?ve(e,o):ve(e,"latin")}function Ne(e){if(!e)return;let t=l(e,"w","w")??0,n=j$1(e,"w","type")??"dxa",r="dxa";return (n==="auto"||n==="dxa"||n==="nil"||n==="pct")&&(r=n),{value:t,type:r}}function X(e){return Ne(e)}function W(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,r=(j$1(e,"w","author")??"").trim(),o=(j$1(e,"w","date")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:r.length>0?r:"Unknown",date:o.length>0?o:void 0}}function J(e){return W(e)}function D(e){if(!e)return;let r={style:j$1(e,"w","val")??"none"},o=l(e,"w","sz");o!==void 0&&(r.size=o);let a=l(e,"w","space");a!==void 0&&(r.space=a);let u=j$1(e,"w","color"),l$1=j$1(e,"w","themeColor"),f=j$1(e,"w","themeTint"),c=j$1(e,"w","themeShade");(u||l$1||f||c)&&(r.color={rgb:u??void 0,themeColor:l$1,themeTint:f??void 0,themeShade:c??void 0});let p=j$1(e,"w","shadow");(p==="1"||p==="true")&&(r.shadow=true);let d=j$1(e,"w","frame");return (d==="1"||d==="true")&&(r.frame=true),r}function ee(e$1){if(!e$1)return;let t={},n=D(e(e$1,"w","top"));n&&(t.top=n);let r=D(e(e$1,"w","bottom"));r&&(t.bottom=r);let o=D(e(e$1,"w","left")??e(e$1,"w","start"));o&&(t.left=o);let a=D(e(e$1,"w","right")??e(e$1,"w","end"));a&&(t.right=a);let u=D(e(e$1,"w","insideH"));u&&(t.insideH=u);let l=D(e(e$1,"w","insideV"));if(l&&(t.insideV=l),Object.keys(t).length!==0)return t}function te(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","top"));n&&(t.top=n);let r=X(e(e$1,"w","bottom"));r&&(t.bottom=r);let o=X(e(e$1,"w","left")??e(e$1,"w","start"));o&&(t.left=o);let a=X(e(e$1,"w","right")??e(e$1,"w","end"));if(a&&(t.right=a),Object.keys(t).length!==0)return t}function ne(e){if(!e)return;let t={},n=j$1(e,"w","fill");n&&n!=="auto"&&(t.fill={rgb:n});let r=j$1(e,"w","themeFill");if(r){t.fill={themeColor:r};let u=j$1(e,"w","themeFillTint");u&&t.fill&&(t.fill.themeTint=u);let l=j$1(e,"w","themeFillShade");l&&t.fill&&(t.fill.themeShade=l);}let o=j$1(e,"w","color");o&&o!=="auto"&&(t.color={rgb:o});let a=j$1(e,"w","val");if(a&&(t.pattern=a),Object.keys(t).length!==0)return t}function ge(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let r=j$1(e,"w","lastRow");(r==="1"||r==="true")&&(t.lastRow=true);let o=j$1(e,"w","firstColumn");(o==="1"||o==="true")&&(t.firstColumn=true);let a=j$1(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=j$1(e,"w","noHBand");(u==="1"||u==="true")&&(t.noHBand=true);let l=j$1(e,"w","noVBand");(l==="1"||l==="true")&&(t.noVBand=true);let f=j$1(e,"w","val");if(f){let c=parseInt(f,16);isNaN(c)||(c&32&&(t.firstRow=true),c&64&&(t.lastRow=true),c&128&&(t.firstColumn=true),c&256&&(t.lastColumn=true),c&512&&(t.noHBand=true),c&1024&&(t.noVBand=true));}if(Object.keys(t).length!==0)return t}function he(e){if(!e)return;let t={},n=j$1(e,"w","horzAnchor");(n==="margin"||n==="page"||n==="text")&&(t.horzAnchor=n);let r=j$1(e,"w","vertAnchor");(r==="margin"||r==="page"||r==="text")&&(t.vertAnchor=r);let o=l(e,"w","tblpX");o!==void 0&&(t.tblpX=o);let a=j$1(e,"w","tblpXSpec");a&&(t.tblpXSpec=a);let u=l(e,"w","tblpY");u!==void 0&&(t.tblpY=u);let l$1=j$1(e,"w","tblpYSpec");l$1&&(t.tblpYSpec=l$1);let f=l(e,"w","topFromText");f!==void 0&&(t.topFromText=f);let c=l(e,"w","bottomFromText");c!==void 0&&(t.bottomFromText=c);let p=l(e,"w","leftFromText");p!==void 0&&(t.leftFromText=p);let d=l(e,"w","rightFromText");if(d!==void 0&&(t.rightFromText=d),Object.keys(t).length!==0)return t}function gt(e){return e.columnWidths&&e.columnWidths.length>0?e.columnWidths.length:e.rows.length===0?0:e.rows[0].cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function ht(e){return e.rows.length}function wt(e){return e.formatting?.vMerge==="continue"}function yt(e){return e.formatting?.vMerge==="restart"}function bt(e){return e.rows.length===0?false:e.rows[0].formatting?.header===true}var Ae={183:"\u2022",111:"\u25CB",167:"\u25A0",252:"\u2713",110:"\u25A0",113:"\u25CB",117:"\u25C6",118:"\u2756",168:"\u2713",251:"\u2713",254:"\u2713",61623:"\u2022",61550:"\u25A0",61551:"\u25CB",61607:"\u25A0",61692:"\u2713",8226:"\u2022",9679:"\u25CF",9675:"\u25CB",9632:"\u25A0",9633:"\u25A1",9670:"\u25C6",9671:"\u25C7",8211:"\u2013",8212:"\u2014",62:">",45:"-"};function Tt(e){if(!e||e.trim()==="")return "\u2022";let t=e.charCodeAt(0);return Ae[t]?Ae[t]:t>=57344&&t<=63743||t<32||t>=127&&t<160?"\u2022":e}function Ft(e){let t=e.listRendering;t&&t.isBullet&&(t.marker=Tt(t.marker||""));}function Ct(e,t,n$1,r,o,a,u){if(e.content.length===0)return;let l=i(t),f=0;function c(p){if(!h(p))return;let d=j$2(p);if(!d)return;let b=n(p,"wps","wsp");if(b){let F=k(b);F&&(d.content=g(F,V,null,n$1,r,o,a??void 0,u??void 0));}let T={type:"shape",shapeType:"rect",size:d.size,position:d.position,wrap:d.wrap,fill:d.fill,outline:d.outline,textBody:{content:d.content,margins:d.margins}};d.id&&(T.id=d.id);let w={type:"shape",shape:T},h$1=f;if(h$1>=e.content.length){h$1=-1;for(let F=e.content.length-1;F>=0;F--)if(e.content[F].type==="run"){h$1=F;break}}if(h$1>=0){let F=e.content[h$1];F.type==="run"&&F.content.push(w);}}for(let p of l){if(d(p.name??"")!=="r")continue;let d$1=i(p);for(let b of d$1){let T=d(b.name??"");if(T==="drawing")c(b);else if(T==="AlternateContent"){let w=i(b),F=w.find(B=>d(B.name??"")==="Choice")??w.find(B=>d(B.name??"")==="Fallback");if(F)for(let B of i(F))d(B.name??"")==="drawing"&&c(B);}}f++;}}function re(e,t,n,r,o,a,u){let l=[],f=i(e);for(let c of f){let p=c.name??"";if(p==="w:p"||p.endsWith(":p")){let d=V(c,t,n,r,o,a,u);Ct(d,c,t,n,r,o,a),Ft(d),l.push(d);}else if(p==="w:tbl"||p.endsWith(":tbl")){let d=Y(c,t,n,r,o,a,u);l.push(d);}else if(p==="w:sdt"||p.endsWith(":sdt")){let d=(c.elements??[]).find(b=>b.type==="element"&&(b.name==="w:sdtContent"||b.name?.endsWith(":sdtContent")));d&&l.push(...re(d,t,n,r,o,a,u));}}return l}function Ie(e){switch(e){case "first":return "first";case "even":return "even";default:return "default"}}function Le(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Ie(t),rId:n}}function Xe(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Ie(t),rId:n}}function Ln(e,t="default",n=null,r=null,o=null,a$1=null,u=null){let l={type:"header",hdrFtrType:t,content:[]};if(!e)return l;let f=a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:hdr"||p.name?.endsWith(":hdr")));return c&&(l.content=re(c,n,r,o,a$1,u,{inHeaderFooter:true})),l}function Xn(e,t="default",n=null,r=null,o=null,a$1=null,u=null){let l={type:"footer",hdrFtrType:t,content:[]};if(!e)return l;let f=a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:ftr"||p.name?.endsWith(":ftr")));return c&&(l.content=re(c,n,r,o,a$1,u,{inHeaderFooter:true})),l}function Oe(e){switch(e){case "separator":return "separator";case "continuationSeparator":return "continuationSeparator";case "continuationNotice":return "continuationNotice";default:return "normal"}}function De(e,t,n,r,o,a){let u=[];for(let l of i(e)){let f=l.name??"";f==="w:p"?u.push(V(l,t,n,r,o)):f==="w:tbl"&&u.push(Y(l,t,n,r,o,a));}return u}function xt(e,t,n,r,o,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=De(e,t,n,r,o,a);return {type:"footnote",id:u,noteType:f,content:c}}function jn(e,t=null,n=null,r=null,o=null,a$1=null){let u=new Map,l=[];if(!e)return oe(u,l);let f$1=a(e);if(!f$1)return oe(u,l);let c=f$1.elements?.find(d=>d.type==="element"&&(d.name==="w:footnotes"||d.name?.endsWith(":footnotes")));if(!c)return oe(u,l);let p=f(c,"w","footnote");for(let d of p){let b=xt(d,t,n,r,o,a$1);u.set(b.id,b),l.push(b);}return oe(u,l)}function oe(e,t){return {byId:e,footnotes:t,getFootnote(n){return e.get(n)},hasFootnote(n){return e.has(n)},getNormalFootnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function St(e,t,n,r,o,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=De(e,t,n,r,o,a);return {type:"endnote",id:u,noteType:f,content:c}}function zn(e,t=null,n=null,r=null,o=null,a$1=null){let u=new Map,l=[];if(!e)return ie(u,l);let f$1=a(e);if(!f$1)return ie(u,l);let c=f$1.elements?.find(d=>d.type==="element"&&(d.name==="w:endnotes"||d.name?.endsWith(":endnotes")));if(!c)return ie(u,l);let p=f(c,"w","endnote");for(let d of p){let b=St(d,t,n,r,o,a$1);u.set(b.id,b),l.push(b);}return ie(u,l)}function ie(e,t){return {byId:e,endnotes:t,getEndnote(n){return e.get(n)},hasEndnote(n){return e.has(n)},getNormalEndnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function We(e){return e?{decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",bullet:"bullet",chicago:"chicago",none:"none"}[e]:void 0}function kt(e){switch(e){case "pageBottom":return "pageBottom";case "beneathText":return "beneathText";case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Mt(e){switch(e){case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Ve(e){switch(e){case "continuous":return "continuous";case "eachSect":return "eachSect";case "eachPage":return "eachPage";default:return}}function je(e$1){let t={};if(!e$1)return t;let n=e(e$1,"w","pos");if(n){let u=j$1(n,"w","val");t.position=kt(u);}let r=e(e$1,"w","numFmt");if(r){let u=j$1(r,"w","val");t.numFmt=We(u);}let o=e(e$1,"w","numStart");o&&(t.numStart=l(o,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=Ve(u);}return t}function ze(e$1){let t={};if(!e$1)return t;let n=e(e$1,"w","pos");if(n){let u=j$1(n,"w","val");t.position=Mt(u);}let r=e(e$1,"w","numFmt");if(r){let u=j$1(r,"w","val");t.numFmt=We(u);}let o=e(e$1,"w","numStart");o&&(t.numStart=l(o,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=Ve(u);}return t}function Un(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let r=[];for(let o of n.content)if(o.type==="run")for(let a of o.content)a.type==="text"&&r.push(a.text);t.push(r.join(""));}return t.join(`
|
|
2
|
-
`)}function Gn(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let r=[];for(let o of n.content)if(o.type==="run")for(let a of o.content)a.type==="text"&&r.push(a.text);t.push(r.join(""));}return t.join(`
|
|
3
|
-
`)}function qn(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function _n(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Rt(e,t,n,r){if(!e&&!t)return;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),Object.keys(o).length>0?o:void 0}function ae(e){if(!e)return;let r={style:j$1(e,"w","val")??"none"},o=l(e,"w","sz");o!==void 0&&(r.size=o);let a=l(e,"w","space");a!==void 0&&(r.space=a);let u=j$1(e,"w","color"),l$1=j$1(e,"w","themeColor"),f=j$1(e,"w","themeTint"),c=j$1(e,"w","themeShade"),p=Rt(u,l$1,f,c);p&&(r.color=p);let d=j$1(e,"w","shadow");(d==="1"||d==="true")&&(r.shadow=true);let b=j$1(e,"w","frame");return (b==="1"||b==="true")&&(r.frame=true),r}function Et(e){switch(e){case "landscape":return "landscape";case "portrait":return "portrait";default:return}}function Pt(e){switch(e){case "continuous":return "continuous";case "nextPage":return "nextPage";case "oddPage":return "oddPage";case "evenPage":return "evenPage";case "nextColumn":return "nextColumn";default:return}}function Bt(e){switch(e){case "top":return "top";case "center":return "center";case "both":return "both";case "bottom":return "bottom";default:return}}function vt(e){switch(e){case "continuous":return "continuous";case "newPage":return "newPage";case "newSection":return "newSection";default:return}}function Ge(e$1,t){let n={};if(!e$1)return n;let r=e(e$1,"w","pgSz");if(r){let m=l(r,"w","w");m!==void 0&&(n.pageWidth=m);let C=l(r,"w","h");C!==void 0&&(n.pageHeight=C);let E=j$1(r,"w","orient"),y=Et(E);y&&(n.orientation=y);}let o=e(e$1,"w","pgMar");if(o){let m=l(o,"w","top");m!==void 0&&(n.marginTop=m);let C=l(o,"w","bottom");C!==void 0&&(n.marginBottom=C);let E=l(o,"w","left");E!==void 0&&(n.marginLeft=E);let y=l(o,"w","right");y!==void 0&&(n.marginRight=y);let x=l(o,"w","header");x!==void 0&&(n.headerDistance=x);let P=l(o,"w","footer");P!==void 0&&(n.footerDistance=P);let v=l(o,"w","gutter");v!==void 0&&(n.gutter=v);}let a=e(e$1,"w","cols");if(a){let m=l(a,"w","num");m!==void 0&&(n.columnCount=m);let C=l(a,"w","space");C!==void 0&&(n.columnSpace=C);let E=j$1(a,"w","equalWidth");E==="1"||E==="true"?n.equalWidth=true:(E==="0"||E==="false")&&(n.equalWidth=false);let y=j$1(a,"w","sep");(y==="1"||y==="true")&&(n.separator=true);let x=f(a,"w","col");if(x.length>0){n.columns=[];for(let P of x){let v={},I=l(P,"w","w");I!==void 0&&(v.width=I);let A=l(P,"w","space");A!==void 0&&(v.space=A),n.columns.push(v);}n.columnCount===void 0&&(n.columnCount=x.length);}}let u=e(e$1,"w","type");if(u){let m=j$1(u,"w","val"),C=Pt(m);C&&(n.sectionStart=C);}let l$1=e(e$1,"w","vAlign");if(l$1){let m=j$1(l$1,"w","val"),C=Bt(m);C&&(n.verticalAlign=C);}let f$1=e(e$1,"w","bidi");f$1&&(n.bidi=m(f$1));let c=f(e$1,"w","headerReference");c.length>0&&(n.headerReferences=c.map(m=>Le(m)));let p=f(e$1,"w","footerReference");p.length>0&&(n.footerReferences=p.map(m=>Xe(m)));let d=e(e$1,"w","titlePg");d&&(n.titlePg=m(d));let b=e(e$1,"w","evenAndOddHeaders");b&&(n.evenAndOddHeaders=m(b));let T=e(e$1,"w","lnNumType");if(T){n.lineNumbers={};let m=l(T,"w","start");m!==void 0&&(n.lineNumbers.start=m);let C=l(T,"w","countBy");C!==void 0&&(n.lineNumbers.countBy=C);let E=l(T,"w","distance");E!==void 0&&(n.lineNumbers.distance=E);let y=j$1(T,"w","restart"),x=vt(y);x&&(n.lineNumbers.restart=x);}let w=e(e$1,"w","pgBorders");if(w){n.pageBorders={};let m=ae(e(w,"w","top"));m&&(n.pageBorders.top=m);let C=ae(e(w,"w","bottom"));C&&(n.pageBorders.bottom=C);let E=ae(e(w,"w","left"));E&&(n.pageBorders.left=E);let y=ae(e(w,"w","right"));y&&(n.pageBorders.right=y);let x=j$1(w,"w","display");(x==="allPages"||x==="firstPage"||x==="notFirstPage")&&(n.pageBorders.display=x);let P=j$1(w,"w","offsetFrom");(P==="page"||P==="text")&&(n.pageBorders.offsetFrom=P);let v=j$1(w,"w","zOrder");(v==="front"||v==="back")&&(n.pageBorders.zOrder=v);}let h=e(e$1,"w","background");if(h){n.background={};let m=j$1(h,"w","color");m&&m!=="auto"&&(n.background.color={rgb:m});let C=j$1(h,"w","themeColor");C&&(n.background.themeColor=C);let E=j$1(h,"w","themeTint");E&&(n.background.themeTint=E);let y=j$1(h,"w","themeShade");y&&(n.background.themeShade=y);}let F=e(e$1,"w","footnotePr");if(F){let m=je(F);Object.keys(m).length>0&&(n.footnotePr=m);}let B=e(e$1,"w","endnotePr");if(B){let m=ze(B);Object.keys(m).length>0&&(n.endnotePr=m);}let M=e(e$1,"w","docGrid");if(M){n.docGrid={};let m=j$1(M,"w","type");(m==="default"||m==="lines"||m==="linesAndChars"||m==="snapToChars")&&(n.docGrid.type=m);let C=l(M,"w","linePitch");C!==void 0&&(n.docGrid.linePitch=C);let E=l(M,"w","charSpace");E!==void 0&&(n.docGrid.charSpace=E);}let S=e(e$1,"w","paperSrc");if(S){let m=l(S,"w","first");m!==void 0&&(n.paperSrcFirst=m);let C=l(S,"w","other");C!==void 0&&(n.paperSrcOther=C);}return n}function Qn(){return {pageWidth:12240,pageHeight:15840,orientation:"portrait",marginTop:1440,marginBottom:1440,marginLeft:1440,marginRight:1440,headerDistance:720,footerDistance:720,gutter:0,columnCount:1,columnSpace:720,equalWidth:true,sectionStart:"nextPage",verticalAlign:"top"}}function Ue(e,t){if(!t||t.length===0)return e;let n=new Set((e??[]).map(o=>o.type)),r=t.filter(o=>!n.has(o.type));return r.length===0?e:[...e??[],...r]}function Jn(e){if(e.length<2)return e;let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[n-1].properties,o=e[n].properties,a=Ue(o.headerReferences,r.headerReferences),u=Ue(o.footerReferences,r.footerReferences),l=o.titlePg!==void 0?o.titlePg:r.titlePg;if(a===o.headerReferences&&u===o.footerReferences&&l===o.titlePg){t.push(e[n]);continue}t.push({...e[n],properties:{...o,headerReferences:a,footerReferences:u,titlePg:l}});}return t}function Ht(e,t){return !e&&!t?true:!(!e||!t||e.bold!==t.bold||e.boldCs!==t.boldCs||e.italic!==t.italic||e.italicCs!==t.italicCs||e.strike!==t.strike||e.doubleStrike!==t.doubleStrike||e.smallCaps!==t.smallCaps||e.allCaps!==t.allCaps||e.hidden!==t.hidden||e.emboss!==t.emboss||e.imprint!==t.imprint||e.outline!==t.outline||e.shadow!==t.shadow||e.rtl!==t.rtl||e.cs!==t.cs||e.fontSize!==t.fontSize||e.fontSizeCs!==t.fontSizeCs||e.spacing!==t.spacing||e.position!==t.position||e.scale!==t.scale||e.kerning!==t.kerning||e.vertAlign!==t.vertAlign||e.highlight!==t.highlight||e.effect!==t.effect||e.emphasisMark!==t.emphasisMark||e.styleId!==t.styleId||!Nt(e.underline,t.underline)||!le(e.color,t.color)||!At(e.shading,t.shading)||!It(e.fontFamily,t.fontFamily))}function Nt(e,t){return !e&&!t?true:!e||!t||e.style!==t.style?false:le(e.color,t.color)}function le(e,t){return !e&&!t?true:!e||!t?false:e.rgb===t.rgb&&e.auto===t.auto&&e.themeColor===t.themeColor&&e.themeTint===t.themeTint&&e.themeShade===t.themeShade}function At(e,t){return !e&&!t?true:!(!e||!t||e.pattern!==t.pattern||!le(e.color,t.color)||!le(e.fill,t.fill))}function It(e,t){return !e&&!t?true:!e||!t?false:e.ascii===t.ascii&&e.hAnsi===t.hAnsi&&e.eastAsia===t.eastAsia&&e.cs===t.cs&&e.asciiTheme===t.asciiTheme&&e.hAnsiTheme===t.hAnsiTheme&&e.eastAsiaTheme===t.eastAsiaTheme&&e.csTheme===t.csTheme}function Lt(e){return e.type==="text"||e.type==="softHyphen"||e.type==="noBreakHyphen"}function qe(e){return e.content.length===0?true:e.content.every(Lt)}function Xt(e,t){let n=[];for(let r of e)n.push(r);if(n.length>0&&t.length>0&&n[n.length-1].type==="text"&&t[0].type==="text"){let r=n[n.length-1],o=t[0];n[n.length-1]={type:"text",text:r.text+o.text,preserveSpace:r.preserveSpace||o.preserveSpace||void 0};for(let a=1;a<t.length;a++)n.push(t[a]);}else for(let r of t)n.push(r);return n}function Ot(e){if(e.length<=1)return e;let t=[],n=null;for(let r of e)if(r.content.length!==0){if(n===null){n={...r,content:[...r.content]};continue}qe(n)&&qe(r)&&Ht(n.formatting,r.formatting)?n={type:"run",formatting:n.formatting,content:Xt(n.content,r.content)}:(t.push(n),n={...r,content:[...r.content]});}return n!==null&&t.push(n),t}function we(e){if(e.length<=1)return e;let t=[],n=[];function r(){if(n.length>0){let o=Ot(n);t.push(...o),n.length=0;}}for(let o of e)if(o.type==="run")n.push(o);else if(r(),o.type==="hyperlink"){let a={...o,children:we(o.children)};t.push(a);}else t.push(o);return r(),t}function _e(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 Dt(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let r=j$1(e,"w","fill");r&&r!=="auto"&&(t.fill={rgb:r});let o=j$1(e,"w","themeFill");o&&(t.fill=t.fill||{},t.fill.themeColor=o);let a=j$1(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=j$1(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=j$1(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function ue(e$1,t,n){if(!e$1)return;let r={},o=e(e$1,"w","b");o&&(r.bold=m(o));let a=e(e$1,"w","bCs");a&&(r.boldCs=m(a));let u=e(e$1,"w","i");u&&(r.italic=m(u));let l$1=e(e$1,"w","iCs");l$1&&(r.italicCs=m(l$1));let f=e(e$1,"w","u");if(f){let k=j$1(f,"w","val");if(k){r.underline={style:k};let z=j$1(f,"w","color"),U=j$1(f,"w","themeColor");(z||U)&&(r.underline.color=_e(z,U,j$1(f,"w","themeTint"),j$1(f,"w","themeShade")));}}let c=e(e$1,"w","strike");c&&(r.strike=m(c));let p=e(e$1,"w","dstrike");p&&(r.doubleStrike=m(p));let d=e(e$1,"w","vertAlign");if(d){let k=j$1(d,"w","val");(k==="superscript"||k==="subscript"||k==="baseline")&&(r.vertAlign=k);}let b=e(e$1,"w","smallCaps");b&&(r.smallCaps=m(b));let T=e(e$1,"w","caps");T&&(r.allCaps=m(T));let w=e(e$1,"w","vanish");w&&(r.hidden=m(w));let h=e(e$1,"w","color");h&&(r.color=_e(j$1(h,"w","val"),j$1(h,"w","themeColor"),j$1(h,"w","themeTint"),j$1(h,"w","themeShade")));let F=e(e$1,"w","highlight");if(F){let k=j$1(F,"w","val");k&&(r.highlight=k);}let B=e(e$1,"w","shd");B&&(r.shading=Dt(B));let M=e(e$1,"w","sz");if(M){let k=l(M,"w","val");k!==void 0&&(r.fontSize=k);}let S=e(e$1,"w","szCs");if(S){let k=l(S,"w","val");k!==void 0&&(r.fontSizeCs=k);}let m$1=e(e$1,"w","rFonts");if(m$1){r.fontFamily={ascii:j$1(m$1,"w","ascii")??void 0,hAnsi:j$1(m$1,"w","hAnsi")??void 0,eastAsia:j$1(m$1,"w","eastAsia")??void 0,cs:j$1(m$1,"w","cs")??void 0};let k=j$1(m$1,"w","asciiTheme");k&&(r.fontFamily.asciiTheme=k,t&&!r.fontFamily.ascii&&(r.fontFamily.ascii=_(t,k)));let z=j$1(m$1,"w","hAnsiTheme");z&&(r.fontFamily.hAnsiTheme=z,t&&!r.fontFamily.hAnsi&&(r.fontFamily.hAnsi=_(t,z)));let U=j$1(m$1,"w","eastAsiaTheme");U&&(r.fontFamily.eastAsiaTheme=U,t&&!r.fontFamily.eastAsia&&(r.fontFamily.eastAsia=_(t,U)));let ce=j$1(m$1,"w","cstheme");ce&&(r.fontFamily.csTheme=ce,t&&!r.fontFamily.cs&&(r.fontFamily.cs=_(t,ce)));}let C=e(e$1,"w","spacing");if(C){let k=l(C,"w","val");k!==void 0&&(r.spacing=k);}let E=e(e$1,"w","position");if(E){let k=l(E,"w","val");k!==void 0&&(r.position=k);}let y=e(e$1,"w","w");if(y){let k=l(y,"w","val");k!==void 0&&(r.scale=k);}let x=e(e$1,"w","kern");if(x){let k=l(x,"w","val");k!==void 0&&(r.kerning=k);}let P=e(e$1,"w","effect");if(P){let k=j$1(P,"w","val");k&&(r.effect=k);}let v=e(e$1,"w","em");if(v){let k=j$1(v,"w","val");k&&(r.emphasisMark=k);}let I=e(e$1,"w","emboss");I&&(r.emboss=m(I));let A=e(e$1,"w","imprint");A&&(r.imprint=m(A));let L=e(e$1,"w","outline");L&&(r.outline=m(L));let ye=e(e$1,"w","shadow");ye&&(r.shadow=m(ye));let be=e(e$1,"w","rtl");be&&(r.rtl=m(be));let Te=e(e$1,"w","cs");Te&&(r.cs=m(Te));let Fe=e(e$1,"w","rStyle");if(Fe){let k=j$1(Fe,"w","val");k&&(r.styleId=k);}return Object.keys(r).length>0?r:void 0}function Wt(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,r=(j$1(e,"w","author")??"").trim(),o=(j$1(e,"w","date")??"").trim(),a=(j$1(e,"w","rsid")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:r.length>0?r:"Unknown",date:o.length>0?o:void 0,rsid:a.length>0?a:void 0}}function Vt(e$1,t,n,r){if(!e$1)return;let o=f(e$1,"w","rPrChange").map(a=>{let u=e(a,"w","rPr");return {type:"runPropertyChange",info:Wt(a),previousFormatting:ue(u,t),currentFormatting:r}}).filter(a=>a.previousFormatting||a.currentFormatting);return o.length>0?o:void 0}function jt(e){let t=k$1(e),n=j$1(e,"xml","space")==="preserve";return {type:"text",text:t,preserveSpace:n||void 0}}function zt(){return {type:"tab"}}function Ut(e){let t=j$1(e,"w","type"),n=j$1(e,"w","clear"),r={type:"break"};return (t==="page"||t==="column"||t==="textWrapping")&&(r.breakType=t),(n==="none"||n==="left"||n==="right"||n==="all")&&(r.clear=n),r}function Gt(e){let t=j$1(e,"w","font")??"",n=j$1(e,"w","char")??"";return {type:"symbol",font:t,char:n}}function qt(e){return {type:"footnoteRef",id:l(e,"w","id")??0}}function _t(e){return {type:"endnoteRef",id:l(e,"w","id")??0}}function Yt(e){let t=j$1(e,"w","fldCharType"),n=j$1(e,"w","fldLock")==="true"||j$1(e,"w","fldLock")==="1",r=j$1(e,"w","dirty")==="true"||j$1(e,"w","dirty")==="1",o="begin";return t==="separate"?o="separate":t==="end"&&(o="end"),{type:"fieldChar",charType:o,fldLock:n||void 0,dirty:r||void 0}}function $t(e){return {type:"instrText",text:k$1(e)}}function Ye(e,t,n){let r=z(e,t??void 0,n??void 0);return r?{type:"drawing",image:r}:null}function se(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function Zt(e,t,n){let r=[],o=i(e);for(let a of o)switch(se(a.name)){case "t":r.push(jt(a));break;case "tab":r.push(zt());break;case "br":r.push(Ut(a));break;case "sym":r.push(Gt(a));break;case "footnoteReference":r.push(qt(a));break;case "endnoteReference":r.push(_t(a));break;case "fldChar":r.push(Yt(a));break;case "instrText":r.push($t(a));break;case "softHyphen":r.push({type:"softHyphen"});break;case "noBreakHyphen":r.push({type:"noBreakHyphen"});break;case "drawing":let l=Ye(a,t,n);l&&r.push(l);break;case "pict":case "object":break;case "rPr":break;case "lastRenderedPageBreak":break;case "cr":r.push({type:"break",breakType:"textWrapping"});break;case "AlternateContent":{let c=i(a).find(p=>se(p.name)==="Choice")??i(a).find(p=>se(p.name)==="Fallback");if(c){for(let p of i(c))if(se(p.name)==="drawing"){let b=Ye(p,t,n);b?.image?.src&&r.push(b);}}break}}return r}function $(e$1,t,n,r=null,o=null){let a={type:"run",content:[]},u=e(e$1,"w","rPr");return u&&(a.formatting=ue(u,n),a.propertyChanges=Vt(u,n,t,a.formatting)),a.content=Zt(e$1,r,o),a}function Kt(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 Qt(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let r=j$1(e,"w","fill");r&&r!=="auto"&&(t.fill={rgb:r});let o=j$1(e,"w","themeFill");o&&(t.fill=t.fill||{},t.fill.themeColor=o);let a=j$1(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=j$1(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=j$1(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function q(e){if(!e)return;let t=j$1(e,"w","val");if(!t)return;let n={style:t},r=j$1(e,"w","color"),o=j$1(e,"w","themeColor");(r||o)&&(n.color=Kt(r,o,j$1(e,"w","themeTint"),j$1(e,"w","themeShade")));let a=l(e,"w","sz");a!==void 0&&(n.size=a);let u=l(e,"w","space");u!==void 0&&(n.space=u);let l$1=j$1(e,"w","shadow");l$1&&(n.shadow=l$1==="1"||l$1==="true");let f=j$1(e,"w","frame");return f&&(n.frame=f==="1"||f==="true"),n}function Jt(e){if(!e)return;let t=f(e,"w","tab");if(t.length===0)return;let n=[];for(let r of t){let o=l(r,"w","pos"),a=j$1(r,"w","val");if(o!==void 0&&a){let u={position:o,alignment:a},l=j$1(r,"w","leader");l&&(u.leader=l),n.push(u);}}return n.length>0?n:void 0}function en(e){if(!e)return;let t={},n=l(e,"w","w");n!==void 0&&(t.width=n);let r=l(e,"w","h");r!==void 0&&(t.height=r);let o=j$1(e,"w","hAnchor");(o==="text"||o==="margin"||o==="page")&&(t.hAnchor=o);let a=j$1(e,"w","vAnchor");(a==="text"||a==="margin"||a==="page")&&(t.vAnchor=a);let u=l(e,"w","x");u!==void 0&&(t.x=u);let l$1=l(e,"w","y");l$1!==void 0&&(t.y=l$1);let f=j$1(e,"w","xAlign");f&&(t.xAlign=f);let c=j$1(e,"w","yAlign");c&&(t.yAlign=c);let p=j$1(e,"w","wrap");return p&&(t.wrap=p),Object.keys(t).length>0?t:void 0}function fe(e$1,t,n){if(!e$1)return;let r={},o=e(e$1,"w","jc");if(o){let y=j$1(o,"w","val");y&&(r.alignment=y);}let a=e(e$1,"w","bidi");a&&(r.bidi=m(a));let u=e(e$1,"w","spacing");if(u){let y=l(u,"w","before");y!==void 0&&(r.spaceBefore=y);let x=l(u,"w","after");x!==void 0&&(r.spaceAfter=x);let P=l(u,"w","line");P!==void 0&&(r.lineSpacing=P);let v={};y!==void 0&&(v.before=true),x!==void 0&&(v.after=true),(v.before||v.after)&&(r.spacingExplicit=v);let I=j$1(u,"w","lineRule");I&&(r.lineSpacingRule=I);let A=j$1(u,"w","beforeAutospacing");A&&(r.beforeAutospacing=A==="1"||A==="true");let L=j$1(u,"w","afterAutospacing");L&&(r.afterAutospacing=L==="1"||L==="true");}let l$1=e(e$1,"w","ind");if(l$1){let y=l(l$1,"w","left");y!==void 0&&(r.indentLeft=y);let x=l(l$1,"w","right");x!==void 0&&(r.indentRight=x);let P=l(l$1,"w","firstLine");P!==void 0&&(r.indentFirstLine=P);let v=l(l$1,"w","hanging");v!==void 0&&(r.indentFirstLine=-v,r.hangingIndent=true);let I=l(l$1,"w","start");I!==void 0&&r.indentLeft===void 0&&(r.indentLeft=I);let A=l(l$1,"w","end");A!==void 0&&r.indentRight===void 0&&(r.indentRight=A);}let f=e(e$1,"w","pBdr");if(f){let y={},x=q(e(f,"w","top"));x&&(y.top=x);let P=q(e(f,"w","bottom"));P&&(y.bottom=P);let v=q(e(f,"w","left"));v&&(y.left=v);let I=q(e(f,"w","right"));I&&(y.right=I);let A=q(e(f,"w","between"));A&&(y.between=A);let L=q(e(f,"w","bar"));L&&(y.bar=L),Object.keys(y).length>0&&(r.borders=y);}let c=e(e$1,"w","shd");c&&(r.shading=Qt(c));let p=e(e$1,"w","tabs");p&&(r.tabs=Jt(p));let d=e(e$1,"w","keepNext");d&&(r.keepNext=m(d));let b=e(e$1,"w","keepLines");b&&(r.keepLines=m(b));let T=e(e$1,"w","widowControl");T&&(r.widowControl=m(T));let w=e(e$1,"w","pageBreakBefore");w&&(r.pageBreakBefore=m(w));let h=e(e$1,"w","contextualSpacing");h&&(r.contextualSpacing=m(h));let F=e(e$1,"w","numPr");if(F){let y=e(F,"w","numId"),x=e(F,"w","ilvl");if(y||x){if(r.numPr={},y){let P=l(y,"w","val");P!==void 0&&(r.numPr.numId=P);}if(x){let P=l(x,"w","val");P!==void 0&&(r.numPr.ilvl=P);}}}let B=e(e$1,"w","outlineLvl");if(B){let y=l(B,"w","val");y!==void 0&&(r.outlineLevel=y);}let M=e(e$1,"w","pStyle");if(M){let y=j$1(M,"w","val");y&&(r.styleId=y);}let S=e(e$1,"w","framePr");S&&(r.frame=en(S));let m$1=e(e$1,"w","suppressLineNumbers");m$1&&(r.suppressLineNumbers=m(m$1));let C=e(e$1,"w","suppressAutoHyphens");C&&(r.suppressAutoHyphens=m(C));let E=e(e$1,"w","rPr");return E&&(r.runProperties=ue(E,t)),Object.keys(r).length>0?r:void 0}function tn(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function nn(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",r={type:"bookmarkStart",id:t,name:n},o=l(e,"w","colFirst");o!==void 0&&(r.colFirst=o);let a=l(e,"w","colLast");return a!==void 0&&(r.colLast=a),r}function rn(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function $e(e,t,n=null,r=null,o=null){let a={type:"hyperlink",children:[]},u=j$1(e,"r","id");if(u&&(a.rId=u,t)){let T=t.get(u);T&&(c$1(T),a.href=T.target);}let l=j$1(e,"w","anchor");l&&(a.anchor=l,a.href||(a.href=`#${l}`));let f=j$1(e,"w","tooltip");f&&(a.tooltip=f);let c=j$1(e,"w","tgtFrame");c&&(a.target=c);let p=j$1(e,"w","history");(p==="1"||p==="true")&&(a.history=true);let d=j$1(e,"w","docLocation");d&&(a.docLocation=d);let b=i(e);for(let T of b)switch(tn(T.name)){case "r":a.children.push($(T,n,r,t,o));break;case "bookmarkStart":a.children.push(nn(T));break;case "bookmarkEnd":a.children.push(rn(T));break}return a}function pr(e){let t="";for(let n of e.children)if(n.type==="run")for(let r of n.content)r.type==="text"?t+=r.text:r.type==="tab"&&(t+=" ");return t}function dr(e){return e.href?/^https?:\/\/|^mailto:|^tel:|^ftp:/i.test(e.href):!!e.rId&&!e.anchor}function mr(e){return !!e.anchor}function gr(e){return e.href}function hr(e){return e.children.some(t=>t.type==="run")}function wr(e){return e.children.filter(t=>t.type==="run")}function yr(e,t){if(e.rId){let n=t.get(e.rId);if(n)return c$1(n),e.href=n.target,e.href}return e.anchor&&!e.href&&(e.href=`#${e.anchor}`),e.href}function Ze(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",r={type:"bookmarkStart",id:t,name:n},o=l(e,"w","colFirst");o!==void 0&&(r.colFirst=o);let a=l(e,"w","colLast");return a!==void 0&&(r.colLast=a),r}function Ke(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function on(e$1){let t={sdtType:"richText"};if(!e$1||!e$1.elements)return t;for(let n of e$1.elements){if(n.type!=="element")continue;switch(n.name?.replace(/^w:/,"")??""){case "alias":t.alias=j$1(n,"w","val")??void 0;break;case "tag":t.tag=j$1(n,"w","val")??void 0;break;case "lock":t.lock=j$1(n,"w","val")??"unlocked";break;case "placeholder":{let o=e(n,"w","docPart");if(o){let a=e(o,"w","val");t.placeholder=a?j$1(a,"w","val")??void 0:void 0;}break}case "showingPlcHdr":t.showingPlaceholder=true;break;case "text":t.sdtType="plainText";break;case "date":t.sdtType="date",t.dateFormat=j$1(n,"w","fullDate")??void 0;break;case "dropDownList":t.sdtType="dropdown",t.listItems=Qe(n);break;case "comboBox":t.sdtType="comboBox",t.listItems=Qe(n);break;case "checkbox":{t.sdtType="checkbox";let o=e(n,"w14","checked")??e(n,"w","checked");t.checked=o?j$1(o,"w14","val")==="1"||j$1(o,"w","val")==="1":false;break}case "picture":t.sdtType="picture";break;case "docPartObj":t.sdtType="buildingBlockGallery";break;case "group":t.sdtType="group";break}}return t}function Qe(e){let t=[];for(let n of e.elements??[])n.type==="element"&&(n.name==="w:listItem"||n.name?.endsWith(":listItem"))&&t.push({displayText:j$1(n,"w","displayText")??"",value:j$1(n,"w","value")??""});return t}function et(e){let t="";if(e.type==="text"&&typeof e.text=="string")return e.text;if(e.elements)for(let n of e.elements)if((n.name?.replace(/^.*:/,"")??"")==="t"&&n.elements)for(let o of n.elements)o.type==="text"&&typeof o.text=="string"&&(t+=o.text);else t+=et(n);return t}function K(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function tt(e){let t=new Set(["hyperlink","smartTag","sdt","sdtContent","fldSimple","customXml","ins","del","moveFrom","moveTo"]),n=new Set(["pPr","proofErr","bookmarkStart","bookmarkEnd","commentRangeStart","commentRangeEnd","commentReference","permStart","permEnd","rsidR"]),r=new Set(["t","tab","br","cr","sym","drawing","pict","object","softHyphen","noBreakHyphen","fldChar","instrText","pgNum","separator","continuationSeparator","footnoteRef","endnoteRef","footnoteReference","endnoteReference","ptab","monthShort","monthLong","yearShort","yearLong","dayShort","dayLong"]),o=false;function a(l){for(let f of i(l)){let c=K(f.name);if(!n.has(c)){if(c==="lastRenderedPageBreak"){o=true;continue}if(c==="r"){for(let p of i(f)){let d=K(p.name);if(d!=="rPr"){if(d==="lastRenderedPageBreak"){o=true;continue}if(d==="br"&&j$1(p,"w","type")==="page")return "forced";if(r.has(d))return "visible"}}continue}if(t.has(c)){let p=a(f);if(p!=="continue")return p;continue}return "continue"}}return "continue"}let u=a(e);return u==="forced"?true:u==="visible"?o:false}function Je(e,t){if(!e)return `w:${t}`;let n=e.indexOf(":");return n<0?t:`${e.substring(0,n+1)}${t}`}function nt(e){if(e.type!=="element")return e;let t=K(e.name),n=e.name;return t==="delText"?n=Je(e.name,"t"):t==="delInstrText"&&(n=Je(e.name,"instrText")),{...e,name:n,elements:e.elements?.map(nt)}}function Z(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,r=j$1(e,"w","author"),o=j$1(e,"w","date"),a=r?.trim()??"",u=o?.trim()??"";return {id:Number.isInteger(n)&&n>=0?n:0,author:a.length>0?a:"Unknown",date:u.length>0?u:void 0}}function an(e){return Z(e)}function rt(e$1,t,n,r){if(!e$1)return;let o=f(e$1,"w","pPrChange").map(a=>{let u=e(a,"w","pPr");return {type:"paragraphPropertyChange",info:an(a),previousFormatting:fe(u,t),currentFormatting:r}}).filter(a=>a.previousFormatting||a.currentFormatting);return o.length>0?o:void 0}function ln(e,t,n,r,o){return $e(e,t,n,r,o)}function sn(e){return Ze(e)}function un(e){return Ke(e)}function ot(e){let t=e.trim().match(/^\\?([A-Z]+)/i);if(!t)return "UNKNOWN";let n=t[1].toUpperCase();return ["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE","EDITTIME","REVNUM","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS"].includes(n)?n:"UNKNOWN"}function fn(e,t,n,r,o){let a=j$1(e,"w","instr")??"",u=ot(a),l={type:"simpleField",instruction:a,fieldType:u,content:[]},f=j$1(e,"w","fldLock");(f==="1"||f==="true")&&(l.fldLock=true);let c=j$1(e,"w","dirty");(c==="1"||c==="true")&&(l.dirty=true);let p=i(e);for(let d of p)K(d.name)==="r"&&l.content.push($(d,t,n,r,o));return l}function j(e,t,n,r,o,a,u="default"){let l=[],f=i(e),c=false,p="",d=[],b$1=[],T=false,w=false,h=false;for(let F of f){let B=K(F.name);switch(B){case "r":{let M=u==="deletion"?nt(F):F,S=$(M,t,n,o,a),m=false,C=false,E=false,y="";for(let x of S.content)x.type==="fieldChar"?x.charType==="begin"?(m=true,x.fldLock&&(w=true),x.dirty&&(h=true)):x.charType==="separate"?C=true:x.charType==="end"&&(E=true):x.type==="instrText"&&(y+=x.text);if(m&&(c=true,T=false,p="",d=[],b$1=[],w=false,h=false),c){if(y&&(p+=y),C&&(T=true),T&&!E?C||b$1.push(S):!T&&!m&&d.push(S),E){let x={type:"complexField",instruction:p.trim(),fieldType:ot(p),fieldCode:d,fieldResult:b$1};w&&(x.fldLock=true),h&&(x.dirty=true),l.push(x),c=false;}}else l.push(S);break}case "hyperlink":l.push(ln(F,o,t,n,a));break;case "bookmarkStart":l.push(sn(F));break;case "bookmarkEnd":l.push(un(F));break;case "fldSimple":l.push(fn(F,t,n,o,a));break;case "pPr":break;case "proofErr":case "permStart":case "permEnd":case "customXml":break;case "sdt":{let M=(F.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtPr"||m.name?.endsWith(":sdtPr"))),S=(F.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtContent"||m.name?.endsWith(":sdtContent")));if(S){let m=j(S,t,n,null,o,a,u),E={type:"inlineSdt",properties:on(M??null),content:m.filter(y=>y.type==="run"||y.type==="hyperlink"||y.type==="simpleField"||y.type==="complexField"||y.type==="inlineSdt"||y.type==="mathEquation")};l.push(E);}break}case "ins":{let M=Z(F),S=j(F,t,n,null,o,a),m={type:"insertion",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "del":{let M=Z(F),S=j(F,t,n,null,o,a,"deletion"),m={type:"deletion",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveFrom":{let M=Z(F),S=j(F,t,n,null,o,a,"deletion"),m={type:"moveFrom",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveTo":{let M=Z(F),S=j(F,t,n,null,o,a),m={type:"moveTo",info:M,content:S.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "smartTag":break;case "moveFromRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10),S=j$1(F,"w","name")??"";l.push({type:"moveFromRangeStart",id:M,name:S});break}case "moveFromRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"moveFromRangeEnd",id:M});break}case "moveToRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10),S=j$1(F,"w","name")??"";l.push({type:"moveToRangeStart",id:M,name:S});break}case "moveToRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"moveToRangeEnd",id:M});break}case "commentRangeStart":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"commentRangeStart",id:M});break}case "commentRangeEnd":{let M=parseInt(j$1(F,"w","id")??"0",10);l.push({type:"commentRangeEnd",id:M});break}case "oMath":case "oMathPara":{let M=B==="oMathPara",S=b(F),m=et(F),C={type:"mathEquation",display:M?"block":"inline",ommlXml:S,plainText:m||void 0};l.push(C);break}}}return l}function cn(e){let t="";for(let n of e.content)if(n.type==="run")for(let r of n.content)r.type==="text"?t+=r.text:r.type==="tab"?t+=" ":r.type==="break"&&(r.breakType==="page"?t+="\f":t+=`
|
|
4
|
-
`);else if(n.type==="hyperlink"){for(let r of n.children)if(r.type==="run")for(let o of r.content)o.type==="text"&&(t+=o.text);}else if(n.type==="simpleField"){for(let r of n.content)if(r.type==="run")for(let o of r.content)o.type==="text"&&(t+=o.text);}else if(n.type==="complexField")for(let r of n.fieldResult)for(let o of r.content)o.type==="text"&&(t+=o.text);return t}function it(e){let t=j$1(e,"w","id");if(t==null)return null;let n=parseInt(t,10);if(Number.isNaN(n))return null;let r=j$1(e,"w","author")??"",o=j$1(e,"w","date")??void 0,a={id:n,author:r};return o&&(a.date=o),a}function V(e$1,t,n,r,o=null,a=null,u){let l={type:"paragraph",content:[]},f=j$1(e$1,"w14","paraId")??j$1(e$1,"w","paraId");f&&(l.paraId=f);let c=j$1(e$1,"w14","textId")??j$1(e$1,"w","textId");c&&(l.textId=c),!u?.inHeaderFooter&&tt(e$1)&&(l.renderedPageBreakBefore=true);let p=e(e$1,"w","pPr");if(p){l.formatting=fe(p,n),l.propertyChanges=rt(p,n,t,l.formatting);let T=e(p,"w","rPr");if(T){let h=e(T,"w","ins");if(h){let B=it(h);B&&(l.pPrIns=B);}let F=e(T,"w","del");if(F){let B=it(F);B&&(l.pPrDel=B);}}let w=e(p,"w","sectPr");w&&(l.sectionProperties=Ge(w));}let d=j(e$1,t,n,r,o,a);l.content=we(d);let b=l.formatting?.numPr;if(!b&&l.formatting?.styleId&&t){let T=t.get(l.formatting.styleId);T?.pPr?.numPr&&(b=T.pPr.numPr,l.formatting||(l.formatting={}),l.formatting.numPr=b);}if(b&&r){let{numId:T,ilvl:w=0}=b;if(T!==void 0&&T!==0){let h=r.getLevel(T,w);if(h){let F=[];for(let S=0;S<=w;S+=1){let m=r.getLevel(T,S);F.push(m?.numFmt??"decimal");}let B=r.getInstance(T),M=B?.levelOverrides?.find(S=>S.ilvl===w);if(l.listRendering={level:w,numId:T,marker:h.lvlText,isBullet:h.numFmt==="bullet",numFmt:h.numFmt,markerHidden:h.rPr?.hidden||void 0,markerFontFamily:h.rPr?.fontFamily?.ascii||h.rPr?.fontFamily?.hAnsi||void 0,markerFontSize:h.rPr?.fontSize?h.rPr.fontSize/2:void 0,markerSuffix:h.suffix,levelNumFmts:F,abstractNumId:B?.abstractNumId,startOverride:M?.startOverride},h.pPr){l.formatting||(l.formatting={});let S=p?e(p,"w","ind"):null,m=S!=null&&(j$1(S,"w","left")!==null||j$1(S,"w","start")!==null),C=y=>{let x=S?j$1(S,"w",y):null;if(x===null)return false;let P=parseInt(x,10);return Number.isNaN(P)||P!==0},E=S!=null&&(C("firstLine")||C("hanging"));!m&&h.pPr.indentLeft!==void 0&&(l.formatting.indentLeft=h.pPr.indentLeft),E||(h.pPr.indentFirstLine!==void 0&&(l.formatting.indentFirstLine=h.pPr.indentFirstLine),h.pPr.hangingIndent!==void 0&&(l.formatting.hangingIndent=h.pPr.hangingIndent));}}}}return l}function at(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tblW"));n&&(t.width=n);let r=e(e$1,"w","jc");if(r){let h=j$1(r,"w","val");(h==="left"||h==="center"||h==="right"||h==="start")&&(t.justification=h==="start"?"left":h);}let o=X(e(e$1,"w","tblCellSpacing"));o&&(t.cellSpacing=o);let a=X(e(e$1,"w","tblInd"));a&&(t.indent=a);let u=ee(e(e$1,"w","tblBorders"));u&&(t.borders=u);let l=te(e(e$1,"w","tblCellMar"));l&&(t.cellMargins=l);let f=e(e$1,"w","tblLayout");if(f){let h=j$1(f,"w","type");(h==="fixed"||h==="autofit")&&(t.layout=h);}let c=e(e$1,"w","tblStyle");if(c){let h=j$1(c,"w","val");h&&(t.styleId=h);}let p=ge(e(e$1,"w","tblLook"));p&&(t.look=p);let d=ne(e(e$1,"w","shd"));d&&(t.shading=d);let b=e(e$1,"w","tblOverlap");if(b){let h=j$1(b,"w","val");(h==="never"||h==="overlap")&&(t.overlap=h);}let T=he(e(e$1,"w","tblpPr"));if(T&&(t.floating=T),m(e(e$1,"w","bidiVisual"))&&(t.bidi=true),Object.keys(t).length!==0)return t}function pn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tblPrChange").map(r=>{let o=e(r,"w","tblPr");return {type:"tablePropertyChange",info:J(r),previousFormatting:at(o),currentFormatting:t}}).filter(r=>r.previousFormatting||r.currentFormatting);return n.length>0?n:void 0}function dn(e$1,t){if(!e$1)return;let n=f(e$1,"w","trPrChange").map(r=>{let o=e(r,"w","trPr");return {type:"tableRowPropertyChange",info:J(r),previousFormatting:lt(o),currentFormatting:t}}).filter(r=>r.previousFormatting||r.currentFormatting);return n.length>0?n:void 0}function mn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tcPrChange").map(r=>{let o=e(r,"w","tcPr");return {type:"tableCellPropertyChange",info:J(r),previousFormatting:ut(o),currentFormatting:t}}).filter(r=>r.previousFormatting||r.currentFormatting);return n.length>0?n:void 0}function gn(e$1){if(!e$1)return;let t=e(e$1,"w","ins");if(t)return {type:"tableRowInsertion",info:W(t)};let n=e(e$1,"w","del");if(n)return {type:"tableRowDeletion",info:W(n)}}function hn(e$1){if(!e$1)return;let t=e(e$1,"w","cellIns");if(t)return {type:"tableCellInsertion",info:W(t)};let n=e(e$1,"w","cellDel");if(n)return {type:"tableCellDeletion",info:W(n)};let r=e(e$1,"w","cellMerge");if(r){let o=j$1(r,"w","vMerge"),a=j$1(r,"w","vMergeOrig"),u=l=>l==="rest"||l==="cont";return {type:"tableCellMerge",info:W(r),...u(o)?{vMerge:o}:{},...u(a)?{vMergeOrig:a}:{}}}}function lt(e$1){if(!e$1)return;let t={},n=e(e$1,"w","trHeight");if(n){let f=l(n,"w","val");f!==void 0&&f>0&&(t.height={value:f,type:"dxa"});let c=j$1(n,"w","hRule");(c==="auto"||c==="atLeast"||c==="exact")&&(t.heightRule=c);}m(e(e$1,"w","tblHeader"))&&(t.header=true),m(e(e$1,"w","cantSplit"))&&(t.cantSplit=true);let a=e(e$1,"w","jc");if(a){let f=j$1(a,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}m(e(e$1,"w","hidden"))&&(t.hidden=true);let l$1=st(e(e$1,"w","cnfStyle"));if(l$1&&(t.conditionalFormat=l$1),Object.keys(t).length!==0)return t}function st(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let r=j$1(e,"w","lastRow");(r==="1"||r==="true")&&(t.lastRow=true);let o=j$1(e,"w","firstColumn");(o==="1"||o==="true")&&(t.firstColumn=true);let a=j$1(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=j$1(e,"w","oddHBand");(u==="1"||u==="true")&&(t.oddHBand=true);let l=j$1(e,"w","evenHBand");(l==="1"||l==="true")&&(t.evenHBand=true);let f=j$1(e,"w","oddVBand");(f==="1"||f==="true")&&(t.oddVBand=true);let c=j$1(e,"w","evenVBand");(c==="1"||c==="true")&&(t.evenVBand=true);let p=j$1(e,"w","firstRowFirstColumn");(p==="1"||p==="true")&&(t.nwCell=true);let d=j$1(e,"w","firstRowLastColumn");(d==="1"||d==="true")&&(t.neCell=true);let b=j$1(e,"w","lastRowFirstColumn");(b==="1"||b==="true")&&(t.swCell=true);let T=j$1(e,"w","lastRowLastColumn");(T==="1"||T==="true")&&(t.seCell=true);let w=j$1(e,"w","val");if(w&&w.length===12&&(w[0]==="1"&&(t.firstRow=true),w[1]==="1"&&(t.lastRow=true),w[2]==="1"&&(t.firstColumn=true),w[3]==="1"&&(t.lastColumn=true),w[4]==="1"&&(t.oddVBand=true),w[5]==="1"&&(t.evenVBand=true),w[6]==="1"&&(t.oddHBand=true),w[7]==="1"&&(t.evenHBand=true),w[8]==="1"&&(t.nwCell=true),w[9]==="1"&&(t.neCell=true),w[10]==="1"&&(t.swCell=true),w[11]==="1"&&(t.seCell=true)),Object.keys(t).length!==0)return t}function ut(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tcW"));n&&(t.width=n);let r=ee(e(e$1,"w","tcBorders"));r&&(t.borders=r);let o=te(e(e$1,"w","tcMar"));o&&(t.margins=o);let a=ne(e(e$1,"w","shd"));a&&(t.shading=a);let u=e(e$1,"w","vAlign");if(u){let w=j$1(u,"w","val");(w==="top"||w==="center"||w==="bottom")&&(t.verticalAlign=w);}let l$1=e(e$1,"w","textDirection");if(l$1){let w=j$1(l$1,"w","val");w&&(t.textDirection=w);}let f=e(e$1,"w","gridSpan");if(f){let w=l(f,"w","val");w!==void 0&&w>1&&(t.gridSpan=w);}let c=e(e$1,"w","vMerge");c&&(j$1(c,"w","val")==="restart"?t.vMerge="restart":t.vMerge="continue"),m(e(e$1,"w","tcFitText"))&&(t.fitText=true),m(e(e$1,"w","noWrap"))&&(t.noWrap=true),m(e(e$1,"w","hideMark"))&&(t.hideMark=true);let T=st(e(e$1,"w","cnfStyle"));if(T&&(t.conditionalFormat=T),Object.keys(t).length!==0)return t}function wn(e,t,n,r,o,a,u){let l=[],f=e.elements||[];for(let c of f){if(!c.name)continue;let p=c.name.split(":").pop();if(p==="p"){let d=V(c,t,n,r,o,a,u);l.push(d);}else if(p==="tbl"){let d=Y(c,t,n,r,o,a,u);l.push(d);}}return l.length===0&&l.push({type:"paragraph",content:[]}),l}function yn(e$1,t,n,r,o,a,u){let l={type:"tableCell",content:[]},f=e(e$1,"w","tcPr"),c=ut(f);return c&&(l.formatting=c),l.propertyChanges=mn(f,c),l.structuralChange=hn(f),l.content=wn(e$1,t,n,r,o,a,u),l}function bn(e$1,t,n,r,o,a,u){let l={type:"tableRow",cells:[]},f$1=e(e$1,"w","trPr"),c=lt(f$1);c&&(l.formatting=c),l.propertyChanges=dn(f$1,c),l.structuralChange=gn(f$1);let p=f(e$1,"w","tc");for(let d of p){let b=yn(d,t,n,r,o,a,u);l.cells.push(b);}return l}function Tn(e){if(!e)return;let t=[],n=f(e,"w","gridCol");for(let r of n){let o=l(r,"w","w")??0;t.push(o);}if(!(t.length>0&&t.every(r=>r<=0)))return t.length>0?t:void 0}function Fn(e){return e.cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function Cn(e){let t=Math.max(e.columnWidths?.length??0,...e.rows.map(n=>Fn(n)));if(!(t<=1))for(let n of e.rows){if(n.cells.length!==1)continue;let r=n.cells[0];(r.formatting?.gridSpan??1)>=t||r.formatting?.vMerge||r.formatting?.gridSpan==null&&(r.formatting={...r.formatting??{},gridSpan:t});}}function Y(e$1,t,n,r,o,a,u){let l={type:"table",rows:[]},f$1=e(e$1,"w","tblPr"),c=at(f$1);c&&(l.formatting=c),l.propertyChanges=pn(f$1,c);let p=Tn(e(e$1,"w","tblGrid"));p&&(l.columnWidths=p);let d=f(e$1,"w","tr");for(let b of d){let T=bn(b,t,n,r,o,a,u);l.rows.push(T);}return Cn(l),l}export{_n as A,Ge as B,Qn as C,Jn as D,$ as E,$e as F,pr as G,dr as H,mr as I,gr as J,hr as K,wr as L,yr as M,cn as N,V as O,Sn as a,_ as b,Ne as c,D as d,ee as e,te as f,ne as g,ge as h,he as i,gt as j,ht as k,wt as l,yt as m,bt as n,at as o,Tt as p,re as q,Ln as r,Xn as s,jn as t,zn as u,je as v,ze as w,Un as x,Gn as y,qn as z};
|
package/dist/chunk-RFVFX5WK.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-V5VDCQDN.mjs';import {f,d,e,h}from'./chunk-MP4QSEO2.mjs';import {r,s,t,O as O$1,E,F,p,v}from'./chunk-6Y6LON6Y.mjs';import {a as a$1,c as c$2}from'./chunk-7E5VBRDL.mjs';import {x}from'./chunk-RFC2SXZ6.mjs';import {c}from'./chunk-FEWCI2E5.mjs';import {c as c$3}from'./chunk-MOKKS75W.mjs';import {a}from'./chunk-AMENZY5F.mjs';import {i,e as e$1}from'./chunk-VW22RZ6C.mjs';var Y={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function ft(e){return e.kind==="paragraph"}function gt(e){return e.kind==="table"}function mt(e){return e.kind==="image"}function le(e){e.style.position="absolute",e.style.overflow="hidden";}function ht(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.paragraph}`,le(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function ut(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.table}`,le(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function yt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.image}`,le(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function Te(e,t,n={}){let o=n.document??document;if(ft(e))return ht(e,t,o);if(gt(e))return ut(e,t,o);if(mt(e))return yt(e,t,o);let r=o.createElement("div");r.className=Y.fragment,le(r);let a=e;return a.blockId!==void 0&&(r.dataset.blockId=String(a.blockId)),a.kind&&(r.dataset.kind=a.kind),r}var L={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function z(e){return e.kind==="text"}function O(e){return e.kind==="tab"}function G(e){return e.kind==="image"}function j(e){return e.kind==="lineBreak"}function U(e){return e.kind==="field"}var Ke={image:"layout-image",imageAnchored:"layout-image-anchored"};function te(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function ne(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,a=t.cropLeft??0;(n||o||r||a)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${a*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function Z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=Ke.image,e.isAnchored&&i.classList.add(Ke.imageAnchored),i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",e.zIndex!==void 0&&(i.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(i.style.zIndex="-1"),i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let c=a.createElement("img");if(c.src=t.src,c.alt=t.alt??"",c.style.width="100%",c.style.height="100%",c.style.objectFit="contain",c.style.display="block",t.transform&&(c.style.transform=t.transform),c.draggable=false,t.hlinkHref){let s=a.createElement("a");s.href=t.hlinkHref,s.target="_blank",s.rel="noopener noreferrer",s.style.display="block",s.style.width="100%",s.style.height="100%",s.appendChild(c),i.appendChild(s);}else i.appendChild(c);return i}function bt(e,t,n){if(t.fontFamily&&(e.style.fontFamily=a(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",a=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=a,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=a;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(a=>!n||!n.has(a));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function V(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function oe(e,t,n){let o=t.createElement("span");if(o.className=`${L.run} ${L.text}`,bt(o,e,n),V(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text,r.style.color="inherit",r.style.textDecoration="inherit",e.hyperlink.noDefaultStyle||(e.color||(r.style.color="#0563c1",o.style.color="#0563c1"),e.underline||(r.style.textDecoration="underline")),o.appendChild(r);}else o.textContent=e.text;return o}var xt=1e3;function de(e,t,n,o){let r=t.createElement("span");r.className=`${L.run} ${L.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,V(r,e.pmStart,e.pmEnd);let a=o&&o!=="none"?St(o):null;if(a){r.style.position="relative",r.textContent="\u200B";let i=t.createElement("span");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i.textContent=a.repeat(xt),r.appendChild(i);}else r.textContent="\xA0";return r}function St(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function Xe(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ze(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),a=Math.abs(Math.cos(o));return {w:e*a+t*r,h:e*r+t*a}}function Ye(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function kt(e,t){let n=t.createElement("img");n.className=`${L.run} ${L.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),te(e)&&ne(n,e);let o=Xe(e.transform);if(o!==0){let r=Ze(e.width,e.height,o),a=t.createElement("span");return a.style.display="inline-block",a.style.position="relative",a.style.width=`${r.w}px`,a.style.height=`${r.h}px`,a.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,Ye(a,e),V(a,e.pmStart,e.pmEnd),a.appendChild(n),a}return n.style.display="inline-block",n.style.verticalAlign="middle",Ye(n,e),V(n,e.pmStart,e.pmEnd),n}function Ue(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),te(e)&&ne(o,e);let r=Xe(e.transform);if(r!==0){let a=Ze(e.width,e.height,r);n.style.height=`${a.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return V(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function pe(e,t){let n;return f(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?n=Ue(e,t):n=kt(e,t),Tt(n,e),n}function Tt(e,t){if(t.isInsertion)e.style.outline="2px solid #2e7d32",e.style.outlineOffset="1px",e.classList.add("docx-insertion");else if(t.isDeletion)e.style.outline="2px solid #c62828",e.style.outlineOffset="1px",e.style.opacity="0.6",e.classList.add("docx-deletion");else return;t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId));}function we(e,t){let n=t.createElement("br");return n.className=`${L.run} ${L.lineBreak}`,V(n,e.pmStart,e.pmEnd),n}function ce(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={...e,text:o};return oe(r,t,n?.resolvedCommentIds)}function Fe(e,t,n){if(z(e))return oe(e,t,n?.resolvedCommentIds);if(O(e))return de(e,t,48,void 0);if(G(e))return pe(e,t);if(j(e))return we(e,t);if(U(e)&&n)return ce(e,t,n);let o=t.createElement("span");return o.className=L.run,o}function Qe(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let a=o[r];if(a)if(z(a)){let i=r===t.fromRun?t.fromChar:0,c=r===t.toRun?t.toChar:a.text.length;if(i>0||c<a.text.length){let s=a.text.slice(i,c);n.push({...a,text:s,pmStart:a.pmStart!==void 0?a.pmStart+i:void 0,pmEnd:a.pmStart!==void 0?a.pmStart+c:void 0});}else n.push(a);}else n.push(a);}return n}function qe(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function Je(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function wt(e){return {val:e.val,pos:e.pos,leader:e.leader}}function Ft(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let a=e[r];if(z(a))o+=a.text;else if(U(a))a.fieldType==="PAGE"&&n?o+=String(n.pageNumber):a.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=a.fallback??"";else if(O(a)||j(a))break}return o}var It=.5;function Ct(e,t,n,o){let r=0;for(let a=t+1;a<e.length;a++){let i=e[a];if(O(i)||j(i))break;if(z(i))r+=n(i.text||"",i.fontSize,i.fontFamily,i.bold,i.italic);else if(U(i)){let c;i.fieldType==="PAGE"&&o?c=String(o.pageNumber):i.fieldType==="NUMPAGES"&&o?c=String(o.totalPages):c=i.fallback??"",r+=n(c,i.fontSize,i.fontFamily,i.bold,i.italic);}else G(i)&&!f(i)&&(r+=i.width||0);}return r}function Rt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,a$1="Calibri",i=false,c=false)=>{if(!n)return o.length*7;let s=a(a$1).cssFallback,m=r*96/72,l=[];return c&&l.push("italic"),i&&l.push("bold"),l.push(`${m}px`,s),n.font=l.join(" "),n.measureText(o).width}}function fe(e,t,n,o,r$1){let a=o.createElement("div");a.className=L.line,a.style.height=`${t.lineHeight}px`,a.style.lineHeight=`${t.lineHeight}px`;let i=Qe(e,t);if(i.length===1&&G(i[0])){let p=i[0].position?.horizontal?.align??n;a.style.display="flex",a.style.alignItems="center",a.style.justifyContent=qe(p),a.dataset.flexLine="true";}else i.some(G)&&(a.style.display="flex",a.style.alignItems="baseline",a.style.justifyContent=qe(n),a.style.lineHeight="normal",a.dataset.flexLine="true");if(i.length===0){let u=o.createElement("span");return u.className=`${L.run} layout-empty-run`,u.innerHTML=" ",a.appendChild(u),a}let c=n==="justify",s=false;c&&r$1&&(s=!r$1.isLastLine||r$1.paragraphEndsWithLineBreak,s&&(a.style.textAlign="justify",a.style.textAlignLast="justify",a.style.width=`${r$1.availableWidth}px`)),a.style.whiteSpace="pre";let m=i.some(u=>z(u)&&u.highlight);a.style.overflow=m?"hidden":"visible";let l=i.some(O),x,h=Rt(o);if(l){let u=r$1?.tabStops?.map(wt),g=r$1?.leftIndentPx?Math.round(r$1.leftIndentPx*15):0;x={explicitStops:u,leftIndent:g};}let y=0,k=r$1?.leftIndentPx??0;if(r$1?.isFirstLine){let u=r$1?.firstLineIndentPx??0;y=k+u;}else y=k;for(let u=0;u<i.length;u++){let g=i[u];if(O(g)&&x){let p=Ct(i,u,h,r$1?.context),b=Ft(i,u,r$1?.context),d=b.indexOf("."),f$1=d>=0?h(b.slice(0,d)):0,w=r(y,x,{followingWidth:p,decimalPrefixWidth:f$1}),S=r$1?.lineRightEdgePx,T=p,P=false;for(let R=u+1;R<i.length&&!j(i[R]);R++)if(O(i[R])){P=true;break}if(S!==void 0&&w.alignment==="end"&&!P&&y+w.width+T>=S-It){a.style.display="flex",a.style.alignItems="baseline",a.style.whiteSpace="nowrap",a.style.textIndent="0",a.dataset.flexLine="true",r$1?.isFirstLine&&r$1.firstLineIndentPx&&r$1.firstLineIndentPx<0&&a.firstElementChild instanceof HTMLElement&&(a.firstElementChild.style.marginLeft=`${r$1.firstLineIndentPx}px`);let R=de(g,o,0,w.leader);R.style.flex="1 1 0",R.style.minWidth="0",R.style.width="auto",a.appendChild(R);for(let A=u+1;A<i.length;A++){let E=i[A];if(O(E)||j(E))break;if(z(E))a.appendChild(oe(E,o,r$1?.context?.resolvedCommentIds));else if(U(E)&&r$1?.context)a.appendChild(ce(E,o,r$1.context));else if(G(E)){if(f(E))continue;let Q=Je(E);r$1?.renderedInlineImageKeys?.has(Q)||(r$1?.renderedInlineImageKeys?.add(Q),a.appendChild(pe(E,o)));}else a.appendChild(Fe(E,o,r$1?.context));}break}let I=w.width;S!==void 0&&y+I+T>S&&(I=Math.max(1,S-y-T));let C=de(g,o,I,w.leader);a.appendChild(C),y+=I;}else if(z(g)){let p=oe(g,o,r$1?.context?.resolvedCommentIds);if(g.highlight){let w=(g.fontSize?g.fontSize*96/72:14.67)*1.2,S=Math.max(0,t.lineHeight-w);if(S>0){let T=S/2;p.style.paddingTop=`${T}px`,p.style.paddingBottom=`${T}px`;}}a.appendChild(p);let b=g.fontSize||11,d=g.fontFamily||"Calibri";y+=h(g.text,b,d,g.bold,g.italic);}else if(G(g)){if(f(g))continue;let p=Je(g);if(r$1?.renderedInlineImageKeys?.has(p))continue;r$1?.renderedInlineImageKeys?.add(p);let b=pe(g,o);a.appendChild(b),g.displayMode!=="block"&&g.wrapType!=="topAndBottom"&&(y+=g.width);}else if(j(g)){let p=we(g,o);a.appendChild(p);}else if(U(g)&&r$1?.context){let p=ce(g,o,r$1.context);a.appendChild(p);let b=g.fallback??"";g.fieldType==="PAGE"?b=String(r$1.context.pageNumber):g.fieldType==="NUMPAGES"&&(b=String(r$1.context.totalPages));let d=g.fontSize||11,f=g.fontFamily||"Calibri";y+=h(b,d,f,g.bold,g.italic);}else {let p=Fe(g,o,r$1?.context);a.appendChild(p);}}return a}function re(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function et(e,t){return !e&&!t||!e||!t?false:re(e.top,t.top)&&re(e.bottom,t.bottom)&&re(e.left,t.left)&&re(e.right,t.right)&&re(e.between,t.between)}function H(e,t$1,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=L.fragment,i.style.position=o.positioning==="absolute"?"absolute":"relative",i.dataset.blockId=String(e.blockId),i.dataset.fromLine=String(e.fromLine),i.dataset.toLine=String(e.toLine),V(i,e.pmStart,e.pmEnd),e.continuesFromPrev&&(i.dataset.continuesFromPrev="true"),e.continuesOnNext&&(i.dataset.continuesOnNext="true");let c=t$1.attrs?.pPrIns,s$1=t$1.attrs?.pPrDel;if(c||s$1){let S=c??s$1;i.classList.add("layout-revision-pmark"),i.classList.add(c?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionId=String(S.revisionId),i.dataset.revisionAuthor=S.author,S.date&&(i.dataset.revisionDate=S.date);}let m=n.lines.slice(e.fromLine,e.toLine),l=t$1.attrs?.alignment;t$1.attrs?.styleId&&(i.dataset.styleId=t$1.attrs.styleId);let x=t$1.attrs?.bidi;x&&(i.dir="rtl"),l?l==="center"?i.style.textAlign="center":l==="right"?i.style.textAlign="right":l==="left"?i.style.textAlign="left":i.style.textAlign=x?"right":"left":x&&(i.style.textAlign="right");let h=t$1.attrs?.indent,y=0,k=0;h&&(x?(h.left&&h.left>0&&(k=h.left),h.right&&h.right>0&&(y=h.right)):(h.left&&h.left>0&&(y=h.left),h.right&&h.right>0&&(k=h.right)));let u=t$1.attrs?.borders;if(u){let S=E=>{switch(E){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};i.style.boxSizing="border-box";let T=E=>`${E.width}px ${S(E.style)} ${E.color}`,P=et(r.prevBorders,u),F=et(u,r.nextBorders),I=P?u.between:u.top,C=F?void 0:u.bottom,R=a.createElement("div");if(R.className="layout-paragraph-border",R.style.position="absolute",R.style.pointerEvents="none",R.style.boxSizing="border-box",R.style.left=`${y-(u.left?.space??0)}px`,R.style.right=`${k-(u.right?.space??0)}px`,R.style.top=`${-(I?.space??0)}px`,R.style.bottom=`${-(C?.space??0)}px`,I&&(R.style.borderTop=T(I)),C&&(R.style.borderBottom=T(C)),u.left&&(R.style.borderLeft=T(u.left)),u.right&&(R.style.borderRight=T(u.right)),(I||C||u.left||u.right)&&i.appendChild(R),u.bar){let E=a.createElement("div");E.style.position="absolute",E.style.left="-8px",E.style.top="0",E.style.bottom="0",E.style.borderLeft=T(u.bar),i.style.position="relative",i.appendChild(E);}}t$1.attrs?.shading&&(i.style.backgroundColor=t$1.attrs.shading);let g=e.width-y-k,b=t$1.runs[t$1.runs.length-1]?.kind==="lineBreak",d=n.lines.length,f=0;h?.hanging&&h.hanging>0?f=-h.hanging:h?.firstLine&&h.firstLine>0&&(f=h.firstLine);let w=r.renderedInlineImageKeys??new Set;for(let S=0;S<m.length;S++){let T=m[S],P=e.fromLine+S,F=P===d-1,I=P===0&&!e.continuesFromPrev,C=T.leftOffset??0,R=T.rightOffset??0,A=g;if(I){let v=h?.hanging&&h.hanging>0,B=h?.firstLine&&h.firstLine>0;v&&h?.hanging?A=g+h.hanging:B&&h?.firstLine&&(A=g-h.firstLine);}if(Et(T,t$1)){let v=a.createElement("div");v.className=`${L.line} layout-line-split`,v.style.position="relative",v.style.height=`${T.lineHeight}px`,v.style.lineHeight=`${T.lineHeight}px`;for(let B of T.segments){let Se={fromRun:B.fromRun,fromChar:B.fromChar,toRun:B.toRun,toChar:B.toChar,width:B.width,ascent:T.ascent,descent:T.descent,lineHeight:T.lineHeight},_=fe(t$1,Se,l,a,{availableWidth:B.availableWidth,isLastLine:F,isFirstLine:I,paragraphEndsWithLineBreak:b,tabStops:t$1.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:I?f:0,context:o,renderedInlineImageKeys:w});_.className+=" layout-line-segment",_.style.position="absolute",_.style.left=`${B.leftOffset}px`,_.style.top="0",_.style.width=`${B.availableWidth}px`,v.appendChild(_);}i.appendChild(v);continue}let E=fe(t$1,T,l,a,{availableWidth:A-C-R,isLastLine:F,isFirstLine:I,paragraphEndsWithLineBreak:b,tabStops:t$1.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:I?f:0,context:o,renderedInlineImageKeys:w,lineRightEdgePx:e.width-k-R});if(C>0||R>0){C>0&&(E.style.marginLeft=`${C}px`),R>0&&(E.style.marginRight=`${R}px`);let v=A-C-R;v>0&&(E.style.width=`${v}px`);}T.floatSkipBefore&&T.floatSkipBefore>0&&(E.style.marginTop=`${T.floatSkipBefore}px`);let Q=h?.hanging&&h.hanging>0,Be=h?.firstLine&&h.firstLine>0,dt=E.dataset.flexLine==="true";if(I?y>0&&Q?(E.style.paddingLeft=`${y}px`,dt||(E.style.textIndent=`-${h.hanging}px`)):y>0&&Be?(E.style.paddingLeft=`${y}px`,E.style.textIndent=`${h.firstLine}px`):y>0?E.style.paddingLeft=`${y}px`:Be&&(E.style.textIndent=`${h.firstLine}px`):y>0?E.style.paddingLeft=`${y}px`:Q&&(E.style.paddingLeft=`${h.hanging}px`),k>0&&(E.style.paddingRight=`${k}px`),I&&t$1.attrs?.listMarker&&!t$1.attrs?.listMarkerHidden){let v=h?.hanging??0,B=h?.firstLine??0,Se=v>0?Math.max(0,y-v):y+B;E.style.paddingLeft=`${Se}px`,E.style.textIndent="0";let{fontFamily:_,fontSize:pt}=s(t$1),ct=Pt(t$1.attrs.listMarker,t(t$1),a,_,pt,t$1.attrs.listMarkerRevision);E.insertBefore(ct,E.firstChild);}i.appendChild(E);}if((c||s$1)&&!e.continuesOnNext){let S=i.lastElementChild;if(S){let T=a.createElement("span");T.className="layout-revision-pmark-glyph",c?T.classList.add("layout-revision-ins"):T.classList.add("layout-revision-del"),T.textContent="\xB6",T.setAttribute("aria-hidden","true"),S.appendChild(T);}}return i}function Et(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function Pt(e,t,n,o,r,a$1){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=a(o).cssFallback,i.style.fontSize=`${r*96/72}px`,i.style.textAlign="left",i.style.boxSizing="border-box",i.style.display="inline-block",i.style.minWidth=`${t}px`,i.textContent=e,a$1==="ins"?i.style.color="#2e7d32":a$1==="del"&&(i.style.color="#c62828",i.style.textDecoration="line-through"),i}function X(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let a=t.createElement("div");a.className=n.itemClass,a.style.position="absolute",a.style.pointerEvents="auto",a.style.top=`${r.y}px`,a.style.left=`${r.x}px`,r.pmStart!==void 0&&(a.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(a.dataset.pmEnd=String(r.pmEnd));let i=t.createElement("img");i.src=r.src,i.style.width=`${r.width}px`,i.style.height=`${r.height}px`,i.style.display="block",r.alt&&(i.alt=r.alt),r.transform&&(i.style.transform=r.transform,i.style.transformOrigin="center center"),te(r)&&ne(i,r),a.appendChild(i),o.appendChild(a);}return o}function Ie(e,t,n,o){e.classList.add(`ep-revision-${t}`,`ep-revision-${n}`),e.dataset.revisionId=String(o.revisionId),e.dataset.revisionAuthor=o.author,o.date&&(e.dataset.revisionDate=o.date);}var D={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function Lt(e,t,n){let o=[],r=0;for(let a=0;a<e.blocks.length;a++){let i=e.blocks[a];if(i?.kind!=="paragraph"){let m=t.blocks[a];m&&m.kind==="table"&&(r+=m.totalHeight??0);continue}let c=i;for(let m of c.runs){if(m.kind!=="image")continue;let l=m;if(!f(l))continue;let x=l.position,h$1=l.distTop??0,y=l.distBottom??0,k=l.distLeft??12,u=l.distRight??12,g="left",p=0;if(x?.horizontal){let d=x.horizontal;d.align==="right"?(g="right",p=n-l.width):d.align==="left"?p=0:d.align==="center"?p=(n-l.width)/2:d.posOffset!==void 0&&(p=e$1(d.posOffset),g=p>n/2?"right":"left");}else l.cssFloat==="right"&&(g="right",p=n-l.width);let b=r;if(x?.vertical){let d=x.vertical;d.posOffset!==void 0?b=r+e$1(d.posOffset):d.align==="top"&&(b=0);}p=Math.max(0,Math.min(p,n-l.width)),o.push({src:l.src,width:l.width,height:l.height,alt:l.alt,transform:l.transform,x:p,y:b,side:g,distTop:h$1,distBottom:y,distLeft:k,distRight:u,wrapText:h(l.cssFloat),wrapType:l.wrapType,pmStart:l.pmStart,pmEnd:l.pmEnd});}let s=t.blocks[a];s&&s.kind==="paragraph"&&(r+=s.totalHeight);}return o}function vt(e$1,t,n,o){let r=o.createElement("div");r.className=D.cellContent,r.style.position="relative";let a=e$1.padding?.left??7,i=e$1.padding?.right??7,c=Math.max(0,t.width-a-i);r.style.width=`${c}px`;let s=Lt(e$1,t,c),m;if(s.length>0){m=s.filter(d).map(k=>{let u=k.x+k.width+k.distRight,g=k.y-k.distTop,p=k.y+k.height+k.distBottom,b=0,d=0,f=k.wrapText??"bothSides";return f==="right"?b=u:f==="left"?d=c-(k.x-k.distLeft):k.side==="left"?b=u:d=c-(k.x-k.distLeft),{leftMargin:b,rightMargin:d,topY:g,bottomY:p}});let y=s.filter(e);y.length>0&&r.appendChild(X(y,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let l=0,x=0;for(let y=0;y<e$1.blocks.length;y++){let k=e$1.blocks[y],u=t.blocks[y];if(k?.kind==="paragraph"&&u?.kind==="paragraph"){let g=k,p=u,b=g.attrs?.spacing,d=Math.max(x,b?.before??0);l+=d,m&&m.length>0&&(p=v(g,c,{floatingZones:m,paragraphYOffset:l}));let f={blockId:g.id,width:c,height:p.totalHeight,fromLine:0,toLine:p.lines.length,pmStart:g.pmStart,pmEnd:g.pmEnd},w={...n,insideTableCell:true},S=H(f,g,p,w,{document:o});S.style.position="relative",d>0&&(S.style.marginTop=`${d}px`),r.appendChild(S),l+=p.totalHeight,x=b?.after??0;}else if(k?.kind==="table"&&u?.kind==="table"){let g=k,p=u,b=x,d=Bt(g,p,n,o);d.style.position="relative",b>0&&(d.style.marginTop=`${b}px`),r.appendChild(d),l+=b+(u.totalHeight??0),x=0;}}x>0&&(r.style.paddingBottom=`${x}px`);let h=s.filter(y=>!e(y));return h.length>0&&r.appendChild(X(h,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Bt(e,t,n,o){let r=o.createElement("div");r.className=`${D.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let a=e.rows[0],i=a?.trackedIns,c=a?.trackedDel,s=(k,u)=>!!k&&!!u&&(k.author??"")===(u.author??"")&&(k.date??null)===(u.date??null),m=e.rows.length>0&&e.rows.every(k=>i?s(k.trackedIns,i):c?s(k.trackedDel,c):false);if(m){let k=i??c,u=i?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${u}`),r.dataset.revisionId=String(k.revisionId),r.dataset.revisionAuthor=k.author,k.date&&(r.dataset.revisionDate=k.date);}let l=[],x=0;for(let k=0;k<t.rows.length;k++)l.push(x),x+=t.rows[k]?.height??0;l.push(x);let h=new Map,y=0;for(let k=0;k<e.rows.length;k++){let u=e.rows[k],g=t.rows[k];if(!u||!g)continue;let p=Ce(u,g,k,y,t.columnWidths,e.rows.length,n,o,h,l,void 0,m);r.appendChild(p),y+=g.height;}return r.style.height=`${y}px`,r}function ge(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,a=n.color??"#000000",i=n.style??"solid";e.style[o]=`${r}px ${i} ${a}`;}}function Mt(e,t,n,o,r,a,i,c){let s=i.createElement("div");s.className=D.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==c&&Ie(s,"cell",e.trackedMarker.kind,e.trackedMarker.info),s.style.position="absolute",s.style.left=`${n}px`,s.style.top="0",s.style.width=`${t.width}px`,s.style.height=`${o}px`,s.style.overflow="hidden",s.style.boxSizing="border-box";let m=e.padding?.top??1,l=e.padding?.right??7,x=e.padding?.bottom??1,h=e.padding?.left??7;if(s.style.padding=`${m}px ${l}px ${x}px ${h}px`,e.borders&&(r.isFirstRow&&ge(s,"top",e.borders.top),ge(s,"right",e.borders.right),ge(s,"bottom",e.borders.bottom),r.isFirstCol&&ge(s,"left",e.borders.left)),e.background&&(s.style.backgroundColor=e.background),e.noWrap&&(s.style.whiteSpace="nowrap"),e.verticalAlign)switch(s.style.display="flex",s.style.flexDirection="column",e.verticalAlign){case "top":s.style.justifyContent="flex-start";break;case "center":s.style.justifyContent="center";break;case "bottom":s.style.justifyContent="flex-end";break}let y=vt(e,t,a,i);if(s.appendChild(y),e.blocks.length>0){let k=e.blocks[0],u=e.blocks[e.blocks.length-1];k&&"pmStart"in k&&k.pmStart!==void 0&&(s.dataset.pmStart=String(k.pmStart)),u&&"pmEnd"in u&&u.pmEnd!==void 0&&(s.dataset.pmEnd=String(u.pmEnd));}return s}function Ce(e,t,n,o,r,a,i,c,s,m,l,x){let h=c.createElement("div");h.className=D.row,x||(e.trackedDel?Ie(h,"row","del",e.trackedDel):e.trackedIns&&Ie(h,"row","ins",e.trackedIns)),h.style.position="absolute",h.style.left="0",h.style.top=`${o}px`,h.style.width="100%",h.style.height=`${t.height}px`,h.dataset.rowIndex=String(n);let y=new Set;if(s){for(let[,g]of s)if(g.startRow<n&&g.startRow+g.rowSpan>n)for(let p=0;p<g.colSpan;p++)y.add(g.columnIndex+p);}let k=0,u=0;for(;y.has(u);)k+=r[u]??0,u++;for(let g=0;g<e.cells.length;g++){let p=e.cells[g],b=t.cells[g];if(!p||!b)continue;let d=p.colSpan??1,f=p.rowSpan??1,w=t.height;if(f>1&&m){w=0;for(let C=n;C<n+f&&C<m.length-1;C++)w+=(m[C+1]??0)-(m[C]??0);w===0&&(w=t.height*f);}let S=n===0||l===true,P=u===0;u+d>=r.length;let I=Mt(p,b,k,w,{isFirstRow:S,isFirstCol:P},i,c,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(I.dataset.cellIndex=String(g),I.dataset.columnIndex=String(u),f>1&&(I.dataset.rowSpan=String(f)),h.appendChild(I),f>1&&s){let C=`${n}-${u}`;s.set(C,{cell:p,cellMeasure:b,columnIndex:u,startRow:n,rowSpan:f,colSpan:d,x:k,totalHeight:w});}for(let C=0;C<d&&u+C<r.length;C++)k+=r[u+C]??0;for(u+=d;y.has(u);)k+=r[u]??0,u++;}return h}function q(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=D.table,i.style.position=o.positioning==="flow"?"relative":"absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.dataset.blockId=String(e.blockId),i.dataset.fromRow=String(e.fromRow),i.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let c=t.rows[0],s=c?.trackedIns,m=c?.trackedDel,l=(d,f)=>!!d&&!!f&&(d.author??"")===(f.author??"")&&(d.date??null)===(f.date??null),x=t.rows.length>0&&t.rows.every(d=>s?l(d.trackedIns,s):m?l(d.trackedDel,m):false);if(x){let d=s??m,f=s?"ins":"del";i.classList.add("ep-revision-table",`ep-revision-${f}`),i.dataset.revisionId=String(d.revisionId),i.dataset.revisionAuthor=d.author,d.date&&(i.dataset.revisionDate=d.date),i.style.overflow="visible";}let h=0;for(let d=0;d<n.columnWidths.length-1;d++){h+=n.columnWidths[d]??0;let f=a.createElement("div");f.className=D.resizeHandle,f.style.position="absolute",f.style.left=`${h-3}px`,f.style.top="0",f.style.width="6px",f.style.height="100%",f.style.cursor="col-resize",f.style.zIndex="10",f.dataset.columnIndex=String(d),f.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),i.appendChild(f);}let y=[],k=0;for(let d=0;d<n.rows.length;d++)y.push(k),k+=n.rows[d]?.height??0;y.push(k);let u=new Map,g=e.headerRowCount??0,p=0;if(g>0&&e.continuesFromPrev)for(let d=0;d<g;d++){let f=t.rows[d],w=n.rows[d];if(!f||!w)continue;let S=Ce(f,w,d,p,n.columnWidths,t.rows.length,o,a,u,y,d===0,x);S.dataset.repeatedHeader="true",i.appendChild(S),p+=w.height;}for(let d=e.fromRow;d<e.toRow;d++){let f=t.rows[d],w=n.rows[d];if(!f||!w)continue;let S=g>0&&e.continuesFromPrev?false:e.continuesFromPrev&&d===e.fromRow,T=Ce(f,w,d,p,n.columnWidths,t.rows.length,o,a,u,y,S,x);i.appendChild(T),p+=w.height;}let b=0;for(let d=e.fromRow;d<e.toRow;d++)if(b+=n.rows[d]?.height??0,d<e.toRow-1){let f=a.createElement("div");f.className=D.rowResizeHandle,f.style.position="absolute",f.style.left="0",f.style.top=`${b-3}px`,f.style.width="100%",f.style.height="6px",f.style.cursor="row-resize",f.style.zIndex="10",f.dataset.rowIndex=String(d),f.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),i.appendChild(f);}if(e.toRow===t.rows.length){let d=a.createElement("div");d.className=D.tableEdgeHandleBottom,d.style.position="absolute",d.style.left="0",d.style.top=`${b-3}px`,d.style.width="100%",d.style.height="6px",d.style.cursor="row-resize",d.style.zIndex="10",d.dataset.rowIndex=String(t.rows.length-1),d.dataset.tableBlockId=String(e.blockId),d.dataset.isEdge="bottom",e.pmStart!==void 0&&(d.dataset.tablePmStart=String(e.pmStart)),i.appendChild(d);}if(e.toRow===t.rows.length){let d=n.columnWidths.reduce((w,S)=>w+S,0),f=a.createElement("div");f.className=D.tableEdgeHandleRight,f.style.position="absolute",f.style.left=`${d-3}px`,f.style.top="0",f.style.width="6px",f.style.height="100%",f.style.cursor="col-resize",f.style.zIndex="10",f.dataset.columnIndex=String(n.columnWidths.length-1),f.dataset.tableBlockId=String(e.blockId),f.dataset.isEdge="right",e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),i.appendChild(f);}return i}var $t={textBox:"layout-textbox"};function J(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");if(i.className=$t.textBox,i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.style.boxSizing="border-box",Ht(i,e),t.fillColor&&(i.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let l=t.outlineStyle||"solid",x=t.outlineColor||"#000000";i.style.border=`${t.outlineWidth}px ${l} ${x}`;}let c=t.margins??a$1;i.style.padding=`${c.top}px ${c.right}px ${c.bottom}px ${c.left}px`,i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let s=e.width-c.left-c.right,m=0;for(let l=0;l<t.content.length;l++){let x=t.content[l],h=n.innerMeasures[l];if(!h)continue;let y={blockId:x.id,width:s,height:h.totalHeight,pmStart:x.pmStart,pmEnd:x.pmEnd,fromLine:0,toLine:h.lines.length},k=H(y,x,h,{...o,positioning:"flow"},{document:a});i.appendChild(k),m+=h.totalHeight;}return i}function Ht(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function tt(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Re(e,t,n,o){let{x:r,side:a}=At(e,n,o),i=Ot(e,t,o);return {x:r,y:i,side:a}}function At(e,t,n){let o=e.position?.horizontal;if(!o)return e.cssFloat==="right"?{x:t-e.width,side:"right"}:{x:0,side:"left"};let r=zt(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e.width)/2:0,side:"left"};if(o.posOffset!==void 0){let a=r.base+e$1(o.posOffset);return {x:a,side:a>t/2?"right":"left"}}return {x:r.base,side:"left"}}function zt(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function Ot(e,t,n){let o=e.position?.vertical;if(!o)return t;let r=Dt(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e.height:t:o.posOffset!==void 0?r.base+e$1(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function Dt(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,a=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:a,size:r};default:return {base:0,size:a}}}function nt(e){return e?.align??e?.alignment}function Nt(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=nt(n),r=n.posOffset!==void 0?e$1(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e.height-t.flowTop;if(o==="center")return (t.pageHeight-e.height)/2-t.flowTop}if(n.relativeTo==="margin"){let a=t.margins.top,i=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return a+r-t.flowTop;if(o==="top")return a-t.flowTop;if(o==="bottom")return a+i-e.height-t.flowTop;if(o==="center")return a+(i-e.height)/2-t.flowTop}return r!==void 0?e.paragraphY+r:e.paragraphY}function _t(e,t,n){let o=t.position.horizontal;if(!o){e.style.left="0";return}let r=nt(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e.style.left=`${e$1(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e.style.left=`${e$1(o.posOffset)}px`;return}if(r==="right"){e.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e.style.left=`${(n.contentWidth-t.width)/2}px`;return}e.style.left="0";}function ot(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Ee(e,t,n,o){let r=n.document??document,a=r.createElement("div");a.style.position="relative";let i=t.contentWidth??600,c=[],s=0;for(let m=0;m<e.blocks.length;m++){let l=e.blocks[m],x=e.measures[m];if(!(!l||!x))if(l.kind==="paragraph"){if(x.kind!=="paragraph")continue;let h=l,y=x,k=h.attrs?.spacing?.before??0,u=s,g=[];for(let f of h.runs)if(f.kind==="image"&&"position"in f&&f.position){let w=f;c.push({src:w.src,width:w.width,height:w.height,alt:w.alt,paragraphY:u,position:w.position});}else g.push(f);let p={...h,runs:g},b={blockId:h.id,width:i,height:y.totalHeight,fromLine:0,toLine:y.lines.length,pmStart:h.pmStart,pmEnd:h.pmEnd},d=H(b,p,y,{...t,positioning:"absolute"},{document:r});d.style.top=`${s+k}px`,d.style.left="0",d.style.width=`${i}px`,a.appendChild(d),s+=y.totalHeight;}else if(l.kind==="table"){if(x.kind!=="table")continue;let h={blockId:l.id,width:x.totalWidth,height:x.totalHeight,fromRow:0,toRow:x.rows.length,pmStart:l.pmStart,pmEnd:l.pmEnd},y=q(h,l,x,{...t,positioning:"absolute"},{document:r});if(l.floating){let{left:k,top:u}=ot(l.floating,o);y.style.top=`${u}px`,y.style.left=`${k}px`,a.appendChild(y);}else y.style.top=`${s}px`,y.style.left="0",a.appendChild(y),s+=x.totalHeight;}else if(l.kind==="image"){if(x.kind!=="image")continue;let h={blockId:l.id,width:x.width,height:x.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=Z(h,l,x,{...t},{document:r});y.style.top=`${s}px`,y.style.left="0",a.appendChild(y),s+=x.height;}else if(l.kind==="textBox"){if(x.kind!=="textBox")continue;let h={blockId:l.id,width:x.width,height:x.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=J(h,l,x,{...t,positioning:"absolute"},{document:r});y.style.top=`${s}px`,y.style.left="0",a.appendChild(y),s+=x.height;}else l.kind==="sectionBreak"||l.kind==="pageBreak"||l.kind==="columnBreak"||c$2(l,"renderHeaderFooterContent");}for(let m of c){let l=r.createElement("img");l.src=m.src,l.width=m.width,l.height=m.height,m.alt&&(l.alt=m.alt),l.style.position="absolute",l.style.display="block",l.style.width=`${m.width}px`,l.style.height=`${m.height}px`,l.style.maxWidth="none",l.style.maxHeight="none",_t(l,m,o),l.style.top=`${Nt(m,o)}px`,a.appendChild(l);}return a}var me=12,rt=6;function Wt(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Pe=8;function Zn(e){let t=[],n=o=>{for(let r of o)if(r.kind==="paragraph")for(let a of r.runs)a.kind==="text"&&a.footnoteRefId!=null&&t.push({footnoteId:a.footnoteRefId,pmPos:a.pmStart??0});else if(r.kind==="table")for(let a of r.rows)for(let i of a.cells)n(i.blocks);else r.kind==="textBox"&&n(r.content);};return n(e),t}function Le(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let a=false;for(let i of r.fragments){let c=i.pmStart??-1,s=i.pmEnd??-1;if(c>=0&&s>=0&&o.pmPos>=c&&o.pmPos<s){let m=n.get(r.number)??[];m.includes(o.footnoteId)||m.push(o.footnoteId),n.set(r.number,m),a=true;break}}if(a)break}return n}function Gt(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Pe,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let a=r;return {...a,runs:a.runs.map(i=>(i.kind==="text"||i.kind==="tab")&&i.fontSize==null?{...i,fontSize:Pe}:i)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Pe,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function jt(e,t,n,o){let r=c(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),a=c$1(r,{theme:o.theme??void 0}),i=Gt(a,t),c$2=o.measureBlocks(i,n),s=c$2.reduce((m,l)=>l.kind==="paragraph"||l.kind==="table"?m+l.totalHeight:l.kind==="image"||l.kind==="textBox"?m+l.height:m,0);return {id:e.id,displayNumber:t,blocks:i,measures:c$2,height:s}}function qn(e,t,n,o){let r=new Map,a=new Map;for(let s of e)(s.noteType==="normal"||s.noteType==null)&&a.set(s.id,s);let i=1,c=new Set;for(let s of t){if(c.has(s.footnoteId))continue;c.add(s.footnoteId);let m=a.get(s.footnoteId);m&&(r.set(s.footnoteId,jt(m,i,n,o)),i++);}return r}function it(e,t){let n=new Map;for(let[o,r]of e){let a=0;for(let i of r){let c=t.get(i);c&&(a+=c.height);}a>0&&(a+=me,n.set(o,a));}return n}function Jn(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:a,initialLayout:i}=e,c=Le(i.pages,r),s=it(c,a);if(s.size===0)return {layout:i,pageFootnoteMap:c,converged:true};let m=i,l=false;for(let x=0;x<rt;x++){m=O$1(t,n,{...o,footnoteReservedHeights:s});let h=Le(m.pages,r),y=it(h,a);if(c=h,Wt(s,y)){s=y,l=true;break}s=y;}l||(m=O$1(t,n,{...o,footnoteReservedHeights:s}),c=Le(m.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${rt} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[x,h]of c){let y=m.pages.find(k=>k.number===x);y&&(y.footnoteIds=h);}return {layout:m,pageFootnoteMap:c,converged:l}}function Qn(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let a of n.package.footnotes)a.noteType&&a.noteType!=="normal"||r.set(a.id,a);for(let[a,i]of e){let c=[];for(let s of i){let m=r.get(s);if(!m)continue;let l=t.get(s),x$1=l?.displayNumber??0;c.push({displayNumber:String(x$1),text:x(m),content:l});}c.length>0&&o.set(a,c);}return o}function Vt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let a=0;for(let i=0;i<e.blocks.length;i++){let c=e.blocks[i],s=e.measures[i];if(!(!c||!s)){if(c.kind==="paragraph"&&s.kind==="paragraph"){let m=c.attrs?.spacing?.before??0,l={blockId:c.id,width:t,height:s.totalHeight,pmStart:c.pmStart,pmEnd:c.pmEnd,fromLine:0,toLine:s.lines.length},x=H(l,c,s,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});x.style.top=`${a+m}px`,x.style.left="0",x.style.width=`${t}px`,x.style.height=`${s.totalHeight}px`,r.appendChild(x),a+=s.totalHeight;}else if(c.kind==="table"&&s.kind==="table"){let m={blockId:c.id,width:s.totalWidth,height:s.totalHeight,pmStart:c.pmStart,pmEnd:c.pmEnd,fromRow:0,toRow:s.rows.length},l=q(m,c,s,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=s.totalHeight;}else if(c.kind==="image"&&s.kind==="image"){let m={blockId:c.id,width:s.width,height:s.height,pmStart:c.pmStart,pmEnd:c.pmEnd},l=Z(m,c,s,{...n},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=s.height;}else if(c.kind==="textBox"&&s.kind==="textBox"){let m={blockId:c.id,width:s.width,height:s.height,pmStart:c.pmStart,pmEnd:c.pmEnd},l=J(m,c,s,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=s.height;}}}return r}function Kt(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function at(e){let t=me;for(let n of e)n.content&&(t+=n.content.height);return t}function st(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let a=o.createElement("div"),i=.5,c=(me-i)/2;a.style.width="33%",a.style.height=`${i}px`,a.style.backgroundColor="#000",a.style.marginBottom=`${c}px`,a.style.marginTop=`${c}px`,r.appendChild(a);for(let s of e)r.appendChild(s.content?Vt(s.content,t,n,o):Kt(s,o));return r}function ve(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let a=n.footnotesByPage.get(e.number);a&&a.length>0&&(r.footnoteArea=a);}return {context:o,pageOptions:r}}function lt(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function Yt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function Ut(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var he=2,Xt=8;function Zt(e,t,n={}){let o=e.length,r=n.pageGap??24,a=t,i=a.__pageRenderState,c=Yt(n),s=o>=Xt;if(i&&i.optionsHash===c&&s){let g=i.pageStates,p=i.pageDataMap,b=a.__pageObserver,d=[];for(let S of e)d.push(lt(S));let f=i.totalPages!==o,w=Math.min(g.length,e.length);for(let S=0;S<w;S++){let T=g[S],P=d[S];if(T.fingerprint===P&&!f){let C=p.get(T.element);C&&(C.page=e[S]);continue}let F=T.element,I=p.get(F);I&&(I.page=e[S],I.rendered&&qt(F,p,o,n)),T.fingerprint=P,ie(F,e[S].size.w,e[S].size.h,n),F.dataset.pageNumber=String(e[S].number);}if(e.length>g.length){let S=n.document??document;for(let T=g.length;T<e.length;T++){let P=e[T],F=S.createElement("div");F.className=n.pageClassName??N.page,F.dataset.pageNumber=String(P.number),F.dataset.pageIndex=String(T),ie(F,P.size.w,P.size.h,n),t.appendChild(F),g.push({element:F,fingerprint:d[T]}),p.set(F,{page:P,index:T,rendered:false}),b&&b.observe(F);}}if(e.length<g.length){for(let S=g.length-1;S>=e.length;S--){let T=g[S].element;b&&b.unobserve(T),p.delete(T),t.removeChild(T);}g.length=e.length;}for(let S=0;S<g.length;S++){let T=p.get(g[S].element);T&&(T.index=S);}return i.totalPages=o,i.currentOptions=n,"incremental"}let l=a.__pageObserver;l&&(l.disconnect(),a.__pageObserver=void 0),t.innerHTML="",a.__pageRenderState=void 0,Ut(t,r);let x=[],h=[];for(let g=0;g<e.length;g++){let p=e[g];if(h.push(lt(p)),s){let d=(n.document??document).createElement("div");d.className=n.pageClassName??N.page,d.dataset.pageNumber=String(p.number),d.dataset.pageIndex=String(g),ie(d,p.size.w,p.size.h,n),t.appendChild(d),x.push(d);}else {let{context:b,pageOptions:d}=ve(p,o,n),f=ye(p,b,d);t.appendChild(f),x.push(f);}}if(!s)return "full";let y=new Map;for(let g=0;g<e.length;g++)y.set(x[g],{page:e[g],index:g,rendered:false});let k=new IntersectionObserver(g=>{let p=a.__pageRenderState;if(!p)return;let{currentOptions:b,totalPages:d,pageDataMap:f}=p;for(let P of g){let F=P.target,I=f.get(F);if(I&&P.isIntersecting){ue(F,f,d,b);for(let C=-he;C<=he;C++){let R=I.index+C;R>=0&&R<p.pageStates.length&&R!==I.index&&ue(p.pageStates[R].element,f,d,b);}}}let w=window.innerHeight,S=w*3,T=new Set;for(let[P,F]of f){if(!F.rendered)continue;let I=P.getBoundingClientRect();I.bottom>-S&&I.top<w+S&&T.add(F.index);}for(let[P,F]of f){if(!F.rendered)continue;let I=false;for(let C of T)if(Math.abs(F.index-C)<=he+1){I=true;break}!I&&T.size>0&&Jt(P,f);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let g of x)k.observe(g);a.__pageObserver=k,a.__pageRenderState={pageStates:x.map((g,p)=>({element:g,fingerprint:h[p]})),totalPages:o,optionsHash:c,pageDataMap:y,currentOptions:n};let u=Math.min(e.length,he+3);for(let g=0;g<u;g++)ue(x[g],y,o,n);return "full"}function ue(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:a,pageOptions:i}=ve(r.page,n,o),c=ye(r.page,a,i);for(;c.firstChild;)e.appendChild(c.firstChild);r.rendered=true;}function qt(e,t,n,o){let r=t.get(e);if(!r)return;let{context:a,pageOptions:i}=ve(r.page,n,o),s=ye(r.page,a,i).querySelector(`.${N.content}`),m=e.querySelector(`.${N.content}`);s&&m?e.replaceChild(s,m):(e.innerHTML="",r.rendered=false,ue(e,t,n,o));}function Jt(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}var N={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function ie(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=a("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function Qt(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function be(e){return e?.space!==void 0?i(e.space):0}function xe(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=c$3(t,n,o);for(let[s,m]of Object.entries(r))e.style[s]=String(m);let a=`border${n}Style`,i=`border${n}Width`;if(e.style[a]==="double"){let s=parseFloat(e.style[i]);(!Number.isFinite(s)||s<3)&&(e.style[i]="3px");}}function en(e,t,n){let o=t.pageBorders;if(!o||!Qt(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(x=>x&&x.style!=="none"&&x.style!=="nil"))return null;let a=o.offsetFrom??"text",i=be(o.top),c=be(o.right),s=be(o.bottom),m=be(o.left),l=n.createElement("div");return l.className="layout-page-border",l.style.position="absolute",l.style.pointerEvents="none",l.style.boxSizing="border-box",l.style.zIndex=o.zOrder==="back"?"0":"20",a==="page"?(l.style.top=`${i}px`,l.style.right=`${c}px`,l.style.bottom=`${s}px`,l.style.left=`${m}px`):(l.style.top=`${Math.max(0,e.margins.top-i)}px`,l.style.right=`${Math.max(0,e.margins.right-c)}px`,l.style.bottom=`${Math.max(0,e.margins.bottom-s)}px`,l.style.left=`${Math.max(0,e.margins.left-m)}px`),xe(l,o.top,"Top",t.theme),xe(l,o.bottom,"Bottom",t.theme),xe(l,o.left,"Left",t.theme),xe(l,o.right,"Right",t.theme),l}function tn(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function nn(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function on(e,t,n,o){let r=[];for(let a of e.runs){if(a.kind!=="image")continue;let i=a;if(!f(i))continue;let c=i.distTop??0,s=i.distBottom??0,m=i.distLeft??12,l=i.distRight??12,{x,y:h$1,side:y}=Re(i,t,n,o);r.push({src:i.src,width:i.width,height:i.height,alt:i.alt,transform:i.transform,side:y,x,y:h$1,distTop:c,distBottom:s,distLeft:m,distRight:l,pmStart:i.pmStart,pmEnd:i.pmEnd,wrapText:h(i.cssFloat),wrapType:i.wrapType,cropTop:i.cropTop,cropRight:i.cropRight,cropBottom:i.cropBottom,cropLeft:i.cropLeft,opacity:i.opacity});}return r}function ye(e$1,t,n={}){let o=n.document??document,r=o.createElement("div");r.className=n.pageClassName??N.page,r.dataset.pageNumber=String(e$1.number),ie(r,e$1.size.w,e$1.size.h,n);let a=en(e$1,n,o);a&&n.pageBorders?.zOrder==="back"&&r.appendChild(a);let i=o.createElement("div");i.className=N.content,tn(i,e$1);let c=tt(e$1),s=c.contentWidth,m=[],l=[];for(let p of e$1.fragments)if(p.kind==="paragraph"&&n.blockLookup){let b=n.blockLookup.get(String(p.blockId));if(b?.block.kind==="paragraph"){let d=b.block,f=p.y-e$1.margins.top,w=on(d,f,s,c);m.push(...w);}}for(let p of m)d(p)&&l.push({side:p.side,x:p.x,y:p.y,width:p.width,height:p.height,distTop:p.distTop,distBottom:p.distBottom,distLeft:p.distLeft,distRight:p.distRight,wrapText:p.wrapText,wrapType:p.wrapType});if(n.blockLookup)for(let p of e$1.fragments){if(p.kind!=="table")continue;let b=n.blockLookup.get(String(p.blockId));if(b?.block.kind!=="table")continue;let f=b.block.floating;if(!f)continue;let w=p.x-e$1.margins.left,S=p.y-e$1.margins.top,T=f.topFromText??0,P=f.bottomFromText??0,F=f.leftFromText??12,I=f.rightFromText??12,C=w<s/2?"left":"right";l.push({side:C,x:w,y:S,width:p.width,height:p.height,distTop:T,distBottom:P,distLeft:F,distRight:I});}if(n.blockLookup)for(let p of e$1.fragments){if(p.kind!=="textBox")continue;let b=n.blockLookup.get(String(p.blockId));if(b?.block.kind!=="textBox")continue;let d=b.block;if(!E(d))continue;let f=p.y-e$1.margins.top,w=Re({width:p.width,height:p.height,position:d.position,cssFloat:d.cssFloat},f,s,c);p.x=e$1.margins.left+w.x,p.y=e$1.margins.top+w.y,F(d)&&l.push({side:w.side,x:w.x,y:w.y,width:p.width,height:p.height,distTop:d.distTop??0,distBottom:d.distBottom??0,distLeft:d.distLeft??12,distRight:d.distRight??12,wrapText:d.wrapText,wrapType:d.wrapType});}let x=l.length>0?p(l,s):[],h=m.filter(e),y=m.filter(p=>!e(p));if(h.length>0){let p=X(h,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});i.appendChild(p);}let k=p=>{if(p.kind!=="paragraph"||!n.blockLookup||!p.blockId)return;let b=n.blockLookup.get(String(p.blockId));if(b?.block.kind==="paragraph")return b.block.attrs?.borders},u,g=new Map;for(let p=0;p<e$1.fragments.length;p++){let b=e$1.fragments[p],d,f={...t,section:"body",contentWidth:s},w=b.y-e$1.margins.top;if(n.blockLookup&&b.blockId){let S=n.blockLookup.get(String(b.blockId));if(b.kind==="paragraph"&&S?.block.kind==="paragraph"&&S?.measure.kind==="paragraph"){let T=S.block,P=p+1<e$1.fragments.length?k(e$1.fragments[p+1]):void 0,F=String(b.blockId),I=g.get(F);I||(I=new Set,g.set(F,I));let C=S.measure;x.length>0&&(C=v(T,s,{floatingZones:x,paragraphYOffset:w})),d=H(b,T,C,f,{document:o,prevBorders:u,nextBorders:P,renderedInlineImageKeys:I}),u=T.attrs?.borders;}else b.kind==="table"&&S?.block.kind==="table"&&S?.measure.kind==="table"?(d=q(b,S.block,S.measure,f,{document:o}),u=void 0):b.kind==="image"&&S?.block.kind==="image"&&S?.measure.kind==="image"?(d=Z(b,S.block,S.measure,f,{document:o}),u=void 0):b.kind==="textBox"&&S?.block.kind==="textBox"&&S?.measure.kind==="textBox"?(d=J(b,S.block,S.measure,f,{document:o}),u=void 0):(d=Te(b,f,{document:o}),u=void 0);}else d=Te(b,f,{document:o}),u=void 0;nn(d,b,{left:e$1.margins.left,top:e$1.margins.top}),i.appendChild(d);}if(y.length>0){let p=X(y,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});i.appendChild(p);}if(e$1.columns&&e$1.columns.separator&&e$1.columns.count>1){let p=e$1.columns.count,b=e$1.columns.gap,d=(s-(p-1)*b)/p,f=e$1.size.h-e$1.margins.top-e$1.margins.bottom;for(let w=0;w<p-1;w++){let S=(w+1)*d+w*b+b/2,T=o.createElement("div");T.style.position="absolute",T.style.left=`${S}px`,T.style.top="0",T.style.height=`${f}px`,T.style.width="0.5px",T.style.backgroundColor="#000",T.style.pointerEvents="none",i.appendChild(T);}}if(n.footnoteArea&&n.footnoteArea.length>0){let p=st(n.footnoteArea,s,t,o);p.style.position="absolute";let b=Math.max(e$1.footnoteReservedHeight??0,at(n.footnoteArea)),d=e$1.size.h-e$1.margins.bottom-e$1.margins.top;p.style.top=`${Math.max(-e$1.margins.top,d-b)}px`,p.style.left="0",p.style.right="0",i.appendChild(p);}r.appendChild(i);{let b=n.headerDistance??e$1.margins.header??48,d=e$1.size.w-e$1.margins.left-e$1.margins.right,f=Math.max(e$1.margins.top-b,48),w=n.headerContent?.visualTop??0,S=n.headerContent?.visualBottom??n.headerContent?.height??0,T=Math.max(S-w,24),P=S>f,F=o.createElement("div");F.className=N.header,F.style.position="absolute",F.style.top=`${b+w}px`,F.style.left=`${e$1.margins.left}px`,F.style.right=`${e$1.margins.right}px`,F.style.width=`${d}px`,F.style.height=`${T}px`,F.style.minHeight=`${T}px`;let I=!P;if(n.headerContent&&n.headerContent.blocks.length>0){let C={flowTop:b,flowLeft:e$1.margins.left,contentWidth:d,pageWidth:e$1.size.w,pageHeight:e$1.size.h,margins:e$1.margins},R=Ee(n.headerContent,{...t,section:"header",contentWidth:d},n,C);R.style.top=`${-w}px`,R.querySelector("img")&&(I=false),F.appendChild(R);}I&&(F.style.maxHeight=`${f}px`,F.style.overflow="hidden"),r.appendChild(F);}{let b=n.footerDistance??e$1.margins.footer??48,d=e$1.size.w-e$1.margins.left-e$1.margins.right,f=Math.max(e$1.margins.bottom-b,48),w=n.footerContent?.visualTop??0,S=n.footerContent?.visualBottom??n.footerContent?.height??0,T=Math.max(S-w,24),P=T>f,F=o.createElement("div");F.className=N.footer,F.style.position="absolute",F.style.top=`${e$1.size.h-b-T}px`,F.style.left=`${e$1.margins.left}px`,F.style.right=`${e$1.margins.right}px`,F.style.width=`${d}px`,F.style.height=`${T}px`,F.style.minHeight=`${T}px`;let I=!P;if(n.footerContent&&n.footerContent.blocks.length>0){let C={flowTop:e$1.size.h-b-(n.footerContent?.height??0),flowLeft:e$1.margins.left,contentWidth:d,pageWidth:e$1.size.w,pageHeight:e$1.size.h,margins:e$1.margins},R=Ee(n.footerContent,{...t,section:"footer",contentWidth:d},n,C);R.style.top=`${-w}px`,R.querySelector("img")&&(I=false),F.appendChild(R);}I&&(F.style.maxHeight=`${f}px`,F.style.overflow="hidden"),r.appendChild(F);}return a&&n.pageBorders?.zOrder!=="back"&&r.appendChild(a),r}export{ie as A,ye as B,me as a,rt as b,Wt as c,Zn as d,Le as e,Gt as f,jt as g,qn as h,it as i,Jn as j,Qn as k,Y as l,Te as m,Ke as n,Z as o,Qe as p,fe as q,H as r,X as s,D as t,q as u,$t as v,J as w,ot as x,Zt as y,N as z};
|
package/dist/chunk-V5VDCQDN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c,a as a$1,b as b$1}from'./chunk-FCJWLEKT.mjs';import {a as a$2,b}from'./chunk-7E5VBRDL.mjs';import {p}from'./chunk-RFC2SXZ6.mjs';import {a,b as b$2,o}from'./chunk-67LVRQIR.mjs';import {i,j as j$1,k}from'./chunk-VW22RZ6C.mjs';function B(e,a$2){let i={};for(let t of e)switch(t.type.name){case "bold":i.bold=true;break;case "italic":i.italic=true;break;case "underline":{let n=t.attrs;if(n.style||n.color){let r=n.color?a(n.color,a$2):void 0;i.underline={style:n.style,color:r};}else i.underline=true;break}case "strike":i.strike=true;break;case "textColor":{let n=t.attrs;(n.themeColor||n.rgb)&&(i.color=a({rgb:n.rgb,themeColor:n.themeColor,themeTint:n.themeTint,themeShade:n.themeShade},a$2));break}case "highlight":i.highlight=o(t.attrs.color);break;case "fontSize":{let n=t.attrs;i.fontSize=n.size/2;break}case "fontFamily":{let n=t.attrs;i.fontFamily=n.ascii||n.hAnsi;break}case "characterSpacing":{let n=t.attrs;n.spacing!=null&&n.spacing!==0&&(i.letterSpacing=a$1(n.spacing)),n.position!=null&&n.position!==0&&(i.positionPx=j$1(n.position)),n.scale!=null&&n.scale!==100&&(i.horizontalScale=n.scale),n.kerning!=null&&n.kerning>0&&(i.kerningMinPt=k(n.kerning));break}case "allCaps":i.allCaps=true;break;case "smallCaps":i.smallCaps=true;break;case "emboss":i.emboss=true;break;case "imprint":i.imprint=true;break;case "textShadow":i.textShadow=true;break;case "textOutline":i.textOutline=true;break;case "hidden":i.hidden=true;break;case "rtl":i.rtl=true;break;case "textEffect":{let n=t.attrs.effect;(n==="blinkBackground"||n==="lights"||n==="antsBlack"||n==="antsRed"||n==="shimmer"||n==="sparkle")&&(i.textEffect=n);break}case "emphasisMark":{let n=t.attrs.type;n==="dot"||n==="comma"||n==="circle"||n==="underDot"?i.emphasisMark=n:i.emphasisMark="dot";break}case "superscript":i.superscript=true;break;case "subscript":i.subscript=true;break;case "hyperlink":{let n=t.attrs;i.hyperlink={href:n.href,tooltip:n.tooltip};break}case "footnoteRef":{let n=t.attrs,r=typeof n.id=="string"?parseInt(n.id,10):n.id;n.noteType==="endnote"?i.endnoteRefId=r:i.footnoteRefId=r;break}case "comment":{let n=t.attrs.commentId;n&&(i.commentIds||(i.commentIds=[]),i.commentIds.push(n));break}case "insertion":i.isInsertion=true,i.changeAuthor=t.attrs.author,i.changeDate=t.attrs.date,i.changeRevisionId=t.attrs.revisionId;break;case "deletion":i.isDeletion=true,i.changeAuthor=t.attrs.author,i.changeDate=t.attrs.date,i.changeRevisionId=t.attrs.revisionId;break}return i}function _(e){let a=e.defaultTextFormatting;if(!a)return {};let i={};if(a.fontFamily){let t=a.fontFamily.ascii||a.fontFamily.hAnsi;t&&(i.fontFamily=t);}return a.fontSize!=null&&(i.fontSize=a.fontSize/2),i}function E(e){e.hyperlink&&(e.hyperlink={...e.hyperlink,noDefaultStyle:true},delete e.color,delete e.underline);}function L(e,a,i){let t=[],n=a+1,r=i.theme,s=_(e.attrs),l=e.attrs.styleId,g=typeof l=="string"&&/^TOC\d*$/i.test(l);function p(d,f){if(d.isText&&d.text){let o=B(d.marks,r);g&&E(o);let u={kind:"text",text:d.text,...s,...o,pmStart:f,pmEnd:f+d.nodeSize};t.push(u);}else if(d.type.name==="hardBreak")t.push({kind:"lineBreak",pmStart:f,pmEnd:f+d.nodeSize});else if(d.type.name==="tab"){let o=B(d.marks,r),u={kind:"tab",...s,...o,pmStart:f,pmEnd:f+d.nodeSize};t.push(u);}else if(d.type.name==="image"){let o=d.attrs,u=b$1(o.width||100,o.height||100,i.pageContentHeight),c=B(d.marks,r),b={kind:"image",src:o.src,width:u.width,height:u.height,alt:o.alt,transform:o.transform,wrapType:o.wrapType,displayMode:o.displayMode,cssFloat:o.cssFloat,distTop:o.distTop,distBottom:o.distBottom,distLeft:o.distLeft,distRight:o.distRight,position:o.position,cropTop:o.cropTop,cropRight:o.cropRight,cropBottom:o.cropBottom,cropLeft:o.cropLeft,opacity:o.opacity,isInsertion:c.isInsertion,isDeletion:c.isDeletion,changeAuthor:c.changeAuthor,changeDate:c.changeDate,changeRevisionId:c.changeRevisionId,pmStart:f,pmEnd:f+d.nodeSize};t.push(b);}else if(d.type.name==="field"){let o=d.attrs.fieldType,u=o==="PAGE"?"PAGE":o==="NUMPAGES"?"NUMPAGES":o==="DATE"?"DATE":o==="TIME"?"TIME":"OTHER",c=B(d.marks,r);g&&E(c),t.push({kind:"field",fieldType:u,fallback:d.attrs.displayText||"",...s,...c,pmStart:f,pmEnd:f+d.nodeSize});}else if(d.type.name==="math"){let o=d.attrs.plainText||"[equation]";t.push({kind:"text",text:o,italic:true,fontFamily:"Cambria Math",pmStart:f,pmEnd:f+d.nodeSize});}else if(d.type.name==="sdt"){let o=f+1;d.forEach((u,c)=>{p(u,o+c);});}}return e.forEach((d,f)=>{p(d,n+f);}),t}function U(e){return Math.max(1,Math.round(e/8*1.333))}var Y={single:"solid",double:"double",dotted:"dotted",dashed:"dashed",thick:"solid",dashSmallGap:"dashed",dotDash:"dashed",dotDotDash:"dotted",triple:"double",wave:"solid",doubleWave:"double",threeDEmboss:"ridge",threeDEngrave:"groove",outset:"outset",inset:"inset"};function F(e,a$1){if(!e||!e.style||e.style==="none"||e.style==="nil")return;let i$1={style:Y[e.style]||"solid",width:U(e.size??0),color:e.color?a(e.color,a$1):"#000000"};return e.space!==void 0&&(i$1.space=i(e.space)),i$1}function D(e,a){let i=e.borders;if(!i)return;let t={},n=["top","bottom","left","right"];for(let r of n){let s=i[r],l=s?F(s,a):void 0;t[r]=l??{width:0,style:"none"};}return Object.keys(t).length>0?t:void 0}function $(e,a){let i=[];for(let t=0;t<=a;t+=1){let n=e[t]??0;if(n<=0)break;i.push(n);}return i.length===0?"1.":`${i.join(".")}.`}var G=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function N(e,a){if(e<=0)return "";let i=e,t="";for(let[n,r]of G)for(;i>=n;)t+=r,i-=n;return a?t:t.toLowerCase()}function O(e,a){if(e<=0)return "";let i=e,t="";for(;i>0;){let n=(i-1)%26;t=String.fromCharCode(65+n)+t,i=Math.floor((i-1)/26);}return a?t:t.toLowerCase()}function j(e,a){if(e<=0)return "";switch(a){case "upperRoman":return N(e,true);case "lowerRoman":return N(e,false);case "upperLetter":return O(e,true);case "lowerLetter":return O(e,false);case "decimalZero":return e<10?`0${e}`:String(e);case "none":return "";default:return String(e)}}function H(e,a,i){return e.replace(/%(\d)([.):\]])?/g,(t,n,r="")=>{let s=parseInt(n,10)-1;if(s<0)return "";let l=a[s]??0,g=i?.[s]??"decimal",p=j(l,g);return p?p+r:""})}function W(e,a,i){let t=e.numPr;if(!t)return null;let n=t.numId;if(n==null||n===0)return null;if(e.listIsBullet)return p(e.listMarker||"");let r=t.ilvl??0,s=e.listAbstractNumId??n,l=a.get(s)??new Array(9).fill(0),g=`${n}:${r}`;i.has(g)||(i.add(g),e.listStartOverride!=null&&(l[r]=e.listStartOverride-1)),l[r]=(l[r]??0)+1;for(let p=r+1;p<l.length;p+=1)l[p]=0;return a.set(s,l),e.listMarker&&e.listMarker.includes("%")?H(e.listMarker,l,e.listLevelNumFmts??void 0):e.listMarker?e.listMarker:$(l,r)}var V="Calibri",q=11;function K(e,a,i,t,n){let r={};if(e.alignment){let o=e.alignment;o==="both"||o==="distribute"?r.alignment="justify":o==="left"?r.alignment="left":o==="center"?r.alignment="center":o==="right"&&(r.alignment="right");}(e.spaceBefore!=null||e.spaceAfter!=null||e.lineSpacing!=null)&&(r.spacing={},e.spaceBefore!=null&&(r.spacing.before=a$1(e.spaceBefore)),e.spaceAfter!=null&&(r.spacing.after=a$1(e.spaceAfter)),e.lineSpacing!=null&&(e.lineSpacingRule==="exact"||e.lineSpacingRule==="atLeast"?(r.spacing.line=a$1(e.lineSpacing),r.spacing.lineUnit="px",r.spacing.lineRule=e.lineSpacingRule):(r.spacing.line=e.lineSpacing/240,r.spacing.lineUnit="multiplier",r.spacing.lineRule="auto"))),e.spacingExplicit&&(r.spacingExplicit=e.spacingExplicit);let s=e.indentLeft,l=e.indentFirstLine,g=e.hangingIndent;if(e.numPr?.numId&&s==null&&(s=((e.numPr.ilvl??0)+1)*720,l==null&&(l=-360,g=true)),(s!=null||e.indentRight!=null||l!=null)&&(r.indent={},s!=null&&(r.indent.left=a$1(s)),e.indentRight!=null&&(r.indent.right=a$1(e.indentRight)),l!=null&&(g?r.indent.hanging=Math.abs(a$1(l)):r.indent.firstLine=a$1(l))),e.styleId&&(r.styleId=e.styleId),e.borders){let o=e.borders;r.borders={};let u=c=>c?F(c,a):void 0;o.top&&(r.borders.top=u(o.top)),o.bottom&&(r.borders.bottom=u(o.bottom)),o.left&&(r.borders.left=u(o.left)),o.right&&(r.borders.right=u(o.right)),o.between&&(r.borders.between=u(o.between)),o.bar&&(r.borders.bar=u(o.bar)),!r.borders.top&&!r.borders.bottom&&!r.borders.left&&!r.borders.right&&!r.borders.between&&!r.borders.bar&&delete r.borders;}let p=b$2(e.shading?.fill,a);p&&(r.shading=`#${p}`),e.tabs&&e.tabs.length>0&&(r.tabs=e.tabs.map(o=>({val:Z(o.alignment),pos:o.position,leader:o.leader}))),e.pageBreakBefore&&(r.pageBreakBefore=true),e.keepNext&&(r.keepNext=true),e.keepLines&&(r.keepLines=true),e.contextualSpacing&&(r.contextualSpacing=true),e.bidi&&(r.bidi=true),e.styleId&&(r.styleId=e.styleId),e.numPr&&(r.numPr={numId:e.numPr.numId,ilvl:e.numPr.ilvl});let d=i&&t?W(e,i,t):null;d!=null?r.listMarker=d:e.listMarker&&(r.listMarker=e.listMarker),e.listIsBullet!=null&&(r.listIsBullet=e.listIsBullet),e.listMarkerHidden&&(r.listMarkerHidden=true),e.listMarkerFontFamily&&(r.listMarkerFontFamily=e.listMarkerFontFamily),e.listMarkerFontSize&&(r.listMarkerFontSize=e.listMarkerFontSize),e.listMarkerSuffix&&(r.listMarkerSuffix=e.listMarkerSuffix),n!==void 0&&(r.defaultTabStopTwips=n);let f=e.defaultTextFormatting;if(f&&(f.fontSize!=null&&(r.defaultFontSize=f.fontSize/2),f.fontFamily&&(r.defaultFontFamily=f.fontFamily.ascii||f.fontFamily.hAnsi)),e.pPrIns&&(r.pPrIns=e.pPrIns),e.pPrDel&&(r.pPrDel=e.pPrDel),e.numPr){let o=e.pPrChange,u=Array.isArray(o)&&o.some(c=>!c?.previousFormatting?.numPr);e.pPrDel?r.listMarkerRevision="del":(e.pPrIns||u)&&(r.listMarkerRevision="ins");}return r}function Z(e){switch(e){case "left":return "start";case "right":return "end";case "center":return "center";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "start";default:return "start"}}function w(e,a,i){let t=e.attrs,n=L(e,a,i),r=K(t,i.theme,i.listCounters,i.listSeenNumIds,i.defaultTabStopTwips);return {kind:"paragraph",id:c(),runs:n,attrs:r,pmStart:a,pmEnd:a+e.nodeSize}}function J(e,a,i,t){let n=[],r=a+1;e.forEach(c=>{c.type.name==="paragraph"?n.push(w(c,r,i)):c.type.name==="table"&&n.push(X(c,r,i)),r+=c.nodeSize;});let s=e.attrs,l=s.width,g=s.widthType,p=l&&(!g||g==="dxa"||g==="auto")?a$1(l):void 0,d=s.margins,f=(c,b)=>{if(c!=null){let k=a$1(c);if(k>0)return k}if(b!=null){let k=a$1(b);if(k>=0)return k}return 0},o={top:f(d?.top,t?.top),right:f(d?.right,t?.right),bottom:f(d?.bottom,t?.bottom),left:f(d?.left,t?.left)},u=s.cellMarker;return {id:c(),blocks:n,colSpan:s.colspan,rowSpan:s.rowspan,width:p,widthValue:l,widthType:g,verticalAlign:s.verticalAlign,background:s.backgroundColor?`#${s.backgroundColor}`:void 0,borders:D(s,i.theme),padding:o,noWrap:s.noWrap||void 0,trackedMarker:u??void 0}}function Q(e,a,i,t){let n=[],r=a+1;e.forEach(l=>{(l.type.name==="tableCell"||l.type.name==="tableHeader")&&n.push(J(l,r,i,t)),r+=l.nodeSize;});let s=e.attrs;return {id:c(),cells:n,height:s.height?a$1(s.height):void 0,heightRule:s.heightRule??void 0,isHeader:s.isHeader,trackedIns:s.trIns??void 0,trackedDel:s.trDel??void 0}}function X(e,a,i){let t=[],n=a+1,r=e.attrs.cellMargins;e.forEach(b=>{b.type.name==="tableRow"&&t.push(Q(b,n,i,r)),n+=b.nodeSize;});let l=e.attrs.columnWidths?.map(a$1),g=e.attrs.width,p=e.attrs.widthType;if(!l&&t.length>0){let k=t[0].cells.map(S=>S.width);k.every(S=>S!==void 0&&S>0)&&(l=k);}let d=e.attrs.justification,f=e.attrs._originalFormatting,o=f?.indent?.value&&f.indent.type==="dxa"?a$1(f.indent.value):void 0,u=e.attrs.floating,c$1=u?{horzAnchor:u.horzAnchor,vertAnchor:u.vertAnchor,tblpX:u.tblpX!==void 0?a$1(u.tblpX):void 0,tblpXSpec:u.tblpXSpec,tblpY:u.tblpY!==void 0?a$1(u.tblpY):void 0,tblpYSpec:u.tblpYSpec,topFromText:u.topFromText!==void 0?a$1(u.topFromText):void 0,bottomFromText:u.bottomFromText!==void 0?a$1(u.bottomFromText):void 0,leftFromText:u.leftFromText!==void 0?a$1(u.leftFromText):void 0,rightFromText:u.rightFromText!==void 0?a$1(u.rightFromText):void 0}:void 0;return {kind:"table",id:c(),rows:t,columnWidths:l,width:g,widthType:p,justification:d,indent:o,floating:c$1,pmStart:a,pmEnd:a+e.nodeSize}}function A(e,a,i){let t=e.attrs,n=t.wrapType,r=n==="behind"||n==="inFront",s=b$1(t.width||100,t.height||100,i);return {kind:"image",id:c(),src:t.src,width:s.width,height:s.height,alt:t.alt,transform:t.transform,anchor:r?{isAnchored:true,offsetH:t.distLeft,offsetV:t.distTop,behindDoc:n==="behind"}:void 0,hlinkHref:t.hlinkHref,pmStart:a,pmEnd:a+e.nodeSize}}function ee(e,a,i){let t=e.attrs,n=[];return e.forEach((r,s)=>{if(r.type.name==="paragraph"){let l=w(r,a+1+s,i);n.push(l);}}),{kind:"textBox",id:c(),width:t.width??b,height:t.height??void 0,fillColor:t.fillColor,outlineWidth:t.outlineWidth,outlineColor:t.outlineColor,outlineStyle:t.outlineStyle,margins:{top:t.marginTop??a$2.top,bottom:t.marginBottom??a$2.bottom,left:t.marginLeft??a$2.left,right:t.marginRight??a$2.right},content:n,displayMode:t.displayMode,cssFloat:t.cssFloat,wrapType:t.wrapType,wrapText:t.wrapText,anchorTarget:t.anchorTarget,position:t.position,distTop:t.distTop,distBottom:t.distBottom,distLeft:t.distLeft,distRight:t.distRight,pmStart:a,pmEnd:a+e.nodeSize}}function he(e,a={}){let i=e.attrs?.defaultTabStopTwips,t={...a,defaultFont:a.defaultFont??V,defaultSize:a.defaultSize??q,defaultTabStopTwips:a.defaultTabStopTwips??i},n=[],r=0,s={top:1440,bottom:1440,left:1440,right:1440};return t.listCounters||(t.listCounters=new Map),t.listSeenNumIds||(t.listSeenNumIds=new Set),e.forEach((l,g)=>{let p=r+g;switch(l.type.name){case "paragraph":{let d=w(l,p,t),f=l.attrs;n.push(d);let o=f._sectionProperties;if(o||f.sectionBreakType){let u={kind:"sectionBreak",id:c(),type:o?.sectionStart??f.sectionBreakType};if(o){if((o.pageWidth!==void 0||o.pageHeight!==void 0)&&(u.pageSize={w:a$1(o.pageWidth??12240),h:a$1(o.pageHeight??15840)}),o.marginTop!==void 0||o.marginBottom!==void 0||o.marginLeft!==void 0||o.marginRight!==void 0){let b={top:o.marginTop??s.top,bottom:o.marginBottom??s.bottom,left:o.marginLeft??s.left,right:o.marginRight??s.right};u.margins={top:a$1(b.top),bottom:a$1(b.bottom),left:a$1(b.left),right:a$1(b.right)},s=b;}let c=o.columnCount??1;if(c>1){let b={count:c,gap:a$1(o.columnSpace??720),equalWidth:o.equalWidth??true,separator:o.separator};u.columns=b;}}n.push(u);}}break;case "table":n.push(X(l,p,t));break;case "image":n.push(A(l,p,t.pageContentHeight));break;case "textBox":n.push(ee(l,p,t));break;case "horizontalRule":case "pageBreak":{let d={kind:"pageBreak",id:c(),pmStart:p,pmEnd:p+l.nodeSize};n.push(d);break}}}),n}export{F as a,H as b,he as c};
|
package/dist/chunk-VHUVPHPI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$1,a}from'./chunk-MJ6XZFVD.mjs';import {a as a$1}from'./chunk-VQWZHPWI.mjs';import {selectParentNode,selectAll,baseKeymap,splitBlock,joinForward,deleteSelection,joinBackward}from'prosemirror-commands';function b(e){let t={};for(let r of e)switch(r.type.name){case "bold":t.bold=true;break;case "italic":t.italic=true;break;case "underline":t.underline={style:r.attrs.style||"single"};break;case "strike":t.strike=true;break;case "textColor":t.color=r.attrs;break;case "highlight":t.highlight=r.attrs.color;break;case "fontSize":t.fontSize=r.attrs.size;break;case "fontFamily":t.fontFamily={ascii:r.attrs.ascii,hAnsi:r.attrs.hAnsi};break;case "superscript":t.vertAlign="superscript";break;case "subscript":t.vertAlign="subscript";break}return t}function S(e,t,r){let{$from:n}=e.selection,l=n.parent;if(l.type.name!=="paragraph"||l.textContent.length>0)return t;if(r.length===0)return t.setNodeMarkup(n.before(),void 0,{...l.attrs,defaultTextFormatting:null});let c=b(r);return t.setNodeMarkup(n.before(),void 0,{...l.attrs,defaultTextFormatting:c})}function y(e,t,r){let n=e.tr;n=S(e,n,r),n.setStoredMarks(r),t(n);}function F(e,t){return (r,n)=>{let{from:l,to:c,empty:a}=r.selection,s=e.create(t);if(a){if(n){let i=r.storedMarks||r.selection.$from.marks(),o=e.isInSet(i)?i.filter(f=>f.type!==e):i;y(r,n,[...o,s]);}return true}return n&&n(r.tr.addMark(l,c,s).scrollIntoView()),true}}function C(e){return (t,r)=>{let{from:n,to:l,empty:c}=t.selection;if(c){if(r){let a=(t.storedMarks||t.selection.$from.marks()).filter(s=>s.type!==e);y(t,r,a);}return true}return r&&r(t.tr.removeMark(n,l,e).scrollIntoView()),true}}function $(e,t,r){let{from:n,to:l,empty:c}=e.selection;if(c)return (e.storedMarks||e.selection.$from.marks()).some(i=>i.type!==t?false:r?Object.entries(r).every(([o,f])=>i.attrs[o]===f):true);let a=false;return e.doc.nodesBetween(n,l,s=>{if(s.isText){let i=t.isInSet(s.marks);if(i&&(!r||Object.entries(r).every(([f,u])=>i.attrs[f]===u)))return a=true,false}return true}),a}function P(e,t,r){let{empty:n,$from:l,from:c,to:a}=e.selection;if(n){let i=e.storedMarks||l.marks();for(let o of i)if(o.type===t)return o.attrs[r];return null}let s=null;return e.doc.nodesBetween(c,a,i=>{if(i.isText&&s===null){let o=t.isInSet(i.marks);if(o)return s=o.attrs[r],false}return true}),s}function M(e,t){let r=[];return e.bold&&r.push(t.marks.bold.create()),e.italic&&r.push(t.marks.italic.create()),e.underline&&r.push(t.marks.underline.create({style:e.underline.style||"single",color:e.underline.color})),e.strike&&r.push(t.marks.strike.create()),e.doubleStrike&&r.push(t.marks.strike.create({double:true})),e.color&&r.push(t.marks.textColor.create({rgb:e.color.rgb,themeColor:e.color.themeColor,themeTint:e.color.themeTint,themeShade:e.color.themeShade})),e.highlight&&r.push(t.marks.highlight.create({color:e.highlight})),e.fontSize&&r.push(t.marks.fontSize.create({size:e.fontSize})),e.fontFamily&&r.push(t.marks.fontFamily.create({ascii:e.fontFamily.ascii,hAnsi:e.fontFamily.hAnsi,asciiTheme:e.fontFamily.asciiTheme})),e.vertAlign==="superscript"&&r.push(t.marks.superscript.create()),e.vertAlign==="subscript"&&r.push(t.marks.subscript.create()),r}var V=(e,t)=>{let{from:r,to:n,empty:l}=e.selection;if(l)return t&&t(e.tr.setStoredMarks([])),true;if(t){let c=e.tr;e.doc.nodesBetween(r,n,(a,s)=>{if(a.isText&&a.marks.length>0){let i=Math.max(r,s),o=Math.min(n,s+a.nodeSize);for(let f of a.marks)c=c.removeMark(i,o,f.type);}}),t(c.scrollIntoView());}return true};function O(e,t){return F(e,t||{})}function _(e){return C(e)}function g(...e){return (t,r,n)=>{for(let l of e)if(l(t,r,n))return true;return false}}var z=(e,t)=>{let{$cursor:r}=e.selection;if(!r||r.parentOffset!==0||r.parent.type.name!=="paragraph")return false;let n=r.parent.attrs,l=n.indentFirstLine!=null&&n.indentFirstLine>0,c=!!n.hangingIndent,a=n.indentLeft!=null&&n.indentLeft>0;if(!l&&!c&&!a)return false;if(t){let s=r.before(),i=e.tr.setNodeMarkup(s,void 0,{...n,indentFirstLine:null,hangingIndent:null,indentLeft:null});t(i.scrollIntoView());}return true},B=["defaultTextFormatting","styleId","lineSpacing","lineSpacingRule","spaceAfter","spaceBefore","contextualSpacing"],x=new Set(["fontFamily","fontSize","textColor"]);function N(e,t,r,n){let{$from:l}=e.selection,c=l.parent;if(c.type.name!=="paragraph")return;let a={...c.attrs},s=false;if(t)for(let u of B){let m=t.attrs[u];m!=null&&a[u]==null&&(a[u]=m,s=true);}if(a.borders&&(a.borders=null,s=true),s&&e.setNodeMarkup(l.before(),void 0,a),c.textContent.length!==0)return;let i=[...r];if(i.length===0&&t){let u=t.attrs.defaultTextFormatting;u&&(i=M(u,n).filter(T=>x.has(T.type.name)));}if(i.length===0)return;let o={...a.defaultTextFormatting??{}},f=false;for(let u of i)if(u.type.name==="fontSize"&&u.attrs.size!==o.fontSize&&(o.fontSize=u.attrs.size,f=true),u.type.name==="fontFamily"){let m=u.attrs.ascii;m&&(!o.fontFamily||o.fontFamily.ascii!==m)&&(o.fontFamily=a$1(o.fontFamily,{ascii:m,hAnsi:u.attrs.hAnsi}),f=true);}f&&e.setNodeMarkup(l.before(),void 0,{...a,defaultTextFormatting:o}),e.setStoredMarks(i);}var L=(e,t,r)=>{let{$from:n}=e.selection,l=n.parent.type.name==="paragraph"?n.parent:null,a=(e.storedMarks||n.marks()).filter(o=>x.has(o.type.name)),s=null;if(!splitBlock(e,t?o=>{s=o;}:void 0,r))return false;if(t&&s!==null){let o=s;N(o,l,a,e.schema),t(o.scrollIntoView());}return true},G=b$1({name:"baseKeymap",priority:a.Low,onSchemaReady(e){return {keyboardShortcuts:{...baseKeymap,Enter:L,Backspace:g(deleteSelection,z,joinBackward),Delete:g(deleteSelection,joinForward),"Mod-a":selectAll,Escape:selectParentNode}}}});export{F as a,C as b,$ as c,P as d,M as e,V as f,O as g,_ as h,x as i,N as j,G as k};
|
package/dist/chunk-VQWZHPWI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function d(o,a){let t=o?{...o}:{},n=a,r=[["ascii","asciiTheme"],["hAnsi","hAnsiTheme"],["eastAsia","eastAsiaTheme"],["cs","csTheme"]],s=new Set;for(let[e,i]of r)s.add(e),s.add(i),(n[e]!==void 0||n[i]!==void 0)&&(delete t[e],delete t[i],n[e]!==void 0&&(t[e]=n[e]),n[i]!==void 0&&(t[i]=n[i]));for(let e of Object.keys(n))!s.has(e)&&n[e]!==void 0&&(t[e]=n[e]);return t}export{d as a};
|
package/dist/chunk-X6HFDXKB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkD4RPOJC7_js=require('./chunk-D4RPOJC7.js'),chunkIP2VXNWG_js=require('./chunk-IP2VXNWG.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkMZOVDLYL_js=require('./chunk-MZOVDLYL.js'),chunkOAWTQ3IY_js=require('./chunk-OAWTQ3IY.js'),chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function j(e){if(!e)return [];let n=[];return e.bold&&n.push(chunkOAWTQ3IY_js.b.mark("bold")),e.italic&&n.push(chunkOAWTQ3IY_js.b.mark("italic")),e.underline&&e.underline.style!=="none"&&n.push(chunkOAWTQ3IY_js.b.mark("underline",{style:e.underline.style,color:e.underline.color})),(e.strike||e.doubleStrike)&&n.push(chunkOAWTQ3IY_js.b.mark("strike",{double:e.doubleStrike||false})),e.color&&!e.color.auto&&n.push(chunkOAWTQ3IY_js.b.mark("textColor",{rgb:e.color.rgb,themeColor:e.color.themeColor,themeTint:e.color.themeTint,themeShade:e.color.themeShade})),e.highlight&&e.highlight!=="none"&&n.push(chunkOAWTQ3IY_js.b.mark("highlight",{color:e.highlight})),e.fontSize&&n.push(chunkOAWTQ3IY_js.b.mark("fontSize",{size:e.fontSize})),e.fontFamily&&n.push(chunkOAWTQ3IY_js.b.mark("fontFamily",{ascii:e.fontFamily.ascii,hAnsi:e.fontFamily.hAnsi,eastAsia:e.fontFamily.eastAsia,cs:e.fontFamily.cs,asciiTheme:e.fontFamily.asciiTheme,hAnsiTheme:e.fontFamily.hAnsiTheme,eastAsiaTheme:e.fontFamily.eastAsiaTheme,csTheme:e.fontFamily.csTheme})),e.vertAlign==="superscript"?n.push(chunkOAWTQ3IY_js.b.mark("superscript")):e.vertAlign==="subscript"&&n.push(chunkOAWTQ3IY_js.b.mark("subscript")),e.allCaps&&n.push(chunkOAWTQ3IY_js.b.mark("allCaps")),e.smallCaps&&n.push(chunkOAWTQ3IY_js.b.mark("smallCaps")),(e.spacing!=null||e.position!=null||e.scale!=null||e.kerning!=null)&&n.push(chunkOAWTQ3IY_js.b.mark("characterSpacing",{spacing:e.spacing??null,position:e.position??null,scale:e.scale??null,kerning:e.kerning??null})),e.emboss&&n.push(chunkOAWTQ3IY_js.b.mark("emboss")),e.imprint&&n.push(chunkOAWTQ3IY_js.b.mark("imprint")),e.shadow&&n.push(chunkOAWTQ3IY_js.b.mark("textShadow")),e.emphasisMark&&e.emphasisMark!=="none"&&n.push(chunkOAWTQ3IY_js.b.mark("emphasisMark",{type:e.emphasisMark})),e.outline&&n.push(chunkOAWTQ3IY_js.b.mark("textOutline")),e.hidden&&n.push(chunkOAWTQ3IY_js.b.mark("hidden")),e.rtl&&n.push(chunkOAWTQ3IY_js.b.mark("rtl")),e.effect&&e.effect!=="none"&&n.push(chunkOAWTQ3IY_js.b.mark("textEffect",{effect:e.effect})),n}function E(e,n){if(!e)return;if(!n)return e;let o=n.resolveRunStyle(e.styleId);return o?chunkMZOVDLYL_js.a(o,e):e}function ee(e,n){let o="",r,t=e.type==="simpleField"?e.content:e.fieldResult;if(t){for(let s of t)if(s.type==="run"){for(let c of s.content)c.type==="text"&&(o+=c.text);!r&&s.formatting&&(r=s.formatting);}}let l=chunkMZOVDLYL_js.a(n,r),i=j(l);return chunkOAWTQ3IY_js.b.node("field",{fieldType:e.fieldType,instruction:e.instruction,displayText:o,fieldKind:e.type==="simpleField"?"simple":"complex",fldLock:e.fldLock??false,dirty:e.dirty??false},void 0,i)}function te(e){return chunkOAWTQ3IY_js.b.node("math",{display:e.display,ommlXml:e.ommlXml,plainText:e.plainText||""})}function X(e,n,o){let r=[],t=e.formatting?.styleId?o?.getRunStyleOwnProperties(e.formatting.styleId):void 0,l=chunkMZOVDLYL_js.a(chunkMZOVDLYL_js.a(n,t),e.formatting),i=j(l);for(let s of e.content){let c=fe(s,i);r.push(...c);}return r}function fe(e,n){switch(e.type){case "text":return e.text?[chunkOAWTQ3IY_js.b.text(e.text,n)]:[];case "break":return e.breakType==="textWrapping"||!e.breakType?[chunkOAWTQ3IY_js.b.node("hardBreak",null,void 0,n)]:[];case "tab":return [chunkOAWTQ3IY_js.b.node("tab",null,void 0,n)];case "drawing":return e.image?[be(e.image)]:[];case "shape":{let t=e.shape;return t.textBody&&t.textBody.content.length>0?[]:[ye(t)]}case "footnoteRef":let o=chunkOAWTQ3IY_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"footnote"});return [chunkOAWTQ3IY_js.b.text(e.id.toString(),[...n,o])];case "endnoteRef":let r=chunkOAWTQ3IY_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"endnote"});return [chunkOAWTQ3IY_js.b.text(e.id.toString(),[...n,r])];default:return []}}function be(e){let n=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):void 0,o=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):void 0,r=e.wrap.type,t=e.wrap.wrapText,l=e.position?.horizontal?.alignment,i;r==="inline"||r==="topAndBottom"?i="none":r==="square"||r==="tight"||r==="through"?t==="left"?i="right":t==="right"||l==="left"?i="left":l==="right"?i="right":i="none":i="none";let s="inline";r==="inline"?s="inline":r==="topAndBottom"?s="block":chunkJFZIXFRC_js.b(r)||i&&i!=="none"?s="float":s="block";let c;if(e.transform){let P=[];e.transform.rotation&&P.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&P.push("scaleX(-1)"),e.transform.flipV&&P.push("scaleY(-1)"),P.length>0&&(c=P.join(" "));}let u=e.wrap.distT?chunk4Q2IP5FW_js.e(e.wrap.distT):void 0,f=e.wrap.distB?chunk4Q2IP5FW_js.e(e.wrap.distB):void 0,a=e.wrap.distL?chunk4Q2IP5FW_js.e(e.wrap.distL):void 0,m=e.wrap.distR?chunk4Q2IP5FW_js.e(e.wrap.distR):void 0,p;e.position&&(p={horizontal:e.position.horizontal?{relativeTo:e.position.horizontal.relativeTo,posOffset:e.position.horizontal.posOffset,align:e.position.horizontal.alignment}:void 0,vertical:e.position.vertical?{relativeTo:e.position.vertical.relativeTo,posOffset:e.position.vertical.posOffset,align:e.position.vertical.alignment}:void 0});let S,w,M;if(e.outline&&e.outline.width){S=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(w=`#${e.outline.color.rgb}`);let P={solid:"solid",dot:"dotted",dash:"dashed",lgDash:"dashed",dashDot:"dashed",lgDashDot:"dashed",lgDashDotDot:"dashed",sysDot:"dotted",sysDash:"dashed",sysDashDot:"dashed",sysDashDotDot:"dashed"};M=e.outline.style&&P[e.outline.style]||"solid";}let z=e.padding?.top?chunk4Q2IP5FW_js.e(e.padding.top):void 0,I=e.padding?.bottom?chunk4Q2IP5FW_js.e(e.padding.bottom):void 0,B=e.padding?.left?chunk4Q2IP5FW_js.e(e.padding.left):void 0,g=e.padding?.right?chunk4Q2IP5FW_js.e(e.padding.right):void 0;return chunkOAWTQ3IY_js.b.node("image",{src:e.src||"",alt:e.alt,title:e.title,width:n,height:o,rId:e.rId,wrapType:r,displayMode:s,cssFloat:i,transform:c,distTop:u,distBottom:f,distLeft:a,distRight:m,position:p,borderWidth:S,borderColor:w,borderStyle:M,wrapText:t,hlinkHref:e.hlinkHref,cropTop:e.crop?.top,cropRight:e.crop?.right,cropBottom:e.crop?.bottom,cropLeft:e.crop?.left,opacity:e.opacity,effectExtentTop:z,effectExtentBottom:I,effectExtentLeft:B,effectExtentRight:g,layoutInCell:e.layoutInCell,allowOverlap:e.allowOverlap})}function K(e,n,o){let r=[],t=e.href||(e.anchor?`#${e.anchor}`:""),l=chunkOAWTQ3IY_js.b.mark("hyperlink",{href:t,tooltip:e.tooltip,rId:e.rId});for(let i of e.children)if(i.type==="run"){let s=i.formatting?.styleId?o?.getRunStyleOwnProperties(i.formatting.styleId):void 0,c=chunkMZOVDLYL_js.a(chunkMZOVDLYL_js.a(n,s),i.formatting),f=[...j(c),l];for(let a of i.content)r.push(...fe(a,f));}return r}function ye(e){let n=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):100,o=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):80,r,t="solid",l,i,s;if(e.fill&&(t=e.fill.type,e.fill.color?.rgb&&(r=`#${e.fill.color.rgb}`),e.fill.type==="gradient"&&e.fill.gradient)){let m=e.fill.gradient;l=m.type,i=m.angle,s=JSON.stringify(m.stops.map(p=>({position:p.position,color:p.color.rgb?`#${p.color.rgb}`:"#000000"})));}let c,u,f;e.outline&&(e.outline.width&&(c=Math.round(e.outline.width/914400*96*100)/100),e.outline.color?.rgb&&(u=`#${e.outline.color.rgb}`),f=e.outline.style||"solid");let a;if(e.transform){let m=[];e.transform.rotation&&m.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&m.push("scaleX(-1)"),e.transform.flipV&&m.push("scaleY(-1)"),m.length>0&&(a=m.join(" "));}return chunkOAWTQ3IY_js.b.node("shape",{shapeType:e.shapeType||"rect",shapeId:e.id,width:n,height:o,fillColor:r,fillType:t,gradientType:l,gradientAngle:i,gradientStops:s,outlineWidth:c,outlineColor:u,outlineStyle:f,transform:a})}function V(e,n,o,r){let t=Pe(e,n),l=[],i,s=new Set,c;n&&(c=n.resolveParagraphStyle(e.formatting?.styleId).runFormatting);let u=chunkMZOVDLYL_js.a(c,r);for(let f of e.content){if(f.type==="commentRangeStart")s.add(f.id);else if(f.type==="commentRangeEnd")s.delete(f.id);else if(f.type==="run"){let a=X(f,u,n);s.size>0&&(a=O(a,s)),l.push(...a);}else if(f.type==="hyperlink"){let a=K(f,u,n);l.push(...a);}else if(f.type==="simpleField"||f.type==="complexField"){let a=ee(f,u);a&&l.push(a);}else if(f.type==="inlineSdt"){let a=ce(f,u,n);a&&l.push(a);}else if(f.type==="insertion"){let a=J(f,"insertion",u,n);s.size>0&&(a=O(a,s)),l.push(...a);}else if(f.type==="deletion"){let a=J(f,"deletion",u,n);s.size>0&&(a=O(a,s)),l.push(...a);}else if(f.type==="moveFrom"){let a=J(f,"deletion",u,n,true);s.size>0&&(a=O(a,s)),l.push(...a);}else if(f.type==="moveTo"){let a=J(f,"insertion",u,n,true);s.size>0&&(a=O(a,s)),l.push(...a);}else if(f.type==="mathEquation"){let a=te(f);a&&l.push(a);}f.type==="bookmarkStart"&&(i||(i=[]),i.push({id:f.id,name:f.name}));}return i&&(t.bookmarks=i),chunkOAWTQ3IY_js.b.node("paragraph",t,l)}function O(e,n){if(n.size===0)return e;let o=[...n][0],r=chunkOAWTQ3IY_js.b.marks.comment.create({commentId:o});return e.map(t=>t.isText?t.mark(r.addToSet(t.marks)):t)}function J(e,n,o,r,t=false){let l=[];for(let s of e.content)s.type==="run"?l.push(...X(s,o,r)):s.type==="hyperlink"&&l.push(...K(s,o,r));let i=chunkOAWTQ3IY_js.b.marks[n].create({revisionId:e.info.id,author:e.info.author,date:e.info.date??null,isMovePair:t});return l.map(s=>s.isText||s.type.allowsMarkType(i.type)?s.mark(i.addToSet(s.marks)):s)}function Pe(e,n){let o=e.formatting,r=o?.styleId,t={paraId:e.paraId??void 0,textId:e.textId??void 0,styleId:r,numPr:o?.numPr,listNumFmt:e.listRendering?.numFmt,listIsBullet:e.listRendering?.isBullet,listMarker:e.listRendering?.marker,listMarkerHidden:e.listRendering?.markerHidden||void 0,listMarkerFontFamily:e.listRendering?.markerFontFamily||void 0,listMarkerFontSize:e.listRendering?.markerFontSize||void 0,listMarkerSuffix:e.listRendering?.markerSuffix||void 0,listLevelNumFmts:e.listRendering?.levelNumFmts||void 0,listAbstractNumId:e.listRendering?.abstractNumId,listStartOverride:e.listRendering?.startOverride,_originalFormatting:o||void 0};if(n){let l=n.resolveParagraphStyle(r),i=l.paragraphFormatting,s=l.runFormatting;t.alignment=o?.alignment??i?.alignment,t.spaceBefore=o?.spaceBefore??i?.spaceBefore,t.spaceAfter=o?.spaceAfter??i?.spaceAfter,t.lineSpacing=o?.lineSpacing??i?.lineSpacing,t.lineSpacingRule=o?.lineSpacingRule??i?.lineSpacingRule,o?.spacingExplicit&&(t.spacingExplicit=o.spacingExplicit),t.indentLeft=o?.indentLeft??i?.indentLeft,t.indentRight=o?.indentRight??i?.indentRight,t.indentFirstLine=o?.indentFirstLine??i?.indentFirstLine,t.hangingIndent=o?.hangingIndent??i?.hangingIndent,t.borders=o?.borders??i?.borders,t.shading=o?.shading??i?.shading,t.tabs=o?.tabs??i?.tabs,t.pageBreakBefore=o?.pageBreakBefore??i?.pageBreakBefore,t.keepNext=o?.keepNext??i?.keepNext,t.keepLines=o?.keepLines??i?.keepLines,t.contextualSpacing=o?.contextualSpacing??i?.contextualSpacing,t.outlineLevel=o?.outlineLevel??i?.outlineLevel,t.bidi=o?.bidi??i?.bidi;let c=n.getDefaultCharacterStyle()?.rPr,u=c?chunkMZOVDLYL_js.a(s,c):s,f=E(o?.runProperties,n);t.defaultTextFormatting=chunkMZOVDLYL_js.a(u,f),!o?.numPr&&i?.numPr&&i.numPr.numId!==0&&(t.numPr=i.numPr);}else t.alignment=o?.alignment,t.spaceBefore=o?.spaceBefore,t.spaceAfter=o?.spaceAfter,t.lineSpacing=o?.lineSpacing,t.lineSpacingRule=o?.lineSpacingRule,o?.spacingExplicit&&(t.spacingExplicit=o.spacingExplicit),t.indentLeft=o?.indentLeft,t.indentRight=o?.indentRight,t.indentFirstLine=o?.indentFirstLine,t.hangingIndent=o?.hangingIndent,t.borders=o?.borders,t.shading=o?.shading,t.tabs=o?.tabs,t.pageBreakBefore=o?.pageBreakBefore,t.keepNext=o?.keepNext,t.keepLines=o?.keepLines,t.outlineLevel=o?.outlineLevel,t.bidi=o?.bidi,t.defaultTextFormatting=E(o?.runProperties,n);if(e.sectionProperties){t._sectionProperties=e.sectionProperties;let l=e.sectionProperties.sectionStart;(l==="nextPage"||l==="continuous"||l==="oddPage"||l==="evenPage")&&(t.sectionBreakType=l);}return e.renderedPageBreakBefore&&(t.renderedPageBreakBefore=true),e.pPrIns&&(t.pPrIns={revisionId:e.pPrIns.id,author:e.pPrIns.author,date:e.pPrIns.date??null}),e.pPrDel&&(t.pPrDel={revisionId:e.pPrDel.id,author:e.pPrDel.author,date:e.pPrDel.date??null}),e.propertyChanges&&e.propertyChanges.length>0&&(t.pPrChange=e.propertyChanges),t}function ce(e,n,o){let r=e.properties,t=[];for(let l of e.content)if(l.type==="run"){let i=X(l,n,o);t.push(...i);}else if(l.type==="hyperlink"){let i=K(l,n,o);t.push(...i);}else if(l.type==="simpleField"||l.type==="complexField"){let i=ee(l,n);i&&t.push(i);}else if(l.type==="inlineSdt"){let i=ce(l,n,o);i&&t.push(i);}else if(l.type==="mathEquation"){let i=te(l);i&&t.push(i);}return chunkOAWTQ3IY_js.b.node("sdt",{sdtType:r.sdtType,alias:r.alias??null,tag:r.tag??null,lock:r.lock??null,placeholder:r.placeholder??null,showingPlaceholder:r.showingPlaceholder??false,dateFormat:r.dateFormat??null,listItems:r.listItems?JSON.stringify(r.listItems):null,checked:r.checked??null},t.length>0?t:void 0)}function ue(e){function n(r){return r.type==="break"&&r.breakType==="page"}function o(r){if(r.type==="run"){for(let t of r.content)if(n(t))return true;return false}if(r.type==="hyperlink"){for(let t of r.children)if(t.type==="run"&&o(t))return true;return false}if(r.type==="insertion"||r.type==="deletion"){let t=r;for(let l of t.content)if(o(l))return true;return false}return false}for(let r of e.content)if(o(r))return true;return false}function R(e,n,o){if(!e||!n)return;let r=e.getStyle(n);if(!r?.tblStylePr)return;let t=r.tblStylePr.find(c=>c.type===o);if(!t)return;let l=E(t.pPr?.runProperties,e),i=E(t.rPr,e),s=chunkMZOVDLYL_js.a(l,i);return {tcPr:t.tcPr,rPr:s}}function N(e,n){if(!e&&!n)return;if(!e)return n;if(!n)return e;let o={},r=e.tcPr,t=n.tcPr;if(r||t){let l={...r??{},...t??{}};(r?.borders||t?.borders)&&(l.borders={...r?.borders??{},...t?.borders??{}}),(r?.shading||t?.shading)&&(l.shading={...r?.shading??{},...t?.shading??{}}),(r?.margins||t?.margins)&&(l.margins={...r?.margins??{},...t?.margins??{}}),o.tcPr=l;}return o.rPr=chunkMZOVDLYL_js.a(e.rPr,n.rPr),o}function Ce(e){let n=new Map,o=e.rows.length,r=new Map;for(let t=0;t<o;t++){let l=e.rows[t],i=0,s=l.cells.map(u=>{let f=u.formatting?.gridSpan??1,a=i;return i+=f,{colIndex:a,vMerge:u.formatting?.vMerge,key:`${t}-${a}`}});if(s.length>0&&s.every(({colIndex:u,vMerge:f})=>f==="continue"&&r.has(u))){for(let{colIndex:u,key:f}of s)r.delete(u),n.set(f,{rowSpan:1,skip:false});continue}for(let{colIndex:u,vMerge:f,key:a}of s){let m=u;if(f==="restart")r.set(m,t),n.set(a,{rowSpan:1,skip:false});else if(f==="continue"){let p=r.get(m);if(p!==void 0){let S=`${p}-${m}`,w=n.get(S);w&&w.rowSpan++,n.set(a,{rowSpan:1,skip:true});}else n.set(a,{rowSpan:1,skip:false});}else r.delete(m),n.set(a,{rowSpan:1,skip:false});}}return n}function Y(e,n,o){let r=Ce(e),t=e.columnWidths,l=t?.reduce((P,x)=>P+x,0)??0,i=e.formatting?.styleId,s=e.formatting?.look,c=i?n?.getStyle(i):void 0,u=n?.getDefaultTableStyle(),f=e.formatting?.borders??c?.tblPr?.borders??u?.tblPr?.borders,a=e.formatting?.cellMargins??c?.tblPr?.cellMargins??u?.tblPr?.cellMargins??void 0,m=a?{top:a.top?.value,bottom:a.bottom?.value,left:a.left?.value,right:a.right?.value}:void 0,p={styleId:e.formatting?.styleId,width:e.formatting?.width?.value,widthType:e.formatting?.width?.type,justification:e.formatting?.justification,columnWidths:t,floating:e.formatting?.floating,cellMargins:m,look:e.formatting?.look,_originalFormatting:e.formatting||void 0};e.propertyChanges&&e.propertyChanges.length>0&&(p.tblPrChange=e.propertyChanges);let S={wholeTable:R(n,i,"wholeTable"),firstRow:R(n,i,"firstRow"),lastRow:R(n,i,"lastRow"),firstCol:R(n,i,"firstCol"),lastCol:R(n,i,"lastCol"),band1Horz:R(n,i,"band1Horz"),band2Horz:R(n,i,"band2Horz"),band1Vert:R(n,i,"band1Vert"),band2Vert:R(n,i,"band2Vert"),nwCell:R(n,i,"nwCell"),neCell:R(n,i,"neCell"),swCell:R(n,i,"swCell"),seCell:R(n,i,"seCell")},w=s?.noHBand!==true,M=s?.noVBand!==true,z=0,I=e.rows.length,B=t?.length??Math.max(0,...e.rows.map(P=>P.cells.reduce((x,k)=>x+(k.formatting?.gridSpan??1),0))),g=e.rows.map((P,x)=>{let k=x===0&&!!s?.firstRow,v=x===I-1&&!!s?.lastRow,h=w&&!k&&!v?z%2===0?S.band1Horz:S.band2Horz:void 0;return w&&!k&&!v&&z++,we(P,n,k,t,l,S,h,M,s,f,x,I,B,r,m,o)});return chunkOAWTQ3IY_js.b.node("table",p,g)}function we(e,n,o,r,t,l,i,s,c,u,f,a,m,p,S,w){let M={height:e.formatting?.height?.value,heightRule:e.formatting?.heightRule,isHeader:!!e.formatting?.header,_originalFormatting:e.formatting||void 0};if(e.structuralChange){let C=e.structuralChange,D={revisionId:C.info.id,author:C.info.author,date:C.info.date??null};C.type==="tableRowInsertion"?M.trIns=D:C.type==="tableRowDeletion"&&(M.trDel=D);}e.propertyChanges&&e.propertyChanges.length>0&&(M.trPrChange=e.propertyChanges);let z=e.cells.length,I=f===0,B=f===(a??1)-1,g=e.formatting?.conditionalFormat,P=g?.firstRow??I,x=g?.lastRow??B,k=m??z,v=0,h=[];for(let C=0;C<e.cells.length;C++){let D=e.cells[C],H=D.formatting?.gridSpan??1,ge=`${f??0}-${v}`,oe=p?.get(ge),he=oe?.skip??false,Te=oe?.rowSpan??1,re;if(r&&t&&t>0){let q=0;for(let A=0;A<H&&v+A<r.length;A++)q+=r[v+A];re=Math.round(q/t*100);}if(v+=H,he)continue;let ie=v-H===0,le=v===k,b=D.formatting?.conditionalFormat,G=b?.firstRow??P,Q=b?.lastRow??x,$=b?.firstColumn??ie,W=b?.lastColumn??le,_;if(s){let q=c?.firstColumn?1:0,A=v-H-q;A>=0&&!(c?.lastColumn&&W)&&!(c?.firstColumn&&$)&&(_=A%2===0?l?.band1Vert:l?.band2Vert);}b?.oddVBand?_=l?.band1Vert:b?.evenVBand&&(_=l?.band2Vert);let L=i;g?.oddHBand?L=l?.band1Horz:g?.evenHBand&&(L=l?.band2Horz),b?.oddHBand?L=l?.band1Horz:b?.evenHBand&&(L=l?.band2Horz);let T=l?.wholeTable;T=N(T,L),T=N(T,_),G&&(c?.firstRow||g?.firstRow||b?.firstRow)&&(T=N(T,l?.firstRow)),Q&&(c?.lastRow||g?.lastRow||b?.lastRow)&&(T=N(T,l?.lastRow)),$&&(c?.firstColumn||g?.firstColumn||b?.firstColumn)&&(T=N(T,l?.firstCol)),W&&(c?.lastColumn||g?.lastColumn||b?.lastColumn)&&(T=N(T,l?.lastCol)),G&&$&&(c?.firstRow||g?.firstRow||b?.firstRow)&&(c?.firstColumn||g?.firstColumn||b?.firstColumn)&&(T=N(T,l?.nwCell)),G&&W&&(c?.firstRow||g?.firstRow||b?.firstRow)&&(c?.lastColumn||g?.lastColumn||b?.lastColumn)&&(T=N(T,l?.neCell)),Q&&$&&(c?.lastRow||g?.lastRow||b?.lastRow)&&(c?.firstColumn||g?.firstColumn||b?.firstColumn)&&(T=N(T,l?.swCell)),Q&&W&&(c?.lastRow||g?.lastRow||b?.lastRow)&&(c?.lastColumn||g?.lastColumn||b?.lastColumn)&&(T=N(T,l?.seCell)),h.push(pe(D,n,o,re,T,u,I,B,ie,le,Te,S,w));}if(h.length===0){let C=Math.max(k,1),D={formatting:C>1?{gridSpan:C}:void 0,content:[{type:"paragraph",content:[]}]},H=N(l?.wholeTable,i);h.push(pe(D,n,o,t&&t>0?100:void 0,H,u,I,B,true,true,1,S,w));}return chunkOAWTQ3IY_js.b.node("tableRow",M,h)}var xe=["top","bottom","left","right","insideH","insideV"];function Fe(e,n){if(!e)return e;let o;for(let r of xe){let t=e[r];if(!t?.color?.themeColor||t.color.auto)continue;let l=chunkMJ5FQX7Q_js.b(t.color,n);l&&(o??(o={...e}),o[r]={...t,color:{rgb:l}});}return o??e}function pe(e,n,o,r,t,l,i,s,c,u,f,a,m){let p=e.formatting,S=f??1,w=p?.width?.value,M=p?.width?.type;w===void 0&&r!==void 0&&(w=r,M="pct");let z=chunkMJ5FQX7Q_js.b(p?.shading?.fill??t?.tcPr?.shading?.fill,m),I=l?{top:i?l.top:l.insideH,bottom:s?l.bottom:l.insideH,left:c?l.left:l.insideV,right:u?l.right:l.insideV}:void 0,B=t?.tcPr?.borders,g=p?.borders,P=Fe(I||B||g?{...I??{},...B??{},...g??{}}:void 0,m),x={colspan:p?.gridSpan??1,rowspan:S,width:w,widthType:M,verticalAlign:p?.verticalAlign,backgroundColor:z,textDirection:p?.textDirection,noWrap:p?.noWrap,borders:P,margins:p?.margins?{top:p.margins.top?.value,bottom:p.margins.bottom?.value,left:p.margins.left?.value,right:p.margins.right?.value}:t?.tcPr?.margins?{top:t.tcPr.margins.top?.value,bottom:t.tcPr.margins.bottom?.value,left:t.tcPr.margins.left?.value,right:t.tcPr.margins.right?.value}:a,_originalFormatting:p||void 0,_originalResolvedFill:z};if(e.structuralChange){let h=e.structuralChange,C={revisionId:h.info.id,author:h.info.author,date:h.info.date??null};h.type==="tableCellInsertion"?x.cellMarker={kind:"ins",info:C}:h.type==="tableCellDeletion"?x.cellMarker={kind:"del",info:C}:h.type==="tableCellMerge"&&(x.cellMarker={kind:"merge",info:C,vMerge:h.vMerge??"cont",...h.vMergeOrig?{vMergeOrig:h.vMergeOrig}:{}});}e.propertyChanges&&e.propertyChanges.length>0&&(x.tcPrChange=e.propertyChanges);let k=[];for(let h of e.content)h.type==="paragraph"?k.push(V(h,n,void 0,t?.rPr)):h.type==="table"&&k.push(Y(h,n));k.length===0&&k.push(chunkOAWTQ3IY_js.b.node("paragraph",{},[]));let v=o?"tableHeader":"tableCell";return chunkOAWTQ3IY_js.b.node(v,x,k)}function ne(e,n){let o=Se(e),r=V(e,n),t=[],l=o.length>0&&r.content.size===0,{anchored:i,inFlow:s}=ke(o);for(let c of i)t.push(me(c,n));l||t.push(r);for(let c of s)t.push(me(c,n));return t}function ke(e){let n=[],o=[];for(let r of e)chunkD4RPOJC7_js.a(r)?n.push(r):o.push(r);return {anchored:n,inFlow:o}}function Se(e){let n=[];for(let o of e.content)if(o.type==="run"){for(let r of o.content)if(r.type==="shape"&&"shape"in r){let t=r.shape;t.textBody&&t.textBody.content.length>0&&n.push({type:"textBox",id:t.id,size:t.size,position:t.position,wrap:t.wrap,fill:t.fill,outline:t.outline,content:t.textBody.content,margins:t.textBody.margins});}}return n}function me(e,n){let o=e.size?.width?chunk4Q2IP5FW_js.e(e.size.width):200,r=e.size?.height?chunk4Q2IP5FW_js.e(e.size.height):void 0,t;e.fill?.color?.rgb&&(t=`#${e.fill.color.rgb}`);let l,i,s;e.outline&&e.outline.width&&(l=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(i=`#${e.outline.color.rgb}`),s=e.outline.style||"solid");let c=e.margins?.top!=null?chunk4Q2IP5FW_js.e(e.margins.top):4,u=e.margins?.bottom!=null?chunk4Q2IP5FW_js.e(e.margins.bottom):4,f=e.margins?.left!=null?chunk4Q2IP5FW_js.e(e.margins.left):7,a=e.margins?.right!=null?chunk4Q2IP5FW_js.e(e.margins.right):7,m=[];for(let p of e.content)m.push(V(p,n));return m.length===0&&m.push(chunkOAWTQ3IY_js.b.node("paragraph",{},[])),chunkOAWTQ3IY_js.b.node("textBox",{width:o,height:r,textBoxId:e.id,fillColor:t,outlineWidth:l,outlineColor:i,outlineStyle:s,marginTop:c,marginBottom:u,marginLeft:f,marginRight:a,...chunkD4RPOJC7_js.b(e)},m)}function it(e,n){let o=e.package.document.content,r=[],t=e.package.theme??null,l=n?.styles?chunkIP2VXNWG_js.b(n.styles):null;for(let i of o)if(i.type==="paragraph")r.push(...ne(i,l)),ue(i)&&r.push(chunkOAWTQ3IY_js.b.node("pageBreak"));else if(i.type==="table"){let s=Y(i,l,t);r.push(s);}return r.length===0&&r.push(chunkOAWTQ3IY_js.b.node("paragraph",{},[])),chunkOAWTQ3IY_js.b.node("doc",{defaultTabStopTwips:e.package.settings?.defaultTabStop??null},r)}function Re(e,n){let o=[],r=n?.styles?chunkIP2VXNWG_js.b(n.styles):null,t=n?.theme??null;for(let l of e)l.type==="paragraph"?o.push(...ne(l,r)):l.type==="table"&&o.push(Y(l,r,t));return o.length===0&&o.push(chunkOAWTQ3IY_js.b.node("paragraph",{},[])),chunkOAWTQ3IY_js.b.node("doc",{defaultTabStopTwips:n?.defaultTabStopTwips??null},o)}function lt(e,n){return Re(e,n)}function st(){return chunkOAWTQ3IY_js.b.node("doc",null,[chunkOAWTQ3IY_js.b.node("paragraph",{},[])])}exports.a=it;exports.b=Re;exports.c=lt;exports.d=st;
|
package/dist/chunk-Y3ZQQI4D.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkD4RPOJC7_js=require('./chunk-D4RPOJC7.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function N(t){return t.attrs.href||""}function E(t){let e=t.filter(n=>n.type.name!=="hyperlink");return e.length===0?"":e.map(n=>`${n.type.name}:${JSON.stringify(n.attrs)}`).sort().join("|")}function x(t){let e={};for(let n of t)switch(n.type.name){case "bold":e.bold=true,e.boldCs=true;break;case "italic":e.italic=true,e.italicCs=true;break;case "underline":{let i=n.attrs;e.underline={style:i.style||"single",color:i.color};break}case "strike":n.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":{let i=n.attrs;e.color={rgb:i.rgb,themeColor:i.themeColor,themeTint:i.themeTint,themeShade:i.themeShade};break}case "highlight":e.highlight=n.attrs.color;break;case "fontSize":e.fontSize=n.attrs.size,e.fontSizeCs=n.attrs.size;break;case "fontFamily":{let i=n.attrs;e.fontFamily={ascii:i.ascii,hAnsi:i.hAnsi,eastAsia:i.eastAsia||void 0,cs:i.cs||i.ascii||void 0,asciiTheme:i.asciiTheme,hAnsiTheme:i.hAnsiTheme||void 0,eastAsiaTheme:i.eastAsiaTheme||void 0,csTheme:i.csTheme||void 0};break}case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break;case "allCaps":e.allCaps=true;break;case "smallCaps":e.smallCaps=true;break;case "characterSpacing":{n.attrs.spacing!=null&&(e.spacing=n.attrs.spacing),n.attrs.position!=null&&(e.position=n.attrs.position),n.attrs.scale!=null&&(e.scale=n.attrs.scale),n.attrs.kerning!=null&&(e.kerning=n.attrs.kerning);break}case "emboss":e.emboss=true;break;case "imprint":e.imprint=true;break;case "textShadow":e.shadow=true;break;case "emphasisMark":e.emphasisMark=n.attrs.type||"dot";break;case "textOutline":e.outline=true;break;case "hidden":e.hidden=true;break;case "rtl":e.rtl=true;break;case "textEffect":e.effect=n.attrs.effect||"blinkBackground";break}return e}function L(t){let e=t.attrs.href;return e?.startsWith("#")?{type:"hyperlink",anchor:e.substring(1),tooltip:t.attrs.tooltip||void 0,children:[]}:{type:"hyperlink",href:e,tooltip:t.attrs.tooltip||void 0,rId:t.attrs.rId||void 0,children:[]}}function C(t,e){let n=e.marks.filter(i=>i.type.name!=="hyperlink");e.isText&&e.text?t.children.push(P(e.text,n)):e.type.name==="tab"?t.children.push(M()):e.type.name==="hardBreak"&&t.children.push(w());}function P(t,e){let n=x(e),i={type:"text",text:t};return {type:"run",formatting:Object.keys(n).length>0?n:void 0,content:[i]}}function O(t,e){let n=t.content[t.content.length-1];n&&n.type==="text"?n.text+=e:t.content.push({type:"text",text:e});}function w(){return {type:"run",content:[{type:"break",breakType:"textWrapping"}]}}function M(){return {type:"run",content:[{type:"tab"}]}}function D(t,e){let n=t.attrs,i=e&&e.length>0?x(e):void 0,o=n.displayText||"";if(!o)switch(n.fieldType){case "PAGE":o="1";break;case "NUMPAGES":o="1";break;default:o=" ";break}let r={type:"run",content:[{type:"text",text:o}],...i&&Object.keys(i).length>0?{formatting:i}:{}};return n.fieldKind==="complex"?{type:"complexField",instruction:n.instruction,fieldType:n.fieldType,fieldCode:[],fieldResult:[r],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}:{type:"simpleField",instruction:n.instruction,fieldType:n.fieldType,content:[r],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}}function H(t){let e=t.attrs;return {type:"mathEquation",display:e.display||"inline",ommlXml:e.ommlXml,plainText:e.plainText||void 0}}function v(t){let e=t.attrs,i={type:e.wrapType||"inline"};e.distTop!==void 0&&(i.distT=chunk4Q2IP5FW_js.f(e.distTop)),e.distBottom!==void 0&&(i.distB=chunk4Q2IP5FW_js.f(e.distBottom)),e.distLeft!==void 0&&(i.distL=chunk4Q2IP5FW_js.f(e.distLeft)),e.distRight!==void 0&&(i.distR=chunk4Q2IP5FW_js.f(e.distRight)),e.wrapText&&(i.wrapText=e.wrapText);let o={type:"image",rId:e.rId||"",src:e.src,alt:e.alt||void 0,title:e.title||void 0,size:{width:chunk4Q2IP5FW_js.f(e.width||0),height:chunk4Q2IP5FW_js.f(e.height||0)},wrap:i};if(e.transform){let a=e.transform,l={},f=a.match(/rotate\(([-\d.]+)deg\)/);f&&(l.rotation=parseFloat(f[1])),a.includes("scaleX(-1)")&&(l.flipH=true),a.includes("scaleY(-1)")&&(l.flipV=true),(l.rotation||l.flipH||l.flipV)&&(o.transform=l);}if(e.position?.horizontal&&e.position?.vertical){let a=e.position;o.position={horizontal:{relativeTo:a.horizontal.relativeTo||"column",alignment:a.horizontal.align,posOffset:a.horizontal.posOffset},vertical:{relativeTo:a.vertical.relativeTo||"paragraph",alignment:a.vertical.align,posOffset:a.vertical.posOffset}};}if(e.borderWidth&&e.borderWidth>0){let a={solid:"solid",dotted:"dot",dashed:"dash",double:"solid",groove:"solid",ridge:"solid",inset:"solid",outset:"solid"};o.outline={width:chunk4Q2IP5FW_js.f(e.borderWidth),color:e.borderColor?{rgb:e.borderColor.replace("#","")}:void 0,style:e.borderStyle&&a[e.borderStyle]||"solid"};}if(e.hlinkHref&&(o.hlinkHref=e.hlinkHref),e.cropTop!==void 0||e.cropRight!==void 0||e.cropBottom!==void 0||e.cropLeft!==void 0){let a={};e.cropTop!==void 0&&e.cropTop!==null&&(a.top=e.cropTop),e.cropRight!==void 0&&e.cropRight!==null&&(a.right=e.cropRight),e.cropBottom!==void 0&&e.cropBottom!==null&&(a.bottom=e.cropBottom),e.cropLeft!==void 0&&e.cropLeft!==null&&(a.left=e.cropLeft),Object.keys(a).length>0&&(o.crop=a);}if(e.opacity!==void 0&&e.opacity!==null&&e.opacity<1&&(o.opacity=e.opacity),e.layoutInCell!==void 0&&e.layoutInCell!==null&&(o.layoutInCell=e.layoutInCell),e.allowOverlap!==void 0&&e.allowOverlap!==null&&(o.allowOverlap=e.allowOverlap),e.effectExtentTop||e.effectExtentBottom||e.effectExtentLeft||e.effectExtentRight){let a={};e.effectExtentTop&&(a.top=chunk4Q2IP5FW_js.f(e.effectExtentTop)),e.effectExtentBottom&&(a.bottom=chunk4Q2IP5FW_js.f(e.effectExtentBottom)),e.effectExtentLeft&&(a.left=chunk4Q2IP5FW_js.f(e.effectExtentLeft)),e.effectExtentRight&&(a.right=chunk4Q2IP5FW_js.f(e.effectExtentRight)),Object.keys(a).length>0&&(o.padding=a);}return {type:"run",content:[{type:"drawing",image:o}]}}function R(t){let e=t.attrs,n={type:"shape",shapeType:e.shapeType||"rect",id:e.shapeId||void 0,size:{width:e.width?chunk4Q2IP5FW_js.f(e.width):0,height:e.height?chunk4Q2IP5FW_js.f(e.height):0}};if(e.fillType==="gradient"&&e.gradientStops)try{let o=JSON.parse(e.gradientStops);n.fill={type:"gradient",gradient:{type:e.gradientType||"linear",angle:e.gradientAngle||void 0,stops:o.map(r=>({position:r.position,color:{rgb:r.color.replace("#","")}}))}};}catch{n.fill={type:"solid",color:{rgb:(e.fillColor||"000000").replace("#","")}};}else e.fillColor?n.fill={type:e.fillType||"solid",color:{rgb:e.fillColor.replace("#","")}}:e.fillType==="none"&&(n.fill={type:"none"});if(e.outlineWidth&&e.outlineWidth>0){let o={solid:"solid",dotted:"dot",dashed:"dash"};n.outline={width:chunk4Q2IP5FW_js.f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&o[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:n}]}}function T(t){let e=t.attrs,n=_(W(t),t),i=e.bookmarks;if(i&&i.length>0){let r=i.map(l=>({type:"bookmarkStart",id:l.id,name:l.name})),a=i.map(l=>({type:"bookmarkEnd",id:l.id}));n=[...r,...n,...a];}let o={type:"paragraph",paraId:e.paraId||void 0,textId:e.textId||void 0,formatting:$(e),content:n};return e.renderedPageBreakBefore&&(o.renderedPageBreakBefore=true),e.pPrIns&&(o.pPrIns={id:e.pPrIns.revisionId,author:e.pPrIns.author,...e.pPrIns.date?{date:e.pPrIns.date}:{}}),e.pPrDel&&(o.pPrDel={id:e.pPrDel.revisionId,author:e.pPrDel.author,...e.pPrDel.date?{date:e.pPrDel.date}:{}}),e.pPrChange&&e.pPrChange.length>0&&(o.propertyChanges=e.pPrChange),e._sectionProperties?o.sectionProperties=e._sectionProperties:e.sectionBreakType&&(o.sectionProperties={sectionStart:e.sectionBreakType}),o}function _(t,e){let n=new Set;if(e.forEach(a=>{for(let l of a.marks)l.type.name==="comment"&&n.add(l.attrs.commentId);}),n.size===0)return t;let i=[],o=new Set,r=0;e.forEach(a=>{let l=new Set;for(let f of a.marks)f.type.name==="comment"&&l.add(f.attrs.commentId);for(let f of [...o])l.has(f)||(i.push({type:"commentRangeEnd",id:f}),o.delete(f));for(let f of l)o.has(f)||(i.push({type:"commentRangeStart",id:f}),o.add(f));r<t.length&&i.push(t[r]),r++;});for(let a of o)i.push({type:"commentRangeEnd",id:a});return i}function $(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.alignment!==(n.alignment||void 0)&&(i.alignment=t.alignment||void 0),t.numPr!==n.numPr&&JSON.stringify(t.numPr)!==JSON.stringify(n.numPr)&&(i.numPr=t.numPr||void 0),t.styleId!==(n.styleId||void 0)&&(i.styleId=t.styleId||void 0),t.pageBreakBefore!==(n.pageBreakBefore||void 0)&&(i.pageBreakBefore=t.pageBreakBefore||void 0),t.bidi!==(n.bidi||void 0)&&(i.bidi=t.bidi||void 0),i}if(t.alignment||t.spaceBefore||t.spaceAfter||t.lineSpacing||t.indentLeft||t.indentRight||t.indentFirstLine||t.numPr||t.styleId||t.borders||t.shading||t.tabs||t.outlineLevel!=null||t.contextualSpacing||t.bidi)return {alignment:t.alignment||void 0,spaceBefore:t.spaceBefore||void 0,spaceAfter:t.spaceAfter||void 0,lineSpacing:t.lineSpacing||void 0,lineSpacingRule:t.lineSpacingRule||void 0,indentLeft:t.indentLeft||void 0,indentRight:t.indentRight||void 0,indentFirstLine:t.indentFirstLine||void 0,hangingIndent:t.hangingIndent||void 0,numPr:t.numPr||void 0,styleId:t.styleId||void 0,borders:t.borders||void 0,shading:t.shading||void 0,tabs:t.tabs||void 0,outlineLevel:t.outlineLevel??void 0,contextualSpacing:t.contextualSpacing||void 0,bidi:t.bidi||void 0}}function W(t){let e=[],n=null,i=null,o=null;return t.forEach(r=>{let a=r.marks.find(s=>s.type.name==="footnoteRef");if(a){n&&(e.push(n),n=null,i=null),o&&(e.push(o),o=null);let u={type:a.attrs.noteType==="endnote"?"endnoteRef":"footnoteRef",id:parseInt(a.attrs.id,10)||0};e.push({type:"run",content:[u]});return}let l=r.marks.find(s=>s.type.name==="insertion"),f=r.marks.find(s=>s.type.name==="deletion");if(l||f){n&&(e.push(n),n=null,i=null),o&&(e.push(o),o=null);let s=l||f,u;if(r.type.name==="image")u=v(r);else if(r.type.name==="shape")u=R(r);else {let m=r.marks.filter(h=>h.type.name!=="insertion"&&h.type.name!=="deletion"),g=x(m);u={type:"run",content:r.isText&&r.text?[{type:"text",text:r.text}]:[],...Object.keys(g).length>0?{formatting:g}:{}};}let p={id:s.attrs.revisionId,author:s.attrs.author||"Unknown",date:s.attrs.date||void 0},y=s.attrs.isMovePair===true;l?y?e.push({type:"moveTo",info:p,content:[u]}):e.push({type:"insertion",info:p,content:[u]}):y?e.push({type:"moveFrom",info:p,content:[u]}):e.push({type:"deletion",info:p,content:[u]});return}let d=r.marks.find(s=>s.type.name==="hyperlink");if(d){let s=N(d),u=o?.href||(o?.anchor?`#${o.anchor}`:"");o&&u===s?C(o,r):(n&&(e.push(n),n=null,i=null),o&&e.push(o),o=L(d),C(o,r));return}if(o&&(e.push(o),o=null),r.isText){let s=E(r.marks);n&&i===s?O(n,r.text||""):(n&&e.push(n),n=P(r.text||"",r.marks),i=s);}else r.type.name==="hardBreak"?(n&&(e.push(n),n=null,i=null),e.push(w())):r.type.name==="image"?(n&&(e.push(n),n=null,i=null),e.push(v(r))):r.type.name==="shape"?(n&&(e.push(n),n=null,i=null),e.push(R(r))):r.type.name==="tab"?(n&&(e.push(n),n=null,i=null),e.push(M())):r.type.name==="field"?(n&&(e.push(n),n=null,i=null),e.push(D(r,r.marks))):r.type.name==="sdt"?(n&&(e.push(n),n=null,i=null),e.push(K(r))):r.type.name==="math"&&(n&&(e.push(n),n=null,i=null),e.push(H(r)));}),n&&e.push(n),o&&e.push(o),e}function K(t){let e=t.attrs,n={sdtType:e.sdtType??"richText",alias:e.alias??void 0,tag:e.tag??void 0,lock:e.lock??void 0,placeholder:e.placeholder??void 0,showingPlaceholder:e.showingPlaceholder??void 0,dateFormat:e.dateFormat??void 0,listItems:e.listItems?JSON.parse(e.listItems):void 0,checked:e.checked!=null?e.checked:void 0},o=W(t).filter(r=>r.type==="run"||r.type==="hyperlink"||r.type==="simpleField"||r.type==="complexField"||r.type==="inlineSdt"||r.type==="mathEquation");return {type:"inlineSdt",properties:n,content:o}}function V(t){for(let e of t)for(let n of e.cells){let i=n.formatting?.borders;if(i){let o=i.top||i.left||i.right||i.bottom||i.insideH||i.insideV;return o?{top:i.top??o,bottom:i.bottom??o,left:i.left??o,right:i.right??o,insideH:i.insideH??i.bottom??o,insideV:i.insideV??i.right??o}:void 0}}}function J(t){let e=[],n=[],i=0;for(let o=0;o<t.childCount;o++){let r=t.child(o),a=0;r.forEach(l=>{if(l.type.name!=="tableCell"&&l.type.name!=="tableHeader")return;for(;e[o]?.[a];)a++;let f=l.attrs.rowspan||1,d=l.attrs.colspan||1;n.push({row:o,col:a,rowspan:f,colspan:d,cell:X(l)});for(let s=o;s<o+f;s++){let u=e[s]??[];e[s]=u;for(let p=a;p<a+d;p++)u[p]=true;}a+=d,i=Math.max(i,a);});}return {anchors:n,totalCols:i}}function I(t){let e=t.attrs,{anchors:n,totalCols:i}=J(t),o=new Map,r=new Map;for(let d of n){o.set(`${d.row}-${d.col}`,d);for(let s=d.row;s<d.row+d.rowspan;s++)for(let u=d.col;u<d.col+d.colspan;u++)r.set(`${s}-${u}`,d);}let a=[];for(let d=0;d<t.childCount;d++){let s=t.child(d),u=[];for(let m=0;m<i;){let g=o.get(`${d}-${m}`);if(g){let b={...g.cell.formatting??{}};g.colspan>1?b.gridSpan=g.colspan:delete b.gridSpan,g.rowspan>1?b.vMerge="restart":delete b.vMerge,u.push({...g.cell,formatting:Object.keys(b).length?b:void 0}),m+=g.colspan;continue}let h=r.get(`${d}-${m}`);if(!h){m++;continue}let k={...h.cell.formatting??{}};h.colspan>1?k.gridSpan=h.colspan:delete k.gridSpan,k.vMerge="continue",u.push({...h.cell,content:[],formatting:k}),m+=h.colspan;}let p=s.attrs,y={type:"tableRow",formatting:U(p),cells:u};p.trIns?y.structuralChange={type:"tableRowInsertion",info:{id:p.trIns.revisionId,author:p.trIns.author,...p.trIns.date?{date:p.trIns.date}:{}}}:p.trDel&&(y.structuralChange={type:"tableRowDeletion",info:{id:p.trDel.revisionId,author:p.trDel.author,...p.trDel.date?{date:p.trDel.date}:{}}}),p.trPrChange&&p.trPrChange.length>0&&(y.propertyChanges=p.trPrChange),a.push(y);}let l=q(e)||void 0;if(!l?.borders){let d=V(a);if(d)if(l)l.borders=d;else return {type:"table",columnWidths:e.columnWidths||void 0,formatting:{borders:d},rows:a}}let f={type:"table",columnWidths:e.columnWidths||void 0,formatting:l,rows:a};return e.tblPrChange&&e.tblPrChange.length>0&&(f.propertyChanges=e.tblPrChange),f}function q(t){if(t._originalFormatting){let o=t._originalFormatting,r={...o};t.styleId!==(o.styleId||void 0)&&(r.styleId=t.styleId||void 0),t.justification!==(o.justification||void 0)&&(r.justification=t.justification||void 0),t.floating!==(o.floating||void 0)&&(r.floating=t.floating||void 0),t.look!==(o.look||void 0)&&(r.look=t.look||void 0);let a=o.width?.value,l=o.width?.type;return (t.width!==a||t.widthType!==l)&&(t.width!=null||t.widthType?r.width={value:t.width??0,type:t.widthType||"dxa"}:r.width=void 0),t.cellMargins&&(r.cellMargins={top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}),r}if(!(t.styleId||t.width!=null||t.widthType||t.justification||t.floating||t.cellMargins||t.look))return;let n=t.cellMargins?{top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}:void 0,i;return (t.width!=null||t.widthType)&&(i={value:t.width??0,type:t.widthType||"dxa"}),{styleId:t.styleId||void 0,width:i,justification:t.justification||void 0,floating:t.floating||void 0,cellMargins:n,look:t.look||void 0}}function U(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.height!==(n.height?.value||void 0)&&(i.height=t.height?{value:t.height,type:"dxa"}:void 0),t.heightRule!==(n.heightRule||void 0)&&(i.heightRule=t.heightRule||void 0),t.isHeader!==(n.header||void 0)&&(i.header=t.isHeader||void 0),i}if(t.height||t.isHeader)return {height:t.height?{value:t.height,type:"dxa"}:void 0,heightRule:t.heightRule||void 0,header:t.isHeader||void 0}}function X(t){let e=t.attrs,n=[];t.forEach(o=>{o.type.name==="paragraph"?n.push(T(o)):o.type.name==="table"&&n.push(I(o));});let i={type:"tableCell",formatting:G(e),content:n};if(e.cellMarker){let o=e.cellMarker,r={id:o.info.revisionId,author:o.info.author,...o.info.date?{date:o.info.date}:{}};o.kind==="ins"?i.structuralChange={type:"tableCellInsertion",info:r}:o.kind==="del"?i.structuralChange={type:"tableCellDeletion",info:r}:i.structuralChange={type:"tableCellMerge",info:r,...o.vMerge?{vMerge:o.vMerge}:{},...o.vMergeOrig?{vMergeOrig:o.vMergeOrig}:{}};}return e.tcPrChange&&e.tcPrChange.length>0&&(i.propertyChanges=e.tcPrChange),i}function G(t){if(t._originalFormatting){let i=t._originalFormatting,o={...i};if(t.colspan>1&&(o.gridSpan=t.colspan),t.width!=null&&(o.width={value:t.width,type:t.widthType||"dxa"}),t.verticalAlign!==(i.verticalAlign||void 0)&&(o.verticalAlign=t.verticalAlign||void 0),t.backgroundColor?t._originalResolvedFill===t.backgroundColor&&i.shading?o.shading=i.shading:o.shading={fill:{rgb:t.backgroundColor}}:i.shading&&(o.shading=void 0),t.borders&&(o.borders=t.borders),t.margins){let r=t.margins,a={};r.top!=null&&(a.top={value:r.top,type:"dxa"}),r.bottom!=null&&(a.bottom={value:r.bottom,type:"dxa"}),r.left!=null&&(a.left={value:r.left,type:"dxa"}),r.right!=null&&(a.right={value:r.right,type:"dxa"}),o.margins=a;}return t.textDirection!==(i.textDirection||void 0)&&(o.textDirection=t.textDirection||void 0),o}if(!(t.colspan>1||t.rowspan>1||t.width!=null||t.verticalAlign||t.backgroundColor||t.borders||t.margins||t.textDirection))return;let n;if(t.margins){let i=t.margins;n={},i.top!=null&&(n.top={value:i.top,type:"dxa"}),i.bottom!=null&&(n.bottom={value:i.bottom,type:"dxa"}),i.left!=null&&(n.left={value:i.left,type:"dxa"}),i.right!=null&&(n.right={value:i.right,type:"dxa"});}return {gridSpan:t.colspan>1?t.colspan:void 0,width:t.width!=null?{value:t.width,type:t.widthType||"dxa"}:void 0,verticalAlign:t.verticalAlign||void 0,textDirection:t.textDirection||void 0,shading:t.backgroundColor?{fill:{rgb:t.backgroundColor}}:void 0,borders:t.borders,margins:n}}function S(t){let e=t.attrs,n=[];t.forEach(l=>{l.type.name==="paragraph"&&n.push(T(l));});let i={type:"shape",shapeType:"rect",id:e.textBoxId||void 0,size:{width:e.width?chunk4Q2IP5FW_js.f(e.width):0,height:e.height?chunk4Q2IP5FW_js.f(e.height):0},textBody:{content:n.length>0?n:[{type:"paragraph",content:[]}],margins:{top:e.marginTop!=null?chunk4Q2IP5FW_js.f(e.marginTop):void 0,bottom:e.marginBottom!=null?chunk4Q2IP5FW_js.f(e.marginBottom):void 0,left:e.marginLeft!=null?chunk4Q2IP5FW_js.f(e.marginLeft):void 0,right:e.marginRight!=null?chunk4Q2IP5FW_js.f(e.marginRight):void 0}}},o=chunkD4RPOJC7_js.d(e);o&&(i.position=o);let r=chunkD4RPOJC7_js.e(e);if(r&&(i.wrap=r),e.fillColor&&(i.fill={type:"solid",color:{rgb:e.fillColor.replace("#","")}}),e.outlineWidth&&e.outlineWidth>0){let l={solid:"solid",dotted:"dot",dashed:"dash"};i.outline={width:chunk4Q2IP5FW_js.f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&l[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:i}]}}function j(t){return {type:"paragraph",content:[S(t)]}}function Y(t,e){let i={content:z(t),finalSectionProperties:e?.package.document.finalSectionProperties,sections:e?.package.document.sections,comments:e?.package.document.comments};return e?{...e,package:{...e.package,document:i}}:{package:{document:i}}}function z(t){let e=[],n=[],i=()=>{for(let o of n)e.push({type:"paragraph",content:[o]});n=[];};return t.forEach(o=>{if(o.type.name==="paragraph"){let r=T(o);n.length>0&&(r.content=[...n,...r.content],n=[]),e.push(r);}else if(o.type.name==="table")i(),e.push(I(o));else if(o.type.name==="textBox"){let r=o.attrs;chunkD4RPOJC7_js.c(r)?n.push(S(o)):(i(),e.push(j(o)));}else o.type.name==="pageBreak"&&(i(),e.push(Q()));}),i(),e}function Q(){return {type:"paragraph",content:[{type:"run",content:[{type:"break",breakType:"page"}]}]}}function me(t,e){return Y(e,t)}function ye(t){return z(t)}exports.a=Y;exports.b=me;exports.c=ye;
|