@eigenpal/docx-editor-core 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.mts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-47SKD7QB.mjs +4 -0
- package/dist/{chunk-CDGV7CLS.js → chunk-4HNEXEGS.js} +1 -1
- package/dist/chunk-4U2S3WV2.js +1 -0
- package/dist/{chunk-C57BOE7B.mjs → chunk-5EP47PMQ.mjs} +1 -1
- package/dist/chunk-7EU6E64E.mjs +1 -0
- package/dist/{chunk-E7UN3PVC.mjs → chunk-A7C3DGQA.mjs} +1 -1
- package/dist/chunk-BMP2OSXE.js +1 -0
- package/dist/{chunk-2KUOYHXX.js → chunk-DEQFU56O.js} +1 -1
- package/dist/chunk-DFDL337G.js +4 -0
- package/dist/chunk-DKUHG27E.js +1 -0
- package/dist/{chunk-NY36MZ55.mjs → chunk-DU5TWD2W.mjs} +1 -1
- package/dist/chunk-DUVSDFRG.js +2 -0
- package/dist/{chunk-CWPIXUU2.js → chunk-DUXHJ6QP.js} +1 -1
- package/dist/chunk-HQ76VZAN.mjs +1 -0
- package/dist/{chunk-5JULVEYK.mjs → chunk-ICNIAAH7.mjs} +1 -1
- package/dist/{chunk-F44XU6G5.js → chunk-K7NSOCSY.js} +1 -1
- package/dist/{chunk-RGHRXIIZ.js → chunk-KEDY4GFG.js} +2 -2
- package/dist/{chunk-WEQA5PPW.mjs → chunk-KPWWI5UW.mjs} +1 -1
- package/dist/chunk-NKIDBERV.js +1 -0
- package/dist/chunk-NN2EJIO7.mjs +1 -0
- package/dist/{chunk-YMXWLXVF.mjs → chunk-O4RCQNUW.mjs} +1 -1
- package/dist/chunk-O5L4BZCZ.mjs +1 -0
- package/dist/chunk-OSTMAXZZ.mjs +1 -0
- package/dist/{chunk-XTPT4TNP.mjs → chunk-OWGY46IW.mjs} +1 -1
- package/dist/chunk-PGWY6UFK.js +1 -0
- package/dist/{chunk-T3UP6LF5.js → chunk-PM4KDJJ2.js} +1 -1
- package/dist/{chunk-6AGU57TL.mjs → chunk-QCPISGPW.mjs} +1 -1
- package/dist/{chunk-WQJWT4RB.mjs → chunk-QRBFMR7Z.mjs} +1 -1
- package/dist/chunk-SHZOAUHB.mjs +1 -0
- package/dist/chunk-TT3ILFZC.js +1 -0
- package/dist/chunk-TXAB4I4M.mjs +2 -0
- package/dist/{chunk-BBJMUBTD.mjs → chunk-VMBCUUZM.mjs} +1 -1
- package/dist/{chunk-7UMOUKSF.js → chunk-WTIN6QHX.js} +1 -1
- package/dist/{chunk-V3NE7Q22.js → chunk-WVY2UXAK.js} +1 -1
- package/dist/{chunk-EJ2JAYRI.js → chunk-XCTYXYEU.js} +1 -1
- package/dist/{chunk-2ZTKTE7P.js → chunk-XCXQWCV2.js} +1 -1
- package/dist/{chunk-KSW6W2EK.mjs → chunk-YSBX4LFA.mjs} +1 -1
- package/dist/{chunk-DX5XU6JN.js → chunk-YUHOVME2.js} +1 -1
- package/dist/{content-CbBCrsr0.d.mts → content-BEFz1zcs.d.mts} +1 -1
- package/dist/{content-BebvPfXc.d.ts → content-DNcMlHU0.d.ts} +1 -1
- package/dist/{contentControlValues-Com1GnZS.d.ts → contentControlValues-2pV4M4kG.d.ts} +1 -1
- package/dist/{contentControlValues-DVJyudKU.d.mts → contentControlValues-CKWIIkkr.d.mts} +1 -1
- package/dist/core-plugins.d.mts +1 -1
- package/dist/core-plugins.d.ts +1 -1
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +6 -6
- package/dist/core.d.ts +6 -6
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/docx/index.d.mts +1 -1
- package/dist/docx/index.d.ts +1 -1
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +1 -1
- package/dist/docx/parser.d.ts +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +1 -1
- package/dist/docx/rezip.d.ts +1 -1
- package/dist/docx/serializer/index.d.mts +2 -2
- package/dist/docx/serializer/index.d.ts +2 -2
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.mjs +1 -1
- package/dist/{fontLoader-D9SBYuZZ.d.ts → fontLoader-CH12AtFF.d.ts} +1 -1
- package/dist/{fontLoader-B4uFKpAy.d.mts → fontLoader-D3X2Qgb_.d.mts} +1 -1
- package/dist/{headerFooterLayout-CtVsfqxQ.d.ts → headerFooterLayout-BdGTU0IA.d.ts} +31 -16
- package/dist/{headerFooterLayout-D2LZLkDC.d.mts → headerFooterLayout-D5-u-IsD.d.mts} +31 -16
- package/dist/headless.d.mts +4 -4
- package/dist/headless.d.ts +4 -4
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +2 -2
- package/dist/layout-bridge/index.d.ts +2 -2
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +1 -1
- package/dist/layout-bridge/measuring/index.d.ts +1 -1
- package/dist/layout-bridge/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 +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.ts +1 -1
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +1 -1
- package/dist/layout-engine/index.d.ts +1 -1
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +1 -1
- package/dist/layout-engine/types.d.ts +1 -1
- package/dist/layout-painter/index.d.mts +2 -2
- package/dist/layout-painter/index.d.ts +2 -2
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +2 -2
- package/dist/layout-painter/renderPage.d.ts +2 -2
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +1 -1
- package/dist/managers/AutoSaveManager.d.ts +1 -1
- package/dist/managers/TableSelectionManager.d.mts +1 -1
- package/dist/managers/TableSelectionManager.d.ts +1 -1
- package/dist/managers/types.d.mts +1 -1
- package/dist/managers/types.d.ts +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +2 -2
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-BvO8GGD4.d.mts → nodes-5w_QaI3g.d.mts} +13 -1
- package/dist/{nodes-Bd6tTkp0.d.ts → nodes-qQdZtu3Z.d.ts} +13 -1
- package/dist/prosemirror/applyFormatting.js +1 -1
- package/dist/prosemirror/applyFormatting.mjs +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/commentIdAllocator.d.mts +1 -1
- package/dist/prosemirror/commentIdAllocator.d.ts +1 -1
- package/dist/prosemirror/commentOps.d.mts +1 -1
- package/dist/prosemirror/commentOps.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +1 -1
- package/dist/prosemirror/conversion/index.d.ts +1 -1
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +3 -3
- package/dist/prosemirror/index.d.ts +3 -3
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +2 -2
- package/dist/prosemirror/plugins/index.d.mts +1 -1
- package/dist/prosemirror/plugins/index.d.ts +1 -1
- package/dist/prosemirror/queries.d.mts +1 -1
- package/dist/prosemirror/queries.d.ts +1 -1
- package/dist/prosemirror/schema/index.d.mts +2 -2
- package/dist/prosemirror/schema/index.d.ts +2 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +1 -1
- package/dist/{sectionPropertiesSerializer-CzgskSoA.d.ts → sectionPropertiesSerializer-BJSNK-Wl.d.ts} +1 -1
- package/dist/{sectionPropertiesSerializer-D3yI82iZ.d.mts → sectionPropertiesSerializer-DI3OIQ1j.d.mts} +1 -1
- package/dist/types/content.d.mts +1 -1
- package/dist/types/content.d.ts +1 -1
- package/dist/types/document.d.mts +2 -2
- package/dist/types/document.d.ts +2 -2
- package/dist/utils/comments.d.mts +1 -1
- package/dist/utils/comments.d.ts +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/{variableDetector-D2-xDa2O.d.mts → variableDetector-7xBsshP0.d.mts} +1 -1
- package/dist/{variableDetector-d-PpDlNV.d.ts → variableDetector-Bv5Tm0D-.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2KPOGFFR.js +0 -1
- package/dist/chunk-34DJT72K.js +0 -1
- package/dist/chunk-4QJEMD23.mjs +0 -4
- package/dist/chunk-4QSFBX26.mjs +0 -1
- package/dist/chunk-4SZAFWLV.mjs +0 -1
- package/dist/chunk-6KYOT4E7.js +0 -4
- package/dist/chunk-77X765ZO.js +0 -1
- package/dist/chunk-AXVWVIIN.js +0 -1
- package/dist/chunk-BKP5QMTS.js +0 -1
- package/dist/chunk-IM56AITE.mjs +0 -1
- package/dist/chunk-KK673XRZ.mjs +0 -1
- package/dist/chunk-M65C4SQJ.mjs +0 -2
- package/dist/chunk-NO6PIL32.mjs +0 -1
- package/dist/chunk-NTYJIOUE.js +0 -2
- package/dist/chunk-WCB25ESG.mjs +0 -1
- package/dist/chunk-WWG6PUWU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-4SZAFWLV.mjs';import {f,E,Y,O,W as W$1,m,n}from'./chunk-BBJMUBTD.mjs';import {b}from'./chunk-KK673XRZ.mjs';import {f as f$1}from'./chunk-KNY7SXPJ.mjs';function be(e,n){let i=e.floating;if(!i)return false;let r=f(e,n),t=0;i.tblpX!==void 0?t=i.tblpX:i.tblpXSpec?i.tblpXSpec==="left"||i.tblpXSpec==="inside"?t=0:i.tblpXSpec==="right"||i.tblpXSpec==="outside"?t=n-r:i.tblpXSpec==="center"&&(t=(n-r)/2):e.justification==="center"?t=(n-r)/2:e.justification==="right"&&(t=n-r);let o=i.leftFromText??0,l=i.rightFromText??0,a=t-o,s=n-(t+r)-l;return a<E&&s<E}function We(e,n,i){for(let r=0;r<e.length;r++){let t=e[r];t.kind==="table"&&t.floating&&be(t,n[r]??i)&&(e[r]={...t,floating:void 0});}}function ne(e,n){if(e.pages.length===0)return null;let i=e.pageGap??0,r=0,t=null,o=1/0;for(let l=0;l<e.pages.length;l++){let a=e.pages[l],s=a.size?.h??e.pageSize.h,f=r,u=f+s;if(n.y>=f&&n.y<u)return {pageIndex:l,page:a,pageY:n.y-f};let c=f+s/2,g=Math.abs(n.y-c);g<o&&(o=g,t=l),r=u+i;}if(t!==null){let l=e.pages[t],a=A(e,t);return {pageIndex:t,page:l,pageY:Math.max(0,Math.min(n.y-a,l.size?.h??e.pageSize.h))}}return null}function A(e,n){let i=e.pageGap??0,r=0;for(let t=0;t<n&&t<e.pages.length;t++){let l=e.pages[t].size?.h??e.pageSize.h;r+=l+i;}return r}function Ge(e,n){return ne(e,{y:n})?.pageIndex??null}function oe(e,n){return e.findIndex(i=>i.id===n)}function Ve(e,n){let i=0;for(let r=e.fromLine;r<e.toLine&&r<n.lines.length;r++)i+=n.lines[r].lineHeight;return i}function xe(e,n,i,r){let t=[...e.page.fragments].sort((o,l)=>{let a=o.y-l.y;return Math.abs(a)>.5?a:o.x-l.x});for(let o of t){let l=oe(n,o.blockId);if(l===-1)continue;let a=n[l],s=i[l];if(!a||!s)continue;let f;if(o.kind==="paragraph"){if(a.kind!=="paragraph"||s.kind!=="paragraph")continue;f=Ve(o,s);}else if(o.kind==="table")f=o.height;else if(o.kind==="image")f=o.height;else continue;let u=r.x>=o.x&&r.x<=o.x+o.width,c=r.y>=o.y&&r.y<=o.y+f;if(u&&c)return {fragment:o,block:a,measure:s,pageIndex:e.pageIndex,localX:r.x-o.x,localY:r.y-o.y}}return null}function Ue(e,n,i,r){for(let t of e.page.fragments){if(t.kind!=="image")continue;let o=oe(n,t.blockId);if(o===-1)continue;let l=n[o],a=i[o];if(!l||!a)continue;let s=r.x>=t.x&&r.x<=t.x+t.width,f=r.y>=t.y&&r.y<=t.y+t.height;if(s&&f)return {fragment:t,block:l,measure:a,pageIndex:e.pageIndex,localX:r.x-t.x,localY:r.y-t.y}}return null}function Te(e,n,i,r){for(let t of e.page.fragments){if(t.kind!=="table")continue;let o=t,l=r.x>=o.x&&r.x<=o.x+o.width,a=r.y>=o.y&&r.y<=o.y+o.height;if(!l||!a)continue;let s=oe(n,o.blockId);if(s===-1)continue;let f=n[s],u=i[s];if(!f||f.kind!=="table"||!u||u.kind!=="table")continue;let c=f,g=u,h=r.x-o.x,x=r.y-o.y,d=o.headerRowCount??0,m=d>0&&o.continuesFromPrev?Y(g,d):0,p=0,b=-1;if(g.rows.length===0||c.rows.length===0)continue;if(m>0&&x<m){let F=0;for(let w=0;w<d&&w<g.rows.length;w++){let L=g.rows[w];if(x>=F&&x<F+L.height){b=w;break}F+=L.height;}b===-1&&(b=0);}else {let F=x-m;for(let w=o.fromRow;w<o.toRow&&w<g.rows.length;w++){let L=g.rows[w];if(F>=p&&F<p+L.height){b=w;break}p+=L.height;}}if(b===-1&&(b=Math.min(o.toRow-1,g.rows.length-1),b<o.fromRow))continue;let k=g.rows[b],H=c.rows[b];if(!k||!H)continue;let M=0,T=-1;if(k.cells.length===0||H.cells.length===0)continue;for(let F=0;F<k.cells.length;F++){let w=k.cells[F];if(h>=M&&h<M+w.width){T=F;break}M+=w.width;}if(T===-1&&(T=k.cells.length-1,T<0))continue;let P=k.cells[T],S=H.cells[T];if(!P||!S)continue;let y=0;if(m>0&&b<d)for(let F=0;F<b;F++)y+=g.rows[F]?.height??0;else {y=m;for(let F=o.fromRow;F<b;F++)y+=g.rows[F]?.height??0;}let R=0;for(let F=0;F<T;F++)R+=k.cells[F]?.width??0;let X,I;if(S.blocks&&S.blocks.length>0){let F=S.blocks[0],w=P.blocks[0];F.kind==="paragraph"&&w?.kind==="paragraph"&&(X=F,I=w);}let E=h-R,C=x-y;return {fragment:o,block:c,measure:g,pageIndex:e.pageIndex,rowIndex:b,colIndex:T,cellBlock:X,cellMeasure:I,cellLocalX:Math.max(0,E),cellLocalY:Math.max(0,C)}}return null}function $e(e,n,i,r){let t={pageHit:null,fragmentHit:null,tableCellHit:null};if(t.pageHit=ne(e,r),!t.pageHit)return t;let o=A(e,t.pageHit.pageIndex),l={x:r.x,y:r.y-o};return t.fragmentHit=xe(t.pageHit,n,i,l),t.fragmentHit?.fragment.kind==="table"&&(t.tableCellHit=Te(t.pageHit,n,i,l)),t}function qe(e){if(e.pages.length===0)return 0;let n=e.pageGap??0,i=0;for(let r=0;r<e.pages.length;r++){let t=e.pages[r];i+=t.size?.h??e.pageSize.h,r<e.pages.length-1&&(i+=n);}return i}function je(e,n){return A(e,n)}function Je(e,n){if(n<0||n>=e.pages.length)return null;let i=A(e,n),t=e.pages[n].size?.h??e.pageSize.h;return {top:i,bottom:i+t}}function re(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function ke(e,n){let i=[];for(let r=n.fromRun;r<=n.toRun&&r<e.runs.length;r++){let t=e.runs[r];if(t){if(t.kind==="tab"||t.kind==="image"||t.kind==="lineBreak"){i.push(t);continue}if(t.kind==="text"){let o=t.text??"",l=r===n.fromRun,a=r===n.toRun;if(l||a){let s=l?n.fromChar:0,f=a?n.toChar:o.length,u=o.slice(s,f);u.length>0&&i.push({...t,text:u});}else i.push(t);}}}return i}function Fe(e,n){let i,r,t=e.pmStart??0,o=0;for(let l=0;l<e.runs.length&&l<=n.toRun;l++){let a=e.runs[l];a&&(l<n.fromRun?a.kind==="text"?o+=(a.text??"").length:(a.kind==="tab"||a.kind==="lineBreak"||a.kind==="image")&&(o+=1):l===n.fromRun&&(o+=n.fromChar,i=t+o,a.kind==="text"&&(o=n.fromChar)));}if(i!==void 0){let l=0;for(let a=n.fromRun;a<=n.toRun&&a<e.runs.length;a++){let s=e.runs[a];if(s)if(s.kind==="text"){let f=s.text??"",u=a===n.fromRun?n.fromChar:0,c=a===n.toRun?n.toChar:f.length;l+=c-u;}else (s.kind==="tab"||s.kind==="lineBreak"||s.kind==="image")&&(l+=1);}r=i+l;}return {pmStart:i,pmEnd:r}}function Ke(e,n,i,r){let t=0;for(let o=i;o<r&&o<e.lines.length;o++){let a=e.lines[o].lineHeight;if(n>=t&&n<t+a)return o;t+=a;}return r>i?Math.min(r-1,e.lines.length-1):null}function Qe(e,n$1,i,r){let{pmStart:t,pmEnd:o}=Fe(e,n$1);if(t===void 0||o===void 0)return {charOffset:0,pmPosition:e.pmStart??0};let l=e.attrs?.alignment??"left",a=0;l==="center"?a=Math.max(0,(r-n$1.width)/2):l==="right"&&(a=Math.max(0,r-n$1.width));let s=Math.max(0,i-a);if(s<=0)return {charOffset:0,pmPosition:t};let f=ke(e,n$1);if(f.length===0)return {charOffset:0,pmPosition:t};let u=0,c=0;for(let h of f){if(h.kind==="tab"){let x=h.width??48,d=u+x;if(s<=d){let m=u+x/2;return s<m?{charOffset:c,pmPosition:t+c}:{charOffset:c+1,pmPosition:t+c+1}}u=d,c+=1;continue}if(h.kind==="image"){let x=h.width,d=u+x;if(s<=d){let m=u+x/2;return s<m?{charOffset:c,pmPosition:t+c}:{charOffset:c+1,pmPosition:t+c+1}}u=d,c+=1;continue}if(h.kind==="lineBreak"){if(s>=u)return {charOffset:c,pmPosition:t+c};c+=1;continue}if(h.kind==="text"){let x=h.text??"";if(x.length===0)continue;let d=re(h),m$1=m(x,d),p=u+m$1.width;if(s<=p){let b=s-u,k=n(b,m$1.charWidths),H=c+k;return {charOffset:H,pmPosition:t+H}}u=p,c+=x.length;}}return {charOffset:o-t,pmPosition:o}}function ie(e){let{fragment:n,block:i,measure:r,localX:t,localY:o}=e;if(n.kind!=="paragraph"||i.kind!=="paragraph"||r.kind!=="paragraph")return null;let l=n,a=i,s=r,f=Ke(s,o,l.fromLine,l.toLine);if(f===null)return null;let u=s.lines[f];if(!u)return null;let c=0;for(let k=l.fromLine;k<f;k++)c+=s.lines[k]?.lineHeight??0;let g=a.attrs?.indent,h=g?.left??0,x=g?.right??0,d=Math.max(0,n.width-h-x),m=t-h,{charOffset:p,pmPosition:b}=Qe(a,u,m,d);return {pmPosition:b,charOffset:p,lineIndex:f}}function Me(e){let{cellBlock:n,cellMeasure:i,cellLocalX:r,cellLocalY:t}=e;if(!n||!i)return null;let o={fragment:{kind:"paragraph",blockId:n.id,x:0,y:0,width:i.lines.reduce((a,s)=>Math.max(a,s.width),100),fromLine:0,toLine:i.lines.length,height:i.totalHeight},block:n,measure:i,pageIndex:e.pageIndex,localX:r,localY:t};return ie(o)?.pmPosition??null}function Ze(e,n){if(n)return Me(n);if(!e)return null;let{fragment:i}=e;return i.kind==="paragraph"?ie(e)?.pmPosition??null:i.kind==="image"?i.pmStart??null:null}function ye(e,n,i,r){let t=e.pmStart??0,o=e.pmEnd??t;if(i<t||i>o)return null;let l=i-t;for(let a=0;a<n.lines.length;a++){let s=n.lines[a],{pmStart:f,pmEnd:u}=Fe(e,s);if(f===void 0||u===void 0)continue;let c=f-t,g=u-t;if(l>=c&&l<=g){let h=l-c,x=ke(e,s),d=0,m$1=0;for(let p of x)if(p.kind==="tab"){if(h<=m$1+1)return h<=m$1?{x:d,lineIndex:a}:{x:d+(p.width??48),lineIndex:a};d+=p.width??48,m$1+=1;}else if(p.kind==="image"){if(h<=m$1+1)return h<=m$1?{x:d,lineIndex:a}:{x:d+p.width,lineIndex:a};d+=p.width,m$1+=1;}else if(p.kind==="lineBreak"){if(h<=m$1)return {x:d,lineIndex:a};m$1+=1;}else if(p.kind==="text"){let b=p.text??"";if(h<=m$1+b.length){let M=h-m$1,T=re(p),P=m(b.slice(0,M),T);return {x:d+P.width,lineIndex:a}}let k=re(p),H=m(b,k);d+=H.width,m$1+=b.length;}return {x:d,lineIndex:a}}}return null}function et(e,n,i,r,t,o,l){let a=ye(e,n,i);if(!a)return null;let s=e.attrs?.alignment??"left",f=e.attrs?.indent,u=f?.left??0,c=f?.right??0,g=Math.max(0,o-u-c),h=n.lines[a.lineIndex];if(!h)return null;let x=0;s==="center"?x=Math.max(0,(g-h.width)/2):s==="right"&&(x=Math.max(0,g-h.width));let d=0;for(let m=l;m<a.lineIndex;m++)d+=n.lines[m]?.lineHeight??0;return {x:r+u+x+a.x,y:t+d,height:h.lineHeight}}function tt(e,n,i={}){let r=i.scope??"body",t=r==="body"?"layout-page-content":`layout-page-${r}`,o=`.${t} .layout-table-cell`,l=e.querySelectorAll(`.${t} .layout-table-cell-selected`);for(let c of Array.from(l))c.classList.remove("layout-table-cell-selected");let a=n.selection;if(!("$anchorCell"in a&&typeof a.forEachCell=="function")||!a.forEachCell)return;let f=[];a.forEachCell((c,g)=>{f.push([g,g+c.nodeSize]);});let u=e.querySelectorAll(o);for(let c of Array.from(u)){let g=c,h=g.dataset.pmStart;if(h===void 0)continue;let x=Number(h);for(let[d,m]of f)if(x>=d&&x<m){g.classList.add("layout-table-cell-selected");break}}}function He(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function ae(e,n){return e.findIndex(i=>i.id===n)}function V(e,n){let r=(e.pmStart??0)+1,t=0,o;for(let s=0;s<e.runs.length&&s<=n.toRun;s++){let f=e.runs[s];if(f){if(s<n.fromRun)f.kind==="text"?t+=(f.text??"").length:t+=1;else if(s===n.fromRun){t+=n.fromChar,o=r+t;break}}}o===void 0&&(o=r);let l=0;for(let s=n.fromRun;s<=n.toRun&&s<e.runs.length;s++){let f=e.runs[s];if(f)if(f.kind==="text"){let u=f.text??"",c=s===n.fromRun?n.fromChar:0,g=s===n.toRun?n.toChar:u.length;l+=g-c;}else l+=1;}let a=o+l;return {pmStart:o,pmEnd:a}}function we(e,n,i,r){let t=[];for(let o=0;o<n.lines.length;o++){let l=n.lines[o],a=V(e,l);a.pmStart===void 0||a.pmEnd===void 0||a.pmEnd>i&&a.pmStart<r&&t.push({line:l,index:o});}return t}function W(e,n,i){let r=V(e,n);return r.pmStart===void 0?0:Math.max(0,i-r.pmStart)}function G(e,n,i,r){let t=0,o=0;for(let l=n.fromRun;l<=n.toRun&&l<e.runs.length;l++){let a=e.runs[l];if(a){if(a.kind==="tab"){let s=a.width??48;if(o+1>=i)return i<=o?t:t+s;t+=s,o+=1;continue}if(a.kind==="image"){let s=a.width;if(o+1>=i)return i<=o?t:t+s;t+=s,o+=1;continue}if(a.kind==="lineBreak"){if(i<=o)return t;o+=1;continue}if(a.kind==="text"){let s=a.text??"",f=l===n.fromRun,u=l===n.toRun,c=f?n.fromChar:0,g=u?n.toChar:s.length,h=s.slice(c,g);if(o+h.length>=i){let m$1=i-o,p=He(a),b=m(h.slice(0,m$1),p);return t+b.width}let x=He(a),d=m(h,x);t+=d.width,o+=h.length;}}}return t}function J(e,n){let i=0;for(let r=0;r<n&&r<e.lines.length;r++)i+=e.lines[r].lineHeight;return i}function nt(e,n,i,r,t){if(r===t)return [];let o=Math.min(r,t),l=Math.max(r,t),a=[];for(let s=0;s<e.pages.length;s++){let f=e.pages[s],u=A(e,s);for(let c of f.fragments){if(c.kind==="paragraph"){let g=ae(n,c.blockId);if(g===-1)continue;let h=n[g],x=i[g];if(!h||h.kind!=="paragraph"||!x||x.kind!=="paragraph")continue;let d=h,m=x,p=c,b=we(d,m,o,l);for(let{line:k,index:H}of b){if(H<p.fromLine||H>=p.toLine)continue;let M=V(d,k);if(M.pmStart===void 0||M.pmEnd===void 0)continue;let T=Math.max(M.pmStart,o),P=Math.min(M.pmEnd,l);if(T>=P)continue;let S=W(d,k,T),y=W(d,k,P),B=d.attrs?.indent,R=B?.left??0,X=B?.right??0,I=Math.max(0,c.width-R-X),E=G(d,k,S),C=G(d,k,y),F=d.attrs?.alignment??"left",w=0;F==="center"?w=Math.max(0,(I-k.width)/2):F==="right"&&(w=Math.max(0,I-k.width));let L=J(m,H)-J(m,p.fromLine),D=c.x+R+w+Math.min(E,C),Y=Math.max(1,Math.abs(C-E)),z=c.y+L;a.push({x:D,y:z+u,width:Y,height:k.lineHeight,pageIndex:s});}}if(c.kind==="table"){let g=ae(n,c.blockId);if(g===-1)continue;let h=n[g],x=i[g];if(!h||h.kind!=="table"||!x||x.kind!=="table")continue;let d=h,m=x,p=c,b=[],k=0;for(let y=0;y<m.rows.length;y++)b.push(Math.round(k)),k+=m.rows[y]?.height??0;b.push(Math.round(k));let H=p.headerRowCount??0,M=H>0&&p.continuesFromPrev?Y(m,H):0,T=(b[p.fromRow]??0)+(p.topClip??0),P=p.bottomClip!==void 0?Math.round(p.height):M+((b[p.toRow]??0)-T),S=y=>M+(y-T);for(let y=p.fromRow;y<p.toRow&&y<d.rows.length;y++){let B=d.rows[y],R=m.rows[y];if(!B||!R)continue;let X=b[y]??0,I=0;for(let E=0;E<B.cells.length;E++){let C=B.cells[E],F=R.cells[E];if(!C||!F)continue;let w=C.padding?.top??0,L=O(C.blocks,F.blocks,w);for(let D=0;D<C.blocks.length;D++){let Y=C.blocks[D],z=F.blocks[D];if(!Y||Y.kind!=="paragraph"||!z||z.kind!=="paragraph")continue;let O=Y,_e=z,Xe=L.lineTops[D]??[],Oe=we(O,_e,o,l);for(let{line:v,index:Ne}of Oe){let q=V(O,v);if(q.pmStart===void 0||q.pmEnd===void 0)continue;let se=Math.max(q.pmStart,o),ce=Math.min(q.pmEnd,l);if(se>=ce)continue;let Q=S(X+(Xe[Ne]??0));if(Q+v.lineHeight<=M||Q>=P)continue;let Ye=W(O,v,se),ze=W(O,v,ce),ue=G(O,v,Ye,F.width),fe=G(O,v,ze,F.width);a.push({x:p.x+I+Math.min(ue,fe),y:p.y+Q+u,width:Math.max(1,Math.abs(fe-ue)),height:v.lineHeight,pageIndex:s});}}I+=F.width;}}}if(c.kind==="image"){let g=c.pmStart??0;(c.pmEnd??g+1)>o&&g<l&&a.push({x:c.x,y:c.y+u,width:c.width,height:c.height,pageIndex:s});}}}return a}function ot(e,n,i,r){for(let t=0;t<e.pages.length;t++){let o=e.pages[t],l=A(e,t);for(let a of o.fragments){if(a.kind==="paragraph"){let s=ae(n,a.blockId);if(s===-1)continue;let f=n[s],u=i[s];if(!f||f.kind!=="paragraph"||!u||u.kind!=="paragraph")continue;let c=f,g=u,h=a,x=c.pmStart??0,d=c.pmEnd??x;if(r<x||r>d)continue;for(let m=h.fromLine;m<h.toLine;m++){let p=g.lines[m];if(!p)continue;let b=V(c,p);if(!(b.pmStart===void 0||b.pmEnd===void 0)&&r>=b.pmStart&&r<=b.pmEnd){let k=W(c,p,r),H=c.attrs?.indent,M=H?.left??0,T=H?.right??0,P=Math.max(0,a.width-M-T),S=G(c,p,k),y=c.attrs?.alignment??"left",B=0;y==="center"?B=Math.max(0,(P-p.width)/2):y==="right"&&(B=Math.max(0,P-p.width));let R=J(g,m)-J(g,h.fromLine);return {x:a.x+M+B+S,y:a.y+R+l,height:p.lineHeight,pageIndex:t}}}}if(a.kind==="image"){let s=a.pmStart??0,f=a.pmEnd??s+1;if(r>=s&&r<=f){let u=r===s?0:a.width;return {x:a.x+u,y:a.y+l,height:a.height,pageIndex:t}}}}}return null}function rt(e){return e.length<=1?false:new Set(e.map(i=>i.pageIndex)).size>1}function it(e){let n=new Map;for(let i of e){let r=n.get(i.pageIndex)??[];r.push(i),n.set(i.pageIndex,r);}return n}function at(e){if(e.kind!=="paragraph")return false;let n=e.attrs;return n?!!(n.borders?.top||n.borders?.bottom||n.spacingExplicit?.before||n.spacingExplicit?.after):false}function Pe(e){return Se(e)}function Se(e){let n=new Set;for(let i=1;i<e.length;i++){let r=e[i-1],t=e[i];r.kind==="table"&&t.kind==="paragraph"&&(t.runs.length>0||at(t)||n.add(i));}return e.map((i,r)=>{if(i.kind==="table")return lt(i);if(i.kind!=="paragraph")return i;let t=n.has(r),o=i.attrs?.spacingExplicit,l=i.attrs?.spacing?.before!=null,a=i.attrs?.spacing?.after!=null,s=l&&!o?.before,f=a&&!o?.after,u=s||f;if(!u&&!t)return i;let c=i.attrs;return u&&c?.spacing&&(c={...c,spacing:{...c.spacing,before:o?.before?c.spacing.before:void 0,after:o?.after?c.spacing.after:void 0}}),t&&(c={...c??{},suppressEmptyParagraphHeight:true}),{...i,attrs:c}})}function lt(e){let n=false,i=e.rows.map(r=>{let t=false,o=r.cells.map(l=>{let a=Se(l.blocks);return a.some((f,u)=>f!==l.blocks[u])?(t=true,{...l,blocks:a}):l});return t?(n=true,{...r,cells:o}):r});return n?{...e,rows:i}:e}function st(e){return e?.align??e?.alignment}function Be(e,n,i,r){let t=r.section==="header"?r.margins.header??48:r.pageSize.h-(r.margins.footer??48)-i,o=e.position?.vertical;if(!o)return n;let l=st(o),a=o.posOffset!==void 0?f$1(o.posOffset):void 0;if(o.relativeTo==="page"){if(a!==void 0)return a-t;if(l==="top")return -t;if(l==="bottom")return r.pageSize.h-e.height-t;if(l==="center")return (r.pageSize.h-e.height)/2-t}if(o.relativeTo==="margin"){let s=r.margins.top,f=r.pageSize.h-r.margins.top-r.margins.bottom;if(a!==void 0)return s+a-t;if(l==="top")return s-t;if(l==="bottom")return s+f-e.height-t;if(l==="center")return s+(f-e.height)/2-t}return a!==void 0?n+a:n}function Re(e){switch(e.kind){case "paragraph":case "table":return true;case "image":return !e.anchor?.isAnchored;case "textBox":return e.displayMode===void 0||e.displayMode==="inline";default:return false}}function ct(e){return e?e.kind==="paragraph"||e.kind==="table"?e.totalHeight:e.kind==="image"||e.kind==="textBox"?e.height:0:0}function Ie(e,n,i,r){let t=0,o=0,l=0;for(let a=0;a<e.length;a++){let s=e[a],f=n[a];if(!(!s||!f)){if(s.kind==="paragraph"&&f.kind==="paragraph"){let u=l,c=u+f.totalHeight;t=Math.min(t,u),o=Math.max(o,c);for(let g of s.runs){if(g.kind!=="image"||!g.position)continue;let h=Be(g,u,i,r);t=Math.min(t,h),o=Math.max(o,h+g.height);}l=c;}else if(s.kind==="table"&&f.kind==="table"){let u=l+f.totalHeight;t=Math.min(t,l),o=Math.max(o,u),l=u;}else if(s.kind==="image"&&f.kind==="image"){let u=l+f.height;t=Math.min(t,l),o=Math.max(o,u),l=u;}else if(s.kind==="textBox"&&f.kind==="textBox"){let u=l+f.height;t=Math.min(t,l),o=Math.max(o,u),s.displayMode!=="float"&&(l=u);}}}return {visualTop:t,visualBottom:o}}function ut(e,n,i,r){if(!e||!e.content||e.content.length===0)return;let t=b(e.content,{styles:r.styles??void 0,theme:r.theme??null,defaultTabStopTwips:r.defaultTabStopTwips??null});return Ce(t,n,i,r)}function Ce(e,n,i,r){let t=c(e,{theme:r.theme??void 0});if(t.length===0)return;let o=Pe(t),l=r.measureBlocks(o,n),a=0,s=0;for(let c=0;c<o.length;c++){let g=ct(l[c]);a+=g,Re(o[c])&&(s+=g);}let{visualTop:f,visualBottom:u}=Ie(o,l,a,i);return {blocks:o,measures:l,height:a,flowHeight:s,visualTop:f,visualBottom:u}}var K={header:null,footer:null};function ft(){K.header=null,K.footer=null;}function Ee(e,n){let i=n.querySelectorAll(`.layout-page-${e}`);if(i.length===0)return null;let r=n.defaultView,t=r?r.innerHeight/2:0,o=i[0],l=1/0;for(let c of Array.from(i)){let g=c.getBoundingClientRect(),h=Math.abs((g.top+g.bottom)/2-t);h<l&&(l=h,o=c);}let a=K[e];if(a&&a.host===o&&a.host.isConnected)return a;let s=Array.from(o.querySelectorAll("span[data-pm-start][data-pm-end]")),f=Array.from(o.querySelectorAll("[data-pm-start][data-pm-end]")),u={host:o,spans:s,ranged:f};return K[e]=u,u}function dt(e,n,i=globalThis.document){let r=e.state.selection;if(!r.empty)return null;let t=r.head,o=Ee(n,i);if(!o)return null;let{host:l,spans:a}=o;for(let d of a){let m=Number(d.dataset.pmStart),p=Number(d.dataset.pmEnd);if(!(!Number.isFinite(m)||!Number.isFinite(p))&&t>=m&&t<=p){let b=l.ownerDocument.createRange(),k=l.ownerDocument.createTreeWalker(d,NodeFilter.SHOW_TEXT),H=t-m,M=k.nextNode();for(;M;){let S=M.data.length;if(H<=S){try{b.setStart(M,H),b.setEnd(M,H);let y=b.getClientRects()[0]??b.getBoundingClientRect();if(y&&y.height>0)return {top:y.top,left:y.left,height:y.height}}catch{}break}H-=S,M=k.nextNode();}let T=d.getBoundingClientRect(),P=(t-m)/Math.max(1,p-m);return {top:T.top,left:T.left+T.width*P,height:T.height}}}let s=l.querySelector(`[data-pm-start="${t}"]`);if(s){let d=s.getBoundingClientRect();return {top:d.top,left:d.left+1,height:d.height||16}}let f=o.ranged,u=null,c=1/0;for(let d of f){let m=Number(d.dataset.pmStart),p=Number(d.dataset.pmEnd);if(!Number.isFinite(m)||!Number.isFinite(p)||t<m||t>p)continue;let b=p-m;b<c&&(c=b,u=d);}if(u){let d=u.getBoundingClientRect(),m=Number(u.dataset.pmEnd),p=t>=m;return {top:d.top,left:p?d.right:d.left+1,height:d.height||16}}let g=null,h=-1/0;for(let d of f){let m=Number(d.dataset.pmStart);Number.isFinite(m)&&(m>t||m>h&&(h=m,g=d));}if(g){let d=g.getBoundingClientRect();return {top:d.top,left:d.right,height:d.height||16}}let x=l.getBoundingClientRect();return {top:x.top+2,left:x.left+2,height:16}}function mt(e,n,i=globalThis.document){let r=e.state.selection;if(r.empty)return [];let t=r.from,o=r.to,l=[],a=Ee(n,i);if(!a)return l;let{host:s,spans:f}=a;for(let u of f){let c=Number(u.dataset.pmStart),g=Number(u.dataset.pmEnd);if(!Number.isFinite(c)||!Number.isFinite(g)||g<=t||c>=o)continue;if(u.classList.contains("layout-run-tab")){let p=u.getBoundingClientRect();l.push({top:p.top,left:p.left,width:p.width,height:p.height});continue}let h=null;if(u.firstChild?.nodeType===Node.TEXT_NODE?h=u.firstChild:u.firstChild?.nodeType===Node.ELEMENT_NODE&&u.firstChild.tagName==="A"&&u.firstChild.firstChild?.nodeType===Node.TEXT_NODE&&(h=u.firstChild.firstChild),!h)continue;let x=Math.max(0,t-c),d=Math.min(h.length,o-c);if(x>=d)continue;let m=s.ownerDocument.createRange();m.setStart(h,x),m.setEnd(h,d);for(let p of Array.from(m.getClientRects()))l.push({top:p.top,left:p.left,width:p.width,height:p.height});}return l}function Le(e){return e?e.flowHeight??e.height:0}function gt(e){let{pageSize:n,margins:i,finalMargins:r,bodyBlocks:t,headers:o,footers:l,warn:a}=e,s=i.header??48,f=i.footer??48,u=i.top-s,c=i.bottom-f,g=Math.max(0,...(o??[]).map(Le)),h=Math.max(0,...(l??[]).map(Le)),x=g>u,d=h>c;if(!x&&!d)return {margins:i,finalMargins:r};let m=Math.max(0,n.h-24),p=false,b=M=>{let T={...M};return x&&(T.top=Math.max(M.top,s+g)),d&&(T.bottom=Math.max(M.bottom,f+h)),T.top+T.bottom>m&&(p=true,T.bottom=Math.max(0,Math.min(T.bottom,m-T.top)),T.top+T.bottom>m&&(T.top=Math.max(0,m-T.bottom))),T},k=b(i),H=b(r);if(t)for(let M of t){if(M.kind!=="sectionBreak")continue;let T=M;T.margins&&(T.margins=b(T.margins));}return p&&a&&a(`[layout] header/footer content exceeds page height; clamping margins to preserve a content area. pageHeight=${Math.round(n.h)} headerBand=${Math.round(g)} footerBand=${Math.round(h)} top=${Math.round(k.top)} bottom=${Math.round(k.bottom)}`),{margins:k,finalMargins:H}}var Ae=816,De=1056,U=96,le=48;function $(e){return Math.round(e/1440*96)}function N(e,n){return e!=null?$(e):n}function ht(e){return {w:e?.pageWidth?$(e.pageWidth):Ae,h:e?.pageHeight?$(e.pageHeight):De}}function pt(e){return {top:N(e?.marginTop,U),right:N(e?.marginRight,U),bottom:N(e?.marginBottom,U),left:N(e?.marginLeft,U),header:N(e?.headerDistance,le),footer:N(e?.footerDistance,le)}}function bt(e,n){let i={header:null,footer:null,firstHeader:null,firstFooter:null};if(!e?.package)return i;let r=e.package.headers,t=e.package.footers,o=null,l=null,a=null,s=null;if(r&&n?.headerReferences){let f=n.headerReferences.find(c=>c.type==="default");f?.rId&&(o=r.get(f.rId)??null);let u=n.headerReferences.find(c=>c.type==="first");u?.rId&&(a=r.get(u.rId)??null);}if(t&&n?.footerReferences){let f=n.footerReferences.find(c=>c.type==="default");f?.rId&&(l=t.get(f.rId)??null);let u=n.footerReferences.find(c=>c.type==="first");u?.rId&&(s=t.get(u.rId)??null);}return n?.titlePg||(!o&&a&&(o=a),!l&&s&&(l=s)),{header:o,footer:l,firstHeader:a,firstFooter:s}}function xt(e){let n=e?.columnCount??1;if(n<=1)return;let i=$(e?.columnSpace??720);return {count:n,gap:i,equalWidth:e?.equalWidth??true,separator:e?.separator}}function ve(e){let n=e.pageSize.w-e.margins.left-e.margins.right,i=e.columns;return !i||i.count<=1?n:Math.floor((n-(i.count-1)*i.gap)/i.count)}function Tt(e,n,i){let{configs:r,breakIndices:t}=W$1(e,n,i),o=0,l=[];for(let a=0;a<e.length;a++)l.push(ve(r[o]??n)),o<t.length&&a===t[o]&&o++;return l}export{ut as A,Ce as B,ft as C,dt as D,mt as E,gt as F,Ae as G,De as H,U as I,le as J,$ as K,ht as L,pt as M,bt as N,xt as O,ve as P,Tt as Q,be as a,We as b,ne as c,A as d,Ge as e,xe as f,Ue as g,Te as h,$e as i,qe as j,je as k,Je as l,ie as m,Me as n,Ze as o,ye as p,et as q,tt as r,nt as s,ot as t,rt as u,it as v,Pe as w,Be as x,Re as y,Ie as z};
|
|
1
|
+
import {c}from'./chunk-7EU6E64E.mjs';import {f,E,Y,O,W as W$1,m,n}from'./chunk-VMBCUUZM.mjs';import {b}from'./chunk-NN2EJIO7.mjs';import {f as f$1}from'./chunk-KNY7SXPJ.mjs';function be(e,n){let i=e.floating;if(!i)return false;let r=f(e,n),t=0;i.tblpX!==void 0?t=i.tblpX:i.tblpXSpec?i.tblpXSpec==="left"||i.tblpXSpec==="inside"?t=0:i.tblpXSpec==="right"||i.tblpXSpec==="outside"?t=n-r:i.tblpXSpec==="center"&&(t=(n-r)/2):e.justification==="center"?t=(n-r)/2:e.justification==="right"&&(t=n-r);let o=i.leftFromText??0,l=i.rightFromText??0,a=t-o,s=n-(t+r)-l;return a<E&&s<E}function We(e,n,i){for(let r=0;r<e.length;r++){let t=e[r];t.kind==="table"&&t.floating&&be(t,n[r]??i)&&(e[r]={...t,floating:void 0});}}function ne(e,n){if(e.pages.length===0)return null;let i=e.pageGap??0,r=0,t=null,o=1/0;for(let l=0;l<e.pages.length;l++){let a=e.pages[l],s=a.size?.h??e.pageSize.h,f=r,u=f+s;if(n.y>=f&&n.y<u)return {pageIndex:l,page:a,pageY:n.y-f};let c=f+s/2,g=Math.abs(n.y-c);g<o&&(o=g,t=l),r=u+i;}if(t!==null){let l=e.pages[t],a=A(e,t);return {pageIndex:t,page:l,pageY:Math.max(0,Math.min(n.y-a,l.size?.h??e.pageSize.h))}}return null}function A(e,n){let i=e.pageGap??0,r=0;for(let t=0;t<n&&t<e.pages.length;t++){let l=e.pages[t].size?.h??e.pageSize.h;r+=l+i;}return r}function Ge(e,n){return ne(e,{y:n})?.pageIndex??null}function oe(e,n){return e.findIndex(i=>i.id===n)}function Ve(e,n){let i=0;for(let r=e.fromLine;r<e.toLine&&r<n.lines.length;r++)i+=n.lines[r].lineHeight;return i}function xe(e,n,i,r){let t=[...e.page.fragments].sort((o,l)=>{let a=o.y-l.y;return Math.abs(a)>.5?a:o.x-l.x});for(let o of t){let l=oe(n,o.blockId);if(l===-1)continue;let a=n[l],s=i[l];if(!a||!s)continue;let f;if(o.kind==="paragraph"){if(a.kind!=="paragraph"||s.kind!=="paragraph")continue;f=Ve(o,s);}else if(o.kind==="table")f=o.height;else if(o.kind==="image")f=o.height;else continue;let u=r.x>=o.x&&r.x<=o.x+o.width,c=r.y>=o.y&&r.y<=o.y+f;if(u&&c)return {fragment:o,block:a,measure:s,pageIndex:e.pageIndex,localX:r.x-o.x,localY:r.y-o.y}}return null}function Ue(e,n,i,r){for(let t of e.page.fragments){if(t.kind!=="image")continue;let o=oe(n,t.blockId);if(o===-1)continue;let l=n[o],a=i[o];if(!l||!a)continue;let s=r.x>=t.x&&r.x<=t.x+t.width,f=r.y>=t.y&&r.y<=t.y+t.height;if(s&&f)return {fragment:t,block:l,measure:a,pageIndex:e.pageIndex,localX:r.x-t.x,localY:r.y-t.y}}return null}function Te(e,n,i,r){for(let t of e.page.fragments){if(t.kind!=="table")continue;let o=t,l=r.x>=o.x&&r.x<=o.x+o.width,a=r.y>=o.y&&r.y<=o.y+o.height;if(!l||!a)continue;let s=oe(n,o.blockId);if(s===-1)continue;let f=n[s],u=i[s];if(!f||f.kind!=="table"||!u||u.kind!=="table")continue;let c=f,g=u,h=r.x-o.x,x=r.y-o.y,d=o.headerRowCount??0,m=d>0&&o.continuesFromPrev?Y(g,d):0,p=0,b=-1;if(g.rows.length===0||c.rows.length===0)continue;if(m>0&&x<m){let F=0;for(let w=0;w<d&&w<g.rows.length;w++){let L=g.rows[w];if(x>=F&&x<F+L.height){b=w;break}F+=L.height;}b===-1&&(b=0);}else {let F=x-m;for(let w=o.fromRow;w<o.toRow&&w<g.rows.length;w++){let L=g.rows[w];if(F>=p&&F<p+L.height){b=w;break}p+=L.height;}}if(b===-1&&(b=Math.min(o.toRow-1,g.rows.length-1),b<o.fromRow))continue;let k=g.rows[b],H=c.rows[b];if(!k||!H)continue;let M=0,T=-1;if(k.cells.length===0||H.cells.length===0)continue;for(let F=0;F<k.cells.length;F++){let w=k.cells[F];if(h>=M&&h<M+w.width){T=F;break}M+=w.width;}if(T===-1&&(T=k.cells.length-1,T<0))continue;let P=k.cells[T],S=H.cells[T];if(!P||!S)continue;let y=0;if(m>0&&b<d)for(let F=0;F<b;F++)y+=g.rows[F]?.height??0;else {y=m;for(let F=o.fromRow;F<b;F++)y+=g.rows[F]?.height??0;}let R=0;for(let F=0;F<T;F++)R+=k.cells[F]?.width??0;let X,I;if(S.blocks&&S.blocks.length>0){let F=S.blocks[0],w=P.blocks[0];F.kind==="paragraph"&&w?.kind==="paragraph"&&(X=F,I=w);}let E=h-R,C=x-y;return {fragment:o,block:c,measure:g,pageIndex:e.pageIndex,rowIndex:b,colIndex:T,cellBlock:X,cellMeasure:I,cellLocalX:Math.max(0,E),cellLocalY:Math.max(0,C)}}return null}function $e(e,n,i,r){let t={pageHit:null,fragmentHit:null,tableCellHit:null};if(t.pageHit=ne(e,r),!t.pageHit)return t;let o=A(e,t.pageHit.pageIndex),l={x:r.x,y:r.y-o};return t.fragmentHit=xe(t.pageHit,n,i,l),t.fragmentHit?.fragment.kind==="table"&&(t.tableCellHit=Te(t.pageHit,n,i,l)),t}function qe(e){if(e.pages.length===0)return 0;let n=e.pageGap??0,i=0;for(let r=0;r<e.pages.length;r++){let t=e.pages[r];i+=t.size?.h??e.pageSize.h,r<e.pages.length-1&&(i+=n);}return i}function je(e,n){return A(e,n)}function Je(e,n){if(n<0||n>=e.pages.length)return null;let i=A(e,n),t=e.pages[n].size?.h??e.pageSize.h;return {top:i,bottom:i+t}}function re(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function ke(e,n){let i=[];for(let r=n.fromRun;r<=n.toRun&&r<e.runs.length;r++){let t=e.runs[r];if(t){if(t.kind==="tab"||t.kind==="image"||t.kind==="lineBreak"){i.push(t);continue}if(t.kind==="text"){let o=t.text??"",l=r===n.fromRun,a=r===n.toRun;if(l||a){let s=l?n.fromChar:0,f=a?n.toChar:o.length,u=o.slice(s,f);u.length>0&&i.push({...t,text:u});}else i.push(t);}}}return i}function Fe(e,n){let i,r,t=e.pmStart??0,o=0;for(let l=0;l<e.runs.length&&l<=n.toRun;l++){let a=e.runs[l];a&&(l<n.fromRun?a.kind==="text"?o+=(a.text??"").length:(a.kind==="tab"||a.kind==="lineBreak"||a.kind==="image")&&(o+=1):l===n.fromRun&&(o+=n.fromChar,i=t+o,a.kind==="text"&&(o=n.fromChar)));}if(i!==void 0){let l=0;for(let a=n.fromRun;a<=n.toRun&&a<e.runs.length;a++){let s=e.runs[a];if(s)if(s.kind==="text"){let f=s.text??"",u=a===n.fromRun?n.fromChar:0,c=a===n.toRun?n.toChar:f.length;l+=c-u;}else (s.kind==="tab"||s.kind==="lineBreak"||s.kind==="image")&&(l+=1);}r=i+l;}return {pmStart:i,pmEnd:r}}function Ke(e,n,i,r){let t=0;for(let o=i;o<r&&o<e.lines.length;o++){let a=e.lines[o].lineHeight;if(n>=t&&n<t+a)return o;t+=a;}return r>i?Math.min(r-1,e.lines.length-1):null}function Qe(e,n$1,i,r){let{pmStart:t,pmEnd:o}=Fe(e,n$1);if(t===void 0||o===void 0)return {charOffset:0,pmPosition:e.pmStart??0};let l=e.attrs?.alignment??"left",a=0;l==="center"?a=Math.max(0,(r-n$1.width)/2):l==="right"&&(a=Math.max(0,r-n$1.width));let s=Math.max(0,i-a);if(s<=0)return {charOffset:0,pmPosition:t};let f=ke(e,n$1);if(f.length===0)return {charOffset:0,pmPosition:t};let u=0,c=0;for(let h of f){if(h.kind==="tab"){let x=h.width??48,d=u+x;if(s<=d){let m=u+x/2;return s<m?{charOffset:c,pmPosition:t+c}:{charOffset:c+1,pmPosition:t+c+1}}u=d,c+=1;continue}if(h.kind==="image"){let x=h.width,d=u+x;if(s<=d){let m=u+x/2;return s<m?{charOffset:c,pmPosition:t+c}:{charOffset:c+1,pmPosition:t+c+1}}u=d,c+=1;continue}if(h.kind==="lineBreak"){if(s>=u)return {charOffset:c,pmPosition:t+c};c+=1;continue}if(h.kind==="text"){let x=h.text??"";if(x.length===0)continue;let d=re(h),m$1=m(x,d),p=u+m$1.width;if(s<=p){let b=s-u,k=n(b,m$1.charWidths),H=c+k;return {charOffset:H,pmPosition:t+H}}u=p,c+=x.length;}}return {charOffset:o-t,pmPosition:o}}function ie(e){let{fragment:n,block:i,measure:r,localX:t,localY:o}=e;if(n.kind!=="paragraph"||i.kind!=="paragraph"||r.kind!=="paragraph")return null;let l=n,a=i,s=r,f=Ke(s,o,l.fromLine,l.toLine);if(f===null)return null;let u=s.lines[f];if(!u)return null;let c=0;for(let k=l.fromLine;k<f;k++)c+=s.lines[k]?.lineHeight??0;let g=a.attrs?.indent,h=g?.left??0,x=g?.right??0,d=Math.max(0,n.width-h-x),m=t-h,{charOffset:p,pmPosition:b}=Qe(a,u,m,d);return {pmPosition:b,charOffset:p,lineIndex:f}}function Me(e){let{cellBlock:n,cellMeasure:i,cellLocalX:r,cellLocalY:t}=e;if(!n||!i)return null;let o={fragment:{kind:"paragraph",blockId:n.id,x:0,y:0,width:i.lines.reduce((a,s)=>Math.max(a,s.width),100),fromLine:0,toLine:i.lines.length,height:i.totalHeight},block:n,measure:i,pageIndex:e.pageIndex,localX:r,localY:t};return ie(o)?.pmPosition??null}function Ze(e,n){if(n)return Me(n);if(!e)return null;let{fragment:i}=e;return i.kind==="paragraph"?ie(e)?.pmPosition??null:i.kind==="image"?i.pmStart??null:null}function ye(e,n,i,r){let t=e.pmStart??0,o=e.pmEnd??t;if(i<t||i>o)return null;let l=i-t;for(let a=0;a<n.lines.length;a++){let s=n.lines[a],{pmStart:f,pmEnd:u}=Fe(e,s);if(f===void 0||u===void 0)continue;let c=f-t,g=u-t;if(l>=c&&l<=g){let h=l-c,x=ke(e,s),d=0,m$1=0;for(let p of x)if(p.kind==="tab"){if(h<=m$1+1)return h<=m$1?{x:d,lineIndex:a}:{x:d+(p.width??48),lineIndex:a};d+=p.width??48,m$1+=1;}else if(p.kind==="image"){if(h<=m$1+1)return h<=m$1?{x:d,lineIndex:a}:{x:d+p.width,lineIndex:a};d+=p.width,m$1+=1;}else if(p.kind==="lineBreak"){if(h<=m$1)return {x:d,lineIndex:a};m$1+=1;}else if(p.kind==="text"){let b=p.text??"";if(h<=m$1+b.length){let M=h-m$1,T=re(p),P=m(b.slice(0,M),T);return {x:d+P.width,lineIndex:a}}let k=re(p),H=m(b,k);d+=H.width,m$1+=b.length;}return {x:d,lineIndex:a}}}return null}function et(e,n,i,r,t,o,l){let a=ye(e,n,i);if(!a)return null;let s=e.attrs?.alignment??"left",f=e.attrs?.indent,u=f?.left??0,c=f?.right??0,g=Math.max(0,o-u-c),h=n.lines[a.lineIndex];if(!h)return null;let x=0;s==="center"?x=Math.max(0,(g-h.width)/2):s==="right"&&(x=Math.max(0,g-h.width));let d=0;for(let m=l;m<a.lineIndex;m++)d+=n.lines[m]?.lineHeight??0;return {x:r+u+x+a.x,y:t+d,height:h.lineHeight}}function tt(e,n,i={}){let r=i.scope??"body",t=r==="body"?"layout-page-content":`layout-page-${r}`,o=`.${t} .layout-table-cell`,l=e.querySelectorAll(`.${t} .layout-table-cell-selected`);for(let c of Array.from(l))c.classList.remove("layout-table-cell-selected");let a=n.selection;if(!("$anchorCell"in a&&typeof a.forEachCell=="function")||!a.forEachCell)return;let f=[];a.forEachCell((c,g)=>{f.push([g,g+c.nodeSize]);});let u=e.querySelectorAll(o);for(let c of Array.from(u)){let g=c,h=g.dataset.pmStart;if(h===void 0)continue;let x=Number(h);for(let[d,m]of f)if(x>=d&&x<m){g.classList.add("layout-table-cell-selected");break}}}function He(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function ae(e,n){return e.findIndex(i=>i.id===n)}function V(e,n){let r=(e.pmStart??0)+1,t=0,o;for(let s=0;s<e.runs.length&&s<=n.toRun;s++){let f=e.runs[s];if(f){if(s<n.fromRun)f.kind==="text"?t+=(f.text??"").length:t+=1;else if(s===n.fromRun){t+=n.fromChar,o=r+t;break}}}o===void 0&&(o=r);let l=0;for(let s=n.fromRun;s<=n.toRun&&s<e.runs.length;s++){let f=e.runs[s];if(f)if(f.kind==="text"){let u=f.text??"",c=s===n.fromRun?n.fromChar:0,g=s===n.toRun?n.toChar:u.length;l+=g-c;}else l+=1;}let a=o+l;return {pmStart:o,pmEnd:a}}function we(e,n,i,r){let t=[];for(let o=0;o<n.lines.length;o++){let l=n.lines[o],a=V(e,l);a.pmStart===void 0||a.pmEnd===void 0||a.pmEnd>i&&a.pmStart<r&&t.push({line:l,index:o});}return t}function W(e,n,i){let r=V(e,n);return r.pmStart===void 0?0:Math.max(0,i-r.pmStart)}function G(e,n,i,r){let t=0,o=0;for(let l=n.fromRun;l<=n.toRun&&l<e.runs.length;l++){let a=e.runs[l];if(a){if(a.kind==="tab"){let s=a.width??48;if(o+1>=i)return i<=o?t:t+s;t+=s,o+=1;continue}if(a.kind==="image"){let s=a.width;if(o+1>=i)return i<=o?t:t+s;t+=s,o+=1;continue}if(a.kind==="lineBreak"){if(i<=o)return t;o+=1;continue}if(a.kind==="text"){let s=a.text??"",f=l===n.fromRun,u=l===n.toRun,c=f?n.fromChar:0,g=u?n.toChar:s.length,h=s.slice(c,g);if(o+h.length>=i){let m$1=i-o,p=He(a),b=m(h.slice(0,m$1),p);return t+b.width}let x=He(a),d=m(h,x);t+=d.width,o+=h.length;}}}return t}function J(e,n){let i=0;for(let r=0;r<n&&r<e.lines.length;r++)i+=e.lines[r].lineHeight;return i}function nt(e,n,i,r,t){if(r===t)return [];let o=Math.min(r,t),l=Math.max(r,t),a=[];for(let s=0;s<e.pages.length;s++){let f=e.pages[s],u=A(e,s);for(let c of f.fragments){if(c.kind==="paragraph"){let g=ae(n,c.blockId);if(g===-1)continue;let h=n[g],x=i[g];if(!h||h.kind!=="paragraph"||!x||x.kind!=="paragraph")continue;let d=h,m=x,p=c,b=we(d,m,o,l);for(let{line:k,index:H}of b){if(H<p.fromLine||H>=p.toLine)continue;let M=V(d,k);if(M.pmStart===void 0||M.pmEnd===void 0)continue;let T=Math.max(M.pmStart,o),P=Math.min(M.pmEnd,l);if(T>=P)continue;let S=W(d,k,T),y=W(d,k,P),B=d.attrs?.indent,R=B?.left??0,X=B?.right??0,I=Math.max(0,c.width-R-X),E=G(d,k,S),C=G(d,k,y),F=d.attrs?.alignment??"left",w=0;F==="center"?w=Math.max(0,(I-k.width)/2):F==="right"&&(w=Math.max(0,I-k.width));let L=J(m,H)-J(m,p.fromLine),D=c.x+R+w+Math.min(E,C),Y=Math.max(1,Math.abs(C-E)),z=c.y+L;a.push({x:D,y:z+u,width:Y,height:k.lineHeight,pageIndex:s});}}if(c.kind==="table"){let g=ae(n,c.blockId);if(g===-1)continue;let h=n[g],x=i[g];if(!h||h.kind!=="table"||!x||x.kind!=="table")continue;let d=h,m=x,p=c,b=[],k=0;for(let y=0;y<m.rows.length;y++)b.push(Math.round(k)),k+=m.rows[y]?.height??0;b.push(Math.round(k));let H=p.headerRowCount??0,M=H>0&&p.continuesFromPrev?Y(m,H):0,T=(b[p.fromRow]??0)+(p.topClip??0),P=p.bottomClip!==void 0?Math.round(p.height):M+((b[p.toRow]??0)-T),S=y=>M+(y-T);for(let y=p.fromRow;y<p.toRow&&y<d.rows.length;y++){let B=d.rows[y],R=m.rows[y];if(!B||!R)continue;let X=b[y]??0,I=0;for(let E=0;E<B.cells.length;E++){let C=B.cells[E],F=R.cells[E];if(!C||!F)continue;let w=C.padding?.top??0,L=O(C.blocks,F.blocks,w);for(let D=0;D<C.blocks.length;D++){let Y=C.blocks[D],z=F.blocks[D];if(!Y||Y.kind!=="paragraph"||!z||z.kind!=="paragraph")continue;let O=Y,_e=z,Xe=L.lineTops[D]??[],Oe=we(O,_e,o,l);for(let{line:v,index:Ne}of Oe){let q=V(O,v);if(q.pmStart===void 0||q.pmEnd===void 0)continue;let se=Math.max(q.pmStart,o),ce=Math.min(q.pmEnd,l);if(se>=ce)continue;let Q=S(X+(Xe[Ne]??0));if(Q+v.lineHeight<=M||Q>=P)continue;let Ye=W(O,v,se),ze=W(O,v,ce),ue=G(O,v,Ye,F.width),fe=G(O,v,ze,F.width);a.push({x:p.x+I+Math.min(ue,fe),y:p.y+Q+u,width:Math.max(1,Math.abs(fe-ue)),height:v.lineHeight,pageIndex:s});}}I+=F.width;}}}if(c.kind==="image"){let g=c.pmStart??0;(c.pmEnd??g+1)>o&&g<l&&a.push({x:c.x,y:c.y+u,width:c.width,height:c.height,pageIndex:s});}}}return a}function ot(e,n,i,r){for(let t=0;t<e.pages.length;t++){let o=e.pages[t],l=A(e,t);for(let a of o.fragments){if(a.kind==="paragraph"){let s=ae(n,a.blockId);if(s===-1)continue;let f=n[s],u=i[s];if(!f||f.kind!=="paragraph"||!u||u.kind!=="paragraph")continue;let c=f,g=u,h=a,x=c.pmStart??0,d=c.pmEnd??x;if(r<x||r>d)continue;for(let m=h.fromLine;m<h.toLine;m++){let p=g.lines[m];if(!p)continue;let b=V(c,p);if(!(b.pmStart===void 0||b.pmEnd===void 0)&&r>=b.pmStart&&r<=b.pmEnd){let k=W(c,p,r),H=c.attrs?.indent,M=H?.left??0,T=H?.right??0,P=Math.max(0,a.width-M-T),S=G(c,p,k),y=c.attrs?.alignment??"left",B=0;y==="center"?B=Math.max(0,(P-p.width)/2):y==="right"&&(B=Math.max(0,P-p.width));let R=J(g,m)-J(g,h.fromLine);return {x:a.x+M+B+S,y:a.y+R+l,height:p.lineHeight,pageIndex:t}}}}if(a.kind==="image"){let s=a.pmStart??0,f=a.pmEnd??s+1;if(r>=s&&r<=f){let u=r===s?0:a.width;return {x:a.x+u,y:a.y+l,height:a.height,pageIndex:t}}}}}return null}function rt(e){return e.length<=1?false:new Set(e.map(i=>i.pageIndex)).size>1}function it(e){let n=new Map;for(let i of e){let r=n.get(i.pageIndex)??[];r.push(i),n.set(i.pageIndex,r);}return n}function at(e){if(e.kind!=="paragraph")return false;let n=e.attrs;return n?!!(n.borders?.top||n.borders?.bottom||n.spacingExplicit?.before||n.spacingExplicit?.after):false}function Pe(e){return Se(e)}function Se(e){let n=new Set;for(let i=1;i<e.length;i++){let r=e[i-1],t=e[i];r.kind==="table"&&t.kind==="paragraph"&&(t.runs.length>0||at(t)||n.add(i));}return e.map((i,r)=>{if(i.kind==="table")return lt(i);if(i.kind!=="paragraph")return i;let t=n.has(r),o=i.attrs?.spacingExplicit,l=i.attrs?.spacing?.before!=null,a=i.attrs?.spacing?.after!=null,s=l&&!o?.before,f=a&&!o?.after,u=s||f;if(!u&&!t)return i;let c=i.attrs;return u&&c?.spacing&&(c={...c,spacing:{...c.spacing,before:o?.before?c.spacing.before:void 0,after:o?.after?c.spacing.after:void 0}}),t&&(c={...c??{},suppressEmptyParagraphHeight:true}),{...i,attrs:c}})}function lt(e){let n=false,i=e.rows.map(r=>{let t=false,o=r.cells.map(l=>{let a=Se(l.blocks);return a.some((f,u)=>f!==l.blocks[u])?(t=true,{...l,blocks:a}):l});return t?(n=true,{...r,cells:o}):r});return n?{...e,rows:i}:e}function st(e){return e?.align??e?.alignment}function Be(e,n,i,r){let t=r.section==="header"?r.margins.header??48:r.pageSize.h-(r.margins.footer??48)-i,o=e.position?.vertical;if(!o)return n;let l=st(o),a=o.posOffset!==void 0?f$1(o.posOffset):void 0;if(o.relativeTo==="page"){if(a!==void 0)return a-t;if(l==="top")return -t;if(l==="bottom")return r.pageSize.h-e.height-t;if(l==="center")return (r.pageSize.h-e.height)/2-t}if(o.relativeTo==="margin"){let s=r.margins.top,f=r.pageSize.h-r.margins.top-r.margins.bottom;if(a!==void 0)return s+a-t;if(l==="top")return s-t;if(l==="bottom")return s+f-e.height-t;if(l==="center")return s+(f-e.height)/2-t}return a!==void 0?n+a:n}function Re(e){switch(e.kind){case "paragraph":case "table":return true;case "image":return !e.anchor?.isAnchored;case "textBox":return e.displayMode===void 0||e.displayMode==="inline";default:return false}}function ct(e){return e?e.kind==="paragraph"||e.kind==="table"?e.totalHeight:e.kind==="image"||e.kind==="textBox"?e.height:0:0}function Ie(e,n,i,r){let t=0,o=0,l=0;for(let a=0;a<e.length;a++){let s=e[a],f=n[a];if(!(!s||!f)){if(s.kind==="paragraph"&&f.kind==="paragraph"){let u=l,c=u+f.totalHeight;t=Math.min(t,u),o=Math.max(o,c);for(let g of s.runs){if(g.kind!=="image"||!g.position)continue;let h=Be(g,u,i,r);t=Math.min(t,h),o=Math.max(o,h+g.height);}l=c;}else if(s.kind==="table"&&f.kind==="table"){let u=l+f.totalHeight;t=Math.min(t,l),o=Math.max(o,u),l=u;}else if(s.kind==="image"&&f.kind==="image"){let u=l+f.height;t=Math.min(t,l),o=Math.max(o,u),l=u;}else if(s.kind==="textBox"&&f.kind==="textBox"){let u=l+f.height;t=Math.min(t,l),o=Math.max(o,u),s.displayMode!=="float"&&(l=u);}}}return {visualTop:t,visualBottom:o}}function ut(e,n,i,r){if(!e||!e.content||e.content.length===0)return;let t=b(e.content,{styles:r.styles??void 0,theme:r.theme??null,defaultTabStopTwips:r.defaultTabStopTwips??null});return Ce(t,n,i,r)}function Ce(e,n,i,r){let t=c(e,{theme:r.theme??void 0});if(t.length===0)return;let o=Pe(t),l=r.measureBlocks(o,n),a=0,s=0;for(let c=0;c<o.length;c++){let g=ct(l[c]);a+=g,Re(o[c])&&(s+=g);}let{visualTop:f,visualBottom:u}=Ie(o,l,a,i);return {blocks:o,measures:l,height:a,flowHeight:s,visualTop:f,visualBottom:u}}var K={header:null,footer:null};function ft(){K.header=null,K.footer=null;}function Ee(e,n){let i=n.querySelectorAll(`.layout-page-${e}`);if(i.length===0)return null;let r=n.defaultView,t=r?r.innerHeight/2:0,o=i[0],l=1/0;for(let c of Array.from(i)){let g=c.getBoundingClientRect(),h=Math.abs((g.top+g.bottom)/2-t);h<l&&(l=h,o=c);}let a=K[e];if(a&&a.host===o&&a.host.isConnected)return a;let s=Array.from(o.querySelectorAll("span[data-pm-start][data-pm-end]")),f=Array.from(o.querySelectorAll("[data-pm-start][data-pm-end]")),u={host:o,spans:s,ranged:f};return K[e]=u,u}function dt(e,n,i=globalThis.document){let r=e.state.selection;if(!r.empty)return null;let t=r.head,o=Ee(n,i);if(!o)return null;let{host:l,spans:a}=o;for(let d of a){let m=Number(d.dataset.pmStart),p=Number(d.dataset.pmEnd);if(!(!Number.isFinite(m)||!Number.isFinite(p))&&t>=m&&t<=p){let b=l.ownerDocument.createRange(),k=l.ownerDocument.createTreeWalker(d,NodeFilter.SHOW_TEXT),H=t-m,M=k.nextNode();for(;M;){let S=M.data.length;if(H<=S){try{b.setStart(M,H),b.setEnd(M,H);let y=b.getClientRects()[0]??b.getBoundingClientRect();if(y&&y.height>0)return {top:y.top,left:y.left,height:y.height}}catch{}break}H-=S,M=k.nextNode();}let T=d.getBoundingClientRect(),P=(t-m)/Math.max(1,p-m);return {top:T.top,left:T.left+T.width*P,height:T.height}}}let s=l.querySelector(`[data-pm-start="${t}"]`);if(s){let d=s.getBoundingClientRect();return {top:d.top,left:d.left+1,height:d.height||16}}let f=o.ranged,u=null,c=1/0;for(let d of f){let m=Number(d.dataset.pmStart),p=Number(d.dataset.pmEnd);if(!Number.isFinite(m)||!Number.isFinite(p)||t<m||t>p)continue;let b=p-m;b<c&&(c=b,u=d);}if(u){let d=u.getBoundingClientRect(),m=Number(u.dataset.pmEnd),p=t>=m;return {top:d.top,left:p?d.right:d.left+1,height:d.height||16}}let g=null,h=-1/0;for(let d of f){let m=Number(d.dataset.pmStart);Number.isFinite(m)&&(m>t||m>h&&(h=m,g=d));}if(g){let d=g.getBoundingClientRect();return {top:d.top,left:d.right,height:d.height||16}}let x=l.getBoundingClientRect();return {top:x.top+2,left:x.left+2,height:16}}function mt(e,n,i=globalThis.document){let r=e.state.selection;if(r.empty)return [];let t=r.from,o=r.to,l=[],a=Ee(n,i);if(!a)return l;let{host:s,spans:f}=a;for(let u of f){let c=Number(u.dataset.pmStart),g=Number(u.dataset.pmEnd);if(!Number.isFinite(c)||!Number.isFinite(g)||g<=t||c>=o)continue;if(u.classList.contains("layout-run-tab")){let p=u.getBoundingClientRect();l.push({top:p.top,left:p.left,width:p.width,height:p.height});continue}let h=null;if(u.firstChild?.nodeType===Node.TEXT_NODE?h=u.firstChild:u.firstChild?.nodeType===Node.ELEMENT_NODE&&u.firstChild.tagName==="A"&&u.firstChild.firstChild?.nodeType===Node.TEXT_NODE&&(h=u.firstChild.firstChild),!h)continue;let x=Math.max(0,t-c),d=Math.min(h.length,o-c);if(x>=d)continue;let m=s.ownerDocument.createRange();m.setStart(h,x),m.setEnd(h,d);for(let p of Array.from(m.getClientRects()))l.push({top:p.top,left:p.left,width:p.width,height:p.height});}return l}function Le(e){return e?e.flowHeight??e.height:0}function gt(e){let{pageSize:n,margins:i,finalMargins:r,bodyBlocks:t,headers:o,footers:l,warn:a}=e,s=i.header??48,f=i.footer??48,u=i.top-s,c=i.bottom-f,g=Math.max(0,...(o??[]).map(Le)),h=Math.max(0,...(l??[]).map(Le)),x=g>u,d=h>c;if(!x&&!d)return {margins:i,finalMargins:r};let m=Math.max(0,n.h-24),p=false,b=M=>{let T={...M};return x&&(T.top=Math.max(M.top,s+g)),d&&(T.bottom=Math.max(M.bottom,f+h)),T.top+T.bottom>m&&(p=true,T.bottom=Math.max(0,Math.min(T.bottom,m-T.top)),T.top+T.bottom>m&&(T.top=Math.max(0,m-T.bottom))),T},k=b(i),H=b(r);if(t)for(let M of t){if(M.kind!=="sectionBreak")continue;let T=M;T.margins&&(T.margins=b(T.margins));}return p&&a&&a(`[layout] header/footer content exceeds page height; clamping margins to preserve a content area. pageHeight=${Math.round(n.h)} headerBand=${Math.round(g)} footerBand=${Math.round(h)} top=${Math.round(k.top)} bottom=${Math.round(k.bottom)}`),{margins:k,finalMargins:H}}var Ae=816,De=1056,U=96,le=48;function $(e){return Math.round(e/1440*96)}function N(e,n){return e!=null?$(e):n}function ht(e){return {w:e?.pageWidth?$(e.pageWidth):Ae,h:e?.pageHeight?$(e.pageHeight):De}}function pt(e){return {top:N(e?.marginTop,U),right:N(e?.marginRight,U),bottom:N(e?.marginBottom,U),left:N(e?.marginLeft,U),header:N(e?.headerDistance,le),footer:N(e?.footerDistance,le)}}function bt(e,n){let i={header:null,footer:null,firstHeader:null,firstFooter:null};if(!e?.package)return i;let r=e.package.headers,t=e.package.footers,o=null,l=null,a=null,s=null;if(r&&n?.headerReferences){let f=n.headerReferences.find(c=>c.type==="default");f?.rId&&(o=r.get(f.rId)??null);let u=n.headerReferences.find(c=>c.type==="first");u?.rId&&(a=r.get(u.rId)??null);}if(t&&n?.footerReferences){let f=n.footerReferences.find(c=>c.type==="default");f?.rId&&(l=t.get(f.rId)??null);let u=n.footerReferences.find(c=>c.type==="first");u?.rId&&(s=t.get(u.rId)??null);}return n?.titlePg||(!o&&a&&(o=a),!l&&s&&(l=s)),{header:o,footer:l,firstHeader:a,firstFooter:s}}function xt(e){let n=e?.columnCount??1;if(n<=1)return;let i=$(e?.columnSpace??720);return {count:n,gap:i,equalWidth:e?.equalWidth??true,separator:e?.separator}}function ve(e){let n=e.pageSize.w-e.margins.left-e.margins.right,i=e.columns;return !i||i.count<=1?n:Math.floor((n-(i.count-1)*i.gap)/i.count)}function Tt(e,n,i){let{configs:r,breakIndices:t}=W$1(e,n,i),o=0,l=[];for(let a=0;a<e.length;a++)l.push(ve(r[o]??n)),o<t.length&&a===t[o]&&o++;return l}export{ut as A,Ce as B,ft as C,dt as D,mt as E,gt as F,Ae as G,De as H,U as I,le as J,$ as K,ht as L,pt as M,bt as N,xt as O,ve as P,Tt as Q,be as a,We as b,ne as c,A as d,Ge as e,xe as f,Ue as g,Te as h,$e as i,qe as j,je as k,Je as l,ie as m,Me as n,Ze as o,ye as p,et as q,tt as r,nt as s,ot as t,rt as u,it as v,Pe as w,Be as x,Re as y,Ie as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkPGWY6UFK_js=require('./chunk-PGWY6UFK.js'),chunkRQVHKDXK_js=require('./chunk-RQVHKDXK.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js');function K(t){return t.attrs.href||""}function z(t){return chunkPGWY6UFK_js.c(t,chunkPGWY6UFK_js.a)}function T(t){let e={};for(let n of t)switch(n.type.name){case "bold":e.bold=true,e.boldCs=true;break;case "italic":e.italic=true,e.italicCs=true;break;case "underline":{let i=n.attrs;e.underline={style:i.style||"single",color:i.color};break}case "strike":n.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":{let i=n.attrs;e.color={rgb:i.rgb,themeColor:i.themeColor,themeTint:i.themeTint,themeShade:i.themeShade};break}case "highlight":e.highlight=n.attrs.color;break;case "fontSize":e.fontSize=n.attrs.size,e.fontSizeCs=n.attrs.size;break;case "fontFamily":{let i=n.attrs;e.fontFamily={ascii:i.ascii,hAnsi:i.hAnsi,eastAsia:i.eastAsia||void 0,cs:i.cs||i.ascii||void 0,asciiTheme:i.asciiTheme,hAnsiTheme:i.hAnsiTheme||void 0,eastAsiaTheme:i.eastAsiaTheme||void 0,csTheme:i.csTheme||void 0};break}case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break;case "allCaps":e.allCaps=true;break;case "smallCaps":e.smallCaps=true;break;case "characterSpacing":{n.attrs.spacing!=null&&(e.spacing=n.attrs.spacing),n.attrs.position!=null&&(e.position=n.attrs.position),n.attrs.scale!=null&&(e.scale=n.attrs.scale),n.attrs.kerning!=null&&(e.kerning=n.attrs.kerning);break}case "emboss":e.emboss=true;break;case "imprint":e.imprint=true;break;case "textShadow":e.shadow=true;break;case "emphasisMark":e.emphasisMark=n.attrs.type||"dot";break;case "textOutline":e.outline=true;break;case "hidden":e.hidden=true;break;case "rtl":e.rtl=true;break;case "textEffect":e.effect=n.attrs.effect||"blinkBackground";break;case "runStyle":n.attrs.styleId&&(e.styleId=n.attrs.styleId);break}return e}function V(t){let e=t.attrs.href;return e?.startsWith("#")?{type:"hyperlink",anchor:e.substring(1),tooltip:t.attrs.tooltip||void 0,children:[]}:{type:"hyperlink",href:e,tooltip:t.attrs.tooltip||void 0,rId:t.attrs.rId||void 0,children:[]}}function M(t,e){let n=e.marks.filter(i=>i.type.name!=="hyperlink");e.isText&&e.text?t.children.push(w(e.text,n)):e.type.name==="tab"?t.children.push(S()):e.type.name==="hardBreak"&&t.children.push(v());}function w(t,e){let n=T(e),i={type:"text",text:t};return {type:"run",formatting:Object.keys(n).length>0?n:void 0,content:[i]}}function U(t,e){let n=t.content[t.content.length-1];n&&n.type==="text"?n.text+=e:t.content.push({type:"text",text:e});}function v(){return {type:"run",content:[{type:"break",breakType:"textWrapping"}]}}function S(){return {type:"run",content:[{type:"tab"}]}}function $(t,e){let n=t.attrs,i=e&&e.length>0?T(e):void 0,r=n.displayText||"";if(!r)switch(n.fieldType){case "PAGE":r="1";break;case "NUMPAGES":r="1";break;default:r=" ";break}let o={type:"run",content:[{type:"text",text:r}],...i&&Object.keys(i).length>0?{formatting:i}:{}};return n.fieldKind==="complex"?{type:"complexField",instruction:n.instruction,fieldType:n.fieldType,fieldCode:[],fieldResult:[o],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}:{type:"simpleField",instruction:n.instruction,fieldType:n.fieldType,content:[o],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}}function J(t){let e=t.attrs;return {type:"mathEquation",display:e.display||"inline",ommlXml:e.ommlXml,plainText:e.plainText||void 0}}function I(t){let e=t.attrs,i={type:e.wrapType||"inline"};e.distTop!==void 0&&(i.distT=chunkBJSG6TEG_js.g(e.distTop)),e.distBottom!==void 0&&(i.distB=chunkBJSG6TEG_js.g(e.distBottom)),e.distLeft!==void 0&&(i.distL=chunkBJSG6TEG_js.g(e.distLeft)),e.distRight!==void 0&&(i.distR=chunkBJSG6TEG_js.g(e.distRight)),e.wrapText&&(i.wrapText=e.wrapText);let r={type:"image",rId:e.rId||"",src:e.src,alt:e.alt||void 0,title:e.title||void 0,size:{width:chunkBJSG6TEG_js.g(e.width||0),height:chunkBJSG6TEG_js.g(e.height||0)},wrap:i};if(e.transform){let a=e.transform,l={},d=a.match(/rotate\(([-\d.]+)deg\)/);d&&(l.rotation=parseFloat(d[1])),a.includes("scaleX(-1)")&&(l.flipH=true),a.includes("scaleY(-1)")&&(l.flipV=true),(l.rotation||l.flipH||l.flipV)&&(r.transform=l);}if(e.position?.horizontal&&e.position?.vertical){let a=e.position;r.position={horizontal:{relativeTo:a.horizontal.relativeTo||"column",alignment:a.horizontal.align,posOffset:a.horizontal.posOffset},vertical:{relativeTo:a.vertical.relativeTo||"paragraph",alignment:a.vertical.align,posOffset:a.vertical.posOffset}};}if(e.borderWidth&&e.borderWidth>0){let a={solid:"solid",dotted:"dot",dashed:"dash",double:"solid",groove:"solid",ridge:"solid",inset:"solid",outset:"solid"};r.outline={width:chunkBJSG6TEG_js.g(e.borderWidth),color:e.borderColor?{rgb:e.borderColor.replace("#","")}:void 0,style:e.borderStyle&&a[e.borderStyle]||"solid"};}if(e.hlinkHref&&(r.hlinkHref=e.hlinkHref),e.cropTop!==void 0||e.cropRight!==void 0||e.cropBottom!==void 0||e.cropLeft!==void 0){let a={};e.cropTop!==void 0&&e.cropTop!==null&&(a.top=e.cropTop),e.cropRight!==void 0&&e.cropRight!==null&&(a.right=e.cropRight),e.cropBottom!==void 0&&e.cropBottom!==null&&(a.bottom=e.cropBottom),e.cropLeft!==void 0&&e.cropLeft!==null&&(a.left=e.cropLeft),Object.keys(a).length>0&&(r.crop=a);}if(e.opacity!==void 0&&e.opacity!==null&&e.opacity<1&&(r.opacity=e.opacity),e.layoutInCell!==void 0&&e.layoutInCell!==null&&(r.layoutInCell=e.layoutInCell),e.allowOverlap!==void 0&&e.allowOverlap!==null&&(r.allowOverlap=e.allowOverlap),e.effectExtentTop||e.effectExtentBottom||e.effectExtentLeft||e.effectExtentRight){let a={};e.effectExtentTop&&(a.top=chunkBJSG6TEG_js.g(e.effectExtentTop)),e.effectExtentBottom&&(a.bottom=chunkBJSG6TEG_js.g(e.effectExtentBottom)),e.effectExtentLeft&&(a.left=chunkBJSG6TEG_js.g(e.effectExtentLeft)),e.effectExtentRight&&(a.right=chunkBJSG6TEG_js.g(e.effectExtentRight)),Object.keys(a).length>0&&(r.padding=a);}return {type:"run",content:[{type:"drawing",image:r}]}}function B(t){let e=t.attrs,n={type:"shape",shapeType:e.shapeType||"rect",id:e.shapeId||void 0,size:{width:e.width?chunkBJSG6TEG_js.g(e.width):0,height:e.height?chunkBJSG6TEG_js.g(e.height):0}};if(e.fillType==="gradient"&&e.gradientStops)try{let r=JSON.parse(e.gradientStops);n.fill={type:"gradient",gradient:{type:e.gradientType||"linear",angle:e.gradientAngle||void 0,stops:r.map(o=>({position:o.position,color:{rgb:o.color.replace("#","")}}))}};}catch{n.fill={type:"solid",color:{rgb:(e.fillColor||"000000").replace("#","")}};}else e.fillColor?n.fill={type:e.fillType||"solid",color:{rgb:e.fillColor.replace("#","")}}:e.fillType==="none"&&(n.fill={type:"none"});if(e.outlineWidth&&e.outlineWidth>0){let r={solid:"solid",dotted:"dot",dashed:"dash"};n.outline={width:chunkBJSG6TEG_js.g(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&r[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:n}]}}function x(t){let e=t.attrs,n=Q(G(t),t);n=re(n,t);let i=e.bookmarks;if(i&&i.length>0){let o=i.map(l=>({type:"bookmarkStart",id:l.id,name:l.name})),a=i.map(l=>({type:"bookmarkEnd",id:l.id}));n=[...o,...n,...a];}let r={type:"paragraph",paraId:e.paraId||void 0,textId:e.textId||void 0,formatting:se(e),content:n};return e.renderedPageBreakBefore&&(r.renderedPageBreakBefore=true),e.pPrIns&&(r.pPrIns={id:e.pPrIns.revisionId,author:e.pPrIns.author,...e.pPrIns.date?{date:e.pPrIns.date}:{}}),e.pPrDel&&(r.pPrDel={id:e.pPrDel.revisionId,author:e.pPrDel.author,...e.pPrDel.date?{date:e.pPrDel.date}:{}}),e.pPrChange&&e.pPrChange.length>0&&(r.propertyChanges=e.pPrChange),e._sectionProperties?r.sectionProperties=e._sectionProperties:e.sectionBreakType&&(r.sectionProperties={sectionStart:e.sectionBreakType}),r}function Q(t,e){let n=e.attrs._originalRunBoundaries;if(!n||n.length===0||!t.every(a=>a.type==="run"))return t;let i=t;if(!i.every(Z))return t;let r=i.map(F).join(""),o=n.map(a=>a.text).join("");return r!==o||!ee(e,n)?t:te(i,n)??t}function Z(t){return t.content.every(e=>e.type==="text")}function F(t){return t.content.map(e=>e.type==="text"?e.text:"").join("")}function ee(t,e){let n=0,i=0,r=true;if(t.forEach(o=>{if(!r)return;if(!o.isText){r=false;return}let a=chunkPGWY6UFK_js.c(o.marks,chunkPGWY6UFK_js.b),l=o.text??"",d=0;for(;d<l.length;){for(;n<e.length&&e[n].text.length===0;)n++;let s=e[n];if(!s||a!==(s.marksKey??"")){r=false;return}let u=s.text.length-i,c=l.length-d,p=Math.min(u,c),m=l.slice(d,d+p),g=s.text.slice(i,i+p);if(m!==g){r=false;return}d+=p,i+=p,i===s.text.length&&(n++,i=0);}}),!r)return false;for(;n<e.length&&e[n].text.length===0;)n++;return n===e.length&&i===0}function te(t,e){let n=[],i={runIndex:0,runOffset:0};for(let r of e){if(r.text.length===0){n.push(ne(r));continue}let o=ie(t,i,r.text.length);if(!o)return null;r.propertyChanges&&r.propertyChanges.length>0&&(o.propertyChanges=r.propertyChanges),n.push(o);}for(;i.runIndex<t.length;){if(F(t[i.runIndex]).length-i.runOffset>0)return null;i.runIndex++,i.runOffset=0;}return n}function ne(t){let e={type:"run",content:[]};return t.formatting&&Object.keys(t.formatting).length>0&&(e.formatting=t.formatting),t.propertyChanges&&t.propertyChanges.length>0&&(e.propertyChanges=t.propertyChanges),e}function ie(t,e,n){let i=n,r="",o,a;for(;i>0;){let d=t[e.runIndex];if(!d)return null;let s=F(d),u=s.length-e.runOffset;if(u<=0){e.runIndex++,e.runOffset=0;continue}let c=JSON.stringify(d.formatting??null);if(a==null)o=d.formatting,a=c;else if(a!==c)return null;let p=Math.min(i,u);r+=s.slice(e.runOffset,e.runOffset+p),e.runOffset+=p,i-=p,e.runOffset===s.length&&(e.runIndex++,e.runOffset=0);}let l={type:"run",content:[{type:"text",text:r}]};return o&&Object.keys(o).length>0&&(l.formatting=o),l}function re(t,e){let n=new Set;if(e.forEach(a=>{for(let l of a.marks)l.type.name==="comment"&&n.add(l.attrs.commentId);}),n.size===0)return t;let i=[],r=new Set,o={index:0};for(e.forEach(a=>{let l=new Set;for(let d of a.marks)d.type.name==="comment"&&l.add(d.attrs.commentId);for(let d of [...r])l.has(d)||(i.push({type:"commentRangeEnd",id:d}),r.delete(d));for(let d of l)r.has(d)||(i.push({type:"commentRangeStart",id:d}),r.add(d));oe(i,t,o,a);});o.index<t.length;)i.push(t[o.index]),o.index++;for(let a of r)i.push({type:"commentRangeEnd",id:a});return i}function oe(t,e,n,i){if(!i.isText){ae(t,e,n);return}let r=(i.text??"").length;for(;r>0&&n.index<e.length;){let o=e[n.index];t.push(o),n.index++,r-=q(o);}}function ae(t,e,n){n.index>=e.length||(t.push(e[n.index]),n.index++);}function q(t){switch(t.type){case "run":return le(t);case "hyperlink":return k(t.children);case "simpleField":return k(t.content);case "complexField":return k(t.fieldResult);case "inlineSdt":return k(t.content);case "insertion":case "deletion":case "moveFrom":case "moveTo":return k(t.content);case "mathEquation":return t.plainText?.length??0;default:return 0}}function k(t){return t.reduce((e,n)=>e+q(n),0)}function le(t){return t.content.reduce((e,n)=>{switch(n.type){case "text":case "instrText":return e+n.text.length;case "symbol":return e+n.char.length;case "tab":case "softHyphen":case "noBreakHyphen":return e+1;default:return e}},0)}function X(t){return t.numPrFromStyle!=null&&t.numPr!=null&&JSON.stringify(t.numPr)===JSON.stringify(t.numPrFromStyle)}function se(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.alignment!==(n.alignment||void 0)&&(i.alignment=t.alignment||void 0),X(t)?(delete i.numPr,delete i.numPrFromStyle):t.numPr!==n.numPr&&JSON.stringify(t.numPr)!==JSON.stringify(n.numPr)&&(i.numPr=t.numPr||void 0,delete i.numPrFromStyle),t.styleId!==(n.styleId||void 0)&&(i.styleId=t.styleId||void 0),t.pageBreakBefore!==(n.pageBreakBefore||void 0)&&(i.pageBreakBefore=t.pageBreakBefore||void 0),t.bidi!==(n.bidi||void 0)&&(i.bidi=t.bidi||void 0),i}if(t.alignment||t.spaceBefore||t.spaceAfter||t.lineSpacing||t.indentLeft||t.indentRight||t.indentFirstLine||t.numPr||t.styleId||t.borders||t.shading||t.tabs||t.outlineLevel!=null||t.contextualSpacing||t.pageBreakBefore||t.bidi)return {alignment:t.alignment||void 0,spaceBefore:t.spaceBefore||void 0,spaceAfter:t.spaceAfter||void 0,lineSpacing:t.lineSpacing||void 0,lineSpacingRule:t.lineSpacingRule||void 0,indentLeft:t.indentLeft||void 0,indentRight:t.indentRight||void 0,indentFirstLine:t.indentFirstLine||void 0,hangingIndent:t.hangingIndent||void 0,numPr:X(t)?void 0:t.numPr||void 0,styleId:t.styleId||void 0,borders:t.borders||void 0,shading:t.shading||void 0,tabs:t.tabs||void 0,outlineLevel:t.outlineLevel??void 0,contextualSpacing:t.contextualSpacing||void 0,pageBreakBefore:t.pageBreakBefore||void 0,bidi:t.bidi||void 0}}function G(t){let e=[],n=null,i=null,r=null;return t.forEach(o=>{let a=o.marks.find(u=>u.type.name==="footnoteRef");if(a){n&&(e.push(n),n=null,i=null),r&&(e.push(r),r=null);let c={type:a.attrs.noteType==="endnote"?"endnoteRef":"footnoteRef",id:parseInt(a.attrs.id,10)||0};e.push({type:"run",content:[c]});return}let l=o.marks.find(u=>u.type.name==="insertion"),d=o.marks.find(u=>u.type.name==="deletion");if(l||d){n&&(e.push(n),n=null,i=null),r&&(e.push(r),r=null);let u=l||d,c;if(o.type.name==="image")c=I(o);else if(o.type.name==="shape")c=B(o);else {let g=o.marks.filter(y=>y.type.name!=="insertion"&&y.type.name!=="deletion"),h=T(g);c={type:"run",content:o.isText&&o.text?[{type:"text",text:o.text}]:[],...Object.keys(h).length>0?{formatting:h}:{}};}let p={id:u.attrs.revisionId,author:u.attrs.author||"Unknown",date:u.attrs.date||void 0},m=u.attrs.isMovePair===true;l?m?e.push({type:"moveTo",info:p,content:[c]}):e.push({type:"insertion",info:p,content:[c]}):m?e.push({type:"moveFrom",info:p,content:[c]}):e.push({type:"deletion",info:p,content:[c]});return}let s=o.marks.find(u=>u.type.name==="hyperlink");if(s){let u=K(s),c=r?.href||(r?.anchor?`#${r.anchor}`:"");r&&c===u?M(r,o):(n&&(e.push(n),n=null,i=null),r&&e.push(r),r=V(s),M(r,o));return}if(r&&(e.push(r),r=null),o.isText){let u=z(o.marks);n&&i===u?U(n,o.text||""):(n&&e.push(n),n=w(o.text||"",o.marks),i=u);}else o.type.name==="hardBreak"?(n&&(e.push(n),n=null,i=null),e.push(v())):o.type.name==="image"?(n&&(e.push(n),n=null,i=null),e.push(I(o))):o.type.name==="shape"?(n&&(e.push(n),n=null,i=null),e.push(B(o))):o.type.name==="tab"?(n&&(e.push(n),n=null,i=null),e.push(S())):o.type.name==="field"?(n&&(e.push(n),n=null,i=null),e.push($(o,o.marks))):o.type.name==="sdt"?(n&&(e.push(n),n=null,i=null),e.push(de(o))):o.type.name==="math"&&(n&&(e.push(n),n=null,i=null),e.push(J(o)));}),n&&e.push(n),r&&e.push(r),e}function de(t){let e=chunkPGWY6UFK_js.e(t.attrs),i=G(t).filter(r=>r.type==="run"||r.type==="hyperlink"||r.type==="simpleField"||r.type==="complexField"||r.type==="inlineSdt"||r.type==="mathEquation");return {type:"inlineSdt",properties:e,content:i}}function ue(t){for(let e of t)for(let n of e.cells){let i=n.formatting?.borders;if(i){let r=i.top||i.left||i.right||i.bottom||i.insideH||i.insideV;return r?{top:i.top??r,bottom:i.bottom??r,left:i.left??r,right:i.right??r,insideH:i.insideH??i.bottom??r,insideV:i.insideV??i.right??r}:void 0}}}function pe(t){let e=[],n=[],i=0;for(let r=0;r<t.childCount;r++){let o=t.child(r),a=0;o.forEach(l=>{if(l.type.name!=="tableCell"&&l.type.name!=="tableHeader")return;for(;e[r]?.[a];)a++;let d=l.attrs.rowspan||1,s=l.attrs.colspan||1;n.push({row:r,col:a,rowspan:d,colspan:s,cell:he(l)});for(let u=r;u<r+d;u++){let c=e[u]??[];e[u]=c;for(let p=a;p<a+s;p++)c[p]=true;}a+=s,i=Math.max(i,a);});}return {anchors:n,totalCols:i}}function ce(t){let e=new Map;t.forEach((i,r)=>{let o=0;for(let a of i.cells){let l=o;if(o+=a.formatting?.gridSpan??1,a.formatting?.vMerge){let d=e.get(l)??[];d.push({rowIndex:r,cell:a}),e.set(l,d);}}});let n=i=>{i.formatting&&(delete i.formatting.vMerge,Object.keys(i.formatting).length===0&&(i.formatting=void 0));};for(let i of e.values()){let r=null,o=0,a=-1,l=()=>{r&&o<2&&n(r),r=null,o=0;};for(let{rowIndex:d,cell:s}of i){let u=s.formatting?.vMerge;u==="restart"?(l(),r=s,o=1,a=d):u==="continue"&&(r&&d===a+1?(o++,a=d):(l(),n(s)));}l();}}function A(t){let e=t.attrs,{anchors:n,totalCols:i}=pe(t),r=new Map,o=new Map;for(let s of n){r.set(`${s.row}-${s.col}`,s);for(let u=s.row;u<s.row+s.rowspan;u++)for(let c=s.col;c<s.col+s.colspan;c++)o.set(`${u}-${c}`,s);}let a=[];for(let s=0;s<t.childCount;s++){let u=t.child(s),c=[];for(let g=0;g<i;){let h=r.get(`${s}-${g}`);if(h){let b={...h.cell.formatting??{}};h.colspan>1?b.gridSpan=h.colspan:delete b.gridSpan,h.rowspan>1?b.vMerge="restart":b.vMerge!=="restart"&&b.vMerge!=="continue"&&delete b.vMerge,c.push({...h.cell,formatting:Object.keys(b).length?b:void 0}),g+=h.colspan;continue}let y=o.get(`${s}-${g}`);if(!y){g++;continue}let C={...y.cell.formatting??{}};y.colspan>1?C.gridSpan=y.colspan:delete C.gridSpan,C.vMerge="continue",c.push({...y.cell,content:[],formatting:C}),g+=y.colspan;}let p=u.attrs,m={type:"tableRow",formatting:ge(p),cells:c};p.trIns?m.structuralChange={type:"tableRowInsertion",info:{id:p.trIns.revisionId,author:p.trIns.author,...p.trIns.date?{date:p.trIns.date}:{}}}:p.trDel&&(m.structuralChange={type:"tableRowDeletion",info:{id:p.trDel.revisionId,author:p.trDel.author,...p.trDel.date?{date:p.trDel.date}:{}}}),p.trPrChange&&p.trPrChange.length>0&&(m.propertyChanges=p.trPrChange),a.push(m);}ce(a);let l=fe(e)||void 0;if(!l?.borders){let s=ue(a);if(s)if(l)l.borders=s;else return {type:"table",columnWidths:e.columnWidths||void 0,formatting:{borders:s},rows:a}}let d={type:"table",columnWidths:e.columnWidths||void 0,formatting:l,rows:a};return e.tblPrChange&&e.tblPrChange.length>0&&(d.propertyChanges=e.tblPrChange),d}function fe(t){if(t._originalFormatting){let r=t._originalFormatting,o={...r};t.styleId!==(r.styleId||void 0)&&(o.styleId=t.styleId||void 0),t.justification!==(r.justification||void 0)&&(o.justification=t.justification||void 0),t.floating!==(r.floating||void 0)&&(o.floating=t.floating||void 0),t.tableLayout!==(r.layout||void 0)&&(o.layout=t.tableLayout||void 0),t.look!==(r.look||void 0)&&(o.look=t.look||void 0);let a=r.width?.value,l=r.width?.type;return (t.width!==a||t.widthType!==l)&&(t.width!=null||t.widthType?o.width={value:t.width??0,type:t.widthType||"dxa"}:o.width=void 0),t.cellMargins&&(o.cellMargins={top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}),o}if(!(t.styleId||t.width!=null||t.widthType||t.justification||t.tableLayout||t.floating||t.cellMargins||t.look))return;let n=t.cellMargins?{top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}:void 0,i;return (t.width!=null||t.widthType)&&(i={value:t.width??0,type:t.widthType||"dxa"}),{styleId:t.styleId||void 0,width:i,justification:t.justification||void 0,layout:t.tableLayout||void 0,floating:t.floating||void 0,cellMargins:n,look:t.look||void 0}}function ge(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.height!==(n.height?.value||void 0)&&(i.height=t.height?{value:t.height,type:"dxa"}:void 0),t.heightRule!==(n.heightRule||void 0)&&(i.heightRule=t.heightRule||void 0),t.isHeader!==(n.header||void 0)&&(i.header=t.isHeader||void 0),i}if(t.height||t.isHeader)return {height:t.height?{value:t.height,type:"dxa"}:void 0,heightRule:t.heightRule||void 0,header:t.isHeader||void 0}}function he(t){let e=t.attrs,n=[];t.forEach(r=>{r.type.name==="paragraph"?n.push(x(r)):r.type.name==="table"&&n.push(A(r));});let i={type:"tableCell",formatting:me(e),content:n};if(e.cellMarker){let r=e.cellMarker,o={id:r.info.revisionId,author:r.info.author,...r.info.date?{date:r.info.date}:{}};r.kind==="ins"?i.structuralChange={type:"tableCellInsertion",info:o}:r.kind==="del"?i.structuralChange={type:"tableCellDeletion",info:o}:i.structuralChange={type:"tableCellMerge",info:o,...r.vMerge?{vMerge:r.vMerge}:{},...r.vMergeOrig?{vMergeOrig:r.vMergeOrig}:{}};}return e.tcPrChange&&e.tcPrChange.length>0&&(i.propertyChanges=e.tcPrChange),i}function me(t){if(t._originalFormatting){let i=t._originalFormatting,r={...i};if(t.colspan>1&&(r.gridSpan=t.colspan),t.width!=null&&(r.width={value:t.width,type:t.widthType||"dxa"}),t.verticalAlign!==(i.verticalAlign||void 0)&&(r.verticalAlign=t.verticalAlign||void 0),t.backgroundColor?t._originalResolvedFill===t.backgroundColor&&i.shading?r.shading=i.shading:r.shading={fill:{rgb:t.backgroundColor}}:i.shading&&(r.shading=void 0),t.borders&&(r.borders=t.borders),t.margins){let o=t.margins,a={};o.top!=null&&(a.top={value:o.top,type:"dxa"}),o.bottom!=null&&(a.bottom={value:o.bottom,type:"dxa"}),o.left!=null&&(a.left={value:o.left,type:"dxa"}),o.right!=null&&(a.right={value:o.right,type:"dxa"}),r.margins=a;}return t.textDirection!==(i.textDirection||void 0)&&(r.textDirection=t.textDirection||void 0),r}if(!(t.colspan>1||t.rowspan>1||t.width!=null||t.verticalAlign||t.backgroundColor||t.borders||t.margins||t.textDirection))return;let n;if(t.margins){let i=t.margins;n={},i.top!=null&&(n.top={value:i.top,type:"dxa"}),i.bottom!=null&&(n.bottom={value:i.bottom,type:"dxa"}),i.left!=null&&(n.left={value:i.left,type:"dxa"}),i.right!=null&&(n.right={value:i.right,type:"dxa"});}return {gridSpan:t.colspan>1?t.colspan:void 0,width:t.width!=null?{value:t.width,type:t.widthType||"dxa"}:void 0,verticalAlign:t.verticalAlign||void 0,textDirection:t.textDirection||void 0,shading:t.backgroundColor?{fill:{rgb:t.backgroundColor}}:void 0,borders:t.borders,margins:n}}function O(t){let e=t.attrs,n=[];t.forEach(l=>{l.type.name==="paragraph"&&n.push(x(l));});let i={type:"shape",shapeType:"rect",id:e.textBoxId||void 0,size:{width:e.width?chunkBJSG6TEG_js.g(e.width):0,height:e.height?chunkBJSG6TEG_js.g(e.height):0},textBody:{content:n.length>0?n:[{type:"paragraph",content:[]}],margins:{top:e.marginTop!=null?chunkBJSG6TEG_js.g(e.marginTop):void 0,bottom:e.marginBottom!=null?chunkBJSG6TEG_js.g(e.marginBottom):void 0,left:e.marginLeft!=null?chunkBJSG6TEG_js.g(e.marginLeft):void 0,right:e.marginRight!=null?chunkBJSG6TEG_js.g(e.marginRight):void 0}}},r=chunkPGWY6UFK_js.i(e);r&&(i.position=r);let o=chunkPGWY6UFK_js.j(e);if(o&&(i.wrap=o),e.fillColor&&(i.fill={type:"solid",color:{rgb:e.fillColor.replace("#","")}}),e.outlineWidth&&e.outlineWidth>0){let l={solid:"solid",dotted:"dot",dashed:"dash"};i.outline={width:chunkBJSG6TEG_js.g(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&l[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:i}]}}function Y(t){return {type:"paragraph",content:[O(t)]}}function ye(t,e){let i={content:N(t),finalSectionProperties:e?.package.document.finalSectionProperties,sections:e?.package.document.sections,comments:e?.package.document.comments},r=e?{...e,package:{...e.package,document:i}}:{package:{document:i}},o=t.attrs.watermark??null,a=chunkRQVHKDXK_js.a(r)??null;return o!==a?chunkRQVHKDXK_js.b(r,o):r}function N(t){let e=[],n=[],i=()=>{for(let r of n)e.push({type:"paragraph",content:[r]});n=[];};return t.forEach(r=>{if(r.type.name==="paragraph"){let o=x(r);n.length>0&&(o.content=[...n,...o.content],n=[]),e.push(o);}else if(r.type.name==="table")i(),e.push(A(r));else if(r.type.name==="blockSdt")i(),e.push(be(r));else if(r.type.name==="textBox"){let o=r.attrs;chunkPGWY6UFK_js.h(o)?n.push(O(r)):(i(),e.push(Y(r)));}else r.type.name==="pageBreak"&&(i(),e.push(xe()));}),i(),e}function be(t){return {type:"blockSdt",properties:chunkPGWY6UFK_js.e(t.attrs),content:N(t)}}function xe(){return {type:"paragraph",content:[{type:"run",content:[{type:"break",breakType:"page"}]}]}}function Ke(t,e){return ye(e,t)}function ze(t){return N(t)}exports.a=ye;exports.b=Ke;exports.c=ze;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk4U2S3WV2_js=require('./chunk-4U2S3WV2.js');var e=chunk4U2S3WV2_js.a.getCommands();function g(t){return e.setAlignment(t)}var l=e.alignLeft(),u=e.alignCenter(),x=e.alignRight(),C=e.alignJustify();function f(t,n="auto"){return e.setLineSpacing(t,n)}var S=e.singleSpacing(),L=e.oneAndHalfSpacing(),b=e.doubleSpacing();function y(t=720){return e.increaseIndent(t)}function v(t=720){return e.decreaseIndent(t)}function A(t){return e.setIndentLeft(t)}function I(t){return e.setIndentRight(t)}function h(t,n){return e.setIndentFirstLine(t,n)}var R=e.toggleBulletList(),T=e.toggleNumberedList(),P=e.increaseListLevel(),B=e.decreaseListLevel(),k=e.removeList();function E(t){return e.setSpaceBefore(t)}function F(t){return e.setSpaceAfter(t)}function H(t,n){return e.applyStyle(t,n)}var J=e.clearStyle();function N(t){return e.insertSectionBreak(t)}var O=e.removeSectionBreak();function M(t,n="left",r="none"){return e.addTabStop(t,n,r)}function j(t){return e.removeTabStop(t)}var q=e.setRtl(),w=e.setLtr(),z=e.generateTOC();exports.A=j;exports.B=q;exports.C=w;exports.D=z;exports.a=g;exports.b=l;exports.c=u;exports.d=x;exports.e=C;exports.f=f;exports.g=S;exports.h=L;exports.i=b;exports.j=y;exports.k=v;exports.l=A;exports.m=I;exports.n=h;exports.o=R;exports.p=T;exports.q=P;exports.r=B;exports.s=k;exports.t=E;exports.u=F;exports.v=H;exports.w=J;exports.x=N;exports.y=O;exports.z=M;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use strict';var chunkLW5OFHSW_js=require('./chunk-LW5OFHSW.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js'),chunkH57LNDBH_js=require('./chunk-H57LNDBH.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js');var Xe={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},ee={majorFont:{latin:"Calibri Light",ea:"",cs:"",fonts:{}},minorFont:{latin:"Calibri",ea:"",cs:"",fonts:{}}},we={name:"Office Theme",colorScheme:Xe,fontScheme:ee},yt=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function bt(e){if(!e)return null;switch(chunk3R7QHNI5_js.d(e.name||"")){case "srgbClr":return chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val")??null;case "sysClr":{let n=chunk3R7QHNI5_js.j(e,"a","lastClr")??chunk3R7QHNI5_js.j(e,null,"lastClr");if(n)return n;switch(chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(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":{chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val");return null}default:return null}}function Tt(e){let t={...Xe};if(!e)return t;for(let n of yt){let o=chunk3R7QHNI5_js.e(e,"a",n);if(o){let r=chunk3R7QHNI5_js.i(o);if(r.length>0){let a=bt(r[0]);a&&(t[n]=a);}}}return t}function He(e){let t={latin:"",ea:"",cs:"",fonts:{}};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"a","latin");n&&(t.latin=chunk3R7QHNI5_js.j(n,"a","typeface")??chunk3R7QHNI5_js.j(n,null,"typeface")??"");let o=chunk3R7QHNI5_js.e(e,"a","ea");o&&(t.ea=chunk3R7QHNI5_js.j(o,"a","typeface")??chunk3R7QHNI5_js.j(o,null,"typeface")??"");let r=chunk3R7QHNI5_js.e(e,"a","cs");r&&(t.cs=chunk3R7QHNI5_js.j(r,"a","typeface")??chunk3R7QHNI5_js.j(r,null,"typeface")??"");let a=chunk3R7QHNI5_js.f(e,"a","font");for(let u of a){let l=chunk3R7QHNI5_js.j(u,"a","script")??chunk3R7QHNI5_js.j(u,null,"script"),f=chunk3R7QHNI5_js.j(u,"a","typeface")??chunk3R7QHNI5_js.j(u,null,"typeface");l&&f&&(t.fonts=t.fonts||{},t.fonts[l]=f);}return t}function xt(e){let t={...ee};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"a","majorFont");n&&(t.majorFont=He(n));let o=chunk3R7QHNI5_js.e(e,"a","minorFont");return o&&(t.minorFont=He(o)),t}function In(e){if(!e)return {...we};try{let t=chunk3R7QHNI5_js.c(e);if(!t)return {...we};let n=chunk3R7QHNI5_js.j(t,"a","name")??chunk3R7QHNI5_js.j(t,null,"name")??"Office Theme",o=chunk3R7QHNI5_js.e(t,"a","themeElements"),r=chunk3R7QHNI5_js.e(o,"a","clrScheme"),a=Tt(r),u=chunk3R7QHNI5_js.e(o,"a","fontScheme"),l=xt(u);return {name:n,colorScheme:a,fontScheme:l}}catch(t){return console.warn("Failed to parse theme:",t),{...we}}}function Ft(e,t="latin"){if(!e?.fontScheme?.majorFont)return ee.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 Le(e,t="latin"){if(!e?.fontScheme?.minorFont)return ee.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?Ft(e,r):o?Le(e,r):Le(e,"latin")}function De(e){if(!e)return;let t=chunk3R7QHNI5_js.l(e,"w","w")??0,n=chunk3R7QHNI5_js.j(e,"w","type")??"dxa",o="dxa";return (n==="auto"||n==="dxa"||n==="nil"||n==="pct")&&(o=n),{value:t,type:o}}function D(e){return De(e)}function j(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=(chunk3R7QHNI5_js.j(e,"w","author")??"").trim(),r=(chunk3R7QHNI5_js.j(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 te(e){return j(e)}function V(e){if(!e)return;let o={style:chunk3R7QHNI5_js.j(e,"w","val")??"none"},r=chunk3R7QHNI5_js.l(e,"w","sz");r!==void 0&&(o.size=r);let a=chunk3R7QHNI5_js.l(e,"w","space");a!==void 0&&(o.space=a);let u=chunk3R7QHNI5_js.j(e,"w","color"),l=chunk3R7QHNI5_js.j(e,"w","themeColor"),f=chunk3R7QHNI5_js.j(e,"w","themeTint"),c=chunk3R7QHNI5_js.j(e,"w","themeShade");(u||l||f||c)&&(o.color={rgb:u??void 0,themeColor:l,themeTint:f??void 0,themeShade:c??void 0});let d=chunk3R7QHNI5_js.j(e,"w","shadow");(d==="1"||d==="true")&&(o.shadow=true);let p=chunk3R7QHNI5_js.j(e,"w","frame");return (p==="1"||p==="true")&&(o.frame=true),o}function ne(e){if(!e)return;let t={},n=V(chunk3R7QHNI5_js.e(e,"w","top"));n&&(t.top=n);let o=V(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(t.bottom=o);let r=V(chunk3R7QHNI5_js.e(e,"w","left")??chunk3R7QHNI5_js.e(e,"w","start"));r&&(t.left=r);let a=V(chunk3R7QHNI5_js.e(e,"w","right")??chunk3R7QHNI5_js.e(e,"w","end"));a&&(t.right=a);let u=V(chunk3R7QHNI5_js.e(e,"w","insideH"));u&&(t.insideH=u);let l=V(chunk3R7QHNI5_js.e(e,"w","insideV"));if(l&&(t.insideV=l),Object.keys(t).length!==0)return t}function oe(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","top"));n&&(t.top=n);let o=D(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(t.bottom=o);let r=D(chunk3R7QHNI5_js.e(e,"w","left")??chunk3R7QHNI5_js.e(e,"w","start"));r&&(t.left=r);let a=D(chunk3R7QHNI5_js.e(e,"w","right")??chunk3R7QHNI5_js.e(e,"w","end"));if(a&&(t.right=a),Object.keys(t).length!==0)return t}function re(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","fill");n&&n!=="auto"&&(t.fill={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","themeFill");if(o){t.fill={themeColor:o};let u=chunk3R7QHNI5_js.j(e,"w","themeFillTint");u&&t.fill&&(t.fill.themeTint=u);let l=chunk3R7QHNI5_js.j(e,"w","themeFillShade");l&&t.fill&&(t.fill.themeShade=l);}let r=chunk3R7QHNI5_js.j(e,"w","color");r&&r!=="auto"&&(t.color={rgb:r});let a=chunk3R7QHNI5_js.j(e,"w","val");if(a&&(t.pattern=a),Object.keys(t).length!==0)return t}function ye(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=chunk3R7QHNI5_js.j(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=chunk3R7QHNI5_js.j(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=chunk3R7QHNI5_js.j(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=chunk3R7QHNI5_js.j(e,"w","noHBand");(u==="1"||u==="true")&&(t.noHBand=true);let l=chunk3R7QHNI5_js.j(e,"w","noVBand");(l==="1"||l==="true")&&(t.noVBand=true);let f=chunk3R7QHNI5_js.j(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 be(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","horzAnchor");(n==="margin"||n==="page"||n==="text")&&(t.horzAnchor=n);let o=chunk3R7QHNI5_js.j(e,"w","vertAnchor");(o==="margin"||o==="page"||o==="text")&&(t.vertAnchor=o);let r=chunk3R7QHNI5_js.l(e,"w","tblpX");r!==void 0&&(t.tblpX=r);let a=chunk3R7QHNI5_js.j(e,"w","tblpXSpec");a&&(t.tblpXSpec=a);let u=chunk3R7QHNI5_js.l(e,"w","tblpY");u!==void 0&&(t.tblpY=u);let l=chunk3R7QHNI5_js.j(e,"w","tblpYSpec");l&&(t.tblpYSpec=l);let f=chunk3R7QHNI5_js.l(e,"w","topFromText");f!==void 0&&(t.topFromText=f);let c=chunk3R7QHNI5_js.l(e,"w","bottomFromText");c!==void 0&&(t.bottomFromText=c);let d=chunk3R7QHNI5_js.l(e,"w","leftFromText");d!==void 0&&(t.leftFromText=d);let p=chunk3R7QHNI5_js.l(e,"w","rightFromText");if(p!==void 0&&(t.rightFromText=p),Object.keys(t).length!==0)return t}function Ct(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 kt(e){return e.rows.length}function St(e){return e.formatting?.vMerge==="continue"}function Mt(e){return e.formatting?.vMerge==="restart"}function Rt(e){return e.rows.length===0?false:e.rows[0].formatting?.header===true}var Et={richText:"richText",text:"plainText",date:"date",dropDownList:"dropDownList",comboBox:"comboBox",picture:"picture",docPartObj:"buildingBlockGallery",docPartList:"buildingBlockGallery",group:"group",equation:"equation",citation:"citation",bibliography:"bibliography",checkbox:"checkbox"};function Pt(e){if(!e||!e.elements)return "richText";for(let t of e.elements){if(t.type!=="element"||!t.name)continue;let n=chunk3R7QHNI5_js.d(t.name),o=Et[n];if(o)return o}return "richText"}function Bt(e){let t=[];for(let n of e.elements??[])n.type==="element"&&chunk3R7QHNI5_js.d(n.name||"")==="listItem"&&t.push({displayText:chunk3R7QHNI5_js.j(n,"w","displayText")||"",value:chunk3R7QHNI5_js.j(n,"w","value")||""});return t}function ie(e,t){let n={sdtType:Pt(e)};if(e){n.rawPropertiesXml=chunk3R7QHNI5_js.b(e);for(let o of e.elements??[]){if(o.type!=="element"||!o.name)continue;switch(chunk3R7QHNI5_js.d(o.name)){case "id":{let a=chunk3R7QHNI5_js.j(o,"w","val");if(a!=null){let u=parseInt(a,10);Number.isNaN(u)||(n.id=u);}break}case "alias":n.alias=chunk3R7QHNI5_js.j(o,"w","val")??void 0;break;case "tag":n.tag=chunk3R7QHNI5_js.j(o,"w","val")??void 0;break;case "lock":n.lock=chunk3R7QHNI5_js.j(o,"w","val")??"unlocked";break;case "placeholder":{let a=chunk3R7QHNI5_js.e(o,"w","docPart");a&&(n.placeholder=chunk3R7QHNI5_js.j(a,"w","val")??void 0);break}case "showingPlcHdr":{let a=chunk3R7QHNI5_js.j(o,"w","val");n.showingPlaceholder=a==null||!/^(0|false|off)$/i.test(a);break}case "date":{let a=chunk3R7QHNI5_js.e(o,"w","dateFormat");a&&(n.dateFormat=chunk3R7QHNI5_js.j(a,"w","val")??void 0);break}case "dropDownList":case "comboBox":n.listItems=Bt(o);break;case "checkbox":{let a=chunk3R7QHNI5_js.e(o,"w14","checked")??chunk3R7QHNI5_js.e(o,"w","checked");n.checked=a?chunk3R7QHNI5_js.j(a,"w14","val")==="1"||chunk3R7QHNI5_js.j(a,"w","val")==="1":false;break}case "dataBinding":{let a={},u=chunk3R7QHNI5_js.j(o,"w","xpath"),l=chunk3R7QHNI5_js.j(o,"w","storeItemID"),f=chunk3R7QHNI5_js.j(o,"w","prefixMappings");u!=null&&(a.xpath=u),l!=null&&(a.storeItemID=l),f!=null&&(a.prefixMappings=f),n.dataBinding=a;break}}}}return t&&(n.rawEndPropertiesXml=chunk3R7QHNI5_js.b(t)),n}var Oe={183:"\u2022",111:"\u25CB",167:"\u25A0",252:"\u2713",110:"\u25A0",113:"\u25CB",117:"\u25C6",118:"\u2756",168:"\u2713",251:"\u2713",254:"\u2713",61623:"\u2022",61550:"\u25A0",61551:"\u25CB",61607:"\u25A0",61692:"\u2713",8226:"\u2022",9679:"\u25CF",9675:"\u25CB",9632:"\u25A0",9633:"\u25A1",9670:"\u25C6",9671:"\u25C7",8211:"\u2013",8212:"\u2014",62:">",45:"-"};function vt(e){if(!e||e.trim()==="")return "\u2022";let t=e.charCodeAt(0);return Oe[t]?Oe[t]:t>=57344&&t<=63743||t<32||t>=127&&t<160?"\u2022":e}function Nt(e){let t=e.listRendering;t&&t.isBullet&&(t.marker=vt(t.marker||""));}function At(e,t,n,o,r,a,u){if(e.content.length===0)return;let l=chunk3R7QHNI5_js.i(t),f=0;function c(d){if(!chunkLW5OFHSW_js.h(d))return;let p=chunkLW5OFHSW_js.j(d);if(!p)return;let w=chunk3R7QHNI5_js.n(d,"wps","wsp");if(w){let h=chunkLW5OFHSW_js.k(w);h&&(p.content=chunkLW5OFHSW_js.g(h,Z,null,n,o,r,a??void 0,u??void 0));}let T={type:"shape",shapeType:"rect",size:p.size,position:p.position,wrap:p.wrap,fill:p.fill,outline:p.outline,textBody:{content:p.content,margins:p.margins}};p.id&&(T.id=p.id);let y={type:"shape",shape:T},x=f;if(x>=e.content.length){x=-1;for(let h=e.content.length-1;h>=0;h--)if(e.content[h].type==="run"){x=h;break}}if(x>=0){let h=e.content[x];h.type==="run"&&h.content.push(y);}}for(let d of l){if(chunk3R7QHNI5_js.d(d.name??"")!=="r")continue;let p=chunk3R7QHNI5_js.i(d);for(let w of p){let T=chunk3R7QHNI5_js.d(w.name??"");if(T==="drawing")c(w);else if(T==="AlternateContent"){let y=chunk3R7QHNI5_js.i(w),h=y.find(P=>chunk3R7QHNI5_js.d(P.name??"")==="Choice")??y.find(P=>chunk3R7QHNI5_js.d(P.name??"")==="Fallback");if(h)for(let P of chunk3R7QHNI5_js.i(h))chunk3R7QHNI5_js.d(P.name??"")==="drawing"&&c(P);}}f++;}}function q(e,t,n,o,r,a,u){let l=[],f=chunk3R7QHNI5_js.i(e);for(let c of f){let d=c.name??"";if(d==="w:p"||d.endsWith(":p")){let p=Z(c,t,n,o,r,a,u);At(p,c,t,n,o,r,a),Nt(p),l.push(p);}else if(d==="w:tbl"||d.endsWith(":tbl")){let p=Te(c,t,n,o,r,a,u);l.push(p);}else (d==="w:sdt"||d.endsWith(":sdt"))&&l.push(It(c,t,n,o,r,a,u));}return l}function It(e,t,n,o,r,a,u){let l=chunk3R7QHNI5_js.e(e,"w","sdtPr"),f=chunk3R7QHNI5_js.e(e,"w","sdtEndPr"),c=chunk3R7QHNI5_js.e(e,"w","sdtContent"),d=ie(l,f),p=c?q(c,t,n,o,r,a,u):[];return {type:"blockSdt",properties:d,content:p}}function ae(e){let t={};if(!e)return t;for(let n of e.split(";")){let o=n.indexOf(":");if(o<0)continue;let r=n.slice(0,o).trim().toLowerCase(),a=n.slice(o+1).trim();r&&(t[r]=a);}return t}function Ht(e){if(!e)return "#C0C0C0";let t=e.trim();return t.startsWith("#")?t:/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:t}function We(e){if(!e)return;let t=e.match(/^(-?[0-9.]+)(pt|px|in|cm|mm)?$/);if(!t)return;let n=parseFloat(t[1]);if(!isNaN(n))switch(t[2]){case "in":return n*96;case "cm":return n/2.54*96;case "mm":return n/25.4*96;case "px":return n;default:return n*96/72}}var Ve=914400/96;function Lt(e,t,n){if(!e||!t)return {};let o=t.get(e);if(!o?.target)return {};let r=o.target,a=r.split("/").pop()??r,u=[r,r.replace(/^\/+/,""),`word/${r.replace(/^\/+/,"")}`,`word/media/${a}`,`media/${a}`];if(n)for(let l of u){let f=l.toLowerCase();for(let[c,d]of n.entries())if(c.toLowerCase()===f)return {dataUrl:d.dataUrl??d.base64,mediaPath:d.path,contentType:d.mimeType}}return {}}function xe(e,t){if(t.includes("watermark")||(chunk3R7QHNI5_js.j(e,null,"type")??"").includes("_t136"))return true;let o=chunk3R7QHNI5_js.i(e).find(r=>r.name==="v:imagedata"||r.name?.endsWith(":imagedata"));return !!(o&&(chunk3R7QHNI5_js.j(o,null,"gain")||chunk3R7QHNI5_js.j(o,"o","gain")||chunk3R7QHNI5_js.j(o,null,"blacklevel")))}function je(e,t=null,n=null){if(!e)return;let o=chunk3R7QHNI5_js.o(e,"v","shape");for(let r of o){let a=(chunk3R7QHNI5_js.j(r,null,"id")??"").toLowerCase(),u=chunk3R7QHNI5_js.i(r),l=u.find(w=>w.name==="v:textpath"||w.name?.endsWith(":textpath")),f=u.find(w=>w.name==="v:imagedata"||w.name?.endsWith(":imagedata"));if(!xe(r,a)&&!l)continue;let c=ae(chunk3R7QHNI5_js.j(r,null,"style")),d=parseFloat(c.rotation??"0")||0,p=Math.abs(d)>5;if(l){let w=chunk3R7QHNI5_js.j(l,null,"string")??"",x=(ae(chunk3R7QHNI5_js.j(l,null,"style"))["font-family"]??"Calibri").replace(/["']/g,"").replace(/^"|"$/g,"").trim()||"Calibri",h=u.find(M=>M.name==="v:fill"||M.name?.endsWith(":fill")),P=h?chunk3R7QHNI5_js.j(h,null,"opacity"):null,C=P!=null&&parseFloat(P)<1;return {kind:"text",text:w,font:x,color:Ht(chunk3R7QHNI5_js.j(r,null,"fillcolor")),semitransparent:C,layout:p?"diagonal":"horizontal",fontSize:void 0}}if(f){let w=chunk3R7QHNI5_js.j(f,"r","id")??chunk3R7QHNI5_js.j(f,"r","embed")??chunk3R7QHNI5_js.j(f,null,"id")??"",{dataUrl:T,mediaPath:y,contentType:x}=Lt(w,t,n),h=chunk3R7QHNI5_js.j(f,null,"gain"),P=chunk3R7QHNI5_js.j(f,null,"blacklevel"),C=h!=null||P!=null,M=We(c.width),m=We(c.height);return {kind:"picture",relId:w||void 0,mediaPath:y,contentType:x,dataUrl:T,scale:1,washout:C,widthEmu:M!=null?Math.round(M*Ve):void 0,heightEmu:m!=null?Math.round(m*Ve):void 0}}}}function Ue(e){switch(e){case "first":return "first";case "even":return "even";default:return "default"}}function ze(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"r","id")??"";return {type:Ue(t),rId:n}}function _e(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"r","id")??"";return {type:Ue(t),rId:n}}function Qn(e,t="default",n=null,o=null,r=null,a=null,u=null){let l={type:"header",hdrFtrType:t,content:[]};if(!e)return l;let f=chunk3R7QHNI5_js.a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:hdr"||p.name?.endsWith(":hdr")));if(!c)return l;l.content=q(c,n,o,r,a,u,{inHeaderFooter:true});let d=je(c,a,u);return d&&(l.watermark=d),l}function Jn(e,t="default",n=null,o=null,r=null,a=null,u=null){let l={type:"footer",hdrFtrType:t,content:[]};if(!e)return l;let f=chunk3R7QHNI5_js.a(e);if(!f)return l;let c=f.elements?.find(d=>d.type==="element"&&(d.name==="w:ftr"||d.name?.endsWith(":ftr")));return c&&(l.content=q(c,n,o,r,a,u,{inHeaderFooter:true})),l}function Ge(e){switch(e){case "separator":return "separator";case "continuationSeparator":return "continuationSeparator";case "continuationNotice":return "continuationNotice";default:return "normal"}}function qe(e,t,n,o,r,a){let u=q(e,t,n,o,r,a),l=false;for(let f of chunk3R7QHNI5_js.i(e)){let c=f.name??"";if(c==="w:bookmarkStart"||c.endsWith(":bookmarkStart")||c==="w:bookmarkEnd"||c.endsWith(":bookmarkEnd")||c==="w:customXml"||c.endsWith(":customXml")){l=true;break}}return {blocks:u,hasUnmodeled:l}}function Xt(e,t,n,o,r,a){let u=chunk3R7QHNI5_js.l(e,"w","id")??0,l=chunk3R7QHNI5_js.j(e,"w","type"),f=Ge(l),{blocks:c,hasUnmodeled:d}=qe(e,t,n,o,r,a);return {type:"footnote",id:u,noteType:f,content:c,...d?{verbatimXml:chunk3R7QHNI5_js.b(e)}:{}}}function oo(e,t=null,n=null,o=null,r=null,a=null){let u=new Map,l=[];if(!e)return le(u,l);let f=chunk3R7QHNI5_js.a(e);if(!f)return le(u,l);let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:footnotes"||p.name?.endsWith(":footnotes")));if(!c)return le(u,l);let d=chunk3R7QHNI5_js.f(c,"w","footnote");for(let p of d){let w=Xt(p,t,n,o,r,a);u.set(w.id,w),l.push(w);}return le(u,l)}function le(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 Dt(e,t,n,o,r,a){let u=chunk3R7QHNI5_js.l(e,"w","id")??0,l=chunk3R7QHNI5_js.j(e,"w","type"),f=Ge(l),{blocks:c,hasUnmodeled:d}=qe(e,t,n,o,r,a);return {type:"endnote",id:u,noteType:f,content:c,...d?{verbatimXml:chunk3R7QHNI5_js.b(e)}:{}}}function ro(e,t=null,n=null,o=null,r=null,a=null){let u=new Map,l=[];if(!e)return se(u,l);let f=chunk3R7QHNI5_js.a(e);if(!f)return se(u,l);let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:endnotes"||p.name?.endsWith(":endnotes")));if(!c)return se(u,l);let d=chunk3R7QHNI5_js.f(c,"w","endnote");for(let p of d){let w=Dt(p,t,n,o,r,a);u.set(w.id,w),l.push(w);}return se(u,l)}function se(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 $e(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 Ot(e){switch(e){case "pageBottom":return "pageBottom";case "beneathText":return "beneathText";case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Wt(e){switch(e){case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Ye(e){switch(e){case "continuous":return "continuous";case "eachSect":return "eachSect";case "eachPage":return "eachPage";default:return}}function Ze(e){let t={};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"w","pos");if(n){let u=chunk3R7QHNI5_js.j(n,"w","val");t.position=Ot(u);}let o=chunk3R7QHNI5_js.e(e,"w","numFmt");if(o){let u=chunk3R7QHNI5_js.j(o,"w","val");t.numFmt=$e(u);}let r=chunk3R7QHNI5_js.e(e,"w","numStart");r&&(t.numStart=chunk3R7QHNI5_js.l(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","numRestart");if(a){let u=chunk3R7QHNI5_js.j(a,"w","val");t.numRestart=Ye(u);}return t}function Ke(e){let t={};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"w","pos");if(n){let u=chunk3R7QHNI5_js.j(n,"w","val");t.position=Wt(u);}let o=chunk3R7QHNI5_js.e(e,"w","numFmt");if(o){let u=chunk3R7QHNI5_js.j(o,"w","val");t.numFmt=$e(u);}let r=chunk3R7QHNI5_js.e(e,"w","numStart");r&&(t.numStart=chunk3R7QHNI5_js.l(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","numRestart");if(a){let u=chunk3R7QHNI5_js.j(a,"w","val");t.numRestart=Ye(u);}return t}function io(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 ao(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 lo(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function so(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function Vt(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 ue(e){if(!e)return;let o={style:chunk3R7QHNI5_js.j(e,"w","val")??"none"},r=chunk3R7QHNI5_js.l(e,"w","sz");r!==void 0&&(o.size=r);let a=chunk3R7QHNI5_js.l(e,"w","space");a!==void 0&&(o.space=a);let u=chunk3R7QHNI5_js.j(e,"w","color"),l=chunk3R7QHNI5_js.j(e,"w","themeColor"),f=chunk3R7QHNI5_js.j(e,"w","themeTint"),c=chunk3R7QHNI5_js.j(e,"w","themeShade"),d=Vt(u,l,f,c);d&&(o.color=d);let p=chunk3R7QHNI5_js.j(e,"w","shadow");(p==="1"||p==="true")&&(o.shadow=true);let w=chunk3R7QHNI5_js.j(e,"w","frame");return (w==="1"||w==="true")&&(o.frame=true),o}function jt(e){switch(e){case "landscape":return "landscape";case "portrait":return "portrait";default:return}}function Ut(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 zt(e){switch(e){case "top":return "top";case "center":return "center";case "both":return "both";case "bottom":return "bottom";default:return}}function _t(e){switch(e){case "continuous":return "continuous";case "newPage":return "newPage";case "newSection":return "newSection";default:return}}function Je(e,t){let n={};if(!e)return n;let o=chunk3R7QHNI5_js.e(e,"w","pgSz");if(o){let m=chunk3R7QHNI5_js.l(o,"w","w");m!==void 0&&(n.pageWidth=m);let F=chunk3R7QHNI5_js.l(o,"w","h");F!==void 0&&(n.pageHeight=F);let E=chunk3R7QHNI5_js.j(o,"w","orient"),b=jt(E);b&&(n.orientation=b);}let r=chunk3R7QHNI5_js.e(e,"w","pgMar");if(r){let m=chunk3R7QHNI5_js.l(r,"w","top");m!==void 0&&(n.marginTop=m);let F=chunk3R7QHNI5_js.l(r,"w","bottom");F!==void 0&&(n.marginBottom=F);let E=chunk3R7QHNI5_js.l(r,"w","left");E!==void 0&&(n.marginLeft=E);let b=chunk3R7QHNI5_js.l(r,"w","right");b!==void 0&&(n.marginRight=b);let k=chunk3R7QHNI5_js.l(r,"w","header");k!==void 0&&(n.headerDistance=k);let B=chunk3R7QHNI5_js.l(r,"w","footer");B!==void 0&&(n.footerDistance=B);let N=chunk3R7QHNI5_js.l(r,"w","gutter");N!==void 0&&(n.gutter=N);}let a=chunk3R7QHNI5_js.e(e,"w","cols");if(a){let m=chunk3R7QHNI5_js.l(a,"w","num");m!==void 0&&(n.columnCount=m);let F=chunk3R7QHNI5_js.l(a,"w","space");F!==void 0&&(n.columnSpace=F);let E=chunk3R7QHNI5_js.j(a,"w","equalWidth");E==="1"||E==="true"?n.equalWidth=true:(E==="0"||E==="false")&&(n.equalWidth=false);let b=chunk3R7QHNI5_js.j(a,"w","sep");(b==="1"||b==="true")&&(n.separator=true);let k=chunk3R7QHNI5_js.f(a,"w","col");if(k.length>0){n.columns=[];for(let B of k){let N={},H=chunk3R7QHNI5_js.l(B,"w","w");H!==void 0&&(N.width=H);let I=chunk3R7QHNI5_js.l(B,"w","space");I!==void 0&&(N.space=I),n.columns.push(N);}n.columnCount===void 0&&(n.columnCount=k.length);}}let u=chunk3R7QHNI5_js.e(e,"w","type");if(u){let m=chunk3R7QHNI5_js.j(u,"w","val"),F=Ut(m);F&&(n.sectionStart=F);}let l=chunk3R7QHNI5_js.e(e,"w","vAlign");if(l){let m=chunk3R7QHNI5_js.j(l,"w","val"),F=zt(m);F&&(n.verticalAlign=F);}let f=chunk3R7QHNI5_js.e(e,"w","bidi");f&&(n.bidi=chunk3R7QHNI5_js.m(f));let c=chunk3R7QHNI5_js.f(e,"w","headerReference");c.length>0&&(n.headerReferences=c.map(m=>ze(m)));let d=chunk3R7QHNI5_js.f(e,"w","footerReference");d.length>0&&(n.footerReferences=d.map(m=>_e(m)));let p=chunk3R7QHNI5_js.e(e,"w","titlePg");p&&(n.titlePg=chunk3R7QHNI5_js.m(p));let w=chunk3R7QHNI5_js.e(e,"w","evenAndOddHeaders");w&&(n.evenAndOddHeaders=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","lnNumType");if(T){n.lineNumbers={};let m=chunk3R7QHNI5_js.l(T,"w","start");m!==void 0&&(n.lineNumbers.start=m);let F=chunk3R7QHNI5_js.l(T,"w","countBy");F!==void 0&&(n.lineNumbers.countBy=F);let E=chunk3R7QHNI5_js.l(T,"w","distance");E!==void 0&&(n.lineNumbers.distance=E);let b=chunk3R7QHNI5_js.j(T,"w","restart"),k=_t(b);k&&(n.lineNumbers.restart=k);}let y=chunk3R7QHNI5_js.e(e,"w","pgBorders");if(y){n.pageBorders={};let m=ue(chunk3R7QHNI5_js.e(y,"w","top"));m&&(n.pageBorders.top=m);let F=ue(chunk3R7QHNI5_js.e(y,"w","bottom"));F&&(n.pageBorders.bottom=F);let E=ue(chunk3R7QHNI5_js.e(y,"w","left"));E&&(n.pageBorders.left=E);let b=ue(chunk3R7QHNI5_js.e(y,"w","right"));b&&(n.pageBorders.right=b);let k=chunk3R7QHNI5_js.j(y,"w","display");(k==="allPages"||k==="firstPage"||k==="notFirstPage")&&(n.pageBorders.display=k);let B=chunk3R7QHNI5_js.j(y,"w","offsetFrom");(B==="page"||B==="text")&&(n.pageBorders.offsetFrom=B);let N=chunk3R7QHNI5_js.j(y,"w","zOrder");(N==="front"||N==="back")&&(n.pageBorders.zOrder=N);}let x=chunk3R7QHNI5_js.e(e,"w","background");if(x){n.background={};let m=chunk3R7QHNI5_js.j(x,"w","color");m&&m!=="auto"&&(n.background.color={rgb:m});let F=chunk3R7QHNI5_js.j(x,"w","themeColor");F&&(n.background.themeColor=F);let E=chunk3R7QHNI5_js.j(x,"w","themeTint");E&&(n.background.themeTint=E);let b=chunk3R7QHNI5_js.j(x,"w","themeShade");b&&(n.background.themeShade=b);}let h=chunk3R7QHNI5_js.e(e,"w","footnotePr");if(h){let m=Ze(h);Object.keys(m).length>0&&(n.footnotePr=m);}let P=chunk3R7QHNI5_js.e(e,"w","endnotePr");if(P){let m=Ke(P);Object.keys(m).length>0&&(n.endnotePr=m);}let C=chunk3R7QHNI5_js.e(e,"w","docGrid");if(C){n.docGrid={};let m=chunk3R7QHNI5_js.j(C,"w","type");(m==="default"||m==="lines"||m==="linesAndChars"||m==="snapToChars")&&(n.docGrid.type=m);let F=chunk3R7QHNI5_js.l(C,"w","linePitch");F!==void 0&&(n.docGrid.linePitch=F);let E=chunk3R7QHNI5_js.l(C,"w","charSpace");E!==void 0&&(n.docGrid.charSpace=E);}let M=chunk3R7QHNI5_js.e(e,"w","paperSrc");if(M){let m=chunk3R7QHNI5_js.l(M,"w","first");m!==void 0&&(n.paperSrcFirst=m);let F=chunk3R7QHNI5_js.l(M,"w","other");F!==void 0&&(n.paperSrcOther=F);}return n}function mo(){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 Qe(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 go(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=Qe(r.headerReferences,o.headerReferences),u=Qe(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 et(e){if(!e)return;let t=/^(-?[\d.]+)\s*(pt|in|px|cm|mm|pc)?$/.exec(e.trim());if(!t)return;let n=parseFloat(t[1]);if(!isNaN(n))switch(t[2]){case "pt":return n/72*96;case "in":return n*96;case "cm":return n/2.54*96;case "mm":return n/25.4*96;case "pc":return n/6*96;case "px":case void 0:return n;default:return}}function Gt(e){return chunk3R7QHNI5_js.j(e,"r","id")??chunk3R7QHNI5_js.j(e,"r","embed")??chunk3R7QHNI5_js.j(e,null,"id")??""}function qt(e){if(!e)return null;let t;if(e.startsWith("data:")){let n=e.indexOf(",");if(n<0)return null;t=e.slice(n+1);}else if(/^[A-Za-z0-9+/]/.test(e)&&!e.includes(":"))t=e;else return null;try{let n=typeof atob=="function"?atob(t):globalThis.Buffer?.from(t,"base64").toString("binary");if(typeof n!="string")return null;let o=new Uint8Array(n.length);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return o}catch{return null}}function $t(e){if(!e||e.length<24)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71)return {width:t.getUint32(16),height:t.getUint32(20)};if(e[0]===71&&e[1]===73&&e[2]===70)return {width:e[6]|e[7]<<8,height:e[8]|e[9]<<8};if(e[0]===66&&e[1]===77&&e.length>=26)return {width:t.getInt32(18,true),height:Math.abs(t.getInt32(22,true))};if(e[0]===255&&e[1]===216){let n=2;for(;n+9<e.length;){if(e[n]!==255){n++;continue}let o=e[n+1];if(o>=192&&o<=207&&o!==196&&o!==200&&o!==204)return {height:e[n+5]<<8|e[n+6],width:e[n+7]<<8|e[n+8]};let r=e[n+2]<<8|e[n+3];if(r<2)break;n+=2+r;}}return null}function tt(e,t,n){let o=[...chunk3R7QHNI5_js.o(e,"v","shape"),...chunk3R7QHNI5_js.o(e,"v","rect"),...chunk3R7QHNI5_js.o(e,"v","roundrect"),...chunk3R7QHNI5_js.o(e,"v","oval")];for(let r of o){let a=chunk3R7QHNI5_js.i(r).find(h=>h.name==="v:imagedata"||h.name?.endsWith(":imagedata"));if(!a)continue;let u=Gt(a);if(!u)continue;let l=(chunk3R7QHNI5_js.j(r,null,"id")??"").toLowerCase();if(xe(r,l))continue;let{src:f,mimeType:c,filename:d}=chunkLW5OFHSW_js.y(u,t??void 0,n??void 0),p=ae(chunk3R7QHNI5_js.j(r,null,"style")),w=et(p.width),T=et(p.height);if(w==null||T==null){let h=$t(qt(f));h&&h.width>0&&h.height>0&&(w==null&&T==null?(w=h.width,T=h.height):w==null?w=T*(h.width/h.height):T=w*(h.height/h.width));}let y={type:"image",rId:u,size:{width:w!=null?chunkBJSG6TEG_js.g(w):0,height:T!=null?chunkBJSG6TEG_js.g(T):0},wrap:{type:"inline"}};f&&(y.src=f),c&&(y.mimeType=c),d&&(y.filename=d);let x=chunk3R7QHNI5_js.j(a,"o","title")??void 0;return x&&(y.title=x),{type:"drawing",image:y}}return null}function nt(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 Yt(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=chunk3R7QHNI5_js.j(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=chunk3R7QHNI5_js.j(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=chunk3R7QHNI5_js.j(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=chunk3R7QHNI5_js.j(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function ce(e,t,n){if(!e)return;let o={},r=chunk3R7QHNI5_js.e(e,"w","b");r&&(o.bold=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(e,"w","bCs");a&&(o.boldCs=chunk3R7QHNI5_js.m(a));let u=chunk3R7QHNI5_js.e(e,"w","i");u&&(o.italic=chunk3R7QHNI5_js.m(u));let l=chunk3R7QHNI5_js.e(e,"w","iCs");l&&(o.italicCs=chunk3R7QHNI5_js.m(l));let f=chunk3R7QHNI5_js.e(e,"w","u");if(f){let S=chunk3R7QHNI5_js.j(f,"w","val");if(S){o.underline={style:S};let z=chunk3R7QHNI5_js.j(f,"w","color"),_=chunk3R7QHNI5_js.j(f,"w","themeColor");(z||_)&&(o.underline.color=nt(z,_,chunk3R7QHNI5_js.j(f,"w","themeTint"),chunk3R7QHNI5_js.j(f,"w","themeShade")));}}let c=chunk3R7QHNI5_js.e(e,"w","strike");c&&(o.strike=chunk3R7QHNI5_js.m(c));let d=chunk3R7QHNI5_js.e(e,"w","dstrike");d&&(o.doubleStrike=chunk3R7QHNI5_js.m(d));let p=chunk3R7QHNI5_js.e(e,"w","vertAlign");if(p){let S=chunk3R7QHNI5_js.j(p,"w","val");(S==="superscript"||S==="subscript"||S==="baseline")&&(o.vertAlign=S);}let w=chunk3R7QHNI5_js.e(e,"w","smallCaps");w&&(o.smallCaps=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","caps");T&&(o.allCaps=chunk3R7QHNI5_js.m(T));let y=chunk3R7QHNI5_js.e(e,"w","vanish");y&&(o.hidden=chunk3R7QHNI5_js.m(y));let x=chunk3R7QHNI5_js.e(e,"w","color");x&&(o.color=nt(chunk3R7QHNI5_js.j(x,"w","val"),chunk3R7QHNI5_js.j(x,"w","themeColor"),chunk3R7QHNI5_js.j(x,"w","themeTint"),chunk3R7QHNI5_js.j(x,"w","themeShade")));let h=chunk3R7QHNI5_js.e(e,"w","highlight");if(h){let S=chunk3R7QHNI5_js.j(h,"w","val");S&&(o.highlight=S);}let P=chunk3R7QHNI5_js.e(e,"w","shd");P&&(o.shading=Yt(P));let C=chunk3R7QHNI5_js.e(e,"w","sz");if(C){let S=chunk3R7QHNI5_js.l(C,"w","val");S!==void 0&&(o.fontSize=S);}let M=chunk3R7QHNI5_js.e(e,"w","szCs");if(M){let S=chunk3R7QHNI5_js.l(M,"w","val");S!==void 0&&(o.fontSizeCs=S);}let m=chunk3R7QHNI5_js.e(e,"w","rFonts");if(m){o.fontFamily={ascii:chunk3R7QHNI5_js.j(m,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(m,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(m,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(m,"w","cs")??void 0};let S=chunk3R7QHNI5_js.j(m,"w","asciiTheme");S&&(o.fontFamily.asciiTheme=S,t&&!o.fontFamily.ascii&&(o.fontFamily.ascii=Y(t,S)));let z=chunk3R7QHNI5_js.j(m,"w","hAnsiTheme");z&&(o.fontFamily.hAnsiTheme=z,t&&!o.fontFamily.hAnsi&&(o.fontFamily.hAnsi=Y(t,z)));let _=chunk3R7QHNI5_js.j(m,"w","eastAsiaTheme");_&&(o.fontFamily.eastAsiaTheme=_,t&&!o.fontFamily.eastAsia&&(o.fontFamily.eastAsia=Y(t,_)));let pe=chunk3R7QHNI5_js.j(m,"w","cstheme");pe&&(o.fontFamily.csTheme=pe,t&&!o.fontFamily.cs&&(o.fontFamily.cs=Y(t,pe)));}let F=chunk3R7QHNI5_js.e(e,"w","spacing");if(F){let S=chunk3R7QHNI5_js.l(F,"w","val");S!==void 0&&(o.spacing=S);}let E=chunk3R7QHNI5_js.e(e,"w","position");if(E){let S=chunk3R7QHNI5_js.l(E,"w","val");S!==void 0&&(o.position=S);}let b=chunk3R7QHNI5_js.e(e,"w","w");if(b){let S=chunk3R7QHNI5_js.l(b,"w","val");S!==void 0&&(o.scale=S);}let k=chunk3R7QHNI5_js.e(e,"w","kern");if(k){let S=chunk3R7QHNI5_js.l(k,"w","val");S!==void 0&&(o.kerning=S);}let B=chunk3R7QHNI5_js.e(e,"w","effect");if(B){let S=chunk3R7QHNI5_js.j(B,"w","val");S&&(o.effect=S);}let N=chunk3R7QHNI5_js.e(e,"w","em");if(N){let S=chunk3R7QHNI5_js.j(N,"w","val");S&&(o.emphasisMark=S);}let H=chunk3R7QHNI5_js.e(e,"w","emboss");H&&(o.emboss=chunk3R7QHNI5_js.m(H));let I=chunk3R7QHNI5_js.e(e,"w","imprint");I&&(o.imprint=chunk3R7QHNI5_js.m(I));let X=chunk3R7QHNI5_js.e(e,"w","outline");X&&(o.outline=chunk3R7QHNI5_js.m(X));let Fe=chunk3R7QHNI5_js.e(e,"w","shadow");Fe&&(o.shadow=chunk3R7QHNI5_js.m(Fe));let Ce=chunk3R7QHNI5_js.e(e,"w","rtl");Ce&&(o.rtl=chunk3R7QHNI5_js.m(Ce));let ke=chunk3R7QHNI5_js.e(e,"w","cs");ke&&(o.cs=chunk3R7QHNI5_js.m(ke));let Se=chunk3R7QHNI5_js.e(e,"w","rStyle");if(Se){let S=chunk3R7QHNI5_js.j(Se,"w","val");S&&(o.styleId=S);}return Object.keys(o).length>0?o:void 0}function Zt(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=(chunk3R7QHNI5_js.j(e,"w","author")??"").trim(),r=(chunk3R7QHNI5_js.j(e,"w","date")??"").trim(),a=(chunk3R7QHNI5_js.j(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 Kt(e,t,n,o){if(!e)return;let r=chunk3R7QHNI5_js.f(e,"w","rPrChange").map(a=>{let u=chunk3R7QHNI5_js.e(a,"w","rPr");return {type:"runPropertyChange",info:Zt(a),previousFormatting:ce(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function Qt(e){let t=chunk3R7QHNI5_js.k(e),n=chunk3R7QHNI5_js.j(e,"xml","space")==="preserve";return {type:"text",text:t,preserveSpace:n||void 0}}function Jt(){return {type:"tab"}}function en(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(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 tn(e){let t=chunk3R7QHNI5_js.j(e,"w","font")??"",n=chunk3R7QHNI5_js.j(e,"w","char")??"";return {type:"symbol",font:t,char:n}}function nn(e){return {type:"footnoteRef",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function on(e){return {type:"endnoteRef",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function rn(e){let t=chunk3R7QHNI5_js.j(e,"w","fldCharType"),n=chunk3R7QHNI5_js.j(e,"w","fldLock")==="true"||chunk3R7QHNI5_js.j(e,"w","fldLock")==="1",o=chunk3R7QHNI5_js.j(e,"w","dirty")==="true"||chunk3R7QHNI5_js.j(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 an(e){return {type:"instrText",text:chunk3R7QHNI5_js.k(e)}}function ot(e,t,n){let o=chunkLW5OFHSW_js.A(e,t??void 0,n??void 0);return o?{type:"drawing",image:o}:null}function fe(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function ln(e,t,n){let o=[],r=chunk3R7QHNI5_js.i(e);for(let a of r)switch(fe(a.name)){case "t":o.push(Qt(a));break;case "tab":o.push(Jt());break;case "br":o.push(en(a));break;case "sym":o.push(tn(a));break;case "footnoteReference":o.push(nn(a));break;case "endnoteReference":o.push(on(a));break;case "fldChar":o.push(rn(a));break;case "instrText":o.push(an(a));break;case "softHyphen":o.push({type:"softHyphen"});break;case "noBreakHyphen":o.push({type:"noBreakHyphen"});break;case "drawing":let l=ot(a,t,n);l&&o.push(l);break;case "pict":case "object":{let f=tt(a,t,n);f&&o.push(f);break}case "rPr":break;case "lastRenderedPageBreak":break;case "cr":o.push({type:"break",breakType:"textWrapping"});break;case "AlternateContent":{let c=chunk3R7QHNI5_js.i(a).find(d=>fe(d.name)==="Choice")??chunk3R7QHNI5_js.i(a).find(d=>fe(d.name)==="Fallback");if(c){for(let d of chunk3R7QHNI5_js.i(c))if(fe(d.name)==="drawing"){let w=ot(d,t,n);w?.image?.src&&o.push(w);}}break}case "footnoteRef":o.push({type:"footnoteRefMark"});break;case "endnoteRef":o.push({type:"endnoteRefMark"});break;case "separator":o.push({type:"separator"});break;case "continuationSeparator":o.push({type:"continuationSeparator"});break;}return o}function K(e,t,n,o=null,r=null){let a={type:"run",content:[]},u=chunk3R7QHNI5_js.e(e,"w","rPr");return u&&(a.formatting=ce(u,n),a.propertyChanges=Kt(u,n,t,a.formatting)),a.content=ln(e,o,r),a}function sn(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 un(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=chunk3R7QHNI5_js.j(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=chunk3R7QHNI5_js.j(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=chunk3R7QHNI5_js.j(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=chunk3R7QHNI5_js.j(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function $(e){if(!e)return;let t=chunk3R7QHNI5_js.j(e,"w","val");if(!t)return;let n={style:t},o=chunk3R7QHNI5_js.j(e,"w","color"),r=chunk3R7QHNI5_js.j(e,"w","themeColor");(o||r)&&(n.color=sn(o,r,chunk3R7QHNI5_js.j(e,"w","themeTint"),chunk3R7QHNI5_js.j(e,"w","themeShade")));let a=chunk3R7QHNI5_js.l(e,"w","sz");a!==void 0&&(n.size=a);let u=chunk3R7QHNI5_js.l(e,"w","space");u!==void 0&&(n.space=u);let l=chunk3R7QHNI5_js.j(e,"w","shadow");l&&(n.shadow=l==="1"||l==="true");let f=chunk3R7QHNI5_js.j(e,"w","frame");return f&&(n.frame=f==="1"||f==="true"),n}function fn(e){if(!e)return;let t=chunk3R7QHNI5_js.f(e,"w","tab");if(t.length===0)return;let n=[];for(let o of t){let r=chunk3R7QHNI5_js.l(o,"w","pos"),a=chunk3R7QHNI5_js.j(o,"w","val");if(r!==void 0&&a){let u={position:r,alignment:a},l=chunk3R7QHNI5_js.j(o,"w","leader");l&&(u.leader=l),n.push(u);}}return n.length>0?n:void 0}function cn(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.l(e,"w","w");n!==void 0&&(t.width=n);let o=chunk3R7QHNI5_js.l(e,"w","h");o!==void 0&&(t.height=o);let r=chunk3R7QHNI5_js.j(e,"w","hAnchor");(r==="text"||r==="margin"||r==="page")&&(t.hAnchor=r);let a=chunk3R7QHNI5_js.j(e,"w","vAnchor");(a==="text"||a==="margin"||a==="page")&&(t.vAnchor=a);let u=chunk3R7QHNI5_js.l(e,"w","x");u!==void 0&&(t.x=u);let l=chunk3R7QHNI5_js.l(e,"w","y");l!==void 0&&(t.y=l);let f=chunk3R7QHNI5_js.j(e,"w","xAlign");f&&(t.xAlign=f);let c=chunk3R7QHNI5_js.j(e,"w","yAlign");c&&(t.yAlign=c);let d=chunk3R7QHNI5_js.j(e,"w","wrap");return d&&(t.wrap=d),Object.keys(t).length>0?t:void 0}function de(e,t,n){if(!e)return;let o={},r=chunk3R7QHNI5_js.e(e,"w","jc");if(r){let b=chunk3R7QHNI5_js.j(r,"w","val");b&&(o.alignment=b);}let a=chunk3R7QHNI5_js.e(e,"w","bidi");a&&(o.bidi=chunk3R7QHNI5_js.m(a));let u=chunk3R7QHNI5_js.e(e,"w","spacing");if(u){let b=chunk3R7QHNI5_js.l(u,"w","before");b!==void 0&&(o.spaceBefore=b);let k=chunk3R7QHNI5_js.l(u,"w","after");k!==void 0&&(o.spaceAfter=k);let B=chunk3R7QHNI5_js.l(u,"w","line");B!==void 0&&(o.lineSpacing=B);let N={};b!==void 0&&(N.before=true),k!==void 0&&(N.after=true),(N.before||N.after)&&(o.spacingExplicit=N);let H=chunk3R7QHNI5_js.j(u,"w","lineRule");H&&(o.lineSpacingRule=H);let I=chunk3R7QHNI5_js.j(u,"w","beforeAutospacing");I&&(o.beforeAutospacing=I==="1"||I==="true");let X=chunk3R7QHNI5_js.j(u,"w","afterAutospacing");X&&(o.afterAutospacing=X==="1"||X==="true");}let l=chunk3R7QHNI5_js.e(e,"w","ind");if(l){let b=chunk3R7QHNI5_js.l(l,"w","left");b!==void 0&&(o.indentLeft=b);let k=chunk3R7QHNI5_js.l(l,"w","right");k!==void 0&&(o.indentRight=k);let B=chunk3R7QHNI5_js.l(l,"w","firstLine");B!==void 0&&(o.indentFirstLine=B);let N=chunk3R7QHNI5_js.l(l,"w","hanging");N!==void 0&&(o.indentFirstLine=-N,o.hangingIndent=true);let H=chunk3R7QHNI5_js.l(l,"w","start");H!==void 0&&o.indentLeft===void 0&&(o.indentLeft=H);let I=chunk3R7QHNI5_js.l(l,"w","end");I!==void 0&&o.indentRight===void 0&&(o.indentRight=I);}let f=chunk3R7QHNI5_js.e(e,"w","pBdr");if(f){let b={},k=$(chunk3R7QHNI5_js.e(f,"w","top"));k&&(b.top=k);let B=$(chunk3R7QHNI5_js.e(f,"w","bottom"));B&&(b.bottom=B);let N=$(chunk3R7QHNI5_js.e(f,"w","left"));N&&(b.left=N);let H=$(chunk3R7QHNI5_js.e(f,"w","right"));H&&(b.right=H);let I=$(chunk3R7QHNI5_js.e(f,"w","between"));I&&(b.between=I);let X=$(chunk3R7QHNI5_js.e(f,"w","bar"));X&&(b.bar=X),Object.keys(b).length>0&&(o.borders=b);}let c=chunk3R7QHNI5_js.e(e,"w","shd");c&&(o.shading=un(c));let d=chunk3R7QHNI5_js.e(e,"w","tabs");d&&(o.tabs=fn(d));let p=chunk3R7QHNI5_js.e(e,"w","keepNext");p&&(o.keepNext=chunk3R7QHNI5_js.m(p));let w=chunk3R7QHNI5_js.e(e,"w","keepLines");w&&(o.keepLines=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","widowControl");T&&(o.widowControl=chunk3R7QHNI5_js.m(T));let y=chunk3R7QHNI5_js.e(e,"w","pageBreakBefore");y&&(o.pageBreakBefore=chunk3R7QHNI5_js.m(y));let x=chunk3R7QHNI5_js.e(e,"w","contextualSpacing");x&&(o.contextualSpacing=chunk3R7QHNI5_js.m(x));let h=chunk3R7QHNI5_js.e(e,"w","numPr");if(h){let b=chunk3R7QHNI5_js.e(h,"w","numId"),k=chunk3R7QHNI5_js.e(h,"w","ilvl");if(b||k){if(o.numPr={},b){let B=chunk3R7QHNI5_js.l(b,"w","val");B!==void 0&&(o.numPr.numId=B);}if(k){let B=chunk3R7QHNI5_js.l(k,"w","val");B!==void 0&&(o.numPr.ilvl=B);}}}let P=chunk3R7QHNI5_js.e(e,"w","outlineLvl");if(P){let b=chunk3R7QHNI5_js.l(P,"w","val");b!==void 0&&(o.outlineLevel=b);}let C=chunk3R7QHNI5_js.e(e,"w","pStyle");if(C){let b=chunk3R7QHNI5_js.j(C,"w","val");b&&(o.styleId=b);}let M=chunk3R7QHNI5_js.e(e,"w","framePr");M&&(o.frame=cn(M));let m=chunk3R7QHNI5_js.e(e,"w","suppressLineNumbers");m&&(o.suppressLineNumbers=chunk3R7QHNI5_js.m(m));let F=chunk3R7QHNI5_js.e(e,"w","suppressAutoHyphens");F&&(o.suppressAutoHyphens=chunk3R7QHNI5_js.m(F));let E=chunk3R7QHNI5_js.e(e,"w","rPr");return E&&(o.runProperties=ce(E,t)),Object.keys(o).length>0?o:void 0}function dn(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function pn(e){let t=chunk3R7QHNI5_js.l(e,"w","id")??0,n=chunk3R7QHNI5_js.j(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=chunk3R7QHNI5_js.l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=chunk3R7QHNI5_js.l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function mn(e){return {type:"bookmarkEnd",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function rt(e,t,n=null,o=null,r=null){let a={type:"hyperlink",children:[]},u=chunk3R7QHNI5_js.j(e,"r","id");if(u&&(a.rId=u,t)){let T=t.get(u);T&&(chunkZ3LGMBJC_js.c(T),a.href=T.target);}let l=chunk3R7QHNI5_js.j(e,"w","anchor");l&&(a.anchor=l,a.href||(a.href=`#${l}`));let f=chunk3R7QHNI5_js.j(e,"w","tooltip");f&&(a.tooltip=f);let c=chunk3R7QHNI5_js.j(e,"w","tgtFrame");c&&(a.target=c);let d=chunk3R7QHNI5_js.j(e,"w","history");(d==="1"||d==="true")&&(a.history=true);let p=chunk3R7QHNI5_js.j(e,"w","docLocation");p&&(a.docLocation=p);let w=chunk3R7QHNI5_js.i(e);for(let T of w)switch(dn(T.name)){case "r":a.children.push(K(T,n,o,t,r));break;case "bookmarkStart":a.children.push(pn(T));break;case "bookmarkEnd":a.children.push(mn(T));break}return a}function Ao(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 Io(e){return e.href?/^https?:\/\/|^mailto:|^tel:|^ftp:/i.test(e.href):!!e.rId&&!e.anchor}function Ho(e){return !!e.anchor}function Lo(e){return e.href}function Xo(e){return e.children.some(t=>t.type==="run")}function Do(e){return e.children.filter(t=>t.type==="run")}function Oo(e,t){if(e.rId){let n=t.get(e.rId);if(n)return chunkZ3LGMBJC_js.c(n),e.href=n.target,e.href}return e.anchor&&!e.href&&(e.href=`#${e.anchor}`),e.href}function it(e){let t=chunk3R7QHNI5_js.l(e,"w","id")??0,n=chunk3R7QHNI5_js.j(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=chunk3R7QHNI5_js.l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=chunk3R7QHNI5_js.l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function at(e){return {type:"bookmarkEnd",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function st(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+=st(n);return t}function J(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function ut(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 chunk3R7QHNI5_js.i(l)){let c=J(f.name);if(!n.has(c)){if(c==="lastRenderedPageBreak"){r=true;continue}if(c==="r"){for(let d of chunk3R7QHNI5_js.i(f)){let p=J(d.name);if(p!=="rPr"){if(p==="lastRenderedPageBreak"){r=true;continue}if(p==="br"&&chunk3R7QHNI5_js.j(d,"w","type")==="page")return "forced";if(o.has(p))return "visible"}}continue}if(t.has(c)){let d=a(f);if(d!=="continue")return d;continue}return "continue"}}return "continue"}let u=a(e);return u==="forced"?true:u==="visible"?r:false}function lt(e,t){if(!e)return `w:${t}`;let n=e.indexOf(":");return n<0?t:`${e.substring(0,n+1)}${t}`}function ft(e){if(e.type!=="element")return e;let t=J(e.name),n=e.name;return t==="delText"?n=lt(e.name,"t"):t==="delInstrText"&&(n=lt(e.name,"instrText")),{...e,name:n,elements:e.elements?.map(ft)}}function Q(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=chunk3R7QHNI5_js.j(e,"w","author"),r=chunk3R7QHNI5_js.j(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 gn(e){return Q(e)}function ct(e,t,n,o){if(!e)return;let r=chunk3R7QHNI5_js.f(e,"w","pPrChange").map(a=>{let u=chunk3R7QHNI5_js.e(a,"w","pPr");return {type:"paragraphPropertyChange",info:gn(a),previousFormatting:de(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function hn(e,t,n,o,r){return rt(e,t,n,o,r)}function wn(e){return it(e)}function yn(e){return at(e)}function dt(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 bn(e,t,n,o,r){let a=chunk3R7QHNI5_js.j(e,"w","instr")??"",u=dt(a),l={type:"simpleField",instruction:a,fieldType:u,content:[]},f=chunk3R7QHNI5_js.j(e,"w","fldLock");(f==="1"||f==="true")&&(l.fldLock=true);let c=chunk3R7QHNI5_js.j(e,"w","dirty");(c==="1"||c==="true")&&(l.dirty=true);let d=chunk3R7QHNI5_js.i(e);for(let p of d)J(p.name)==="r"&&l.content.push(K(p,t,n,o,r));return l}function U(e,t,n,o,r,a,u="default"){let l=[],f=chunk3R7QHNI5_js.i(e),c=false,d="",p=[],w=[],T=false,y=false,x=false;for(let h of f){let P=J(h.name);switch(P){case "r":{let C=u==="deletion"?ft(h):h,M=K(C,t,n,r,a),m=false,F=false,E=false,b="";for(let k of M.content)k.type==="fieldChar"?k.charType==="begin"?(m=true,k.fldLock&&(y=true),k.dirty&&(x=true)):k.charType==="separate"?F=true:k.charType==="end"&&(E=true):k.type==="instrText"&&(b+=k.text);if(m&&(c=true,T=false,d="",p=[],w=[],y=false,x=false),c){if(b&&(d+=b),F&&(T=true),T&&!E?F||w.push(M):!T&&!m&&p.push(M),E){let k={type:"complexField",instruction:d.trim(),fieldType:dt(d),fieldCode:p,fieldResult:w};y&&(k.fldLock=true),x&&(k.dirty=true),l.push(k),c=false;}}else l.push(M);break}case "hyperlink":l.push(hn(h,r,t,n,a));break;case "bookmarkStart":l.push(wn(h));break;case "bookmarkEnd":l.push(yn(h));break;case "fldSimple":l.push(bn(h,t,n,r,a));break;case "pPr":break;case "proofErr":case "permStart":case "permEnd":case "customXml":break;case "sdt":{let C=(h.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtPr"||m.name?.endsWith(":sdtPr"))),M=(h.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtContent"||m.name?.endsWith(":sdtContent")));if(M){let m=U(M,t,n,null,r,a,u),E={type:"inlineSdt",properties:ie(C??null),content:m.filter(b=>b.type==="run"||b.type==="hyperlink"||b.type==="simpleField"||b.type==="complexField"||b.type==="inlineSdt"||b.type==="mathEquation")};l.push(E);}break}case "ins":{let C=Q(h),M=U(h,t,n,null,r,a),m={type:"insertion",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "del":{let C=Q(h),M=U(h,t,n,null,r,a,"deletion"),m={type:"deletion",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "moveFrom":{let C=Q(h),M=U(h,t,n,null,r,a,"deletion"),m={type:"moveFrom",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "moveTo":{let C=Q(h),M=U(h,t,n,null,r,a),m={type:"moveTo",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "smartTag":break;case "moveFromRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10),M=chunk3R7QHNI5_js.j(h,"w","name")??"";l.push({type:"moveFromRangeStart",id:C,name:M});break}case "moveFromRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"moveFromRangeEnd",id:C});break}case "moveToRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10),M=chunk3R7QHNI5_js.j(h,"w","name")??"";l.push({type:"moveToRangeStart",id:C,name:M});break}case "moveToRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"moveToRangeEnd",id:C});break}case "commentRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"commentRangeStart",id:C});break}case "commentRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"commentRangeEnd",id:C});break}case "oMath":case "oMathPara":{let C=P==="oMathPara",M=chunk3R7QHNI5_js.b(h),m=st(h),F={type:"mathEquation",display:C?"block":"inline",ommlXml:M,plainText:m||void 0};l.push(F);break}}}return l}function Tn(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 pt(e){let t=chunk3R7QHNI5_js.j(e,"w","id");if(t==null)return null;let n=parseInt(t,10);if(Number.isNaN(n))return null;let o=chunk3R7QHNI5_js.j(e,"w","author")??"",r=chunk3R7QHNI5_js.j(e,"w","date")??void 0,a={id:n,author:o};return r&&(a.date=r),a}function Z(e,t,n,o,r=null,a=null,u){let l={type:"paragraph",content:[]},f=chunk3R7QHNI5_js.j(e,"w14","paraId")??chunk3R7QHNI5_js.j(e,"w","paraId");f&&(l.paraId=f);let c=chunk3R7QHNI5_js.j(e,"w14","textId")??chunk3R7QHNI5_js.j(e,"w","textId");c&&(l.textId=c),!u?.inHeaderFooter&&ut(e)&&(l.renderedPageBreakBefore=true);let d=chunk3R7QHNI5_js.e(e,"w","pPr");if(d){l.formatting=de(d,n),l.propertyChanges=ct(d,n,t,l.formatting);let y=chunk3R7QHNI5_js.e(d,"w","rPr");if(y){let h=chunk3R7QHNI5_js.e(y,"w","ins");if(h){let C=pt(h);C&&(l.pPrIns=C);}let P=chunk3R7QHNI5_js.e(y,"w","del");if(P){let C=pt(P);C&&(l.pPrDel=C);}}let x=chunk3R7QHNI5_js.e(d,"w","sectPr");x&&(l.sectionProperties=Je(x));}let p=U(e,t,n,o,r,a);l.content=p;let w=l.formatting?.numPr,T=false;if(!w&&l.formatting?.styleId&&t){let y=t.get(l.formatting.styleId);y?.pPr?.numPr&&(w=y.pPr.numPr,T=true,l.formatting||(l.formatting={}),l.formatting.numPr=w,l.formatting.numPrFromStyle=w);}if(w&&o){let y=chunkH57LNDBH_js.d(w,o);if(y){l.listRendering=y;let x=T?xn(l.formatting?.styleId,t):{left:false,firstLine:false},h=o.getLevel(y.numId,y.level);if(h?.pPr){l.formatting||(l.formatting={});let P=d?chunk3R7QHNI5_js.e(d,"w","ind"):null,C=P!=null&&(chunk3R7QHNI5_js.j(P,"w","left")!==null||chunk3R7QHNI5_js.j(P,"w","start")!==null),M=F=>{let E=P?chunk3R7QHNI5_js.j(P,"w",F):null;if(E===null)return false;let b=parseInt(E,10);return Number.isNaN(b)||b!==0},m=P!=null&&(M("firstLine")||M("hanging"));!C&&!x.left&&h.pPr.indentLeft!==void 0&&(l.formatting.indentLeft=h.pPr.indentLeft),!m&&!x.firstLine&&(h.pPr.indentFirstLine!==void 0&&(l.formatting.indentFirstLine=h.pPr.indentFirstLine),h.pPr.hangingIndent!==void 0&&(l.formatting.hangingIndent=h.pPr.hangingIndent));}}}return l}function xn(e,t){let n={left:false,firstLine:false};if(!e||!t)return n;let o=new Set,r=e;for(;r&&!o.has(r);){o.add(r);let a=t.get(r);if(!a)break;let u=a.pPr;if(u&&(n.left||(n.left=u.indentLeft!==void 0),n.firstLine||(n.firstLine=u.indentFirstLine!==void 0||u.hangingIndent!==void 0)),n.left&&n.firstLine)break;r=a.basedOn;}return n}function mt(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","tblW"));n&&(t.width=n);let o=chunk3R7QHNI5_js.e(e,"w","jc");if(o){let x=chunk3R7QHNI5_js.j(o,"w","val");(x==="left"||x==="center"||x==="right"||x==="start")&&(t.justification=x==="start"?"left":x);}let r=D(chunk3R7QHNI5_js.e(e,"w","tblCellSpacing"));r&&(t.cellSpacing=r);let a=D(chunk3R7QHNI5_js.e(e,"w","tblInd"));a&&(t.indent=a);let u=ne(chunk3R7QHNI5_js.e(e,"w","tblBorders"));u&&(t.borders=u);let l=oe(chunk3R7QHNI5_js.e(e,"w","tblCellMar"));l&&(t.cellMargins=l);let f=chunk3R7QHNI5_js.e(e,"w","tblLayout");if(f){let x=chunk3R7QHNI5_js.j(f,"w","type");(x==="fixed"||x==="autofit")&&(t.layout=x);}let c=chunk3R7QHNI5_js.e(e,"w","tblStyle");if(c){let x=chunk3R7QHNI5_js.j(c,"w","val");x&&(t.styleId=x);}let d=ye(chunk3R7QHNI5_js.e(e,"w","tblLook"));d&&(t.look=d);let p=re(chunk3R7QHNI5_js.e(e,"w","shd"));p&&(t.shading=p);let w=chunk3R7QHNI5_js.e(e,"w","tblOverlap");if(w){let x=chunk3R7QHNI5_js.j(w,"w","val");(x==="never"||x==="overlap")&&(t.overlap=x);}let T=be(chunk3R7QHNI5_js.e(e,"w","tblpPr"));if(T&&(t.floating=T),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","bidiVisual"))&&(t.bidi=true),Object.keys(t).length!==0)return t}function Fn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","tblPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","tblPr");return {type:"tablePropertyChange",info:te(o),previousFormatting:mt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function Cn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","trPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","trPr");return {type:"tableRowPropertyChange",info:te(o),previousFormatting:gt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function kn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","tcPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","tcPr");return {type:"tableCellPropertyChange",info:te(o),previousFormatting:wt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function Sn(e){if(!e)return;let t=chunk3R7QHNI5_js.e(e,"w","ins");if(t)return {type:"tableRowInsertion",info:j(t)};let n=chunk3R7QHNI5_js.e(e,"w","del");if(n)return {type:"tableRowDeletion",info:j(n)}}function Mn(e){if(!e)return;let t=chunk3R7QHNI5_js.e(e,"w","cellIns");if(t)return {type:"tableCellInsertion",info:j(t)};let n=chunk3R7QHNI5_js.e(e,"w","cellDel");if(n)return {type:"tableCellDeletion",info:j(n)};let o=chunk3R7QHNI5_js.e(e,"w","cellMerge");if(o){let r=chunk3R7QHNI5_js.j(o,"w","vMerge"),a=chunk3R7QHNI5_js.j(o,"w","vMergeOrig"),u=l=>l==="rest"||l==="cont";return {type:"tableCellMerge",info:j(o),...u(r)?{vMerge:r}:{},...u(a)?{vMergeOrig:a}:{}}}}function gt(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.e(e,"w","trHeight");if(n){let f=chunk3R7QHNI5_js.l(n,"w","val");f!==void 0&&f>0&&(t.height={value:f,type:"dxa"});let c=chunk3R7QHNI5_js.j(n,"w","hRule");(c==="auto"||c==="atLeast"||c==="exact")&&(t.heightRule=c);}chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","tblHeader"))&&(t.header=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","cantSplit"))&&(t.cantSplit=true);let a=chunk3R7QHNI5_js.e(e,"w","jc");if(a){let f=chunk3R7QHNI5_js.j(a,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","hidden"))&&(t.hidden=true);let l=ht(chunk3R7QHNI5_js.e(e,"w","cnfStyle"));if(l&&(t.conditionalFormat=l),Object.keys(t).length!==0)return t}function ht(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=chunk3R7QHNI5_js.j(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=chunk3R7QHNI5_js.j(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=chunk3R7QHNI5_js.j(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=chunk3R7QHNI5_js.j(e,"w","oddHBand");(u==="1"||u==="true")&&(t.oddHBand=true);let l=chunk3R7QHNI5_js.j(e,"w","evenHBand");(l==="1"||l==="true")&&(t.evenHBand=true);let f=chunk3R7QHNI5_js.j(e,"w","oddVBand");(f==="1"||f==="true")&&(t.oddVBand=true);let c=chunk3R7QHNI5_js.j(e,"w","evenVBand");(c==="1"||c==="true")&&(t.evenVBand=true);let d=chunk3R7QHNI5_js.j(e,"w","firstRowFirstColumn");(d==="1"||d==="true")&&(t.nwCell=true);let p=chunk3R7QHNI5_js.j(e,"w","firstRowLastColumn");(p==="1"||p==="true")&&(t.neCell=true);let w=chunk3R7QHNI5_js.j(e,"w","lastRowFirstColumn");(w==="1"||w==="true")&&(t.swCell=true);let T=chunk3R7QHNI5_js.j(e,"w","lastRowLastColumn");(T==="1"||T==="true")&&(t.seCell=true);let y=chunk3R7QHNI5_js.j(e,"w","val");if(y&&y.length===12&&(y[0]==="1"&&(t.firstRow=true),y[1]==="1"&&(t.lastRow=true),y[2]==="1"&&(t.firstColumn=true),y[3]==="1"&&(t.lastColumn=true),y[4]==="1"&&(t.oddVBand=true),y[5]==="1"&&(t.evenVBand=true),y[6]==="1"&&(t.oddHBand=true),y[7]==="1"&&(t.evenHBand=true),y[8]==="1"&&(t.nwCell=true),y[9]==="1"&&(t.neCell=true),y[10]==="1"&&(t.swCell=true),y[11]==="1"&&(t.seCell=true)),Object.keys(t).length!==0)return t}function wt(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","tcW"));n&&(t.width=n);let o=ne(chunk3R7QHNI5_js.e(e,"w","tcBorders"));o&&(t.borders=o);let r=oe(chunk3R7QHNI5_js.e(e,"w","tcMar"));r&&(t.margins=r);let a=re(chunk3R7QHNI5_js.e(e,"w","shd"));a&&(t.shading=a);let u=chunk3R7QHNI5_js.e(e,"w","vAlign");if(u){let y=chunk3R7QHNI5_js.j(u,"w","val");(y==="top"||y==="center"||y==="bottom")&&(t.verticalAlign=y);}let l=chunk3R7QHNI5_js.e(e,"w","textDirection");if(l){let y=chunk3R7QHNI5_js.j(l,"w","val");y&&(t.textDirection=y);}let f=chunk3R7QHNI5_js.e(e,"w","gridSpan");if(f){let y=chunk3R7QHNI5_js.l(f,"w","val");y!==void 0&&y>1&&(t.gridSpan=y);}let c=chunk3R7QHNI5_js.e(e,"w","vMerge");c&&(chunk3R7QHNI5_js.j(c,"w","val")==="restart"?t.vMerge="restart":t.vMerge="continue"),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","tcFitText"))&&(t.fitText=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","noWrap"))&&(t.noWrap=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","hideMark"))&&(t.hideMark=true);let T=ht(chunk3R7QHNI5_js.e(e,"w","cnfStyle"));if(T&&(t.conditionalFormat=T),Object.keys(t).length!==0)return t}function Rn(e,t,n,o,r,a,u){let l=[],f=e.elements||[];for(let c of f){if(!c.name)continue;let d=c.name.split(":").pop();if(d==="p"){let p=Z(c,t,n,o,r,a,u);l.push(p);}else if(d==="tbl"){let p=Te(c,t,n,o,r,a,u);l.push(p);}}return l.length===0&&l.push({type:"paragraph",content:[]}),l}function En(e,t,n,o,r,a,u){let l={type:"tableCell",content:[]},f=chunk3R7QHNI5_js.e(e,"w","tcPr"),c=wt(f);return c&&(l.formatting=c),l.propertyChanges=kn(f,c),l.structuralChange=Mn(f),l.content=Rn(e,t,n,o,r,a,u),l}function Pn(e,t,n,o,r,a,u){let l={type:"tableRow",cells:[]},f=chunk3R7QHNI5_js.e(e,"w","trPr"),c=gt(f);c&&(l.formatting=c),l.propertyChanges=Cn(f,c),l.structuralChange=Sn(f);let d=chunk3R7QHNI5_js.f(e,"w","tc");for(let p of d){let w=En(p,t,n,o,r,a,u);l.cells.push(w);}return l}function Bn(e){if(!e)return;let t=[],n=chunk3R7QHNI5_js.f(e,"w","gridCol");for(let o of n){let r=chunk3R7QHNI5_js.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 vn(e){return e.cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function Nn(e){let t=Math.max(e.columnWidths?.length??0,...e.rows.map(n=>vn(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 Te(e,t,n,o,r,a,u){let l={type:"table",rows:[]},f=chunk3R7QHNI5_js.e(e,"w","tblPr"),c=mt(f);c&&(l.formatting=c),l.propertyChanges=Fn(f,c);let d=Bn(chunk3R7QHNI5_js.e(e,"w","tblGrid"));d&&(l.columnWidths=d);let p=chunk3R7QHNI5_js.f(e,"w","tr");for(let w of p){let T=Pn(w,t,n,o,r,a,u);l.rows.push(T);}return Nn(l),l}exports.A=so;exports.B=Je;exports.C=mo;exports.D=go;exports.E=K;exports.F=rt;exports.G=Ao;exports.H=Io;exports.I=Ho;exports.J=Lo;exports.K=Xo;exports.L=Do;exports.M=Oo;exports.N=Tn;exports.O=Z;exports.a=In;exports.b=Y;exports.c=De;exports.d=V;exports.e=ne;exports.f=oe;exports.g=re;exports.h=ye;exports.i=be;exports.j=Ct;exports.k=kt;exports.l=St;exports.m=Mt;exports.n=Rt;exports.o=mt;exports.p=vt;exports.q=q;exports.r=Qn;exports.s=Jn;exports.t=oo;exports.u=ro;exports.v=Ze;exports.w=Ke;exports.x=io;exports.y=ao;exports.z=lo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkPGWY6UFK_js=require('./chunk-PGWY6UFK.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkRQVHKDXK_js=require('./chunk-RQVHKDXK.js'),chunk4U2S3WV2_js=require('./chunk-4U2S3WV2.js'),chunkLWH66Q7Q_js=require('./chunk-LWH66Q7Q.js'),chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js'),chunkGSKMHXHG_js=require('./chunk-GSKMHXHG.js');function ve(e){if(!e||e.pattern&&e.pattern!=="clear")return;let n=e.fill?.rgb;if(!(!n||e.fill?.auto))return chunkMJ5FQX7Q_js.n(n)}function j(e){if(!e)return [];let n=[];e.bold&&n.push(chunk4U2S3WV2_js.b.mark("bold")),e.italic&&n.push(chunk4U2S3WV2_js.b.mark("italic")),e.underline&&e.underline.style!=="none"&&n.push(chunk4U2S3WV2_js.b.mark("underline",{style:e.underline.style,color:e.underline.color})),(e.strike||e.doubleStrike)&&n.push(chunk4U2S3WV2_js.b.mark("strike",{double:e.doubleStrike||false})),e.color&&!e.color.auto&&n.push(chunk4U2S3WV2_js.b.mark("textColor",{rgb:e.color.rgb,themeColor:e.color.themeColor,themeTint:e.color.themeTint,themeShade:e.color.themeShade}));let o=e.highlight&&e.highlight!=="none"?e.highlight:ve(e.shading);return o&&n.push(chunk4U2S3WV2_js.b.mark("highlight",{color:o})),e.fontSize&&n.push(chunk4U2S3WV2_js.b.mark("fontSize",{size:e.fontSize})),e.fontFamily&&n.push(chunk4U2S3WV2_js.b.mark("fontFamily",{ascii:e.fontFamily.ascii,hAnsi:e.fontFamily.hAnsi,eastAsia:e.fontFamily.eastAsia,cs:e.fontFamily.cs,asciiTheme:e.fontFamily.asciiTheme,hAnsiTheme:e.fontFamily.hAnsiTheme,eastAsiaTheme:e.fontFamily.eastAsiaTheme,csTheme:e.fontFamily.csTheme})),e.vertAlign==="superscript"?n.push(chunk4U2S3WV2_js.b.mark("superscript")):e.vertAlign==="subscript"&&n.push(chunk4U2S3WV2_js.b.mark("subscript")),e.allCaps&&n.push(chunk4U2S3WV2_js.b.mark("allCaps")),e.smallCaps&&n.push(chunk4U2S3WV2_js.b.mark("smallCaps")),(e.spacing!=null||e.position!=null||e.scale!=null||e.kerning!=null)&&n.push(chunk4U2S3WV2_js.b.mark("characterSpacing",{spacing:e.spacing??null,position:e.position??null,scale:e.scale??null,kerning:e.kerning??null})),e.emboss&&n.push(chunk4U2S3WV2_js.b.mark("emboss")),e.imprint&&n.push(chunk4U2S3WV2_js.b.mark("imprint")),e.shadow&&n.push(chunk4U2S3WV2_js.b.mark("textShadow")),e.emphasisMark&&e.emphasisMark!=="none"&&n.push(chunk4U2S3WV2_js.b.mark("emphasisMark",{type:e.emphasisMark})),e.outline&&n.push(chunk4U2S3WV2_js.b.mark("textOutline")),e.hidden&&n.push(chunk4U2S3WV2_js.b.mark("hidden")),e.rtl&&n.push(chunk4U2S3WV2_js.b.mark("rtl")),e.effect&&e.effect!=="none"&&n.push(chunk4U2S3WV2_js.b.mark("textEffect",{effect:e.effect})),e.styleId&&n.push(chunk4U2S3WV2_js.b.mark("runStyle",{styleId:e.styleId})),n}function E(e,n){if(!e)return;if(!n)return e;let o=n.resolveRunStyle(e.styleId);return o?chunkGSKMHXHG_js.b(o,e):e}function te(e,n){let o="",l,t=e.type==="simpleField"?e.content:e.fieldResult;if(t){for(let s of t)if(s.type==="run"){for(let u of s.content)u.type==="text"&&(o+=u.text);!l&&s.formatting&&(l=s.formatting);}}let r=chunkGSKMHXHG_js.b(n,l),i=j(r);return chunk4U2S3WV2_js.b.node("field",{fieldType:e.fieldType,instruction:e.instruction,displayText:o,fieldKind:e.type==="simpleField"?"simple":"complex",fldLock:e.fldLock??false,dirty:e.dirty??false},void 0,i)}function ne(e){return chunk4U2S3WV2_js.b.node("math",{display:e.display,ommlXml:e.ommlXml,plainText:e.plainText||""})}function U(e,n,o){let l=[],t=e.formatting?.styleId?o?.getRunStyleOwnProperties(e.formatting.styleId):void 0,r=chunkGSKMHXHG_js.b(chunkGSKMHXHG_js.b(n,t),e.formatting),i=j(r);for(let s of e.content){let u=he(s,i);l.push(...u);}return l}function he(e,n){switch(e.type){case "text":return e.text?[chunk4U2S3WV2_js.b.text(e.text,n)]:[];case "break":return e.breakType==="textWrapping"||!e.breakType?[chunk4U2S3WV2_js.b.node("hardBreak",null,void 0,n)]:[];case "tab":return [chunk4U2S3WV2_js.b.node("tab",null,void 0,n)];case "drawing":return e.image?[Me(e.image)]:[];case "shape":{let t=e.shape;return t.textBody&&t.textBody.content.length>0?[]:[Ne(t)]}case "footnoteRef":let o=chunk4U2S3WV2_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"footnote"});return [chunk4U2S3WV2_js.b.text(e.id.toString(),[...n,o])];case "endnoteRef":let l=chunk4U2S3WV2_js.b.mark("footnoteRef",{id:e.id.toString(),noteType:"endnote"});return [chunk4U2S3WV2_js.b.text(e.id.toString(),[...n,l])];default:return []}}function Me(e){let n=e.size?.width?chunkBJSG6TEG_js.f(e.size.width):void 0,o=e.size?.height?chunkBJSG6TEG_js.f(e.size.height):void 0,l=e.wrap.type,t=e.wrap.wrapText,r=e.position?.horizontal?.alignment,i;l==="inline"||l==="topAndBottom"?i="none":l==="square"||l==="tight"||l==="through"?t==="left"?i="right":t==="right"||r==="left"?i="left":r==="right"?i="right":i="none":i="none";let s="inline";l==="inline"?s="inline":l==="topAndBottom"?s="block":chunkJFZIXFRC_js.b(l)||i&&i!=="none"?s="float":s="block";let u;if(e.transform){let P=[];e.transform.rotation&&P.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&P.push("scaleX(-1)"),e.transform.flipV&&P.push("scaleY(-1)"),P.length>0&&(u=P.join(" "));}let m=e.wrap.distT!=null?chunkBJSG6TEG_js.f(e.wrap.distT):void 0,c=e.wrap.distB!=null?chunkBJSG6TEG_js.f(e.wrap.distB):void 0,f=e.wrap.distL!=null?chunkBJSG6TEG_js.f(e.wrap.distL):void 0,a=e.wrap.distR!=null?chunkBJSG6TEG_js.f(e.wrap.distR):void 0,p;e.position&&(p={horizontal:e.position.horizontal?{relativeTo:e.position.horizontal.relativeTo,posOffset:e.position.horizontal.posOffset,align:e.position.horizontal.alignment}:void 0,vertical:e.position.vertical?{relativeTo:e.position.vertical.relativeTo,posOffset:e.position.vertical.posOffset,align:e.position.vertical.alignment}:void 0});let S,k,v;if(e.outline&&e.outline.width){S=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(k=`#${e.outline.color.rgb}`);let P={solid:"solid",dot:"dotted",dash:"dashed",lgDash:"dashed",dashDot:"dashed",lgDashDot:"dashed",lgDashDotDot:"dashed",sysDot:"dotted",sysDash:"dashed",sysDashDot:"dashed",sysDashDotDot:"dashed"};v=e.outline.style&&P[e.outline.style]||"solid";}let D=e.padding?.top?chunkBJSG6TEG_js.f(e.padding.top):void 0,N=e.padding?.bottom?chunkBJSG6TEG_js.f(e.padding.bottom):void 0,B=e.padding?.left?chunkBJSG6TEG_js.f(e.padding.left):void 0,g=e.padding?.right?chunkBJSG6TEG_js.f(e.padding.right):void 0;return chunk4U2S3WV2_js.b.node("image",{src:e.src||"",alt:e.alt,title:e.title,width:n,height:o,rId:e.rId,wrapType:l,displayMode:s,cssFloat:i,transform:u,distTop:m,distBottom:c,distLeft:f,distRight:a,position:p,borderWidth:S,borderColor:k,borderStyle:v,wrapText:t,hlinkHref:e.hlinkHref,cropTop:e.crop?.top,cropRight:e.crop?.right,cropBottom:e.crop?.bottom,cropLeft:e.crop?.left,opacity:e.opacity,effectExtentTop:D,effectExtentBottom:N,effectExtentLeft:B,effectExtentRight:g,layoutInCell:e.layoutInCell,allowOverlap:e.allowOverlap})}function Y(e,n,o){let l=[],t=e.href||(e.anchor?`#${e.anchor}`:""),r=chunk4U2S3WV2_js.b.mark("hyperlink",{href:t,tooltip:e.tooltip,rId:e.rId});for(let i of e.children)if(i.type==="run"){let s=i.formatting?.styleId?o?.getRunStyleOwnProperties(i.formatting.styleId):void 0,u=chunkGSKMHXHG_js.b(chunkGSKMHXHG_js.b(n,s),i.formatting),c=[...j(u),r];for(let f of i.content)l.push(...he(f,c));}return l}function Ne(e){let n=e.size?.width?chunkBJSG6TEG_js.f(e.size.width):100,o=e.size?.height?chunkBJSG6TEG_js.f(e.size.height):80,l,t="solid",r,i,s;if(e.fill&&(t=e.fill.type,e.fill.color?.rgb&&(l=`#${e.fill.color.rgb}`),e.fill.type==="gradient"&&e.fill.gradient)){let a=e.fill.gradient;r=a.type,i=a.angle,s=JSON.stringify(a.stops.map(p=>({position:p.position,color:p.color.rgb?`#${p.color.rgb}`:"#000000"})));}let u,m,c;e.outline&&(e.outline.width&&(u=Math.round(e.outline.width/914400*96*100)/100),e.outline.color?.rgb&&(m=`#${e.outline.color.rgb}`),c=e.outline.style||"solid");let f;if(e.transform){let a=[];e.transform.rotation&&a.push(`rotate(${e.transform.rotation}deg)`),e.transform.flipH&&a.push("scaleX(-1)"),e.transform.flipV&&a.push("scaleY(-1)"),a.length>0&&(f=a.join(" "));}return chunk4U2S3WV2_js.b.node("shape",{shapeType:e.shapeType||"rect",shapeId:e.id,width:n,height:o,fillColor:l,fillType:t,gradientType:r,gradientAngle:i,gradientStops:s,outlineWidth:u,outlineColor:m,outlineStyle:c,transform:f})}function $(e,n,o,l){let t=Be(e,n),r=[],i,s=[],u=new Set,m;n&&(m=n.resolveParagraphStyle(e.formatting?.styleId).runFormatting);let c=chunkGSKMHXHG_js.b(m,l);for(let f of e.content){if(f.type==="commentRangeStart")u.add(f.id);else if(f.type==="commentRangeEnd")u.delete(f.id);else if(f.type==="run"){let a=U(f,c,n),p=Ie(f,a);p&&s?s.push(p):s=void 0,u.size>0&&(a=O(a,u)),r.push(...a);}else if(f.type==="hyperlink"){let a=Y(f,c,n);r.push(...a),s=void 0;}else if(f.type==="simpleField"||f.type==="complexField"){let a=te(f,c);a&&r.push(a),s=void 0;}else if(f.type==="inlineSdt"){let a=be(f,c,n);a&&r.push(a),s=void 0;}else if(f.type==="insertion"){let a=J(f,"insertion",c,n);u.size>0&&(a=O(a,u)),r.push(...a),s=void 0;}else if(f.type==="deletion"){let a=J(f,"deletion",c,n);u.size>0&&(a=O(a,u)),r.push(...a),s=void 0;}else if(f.type==="moveFrom"){let a=J(f,"deletion",c,n,true);u.size>0&&(a=O(a,u)),r.push(...a),s=void 0;}else if(f.type==="moveTo"){let a=J(f,"insertion",c,n,true);u.size>0&&(a=O(a,u)),r.push(...a),s=void 0;}else if(f.type==="mathEquation"){let a=ne(f);a&&r.push(a),s=void 0;}else f.type!=="bookmarkStart"&&f.type!=="bookmarkEnd"&&(s=void 0);f.type==="bookmarkStart"&&(i||(i=[]),i.push({id:f.id,name:f.name}));}return i&&(t.bookmarks=i),s&&s.length>0&&(t._originalRunBoundaries=s),chunk4U2S3WV2_js.b.node("paragraph",t,r)}function Ie(e,n){let o="",l;for(let t of n){if(!t.isText)return null;o+=t.text??"";let r=chunkPGWY6UFK_js.c(t.marks,chunkPGWY6UFK_js.b);if(l!=null&&l!==r)return null;l=r;}return {text:o,...l!=null?{marksKey:l}:{},...e.formatting?{formatting:e.formatting}:{},...e.propertyChanges?{propertyChanges:e.propertyChanges}:{}}}function O(e,n){if(n.size===0)return e;let o=[...n][0],l=chunk4U2S3WV2_js.b.marks.comment.create({commentId:o});return e.map(t=>t.isText?t.mark(l.addToSet(t.marks)):t)}function J(e,n,o,l,t=false){let r=[];for(let s of e.content)s.type==="run"?r.push(...U(s,o,l)):s.type==="hyperlink"&&r.push(...Y(s,o,l));let i=chunk4U2S3WV2_js.b.marks[n].create({revisionId:e.info.id,author:e.info.author,date:e.info.date??null,isMovePair:t});return r.map(s=>s.isText||s.type.allowsMarkType(i.type)?s.mark(i.addToSet(s.marks)):s)}function Be(e,n){let o=e.formatting,l=o?.styleId,t={paraId:e.paraId??void 0,textId:e.textId??void 0,styleId:l,numPr:o?.numPr,numPrFromStyle:o?.numPrFromStyle,listNumFmt:e.listRendering?.numFmt,listIsBullet:e.listRendering?.isBullet,listMarker:e.listRendering?.marker,listMarkerHidden:e.listRendering?.markerHidden||void 0,listMarkerFontFamily:e.listRendering?.markerFontFamily||void 0,listMarkerFontSize:e.listRendering?.markerFontSize||void 0,listMarkerSuffix:e.listRendering?.markerSuffix||void 0,listLevelNumFmts:e.listRendering?.levelNumFmts||void 0,listAbstractNumId:e.listRendering?.abstractNumId,listStartOverride:e.listRendering?.startOverride,_originalFormatting:o||void 0};if(n){let r=n.resolveParagraphStyle(l),i=r.paragraphFormatting,s=r.runFormatting;t.alignment=o?.alignment??i?.alignment,t.spaceBefore=o?.spaceBefore??i?.spaceBefore,t.spaceAfter=o?.spaceAfter??i?.spaceAfter,t.lineSpacing=o?.lineSpacing??i?.lineSpacing,t.lineSpacingRule=o?.lineSpacingRule??i?.lineSpacingRule,o?.spacingExplicit&&(t.spacingExplicit=o.spacingExplicit),t.indentLeft=o?.indentLeft??i?.indentLeft,t.indentRight=o?.indentRight??i?.indentRight;let m=o?.numPr?.numId===0&&i?.numPr&&i.numPr.numId!==0?void 0:i;t.indentFirstLine=o?.indentFirstLine??m?.indentFirstLine,t.hangingIndent=o?.hangingIndent??m?.hangingIndent,t.borders=o?.borders??i?.borders,t.shading=o?.shading??i?.shading,t.tabs=o?.tabs??i?.tabs,t.pageBreakBefore=o?.pageBreakBefore??i?.pageBreakBefore,t.keepNext=o?.keepNext??i?.keepNext,t.keepLines=o?.keepLines??i?.keepLines,t.contextualSpacing=o?.contextualSpacing??i?.contextualSpacing,t.outlineLevel=o?.outlineLevel??i?.outlineLevel,t.bidi=o?.bidi??i?.bidi;let c=n.getDefaultCharacterStyle()?.rPr,f=c?chunkGSKMHXHG_js.b(s,c):s,a=E(o?.runProperties,n);t.defaultTextFormatting=chunkGSKMHXHG_js.b(f,a),!o?.numPr&&i?.numPr&&i.numPr.numId!==0&&(t.numPr=i.numPr,t.numPrFromStyle=i.numPr);}else t.alignment=o?.alignment,t.spaceBefore=o?.spaceBefore,t.spaceAfter=o?.spaceAfter,t.lineSpacing=o?.lineSpacing,t.lineSpacingRule=o?.lineSpacingRule,o?.spacingExplicit&&(t.spacingExplicit=o.spacingExplicit),t.indentLeft=o?.indentLeft,t.indentRight=o?.indentRight,t.indentFirstLine=o?.indentFirstLine,t.hangingIndent=o?.hangingIndent,t.borders=o?.borders,t.shading=o?.shading,t.tabs=o?.tabs,t.pageBreakBefore=o?.pageBreakBefore,t.keepNext=o?.keepNext,t.keepLines=o?.keepLines,t.outlineLevel=o?.outlineLevel,t.bidi=o?.bidi,t.defaultTextFormatting=E(o?.runProperties,n);if(e.sectionProperties){t._sectionProperties=e.sectionProperties;let r=e.sectionProperties.sectionStart;(r==="nextPage"||r==="continuous"||r==="oddPage"||r==="evenPage")&&(t.sectionBreakType=r);}return e.renderedPageBreakBefore&&(t.renderedPageBreakBefore=true),ze(e)&&(t.pageBreakBefore=true),e.pPrIns&&(t.pPrIns={revisionId:e.pPrIns.id,author:e.pPrIns.author,date:e.pPrIns.date??null}),e.pPrDel&&(t.pPrDel={revisionId:e.pPrDel.id,author:e.pPrDel.author,date:e.pPrDel.date??null}),e.propertyChanges&&e.propertyChanges.length>0&&(t.pPrChange=e.propertyChanges),t}function be(e,n,o){let l=e.properties,t=[];for(let r of e.content)if(r.type==="run"){let i=U(r,n,o);t.push(...i);}else if(r.type==="hyperlink"){let i=Y(r,n,o);t.push(...i);}else if(r.type==="simpleField"||r.type==="complexField"){let i=te(r,n);i&&t.push(i);}else if(r.type==="inlineSdt"){let i=be(r,n,o);i&&t.push(i);}else if(r.type==="mathEquation"){let i=ne(r);i&&t.push(i);}return chunk4U2S3WV2_js.b.node("sdt",chunkPGWY6UFK_js.d(l),t.length>0?t:void 0)}function De(e){return e.type==="text"?e.text.length>0:true}function Te(e,n){for(let o of e)o.type==="break"&&o.breakType==="page"?n.push("pageBreak"):De(o)&&n.push("visible");}function V(e,n){for(let o of e)o.type==="run"?Te(o.content,n):V(o.children.filter(l=>l.type==="run"),n);}function ye(e,n){for(let o of e)switch(o.type){case "run":Te(o.content,n);break;case "hyperlink":V(o.children.filter(l=>l.type==="run"),n);break;case "simpleField":V(o.content,n);break;case "complexField":V([...o.fieldCode,...o.fieldResult],n);break;case "inlineSdt":ye(o.content,n);break;case "insertion":case "deletion":case "moveFrom":case "moveTo":V(o.content,n);break;case "mathEquation":n.push("visible");break}}function Pe(e){let n=[];return ye(e.content,n),n}function ze(e){return Pe(e)[0]==="pageBreak"}function Ce(e){let n=false,o=false;for(let l of Pe(e))if(l==="pageBreak"){if(o||n)return true;n=true;}else o=true;return false}function R(e,n,o){if(!e||!n)return;let l=e.getStyle(n);if(!l?.tblStylePr)return;let t=l.tblStylePr.find(u=>u.type===o);if(!t)return;let r=E(t.pPr?.runProperties,e),i=E(t.rPr,e),s=chunkGSKMHXHG_js.b(r,i);return {tcPr:t.tcPr,rPr:s}}function I(e,n){if(!e&&!n)return;if(!e)return n;if(!n)return e;let o={},l=e.tcPr,t=n.tcPr;if(l||t){let r={...l??{},...t??{}};(l?.borders||t?.borders)&&(r.borders={...l?.borders??{},...t?.borders??{}}),(l?.shading||t?.shading)&&(r.shading={...l?.shading??{},...t?.shading??{}}),(l?.margins||t?.margins)&&(r.margins={...l?.margins??{},...t?.margins??{}}),o.tcPr=r;}return o.rPr=chunkGSKMHXHG_js.b(e.rPr,n.rPr),o}function Ae(e){let n=new Map,o=e.rows.length,l=new Map;for(let t=0;t<o;t++){let r=e.rows[t],i=0,s=r.cells.map(m=>{let c=m.formatting?.gridSpan??1,f=i;return i+=c,{colIndex:f,vMerge:m.formatting?.vMerge,key:`${t}-${f}`}});if(s.length>0&&s.every(({colIndex:m,vMerge:c})=>c==="continue"&&l.has(m))){for(let{colIndex:m,key:c}of s)l.delete(m),n.set(c,{rowSpan:1,skip:false});continue}for(let{colIndex:m,vMerge:c,key:f}of s){let a=m;if(c==="restart")l.set(a,t),n.set(f,{rowSpan:1,skip:false});else if(c==="continue"){let p=l.get(a);if(p!==void 0){let S=`${p}-${a}`,k=n.get(S);k&&k.rowSpan++,n.set(f,{rowSpan:1,skip:true});}else n.set(f,{rowSpan:1,skip:false});}else l.delete(a),n.set(f,{rowSpan:1,skip:false});}}return n}function oe(e,n,o){let l=Ae(e),t=e.columnWidths,r=t?.reduce((P,x)=>P+x,0)??0,i=e.formatting?.styleId,s=e.formatting?.look,u=i?n?.getStyle(i):void 0,m=n?.getDefaultTableStyle(),c=e.formatting?.borders??u?.tblPr?.borders??m?.tblPr?.borders,f=e.formatting?.cellMargins??u?.tblPr?.cellMargins??m?.tblPr?.cellMargins??void 0,a=f?{top:f.top?.value,bottom:f.bottom?.value,left:f.left?.value,right:f.right?.value}:void 0,p={styleId:e.formatting?.styleId,width:e.formatting?.width?.value,widthType:e.formatting?.width?.type,justification:e.formatting?.justification,columnWidths:t,tableLayout:e.formatting?.layout??null,floating:e.formatting?.floating,cellMargins:a,look:e.formatting?.look,_originalFormatting:e.formatting||void 0};e.propertyChanges&&e.propertyChanges.length>0&&(p.tblPrChange=e.propertyChanges);let S={wholeTable:R(n,i,"wholeTable"),firstRow:R(n,i,"firstRow"),lastRow:R(n,i,"lastRow"),firstCol:R(n,i,"firstCol"),lastCol:R(n,i,"lastCol"),band1Horz:R(n,i,"band1Horz"),band2Horz:R(n,i,"band2Horz"),band1Vert:R(n,i,"band1Vert"),band2Vert:R(n,i,"band2Vert"),nwCell:R(n,i,"nwCell"),neCell:R(n,i,"neCell"),swCell:R(n,i,"swCell"),seCell:R(n,i,"seCell")},k=s?.noHBand!==true,v=s?.noVBand!==true,D=0,N=e.rows.length,B=t?.length??Math.max(0,...e.rows.map(P=>P.cells.reduce((x,F)=>x+(F.formatting?.gridSpan??1),0))),g=e.rows.map((P,x)=>{let F=x===0&&!!s?.firstRow,M=x===N-1&&!!s?.lastRow,h=k&&!F&&!M?D%2===0?S.band1Horz:S.band2Horz:void 0;return k&&!F&&!M&&D++,He(P,n,F,t,r,S,h,v,s,c,x,N,B,l,a,o)});return chunk4U2S3WV2_js.b.node("table",p,g)}function He(e,n,o,l,t,r,i,s,u,m,c,f,a,p,S,k){let v={height:e.formatting?.height?.value,heightRule:e.formatting?.heightRule,isHeader:!!e.formatting?.header,_originalFormatting:e.formatting||void 0};if(e.structuralChange){let C=e.structuralChange,z={revisionId:C.info.id,author:C.info.author,date:C.info.date??null};C.type==="tableRowInsertion"?v.trIns=z:C.type==="tableRowDeletion"&&(v.trDel=z);}e.propertyChanges&&e.propertyChanges.length>0&&(v.trPrChange=e.propertyChanges);let D=e.cells.length,N=c===0,B=c===(f??1)-1,g=e.formatting?.conditionalFormat,P=g?.firstRow??N,x=g?.lastRow??B,F=a??D,M=0,h=[];for(let C=0;C<e.cells.length;C++){let z=e.cells[C],H=z.formatting?.gridSpan??1,Fe=`${c??0}-${M}`,ie=p?.get(Fe),Se=ie?.skip??false,Re=ie?.rowSpan??1,le;if(l&&t&&t>0){let K=0;for(let A=0;A<H&&M+A<l.length;A++)K+=l[M+A];le=Math.round(K/t*100);}if(M+=H,Se)continue;let se=M-H===0,ae=M===F,T=z.formatting?.conditionalFormat,G=T?.firstRow??P,Q=T?.lastRow??x,W=T?.firstColumn??se,_=T?.lastColumn??ae,q;if(s){let K=u?.firstColumn?1:0,A=M-H-K;A>=0&&!(u?.lastColumn&&_)&&!(u?.firstColumn&&W)&&(q=A%2===0?r?.band1Vert:r?.band2Vert);}T?.oddVBand?q=r?.band1Vert:T?.evenVBand&&(q=r?.band2Vert);let L=i;g?.oddHBand?L=r?.band1Horz:g?.evenHBand&&(L=r?.band2Horz),T?.oddHBand?L=r?.band1Horz:T?.evenHBand&&(L=r?.band2Horz);let b=r?.wholeTable;b=I(b,L),b=I(b,q),G&&(u?.firstRow||g?.firstRow||T?.firstRow)&&(b=I(b,r?.firstRow)),Q&&(u?.lastRow||g?.lastRow||T?.lastRow)&&(b=I(b,r?.lastRow)),W&&(u?.firstColumn||g?.firstColumn||T?.firstColumn)&&(b=I(b,r?.firstCol)),_&&(u?.lastColumn||g?.lastColumn||T?.lastColumn)&&(b=I(b,r?.lastCol)),G&&W&&(u?.firstRow||g?.firstRow||T?.firstRow)&&(u?.firstColumn||g?.firstColumn||T?.firstColumn)&&(b=I(b,r?.nwCell)),G&&_&&(u?.firstRow||g?.firstRow||T?.firstRow)&&(u?.lastColumn||g?.lastColumn||T?.lastColumn)&&(b=I(b,r?.neCell)),Q&&W&&(u?.lastRow||g?.lastRow||T?.lastRow)&&(u?.firstColumn||g?.firstColumn||T?.firstColumn)&&(b=I(b,r?.swCell)),Q&&_&&(u?.lastRow||g?.lastRow||T?.lastRow)&&(u?.lastColumn||g?.lastColumn||T?.lastColumn)&&(b=I(b,r?.seCell)),h.push(ke(z,n,o,le,b,m,N,B,se,ae,Re,S,k));}if(h.length===0){let C=Math.max(F,1),z={formatting:C>1?{gridSpan:C}:void 0,content:[{type:"paragraph",content:[]}]},H=I(r?.wholeTable,i);h.push(ke(z,n,o,t&&t>0?100:void 0,H,m,N,B,true,true,1,S,k));}return chunk4U2S3WV2_js.b.node("tableRow",v,h)}var Ee=["top","bottom","left","right","insideH","insideV"];function Le(e,n){if(!e)return e;let o;for(let l of Ee){let t=e[l];if(!t?.color?.themeColor||t.color.auto)continue;let r=chunkMJ5FQX7Q_js.b(t.color,n);r&&(o??(o={...e}),o[l]={...t,color:{rgb:r}});}return o??e}function ke(e,n,o,l,t,r,i,s,u,m,c,f,a){let p=e.formatting,S=c??1,k=p?.width?.value,v=p?.width?.type;k===void 0&&l!==void 0&&(k=l,v="pct");let D=chunkMJ5FQX7Q_js.b(p?.shading?.fill??t?.tcPr?.shading?.fill,a),N=r?{top:i?r.top:r.insideH,bottom:s?r.bottom:r.insideH,left:u?r.left:r.insideV,right:m?r.right:r.insideV}:void 0,B=t?.tcPr?.borders,g=p?.borders,P=Le(N||B||g?{...N??{},...B??{},...g??{}}:void 0,a),x={colspan:p?.gridSpan??1,rowspan:S,width:k,widthType:v,verticalAlign:p?.verticalAlign,backgroundColor:D,textDirection:p?.textDirection,noWrap:p?.noWrap,borders:P,margins:p?.margins?{top:p.margins.top?.value,bottom:p.margins.bottom?.value,left:p.margins.left?.value,right:p.margins.right?.value}:t?.tcPr?.margins?{top:t.tcPr.margins.top?.value,bottom:t.tcPr.margins.bottom?.value,left:t.tcPr.margins.left?.value,right:t.tcPr.margins.right?.value}:f,_originalFormatting:p||void 0,_originalResolvedFill:D};if(e.structuralChange){let h=e.structuralChange,C={revisionId:h.info.id,author:h.info.author,date:h.info.date??null};h.type==="tableCellInsertion"?x.cellMarker={kind:"ins",info:C}:h.type==="tableCellDeletion"?x.cellMarker={kind:"del",info:C}:h.type==="tableCellMerge"&&(x.cellMarker={kind:"merge",info:C,vMerge:h.vMerge??"cont",...h.vMergeOrig?{vMergeOrig:h.vMergeOrig}:{}});}e.propertyChanges&&e.propertyChanges.length>0&&(x.tcPrChange=e.propertyChanges);let F=[];for(let h of e.content)h.type==="paragraph"?F.push($(h,n,void 0,t?.rPr)):h.type==="table"&&F.push(oe(h,n));F.length===0&&F.push(chunk4U2S3WV2_js.b.node("paragraph",{},[]));let M=o?"tableHeader":"tableCell";return chunk4U2S3WV2_js.b.node(M,x,F)}function we(e,n){let o=Ve(e),l=$(e,n),t=[],r=o.length>0&&l.content.size===0,{anchored:i,inFlow:s}=Oe(o);for(let u of i)t.push(xe(u,n));r||t.push(l);for(let u of s)t.push(xe(u,n));return t}function Oe(e){let n=[],o=[];for(let l of e)chunkPGWY6UFK_js.f(l)?n.push(l):o.push(l);return {anchored:n,inFlow:o}}function Ve(e){let n=[];for(let o of e.content)if(o.type==="run"){for(let l of o.content)if(l.type==="shape"&&"shape"in l){let t=l.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 xe(e,n){let o=e.size?.width?chunkBJSG6TEG_js.f(e.size.width):200,l=e.size?.height?chunkBJSG6TEG_js.f(e.size.height):void 0,t;e.fill?.color?.rgb&&(t=`#${e.fill.color.rgb}`);let r,i,s;e.outline&&e.outline.width&&(r=Math.round(e.outline.width/914400*96*100)/100,e.outline.color?.rgb&&(i=`#${e.outline.color.rgb}`),s=e.outline.style||"solid");let u=e.margins?.top!=null?chunkBJSG6TEG_js.f(e.margins.top):4,m=e.margins?.bottom!=null?chunkBJSG6TEG_js.f(e.margins.bottom):4,c=e.margins?.left!=null?chunkBJSG6TEG_js.f(e.margins.left):7,f=e.margins?.right!=null?chunkBJSG6TEG_js.f(e.margins.right):7,a=[];for(let p of e.content)a.push($(p,n));return a.length===0&&a.push(chunk4U2S3WV2_js.b.node("paragraph",{},[])),chunk4U2S3WV2_js.b.node("textBox",{width:o,height:l,textBoxId:e.id,fillColor:t,outlineWidth:r,outlineColor:i,outlineStyle:s,marginTop:u,marginBottom:m,marginLeft:c,marginRight:f,...chunkPGWY6UFK_js.g(e)},a)}function re(e,n,o,l){let t=[];for(let r of e)if(r.type==="paragraph")t.push(...we(r,n)),l&&Ce(r)&&t.push(chunk4U2S3WV2_js.b.node("pageBreak"));else if(r.type==="table")t.push(oe(r,n,o));else if(r.type==="blockSdt"){let i=re(r.content,n,o,l),s=i.length>0?i:[chunk4U2S3WV2_js.b.node("paragraph",{},[])];t.push(chunk4U2S3WV2_js.b.node("blockSdt",chunkPGWY6UFK_js.d(r.properties),s));}return t}function wt(e,n){let o=e.package.theme??null,l=n?.styles?chunkLWH66Q7Q_js.b(n.styles):null,t=re(e.package.document.content,l,o,true);return t.length===0&&t.push(chunk4U2S3WV2_js.b.node("paragraph",{},[])),t[t.length-1]?.type.name==="blockSdt"&&t.push(chunk4U2S3WV2_js.b.node("paragraph",{},[])),chunk4U2S3WV2_js.b.node("doc",{defaultTabStopTwips:e.package.settings?.defaultTabStop??null,watermark:chunkRQVHKDXK_js.a(e)??null},t)}function $e(e,n){let o=n?.styles?chunkLWH66Q7Q_js.b(n.styles):null,l=n?.theme??null,t=re(e,o,l,false);return t.length===0&&t.push(chunk4U2S3WV2_js.b.node("paragraph",{},[])),chunk4U2S3WV2_js.b.node("doc",{defaultTabStopTwips:n?.defaultTabStopTwips??null},t)}function Ft(e,n){return $e(e,n)}function St(){return chunk4U2S3WV2_js.b.node("doc",null,[chunk4U2S3WV2_js.b.node("paragraph",{},[])])}exports.a=wt;exports.b=$e;exports.c=Ft;exports.d=St;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b as b$1}from'./chunk-
|
|
1
|
+
import {a,b as b$1}from'./chunk-SHZOAUHB.mjs';import {g}from'./chunk-HEJJXAXN.mjs';function y(e){return g(e,b$1)}var t=a.getCommands(),F=t.toggleBold(),f=t.toggleItalic(),S=t.toggleUnderline(),H=t.toggleStrike(),T=t.toggleSuperscript(),h=t.toggleSubscript();function M(e){return t.setTextColor(e)}var A=t.clearTextColor();function v(e){return t.setHighlight(e)}var z=t.clearHighlight();function U(e){return t.setFontSize(e)}var b=t.clearFontSize();function B(e){return t.setFontFamily(e)}var I=t.clearFontFamily();function R(e,o){return t.setUnderlineStyle(e,o)}function _(e,o){return t.setHyperlink(e,o)}var j=t.removeHyperlink();function q(e,o,i){return t.insertHyperlink(e,o,i)}export{y as a,F as b,f as c,S as d,H as e,T as f,h as g,M as h,A as i,v as j,z as k,U as l,b as m,B as n,I as o,R as p,_ as q,j as r,q as s};
|