@docx-editor.dev/core 2.36.0 → 2.37.0-canary.20261110032710.sha-525df6f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +6 -6
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +11 -11
  6. package/dist/binding.js +1 -1
  7. package/dist/{chrome-print-B9U_PiqL.d.ts → chrome-print-BSsqYQtt.d.ts} +51 -19
  8. package/dist/chunk-36NJQDWI.cjs +31 -0
  9. package/dist/chunk-3OKDY5TX.cjs +3 -0
  10. package/dist/{chunk-I34OVDHO.cjs → chunk-4QLFADOG.cjs} +1 -1
  11. package/dist/chunk-6EGRB3J4.js +6 -0
  12. package/dist/chunk-6I6V2JDF.cjs +7 -0
  13. package/dist/chunk-77L2HX42.js +1 -0
  14. package/dist/chunk-ATU65CUF.cjs +32 -0
  15. package/dist/chunk-EB5XLX3A.js +4 -0
  16. package/dist/chunk-G7GO4CNK.cjs +2 -0
  17. package/dist/chunk-JK4HBRVP.js +7 -0
  18. package/dist/{chunk-D75AXVLG.cjs → chunk-JZXMWGF4.cjs} +1 -1
  19. package/dist/{chunk-HLMY6NFI.js → chunk-MLJJL4QG.js} +1 -1
  20. package/dist/chunk-MYNOUTWY.js +1 -0
  21. package/dist/{chunk-QTRRXJXQ.cjs → chunk-NPPHSBFT.cjs} +3 -3
  22. package/dist/{chunk-7ZSPY7WH.cjs → chunk-OTZNA6FP.cjs} +1 -1
  23. package/dist/chunk-Q3FUAUL4.js +31 -0
  24. package/dist/chunk-RFMMFHWX.cjs +6 -0
  25. package/dist/chunk-T6MYXF6V.js +32 -0
  26. package/dist/chunk-TTPQZXYS.js +3 -0
  27. package/dist/{chunk-4RDU6QVH.cjs → chunk-UMDB6PEV.cjs} +1 -1
  28. package/dist/{chunk-NTDLU6W6.cjs → chunk-UP5TM6T6.cjs} +1 -1
  29. package/dist/{chunk-2BVJFI6B.js → chunk-WMM772MS.js} +1 -1
  30. package/dist/chunk-XI5HK3TZ.js +282 -0
  31. package/dist/chunk-XMJFDVE2.js +4 -0
  32. package/dist/chunk-XPBKJQTG.cjs +282 -0
  33. package/dist/{chunk-VS2MXS62.js → chunk-YCOHPEF2.js} +1 -1
  34. package/dist/{chunk-IMTQS6N5.cjs → chunk-YVK3NMR6.cjs} +1 -1
  35. package/dist/{chunk-K3UKJU4K.js → chunk-YVLF7HBD.js} +1 -1
  36. package/dist/chunk-Z6NPBOE6.js +2 -0
  37. package/dist/chunk-ZY7HJR3R.cjs +4 -0
  38. package/dist/collaboration/replication.cjs +1 -1
  39. package/dist/collaboration/replication.d.ts +2 -2
  40. package/dist/collaboration/replication.js +1 -1
  41. package/dist/contracts/document.d.ts +2 -2
  42. package/dist/contracts/editor.d.ts +8 -8
  43. package/dist/contracts/modules.d.ts +9 -9
  44. package/dist/contracts/types.d.ts +3 -3
  45. package/dist/{custom-node-writes-DqzeiTpY.d.ts → custom-node-writes-Buryuzow.d.ts} +2 -2
  46. package/dist/{document-protection-CGnc6WX7.d.ts → document-protection-Denp0lhl.d.ts} +1 -1
  47. package/dist/{drawing-graphic-kind-Dw4Qu9VA.d.ts → drawing-graphic-kind-DjGMFeSM.d.ts} +2 -2
  48. package/dist/{drawing-preview-package-BuFluWSg.d.ts → drawing-preview-package-LHyHuTVq.d.ts} +1 -1
  49. package/dist/{editor-CoU0Ipa9.d.ts → editor-B0xPJSXd.d.ts} +233 -9
  50. package/dist/editor.cjs +1 -1
  51. package/dist/editor.css +2 -2
  52. package/dist/editor.d.ts +309 -26
  53. package/dist/editor.js +1 -1
  54. package/dist/export.cjs +2 -2
  55. package/dist/export.d.ts +2 -2
  56. package/dist/export.js +1 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.d.ts +17 -17
  59. package/dist/index.js +1 -1
  60. package/dist/{layout-shaping-B7ifvgm-.d.ts → layout-shaping-CFTk9pWQ.d.ts} +1 -1
  61. package/dist/layout.cjs +1 -1
  62. package/dist/layout.d.ts +16 -14
  63. package/dist/layout.js +1 -1
  64. package/dist/{note-properties-CrO9A0Ju.d.ts → note-properties-C8_cURo1.d.ts} +1 -1
  65. package/dist/output.cjs +1 -1
  66. package/dist/output.d.ts +9 -9
  67. package/dist/output.js +1 -1
  68. package/dist/{protocol-C-LfGgrt.d.ts → protocol-CG_ybtKt.d.ts} +2 -2
  69. package/dist/{review-paragraph-order-gZ8-oIWd.d.ts → review-paragraph-order-3oV2aI2q.d.ts} +1 -1
  70. package/dist/{revision-projection-BAUauksK.d.ts → revision-projection-C9oujZwA.d.ts} +1 -1
  71. package/dist/{semantic-cell-selection--xgumqWx.d.ts → semantic-cell-selection-BiYMYlbf.d.ts} +2 -2
  72. package/dist/{semantic-interaction-B_AAT9S2.d.ts → semantic-interaction-BTba0_1e.d.ts} +1 -1
  73. package/dist/{semantic-paint-Cl4VyItm.d.ts → semantic-paint-B_xi9H5m.d.ts} +4 -4
  74. package/dist/{semantic-record-queries-BKX8sDqa.d.ts → semantic-record-queries-TdjLU-AU.d.ts} +1 -1
  75. package/dist/{semantic-records-DkDc4E1z.d.ts → semantic-records-C5qbT1sK.d.ts} +29 -5
  76. package/dist/store.cjs +1 -1
  77. package/dist/store.d.ts +12 -12
  78. package/dist/store.js +1 -1
  79. package/dist/{tree-op-types-BJTz6t_O.d.ts → tree-op-types-DzstjXTb.d.ts} +12 -2
  80. package/dist/{tree-package-fragment-DDV5xjSI.d.ts → tree-package-fragment-DLbxcboK.d.ts} +67 -65
  81. package/dist/{tree-session-contract-CAsZn-VN.d.ts → tree-session-contract-BiKgucBu.d.ts} +92 -11
  82. package/dist/{unsupported-elements-1Tj829Bk.d.ts → unsupported-elements-KboafN7A.d.ts} +1 -1
  83. package/package.json +2 -2
  84. package/dist/chunk-3DLIAAXE.js +0 -2
  85. package/dist/chunk-3KSO2I22.js +0 -4
  86. package/dist/chunk-4K5QXGVN.js +0 -31
  87. package/dist/chunk-5JHQHJRH.js +0 -3
  88. package/dist/chunk-5W6DLXVG.cjs +0 -3
  89. package/dist/chunk-6VTHQTM3.js +0 -1
  90. package/dist/chunk-7MOZVKCN.js +0 -282
  91. package/dist/chunk-BR7AQCGM.cjs +0 -31
  92. package/dist/chunk-DZO5K26E.js +0 -1
  93. package/dist/chunk-K5FZYV6Z.cjs +0 -32
  94. package/dist/chunk-MK4MO7RT.cjs +0 -7
  95. package/dist/chunk-N5RYSQN5.js +0 -4
  96. package/dist/chunk-O2AEJ5T4.js +0 -5
  97. package/dist/chunk-PSVIEQUU.js +0 -32
  98. package/dist/chunk-PXF5BBEK.cjs +0 -2
  99. package/dist/chunk-R42NW5FO.js +0 -7
  100. package/dist/chunk-TCWCSTAF.cjs +0 -282
  101. package/dist/chunk-XFDDD65J.cjs +0 -4
  102. package/dist/chunk-XTNY4DBY.cjs +0 -5
package/dist/export.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkPXF5BBEK_cjs=require('./chunk-PXF5BBEK.cjs'),chunk5W6DLXVG_cjs=require('./chunk-5W6DLXVG.cjs'),chunkD75AXVLG_cjs=require('./chunk-D75AXVLG.cjs'),chunkK5FZYV6Z_cjs=require('./chunk-K5FZYV6Z.cjs'),chunkIMTQS6N5_cjs=require('./chunk-IMTQS6N5.cjs');require('./chunk-4RDU6QVH.cjs'),require('./chunk-NTDLU6W6.cjs');var chunkQTRRXJXQ_cjs=require('./chunk-QTRRXJXQ.cjs'),chunkTCWCSTAF_cjs=require('./chunk-TCWCSTAF.cjs');function Yt(e,o,t){let n=chunkTCWCSTAF_cjs.ce().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:chunkK5FZYV6Z_cjs.n(y+Math.round(b.originX*f)),originY:chunkK5FZYV6Z_cjs.n(Math.round(b.originY*f)),offsetX:chunkK5FZYV6Z_cjs.n(Math.round(b.offsetX*f)),offsetY:chunkK5FZYV6Z_cjs.n(Math.round(b.offsetY*f)),advanceX:chunkK5FZYV6Z_cjs.n(Math.round(b.advanceX*f)),advanceY:chunkK5FZYV6Z_cjs.n(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=chunkK5FZYV6Z_cjs.n(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:chunkK5FZYV6Z_cjs.n(T.advance+I),caretEdges:[chunkK5FZYV6Z_cjs.n(0),chunkK5FZYV6Z_cjs.n(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>chunkK5FZYV6Z_cjs.n(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:chunkK5FZYV6Z_cjs.r({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:chunkK5FZYV6Z_cjs.n(c+h.originX),originY:chunkK5FZYV6Z_cjs.n(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return chunkK5FZYV6Z_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunkK5FZYV6Z_cjs.n(f),descent:chunkK5FZYV6Z_cjs.n(E),lineGap:chunkK5FZYV6Z_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunkK5FZYV6Z_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunkK5FZYV6Z_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:chunkK5FZYV6Z_cjs.r({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=chunkK5FZYV6Z_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:chunkK5FZYV6Z_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkK5FZYV6Z_cjs.d?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof chunkK5FZYV6Z_cjs.d||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkPXF5BBEK_cjs.q))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkPXF5BBEK_cjs.r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunkD75AXVLG_cjs.h("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkK5FZYV6Z_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunkK5FZYV6Z_cjs.d?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=chunkK5FZYV6Z_cjs.Ha(n.style,n.fontSlot),r=chunkK5FZYV6Z_cjs.Fd(n)?chunkK5FZYV6Z_cjs.Gd(n):chunkK5FZYV6Z_cjs.oa(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkTCWCSTAF_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunk5W6DLXVG_cjs.Q(e.shaper,e.environment,i,a,t))return null;let p=chunk5W6DLXVG_cjs.P(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=chunkK5FZYV6Z_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunk5W6DLXVG_cjs.d(),chunk5W6DLXVG_cjs.h({...chunk5W6DLXVG_cjs.i,maxFontBytes:chunkK5FZYV6Z_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunk5W6DLXVG_cjs.ga(e,{resolveFont(t){return St(e,o,t)},fallback:chunkK5FZYV6Z_cjs.ua()})}async function Lt(e,o,t=[],n=false,a){if(!chunk5W6DLXVG_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk5W6DLXVG_cjs.k(a,chunk5W6DLXVG_cjs.i),s=await At(),i=Et(await chunk5W6DLXVG_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunkK5FZYV6Z_cjs.ta}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunk5W6DLXVG_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk5W6DLXVG_cjs.k(t,chunk5W6DLXVG_cjs.i),a=chunk5W6DLXVG_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunk5W6DLXVG_cjs.o(e)}|${a}`,p=C.get(i);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=chunk5W6DLXVG_cjs.n(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await chunk5W6DLXVG_cjs.t(e,f,n,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i,p),p.catch(()=>{C.get(i)===p&&C.delete(i);});}let l=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${chunkK5FZYV6Z_cjs.ta}`].join("|"),extensionFingerprint:l}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=chunkTCWCSTAF_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkTCWCSTAF_cjs.Tg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkPXF5BBEK_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunkK5FZYV6Z_cjs.h(s))),r=chunkPXF5BBEK_cjs.L(t,{maxFontBytes:chunkK5FZYV6Z_cjs.a,aggregateBudget:Fo(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkK5FZYV6Z_cjs.c:Math.max(0,chunkK5FZYV6Z_cjs.c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunkK5FZYV6Z_cjs.c)throw new chunkD75AXVLG_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunkK5FZYV6Z_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkTCWCSTAF_cjs.pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkQTRRXJXQ_cjs.Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof chunkD75AXVLG_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunkD75AXVLG_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkD75AXVLG_cjs.i(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new chunkD75AXVLG_cjs.h("aborted","Export resource settlement was aborted"):new chunkD75AXVLG_cjs.h("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t={}){let n=chunk5W6DLXVG_cjs.k(t.fontShaping,chunk5W6DLXVG_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p=(async()=>{let l=bo(t.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,chunkPXF5BBEK_cjs.c),c=chunkPXF5BBEK_cjs.E(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkPXF5BBEK_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkPXF5BBEK_cjs.c),defaultFamily:chunkPXF5BBEK_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkPXF5BBEK_cjs.f(m??{}),g=chunkPXF5BBEK_cjs.G(x,c),S=chunkPXF5BBEK_cjs.H(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d,void 0,f.dropped);ne(F,t),re(F,t,t.glyphFallbacks);return}let h=await Lt(chunk5W6DLXVG_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d,h.resolveFont,f.dropped,S);return ne(b,t),re(b,t,t.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,wo(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new chunkD75AXVLG_cjs.h(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=chunkIMTQS6N5_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkPXF5BBEK_cjs.C(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkPXF5BBEK_cjs.z(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkPXF5BBEK_cjs.v(e.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=chunkTCWCSTAF_cjs.qj(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkTCWCSTAF_cjs.rj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkTCWCSTAF_cjs.Sc(r),i=chunkTCWCSTAF_cjs.Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkTCWCSTAF_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkTCWCSTAF_cjs.pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=chunkK5FZYV6Z_cjs.Pc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=chunkTCWCSTAF_cjs.Aa||c.namespaceUri===chunkTCWCSTAF_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkTCWCSTAF_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkTCWCSTAF_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunkK5FZYV6Z_cjs.me(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===chunkTCWCSTAF_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunkK5FZYV6Z_cjs.Sc(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkTCWCSTAF_cjs.kh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunkK5FZYV6Z_cjs.Uc(n),x){let g=chunkK5FZYV6Z_cjs.Rc(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunkK5FZYV6Z_cjs.Rc(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunkK5FZYV6Z_cjs.le(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}chunkK5FZYV6Z_cjs.Vc(n);}continue}if(c.namespaceUri===chunkTCWCSTAF_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunkK5FZYV6Z_cjs.Tc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunkK5FZYV6Z_cjs.Wc(n)&&c.namespaceUri===chunkTCWCSTAF_cjs.pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:chunkTCWCSTAF_cjs.Ba(c,E)});}}chunkK5FZYV6Z_cjs.Qc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkTCWCSTAF_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkTCWCSTAF_cjs.pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkTCWCSTAF_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=chunkIMTQS6N5_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(chunkK5FZYV6Z_cjs.Bc),r.namespaceUri===chunkTCWCSTAF_cjs.pa&&r.localName==="sym"&&t(chunkIMTQS6N5_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkTCWCSTAF_cjs.$d(r)),r.namespaceUri===chunkTCWCSTAF_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkK5FZYV6Z_cjs.ke(s??"")?.font??null);}if(r.namespaceUri===chunkTCWCSTAF_cjs.pa&&r.localName==="p")for(let s of chunkPXF5BBEK_cjs.B(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkK5FZYV6Z_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkK5FZYV6Z_cjs.a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
2
- Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkD75AXVLG_cjs.h}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkD75AXVLG_cjs.d}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkD75AXVLG_cjs.c}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkD75AXVLG_cjs.i}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=ho;exports.createPackagedFileFetch=Vo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=Eo;exports.openFontBackedDocumentForExport=So;exports.replayMetafile=Yt;
1
+ 'use strict';var chunkG7GO4CNK_cjs=require('./chunk-G7GO4CNK.cjs'),chunk3OKDY5TX_cjs=require('./chunk-3OKDY5TX.cjs'),chunkJZXMWGF4_cjs=require('./chunk-JZXMWGF4.cjs'),chunkATU65CUF_cjs=require('./chunk-ATU65CUF.cjs'),chunkYVK3NMR6_cjs=require('./chunk-YVK3NMR6.cjs');require('./chunk-UMDB6PEV.cjs'),require('./chunk-UP5TM6T6.cjs');var chunkNPPHSBFT_cjs=require('./chunk-NPPHSBFT.cjs'),chunkXPBKJQTG_cjs=require('./chunk-XPBKJQTG.cjs');function Yt(e,o,t){let n=chunkXPBKJQTG_cjs.ce().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:chunkATU65CUF_cjs.n(y+Math.round(b.originX*f)),originY:chunkATU65CUF_cjs.n(Math.round(b.originY*f)),offsetX:chunkATU65CUF_cjs.n(Math.round(b.offsetX*f)),offsetY:chunkATU65CUF_cjs.n(Math.round(b.offsetY*f)),advanceX:chunkATU65CUF_cjs.n(Math.round(b.advanceX*f)),advanceY:chunkATU65CUF_cjs.n(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=chunkATU65CUF_cjs.n(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:chunkATU65CUF_cjs.n(T.advance+I),caretEdges:[chunkATU65CUF_cjs.n(0),chunkATU65CUF_cjs.n(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>chunkATU65CUF_cjs.n(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:chunkATU65CUF_cjs.r({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:chunkATU65CUF_cjs.n(c+h.originX),originY:chunkATU65CUF_cjs.n(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return chunkATU65CUF_cjs.u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u.length===i.length?u:void 0,metrics:{ascent:chunkATU65CUF_cjs.n(f),descent:chunkATU65CUF_cjs.n(E),lineGap:chunkATU65CUF_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunkATU65CUF_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunkATU65CUF_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:chunkATU65CUF_cjs.r({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=chunkATU65CUF_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:chunkATU65CUF_cjs.i(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkATU65CUF_cjs.d?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof chunkATU65CUF_cjs.d||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkG7GO4CNK_cjs.q))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkG7GO4CNK_cjs.r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunkJZXMWGF4_cjs.h("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkATU65CUF_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunkATU65CUF_cjs.d?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=chunkATU65CUF_cjs.Ga(n.style,n.fontSlot),r=chunkATU65CUF_cjs.Sd(n)?chunkATU65CUF_cjs.Td(n):chunkATU65CUF_cjs.na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(chunkXPBKJQTG_cjs.b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkATU65CUF_cjs.ic(e.shaper,e.environment,i,a,t))return null;let p=chunkATU65CUF_cjs.hc(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=chunkATU65CUF_cjs.c;function At(){if(U)return U;let e=(async()=>(await chunk3OKDY5TX_cjs.d(),chunk3OKDY5TX_cjs.h({...chunk3OKDY5TX_cjs.i,maxFontBytes:chunkATU65CUF_cjs.a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return chunk3OKDY5TX_cjs.da(e,{resolveFont(t){return St(e,o,t)},fallback:chunkATU65CUF_cjs.ta()})}async function Lt(e,o,t=[],n=false,a){if(!chunk3OKDY5TX_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk3OKDY5TX_cjs.k(a,chunk3OKDY5TX_cjs.i),s=await At(),i=Et(await chunk3OKDY5TX_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunkATU65CUF_cjs.sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!chunk3OKDY5TX_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk3OKDY5TX_cjs.k(t,chunk3OKDY5TX_cjs.i),a=chunk3OKDY5TX_cjs.j(n),r=vt.get(e),s=r?.get(a);if(s)return s;let i=`${chunk3OKDY5TX_cjs.o(e)}|${a}`,p=C.get(i);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=chunk3OKDY5TX_cjs.n(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await chunk3OKDY5TX_cjs.t(e,f,n,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i,p),p.catch(()=>{C.get(i)===p&&C.delete(i);});}let l=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${chunkATU65CUF_cjs.sa}`].join("|"),extensionFingerprint:l}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=chunkXPBKJQTG_cjs.N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkXPBKJQTG_cjs.Wg(o,n)}function Pt(e,o){let t=xo(e);if(t.length!==0)return chunkG7GO4CNK_cjs.o(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunkATU65CUF_cjs.h(s))),r=chunkG7GO4CNK_cjs.L(t,{maxFontBytes:chunkATU65CUF_cjs.a,aggregateBudget:Fo(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkATU65CUF_cjs.c:Math.max(0,chunkATU65CUF_cjs.c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunkATU65CUF_cjs.c)throw new chunkJZXMWGF4_cjs.h("layoutFailed",`Active document export font bytes are limited to ${chunkATU65CUF_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkXPBKJQTG_cjs.pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkNPPHSBFT_cjs.Ca(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof chunkJZXMWGF4_cjs.h&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new chunkJZXMWGF4_cjs.h("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkJZXMWGF4_cjs.i(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new chunkJZXMWGF4_cjs.h("aborted","Export resource settlement was aborted"):new chunkJZXMWGF4_cjs.h("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t={}){let n=chunk3OKDY5TX_cjs.k(t.fontShaping,chunk3OKDY5TX_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p=(async()=>{let l=bo(t.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,chunkG7GO4CNK_cjs.c),c=chunkG7GO4CNK_cjs.E(e,y),d=[],f={dropped:[]},E=Pt(e,f),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],m=await chunkG7GO4CNK_cjs.t(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,chunkG7GO4CNK_cjs.c),defaultFamily:chunkG7GO4CNK_cjs.d.family,signal:r.signal},{onOriginFailure:F=>d.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=chunkG7GO4CNK_cjs.f(m??{}),g=chunkG7GO4CNK_cjs.G(x,c),S=chunkG7GO4CNK_cjs.H(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d,void 0,f.dropped);ne(F,t),re(F,t,t.glyphFallbacks);return}let h=await Lt(chunk3OKDY5TX_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d,h.resolveFont,f.dropped,S);return ne(b,t),re(b,t,t.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,wo(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new chunkJZXMWGF4_cjs.h(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=chunkYVK3NMR6_cjs.e(u,e.stylesRoot(),i,Po(u,y)),d=chunkG7GO4CNK_cjs.C(u,e.numberingRoot(),e.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...chunkG7GO4CNK_cjs.z(u,e.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of chunkG7GO4CNK_cjs.v(e.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=chunkXPBKJQTG_cjs.tj(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkXPBKJQTG_cjs.uj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkXPBKJQTG_cjs.Sc(r),i=chunkXPBKJQTG_cjs.Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkXPBKJQTG_cjs.pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkXPBKJQTG_cjs.pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=chunkATU65CUF_cjs.ad(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=chunkXPBKJQTG_cjs.Aa||c.namespaceUri===chunkXPBKJQTG_cjs.pa&&c.localName==="p")continue;let R=c.namespaceUri===chunkXPBKJQTG_cjs.pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===chunkXPBKJQTG_cjs.pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";chunkATU65CUF_cjs.ze(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===chunkXPBKJQTG_cjs.pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")chunkATU65CUF_cjs.dd(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=chunkXPBKJQTG_cjs.nh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(chunkATU65CUF_cjs.fd(n),x){let g=chunkATU65CUF_cjs.cd(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunkATU65CUF_cjs.cd(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&chunkATU65CUF_cjs.ye(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}chunkATU65CUF_cjs.gd(n);}continue}if(c.namespaceUri===chunkXPBKJQTG_cjs.pa&&(c.localName==="instrText"||c.localName==="delInstrText")){chunkATU65CUF_cjs.ed(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&chunkATU65CUF_cjs.hd(n)&&c.namespaceUri===chunkXPBKJQTG_cjs.pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:chunkXPBKJQTG_cjs.Ba(c,E)});}}chunkATU65CUF_cjs.bd(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkXPBKJQTG_cjs.pa&&n.localName==="p")){if(n.namespaceUri===chunkXPBKJQTG_cjs.pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkXPBKJQTG_cjs.pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=chunkYVK3NMR6_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(chunkATU65CUF_cjs.Oc),r.namespaceUri===chunkXPBKJQTG_cjs.pa&&r.localName==="sym"&&t(chunkYVK3NMR6_cjs.c(Ro(r,"font"))),r.localName==="textpath"&&t(chunkXPBKJQTG_cjs.$d(r)),r.namespaceUri===chunkXPBKJQTG_cjs.pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkATU65CUF_cjs.xe(s??"")?.font??null);}if(r.namespaceUri===chunkXPBKJQTG_cjs.pa&&r.localName==="p")for(let s of chunkG7GO4CNK_cjs.B(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkATU65CUF_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkATU65CUF_cjs.a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
2
+ Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkJZXMWGF4_cjs.h}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkJZXMWGF4_cjs.d}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkJZXMWGF4_cjs.c}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkJZXMWGF4_cjs.i}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=ho;exports.createPackagedFileFetch=Vo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=Eo;exports.openFontBackedDocumentForExport=So;exports.replayMetafile=Yt;
package/dist/export.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  import { ReviewDisplayMode, ResolvedRevisionMarkup, RevisionMarkupOptions } from './contracts/editor.js';
11
11
  import { PreservedImageMime, SupportedImageMime } from './contracts/editor.js';
12
12
  import { ImageResourceLimits, ImageDecodePort } from './editor.js';
13
- import { o as FontRequest, r as FontSubstitution } from './semantic-records-DkDc4E1z.js';
13
+ import { o as FontRequest, r as FontSubstitution } from './semantic-records-C5qbT1sK.js';
14
14
  import { TextMeasurer } from './editor.js';
15
15
  import { SemanticLayout, SemanticReviewArtifactRecord, InlineDrawingRecord, AnchoredDrawingRecord, ListMarkerPictureRecord, ShapedRun, StyleSpanRecord } from './layout.js';
16
16
  import { DocumentProperties, HeadlessDocumentView, HeadlessDocumentRejection } from './store.js';
@@ -20,7 +20,7 @@ import { FontShapingOptions } from './editor.js';
20
20
  import { PreparedLayoutFontConfiguration, LayoutShapingInstrumentation } from './layout.js';
21
21
  import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-Bm9XqTNO.js';
22
22
  import './editor-scope-CA6egMaK.js';
23
- import './tree-package-fragment-DDV5xjSI.js';
23
+ import './tree-package-fragment-DLbxcboK.js';
24
24
  import './editor-fonts-D_-vjuJi.js';
25
25
 
26
26
  /** Source content that cannot be certified by the layout snapshot. @public */
package/dist/export.js CHANGED
@@ -1,2 +1,2 @@
1
- import {c as c$1,E,t,d,f,G as G$1,H as H$1,v,C as C$1,z as z$1,o,L,r,B,q}from'./chunk-3DLIAAXE.js';import {l,j,h,i,n,m,s,p,c as c$2,g,P,O,fa}from'./chunk-5JHQHJRH.js';import'./chunk-RIYSCEFQ.js';import {h as h$1,i as i$1}from'./chunk-DZO5K26E.js';export{h as ExportResourceError,d as createNodeImageDecodePort,c as exportDestinationNamed,i as openDocumentForExport}from'./chunk-DZO5K26E.js';import {c,ta,a,Ha,Fd,Gd,oa,ua,h as h$2,d as d$1,ke,b as b$1,i as i$2,Pc,me,Sc as Sc$1,Uc,Rc as Rc$1,le as le$1,Vc,Tc,Wc,Qc,r as r$1,u,n as n$1,Bc}from'./chunk-PSVIEQUU.js';import {e,c as c$3,b as b$2}from'./chunk-6VTHQTM3.js';import'./chunk-VS2MXS62.js';import'./chunk-2BVJFI6B.js';import {Ba}from'./chunk-N5RYSQN5.js';import {ce as ce$1,qj,rj,Sc,Rc,b,pa,$d,N,Tg,Aa,kh,Ba as Ba$1}from'./chunk-7MOZVKCN.js';function Yt(e,o,t){let n=ce$1().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:n$1(y+Math.round(b.originX*f)),originY:n$1(Math.round(b.originY*f)),offsetX:n$1(Math.round(b.offsetX*f)),offsetY:n$1(Math.round(b.offsetY*f)),advanceX:n$1(Math.round(b.advanceX*f)),advanceY:n$1(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=n$1(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:n$1(T.advance+I),caretEdges:[n$1(0),n$1(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>n$1(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:r$1({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u$1=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:n$1(c+h.originX),originY:n$1(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u$1.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u$1.length===i.length?u$1:void 0,metrics:{ascent:n$1(f),descent:n$1(E),lineGap:n$1(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof d$1)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:r$1({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:i$2(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$1?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof d$1||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r$1=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof q))return true;let u=n(l.request.family);return a.has(u)||!r$1.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new h$1("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$2(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$1?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=Ha(n.style,n.fontSlot),r=Fd(n)?Gd(n):oa(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!P(e.shaper,e.environment,i,a,t))return null;let p=O(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=c;function At(){if(U)return U;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return fa(e,{resolveFont(t){return St(e,o,t)},fallback:ua()})}async function Lt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j(a,h),s$1=await At(),i=Et(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${ta}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j(t,h),a=i(n$1),r=vt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=C.get(i$1);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=m(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await s(e,f,n$1,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i$1,p),p.catch(()=>{C.get(i$1)===p&&C.delete(i$1);});}let l$1=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l$1,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${ta}`].join("|"),extensionFingerprint:l$1}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),Tg(o,n)}function Pt(e,o$1){let t=xo(e);if(t.length!==0)return o(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$2(s))),r=L(t,{maxFontBytes:a,aggregateBudget:Fo(n),shadowedRequests:a$1});if(o$1)for(let s of r.dropped){if(o$1.dropped.length>=ee)break;o$1.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>c)throw new h$1("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=Ba(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof h$1&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new h$1("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=i$1(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new h$1("aborted","Export resource settlement was aborted"):new h$1("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t$1={}){let n=j(t$1.fontShaping,h);if((t$1.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t$1.timeoutMs),r=new AbortController,s=()=>r.abort(t$1.signal?.reason);t$1.signal?.addEventListener("abort",s,{once:true}),t$1.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p$1=(async()=>{let l=bo(t$1.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,c$1),c=E(e,y),d$1=[],f$1={dropped:[]},E$1=Pt(e,f$1),R=[...o,...E$1?[E$1]:[],...t$1.lastResortFonts??[]],m=await t(R,{families:[...new Set([...(t$1.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,c$1),defaultFamily:d.family,signal:r.signal},{onOriginFailure:F=>d$1.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=f(m??{}),g=G$1(x,c),S=H$1(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d$1,void 0,f$1.dropped);ne(F,t$1),re(F,t$1,t$1.glyphFallbacks);return}let h=await Lt(p(g),void 0,t$1.glyphFallbacks,t$1.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d$1,h.resolveFont,f$1.dropped,S);return ne(b,t$1),re(b,t$1,t$1.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,wo(r.signal)])}finally{clearTimeout(i),t$1.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new h$1(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e$1){let o=[e$1.part().root],t=[],n=[],a=new Set([e$1.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e$1.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e$1,u));let s=e$1.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=e(u,e$1.stylesRoot(),i,Po(u,y)),d=C$1(u,e$1.numberingRoot(),e$1.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...z$1(u,e$1.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of v(e$1.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=qj(e.currentPackage(),o);if(!t)return [];let n=new Set(rj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=Sc(r),i=Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=Pc(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=Aa||c.namespaceUri===pa&&c.localName==="p")continue;let R=c.namespaceUri===pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";me(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")Sc$1(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=kh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(Uc(n),x){let g=Rc$1(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=Rc$1(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&le$1(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}Vc(n);}continue}if(c.namespaceUri===pa&&(c.localName==="instrText"||c.localName==="delInstrText")){Tc(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&Wc(n)&&c.namespaceUri===pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:Ba$1(c,E)});}}Qc(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===pa&&n.localName==="p")){if(n.namespaceUri===pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=b$2(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(Bc),r.namespaceUri===pa&&r.localName==="sym"&&t(c$3(Ro(r,"font"))),r.localName==="textpath"&&t($d(r)),r.namespaceUri===pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(ke(s??"")?.font??null);}if(r.namespaceUri===pa&&r.localName==="p")for(let s of B(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
1
+ import {c as c$1,E,t,d,f,G as G$1,H as H$1,v,C as C$1,z as z$1,o,L,r,B,q}from'./chunk-Z6NPBOE6.js';import {l,j,h,i,n,m,s,p,c as c$2,g,ca}from'./chunk-TTPQZXYS.js';import'./chunk-RIYSCEFQ.js';import {h as h$1,i as i$1}from'./chunk-MYNOUTWY.js';export{h as ExportResourceError,d as createNodeImageDecodePort,c as exportDestinationNamed,i as openDocumentForExport}from'./chunk-MYNOUTWY.js';import {c,sa,a,Ga,Sd,Td,na,ic,hc,ta,h as h$2,d as d$1,xe,b as b$1,i as i$2,ad,ze,dd,fd,cd,ye,gd,ed,hd,bd,r as r$1,u,n as n$1,Oc}from'./chunk-T6MYXF6V.js';import {e,c as c$3,b as b$2}from'./chunk-77L2HX42.js';import'./chunk-YCOHPEF2.js';import'./chunk-WMM772MS.js';import {Ca}from'./chunk-XMJFDVE2.js';import {ce as ce$1,tj,uj,Sc,Rc,b,pa,$d,N,Wg,Aa,nh,Ba}from'./chunk-XI5HK3TZ.js';function Yt(e,o,t){let n=ce$1().metafile;return n?n.replay(e,o,{textAdvance:t.measureText}):Promise.resolve(null)}function $t(e){return !Number.isFinite(e)||e<=0?.8:Math.max(1,Math.round(e*.8))/e}function _(e,o,t){if(o.environment.features.smcp!==1||!/[\p{Ll} ]/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,f)=>d.id!==a.glyphs[f]?.id))return t;let r=[],s=0;for(let d of o.text){let f=d===" "||d.toUpperCase()!==d,E=r.at(-1);E&&(E.lower===f||/\p{M}/u.test(d))?E.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let i=[],p=[],l=[],u=true,y=0,c=$t(o.fontSizeHalfPoints);for(let d of o.environment.direction==="rtl"?r.reverse():r){let f=d.lower?c:1,E=[],R=[],m="",x=d.start;for(let h of d.text){let b=d.lower?h.toUpperCase():h;for(let F=0;F<b.length;F++)E.push(x),R.push(x+h.length);m+=b,x+=h.length;}let g=e.shape({...n,text:m}),S=i.length;for(let[h,b]of g.glyphs.entries()){let F=g.exactAdvancesX?.[h];F===void 0?u=false:l.push(F*f),i.push({...b,cluster:E[b.cluster]??d.start,originX:n$1(y+Math.round(b.originX*f)),originY:n$1(Math.round(b.originY*f)),offsetX:n$1(Math.round(b.offsetX*f)),offsetY:n$1(Math.round(b.offsetY*f)),advanceX:n$1(Math.round(b.advanceX*f)),advanceY:n$1(Math.round(b.advanceY*f)),drawScale:f});}for(let h of g.clusters){let b=E[h.textStart]??d.start,F=R[h.textEnd-1]??x,I=n$1(Math.round(h.advance*f)),T=p.at(-1);T&&T.textStart===b&&T.textEnd===F?p[p.length-1]={...T,glyphEnd:S+h.glyphEnd,advance:n$1(T.advance+I),caretEdges:[n$1(0),n$1(T.advance+I)]}:p.push({...h,textStart:b,textEnd:F,glyphStart:S+h.glyphStart,glyphEnd:S+h.glyphEnd,advance:I,caretEdges:h.caretEdges.map(Gt=>n$1(Math.round(Gt*f))),fontSpan:0});}y+=g.glyphs.reduce((h,b)=>h+Math.round(b.advanceX*f),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var yt=new WeakMap;function Kt(e){let o=yt.get(e);return o===void 0&&(o=Qt(e.bytes,e.faceIndex),yt.set(e,o)),o}var Zt=new Set(["COLR","CBDT","sbix"]),Jt=512;function Qt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(ht(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Jt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Zt.has(ht(e,s)))return true}return false}function ht(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var eo=/\p{Emoji_Presentation}|️/u;function to(e){return eo.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Kt);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return to(o)?[...t,...n]:[...n,...t]}var oo=2048;function gt(e,o,t,n){if(!t.clusters.length||t.clusters.length>oo)return null;let a=(m,x)=>{let{context:g,...S}=o,h={...S,text:x,environment:r$1({...o.environment,font:m})};return _(e,h,e.shape(h))},r=[],s=new Map;for(let m of [...t.clusters].sort((x,g)=>x.textStart-g.textStart)){let x=o.environment.font,g=o.text.slice(m.textStart,m.textEnd),S=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&S&&S.end===m.textStart){S.end=m.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(g)&&S&&S.font!==o.environment.font&&S.end===m.textStart){S.end=m.textEnd;continue}if(t.glyphs.slice(m.glyphStart,m.glyphEnd).some(b=>b.id===0)){let b=o.text.slice(m.textStart,m.textEnd+1),F=s.get(g)??z(n,b).find(I=>{try{return !a(I,g).glyphs.some(T=>T.id===0)}catch{return false}});if(!F)return null;s.set(g,F),x=F;}let h=r.at(-1);h&&h.font===x&&h.end===m.textStart?h.end=m.textEnd:r.push({start:m.textStart,end:m.textEnd,font:x});}let i=[],p=[],l=[],u$1=[],y=true,c=0,d=0,f=0,E=0,R=0;for(let m of o.environment.direction==="rtl"?r.reverse():r){let x=a(m.font,o.text.slice(m.start,m.end));if(x.glyphs.some(h=>h.id===0))return null;let g=i.length,S=l.length;for(let h of x.glyphs)i.push({...h,cluster:m.start+h.cluster,originX:n$1(c+h.originX),originY:n$1(d+h.originY)});if(x.exactAdvancesX===void 0)y=false;else for(let h of x.exactAdvancesX)u$1.push(h);for(let h of x.clusters)p.push({...h,textStart:m.start+h.textStart,textEnd:m.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:S});x.glyphs.length&&l.push({font:m.font,glyphStart:g,glyphEnd:i.length,fallbackIndex:m.font===o.environment.font?null:n.indexOf(m.font)}),c+=x.glyphs.reduce((h,b)=>h+b.advanceX,0),d+=x.glyphs.reduce((h,b)=>h+b.advanceY,0),f=Math.max(f,x.metrics.ascent),E=Math.max(E,x.metrics.descent),R=Math.max(R,x.metrics.lineGap);}return u({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:y&&u$1.length===i.length?u$1:void 0,metrics:{ascent:n$1(f),descent:n$1(E),lineGap:n$1(R)}},{...o.environment,fallbackOrder:n})}var no=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),ro=512,xt=new WeakMap;function io(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=d=>d+2<=n.byteLength?n.getUint16(d):-1,r=d=>d+4<=n.byteLength?n.getUint32(d):-1,s=d=>d+4<=n.byteLength?String.fromCharCode(n.getUint8(d),n.getUint8(d+1),n.getUint8(d+2),n.getUint8(d+3)):"",i=0;if(s(0)==="ttcf"){let d=r(8);if(d<0||o<0||o>=d||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let d=0;d<p;d+=1){let f=i+12+d*16;if(s(f)==="GSUB"){l=r(f+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let y=l+u,c=a(y);if(c<0)return t;for(let d=0;d<Math.min(c,ro);d+=1){let f=s(y+2+d*6);f&&t.add(f);}return t}function ao(e,o){let t=xt.get(e);return t||(t=io(e.bytes,e.faceIndex),xt.set(e,t)),(no.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function Ft(e,o){let t=e.filter(n=>ao(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return u({...r,text:o.text},o.environment)}catch{return t}}function Et(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof d$1)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=_(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)||/^(Arab|Syrc|Nkoo|Mong)$/.test(i.environment.script)&&lo(i.text,l)){let u=gt(n,i,l,t);if(u)return u}for(let u of Ft(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let y={...i,environment:r$1({...i.environment,font:u})},c=_(n,y,n.shape(y));if(!c.glyphs.some(d=>d.id===0))return c}catch{}return l};return {...e,shaper:r}}var so=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Nko}\p{Script=Mongolian}ـ‌‍]/u;function lo(e,o){let t=false;for(let n of o.clusters)if(o.glyphs.slice(n.glyphStart,n.glyphEnd).some(a=>a.id===0)&&(t=true,so.test(e.slice(n.textStart,n.textEnd))))return false;return t}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var co=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function H(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var bt=new WeakMap;function X(e){let o=bt.get(e);return o||bt.set(e,o=uo(e)),o}function uo(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:H(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:H(o.requested),resolved:H(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function po(e){return Object.freeze({...X(e),bytes:i$2(e)})}function fo(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$1?null:po(t)}catch{return null}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return fo(e.resolve(),o)}}function mo(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:H(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[],r=new Set){let s=new Map;for(let p of [...e,o]){let l=p.toLowerCase();s.has(l)||s.set(l,p);}let i=[...s.values()].map(p=>{let l=[];for(let y of co){let c=n?.({family:p,...y});!c||c instanceof d$1||l.push(Object.freeze({...y,sourceFamily:c.family,via:c.substitution?"substitution":"direct",identity:c.identity,id:c.id,hash:c.hash,faceIndex:c.faceIndex,substitution:c.substitution}));}let u=r.has(p.trim().toLowerCase())?l.filter(y=>y.via==="direct").length:l.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(l)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(i),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:mo(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r$1=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof q))return true;let u=n(l.request.family);return a.has(u)||!r$1.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof r?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new h$1("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function G(){return new Map}function V(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$2(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$1?null:s}function St(e,o,t){let n=t.fontFamily??e.defaultFont.family;return V(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function yo(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=G(),t=new WeakMap;return n=>{let a=Ga(n.style,n.fontSlot),r=Sd(n)?Td(n):na(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=V(e,o,s,a)??(b(s)&&yo(r)?V(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!ic(e.shaper,e.environment,i,a,t))return null;let p=hc(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:X(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>X(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Ot(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var C=new Map,vt=new WeakMap,se=0,U;var le=32,wt=c;function At(){if(U)return U;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return U=e,e.catch(()=>{U===e&&(U=void 0);}),e}function Tt(e){let o=G();return ca(e,{resolveFont(t){return St(e,o,t)},fallback:ta()})}async function Lt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j(a,h),s$1=await At(),i=Et(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>Tt(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:e.fingerprint})}function ho(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j(t,h),a=i(n$1),r=vt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=C.get(i$1);if(!p){if(C.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let c=m(e).sources.reduce((f,E)=>f+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+c>wt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${wt} process-wide`);se+=c;let d;try{let f=await At();d=await s(e,f,n$1,o);}catch(f){throw se-=c,f}return Object.freeze({createMeasurer:()=>Tt(d),shapeLaidOutText:ae(d),shapingHash:d.operation.shapingHash,producerVersion:d.operation.producerVersion})})(),C.set(i$1,p),p.catch(()=>{C.get(i$1)===p&&C.delete(i$1);});}let l$1=e.fingerprint,u=p.then(y=>Object.freeze({createMeasurer:y.createMeasurer,shapeLaidOutText:y.shapeLaidOutText,producer:["node-export",l$1,y.shapingHash,`producer:${y.producerVersion}`,`fallback:${sa}`].join("|"),extensionFingerprint:l$1}));return r||vt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var go="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function xo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===go),n;if(t){let a=N(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),Wg(o,n)}function Pt(e,o$1){let t=xo(e);if(t.length!==0)return o(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$2(s))),r=L(t,{maxFontBytes:a,aggregateBudget:Fo(n),shadowedRequests:a$1});if(o$1)for(let s of r.dropped){if(o$1.dropped.length>=ee)break;o$1.dropped.push(s);}return {sources:r.sources}})}function Fo(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function Eo(e){return te(e)&&ie(e)}var A=0,Mt=Symbol("font-resolution-timeout");function bo(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>c)throw new h$1("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function Ro(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===pa||t.namespaceUri===""))?.value}async function So(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=Ca(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...y}=o,c=Array.isArray(n)?n:[n],d=a===void 0?[]:Array.isArray(a)?a:[a],f,E;try{E=await Oo(t.view,c,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:d,onFontResolution:F=>(f=F,i?.(F))});}catch(F){if(F instanceof h$1&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw E?.dispose(),new h$1("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=i$1(t.view,{...y,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(F){throw E?.dispose(),F}if(!R.ok)return E?.dispose(),R;let m=R.session,x=E,g="active",S=()=>g==="aborted"?new h$1("aborted","Export resource settlement was aborted"):new h$1("disposed","Export session has been disposed"),h=F=>{if(g==="active"){g=F,o.signal?.removeEventListener("abort",b);try{m.dispose();}finally{x?.dispose(),x=void 0;}}},b=()=>h("aborted");return o.signal?.addEventListener("abort",b,{once:true}),o.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>g==="active"?m.layout():Promise.reject(S()),layoutFor:F=>g==="active"?m.layoutFor(F):Promise.reject(S()),validatedImageBytes:F=>g==="active"?m.validatedImageBytes(F):null,metafileBytes:F=>g==="active"?m.metafileBytes?.(F)??null:null,chartFallbackResource:F=>g==="active"?m.chartFallbackResource?.(F)??Promise.resolve(void 0):Promise.resolve(void 0),admittedFontFace:Rt({status:()=>g,unavailable:S,resolve:()=>x?.resolveFont}),shapeLaidOutText:Ot({status:()=>g,unavailable:S,shaping:()=>x}),dispose:()=>h("disposed")})}}async function Oo(e,o,t$1={}){let n=j(t$1.fontShaping,h);if((t$1.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=vo(t$1.timeoutMs),r=new AbortController,s=()=>r.abort(t$1.signal?.reason);t$1.signal?.addEventListener("abort",s,{once:true}),t$1.signal?.aborted&&s();let i=setTimeout(()=>r.abort(Mt),a);try{de(r.signal);let p$1=(async()=>{let l=bo(t$1.onActiveFontBytesChange),u=!1;try{let y=Ao(e).slice(0,c$1),c=E(e,y),d$1=[],f$1={dropped:[]},E$1=Pt(e,f$1),R=[...o,...E$1?[E$1]:[],...t$1.lastResortFonts??[]],m=await t(R,{families:[...new Set([...(t$1.glyphFallbacks??[]).map(F=>F.family),...c.families])].slice(0,c$1),defaultFamily:d.family,signal:r.signal},{onOriginFailure:F=>d$1.push(F),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes,awaitDeferred:!0});de(r.signal);let x=f(m??{}),g=G$1(x,c),S=H$1(x,g,c);if(g.sources.length===0){let F=oe(y,g.defaultFont.family,d$1,void 0,f$1.dropped);ne(F,t$1),re(F,t$1,t$1.glyphFallbacks);return}let h=await Lt(p(g),void 0,t$1.glyphFallbacks,t$1.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let b=oe(y,g.defaultFont.family,d$1,h.resolveFont,f$1.dropped,S);return ne(b,t$1),re(b,t$1,t$1.glyphFallbacks),u=!0,Object.freeze({...h,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,wo(r.signal)])}finally{clearTimeout(i),t$1.signal?.removeEventListener("abort",s);}}function vo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function wo(e){return new Promise((o,t)=>{let n=()=>{t(kt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function kt(e){let o=e.reason===Mt;return new h$1(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw kt(e)}function Ao(e$1){let o=[e$1.part().root],t=[],n=[],a=new Set([e$1.part().name]),r=(u,y)=>{!y||a.has(y.name)||(a.add(y.name),u.push(y.root));};for(let u of e$1.headerFooterPartsBySection()){for(let y of u.headers.values())r(t,y);for(let y of u.footers.values())r(t,y);}for(let u of ["footnote","endnote"])n.push(...To(e$1,u));let s=e$1.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,y)=>{let c=e(u,e$1.stylesRoot(),i,Po(u,y)),d=C$1(u,e$1.numberingRoot(),e$1.stylesRoot(),i);for(let f of [...c.direct,...Do(u),...d,...z$1(u,e$1.stylesRoot(),i),...c.inherited]){let E=f.toLowerCase();p.has(E)||p.set(E,f);}};l(o,"body");for(let u of v(e$1.currentPackage(),i)){let y=u.toLowerCase();p.has(y)||p.set(y,u);}return l(t,"furniture"),l(n,"note"),[...p.values()]}function To(e,o){let t=tj(e.currentPackage(),o);if(!t)return [];let n=new Set(uj(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=Sc(r),i=Rc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Lo="http://schemas.openxmlformats.org/officeDocument/2006/math";function Po(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===pa&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===pa&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Mo(s.paragraph,t,s.context);}return t}function Mo(e,o,t){let n=ad(),a=null,r=null,s="",i=false,p=false,l=false,u=0,y=[];for(let c=e.children.length-1;c>=0;c-=1){let d=e.children[c];d.kind!=="textValue"&&y.push({node:d,runId:null,visibility:k,containerDepth:0});}for(;y.length>0;){let{node:c,runId:d,visibility:f,containerDepth:E}=y.pop();if(E>=Aa||c.namespaceUri===pa&&c.localName==="p")continue;let R=c.namespaceUri===pa&&c.localName==="r"?c.id:d;if(c.namespaceUri===pa&&c.localName==="fldSimple"){let m=ce(c,"instr")??"";ze(m,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&ko(c)!==k&&o.add(c.id);}if(c.namespaceUri===pa&&c.localName==="fldChar"){let m=ce(c,"fldCharType");if(m==="begin")dd(n),n.nesting===1&&(a=R,r=null,s="",i=false,p=false,l=nh(c),u=0);else if(m==="separate"){let x=n.nesting===1;if(fd(n),x){let g=cd(n);s=g.instruction,i=g.overflow||n.nestingOverflow,r=R,p=true;}}else if(m==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=cd(n);s=g.instruction,i=g.overflow||n.nestingOverflow;}if(!i&&ye(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let g=r??a;g&&o.add(g);}}gd(n);}continue}if(c.namespaceUri===pa&&(c.localName==="instrText"||c.localName==="delInstrText")){ed(n,Ct(c),c.localName==="delInstrText");continue}n.nesting>0&&hd(n)&&c.namespaceUri===pa&&Dt(c)&&(u|=f);for(let m=c.children.length-1;m>=0;m-=1){let x=c.children[m];x.kind!=="textValue"&&y.push({node:x,runId:R,visibility:f&_t(c),containerDepth:Ba(c,E)});}}bd(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Ct(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,It=2,Nt=4,k=ue|It|Nt;function ko(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===pa&&n.localName==="p")){if(n.namespaceUri===pa&&Dt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&_t(n)});}}return t}function _t(e){return e.namespaceUri!==pa?k:e.localName==="ins"||e.localName==="moveTo"?ue|It:e.localName==="del"||e.localName==="moveFrom"?ue|Nt:k}function Do(e){let o=new Map,t=n=>{let a=b$2(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Lo&&t(Oc),r.namespaceUri===pa&&r.localName==="sym"&&t(c$3(Ro(r,"font"))),r.localName==="textpath"&&t($d(r)),r.namespaceUri===pa&&r.localName==="fldSimple"){let s=ce(r,"instr");t(xe(s??"")?.font??null);}if(r.namespaceUri===pa&&r.localName==="p")for(let s of B(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function Ct(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var qt="FILE_TOO_LARGE",Ut=8;function Io(e){return typeof e=="object"&&e!==null}function jt(e){if(!(!Io(e)||typeof e.code!="string"))return e.code}function zt(e){return e===""||e.toLowerCase()==="localhost"}function No(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Ht(e){let o=No(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function Xt(e){let o=Ht(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function _o(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Co(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!zt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=Xt(o.pathname);if(t===null||_o(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Uo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Bo(e){let o=Uo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Ut)throw new TypeError(`trustedRoot must not exceed ${Ut} directories`);return o.map(Co)}function qo(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function jo(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!zt(e.host))return null;let t=Ht(e.pathname);if(t===null)return null;for(let n of o){let a=Xt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function zo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Ho(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Bt(e,o,t){return e.some(n=>Ho(n,o,t))}async function Xo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(jt(a)==="ENOENT")continue;throw a}return t}function Go(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(f=>p.resolve(i(f.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Bt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let y=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",c=await a(u,y),d=()=>{c.close();};t?.addEventListener("abort",d,{once:true});try{if(t?.aborted)throw t.reason;let f=await r(u);if(!Bt(await Xo(l,r),f,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await c.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:qt});let R=new Uint8Array(E),m=0;for(;m<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:x}=await c.read(R,m,R.byteLength-m,m);if(x===0)break;m+=x;}if(t?.aborted)throw t.reason;return m===R.byteLength?R:R.slice(0,m)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",d),await c.close().catch(()=>{});}}}function Vo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Bo(e.trustedRoot),t=qo(e.maxBytes),n=e.read??Go(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=zo(r);if(p.protocol!=="file:")return a(p,s);let l=jo(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,y=()=>u?.abort(i?.reason);i?.addEventListener("abort",y,{once:true});let c;try{if(c=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(c.byteLength>t)return new Response(null,{status:413})}catch(d){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??d;if(d instanceof DOMException&&d.name==="AbortError"||d instanceof Error&&d.name==="AbortError")throw d;let f=jt(d);if(f===qt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw d}finally{i?.removeEventListener("abort",y);}return new Response(c,{status:200})})}
2
2
  export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,ho as acquireSharedExportShaping,Vo as createPackagedFileFetch,te as hasExportAdmittedFont,ie as hasExportLaidOutText,Eo as hasFontBackedExportCapabilities,So as openFontBackedDocumentForExport,Yt as replayMetafile};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkBR7AQCGM_cjs=require('./chunk-BR7AQCGM.cjs');require('./chunk-2NFQ7OXY.cjs'),require('./chunk-XFDDD65J.cjs');var chunkPXF5BBEK_cjs=require('./chunk-PXF5BBEK.cjs');require('./chunk-5W6DLXVG.cjs');var chunkMK4MO7RT_cjs=require('./chunk-MK4MO7RT.cjs');require('./chunk-D75AXVLG.cjs'),require('./chunk-K5FZYV6Z.cjs'),require('./chunk-XTNY4DBY.cjs'),require('./chunk-IMTQS6N5.cjs'),require('./chunk-7ZSPY7WH.cjs'),require('./chunk-4RDU6QVH.cjs'),require('./chunk-NTDLU6W6.cjs'),require('./chunk-QTRRXJXQ.cjs'),require('./chunk-2CWQY27B.cjs'),require('./chunk-I34OVDHO.cjs'),require('./chunk-TCWCSTAF.cjs'),require('./chunk-UKVVUHZL.cjs');var N=1;var _={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,compareDocuments:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,openCompareDocumentsDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,removeToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function K(){return Object.keys(_)}Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Bb}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Fb}});Object.defineProperty(exports,"CHROME_PRINT_DISPLAY_MODES",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.od}});Object.defineProperty(exports,"COMPARE_DOCUMENTS_ACCEPT",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.rd}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.kd}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.md}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Zc}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.h}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Gb}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Oa}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Qa}});Object.defineProperty(exports,"compareDocumentsErrorKey",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.sd}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.rc}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.J}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.K}});Object.defineProperty(exports,"deferFonts",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.g}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.cc}});Object.defineProperty(exports,"initialChromePrintSettings",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.pd}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.nd}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.I}});Object.defineProperty(exports,"reviewCodeOfRefusal",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.dc}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.ld}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.qd}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Wa}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkBR7AQCGM_cjs.Sa}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.n}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.m}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.s}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.o}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkPXF5BBEK_cjs.p}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.H}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.z}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.y}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunkMK4MO7RT_cjs.C}});exports.DIAGNOSTIC_SCHEMA_VERSION=N;exports.diagnosticCommands=K;
1
+ 'use strict';var chunk36NJQDWI_cjs=require('./chunk-36NJQDWI.cjs');require('./chunk-2NFQ7OXY.cjs'),require('./chunk-ZY7HJR3R.cjs');var chunkG7GO4CNK_cjs=require('./chunk-G7GO4CNK.cjs');require('./chunk-3OKDY5TX.cjs');var chunk6I6V2JDF_cjs=require('./chunk-6I6V2JDF.cjs');require('./chunk-JZXMWGF4.cjs'),require('./chunk-ATU65CUF.cjs'),require('./chunk-RFMMFHWX.cjs'),require('./chunk-YVK3NMR6.cjs'),require('./chunk-OTZNA6FP.cjs'),require('./chunk-UMDB6PEV.cjs'),require('./chunk-UP5TM6T6.cjs'),require('./chunk-NPPHSBFT.cjs'),require('./chunk-2CWQY27B.cjs'),require('./chunk-4QLFADOG.cjs'),require('./chunk-XPBKJQTG.cjs'),require('./chunk-UKVVUHZL.cjs');var N=1;var _={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,compareDocuments:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertChart:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,openCompareDocumentsDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,removeToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setChartColor:true,setChartData:true,setChartFormat:true,setChartType:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function K(){return Object.keys(_)}Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Kb}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Ob}});Object.defineProperty(exports,"CHROME_PRINT_DISPLAY_MODES",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.xd}});Object.defineProperty(exports,"COMPARE_DOCUMENTS_ACCEPT",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Ad}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.td}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.vd}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.gd}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.h}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Pb}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Xa}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Za}});Object.defineProperty(exports,"compareDocumentsErrorKey",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Bd}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.Ac}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.J}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.K}});Object.defineProperty(exports,"deferFonts",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.g}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.lc}});Object.defineProperty(exports,"initialChromePrintSettings",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.yd}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.wd}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.I}});Object.defineProperty(exports,"reviewCodeOfRefusal",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.mc}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.ud}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.zd}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.db}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunk36NJQDWI_cjs.$a}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.n}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.m}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.s}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.o}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkG7GO4CNK_cjs.p}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunk6I6V2JDF_cjs.H}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunk6I6V2JDF_cjs.z}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunk6I6V2JDF_cjs.y}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunk6I6V2JDF_cjs.C}});exports.DIAGNOSTIC_SCHEMA_VERSION=N;exports.diagnosticCommands=K;
package/dist/index.d.ts CHANGED
@@ -24,19 +24,19 @@
24
24
  * @packageDocumentation
25
25
  * @public
26
26
  */
27
- import { X as ExecErrorCode } from './tree-op-types-BJTz6t_O.js';
28
- export { M as Block, an as COMPARE_DOCUMENTS_ACCEPT, N as ColorValue, e as CommentRecord, a as CompareDocumentsBackgroundEngine, f as CompareDocumentsBackgroundResult, ao as CompareDocumentsChromeHandlers, b as CompareDocumentsDialogSession, C as CompareDocumentsEngine, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, k as CompareDocumentsOutcome, l as CompareDocumentsPhase, m as CompareDocumentsProgress, n as CompareDocumentsRefusalReason, o as CompareDocumentsRequest, G as ContainerRef, P as ContentControl, H as ContentControlFilter, z as ContentControlType, p as ContentTypeIndex, Q as DocAnchor, U as DocAnchorRange, L as DocComment, V as DocLocation, J as DocRange, A as DocTarget, W as DocumentBody, D as DocxDocument, ap as DocxDocumentJSON, aq as DrawingHorizontalReferenceFrame, ar as DrawingKind, as as DrawingLocks, at as DrawingPositionInput, au as DrawingVerticalReferenceFrame, E as ExecResult, F as Extent, av as FontDefinition, Y as HeaderFooterSet, aw as ImageDecodePort, ax as ImageResourceLimits, ay as ImageResourceState, az as ImageWrapTarget, Z as IndentFormatting, I as InsertableContentControlType, _ as NumberingRef, q as OoxmlExternalTarget, r as OoxmlPackage, $ as PageMargins, a0 as Paragraph, a1 as ParagraphDisagreements, a2 as ParagraphFlags, aA as ParagraphFormatCommand, a3 as ParagraphTabStop, aB as Point, aC as PreservedImageMime, aD as Rect, s as RelationshipRecord, aE as RenderableImageMime, t as ReviewCommentItem, u as ReviewCustomItem, c as ReviewItem, R as ReviewModelInput, v as ReviewPosition, w as ReviewRange, d as ReviewRevisionItem, x as ReviewRevisionKind, K as Revision, y as RevisionAddress, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal, ac as RevisionType, ad as Run, B as RunFormatting, ae as Section, af as SectionProperties, aF as SelectionPin, ag as StyleDefinition, S as StyleDefinitions, aG as SupportedImageMime, ah as Table, ai as TableCell, aj as TableRow, T as TargetMode, ak as Theme, al as ThemeColorScheme, aH as Unsubscribe, aI as ValidatedImageBytesHandle, aJ as VectorImageMime, aK as Watermark, aL as WatermarkLayout, aM as WatermarkState, aN as compareDocumentsErrorKey } from './tree-op-types-BJTz6t_O.js';
29
- export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-fragment-DDV5xjSI.js';
30
- export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-CGnc6WX7.js';
31
- import { b as EditorCommand } from './editor-CoU0Ipa9.js';
32
- export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, B as BookmarkPlace, e as BookmarkStory, f as BookmarkSummary, C as CanResult, g as ClearAnchorHighlightOptions, h as CollaborationParticipantsDiagnostic, i as CollaborationStatusDiagnostic, j as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, k as DiagnosticBase, l as DiagnosticFailureDetail, m as DocumentChange, n as DocumentEditingMode, o as DocumentHandle, p as DocumentOpenDiagnostic, q as DocumentOpenFailure, r as DocumentOpenFailureReason, s as DocumentSaveDiagnostic, t as DocumentShape, u as DocumentSource, v as EditRejectedDiagnostic, w as EditRejectionOrigin, x as Editor, y as EditorAnchorNavigation, z as EditorBookmarkCommands, F as EditorCommandShape, G as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, H as EditorError, I as EditorEvents, J as EditorFontError, K as EditorFormatPainterCommands, L as EditorHeaderFooterCommands, M as EditorHighlights, N as EditorHostChange, O as EditorHostDocument, P as EditorNoteCommands, Q as EditorPosition, R as EditorQueries, S as EditorQuery, T as EditorQueryResults, U as EditorReviewHits, V as EditorSelection, W as EditorSnapshot, X as FontFailedDiagnostic, Y as FormatPainterLevel, Z as FormatPainterMode, _ as FormatPainterSurfaceState, $ as FurnitureVariant, a0 as HeaderFooterSlotArgs, a1 as HeaderFooterState, a2 as HighlightHit, a3 as HighlightOptions, a4 as HighlightRange, a5 as HighlightRect, a6 as HighlightResult, a7 as HistoryDiagnosticEvent, a8 as HyperlinkInfo, a9 as ImageContext, aa as ImageCropPercent, ab as NoteKind, ac as NotePropertiesSide, ad as NotePropertiesState, ae as PageSetup, af as PerformanceDiagnostic, ag as ResolveReviewChangesOptions, ah as ResolvedNoteNumbering, ai as ReviewActivationOptions, aj as ReviewChangesAttribution, ak as ReviewChangesResolvedEvent, al as ReviewCommentPlacement, am as ReviewCustomPlacement, an as ReviewItemHit, ao as ReviewItemPlacement, ap as ReviewItemPlacementBase, aq as ReviewItemQuery, ar as ReviewItemRevealEvent, as as ReviewItemRevealSource, at as ReviewRevisionPlacement, au as ReviewSkippedDiagnostic, av as ScrollPlacement, aw as ScrollToAnchorOptions, ax as SelectedImageState, ay as SessionActivity, az as SessionDiagnostic, aA as SetReviewChangesAuthorOptions, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aE as TableBorderTarget, aF as TableCellVerticalAlignment, aG as TableColumnDividerResizeTarget, aH as TableColumnOccurrenceTarget, aI as TableContext, aJ as TableInteractionLabelKey, aK as TableRightEdgeResizeTarget, aL as TableRowOccurrenceTarget, aM as TextMatch, aN as TimingSummary, aO as TrackedChangeFilterMode, aP as TrackedChangePredicate, aQ as ZoomFitTarget, aR as ZoomMode } from './editor-CoU0Ipa9.js';
27
+ import { X as ExecErrorCode } from './tree-op-types-DzstjXTb.js';
28
+ export { M as Block, an as COMPARE_DOCUMENTS_ACCEPT, N as ColorValue, e as CommentRecord, a as CompareDocumentsBackgroundEngine, f as CompareDocumentsBackgroundResult, ao as CompareDocumentsChromeHandlers, b as CompareDocumentsDialogSession, C as CompareDocumentsEngine, g as CompareDocumentsEngineErrorCode, h as CompareDocumentsEngineOptions, i as CompareDocumentsEngineResult, j as CompareDocumentsErrorCode, k as CompareDocumentsOutcome, l as CompareDocumentsPhase, m as CompareDocumentsProgress, n as CompareDocumentsRefusalReason, o as CompareDocumentsRequest, G as ContainerRef, P as ContentControl, H as ContentControlFilter, z as ContentControlType, p as ContentTypeIndex, Q as DocAnchor, U as DocAnchorRange, L as DocComment, V as DocLocation, J as DocRange, A as DocTarget, W as DocumentBody, D as DocxDocument, ap as DocxDocumentJSON, aq as DrawingHorizontalReferenceFrame, ar as DrawingKind, as as DrawingLocks, at as DrawingPositionInput, au as DrawingVerticalReferenceFrame, E as ExecResult, F as Extent, av as FontDefinition, Y as HeaderFooterSet, aw as ImageDecodePort, ax as ImageResourceLimits, ay as ImageResourceState, az as ImageWrapTarget, Z as IndentFormatting, I as InsertableContentControlType, _ as NumberingRef, q as OoxmlExternalTarget, r as OoxmlPackage, $ as PageMargins, a0 as Paragraph, a1 as ParagraphDisagreements, a2 as ParagraphFlags, aA as ParagraphFormatCommand, a3 as ParagraphTabStop, aB as Point, aC as PreservedImageMime, aD as Rect, s as RelationshipRecord, aE as RenderableImageMime, t as ReviewCommentItem, u as ReviewCustomItem, c as ReviewItem, R as ReviewModelInput, v as ReviewPosition, w as ReviewRange, d as ReviewRevisionItem, x as ReviewRevisionKind, K as Revision, y as RevisionAddress, a4 as RevisionAuthorEntry, a5 as RevisionAuthorResult, a6 as RevisionAuthorSkipReason, a7 as RevisionBatchEntry, a8 as RevisionBatchResult, a9 as RevisionBatchSkipDetail, aa as RevisionBatchSkipReason, ab as RevisionSiteRefusal, ac as RevisionType, ad as Run, B as RunFormatting, ae as Section, af as SectionProperties, aF as SelectionPin, ag as StyleDefinition, S as StyleDefinitions, aG as SupportedImageMime, ah as Table, ai as TableCell, aj as TableRow, T as TargetMode, ak as Theme, al as ThemeColorScheme, aH as Unsubscribe, aI as ValidatedImageBytesHandle, aJ as VectorImageMime, aK as Watermark, aL as WatermarkLayout, aM as WatermarkState, aN as compareDocumentsErrorKey } from './tree-op-types-DzstjXTb.js';
29
+ export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-fragment-DLbxcboK.js';
30
+ export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-Denp0lhl.js';
31
+ import { b as EditorCommand } from './editor-B0xPJSXd.js';
32
+ export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, B as BookmarkPlace, e as BookmarkStory, f as BookmarkSummary, C as CanResult, g as ChartColor, h as ChartColorEntry, i as ChartData, j as ChartDataCategory, k as ChartDataKind, l as ChartDataRead, m as ChartDataSeries, n as ChartFormat, o as ChartFormatChange, p as ChartFormatRead, q as ChartLegendPosition, r as ChartThemeColor, s as ChartType, t as ChartWorkbookState, u as ClearAnchorHighlightOptions, v as CollaborationParticipantsDiagnostic, w as CollaborationStatusDiagnostic, x as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, y as DiagnosticBase, z as DiagnosticFailureDetail, F as DocumentChange, G as DocumentEditingMode, H as DocumentHandle, I as DocumentOpenDiagnostic, J as DocumentOpenFailure, K as DocumentOpenFailureReason, L as DocumentSaveDiagnostic, M as DocumentShape, N as DocumentSource, O as EditRejectedDiagnostic, P as EditRejectionOrigin, Q as Editor, R as EditorAnchorNavigation, S as EditorBookmarkCommands, T as EditorChartCommands, U as EditorChartQueries, V as EditorChartQueryResults, W as EditorCommandShape, X as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, Y as EditorError, Z as EditorEvents, _ as EditorFontError, $ as EditorFormatPainterCommands, a0 as EditorHeaderFooterCommands, a1 as EditorHighlights, a2 as EditorHostChange, a3 as EditorHostDocument, a4 as EditorNoteCommands, a5 as EditorPosition, a6 as EditorQueries, a7 as EditorQuery, a8 as EditorQueryResults, a9 as EditorReviewHits, aa as EditorSelection, ab as EditorSnapshot, ac as FontFailedDiagnostic, ad as FormatPainterLevel, ae as FormatPainterMode, af as FormatPainterSurfaceState, ag as FurnitureVariant, ah as HeaderFooterSlotArgs, ai as HeaderFooterState, aj as HighlightHit, ak as HighlightOptions, al as HighlightRange, am as HighlightRect, an as HighlightResult, ao as HistoryDiagnosticEvent, ap as HyperlinkInfo, aq as ImageContext, ar as ImageCropPercent, as as NewChartData, at as NoteKind, au as NotePropertiesSide, av as NotePropertiesState, aw as PageSetup, ax as PerformanceDiagnostic, ay as ResolveReviewChangesOptions, az as ResolvedNoteNumbering, aA as ReviewActivationOptions, aB as ReviewChangesAttribution, aC as ReviewChangesResolvedEvent, aD as ReviewCommentPlacement, aE as ReviewCustomPlacement, aF as ReviewItemHit, aG as ReviewItemPlacement, aH as ReviewItemPlacementBase, aI as ReviewItemQuery, aJ as ReviewItemRevealEvent, aK as ReviewItemRevealSource, aL as ReviewRevisionPlacement, aM as ReviewSkippedDiagnostic, aN as ScrollPlacement, aO as ScrollToAnchorOptions, aP as SelectedChartState, aQ as SelectedImageState, aR as SessionActivity, aS as SessionDiagnostic, aT as SetReviewChangesAuthorOptions, aU as TableBorderEdgeTarget, aV as TableBorderSpec, aW as TableBorderStyle, aX as TableBorderTarget, aY as TableCellVerticalAlignment, aZ as TableColumnDividerResizeTarget, a_ as TableColumnOccurrenceTarget, a$ as TableContext, b0 as TableInteractionLabelKey, b1 as TableRightEdgeResizeTarget, b2 as TableRowOccurrenceTarget, b3 as TextMatch, b4 as TimingSummary, b5 as TrackedChangeFilterMode, b6 as TrackedChangePredicate, b7 as ZoomFitTarget, b8 as ZoomMode } from './editor-B0xPJSXd.js';
33
33
  export { CollectReviewItems, CompareDocumentsDialog, CompareDocumentsDialogHost, EditorModule, ReviewModuleContribution, RevisionMarkupDialog, RevisionMarkupDialogHost } from './contracts/modules.js';
34
34
  export { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
35
- export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, b as RevisionDisplayMode, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup, n as revisionMarkupColor, o as revisionMarkupStyle } from './revision-projection-BAUauksK.js';
36
- export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-B_AAT9S2.js';
35
+ export { D as DEFAULT_REVISION_MARKUP, c as REVISION_MARKUP_COLORS, d as ResolvedRevisionMarkup, a as ReviewDisplayMode, e as RevisionChangedLinesMark, f as RevisionDeletionMark, b as RevisionDisplayMode, g as RevisionMarkupChromeHandlers, h as RevisionMarkupColor, R as RevisionMarkupDialogSession, i as RevisionMarkupMark, j as RevisionMarkupNamedColor, k as RevisionMarkupOptions, l as RevisionMarkupStyle, m as RevisionMarkupTextStyle, r as resolveRevisionMarkup, n as revisionMarkupColor, o as revisionMarkupStyle } from './revision-projection-C9oujZwA.js';
36
+ export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-BTba0_1e.js';
37
37
  export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-Bm9XqTNO.js';
38
- export { A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, C as CHROME_GROUPS, d as CHROME_MENUS, e as CHROME_PRINT_DISPLAY_MODES, f as ChromeExportError, g as ChromeExportFormat, h as ChromeExportHandlers, i as ChromeExportResult, j as ChromeExportView, k as ChromeMenu, l as ChromeMenuEntry, m as ChromeMenuId, n as ChromeMenuItemEntry, o as ChromeMenuSeparatorEntry, p as ChromeMenuSubmenuEntry, q as ChromePrintError, r as ChromePrintErrorCode, s as ChromePrintJob, t as ChromePrintOptions, u as ChromePrintSettings, v as ChromeSlotId, w as CommentDraftChromeHandlers, x as ContentControlWidgetChromeHandlers, y as ContentControlWidgetSession, z as CustomFontsOptions, D as CustomFontsResolver, E as DocxEditorConfig, F as DocxEditorInstance, G as EquationActivation, H as EquationChromeHandlers, I as FontLoadFailure, J as FontLoadFailureReason, K as FontMeasurementState, L as FontUrlSource, M as GoToChromeHandlers, N as HistoryGroupBinding, O as HistoryGroupBindingOptions, P as HyperlinkActivation, Q as HyperlinkChromeHandlers, R as InvalidTextFormFieldChromeHandlers, S as InvalidTextFormFieldSession, T as LoadFontsRequest, U as LoadFontsResult, V as LockedControlNavigation, W as PopupChromeRegistrationOptions, X as ResolvedChromePrintSettings, Y as SurfaceEquation, Z as SurfaceHyperlink, _ as TableChromeSlotId, $ as ToolbarCommandState, a0 as ToolbarValueMap, a1 as ToolbarValueSlot, a2 as bindHistoryGroup, a3 as blankDocumentBytes, a4 as chromeMenuSlots, a5 as commandForSlot, a6 as commandForSlotValue, a7 as createDocxEditor, a8 as createFontSource, a9 as customFonts, aa as deferFonts, ab as initialChromePrintSettings, ac as isChromePrintShortcut, ad as loadFonts, ae as runChromeExport, af as runChromePrint, ag as runToolbarCommand, ah as toolbarCommandState } from './chrome-print-B9U_PiqL.js';
39
- export { R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-Cl4VyItm.js';
38
+ export { A as AttachOptions, B as BlankDocumentOptions, a as BookmarkChromeHandlers, b as BookmarkMarkInfo, c as BookmarkMarkOptions, C as CHROME_GROUPS, d as CHROME_MENUS, e as CHROME_PRINT_DISPLAY_MODES, f as ChromeExportError, g as ChromeExportFormat, h as ChromeExportHandlers, i as ChromeExportResult, j as ChromeExportView, k as ChromeMenu, l as ChromeMenuEntry, m as ChromeMenuId, n as ChromeMenuItemEntry, o as ChromeMenuSeparatorEntry, p as ChromeMenuSubmenuEntry, q as ChromePrintError, r as ChromePrintErrorCode, s as ChromePrintJob, t as ChromePrintOptions, u as ChromePrintSettings, v as ChromeSlotId, w as CommentDraftChromeHandlers, x as ContentControlWidgetChromeHandlers, y as ContentControlWidgetSession, z as CustomFontsOptions, D as CustomFontsResolver, E as DocxEditorConfig, F as DocxEditorInstance, G as EquationActivation, H as EquationChromeHandlers, I as FontLoadFailure, J as FontLoadFailureReason, K as FontMeasurementState, L as FontUrlSource, M as GoToChromeHandlers, N as HistoryGroupBinding, O as HistoryGroupBindingOptions, P as HyperlinkActivation, Q as HyperlinkChromeHandlers, R as InvalidTextFormFieldChromeHandlers, S as InvalidTextFormFieldSession, T as LoadFontsRequest, U as LoadFontsResult, V as LockedControlNavigation, W as PopupChromeRegistrationOptions, X as ResolvedChromePrintSettings, Y as SurfaceEquation, Z as SurfaceHyperlink, _ as TableChromeSlotId, $ as ToolbarCommandState, a0 as ToolbarValueMap, a1 as ToolbarValueSlot, a2 as bindHistoryGroup, a3 as blankDocumentBytes, a4 as chromeMenuSlots, a5 as commandForSlot, a6 as commandForSlotValue, a7 as createDocxEditor, a8 as createFontSource, a9 as customFonts, aa as deferFonts, ab as initialChromePrintSettings, ac as isChromePrintShortcut, ad as loadFonts, ae as runChromeExport, af as runChromePrint, ag as runToolbarCommand, ah as toolbarCommandState } from './chrome-print-BSsqYQtt.js';
39
+ export { R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-B_xi9H5m.js';
40
40
  export { CollaborationModuleContribution } from './collaboration.js';
41
41
  export { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary } from './contracts/document.js';
42
42
  export { d as diagnosticCauses, r as reviewCodeOfSkip } from './diagnostic-context-CBu1Cm4A.js';
@@ -47,15 +47,15 @@ export { CommentMarkerStyle, DEFAULT_REVIEW_PANE, ResolvedReviewPane, ReviewPane
47
47
  export { C as CollaborationFailureCode, a as CollaborationStatus } from './failure-6KGFrDO9.js';
48
48
  export { E as EditorFontErrorCode, F as FontConfiguration, a as FontFaceRequest, b as FontSource, c as FontSourceSubstitution } from './editor-fonts-D_-vjuJi.js';
49
49
  export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './contracts/interaction.js';
50
- import './semantic-records-DkDc4E1z.js';
51
- import './drawing-graphic-kind-Dw4Qu9VA.js';
50
+ import './semantic-records-C5qbT1sK.js';
51
+ import './drawing-graphic-kind-DjGMFeSM.js';
52
52
  import './collaboration/replication.js';
53
- import './semantic-cell-selection--xgumqWx.js';
54
- import './note-properties-CrO9A0Ju.js';
55
- import './custom-node-writes-DqzeiTpY.js';
56
- import './tree-session-contract-CAsZn-VN.js';
53
+ import './semantic-cell-selection-BiYMYlbf.js';
54
+ import './note-properties-C8_cURo1.js';
55
+ import './custom-node-writes-Buryuzow.js';
56
+ import './tree-session-contract-BiKgucBu.js';
57
57
  import 'prosemirror-model';
58
- import './semantic-record-queries-BKX8sDqa.js';
58
+ import './semantic-record-queries-TdjLU-AU.js';
59
59
 
60
60
  /**
61
61
  * The editor's own command types, as a closed list for anonymous diagnostics.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{Bb as CHROME_GROUPS,Fb as CHROME_MENUS,od as CHROME_PRINT_DISPLAY_MODES,rd as COMPARE_DOCUMENTS_ACCEPT,kd as ChromeExportError,md as ChromePrintError,Zc as bindHistoryGroup,h as blankDocumentBytes,Gb as chromeMenuSlots,Oa as commandForSlot,Qa as commandForSlotValue,sd as compareDocumentsErrorKey,rc as createDocxEditor,J as createFontSource,K as customFonts,g as deferFonts,cc as diagnosticCodeOfRefusal,pd as initialChromePrintSettings,nd as isChromePrintShortcut,I as loadFonts,dc as reviewCodeOfRefusal,ld as runChromeExport,qd as runChromePrint,Wa as runToolbarCommand,Sa as toolbarCommandState}from'./chunk-4K5QXGVN.js';import'./chunk-YD3KSZJM.js';import'./chunk-3KSO2I22.js';export{d as DEFAULT_FONT,n as FONT_RESOLVER_BRAND,m as FONT_RESOLVER_MARK_KEY,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,s as composeFontOrigins,o as defineFontResolver,p as isFontResolver}from'./chunk-3DLIAAXE.js';import'./chunk-5JHQHJRH.js';import'./chunk-RIYSCEFQ.js';export{H as diagnosticCauses,z as diagnosticCodes,y as explainDiagnostic,C as reviewCodeOfSkip}from'./chunk-R42NW5FO.js';import'./chunk-DZO5K26E.js';import'./chunk-PSVIEQUU.js';import'./chunk-O2AEJ5T4.js';import'./chunk-6VTHQTM3.js';import'./chunk-K3UKJU4K.js';import'./chunk-VS2MXS62.js';import'./chunk-2BVJFI6B.js';import'./chunk-N5RYSQN5.js';import'./chunk-WN7ICTA5.js';import'./chunk-HLMY6NFI.js';import'./chunk-7MOZVKCN.js';import'./chunk-S6J4O5XP.js';var N=1;var _={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,compareDocuments:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,openCompareDocumentsDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,removeToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function K(){return Object.keys(_)}export{N as DIAGNOSTIC_SCHEMA_VERSION,K as diagnosticCommands};
1
+ export{Kb as CHROME_GROUPS,Ob as CHROME_MENUS,xd as CHROME_PRINT_DISPLAY_MODES,Ad as COMPARE_DOCUMENTS_ACCEPT,td as ChromeExportError,vd as ChromePrintError,gd as bindHistoryGroup,h as blankDocumentBytes,Pb as chromeMenuSlots,Xa as commandForSlot,Za as commandForSlotValue,Bd as compareDocumentsErrorKey,Ac as createDocxEditor,J as createFontSource,K as customFonts,g as deferFonts,lc as diagnosticCodeOfRefusal,yd as initialChromePrintSettings,wd as isChromePrintShortcut,I as loadFonts,mc as reviewCodeOfRefusal,ud as runChromeExport,zd as runChromePrint,db as runToolbarCommand,$a as toolbarCommandState}from'./chunk-Q3FUAUL4.js';import'./chunk-YD3KSZJM.js';import'./chunk-EB5XLX3A.js';export{d as DEFAULT_FONT,n as FONT_RESOLVER_BRAND,m as FONT_RESOLVER_MARK_KEY,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,s as composeFontOrigins,o as defineFontResolver,p as isFontResolver}from'./chunk-Z6NPBOE6.js';import'./chunk-TTPQZXYS.js';import'./chunk-RIYSCEFQ.js';export{H as diagnosticCauses,z as diagnosticCodes,y as explainDiagnostic,C as reviewCodeOfSkip}from'./chunk-JK4HBRVP.js';import'./chunk-MYNOUTWY.js';import'./chunk-T6MYXF6V.js';import'./chunk-6EGRB3J4.js';import'./chunk-77L2HX42.js';import'./chunk-YVLF7HBD.js';import'./chunk-YCOHPEF2.js';import'./chunk-WMM772MS.js';import'./chunk-XMJFDVE2.js';import'./chunk-WN7ICTA5.js';import'./chunk-MLJJL4QG.js';import'./chunk-XI5HK3TZ.js';import'./chunk-S6J4O5XP.js';var N=1;var _={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,compareDocuments:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertChart:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,openCompareDocumentsDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,removeToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setChartColor:true,setChartData:true,setChartFormat:true,setChartType:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function K(){return Object.keys(_)}export{N as DIAGNOSTIC_SCHEMA_VERSION,K as diagnosticCommands};
@@ -1,4 +1,4 @@
1
- import { j as ShapingEnvironmentInput, F as FontResourceSnapshot, k as TextShaper, R as ResolvedRunStyle, l as ResolvedFont, T as TextMeasurer, V as VersionedShapingLibrary, m as NormalizationPolicy, n as FixedPointRoundingMode, o as FontRequest } from './semantic-records-DkDc4E1z.js';
1
+ import { j as ShapingEnvironmentInput, F as FontResourceSnapshot, k as TextShaper, R as ResolvedRunStyle, l as ResolvedFont, T as TextMeasurer, V as VersionedShapingLibrary, m as NormalizationPolicy, n as FixedPointRoundingMode, o as FontRequest } from './semantic-records-C5qbT1sK.js';
2
2
  import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
3
3
 
4
4
  /** Immutable per-operation environment. Configuration, extension, shaping, and producer changes are