@docx-editor.dev/core 2.15.1 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -15
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +11 -9
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +12 -16
- package/dist/binding.js +1 -1
- package/dist/chunk-3XTHXWEB.js +20 -0
- package/dist/chunk-7QG5FJ4X.js +1 -0
- package/dist/chunk-B2HDVIGY.cjs +2 -0
- package/dist/chunk-BML3CNUT.js +2 -0
- package/dist/chunk-DD7ETSGW.cjs +20 -0
- package/dist/chunk-FRRMJK2G.js +5 -0
- package/dist/chunk-G5GLQ4SX.cjs +1 -0
- package/dist/chunk-JP253KIZ.cjs +2 -0
- package/dist/chunk-JROG4U3Z.cjs +21 -0
- package/dist/chunk-L7MVY3DW.js +2 -0
- package/dist/chunk-MBXGQN6J.js +1 -0
- package/dist/chunk-MDMM3XVQ.js +11 -0
- package/dist/{chunk-Q4AB7E4O.cjs → chunk-NO7U62I2.cjs} +1 -1
- package/dist/{chunk-PXKZUTHX.cjs → chunk-NPZX5O23.cjs} +2 -2
- package/dist/chunk-OISZDVXT.cjs +5 -0
- package/dist/chunk-PRNYSOQL.cjs +1 -0
- package/dist/chunk-RXPOTTQQ.js +21 -0
- package/dist/chunk-TDMGSCCL.cjs +1 -0
- package/dist/{chunk-YL4Q5LZP.cjs → chunk-UIB2MDE3.cjs} +1 -1
- package/dist/chunk-UXAWPVH6.js +1 -0
- package/dist/chunk-VYQTZIYH.js +1 -0
- package/dist/chunk-W7GY2IJC.js +2 -0
- package/dist/{chunk-KXPVOPR5.js → chunk-XXLS6O6B.js} +1 -1
- package/dist/chunk-ZFBNCHRP.cjs +11 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -4
- package/dist/contracts/editor.d.ts +9 -7
- package/dist/contracts/interaction.d.ts +73 -10
- package/dist/contracts/modules.d.ts +8 -8
- package/dist/{custom-node-writes-C9ArIlJh.d.ts → custom-node-writes-ClTkWM7s.d.ts} +2 -2
- package/dist/{editor-sRxrFJd8.d.ts → editor-BlerWPyk.d.ts} +44 -125
- package/dist/editor-scope-DZJT4ukT.d.ts +53 -0
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.d.ts +32 -26
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +24 -12
- package/dist/export.js +2 -2
- package/dist/{font-resolver-BYEHQGTw.d.ts → font-resolver-DtADJcLL.d.ts} +2 -2
- package/dist/{headless-document-view-DELC4E5v.d.ts → headless-document-view-BDSeMGoK.d.ts} +2 -2
- package/dist/{hf-references-DTrHkktY.d.ts → hf-references-kSSFMq9X.d.ts} +1 -1
- package/dist/{index-C3Gvq4jN.d.ts → index-D51bUVBE.d.ts} +157 -30
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +20 -18
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-DoGR5cf8.d.ts → layout-shaping-rTElghj2.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +272 -459
- package/dist/layout.js +1 -1
- package/dist/{note-properties-DSe8igrz.d.ts → note-properties-D5_fXW9K.d.ts} +1 -1
- package/dist/{omml-equation-BpRmfDAf.d.ts → omml-equation-C9AJfWy5.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-DZzKxH5r.d.ts → protocol-K-Djpjjw.d.ts} +28 -6
- package/dist/{review-items-DYRx187i.d.ts → review-items-CiliAz8H.d.ts} +11 -1
- package/dist/review-paragraph-order-BlSnyg9a.d.ts +79 -0
- package/dist/{revision-projection-DHRJH48u.d.ts → revision-projection-JiDclAFU.d.ts} +1 -1
- package/dist/{semantic-cell-selection-BXVWCBYm.d.ts → semantic-cell-selection-C-VsxNee.d.ts} +4 -4
- package/dist/{semantic-interaction-DZsDmPg5.d.ts → semantic-interaction-2vPh96Ey.d.ts} +1 -1
- package/dist/{semantic-paint-f7SqN4oW.d.ts → semantic-paint-BEjYcsPK.d.ts} +4 -2
- package/dist/{semantic-records-EIdwId-a.d.ts → semantic-records-Bc-MGXbM.d.ts} +1237 -947
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +164 -20
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-egdarvH_.d.ts → tree-op-types-C71G7rIv.d.ts} +137 -55
- package/dist/{tree-package-fragment-DjkH4ESI.d.ts → tree-package-fragment-DRJkmfTW.d.ts} +3 -3
- package/dist/{tree-session-contract-CGOOgPjW.d.ts → tree-session-contract-Cp5W25RC.d.ts} +18 -8
- package/dist/{tree-store-DKJB0IcA.d.ts → tree-store-BRfhZceK.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-24APKZAN.cjs +0 -11
- package/dist/chunk-2YH4MSHX.cjs +0 -2
- package/dist/chunk-5Y7AADI6.js +0 -1
- package/dist/chunk-AREFLNUP.js +0 -11
- package/dist/chunk-AS7YZNQE.cjs +0 -2
- package/dist/chunk-AVGCKH6A.cjs +0 -20
- package/dist/chunk-CDYVDQRI.cjs +0 -5
- package/dist/chunk-HOEWFH5U.cjs +0 -1
- package/dist/chunk-KFELX7CN.js +0 -2
- package/dist/chunk-LGFKIF4M.cjs +0 -1
- package/dist/chunk-M52QXFKI.js +0 -1
- package/dist/chunk-MNUKSXRO.js +0 -1
- package/dist/chunk-PBOIGBDO.js +0 -2
- package/dist/chunk-PMHGONET.cjs +0 -1
- package/dist/chunk-QJYH6AYD.js +0 -1
- package/dist/chunk-QRC37MWG.cjs +0 -20
- package/dist/chunk-RJSB6RJ7.js +0 -20
- package/dist/chunk-SB54HLFJ.js +0 -20
- package/dist/chunk-XCESLTJL.js +0 -2
- package/dist/chunk-Z4527AXR.js +0 -5
- package/dist/review-reads-LbGUdNzn.d.ts +0 -160
package/dist/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,k,c as c$1,d,h,o,l}from'./chunk-MNUKSXRO.js';import {mb,y,Vc,Dd,ae,Cd,B,D,C,c,I as I$1,z,x,F,Rc,ge as ge$1,r,w as w$1,X,R,Te,Se,Ve as Ve$1,g,a,d as d$1,be,Ee,Zd,zd,uc,ad,Xd,Wd,sd,b as b$1,Fa,Vd,h as h$1,Va,ud,Ya,_a,Xa,td,$a,Za,ab,Wa,Da,Ga,Ca,xa,Na,Ye as Ye$2,jf,af,cf,bf,nc}from'./chunk-RJSB6RJ7.js';import'./chunk-RIYSCEFQ.js';import {c as c$2,a as a$1}from'./chunk-M52QXFKI.js';import'./chunk-VP7SDFCM.js';import {I}from'./chunk-PBOIGBDO.js';import {P,Q,Aa,Ga as Ga$1,Ha,La,va}from'./chunk-KFELX7CN.js';import {qb,Xe as Xe$1,Ye as Ye$1,de,ce,ca,sc,E,Dc,Xc,Ac,Ig,md,vf,Kg}from'./chunk-AREFLNUP.js';var Qn=Object.freeze({}),Zn=Object.freeze([]);function Jn(e){let t=Object.keys(e);if(t.length===0)return Qn;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function er(e){let t=new Map(md(e.part())),n=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!n.has(i)){n.add(i);for(let[s,u]of md(i))t.has(s)||t.set(s,u);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=Xe$1(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of md(a))t.has(i)||t.set(i,s);}}return t}function tr(e,t){let n=jf(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=af(r),a=cf(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function nr(e,t){let n=[];for(let r of t.values()){let o=tr(e,r);o&&n.push(o);}return n.length===0?Zn:Object.freeze(n)}function cn(e,t){return {documentMetadata:Jn(e.documentProperties()),destinations:nr(t,er(e))}}function rr(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function Me(e={}){return Object.freeze({async decode(t,n,r){let o=qb(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},...e.convertPreserved?{convertPreserved:e.convertPreserved}:{}})}var or=65536;function un(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function ar(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function ir(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function sr(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return Ca(e,r=>{if(n||!ir(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>xa(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;Ga(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(u=>u.drawingNodeId);ar(s,t.textboxPath)&&(n=un(e,i.storyOrigin));},r.origin,o);}),n}function cr(e,t){if(t.story==="textbox")return sr(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?bf(e,e.header.box):{x:0,y:0};case "footer":return e.footer?bf(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?bf(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes;return n?.separator?bf(e,n.separator.box):{x:0,y:0}}default:return {x:0,y:0}}}function pn(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function fn(e,t){let n=af(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function dr(e,t){let n=jf(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=cr(r,t),a=Object.freeze([pn({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>fn(r,i)))})}function lr(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return mn(t)?dr(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>pn(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>fn(o,i)))})}function mn(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function ln(e,t){return `${e}\0${t}`}function ur(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function pr(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,u)=>{if(a>=or)return false;a+=1;let m=ln(s.pageIndex,u),l=r.get(m);return l?l.push(s):r.set(m,[s]),true};for(let[s,u]of t.entries())for(let[m,l]of u.occurrences.entries()){if(mn(l)||l.source.start.paragraphId!==l.source.end.paragraphId)continue;o.add(l.pageIndex);let c=`${s}\0${m}`,d={paragraphId:l.source.start.paragraphId,offset:l.source.start.offset},f={paragraphId:l.source.end.paragraphId,offset:l.source.end.offset},y=d.offset<=f.offset?{from:d,to:f}:{from:f,to:d};i({key:c,from:y.from,to:y.to,pageIndex:l.pageIndex},y.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&Ca(s,u=>{let m=u.story==="header"||u.story==="footer"?l=>xa(l,u.origin,{x:s.box.x,y:s.box.y}):void 0;Ga(u.host,(l,c)=>{let d=un(s,c.storyOrigin);for(let f of l.lines)for(let y of Na(f)){let p=r.get(ln(s.index,y.paragraphId));if(p)for(let g of p){let b=ur(y,g.from,g.to);if(!b)continue;let h=Ye$2(f,b.start,void 0,y),E=Ye$2(f,b.end,void 0,y),P=n.get(g.key)??[];P.push({pageIndex:s.index,x:Math.min(h,E)+d.x,y:f.box.y+d.y,width:Math.abs(E-h),height:f.box.height}),n.set(g.key,P);}}},u.origin,m);});return n}function yn(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=pr(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,u)=>{let m=`${a}\0${u}`,l=lr(e,s,r.get(m)??[]);return l?{...s,geometry:l}:s});return {...o,occurrences:Object.freeze(i)}})}function fr(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function gn(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=fr(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:Kg,locations:va,commentAnchors:vf,deepOrder:t};return Object.freeze({collectReviewItems:r=>La(r,n),deepParagraphOrderOfPart:t})}function mr(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(Ig(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function yr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of Ac(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(Xe$1(e,"footnote")),o(Xe$1(e,"endnote")),n}function gr(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return Xe$1(e,"footnote")?.name??null;case "endnote":return Xe$1(e,"endnote")?.name??null;case "note-separator":return Xe$1(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function hr(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),u=Math.max(a,i),m=n.get(r.partName);n.set(r.partName,{lower:Math.min(m?.lower??s,s),upper:Math.max(m?.upper??u,u)});}return n}function xr(e,t,n,r,o){let a=new Map(n.map(c=>[c.name,o(c)])),i=hr(r,a),s=new Map,u=new Map,m=(c,d,f,y,p,g,b)=>{let h=a.get(c)?.get(p),E=i.get(c);if(h===void 0||!E||h<E.lower||h>E.upper)return;let P=s.get(c)??new Map;s.set(c,P);let q=u.get(c)??new Map;u.set(c,q);let z=JSON.stringify([d.story,d.noteScopeId,d.noteAreaKind]),re=f==="textbox"?JSON.stringify([z,"textbox",y]):z,$=P.get(p)??[],G=`${p}\0${d.page.index}\0${re}`,B=q.get(G);B||(B={pageIndex:d.page.index,story:f,rootStory:d.story,textboxPath:y,noteScopeId:d.noteScopeId,noteAreaKind:d.noteAreaKind,laneKey:re,intervals:[],intervalKeys:new Set},q.set(G,B),$.push(B),P.set(p,$));let R=`${g}\0${b}`;B.intervalKeys?.has(R)||(B.intervalKeys?.add(R),B.intervals.push({start:g,end:b}));};Da(e,c=>{let d=gr(t,c);!d||!i.has(d)||Ga(c.host,(f,y)=>{let p=y.textboxDepth>0?"textbox":c.story,g=y.textboxPath.map(h=>h.drawingNodeId),b=[];for(let h of f.lines){for(let E of h.spans)b.push(E.range);for(let E of h.drawings??[])b.push({paragraphId:E.paragraphId,start:E.start,end:E.start+1});}b.length===0&&b.push({paragraphId:f.range.paragraphId,start:f.range.start,end:f.range.end});for(let{paragraphId:h,start:E,end:P}of b)m(d,c,p,g,h,E,P);});}),Fa(e,c=>{let d=c.drawing.ownerPartName;i.has(d)&&m(d,c.root,c.story,c.textboxPath.map(f=>f.drawingNodeId),c.drawing.paragraphId,c.drawing.start,c.drawing.start+1);});for(let c of s.values())for(let d of c.values())for(let f of d){f.intervals.sort((p,g)=>p.start-g.start||p.end-g.end);let y=[];for(let p of f.intervals){let g=y.at(-1);g&&p.start<=g.end?g.end=Math.max(g.end,p.end):y.push({...p});}f.intervals.splice(0,f.intervals.length,...y),f.intervalKeys=void 0;}let l=new Map;for(let[c,d]of s){let f=a.get(c);if(!f)continue;let y=[];for(let[p,g]of d){let b=f.get(p);b!==void 0&&y.push({paragraphId:p,position:b,laneKeys:new Set(g.map(({laneKey:h})=>h))});}y.sort((p,g)=>p.position-g.position),l.set(c,y);}return {byPart:s,orderByPart:a,visibleByPart:l}}function hn(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function br(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),u=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:c})=>c)??[]),m=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:c})=>c)??[]),l=new Set([...u].filter(c=>m.has(c)));return l.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(hn(r,i),hn(r,s+1)).filter(c=>[...c.laneKeys].some(d=>l.has(d))).map(c=>c.paragraphId)}function Rr(e,t,n,r){return r?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,n)};return a.end>a.start?[a]:[]})}function Er(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function xn(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let u of br(i,t)){let m=t.byPart.get(i.partName)?.get(u)??[],c=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,d=u===i.start.paragraphId?i.start.offset:0,f=u===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,y=c?Er(m,d):new Set;for(let p of m){let g=Rr(p,d,f,c);c&&g.length===0&&y.has(p)&&(g=[{start:d,end:d}]);for(let b of g){let h=`${p.pageIndex}\0${p.story}\0${p.noteScopeId??""}\0${p.noteAreaKind??""}\0${p.textboxPath.join("\0")}\0${i.partName}\0${u}\0${b.start}\0${b.end}\0${s??""}`;o.has(h)||(o.add(h),r.push({pageIndex:p.pageIndex,physicalPageNumber:p.pageIndex+1,story:p.story,rootStory:p.rootStory,textboxPath:p.textboxPath,noteScopeId:p.noteScopeId,noteAreaKind:p.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:u,offset:b.start},end:{paragraphId:u,offset:b.end}}}));}}}}return r}function Rn(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function bn(e,t,n=Rn){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[u,m]of s.entries())o.set(m,s.length===1?a:`${a}_${u.toString(36)}`);}return o}function wr(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:bn("comment",t),revision:bn("change",n)}}function V(e,t,n){return e.get(n)??Rn(t,n)}function Fr(e,t,n){return e.kind==="revision"?{kind:"tracked-change",id:V(n.revision,"change",e.id),change:e.revisionKind,...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:e.text,replacedText:e.replacedText,nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:V(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),occurrences:t?xn(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:V(n.comment,"comment",e.id),author:e.comment.author,initials:Ha(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:Ga$1(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:V(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:V(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),orphaned:e.orphaned,occurrences:t&&e.range?xn([e.range],t):[]}}function En(e,t){let n=t.parts.get(t.mainDocumentPart);if(!n)return [];let r=yr(t,n),o=[n,...r],a=t.parts.get(P(t,n.name));if(!mr(o,a))return [];let i=gn(),s=i.collectReviewItems({storyPart:n,furnitureParts:r,commentsPart:a,commentsExtendedPart:t.parts.get(Q(t,n.name))});if(s.length===0)return [];let u=s.flatMap(c=>Aa(c)),m=u.length>0?xr(e,t,o,u,i.deepParagraphOrderOfPart):null,l=wr(s);return s.map(c=>Fr(c,m,l)).filter(c=>c!==null)}var Sr=new Set(["part","validatedHandle"]);function wn(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function J(e,t,n,r,o){if(!(r!==void 0&&Sr.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)J(a,t,n,void 0,o);Object.freeze(e);return}if(!wn(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");J(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Fn(e){if(!wn(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),J(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),J(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),J(o.value,new Set,a,r);}return Object.freeze(e),e}var Or=Object.freeze([]),w=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function vr(e){try{return e instanceof w}catch{return false}}function Pr(e){try{return e instanceof Vd}catch{return false}}function Ir(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function Ar(e){if(vr(e))return e;let t=Pr(e),n=Ir(e),r=n?`: ${n}`:"",o=new w(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function Dr(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Sn(e){if(e==="all-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, proposed, or original")}var Lr=50,Ne=64;function Tr(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function kr(e){let t=false;return Fa(e,({drawing:n})=>{Tr(n.resource)&&(t=true);}),t}function On(e){return !ArrayBuffer.isView(e)}function Be(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=Sn(t.displayMode??mb),r=On(e),o=On(e)?{ok:true,view:e}:I(e);if(!o.ok)return o;let a=o.view,i=t.reuseAcrossRevisions??r,s=Dr(t.resourceTimeoutMs),u=t.measurer??y(),m=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),l$1=Vc({retainAcrossPasses:i}),c=0,d=new Set,f=()=>{c+=1;for(let R of d)R();d.clear();},y$1=Dd({session:a,decodePort:t.imageDecodePort??Me(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:f}),p={view:a,measurer:u,paragraphCache:l$1,sessions:new Map,completed:new Map,inFlight:new Map,styles:Cd(a),fieldLinks:new Map,links:ae(a),drawingBundle:y$1,furniture:new Map},g=new AbortController,b=t.signal,h=false,E=()=>h?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),P=()=>{h=true,q();};function q(){let R=p;if(R){p=null,b?.removeEventListener("abort",P),g.abort(b?.reason),R.drawingBundle.dispose(),R.paragraphCache.clear();for(let F of R.completed.values())Rc(F.internal),ge$1(F.internal);for(let F of R.fieldLinks.values())F.registry.clear();R.fieldLinks.clear(),R.completed.clear(),R.inFlight.clear(),R.furniture.clear(),R.sessions.clear(),f();}}b?.addEventListener("abort",P,{once:true}),b?.aborted&&P();let z=()=>{if(!p)throw E();if(g.signal.aborted)throw new w("aborted","Export resource settlement was aborted")},re=(R,F,A,x)=>c!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==A?Promise.resolve():(z(),new Promise((U,I)=>{let D=false,C,L=k=>{D||(D=true,C!==void 0&&clearTimeout(C),d.delete(T),g.signal.removeEventListener("abort",K),k?I(k):U());},T=()=>L(),K=()=>L(new w("aborted","Export resource settlement was aborted")),W=()=>{if(p?.view.packageRevision()!==F||p?.view.currentPackage()!==A){L();return}let k=x-Date.now();if(k<=0){L(new w("timedOut",`Image resources did not settle within ${s}ms`));return}C=setTimeout(W,Math.min(Lr,k));};if(d.add(T),g.signal.addEventListener("abort",K,{once:true}),c!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==A){L();return}W();})),$=async(R,F=0,A=Date.now()+s)=>{if(z(),Date.now()>=A)throw new w("timedOut",`Export layout did not stabilize within ${s}ms`);let x=p,U=A,I=x.view.packageRevision(),D=x.view.currentPackage(),C=x.completed.get(R);if(C&&C.revision===I&&C.pkg===D)return C.published;let L=()=>{if(x.view.packageRevision()===I&&x.view.currentPackage()===D)return null;if(F>=Ne-1)throw new w("nonConvergent","Document revision did not stabilize during export layout");return $(R,F+1,U)},T=x.fieldLinks.get(R);if(!T||T.revision!==I||T.pkg!==D){let v=T?.registry??be();v.clear(),T={revision:I,pkg:D,registry:v},x.fieldLinks.set(R,T),x.furniture.delete(R);}let K=T.registry,W=x.sessions.get(R)??Ee();x.sessions.set(R,W);let k=x.furniture.get(R);k||(k=Zd({view:x.view,measurer:x.measurer,producer:m,cache:x.paragraphCache,styleCascade:x.styles.styleCascade,numberingIndex:x.styles.numberingIndex,defaultTabStopPt:x.styles.defaultTabStopPt,displayMode:R,revisionAuthorFilter:void 0,inlineDrawingLayoutForPart:v=>x.drawingBundle.contextForPart(v),drawingLayoutTokenForPart:v=>x.drawingBundle.cacheTokenForPart(v),drawingTokenForParagraphForPart:(v,xe)=>x.drawingBundle.drawingTokenForParagraph(xe,v),linkProjectors:x.links,projectFieldLink:v=>K.project(v)}),x.furniture.set(R,k));for(let v=0;v<Ne;v+=1){let xe=c;x.drawingBundle.sync(x.view);let Qe=L();if(Qe)return Qe;let _=l({view:x.view,revision:x.view.packageRevision(),measurer:x.measurer,cache:x.paragraphCache,session:W,producer:m,styleCascade:x.styles.styleCascade,defaultTabStopPt:x.styles.defaultTabStopPt,numberingIndex:x.styles.numberingIndex,furniture:k,linkProjectors:x.links,projectFieldLink:O=>K.project(O),inlineDrawingLayout:x.drawingBundle.bodyContext,inlineDrawingLayoutForPart:O=>x.drawingBundle.contextForPart(O),drawingTokenForParagraph:O=>x.drawingBundle.drawingTokenForParagraph(O,x.view.part().name),drawingTokenForParagraphForPart:(O,oe)=>x.drawingBundle.drawingTokenForParagraph(oe,O),drawingLayoutEpoch:x.drawingBundle.cacheTokenForPart(x.view.part().name),drawingLayoutEpochForPart:O=>x.drawingBundle.cacheTokenForPart(O),displayMode:R,revisionAuthorFilter:void 0});if(!kr(_)){let O=L();if(O)return O;i||(Rc(_),ge$1(_),x.paragraphCache.clear(),x.sessions.delete(R),x.furniture.delete(R));let oe=En(_,D),Wn=oe.length===0?Or:Object.freeze(yn(_,oe)),Xn=cn(x.view,_),Yn={..._,...Xn,reviewArtifacts:Wn},et=Fn(Yn);return x.completed.set(R,{revision:I,pkg:D,internal:_,published:et}),et}let Ze=xe;for(;x.drawingBundle.pendingResourceCount()>0;){await re(Ze,I,D,U),Ze=c,z();let O=L();if(O)return O}z();let Je=L();if(Je)return Je}throw new w("nonConvergent",`Image resources did not reach quiescence after ${Ne} layout passes`)},G=R=>{let F;try{F=Sn(R);}catch(I){return Promise.reject(I)}if(!p)return Promise.reject(E());let A=p,x=A.inFlight.get(F);if(x)return x;let U=$(F).catch(I=>{throw Ar(I)}).finally(()=>A.inFlight.delete(F));return A.inFlight.set(F,U),U};return {ok:true,session:{layout:()=>G(n),layoutFor:G,validatedImageBytes(R){let F=p;return !F||R.resource.kind!=="ready"?null:F.drawingBundle.mintValidatedBytes(R.resource.validatedHandle,R.resource.contentId)?.slice()??null},dispose:q}}}var Ce=b$1;function _e(e){return typeof e.admittedFontFace=="function"}var Mr=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function ye(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function je(e){let t=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:ye(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:t?Object.freeze({requested:ye(t.requested),resolved:ye(t.resolved),...t.lineMetrics?{lineMetrics:Object.freeze({...t.lineMetrics})}:{}}):null})}function Nr(e){return Object.freeze({...je(e),bytes:h$1(e)})}function Br(e,t){if(!e)return null;try{let n=e(t);return !n||n instanceof d$1?null:Nr(n)}catch{return null}}function vn(e){return t=>{if(e.status()!=="active")throw e.unavailable();return Br(e.resolve(),t)}}function Cr(e){return Object.freeze(e.slice(0,Ce).map(t=>Object.freeze({request:ye(t.request),partName:t.partName,reason:t.reason})))}function ze(e,t,n,r,o=[]){let a=new Map;for(let s of [...e,t]){let u=s.toLowerCase();a.has(u)||a.set(u,s);}let i=[...a.values()].map(s=>{let u=[];for(let m of Mr){let l=r?.({family:s,...m});!l||l instanceof d$1||u.push(Object.freeze({...m,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}return Object.freeze({family:s,coverage:u.length===4?"complete":u.length>0?"partial":"none",faces:Object.freeze(u)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:t,families:Object.freeze(i),originFailures:Object.freeze([...n]),droppedEmbeddedFonts:Cr(o)})}function Ue(e,t){if(t.onFontResolution){try{let n=t.onFontResolution(e);Promise.resolve(n).catch(r=>{console.warn("[fonts] font-resolution diagnostics callback failed",r);});}catch(n){console.warn("[fonts] font-resolution diagnostics callback failed",n);}return}for(let n of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",n);for(let n of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",n);}function Ve(e,t){if(t.fontPolicy!=="strict"||e.originFailures.length===0&&e.families.every(r=>r.coverage==="complete"))return;let n=e.families.filter(r=>r.coverage!=="complete").map(r=>r.family).join(", ");throw new w("layoutFailed",`Strict font policy refused export${n?`; incomplete families: ${n}`:"; a font origin failed"}`)}function ge(){return new Map}function He(e,t,n,r){if(n.trim().length===0)return null;let o={family:n,weight:r.bold?700:400,style:r.italic?"italic":"normal"},a=g(o),i=t.get(a);if(!i){try{i=e.fonts.resolve(o);}catch{return null}t.set(a,i);}return i instanceof d$1?null:i}function Pn(e,t,n){let r=n.fontFamily??e.defaultFont.family;return He(e,t,r,n)}function qe(e){return typeof e.shapeLaidOutText=="function"}function $e(e){let t=ge(),n=new WeakMap;return r=>{let o=X(r.style,r.fontSlot),a=R(r.text,o);if(a.length===0)return null;let i=o.fontFamily??e.defaultFont.family,s=He(e,t,i,o);if(!s)return null;try{if(o.smallCaps&&!Te(e.shaper,e.environment,s,o,n))return null;let u=Se(e.shaper,e.environment,s,o,a);return Object.freeze({run:u,font:je(s),fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function In(e){return t=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(t)??null}}var ee=new Map,he=new WeakMap,Ge=0,te,Ke=32,An=c;function Dn(){if(te)return te;let e=(async()=>(await r(),w$1(z)))();return te=e,e.catch(()=>{te===e&&(te=void 0);}),e}function Ln(e){let t=ge();return Ve$1(e,{resolveFont(n){return Pn(e,t,n)},fallback:y()})}async function Tn(e,t){if(!B(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let n=await Dn(),r=await I$1(e,n,z,t);return Object.freeze({createMeasurer:()=>Ln(r),resolveFont:o=>r.fonts.resolve(o),shapeLaidOutText:$e(r),producer:["node-export-session",e.fingerprint,r.operation.shapingHash,`producer:${r.operation.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:e.fingerprint})}function _r(e,t){if(!B(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=he.get(e);if(n)return n;let r=D(e),o=ee.get(r);if(!o){if(ee.size>=Ke)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${Ke} process-wide configurations`));o=(async()=>{let u=C(e).sources.reduce((l,c)=>l+(c.availability==="forbidden"?0:c.bytes.byteLength),0);if(Ge+u>An)throw new RangeError(`Shared exporter shaping font bytes are limited to ${An} process-wide`);Ge+=u;let m;try{let l=await Dn();m=await I$1(e,l,z,t);}catch(l){throw Ge-=u,l}return Object.freeze({createMeasurer:()=>Ln(m),shapeLaidOutText:$e(m),shapingHash:m.operation.shapingHash,producerVersion:m.operation.producerVersion})})(),ee.set(r,o),o.catch(()=>{ee.get(r)===o&&ee.delete(r);});}let a=e.fingerprint,i=o.then(s=>Object.freeze({createMeasurer:s.createMeasurer,shapeLaidOutText:s.shapeLaidOutText,producer:["node-export",a,s.shapingHash,`producer:${s.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:a}));return he.set(e,i),i.catch(()=>{he.get(e)===i&&he.delete(e);}),i}var jr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function zr(e){let t=e.currentPackage(),n=(t.relationships.get(t.mainDocumentPart)??[]).find(o=>o.type===jr),r;if(n){let o=E(n);o.mode==="Internal"&&o.target.ok&&(r=t.parts.get(o.target.partName));}return r??=t.parts.get("/word/fontTable.xml"),Dc(t,r)}function kn(e,t){let n=zr(e);if(n.length!==0)return h(r=>{let o$1=new Set((r.resolvedFaces??[]).map(i=>g(i))),a$1=o(n,{maxFontBytes:a,aggregateBudget:Ur(r),shadowedRequests:o$1});if(t)for(let i of a$1.dropped){if(t.dropped.length>=Ce)break;t.dropped.push(i);}return {sources:a$1.sources}})}function Ur(e){let t=e.committedSourceBytes;return t===void 0||!Number.isSafeInteger(t)||t<=0?c:Math.max(0,c-t)}function Vr(e){return _e(e)&&qe(e)}var N=0,Nn=Symbol("font-resolution-timeout");function Hr(e){let t=0,n=false;return e?.(N),{reserve:o=>{if(n)throw new Error("Document font-byte lease is already released");if(N+o>c)throw new w("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${o} bytes with ${N} bytes already active`);N+=o,t+=o,e?.(N);let a=false;return ()=>{a||n||(a=true,N-=o,t-=o,e?.(N));}},release:()=>{n||(n=true,N-=t,t=0,e?.(N));}}}function ne(e,t){return e.attributes.find(n=>n.localName===t)?.value}async function qr(e,t){if(t.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=I(e);if(!n.ok)return n;let{fonts:r,fontResolutionTimeoutMs:o,fontPolicy:a,onFontResolution:i,...s}=t,u=Array.isArray(r)?r:[r],m,l;try{l=await $r(n.view,u,{signal:t.signal,timeoutMs:o??t.resourceTimeoutMs,fontPolicy:a,onFontResolution:h=>(m=h,i?.(h))});}catch(h){if(h instanceof w&&h.code==="aborted")return {ok:false,reason:"aborted"};throw h}if(!m)throw l?.dispose(),new w("layoutFailed","Document font resolution completed without publishing its evidence");let c;try{c=Be(n.view,{...s,reuseAcrossRevisions:!1,...l?{measurer:l.createMeasurer(),producer:t.producer??l.producer}:t.producer?{producer:t.producer}:{}});}catch(h){throw l?.dispose(),h}if(!c.ok)return l?.dispose(),c;let d=c.session,f=l,y="active",p=()=>y==="aborted"?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),g=h=>{if(y==="active"){y=h,t.signal?.removeEventListener("abort",b);try{d.dispose();}finally{f?.dispose(),f=void 0;}}},b=()=>g("aborted");return t.signal?.addEventListener("abort",b,{once:true}),t.signal?.aborted&&b(),{ok:true,session:Object.freeze({fontResolution:m,layout:()=>y==="active"?d.layout():Promise.reject(p()),layoutFor:h=>y==="active"?d.layoutFor(h):Promise.reject(p()),validatedImageBytes:h=>y==="active"?d.validatedImageBytes(h):null,admittedFontFace:vn({status:()=>y,unavailable:p,resolve:()=>f?.resolveFont}),shapeLaidOutText:In({status:()=>y,unavailable:p,shaping:()=>f}),dispose:()=>g("disposed")})}}async function $r(e,t,n={}){let r=Gr(n.timeoutMs),o=new AbortController,a=()=>o.abort(n.signal?.reason);n.signal?.addEventListener("abort",a,{once:true}),n.signal?.aborted&&a();let i=setTimeout(()=>o.abort(Nn),r);try{We(o.signal);let s=(async()=>{let u=Hr(n.onActiveFontBytesChange),m=!1;try{let l=Wr(e).slice(0,b),c=[],d$1={dropped:[]},f=kn(e,d$1),y=f?[...t,f]:t,p=await k(y,{families:l,defaultFamily:c$1.family,signal:o.signal},{onOriginFailure:E=>c.push(E),reserveOwnedBytes:u.reserve});We(o.signal);let g=d(p??{});if(g.sources.length===0){let E=ze(l,g.defaultFont.family,c,void 0,d$1.dropped);Ue(E,n),Ve(E,n);return}let b$1=await Tn(F(g));We(o.signal);let h=ze(l,g.defaultFont.family,c,b$1.resolveFont,d$1.dropped);return Ue(h,n),Ve(h,n),m=!0,Object.freeze({...b$1,dispose:u.release})}finally{m||u.release();}})();return await Promise.race([s,Kr(o.signal)])}finally{clearTimeout(i),n.signal?.removeEventListener("abort",a);}}function Gr(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 Kr(e){return new Promise((t,n)=>{let r=()=>{n(Bn(e));};e.aborted?r():e.addEventListener("abort",r,{once:true});})}function Bn(e){let t=e.reason===Nn;return new w(t?"timedOut":"aborted",t?"Font resolution timed out":"Font resolution was aborted",t?void 0:{cause:e.reason})}function We(e){if(e.aborted)throw Bn(e)}function Wr(e){let t=[e.part().root],n=[],r=[],o=new Set([e.part().name]),a=(l,c)=>{!c||o.has(c.name)||(o.add(c.name),l.push(c.root));};for(let l of e.headerFooterPartsBySection()){for(let c of l.headers.values())a(n,c);for(let c of l.footers.values())a(n,c);}for(let l of ["footnote","endnote"])r.push(...Xr(e,l));let i=e.documentThemeFonts(),s={major:i.major,minor:i.minor,majorEastAsia:i.majorEastAsia??null,minorEastAsia:i.minorEastAsia??null},u=new Map,m=(l,c)=>{let d=c$2(l,e.stylesRoot(),s,Qr(l,c)),f=no(l,e.numberingRoot(),e.stylesRoot(),s);for(let y of [...d.direct,...eo(l),...f,...d.inherited]){let p=y.toLowerCase();u.has(p)||u.set(p,y);}};return m(t,"body"),m(n,"furniture"),m(r,"note"),[...u.values()]}function Xr(e,t){let n=Xe$1(e.currentPackage(),t);if(!n)return [];let r=new Set(Ye$1(e.part()).filter(a=>a.noteKind===t).map(a=>a.noteId)),o=[];for(let a of n.root.children){if(a.kind==="textValue")continue;let i=de(a),s=ce(a);(i==="separator"||i==="continuationSeparator"||s!==null&&r.has(s))&&o.push(a);}return o}var Yr="http://schemas.openxmlformats.org/officeDocument/2006/math";function Qr(e,t){let n=new Set;for(let r of e){let o=[],a=[{node:r,context:t}];for(;a.length>0;){let{node:i,context:s}=a.pop();i.namespaceUri===ca&&i.localName==="p"&&o.push({paragraph:i,context:s});let u=i.namespaceUri===ca&&i.localName==="txbxContent"&&(s==="body"||s==="note")?"detached":s;for(let m=i.children.length-1;m>=0;m-=1){let l=i.children[m];l.kind!=="textValue"&&a.push({node:l,context:u});}}for(let i of o)Zr(i.paragraph,n,i.context);}return n}function Zr(e,t,n){let r=Va(),o=null,a=null,i="",s=false,u=false,m=false,l=0,c=[];for(let d=e.children.length-1;d>=0;d-=1){let f=e.children[d];f.kind!=="textValue"&&c.push({node:f,runId:null,visibility:H});}for(;c.length>0;){let{node:d,runId:f,visibility:y}=c.pop();if(d.namespaceUri===ca&&d.localName==="p")continue;let p=d.namespaceUri===ca&&d.localName==="r"?d.id:f;if(d.namespaceUri===ca&&d.localName==="fldSimple"){let g=ne(d,"instr")??"";ud(g,{allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&Jr(d)!==H&&t.add(d.id);}if(d.namespaceUri===ca&&d.localName==="fldChar"){let g=ne(d,"fldCharType");if(g==="begin")Ya(r),r.nesting===1&&(o=p,a=null,i="",s=false,u=false,m=Xc(d),l=0);else if(g==="separate"){let b=r.nesting===1;if(_a(r),b){let h=Xa(r);i=h.instruction,s=h.overflow||r.nestingOverflow,a=p,u=true;}}else if(g==="end"){if(r.nesting===1){if(r.phase==="instruction"){let h=Xa(r);i=h.instruction,s=h.overflow||r.nestingOverflow;}if(!s&&td(i,{hasSeparate:u,hasLegacyFormData:m,allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&l!==H){let h=a??o;h&&t.add(h);}}$a(r);}continue}if(d.namespaceUri===ca&&(d.localName==="instrText"||d.localName==="delInstrText")){Za(r,Ye(d),d.localName==="delInstrText");continue}r.nesting>0&&ab(r)&&d.namespaceUri===ca&&Cn(d)&&(l|=y);for(let g=d.children.length-1;g>=0;g-=1){let b=d.children[g];b.kind!=="textValue"&&c.push({node:b,runId:p,visibility:y&zn(d)});}}Wa(r);}function Cn(e){return e.localName==="t"||e.localName==="delText"?Ye(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var Xe=1,_n=2,jn=4,H=Xe|_n|jn;function Jr(e){let t=[];for(let r of e.children)r.kind!=="textValue"&&t.push({node:r,visibility:H});let n=0;for(;t.length>0;){let{node:r,visibility:o}=t.pop();if(!(r.namespaceUri===ca&&r.localName==="p")){if(r.namespaceUri===ca&&Cn(r)&&(n|=o,n===H))return n;for(let a of r.children)a.kind!=="textValue"&&t.push({node:a,visibility:o&zn(r)});}}return n}function zn(e){return e.namespaceUri!==ca?H:e.localName==="ins"||e.localName==="moveTo"?Xe|_n:e.localName==="del"||e.localName==="moveFrom"?Xe|jn:H}function eo(e){let t=new Map,n=r=>{let o=a$1(r??void 0);if(o===null)return;let a=o.toLowerCase();t.has(a)||t.set(a,o);};for(let r of e){let o=[r];for(;o.length>0;){let a=o.pop();if(a.namespaceUri===Yr&&n(nc),a.namespaceUri===ca&&a.localName==="fldSimple"){let i=ne(a,"instr");n(sd(i??"")?.font??null);}if(a.namespaceUri===ca&&a.localName==="p")for(let i of to(a))n(i);for(let i=a.children.length-1;i>=0;i-=1){let s=a.children[i];s.kind!=="textValue"&&o.push(s);}}}return [...t.values()]}function to(e){let t=[],n=Va(),r=[];for(let o=e.children.length-1;o>=0;o-=1){let a=e.children[o];a.kind!=="textValue"&&r.push(a);}for(;r.length>0;){let o=r.pop();if(!(o.namespaceUri===ca&&o.localName==="p")){if(o.namespaceUri===ca&&o.localName==="fldChar"){let a=ne(o,"fldCharType");a==="begin"?Ya(n):a==="separate"?(n.nesting===1&&Mn(n,t),_a(n)):a==="end"&&(n.nesting===1&&Mn(n,t),$a(n));continue}if(o.namespaceUri===ca&&(o.localName==="instrText"||o.localName==="delInstrText")){Za(n,Ye(o),o.localName==="delInstrText");continue}if(o.namespaceUri===ca&&o.localName==="fldSimple"){let a=sd(ne(o,"instr")??"");a?.font&&t.push(a.font);}for(let a=o.children.length-1;a>=0;a-=1){let i=o.children[a];i.kind!=="textValue"&&r.push(i);}}}return Wa(n),t}function Mn(e,t){let n=Xa(e);if(n.overflow)return;let r=sd(n.instruction);r?.font&&t.push(r.font);}function Ye(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let r=n.pop();if(r.kind==="textValue")t+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)n.push(r.children[o]);}return t}function no(e,t,n,r){if(!t)return [];let o=zd(t),a=uc(n,r),i=new Map;for(let s of e)for(let u of ro(s)){let m=sc(u.children),l=c=>{if(c)for(let d of c.values())for(let f of [d.markerStyle.fontFamily,d.markerStyle.fontFamilyEastAsia]){let y=a$1(f??void 0);if(y===null)continue;let p=y.toLowerCase();i.has(p)||i.set(p,y);}};l(ad(m,o,a));for(let c of m){let d=Xd(c);for(let f of d.contents)l(Wd(f,o,a));}}return [...i.values()].sort((s,u)=>s.localeCompare(u))}function ro(e){if(e.localName==="document"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName==="body")return [t];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let t=[];for(let n of e.children)n.kind!=="textValue"&&(n.localName==="footnote"||n.localName==="endnote")&&t.push(n);return t}return [e]}var Hn="FILE_TOO_LARGE",Un=8;function oo(e){return typeof e=="object"&&e!==null}function qn(e){if(!(!oo(e)||typeof e.code!="string"))return e.code}function $n(e){return e===""||e.toLowerCase()==="localhost"}function ao(e){try{let t=decodeURIComponent(e);return t.includes("\0")?null:t}catch{return null}}function Gn(e){let t=ao(e);if(t===null)return null;let n=[];for(let r of t.split(/[/\\]/))if(!(r===""||r===".")){if(r===".."){if(n.length===0)return null;n.pop();continue}n.push(r);}return `/${n.join("/")}`}function Kn(e){let t=Gn(e);return t===null?null:t.endsWith("/")?t:`${t}/`}function io(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function so(e){let t;try{t=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(t.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(t.username!==""||t.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!$n(t.host))throw new TypeError("trustedRoot must be a local file: URL");let n=Kn(t.pathname);if(n===null||io(n))throw new TypeError("trustedRoot must be a directory inside the filesystem");let r=new URL("file:///");return r.pathname=n,r}function co(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 lo(e){let t=co(e);if(t.length===0)throw new TypeError("trustedRoot must name at least one directory");if(t.length>Un)throw new TypeError(`trustedRoot must not exceed ${Un} directories`);return t.map(so)}function uo(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 po(e,t){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!$n(e.host))return null;let n=Gn(e.pathname);if(n===null)return null;for(let r of t){let o=Kn(r.pathname);if(o===null||!n.startsWith(o)||n.length<=o.length)continue;let a=new URL("file:///");return a.pathname=n,a}return null}function fo(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 mo(e,t,n){let r=n.relative(n.resolve(e),n.resolve(t));return r!==""&&!r.startsWith("..")&&!n.isAbsolute(r)}function Vn(e,t,n){return e.some(r=>mo(r,t,n))}async function yo(e,t){let n=[];for(let r of e)try{n.push(await t(r));}catch(o){if(qn(o)==="ENOENT")continue;throw o}return n}function go(e){return async(t,{signal:n,maxBytes:r})=>{if(n?.aborted)throw n.reason;let[{open:o,realpath:a},{constants:i},{fileURLToPath:s},u]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),m=e.map(y=>u.resolve(s(y.href))),l=u.resolve(s(typeof t=="string"?t:t.href));if(!Vn(m,l,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let c=typeof i.O_NOFOLLOW=="number"?i.O_RDONLY|i.O_NOFOLLOW:"r",d=await o(l,c),f=()=>{d.close();};n?.addEventListener("abort",f,{once:true});try{if(n?.aborted)throw n.reason;let y=await a(l);if(!Vn(await yo(m,a),y,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let p=(await d.stat()).size;if(!Number.isSafeInteger(p)||p<0||p>r)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Hn});let g=new Uint8Array(p),b=0;for(;b<g.byteLength;){if(n?.aborted)throw n.reason;let{bytesRead:h}=await d.read(g,b,g.byteLength-b,b);if(h===0)break;b+=h;}if(n?.aborted)throw n.reason;return b===g.byteLength?g:g.slice(0,b)}catch(y){throw n?.aborted?n.reason:y}finally{n?.removeEventListener("abort",f),await d.close().catch(()=>{});}}}function ho(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 t=lo(e.trustedRoot),n=uo(e.maxBytes),r=e.read??go(t),o=e.networkFetch??fetch;return(async(a,i)=>{let s=i?.signal;if(s?.aborted)throw s.reason;let u=fo(a);if(u.protocol!=="file:")return o(u,i);let m=po(u,t);if(!m)return new Response(null,{status:404});let l=s?new AbortController:void 0,c=()=>l?.abort(s?.reason);s?.addEventListener("abort",c,{once:true});let d;try{if(d=await r(m,{maxBytes:n,...l?{signal:l.signal}:{}}),s?.aborted)throw s.reason;if(d.byteLength>n)return new Response(null,{status:413})}catch(f){if(s?.aborted)throw s.reason;if(l?.signal.aborted)throw l.signal.reason??f;if(f instanceof DOMException&&f.name==="AbortError"||f instanceof Error&&f.name==="AbortError")throw f;let y=qn(f);if(y===Hn)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw f}finally{s?.removeEventListener("abort",c);}return new Response(d,{status:200})})}
|
|
2
|
-
export{w as ExportResourceError,
|
|
1
|
+
import {b,k,c as c$1,d,r as r$1,h,o,l,q}from'./chunk-MBXGQN6J.js';import {qb,y,Ib,md,ae,ld,B,D,C,c,I as I$1,z,x,F,nb,ge,r,w as w$1,fa,R,Te as Te$1,Se,Ve as Ve$1,g,a,d as d$2,be,Ee,Zd,bd,b as b$2,Fa,Vd,h as h$1,Va,dd,Ya,_a,Xa,cd,$a,Za,ab,Wa,Da,Ga,Ca,xa,Na,Ye,jf,af,cf,bf,uc}from'./chunk-RXPOTTQQ.js';import'./chunk-RIYSCEFQ.js';import {d as d$1,b as b$1,a as a$1}from'./chunk-VYQTZIYH.js';import'./chunk-VP7SDFCM.js';import {I}from'./chunk-BML3CNUT.js';import {P,Q,ya,ua,va,La,Fa as Fa$1}from'./chunk-W7GY2IJC.js';import {yb,Jf,Kf,hd,gd,da,E,Rd,la,je as je$1,ma,Od,lh,Te as Te$2,Va as Va$1,fb,W,Ua,Ta,jb,ib,Sa,kg,nh}from'./chunk-MDMM3XVQ.js';var mn=new WeakMap,ar=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function ir(e){let t=mn.get(e.root);if(t)return t;let n=new Set,r=[{node:e.root,scope:Va$1(),depth:0,mcSelected:false}],o=0;for(;r.length;){let{node:i,scope:s,depth:u,mcSelected:f}=r.pop();if(++o>fb||u>W){n.add("scan-limit");break}if(i.kind==="textValue")continue;if(o+r.length+i.children.length>fb){n.add("scan-limit");break}let l=Ua(s,i),d=Ta(i)?i:void 0;if(d){if(jb(d,l).drawing)continue;let c=ib(d,l);c.refused&&n.add("scan-limit"),c.branch&&r.push({node:c.branch,scope:l,depth:u+1,mcSelected:true});continue}if(!(!f&&Sa(i))){if(i.namespaceUri==="urn:schemas-microsoft-com:vml"&&i.localName==="textbox"){n.add("legacy-textbox");continue}i.namespaceUri==="urn:schemas-microsoft-com:vml"&&ar.has(i.localName)&&!i.children.some(c=>c.kind!=="textValue"&&c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox")&&n.add("legacy-drawing");for(let c of i.children)r.push({node:c,scope:l,depth:u+1,mcSelected:f});}}let a=Object.freeze([...n]);return mn.set(e.root,a),a}function yn(e){let t=new Set([e.part()]);for(let n of e.headerFooterPartsBySection())for(let r of [n.headers,n.footers])for(let o of r.values())t.add(o);for(let n of ["footnote","endnote"]){let r=Jf(e.currentPackage(),n);r&&t.add(r);}return Object.freeze([...t].flatMap(n=>ir(n).map(r=>Object.freeze({code:r,partName:n.name}))))}var sr=Object.freeze({}),cr=Object.freeze([]);function dr(e){let t=Object.keys(e);if(t.length===0)return sr;let n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=o);}return Object.freeze(n)}function lr(e){let t=new Map(Te$2(e.part())),n=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!n.has(i)){n.add(i);for(let[s,u]of Te$2(i))t.has(s)||t.set(s,u);}let r=e.currentPackage();for(let o of ["footnote","endnote"]){let a=Jf(r,o);if(!(!a||n.has(a))){n.add(a);for(let[i,s]of Te$2(a))t.has(i)||t.set(i,s);}}return t}function ur(e,t){let n=jf(e,t);if(!n)return null;let r=e.pages[n.pageIndex];if(!r)return null;let o=af(r),a=cf(e,t.paragraphId,n.pageIndex),i=Object.freeze({x:n.x+a.x,y:n.y+a.y,height:n.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:n.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function pr(e,t){let n=[];for(let r of t.values()){let o=ur(e,r);o&&n.push(o);}return n.length===0?cr:Object.freeze(n)}function gn(e,t){return {documentMetadata:dr(e.documentProperties()),destinations:pr(t,lr(e))}}function fr(e,t){let n=e.destinations;if(n){for(let r of n)if(r.anchor.name===t)return r}}function Oe(e={}){return Object.freeze({async decode(t,n,r){let o=yb(t,n);if(!o)throw new Error(`Unsupported or malformed ${n} image`);if(o.pixelWidth>r.maxDimension||o.pixelHeight>r.maxDimension||o.pixelWidth>r.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},...e.convertPreserved?{convertPreserved:e.convertPreserved}:{}})}var mr=65536;function bn(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function yr(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function gr(e,t,n){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===n:true}function hr(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let n=null;return Ca(e,r=>{if(n||!gr(t,r.story,r.noteScopeId))return;let o=r.story==="header"||r.story==="footer"?a=>xa(a,r.origin,{x:e.box.x,y:e.box.y}):void 0;Ga(r.host,(a,i)=>{if(n||i.textboxDepth===0)return;let s=i.textboxPath.map(u=>u.drawingNodeId);yr(s,t.textboxPath)&&(n=bn(e,i.storyOrigin));},r.origin,o);}),n}function xr(e,t){if(t.story==="textbox")return hr(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?bf(e,e.header.box):{x:0,y:0};case "footer":return e.footer?bf(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let r=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return r?bf(e,r.box):{x:0,y:0}}case "note-separator":{let n=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes;return n?.separator?bf(e,n.separator.box):{x:0,y:0}}default:return {x:0,y:0}}}function Rn(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function En(e,t){let n=af(e);return Object.freeze({x:n.x+t.x,y:n.y+t.y,width:t.width,height:t.height})}function br(e,t){let n=jf(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!n||n.pageIndex!==t.pageIndex)return;let r=e.pages[n.pageIndex];if(!r)return;let o=xr(r,t),a=Object.freeze([Rn({x:n.x+o.x,y:n.y+o.y,width:0,height:n.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>En(r,i)))})}function Rr(e,t,n){let r=n.filter(i=>i.pageIndex===t.pageIndex);if(r.length===0)return wn(t)?br(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(r.map(i=>Rn(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>En(o,i)))})}function wn(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function xn(e,t){return `${e}\0${t}`}function Er(e,t,n){let r=Math.max(e.start,t.offset),o=Math.min(e.end,n.offset);return o>r?{start:r,end:o}:null}function wr(e,t){let n=new Map,r=new Map,o=new Set,a=0;let i=(s,u)=>{if(a>=mr)return false;a+=1;let f=xn(s.pageIndex,u),l=r.get(f);return l?l.push(s):r.set(f,[s]),true};for(let[s,u]of t.entries())for(let[f,l]of u.occurrences.entries()){if(wn(l)||l.source.start.paragraphId!==l.source.end.paragraphId)continue;o.add(l.pageIndex);let d=`${s}\0${f}`,c={paragraphId:l.source.start.paragraphId,offset:l.source.start.offset},m={paragraphId:l.source.end.paragraphId,offset:l.source.end.offset},y=c.offset<=m.offset?{from:c,to:m}:{from:m,to:c};i({key:d,from:y.from,to:y.to,pageIndex:l.pageIndex},y.from.paragraphId);}if(r.size===0)return n;for(let s of e.pages)o.has(s.index)&&Ca(s,u=>{let f=u.story==="header"||u.story==="footer"?l=>xa(l,u.origin,{x:s.box.x,y:s.box.y}):void 0;Ga(u.host,(l,d)=>{let c=bn(s,d.storyOrigin);for(let m of l.lines)for(let y of Na(m)){let p=r.get(xn(s.index,y.paragraphId));if(p)for(let x of p){let h=Er(y,x.from,x.to);if(!h)continue;let b=Ye(m,h.start,void 0,y),E=Ye(m,h.end,void 0,y),P=n.get(x.key)??[];P.push({pageIndex:s.index,x:Math.min(b,E)+c.x,y:m.box.y+c.y,width:Math.abs(E-b),height:m.box.height}),n.set(x.key,P);}}},u.origin,f);});return n}function Fn(e,t){let n=false;for(let o of t)if(o.occurrences.length!==0){n=true;break}if(!n)return t;let r=wr(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,u)=>{let f=`${a}\0${u}`,l=Rr(e,s,r.get(f)??[]);return l?{...s,geometry:l}:s});return {...o,occurrences:Object.freeze(i)}})}function Fr(e){let t=new Map,n=[{node:e.root,depth:0}];for(;n.length>0;){let{node:r,depth:o}=n.pop();if(!(r.kind==="textValue"||o>64)){r.kind==="paragraph"&&!t.has(r.id)&&t.set(r.id,t.size);for(let a=r.children.length-1;a>=0;a-=1)n.push({node:r.children[a],depth:o+1});}}return t}function Sn(){let e=new Map,t=r=>{let o=e.get(r.root);if(o)return o;let a=Fr(r);return e.set(r.root,a),a},n={retainRevisionItems:false,revisionSites:nh,locations:Fa$1,commentAnchors:kg,deepOrder:t};return Object.freeze({collectReviewItems:r=>La(r,n),deepParagraphOrderOfPart:t})}function Sr(e,t){if(t)return true;let n=e.map(r=>r.root);for(;n.length>0;){let r=n.pop();if(lh(r))return true;if(r.kind!=="textValue")for(let o of r.children)n.push(o);}return false}function vr(e,t){let n=[],r=new Set([t.name]),o=a=>{!a||r.has(a.name)||(r.add(a.name),n.push(a));};for(let a of Od(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(Jf(e,"footnote")),o(Jf(e,"endnote")),n}function Or(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return Jf(e,"footnote")?.name??null;case "endnote":return Jf(e,"endnote")?.name??null;case "note-separator":return Jf(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function Pr(e,t){let n=new Map;for(let r of e){let o=t.get(r.partName),a=o?.get(r.start.paragraphId),i=o?.get(r.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),u=Math.max(a,i),f=n.get(r.partName);n.set(r.partName,{lower:Math.min(f?.lower??s,s),upper:Math.max(f?.upper??u,u)});}return n}function Ir(e,t,n,r,o){let a=new Map(n.map(d=>[d.name,o(d)])),i=Pr(r,a),s=new Map,u=new Map,f=(d,c,m,y,p,x,h)=>{let b=a.get(d)?.get(p),E=i.get(d);if(b===void 0||!E||b<E.lower||b>E.upper)return;let P=s.get(d)??new Map;s.set(d,P);let q=u.get(d)??new Map;u.set(d,q);let z=JSON.stringify([c.story,c.noteScopeId,c.noteAreaKind]),ne=m==="textbox"?JSON.stringify([z,"textbox",y]):z,$=P.get(p)??[],G=`${p}\0${c.page.index}\0${ne}`,B=q.get(G);B||(B={pageIndex:c.page.index,story:m,rootStory:c.story,textboxPath:y,noteScopeId:c.noteScopeId,noteAreaKind:c.noteAreaKind,laneKey:ne,intervals:[],intervalKeys:new Set},q.set(G,B),$.push(B),P.set(p,$));let R=`${x}\0${h}`;B.intervalKeys?.has(R)||(B.intervalKeys?.add(R),B.intervals.push({start:x,end:h}));};Da(e,d=>{let c=Or(t,d);!c||!i.has(c)||Ga(d.host,(m,y)=>{let p=y.textboxDepth>0?"textbox":d.story,x=y.textboxPath.map(b=>b.drawingNodeId),h=[];for(let b of m.lines){for(let E of b.spans)h.push(E.range);for(let E of b.drawings??[])h.push({paragraphId:E.paragraphId,start:E.start,end:E.start+1});}h.length===0&&h.push({paragraphId:m.range.paragraphId,start:m.range.start,end:m.range.end});for(let{paragraphId:b,start:E,end:P}of h)f(c,d,p,x,b,E,P);});}),Fa(e,d=>{let c=d.drawing.ownerPartName;i.has(c)&&f(c,d.root,d.story,d.textboxPath.map(m=>m.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let c of d.values())for(let m of c){m.intervals.sort((p,x)=>p.start-x.start||p.end-x.end);let y=[];for(let p of m.intervals){let x=y.at(-1);x&&p.start<=x.end?x.end=Math.max(x.end,p.end):y.push({...p});}m.intervals.splice(0,m.intervals.length,...y),m.intervalKeys=void 0;}let l=new Map;for(let[d,c]of s){let m=a.get(d);if(!m)continue;let y=[];for(let[p,x]of c){let h=m.get(p);h!==void 0&&y.push({paragraphId:p,position:h,laneKeys:new Set(x.map(({laneKey:b})=>b))});}y.sort((p,x)=>p.position-x.position),l.set(d,y);}return {byPart:s,orderByPart:a,visibleByPart:l}}function vn(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>>1;e[o].position<t?n=o+1:r=o;}return n}function Ar(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let n=t.orderByPart.get(e.partName),r=t.visibleByPart.get(e.partName),o=n?.get(e.start.paragraphId),a=n?.get(e.end.paragraphId);if(!n||!r||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),u=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),f=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),l=new Set([...u].filter(d=>f.has(d)));return l.size===0?[e.start.paragraphId,e.end.paragraphId]:r.slice(vn(r,i),vn(r,s+1)).filter(d=>[...d.laneKeys].some(c=>l.has(c))).map(d=>d.paragraphId)}function Dr(e,t,n,r){return r?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,n)};return a.end>a.start?[a]:[]})}function Lr(e,t){let n=Number.NEGATIVE_INFINITY;for(let r of e)for(let o of r.intervals)n=Math.max(n,o.end);return t!==n?new Set:new Set(e.filter(r=>r.intervals.some(o=>o.end===n)))}function On(e,t,n){let r=[],o=new Set;for(let[a,i]of e.entries()){let s=n===void 0?void 0:n===null?"neutral":a<n?"replaced":"replacement";for(let u of Ar(i,t)){let f=t.byPart.get(i.partName)?.get(u)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,c=u===i.start.paragraphId?i.start.offset:0,m=u===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,y=d?Lr(f,c):new Set;for(let p of f){let x=Dr(p,c,m,d);d&&x.length===0&&y.has(p)&&(x=[{start:c,end:c}]);for(let h of x){let b=`${p.pageIndex}\0${p.story}\0${p.noteScopeId??""}\0${p.noteAreaKind??""}\0${p.textboxPath.join("\0")}\0${i.partName}\0${u}\0${h.start}\0${h.end}\0${s??""}`;o.has(b)||(o.add(b),r.push({pageIndex:p.pageIndex,physicalPageNumber:p.pageIndex+1,story:p.story,rootStory:p.rootStory,textboxPath:p.textboxPath,noteScopeId:p.noteScopeId,noteAreaKind:p.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:u,offset:h.start},end:{paragraphId:u,offset:h.end}}}));}}}}return r}function In(e,t){let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);n=Math.imul(n^a,16777619)>>>0,r=Math.imul(r^a+o,2246822507)>>>0,r^=r>>>13;}return `${e}_${t.length.toString(36)}_${n.toString(36)}_${r.toString(36)}`}function Pn(e,t,n=In){let r=new Map;for(let a of t){let i=n(e,a),s=r.get(i)??new Set;s.add(a),r.set(i,s);}let o=new Map;for(let[a,i]of r){let s=[...i].sort();for(let[u,f]of s.entries())o.set(f,s.length===1?a:`${a}_${u.toString(36)}`);}return o}function Tr(e){let t=new Set,n=new Set;for(let r of e){if(r.kind==="comment"){t.add(r.id),r.parentId!==void 0&&t.add(r.parentId),r.parentRevisionId!==void 0&&n.add(r.parentRevisionId);for(let o of r.replyIds)t.add(o);}if(r.kind==="revision"){n.add(r.id),r.pairedWith!==void 0&&n.add(r.pairedWith);for(let o of r.replyIds)t.add(o);}}return {comment:Pn("comment",t),revision:Pn("change",n)}}function V(e,t,n){return e.get(n)??In(t,n)}function Mr(e,t,n){return e.kind==="revision"?{kind:"tracked-change",id:V(n.revision,"change",e.id),change:e.revisionKind,...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:e.text,replacedText:e.replacedText,nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:V(n.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),occurrences:t?On(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:V(n.comment,"comment",e.id),author:e.comment.author,initials:va(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:ua(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:V(n.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:V(n.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(r=>V(n.comment,"comment",r)),orphaned:e.orphaned,occurrences:t&&e.range?On([e.range],t):[]}}function An(e,t){let n=t.parts.get(t.mainDocumentPart);if(!n)return [];let r=vr(t,n),o=[n,...r],a=t.parts.get(P(t,n.name));if(!Sr(o,a))return [];let i=Sn(),s=i.collectReviewItems({storyPart:n,furnitureParts:r,commentsPart:a,commentsExtendedPart:t.parts.get(Q(t,n.name))});if(s.length===0)return [];let u=s.flatMap(d=>ya(d)),f=u.length>0?Ir(e,t,o,u,i.deepParagraphOrderOfPart):null,l=Tr(s);return s.map(d=>Mr(d,f,l)).filter(d=>d!==null)}var kr=new Set(["part","validatedHandle"]);function Dn(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function J(e,t,n,r,o){if(!(r!==void 0&&kr.has(r))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(n.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),n.add(e);try{if(Array.isArray(e)){for(let a of e)J(a,t,n,void 0,o);Object.freeze(e);return}if(!Dn(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");J(i.value,t,n,a,o);}}Object.freeze(e);}finally{n.delete(e);}}}}}function Ln(e){if(!Dn(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let r of e.pages)if(!(r===null||typeof r!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(r,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),J(i,new Set,s,o),t.add(i);}let n=(r,o)=>{let a=new Set;for(let i of r){let s=new Set;s.add(e),J(i,a,s,void 0,o);}Object.freeze(r);};for(let r of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(r==="pages"&&Array.isArray(o.value)){n(o.value,t);continue}if(r==="reviewArtifacts"&&Array.isArray(o.value)){n(o.value);continue}let a=new Set;a.add(e),J(o.value,new Set,a,r);}return Object.freeze(e),e}var Nr=Object.freeze([]),w=class extends Error{constructor(n,r,o){super(r,o);this.code=n;this.name="ExportResourceError";}code};function Br(e){try{return e instanceof w}catch{return false}}function Cr(e){try{return e instanceof Vd}catch{return false}}function _r(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function jr(e){if(Br(e))return e;let t=Cr(e),n=_r(e),r=n?`: ${n}`:"",o=new w(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${r}`:`Export layout failed${r}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function zr(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Tn(e){if(e==="all-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, proposed, or original")}var Ur=50,Pe=64;function Vr(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Hr(e){let t=false;return Fa(e,({drawing:n})=>{Vr(n.resource)&&(t=true);}),t}function Mn(e){return !ArrayBuffer.isView(e)}function Ie(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=Tn(t.displayMode??qb),r=Mn(e),o=Mn(e)?{ok:true,view:e}:I(e);if(!o.ok)return o;let a=o.view,i=t.reuseAcrossRevisions??r,s=zr(t.resourceTimeoutMs),u=t.measurer??y(),f=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),l$1=Ib({retainAcrossPasses:i}),d=0,c=new Set,m=()=>{d+=1;for(let R of c)R();c.clear();},y$1=md({session:a,decodePort:t.imageDecodePort??Oe(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:m}),p={view:a,measurer:u,paragraphCache:l$1,sessions:new Map,completed:new Map,inFlight:new Map,styles:ld(a),fieldLinks:new Map,links:ae(a),drawingBundle:y$1,furniture:new Map},x=new AbortController,h=t.signal,b=false,E=()=>b?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),P=()=>{b=true,q();};function q(){let R=p;if(R){p=null,h?.removeEventListener("abort",P),x.abort(h?.reason),R.drawingBundle.dispose(),R.paragraphCache.clear();for(let F of R.completed.values())nb(F.internal),ge(F.internal);for(let F of R.fieldLinks.values())F.registry.clear();R.fieldLinks.clear(),R.completed.clear(),R.inFlight.clear(),R.furniture.clear(),R.sessions.clear(),m();}}h?.addEventListener("abort",P,{once:true}),h?.aborted&&P();let z=()=>{if(!p)throw E();if(x.signal.aborted)throw new w("aborted","Export resource settlement was aborted")},ne=(R,F,D,g)=>d!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==D?Promise.resolve():(z(),new Promise((U,I)=>{let L=false,C,T=k=>{L||(L=true,C!==void 0&&clearTimeout(C),c.delete(M),x.signal.removeEventListener("abort",W),k?I(k):U());},M=()=>T(),W=()=>T(new w("aborted","Export resource settlement was aborted")),K=()=>{if(p?.view.packageRevision()!==F||p?.view.currentPackage()!==D){T();return}let k=g-Date.now();if(k<=0){T(new w("timedOut",`Image resources did not settle within ${s}ms`));return}C=setTimeout(K,Math.min(Ur,k));};if(c.add(M),x.signal.addEventListener("abort",W,{once:true}),d!==R||p?.view.packageRevision()!==F||p?.view.currentPackage()!==D){T();return}K();})),$=async(R,F=0,D=Date.now()+s)=>{if(z(),Date.now()>=D)throw new w("timedOut",`Export layout did not stabilize within ${s}ms`);let g=p,U=D,I=g.view.packageRevision(),L=g.view.currentPackage(),C=g.completed.get(R);if(C&&C.revision===I&&C.pkg===L)return C.published;let T=()=>{if(g.view.packageRevision()===I&&g.view.currentPackage()===L)return null;if(F>=Pe-1)throw new w("nonConvergent","Document revision did not stabilize during export layout");return $(R,F+1,U)},M=g.fieldLinks.get(R);if(!M||M.revision!==I||M.pkg!==L){let O=M?.registry??be();O.clear(),M={revision:I,pkg:L,registry:O},g.fieldLinks.set(R,M),g.furniture.delete(R);}let W=M.registry,K=g.sessions.get(R)??Ee();g.sessions.set(R,K);let k=g.furniture.get(R);k||(k=Zd({view:g.view,measurer:g.measurer,producer:f,cache:g.paragraphCache,styleCascade:g.styles.styleCascade,numberingIndex:g.styles.numberingIndex,defaultTabStopPt:g.styles.defaultTabStopPt,compatibilityMode:g.styles.compatibilityMode,displayMode:R,revisionAuthorFilter:void 0,inlineDrawingLayoutForPart:O=>g.drawingBundle.contextForPart(O),drawingLayoutTokenForPart:O=>g.drawingBundle.cacheTokenForPart(O),drawingTokenForParagraphForPart:(O,ye)=>g.drawingBundle.drawingTokenForParagraph(ye,O),linkProjectors:g.links,projectFieldLink:O=>W.project(O)}),g.furniture.set(R,k));for(let O=0;O<Pe;O+=1){let ye=d;g.drawingBundle.sync(g.view);let He=T();if(He)return He;let _=l({view:g.view,revision:g.view.packageRevision(),measurer:g.measurer,cache:g.paragraphCache,session:K,producer:f,styleCascade:g.styles.styleCascade,defaultTabStopPt:g.styles.defaultTabStopPt,numberingIndex:g.styles.numberingIndex,furniture:k,compatibilityMode:g.styles.compatibilityMode,linkProjectors:g.links,projectFieldLink:v=>W.project(v),inlineDrawingLayout:g.drawingBundle.bodyContext,inlineDrawingLayoutForPart:v=>g.drawingBundle.contextForPart(v),drawingTokenForParagraph:v=>g.drawingBundle.drawingTokenForParagraph(v,g.view.part().name),drawingTokenForParagraphForPart:(v,re)=>g.drawingBundle.drawingTokenForParagraph(re,v),drawingLayoutEpoch:g.drawingBundle.cacheTokenForPart(g.view.part().name),drawingLayoutEpochForPart:v=>g.drawingBundle.cacheTokenForPart(v),displayMode:R,revisionAuthorFilter:void 0});if(!Hr(_)){let v=T();if(v)return v;i||(nb(_),ge(_),g.paragraphCache.clear(),g.sessions.delete(R),g.furniture.delete(R));let re=An(_,L),nr=re.length===0?Nr:Object.freeze(Fn(_,re)),rr=gn(g.view,_),or={..._,...rr,contentWarnings:yn(g.view),reviewArtifacts:nr},Ge=Ln(or);return g.completed.set(R,{revision:I,pkg:L,internal:_,published:Ge}),Ge}let qe=ye;for(;g.drawingBundle.pendingResourceCount()>0;){await ne(qe,I,L,U),qe=d,z();let v=T();if(v)return v}z();let $e=T();if($e)return $e}throw new w("nonConvergent",`Image resources did not reach quiescence after ${Pe} layout passes`)},G=R=>{let F;try{F=Tn(R);}catch(I){return Promise.reject(I)}if(!p)return Promise.reject(E());let D=p,g=D.inFlight.get(F);if(g)return g;let U=$(F).catch(I=>{throw jr(I)}).finally(()=>D.inFlight.delete(F));return D.inFlight.set(F,U),U};return {ok:true,session:{layout:()=>G(n),layoutFor:G,validatedImageBytes(R){let F=p;return !F||R.resource.kind!=="ready"?null:F.drawingBundle.mintValidatedBytes(R.resource.validatedHandle,R.resource.contentId)?.slice()??null},dispose:q}}}var Ae=b$2;function De(e){return typeof e.admittedFontFace=="function"}var qr=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function pe(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Le(e){let t=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:pe(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:t?Object.freeze({requested:pe(t.requested),resolved:pe(t.resolved),...t.lineMetrics?{lineMetrics:Object.freeze({...t.lineMetrics})}:{}}):null})}function $r(e){return Object.freeze({...Le(e),bytes:h$1(e)})}function Gr(e,t){if(!e)return null;try{let n=e(t);return !n||n instanceof d$2?null:$r(n)}catch{return null}}function kn(e){return t=>{if(e.status()!=="active")throw e.unavailable();return Gr(e.resolve(),t)}}function Wr(e){return Object.freeze(e.slice(0,Ae).map(t=>Object.freeze({request:pe(t.request),partName:t.partName,reason:t.reason})))}function Te(e,t,n,r,o=[]){let a=new Map;for(let s of [...e,t]){let u=s.toLowerCase();a.has(u)||a.set(u,s);}let i=[...a.values()].map(s=>{let u=[];for(let f of qr){let l=r?.({family:s,...f});!l||l instanceof d$2||u.push(Object.freeze({...f,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}return Object.freeze({family:s,coverage:u.length===4?"complete":u.length>0?"partial":"none",faces:Object.freeze(u)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:t,families:Object.freeze(i),originFailures:Object.freeze([...n]),droppedEmbeddedFonts:Wr(o)})}function Me(e,t){if(t.onFontResolution){try{let n=t.onFontResolution(e);Promise.resolve(n).catch(r=>{console.warn("[fonts] font-resolution diagnostics callback failed",r);});}catch(n){console.warn("[fonts] font-resolution diagnostics callback failed",n);}return}for(let n of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",n);for(let n of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",n);}function ke(e,t){if(t.fontPolicy!=="strict"||e.originFailures.length===0&&e.families.every(r=>r.coverage==="complete"))return;let n=e.families.filter(r=>r.coverage!=="complete").map(r=>r.family).join(", ");throw new w("layoutFailed",`Strict font policy refused export${n?`; incomplete families: ${n}`:"; a font origin failed"}`)}function fe(){return new Map}function Ne(e,t,n,r){if(n.trim().length===0)return null;let o={family:n,weight:r.bold?700:400,style:r.italic?"italic":"normal"},a=g(o),i=t.get(a);if(!i){try{i=e.fonts.resolve(o);}catch{return null}t.set(a,i);}return i instanceof d$2?null:i}function Nn(e,t,n){let r=n.fontFamily??e.defaultFont.family;return Ne(e,t,r,n)}function Be(e){return typeof e.shapeLaidOutText=="function"}function Ce(e){let t=fe(),n=new WeakMap;return r=>{let o=fa(r.style,r.fontSlot),a=R(r.text,o);if(a.length===0)return null;let i=o.fontFamily??e.defaultFont.family,s=Ne(e,t,i,o);if(!s)return null;try{if(o.smallCaps&&!Te$1(e.shaper,e.environment,s,o,n))return null;let u=Se(e.shaper,e.environment,s,o,a);return Object.freeze({run:u,font:Le(s),fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Bn(e){return t=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(t)??null}}var ee=new Map,me=new WeakMap,_e=0,te,je=32,Cn=c;function _n(){if(te)return te;let e=(async()=>(await r(),w$1(z)))();return te=e,e.catch(()=>{te===e&&(te=void 0);}),e}function jn(e){let t=fe();return Ve$1(e,{resolveFont(n){return Nn(e,t,n)},fallback:y()})}async function zn(e,t){if(!B(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let n=await _n(),r=await I$1(e,n,z,t);return Object.freeze({createMeasurer:()=>jn(r),resolveFont:o=>r.fonts.resolve(o),shapeLaidOutText:Ce(r),producer:["node-export-session",e.fingerprint,r.operation.shapingHash,`producer:${r.operation.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:e.fingerprint})}function Kr(e,t){if(!B(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=me.get(e);if(n)return n;let r=D(e),o=ee.get(r);if(!o){if(ee.size>=je)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${je} process-wide configurations`));o=(async()=>{let u=C(e).sources.reduce((l,d)=>l+(d.availability==="forbidden"?0:d.bytes.byteLength),0);if(_e+u>Cn)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Cn} process-wide`);_e+=u;let f;try{let l=await _n();f=await I$1(e,l,z,t);}catch(l){throw _e-=u,l}return Object.freeze({createMeasurer:()=>jn(f),shapeLaidOutText:Ce(f),shapingHash:f.operation.shapingHash,producerVersion:f.operation.producerVersion})})(),ee.set(r,o),o.catch(()=>{ee.get(r)===o&&ee.delete(r);});}let a=e.fingerprint,i=o.then(s=>Object.freeze({createMeasurer:s.createMeasurer,shapeLaidOutText:s.shapeLaidOutText,producer:["node-export",a,s.shapingHash,`producer:${s.producerVersion}`,`fallback:${x}`].join("|"),extensionFingerprint:a}));return me.set(e,i),i.catch(()=>{me.get(e)===i&&me.delete(e);}),i}var Xr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function Yr(e){let t=e.currentPackage(),n=(t.relationships.get(t.mainDocumentPart)??[]).find(o=>o.type===Xr),r;if(n){let o=E(n);o.mode==="Internal"&&o.target.ok&&(r=t.parts.get(o.target.partName));}return r??=t.parts.get("/word/fontTable.xml"),Rd(t,r)}function Un(e,t){let n=Yr(e);if(n.length!==0)return h(r=>{let o$1=new Set((r.resolvedFaces??[]).map(i=>g(i))),a$1=o(n,{maxFontBytes:a,aggregateBudget:Qr(r),shadowedRequests:o$1});if(t)for(let i of a$1.dropped){if(t.dropped.length>=Ae)break;t.dropped.push(i);}return {sources:a$1.sources}})}function Qr(e){let t=e.committedSourceBytes;return t===void 0||!Number.isSafeInteger(t)||t<=0?c:Math.max(0,c-t)}function Zr(e){return De(e)&&Be(e)}var N=0,Vn=Symbol("font-resolution-timeout");function Jr(e){let t=0,n=false;return e?.(N),{reserve:o=>{if(n)throw new Error("Document font-byte lease is already released");if(N+o>c)throw new w("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${o} bytes with ${N} bytes already active`);N+=o,t+=o,e?.(N);let a=false;return ()=>{a||n||(a=true,N-=o,t-=o,e?.(N));}},release:()=>{n||(n=true,N-=t,t=0,e?.(N));}}}function Ue(e,t){return e.attributes.find(n=>n.localName===t)?.value}function eo(e,t){return e.attributes.find(n=>n.localName===t&&(n.namespaceUri===da||n.namespaceUri===""))?.value}async function to(e,t){if(t.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(t.signal?.aborted)return {ok:false,reason:"aborted"};let n=I(e);if(!n.ok)return n;let{fonts:r,fontResolutionTimeoutMs:o,fontPolicy:a,onFontResolution:i,...s}=t,u=Array.isArray(r)?r:[r],f,l;try{l=await no(n.view,u,{signal:t.signal,timeoutMs:o??t.resourceTimeoutMs,fontPolicy:a,onFontResolution:b=>(f=b,i?.(b))});}catch(b){if(b instanceof w&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!f)throw l?.dispose(),new w("layoutFailed","Document font resolution completed without publishing its evidence");let d;try{d=Ie(n.view,{...s,reuseAcrossRevisions:!1,...l?{measurer:l.createMeasurer(),producer:t.producer??l.producer}:t.producer?{producer:t.producer}:{}});}catch(b){throw l?.dispose(),b}if(!d.ok)return l?.dispose(),d;let c=d.session,m=l,y="active",p=()=>y==="aborted"?new w("aborted","Export resource settlement was aborted"):new w("disposed","Export session has been disposed"),x=b=>{if(y==="active"){y=b,t.signal?.removeEventListener("abort",h);try{c.dispose();}finally{m?.dispose(),m=void 0;}}},h=()=>x("aborted");return t.signal?.addEventListener("abort",h,{once:true}),t.signal?.aborted&&h(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>y==="active"?c.layout():Promise.reject(p()),layoutFor:b=>y==="active"?c.layoutFor(b):Promise.reject(p()),validatedImageBytes:b=>y==="active"?c.validatedImageBytes(b):null,admittedFontFace:kn({status:()=>y,unavailable:p,resolve:()=>m?.resolveFont}),shapeLaidOutText:Bn({status:()=>y,unavailable:p,shaping:()=>m}),dispose:()=>x("disposed")})}}async function no(e,t,n={}){let r=ro(n.timeoutMs),o=new AbortController,a=()=>o.abort(n.signal?.reason);n.signal?.addEventListener("abort",a,{once:true}),n.signal?.aborted&&a();let i=setTimeout(()=>o.abort(Vn),r);try{ze(o.signal);let s=(async()=>{let u=Jr(n.onActiveFontBytesChange),f=!1;try{let l=ao(e).slice(0,b),d$1=[],c={dropped:[]},m=Un(e,c),y=m?[...t,m]:t,p=await k(y,{families:l,defaultFamily:c$1.family,signal:o.signal},{onOriginFailure:E=>d$1.push(E),reserveOwnedBytes:u.reserve});ze(o.signal);let x=d(p??{});if(x.sources.length===0){let E=Te(l,x.defaultFont.family,d$1,void 0,c.dropped);Me(E,n),ke(E,n);return}let h=await zn(F(x));ze(o.signal);let b$1=Te(l,x.defaultFont.family,d$1,h.resolveFont,c.dropped);return Me(b$1,n),ke(b$1,n),f=!0,Object.freeze({...h,dispose:u.release})}finally{f||u.release();}})();return await Promise.race([s,oo(o.signal)])}finally{clearTimeout(i),n.signal?.removeEventListener("abort",a);}}function ro(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 oo(e){return new Promise((t,n)=>{let r=()=>{n(Hn(e));};e.aborted?r():e.addEventListener("abort",r,{once:true});})}function Hn(e){let t=e.reason===Vn;return new w(t?"timedOut":"aborted",t?"Font resolution timed out":"Font resolution was aborted",t?void 0:{cause:e.reason})}function ze(e){if(e.aborted)throw Hn(e)}function ao(e){let t=[e.part().root],n=[],r=[],o=new Set([e.part().name]),a=(l,d)=>{!d||o.has(d.name)||(o.add(d.name),l.push(d.root));};for(let l of e.headerFooterPartsBySection()){for(let d of l.headers.values())a(n,d);for(let d of l.footers.values())a(n,d);}for(let l of ["footnote","endnote"])r.push(...io(e,l));let i=e.documentThemeFonts(),s={major:i.major,minor:i.minor,majorEastAsia:i.majorEastAsia??null,minorEastAsia:i.minorEastAsia??null},u=new Map,f=(l,d)=>{let c=d$1(l,e.stylesRoot(),s,co(l,d)),m=r$1(l,e.numberingRoot(),e.stylesRoot(),s);for(let y of [...c.direct,...po(l),...m,...c.inherited]){let p=y.toLowerCase();u.has(p)||u.set(p,y);}};return f(t,"body"),f(n,"furniture"),f(r,"note"),[...u.values()]}function io(e,t){let n=Jf(e.currentPackage(),t);if(!n)return [];let r=new Set(Kf(e.part()).filter(a=>a.noteKind===t).map(a=>a.noteId)),o=[];for(let a of n.root.children){if(a.kind==="textValue")continue;let i=hd(a),s=gd(a);(i==="separator"||i==="continuationSeparator"||s!==null&&r.has(s))&&o.push(a);}return o}var so="http://schemas.openxmlformats.org/officeDocument/2006/math";function co(e,t){let n=new Set;for(let r of e){let o=[],a=[{node:r,context:t}];for(;a.length>0;){let{node:i,context:s}=a.pop();i.namespaceUri===da&&i.localName==="p"&&o.push({paragraph:i,context:s});let u=i.namespaceUri===da&&i.localName==="txbxContent"&&(s==="body"||s==="note")?"detached":s;for(let f=i.children.length-1;f>=0;f-=1){let l=i.children[f];l.kind!=="textValue"&&a.push({node:l,context:u});}}for(let i of o)lo(i.paragraph,n,i.context);}return n}function lo(e,t,n){let r=Va(),o=null,a=null,i="",s=false,u=false,f=false,l=0,d=[];for(let c=e.children.length-1;c>=0;c-=1){let m=e.children[c];m.kind!=="textValue"&&d.push({node:m,runId:null,visibility:H,containerDepth:0});}for(;d.length>0;){let{node:c,runId:m,visibility:y,containerDepth:p}=d.pop();if(p>=la||c.namespaceUri===da&&c.localName==="p")continue;let x=c.namespaceUri===da&&c.localName==="r"?c.id:m;if(c.namespaceUri===da&&c.localName==="fldSimple"){let h=Ue(c,"instr")??"";dd(h,{allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&uo(c)!==H&&t.add(c.id);}if(c.namespaceUri===da&&c.localName==="fldChar"){let h=Ue(c,"fldCharType");if(h==="begin")Ya(r),r.nesting===1&&(o=x,a=null,i="",s=false,u=false,f=je$1(c),l=0);else if(h==="separate"){let b=r.nesting===1;if(_a(r),b){let E=Xa(r);i=E.instruction,s=E.overflow||r.nestingOverflow,a=x,u=true;}}else if(h==="end"){if(r.nesting===1){if(r.phase==="instruction"){let E=Xa(r);i=E.instruction,s=E.overflow||r.nestingOverflow;}if(!s&&cd(i,{hasSeparate:u,hasLegacyFormData:f,allowPageFields:n==="body"||n==="furniture",allowRefFields:n==="body"||n==="note",allowPageRef:n==="body",allowAutonum:n==="body"||n==="note"})&&l!==H){let E=a??o;E&&t.add(E);}}$a(r);}continue}if(c.namespaceUri===da&&(c.localName==="instrText"||c.localName==="delInstrText")){Za(r,Kn(c),c.localName==="delInstrText");continue}r.nesting>0&&ab(r)&&c.namespaceUri===da&&qn(c)&&(l|=y);for(let h=c.children.length-1;h>=0;h-=1){let b=c.children[h];b.kind!=="textValue"&&d.push({node:b,runId:x,visibility:y&Wn(c),containerDepth:ma(c,p)});}}Wa(r);}function qn(e){return e.localName==="t"||e.localName==="delText"?Kn(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var Ve=1,$n=2,Gn=4,H=Ve|$n|Gn;function uo(e){let t=[];for(let r of e.children)r.kind!=="textValue"&&t.push({node:r,visibility:H});let n=0;for(;t.length>0;){let{node:r,visibility:o}=t.pop();if(!(r.namespaceUri===da&&r.localName==="p")){if(r.namespaceUri===da&&qn(r)&&(n|=o,n===H))return n;for(let a of r.children)a.kind!=="textValue"&&t.push({node:a,visibility:o&Wn(r)});}}return n}function Wn(e){return e.namespaceUri!==da?H:e.localName==="ins"||e.localName==="moveTo"?Ve|$n:e.localName==="del"||e.localName==="moveFrom"?Ve|Gn:H}function po(e){let t=new Map,n=r=>{let o=a$1(r??void 0);if(o===null)return;let a=o.toLowerCase();t.has(a)||t.set(a,o);};for(let r of e){let o=[r];for(;o.length>0;){let a=o.pop();if(a.namespaceUri===so&&n(uc),a.namespaceUri===da&&a.localName==="sym"&&n(b$1(eo(a,"font"))),a.namespaceUri===da&&a.localName==="fldSimple"){let i=Ue(a,"instr");n(bd(i??"")?.font??null);}if(a.namespaceUri===da&&a.localName==="p")for(let i of q(a))n(i);for(let i=a.children.length-1;i>=0;i-=1){let s=a.children[i];s.kind!=="textValue"&&o.push(s);}}}return [...t.values()]}function Kn(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let r=n.pop();if(r.kind==="textValue")t+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)n.push(r.children[o]);}return t}var Qn="FILE_TOO_LARGE",Xn=8;function fo(e){return typeof e=="object"&&e!==null}function Zn(e){if(!(!fo(e)||typeof e.code!="string"))return e.code}function Jn(e){return e===""||e.toLowerCase()==="localhost"}function mo(e){try{let t=decodeURIComponent(e);return t.includes("\0")?null:t}catch{return null}}function er(e){let t=mo(e);if(t===null)return null;let n=[];for(let r of t.split(/[/\\]/))if(!(r===""||r===".")){if(r===".."){if(n.length===0)return null;n.pop();continue}n.push(r);}return `/${n.join("/")}`}function tr(e){let t=er(e);return t===null?null:t.endsWith("/")?t:`${t}/`}function yo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function go(e){let t;try{t=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(t.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(t.username!==""||t.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!Jn(t.host))throw new TypeError("trustedRoot must be a local file: URL");let n=tr(t.pathname);if(n===null||yo(n))throw new TypeError("trustedRoot must be a directory inside the filesystem");let r=new URL("file:///");return r.pathname=n,r}function ho(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 xo(e){let t=ho(e);if(t.length===0)throw new TypeError("trustedRoot must name at least one directory");if(t.length>Xn)throw new TypeError(`trustedRoot must not exceed ${Xn} directories`);return t.map(go)}function bo(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 Ro(e,t){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Jn(e.host))return null;let n=er(e.pathname);if(n===null)return null;for(let r of t){let o=tr(r.pathname);if(o===null||!n.startsWith(o)||n.length<=o.length)continue;let a=new URL("file:///");return a.pathname=n,a}return null}function Eo(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 wo(e,t,n){let r=n.relative(n.resolve(e),n.resolve(t));return r!==""&&!r.startsWith("..")&&!n.isAbsolute(r)}function Yn(e,t,n){return e.some(r=>wo(r,t,n))}async function Fo(e,t){let n=[];for(let r of e)try{n.push(await t(r));}catch(o){if(Zn(o)==="ENOENT")continue;throw o}return n}function So(e){return async(t,{signal:n,maxBytes:r})=>{if(n?.aborted)throw n.reason;let[{open:o,realpath:a},{constants:i},{fileURLToPath:s},u]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),f=e.map(y=>u.resolve(s(y.href))),l=u.resolve(s(typeof t=="string"?t:t.href));if(!Yn(f,l,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let d=typeof i.O_NOFOLLOW=="number"?i.O_RDONLY|i.O_NOFOLLOW:"r",c=await o(l,d),m=()=>{c.close();};n?.addEventListener("abort",m,{once:true});try{if(n?.aborted)throw n.reason;let y=await a(l);if(!Yn(await Fo(f,a),y,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let p=(await c.stat()).size;if(!Number.isSafeInteger(p)||p<0||p>r)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Qn});let x=new Uint8Array(p),h=0;for(;h<x.byteLength;){if(n?.aborted)throw n.reason;let{bytesRead:b}=await c.read(x,h,x.byteLength-h,h);if(b===0)break;h+=b;}if(n?.aborted)throw n.reason;return h===x.byteLength?x:x.slice(0,h)}catch(y){throw n?.aborted?n.reason:y}finally{n?.removeEventListener("abort",m),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 t=xo(e.trustedRoot),n=bo(e.maxBytes),r=e.read??So(t),o=e.networkFetch??fetch;return(async(a,i)=>{let s=i?.signal;if(s?.aborted)throw s.reason;let u=Eo(a);if(u.protocol!=="file:")return o(u,i);let f=Ro(u,t);if(!f)return new Response(null,{status:404});let l=s?new AbortController:void 0,d=()=>l?.abort(s?.reason);s?.addEventListener("abort",d,{once:true});let c;try{if(c=await r(f,{maxBytes:n,...l?{signal:l.signal}:{}}),s?.aborted)throw s.reason;if(c.byteLength>n)return new Response(null,{status:413})}catch(m){if(s?.aborted)throw s.reason;if(l?.signal.aborted)throw l.signal.reason??m;if(m instanceof DOMException&&m.name==="AbortError"||m instanceof Error&&m.name==="AbortError")throw m;let y=Zn(m);if(y===Qn)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw m}finally{s?.removeEventListener("abort",d);}return new Response(c,{status:200})})}
|
|
2
|
+
export{w as ExportResourceError,je as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,Kr as acquireSharedExportShaping,Oe as createNodeImageDecodePort,vo as createPackagedFileFetch,fr as exportDestinationNamed,De as hasExportAdmittedFont,Be as hasExportLaidOutText,Zr as hasFontBackedExportCapabilities,Ie as openDocumentForExport,to as openFontBackedDocumentForExport};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FontSource, a as FontSourceSubstitution, b as FontFaceRequest, c as FontConfiguration } from './editor-
|
|
1
|
+
import { F as FontSource, a as FontSourceSubstitution, b as FontFaceRequest, c as FontConfiguration } from './editor-BlerWPyk.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A partial font configuration one origin contributes: sources, substitutions, or both.
|
|
@@ -206,7 +206,7 @@ declare function isFontResolver(value: unknown): value is MarkedFontResolver;
|
|
|
206
206
|
* @public
|
|
207
207
|
*/
|
|
208
208
|
type FontOrigin = FontConfiguration | FontConfigurationFragment | MarkedFontResolver | Promise<FontConfiguration | FontConfigurationFragment | undefined> | undefined;
|
|
209
|
-
/**
|
|
209
|
+
/** A failed font origin or a partial failure in an otherwise usable fragment. @public */
|
|
210
210
|
interface FontOriginFailure {
|
|
211
211
|
/** Zero-based position in the first-wins origin list. */
|
|
212
212
|
readonly originIndex: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-
|
|
2
|
-
import { b as OoxmlPackage, O as OoxmlPart, c as OoxmlElement, g as OoxmlPackageRejection } from './tree-op-types-
|
|
1
|
+
import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-kSSFMq9X.js';
|
|
2
|
+
import { b as OoxmlPackage, O as OoxmlPart, c as OoxmlElement, g as OoxmlPackageRejection } from './tree-op-types-C71G7rIv.js';
|
|
3
3
|
|
|
4
4
|
/** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
|
|
5
5
|
interface EnsuredHyperlinkRelationship {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OoxmlPart, a as OoxmlNode, c as OoxmlElement, b as OoxmlPackage } from './tree-op-types-
|
|
1
|
+
import { O as OoxmlPart, a as OoxmlNode, c as OoxmlElement, b as OoxmlPackage } from './tree-op-types-C71G7rIv.js';
|
|
2
2
|
|
|
3
3
|
/** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
|
|
4
4
|
type HeaderFooterVariant = 'default' | 'first' | 'even';
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { T as TreeDocOp, E as ImageDecodePort, v as DrawingPositionInput,
|
|
1
|
+
import { T as TreeDocOp, E as ImageDecodePort, v as DrawingPositionInput, Y as DrawingTransform, F as DrawingTreeDocOp, y as SupportedImageMime } from './tree-op-types-C71G7rIv.js';
|
|
2
2
|
import { Unsubscribe, ExecResult, ParagraphTabStop, IndentFormatting, ParagraphFlags, ParagraphDisagreements, SelectionPin } from './contracts/types.js';
|
|
3
|
-
import { g as ReviewRevisionKind } from './review-items-
|
|
3
|
+
import { g as ReviewRevisionKind } from './review-items-CiliAz8H.js';
|
|
4
4
|
import { EditorModule, ReviewModuleContribution } from './contracts/modules.js';
|
|
5
|
-
import { D as DocumentSource, c as FontConfiguration, Z as ZoomMode, E as EditorFontError, n as Editor, e as EditorCommand, C as CanResult, S as SelectedImageState, o as FormatPainterSurfaceState, h as TrackedChangePredicate, T as TrackedChangeFilterMode,
|
|
6
|
-
import { R as RevisionDisplayMode } from './revision-projection-
|
|
7
|
-
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-
|
|
8
|
-
import { e as FontConfigurationFragment, g as FontResolver } from './font-resolver-
|
|
5
|
+
import { D as DocumentSource, c as FontConfiguration, Z as ZoomMode, E as EditorFontError, n as Editor, e as EditorCommand, C as CanResult, S as SelectedImageState, o as FormatPainterSurfaceState, h as TrackedChangePredicate, T as TrackedChangeFilterMode, b as FontFaceRequest, F as FontSource, I as ImageContext, p as TableBorderEdgeTarget, q as TableBorderSpec, r as TableBorderStyle, t as TableContext } from './editor-BlerWPyk.js';
|
|
6
|
+
import { R as RevisionDisplayMode } from './revision-projection-JiDclAFU.js';
|
|
7
|
+
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-2vPh96Ey.js';
|
|
8
|
+
import { e as FontConfigurationFragment, g as FontResolver } from './font-resolver-DtADJcLL.js';
|
|
9
9
|
import { EditorCollaborationSession, CollaborationRemoteSelection, CollaborationModuleContribution } from './collaboration.js';
|
|
10
|
-
import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle,
|
|
11
|
-
import { b as ResolvedFootnoteProperties, R as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-
|
|
12
|
-
import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-
|
|
13
|
-
import { B as BookmarkIndex } from './custom-node-writes-
|
|
14
|
-
import { I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, b as ImageIntentResult } from './tree-package-fragment-
|
|
15
|
-
import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-
|
|
16
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
10
|
+
import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle, F as FieldShadingMode, d as DrawingPaintStrings } from './semantic-paint-BEjYcsPK.js';
|
|
11
|
+
import { b as ResolvedFootnoteProperties, R as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-D5_fXW9K.js';
|
|
12
|
+
import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-Bc-MGXbM.js';
|
|
13
|
+
import { B as BookmarkIndex } from './custom-node-writes-ClTkWM7s.js';
|
|
14
|
+
import { I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, b as ImageIntentResult } from './tree-package-fragment-DRJkmfTW.js';
|
|
15
|
+
import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-C-VsxNee.js';
|
|
16
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-Cp5W25RC.js';
|
|
17
17
|
import { C as CollaborationStatus } from './failure-BnGjoXf0.js';
|
|
18
|
+
import { V as ViewScope } from './editor-scope-DZJT4ukT.js';
|
|
18
19
|
import './contracts/document.js';
|
|
20
|
+
import './contracts/interaction.js';
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* A Word-faithful blank document, freshly zipped per call (the caller may hand the
|
|
@@ -236,8 +238,9 @@ interface DocxEditorConfig {
|
|
|
236
238
|
*/
|
|
237
239
|
fonts?: FontConfiguration | FontConfigurationFragment | FontResolver;
|
|
238
240
|
author?: string;
|
|
241
|
+
/** BCP-47 locale for regional date input and generated labels; defaults to en-US. */
|
|
239
242
|
locale?: string;
|
|
240
|
-
/**
|
|
243
|
+
/** Drawing and form-control UI labels; defaults to English when omitted. */
|
|
241
244
|
translate?: (key: string, params?: Record<string, string | number>) => string;
|
|
242
245
|
/**
|
|
243
246
|
* Capability modules to register — the seam `@docx-editor.dev/pro` plugs in
|
|
@@ -253,7 +256,9 @@ interface DocxEditorConfig {
|
|
|
253
256
|
* tracked changes; the reader still moves between modes from the toolbar.
|
|
254
257
|
* - `'suggesting'` — opens in suggesting. It needs what suggesting always needs — a
|
|
255
258
|
* review module and an {@link DocxEditorConfig.author} — and falls back to editing
|
|
256
|
-
* with the reason published when either is missing.
|
|
259
|
+
* with the reason published when either is missing. A missing author is a host
|
|
260
|
+
* configuration error and is also reported once on the console; the editor enters
|
|
261
|
+
* suggesting as soon as {@link DocxEditorInstance.setAuthor} names one.
|
|
257
262
|
* - `'view'` — read-only: every mutating command through the facade is refused, and
|
|
258
263
|
* the toolbar cannot leave viewing.
|
|
259
264
|
* - Omitted — the DOCUMENT decides: a package carrying `w:trackRevisions` opens in
|
|
@@ -451,6 +456,10 @@ interface DocxEditorInstance extends Editor {
|
|
|
451
456
|
* survives document reloads and font remounts. An empty or whitespace value clears the author,
|
|
452
457
|
* after which suggesting refuses writes with its existing reason.
|
|
453
458
|
*
|
|
459
|
+
* Naming an author also completes a request for suggesting that was refused for want of
|
|
460
|
+
* one — a `mode: 'suggesting'` or a document's `w:trackRevisions` that opened in editing —
|
|
461
|
+
* unless the reader has chosen a mode since.
|
|
462
|
+
*
|
|
454
463
|
* @public
|
|
455
464
|
*/
|
|
456
465
|
setAuthor(author: string | undefined): void;
|
|
@@ -465,15 +474,16 @@ interface DocxEditorInstance extends Editor {
|
|
|
465
474
|
*/
|
|
466
475
|
setMode(mode: 'edit' | 'view' | 'suggesting' | undefined): void;
|
|
467
476
|
/**
|
|
468
|
-
* Set the drawing-label resolver without rebuilding the editor.
|
|
469
|
-
*
|
|
477
|
+
* Set the drawing and form-control label resolver without rebuilding the editor.
|
|
478
|
+
* Open dialogs preserve their controls and input; later surface mounts use the same resolver.
|
|
470
479
|
*
|
|
471
480
|
* @public
|
|
472
481
|
*/
|
|
473
482
|
setTranslate(translate: ((key: string, params?: Record<string, string | number>) => string) | undefined): void;
|
|
474
483
|
/**
|
|
475
|
-
* Set
|
|
476
|
-
*
|
|
484
|
+
* Set regional date input and generated labels without rebuilding the editor.
|
|
485
|
+
* Stored dates are preserved; an in-progress field edit retains its starting locale.
|
|
486
|
+
* Omitted, invalid, and unsupported locales use en-US. Translation catalogues fall back by language.
|
|
477
487
|
*
|
|
478
488
|
* @public
|
|
479
489
|
*/
|
|
@@ -1063,15 +1073,6 @@ interface RemoteCaretLabelHost {
|
|
|
1063
1073
|
publish(anchors: readonly RemoteCaretLabelAnchor[]): void;
|
|
1064
1074
|
}
|
|
1065
1075
|
|
|
1066
|
-
/**
|
|
1067
|
-
* How an edit is written.
|
|
1068
|
-
*
|
|
1069
|
-
* `'suggest'` is the one that changes what the ops MEAN: the same keystroke becomes a `w:ins`
|
|
1070
|
-
* and the same Backspace becomes a `w:del` over the words it would have removed. `'view'`
|
|
1071
|
-
* refuses edits outright.
|
|
1072
|
-
*/
|
|
1073
|
-
type SurfaceEditingMode = 'edit' | 'suggest' | 'view';
|
|
1074
|
-
|
|
1075
1076
|
/**
|
|
1076
1077
|
* How a paginated surface opens. Every field is optional.
|
|
1077
1078
|
*
|
|
@@ -1079,6 +1080,10 @@ type SurfaceEditingMode = 'edit' | 'suggest' | 'view';
|
|
|
1079
1080
|
* on a server, or leave it off in a browser to get the canvas measurer.
|
|
1080
1081
|
*/
|
|
1081
1082
|
interface PaginatedSurfaceOptions {
|
|
1083
|
+
/** UI labels for shared form controls; omitted keys fall back to English. */
|
|
1084
|
+
readonly translate?: (key: string, params?: Record<string, string | number>) => string;
|
|
1085
|
+
/** Regional conventions for new date input; defaults to en-US. */
|
|
1086
|
+
readonly locale?: string;
|
|
1082
1087
|
/**
|
|
1083
1088
|
* The collaboration module's replica for this surface's session. Absent,
|
|
1084
1089
|
* the surface does not attach, and local store history remains the undo
|
|
@@ -1126,6 +1131,9 @@ interface PaginatedSurfaceOptions {
|
|
|
1126
1131
|
* without remeasuring a single line.
|
|
1127
1132
|
*/
|
|
1128
1133
|
readonly fieldShading?: FieldShadingMode;
|
|
1134
|
+
/** Show paragraph-end furniture without changing document content. */
|
|
1135
|
+
readonly showParagraphMarks?: boolean;
|
|
1136
|
+
readonly onToggleParagraphMarks?: () => void;
|
|
1129
1137
|
/**
|
|
1130
1138
|
* How tracked changes are coloured: by AUTHOR (the default), by kind, or by author with
|
|
1131
1139
|
* host-pinned colours. A paint-level option like {@link fieldShading}: it changes no
|
|
@@ -1189,6 +1197,7 @@ interface PaginatedSurfaceOptions {
|
|
|
1189
1197
|
readonly title: string;
|
|
1190
1198
|
};
|
|
1191
1199
|
}
|
|
1200
|
+
|
|
1192
1201
|
/**
|
|
1193
1202
|
* What the selection is currently formatted as.
|
|
1194
1203
|
*
|
|
@@ -1341,6 +1350,16 @@ interface PaginatedSurfaceState {
|
|
|
1341
1350
|
/** Timing and reuse counters for the last pass. Diagnostics, not document state. */
|
|
1342
1351
|
readonly perf: PaginatedSurfacePerf;
|
|
1343
1352
|
}
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* How an edit is written.
|
|
1356
|
+
*
|
|
1357
|
+
* `'suggest'` is the one that changes what the ops MEAN: the same keystroke becomes a `w:ins`
|
|
1358
|
+
* and the same Backspace becomes a `w:del` over the words it would have removed. `'view'`
|
|
1359
|
+
* refuses edits outright.
|
|
1360
|
+
*/
|
|
1361
|
+
type SurfaceEditingMode = 'edit' | 'suggest' | 'view';
|
|
1362
|
+
|
|
1344
1363
|
/**
|
|
1345
1364
|
* Where the section after an inserted break begins — Word's Layout > Breaks menu.
|
|
1346
1365
|
*
|
|
@@ -1519,6 +1538,13 @@ interface PaginatedSurface {
|
|
|
1519
1538
|
revealPosition(position: SemanticPosition, options?: RevealOptions): boolean;
|
|
1520
1539
|
/** Set the selection directly, for a host driving the surface programmatically. */
|
|
1521
1540
|
setSelection(next: SemanticSelection): void;
|
|
1541
|
+
/**
|
|
1542
|
+
* Select one painted drawing at its host paragraph, as a pointer press would.
|
|
1543
|
+
*
|
|
1544
|
+
* False when the layout paints no such drawing on that paragraph, in which case nothing
|
|
1545
|
+
* moves: the caller decides what to do rather than being left mid-way.
|
|
1546
|
+
*/
|
|
1547
|
+
selectDrawing(drawingNodeId: string, hostParagraphId: string): boolean;
|
|
1522
1548
|
/**
|
|
1523
1549
|
* Select a rectangle of table cells, or clear one with null.
|
|
1524
1550
|
*
|
|
@@ -1702,6 +1728,8 @@ interface PaginatedSurface {
|
|
|
1702
1728
|
/** Insert and populate a generated body TOC before the caret paragraph. */
|
|
1703
1729
|
insertToc(): boolean;
|
|
1704
1730
|
/** Refresh cached TOC entries and/or page numbers through the two-pass layout pipeline. */
|
|
1731
|
+
canEditTextFormField(): boolean;
|
|
1732
|
+
editTextFormField(): boolean;
|
|
1705
1733
|
refreshToc(tocId?: string, mode?: 'entire' | 'pageNumbers'): boolean;
|
|
1706
1734
|
/**
|
|
1707
1735
|
* Rewrite stale REF field results in the body, footnote and endnote stories so a save
|
|
@@ -1712,6 +1740,13 @@ interface PaginatedSurface {
|
|
|
1712
1740
|
* the call returns false.
|
|
1713
1741
|
*/
|
|
1714
1742
|
refreshRefFieldResults(): boolean;
|
|
1743
|
+
/**
|
|
1744
|
+
* Commit pending form input, refresh REF results, and serialize the document.
|
|
1745
|
+
* Throws an error with code `invalidArgs` for invalid form values, or `invalidState`
|
|
1746
|
+
* during an active edit. Retry after the edit finishes. A destroyed surface throws
|
|
1747
|
+
* with code `destroyed`. Does not change focus.
|
|
1748
|
+
*/
|
|
1749
|
+
save(): Uint8Array;
|
|
1715
1750
|
/** Whether a body paragraph belongs to a detected TOC boundary or cached result. */
|
|
1716
1751
|
isInsideToc(paragraphId: string): boolean;
|
|
1717
1752
|
/**
|
|
@@ -1750,6 +1785,10 @@ interface PaginatedSurface {
|
|
|
1750
1785
|
setAuthor(author: string | undefined): void;
|
|
1751
1786
|
/** Replace localized drawing labels and repaint materialized pages. */
|
|
1752
1787
|
setDrawingStrings(strings: DrawingPaintStrings): void;
|
|
1788
|
+
/** Update shared form-control labels without replacing open dialogs. */
|
|
1789
|
+
setTranslate(translate: PaginatedSurfaceOptions['translate']): void;
|
|
1790
|
+
/** Set regional conventions for subsequent date input without reformatting stored values. */
|
|
1791
|
+
setLocale(locale: string | undefined): void;
|
|
1753
1792
|
/** Replace the localized title used by later TOC insertions. */
|
|
1754
1793
|
setTocLabels(labels: NonNullable<PaginatedSurfaceOptions['tocLabels']>): void;
|
|
1755
1794
|
/**
|
|
@@ -1775,6 +1814,8 @@ interface PaginatedSurface {
|
|
|
1775
1814
|
* remeasuring a line, and the caret, selection and undo history stay where they are.
|
|
1776
1815
|
*/
|
|
1777
1816
|
setRevisionStyles(colors: RevisionStyles | undefined): void;
|
|
1817
|
+
/** Toggle paragraph-end furniture without layout or document changes. */
|
|
1818
|
+
setShowParagraphMarks(show: boolean): void;
|
|
1778
1819
|
/**
|
|
1779
1820
|
* Hand remote-caret label content to the host, or take it back with `null`.
|
|
1780
1821
|
*
|
|
@@ -1815,6 +1856,18 @@ interface PaginatedSurface {
|
|
|
1815
1856
|
* would mean another to a script that assumed the resolved result.
|
|
1816
1857
|
*/
|
|
1817
1858
|
revisionDisplayMode(): RevisionDisplayMode;
|
|
1859
|
+
/** Change the review display without accepting, rejecting, or changing author filters. */
|
|
1860
|
+
setRevisionDisplayMode(mode: RevisionDisplayMode): void;
|
|
1861
|
+
/**
|
|
1862
|
+
* Where a replacement for `[start, end)` of a paragraph lands, or null when the edit would
|
|
1863
|
+
* not be tracked.
|
|
1864
|
+
*
|
|
1865
|
+
* Non-null exactly when suggesting: the struck words stay, so the replacement goes past
|
|
1866
|
+
* them, minus whatever of the range was this author's own pending insertion, which leaves.
|
|
1867
|
+
* The SAME rule every replacing lane of the keyboard reads, exposed so the automation object
|
|
1868
|
+
* model aims a scripted `Replace` where typing does and can answer the span it wrote.
|
|
1869
|
+
*/
|
|
1870
|
+
replacementLanding(paragraphId: string, start: number, end: number): number | null;
|
|
1818
1871
|
/**
|
|
1819
1872
|
* Commit review ops — accept, reject, a new comment — through the SAME path a keystroke
|
|
1820
1873
|
* takes: layout, paint, and a caret clamped to what the document now holds.
|
|
@@ -1887,7 +1940,9 @@ interface PaginatedSurface {
|
|
|
1887
1940
|
* evidence, so a host saw the wrong twin active for one frame and then a correction. Omit it
|
|
1888
1941
|
* to pin against the live selection, which is what a header or note scope has already set.
|
|
1889
1942
|
*/
|
|
1890
|
-
activateReview(key: string, selection?: SemanticSelection
|
|
1943
|
+
activateReview(key: string, selection?: SemanticSelection, options?: {
|
|
1944
|
+
readonly allowExcluded?: boolean;
|
|
1945
|
+
}): void;
|
|
1891
1946
|
/**
|
|
1892
1947
|
* The key {@link activateReview} pinned, or null once its selection is no longer live.
|
|
1893
1948
|
*
|
|
@@ -2536,6 +2591,78 @@ declare const CHROME_GROUPS: readonly [{
|
|
|
2536
2591
|
readonly id: "review";
|
|
2537
2592
|
readonly labelKey: "formattingBar.commentsAndChanges";
|
|
2538
2593
|
readonly controls: readonly [{
|
|
2594
|
+
readonly id: "allMarkup";
|
|
2595
|
+
readonly shape: "icon";
|
|
2596
|
+
readonly labelKey: "review.allMarkup";
|
|
2597
|
+
readonly defaultToolbar: false;
|
|
2598
|
+
readonly paths: readonly string[];
|
|
2599
|
+
readonly state: {
|
|
2600
|
+
readonly kind: "command";
|
|
2601
|
+
};
|
|
2602
|
+
}, {
|
|
2603
|
+
readonly id: "noMarkup";
|
|
2604
|
+
readonly shape: "icon";
|
|
2605
|
+
readonly labelKey: "review.noMarkup";
|
|
2606
|
+
readonly defaultToolbar: false;
|
|
2607
|
+
readonly paths: readonly string[];
|
|
2608
|
+
readonly state: {
|
|
2609
|
+
readonly kind: "command";
|
|
2610
|
+
};
|
|
2611
|
+
}, {
|
|
2612
|
+
readonly id: "original";
|
|
2613
|
+
readonly shape: "icon";
|
|
2614
|
+
readonly labelKey: "review.original";
|
|
2615
|
+
readonly defaultToolbar: false;
|
|
2616
|
+
readonly paths: readonly string[];
|
|
2617
|
+
readonly state: {
|
|
2618
|
+
readonly kind: "command";
|
|
2619
|
+
};
|
|
2620
|
+
}, {
|
|
2621
|
+
readonly id: "previousChange";
|
|
2622
|
+
readonly shape: "icon";
|
|
2623
|
+
readonly labelKey: "review.previousChange";
|
|
2624
|
+
readonly defaultToolbar: false;
|
|
2625
|
+
readonly paths: readonly string[];
|
|
2626
|
+
readonly state: {
|
|
2627
|
+
readonly kind: "command";
|
|
2628
|
+
};
|
|
2629
|
+
}, {
|
|
2630
|
+
readonly id: "nextChange";
|
|
2631
|
+
readonly shape: "icon";
|
|
2632
|
+
readonly labelKey: "review.nextChange";
|
|
2633
|
+
readonly defaultToolbar: false;
|
|
2634
|
+
readonly paths: readonly string[];
|
|
2635
|
+
readonly state: {
|
|
2636
|
+
readonly kind: "command";
|
|
2637
|
+
};
|
|
2638
|
+
}, {
|
|
2639
|
+
readonly id: "acceptAllChanges";
|
|
2640
|
+
readonly shape: "icon";
|
|
2641
|
+
readonly labelKey: "review.acceptAllChanges";
|
|
2642
|
+
readonly defaultToolbar: false;
|
|
2643
|
+
readonly paths: readonly string[];
|
|
2644
|
+
readonly state: {
|
|
2645
|
+
readonly kind: "command";
|
|
2646
|
+
};
|
|
2647
|
+
}, {
|
|
2648
|
+
readonly id: "rejectAllChanges";
|
|
2649
|
+
readonly shape: "icon";
|
|
2650
|
+
readonly labelKey: "review.rejectAllChanges";
|
|
2651
|
+
readonly defaultToolbar: false;
|
|
2652
|
+
readonly paths: readonly string[];
|
|
2653
|
+
readonly state: {
|
|
2654
|
+
readonly kind: "command";
|
|
2655
|
+
};
|
|
2656
|
+
}, {
|
|
2657
|
+
readonly id: "paragraphMarks";
|
|
2658
|
+
readonly shape: "icon";
|
|
2659
|
+
readonly labelKey: "formattingBar.paragraphMarks";
|
|
2660
|
+
readonly defaultToolbar: false;
|
|
2661
|
+
readonly paths: readonly string[];
|
|
2662
|
+
readonly state: {
|
|
2663
|
+
readonly kind: "command";
|
|
2664
|
+
};
|
|
2665
|
+
}, {
|
|
2539
2666
|
readonly id: "comments";
|
|
2540
2667
|
readonly shape: "icon";
|
|
2541
2668
|
readonly labelKey: "formattingBar.commentsAndChanges";
|
|
@@ -2814,7 +2941,7 @@ type ChromeGroupId = 'history' | 'zoom' | 'styles' | 'font' | 'text' | 'script'
|
|
|
2814
2941
|
*
|
|
2815
2942
|
* @public
|
|
2816
2943
|
*/
|
|
2817
|
-
type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.comments' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc';
|
|
2944
|
+
type ChromeSlotId = 'history.undo' | 'history.redo' | 'zoom.level' | 'styles.style' | 'font.family' | 'font.size' | 'text.bold' | 'text.italic' | 'text.underline' | 'text.strike' | 'text.color' | 'text.highlight' | 'text.link' | 'script.super' | 'script.sub' | 'alignment.left' | 'alignment.center' | 'alignment.right' | 'alignment.justify' | 'list.bullet' | 'list.numbered' | 'list.outdent' | 'list.indent' | 'list.lineSpacing' | 'format.painter' | 'format.clear' | 'review.comments' | 'review.paragraphMarks' | 'review.allMarkup' | 'review.noMarkup' | 'review.original' | 'review.previousChange' | 'review.nextChange' | 'review.acceptAllChanges' | 'review.rejectAllChanges' | 'review.authors' | 'review.editingMode' | 'contentControl.showAll' | 'contentControl.formFill' | 'contentControl.inspector' | 'contentControl.remove' | 'image.insert' | 'image.properties' | 'image.wrap' | 'image.altText' | 'table.insert' | 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill' | 'file.open' | 'file.save' | 'paragraph.dialog' | 'file.pageSetup' | 'insert.footnote' | 'insert.endnote' | 'insert.pageNumber' | 'insert.totalPages' | 'insert.sectionPages' | 'insert.pageXofY' | 'insert.pageBreak' | 'insert.sectionBreakNextPage' | 'insert.sectionBreakContinuous' | 'insert.toc';
|
|
2818
2945
|
/**
|
|
2819
2946
|
* Every control id in the chrome, as a literal union. Unique WITHIN a group, not
|
|
2820
2947
|
* globally (`image.insert` / `table.insert`) — key consumers on {@link ChromeSlotId}.
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkDD7ETSGW_cjs=require('./chunk-DD7ETSGW.cjs');require('./chunk-ZKWRCLT2.cjs'),require('./chunk-B2HDVIGY.cjs');var chunkG5GLQ4SX_cjs=require('./chunk-G5GLQ4SX.cjs');require('./chunk-JROG4U3Z.cjs'),require('./chunk-TDMGSCCL.cjs'),require('./chunk-OISZDVXT.cjs'),require('./chunk-PRNYSOQL.cjs'),require('./chunk-FGBADUSK.cjs'),require('./chunk-NPZX5O23.cjs'),require('./chunk-NO7U62I2.cjs'),require('./chunk-JP253KIZ.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-UIB2MDE3.cjs'),require('./chunk-ZFBNCHRP.cjs'),require('./chunk-OHJQ7GPZ.cjs');Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ua}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ya}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.d}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.za}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ha}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.ja}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.La}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.i}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.h}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.pa}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkDD7ETSGW_cjs.la}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.g}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.f}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.c}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.d}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.j}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.h}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkG5GLQ4SX_cjs.i}});
|