@eigenpal/docx-editor-core 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/agent/index.d.mts +4 -4
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-2IE6UDHJ.mjs +2 -0
- package/dist/chunk-3AZWLVLC.js +1 -0
- package/dist/chunk-3JXR6YU4.mjs +1 -0
- package/dist/{chunk-LTYW3NLX.js → chunk-3NLVHZMT.js} +2 -2
- package/dist/chunk-5SU4HPQS.mjs +1 -0
- package/dist/{chunk-6PR4XHQ3.mjs → chunk-7PX32GLB.mjs} +1 -1
- package/dist/{chunk-AFMMYLPX.js → chunk-ABBG4WD2.js} +2 -2
- package/dist/chunk-AHXPHBMT.js +1 -0
- package/dist/chunk-B6LYBJ4H.mjs +1 -0
- package/dist/chunk-BFB4PRS4.mjs +1 -0
- package/dist/chunk-BRHHK4MG.mjs +2 -0
- package/dist/chunk-CUXXRGPQ.mjs +1 -0
- package/dist/chunk-D536HC5M.js +2 -0
- package/dist/{chunk-GFQM7PKY.js → chunk-D5E5TA74.js} +1 -1
- package/dist/chunk-EPX7BBJD.js +2 -0
- package/dist/chunk-EQVNAHL7.mjs +1 -0
- package/dist/{chunk-EXOP727C.mjs → chunk-EV6W6KXG.mjs} +1 -1
- package/dist/chunk-FCJWLEKT.mjs +1 -0
- package/dist/{chunk-XDH55WXX.mjs → chunk-G7AKYAKU.mjs} +1 -1
- package/dist/{chunk-AGNZEOVL.mjs → chunk-GHQS3I2W.mjs} +1 -1
- package/dist/chunk-HAAMO2Z2.mjs +1 -0
- package/dist/chunk-HL5PQT3A.mjs +2 -0
- package/dist/chunk-IMKU4O3P.js +1 -0
- package/dist/chunk-IN6IYQ2X.js +1 -0
- package/dist/chunk-IO6HZ7KR.js +2 -0
- package/dist/{chunk-CP767TWV.js → chunk-N3EIZN65.js} +1 -1
- package/dist/chunk-NO5LW2DQ.mjs +1 -0
- package/dist/chunk-OTDF6PZK.js +1 -0
- package/dist/chunk-QMLIXLZJ.mjs +4 -0
- package/dist/chunk-QVEAQOMR.mjs +2 -0
- package/dist/{chunk-APFTVA4F.mjs → chunk-QXHL67FG.mjs} +1 -1
- package/dist/{chunk-XCMA7AY7.js → chunk-SAFW7UQZ.js} +1 -1
- package/dist/chunk-TGPS3SRR.mjs +1 -0
- package/dist/chunk-TMISJEGL.js +1 -0
- package/dist/chunk-TRQN2SFW.mjs +59 -0
- package/dist/chunk-UGXSKZVM.js +1 -0
- package/dist/chunk-V6SWUCTS.js +2 -0
- package/dist/chunk-X3NB7STJ.js +1 -0
- package/dist/{chunk-7SGC3CXJ.js → chunk-XBHF5Q2F.js} +1 -1
- package/dist/chunk-XBIKSAH6.js +1 -0
- package/dist/{chunk-6DK4UBGM.js → chunk-XOH7YAYL.js} +1 -1
- package/dist/{chunk-4S5VOHQK.mjs → chunk-XWQB6APW.mjs} +1 -1
- package/dist/chunk-Y7I5QDCN.mjs +1 -0
- package/dist/chunk-YCDB5TA6.js +4 -0
- package/dist/chunk-YVYB4YCI.js +1 -0
- package/dist/{chunk-NLTX7XVR.js → chunk-Z4SJCSTS.js} +1 -1
- package/dist/{colorResolver-CVsPLsw1.d.ts → colorResolver-BZ_yScf4.d.ts} +1 -1
- package/dist/{colorResolver-C3q7MLLD.d.mts → colorResolver-C6DtsoFI.d.mts} +1 -1
- package/dist/core-plugins.d.mts +3 -3
- package/dist/core-plugins.d.ts +3 -3
- 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/docx/index.d.mts +3 -3
- package/dist/docx/index.d.ts +3 -3
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +3 -3
- package/dist/docx/parser.d.ts +3 -3
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +3 -3
- package/dist/docx/rezip.d.ts +3 -3
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +3 -3
- package/dist/docx/serializer/index.d.ts +3 -3
- package/dist/{formatting-D9I-lFS4.d.mts → formatting-BH4hcZiq.d.mts} +1 -1
- package/dist/{formatting-BwpZWdGi.d.ts → formatting-_OXU8gLB.d.ts} +1 -1
- package/dist/{headerFooterLayout-B3QVg556.d.ts → headerFooterLayout-B5LyDpSM.d.ts} +20 -1
- package/dist/{headerFooterLayout-DkclHZ0Z.d.mts → headerFooterLayout-DVFcJ832.d.mts} +20 -1
- package/dist/headless.d.mts +5 -5
- package/dist/headless.d.ts +5 -5
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +5 -5
- package/dist/layout-bridge/index.d.ts +5 -5
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +39 -2
- package/dist/layout-bridge/measuring/index.d.ts +39 -2
- package/dist/layout-bridge/measuring/index.js +1 -1
- package/dist/layout-bridge/measuring/index.mjs +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 +10 -3
- package/dist/layout-bridge/toFlowBlocks.d.ts +10 -3
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +30 -3
- package/dist/layout-engine/index.d.ts +30 -3
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +9 -0
- package/dist/layout-engine/types.d.ts +9 -0
- package/dist/layout-painter/index.d.mts +4 -4
- package/dist/layout-painter/index.d.ts +4 -4
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +4 -4
- package/dist/layout-painter/renderPage.d.ts +4 -4
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/{lists-JDB80qyP.d.mts → lists-CvG_iVK3.d.mts} +8 -2
- package/dist/{lists-CdiIk_c1.d.ts → lists-UTp_tk7B.d.ts} +8 -2
- package/dist/managers/AutoSaveManager.d.mts +3 -3
- package/dist/managers/AutoSaveManager.d.ts +3 -3
- package/dist/managers/TableSelectionManager.d.mts +3 -3
- package/dist/managers/TableSelectionManager.d.ts +3 -3
- package/dist/managers/types.d.mts +3 -3
- package/dist/managers/types.d.ts +3 -3
- package/dist/{marks-CCPVlQzL.d.mts → marks-BY573yZn.d.mts} +1 -1
- package/dist/{marks-BujVxYP4.d.ts → marks-CjC9tF5k.d.ts} +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-BXi1Uu3e.d.mts → nodes-CL8M0L-a.d.mts} +4 -2
- package/dist/{nodes-DfKj9kUA.d.ts → nodes-D7PTUJ2N.d.ts} +4 -2
- package/dist/prosemirror/commands/formatting.d.mts +2 -2
- package/dist/prosemirror/commands/formatting.d.ts +2 -2
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +2 -2
- package/dist/prosemirror/commands/index.d.ts +2 -2
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.d.mts +1 -1
- package/dist/prosemirror/commands/paragraph.d.ts +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 +3 -3
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -3
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +11 -3
- package/dist/prosemirror/conversion/index.d.ts +11 -3
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/extensions/index.d.mts +1 -1
- package/dist/prosemirror/extensions/index.d.ts +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +5 -5
- package/dist/prosemirror/index.d.ts +5 -5
- package/dist/prosemirror/index.js +1 -1
- package/dist/prosemirror/index.mjs +1 -1
- package/dist/prosemirror/plugins/index.d.mts +1 -1
- package/dist/prosemirror/plugins/index.d.ts +1 -1
- package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
- package/dist/prosemirror/schema/index.d.mts +4 -4
- package/dist/prosemirror/schema/index.d.ts +4 -4
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +2 -2
- package/dist/prosemirror/styles/index.d.ts +2 -2
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -2
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -2
- package/dist/{selectionContext-85CE0f7a.d.ts → selectionContext-BPAqgNgk.d.ts} +1 -1
- package/dist/{selectionContext-Xq3AY7pn.d.mts → selectionContext-CoZat7QZ.d.mts} +1 -1
- package/dist/{styles-jqO45PSq.d.ts → styles-BBv7doYK.d.ts} +1 -1
- package/dist/{styles-BBoqh07F.d.mts → styles-EI2lxeEN.d.mts} +1 -1
- package/dist/types/agentApi.d.mts +1 -1
- package/dist/types/agentApi.d.ts +1 -1
- package/dist/types/content.d.mts +2 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/document.d.mts +25 -6
- package/dist/types/document.d.ts +25 -6
- package/dist/utils/comments.d.mts +2 -2
- package/dist/utils/comments.d.ts +2 -2
- package/dist/utils/index.d.mts +4 -4
- package/dist/utils/index.d.ts +4 -4
- package/package.json +1 -1
- package/dist/chunk-2D3UPAMA.mjs +0 -1
- package/dist/chunk-2RCMY2GE.mjs +0 -1
- package/dist/chunk-3GNIP6IX.mjs +0 -4
- package/dist/chunk-44RUAQA2.js +0 -1
- package/dist/chunk-5N5DBQJV.mjs +0 -1
- package/dist/chunk-5TNMVXDS.mjs +0 -1
- package/dist/chunk-6LOYA7G5.mjs +0 -2
- package/dist/chunk-7VCMJCBY.js +0 -2
- package/dist/chunk-BKHQA6JJ.js +0 -1
- package/dist/chunk-BOYVCOLZ.mjs +0 -1
- package/dist/chunk-BS35CXMN.js +0 -1
- package/dist/chunk-BTOBVF4I.mjs +0 -1
- package/dist/chunk-C6GSFUV2.js +0 -2
- package/dist/chunk-DV6IEOP5.js +0 -4
- package/dist/chunk-IBNUQL57.mjs +0 -2
- package/dist/chunk-NMSU4MWP.mjs +0 -1
- package/dist/chunk-OLKDLRJ4.js +0 -1
- package/dist/chunk-P6RNOYAG.mjs +0 -2
- package/dist/chunk-R7RR6M4A.mjs +0 -2
- package/dist/chunk-RCS6UNIJ.mjs +0 -1
- package/dist/chunk-T5RYEG2V.js +0 -1
- package/dist/chunk-TYYOBPNK.js +0 -1
- package/dist/chunk-UCZVMHB5.mjs +0 -59
- package/dist/chunk-VQ2QGHYS.js +0 -2
- package/dist/chunk-WZP6ZHBR.js +0 -1
- package/dist/chunk-YGHHSCPR.js +0 -2
package/dist/chunk-2RCMY2GE.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1,b as b$2}from'./chunk-LBKMYD3M.mjs';import {b}from'./chunk-NBLJPT54.mjs';import {b as b$4}from'./chunk-QPFJJPIC.mjs';import {a}from'./chunk-ILJUDEZ5.mjs';import {b as b$1}from'./chunk-NMSU4MWP.mjs';import {b as b$3}from'./chunk-67LVRQIR.mjs';import {e}from'./chunk-VW22RZ6C.mjs';function _(e){if(!e)return [];let n=[];return e.bold&&n.push(b$1.mark("bold")),e.italic&&n.push(b$1.mark("italic")),e.underline&&e.underline.style!=="none"&&n.push(b$1.mark("underline",{style:e.underline.style,color:e.underline.color})),(e.strike||e.doubleStrike)&&n.push(b$1.mark("strike",{double:e.doubleStrike||false})),e.color&&!e.color.auto&&n.push(b$1.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(b$1.mark("highlight",{color:e.highlight})),e.fontSize&&n.push(b$1.mark("fontSize",{size:e.fontSize})),e.fontFamily&&n.push(b$1.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(b$1.mark("superscript")):e.vertAlign==="subscript"&&n.push(b$1.mark("subscript")),e.allCaps&&n.push(b$1.mark("allCaps")),e.smallCaps&&n.push(b$1.mark("smallCaps")),(e.spacing!=null||e.position!=null||e.scale!=null||e.kerning!=null)&&n.push(b$1.mark("characterSpacing",{spacing:e.spacing??null,position:e.position??null,scale:e.scale??null,kerning:e.kerning??null})),e.emboss&&n.push(b$1.mark("emboss")),e.imprint&&n.push(b$1.mark("imprint")),e.shadow&&n.push(b$1.mark("textShadow")),e.emphasisMark&&e.emphasisMark!=="none"&&n.push(b$1.mark("emphasisMark",{type:e.emphasisMark})),e.outline&&n.push(b$1.mark("textOutline")),e.hidden&&n.push(b$1.mark("hidden")),e.rtl&&n.push(b$1.mark("rtl")),e.effect&&e.effect!=="none"&&n.push(b$1.mark("textEffect",{effect:e.effect})),n}function A(e,n){if(!e)return;if(!n)return e;let r=n.resolveRunStyle(e.styleId);return r?a(r,e):e}function ee(e,n){let r="",i,t=e.type==="simpleField"?e.content:e.fieldResult;if(t){for(let s of t)if(s.type==="run"){for(let f of s.content)f.type==="text"&&(r+=f.text);!i&&s.formatting&&(i=s.formatting);}}let l=a(n,i),o=_(l);return b$1.node("field",{fieldType:e.fieldType,instruction:e.instruction,displayText:r,fieldKind:e.type==="simpleField"?"simple":"complex",fldLock:e.fldLock??false,dirty:e.dirty??false},void 0,o)}function te(e){return b$1.node("math",{display:e.display,ommlXml:e.ommlXml,plainText:e.plainText||""})}function q(e,n,r){let i=[],t=e.formatting?.styleId?r?.getRunStyleOwnProperties(e.formatting.styleId):void 0,l=a(a(n,t),e.formatting),o=_(l);for(let s of e.content){let f=fe(s,o);i.push(...f);}return i}function fe(e,n){switch(e.type){case "text":return e.text?[b$1.text(e.text,n)]:[];case "break":return e.breakType==="textWrapping"||!e.breakType?[b$1.node("hardBreak",null,void 0,n)]:[];case "tab":return [b$1.node("tab",null,void 0,n)];case "drawing":return e.image?[Te(e.image)]:[];case "shape":{let t=e.shape;return t.textBody&&t.textBody.content.length>0?[]:[be(t)]}case "footnoteRef":let r=b$1.mark("footnoteRef",{id:e.id.toString(),noteType:"footnote"});return [b$1.text(e.id.toString(),[...n,r])];case "endnoteRef":let i=b$1.mark("footnoteRef",{id:e.id.toString(),noteType:"endnote"});return [b$1.text(e.id.toString(),[...n,i])];default:return []}}function Te(e$1){let n=e$1.size?.width?e(e$1.size.width):void 0,r=e$1.size?.height?e(e$1.size.height):void 0,i=e$1.wrap.type,t=e$1.wrap.wrapText,l=e$1.position?.horizontal?.alignment,o;i==="inline"||i==="topAndBottom"?o="none":i==="square"||i==="tight"||i==="through"?t==="left"?o="right":t==="right"||l==="left"?o="left":l==="right"?o="right":o="none":o="none";let s="inline";i==="inline"?s="inline":i==="topAndBottom"?s="block":b$4(i)||o&&o!=="none"?s="float":s="block";let f;if(e$1.transform){let P=[];e$1.transform.rotation&&P.push(`rotate(${e$1.transform.rotation}deg)`),e$1.transform.flipH&&P.push("scaleX(-1)"),e$1.transform.flipV&&P.push("scaleY(-1)"),P.length>0&&(f=P.join(" "));}let p=e$1.wrap.distT?e(e$1.wrap.distT):void 0,c=e$1.wrap.distB?e(e$1.wrap.distB):void 0,d=e$1.wrap.distL?e(e$1.wrap.distL):void 0,m=e$1.wrap.distR?e(e$1.wrap.distR):void 0,u;e$1.position&&(u={horizontal:e$1.position.horizontal?{relativeTo:e$1.position.horizontal.relativeTo,posOffset:e$1.position.horizontal.posOffset,align:e$1.position.horizontal.alignment}:void 0,vertical:e$1.position.vertical?{relativeTo:e$1.position.vertical.relativeTo,posOffset:e$1.position.vertical.posOffset,align:e$1.position.vertical.alignment}:void 0});let F,k,v;if(e$1.outline&&e$1.outline.width){F=Math.round(e$1.outline.width/914400*96*100)/100,e$1.outline.color?.rgb&&(k=`#${e$1.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"};v=e$1.outline.style&&P[e$1.outline.style]||"solid";}let N=e$1.padding?.top?e(e$1.padding.top):void 0,R=e$1.padding?.bottom?e(e$1.padding.bottom):void 0,B=e$1.padding?.left?e(e$1.padding.left):void 0,h=e$1.padding?.right?e(e$1.padding.right):void 0;return b$1.node("image",{src:e$1.src||"",alt:e$1.alt,title:e$1.title,width:n,height:r,rId:e$1.rId,wrapType:i,displayMode:s,cssFloat:o,transform:f,distTop:p,distBottom:c,distLeft:d,distRight:m,position:u,borderWidth:F,borderColor:k,borderStyle:v,wrapText:t,hlinkHref:e$1.hlinkHref,cropTop:e$1.crop?.top,cropRight:e$1.crop?.right,cropBottom:e$1.crop?.bottom,cropLeft:e$1.crop?.left,opacity:e$1.opacity,effectExtentTop:N,effectExtentBottom:R,effectExtentLeft:B,effectExtentRight:h,layoutInCell:e$1.layoutInCell,allowOverlap:e$1.allowOverlap})}function j(e,n,r){let i=[],t=e.href||(e.anchor?`#${e.anchor}`:""),l=b$1.mark("hyperlink",{href:t,tooltip:e.tooltip,rId:e.rId});for(let o of e.children)if(o.type==="run"){let s=o.formatting?.styleId?r?.getRunStyleOwnProperties(o.formatting.styleId):void 0,f=a(a(n,s),o.formatting),c=[..._(f),l];for(let d of o.content)i.push(...fe(d,c));}return i}function be(e$1){let n=e$1.size?.width?e(e$1.size.width):100,r=e$1.size?.height?e(e$1.size.height):80,i,t="solid",l,o,s;if(e$1.fill&&(t=e$1.fill.type,e$1.fill.color?.rgb&&(i=`#${e$1.fill.color.rgb}`),e$1.fill.type==="gradient"&&e$1.fill.gradient)){let m=e$1.fill.gradient;l=m.type,o=m.angle,s=JSON.stringify(m.stops.map(u=>({position:u.position,color:u.color.rgb?`#${u.color.rgb}`:"#000000"})));}let f,p,c;e$1.outline&&(e$1.outline.width&&(f=Math.round(e$1.outline.width/914400*96*100)/100),e$1.outline.color?.rgb&&(p=`#${e$1.outline.color.rgb}`),c=e$1.outline.style||"solid");let d;if(e$1.transform){let m=[];e$1.transform.rotation&&m.push(`rotate(${e$1.transform.rotation}deg)`),e$1.transform.flipH&&m.push("scaleX(-1)"),e$1.transform.flipV&&m.push("scaleY(-1)"),m.length>0&&(d=m.join(" "));}return b$1.node("shape",{shapeType:e$1.shapeType||"rect",shapeId:e$1.id,width:n,height:r,fillColor:i,fillType:t,gradientType:l,gradientAngle:o,gradientStops:s,outlineWidth:f,outlineColor:p,outlineStyle:c,transform:d})}function E(e,n,r,i){let t=Pe(e,n),l=[],o,s=new Set,f;n&&(f=n.resolveParagraphStyle(e.formatting?.styleId).runFormatting);let p=a(f,i);for(let c of e.content){if(c.type==="commentRangeStart")s.add(c.id);else if(c.type==="commentRangeEnd")s.delete(c.id);else if(c.type==="run"){let d=q(c,p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="hyperlink"){let d=j(c,p,n);l.push(...d);}else if(c.type==="simpleField"||c.type==="complexField"){let d=ee(c,p);d&&l.push(d);}else if(c.type==="inlineSdt"){let d=ce(c,p,n);d&&l.push(d);}else if(c.type==="insertion"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="deletion"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveFrom"){let d=X(c,"deletion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="moveTo"){let d=X(c,"insertion",p,n);s.size>0&&(d=D(d,s)),l.push(...d);}else if(c.type==="mathEquation"){let d=te(c);d&&l.push(d);}c.type==="bookmarkStart"&&(o||(o=[]),o.push({id:c.id,name:c.name}));}return o&&(t.bookmarks=o),b$1.node("paragraph",t,l)}function D(e,n){if(n.size===0)return e;let r=[...n][0],i=b$1.marks.comment.create({commentId:r});return e.map(t=>t.isText?t.mark(i.addToSet(t.marks)):t)}function X(e,n,r,i){let t=[];for(let o of e.content)o.type==="run"?t.push(...q(o,r,i)):o.type==="hyperlink"&&t.push(...j(o,r,i));let l=b$1.marks[n].create({revisionId:e.info.id,author:e.info.author,date:e.info.date??null});return t.map(o=>o.isText?o.mark(l.addToSet(o.marks)):o)}function Pe(e,n){let r=e.formatting,i=r?.styleId,t={paraId:e.paraId??void 0,textId:e.textId??void 0,styleId:i,numPr:r?.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,listLevelNumFmts:e.listRendering?.levelNumFmts||void 0,listAbstractNumId:e.listRendering?.abstractNumId,listStartOverride:e.listRendering?.startOverride,_originalFormatting:r||void 0};if(n){let l=n.resolveParagraphStyle(i),o=l.paragraphFormatting,s=l.runFormatting;t.alignment=r?.alignment??o?.alignment,t.spaceBefore=r?.spaceBefore??o?.spaceBefore,t.spaceAfter=r?.spaceAfter??o?.spaceAfter,t.lineSpacing=r?.lineSpacing??o?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule??o?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft??o?.indentLeft,t.indentRight=r?.indentRight??o?.indentRight,t.indentFirstLine=r?.indentFirstLine??o?.indentFirstLine,t.hangingIndent=r?.hangingIndent??o?.hangingIndent,t.borders=r?.borders??o?.borders,t.shading=r?.shading??o?.shading,t.tabs=r?.tabs??o?.tabs,t.pageBreakBefore=r?.pageBreakBefore??o?.pageBreakBefore,t.keepNext=r?.keepNext??o?.keepNext,t.keepLines=r?.keepLines??o?.keepLines,t.contextualSpacing=r?.contextualSpacing??o?.contextualSpacing,t.outlineLevel=r?.outlineLevel??o?.outlineLevel,t.bidi=r?.bidi??o?.bidi;let f=n.getDefaultCharacterStyle()?.rPr,p=f?a(s,f):s,c=A(r?.runProperties,n);t.defaultTextFormatting=a(p,c),!r?.numPr&&o?.numPr&&o.numPr.numId!==0&&(t.numPr=o.numPr);}else t.alignment=r?.alignment,t.spaceBefore=r?.spaceBefore,t.spaceAfter=r?.spaceAfter,t.lineSpacing=r?.lineSpacing,t.lineSpacingRule=r?.lineSpacingRule,r?.spacingExplicit&&(t.spacingExplicit=r.spacingExplicit),t.indentLeft=r?.indentLeft,t.indentRight=r?.indentRight,t.indentFirstLine=r?.indentFirstLine,t.hangingIndent=r?.hangingIndent,t.borders=r?.borders,t.shading=r?.shading,t.tabs=r?.tabs,t.pageBreakBefore=r?.pageBreakBefore,t.keepNext=r?.keepNext,t.keepLines=r?.keepLines,t.outlineLevel=r?.outlineLevel,t.bidi=r?.bidi,t.defaultTextFormatting=A(r?.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),t}function ce(e,n,r){let i=e.properties,t=[];for(let l of e.content)if(l.type==="run"){let o=q(l,n,r);t.push(...o);}else if(l.type==="hyperlink"){let o=j(l,n,r);t.push(...o);}else if(l.type==="simpleField"||l.type==="complexField"){let o=ee(l,n);o&&t.push(o);}else if(l.type==="inlineSdt"){let o=ce(l,n,r);o&&t.push(o);}else if(l.type==="mathEquation"){let o=te(l);o&&t.push(o);}return b$1.node("sdt",{sdtType:i.sdtType,alias:i.alias??null,tag:i.tag??null,lock:i.lock??null,placeholder:i.placeholder??null,showingPlaceholder:i.showingPlaceholder??false,dateFormat:i.dateFormat??null,listItems:i.listItems?JSON.stringify(i.listItems):null,checked:i.checked??null},t.length>0?t:void 0)}function ue(e){function n(i){return i.type==="break"&&i.breakType==="page"}function r(i){if(i.type==="run"){for(let t of i.content)if(n(t))return true;return false}if(i.type==="hyperlink"){for(let t of i.children)if(t.type==="run"&&r(t))return true;return false}if(i.type==="insertion"||i.type==="deletion"){let t=i;for(let l of t.content)if(r(l))return true;return false}return false}for(let i of e.content)if(r(i))return true;return false}function x(e,n,r){if(!e||!n)return;let i=e.getStyle(n);if(!i?.tblStylePr)return;let t=i.tblStylePr.find(f=>f.type===r);if(!t)return;let l=A(t.pPr?.runProperties,e),o=A(t.rPr,e),s=a(l,o);return {tcPr:t.tcPr,rPr:s}}function M(e,n){if(!e&&!n)return;if(!e)return n;if(!n)return e;let r={},i=e.tcPr,t=n.tcPr;if(i||t){let l={...i??{},...t??{}};(i?.borders||t?.borders)&&(l.borders={...i?.borders??{},...t?.borders??{}}),(i?.shading||t?.shading)&&(l.shading={...i?.shading??{},...t?.shading??{}}),(i?.margins||t?.margins)&&(l.margins={...i?.margins??{},...t?.margins??{}}),r.tcPr=l;}return r.rPr=a(e.rPr,n.rPr),r}function ye(e){let n=new Map,r=e.rows.length,i=new Map;for(let t=0;t<r;t++){let l=e.rows[t],o=0;for(let s=0;s<l.cells.length;s++){let f=l.cells[s],p=f.formatting?.gridSpan??1,c=f.formatting?.vMerge,d=`${t}-${o}`;if(c==="restart")i.set(o,t),n.set(d,{rowSpan:1,skip:false});else if(c==="continue"){let m=i.get(o);if(m!==void 0){let u=`${m}-${o}`,F=n.get(u);F&&F.rowSpan++;}n.set(d,{rowSpan:1,skip:true});}else i.delete(o),n.set(d,{rowSpan:1,skip:false});o+=p;}}return n}function K(e,n,r){let i=ye(e),t=e.columnWidths,l=t?.reduce((P,S)=>P+S,0)??0,o=e.formatting?.styleId,s=e.formatting?.look,f=o?n?.getStyle(o):void 0,p=n?.getDefaultTableStyle(),c=e.formatting?.borders??f?.tblPr?.borders??p?.tblPr?.borders,d=e.formatting?.cellMargins??f?.tblPr?.cellMargins??p?.tblPr?.cellMargins??void 0,m=d?{top:d.top?.value,bottom:d.bottom?.value,left:d.left?.value,right:d.right?.value}:void 0,u={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},F={wholeTable:x(n,o,"wholeTable"),firstRow:x(n,o,"firstRow"),lastRow:x(n,o,"lastRow"),firstCol:x(n,o,"firstCol"),lastCol:x(n,o,"lastCol"),band1Horz:x(n,o,"band1Horz"),band2Horz:x(n,o,"band2Horz"),band1Vert:x(n,o,"band1Vert"),band2Vert:x(n,o,"band2Vert"),nwCell:x(n,o,"nwCell"),neCell:x(n,o,"neCell"),swCell:x(n,o,"swCell"),seCell:x(n,o,"seCell")},k=s?.noHBand!==true,v=s?.noVBand!==true,N=0,R=e.rows.length,B=t?.length??Math.max(0,...e.rows.map(P=>P.cells.reduce((S,w)=>S+(w.formatting?.gridSpan??1),0))),h=e.rows.map((P,S)=>{let w=S===0&&!!s?.firstRow,C=S===R-1&&!!s?.lastRow,I=k&&!w&&!C?N%2===0?F.band1Horz:F.band2Horz:void 0;return k&&!w&&!C&&N++,Fe(P,n,w,t,l,F,I,v,s,c,S,R,B,i,m,r)});return b$1.node("table",u,h)}function Fe(e,n,r,i,t,l,o,s,f,p,c,d,m,u,F,k){let v={height:e.formatting?.height?.value,heightRule:e.formatting?.heightRule,isHeader:!!e.formatting?.header,_originalFormatting:e.formatting||void 0},N=e.cells.length,R=c===0,B=c===(d??1)-1,h=e.formatting?.conditionalFormat,P=h?.firstRow??R,S=h?.lastRow??B,w=m??N,C=0,I=[];for(let J=0;J<e.cells.length;J++){let Y=e.cells[J],L=Y.formatting?.gridSpan??1,me=`${c??0}-${C}`,oe=u?.get(me),he=oe?.skip??false,ge=oe?.rowSpan??1,re;if(i&&t&&t>0){let W=0;for(let z=0;z<L&&C+z<i.length;z++)W+=i[C+z];re=Math.round(W/t*100);}if(C+=L,he)continue;let ie=C-L===0,le=C===w,T=Y.formatting?.conditionalFormat,G=T?.firstRow??P,Q=T?.lastRow??S,O=T?.firstColumn??ie,V=T?.lastColumn??le,$;if(s){let W=f?.firstColumn?1:0,z=C-L-W;z>=0&&!(f?.lastColumn&&V)&&!(f?.firstColumn&&O)&&($=z%2===0?l?.band1Vert:l?.band2Vert);}T?.oddVBand?$=l?.band1Vert:T?.evenVBand&&($=l?.band2Vert);let H=o;h?.oddHBand?H=l?.band1Horz:h?.evenHBand&&(H=l?.band2Horz),T?.oddHBand?H=l?.band1Horz:T?.evenHBand&&(H=l?.band2Horz);let g=l?.wholeTable;g=M(g,H),g=M(g,$),G&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(g=M(g,l?.firstRow)),Q&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(g=M(g,l?.lastRow)),O&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.firstCol)),V&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.lastCol)),G&&O&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.nwCell)),G&&V&&(f?.firstRow||h?.firstRow||T?.firstRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.neCell)),Q&&O&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.firstColumn||h?.firstColumn||T?.firstColumn)&&(g=M(g,l?.swCell)),Q&&V&&(f?.lastRow||h?.lastRow||T?.lastRow)&&(f?.lastColumn||h?.lastColumn||T?.lastColumn)&&(g=M(g,l?.seCell)),I.push(Ce(Y,n,r,re,g,p,R,B,ie,le,ge,F,k));}return b$1.node("tableRow",v,I)}var we=["top","bottom","left","right","insideH","insideV"];function xe(e,n){if(!e)return e;let r;for(let i of we){let t=e[i];if(!t?.color?.themeColor||t.color.auto)continue;let l=b$3(t.color,n);l&&(r??(r={...e}),r[i]={...t,color:{rgb:l}});}return r??e}function Ce(e,n,r,i,t,l,o,s,f,p,c,d,m){let u=e.formatting,F=c??1,k=u?.width?.value,v=u?.width?.type;k===void 0&&i!==void 0&&(k=i,v="pct");let N=b$3(u?.shading?.fill??t?.tcPr?.shading?.fill,m),R=l?{top:o?l.top:l.insideH,bottom:s?l.bottom:l.insideH,left:f?l.left:l.insideV,right:p?l.right:l.insideV}:void 0,B=t?.tcPr?.borders,h=u?.borders,P=xe(R||B||h?{...R??{},...B??{},...h??{}}:void 0,m),S={colspan:u?.gridSpan??1,rowspan:F,width:k,widthType:v,verticalAlign:u?.verticalAlign,backgroundColor:N,textDirection:u?.textDirection,noWrap:u?.noWrap,borders:P,margins:u?.margins?{top:u.margins.top?.value,bottom:u.margins.bottom?.value,left:u.margins.left?.value,right:u.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}:d,_originalFormatting:u||void 0,_originalResolvedFill:N},w=[];for(let I of e.content)I.type==="paragraph"?w.push(E(I,n,void 0,t?.rPr)):I.type==="table"&&w.push(K(I,n));w.length===0&&w.push(b$1.node("paragraph",{},[]));let C=r?"tableHeader":"tableCell";return b$1.node(C,S,w)}function ne(e,n){let r=Se(e),i=E(e,n),t=[],l=r.length>0&&i.content.size===0,{anchored:o,inFlow:s}=ke(r);for(let f of o)t.push(pe(f,n));l||t.push(i);for(let f of s)t.push(pe(f,n));return t}function ke(e){let n=[],r=[];for(let i of e)a$1(i)?n.push(i):r.push(i);return {anchored:n,inFlow:r}}function Se(e){let n=[];for(let r of e.content)if(r.type==="run"){for(let i of r.content)if(i.type==="shape"&&"shape"in i){let t=i.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 pe(e$1,n){let r=e$1.size?.width?e(e$1.size.width):200,i=e$1.size?.height?e(e$1.size.height):void 0,t;e$1.fill?.color?.rgb&&(t=`#${e$1.fill.color.rgb}`);let l,o,s;e$1.outline&&e$1.outline.width&&(l=Math.round(e$1.outline.width/914400*96*100)/100,e$1.outline.color?.rgb&&(o=`#${e$1.outline.color.rgb}`),s=e$1.outline.style||"solid");let f=e$1.margins?.top!=null?e(e$1.margins.top):4,p=e$1.margins?.bottom!=null?e(e$1.margins.bottom):4,c=e$1.margins?.left!=null?e(e$1.margins.left):7,d=e$1.margins?.right!=null?e(e$1.margins.right):7,m=[];for(let u of e$1.content)m.push(E(u,n));return m.length===0&&m.push(b$1.node("paragraph",{},[])),b$1.node("textBox",{width:r,height:i,textBoxId:e$1.id,fillColor:t,outlineWidth:l,outlineColor:o,outlineStyle:s,marginTop:f,marginBottom:p,marginLeft:c,marginRight:d,...b$2(e$1)},m)}function it(e,n){let r=e.package.document.content,i=[],t=e.package.theme??null,l=n?.styles?b(n.styles):null;for(let o of r)if(o.type==="paragraph")i.push(...ne(o,l)),ue(o)&&i.push(b$1.node("pageBreak"));else if(o.type==="table"){let s=K(o,l,t);i.push(s);}return i.length===0&&i.push(b$1.node("paragraph",{},[])),b$1.node("doc",null,i)}function Re(e,n){let r=[],i=n?.styles?b(n.styles):null,t=n?.theme??null;for(let l of e)l.type==="paragraph"?r.push(...ne(l,i)):l.type==="table"&&r.push(K(l,i,t));return r.length===0&&r.push(b$1.node("paragraph",{},[])),b$1.node("doc",null,r)}function lt(e,n){return Re(e,n)}function st(){return b$1.node("doc",null,[b$1.node("paragraph",{},[])])}export{it as a,Re as b,lt as c,st as d};
|
package/dist/chunk-3GNIP6IX.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import {z as z$1,h,j as j$2,k as k$1,g}from'./chunk-IBNUQL57.mjs';import {c,j as j$1,e,l,a,f,q,i,m,b,d,k,n}from'./chunk-6LOYA7G5.mjs';var Ne={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:{}}},ge={name:"Office Theme",colorScheme:Ne,fontScheme:Q},gt=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function ht(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 wt(e$1){let t={...Ne};if(!e$1)return t;for(let n of gt){let o=e(e$1,"a",n);if(o){let r=i(o);if(r.length>0){let a=ht(r[0]);a&&(t[n]=a);}}}return t}function Ae(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 o=e(e$1,"a","ea");o&&(t.ea=j$1(o,"a","typeface")??j$1(o,null,"typeface")??"");let r=e(e$1,"a","cs");r&&(t.cs=j$1(r,"a","typeface")??j$1(r,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 yt(e$1){let t={...Q};if(!e$1)return t;let n=e(e$1,"a","majorFont");n&&(t.majorFont=Ae(n));let o=e(e$1,"a","minorFont");return o&&(t.minorFont=Ae(o)),t}function Pn(e$1){if(!e$1)return {...ge};try{let t=c(e$1);if(!t)return {...ge};let n=j$1(t,"a","name")??j$1(t,null,"name")??"Office Theme",o=e(t,"a","themeElements"),r=e(o,"a","clrScheme"),a=wt(r),u=e(o,"a","fontScheme"),l=yt(u);return {name:n,colorScheme:a,fontScheme:l}}catch(t){return console.warn("Failed to parse theme:",t),{...ge}}}function bt(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 He(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 Y(e,t){if(!t)return "Calibri";let n=t.toLowerCase().includes("major"),o=t.toLowerCase().includes("minor"),r="latin",a=t.toLowerCase();return a.includes("eastasia")?r="ea":(a.includes("bidi")||a.includes("cs"))&&(r="cs"),n?bt(e,r):o?He(e,r):He(e,"latin")}function Ie(e){if(!e)return;let t=l(e,"w","w")??0,n=j$1(e,"w","type")??"dxa",o="dxa";return (n==="auto"||n==="dxa"||n==="nil"||n==="pct")&&(o=n),{value:t,type:o}}function X(e){return Ie(e)}function j(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,o=(j$1(e,"w","author")??"").trim(),r=(j$1(e,"w","date")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0}}function J(e){let t=j(e),n=(j$1(e,"w","rsid")??"").trim();return n.length>0?{...t,rsid:n}:t}function V(e){if(!e)return;let o={style:j$1(e,"w","val")??"none"},r=l(e,"w","sz");r!==void 0&&(o.size=r);let a=l(e,"w","space");a!==void 0&&(o.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)&&(o.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")&&(o.shadow=true);let d=j$1(e,"w","frame");return (d==="1"||d==="true")&&(o.frame=true),o}function ee(e$1){if(!e$1)return;let t={},n=V(e(e$1,"w","top"));n&&(t.top=n);let o=V(e(e$1,"w","bottom"));o&&(t.bottom=o);let r=V(e(e$1,"w","left")??e(e$1,"w","start"));r&&(t.left=r);let a=V(e(e$1,"w","right")??e(e$1,"w","end"));a&&(t.right=a);let u=V(e(e$1,"w","insideH"));u&&(t.insideH=u);let l=V(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 o=X(e(e$1,"w","bottom"));o&&(t.bottom=o);let r=X(e(e$1,"w","left")??e(e$1,"w","start"));r&&(t.left=r);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 o=j$1(e,"w","themeFill");if(o){t.fill={themeColor:o};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 r=j$1(e,"w","color");r&&r!=="auto"&&(t.color={rgb:r});let a=j$1(e,"w","val");if(a&&(t.pattern=a),Object.keys(t).length!==0)return t}function he(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=j$1(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=j$1(e,"w","firstColumn");(r==="1"||r==="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 we(e){if(!e)return;let t={},n=j$1(e,"w","horzAnchor");(n==="margin"||n==="page"||n==="text")&&(t.horzAnchor=n);let o=j$1(e,"w","vertAnchor");(o==="margin"||o==="page"||o==="text")&&(t.vertAnchor=o);let r=l(e,"w","tblpX");r!==void 0&&(t.tblpX=r);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 Tt(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 Ct(e){return e.rows.length}function Ft(e){return e.formatting?.vMerge==="continue"}function xt(e){return e.formatting?.vMerge==="restart"}function St(e){return e.rows.length===0?false:e.rows[0].formatting?.header===true}function Le(e){switch(e){case "first":return "first";case "even":return "even";default:return "default"}}function Xe(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Le(t),rId:n}}function De(e){let t=j$1(e,"w","type"),n=j$1(e,"r","id")??"";return {type:Le(t),rId:n}}function ye(e,t,n,o,r,a){let u=[],l=e.elements??[],f={inHeaderFooter:true};for(let c of l){if(c.type!=="element")continue;let p=c.name??"";if(p==="w:p"||p.endsWith(":p"))u.push(D(c,t,n,o,r,a,f));else if(p==="w:tbl"||p.endsWith(":tbl")){let d=z(c,t,n,o,r,a,f);u.push(d);}else if(p==="w:sdt"||p.endsWith(":sdt")){let d=(c.elements??[]).find(h=>h.type==="element"&&(h.name==="w:sdtContent"||h.name?.endsWith(":sdtContent")));if(d){let h=ye(d,t,n,o,r,a);u.push(...h);}}}return u}function Xn(e,t="default",n=null,o=null,r=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=ye(c,n,o,r,a$1,u)),l}function Dn(e,t="default",n=null,o=null,r=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=ye(c,n,o,r,a$1,u)),l}function Oe(e){switch(e){case "separator":return "separator";case "continuationSeparator":return "continuationSeparator";case "continuationNotice":return "continuationNotice";default:return "normal"}}function We(e,t,n,o,r,a){let u=[];for(let l of i(e)){let f=l.name??"";f==="w:p"?u.push(D(l,t,n,o,r)):f==="w:tbl"&&u.push(z(l,t,n,o,r,a));}return u}function kt(e,t,n,o,r,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=We(e,t,n,o,r,a);return {type:"footnote",id:u,noteType:f,content:c}}function zn(e,t=null,n=null,o=null,r=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 h=kt(d,t,n,o,r,a$1);u.set(h.id,h),l.push(h);}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 Mt(e,t,n,o,r,a){let u=l(e,"w","id")??0,l$1=j$1(e,"w","type"),f=Oe(l$1),c=We(e,t,n,o,r,a);return {type:"endnote",id:u,noteType:f,content:c}}function Un(e,t=null,n=null,o=null,r=null,a$1=null){let u=new Map,l=[];if(!e)return re(u,l);let f$1=a(e);if(!f$1)return re(u,l);let c=f$1.elements?.find(d=>d.type==="element"&&(d.name==="w:endnotes"||d.name?.endsWith(":endnotes")));if(!c)return re(u,l);let p=f(c,"w","endnote");for(let d of p){let h=Mt(d,t,n,o,r,a$1);u.set(h.id,h),l.push(h);}return re(u,l)}function re(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 Ve(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 Rt(e){switch(e){case "pageBottom":return "pageBottom";case "beneathText":return "beneathText";case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Et(e){switch(e){case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function je(e){switch(e){case "continuous":return "continuous";case "eachSect":return "eachSect";case "eachPage":return "eachPage";default:return}}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=Rt(u);}let o=e(e$1,"w","numFmt");if(o){let u=j$1(o,"w","val");t.numFmt=Ve(u);}let r=e(e$1,"w","numStart");r&&(t.numStart=l(r,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=je(u);}return t}function Ue(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=Et(u);}let o=e(e$1,"w","numFmt");if(o){let u=j$1(o,"w","val");t.numFmt=Ve(u);}let r=e(e$1,"w","numStart");r&&(t.numStart=l(r,"w","val")??void 0);let a=e(e$1,"w","numRestart");if(a){let u=j$1(a,"w","val");t.numRestart=je(u);}return t}function Gn(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
|
|
2
|
-
`)}function qn(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
|
|
3
|
-
`)}function _n(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Yn(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Pt(e,t,n,o){if(!e&&!t)return;let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),Object.keys(r).length>0?r:void 0}function ie(e){if(!e)return;let o={style:j$1(e,"w","val")??"none"},r=l(e,"w","sz");r!==void 0&&(o.size=r);let a=l(e,"w","space");a!==void 0&&(o.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=Pt(u,l$1,f,c);p&&(o.color=p);let d=j$1(e,"w","shadow");(d==="1"||d==="true")&&(o.shadow=true);let h=j$1(e,"w","frame");return (h==="1"||h==="true")&&(o.frame=true),o}function Bt(e){switch(e){case "landscape":return "landscape";case "portrait":return "portrait";default:return}}function vt(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 At(e){switch(e){case "top":return "top";case "center":return "center";case "both":return "both";case "bottom":return "bottom";default:return}}function Ht(e){switch(e){case "continuous":return "continuous";case "newPage":return "newPage";case "newSection":return "newSection";default:return}}function ae(e$1,t){let n={};if(!e$1)return n;let o=e(e$1,"w","pgSz");if(o){let m=l(o,"w","w");m!==void 0&&(n.pageWidth=m);let C=l(o,"w","h");C!==void 0&&(n.pageHeight=C);let E=j$1(o,"w","orient"),y=Bt(E);y&&(n.orientation=y);}let r=e(e$1,"w","pgMar");if(r){let m=l(r,"w","top");m!==void 0&&(n.marginTop=m);let C=l(r,"w","bottom");C!==void 0&&(n.marginBottom=C);let E=l(r,"w","left");E!==void 0&&(n.marginLeft=E);let y=l(r,"w","right");y!==void 0&&(n.marginRight=y);let S=l(r,"w","header");S!==void 0&&(n.headerDistance=S);let P=l(r,"w","footer");P!==void 0&&(n.footerDistance=P);let B=l(r,"w","gutter");B!==void 0&&(n.gutter=B);}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 S=f(a,"w","col");if(S.length>0){n.columns=[];for(let P of S){let B={},I=l(P,"w","w");I!==void 0&&(B.width=I);let N=l(P,"w","space");N!==void 0&&(B.space=N),n.columns.push(B);}n.columnCount===void 0&&(n.columnCount=S.length);}}let u=e(e$1,"w","type");if(u){let m=j$1(u,"w","val"),C=vt(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=At(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=>Xe(m)));let p=f(e$1,"w","footerReference");p.length>0&&(n.footerReferences=p.map(m=>De(m)));let d=e(e$1,"w","titlePg");d&&(n.titlePg=m(d));let h=e(e$1,"w","evenAndOddHeaders");h&&(n.evenAndOddHeaders=m(h));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"),S=Ht(y);S&&(n.lineNumbers.restart=S);}let b=e(e$1,"w","pgBorders");if(b){n.pageBorders={};let m=ie(e(b,"w","top"));m&&(n.pageBorders.top=m);let C=ie(e(b,"w","bottom"));C&&(n.pageBorders.bottom=C);let E=ie(e(b,"w","left"));E&&(n.pageBorders.left=E);let y=ie(e(b,"w","right"));y&&(n.pageBorders.right=y);let S=j$1(b,"w","display");(S==="allPages"||S==="firstPage"||S==="notFirstPage")&&(n.pageBorders.display=S);let P=j$1(b,"w","offsetFrom");(P==="page"||P==="text")&&(n.pageBorders.offsetFrom=P);let B=j$1(b,"w","zOrder");(B==="front"||B==="back")&&(n.pageBorders.zOrder=B);}let w=e(e$1,"w","background");if(w){n.background={};let m=j$1(w,"w","color");m&&m!=="auto"&&(n.background.color={rgb:m});let C=j$1(w,"w","themeColor");C&&(n.background.themeColor=C);let E=j$1(w,"w","themeTint");E&&(n.background.themeTint=E);let y=j$1(w,"w","themeShade");y&&(n.background.themeShade=y);}let F=e(e$1,"w","footnotePr");if(F){let m=ze(F);Object.keys(m).length>0&&(n.footnotePr=m);}let H=e(e$1,"w","endnotePr");if(H){let m=Ue(H);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 x=e(e$1,"w","paperSrc");if(x){let m=l(x,"w","first");m!==void 0&&(n.paperSrcFirst=m);let C=l(x,"w","other");C!==void 0&&(n.paperSrcOther=C);}return n}function qe(){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 Ge(e,t){if(!t||t.length===0)return e;let n=new Set((e??[]).map(r=>r.type)),o=t.filter(r=>!n.has(r.type));return o.length===0?e:[...e??[],...o]}function _e(e){if(e.length<2)return e;let t=[e[0]];for(let n=1;n<e.length;n++){let o=t[n-1].properties,r=e[n].properties,a=Ge(r.headerReferences,o.headerReferences),u=Ge(r.footerReferences,o.footerReferences),l=r.titlePg!==void 0?r.titlePg:o.titlePg;if(a===r.headerReferences&&u===r.footerReferences&&l===r.titlePg){t.push(e[n]);continue}t.push({...e[n],properties:{...r,headerReferences:a,footerReferences:u,titlePg:l}});}return t}function Nt(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||!It(e.underline,t.underline)||!le(e.color,t.color)||!Lt(e.shading,t.shading)||!Xt(e.fontFamily,t.fontFamily))}function It(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 Lt(e,t){return !e&&!t?true:!(!e||!t||e.pattern!==t.pattern||!le(e.color,t.color)||!le(e.fill,t.fill))}function Xt(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 Dt(e){return e.type==="text"||e.type==="softHyphen"||e.type==="noBreakHyphen"}function Ye(e){return e.content.length===0?true:e.content.every(Dt)}function Ot(e,t){let n=[];for(let o of e)n.push(o);if(n.length>0&&t.length>0&&n[n.length-1].type==="text"&&t[0].type==="text"){let o=n[n.length-1],r=t[0];n[n.length-1]={type:"text",text:o.text+r.text,preserveSpace:o.preserveSpace||r.preserveSpace||void 0};for(let a=1;a<t.length;a++)n.push(t[a]);}else for(let o of t)n.push(o);return n}function Wt(e){if(e.length<=1)return e;let t=[],n=null;for(let o of e)if(o.content.length!==0){if(n===null){n={...o,content:[...o.content]};continue}Ye(n)&&Ye(o)&&Nt(n.formatting,o.formatting)?n={type:"run",formatting:n.formatting,content:Ot(n.content,o.content)}:(t.push(n),n={...o,content:[...o.content]});}return n!==null&&t.push(n),t}function be(e){if(e.length<=1)return e;let t=[],n=[];function o(){if(n.length>0){let r=Wt(n);t.push(...r),n.length=0;}}for(let r of e)if(r.type==="run")n.push(r);else if(o(),r.type==="hyperlink"){let a={...r,children:be(r.children)};t.push(a);}else t.push(r);return o(),t}function $e(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function Vt(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=j$1(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=j$1(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);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 o={},r=e(e$1,"w","b");r&&(o.bold=m(r));let a=e(e$1,"w","bCs");a&&(o.boldCs=m(a));let u=e(e$1,"w","i");u&&(o.italic=m(u));let l$1=e(e$1,"w","iCs");l$1&&(o.italicCs=m(l$1));let f=e(e$1,"w","u");if(f){let k=j$1(f,"w","val");if(k){o.underline={style:k};let G=j$1(f,"w","color"),q=j$1(f,"w","themeColor");(G||q)&&(o.underline.color=$e(G,q,j$1(f,"w","themeTint"),j$1(f,"w","themeShade")));}}let c=e(e$1,"w","strike");c&&(o.strike=m(c));let p=e(e$1,"w","dstrike");p&&(o.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")&&(o.vertAlign=k);}let h=e(e$1,"w","smallCaps");h&&(o.smallCaps=m(h));let T=e(e$1,"w","caps");T&&(o.allCaps=m(T));let b=e(e$1,"w","vanish");b&&(o.hidden=m(b));let w=e(e$1,"w","color");w&&(o.color=$e(j$1(w,"w","val"),j$1(w,"w","themeColor"),j$1(w,"w","themeTint"),j$1(w,"w","themeShade")));let F=e(e$1,"w","highlight");if(F){let k=j$1(F,"w","val");k&&(o.highlight=k);}let H=e(e$1,"w","shd");H&&(o.shading=Vt(H));let M=e(e$1,"w","sz");if(M){let k=l(M,"w","val");k!==void 0&&(o.fontSize=k);}let x=e(e$1,"w","szCs");if(x){let k=l(x,"w","val");k!==void 0&&(o.fontSizeCs=k);}let m$1=e(e$1,"w","rFonts");if(m$1){o.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&&(o.fontFamily.asciiTheme=k,t&&!o.fontFamily.ascii&&(o.fontFamily.ascii=Y(t,k)));let G=j$1(m$1,"w","hAnsiTheme");G&&(o.fontFamily.hAnsiTheme=G,t&&!o.fontFamily.hAnsi&&(o.fontFamily.hAnsi=Y(t,G)));let q=j$1(m$1,"w","eastAsiaTheme");q&&(o.fontFamily.eastAsiaTheme=q,t&&!o.fontFamily.eastAsia&&(o.fontFamily.eastAsia=Y(t,q)));let pe=j$1(m$1,"w","cstheme");pe&&(o.fontFamily.csTheme=pe,t&&!o.fontFamily.cs&&(o.fontFamily.cs=Y(t,pe)));}let C=e(e$1,"w","spacing");if(C){let k=l(C,"w","val");k!==void 0&&(o.spacing=k);}let E=e(e$1,"w","position");if(E){let k=l(E,"w","val");k!==void 0&&(o.position=k);}let y=e(e$1,"w","w");if(y){let k=l(y,"w","val");k!==void 0&&(o.scale=k);}let S=e(e$1,"w","kern");if(S){let k=l(S,"w","val");k!==void 0&&(o.kerning=k);}let P=e(e$1,"w","effect");if(P){let k=j$1(P,"w","val");k&&(o.effect=k);}let B=e(e$1,"w","em");if(B){let k=j$1(B,"w","val");k&&(o.emphasisMark=k);}let I=e(e$1,"w","emboss");I&&(o.emboss=m(I));let N=e(e$1,"w","imprint");N&&(o.imprint=m(N));let L=e(e$1,"w","outline");L&&(o.outline=m(L));let Te=e(e$1,"w","shadow");Te&&(o.shadow=m(Te));let Ce=e(e$1,"w","rtl");Ce&&(o.rtl=m(Ce));let Fe=e(e$1,"w","cs");Fe&&(o.cs=m(Fe));let xe=e(e$1,"w","rStyle");if(xe){let k=j$1(xe,"w","val");k&&(o.styleId=k);}return Object.keys(o).length>0?o:void 0}function jt(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,o=(j$1(e,"w","author")??"").trim(),r=(j$1(e,"w","date")??"").trim(),a=(j$1(e,"w","rsid")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0,rsid:a.length>0?a:void 0}}function zt(e$1,t,n,o){if(!e$1)return;let r=f(e$1,"w","rPrChange").map(a=>{let u=e(a,"w","rPr");return {type:"runPropertyChange",info:jt(a),previousFormatting:ue(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function Ut(e){let t=k(e),n=j$1(e,"xml","space")==="preserve";return {type:"text",text:t,preserveSpace:n||void 0}}function Gt(){return {type:"tab"}}function qt(e){let t=j$1(e,"w","type"),n=j$1(e,"w","clear"),o={type:"break"};return (t==="page"||t==="column"||t==="textWrapping")&&(o.breakType=t),(n==="none"||n==="left"||n==="right"||n==="all")&&(o.clear=n),o}function _t(e){let t=j$1(e,"w","font")??"",n=j$1(e,"w","char")??"";return {type:"symbol",font:t,char:n}}function Yt(e){return {type:"footnoteRef",id:l(e,"w","id")??0}}function $t(e){return {type:"endnoteRef",id:l(e,"w","id")??0}}function Zt(e){let t=j$1(e,"w","fldCharType"),n=j$1(e,"w","fldLock")==="true"||j$1(e,"w","fldLock")==="1",o=j$1(e,"w","dirty")==="true"||j$1(e,"w","dirty")==="1",r="begin";return t==="separate"?r="separate":t==="end"&&(r="end"),{type:"fieldChar",charType:r,fldLock:n||void 0,dirty:o||void 0}}function Kt(e){return {type:"instrText",text:k(e)}}function Ze(e,t,n){let o=z$1(e,t??void 0,n??void 0);return o?{type:"drawing",image:o}:null}function se(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function Qt(e,t,n){let o=[],r=i(e);for(let a of r)switch(se(a.name)){case "t":o.push(Ut(a));break;case "tab":o.push(Gt());break;case "br":o.push(qt(a));break;case "sym":o.push(_t(a));break;case "footnoteReference":o.push(Yt(a));break;case "endnoteReference":o.push($t(a));break;case "fldChar":o.push(Zt(a));break;case "instrText":o.push(Kt(a));break;case "softHyphen":o.push({type:"softHyphen"});break;case "noBreakHyphen":o.push({type:"noBreakHyphen"});break;case "drawing":let l=Ze(a,t,n);l&&o.push(l);break;case "pict":case "object":break;case "rPr":break;case "lastRenderedPageBreak":break;case "cr":o.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 h=Ze(p,t,n);h?.image?.src&&o.push(h);}}break}}return o}function $(e$1,t,n,o=null,r=null){let a={type:"run",content:[]},u=e(e$1,"w","rPr");return u&&(a.formatting=ue(u,n),a.propertyChanges=zt(u,n,t,a.formatting)),a.content=Qt(e$1,o,r),a}function Jt(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function en(e){if(!e)return;let t={},n=j$1(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=j$1(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=j$1(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);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 _(e){if(!e)return;let t=j$1(e,"w","val");if(!t)return;let n={style:t},o=j$1(e,"w","color"),r=j$1(e,"w","themeColor");(o||r)&&(n.color=Jt(o,r,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 tn(e){if(!e)return;let t=f(e,"w","tab");if(t.length===0)return;let n=[];for(let o of t){let r=l(o,"w","pos"),a=j$1(o,"w","val");if(r!==void 0&&a){let u={position:r,alignment:a},l=j$1(o,"w","leader");l&&(u.leader=l),n.push(u);}}return n.length>0?n:void 0}function nn(e){if(!e)return;let t={},n=l(e,"w","w");n!==void 0&&(t.width=n);let o=l(e,"w","h");o!==void 0&&(t.height=o);let r=j$1(e,"w","hAnchor");(r==="text"||r==="margin"||r==="page")&&(t.hAnchor=r);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 o={},r=e(e$1,"w","jc");if(r){let y=j$1(r,"w","val");y&&(o.alignment=y);}let a=e(e$1,"w","bidi");a&&(o.bidi=m(a));let u=e(e$1,"w","spacing");if(u){let y=l(u,"w","before");y!==void 0&&(o.spaceBefore=y);let S=l(u,"w","after");S!==void 0&&(o.spaceAfter=S);let P=l(u,"w","line");P!==void 0&&(o.lineSpacing=P);let B={};y!==void 0&&(B.before=true),S!==void 0&&(B.after=true),(B.before||B.after)&&(o.spacingExplicit=B);let I=j$1(u,"w","lineRule");I&&(o.lineSpacingRule=I);let N=j$1(u,"w","beforeAutospacing");N&&(o.beforeAutospacing=N==="1"||N==="true");let L=j$1(u,"w","afterAutospacing");L&&(o.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&&(o.indentLeft=y);let S=l(l$1,"w","right");S!==void 0&&(o.indentRight=S);let P=l(l$1,"w","firstLine");P!==void 0&&(o.indentFirstLine=P);let B=l(l$1,"w","hanging");B!==void 0&&(o.indentFirstLine=-B,o.hangingIndent=true);let I=l(l$1,"w","start");I!==void 0&&o.indentLeft===void 0&&(o.indentLeft=I);let N=l(l$1,"w","end");N!==void 0&&o.indentRight===void 0&&(o.indentRight=N);}let f=e(e$1,"w","pBdr");if(f){let y={},S=_(e(f,"w","top"));S&&(y.top=S);let P=_(e(f,"w","bottom"));P&&(y.bottom=P);let B=_(e(f,"w","left"));B&&(y.left=B);let I=_(e(f,"w","right"));I&&(y.right=I);let N=_(e(f,"w","between"));N&&(y.between=N);let L=_(e(f,"w","bar"));L&&(y.bar=L),Object.keys(y).length>0&&(o.borders=y);}let c=e(e$1,"w","shd");c&&(o.shading=en(c));let p=e(e$1,"w","tabs");p&&(o.tabs=tn(p));let d=e(e$1,"w","keepNext");d&&(o.keepNext=m(d));let h=e(e$1,"w","keepLines");h&&(o.keepLines=m(h));let T=e(e$1,"w","widowControl");T&&(o.widowControl=m(T));let b=e(e$1,"w","pageBreakBefore");b&&(o.pageBreakBefore=m(b));let w=e(e$1,"w","contextualSpacing");w&&(o.contextualSpacing=m(w));let F=e(e$1,"w","numPr");if(F){let y=e(F,"w","numId"),S=e(F,"w","ilvl");if(y||S){if(o.numPr={},y){let P=l(y,"w","val");P!==void 0&&(o.numPr.numId=P);}if(S){let P=l(S,"w","val");P!==void 0&&(o.numPr.ilvl=P);}}}let H=e(e$1,"w","outlineLvl");if(H){let y=l(H,"w","val");y!==void 0&&(o.outlineLevel=y);}let M=e(e$1,"w","pStyle");if(M){let y=j$1(M,"w","val");y&&(o.styleId=y);}let x=e(e$1,"w","framePr");x&&(o.frame=nn(x));let m$1=e(e$1,"w","suppressLineNumbers");m$1&&(o.suppressLineNumbers=m(m$1));let C=e(e$1,"w","suppressAutoHyphens");C&&(o.suppressAutoHyphens=m(C));let E=e(e$1,"w","rPr");return E&&(o.runProperties=ue(E,t)),Object.keys(o).length>0?o:void 0}function on(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function rn(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function an(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function Ke(e,t,n=null,o=null,r=null){let a={type:"hyperlink",children:[]},u=j$1(e,"r","id");if(u&&(a.rId=u,t)){let T=t.get(u);T&&(q(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 h=i(e);for(let T of h)switch(on(T.name)){case "r":a.children.push($(T,n,o,t,r));break;case "bookmarkStart":a.children.push(rn(T));break;case "bookmarkEnd":a.children.push(an(T));break}return a}function co(e){let t="";for(let n of e.children)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"&&(t+=" ");return t}function po(e){return e.href?/^https?:\/\/|^mailto:|^tel:|^ftp:/i.test(e.href):!!e.rId&&!e.anchor}function mo(e){return !!e.anchor}function go(e){return e.href}function ho(e){return e.children.some(t=>t.type==="run")}function wo(e){return e.children.filter(t=>t.type==="run")}function yo(e,t){if(e.rId){let n=t.get(e.rId);if(n)return q(n),e.href=n.target,e.href}return e.anchor&&!e.href&&(e.href=`#${e.anchor}`),e.href}function Qe(e){let t=l(e,"w","id")??0,n=j$1(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function Je(e){return {type:"bookmarkEnd",id:l(e,"w","id")??0}}function ln(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 r=e(n,"w","docPart");if(r){let a=e(r,"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=et(n);break;case "comboBox":t.sdtType="comboBox",t.listItems=et(n);break;case "checkbox":{t.sdtType="checkbox";let r=e(n,"w14","checked")??e(n,"w","checked");t.checked=r?j$1(r,"w14","val")==="1"||j$1(r,"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 et(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 nt(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 r of n.elements)r.type==="text"&&typeof r.text=="string"&&(t+=r.text);else t+=nt(n);return t}function K(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function ot(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"]),o=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"]),r=false;function a(l){for(let f of i(l)){let c=K(f.name);if(!n.has(c)){if(c==="lastRenderedPageBreak"){r=true;continue}if(c==="r"){for(let p of i(f)){let d=K(p.name);if(d!=="rPr"){if(d==="lastRenderedPageBreak"){r=true;continue}if(d==="br"&&j$1(p,"w","type")==="page")return "forced";if(o.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"?r:false}function tt(e,t){if(!e)return `w:${t}`;let n=e.indexOf(":");return n<0?t:`${e.substring(0,n+1)}${t}`}function rt(e){if(e.type!=="element")return e;let t=K(e.name),n=e.name;return t==="delText"?n=tt(e.name,"t"):t==="delInstrText"&&(n=tt(e.name,"instrText")),{...e,name:n,elements:e.elements?.map(rt)}}function Z(e){let t=j$1(e,"w","id"),n=t?parseInt(t,10):0,o=j$1(e,"w","author"),r=j$1(e,"w","date"),a=o?.trim()??"",u=r?.trim()??"";return {id:Number.isInteger(n)&&n>=0?n:0,author:a.length>0?a:"Unknown",date:u.length>0?u:void 0}}function sn(e){let t=Z(e),n=(j$1(e,"w","rsid")??"").trim();return n.length>0?{...t,rsid:n}:t}function it(e$1,t,n,o){if(!e$1)return;let r=f(e$1,"w","pPrChange").map(a=>{let u=e(a,"w","pPr");return {type:"paragraphPropertyChange",info:sn(a),previousFormatting:fe(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function un(e,t,n,o,r){return Ke(e,t,n,o,r)}function fn(e){return Qe(e)}function cn(e){return Je(e)}function at(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 pn(e,t,n,o,r){let a=j$1(e,"w","instr")??"",u=at(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,o,r));return l}function U(e,t,n,o,r,a,u="default"){let l=[],f=i(e),c=false,p="",d=[],h=[],T=false,b$1=false,w=false;for(let F of f){let H=K(F.name);switch(H){case "r":{let M=u==="deletion"?rt(F):F,x=$(M,t,n,r,a),m=false,C=false,E=false,y="";for(let S of x.content)S.type==="fieldChar"?S.charType==="begin"?(m=true,S.fldLock&&(b$1=true),S.dirty&&(w=true)):S.charType==="separate"?C=true:S.charType==="end"&&(E=true):S.type==="instrText"&&(y+=S.text);if(m&&(c=true,T=false,p="",d=[],h=[],b$1=false,w=false),c){if(y&&(p+=y),C&&(T=true),T&&!E?C||h.push(x):!T&&!m&&d.push(x),E){let S={type:"complexField",instruction:p.trim(),fieldType:at(p),fieldCode:d,fieldResult:h};b$1&&(S.fldLock=true),w&&(S.dirty=true),l.push(S),c=false;}}else l.push(x);break}case "hyperlink":l.push(un(F,r,t,n,a));break;case "bookmarkStart":l.push(fn(F));break;case "bookmarkEnd":l.push(cn(F));break;case "fldSimple":l.push(pn(F,t,n,r,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"))),x=(F.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtContent"||m.name?.endsWith(":sdtContent")));if(x){let m=U(x,t,n,null,r,a,u),E={type:"inlineSdt",properties:ln(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),x=U(F,t,n,null,r,a),m={type:"insertion",info:M,content:x.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "del":{let M=Z(F),x=U(F,t,n,null,r,a,"deletion"),m={type:"deletion",info:M,content:x.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveFrom":{let M=Z(F),x=U(F,t,n,null,r,a,"deletion"),m={type:"moveFrom",info:M,content:x.filter(C=>C.type==="run"||C.type==="hyperlink")};l.push(m);break}case "moveTo":{let M=Z(F),x=U(F,t,n,null,r,a),m={type:"moveTo",info:M,content:x.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),x=j$1(F,"w","name")??"";l.push({type:"moveFromRangeStart",id:M,name:x});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),x=j$1(F,"w","name")??"";l.push({type:"moveToRangeStart",id:M,name:x});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=H==="oMathPara",x=b(F),m=nt(F),C={type:"mathEquation",display:M?"block":"inline",ommlXml:x,plainText:m||void 0};l.push(C);break}}}return l}function ce(e){let t="";for(let n of e.content)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"?t+=" ":o.type==="break"&&(o.breakType==="page"?t+="\f":t+=`
|
|
4
|
-
`);else if(n.type==="hyperlink"){for(let o of n.children)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="simpleField"){for(let o of n.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="complexField")for(let o of n.fieldResult)for(let r of o.content)r.type==="text"&&(t+=r.text);return t}function D(e$1,t,n,o,r=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&&ot(e$1)&&(l.renderedPageBreakBefore=true);let p=e(e$1,"w","pPr");if(p){l.formatting=fe(p,n),l.propertyChanges=it(p,n,t,l.formatting);let T=e(p,"w","sectPr");T&&(l.sectionProperties=ae(T));}let d=U(e$1,t,n,o,r,a);l.content=be(d);let h=l.formatting?.numPr;if(!h&&l.formatting?.styleId&&t){let T=t.get(l.formatting.styleId);T?.pPr?.numPr&&(h=T.pPr.numPr,l.formatting||(l.formatting={}),l.formatting.numPr=h);}if(h&&o){let{numId:T,ilvl:b=0}=h;if(T!==void 0&&T!==0){let w=o.getLevel(T,b);if(w){let F=[];for(let x=0;x<=b;x+=1){let m=o.getLevel(T,x);F.push(m?.numFmt??"decimal");}let H=o.getInstance(T),M=H?.levelOverrides?.find(x=>x.ilvl===b);if(l.listRendering={level:b,numId:T,marker:w.lvlText,isBullet:w.numFmt==="bullet",numFmt:w.numFmt,markerHidden:w.rPr?.hidden||void 0,markerFontFamily:w.rPr?.fontFamily?.ascii||w.rPr?.fontFamily?.hAnsi||void 0,markerFontSize:w.rPr?.fontSize?w.rPr.fontSize/2:void 0,levelNumFmts:F,abstractNumId:H?.abstractNumId,startOverride:M?.startOverride},w.pPr){l.formatting||(l.formatting={});let x=p?e(p,"w","ind"):null,m=x!=null&&(j$1(x,"w","left")!==null||j$1(x,"w","start")!==null),C=x!=null&&(j$1(x,"w","firstLine")!==null||j$1(x,"w","hanging")!==null);!m&&w.pPr.indentLeft!==void 0&&(l.formatting.indentLeft=w.pPr.indentLeft),C||(w.pPr.indentFirstLine!==void 0&&(l.formatting.indentFirstLine=w.pPr.indentFirstLine),w.pPr.hangingIndent!==void 0&&(l.formatting.hangingIndent=w.pPr.hangingIndent));}}}}return l}function lt(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tblW"));n&&(t.width=n);let o=e(e$1,"w","jc");if(o){let w=j$1(o,"w","val");(w==="left"||w==="center"||w==="right"||w==="start")&&(t.justification=w==="start"?"left":w);}let r=X(e(e$1,"w","tblCellSpacing"));r&&(t.cellSpacing=r);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 w=j$1(f,"w","type");(w==="fixed"||w==="autofit")&&(t.layout=w);}let c=e(e$1,"w","tblStyle");if(c){let w=j$1(c,"w","val");w&&(t.styleId=w);}let p=he(e(e$1,"w","tblLook"));p&&(t.look=p);let d=ne(e(e$1,"w","shd"));d&&(t.shading=d);let h=e(e$1,"w","tblOverlap");if(h){let w=j$1(h,"w","val");(w==="never"||w==="overlap")&&(t.overlap=w);}let T=we(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 dn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tblPrChange").map(o=>{let r=e(o,"w","tblPr");return {type:"tablePropertyChange",info:J(o),previousFormatting:lt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function mn(e$1,t){if(!e$1)return;let n=f(e$1,"w","trPrChange").map(o=>{let r=e(o,"w","trPr");return {type:"tableRowPropertyChange",info:J(o),previousFormatting:st(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function gn(e$1,t){if(!e$1)return;let n=f(e$1,"w","tcPrChange").map(o=>{let r=e(o,"w","tcPr");return {type:"tableCellPropertyChange",info:J(o),previousFormatting:ft(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function hn(e$1){if(!e$1)return;let t=e(e$1,"w","ins");if(t)return {type:"tableRowInsertion",info:j(t)};let n=e(e$1,"w","del");if(n)return {type:"tableRowDeletion",info:j(n)}}function wn(e$1){if(!e$1)return;let t=e(e$1,"w","cellIns");if(t)return {type:"tableCellInsertion",info:j(t)};let n=e(e$1,"w","cellDel");if(n)return {type:"tableCellDeletion",info:j(n)};let o=e(e$1,"w","cellMerge");if(o)return {type:"tableCellMerge",info:j(o)}}function st(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=ut(e(e$1,"w","cnfStyle"));if(l$1&&(t.conditionalFormat=l$1),Object.keys(t).length!==0)return t}function ut(e){if(!e)return;let t={},n=j$1(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=j$1(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=j$1(e,"w","firstColumn");(r==="1"||r==="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 h=j$1(e,"w","lastRowFirstColumn");(h==="1"||h==="true")&&(t.swCell=true);let T=j$1(e,"w","lastRowLastColumn");(T==="1"||T==="true")&&(t.seCell=true);let b=j$1(e,"w","val");if(b&&b.length===12&&(b[0]==="1"&&(t.firstRow=true),b[1]==="1"&&(t.lastRow=true),b[2]==="1"&&(t.firstColumn=true),b[3]==="1"&&(t.lastColumn=true),b[4]==="1"&&(t.oddVBand=true),b[5]==="1"&&(t.evenVBand=true),b[6]==="1"&&(t.oddHBand=true),b[7]==="1"&&(t.evenHBand=true),b[8]==="1"&&(t.nwCell=true),b[9]==="1"&&(t.neCell=true),b[10]==="1"&&(t.swCell=true),b[11]==="1"&&(t.seCell=true)),Object.keys(t).length!==0)return t}function ft(e$1){if(!e$1)return;let t={},n=X(e(e$1,"w","tcW"));n&&(t.width=n);let o=ee(e(e$1,"w","tcBorders"));o&&(t.borders=o);let r=te(e(e$1,"w","tcMar"));r&&(t.margins=r);let a=ne(e(e$1,"w","shd"));a&&(t.shading=a);let u=e(e$1,"w","vAlign");if(u){let b=j$1(u,"w","val");(b==="top"||b==="center"||b==="bottom")&&(t.verticalAlign=b);}let l$1=e(e$1,"w","textDirection");if(l$1){let b=j$1(l$1,"w","val");b&&(t.textDirection=b);}let f=e(e$1,"w","gridSpan");if(f){let b=l(f,"w","val");b!==void 0&&b>1&&(t.gridSpan=b);}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=ut(e(e$1,"w","cnfStyle"));if(T&&(t.conditionalFormat=T),Object.keys(t).length!==0)return t}function yn(e,t,n,o,r,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=D(c,t,n,o,r,a,u);l.push(d);}else if(p==="tbl"){let d=z(c,t,n,o,r,a,u);l.push(d);}}return l.length===0&&l.push({type:"paragraph",content:[]}),l}function bn(e$1,t,n,o,r,a,u){let l={type:"tableCell",content:[]},f=e(e$1,"w","tcPr"),c=ft(f);return c&&(l.formatting=c),l.propertyChanges=gn(f,c),l.structuralChange=wn(f),l.content=yn(e$1,t,n,o,r,a,u),l}function Tn(e$1,t,n,o,r,a,u){let l={type:"tableRow",cells:[]},f$1=e(e$1,"w","trPr"),c=st(f$1);c&&(l.formatting=c),l.propertyChanges=mn(f$1,c),l.structuralChange=hn(f$1);let p=f(e$1,"w","tc");for(let d of p){let h=bn(d,t,n,o,r,a,u);l.cells.push(h);}return l}function Cn(e){if(!e)return;let t=[],n=f(e,"w","gridCol");for(let o of n){let r=l(o,"w","w")??0;t.push(r);}if(!(t.length>0&&t.every(o=>o<=0)))return t.length>0?t:void 0}function Fn(e){return e.cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function xn(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 o=n.cells[0];(o.formatting?.gridSpan??1)>=t||o.formatting?.vMerge||o.formatting?.gridSpan==null&&(o.formatting={...o.formatting??{},gridSpan:t});}}function z(e$1,t,n,o,r,a,u){let l={type:"table",rows:[]},f$1=e(e$1,"w","tblPr"),c=lt(f$1);c&&(l.formatting=c),l.propertyChanges=dn(f$1,c);let p=Cn(e(e$1,"w","tblGrid"));p&&(l.columnWidths=p);let d=f(e$1,"w","tr");for(let h of d){let T=Tn(h,t,n,o,r,a,u);l.rows.push(T);}return xn(l),l}function Sn(e){if(!e||e.trim()==="")return "\u2022";let t=e.charCodeAt(0),n={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:"-"};return n[t]?n[t]:t>=57344&&t<=63743||t<32||t>=127&&t<160?"\u2022":e}function kn(e){let t=e.listRendering;t&&t.isBullet&&(t.marker=Sn(t.marker||""));}var ct=/\{([a-zA-Z_][a-zA-Z0-9_\-\.]*)\}/g;function pt(e){let t=[],n;for(ct.lastIndex=0;(n=ct.exec(e))!==null;){let o=n[1].trim();o&&!t.includes(o)&&t.push(o);}return t}function nr(e){let t=[];for(let n of e)if(n.type==="paragraph"){let o=ce(n),r=pt(o);for(let a of r)t.includes(a)||t.push(a);}else if(n.type==="table"){let o=dt(n);for(let r of o)t.includes(r)||t.push(r);}return t}function dt(e){let t=[];for(let n of e.rows)for(let o of n.cells)for(let r of o.content)if(r.type==="paragraph"){let a=ce(r),u=pt(a);for(let l of u)t.includes(l)||t.push(l);}else if(r.type==="table"){let a=dt(r);for(let u of a)t.includes(u)||t.push(u);}return t}function Mn(e,t,n$1,o,r,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 h$1=n(p,"wps","wsp");if(h$1){let F=k$1(h$1);F&&(d.content=g(F,D,null,n$1,o,r,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 b={type:"shape",shape:T},w=f;if(w>=e.content.length){w=-1;for(let F=e.content.length-1;F>=0;F--)if(e.content[F].type==="run"){w=F;break}}if(w>=0){let F=e.content[w];F.type==="run"&&F.content.push(b);}}for(let p of l){if(d(p.name??"")!=="r")continue;let d$1=i(p);for(let h of d$1){let T=d(h.name??"");if(T==="drawing")c(h);else if(T==="AlternateContent"){let b=i(h),F=b.find(H=>d(H.name??"")==="Choice")??b.find(H=>d(H.name??"")==="Fallback");if(F)for(let H of i(F))d(H.name??"")==="drawing"&&c(H);}}f++;}}function mt(e,t,n,o,r,a){let u=[],l=i(e);for(let f of l){let c=f.name??"";if(c==="w:p"||c.endsWith(":p")){let p=D(f,t,n,o,r,a);Mn(p,f,t,n,o,r,a),kn(p),u.push(p);}else if(c==="w:tbl"||c.endsWith(":tbl")){let p=z(f,t,n,o,r,a);u.push(p);}else if(c==="w:sdt"||c.endsWith(":sdt")){let p=(f.elements??[]).find(d=>d.type==="element"&&(d.name==="w:sdtContent"||d.name?.endsWith(":sdtContent")));if(p){let d=mt(p,t,n,o,r,a);u.push(...d);}}}return u}function Rn(e,t){let n=[],o=[];for(let r of e)o.push(r),r.type==="paragraph"&&r.sectionProperties&&(n.push({properties:r.sectionProperties,content:o}),o=[]);return (o.length>0||n.length===0)&&n.push({properties:t??qe(),content:o}),n}function or(e$1,t=null,n=null,o=null,r=null,a$1=null){let u={content:[]};if(!e$1)return u;let l=a(e$1);if(!l)return u;let f=(l.elements??[]).find(h=>h.type==="element"&&(h.name==="w:document"||h.name?.endsWith(":document")));if(!f)return u;let c=e(f,"w","body");if(!c)return u;u.content=mt(c,t,n,o,r,a$1);let p=e(c,"w","sectPr");p&&(u.finalSectionProperties=ae(p));let d=Rn(u.content,u.finalSectionProperties);return u.sections=_e(d),u.finalSectionProperties&&u.sections.length>0&&(u.finalSectionProperties=u.sections[u.sections.length-1].properties),u}export{Ke as A,co as B,po as C,mo as D,go as E,ho as F,wo as G,yo as H,D as I,Sn as J,nr as K,or as L,Pn as a,Y as b,Ie as c,V as d,ee as e,te as f,ne as g,he as h,we as i,Tt as j,Ct as k,Ft as l,xt as m,St as n,lt as o,Xn as p,Dn as q,zn as r,Un as s,ze as t,Ue as u,Gn as v,qn as w,_n as x,Yn as y,$ as z};
|
package/dist/chunk-44RUAQA2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js');function R(e,t,n,a){let i=e-t-n,r=(a.count-1)*a.gap;return (i-r)/a.count}function N(e){let t={...e.pageSize},n={...e.margins},a=e.columns??{count:1,gap:0},i=false,r,o,g=[],s=[];function d(){return t.h-n.bottom}function u(){return d()-n.top}function f(){return t.w-n.left-n.right}if(u()<=0)throw new Error("Paginator: page size and margins yield no content area");let B=R(t.w,n.left,n.right,a),h=n.top;function y(c){return n.left+c*(B+a.gap)}function l(){(r||o)&&(r&&(t=r),o&&(n=o),r=void 0,o=void 0,B=R(t.w,n.left,n.right,a));let c=g.length+1,p=n.top,C=d(),k=e.footnoteReservedHeights?.get(c)??0,F=C-k,H={number:c,fragments:[],margins:{...n},size:{...t},footnoteReservedHeight:k>0?k:void 0,columns:a.count>1?{...a}:void 0},w={page:H,cursorY:p,columnIndex:0,topMargin:p,contentBottom:F,trailingSpacing:0};return g.push(H),s.push(w),h=p,e.onNewPage&&e.onNewPage(w),w}function S(){return s.length===0?l():s[s.length-1]}function b(c){return c.contentBottom-c.cursorY}function P(c,p){let C=p||S();return b(C)>=c}function m(c){return c.columnIndex<a.count-1?(c.columnIndex+=1,c.cursorY=h,c.trailingSpacing=0,c):l()}function x(c){let p=S(),C=Number.isFinite(c)&&c>0?c:0;for(;!P(C,p);){let k=p.contentBottom-p.topMargin;if(C>k)return i||(i=true,console.warn(`Paginator: fragment height ${C.toFixed(0)}px exceeds page content height ${k.toFixed(0)}px; placing with overflow.`)),p.cursorY!==p.topMargin&&(p=m(p)),p;p=m(p);}return p}function M(c,p,C=0,k=0){let F=Math.max(C,S().trailingSpacing),H=F+p,w=x(H),J=F,K=y(w.columnIndex),A=w.cursorY+J;return c.x=K,c.y=A,w.page.fragments.push(c),w.cursorY=A+p,w.trailingSpacing=k,{state:w,x:K,y:A}}function I(){if(s.length>0){let c=s[s.length-1];if(c.page.fragments.length===0&&c.cursorY===c.topMargin)return c}return l()}function v(){let c=S();return m(c)}function L(c){a=c,B=R(t.w,n.left,n.right,a);let p=S();p.page.columns=a.count>1?{...a}:void 0,h=p.cursorY,p.columnIndex=0;}function z(c,p,C=true){if(!C){r=c?{...c}:r,o=p?{...p}:o;return}if(c&&(t={...c}),p&&(n={...p}),u()<=0)throw new Error("Paginator: section page size and margins yield no content area");B=R(t.w,n.left,n.right,a),r=void 0,o=void 0;}return {pages:g,states:s,get columnWidth(){return B},get columns(){return {...a}},getCurrentState:S,getAvailableHeight:()=>b(S()),getContentWidth:f,fits:c=>P(c),ensureFits:x,addFragment:M,forcePageBreak:I,forceColumnBreak:v,getColumnX:y,updateColumns:L,updatePageLayout:z}}function O(e){let t=new Map,n=new Set;for(let a=0;a<e.length;a++){if(n.has(a))continue;let i=e[a];if(i.kind!=="paragraph"||!i.attrs?.keepNext)continue;let o=[a],g=a;for(let u=a+1;u<e.length;u++){let f=e[u];if(f.kind==="sectionBreak"||f.kind==="pageBreak"||f.kind==="columnBreak"||f.kind!=="paragraph")break;if(f.attrs?.keepNext)o.push(u),g=u,n.add(u);else break}let s=g+1,d=-1;if(s<e.length){let u=e[s];u.kind!=="sectionBreak"&&u.kind!=="pageBreak"&&u.kind!=="columnBreak"&&(d=s);}t.set(a,{startIndex:a,endIndex:g,memberIndices:o,anchorIndex:d});}return t}function Y(e,t,n){let a=0;for(let i of e.memberIndices){let r=t[i],o=n[i];if(r.kind!=="paragraph"||o.kind!=="paragraph")continue;let g=r,s=o,d=g.attrs?.spacing?.before??0;a+=d,a+=s.totalHeight;let u=g.attrs?.spacing?.after??0;a+=u;}if(e.anchorIndex!==-1){let i=n[e.anchorIndex];if(i?.kind==="paragraph"){let r=i;r.lines.length>0&&(a+=r.lines[0].lineHeight);}}return a}function W(e){let t=new Set;for(let n of e.values())for(let a=1;a<n.memberIndices.length;a++)t.add(n.memberIndices[a]);return t}function Q(e){return e.kind!=="paragraph"?false:e.attrs?.keepLines===true}function X(e){return e.kind!=="paragraph"?false:e.attrs?.pageBreakBefore===true}function D(e){return e.displayMode==="float"||chunkJFZIXFRC_js.a(e.wrapType)}function Me(e){return D(e)&&!chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}var G={count:1,gap:0};function ee(e,t,n){return {activeTopMargin:e.top,activeBottomMargin:e.bottom,activeLeftMargin:e.left,activeRightMargin:e.right,pendingTopMargin:null,pendingBottomMargin:null,pendingLeftMargin:null,pendingRightMargin:null,activePageSize:{...t},pendingPageSize:null,activeColumns:n?{...n}:{...G},pendingColumns:null,activeOrientation:null,pendingOrientation:null,hasAnyPages:false}}function te(e,t){return t.count>1}function E(e){return e?{count:e.count,gap:e.gap}:{...G}}function ne(e,t,n){let a={...t},i=e.type??"continuous",r=e.margins,o=e.pageSize,g=e.orientation;r&&(typeof r.top=="number"&&(a.pendingTopMargin=Math.max(0,r.top)),typeof r.bottom=="number"&&(a.pendingBottomMargin=Math.max(0,r.bottom)),typeof r.left=="number"&&(a.pendingLeftMargin=Math.max(0,r.left)),typeof r.right=="number"&&(a.pendingRightMargin=Math.max(0,r.right))),o&&(a.pendingPageSize={w:o.w,h:o.h}),g&&(a.pendingOrientation=g);let s=te((e.margins,void 0),a.activeColumns);switch(i){case "nextPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false},state:a};case "evenPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"even"},state:a};case "oddPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"odd"},state:a};default:return s?(a.pendingColumns=E(void 0),{decision:{forcePageBreak:false,forceMidPageRegion:true},state:a}):{decision:{forcePageBreak:false,forceMidPageRegion:false},state:a}}}function ae(e){let t={...e};return t.pendingTopMargin!==null&&(t.activeTopMargin=t.pendingTopMargin,t.pendingTopMargin=null),t.pendingBottomMargin!==null&&(t.activeBottomMargin=t.pendingBottomMargin,t.pendingBottomMargin=null),t.pendingLeftMargin!==null&&(t.activeLeftMargin=t.pendingLeftMargin,t.pendingLeftMargin=null),t.pendingRightMargin!==null&&(t.activeRightMargin=t.pendingRightMargin,t.pendingRightMargin=null),t.pendingPageSize!==null&&(t.activePageSize=t.pendingPageSize,t.pendingPageSize=null),t.pendingColumns!==null&&(t.activeColumns=t.pendingColumns,t.pendingColumns=null),t.pendingOrientation!==null&&(t.activeOrientation=t.pendingOrientation,t.pendingOrientation=null),t}function re(e){return {top:e.pendingTopMargin??e.activeTopMargin,bottom:e.pendingBottomMargin??e.activeBottomMargin,left:e.pendingLeftMargin??e.activeLeftMargin,right:e.pendingRightMargin??e.activeRightMargin}}function ie(e){return e.pendingPageSize??e.activePageSize}function oe(e){return e.pendingColumns??e.activeColumns}function ge(e,t){for(let n=0;n<e.pages.length;n++)for(let a of e.pages[n].fragments){if(a.pmStart==null)continue;let i=a.pmStart,r=a.pmEnd??i+1;if(t>=i&&t<r)return n}return null}var ce={w:816,h:1056},T={top:96,right:96,bottom:96,left:96},V={count:1,gap:0};function se(e,t,n){let a=[],i=[],r=t;for(let o=0;o<e.length;o++){if(e[o].kind!=="sectionBreak")continue;let g=e[o],s={pageSize:g.pageSize??r.pageSize,margins:g.margins??r.margins,columns:g.columns};a.push(s),i.push(o),r=s;}return a.push(n),{configs:a,breakIndices:i}}function Z(e){if(e.runs.length===0)return true;if(e.runs.length!==1)return false;let t=e.runs[0];return t.kind==="text"&&(t.text??"")===""}function $(e){let t=e.attrs?.spacing?.before??0;return Z(e)&&!e.attrs?.spacingExplicit?.before?0:t}function q(e){let t=e.attrs?.spacing?.after??0;return Z(e)&&!e.attrs?.spacingExplicit?.after?0:t}function ue(e){for(let t=0;t<e.length-1;t++){let n=e[t],a=e[t+1];if(n.kind!=="paragraph"||a.kind!=="paragraph")continue;let i=n.attrs,r=a.attrs;i?.contextualSpacing&&r?.contextualSpacing&&i.styleId&&i.styleId===r.styleId&&(i.spacing&&(i.spacing={...i.spacing,after:0}),r.spacing&&(r.spacing={...r.spacing,before:0}));}}function Fe(e,t,n={}){if(e.length!==t.length)throw new Error(`layoutDocument: expected one measure per block (blocks=${e.length}, measures=${t.length})`);let a=n.pageSize??ce,i={top:n.margins?.top??T.top,right:n.margins?.right??T.right,bottom:n.margins?.bottom??T.bottom,left:n.margins?.left??T.left,header:n.margins?.header??n.margins?.top??T.top,footer:n.margins?.footer??n.margins?.bottom??T.bottom};n.headerContentHeights,n.footerContentHeights,n.titlePage,n.evenAndOddHeaders;let r={...i},o=n.finalPageSize??a,g=n.finalMargins??r;if(a.w-r.left-r.right<=0)throw new Error("layoutDocument: page size and margins yield no content area");let d={pageSize:a,margins:r,columns:n.columns},u={pageSize:o,margins:g,columns:n.columns},{configs:f,breakIndices:B}=se(e,d,u),h=[...B.map(m=>e[m].type),n.bodyBreakType],y=f[0]??d,l=N({pageSize:y.pageSize,margins:y.margins,columns:y.columns??V,footnoteReservedHeights:n.footnoteReservedHeights});ue(e);let S=O(e),b=W(S),P=0;for(let m=0;m<e.length;m++){let x=e[m],M=t[m];X(x)&&l.forcePageBreak();let I=S.get(m);if(I&&!b.has(m)){let v=Y(I,e,t),L=l.getCurrentState(),z=l.getAvailableHeight(),c=L.contentBottom-L.topMargin;v<=c&&v>z&&L.page.fragments.length>0&&l.forcePageBreak();}switch(x.kind){case "paragraph":le(x,M,l,l.getContentWidth());break;case "table":x.floating?de(x,M,l,l.getContentWidth()):me(x,M,l);break;case "image":he(x,M,l);break;case "textBox":ye(x,M,l);break;case "pageBreak":l.forcePageBreak();break;case "columnBreak":l.forceColumnBreak();break;case "sectionBreak":{let v=h[P+1]??h[P];Be(x,l,f[P+1]??y,v),P++;break}default:chunkDROCYKAR_js.c(x,"runLayoutPipeline");}}return l.pages.length===0&&l.getCurrentState(),{pageSize:a,pages:l.pages,columns:n.columns,pageGap:n.pageGap}}function le(e,t,n,a){if(t.kind!=="paragraph")throw new Error("layoutParagraph: expected paragraph measure");let i=t.lines;if(i.length===0){let s=$(e),d=q(e),u=n.getCurrentState(),f={kind:"paragraph",blockId:e.id,x:n.getColumnX(u.columnIndex),y:u.cursorY+s,width:a,height:0,fromLine:0,toLine:0,pmStart:e.pmStart,pmEnd:e.pmEnd};n.addFragment(f,0,s,d);return}let r=$(e),o=q(e),g=0;for(;g<i.length;){let s=n.getCurrentState(),d=n.getAvailableHeight(),u=0,f=0;for(let P=g;P<i.length;P++){let m=i[P].lineHeight,x=u+m;if((g===0&&P===g?x+r:x)<=d||f===0)u=x,f++;else break}let B=g===0,h=g+f>=i.length,y=B?r:0,l=h?o:0,S={kind:"paragraph",blockId:e.id,x:n.getColumnX(s.columnIndex),y:0,width:a,height:u,fromLine:g,toLine:g+f,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!B,continuesOnNext:!h},b=n.addFragment(S,u,y,l);S.y=b.y,g+=f,g<i.length&&n.ensureFits(i[g].lineHeight);}}function pe(e){let t=0;for(let n of e.rows)if(n.isHeader)t++;else break;return t}function fe(e,t){let n=0;for(let a=0;a<t&&a<e.rows.length;a++)n+=e.rows[a].height;return n}function me(e,t,n){if(t.kind!=="table")throw new Error("layoutTable: expected table measure");let a=t.rows;if(a.length===0)return;let i=pe(e),r=fe(t,i),o=0;for(;o<a.length;){let g=n.getCurrentState(),s=n.getAvailableHeight(),d=o===0,u=d?g.trailingSpacing:0,f=s-u,B=!d&&i>0?r:0,h=0,y=0;for(let x=o;x<a.length;x++){let M=a[x].height;if(h+M+B<=f||y===0)h+=M,y++;else break}let l=h+B,S=o+y>=a.length,b=n.getColumnX(g.columnIndex);e.justification==="center"?b=b+(n.columnWidth-t.totalWidth)/2:e.justification==="right"?b=b+n.columnWidth-t.totalWidth:e.indent&&(b+=e.indent);let P={kind:"table",blockId:e.id,x:b,y:0,width:t.totalWidth,height:l,fromRow:o,toRow:o+y,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!d,continuesOnNext:!S,headerRowCount:!d&&i>0?i:void 0},m=n.addFragment(P,l,0,0);if(P.y=m.y,P.x=b,o+=y,o<a.length){let x=a[o].height+(i>0?r:0);n.ensureFits(x);}}}function de(e,t,n,a){if(t.kind!=="table")throw new Error("layoutFloatingTable: expected table measure");let i=n.getCurrentState(),r=e.floating,o=i.page,g=o.margins,s=t.totalWidth,d=t.totalHeight,u=o.size.h-g.top-g.bottom,f=g.left,B=g.top;r?.horzAnchor==="page"&&(f=0),r?.vertAnchor==="page"&&(B=0);let h=n.getColumnX(i.columnIndex);if(r?.tblpX!==void 0)h=f+r.tblpX;else if(r?.tblpXSpec){let m=r.tblpXSpec;m==="left"||m==="inside"?h=f:m==="right"||m==="outside"?h=f+a-s:m==="center"&&(h=f+(a-s)/2);}else e.justification==="center"?h=f+(a-s)/2:e.justification==="right"&&(h=f+a-s);let y=i.cursorY,l=false;if(r?.tblpY!==void 0)y=B+r.tblpY,l=true;else if(r?.tblpYSpec){l=true;let m=r.tblpYSpec;m==="top"?y=B:m==="bottom"?y=B+u-d:m==="center"&&(y=B+(u-d)/2);}l||(y=n.ensureFits(d).cursorY);let S=g.left,b=g.left+a-s;Number.isFinite(b)&&(h=Math.max(S,Math.min(h,b)));let P={kind:"table",blockId:e.id,x:h,y,width:s,height:d,fromRow:0,toRow:e.rows.length,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true};i.page.fragments.push(P);}function he(e,t,n){if(t.kind!=="image")throw new Error("layoutImage: expected image measure");if(e.anchor?.isAnchored){xe(e,t,n);return}let a=n.ensureFits(t.height),i={kind:"image",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function xe(e,t,n){let a=n.getCurrentState(),i=e.anchor,r=i.offsetH??n.getColumnX(a.columnIndex),o=i.offsetV??a.cursorY,g={kind:"image",blockId:e.id,x:r,y:o,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isAnchored:true,zIndex:i.behindDoc?-1:1};a.page.fragments.push(g);}function ye(e,t,n){if(t.kind!=="textBox")throw new Error("layoutTextBox: expected textBox measure");if(D(e)){let o=n.getCurrentState(),g={kind:"textBox",blockId:e.id,x:n.getColumnX(o.columnIndex),y:o.cursorY,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true,zIndex:e.wrapType==="behind"?-1:1};o.page.fragments.push(g);return}let a=n.ensureFits(t.height),i={kind:"textBox",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function Be(e,t,n,a){switch(a??"nextPage"){case "nextPage":t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak();break;case "evenPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2!==0&&t.forcePageBreak();break}case "oddPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2===0&&t.forcePageBreak();break}case "continuous":t.updatePageLayout(n.pageSize,n.margins,false);break}t.updateColumns(n.columns??V);}exports.a=N;exports.b=O;exports.c=Y;exports.d=W;exports.e=Q;exports.f=X;exports.g=D;exports.h=Me;exports.i=ee;exports.j=ne;exports.k=ae;exports.l=re;exports.m=ie;exports.n=oe;exports.o=ge;exports.p=se;exports.q=Fe;exports.r=fe;
|
package/dist/chunk-5N5DBQJV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-7E5VBRDL.mjs';import {a,b}from'./chunk-QPFJJPIC.mjs';function R(e,t,n,a){let i=e-t-n,r=(a.count-1)*a.gap;return (i-r)/a.count}function N(e){let t={...e.pageSize},n={...e.margins},a=e.columns??{count:1,gap:0},i=false,r,o,g=[],s=[];function d(){return t.h-n.bottom}function u(){return d()-n.top}function f(){return t.w-n.left-n.right}if(u()<=0)throw new Error("Paginator: page size and margins yield no content area");let B=R(t.w,n.left,n.right,a),h=n.top;function y(c){return n.left+c*(B+a.gap)}function l(){(r||o)&&(r&&(t=r),o&&(n=o),r=void 0,o=void 0,B=R(t.w,n.left,n.right,a));let c=g.length+1,p=n.top,C=d(),k=e.footnoteReservedHeights?.get(c)??0,F=C-k,H={number:c,fragments:[],margins:{...n},size:{...t},footnoteReservedHeight:k>0?k:void 0,columns:a.count>1?{...a}:void 0},w={page:H,cursorY:p,columnIndex:0,topMargin:p,contentBottom:F,trailingSpacing:0};return g.push(H),s.push(w),h=p,e.onNewPage&&e.onNewPage(w),w}function S(){return s.length===0?l():s[s.length-1]}function b(c){return c.contentBottom-c.cursorY}function P(c,p){let C=p||S();return b(C)>=c}function m(c){return c.columnIndex<a.count-1?(c.columnIndex+=1,c.cursorY=h,c.trailingSpacing=0,c):l()}function x(c){let p=S(),C=Number.isFinite(c)&&c>0?c:0;for(;!P(C,p);){let k=p.contentBottom-p.topMargin;if(C>k)return i||(i=true,console.warn(`Paginator: fragment height ${C.toFixed(0)}px exceeds page content height ${k.toFixed(0)}px; placing with overflow.`)),p.cursorY!==p.topMargin&&(p=m(p)),p;p=m(p);}return p}function M(c,p,C=0,k=0){let F=Math.max(C,S().trailingSpacing),H=F+p,w=x(H),J=F,K=y(w.columnIndex),A=w.cursorY+J;return c.x=K,c.y=A,w.page.fragments.push(c),w.cursorY=A+p,w.trailingSpacing=k,{state:w,x:K,y:A}}function I(){if(s.length>0){let c=s[s.length-1];if(c.page.fragments.length===0&&c.cursorY===c.topMargin)return c}return l()}function v(){let c=S();return m(c)}function L(c){a=c,B=R(t.w,n.left,n.right,a);let p=S();p.page.columns=a.count>1?{...a}:void 0,h=p.cursorY,p.columnIndex=0;}function z(c,p,C=true){if(!C){r=c?{...c}:r,o=p?{...p}:o;return}if(c&&(t={...c}),p&&(n={...p}),u()<=0)throw new Error("Paginator: section page size and margins yield no content area");B=R(t.w,n.left,n.right,a),r=void 0,o=void 0;}return {pages:g,states:s,get columnWidth(){return B},get columns(){return {...a}},getCurrentState:S,getAvailableHeight:()=>b(S()),getContentWidth:f,fits:c=>P(c),ensureFits:x,addFragment:M,forcePageBreak:I,forceColumnBreak:v,getColumnX:y,updateColumns:L,updatePageLayout:z}}function O(e){let t=new Map,n=new Set;for(let a=0;a<e.length;a++){if(n.has(a))continue;let i=e[a];if(i.kind!=="paragraph"||!i.attrs?.keepNext)continue;let o=[a],g=a;for(let u=a+1;u<e.length;u++){let f=e[u];if(f.kind==="sectionBreak"||f.kind==="pageBreak"||f.kind==="columnBreak"||f.kind!=="paragraph")break;if(f.attrs?.keepNext)o.push(u),g=u,n.add(u);else break}let s=g+1,d=-1;if(s<e.length){let u=e[s];u.kind!=="sectionBreak"&&u.kind!=="pageBreak"&&u.kind!=="columnBreak"&&(d=s);}t.set(a,{startIndex:a,endIndex:g,memberIndices:o,anchorIndex:d});}return t}function Y(e,t,n){let a=0;for(let i of e.memberIndices){let r=t[i],o=n[i];if(r.kind!=="paragraph"||o.kind!=="paragraph")continue;let g=r,s=o,d=g.attrs?.spacing?.before??0;a+=d,a+=s.totalHeight;let u=g.attrs?.spacing?.after??0;a+=u;}if(e.anchorIndex!==-1){let i=n[e.anchorIndex];if(i?.kind==="paragraph"){let r=i;r.lines.length>0&&(a+=r.lines[0].lineHeight);}}return a}function W(e){let t=new Set;for(let n of e.values())for(let a=1;a<n.memberIndices.length;a++)t.add(n.memberIndices[a]);return t}function Q(e){return e.kind!=="paragraph"?false:e.attrs?.keepLines===true}function X(e){return e.kind!=="paragraph"?false:e.attrs?.pageBreakBefore===true}function D(e){return e.displayMode==="float"||a(e.wrapType)}function Me(e){return D(e)&&!b(e.wrapType)&&e.wrapType!=="topAndBottom"}var G={count:1,gap:0};function ee(e,t,n){return {activeTopMargin:e.top,activeBottomMargin:e.bottom,activeLeftMargin:e.left,activeRightMargin:e.right,pendingTopMargin:null,pendingBottomMargin:null,pendingLeftMargin:null,pendingRightMargin:null,activePageSize:{...t},pendingPageSize:null,activeColumns:n?{...n}:{...G},pendingColumns:null,activeOrientation:null,pendingOrientation:null,hasAnyPages:false}}function te(e,t){return t.count>1}function E(e){return e?{count:e.count,gap:e.gap}:{...G}}function ne(e,t,n){let a={...t},i=e.type??"continuous",r=e.margins,o=e.pageSize,g=e.orientation;r&&(typeof r.top=="number"&&(a.pendingTopMargin=Math.max(0,r.top)),typeof r.bottom=="number"&&(a.pendingBottomMargin=Math.max(0,r.bottom)),typeof r.left=="number"&&(a.pendingLeftMargin=Math.max(0,r.left)),typeof r.right=="number"&&(a.pendingRightMargin=Math.max(0,r.right))),o&&(a.pendingPageSize={w:o.w,h:o.h}),g&&(a.pendingOrientation=g);let s=te((e.margins,void 0),a.activeColumns);switch(i){case "nextPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false},state:a};case "evenPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"even"},state:a};case "oddPage":return a.pendingColumns=E(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"odd"},state:a};default:return s?(a.pendingColumns=E(void 0),{decision:{forcePageBreak:false,forceMidPageRegion:true},state:a}):{decision:{forcePageBreak:false,forceMidPageRegion:false},state:a}}}function ae(e){let t={...e};return t.pendingTopMargin!==null&&(t.activeTopMargin=t.pendingTopMargin,t.pendingTopMargin=null),t.pendingBottomMargin!==null&&(t.activeBottomMargin=t.pendingBottomMargin,t.pendingBottomMargin=null),t.pendingLeftMargin!==null&&(t.activeLeftMargin=t.pendingLeftMargin,t.pendingLeftMargin=null),t.pendingRightMargin!==null&&(t.activeRightMargin=t.pendingRightMargin,t.pendingRightMargin=null),t.pendingPageSize!==null&&(t.activePageSize=t.pendingPageSize,t.pendingPageSize=null),t.pendingColumns!==null&&(t.activeColumns=t.pendingColumns,t.pendingColumns=null),t.pendingOrientation!==null&&(t.activeOrientation=t.pendingOrientation,t.pendingOrientation=null),t}function re(e){return {top:e.pendingTopMargin??e.activeTopMargin,bottom:e.pendingBottomMargin??e.activeBottomMargin,left:e.pendingLeftMargin??e.activeLeftMargin,right:e.pendingRightMargin??e.activeRightMargin}}function ie(e){return e.pendingPageSize??e.activePageSize}function oe(e){return e.pendingColumns??e.activeColumns}function ge(e,t){for(let n=0;n<e.pages.length;n++)for(let a of e.pages[n].fragments){if(a.pmStart==null)continue;let i=a.pmStart,r=a.pmEnd??i+1;if(t>=i&&t<r)return n}return null}var ce={w:816,h:1056},T={top:96,right:96,bottom:96,left:96},V={count:1,gap:0};function se(e,t,n){let a=[],i=[],r=t;for(let o=0;o<e.length;o++){if(e[o].kind!=="sectionBreak")continue;let g=e[o],s={pageSize:g.pageSize??r.pageSize,margins:g.margins??r.margins,columns:g.columns};a.push(s),i.push(o),r=s;}return a.push(n),{configs:a,breakIndices:i}}function Z(e){if(e.runs.length===0)return true;if(e.runs.length!==1)return false;let t=e.runs[0];return t.kind==="text"&&(t.text??"")===""}function $(e){let t=e.attrs?.spacing?.before??0;return Z(e)&&!e.attrs?.spacingExplicit?.before?0:t}function q(e){let t=e.attrs?.spacing?.after??0;return Z(e)&&!e.attrs?.spacingExplicit?.after?0:t}function ue(e){for(let t=0;t<e.length-1;t++){let n=e[t],a=e[t+1];if(n.kind!=="paragraph"||a.kind!=="paragraph")continue;let i=n.attrs,r=a.attrs;i?.contextualSpacing&&r?.contextualSpacing&&i.styleId&&i.styleId===r.styleId&&(i.spacing&&(i.spacing={...i.spacing,after:0}),r.spacing&&(r.spacing={...r.spacing,before:0}));}}function Fe(e,t,n={}){if(e.length!==t.length)throw new Error(`layoutDocument: expected one measure per block (blocks=${e.length}, measures=${t.length})`);let a=n.pageSize??ce,i={top:n.margins?.top??T.top,right:n.margins?.right??T.right,bottom:n.margins?.bottom??T.bottom,left:n.margins?.left??T.left,header:n.margins?.header??n.margins?.top??T.top,footer:n.margins?.footer??n.margins?.bottom??T.bottom};n.headerContentHeights,n.footerContentHeights,n.titlePage,n.evenAndOddHeaders;let r={...i},o=n.finalPageSize??a,g=n.finalMargins??r;if(a.w-r.left-r.right<=0)throw new Error("layoutDocument: page size and margins yield no content area");let d={pageSize:a,margins:r,columns:n.columns},u={pageSize:o,margins:g,columns:n.columns},{configs:f,breakIndices:B}=se(e,d,u),h=[...B.map(m=>e[m].type),n.bodyBreakType],y=f[0]??d,l=N({pageSize:y.pageSize,margins:y.margins,columns:y.columns??V,footnoteReservedHeights:n.footnoteReservedHeights});ue(e);let S=O(e),b=W(S),P=0;for(let m=0;m<e.length;m++){let x=e[m],M=t[m];X(x)&&l.forcePageBreak();let I=S.get(m);if(I&&!b.has(m)){let v=Y(I,e,t),L=l.getCurrentState(),z=l.getAvailableHeight(),c=L.contentBottom-L.topMargin;v<=c&&v>z&&L.page.fragments.length>0&&l.forcePageBreak();}switch(x.kind){case "paragraph":le(x,M,l,l.getContentWidth());break;case "table":x.floating?de(x,M,l,l.getContentWidth()):me(x,M,l);break;case "image":he(x,M,l);break;case "textBox":ye(x,M,l);break;case "pageBreak":l.forcePageBreak();break;case "columnBreak":l.forceColumnBreak();break;case "sectionBreak":{let v=h[P+1]??h[P];Be(x,l,f[P+1]??y,v),P++;break}default:c(x,"runLayoutPipeline");}}return l.pages.length===0&&l.getCurrentState(),{pageSize:a,pages:l.pages,columns:n.columns,pageGap:n.pageGap}}function le(e,t,n,a){if(t.kind!=="paragraph")throw new Error("layoutParagraph: expected paragraph measure");let i=t.lines;if(i.length===0){let s=$(e),d=q(e),u=n.getCurrentState(),f={kind:"paragraph",blockId:e.id,x:n.getColumnX(u.columnIndex),y:u.cursorY+s,width:a,height:0,fromLine:0,toLine:0,pmStart:e.pmStart,pmEnd:e.pmEnd};n.addFragment(f,0,s,d);return}let r=$(e),o=q(e),g=0;for(;g<i.length;){let s=n.getCurrentState(),d=n.getAvailableHeight(),u=0,f=0;for(let P=g;P<i.length;P++){let m=i[P].lineHeight,x=u+m;if((g===0&&P===g?x+r:x)<=d||f===0)u=x,f++;else break}let B=g===0,h=g+f>=i.length,y=B?r:0,l=h?o:0,S={kind:"paragraph",blockId:e.id,x:n.getColumnX(s.columnIndex),y:0,width:a,height:u,fromLine:g,toLine:g+f,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!B,continuesOnNext:!h},b=n.addFragment(S,u,y,l);S.y=b.y,g+=f,g<i.length&&n.ensureFits(i[g].lineHeight);}}function pe(e){let t=0;for(let n of e.rows)if(n.isHeader)t++;else break;return t}function fe(e,t){let n=0;for(let a=0;a<t&&a<e.rows.length;a++)n+=e.rows[a].height;return n}function me(e,t,n){if(t.kind!=="table")throw new Error("layoutTable: expected table measure");let a=t.rows;if(a.length===0)return;let i=pe(e),r=fe(t,i),o=0;for(;o<a.length;){let g=n.getCurrentState(),s=n.getAvailableHeight(),d=o===0,u=d?g.trailingSpacing:0,f=s-u,B=!d&&i>0?r:0,h=0,y=0;for(let x=o;x<a.length;x++){let M=a[x].height;if(h+M+B<=f||y===0)h+=M,y++;else break}let l=h+B,S=o+y>=a.length,b=n.getColumnX(g.columnIndex);e.justification==="center"?b=b+(n.columnWidth-t.totalWidth)/2:e.justification==="right"?b=b+n.columnWidth-t.totalWidth:e.indent&&(b+=e.indent);let P={kind:"table",blockId:e.id,x:b,y:0,width:t.totalWidth,height:l,fromRow:o,toRow:o+y,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!d,continuesOnNext:!S,headerRowCount:!d&&i>0?i:void 0},m=n.addFragment(P,l,0,0);if(P.y=m.y,P.x=b,o+=y,o<a.length){let x=a[o].height+(i>0?r:0);n.ensureFits(x);}}}function de(e,t,n,a){if(t.kind!=="table")throw new Error("layoutFloatingTable: expected table measure");let i=n.getCurrentState(),r=e.floating,o=i.page,g=o.margins,s=t.totalWidth,d=t.totalHeight,u=o.size.h-g.top-g.bottom,f=g.left,B=g.top;r?.horzAnchor==="page"&&(f=0),r?.vertAnchor==="page"&&(B=0);let h=n.getColumnX(i.columnIndex);if(r?.tblpX!==void 0)h=f+r.tblpX;else if(r?.tblpXSpec){let m=r.tblpXSpec;m==="left"||m==="inside"?h=f:m==="right"||m==="outside"?h=f+a-s:m==="center"&&(h=f+(a-s)/2);}else e.justification==="center"?h=f+(a-s)/2:e.justification==="right"&&(h=f+a-s);let y=i.cursorY,l=false;if(r?.tblpY!==void 0)y=B+r.tblpY,l=true;else if(r?.tblpYSpec){l=true;let m=r.tblpYSpec;m==="top"?y=B:m==="bottom"?y=B+u-d:m==="center"&&(y=B+(u-d)/2);}l||(y=n.ensureFits(d).cursorY);let S=g.left,b=g.left+a-s;Number.isFinite(b)&&(h=Math.max(S,Math.min(h,b)));let P={kind:"table",blockId:e.id,x:h,y,width:s,height:d,fromRow:0,toRow:e.rows.length,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true};i.page.fragments.push(P);}function he(e,t,n){if(t.kind!=="image")throw new Error("layoutImage: expected image measure");if(e.anchor?.isAnchored){xe(e,t,n);return}let a=n.ensureFits(t.height),i={kind:"image",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function xe(e,t,n){let a=n.getCurrentState(),i=e.anchor,r=i.offsetH??n.getColumnX(a.columnIndex),o=i.offsetV??a.cursorY,g={kind:"image",blockId:e.id,x:r,y:o,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isAnchored:true,zIndex:i.behindDoc?-1:1};a.page.fragments.push(g);}function ye(e,t,n){if(t.kind!=="textBox")throw new Error("layoutTextBox: expected textBox measure");if(D(e)){let o=n.getCurrentState(),g={kind:"textBox",blockId:e.id,x:n.getColumnX(o.columnIndex),y:o.cursorY,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true,zIndex:e.wrapType==="behind"?-1:1};o.page.fragments.push(g);return}let a=n.ensureFits(t.height),i={kind:"textBox",blockId:e.id,x:n.getColumnX(a.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(i,t.height,0,0);i.y=r.y;}function Be(e,t,n,a){switch(a??"nextPage"){case "nextPage":t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak();break;case "evenPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2!==0&&t.forcePageBreak();break}case "oddPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2===0&&t.forcePageBreak();break}case "continuous":t.updatePageLayout(n.pageSize,n.margins,false);break}t.updateColumns(n.columns??V);}export{N as a,O as b,Y as c,W as d,Q as e,X as f,D as g,Me as h,ee as i,ne as j,ae as k,re as l,ie as m,oe as n,ge as o,se as p,Fe as q,fe as r};
|
package/dist/chunk-5TNMVXDS.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1,b}from'./chunk-7E5VBRDL.mjs';import {J as J$1}from'./chunk-3GNIP6IX.mjs';import {a,b as b$1,o}from'./chunk-67LVRQIR.mjs';import {i,j as j$1,k}from'./chunk-VW22RZ6C.mjs';function f(e){return e/1440*96}function x(e,i,r){if(!r||i<=r)return {width:e,height:i};let n=r/i;return {width:Math.round(e*n),height:r}}var E=0;function h(){return `block-${++E}`}function U(){E=0;}function B(e,i){let r={};for(let n of e)switch(n.type.name){case "bold":r.bold=true;break;case "italic":r.italic=true;break;case "underline":{let t=n.attrs;if(t.style||t.color){let a$1=t.color?a(t.color,i):void 0;r.underline={style:t.style,color:a$1};}else r.underline=true;break}case "strike":r.strike=true;break;case "textColor":{let t=n.attrs;(t.themeColor||t.rgb)&&(r.color=a({rgb:t.rgb,themeColor:t.themeColor,themeTint:t.themeTint,themeShade:t.themeShade},i));break}case "highlight":r.highlight=o(n.attrs.color);break;case "fontSize":{let t=n.attrs;r.fontSize=t.size/2;break}case "fontFamily":{let t=n.attrs;r.fontFamily=t.ascii||t.hAnsi;break}case "characterSpacing":{let t=n.attrs;t.spacing!=null&&t.spacing!==0&&(r.letterSpacing=f(t.spacing)),t.position!=null&&t.position!==0&&(r.positionPx=j$1(t.position)),t.scale!=null&&t.scale!==100&&(r.horizontalScale=t.scale),t.kerning!=null&&t.kerning>0&&(r.kerningMinPt=k(t.kerning));break}case "allCaps":r.allCaps=true;break;case "smallCaps":r.smallCaps=true;break;case "emboss":r.emboss=true;break;case "imprint":r.imprint=true;break;case "textShadow":r.textShadow=true;break;case "textOutline":r.textOutline=true;break;case "hidden":r.hidden=true;break;case "rtl":r.rtl=true;break;case "textEffect":{let t=n.attrs.effect;(t==="blinkBackground"||t==="lights"||t==="antsBlack"||t==="antsRed"||t==="shimmer"||t==="sparkle")&&(r.textEffect=t);break}case "emphasisMark":{let t=n.attrs.type;t==="dot"||t==="comma"||t==="circle"||t==="underDot"?r.emphasisMark=t:r.emphasisMark="dot";break}case "superscript":r.superscript=true;break;case "subscript":r.subscript=true;break;case "hyperlink":{let t=n.attrs;r.hyperlink={href:t.href,tooltip:t.tooltip};break}case "footnoteRef":{let t=n.attrs,a=typeof t.id=="string"?parseInt(t.id,10):t.id;t.noteType==="endnote"?r.endnoteRefId=a:r.footnoteRefId=a;break}case "comment":{let t=n.attrs.commentId;t&&(r.commentIds||(r.commentIds=[]),r.commentIds.push(t));break}case "insertion":r.isInsertion=true,r.changeAuthor=n.attrs.author,r.changeDate=n.attrs.date,r.changeRevisionId=n.attrs.revisionId;break;case "deletion":r.isDeletion=true,r.changeAuthor=n.attrs.author,r.changeDate=n.attrs.date,r.changeRevisionId=n.attrs.revisionId;break}return r}function $(e){let i=e.defaultTextFormatting;if(!i)return {};let r={};if(i.fontFamily){let n=i.fontFamily.ascii||i.fontFamily.hAnsi;n&&(r.fontFamily=n);}return i.fontSize!=null&&(r.fontSize=i.fontSize/2),r}function L(e){e.hyperlink&&(e.hyperlink={...e.hyperlink,noDefaultStyle:true},delete e.color,delete e.underline);}function N(e,i,r){let n=[],t=i+1,a=r.theme,s=$(e.attrs),c=e.attrs.styleId,m=typeof c=="string"&&/^TOC\d*$/i.test(c);function p(u,o){if(u.isText&&u.text){let l=B(u.marks,a);m&&L(l);let d={kind:"text",text:u.text,...s,...l,pmStart:o,pmEnd:o+u.nodeSize};n.push(d);}else if(u.type.name==="hardBreak")n.push({kind:"lineBreak",pmStart:o,pmEnd:o+u.nodeSize});else if(u.type.name==="tab"){let l=B(u.marks,a),d={kind:"tab",...s,...l,pmStart:o,pmEnd:o+u.nodeSize};n.push(d);}else if(u.type.name==="image"){let l=u.attrs,d=x(l.width||100,l.height||100,r.pageContentHeight),g={kind:"image",src:l.src,width:d.width,height:d.height,alt:l.alt,transform:l.transform,wrapType:l.wrapType,displayMode:l.displayMode,cssFloat:l.cssFloat,distTop:l.distTop,distBottom:l.distBottom,distLeft:l.distLeft,distRight:l.distRight,position:l.position,cropTop:l.cropTop,cropRight:l.cropRight,cropBottom:l.cropBottom,cropLeft:l.cropLeft,opacity:l.opacity,pmStart:o,pmEnd:o+u.nodeSize};n.push(g);}else if(u.type.name==="field"){let l=u.attrs.fieldType,d=l==="PAGE"?"PAGE":l==="NUMPAGES"?"NUMPAGES":l==="DATE"?"DATE":l==="TIME"?"TIME":"OTHER",g=B(u.marks,a);m&&L(g),n.push({kind:"field",fieldType:d,fallback:u.attrs.displayText||"",...s,...g,pmStart:o,pmEnd:o+u.nodeSize});}else if(u.type.name==="math"){let l=u.attrs.plainText||"[equation]";n.push({kind:"text",text:l,italic:true,fontFamily:"Cambria Math",pmStart:o,pmEnd:o+u.nodeSize});}else if(u.type.name==="sdt"){let l=o+1;u.forEach((d,g)=>{p(d,l+g);});}}return e.forEach((u,o)=>{p(u,t+o);}),n}function Y(e){return Math.max(1,Math.round(e/8*1.333))}var G={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 S(e,i$1){if(!e||!e.style||e.style==="none"||e.style==="nil")return;let r={style:G[e.style]||"solid",width:Y(e.size??0),color:e.color?a(e.color,i$1):"#000000"};return e.space!==void 0&&(r.space=i(e.space)),r}function O(e,i){let r=e.borders;if(!r)return;let n={},t=["top","bottom","left","right"];for(let a of t){let s=r[a],c=s?S(s,i):void 0;n[a]=c??{width:0,style:"none"};}return Object.keys(n).length>0?n:void 0}function j(e,i){let r=[];for(let n=0;n<=i;n+=1){let t=e[n]??0;if(t<=0)break;r.push(t);}return r.length===0?"1.":`${r.join(".")}.`}var V=[[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 D(e,i){if(e<=0)return "";let r=e,n="";for(let[t,a]of V)for(;r>=t;)n+=a,r-=t;return i?n:n.toLowerCase()}function H(e,i){if(e<=0)return "";let r=e,n="";for(;r>0;){let t=(r-1)%26;n=String.fromCharCode(65+t)+n,r=Math.floor((r-1)/26);}return i?n:n.toLowerCase()}function q(e,i){if(e<=0)return "";switch(i){case "upperRoman":return D(e,true);case "lowerRoman":return D(e,false);case "upperLetter":return H(e,true);case "lowerLetter":return H(e,false);case "decimalZero":return e<10?`0${e}`:String(e);case "none":return "";default:return String(e)}}function W(e,i,r){return e.replace(/%(\d)([.):\]])?/g,(n,t,a="")=>{let s=parseInt(t,10)-1;if(s<0)return "";let c=i[s]??0,m=r?.[s]??"decimal",p=q(c,m);return p?p+a:""})}function X(e,i,r){let n=e.numPr;if(!n)return null;let t=n.numId;if(t==null||t===0)return null;if(e.listIsBullet)return J$1(e.listMarker||"");let a=n.ilvl??0,s=e.listAbstractNumId??t,c=i.get(s)??new Array(9).fill(0),m=`${t}:${a}`;r.has(m)||(r.add(m),e.listStartOverride!=null&&(c[a]=e.listStartOverride-1)),c[a]=(c[a]??0)+1;for(let p=a+1;p<c.length;p+=1)c[p]=0;return i.set(s,c),e.listMarker&&e.listMarker.includes("%")?W(e.listMarker,c,e.listLevelNumFmts??void 0):e.listMarker?e.listMarker:j(c,a)}var K="Calibri",Z=11;function A(e,i,r,n){let t={};if(e.alignment){let o=e.alignment;o==="both"||o==="distribute"?t.alignment="justify":o==="left"?t.alignment="left":o==="center"?t.alignment="center":o==="right"&&(t.alignment="right");}(e.spaceBefore!=null||e.spaceAfter!=null||e.lineSpacing!=null)&&(t.spacing={},e.spaceBefore!=null&&(t.spacing.before=f(e.spaceBefore)),e.spaceAfter!=null&&(t.spacing.after=f(e.spaceAfter)),e.lineSpacing!=null&&(e.lineSpacingRule==="exact"||e.lineSpacingRule==="atLeast"?(t.spacing.line=f(e.lineSpacing),t.spacing.lineUnit="px",t.spacing.lineRule=e.lineSpacingRule):(t.spacing.line=e.lineSpacing/240,t.spacing.lineUnit="multiplier",t.spacing.lineRule="auto"))),e.spacingExplicit&&(t.spacingExplicit=e.spacingExplicit);let a=e.indentLeft,s=e.indentFirstLine,c=e.hangingIndent;if(e.numPr?.numId&&a==null&&(a=((e.numPr.ilvl??0)+1)*720,s==null&&(s=-360,c=true)),(a!=null||e.indentRight!=null||s!=null)&&(t.indent={},a!=null&&(t.indent.left=f(a)),e.indentRight!=null&&(t.indent.right=f(e.indentRight)),s!=null&&(c?t.indent.hanging=Math.abs(f(s)):t.indent.firstLine=f(s))),e.styleId&&(t.styleId=e.styleId),e.borders){let o=e.borders;t.borders={};let l=d=>d?S(d,i):void 0;o.top&&(t.borders.top=l(o.top)),o.bottom&&(t.borders.bottom=l(o.bottom)),o.left&&(t.borders.left=l(o.left)),o.right&&(t.borders.right=l(o.right)),o.between&&(t.borders.between=l(o.between)),o.bar&&(t.borders.bar=l(o.bar)),!t.borders.top&&!t.borders.bottom&&!t.borders.left&&!t.borders.right&&!t.borders.between&&!t.borders.bar&&delete t.borders;}let m=b$1(e.shading?.fill,i);m&&(t.shading=`#${m}`),e.tabs&&e.tabs.length>0&&(t.tabs=e.tabs.map(o=>({val:J(o.alignment),pos:o.position,leader:o.leader}))),e.pageBreakBefore&&(t.pageBreakBefore=true),e.keepNext&&(t.keepNext=true),e.keepLines&&(t.keepLines=true),e.contextualSpacing&&(t.contextualSpacing=true),e.bidi&&(t.bidi=true),e.styleId&&(t.styleId=e.styleId),e.numPr&&(t.numPr={numId:e.numPr.numId,ilvl:e.numPr.ilvl});let p=r&&n?X(e,r,n):null;p!=null?t.listMarker=p:e.listMarker&&(t.listMarker=e.listMarker),e.listIsBullet!=null&&(t.listIsBullet=e.listIsBullet),e.listMarkerHidden&&(t.listMarkerHidden=true),e.listMarkerFontFamily&&(t.listMarkerFontFamily=e.listMarkerFontFamily),e.listMarkerFontSize&&(t.listMarkerFontSize=e.listMarkerFontSize);let u=e.defaultTextFormatting;return u&&(u.fontSize!=null&&(t.defaultFontSize=u.fontSize/2),u.fontFamily&&(t.defaultFontFamily=u.fontFamily.ascii||u.fontFamily.hAnsi)),t}function J(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 F(e,i,r){let n=e.attrs,t=N(e,i,r),a=A(n,r.theme,r.listCounters,r.listSeenNumIds);return {kind:"paragraph",id:h(),runs:t,attrs:a,pmStart:i,pmEnd:i+e.nodeSize}}function Q(e,i,r,n){let t=[],a=i+1;e.forEach(d=>{d.type.name==="paragraph"?t.push(F(d,a,r)):d.type.name==="table"&&t.push(_(d,a,r)),a+=d.nodeSize;});let s=e.attrs,c=s.width,m=s.widthType,p=c&&(!m||m==="dxa"||m==="auto")?f(c):void 0,u=s.margins,o=(d,g)=>{if(d!=null){let b=f(d);if(b>0)return b}if(g!=null){let b=f(g);if(b>=0)return b}return 0},l={top:o(u?.top,n?.top),right:o(u?.right,n?.right),bottom:o(u?.bottom,n?.bottom),left:o(u?.left,n?.left)};return {id:h(),blocks:t,colSpan:s.colspan,rowSpan:s.rowspan,width:p,widthValue:c,widthType:m,verticalAlign:s.verticalAlign,background:s.backgroundColor?`#${s.backgroundColor}`:void 0,borders:O(s,r.theme),padding:l,noWrap:s.noWrap||void 0}}function ee(e,i,r,n){let t=[],a=i+1;e.forEach(c=>{(c.type.name==="tableCell"||c.type.name==="tableHeader")&&t.push(Q(c,a,r,n)),a+=c.nodeSize;});let s=e.attrs;return {id:h(),cells:t,height:s.height?f(s.height):void 0,heightRule:s.heightRule??void 0,isHeader:s.isHeader}}function _(e,i,r){let n=[],t=i+1,a=e.attrs.cellMargins;e.forEach(b=>{b.type.name==="tableRow"&&n.push(ee(b,t,r,a)),t+=b.nodeSize;});let c=e.attrs.columnWidths?.map(f),m=e.attrs.width,p=e.attrs.widthType;if(!c&&n.length>0){let w=n[0].cells.map(T=>T.width);w.every(T=>T!==void 0&&T>0)&&(c=w);}let u=e.attrs.justification,o=e.attrs._originalFormatting,l=o?.indent?.value&&o.indent.type==="dxa"?f(o.indent.value):void 0,d=e.attrs.floating,g=d?{horzAnchor:d.horzAnchor,vertAnchor:d.vertAnchor,tblpX:d.tblpX!==void 0?f(d.tblpX):void 0,tblpXSpec:d.tblpXSpec,tblpY:d.tblpY!==void 0?f(d.tblpY):void 0,tblpYSpec:d.tblpYSpec,topFromText:d.topFromText!==void 0?f(d.topFromText):void 0,bottomFromText:d.bottomFromText!==void 0?f(d.bottomFromText):void 0,leftFromText:d.leftFromText!==void 0?f(d.leftFromText):void 0,rightFromText:d.rightFromText!==void 0?f(d.rightFromText):void 0}:void 0;return {kind:"table",id:h(),rows:n,columnWidths:c,width:m,widthType:p,justification:u,indent:l,floating:g,pmStart:i,pmEnd:i+e.nodeSize}}function te(e,i,r){let n=e.attrs,t=n.wrapType,a=t==="behind"||t==="inFront",s=x(n.width||100,n.height||100,r);return {kind:"image",id:h(),src:n.src,width:s.width,height:s.height,alt:n.alt,transform:n.transform,anchor:a?{isAnchored:true,offsetH:n.distLeft,offsetV:n.distTop,behindDoc:t==="behind"}:void 0,hlinkHref:n.hlinkHref,pmStart:i,pmEnd:i+e.nodeSize}}function ne(e,i,r){let n=e.attrs,t=[];return e.forEach((a,s)=>{if(a.type.name==="paragraph"){let c=F(a,i+1+s,r);t.push(c);}}),{kind:"textBox",id:h(),width:n.width??b,height:n.height??void 0,fillColor:n.fillColor,outlineWidth:n.outlineWidth,outlineColor:n.outlineColor,outlineStyle:n.outlineStyle,margins:{top:n.marginTop??a$1.top,bottom:n.marginBottom??a$1.bottom,left:n.marginLeft??a$1.left,right:n.marginRight??a$1.right},content:t,displayMode:n.displayMode,cssFloat:n.cssFloat,wrapType:n.wrapType,wrapText:n.wrapText,anchorTarget:n.anchorTarget,position:n.position,distTop:n.distTop,distBottom:n.distBottom,distLeft:n.distLeft,distRight:n.distRight,pmStart:i,pmEnd:i+e.nodeSize}}function ye(e,i={}){let r={...i,defaultFont:i.defaultFont??K,defaultSize:i.defaultSize??Z},n=[],t=0,a={top:1440,bottom:1440,left:1440,right:1440};return r.listCounters||(r.listCounters=new Map),r.listSeenNumIds||(r.listSeenNumIds=new Set),e.forEach((s,c)=>{let m=t+c;switch(s.type.name){case "paragraph":{let p=F(s,m,r),u=s.attrs;n.push(p);let o=u._sectionProperties;if(o||u.sectionBreakType){let l={kind:"sectionBreak",id:h(),type:o?.sectionStart??u.sectionBreakType};if(o){if((o.pageWidth!==void 0||o.pageHeight!==void 0)&&(l.pageSize={w:f(o.pageWidth??12240),h:f(o.pageHeight??15840)}),o.marginTop!==void 0||o.marginBottom!==void 0||o.marginLeft!==void 0||o.marginRight!==void 0){let g={top:o.marginTop??a.top,bottom:o.marginBottom??a.bottom,left:o.marginLeft??a.left,right:o.marginRight??a.right};l.margins={top:f(g.top),bottom:f(g.bottom),left:f(g.left),right:f(g.right)},a=g;}let d=o.columnCount??1;if(d>1){let g={count:d,gap:f(o.columnSpace??720),equalWidth:o.equalWidth??true,separator:o.separator};l.columns=g;}}n.push(l);}}break;case "table":n.push(_(s,m,r));break;case "image":n.push(te(s,m,r.pageContentHeight));break;case "textBox":n.push(ne(s,m,r));break;case "horizontalRule":case "pageBreak":{let p={kind:"pageBreak",id:h(),pmStart:m,pmEnd:m+s.nodeSize};n.push(p);break}}}),n}export{U as a,S as b,W as c,ye as d};
|
package/dist/chunk-6LOYA7G5.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {xml2js,js2xml}from'xml-js';function x(e){return xml2js(e,{compact:false,ignoreComment:true,ignoreInstruction:true,ignoreDoctype:true,alwaysArray:false,trim:false,captureSpacesBetweenElements:true,attributesKey:"attributes",textKey:"text"})}function X(e){return js2xml({elements:[e]},{compact:false,spaces:0})}function p(e){try{let t=x(e);return t.elements&&t.elements.length>0?t.elements.find(n=>n.type==="element")??null:t}catch(t){return console.warn("Failed to parse XML:",t),null}}function m(e){let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function E(e,t,n){if(!e.name)return false;let r=`${t}:${n}`;return e.name===r||m(e.name)===n}function D(e,t,n){if(!e||!e.elements)return null;let r=`${t}:${n}`;for(let o of e.elements)if(o.type==="element"&&(o.name===r||m(o.name||"")===n))return o;return null}function M(e,t,n){if(!e||!e.elements)return [];let r=`${t}:${n}`,o=[];for(let s of e.elements)s.type==="element"&&(s.name===r||m(s.name||"")===n)&&o.push(s);return o}function T(e,t){return !e||!e.elements?[]:e.elements.filter(n=>n.type==="element"&&m(n.name||"")===t)}function v(e,t){if(!e||!e.elements)return null;for(let n of e.elements)if(n.type==="element"&&n.name===t)return n;return null}function h(e){return !e||!e.elements?[]:e.elements.filter(t=>t.type==="element")}function i(e,t,n){if(!e||!e.attributes)return null;let r=e.attributes;if(t){let o=`${t}:${n}`;if(o in r)return r[o]}return n in r?r[n]:null}function y(e){if(!e)return "";if("text"in e&&typeof e.text=="string")return e.text;if(!e.elements)return "";let t="";for(let n of e.elements)n.type==="text"&&"text"in n?t+=n.text??"":n.type==="element"&&(t+=y(n));return t}function C(e,t,n,r=1){let o=i(e,t,n);if(o===null)return;let s=parseInt(o,10);if(!isNaN(s))return s*r}function I(e,t="w"){if(!e)return false;let n=i(e,t,"val");return n===null?true:!(n==="0"||n==="false"||n==="off")}function R(e,t,n){if(!e)return null;if(E(e,t,n))return e;if(e.elements)for(let r of e.elements){if(r.type!=="element")continue;let o=R(r,t,n);if(o)return o}return null}var b={image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",footnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",endnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",webSettings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",oleObject:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",diagramData:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",coreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",extendedProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",customProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",customXml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",commentsIds:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",commentsExtensible:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"};function k(e){let t=new Map;if(!e||e.trim().length===0)return t;let n=p(e);if(!n)return console.warn("Failed to parse relationships XML"),t;let r=h(n);for(let o of r){let s=o.name||"";if(!s.endsWith("Relationship")&&!s.includes(":Relationship"))continue;let l=i(o,null,"Id"),a=i(o,null,"Type"),f=i(o,null,"Target"),c=i(o,null,"TargetMode");if(!l||!a||!f){console.warn("Relationship missing required attributes:",{id:l,type:a,target:f});continue}let u={id:l,type:a,target:f};c==="External"?u.targetMode="External":c==="Internal"&&(u.targetMode="Internal"),t.set(l,u);}return t}function $(e){return e.type===b.hyperlink&&e.targetMode==="External"}function A(e,t){return e.get(t)?.target}
|
|
2
|
-
export{x as a,X as b,p as c,m as d,D as e,M as f,T as g,v as h,h as i,i as j,y as k,C as l,I as m,R as n,b as o,k as p,$ as q,A as r};
|
package/dist/chunk-7VCMJCBY.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var xmlJs=require('xml-js');function x(e){return xmlJs.xml2js(e,{compact:false,ignoreComment:true,ignoreInstruction:true,ignoreDoctype:true,alwaysArray:false,trim:false,captureSpacesBetweenElements:true,attributesKey:"attributes",textKey:"text"})}function X(e){return xmlJs.js2xml({elements:[e]},{compact:false,spaces:0})}function p(e){try{let t=x(e);return t.elements&&t.elements.length>0?t.elements.find(n=>n.type==="element")??null:t}catch(t){return console.warn("Failed to parse XML:",t),null}}function m(e){let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function E(e,t,n){if(!e.name)return false;let r=`${t}:${n}`;return e.name===r||m(e.name)===n}function D(e,t,n){if(!e||!e.elements)return null;let r=`${t}:${n}`;for(let o of e.elements)if(o.type==="element"&&(o.name===r||m(o.name||"")===n))return o;return null}function M(e,t,n){if(!e||!e.elements)return [];let r=`${t}:${n}`,o=[];for(let s of e.elements)s.type==="element"&&(s.name===r||m(s.name||"")===n)&&o.push(s);return o}function T(e,t){return !e||!e.elements?[]:e.elements.filter(n=>n.type==="element"&&m(n.name||"")===t)}function v(e,t){if(!e||!e.elements)return null;for(let n of e.elements)if(n.type==="element"&&n.name===t)return n;return null}function h(e){return !e||!e.elements?[]:e.elements.filter(t=>t.type==="element")}function i(e,t,n){if(!e||!e.attributes)return null;let r=e.attributes;if(t){let o=`${t}:${n}`;if(o in r)return r[o]}return n in r?r[n]:null}function y(e){if(!e)return "";if("text"in e&&typeof e.text=="string")return e.text;if(!e.elements)return "";let t="";for(let n of e.elements)n.type==="text"&&"text"in n?t+=n.text??"":n.type==="element"&&(t+=y(n));return t}function C(e,t,n,r=1){let o=i(e,t,n);if(o===null)return;let s=parseInt(o,10);if(!isNaN(s))return s*r}function I(e,t="w"){if(!e)return false;let n=i(e,t,"val");return n===null?true:!(n==="0"||n==="false"||n==="off")}function R(e,t,n){if(!e)return null;if(E(e,t,n))return e;if(e.elements)for(let r of e.elements){if(r.type!=="element")continue;let o=R(r,t,n);if(o)return o}return null}var b={image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",footnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",endnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",webSettings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",oleObject:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",diagramData:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",coreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",extendedProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",customProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",customXml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",commentsIds:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",commentsExtensible:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"};function k(e){let t=new Map;if(!e||e.trim().length===0)return t;let n=p(e);if(!n)return console.warn("Failed to parse relationships XML"),t;let r=h(n);for(let o of r){let s=o.name||"";if(!s.endsWith("Relationship")&&!s.includes(":Relationship"))continue;let l=i(o,null,"Id"),a=i(o,null,"Type"),f=i(o,null,"Target"),c=i(o,null,"TargetMode");if(!l||!a||!f){console.warn("Relationship missing required attributes:",{id:l,type:a,target:f});continue}let u={id:l,type:a,target:f};c==="External"?u.targetMode="External":c==="Internal"&&(u.targetMode="Internal"),t.set(l,u);}return t}function $(e){return e.type===b.hyperlink&&e.targetMode==="External"}function A(e,t){return e.get(t)?.target}
|
|
2
|
-
exports.a=x;exports.b=X;exports.c=p;exports.d=m;exports.e=D;exports.f=M;exports.g=T;exports.h=v;exports.i=h;exports.j=i;exports.k=y;exports.l=C;exports.m=I;exports.n=R;exports.o=b;exports.p=k;exports.q=$;exports.r=A;
|
package/dist/chunk-BKHQA6JJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js');var Xt=1440,q=96,ft=Xt/q,ht=11,gt="Calibri",Yt=1,jt=.8,Gt=.2,z=null;function $(){if(!z){let t=typeof document<"u"?document.createElement("canvas"):null;if(!t)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(z=t.getContext("2d"),!z)throw new Error("Failed to get 2D context from canvas")}return z}function Kt(){z=null;}var ct=new Map;function mt(t){let e=ct.get(t);if(e===void 0){let i=chunkN3Y5BUKV_js.a(t);e={cssFallback:i.cssFallback,singleLineRatio:i.singleLineRatio},ct.set(t,e);}return e}function Vt(t){return mt(t).cssFallback}function D(t){let e=[];t.italic&&e.push("italic"),t.bold&&e.push("bold");let i=t.fontSize??ht,n=W(i);e.push(`${n}px`);let r=t.fontFamily??gt;return e.push(Vt(r)),e.join(" ")}function A(t){let e=t.fontSize??ht,i=t.fontFamily??gt,n=W(e),r=n*jt,o=n*Gt,u=n*Yt;try{let g=$();g.font=D(t);let c=g.measureText("Hg");typeof c.actualBoundingBoxAscent=="number"&&typeof c.actualBoundingBoxDescent=="number"&&(r=c.actualBoundingBoxAscent,o=c.actualBoundingBoxDescent);}catch{}u=Math.max(u,r+o);let f=mt(i).singleLineRatio;return {fontSize:e,ascent:r,descent:o,lineHeight:u,fontFamily:i,singleLineRatio:f}}function S(t,e){if(!t)return 0;let i=$();i.font=D(e);let r=i.measureText(t).width;return e.letterSpacing&&t.length>1&&(r+=e.letterSpacing*(t.length-1)),r}function qt(t,e){let i=S(t,e),n=A(e);return {width:i,height:n.ascent+n.descent,ascent:n.ascent,descent:n.descent}}function J(t,e){let i=A(e);if(!t)return {width:0,charWidths:[],metrics:i};let n=$();n.font=D(e);let r=e.letterSpacing??0,o=[],u=0;for(let f=0;f<t.length;f++){let g=t[f],b=n.measureText(g).width;r&&f<t.length-1&&(b+=r),o.push(b),u+=b;}return {width:u,charWidths:o,metrics:i}}function Jt(t,e){if(e.length===0||t<=0)return 0;let i=0;for(let n=0;n<e.length;n++){let r=e[n],o=i+r/2;if(t<=o)return n;i+=r;}return e.length}function Qt(t,e){if(t<=0||e.length===0)return 0;let i=Math.min(t,e.length),n=0;for(let r=0;r<i;r++)n+=e[r];return n}function te(t){return t/ft}function ee(t){return Math.round(t*ft)}function W(t){return t*q/72}function dt(t){return t*72/q}function ne(t){return W(t/2)}function ie(t){return dt(t)*2}function re(t,e){return t.map(i=>{let n=i.x-i.distLeft,r=i.x+i.width+i.distRight,o=i.y-i.distTop,u=i.y+i.height+i.distBottom,f=0,g=0,c,b=i.wrapText??"bothSides";b==="right"?f=Q(r):b==="left"?g=tt(n,e):b==="largest"?{leftMargin:f,rightMargin:g}=le(n,r,e):oe(n,r,e)?c=se(n,r,e):i.side==="left"?f=Q(r):g=tt(n,e);let p=nt(f,g,e);return {leftMargin:p.leftMargin,rightMargin:p.rightMargin,topY:o,bottomY:u,segments:c}})}function et(t,e){return t.segments?.reduce((n,r)=>n+r.availableWidth,0)??e-t.leftMargin-t.rightMargin}function N(t,e,i,n){if(!i||i.length===0)return {leftMargin:0,rightMargin:0};let r=0,o=0,u,f=n+t,g=f+e;for(let c of i)if(!(g<=c.topY||f>=c.bottomY)){if(c.segments?.length){u=u?ae(u,c.segments):c.segments;continue}r=Math.max(r,c.leftMargin),o=Math.max(o,c.rightMargin);}return {leftMargin:r,rightMargin:o,segments:u}}function ae(t,e){let i=[];for(let n of t)for(let r of e){let o=Math.max(n.leftOffset,r.leftOffset),u=Math.min(n.leftOffset+n.availableWidth,r.leftOffset+r.availableWidth);u>o&&i.push({leftOffset:o,availableWidth:u-o});}return i}function oe(t,e,i){return t>0&&e<i}function se(t,e,i){return [{leftOffset:0,availableWidth:Math.max(0,t)},{leftOffset:Math.max(0,e),availableWidth:Math.max(0,i-e)}].filter(n=>n.availableWidth>1)}function le(t,e,i){let n=Math.max(0,t);return Math.max(0,i-e)>=n?{leftMargin:Q(e),rightMargin:0}:{leftMargin:0,rightMargin:tt(t,i)}}function Q(t){return Math.max(0,t)}function tt(t,e){return Math.max(0,e-t)}function it(t){return t/1440*96}function rt(t){return t/96*1440}function ue(t){let{explicitStops:e=[],defaultTabInterval:i=720,leftIndent:n=0}=t,r=e.filter(p=>p.val!=="clear").filter(p=>p.pos>=n),o=e.filter(p=>p.val==="clear").map(p=>p.pos),u=r.reduce((p,R)=>Math.max(p,R.pos),0),f=[...r];n>0&&!r.some(p=>p.pos<=n)&&(o.some(R=>Math.abs(R-n)<20)||f.push({val:"start",pos:n,leader:"none"}));let c=u>0?Math.max(u,n):n,b=n+14400;for(;c<b;){c+=i;let p=r.some(H=>Math.abs(H.pos-c)<20),R=o.some(H=>Math.abs(H-c)<20),Y=n>0&&Math.abs(c-n)<20;!p&&!R&&!Y&&f.push({val:"start",pos:c,leader:"none"});}return f.sort((p,R)=>p.pos-R.pos)}function pt(t,e,i={}){let{defaultTabInterval:n=720}=e,r=rt(t),u=ue(e).find(c=>c.pos>r);if(!u){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}let g=it(u.pos)-t;if(u.val==="center")g-=(i.followingWidth??0)/2;else if(u.val==="end")g-=i.followingWidth??0;else if(u.val==="decimal")g-=i.decimalPrefixWidth??0;else if(u.val==="bar")return {width:0,leader:u.leader,alignment:"bar"};if(g<1){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}return {width:g,leader:u.leader,alignment:u.val}}var y=11,O="Calibri",ce=1.15,X=1,k=.5;function bt(t,e,i,n=false){let r=1,o=t.length,u=0;for(;r<=o;){let f=r+o>>>1;S(t.slice(0,f),e)<=i?(u=f,r=f+1):o=f-1;}return n&&u===0?1:u}function Z(t){return {fontFamily:t.fontFamily??O,fontSize:t.fontSize??y,bold:t.bold,italic:t.italic,letterSpacing:t.letterSpacing}}function Ft(t,e,i){let n=W(t),r=i?.ascent??n*.8,o=i?.descent??n*.2,u=i?.singleLineRatio??1.15,f=n*u,g;if(e?.lineRule==="exact"&&e.line!==void 0)g=e.line;else if(e?.lineRule==="atLeast"&&e.line!==void 0){let c=f*X;g=Math.max(e.line,c);}else e?.line!==void 0&&e?.lineUnit==="multiplier"?g=f*e.line:e?.line!==void 0&&e?.lineUnit==="px"?g=e.line:g=f*X;return {ascent:r,descent:o,lineHeight:g}}function xt(t,e,i){let n=A({fontSize:t,fontFamily:i??O}),r=Ft(t,e,n),o=e?.lineRule??"auto";if(o==="auto"||o==="atLeast"){let u=W(t),f=Math.max(r.lineHeight,u*ce);if(f!==r.lineHeight)return {...r,lineHeight:f}}return r}function U(t){return t.kind==="text"}function Tt(t){return t.kind==="tab"}function Mt(t){return t.kind==="image"}function Ct(t){return t.kind==="lineBreak"}function St(t){return t.kind==="field"}function fe(t){return !t.text||t.text.replace(/\u00a0/g," ").trim().length===0}function he(t,e){let i=0;for(let n=e+1;n<t.length;n++){let r=t[n];if(Tt(r)||Ct(r))break;if(U(r))i+=S(r.text||"",Z(r));else if(St(r)){let o={fontFamily:r.fontFamily??O,fontSize:r.fontSize??y,bold:r.bold,italic:r.italic};i+=S(r.fallback||"1",o);}else Mt(r)&&(i+=r.width||0);}return i}function ge(t){let e=[];for(let i=0;i<t.length;i++){let n=t[i];(n===" "||n==="-"||n===" ")&&e.push(i+1);}return e}function nt(t,e,i){let n=Math.max(1,i),r=Math.max(0,t),o=Math.max(0,e);return r>=n||o>=n||r+o>=n?{leftMargin:0,rightMargin:0}:{leftMargin:r,rightMargin:o}}function Rt(t,e,i){let n=t.runs,r=t.attrs,o=r?.spacing,u=i?.floatingZones,f=i?.paragraphYOffset??0,g=r?.indent,c=g?.left??0,b=g?.right??0,p=(g?.firstLine??0)-(g?.hanging??0),R=Math.max(1,e-c-b),Y=Math.max(1,R-p),H=0,Zt=W(y)*X,B=N(0,Zt,u,f),Bt=Math.max(1,et(B,Y)),C=[];if(n.length===0){if(r?.suppressEmptyParagraphHeight)return C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:C,totalHeight:0};let s=r?.defaultFontSize??y,l=r?.defaultFontFamily??O,m=xt(s,o,l);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...m});let h=m.lineHeight;return o?.before&&(h+=o.before),o?.after&&(h+=o.after),{kind:"paragraph",lines:C,totalHeight:h}}if(n.length===1&&U(n[0])&&fe(n[0])){let s=n[0],l=s.fontSize??r?.defaultFontSize??y,m=s.fontFamily??r?.defaultFontFamily??O,h=xt(l,o,m);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...h});let d=h.lineHeight;return o?.before&&(d+=o.before),o?.after&&(d+=o.after),{kind:"paragraph",lines:C,totalHeight:d}}let a={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:Bt,leftOffset:B.leftMargin,rightOffset:B.rightMargin,segmentZones:B.segments},ot=()=>{let s=Ft(a.maxFontSize,o,a.maxFontMetrics),l={...s};if(a.maxImageHeightPx>l.lineHeight){let h=a.maxImageHeightPx,d=l.descent;l.lineHeight=h+d*2,l.ascent=h+d;}let m={fromRun:a.fromRun,fromChar:a.fromChar,toRun:a.toRun,toChar:a.toChar,width:a.width,...l};a.leftOffset>0&&(m.leftOffset=a.leftOffset),a.rightOffset>0&&(m.rightOffset=a.rightOffset),a.segmentZones?.length&&(m.segments=$t(m,a.segmentZones)),C.push(m),H+=s.lineHeight;},$t=(s,l)=>{let m=l[0],h=l[1];if(!m)return;if(!h||s.width<=m.availableWidth+k)return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:s.toChar,width:s.width,leftOffset:m.leftOffset,availableWidth:m.availableWidth}];if(s.fromRun!==s.toRun)return;let d=n[s.fromRun];if(!d||!U(d))return;let P=d,x=P.text.slice(s.fromChar,s.toChar),T=Z(P),F=bt(x,T,m.availableWidth);if(F<=0||F>=x.length)return;let w=s.fromChar+F,M=x.slice(0,F),G=x.slice(F);return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:w,width:S(M,T),leftOffset:m.leftOffset,availableWidth:m.availableWidth},{fromRun:s.fromRun,fromChar:w,toRun:s.toRun,toChar:s.toChar,width:S(G,T),leftOffset:h.leftOffset,availableWidth:h.availableWidth}]},L=(s,l)=>{ot();let m=W(y)*X,h=N(H,m,u,f),d=Math.max(1,et(h,R));a={fromRun:s,fromChar:l,toRun:s,toChar:l,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:d,leftOffset:h.leftMargin,rightOffset:h.rightMargin,segmentZones:h.segments};},_=s=>{let l=s.fontSize??y;(!a.maxFontMetrics||l>a.maxFontSize)&&(a.maxFontSize=l,a.maxFontMetrics=A(s));};for(let s=0;s<n.length;s++){let l=n[s];if(Ct(l)){a.toRun=s,a.toChar=0,L(s+1,0);continue}if(Tt(l)){let m=Z(l);_(m);let h=he(n,s),d=a.width+(a.leftOffset??0),P=C.length===0,x=c+(P?p:0)+d,T={explicitStops:r?.tabs,leftIndent:rt(c)},F=pt(x,T,{followingWidth:h}).width;if(d+F>a.availableWidth+k){let w=a.availableWidth-d-h;w>1&&(F=w);}a.width+F>a.availableWidth+k&&(L(s,0),_(m)),a.width+=F,a.toRun=s,a.toChar=1;continue}if(Mt(l)){let m=l.wrapType,h=l.displayMode==="float"||chunkJFZIXFRC_js.c(m);if(l.position&&h){a.toRun=s,a.toChar=1;continue}if(m==="topAndBottom"||l.displayMode==="block"){a.width>0&&L(s,0);let x=l.height,T=l.distTop??6,F=l.distBottom??6;a.toRun=s,a.toChar=1,a.maxImageHeightPx=x+T+F,L(s+1,0);continue}let d=l.width,P=l.height;P>a.maxImageHeightPx&&(a.maxImageHeightPx=P),a.width+d>a.availableWidth+k&&L(s,0),a.width+=d,a.toRun=s,a.toChar=1;continue}if(St(l)){let m=l.fallback||"1",h={fontFamily:l.fontFamily??O,fontSize:l.fontSize??y,bold:l.bold,italic:l.italic};_(h);let d=S(m,h);a.width>0&&a.width+d>a.availableWidth+k&&(L(s,0),_(h)),a.width+=d,a.toRun=s,a.toChar=1;continue}if(U(l)){let m=l,h=m.text,d=Z(m);if(_(d),!h||h.length===0){a.toRun=s,a.toChar=0;continue}let P=ge(h),x=0;for(;x<h.length;){let T=h.length;for(let M of P)if(M>x){T=M;break}let F=h.slice(x,T),w=S(F,d);if(w>a.availableWidth+k){let M=0;for(;M<F.length;){let G=a.availableWidth-a.width+k,Dt=F.slice(M),K=bt(Dt,d,G);if(K===0){if(a.width>0){L(s,x+M),_(d);continue}K=1;}let V=M+K,Nt=F.slice(M,V),Ut=S(Nt,d);a.width+=Ut,a.toRun=s,a.toChar=x+V,M=V,M<F.length&&(L(s,x+M),_(d));}x=T;continue}a.width>0&&a.width+w>a.availableWidth+k&&(L(s,x),_(d)),a.width+=w,a.toRun=s,a.toChar=T,x=T;}}}ot();let st=C.reduce((s,l)=>s+l.lineHeight,0);r?.listMarker&&!r?.listMarkerHidden&&(g?.hanging??0)===0&&C.length>0&&(st+=C[0].lineHeight);let j=st;return o?.before&&(j+=o.before),o?.after&&(j+=o.after),{kind:"paragraph",lines:C,totalHeight:j}}function me(t,e){return t.map(i=>Rt(i,e))}function de(t){let e=Z(t);return J(t.text,e).charWidths}var yt=2e4,v=new Map;function Lt(t,e,i){return `${t}|${e}|${i||0}`}function Pt(){for(;v.size>yt;){let t=v.keys().next().value;if(t===void 0)break;v.delete(t);}}function pe(t,e,i=0){let n=Lt(t,e,i),r=v.get(n);if(r!==void 0)return v.delete(n),v.set(n,r),r.width}function be(t,e,i,n){let r=Lt(t,e,i);v.set(r,{width:n}),Pt();}function wt(){v.clear();}function xe(t){!Number.isFinite(t)||t<=0||(yt=t,Pt());}function Wt(){return v.size}var Fe=1e3,vt=Fe,E=new Map;function Et(t,e,i=false,n=false){return `${t}|${e}|${i}|${n}`}function It(){for(;E.size>vt;){let t=E.keys().next().value;if(t===void 0)break;E.delete(t);}}function Te(t,e,i=false,n=false){let r=Et(t,e,i,n),o=E.get(r);if(o!==void 0)return E.delete(r),E.set(r,o),o}function Me(t,e,i,n,r){let o=Et(t,e,i,n);E.set(o,r),It();}function _t(){E.clear();}function Ce(t){!Number.isFinite(t)||t<=0||(vt=t,It());}function kt(){return E.size}var Se=5e3,Ht=Se,I=new Map;function at(t){let e=[];for(let n of t.runs)n.kind==="text"?e.push(`t:${n.text}|${n.fontFamily}|${n.fontSize}|${n.bold}|${n.italic}`):n.kind==="tab"?e.push(`tab:${n.width}`):n.kind==="image"?e.push(`img:${n.width}x${n.height}`):n.kind==="lineBreak"&&e.push("br");let i=t.attrs;if(i){i.alignment&&e.push(`align:${i.alignment}`),i.indent&&e.push(`indent:${i.indent.left}|${i.indent.right}|${i.indent.firstLine}|${i.indent.hanging}`),i.spacing&&e.push(`spacing:${i.spacing.before}|${i.spacing.after}|${i.spacing.line}|${i.spacing.lineRule}`),i.defaultFontSize!=null&&e.push(`dfs:${i.defaultFontSize}`),i.defaultFontFamily!=null&&e.push(`dff:${i.defaultFontFamily}`);let n=i.borders;if(n){let r=o=>o?`${o.width??""},${o.style??""},${o.color??""}`:"";e.push(`bdr:${r(n.top)}|${r(n.bottom)}|${r(n.left)}|${r(n.right)}`);}i.suppressEmptyParagraphHeight&&e.push("sup");}return e.join("||")}function At(){for(;I.size>Ht;){let t=I.keys().next().value;if(t===void 0)break;I.delete(t);}}function Re(t,e){let i=at(t),n=I.get(i);if(n!==void 0&&n.maxWidth===e)return I.delete(i),I.set(i,n),n.measure}function ye(t,e,i){let n=at(t);I.set(n,{measure:i,maxWidth:e}),At();}function Ot(){I.clear();}function Le(t){!Number.isFinite(t)||t<=0||(Ht=t,At());}function zt(){return I.size}function Pe(){wt(),_t(),Ot();}function we(){return Wt()+kt()+zt()}exports.A=Wt;exports.B=Te;exports.C=Me;exports.D=_t;exports.E=Ce;exports.F=kt;exports.G=at;exports.H=Re;exports.I=ye;exports.J=Ot;exports.K=Le;exports.L=zt;exports.M=Pe;exports.N=we;exports.a=$;exports.b=Kt;exports.c=D;exports.d=A;exports.e=S;exports.f=qt;exports.g=J;exports.h=Jt;exports.i=Qt;exports.j=te;exports.k=ee;exports.l=W;exports.m=dt;exports.n=ne;exports.o=ie;exports.p=re;exports.q=N;exports.r=pt;exports.s=nt;exports.t=Rt;exports.u=me;exports.v=de;exports.w=pe;exports.x=be;exports.y=wt;exports.z=xe;
|
package/dist/chunk-BOYVCOLZ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f,b,c,d,e,a,p,m as m$1}from'./chunk-UCZVMHB5.mjs';import {g,i,k,l,m}from'./chunk-LDKESXXK.mjs';import {o}from'./chunk-6LOYA7G5.mjs';function W(t,r){let e=j(r),s=new RegExp(`<w:p[\\s][^>]*w14:paraId="${e}"`,"g"),o=[],i;for(;(i=s.exec(t))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<t.length;){let f=t.indexOf("<",n);if(f===-1)break;if(t.startsWith("<w:p",f)){let w=t[f+4];if(w===">"||w===" "||w==="/"){let u=t.indexOf(">",f);if(u===-1)break;if(t[u-1]==="/"){if(a===0)return {start:l,end:u+1};n=u+1;}else a++,n=u+1;}else n=f+1;}else if(t.startsWith("</w:p>",f)){if(a--,a===0)return {start:l,end:f+6};n=f+6;}else n=f+1;}return null}function L(t,r){let e=W(t,r);return e?t.substring(e.start,e.end):null}function Y(t){let r=0,e=/<w:p[\s>]/g,s;for(;(s=e.exec(t))!==null;){let o=s.index,i=t[o+4];(i===">"||i===" ")&&r++;}return r}function B(t){let r=new Map,e=/w14:paraId="([^"]+)"/g,s;for(;(s=e.exec(t))!==null;){let o=s[1];r.set(o,(r.get(o)||0)+1);}return r}function V(t,r,e){if(e.size===0)return {safe:true};let s=B(t),o=B(r);for(let n of e){let a=s.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-original: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-original: ${n}`}}for(let n of e){let a=o.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${n}`}}let i=Y(t),l=Y(r);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function H(t,r,e){if(e.size===0)return t;if(!V(t,r,e).safe)return null;let o=[];for(let l of e){let n=W(t,l);if(!n)return null;let a=L(r,l);if(!a)return null;o.push({start:n.start,end:n.end,newXml:a});}o.sort((l,n)=>n.start-l.start);let i=t;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function j(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){for(let r of t)if(r.type==="paragraph"){for(let e of r.content)if(e.type==="run"){for(let s of e.content)if(s.type==="drawing"&&s.image?.src?.startsWith("data:")&&!s.image?.rId)return true}else if(e.type==="hyperlink"&&e.href&&!e.rId&&!e.anchor)return true}else if(r.type==="table"){for(let e of r.rows)for(let s of e.cells)if(Z(s.content))return true}return false}async function nt(t,r,e$1){let{changedParaIds:s,structuralChange:o$1,hasUntrackedChanges:i$1}=e$1;if(o$1||i$1||!r)return null;let l$1=t.package.document.content;if(Z(l$1))return null;let n=t.package.document.comments,a$1=n&&n.length>0,f$1=f(t);try{let u=await(await import('jszip')).default.loadAsync(r),c$1=new Map;if(s.size>0){let d=u.file("word/document.xml");if(!d)return null;let p=await d.async("text"),y=g(t),g$1=H(p,y,s);if(!g$1)return null;c$1.set("word/document.xml",g$1);}if(a$1){let{xml:d$1,paraInfos:p}=i(n);c$1.set("word/comments.xml",d$1);let y=k(p);y&&c$1.set("word/commentsExtended.xml",y);let g=l(p);g&&c$1.set("word/commentsIds.xml",g);let I=m(p,n);I&&c$1.set("word/commentsExtensible.xml",I);let S=u.file("[Content_Types].xml");if(S){let m=c$1.get("[Content_Types].xml")??await S.async("text"),x=!1,C=[["/word/comments.xml",b],["/word/commentsExtended.xml",c],["/word/commentsIds.xml",d],["/word/commentsExtensible.xml",e]];for(let[h,b]of C)m.includes(h)||(m=m.replace("</Types>",`<Override PartName="${h}" ContentType="${b}"/></Types>`),x=!0);x&&c$1.set("[Content_Types].xml",m);}let T="word/_rels/document.xml.rels",N=u.file(T);if(N){let m=c$1.get(T)??await N.async("text"),x=!1,C=[["comments.xml",o.comments],["commentsExtended.xml",o.commentsExtended],["commentsIds.xml",o.commentsIds],["commentsExtensible.xml",o.commentsExtensible]];for(let[h,b]of C)if(!m.includes(h)){let J=a(m);m=m.replace("</Relationships>",`<Relationship Id="rId${J+1}" Type="${b}" Target="${h}"/></Relationships>`),x=!0;}x&&c$1.set(T,m);}}for(let[d,p]of f$1)c$1.set(d,p);let P=u.file("docProps/core.xml");if(P){let d=await P.async("text");c$1.set("docProps/core.xml",p(d,{updateModifiedDate:!0}));}return await m$1(u,c$1)}catch{return null}}export{V as a,H as b,nt as c};
|
package/dist/chunk-BS35CXMN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkTYYOBPNK_js=require('./chunk-TYYOBPNK.js'),chunk44RUAQA2_js=require('./chunk-44RUAQA2.js'),chunkBKHQA6JJ_js=require('./chunk-BKHQA6JJ.js'),chunkWZP6ZHBR_js=require('./chunk-WZP6ZHBR.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function N(e,t,a){if(!(!e||e<=0)){if(t==="pct")return a*e/5e3;if(!t||t==="dxa"||t==="auto")return chunk4Q2IP5FW_js.c(e)}}function q(e){return Math.max(1,...e.rows.map(t=>t.cells.reduce((a,o)=>a+Math.max(1,o.colSpan??1),0)))}function J(e,t,a){if(t<=0)return [];let o=a>0?a/t:0;if(e.length===0)return Array(t).fill(o);let n=e.slice(0,t),r=t-n.length;if(r>0){let u=n.filter(g=>g>0),c=u.length>0?u.reduce((g,h)=>g+h,0)/u.length:o;n=n.concat(Array(r).fill(c));}let s=n.reduce((u,c)=>u+(c>0?c:0),0),i=n.filter(u=>u<=0).length;if(s<=0)return Array(t).fill(o);if(i===0)return n;let l=Math.max(0,a-s),f=l>0?l/i:s/Math.max(1,t-i);return n.map(u=>u>0?u:f)}function K(e,t){if(e.pages.length===0)return null;let a=e.pageGap??0,o=0,n=null,r=1/0;for(let s=0;s<e.pages.length;s++){let i=e.pages[s],l=i.size?.h??e.pageSize.h,f=o,u=f+l;if(t.y>=f&&t.y<u)return {pageIndex:s,page:i,pageY:t.y-f};let c=f+l/2,g=Math.abs(t.y-c);g<r&&(r=g,n=s),o=u+a;}if(n!==null){let s=e.pages[n],i=D(e,n);return {pageIndex:n,page:s,pageY:Math.max(0,Math.min(t.y-i,s.size?.h??e.pageSize.h))}}return null}function D(e,t){let a=e.pageGap??0,o=0;for(let n=0;n<t&&n<e.pages.length;n++){let s=e.pages[n].size?.h??e.pageSize.h;o+=s+a;}return o}function Ie(e,t){return K(e,{y:t})?.pageIndex??null}function Q(e,t){return e.findIndex(a=>a.id===t)}function Be(e,t){let a=0;for(let o=e.fromLine;o<e.toLine&&o<t.lines.length;o++)a+=t.lines[o].lineHeight;return a}function ce(e,t,a,o){let n=[...e.page.fragments].sort((r,s)=>{let i=r.y-s.y;return Math.abs(i)>.5?i:r.x-s.x});for(let r of n){let s=Q(t,r.blockId);if(s===-1)continue;let i=t[s],l=a[s];if(!i||!l)continue;let f;if(r.kind==="paragraph"){if(i.kind!=="paragraph"||l.kind!=="paragraph")continue;f=Be(r,l);}else if(r.kind==="table")f=r.height;else if(r.kind==="image")f=r.height;else continue;let u=o.x>=r.x&&o.x<=r.x+r.width,c=o.y>=r.y&&o.y<=r.y+f;if(u&&c)return {fragment:r,block:i,measure:l,pageIndex:e.pageIndex,localX:o.x-r.x,localY:o.y-r.y}}return null}function Re(e,t,a,o){for(let n of e.page.fragments){if(n.kind!=="image")continue;let r=Q(t,n.blockId);if(r===-1)continue;let s=t[r],i=a[r];if(!s||!i)continue;let l=o.x>=n.x&&o.x<=n.x+n.width,f=o.y>=n.y&&o.y<=n.y+n.height;if(l&&f)return {fragment:n,block:s,measure:i,pageIndex:e.pageIndex,localX:o.x-n.x,localY:o.y-n.y}}return null}function ue(e,t,a,o){for(let n of e.page.fragments){if(n.kind!=="table")continue;let r=n,s=o.x>=r.x&&o.x<=r.x+r.width,i=o.y>=r.y&&o.y<=r.y+r.height;if(!s||!i)continue;let l=Q(t,r.blockId);if(l===-1)continue;let f=t[l],u=a[l];if(!f||f.kind!=="table"||!u||u.kind!=="table")continue;let c=f,g=u,h=o.x-r.x,x=o.y-r.y,d=r.headerRowCount??0,p=d>0&&r.continuesFromPrev?chunk44RUAQA2_js.r(g,d):0,m=0,b=-1;if(g.rows.length===0||c.rows.length===0)continue;if(p>0&&x<p){let T=0;for(let w=0;w<d&&w<g.rows.length;w++){let E=g.rows[w];if(x>=T&&x<T+E.height){b=w;break}T+=E.height;}b===-1&&(b=0);}else {let T=x-p;for(let w=r.fromRow;w<r.toRow&&w<g.rows.length;w++){let E=g.rows[w];if(T>=m&&T<m+E.height){b=w;break}m+=E.height;}}if(b===-1&&(b=Math.min(r.toRow-1,g.rows.length-1),b<r.fromRow))continue;let k=g.rows[b],F=c.rows[b];if(!k||!F)continue;let P=0,M=-1;if(k.cells.length===0||F.cells.length===0)continue;for(let T=0;T<k.cells.length;T++){let w=k.cells[T];if(h>=P&&h<P+w.width){M=T;break}P+=w.width;}if(M===-1&&(M=k.cells.length-1,M<0))continue;let H=k.cells[M],R=F.cells[M];if(!H||!R)continue;let y=0;if(p>0&&b<d)for(let T=0;T<b;T++)y+=g.rows[T]?.height??0;else {y=p;for(let T=r.fromRow;T<b;T++)y+=g.rows[T]?.height??0;}let I=0;for(let T=0;T<M;T++)I+=k.cells[T]?.width??0;let C,S;if(R.blocks&&R.blocks.length>0){let T=R.blocks[0],w=H.blocks[0];T.kind==="paragraph"&&w?.kind==="paragraph"&&(C=T,S=w);}let _=h-I,L=x-y;return {fragment:r,block:c,measure:g,pageIndex:e.pageIndex,rowIndex:b,colIndex:M,cellBlock:C,cellMeasure:S,cellLocalX:Math.max(0,_),cellLocalY:Math.max(0,L)}}return null}function Se(e,t,a,o){let n={pageHit:null,fragmentHit:null,tableCellHit:null};if(n.pageHit=K(e,o),!n.pageHit)return n;let r=D(e,n.pageHit.pageIndex),s={x:o.x,y:o.y-r};return n.fragmentHit=ce(n.pageHit,t,a,s),n.fragmentHit?.fragment.kind==="table"&&(n.tableCellHit=ue(n.pageHit,t,a,s)),n}function Le(e){if(e.pages.length===0)return 0;let t=e.pageGap??0,a=0;for(let o=0;o<e.pages.length;o++){let n=e.pages[o];a+=n.size?.h??e.pageSize.h,o<e.pages.length-1&&(a+=t);}return a}function Ee(e,t){return D(e,t)}function Ce(e,t){if(t<0||t>=e.pages.length)return null;let a=D(e,t),n=e.pages[t].size?.h??e.pageSize.h;return {top:a,bottom:a+n}}function Z(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function fe(e,t){let a=[];for(let o=t.fromRun;o<=t.toRun&&o<e.runs.length;o++){let n=e.runs[o];if(n){if(n.kind==="tab"||n.kind==="image"||n.kind==="lineBreak"){a.push(n);continue}if(n.kind==="text"){let r=n.text??"",s=o===t.fromRun,i=o===t.toRun;if(s||i){let l=s?t.fromChar:0,f=i?t.toChar:r.length,u=r.slice(l,f);u.length>0&&a.push({...n,text:u});}else a.push(n);}}}return a}function ge(e,t){let a,o,n=e.pmStart??0,r=0;for(let s=0;s<e.runs.length&&s<=t.toRun;s++){let i=e.runs[s];i&&(s<t.fromRun?i.kind==="text"?r+=(i.text??"").length:(i.kind==="tab"||i.kind==="lineBreak"||i.kind==="image")&&(r+=1):s===t.fromRun&&(r+=t.fromChar,a=n+r,i.kind==="text"&&(r=t.fromChar)));}if(a!==void 0){let s=0;for(let i=t.fromRun;i<=t.toRun&&i<e.runs.length;i++){let l=e.runs[i];if(l)if(l.kind==="text"){let f=l.text??"",u=i===t.fromRun?t.fromChar:0,c=i===t.toRun?t.toChar:f.length;s+=c-u;}else (l.kind==="tab"||l.kind==="lineBreak"||l.kind==="image")&&(s+=1);}o=a+s;}return {pmStart:a,pmEnd:o}}function _e(e,t,a,o){let n=0;for(let r=a;r<o&&r<e.lines.length;r++){let i=e.lines[r].lineHeight;if(t>=n&&t<n+i)return r;n+=i;}return o>a?Math.min(o-1,e.lines.length-1):null}function Ae(e,t,a,o){let{pmStart:n,pmEnd:r}=ge(e,t);if(n===void 0||r===void 0)return {charOffset:0,pmPosition:e.pmStart??0};let s=e.attrs?.alignment??"left",i=0;s==="center"?i=Math.max(0,(o-t.width)/2):s==="right"&&(i=Math.max(0,o-t.width));let l=Math.max(0,a-i);if(l<=0)return {charOffset:0,pmPosition:n};let f=fe(e,t);if(f.length===0)return {charOffset:0,pmPosition:n};let u=0,c=0;for(let h of f){if(h.kind==="tab"){let x=h.width??48,d=u+x;if(l<=d){let p=u+x/2;return l<p?{charOffset:c,pmPosition:n+c}:{charOffset:c+1,pmPosition:n+c+1}}u=d,c+=1;continue}if(h.kind==="image"){let x=h.width,d=u+x;if(l<=d){let p=u+x/2;return l<p?{charOffset:c,pmPosition:n+c}:{charOffset:c+1,pmPosition:n+c+1}}u=d,c+=1;continue}if(h.kind==="lineBreak"){if(l>=u)return {charOffset:c,pmPosition:n+c};c+=1;continue}if(h.kind==="text"){let x=h.text??"";if(x.length===0)continue;let d=Z(h),p=chunkBKHQA6JJ_js.g(x,d),m=u+p.width;if(l<=m){let b=l-u,k=chunkBKHQA6JJ_js.h(b,p.charWidths),F=c+k;return {charOffset:F,pmPosition:n+F}}u=m,c+=x.length;}}return {charOffset:r-n,pmPosition:r}}function $(e){let{fragment:t,block:a,measure:o,localX:n,localY:r}=e;if(t.kind!=="paragraph"||a.kind!=="paragraph"||o.kind!=="paragraph")return null;let s=t,i=a,l=o,f=_e(l,r,s.fromLine,s.toLine);if(f===null)return null;let u=l.lines[f];if(!u)return null;let c=0;for(let k=s.fromLine;k<f;k++)c+=l.lines[k]?.lineHeight??0;let g=i.attrs?.indent,h=g?.left??0,x=g?.right??0,d=Math.max(0,t.width-h-x),p=n-h,{charOffset:m,pmPosition:b}=Ae(i,u,p,d);return {pmPosition:b,charOffset:m,lineIndex:f}}function he(e){let{cellBlock:t,cellMeasure:a,cellLocalX:o,cellLocalY:n}=e;if(!t||!a)return null;let r={fragment:{kind:"paragraph",blockId:t.id,x:0,y:0,width:a.lines.reduce((i,l)=>Math.max(i,l.width),100),fromLine:0,toLine:a.lines.length,height:a.totalHeight},block:t,measure:a,pageIndex:e.pageIndex,localX:o,localY:n};return $(r)?.pmPosition??null}function De(e,t){if(t)return he(t);if(!e)return null;let{fragment:a}=e;return a.kind==="paragraph"?$(e)?.pmPosition??null:a.kind==="image"?a.pmStart??null:null}function de(e,t,a,o){let n=e.pmStart??0,r=e.pmEnd??n;if(a<n||a>r)return null;let s=a-n;for(let i=0;i<t.lines.length;i++){let l=t.lines[i],{pmStart:f,pmEnd:u}=ge(e,l);if(f===void 0||u===void 0)continue;let c=f-n,g=u-n;if(s>=c&&s<=g){let h=s-c,x=fe(e,l),d=0,p=0;for(let m of x)if(m.kind==="tab"){if(h<=p+1)return h<=p?{x:d,lineIndex:i}:{x:d+(m.width??48),lineIndex:i};d+=m.width??48,p+=1;}else if(m.kind==="image"){if(h<=p+1)return h<=p?{x:d,lineIndex:i}:{x:d+m.width,lineIndex:i};d+=m.width,p+=1;}else if(m.kind==="lineBreak"){if(h<=p)return {x:d,lineIndex:i};p+=1;}else if(m.kind==="text"){let b=m.text??"";if(h<=p+b.length){let P=h-p,M=Z(m),H=chunkBKHQA6JJ_js.g(b.slice(0,P),M);return {x:d+H.width,lineIndex:i}}let k=Z(m),F=chunkBKHQA6JJ_js.g(b,k);d+=F.width,p+=b.length;}return {x:d,lineIndex:i}}}return null}function Oe(e,t,a,o,n,r,s){let i=de(e,t,a);if(!i)return null;let l=e.attrs?.alignment??"left",f=e.attrs?.indent,u=f?.left??0,c=f?.right??0,g=Math.max(0,r-u-c),h=t.lines[i.lineIndex];if(!h)return null;let x=0;l==="center"?x=Math.max(0,(g-h.width)/2):l==="right"&&(x=Math.max(0,g-h.width));let d=0;for(let p=s;p<i.lineIndex;p++)d+=t.lines[p]?.lineHeight??0;return {x:o+u+x+i.x,y:n+d,height:h.lineHeight}}function me(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function ee(e,t){return e.findIndex(a=>a.id===t)}function G(e,t){let o=(e.pmStart??0)+1,n=0,r;for(let l=0;l<e.runs.length&&l<=t.toRun;l++){let f=e.runs[l];if(f){if(l<t.fromRun)f.kind==="text"?n+=(f.text??"").length:n+=1;else if(l===t.fromRun){n+=t.fromChar,r=o+n;break}}}r===void 0&&(r=o);let s=0;for(let l=t.fromRun;l<=t.toRun&&l<e.runs.length;l++){let f=e.runs[l];if(f)if(f.kind==="text"){let u=f.text??"",c=l===t.fromRun?t.fromChar:0,g=l===t.toRun?t.toChar:u.length;s+=g-c;}else s+=1;}let i=r+s;return {pmStart:r,pmEnd:i}}function pe(e,t,a,o){let n=[];for(let r=0;r<t.lines.length;r++){let s=t.lines[r],i=G(e,s);i.pmStart===void 0||i.pmEnd===void 0||i.pmEnd>a&&i.pmStart<o&&n.push({line:s,index:r});}return n}function v(e,t,a){let o=G(e,t);return o.pmStart===void 0?0:Math.max(0,a-o.pmStart)}function z(e,t,a,o){let n=0,r=0;for(let s=t.fromRun;s<=t.toRun&&s<e.runs.length;s++){let i=e.runs[s];if(i){if(i.kind==="tab"){let l=i.width??48;if(r+1>=a)return a<=r?n:n+l;n+=l,r+=1;continue}if(i.kind==="image"){let l=i.width;if(r+1>=a)return a<=r?n:n+l;n+=l,r+=1;continue}if(i.kind==="lineBreak"){if(a<=r)return n;r+=1;continue}if(i.kind==="text"){let l=i.text??"",f=s===t.fromRun,u=s===t.toRun,c=f?t.fromChar:0,g=u?t.toChar:l.length,h=l.slice(c,g);if(r+h.length>=a){let p=a-r,m=me(i),b=chunkBKHQA6JJ_js.g(h.slice(0,p),m);return n+b.width}let x=me(i),d=chunkBKHQA6JJ_js.g(h,x);n+=d.width,r+=h.length;}}}return n}function W(e,t){let a=0;for(let o=0;o<t&&o<e.lines.length;o++)a+=e.lines[o].lineHeight;return a}function Xe(e,t,a,o,n){if(o===n)return [];let r=Math.min(o,n),s=Math.max(o,n),i=[];for(let l=0;l<e.pages.length;l++){let f=e.pages[l],u=D(e,l);for(let c of f.fragments){if(c.kind==="paragraph"){let g=ee(t,c.blockId);if(g===-1)continue;let h=t[g],x=a[g];if(!h||h.kind!=="paragraph"||!x||x.kind!=="paragraph")continue;let d=h,p=x,m=c,b=pe(d,p,r,s);for(let{line:k,index:F}of b){if(F<m.fromLine||F>=m.toLine)continue;let P=G(d,k);if(P.pmStart===void 0||P.pmEnd===void 0)continue;let M=Math.max(P.pmStart,r),H=Math.min(P.pmEnd,s);if(M>=H)continue;let R=v(d,k,M),y=v(d,k,H),B=d.attrs?.indent,I=B?.left??0,C=B?.right??0,S=Math.max(0,c.width-I-C),_=z(d,k,R),L=z(d,k,y),T=d.attrs?.alignment??"left",w=0;T==="center"?w=Math.max(0,(S-k.width)/2):T==="right"&&(w=Math.max(0,S-k.width));let E=W(p,F)-W(p,m.fromLine),A=c.x+I+w+Math.min(_,L),V=Math.max(1,Math.abs(L-_)),Y=c.y+E;i.push({x:A,y:Y+u,width:V,height:k.lineHeight,pageIndex:l});}}if(c.kind==="table"){let g=ee(t,c.blockId);if(g===-1)continue;let h=t[g],x=a[g];if(!h||h.kind!=="table"||!x||x.kind!=="table")continue;let d=h,p=x,m=c,b=m.headerRowCount??0,F=b>0&&m.continuesFromPrev?chunk44RUAQA2_js.r(p,b):0;for(let P=m.fromRow;P<m.toRow&&P<d.rows.length;P++){let M=d.rows[P],H=p.rows[P];if(!M||!H)continue;let R=0;for(let y=0;y<M.cells.length;y++){let B=M.cells[y],I=H.cells[y];if(!(!B||!I)){for(let C=0;C<B.blocks.length;C++){let S=B.blocks[C],_=I.blocks[C];if(!S||S.kind!=="paragraph"||!_||_.kind!=="paragraph")continue;let L=S,T=_,w=pe(L,T,r,s),E=0;for(let{line:A,index:V}of w){let Y=G(L,A);if(Y.pmStart===void 0||Y.pmEnd===void 0)continue;let te=Math.max(Y.pmStart,r),ne=Math.min(Y.pmEnd,s);if(te>=ne)continue;let Me=v(L,A,te),ye=v(L,A,ne),re=z(L,A,Me,I.width),oe=z(L,A,ye,I.width),He=W(T,V);i.push({x:m.x+R+Math.min(re,oe),y:m.y+F+E+He+u,width:Math.max(1,Math.abs(oe-re)),height:A.lineHeight,pageIndex:l});}E+=T.totalHeight;}R+=I.width;}}F+=H.height;}}if(c.kind==="image"){let g=c.pmStart??0;(c.pmEnd??g+1)>r&&g<s&&i.push({x:c.x,y:c.y+u,width:c.width,height:c.height,pageIndex:l});}}}return i}function Ye(e,t,a,o){for(let n=0;n<e.pages.length;n++){let r=e.pages[n],s=D(e,n);for(let i of r.fragments){if(i.kind==="paragraph"){let l=ee(t,i.blockId);if(l===-1)continue;let f=t[l],u=a[l];if(!f||f.kind!=="paragraph"||!u||u.kind!=="paragraph")continue;let c=f,g=u,h=i,x=c.pmStart??0,d=c.pmEnd??x;if(o<x||o>d)continue;for(let p=h.fromLine;p<h.toLine;p++){let m=g.lines[p];if(!m)continue;let b=G(c,m);if(!(b.pmStart===void 0||b.pmEnd===void 0)&&o>=b.pmStart&&o<=b.pmEnd){let k=v(c,m,o),F=c.attrs?.indent,P=F?.left??0,M=F?.right??0,H=Math.max(0,i.width-P-M),R=z(c,m,k),y=c.attrs?.alignment??"left",B=0;y==="center"?B=Math.max(0,(H-m.width)/2):y==="right"&&(B=Math.max(0,H-m.width));let I=W(g,p)-W(g,h.fromLine);return {x:i.x+P+B+R,y:i.y+I+s,height:m.lineHeight,pageIndex:n}}}}if(i.kind==="image"){let l=i.pmStart??0,f=i.pmEnd??l+1;if(o>=l&&o<=f){let u=o===l?0:i.width;return {x:i.x+u,y:i.y+s,height:i.height,pageIndex:n}}}}}return null}function ve(e){return e.length<=1?false:new Set(e.map(a=>a.pageIndex)).size>1}function ze(e){let t=new Map;for(let a of e){let o=t.get(a.pageIndex)??[];o.push(a),t.set(a.pageIndex,o);}return t}function We(e){if(e.kind!=="paragraph")return false;let t=e.attrs;return t?!!(t.borders?.top||t.borders?.bottom||t.spacingExplicit?.before||t.spacingExplicit?.after):false}function xe(e){return be(e)}function be(e){let t=new Set;for(let a=1;a<e.length;a++){let o=e[a-1],n=e[a];o.kind==="table"&&n.kind==="paragraph"&&(n.runs.length>0||We(n)||t.add(a));}return e.map((a,o)=>{if(a.kind==="table")return Ge(a);if(a.kind!=="paragraph")return a;let n=t.has(o),r=a.attrs?.spacingExplicit,s=a.attrs?.spacing?.before!=null,i=a.attrs?.spacing?.after!=null,l=s&&!r?.before,f=i&&!r?.after,u=l||f;if(!u&&!n)return a;let c=a.attrs;return u&&c?.spacing&&(c={...c,spacing:{...c.spacing,before:r?.before?c.spacing.before:void 0,after:r?.after?c.spacing.after:void 0}}),n&&(c={...c??{},suppressEmptyParagraphHeight:true}),{...a,attrs:c}})}function Ge(e){let t=false,a=e.rows.map(o=>{let n=false,r=o.cells.map(s=>{let i=be(s.blocks);return i.some((f,u)=>f!==s.blocks[u])?(n=true,{...s,blocks:i}):s});return n?(t=true,{...o,cells:r}):o});return t?{...e,rows:a}:e}function Ue(e){return e?.align??e?.alignment}function ke(e,t,a,o){let n=o.section==="header"?o.margins.header??48:o.pageSize.h-(o.margins.footer??48)-a,r=e.position?.vertical;if(!r)return t;let s=Ue(r),i=r.posOffset!==void 0?chunk4Q2IP5FW_js.e(r.posOffset):void 0;if(r.relativeTo==="page"){if(i!==void 0)return i-n;if(s==="top")return -n;if(s==="bottom")return o.pageSize.h-e.height-n;if(s==="center")return (o.pageSize.h-e.height)/2-n}if(r.relativeTo==="margin"){let l=o.margins.top,f=o.pageSize.h-o.margins.top-o.margins.bottom;if(i!==void 0)return l+i-n;if(s==="top")return l-n;if(s==="bottom")return l+f-e.height-n;if(s==="center")return l+(f-e.height)/2-n}return i!==void 0?t+i:t}function Te(e,t,a,o){let n=0,r=a,s=0;for(let i=0;i<e.length;i++){let l=e[i],f=t[i];if(!(!l||!f)){if(l.kind==="paragraph"&&f.kind==="paragraph"){let u=s,c=u+f.totalHeight;n=Math.min(n,u),r=Math.max(r,c);for(let g of l.runs){if(g.kind!=="image"||!g.position)continue;let h=ke(g,u,a,o);n=Math.min(n,h),r=Math.max(r,h+g.height);}s=c;}else if(l.kind==="table"&&f.kind==="table"){let u=s+f.totalHeight;n=Math.min(n,s),r=Math.max(r,u),s=u;}else if(l.kind==="image"&&f.kind==="image"){let u=s+f.height;n=Math.min(n,s),r=Math.max(r,u),s=u;}else if(l.kind==="textBox"&&f.kind==="textBox"){let u=s+f.height;n=Math.min(n,s),r=Math.max(r,u),s=u;}}}return {visualTop:n,visualBottom:r}}function Ne(e,t,a,o){if(!e||!e.content||e.content.length===0)return;let n=chunkWZP6ZHBR_js.b(e.content,{styles:o.styles??void 0,theme:o.theme??null}),r=chunkTYYOBPNK_js.d(n,{theme:o.theme??void 0});if(r.length===0)return;let s=xe(r),i=o.measureBlocks(s,t),l=i.reduce((c,g)=>g.kind==="paragraph"||g.kind==="table"?c+g.totalHeight:g.kind==="image"||g.kind==="textBox"?c+g.height:c,0),{visualTop:f,visualBottom:u}=Te(r,i,l,a);return {blocks:s,measures:i,height:l,visualTop:f,visualBottom:u}}var Pe=7,Fe=0;function we(e,t){if(e.kind!=="paragraph"||t.kind!=="paragraph")return "totalHeight"in t?t.totalHeight:"height"in t?t.height:0;let a=e.runs.filter(i=>i.kind!=="text"||i.text.length>0);if(!(t.lines.length===1&&a.length>0&&a.every(i=>i.kind==="image")))return t.totalHeight;let n=a.reduce((i,l)=>l.kind==="image"?Math.max(i,l.height):i,0),r=e.attrs?.spacing?.before??0,s=e.attrs?.spacing?.after??0;return r+n+s}function Ve(e){let t=e?.borders?.top?.width??0,a=e?.borders?.bottom?.width??0;return t+a}function je(e,t,a){let o=e.columnWidths??[],n=N(e.width,e.widthType,t),r=q(e),s=n??t;if(e.rows.length>0&&(o=J(o,r,s)),o.length>0&&n){let c=o.reduce((g,h)=>g+h,0);if(c>0&&Math.abs(c-n)>1){let g=n/c;o=o.map(h=>h*g);}}let i=new Map;for(let c=0;c<e.rows.length;c++){let g=e.rows[c];if(!g)continue;let h=0,x=i.get(c)??new Set;for(;x.has(h);)h++;for(let d of g.cells){let p=d.colSpan??1,m=d.rowSpan??1;if(m>1)for(let b=c+1;b<c+m;b++){i.has(b)||i.set(b,new Set);let k=i.get(b);for(let F=0;F<p;F++)k.add(h+F);}for(h+=p;x.has(h);)h++;}}let l=e.rows.map((c,g)=>{let h=0,x=i.get(g)??new Set;for(;x.has(h);)h++;return {cells:c.cells.map(d=>{let p=d.colSpan??1,m=0;for(let P=0;P<p&&h+P<o.length;P++)m+=o[h+P]??0;for(m===0&&(m=(d.width&&d.width>0?d.width:N(d.widthValue,d.widthType,s))??100),h+=p;x.has(h);)h++;let b=d.padding?.left??Pe,k=d.padding?.right??Pe,F=Math.max(1,m-b-k);return {blocks:d.blocks.map(P=>a(P,F)),width:m,height:0,colSpan:d.colSpan,rowSpan:d.rowSpan}}),height:0}});for(let c=0;c<l.length;c++){let g=l[c],h=e.rows[c]?.cells,x=0,d=0;for(let k=0;k<g.cells.length;k++){let F=g.cells[k],P=h?.[k],M=0;for(let y=0;y<F.blocks.length;y++){let B=P?.blocks[y],I=F.blocks[y];!B||!I||(M+=we(B,I));}F.height=M;let H=P?.padding?.top??Fe,R=P?.padding?.bottom??Fe;F.height+=H+R,x=Math.max(x,F.height),d=Math.max(d,Ve(P));}let p=e.rows[c],m=p?.height,b=p?.heightRule;m&&b==="exact"?g.height=m:m?g.height=Math.max(x+d,m):g.height=x+d;}let f=l.reduce((c,g)=>c+g.height,0),u=o.reduce((c,g)=>c+g,0)||n||t;return {kind:"table",rows:l,columnWidths:o,totalWidth:u,totalHeight:f}}var qe=816,Je=1056,Ke=96,Qe=48;function O(e){return Math.round(e/1440*96)}function Ze(e){return {w:e?.pageWidth?O(e.pageWidth):816,h:e?.pageHeight?O(e.pageHeight):1056}}function $e(e){return {top:e?.marginTop?O(e.marginTop):96,right:e?.marginRight?O(e.marginRight):96,bottom:e?.marginBottom?O(e.marginBottom):96,left:e?.marginLeft?O(e.marginLeft):96,header:e?.headerDistance?O(e.headerDistance):48,footer:e?.footerDistance?O(e.footerDistance):48}}function et(e,t){let a={header:null,footer:null,firstHeader:null,firstFooter:null};if(!e?.package)return a;let o=e.package.headers,n=e.package.footers,r=null,s=null,i=null,l=null;if(o&&t?.headerReferences){let f=t.headerReferences.find(c=>c.type==="default");f?.rId&&(r=o.get(f.rId)??null);let u=t.headerReferences.find(c=>c.type==="first");u?.rId&&(i=o.get(u.rId)??null);}if(n&&t?.footerReferences){let f=t.footerReferences.find(c=>c.type==="default");f?.rId&&(s=n.get(f.rId)??null);let u=t.footerReferences.find(c=>c.type==="first");u?.rId&&(l=n.get(u.rId)??null);}return t?.titlePg||(!r&&i&&(r=i),!s&&l&&(s=l)),{header:r,footer:s,firstHeader:i,firstFooter:l}}exports.A=we;exports.B=je;exports.C=qe;exports.D=Je;exports.E=Ke;exports.F=Qe;exports.G=Ze;exports.H=$e;exports.I=et;exports.a=N;exports.b=q;exports.c=J;exports.d=K;exports.e=D;exports.f=Ie;exports.g=ce;exports.h=Re;exports.i=ue;exports.j=Se;exports.k=Le;exports.l=Ee;exports.m=Ce;exports.n=$;exports.o=he;exports.p=De;exports.q=de;exports.r=Oe;exports.s=Xe;exports.t=Ye;exports.u=ve;exports.v=ze;exports.w=xe;exports.x=ke;exports.y=Te;exports.z=Ne;
|