@docx-editor.dev/core 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +2 -2
- package/dist/automation.d.ts +2 -2
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +7 -7
- package/dist/binding.d.ts +7 -7
- package/dist/binding.js +1 -1
- package/dist/{chunk-G5D7EXZD.js → chunk-33F6TRXO.js} +1 -1
- package/dist/{chunk-LD4YWMBO.cjs → chunk-DQ5HGUWG.cjs} +7 -7
- package/dist/chunk-EQO762XH.cjs +10 -0
- package/dist/{chunk-XIKXGERI.js → chunk-F6WNPYOM.js} +1 -1
- package/dist/chunk-FL4GWK76.js +12 -0
- package/dist/chunk-GOEBQ26R.js +1 -0
- package/dist/{chunk-J6743NQP.cjs → chunk-GWG5IVVX.cjs} +5 -5
- package/dist/{chunk-G7Y6EPB2.cjs → chunk-IZIL6BAW.cjs} +5 -5
- package/dist/{chunk-AMLGAD5Q.js → chunk-LIJPSHRA.js} +5 -5
- package/dist/{chunk-UKI45YR7.cjs → chunk-MHDO6HLI.cjs} +1 -1
- package/dist/chunk-OHJQ7GPZ.cjs +1 -0
- package/dist/{chunk-LKWSYFJQ.js → chunk-SG7OH2EK.js} +1 -1
- package/dist/chunk-TCX3PVWR.js +10 -0
- package/dist/chunk-YMIMLEX4.cjs +1 -0
- package/dist/{chunk-TDYP32AL.cjs → chunk-YTYKNA6X.cjs} +1 -1
- package/dist/chunk-ZACHY6OS.js +1 -0
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.d.cts +3 -3
- package/dist/contracts/modules.d.ts +3 -3
- package/dist/{custom-node-writes-ttKuYd0M.d.ts → custom-node-writes-BkMgMXxs.d.ts} +3 -3
- package/dist/{custom-node-writes-YqISlSRl.d.cts → custom-node-writes-C5YRoPcc.d.cts} +3 -3
- package/dist/{editor-BajbOumY.d.ts → editor-D1qHfzOt.d.ts} +12 -4
- package/dist/{editor-BXstgYTp.d.cts → editor-DYvC9CZs.d.cts} +12 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.cts +19 -19
- package/dist/editor.d.ts +19 -19
- package/dist/editor.js +1 -1
- package/dist/{image-resources-C_YnqPhn.d.ts → image-resources-BG9DLyW7.d.ts} +1 -1
- package/dist/{image-resources-DwpNnTg3.d.cts → image-resources-DXvPZvXD.d.cts} +1 -1
- package/dist/{index-D67PwDZQ.d.cts → index-Bb-QAg_f.d.cts} +11 -11
- package/dist/{index-DaJ8nU56.d.ts → index-DpY3WZuP.d.ts} +11 -11
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +14 -14
- package/dist/layout.d.ts +14 -14
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +4 -4
- package/dist/output.d.ts +4 -4
- package/dist/output.js +1 -1
- package/dist/{protocol-DAs0YOP3.d.cts → protocol-CD7slqvl.d.cts} +24 -4
- package/dist/{protocol-r6hje8Kf.d.ts → protocol-DsbfgBwA.d.ts} +24 -4
- package/dist/{review-reads-cgvJLJc2.d.ts → review-reads-CQmU9Lcl.d.ts} +1 -1
- package/dist/{review-reads-JBOmRH--.d.cts → review-reads-CxgN62yp.d.cts} +1 -1
- package/dist/{review-support-rsyGP5-9.d.cts → review-support-BJ-YjGmD.d.cts} +1 -1
- package/dist/{review-support-B9ykYpoZ.d.ts → review-support-DgXTIYBW.d.ts} +1 -1
- package/dist/{semantic-cell-selection-9vfCLkd4.d.cts → semantic-cell-selection--ezfezTe.d.cts} +2 -2
- package/dist/{semantic-cell-selection-bA5HTLkV.d.ts → semantic-cell-selection-DZtyMXkH.d.ts} +2 -2
- package/dist/{semantic-interaction-BG0jWJ0I.d.cts → semantic-interaction-2yxdv7q0.d.cts} +1 -1
- package/dist/{semantic-interaction-lHDX4yIt.d.ts → semantic-interaction-DrgbgKg6.d.ts} +1 -1
- package/dist/{semantic-paint-DdGGra4m.d.cts → semantic-paint-BYjE0Xbl.d.cts} +2 -2
- package/dist/{semantic-paint-BBNaqr1s.d.ts → semantic-paint-BedBxkyY.d.ts} +2 -2
- package/dist/{semantic-records-BC4bIKKL.d.ts → semantic-records-CR5hTqMK.d.ts} +2 -2
- package/dist/{semantic-records-DC6V1U3T.d.cts → semantic-records-DSD8WENa.d.cts} +2 -2
- package/dist/{shaped-measurer-ChSWkuAT.d.ts → shaped-measurer-BL8g4AcW.d.ts} +1 -1
- package/dist/{shaped-measurer-SIqZp-Ty.d.cts → shaped-measurer-CBOTJTV_.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +30 -31
- package/dist/store.d.ts +30 -31
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-DWLCllG7.d.ts → tree-op-types-8a6xyRCN.d.ts} +6 -1
- package/dist/{tree-op-types-UOXlRUqQ.d.cts → tree-op-types-EZXbR8bW.d.cts} +6 -1
- package/dist/{tree-session-ZpXtFxlP.d.cts → tree-session-DrMm8Cj2.d.cts} +5 -5
- package/dist/{tree-session-COduYhKr.d.ts → tree-session-SucW0znF.d.ts} +5 -5
- package/dist/{tree-store-BscFPB7x.d.ts → tree-store-BoM6eXaL.d.ts} +1 -1
- package/dist/{tree-store-B1lEkdXc.d.cts → tree-store-UYrGKF_Q.d.cts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-2H6LCX4H.js +0 -10
- package/dist/chunk-5LFOW7UO.cjs +0 -1
- package/dist/chunk-GRGRIDHF.js +0 -1
- package/dist/chunk-JQSVJSR7.js +0 -12
- package/dist/chunk-MIUELYVA.cjs +0 -1
- package/dist/chunk-QONAJ66B.cjs +0 -10
- package/dist/chunk-YTRVI333.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {y}from'./chunk-G5D7EXZD.js';import {D,td as td$1,j,g,h,f,la as la$1,ad as ad$1,rd as rd$1,hd as hd$1,id as id$1,fd as fd$1,nd as nd$1,od as od$1,kd as kd$1,pd as pd$1,R,ie,Ob as Ob$1,Wb as Wb$1,qb as qb$1,gb as gb$1,eb as eb$1,wc,sa as sa$1,vd as vd$1,md as md$1,ld as ld$1,jd as jd$1,wd as wd$1,gd as gd$1,cb as cb$1,pe,ne,se,oe,Ea as Ea$1,wa,Kb as Kb$1,Jb as Jb$1,Nb as Nb$1,_a as _a$1,db as db$1,Mb as Mb$1,gc,ic,Vd as Vd$1,be,le,Za as Za$1,Xa as Xa$1,$a as $a$1,cc,ac,m,fc,nc,Va as Va$1,ab as ab$1,ec,Ua as Ua$1,mc,qa as qa$1,Xb as Xb$1,Zb as Zb$1,lc,fb as fb$1}from'./chunk-2H6LCX4H.js';var Gn=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},Ia=(e,n)=>{if(e.trim().length===0||/[\u0000-\u001f\u007f]/.test(e))throw new TypeError(`${n} must be non-blank and contain no control characters`)},Fm=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},Xc=(e,n,t)=>{let r=Object.entries(e).sort(([a],[i])=>a<i?-1:a>i?1:0),o=Object.create(null);for(let[a,i]of r){if(Fm(a,`${n} key`),!Number.isFinite(i)||t&&(!Number.isSafeInteger(i)||i<0))throw new RangeError(`${n} value must be ${t?"a non-negative safe integer":"finite"}`);if(t&&i>4294967295)throw new RangeError(`${n} value must fit an unsigned 32-bit integer`);o[a]=i;}return Object.freeze(o)},kl=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),Am=e=>e?Object.freeze({requested:kl(e.requested),resolved:kl(e.resolved)}):void 0,Vc=new WeakSet,El=e=>{if(h(e),!Vc.has(e)){if(e.identity!==`${e.hash}#${e.faceIndex}`)throw new TypeError("Resolved font identity does not match hash and face index");if(!Number.isSafeInteger(e.byteLength)||e.byteLength<0)throw new TypeError("Resolved font byte length is invalid");Vc.add(e);}},Ll=e=>(El(e),e),va=e=>(El(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:kl(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:Am(e.substitution)??null})),Kt=e=>{if(Ia(e.shapingLibrary.name,"shaping library name"),Ia(e.shapingLibrary.version,"shaping library version"),Ia(e.unicodeDataVersion,"Unicode data version"),!/^\d+(?:\.\d+){0,3}(?:[-+][0-9A-Za-z.-]+)?$/.test(e.shapingLibrary.version))throw new TypeError("shaping library version must be a numeric version");if(!/^\d+(?:\.\d+){1,2}$/.test(e.unicodeDataVersion))throw new TypeError("Unicode data version must be a dotted numeric version");if(!/^[A-Z][a-z]{3}$/.test(e.script))throw new TypeError("script must be a four-letter ISO 15924 code");if(Ia(e.language,"language"),!/^(?:und|[A-Za-z]{2,8})(?:-[A-Za-z0-9]{1,8})*$/.test(e.language))throw new TypeError("language must be a BCP 47 language tag");if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("direction must be ltr or rtl");if(!["none","NFC","NFD","NFKC","NFKD"].includes(e.normalization))throw new TypeError("invalid normalization policy");if(!["halfAwayFromZero","halfToEven","towardZero"].includes(e.roundingMode))throw new TypeError("invalid fixed-point rounding mode");if(!Number.isSafeInteger(e.fixedPointScale)||e.fixedPointScale<=0)throw new RangeError("fixed-point scale must be a positive safe integer");let n=Ll(e.font),t=e.fallbackOrder.map(Ll),r=new Set;for(let o of t){let a=JSON.stringify(va(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:Xc(e.variationAxes,"variation axis",false),shapingLibrary:Object.freeze({name:e.shapingLibrary.name,version:e.shapingLibrary.version}),unicodeDataVersion:e.unicodeDataVersion,normalization:e.normalization,script:e.script,language:e.language,direction:e.direction,features:Xc(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Kc=e=>{let n=Kt(e);return Object.freeze({font:va(n.font),variationAxes:Object.freeze(Object.entries(n.variationAxes).map(t=>Object.freeze(t))),shapingLibrary:Object.freeze({name:n.shapingLibrary.name,version:n.shapingLibrary.version}),unicodeDataVersion:n.unicodeDataVersion,normalization:n.normalization,script:n.script,language:n.language,direction:n.direction,features:Object.freeze(Object.entries(n.features).map(t=>Object.freeze(t))),fallbackOrder:Object.freeze(n.fallbackOrder.map(va)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},Ml=e=>JSON.stringify(Kc(e)),Yt=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},En=e=>{try{return Gn(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Yc=new WeakMap,Ta=e=>{let n=Yc.get(e);if(n)return n;El(e);let t=JSON.stringify({identity:e.identity,id:e.id,family:e.family,request:e.request,hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:e.substitution??null});return Yc.set(e,t),t},Ba=(e,n)=>{let t=Kt(n);if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("Shaped run direction must be ltr or rtl");if(e.direction!==t.direction)throw new TypeError("Shaped run direction does not match shaping environment");if(Yt(e.bidiLevel,"bidi level"),(e.bidiLevel&1)===1!=(e.direction==="rtl"))throw new TypeError("Shaped run direction does not match bidi level parity");let r=new Map,o=e.glyphs.map(s=>{Yt(s.id,"glyph id"),Yt(s.cluster,"glyph cluster");let d=r.get(s.outline);if(!d){if(!Number.isSafeInteger(s.outline.unitsPerEm)||s.outline.unitsPerEm<=0)throw new RangeError("Glyph outline units per em must be a positive safe integer");d=Object.isFrozen(s.outline)?s.outline:Object.freeze({path:s.outline.path,unitsPerEm:s.outline.unitsPerEm}),r.set(s.outline,d);}return Object.freeze({id:s.id,cluster:s.cluster,originX:En(s.originX),originY:En(s.originY),advanceX:En(s.advanceX),advanceY:En(s.advanceY),offsetX:En(s.offsetX),offsetY:En(s.offsetY),outline:d})}),a=e.fontSpans.map(s=>{if(Yt(s.glyphStart,"font span start"),Yt(s.glyphEnd,"font span end"),s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Font span glyph range is invalid");s.fallbackIndex!==null&&Yt(s.fallbackIndex,"fallback index");let d=Ll(s.font);if(s.fallbackIndex===null){if(Ta(d)!==Ta(t.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=t.fallbackOrder[s.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(Ta(d)!==Ta(c))throw new TypeError("Shaped fallback font does not match shaping environment provenance")}return Object.freeze({...s,font:d})});for(let s=0;s<a.length;s+=1){let d=s===0?0:a[s-1].glyphEnd;if(a[s].glyphStart!==d)throw new RangeError("Font spans must cover glyphs contiguously")}if(o.length===0&&a.length!==0||o.length>0&&a.at(-1)?.glyphEnd!==o.length)throw new RangeError("Font spans must cover every glyph exactly once");let i=e.clusters.map(s=>{for(let[c,u]of [["cluster text start",s.textStart],["cluster text end",s.textEnd],["cluster glyph start",s.glyphStart],["cluster glyph end",s.glyphEnd],["cluster font span",s.fontSpan]])Yt(u,c);if(s.textEnd<=s.textStart||s.textEnd>e.text.length||s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Shaped cluster range is invalid");let d=a[s.fontSpan];if(!d||s.glyphStart<d.glyphStart||s.glyphEnd>d.glyphEnd)throw new RangeError("Shaped cluster does not belong to its declared font span");return Object.freeze({...s,advance:En(s.advance),caretEdges:Object.freeze(s.caretEdges.map(En))})}),l=Object.freeze({ascent:En(e.metrics.ascent),descent:En(e.metrics.descent),lineGap:En(e.metrics.lineGap)});return Object.freeze({text:e.text,direction:e.direction,bidiLevel:e.bidiLevel,glyphs:Object.freeze(o),clusters:Object.freeze(i),fontSpans:Object.freeze(a),metrics:l})},Dm=(e,n)=>{let t=Ba(e,n);return Object.freeze({text:t.text,direction:t.direction,script:n.script,language:n.language,bidiLevel:t.bidiLevel,glyphs:t.glyphs,clusters:t.clusters,fontSpans:Object.freeze(t.fontSpans.map(r=>Object.freeze({glyphStart:r.glyphStart,glyphEnd:r.glyphEnd,fallbackIndex:r.fallbackIndex,font:va(r.font)}))),metrics:t.metrics})};var ho=Object.freeze({name:"HarfBuzz",version:"14.2.1"}),yo=null,go=null;function _m(){return yo?Promise.resolve():go||(go=import('harfbuzzjs').then(e=>{let n=e.versionString();if(n!==ho.version)throw new He("shapingLibraryMismatch",{diagnostic:`expected ${ho.version}, loaded ${n}`});yo=e;}).catch(e=>{throw go=null,e}),go)}function zm(){return yo!==null}function Hm(){if(!yo)throw new He("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return yo}var He=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(n,t={}){super(`HarfBuzz shaping failed (${n})`),this.code=n,this.limit=t.limit,this.actual=t.actual,this.diagnostic=t.diagnostic;}},jm=16*1024*1024,Wm=1e6,Gm=1e6,$m=1e6,Xm=4,Vm=512,Ym=1024*1024,Km=16*1024*1024,Um=32*1024*1024,Zm=64*1024*1024,qm=64*1024*1024,Jm=1e6,Qm=1e6,eh=1e6,nh=64,th=4096,rh=4*1024*1024,oh=64*1024*1024,ah=64*1024*1024,ih=256*1024*1024,lh=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Uc=["cmap","head","hhea","hmtx","maxp"],sh=(e,n)=>e[n]<<8|e[n+1],dh=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,ch=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?dh(e,12+n*4):0,uh=(e,n)=>{let t=ch(e,n),r=sh(e,t+4),o=new Set;for(let a=0;a<r;a+=1){let i=t+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},fh=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),ph=(e,n)=>{let t=j(e,n);if(!t.valid)return t;let r=uh(e,n);for(let o of Uc)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},gh=ph,$n=(e,n,t)=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw new RangeError(`${n} must be a positive safe integer no greater than ${t}`);return e},mh=(e,n,t)=>{let r=e<0n,o=r?-e:e,a=o/n,i=o%n;if(t!=="towardZero"){let d=i*2n;(d>n||d===n&&(t==="halfAwayFromZero"||t==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let l=r?-a:a,s=Number(l);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Zc=(e,n,t,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(t)||t<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");return Gn(mh(BigInt(e)*BigInt(t),BigInt(n),r))},hh=(e,n,t,r)=>{if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("font size must be a positive integer number of half points");if(n>Math.floor(Number.MAX_SAFE_INTEGER/t))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=n*t,a=e*2;return i=>Zc(i,a,o,r)},yh=(e,n)=>{if(n.length===0)return [];let t=[...new Set(n.map(i=>i.cluster))].sort((i,l)=>i-l),r=new Map;for(let i=0;i<t.length;i+=1)r.set(t[i],t[i+1]??e.length);let o=[],a=0;for(;a<n.length;){let i=n[a].cluster,l=a+1;for(;l<n.length&&n[l].cluster===i;)l+=1;let s=n.slice(a,l).reduce((c,u)=>c+u.advanceX,0),d=Gn(s);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:l,advance:d,caretEdges:Object.freeze([Gn(0),d]),fontSpan:0}),a=l;}return o},Xn=64,lt=8,Ut=8,bh=32,qc=Xn+2*lt,xh=Xn+lt+Ut,Sh=Xn+lt+Ut,wh=Xn+lt+Ut,Jc=Xn+8*lt,Qc=Xn+8*Ut+lt,Rh=Xn+6*Ut+lt,Ph=Xn+3*Ut+2*lt,Ih=Xn+3*Ut,bo=e=>Xn+e.length*Uint16Array.BYTES_PER_ELEMENT,Fl=e=>wh+bo(e),mo=e=>bh+e*lt,Th=(e,n)=>qc+bo(e)+xh+Fl(n),vh=e=>Jc+bo(e)+mo(e.length)+e.length*Qc,Bh=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return Jc+bo(e.text)+mo(e.glyphs.length)+e.glyphs.length*Qc+mo(e.clusters.length)+e.clusters.length*Rh+e.clusters.reduce((t,r)=>t+mo(r.caretEdges.length),0)+mo(e.fontSpans.length)+e.fontSpans.length*Ph+Ih+[...n].reduce((t,r)=>t+Fl(r.path),0)},Oh=(e,n)=>qc+bo(e)+Sh+n,Nl=class{#n;#l;#u;#f;#p;#y;#b;#g;#m;#s;#h;#d;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#c;constructor(n,t){this.#n=n,this.#l=$n(t.maxFontBytes??jm,"maximum font bytes",qm),this.#u=$n(t.maxInputUtf16??Wm,"maximum input UTF-16 code units",Jm),this.#f=$n(t.maxCodepoints??Gm,"maximum input code points",Qm),this.#p=$n(t.maxGlyphs??$m,"maximum shaped glyphs",eh),this.#y=$n(t.maxCachedFaces??Xm,"maximum cached faces",nh),this.#b=$n(t.maxCachedShapes??Vm,"maximum cached shape results",th),this.#g=$n(t.maxOutlineBytes??Ym,"maximum outline bytes",rh),this.#m=$n(t.maxCachedOutlineBytes??Km,"maximum cached outline bytes",oh),this.#s=$n(t.maxShapedRunBytes??Um,"maximum shaped run bytes",ah),this.#h=$n(t.maxCachedShapeBytes??Zm,"maximum cached shape bytes",ih),this.#d=t.instrumentation?.onFaceCacheEvent,this.#e=t.instrumentation,this.#c=new this.#n.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#t.clear(),this.#i=0,this.#r=0,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#c=void 0;}#S(n,t){let r=this.#o.get(n.identity);if(r)return this.#o.delete(n.identity),this.#o.set(n.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:n.identity})),r;let o=g(n);for(let c of Uc)if(!o.has(c))throw new He("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(fh(t)),i=new this.#n.Face(a,n.faceIndex),l=new this.#n.Font(i),s=l.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new He("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(l.setScale(i.upem,i.upem),this.#o.size>=this.#y){let c=this.#o.keys().next().value;c!==void 0&&(this.#o.delete(c),this.#d?.(Object.freeze({kind:"evicted",identity:c})));}let d={identity:n.identity,blob:a,face:i,font:l,unitsPerEm:i.upem};return this.#o.set(n.identity,d),this.#d?.(Object.freeze({kind:"created",identity:n.identity})),d}#w(n,t,r){let o=JSON.stringify([n.identity,n.unitsPerEm,r,t]),a=this.#a.get(o);if(a)return this.#a.delete(o),this.#a.set(o,a),this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#i})),a.outline;this.#e?.onOutlinePathCall?.();let i=n.font.glyphToPath(t),l=Fl(i);if(l>this.#g)throw new He("outlineOverLimit",{limit:this.#g,actual:l});let s=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=Th(o,i);if(d>this.#m)return this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#i})),s;for(;this.#i+d>this.#m;){let c=this.#a.keys().next().value;if(c===void 0)break;let u=this.#a.get(c);this.#a.delete(c),this.#i-=u.bytes,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#i}));}return this.#a.set(o,{outline:s,bytes:d}),this.#i+=d,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),s}#x(n){if(n.length>this.#u)throw new He("textOverLimit",{limit:this.#u,actual:n.length});let t=0;for(let r=0;r<n.length;){let o=n.codePointAt(r);if(r+=o>65535?2:1,t+=1,t>this.#f)throw new He("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#c)throw new He("disposed");if(h(n.environment.font),n.environment.font.byteLength>this.#l)throw new He("fontOverLimit",{limit:this.#l,actual:n.environment.font.byteLength});this.#x(n.text);let t=vh(n.text);if(t>this.#s)throw new He("shapedRunOverLimit",{limit:this.#s,actual:t});let r=Kt(n.environment),o=JSON.stringify([n.text,n.fontSizeHalfPoints,n.bidiLevel,Ml(r)]),a=this.#t.get(o);if(a)return this.#t.delete(o),this.#t.set(o,a),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==ho.name||r.shapingLibrary.version!==ho.version)throw new He("shapingLibraryMismatch");if(r.normalization!=="none")throw new He("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new He("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new He("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new He("unsupportedFallback");let i=f(r.font),l=g(r.font);if([...lh].some(d=>l.has(d)))throw new He("unsupportedColorFont");let s=n.text;this.#x(s);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#c;f.reset(),f.addText(s),f.setDirection(r.direction==="rtl"?this.#n.Direction.RTL:this.#n.Direction.LTR),f.setScript(r.script),f.setLanguage(r.language),f.setClusterLevel(this.#n.ClusterLevel.MONOTONE_CHARACTERS);let p=Object.entries(r.features).map(([T,B])=>new this.#n.Feature(T,B));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let g=f.getGlyphInfosAndPositions();if(g.length>this.#p)throw new He("glyphOverLimit",{limit:this.#p,actual:g.length});let y=hh(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),h=Gn(0),b=Gn(0),x=new Map,v=JSON.stringify(Object.entries(r.variationAxes).sort(([T],[B])=>T.localeCompare(B))),w=g.map(T=>{let B=y(T.xAdvance??0),m=y(T.yAdvance??0),D={id:T.codepoint,cluster:T.cluster,originX:h,originY:b,advanceX:B,advanceY:m,offsetX:y(T.xOffset??0),offsetY:y(T.yOffset??0),outline:x.get(T.codepoint)??(()=>{let W=this.#w(d,T.codepoint,v);return x.set(T.codepoint,W),W})()};return h=Gn(h+B),b=Gn(b+m),D}),z=u.hExtents(),L=Ba({text:s,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:w,clusters:yh(s,w),fontSpans:w.length===0?[]:[{glyphStart:0,glyphEnd:w.length,font:r.font,fallbackIndex:null}],metrics:{ascent:y(z.ascender),descent:y(-z.descender),lineGap:y(z.lineGap)}},r),M=Bh(L);if(M>this.#s)throw new He("shapedRunOverLimit",{limit:this.#s,actual:M});let F=Oh(o,M);if(F>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),L;for(;this.#t.size>=this.#b||this.#r+F>this.#h;){let T=this.#t.keys().next().value;if(T===void 0)break;let B=this.#t.get(T);this.#t.delete(T),this.#r-=B.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:L,bytes:F}),this.#r+=F,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),L}catch(d){throw d instanceof He?d:new He("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},Ch=(e={})=>new Nl(Hm(),e);var Z=(e,n,t)=>e>=n&&e<=t,Oa=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},kh=e=>{if(Z(e,65313,65338)||Z(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(Z(e,1424,1535)||Z(e,64285,64335))return {slot:"cs",script:"Hebr"};if(Z(e,1536,1791)||Z(e,1872,1919)||Z(e,2160,2207)||Z(e,2208,2303)||Z(e,64336,65023)||Z(e,65136,65279)||Z(e,126464,126719))return {slot:"cs",script:"Arab"};if(Z(e,4352,4607)||Z(e,11904,12351)||Z(e,12352,12543)||Z(e,12544,12687)||Z(e,12784,12799)||Z(e,13312,19903)||Z(e,19968,40959)||Z(e,44032,55215)||Z(e,63744,64255)||Z(e,65382,65437)||Z(e,65440,65500)||Z(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(Z(e,2304,2431)||Z(e,43232,43263))return {slot:"cs",script:"Deva"};if(Z(e,2432,2559))return {slot:"cs",script:"Beng"};if(Z(e,880,1023)||Z(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(Z(e,1024,1327)||Z(e,7296,7311)||Z(e,11744,11775)||Z(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(Z(e,3584,3711))return {slot:"cs",script:"Thai"};if(Z(e,6016,6143)||Z(e,6624,6655))return {slot:"cs",script:"Khmr"};if(Z(e,768,879)||Z(e,6832,6911)||Z(e,7616,7679)||Z(e,8400,8447)||Z(e,8192,8303)||Z(e,65056,65071)||e<=47||Z(e,58,64)||Z(e,91,96)||Z(e,123,191)||e===5760||Z(e,8192,11263)||Z(e,65024,65039)||Z(e,65280,65381)||Z(e,65438,65439)||Z(e,65501,65535)||Z(e,126976,129791)||Z(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(Z(e,192,687)||Z(e,7424,7551)||Z(e,7552,7615)||Z(e,7680,7935)||Z(e,11360,11391)||Z(e,42784,43007)||Z(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Oa(e)};function Lh(e,n,t){let r=[];for(let l=0;l<e.length;){let s=e.codePointAt(l),d=l+(s>65535?2:1);r.push({from:l,to:d,classified:kh(s)}),l=d;}let o=null;for(let l of r)l.classified?o=l.classified:o&&(l.classified=o);o=null;for(let l=r.length-1;l>=0;l-=1){let s=r[l];s.classified?o=s.classified:o&&(s.classified=o);}let a=[],i=r.every(({from:l})=>e.codePointAt(l)<=127)?"ascii":"hAnsi";for(let l of r){let s=t.levels[n+l.from]??0,d=(s&1)===1?"rtl":"ltr",c=l.classified??{slot:i,script:"Zyyy"},u=a.at(-1);u&&u.to===l.from&&u.bidiLevel===s&&u.slot===c.slot&&u.script===c.script?a[a.length-1]={...u,to:l.to}:a.push({from:l.from,to:l.to,direction:d,bidiLevel:s,script:c.script,slot:c.slot});}return a}var Eh="und";function Mh(){return typeof Intl.Segmenter=="function"}function Nh(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function Fh(){let e=new(Nh())("und",{granularity:"grapheme"});return {segment(n){let t=[],r=0;for(let o of e.segment(n)){let a=o.index,i=a+o.segment.length;t.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return t}}}var _l=Fh(),zl=_l,eu=0;function Hl(){return eu}var vr=null,Zt=null,Ca=null,xo=null;function Mn(e){if(vr===e&&Zt)return Zt;if(Ca===e&&xo){let t=xo;return Ca=vr,xo=Zt,vr=e,Zt=t,t}let n=zl.segment(e);return Ca=vr,xo=Zt,vr=e,Zt=n,n}function Ah(e){zl=e,nu();}function Dh(){zl=_l,nu();}function nu(){eu+=1,vr=null,Zt=null,Ca=null,xo=null,Al=null,ka=null,Dl=0;}function _h(e){return Mn(e).length}var Al=null,ka=null,Dl=0;function zh(e){if(Al===e&&ka)return {offsets:ka,count:Dl};let n=Mn(e),t=new Int32Array(e.length+1);for(let r of n)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)t[o]=r.index;return t[e.length]=n.length,Al=e,ka=t,Dl=n.length,{offsets:t,count:n.length}}function La(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=zh(e);return r[t]}function Hh(e,n){let t=Mn(e);if(t.length===0)return 0;let r=Math.max(0,Math.min(n,t.length));return r>=t.length?e.length:t[r].utf16From}function jl(e){let n=new Set([0,e.text.length]);for(let r of Mn(e.text))n.add(r.utf16From),n.add(r.utf16To);let t=new Set([0,e.text.length]);for(let r of e.clusters)t.add(r.textStart),t.add(r.textEnd);return [...n].filter(r=>t.has(r)).sort((r,o)=>r-o)}function Ea(e,n){return jl(e).includes(n)}function jh(e,n){return Ea(e,n)}function Wh(e,n,t){return t>=n&&Ea(e,n)&&Ea(e,t)}function Gh(e){let n=Mn(e.text);return jl(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var Gl="und";function au(){return typeof Intl.Segmenter=="function"}function $h(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Gl})`);return e}function iu(){let e=new($h())(Gl,{granularity:"word"});return {segment(n){let t=[];for(let r of e.segment(n)){let o=r.index,a=o+r.segment.length;t.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return t}}}var Xh=/^[\p{L}\p{N}']$/u,Vh=/^\s$/u;function tu(e){return Xh.test(e)}function ru(e){return Vh.test(e)}function Wl(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function lu(e){let n=Mn(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(ru(o.text)){let a=r+1;for(;a<n.length&&ru(n[a].text);)a+=1;t.push(Wl(n,r,a,false)),r=a;continue}if(tu(o.text)){let a=r+1;for(;a<n.length&&tu(n[a].text);)a+=1;t.push(Wl(n,r,a,true)),r=a;continue}t.push(Wl(n,r,r+1,false)),r+=1;}return t}function su(){return {segment:lu}}function du(e={}){let n=e.isIntlAvailable??au,t=e.createIntlBoundary??iu,r=e.createFallbackBoundary??su;if(!n())return r();try{return t()}catch{return r()}}var ou;function cu(){return ou??=du(),ou}function Yh(e,n=cu()){return n.segment(e)}function Kh(e,n){return n.map(t=>({graphemeFrom:La(e,t.utf16From),graphemeTo:La(e,t.utf16To),wordLike:t.wordLike}))}var Ma=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},Br=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},Or=e=>(Ma(e.resourceEpoch,"resourceEpoch"),Ma(e.configEpoch,"configEpoch"),Ma(e.producerVersion,"producerVersion"),Br(e.extensionFingerprint,"extensionFingerprint"),Br(e.shapingHash,"shapingHash"),Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})),Uh=(e,n)=>{let t=Or(e),r=Or(n),a=["resourceEpoch","configEpoch","extensionFingerprint","shapingHash","producerVersion"].filter(i=>t[i]!==r[i]);return a.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(a)})},$l=e=>{let n=e.map(({key:t,fingerprint:r})=>(Br(t,"resource dependency key"),Br(r,"resource dependency fingerprint"),Object.freeze({key:t,fingerprint:r}))).sort((t,r)=>t.key<r.key?-1:t.key>r.key?1:0);for(let t=1;t<n.length;t+=1)if(n[t-1].key===n[t].key)throw new TypeError(`Duplicate resource dependency: ${n[t].key}`);return Object.freeze(n)},Zh=e=>(Ma(e.revision,"revision"),Br(e.dependencyFingerprint,"dependencyFingerprint"),Br(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:$l(e.resourceDependencies),...Or(e)})),qh=(e,n)=>{let t=$l(e),r=$l(n),o=Math.max(t.length,r.length);for(let a=0;a<o;a+=1){let i=t[a],l=r[a];if(i?.key!==l?.key||i?.fingerprint!==l?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??l.key}}return null};function Jh(e,n){if(e.dependencyFingerprint!==n.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==n.inputFingerprint)return {hit:false,reason:"input-changed"};let t=qh(e.resourceDependencies,n.resourceDependencies);if(t)return t;let r=["configEpoch","extensionFingerprint","shapingHash","producerVersion"];for(let o of r)if(e[o]!==n[o])return {hit:false,reason:"epoch-changed",epoch:o};return null}var Xl=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=Jh(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:Zh(r)});}evictEpoch(n){let t=Or(n),r=0;for(let[o,a]of this.entries){let i=a.provenance;(i.configEpoch!==t.configEpoch||i.extensionFingerprint!==t.extensionFingerprint||i.shapingHash!==t.shapingHash||i.producerVersion!==t.producerVersion)&&(this.entries.delete(o),r+=1);}return r}evictResources(n,t){let r=Or(n),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>t.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};var So=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});function Rn(e,n=false){return uu(e.fragments,n)}function uu(e,n=false){let t=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){t.push(a);continue}for(let i of a.rows)if(!(i.isHeaderRepeat&&!n))for(let l of i.cells)r(l.blocks);}};return r(e),t}function fu(e){let n=[];for(let t of e.pages)for(let r of Rn(t))n.push(...r.lines);return n}function Gw(e){return e.anchoredDrawings??[]}function Qh(e,n){let t=[];for(let r of e.pages)for(let o of Rn(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function ey(e,n,t){for(let r of fu(e))if(r.range.paragraphId===n&&t>=r.range.start&&t<=r.range.end)return r;return null}function Vl(e){return e.contentControls??[]}function Na(e){if(e.length===0)return null;let n=1/0,t=1/0,r=-1/0,o=-1/0;for(let a of e)n=Math.min(n,a.x),t=Math.min(t,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:n,y:t,width:r-n,height:o-t}}function Yl(e){let n=false,t=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(n=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(t=true);return n&&t?"sdtContentLocked":n?"contentLocked":t?"sdtLocked":"unlocked"}var pu=1,Fa=1;function Cr(e){let n=Math.max(e,1),t=3;if(n>=t){let i=n/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:n,insetPt:0}}let r=1,o=1,a=Math.max(n,t);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(n-a)/2}}var ny=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function ty(e){return ny.has(e)}function gu(e,n){return ty(e)?Cr(n).extentPt:n}function Zl(e){return e.some(n=>n.localName==="pageBreakBefore"&&n.attributes?.val!=="0"&&n.attributes?.val!=="false")}var hu=31680/20,Ro=12,yu=3168,bu=14,Lr=Object.freeze({rule:"auto",value:240}),ry=132,oy=1584,xu=["top","left","bottom","right","between","bar"],ay=Object.freeze({}),iy=/^[0-9A-Fa-f]{6}$/,ly=new Set(["nil","none"]);function Aa(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function Kl(e,n){return !Number.isFinite(e)||e<=0?0:e>n?n:e}function mu(e){let n=Aa(e,true);return n===null?0:Kl(n/20,hu)}function Ul(e){return e!=="0"&&e!=="false"&&e!=="off"}function sy(e){return e===void 0||e==="auto"?null:iy.test(e)?e.toUpperCase():null}function wo(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Vn(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function ql(e,n){let t=0,r=0,o=false,a=false;for(let i of e){if(i.localName!=="spacing")continue;let l=i.attributes?.before,s=i.attributes?.after;l!==void 0&&(t=mu(l)),s!==void 0&&(r=mu(s));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=Ul(d)),c!==void 0&&(a=Ul(c));}if(o||a){let i=n?.inList||n?.inTableCell?0:bu;o&&(t=i),a&&(r=i);}return {before:t,after:r}}function Jl(e){let n,t;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(n=i);let l=a.attributes?.line;if(l!==void 0){let s=Aa(l,true);s!==null&&(t=s);}}if(t===void 0)return Lr;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,ry)*240}:Lr}let o=t/20;return o>0?{rule:r,value:Math.min(o,oy)}:Lr}function Ql(e,n,t){let r=e.rule==="auto"?n*(e.value/240):e.rule==="exact"?e.value:Math.max(n,e.value),o=r-n;return o<0?{height:r,baseline:Math.max(0,Math.min(t,r))}:e.rule==="exact"?{height:r,baseline:t+o/2}:{height:r,baseline:t}}function es(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r===void 0||Ul(r);}return n}function kr(e){if(!e)return;let n=wo(e,"val");if(!n||ly.has(n))return;let t=Aa(wo(e,"sz")),r=t===null?.5:Kl(t/8,Ro)||.5,o=Aa(wo(e,"space")),a=o===null?0:Kl(o,yu),i=wo(e,"shadow"),l=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:sy(wo(e,"color")),widthPt:r,spacePt:a,...l?{shadow:true}:{}}}function Su(e){let n=kr(Vn(e,"top")),t=kr(Vn(e,"left")??Vn(e,"start")),r=kr(Vn(e,"bottom")),o=kr(Vn(e,"right")??Vn(e,"end")),a=kr(Vn(e,"between")),i=kr(Vn(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function st(e){if(!e||e.kind==="textValue")return {};let n=Vn(e,"pBdr");return n?Su(n):{}}function Po(e){let n=ay;for(let t of e){if(!t||t.kind==="textValue")continue;let r=Vn(t,"pBdr");r&&(n=Su(r));}return n}function fn(e){return gu(e.val,e.widthPt)}function Tt(e){return e?e.spacePt+fn(e):0}function dy(e){return Tt(e)}function ns(e){let n=[];for(let t of xu){let r=e[t];r&&n.push(`${t}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return n.join("|")}function Er(e,n){return Math.max(e,n)-n}function ts(e,n,t,r){return t&&!r?0:Er(e,n)}var cy=/^[0-9A-Fa-f]{6}$/;function Da(e){if(!(e===void 0||e==="auto"||e==="nil")&&cy.test(e))return e.toUpperCase()}function Io(e){if(e&&e.val!=="nil")return Da(e.fill)}function rs(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return Io(n)}function os(e){let n;for(let t of e)t.localName==="shd"&&(n=Io(t.attributes));return n}function To(e,n,t){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:n,y:r,width:t,height:Math.max(o.y+o.height-r,0)}}var uy=64,fy=31680,py=720,gy=36,as=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),Mr=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),my=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),hy=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function vo(e){return e.kind!=="textValue"}function _a(e,n){return e.attributes.find(t=>t.localName===n)?.value}function is(e,n){for(let t of e.children)if(vo(t)&&t.localName===n)return t}function wu(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function yy(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function Ru(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!vo(r)||r.localName!=="tab")continue;let o=yy(wu(_a(r,"pos"))??NaN);if(o===null)continue;let a=_a(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=my.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let l=_a(r,"leader");e.set(o,{alignment:i,...l!==void 0&&hy.has(l)?{leader:l}:{}});}}function Pu(e,n=36){let t=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<t.length&&o<64;o+=1){let[a,i]=t[o];r.push({positionPt:a/20,alignment:i.alignment,...by(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function by(e){return e.leader?{leader:e.leader}:{}}function ls(e){let n=new Map;for(let t of e)!t||!vo(t)||Ru(n,is(t,"tabs"));return Pu(n)}function ss(e){if(!e||!vo(e))return Mr;let n=new Map;return Ru(n,is(e,"tabs")),Pu(n)}function Bo(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function xy(e){if(!e||!vo(e))return 36;let n=is(e,"defaultTabStop");if(!n)return 36;let t=wu(_a(n,"val"));return t===null||t<=0||t>31680?36:t/20}function Nr(e,n,t){let r=Math.max(n,t);for(let i of e.stops)if(i.positionPt>n)return {positionPt:Math.min(i.positionPt,r),alignment:i.alignment,...i.leader?{leader:i.leader}:{}};let o=e.defaultIntervalPt>0?e.defaultIntervalPt:36,a=Math.ceil((n+1e-9)/o)*o;return a<=n&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function ds(e,n,t,r,o){let a=t;switch(e){case "center":a=t-r/2;break;case "right":a=t-r;break;case "decimal":a=t-o;break;default:a=t;}let i=a-n;return i>0?i:0}function qt(e){return `tabs(${e.stops.map(t=>`${t.alignment}@${Math.round(t.positionPt*1e3)}${t.leader?`/${t.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var Oo=256,cs=4,Iu=4096,vt=64,za=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),Sy=/\s*\\\*\s*MERGEFORMAT\s*$/i;function Tu(e){if(e.length>Oo)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>Oo?null:n.replace(Sy,"").trim()}function Fr(e){let n=Tu(e);return n==="PAGE"||n==="NUMPAGES"||n==="SECTIONPAGES"?n:null}function pn(e,n){return ec(e,n)}function Jt(e){return fc(e)}function us(){return {nodes:0,exhausted:false}}function dt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>Iu?(e.exhausted=true,false):true)}function ko(){return {nesting:0,instruction:"",instructionOverflow:false,nestingOverflow:false,phase:"idle"}}function Co(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="idle";}function Lo(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="instruction"),e.nesting+=1,e.nesting>cs&&(e.nestingOverflow=true);}function wy(e,n){if(!(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)){if(e.instruction.length+n.length>Oo){e.instructionOverflow=true,e.instruction="";return}e.instruction+=n;}}function Eo(e,n,t,r){if(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)return;if(r>vt){e.instructionOverflow=true,e.instruction="";return}let o=[],a=n.kind==="textValue"?[]:n.children??[];for(let i=a.length-1;i>=0;i-=1)o.push({node:a[i],depth:r+1});for(;o.length>0;){let i=o.pop();if(!dt(t)){e.instructionOverflow=true,e.instruction="";return}if(i.depth>vt){e.instructionOverflow=true,e.instruction="";return}if(i.node.kind==="textValue"){if(wy(e,i.node.value),e.instructionOverflow)return;continue}let l=i.node.children??[];for(let s=l.length-1;s>=0;s-=1)o.push({node:l[s],depth:i.depth+1});}}function Mo(e){return e.nesting!==1||e.phase!=="instruction"||(e.phase="result",e.instructionOverflow||e.nestingOverflow)?null:Fr(e.instruction)}function No(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&Co(e);}function Ha(e){return e.phase==="instruction"&&e.nesting>=1}function vu(e){return e.phase==="result"&&e.nesting>=1}function fs(e){let n=false,t=false,r=false,o=us(),a=ko(),i=()=>n&&t&&r,l=u=>{u==="PAGE"?n=true:u==="NUMPAGES"?t=true:r=true;},s=(u,f)=>{if(u.kind!=="runProperties"){if(pn(u,"begin")){Lo(a);return}if(Jt(u)){Eo(a,u,o,f);return}if(pn(u,"separate")){let p=Mo(a);p&&l(p);return}pn(u,"end")&&No(a);}},d=(u,f)=>{if(u.kind==="run")for(let p of u.children){if(!dt(o))return;if(s(p,f+1),(p.kind==="drawing"||p.kind==="generic")&&!Jt(p)&&"children"in p&&p.children.length>0){let g={...a};c(p,f+1),Object.assign(a,g);}if(i()||o.exhausted)return}},c=(u,f)=>{if(!i()&&dt(o)&&!(f>vt)&&u.kind!=="textValue"){if(u.kind==="paragraph"){Co(a);for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return;Co(a);return}if(u.kind==="run"){d(u,f);return}if(gc(u)){let p=Fr(ic(u)??"");if(p){l(p);return}}for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return}};return c(e,0),!n&&!t&&!r?za:{hasPage:n,hasNumPages:t,hasSectionPages:r}}var Ry=64,Py=64,Iy=[{value:1e3,glyph:"M"},{value:900,glyph:"CM"},{value:500,glyph:"D"},{value:400,glyph:"CD"},{value:100,glyph:"C"},{value:90,glyph:"XC"},{value:50,glyph:"L"},{value:40,glyph:"XL"},{value:10,glyph:"X"},{value:9,glyph:"IX"},{value:5,glyph:"V"},{value:4,glyph:"IV"},{value:1,glyph:"I"}];function ct(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function Bt(e){return String(ct(e))}function Bu(e){let n=ct(e);return n<10?`0${n}`:String(n)}function ps(e){let n=ct(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of Iy)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function Ou(e){return ps(e).toLowerCase()}function gs(e){let n=ct(e),t="";for(;n>0&&t.length<8;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t||"A"}function Cu(e){return gs(e).toLowerCase()}function Ty(e){let n=ct(e),t=n%100,r=n%10,o=t>=11&&t<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${n}${o}`}function vy(e){return ct(e).toString(16).toUpperCase()}function By(e){let n=["*","\u2020","\u2021","\xA7"],t=ct(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,Oy);return n[r].repeat(o)}var Oy=8,ja=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Cy=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Wa(e){let n=ct(e);if(n<20)return ja[n];if(n<100){let r=n%10;return Cy[Math.floor(n/10)]+(r===0?"":`-${ja[r]}`)}if(n<1e3){let r=n%100;return `${ja[Math.floor(n/100)]} hundred${r===0?"":` ${Wa(r)}`}`}let t=n%1e3;return `${ja[Math.floor(n/1e3)]} thousand${t===0?"":` ${Wa(t)}`}`}function ku(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function ky(e){return ku(Wa(e))}var Ly=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function Ey(e){let n=Ly.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function My(e){let n=Wa(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return ku(r+Ey(n.slice(t+1)))}function ut(e,n){switch(e){case "decimal":return Bt(n);case "decimalZero":return Bu(n);case "upperRoman":return ps(n);case "lowerRoman":return Ou(n);case "upperLetter":return gs(n);case "lowerLetter":return Cu(n);case "ordinal":return Ty(n);case "cardinalText":return ky(n);case "ordinalText":return My(n);case "hex":return vy(n);case "chicago":return By(n);case "numberInDash":return `- ${Bt(n)} -`;case "none":case "bullet":return "";default:return Bt(n)}}function ms(e,n,t){let r=e.length>64?e.slice(0,64):e,o="";for(let a=0;a<r.length&&!(o.length>=64);a+=1){let i=r[a];if(i==="%"&&a+1<r.length){let l=r[a+1];if(l>="1"&&l<="9"){let s=Number(l)-1,d=t[s]??"decimal",c=n[s]??1,u=d==="bullet"?"":ut(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}function hs(e,n){if(!Number.isFinite(e)||e<0)return "";let t=Math.floor(e),r=n&&n.length>0?n:"decimal";if(r==="none"||r==="bullet")return Bt(t);let o=ut(r,t);return o.length>0?o:Bt(t)}function Ar(e,n){if(e==="PAGE")return hs(n.pageNumber,n.format);let t=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;return !Number.isFinite(t)||t<0?"":Bt(Math.floor(t))}function Ot(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function ys(e,n=za){if(!e||!Ot(n))return "";let t=[];return n.hasPage&&(t.push(`p${e.pageNumber}`),e.format&&t.push(`f${e.format}`)),n.hasNumPages&&t.push(`n${e.pageCount}`),n.hasSectionPages&&t.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${t.join("/")}`}function Dr(e,n,t,r){let o=false,a=e.map((i,l)=>{let s=n+l,d=i.pageFieldSource;return d&&d.pageNumber===s&&d.sectionPageCount===t&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:s,sectionPageCount:t,...r?{format:r}:{}}})});return o?a:e}function Ct(e){let n=e.pages.length;if(n===0)return e;let t=false,r=e.pages.map(o=>{let a=o.pageFieldSource,i={pageNumber:a?.pageNumber??o.index+1,pageCount:n,sectionPageCount:a?.sectionPageCount??n,...a?.format?{format:a.format}:{}},l=c=>{if(!c?.pageFieldProjector)return c;t=true;let u=c.pageFieldProjector(i),{pageFieldProjector:f,...p}=u;return p},s=l(o.header),d=l(o.footer);return s===o.header&&d===o.footer?o:{...o,...s!==void 0?{header:s}:{},...d!==void 0?{footer:d}:{}}});return t?{revision:e.revision,pages:r}:e}var Yn=Object.freeze({fontFamily:null,fontSizePt:10,color:null,bold:false,italic:false,underline:null,strike:false,doubleStrike:false,highlight:null,shading:null,verticalAlign:"baseline",baselineShiftPt:0,caps:false,smallCaps:false,characterSpacingPt:0,horizontalScalePercent:100,kerningMinPt:0,hidden:false}),Ny=/^[0-9A-Fa-f]{6}$/;function kt(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function Fo(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function Lu(e){return e===void 0||e==="auto"?null:Ny.test(e)?e.toUpperCase():null}function Eu(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function dn(e,n){let t={...Yn};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?Eu(o?.asciiTheme,n)??Eu(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=Fo(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=Lu(r.attributes?.val);break}case "b":t.bold=kt(r);break;case "i":t.italic=kt(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!kt(r)?null:{variant:o,color:Lu(r.attributes?.color)};break}case "strike":t.strike=kt(r);break;case "dstrike":t.doubleStrike=kt(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=Io(r.attributes)??null;break}case "vertAlign":{let o=r.attributes?.val;o==="superscript"||o==="subscript"?t.verticalAlign=o:o==="baseline"&&(t.verticalAlign="baseline");break}case "position":{let o=Fo(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=kt(r);break;case "smallCaps":t.smallCaps=kt(r);break;case "spacing":{let o=Fo(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=Fo(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=Fo(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=kt(r);break;}return t}function Lt(e,n){return n.caps?e.toUpperCase():e}function Kn(e,n,t){return t.measure(Lt(e,n),n)}function Fy(e,n){return e.fontFamily===n.fontFamily&&e.fontSizePt===n.fontSizePt&&e.color===n.color&&e.bold===n.bold&&e.italic===n.italic&&e.strike===n.strike&&e.doubleStrike===n.doubleStrike&&e.highlight===n.highlight&&e.shading===n.shading&&e.verticalAlign===n.verticalAlign&&e.baselineShiftPt===n.baselineShiftPt&&e.caps===n.caps&&e.smallCaps===n.smallCaps&&e.characterSpacingPt===n.characterSpacingPt&&e.horizontalScalePercent===n.horizontalScalePercent&&e.kerningMinPt===n.kerningMinPt&&e.hidden===n.hidden&&e.underline?.variant===n.underline?.variant&&e.underline?.color===n.underline?.color}function bs(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var ft="all-markup",Mu=Object.freeze([]),Ay=32,Dy={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function _r(e,n){for(let t of e.attributes)if(t.localName===n&&t.namespaceUri===e.namespaceUri&&(t.kind==="wmlVal"||t.kind==="genericExtension"||t.kind==="xmlSpace"))return t.value}function Ga(e){if(e.kind==="textValue")return null;let n=Dy[e.kind];if(n===void 0)return null;let t=_r(e,"date");return {kind:n,id:_r(e,"id")??"",author:_r(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function $a(e,n){return e.length===0?[n]:[...e,n]}function Xa(e){return e.kind!=="textValue"&&qa$1(e.kind)}var zr=Ay;function Un(e,n){if(n==="all-markup"||e.length===0)return true;for(let t of e)if(n==="proposed"?t.kind==="delete"||t.kind==="moveFrom":t.kind==="insert"||t.kind==="moveTo")return false;return true}function xs(e){if(e.kind==="textValue")return null;let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n||n.kind==="textValue")return null;let t=n.children.find(r=>r.kind==="runProperties");if(!t||t.kind==="textValue")return null;for(let r of t.children){if(r.kind==="textValue"||r.namespaceUri!==la$1)continue;let o=r.localName==="ins"?"insert":r.localName==="del"?"delete":null;if(o===null)continue;let a=_r(r,"date");return {kind:o,id:_r(r,"id")??"",author:_r(r,"author")??"",...a===void 0?{}:{date:a},nodeId:r.id}}return null}function _y(e){for(let n of e){if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")continue;let t=n.attributes??{},r=t.date;return {kind:"format",id:t.id??"",author:t.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function pt(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}function zy(e){if(!e||e.kind==="textValue")return [];let n=[];for(let t of e.children){if(t.kind==="textValue")continue;let r={};for(let o of t.attributes)r[o.localName]=o.value;n.push(Object.keys(r).length>0?{localName:t.localName,attributes:r}:{localName:t.localName});}return n}function Hy(e,n,t){let r=zy(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}function jy(e){if(e.kind==="text"||e.kind==="deletedText"){let n="";for(let t of e.children)t.kind==="textValue"&&(n+=t.value);return n}return e.kind==="tab"?" ":e.kind==="hardBreak"?Zb$1(e):""}function Nu(e){let{simple:n,depth:t,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:l,cascadeRuns:s,themeFonts:d}=e,c="",u,f,p=ko(),g=null,y=false,h=false,b=false,x=(z,L)=>{u||(u=z,f=L);},v=()=>{!g||!r||h&&!b||(c+=Ar(g,r));},w=(z,L,M)=>{if(!(z.kind==="textValue"||L>vt)){for(let F of z.children)if(F.kind!=="textValue"){if(!dt(o))return;if(F.kind==="run"){let T=Hy(F,l,s),B=dn(T,d);for(let m of F.children){if(m.kind==="runProperties")continue;if(pn(m,"begin")){Lo(p),p.nesting===1&&(g=null,y=false,h=false,b=false);continue}if(Jt(m)){Ha(p)&&Eo(p,m,o,L+1);continue}if(pn(m,"separate")){let S=Mo(p);S&&r?(g=S,y=true,h=false,b=false):(g=null,y=false);continue}if(pn(m,"end")){p.nesting===1&&y&&v(),No(p),g=null,y=false,h=false,b=false;continue}if(lc(m))continue;let D=jy(m);if(D.length===0)continue;let W=pt(M),V=B.hidden||!Un(M,i)||m.kind==="deletedText"&&!W;if(y){h=true,V||(b=true,x(T,B));continue}V||(x(T,B),c+=D);}continue}if(gc(F)){let T=Fr(ic(F)??"");if(T&&r){if(!Un(M,i))continue;let B=c.length;w(F,L+1,M),c=c.slice(0,B),c+=Ar(T,r);continue}w(F,L+1,M);continue}if(F.kind==="hyperlink"){w(F,L+1,M);continue}if(Xa(F)&&M.length<zr){let T=Ga(F);w(F,L+1,T?$a(M,T):M);continue}w(F,L+1,M);}}};return w(n,t,a),y&&(g=null,y=false),{text:c,resultProps:u,resultStyle:f}}function Qt(e,n,t){if(t<=n)return;let r=e[e.length-1];if(r&&r.end>=n){r.end=Math.max(r.end,t);return}e.push({start:n,end:t});}var Wy=new Set(["left","center","right"]),Gy=new Set(["margin","indent","leftMargin"]),$y=new Set(["dot","hyphen","underscore","middleDot"]);function Fu(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==la$1)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===la$1&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:Wy.has(n)?n:"left",relativeTo:Gy.has(t)?t:"margin",...r!==void 0&&$y.has(r)?{leader:r}:{}}}Object.freeze({marks:Object.freeze(new Map)});function er(e,n){return ad$1(e,n)}function Ss(e,n){if(!rd$1(e))return null;if(hd$1(e)||id$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=fd$1(e),r=nd$1(e)??od$1(e);if(!r)return null;let o=kd$1(e),a=o!==null?er(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?Xy(a,r)??null:null,l=a,s=l!==void 0?t?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...s?{nav:s}:{},...l?{scopeId:l}:{}};if(t&&o!==null&&pd$1(e))return {text:"",...d};if(!n||!a)return {text:"",...d};let c=n.marks.get(a);return c==null?{text:"",...d}:n.reservedMarkText&&n.reservedMarkText.length>0?{text:c,measureText:n.reservedMarkText,...d}:{text:c,...d}}function Xy(e,n){let t=`${n}:`;if(!e.startsWith(t))return null;let r=e.slice(t.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function Au(e){return fd$1(e)||gd$1(e)||hd$1(e)||id$1(e)}function Vy(e,n,t){let r=Ao(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}function Ao(e){if(!e||e.kind==="textValue")return [];let n=[];for(let t of e.children){if(t.kind==="textValue")continue;let r={};for(let o of t.attributes)r[o.localName]=o.value;n.push(Object.keys(r).length>0?{localName:t.localName,attributes:r}:{localName:t.localName});}return n}function Du(e){if(e.kind==="text"||e.kind==="deletedText"){let n="";for(let t of e.children)t.kind==="textValue"&&(n+=t.value);return n}return e.kind==="tab"?" ":e.kind==="hardBreak"?Zb$1(e):""}function _u(e,n=[],t,r,o,a,i=ft,l,s,d){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let c=[],u=0,f,p=nc(e,{maxNesting:cs,maxInstructionChars:Oo}),g=p.filter(S=>S.addressing==="atomic"),y=new Set(g.filter(S=>S.kind==="complex").map(S=>S.node.id)),h=new Set(p.filter(S=>S.kind==="complex"&&S.addressing==="editable-result").map(S=>S.node.id)),b=new Set;for(let S of g)for(let I of S.removeNodeIds)b.add(I);let x=ko(),v=us(),w=null,z=null,L=Mu,M=(S,I,O,N,C,_,E)=>{if(S.length===0&&!N&&!E?.inlineDrawing)return;let X=E?.linkOverride??f,H=E?.revisionsOverride??L,K=X?{link:X}:{},G=H.length===0?{}:{revisions:H};if(N){c.push({text:S,props:I,style:O,start:C,end:_,projected:true,...E?.measureText!==void 0?{measureText:E.measureText}:{},...E?.noteNav?{noteNav:E.noteNav}:{},...E?.inlineDrawing?{inlineDrawing:E.inlineDrawing}:{},...E?.fieldAtom?{fieldAtom:E.fieldAtom}:{},...K,...G});return}S.length!==0&&c.push({text:S,props:I,style:O,start:C,end:_,...E?.positionalTab?{positionalTab:E.positionalTab}:{},...E?.breakKind?{breakKind:E.breakKind}:{},...K,...G});},F=()=>{if(!w||!w.atomic){w=null,z=null;return}let S=w.atomStart,I=S+1;if(w.style.hidden){w=null,z=null;return}if(!Un(w.resultRevisions,i)){l&&pt(w.resultRevisions)&&Qt(l,S,I),w=null,z=null;return}let O={...w.resultRevisions.length>0?{revisionsOverride:w.resultRevisions}:{},...w.resultLink?{linkOverride:w.resultLink}:{},fieldAtom:{formField:w.formField}};if(w.kind&&t){let N=Ar(w.kind,t);M(N,w.props,w.style,true,S,I,O);}else w.cachedText.length>0&&M(w.cachedText,w.props,w.style,true,S,I,O);w=null,z=null;},T=()=>{if(w){if(w.atomic){u=w.atomStart;for(let S of w.buffered)c.push({...S,start:u,end:u+(S.end-S.start)}),u+=S.end-S.start;w.cachedText.length>0&&w.buffered.length===0&&(M(w.cachedText,w.props,w.style,false,u,u+w.cachedText.length),u+=w.cachedText.length);}else {for(let S of w.buffered)c.push(S);u=w.bufferOffset;}w=null,z=null;}},B=(S,I,O)=>{let N=(H,K,G,U)=>{let se=pt(L),xe=O.hidden||!Un(L,i)||se;if(K.hidden||xe){if(se&&l&&Qt(l,G,U),!K.hidden)return;M("\uFFFC",I,O,true,G,U);return}M("\uFFFC",I,O,true,G,U,{inlineDrawing:Object.freeze({drawingNodeId:H,ownerPartName:s.ownerPartName,projection:K,resource:s.resourceOf(K)})});};if(S.kind==="drawing"){let H=u;u+=1;let K=u;if(!s)return;let G=s.projectionForAtom?.(S.id)??(S.kind==="drawing"?s.project(S):null);if(!G||G.kind!=="inline"){M("\uFFFC",I,O,true,H,K);return}N(S.id,G,H,K);return}if($a$1(S)){let H=u;u+=1;let K=u;if(!s)return;let G=s.projectionForAtom?.(S.id)??null;if(!G||G.kind!=="inline"){M("\uFFFC",I,O,true,H,K);return}N(S.id,G,H,K);return}if(Au(S)){let H=Ss(S,a),K=u,G=K+1;if(u=G,O.hidden||!H||H.text.length===0&&!H.measureText)return;let U=H.scopeId&&H.nav?{scopeId:H.scopeId,direction:H.nav}:void 0;M(H.text.length>0?H.text:H.measureText??"",I,O,true,K,G,{...H.measureText!==void 0?{measureText:H.measureText}:{},...U?{noteNav:U}:{}});return}let C=Fu(S);if(C){O.hidden||M(" ",I,O,false,u,u,{positionalTab:C});return}let _=Du(S);if(_.length===0)return;let E=pt(L);O.hidden||!Un(L,i)||S.kind==="deletedText"&&!E||M(_,I,O,false,u,u+_.length,{...S.kind==="hardBreak"?{breakKind:Xb$1(S)}:{}}),E&&l&&Qt(l,u,u+_.length),u+=_.length;},m=(S,I)=>{if(S.kind!=="run")return;let O=Vy(S,n,r),N=dn(O,d);for(let C of S.children){if(!dt(v)){if(T(),Co(x),C.kind==="runProperties"||pn(C,"begin")||pn(C,"separate")||pn(C,"end")||Jt(C)||b.has(C.id)&&z===null)continue;B(C,O,N);continue}if(C.kind!=="runProperties"){if(pn(C,"begin")){let _=y.has(C.id);Lo(x),x.nesting===1&&(T(),z=_?C.id:null,w={kind:null,atomic:_,editableResult:h.has(C.id),atomStart:u,props:O,style:N,capturedResultStyle:false,cachedText:"",buffered:[],bufferOffset:u,resultRevisions:L,capturedResultRevisions:L.length>0,formField:mc(C),...f?{resultLink:f}:{}},_&&(u+=1));continue}if(Jt(C)){Eo(x,C,v,I+1);continue}if(pn(C,"separate")){let _=x.nesting===1&&x.phase==="instruction",E=Mo(x);_&&w&&(w.kind=E&&t?E:null,w.props=O,w.style=N);continue}if(pn(C,"end")){let _=x.nesting===1;No(x),_&&(w?.atomic?F():T());continue}if(!(Ha(x)&&w?.atomic)){if(w&&vu(x)){let _=Du(C);if(_.length===0)continue;let E=pt(L),X=!Un(L,i)||C.kind==="deletedText"&&!E;if(E&&l&&(w.atomic?Qt(l,w.atomStart,w.atomStart+1):Qt(l,u,u+_.length)),X){w.atomic||(u+=_.length,w.bufferOffset=u);continue}if(w.atomic){if(N.hidden)continue;w.capturedResultStyle||(w.props=O,w.style=N,w.capturedResultStyle=true),w.capturedResultRevisions||(w.resultRevisions=L,w.capturedResultRevisions=true,!w.resultLink&&f&&(w.resultLink=f)),w.cachedText+=_;continue}if(N.hidden){u+=_.length,w.bufferOffset=u;continue}w.capturedResultStyle||(w.props=O,w.style=N,w.capturedResultStyle=true),w.buffered.push({text:_,props:O,style:N,start:u,end:u+_.length,...L.length>0?{revisions:L}:{},...f?{link:f}:{},...w.editableResult?{fieldAtom:{formField:w.formField}}:{}}),u+=_.length,w.bufferOffset=u;continue}b.has(C.id)&&z===null&&y.size>0,B(C,O,N);}}}};if(!dt(v))return c;let D=Va$1(),W=(S,I)=>{let O=u;if(u+=1,S.kind==="textValue"||(pt(L)&&l&&Qt(l,O,O+1),!Un(L,i)))return;let N=Nu({simple:S,depth:I,pageContext:t,budget:v,revisions:L,displayMode:i,inheritedRunProperties:n,cascadeRuns:r,themeFonts:d}),C=Fr(ic(S)??"");if(C&&t){let E=Ar(C,t),X=N.resultStyle??dn(n,d);X.hidden||M(E,N.resultProps??n,X,true,O,O+1,{fieldAtom:{formField:false}});return}if(N.text.length===0)return;let _=N.resultStyle??dn(n,d);_.hidden||M(N.text,N.resultProps??n,_,true,O,O+1,{fieldAtom:{formField:false}});},V=(S,I,O,N)=>{if(gc(S)){W(S,I);return}if(S.kind==="run"){m(S,I);return}if(Kb$1(S)){if(N>=Jb$1||I>vt)return;for(let X of Nb$1(S))V(X,I+1,O,N+1);return}if(I>vt||I>=zr)return;let C=S.kind!=="textValue"&&"localName"in S?Ua$1(O,S):O;if(S.kind==="hyperlink"){let X=f;f=o?.(S)??void 0;for(let H of S.children)V(H,I+1,C,N);f=X;return}if(!Xa(S))return;let _=Ga(S);if(!_||!dt(v))return;let E=L;L=$a(E,_);for(let X of S.children)V(X,I+1,C,N);L=E;};for(let S of e.children)V(S,1,D,0);return T(),c}function Yy(e){let n=Object.entries(e.attributes??{}).sort(([t],[r])=>t<r?-1:t>r?1:0).map(([t,r])=>`${t}=${r}`).join(",");return `${e.localName}(${n})`}function Ky(e){return e.map(Yy).join(";")}var zu=new WeakMap,ju=1<<18;function Wu(e){if(e.kind==="textValue")return `t:${e.value}`;let n=e.kind==="paragraph"||e.kind==="table";if(n){let r=zu.get(e);if(r!==void 0)return r}let t=Uy(e);return n&&t.length<=ju&&zu.set(e,t),t}function Uy(e){if(e.kind==="textValue")return `t:${e.value}`;let n=[`${e.kind}:${"localName"in e?e.localName:""}#${"id"in e?e.id:""}`];if("attributes"in e&&Array.isArray(e.attributes)){let t=[...e.attributes].map(r=>`${r.namespaceUri??""}:${r.localName}=${r.value}`).sort();for(let r of t)n.push(r);}for(let t of e.children??[])n.push(Wu(t));return `(${n.join("|")})`}var Hu=new WeakMap;function nr(e){let n=Math.round(e.width*1e3),t=e.drawingToken??"",r=e.exclusionToken??"",o=Ky(e.properties),a=Hu.get(e.paragraph);if(a&&a.producer===e.producer&&a.width===n&&a.drawingToken===t&&a.exclusionToken===r&&a.propertiesToken===o)return a.key;let i=[e.producer,n,t,r,o,Wu(e.paragraph)].join("\0");return i.length<=ju&&Hu.set(e.paragraph,{producer:e.producer,width:n,drawingToken:t,exclusionToken:r,propertiesToken:o,key:i}),i}function Zy(e={}){let n=Math.max(1,e.maxEntries??4096),t=new Map,r=0,o=0,a=0;return {get(i){let l=t.get(i);if(l===void 0){o+=1;return}return r+=1,t.delete(i),t.set(i,l),l},set(i,l){for(t.has(i)&&t.delete(i),t.set(i,l);t.size>n;){let s=t.keys().next();if(s.done)break;t.delete(s.value),a+=1;}},retain(i){for(let l of [...t.keys()])i.has(l)||(t.delete(l),a+=1);},clear(){t.clear();},get stats(){return {hits:r,misses:o,evictions:a,size:t.size}}}}var Gu=21600;function je(e){return Number.isFinite(e)?e:0}function Do(e){if(e.length===0)return Object.freeze([]);let n=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),t=[],r=n[0];for(let o=1;o<n.length;o+=1){let a=n[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(t.push(r),r=a);}return t.push(r),Object.freeze(t)}function qy(e,n){let t=[];for(let r of e)for(let o of n){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&t.push(Object.freeze({start:a,end:i}));}return Do(t)}function ws(e,n,t){let r=[];for(let o of e){let a=Math.max(o.start,n),i=Math.min(o.end,t);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return Do(r)}function Jy(e,n,t){let r=[],o=n;for(let a of e)a.start>o&&r.push(Object.freeze({start:o,end:a.start})),o=Math.max(o,a.end);return o<t&&r.push(Object.freeze({start:o,end:t})),Object.freeze(r)}function Xu(e,n){return Hr(e,n)}function Rs(e,n,t){return Xu(Hr(e,n),t)}function Qy(e,n){let t=[],r=Math.min(e.length,tn);if(r<2)return Object.freeze([]);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r],l=a.y,s=i.y;if(l===s)continue;let d=Math.min(l,s),c=Math.max(l,s);if(n<d||n>c||n===c&&s>l||n===d&&s<l)continue;let u=(n-l)/(s-l),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&t.push({x:f,delta:s>l?1:-1});}return t.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(t)}function eb(e,n){let t=[],r=Math.min(e.length,tn);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(n-a.y)>1e-6)continue;let l=Math.min(a.x,i.x),s=Math.max(a.x,i.x);s>l&&t.push(Object.freeze({start:l,end:s}));}return Do(t)}function $u(e,n,t){let r=nb(Qy(e,n),t),o=eb(e,n);return Do([...r,...o])}function nb(e,n){if(e.length===0)return Object.freeze([]);let t=[];if(n==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,l=e[a+1].x;l>i&&t.push(Object.freeze({start:i,end:l}));}return Object.freeze(t)}let r=0,o=null;for(let a of e){let i=r;r+=a.delta,i===0&&r!==0?o=a.x:i!==0&&r===0&&o!==null&&(a.x>o&&t.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(t)}function tb(e,n){return Object.freeze({top:je(e.top)+je(n.top),right:je(e.right)+je(n.right),bottom:je(e.bottom)+je(n.bottom),left:je(e.left)+je(n.left)})}function rb(e,n,t,r,o,a){let i=n.x-e.x,l=n.y-e.y,s=r.x-t.x,d=r.y-t.y,c=i*d-l*s;if(Math.abs(c)<1e-12)return null;let f=((t.x-e.x)*l-(t.y-e.y)*i)/c,p=((t.x-e.x)*d-(t.y-e.y)*s)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let g=e.y+f*l;return !Number.isFinite(g)||g<o-1e-6||g>a+1e-6?null:g}function ob(e,n,t,r){let o=[],a=Math.min(e.length,tn),i=Math.min(n.length,tn);if(a<2||i<2)return Object.freeze([]);let l=tn*tn,s=0;for(let d=0;d<a;d+=1){let c=e[d],u=e[(d+1)%a];for(let f=0;f<i;f+=1){if(s>=l)return Object.freeze(o);s+=1;let p=n[f],g=n[(f+1)%i],y=rb(c,u,p,g,t,r);y!==null&&o.push(y);}}return Object.freeze(o)}function ab(e,n,t){let r=new Set;r.add(n),r.add(t);for(let o of e){let a=Math.min(o.length,tn);for(let i=0;i<a;i+=1){let l=o[i].y;Number.isFinite(l)&&l>=n-1e-6&&l<=t+1e-6&&r.add(l);}for(let i=0;i<a;i+=1){let l=o[i],s=o[(i+1)%a],d=l.y,c=s.y;if(d!==c)for(let u of [n,t]){let f=Math.min(d,c),p=Math.max(d,c);u>=f&&u<=p&&r.add(u);}}}if(e.length>=2)for(let o of ob(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function ib(e,n,t,r){let o=$u(e,t,r);return n&&n.length>=3&&(o=qy(o,$u(n,t,"nonzero"))),o}function Vu(e,n,t,r,o=null){let a=je(t.top),i=je(t.bottom),l=je(t.left),s=je(t.right),d=n-i,c=n+a,u=ab(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((g,y)=>{if(y+1>=u.length)return [];let h=u[y+1];return h<=g+1e-6?[g]:[g,h,(g+h)/2]}):[d];for(let g of p){let y=ib(e,o,g,r);for(let h of y)f.push(Object.freeze({start:h.start-l,end:h.end+s}));}return Do(f)}function Yu(e){let{x:n,y:t,width:r,height:o}=e;return Object.freeze([Object.freeze({x:n,y:t}),Object.freeze({x:n+r,y:t}),Object.freeze({x:n+r,y:t+o}),Object.freeze({x:n,y:t+o})])}function lb(e){let n=Math.max(0,je(e.extentWidthPt)),t=Math.max(0,je(e.extentHeightPt)),r=Ya(e.transform,n,t),o=Math.min(e.polygonEmu.length,tn);if(o<3)return Yu({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/Gu,i=r.height/Gu,l=[];for(let s=0;s<o;s+=1){let d=e.polygonEmu[s];l.push(Object.freeze({x:je(d.x)*a,y:je(d.y)*i}));}return Ka({points:Object.freeze(l),sourceWidth:r.width,sourceHeight:r.height,offsetX:r.offsetX,offsetY:r.offsetY,crop:{left:0,top:0,right:0,bottom:0},transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:e.anchorX,anchorY:e.anchorY})}function sb(e,n){let t=n.effectInsets??Va,r=n.wrapDistances??Va,o=je(n.contentLeft),a=je(n.contentRight);if(n.mode==="topAndBottom"){let c=Xu(Hr(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ws([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=Rs(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ws([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:Yu(n.contentBounds),l=n.mode==="through"?"evenodd":"nonzero",s=tb(r,t),d=Vu(i,e,s,l,n.clipPolygon);return ws(d,o,a)}function db(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(n=>n.start)),end:Math.max(...e.map(n=>n.end))})}function cb(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=db(n);if(!a)return e;if(t==="left")return Object.freeze(e.filter(s=>s.end<=a.start+1e-4));if(t==="right")return Object.freeze(e.filter(s=>s.start>=a.end-1e-4));let i=Math.max(0,a.start-r),l=Math.max(0,o-a.end);return i===l?Object.freeze(e.filter(s=>s.start>=a.end-1e-4)):i>l?Object.freeze(e.filter(s=>s.end<=a.start+1e-4)):Object.freeze(e.filter(s=>s.start>=a.end-1e-4))}function Ku(e,n){let t=sb(e,n),r=Jy(t,n.contentLeft,n.contentRight);return cb(r,t,n.textSide,n.contentLeft,n.contentRight)}function ub(e,n,t,r){return t.length<3?false:Vu(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function Ps(e,n,t){let r=t.effectInsets??Va,o=t.hitBounds;if(e<o.x||e>o.x+o.width||n<o.y||n>o.y+o.height)return false;if(t.clipPolygon&&t.clipPolygon.length>=3)return ub(e,n,t.clipPolygon,r);let a=Hr(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Uu(e){let n=Object.freeze({top:je(e.wrapDistancesEmu.top/Zn),right:je(e.wrapDistancesEmu.right/Zn),bottom:je(e.wrapDistancesEmu.bottom/Zn),left:je(e.wrapDistancesEmu.left/Zn)}),t=e.mode==="tight"||e.mode==="through"?lb({polygonEmu:e.polygonEmu,extentWidthPt:e.extentWidthPt,extentHeightPt:e.extentHeightPt,anchorX:e.contentBounds.x,anchorY:e.contentBounds.y,transform:e.transform}):null;return Object.freeze({mode:e.mode,contentBounds:e.contentBounds,polygon:t,clipPolygon:e.geometry.clipPolygon,wrapDistances:n,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var gn=1e5,tn=D.maxPolygonPoints,Va=Object.freeze({top:0,right:0,bottom:0,left:0}),fb=32,pb=.1,gb=new Set(["rect","ellipse","roundRect"]);function ce(e){return Number.isFinite(e)?e:0}function Pn(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function Zu(e,n){let t=e+n;return Number.isFinite(t)?t:0}function qu(e,n,t){let r=Pn(e,0,t),o=Pn(n,0,t);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=t){let i=(t-1)/a;r*=i,o*=i;}return {left:r,right:o}}function mb(e){let n=qu(Pn(e.left,0,gn),Pn(e.right,0,gn),gn),t=qu(Pn(e.top,0,gn),Pn(e.bottom,0,gn),gn);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function hb(e){let n=mb({left:e.left*gn,top:e.top*gn,right:e.right*gn,bottom:e.bottom*gn});return Object.freeze({left:n.left/gn,top:n.top/gn,right:n.right/gn,bottom:n.bottom/gn})}function yb(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/Zn;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)})}function Hr(e,n){let t=ce(n.left),r=ce(n.right),o=ce(n.top),a=ce(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,Zu(e.width,t+r)),height:Math.max(0,Zu(e.height,o+a))})}function bb(e,n,t){let r=e*Pn(t.left,0,1),o=n*Pn(t.top,0,1),a=e*(1-Pn(t.right,0,1)),i=n*(1-Pn(t.bottom,0,1));if(a<=r||i<=o){let l=e/2,s=n/2;return Object.freeze({left:l,top:s,right:l,bottom:s})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function Ya(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?ce(Et(r)??n):Math.max(0,ce(n)),l=o>0?ce(Et(o)??t):Math.max(0,ce(t));return Object.freeze({offsetX:ce(Et(a.x)??0),offsetY:ce(Et(a.y)??0),width:i,height:l})}function xb(e,n,t,r){let o=bb(n,t,r),a=o.right-o.left,i=o.bottom-o.top,l=n>0?n:1,s=t>0?t:1,d=[],c=Math.min(e.length,tn);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+Pn(f.x/l,0,1)*a,g=i<=0?o.top:o.top+Pn(f.y/s,0,1)*i;d.push(Object.freeze({x:ce(p),y:ce(g)}));}return Object.freeze(d)}function Ju(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=ce(t.rotationDegrees)*Math.PI/180,i=Math.cos(a),l=Math.sin(a),s=r*i-o*l,d=r*l+o*i;return Object.freeze({x:ce(s+n.x),y:ce(d+n.y)})}function Qu(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let n=e[0].x,t=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,tn);for(let i=1;i<a;i+=1){let l=e[i];!Number.isFinite(l.x)||!Number.isFinite(l.y)||(n=Math.min(n,l.x),t=Math.max(t,l.x),r=Math.min(r,l.y),o=Math.max(o,l.y));}return Object.freeze({x:n,y:r,width:Math.max(0,t-n),height:Math.max(0,o-r)})}function Is(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=_o(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let l of t)r.push(Ju(Object.freeze({x:l.x+e.offsetX,y:l.y+e.offsetY}),n,e.transform));let o=Qu(r),a=Math.max(o.width,1e-6),i=Math.max(o.height,1e-6);return Object.freeze({bboxX:o.x,bboxY:o.y,scaleX:Math.max(0,ce(e.layoutWidth))/a,scaleY:Math.max(0,ce(e.layoutHeight))/i,anchorX:ce(e.anchorX),anchorY:ce(e.anchorY)})}function Sb(e,n){return Object.freeze({x:ce(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:ce(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function Ka(e){let n=e.mapping??Is({sourceWidth:e.sourceWidth,sourceHeight:e.sourceHeight,offsetX:e.offsetX,offsetY:e.offsetY,transform:e.transform,layoutWidth:e.layoutWidth,layoutHeight:e.layoutHeight,anchorX:e.anchorX,anchorY:e.anchorY}),t=xb(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(t.length>0?t.length:e.points.length,tn),o=t.length>0?t:e.points.slice(0,r),a=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),i=[];for(let l=0;l<r;l+=1){let s=o[l],d=Object.freeze({x:ce(s.x+e.offsetX),y:ce(s.y+e.offsetY)});i.push(Sb(Ju(d,a,e.transform),n));}return Object.freeze(i)}function _o(e,n,t,r){if(t<=0||r<=0){let o=Object.freeze({x:e,y:n});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:n}),Object.freeze({x:e+t,y:n}),Object.freeze({x:e+t,y:n+r}),Object.freeze({x:e,y:n+r})])}function wb(e,n,t){if(!e||!gb.has(e))return null;if(n<=0||t<=0)return _o(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return _o(0,0,n,t);if(e==="ellipse"){let l=[],s=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(fb,tn);for(let p=0;p<f;p+=1){let g=p/f*Math.PI*2;l.push(Object.freeze({x:s+c*Math.cos(g),y:d+u*Math.sin(g)}));}return Object.freeze(l)}let r=Math.min(n,t)*pb,o=Math.max(0,r),a=n,i=t;return Object.freeze([Object.freeze({x:o,y:0}),Object.freeze({x:a-o,y:0}),Object.freeze({x:a,y:o}),Object.freeze({x:a,y:i-o}),Object.freeze({x:a-o,y:i}),Object.freeze({x:o,y:i}),Object.freeze({x:0,y:i-o}),Object.freeze({x:0,y:o})])}function Wr(e){return Object.freeze({x:ce(e.x),y:ce(e.y)})}function Rb(e,n){if(e.length===0)return Object.freeze([]);let t=n.x+n.width,r=n.y+n.height,o=(i,l,s)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,tn);for(let u=0;u<c;u+=1){let f=Wr(i[u]),p=Wr(i[(u+1)%c]),g=l(f),y=l(p);if(g&&y?d.push(p):g&&!y?d.push(Wr(s(f,p))):!g&&y&&(d.push(Wr(s(f,p))),d.push(p)),d.length>=tn)break}return Object.freeze(d.slice(0,tn))},a=e.slice(0,tn).map(Wr);return a=[...o(a,i=>i.x>=n.x,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(n.x-i.x)/s:0;return Object.freeze({x:n.x,y:ce(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.x<=t,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(t-i.x)/s:0;return Object.freeze({x:t,y:ce(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.y>=n.y,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(n.y-i.y)/s:0;return Object.freeze({x:ce(i.x+d*(l.x-i.x)),y:n.y})})],a=[...o(a,i=>i.y<=r,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(r-i.y)/s:0;return Object.freeze({x:ce(i.x+d*(l.x-i.x)),y:r})})],Object.freeze(a)}function Pb(e){let n=Qu(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function Ua(e,n){let t=Ib(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=a=>{if(!a||a.length===0)return a;let i=Rb(a,n);return i.length>=3?Object.freeze(i.map(Wr)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function Ib(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function Tb(e){let n=Math.max(0,ce(e.extentWidth)),t=Math.max(0,ce(e.extentHeight)),r=ce(e.anchorX),o=ce(e.anchorY),a=hb(e.crop),i=yb(e.effectExtentEmu),l=Ya(e.transform,n,t),s=Object.freeze({x:r,y:o,width:n,height:t}),d={sourceWidth:l.width,sourceHeight:l.height,offsetX:l.offsetX,offsetY:l.offsetY,crop:a,transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:r,anchorY:o},c=Is(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=Ka({points:_o(0,0,l.width,l.height),...d,crop:u,mapping:c}),p=wb(e.presetGeometry,l.width,l.height),g="none",y=p;y||(g=e.presetGeometry?"unsupported-preset":"none",y=_o(0,0,l.width,l.height));let h=Ka({points:y,...d,crop:u,mapping:c}),b=Pb(h.length>=3?h:f),x=Hr(b,i);return Object.freeze({contentBounds:s,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:h.length>=3?h:f,clipFallback:g,effectInsets:i})}function Gr(e){let n=e.projection.picture,t=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return Tb({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:n?.crop??{left:0,top:0,right:0,bottom:0},transform:n?.transform??t,presetGeometry:n?.presetGeometry??null})}function vb(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=Ya(n,t,r),a=o.width,i=o.height,l=Is({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),s=ce(n.rotationDegrees),d=Math.abs(s%360)>1e-4,c=n.flipHorizontal?-1:1,u=n.flipVertical?-1:1,f=l.scaleX,p=l.scaleY,g=a>0?a/t:1,y=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(g-1)<1e-4&&Math.abs(y-1)<1e-4)return null;let b=s*Math.PI/180,x=Math.cos(b),v=Math.sin(b),w=o.offsetX+a/2,z=o.offsetY+i/2,L=f*x*c,M=-f*v*u,F=p*v*c,T=p*x*u,B=f*(w-x*c*(a/2)+v*u*(i/2)-l.bboxX),m=p*(z-v*c*(a/2)-x*u*(i/2)-l.bboxY);return Object.freeze({a:ce(L*g),b:ce(F*g),c:ce(M*y),d:ce(T*y),e:ce(B),f:ce(m)})}function DR(e){let n=vb(e);if(n)return `matrix(${jr(n.a)}, ${jr(n.b)}, ${jr(n.c)}, ${jr(n.d)}, ${jr(n.e)}, ${jr(n.f)})`}function jr(e){return Number.isFinite(e)?String(e):"0"}var Bb=Object.freeze({"http://schemas.openxmlformats.org/drawingml/2006/chart":"chart","http://schemas.openxmlformats.org/drawingml/2006/diagram":"diagram","http://schemas.microsoft.com/office/word/2010/wordprocessingGroup":"group","http://schemas.microsoft.com/office/word/2010/wordprocessingShape":"textbox","http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas":"canvas"}),Ob=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),Cb=Object.freeze({left:0,top:0,right:0,bottom:0});function tf(e){let n=e.picture,t=null;if(!n){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";t=Bb[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??Cb,transform:n?.transform??Ob,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var Zn=12700;function Je(e){return e/Zn}function Et(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*Zn*72)return null;let n=e/Zn;return Number.isFinite(n)?n:null}function gt(e){let n=Je(e.inlineDistancesEmu.left),t=Je(e.inlineDistancesEmu.right),r=Je(e.inlineDistancesEmu.top),o=Je(e.inlineDistancesEmu.bottom),a=Je(e.effectExtentEmu.left),i=Je(e.effectExtentEmu.right),l=Je(e.effectExtentEmu.top),s=Je(e.effectExtentEmu.bottom),d=Je(e.extentEmu.cx),c=Je(e.extentEmu.cy);return Object.freeze({distL:n,distR:t,distT:r,distB:o,effectL:a,effectR:i,effectT:l,effectB:s,width:d,height:c,totalWidth:n+a+d+i+t,lineContribution:r+l+c+s+o})}function rf(e,n,t){let r=Math.max(t.distT+t.effectT,e-t.height),o=Math.max(n,r-t.effectT+t.height+t.effectB+t.distB),a=r+t.height+t.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function Za(e,n,t){if(Math.abs(n)<1e-4&&Math.abs(t)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+n,y:a.y+t}),o=a=>Object.freeze({x:a.x+n,y:a.y+t});return Object.freeze({...e,contentBounds:r(e.contentBounds),paintBounds:r(e.paintBounds),hitBounds:r(e.hitBounds),transformedCorners:Object.freeze(e.transformedCorners.map(o)),clipPolygon:e.clipPolygon?Object.freeze(e.clipPolygon.map(o)):null})}function qa(e,n,t){return Math.abs(n)<1e-4&&Math.abs(t)<1e-4?e:Object.freeze({...e,x:e.x+n,y:e.y+t,advanceStart:e.advanceStart+n,advanceEnd:e.advanceEnd+n,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+n,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+n,y:e.hitBounds.y+t}),geometry:Za(e.geometry,n,t)})}function Ts(e,n){return e.length===0?e:e.map(t=>{let r=t.geometry.effectInsets.bottom,o=n-t.height-r,a=o-t.y;return Math.abs(a)<1e-4&&t.baselineOffset===n?t:Object.freeze({...t,y:o,baselineOffset:n,geometry:Za(t.geometry,0,a),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+a}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+a})})})}function vs(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function Ja(e,n){let t=vs(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=Za(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:Ua(i,n)})}var ef=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),nf=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function qn(e){return e%2===1}function of(e,n){return !(!n.layoutInCell||n.cellBox===null||!Number.isFinite(n.cellBox.height)||n.cellBox.height<=0||!Number.isFinite(n.cellBox.width)||n.cellBox.width<=0)}function af(e,n){if(of(e,n)){let s=n.cellBox;if(!s)return null;let{x:d,width:c}=s;switch(e){case "page":case "column":case "margin":case "leftMargin":return {left:d,right:d+c,center:d+c/2};case "rightMargin":return {left:d,right:d+c,center:d+c/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "insideMargin":return qn(n.pageNumber)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return qn(n.pageNumber)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let t=-n.marginLeft,r=n.contentWidth+n.marginRight,o=0,a=n.contentWidth,i=n.columnBox.x,l=n.columnBox.x+n.columnBox.width;switch(e){case "page":return {left:t,right:r,center:(t+r)/2};case "margin":return {left:o,right:a,center:o+n.contentWidth/2};case "column":return {left:i,right:l,center:i+n.columnBox.width/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "leftMargin":return {left:t,right:t,center:t};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return qn(n.pageNumber)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return qn(n.pageNumber)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function lf(e,n){if(of(e,n)){let s=n.cellBox;if(!s)return null;let{y:d,height:c}=s;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:d,bottom:d+c,center:d+c/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "insideMargin":return qn(n.pageNumber)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return qn(n.pageNumber)?{top:d+c,bottom:d+c,center:d+c}:{top:d,bottom:d+c,center:d+c/2};default:return null}}let t=-n.marginTop,r=n.physicalContentHeight??n.contentHeight,o=r,a=r+n.marginBottom,i=0,l=n.contentHeight;switch(e){case "page":return {top:t,bottom:a,center:(t+a)/2};case "margin":return {top:i,bottom:l,center:i+n.contentHeight/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "topMargin":return {top:t,bottom:t,center:t};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return qn(n.pageNumber)?{top:i,bottom:i,center:i}:{top:l,bottom:l,center:l};case "outsideMargin":return qn(n.pageNumber)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function sf(e){return e===null?0:Et(e)}function kb(e,n,t){let r=qn(t.pageNumber);if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.width)&&t.cellBox.width>0){let{x:o,width:a}=t.cellBox;return e==="inside"?r?o:o+a-n:e==="outside"?r?o+a-n:o:null}return e==="inside"?r?0:t.contentWidth-n:e==="outside"?r?t.contentWidth-n:0:null}function Lb(e,n,t){let r=qn(t.pageNumber),o=t.physicalContentHeight??t.contentHeight;if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.height)&&t.cellBox.height>0){let{y:a,height:i}=t.cellBox;return e==="inside"?r?a:a+i-n:e==="outside"?r?a+i-n:a:null}return e==="inside"?r?0:o-n:e==="outside"?r?o-n:0:null}function Eb(e,n,t,r,o){let a=af(e,o);if(!a)return null;let i=sf(t);if(i===null)return null;if(n==="left")return a.left+i;if(n==="center")return a.center-r/2+i;if(n==="right")return a.right-r+i;if(n==="inside"||n==="outside"){let l=kb(n,r,o);if(l!==null)return l+i}return a.left+i}function Mb(e,n,t,r,o){let a=lf(e,o);if(!a)return null;let i=sf(t);if(i===null)return null;if(n==="top")return a.top+i;if(n==="center")return a.center-r/2+i;if(n==="bottom")return a.bottom-r+i;if(n==="inside"||n==="outside"){let l=Lb(n,r,o);if(l!==null)return l+i}return a.top+i}function zo(e){let n=e.physicalContentHeight??e.contentHeight;return Object.freeze({x:-e.marginLeft,y:-e.marginTop,width:e.pageWidth,height:n+e.marginTop+e.marginBottom})}function Bs(e,n){let t=gt(e),r=e.position,o=e.anchor,a="page",i="page";if(!r||!o)return Object.freeze({x:0,y:0,horizontalFrame:a,verticalFrame:i,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"});if(o.simplePos){let y=Et(r.simplePosition.xEmu),h=Et(r.simplePosition.yEmu);return Object.freeze(y===null||h===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:y-n.marginLeft,y:h-n.marginTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let l=r.horizontal.relativeFrom,s=r.vertical.relativeFrom,d=af(l,n),c=lf(s,n),u=d?.left??0,f=c?.top??0;if(!ef.has(l)||!nf.has(s))return Object.freeze({x:0,y:0,horizontalFrame:ef.has(l)?l:a,verticalFrame:nf.has(s)?s:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=Eb(l,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),g=Mb(s,r.vertical.align,r.vertical.offsetEmu,t.height,n);return Object.freeze(p===null||g===null?{x:0,y:0,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:g,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function Nb(e){let n=e.input.projection,t=n.anchor,r=gt(n),o=Gr({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?vs(o.paintBounds,e.clipRegion):o.paintBounds,i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"anchoredDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.anchorParagraphId,anchorParagraphId:e.anchorParagraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:e.resolved.x,y:e.resolved.y,width:r.width,height:r.height,horizontalFrame:e.resolved.horizontalFrame,verticalFrame:e.resolved.verticalFrame,horizontalFrameOrigin:e.resolved.horizontalFrameOrigin,verticalFrameOrigin:e.resolved.verticalFrameOrigin,behindDocument:t?.behindDocument??false,allowOverlap:t?.allowOverlap??true,layoutInCell:t?.layoutInCell??true,relativeHeight:t?.relativeHeight??0,wrap:n.wrap==="inline"?"inFront":n.wrap,...e.sourceOrder!==void 0?{sourceOrder:e.sourceOrder}:{},...e.resolved.layoutFallback?{layoutFallback:e.resolved.layoutFallback}:{},...e.textboxStory?{textboxStory:e.textboxStory}:{},paintBounds:a,hitBounds:i,geometry:e.clipRegion?Ua(o,e.clipRegion):o,resource:e.input.resource,accessibility:ab$1(n),...tf(n)})}function In(e,n){if(e.kind!=="paragraph")return [];let t=[],r=o=>{if(o.kind==="drawing"){let a=n.projectionForAtom?.(o.id)??n.project(o);a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if($a$1(o)){let a=n.projectionForAtom?.(o.id)??null;a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children)r(o);return Object.freeze(t)}function Nn(e){let n=new Map;if(e.kind!=="paragraph")return n;let t=0,r=o=>{if(o.kind==="drawing"||$a$1(o)){n.set(o.id,t),t+=1;return}if(o.kind==="textValue"){t+=o.value.length;return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children){if(o.kind==="run"){for(let a of o.children)r(a);continue}if(o.kind==="hyperlink"){for(let a of o.children)if(a.kind==="run")for(let i of a.children)r(i);}}return n}function Fb(e,n,t){for(let o of e.spans){if(n<o.range.start)break;if(n<o.range.end){if(t&&o.text!==void 0&&o.style!==void 0){let l=n-o.range.start;return o.box.x+Kn(o.text.slice(0,l),o.style,t)}let a=o.range.end-o.range.start;if(a<=0)return o.box.x;let i=n-o.range.start;return o.box.x+o.box.width*i/a}if(n===o.range.end)return t&&o.text!==void 0&&o.style!==void 0?o.box.x+Kn(o.text,o.style,t):o.box.x+o.box.width}let r;for(let o of e.spans)o.range.end<=n&&(r=o);return r?t&&r.text!==void 0&&r.style!==void 0?r.box.x+Kn(r.text,r.style,t):r.box.x+r.box.width:e.box.x}function Ab(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function Os(e,n,t){if(!(Math.abs(t)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===n&&(e[r]=Object.freeze({...o,y:o.y+t,geometry:Za(o.geometry,0,t),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+t}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+t})}));}}function $r(e){let n=In(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=Nn(e.paragraph),r=[];for(let o of n){let a=o.projection;if(a.hidden)continue;let i=t.get(o.atomId);if(i===void 0||e.fragmentRange&&(i<e.fragmentRange.start||i>=e.fragmentRange.end))continue;let l=e.lines.find(h=>i>=h.range.start&&i<h.range.end);if(!l)continue;let s=a.anchor?.layoutInCell??true,c=a.position?.horizontal.relativeFrom==="character"?Ab(l,i):i,u=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:l.box,anchorCharacterX:Fb(l,c,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:s}),f=Bs(a,u),g=s&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0?e.cellBox:zo(e.frameBase),y=Nb({input:Object.freeze({drawingNodeId:o.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:a,resource:e.drawingLayout.resourceOf(a)}),anchorParagraphId:e.paragraphId,start:c,resolved:f,clipRegion:g,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(o.atomId)}:{},...a.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(a)}:{}});r.push(y);}return Object.freeze(r)}function df(e){let n=gt(e.input.projection),t=e.slotX+n.distL+n.effectL,r=Gr({projection:e.input.projection,anchorX:t,anchorY:e.y,extentWidth:n.width,extentHeight:n.height}),o=e.contentTop!==void 0&&e.contentBottom!==void 0?Object.freeze({x:e.contentLeft,y:e.contentTop,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,e.contentBottom-e.contentTop)}):Object.freeze({x:e.contentLeft,y:r.paintBounds.y,width:Math.max(0,e.contentRight-e.contentLeft),height:r.paintBounds.height}),a=vs(r.paintBounds,o),i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"inlineDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.paragraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:t,y:e.y,width:n.width,height:n.height,distL:n.distL,distR:n.distR,distT:n.distT,distB:n.distB,advanceStart:e.slotX,advanceEnd:e.slotX+n.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:Ua(r,o),resource:e.input.resource,accessibility:ab$1(e.input.projection),...tf(e.input.projection)})}var Db=256,Ls=8,tr=8,Xr=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function _b(e,n){let t=Math.max(1,n.columnCount);if(t<=1)return 0;let r=e.x+e.width/2;if(n.columnLefts&&n.columnWidths&&n.columnLefts.length===t){for(let i=0;i<t;i+=1){let l=n.columnLefts[i],s=l+n.columnWidths[i];if(r>=l-.001&&r<s+.001)return i}return t-1}let o=n.columnGapPt,a=(n.contentWidth-o*(t-1))/t;for(let i=0;i<t;i+=1){let l=i*(a+o),s=l+a;if(r>=l-.001&&r<s+.001)return i}return t-1}function ks(e){return e.behindDocument?"behind":"inFront"}function cf(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function zb(e){switch(e){case "inline":case "behind":case "inFront":return null;case "square":case "squareLeft":case "squareRight":return "square";case "tight":return "tight";case "through":return "through";case "topAndBottom":return "topAndBottom";default:return null}}function Hb(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function Es(e){let n=zb(e.projection.wrap);if(!n||!e.projection.wrapGeometry)return null;let t=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return Uu({mode:n,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:t.distancesEmu,polygonEmu:t.polygon,crop:e.projection.picture?.crop??{},transform:e.projection.picture?.transform??{rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:{x:0,y:0},extentEmu:{cx:0,cy:0}},extentWidthPt:e.geometry.contentBounds.width,extentHeightPt:e.geometry.contentBounds.height,textSide:n==="square"?Hb(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Ms(e){if(e.mode==="topAndBottom"||e.mode==="square")return Rs(e.contentBounds,e.effectInsets,e.wrapDistances);let n=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)n.push(o.y);let t=Math.min(...n)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...n)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:t,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-t)})}function jb(e){if(e.drawing.behindDocument||!cf(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=Es({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:n});return t?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:ks(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:Ms(t),input:t}):null}function uf(e,n){let t=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=n.sourceOrder??Number.MAX_SAFE_INTEGER;return t!==r?t-r:e.drawingNodeId.localeCompare(n.drawingNodeId)}function Wb(e,n){let t=ks(e),r=ks(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:uf(e,n)}function ff(e){return Object.freeze([...e].sort(Wb))}function Cs(e,n){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function Ns(e,n){if(Math.abs(n)<=1e-4)return e;let t=e.geometry;return Object.freeze({...e,y:e.y+n,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+n}),geometry:Object.freeze({...t,contentBounds:Object.freeze({...t.contentBounds,y:t.contentBounds.y+n}),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+n}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+n}),transformedCorners:t.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+n})),clipPolygon:t.clipPolygon?t.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+n})):null})})}function pf(e,n){let t=n.maxAttempts??Db,r=[...e].sort(uf),o=[],a=[],i=[];for(let l of r){if(l.allowOverlap){o.push(l);continue}let s=l,d=0;for(;d<t&&o.some(y=>Cs(y.paintBounds,s.paintBounds));){let p=o.find(y=>Cs(y.paintBounds,s.paintBounds)),g=p.paintBounds.y+p.paintBounds.height-s.paintBounds.y+.001;s=Ns(s,g),d+=1;}let c=o.some(f=>Cs(f.paintBounds,s.paintBounds)),u=s.paintBounds.y+s.paintBounds.height>n.pageBottom+.001;if(c||u){a.push(s),i.push(s.drawingNodeId);continue}o.push(s);}return Object.freeze({drawings:Object.freeze(o),deferred:Object.freeze(a),deferredNodeIds:Object.freeze(i)})}function Vr(e,n,t,r){let o=[{start:t,end:r}];for(let a of n){let i=a.verticalBand;if(e<i.y||e>=i.y+i.height)continue;let l=Ku(e,a.input),s=[];for(let d of o)for(let c of l){let u=Math.max(d.start,c.start),f=Math.min(d.end,c.end);f>u+1e-6&&s.push(Object.freeze({start:u,end:f}));}if(o=s,o.length===0)break}return Object.freeze(o)}function gf(e,n){for(let t of n)if(e>=t.start-1e-6&&e<t.end-1e-6)return Math.max(0,t.end-e);return 0}function Gb(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function Fs(e,n){let t=Gb(e,n);if(!t)return null;let r=Math.max(e,t.start),o=t.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function $b(e,n,t){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+n,y:r.y+t}),contentLeft:e.contentLeft+n,contentRight:e.contentRight+n,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{}})}function As(e,n){return Object.freeze({...e,layoutFallback:n})}function mf(e,n,t,r){return e.length===0?e:Object.freeze(e.map(o=>{let a=o.verticalBand,i=o.input;return Object.freeze({...o,y:o.y-t,verticalBand:Object.freeze({...a,x:a.x-n,y:a.y-t}),input:Object.freeze({...$b(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function hf(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function yf(e){let n=In(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Nn(e.paragraph),r=Math.max(1,e.contentRight-e.contentLeft),o=[];for(let a of n){if(a.projection.anchor?.behindDocument||!cf(a.projection.wrap)||a.projection.wrap==="topAndBottom")continue;let i=t.get(a.atomId);if(i===void 0)continue;let l=e.anchorLineTopByModelStart.get(i);if(l===void 0)continue;let s=Object.freeze({x:e.contentLeft,y:l,width:r,height:14}),d=e.anchorCellBox!=null,c=Bs(a.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+r,marginLeft:e.contentLeft,marginRight:0,marginTop:0,marginBottom:0,contentWidth:r,contentHeight:648,physicalContentHeight:648,paragraphBox:s,anchorLineBox:s,anchorCharacterX:e.contentLeft,columnBox:s,cellBox:d?e.anchorCellBox:null,layoutInCell:d,ownerPartName:e.drawingLayout.ownerPartName}),u=e.paragraphStartY+l,f=gt(a.projection),p=Gr({projection:a.projection,anchorX:c.x,anchorY:u,extentWidth:f.width,extentHeight:f.height}),g=Es({projection:a.projection,geometry:p,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:c.x,anchorY:u});g&&o.push(Object.freeze({drawingNodeId:a.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:i,sourceOrder:e.sourceOrderOf?.(a.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:a.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:a.projection.anchor?.relativeHeight??0,allowOverlap:a.projection.anchor?.allowOverlap??true,columnIndex:0,y:u,verticalBand:Ms(g),input:g}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}function Qa(e){let n=In(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Nn(e.paragraph),r=[];for(let o of n){if(o.projection.anchor?.behindDocument||o.projection.wrap!=="topAndBottom")continue;let a=t.get(o.atomId);if(a===void 0)continue;let i=e.anchorLineTopByModelStart.get(a);if(i===void 0)continue;let l=e.paragraphStartY+i,s=gt(o.projection),d=Gr({projection:o.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:s.width,extentHeight:s.height}),c=Es({projection:o.projection,geometry:d,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:l});c&&r.push(Object.freeze({drawingNodeId:o.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:a,sourceOrder:e.sourceOrderOf?.(o.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:o.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:o.projection.anchor?.relativeHeight??0,allowOverlap:o.projection.anchor?.allowOverlap??true,columnIndex:e.columnIndex??0,y:l,verticalBand:Ms(c),input:c}));}return r.sort((o,a)=>o.sourceOrder-a.sourceOrder),Object.freeze(r)}var Xb=8;function Vb(e,n,t,r){return e<r&&n>t}function mt(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<Xb;o+=1){let a=e+r,i=a+n,l=a,s=false;for(let c of t){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;Vb(a,i,u,f)&&(s=true,l=Math.max(l,f));}if(!s)break;let d=l-e;if(d<=r+.001)break;r=d;}return r}function Yb(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function Kb(e){let n=e.contentBounds,t=e.wrapDistances,r=e.effectInsets,o=e.polygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"",a=e.clipPolygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"";return [e.mode,e.textSide,n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),t.top.toFixed(3),t.right.toFixed(3),t.bottom.toFixed(3),t.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function Jn(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=Vr(r,[n],n.input.contentLeft,n.input.contentRight);return [n.drawingNodeId,String(n.sourceOrder),String(n.columnIndex),n.y.toFixed(3),t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),Kb(n.input),Yb(o)].join("|")}).join(`
|
|
1
|
+
import {y}from'./chunk-33F6TRXO.js';import {D,td as td$1,j,g,h,f,la as la$1,ad as ad$1,rd as rd$1,hd as hd$1,id as id$1,fd as fd$1,nd as nd$1,od as od$1,kd as kd$1,pd as pd$1,R,ie,Ob as Ob$1,Wb as Wb$1,qb as qb$1,gb as gb$1,eb as eb$1,wc,sa as sa$1,vd as vd$1,md as md$1,ld as ld$1,jd as jd$1,wd as wd$1,gd as gd$1,cb as cb$1,pe,ne,se,oe,Ea as Ea$1,wa,Kb as Kb$1,Jb as Jb$1,Nb as Nb$1,_a as _a$1,db as db$1,Mb as Mb$1,gc,ic,Vd as Vd$1,be,le,Za as Za$1,Xa as Xa$1,$a as $a$1,cc,ac,m,fc,nc,Va as Va$1,ab as ab$1,ec,Ua as Ua$1,mc,qa as qa$1,Xb as Xb$1,Zb as Zb$1,lc,fb as fb$1}from'./chunk-TCX3PVWR.js';var Gn=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},Ia=(e,n)=>{if(e.trim().length===0||/[\u0000-\u001f\u007f]/.test(e))throw new TypeError(`${n} must be non-blank and contain no control characters`)},Fm=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},Xc=(e,n,t)=>{let r=Object.entries(e).sort(([a],[i])=>a<i?-1:a>i?1:0),o=Object.create(null);for(let[a,i]of r){if(Fm(a,`${n} key`),!Number.isFinite(i)||t&&(!Number.isSafeInteger(i)||i<0))throw new RangeError(`${n} value must be ${t?"a non-negative safe integer":"finite"}`);if(t&&i>4294967295)throw new RangeError(`${n} value must fit an unsigned 32-bit integer`);o[a]=i;}return Object.freeze(o)},kl=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),Am=e=>e?Object.freeze({requested:kl(e.requested),resolved:kl(e.resolved)}):void 0,Vc=new WeakSet,El=e=>{if(h(e),!Vc.has(e)){if(e.identity!==`${e.hash}#${e.faceIndex}`)throw new TypeError("Resolved font identity does not match hash and face index");if(!Number.isSafeInteger(e.byteLength)||e.byteLength<0)throw new TypeError("Resolved font byte length is invalid");Vc.add(e);}},Ll=e=>(El(e),e),va=e=>(El(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:kl(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:Am(e.substitution)??null})),Kt=e=>{if(Ia(e.shapingLibrary.name,"shaping library name"),Ia(e.shapingLibrary.version,"shaping library version"),Ia(e.unicodeDataVersion,"Unicode data version"),!/^\d+(?:\.\d+){0,3}(?:[-+][0-9A-Za-z.-]+)?$/.test(e.shapingLibrary.version))throw new TypeError("shaping library version must be a numeric version");if(!/^\d+(?:\.\d+){1,2}$/.test(e.unicodeDataVersion))throw new TypeError("Unicode data version must be a dotted numeric version");if(!/^[A-Z][a-z]{3}$/.test(e.script))throw new TypeError("script must be a four-letter ISO 15924 code");if(Ia(e.language,"language"),!/^(?:und|[A-Za-z]{2,8})(?:-[A-Za-z0-9]{1,8})*$/.test(e.language))throw new TypeError("language must be a BCP 47 language tag");if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("direction must be ltr or rtl");if(!["none","NFC","NFD","NFKC","NFKD"].includes(e.normalization))throw new TypeError("invalid normalization policy");if(!["halfAwayFromZero","halfToEven","towardZero"].includes(e.roundingMode))throw new TypeError("invalid fixed-point rounding mode");if(!Number.isSafeInteger(e.fixedPointScale)||e.fixedPointScale<=0)throw new RangeError("fixed-point scale must be a positive safe integer");let n=Ll(e.font),t=e.fallbackOrder.map(Ll),r=new Set;for(let o of t){let a=JSON.stringify(va(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:Xc(e.variationAxes,"variation axis",false),shapingLibrary:Object.freeze({name:e.shapingLibrary.name,version:e.shapingLibrary.version}),unicodeDataVersion:e.unicodeDataVersion,normalization:e.normalization,script:e.script,language:e.language,direction:e.direction,features:Xc(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Kc=e=>{let n=Kt(e);return Object.freeze({font:va(n.font),variationAxes:Object.freeze(Object.entries(n.variationAxes).map(t=>Object.freeze(t))),shapingLibrary:Object.freeze({name:n.shapingLibrary.name,version:n.shapingLibrary.version}),unicodeDataVersion:n.unicodeDataVersion,normalization:n.normalization,script:n.script,language:n.language,direction:n.direction,features:Object.freeze(Object.entries(n.features).map(t=>Object.freeze(t))),fallbackOrder:Object.freeze(n.fallbackOrder.map(va)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},Ml=e=>JSON.stringify(Kc(e)),Yt=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},En=e=>{try{return Gn(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Yc=new WeakMap,Ta=e=>{let n=Yc.get(e);if(n)return n;El(e);let t=JSON.stringify({identity:e.identity,id:e.id,family:e.family,request:e.request,hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:e.substitution??null});return Yc.set(e,t),t},Ba=(e,n)=>{let t=Kt(n);if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("Shaped run direction must be ltr or rtl");if(e.direction!==t.direction)throw new TypeError("Shaped run direction does not match shaping environment");if(Yt(e.bidiLevel,"bidi level"),(e.bidiLevel&1)===1!=(e.direction==="rtl"))throw new TypeError("Shaped run direction does not match bidi level parity");let r=new Map,o=e.glyphs.map(s=>{Yt(s.id,"glyph id"),Yt(s.cluster,"glyph cluster");let d=r.get(s.outline);if(!d){if(!Number.isSafeInteger(s.outline.unitsPerEm)||s.outline.unitsPerEm<=0)throw new RangeError("Glyph outline units per em must be a positive safe integer");d=Object.isFrozen(s.outline)?s.outline:Object.freeze({path:s.outline.path,unitsPerEm:s.outline.unitsPerEm}),r.set(s.outline,d);}return Object.freeze({id:s.id,cluster:s.cluster,originX:En(s.originX),originY:En(s.originY),advanceX:En(s.advanceX),advanceY:En(s.advanceY),offsetX:En(s.offsetX),offsetY:En(s.offsetY),outline:d})}),a=e.fontSpans.map(s=>{if(Yt(s.glyphStart,"font span start"),Yt(s.glyphEnd,"font span end"),s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Font span glyph range is invalid");s.fallbackIndex!==null&&Yt(s.fallbackIndex,"fallback index");let d=Ll(s.font);if(s.fallbackIndex===null){if(Ta(d)!==Ta(t.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=t.fallbackOrder[s.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(Ta(d)!==Ta(c))throw new TypeError("Shaped fallback font does not match shaping environment provenance")}return Object.freeze({...s,font:d})});for(let s=0;s<a.length;s+=1){let d=s===0?0:a[s-1].glyphEnd;if(a[s].glyphStart!==d)throw new RangeError("Font spans must cover glyphs contiguously")}if(o.length===0&&a.length!==0||o.length>0&&a.at(-1)?.glyphEnd!==o.length)throw new RangeError("Font spans must cover every glyph exactly once");let i=e.clusters.map(s=>{for(let[c,u]of [["cluster text start",s.textStart],["cluster text end",s.textEnd],["cluster glyph start",s.glyphStart],["cluster glyph end",s.glyphEnd],["cluster font span",s.fontSpan]])Yt(u,c);if(s.textEnd<=s.textStart||s.textEnd>e.text.length||s.glyphEnd<=s.glyphStart||s.glyphEnd>o.length)throw new RangeError("Shaped cluster range is invalid");let d=a[s.fontSpan];if(!d||s.glyphStart<d.glyphStart||s.glyphEnd>d.glyphEnd)throw new RangeError("Shaped cluster does not belong to its declared font span");return Object.freeze({...s,advance:En(s.advance),caretEdges:Object.freeze(s.caretEdges.map(En))})}),l=Object.freeze({ascent:En(e.metrics.ascent),descent:En(e.metrics.descent),lineGap:En(e.metrics.lineGap)});return Object.freeze({text:e.text,direction:e.direction,bidiLevel:e.bidiLevel,glyphs:Object.freeze(o),clusters:Object.freeze(i),fontSpans:Object.freeze(a),metrics:l})},Dm=(e,n)=>{let t=Ba(e,n);return Object.freeze({text:t.text,direction:t.direction,script:n.script,language:n.language,bidiLevel:t.bidiLevel,glyphs:t.glyphs,clusters:t.clusters,fontSpans:Object.freeze(t.fontSpans.map(r=>Object.freeze({glyphStart:r.glyphStart,glyphEnd:r.glyphEnd,fallbackIndex:r.fallbackIndex,font:va(r.font)}))),metrics:t.metrics})};var ho=Object.freeze({name:"HarfBuzz",version:"14.2.1"}),yo=null,go=null;function _m(){return yo?Promise.resolve():go||(go=import('harfbuzzjs').then(e=>{let n=e.versionString();if(n!==ho.version)throw new He("shapingLibraryMismatch",{diagnostic:`expected ${ho.version}, loaded ${n}`});yo=e;}).catch(e=>{throw go=null,e}),go)}function zm(){return yo!==null}function Hm(){if(!yo)throw new He("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return yo}var He=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(n,t={}){super(`HarfBuzz shaping failed (${n})`),this.code=n,this.limit=t.limit,this.actual=t.actual,this.diagnostic=t.diagnostic;}},jm=16*1024*1024,Wm=1e6,Gm=1e6,$m=1e6,Xm=4,Vm=512,Ym=1024*1024,Km=16*1024*1024,Um=32*1024*1024,Zm=64*1024*1024,qm=64*1024*1024,Jm=1e6,Qm=1e6,eh=1e6,nh=64,th=4096,rh=4*1024*1024,oh=64*1024*1024,ah=64*1024*1024,ih=256*1024*1024,lh=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Uc=["cmap","head","hhea","hmtx","maxp"],sh=(e,n)=>e[n]<<8|e[n+1],dh=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,ch=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?dh(e,12+n*4):0,uh=(e,n)=>{let t=ch(e,n),r=sh(e,t+4),o=new Set;for(let a=0;a<r;a+=1){let i=t+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},fh=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),ph=(e,n)=>{let t=j(e,n);if(!t.valid)return t;let r=uh(e,n);for(let o of Uc)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},gh=ph,$n=(e,n,t)=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw new RangeError(`${n} must be a positive safe integer no greater than ${t}`);return e},mh=(e,n,t)=>{let r=e<0n,o=r?-e:e,a=o/n,i=o%n;if(t!=="towardZero"){let d=i*2n;(d>n||d===n&&(t==="halfAwayFromZero"||t==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let l=r?-a:a,s=Number(l);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Zc=(e,n,t,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(t)||t<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");return Gn(mh(BigInt(e)*BigInt(t),BigInt(n),r))},hh=(e,n,t,r)=>{if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("font size must be a positive integer number of half points");if(n>Math.floor(Number.MAX_SAFE_INTEGER/t))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=n*t,a=e*2;return i=>Zc(i,a,o,r)},yh=(e,n)=>{if(n.length===0)return [];let t=[...new Set(n.map(i=>i.cluster))].sort((i,l)=>i-l),r=new Map;for(let i=0;i<t.length;i+=1)r.set(t[i],t[i+1]??e.length);let o=[],a=0;for(;a<n.length;){let i=n[a].cluster,l=a+1;for(;l<n.length&&n[l].cluster===i;)l+=1;let s=n.slice(a,l).reduce((c,u)=>c+u.advanceX,0),d=Gn(s);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:l,advance:d,caretEdges:Object.freeze([Gn(0),d]),fontSpan:0}),a=l;}return o},Xn=64,lt=8,Ut=8,bh=32,qc=Xn+2*lt,xh=Xn+lt+Ut,Sh=Xn+lt+Ut,wh=Xn+lt+Ut,Jc=Xn+8*lt,Qc=Xn+8*Ut+lt,Rh=Xn+6*Ut+lt,Ph=Xn+3*Ut+2*lt,Ih=Xn+3*Ut,bo=e=>Xn+e.length*Uint16Array.BYTES_PER_ELEMENT,Fl=e=>wh+bo(e),mo=e=>bh+e*lt,Th=(e,n)=>qc+bo(e)+xh+Fl(n),vh=e=>Jc+bo(e)+mo(e.length)+e.length*Qc,Bh=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return Jc+bo(e.text)+mo(e.glyphs.length)+e.glyphs.length*Qc+mo(e.clusters.length)+e.clusters.length*Rh+e.clusters.reduce((t,r)=>t+mo(r.caretEdges.length),0)+mo(e.fontSpans.length)+e.fontSpans.length*Ph+Ih+[...n].reduce((t,r)=>t+Fl(r.path),0)},Oh=(e,n)=>qc+bo(e)+Sh+n,Nl=class{#n;#l;#u;#f;#p;#y;#b;#g;#m;#s;#h;#d;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#c;constructor(n,t){this.#n=n,this.#l=$n(t.maxFontBytes??jm,"maximum font bytes",qm),this.#u=$n(t.maxInputUtf16??Wm,"maximum input UTF-16 code units",Jm),this.#f=$n(t.maxCodepoints??Gm,"maximum input code points",Qm),this.#p=$n(t.maxGlyphs??$m,"maximum shaped glyphs",eh),this.#y=$n(t.maxCachedFaces??Xm,"maximum cached faces",nh),this.#b=$n(t.maxCachedShapes??Vm,"maximum cached shape results",th),this.#g=$n(t.maxOutlineBytes??Ym,"maximum outline bytes",rh),this.#m=$n(t.maxCachedOutlineBytes??Km,"maximum cached outline bytes",oh),this.#s=$n(t.maxShapedRunBytes??Um,"maximum shaped run bytes",ah),this.#h=$n(t.maxCachedShapeBytes??Zm,"maximum cached shape bytes",ih),this.#d=t.instrumentation?.onFaceCacheEvent,this.#e=t.instrumentation,this.#c=new this.#n.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#t.clear(),this.#i=0,this.#r=0,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#c=void 0;}#S(n,t){let r=this.#o.get(n.identity);if(r)return this.#o.delete(n.identity),this.#o.set(n.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:n.identity})),r;let o=g(n);for(let c of Uc)if(!o.has(c))throw new He("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(fh(t)),i=new this.#n.Face(a,n.faceIndex),l=new this.#n.Font(i),s=l.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new He("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(l.setScale(i.upem,i.upem),this.#o.size>=this.#y){let c=this.#o.keys().next().value;c!==void 0&&(this.#o.delete(c),this.#d?.(Object.freeze({kind:"evicted",identity:c})));}let d={identity:n.identity,blob:a,face:i,font:l,unitsPerEm:i.upem};return this.#o.set(n.identity,d),this.#d?.(Object.freeze({kind:"created",identity:n.identity})),d}#w(n,t,r){let o=JSON.stringify([n.identity,n.unitsPerEm,r,t]),a=this.#a.get(o);if(a)return this.#a.delete(o),this.#a.set(o,a),this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#i})),a.outline;this.#e?.onOutlinePathCall?.();let i=n.font.glyphToPath(t),l=Fl(i);if(l>this.#g)throw new He("outlineOverLimit",{limit:this.#g,actual:l});let s=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=Th(o,i);if(d>this.#m)return this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#i})),s;for(;this.#i+d>this.#m;){let c=this.#a.keys().next().value;if(c===void 0)break;let u=this.#a.get(c);this.#a.delete(c),this.#i-=u.bytes,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#i}));}return this.#a.set(o,{outline:s,bytes:d}),this.#i+=d,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),s}#x(n){if(n.length>this.#u)throw new He("textOverLimit",{limit:this.#u,actual:n.length});let t=0;for(let r=0;r<n.length;){let o=n.codePointAt(r);if(r+=o>65535?2:1,t+=1,t>this.#f)throw new He("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#c)throw new He("disposed");if(h(n.environment.font),n.environment.font.byteLength>this.#l)throw new He("fontOverLimit",{limit:this.#l,actual:n.environment.font.byteLength});this.#x(n.text);let t=vh(n.text);if(t>this.#s)throw new He("shapedRunOverLimit",{limit:this.#s,actual:t});let r=Kt(n.environment),o=JSON.stringify([n.text,n.fontSizeHalfPoints,n.bidiLevel,Ml(r)]),a=this.#t.get(o);if(a)return this.#t.delete(o),this.#t.set(o,a),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==ho.name||r.shapingLibrary.version!==ho.version)throw new He("shapingLibraryMismatch");if(r.normalization!=="none")throw new He("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new He("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new He("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new He("unsupportedFallback");let i=f(r.font),l=g(r.font);if([...lh].some(d=>l.has(d)))throw new He("unsupportedColorFont");let s=n.text;this.#x(s);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#c;f.reset(),f.addText(s),f.setDirection(r.direction==="rtl"?this.#n.Direction.RTL:this.#n.Direction.LTR),f.setScript(r.script),f.setLanguage(r.language),f.setClusterLevel(this.#n.ClusterLevel.MONOTONE_CHARACTERS);let p=Object.entries(r.features).map(([T,B])=>new this.#n.Feature(T,B));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let g=f.getGlyphInfosAndPositions();if(g.length>this.#p)throw new He("glyphOverLimit",{limit:this.#p,actual:g.length});let y=hh(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),h=Gn(0),b=Gn(0),x=new Map,v=JSON.stringify(Object.entries(r.variationAxes).sort(([T],[B])=>T.localeCompare(B))),w=g.map(T=>{let B=y(T.xAdvance??0),m=y(T.yAdvance??0),D={id:T.codepoint,cluster:T.cluster,originX:h,originY:b,advanceX:B,advanceY:m,offsetX:y(T.xOffset??0),offsetY:y(T.yOffset??0),outline:x.get(T.codepoint)??(()=>{let W=this.#w(d,T.codepoint,v);return x.set(T.codepoint,W),W})()};return h=Gn(h+B),b=Gn(b+m),D}),z=u.hExtents(),L=Ba({text:s,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:w,clusters:yh(s,w),fontSpans:w.length===0?[]:[{glyphStart:0,glyphEnd:w.length,font:r.font,fallbackIndex:null}],metrics:{ascent:y(z.ascender),descent:y(-z.descender),lineGap:y(z.lineGap)}},r),M=Bh(L);if(M>this.#s)throw new He("shapedRunOverLimit",{limit:this.#s,actual:M});let F=Oh(o,M);if(F>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),L;for(;this.#t.size>=this.#b||this.#r+F>this.#h;){let T=this.#t.keys().next().value;if(T===void 0)break;let B=this.#t.get(T);this.#t.delete(T),this.#r-=B.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:L,bytes:F}),this.#r+=F,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),L}catch(d){throw d instanceof He?d:new He("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},Ch=(e={})=>new Nl(Hm(),e);var Z=(e,n,t)=>e>=n&&e<=t,Oa=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},kh=e=>{if(Z(e,65313,65338)||Z(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(Z(e,1424,1535)||Z(e,64285,64335))return {slot:"cs",script:"Hebr"};if(Z(e,1536,1791)||Z(e,1872,1919)||Z(e,2160,2207)||Z(e,2208,2303)||Z(e,64336,65023)||Z(e,65136,65279)||Z(e,126464,126719))return {slot:"cs",script:"Arab"};if(Z(e,4352,4607)||Z(e,11904,12351)||Z(e,12352,12543)||Z(e,12544,12687)||Z(e,12784,12799)||Z(e,13312,19903)||Z(e,19968,40959)||Z(e,44032,55215)||Z(e,63744,64255)||Z(e,65382,65437)||Z(e,65440,65500)||Z(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(Z(e,2304,2431)||Z(e,43232,43263))return {slot:"cs",script:"Deva"};if(Z(e,2432,2559))return {slot:"cs",script:"Beng"};if(Z(e,880,1023)||Z(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(Z(e,1024,1327)||Z(e,7296,7311)||Z(e,11744,11775)||Z(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(Z(e,3584,3711))return {slot:"cs",script:"Thai"};if(Z(e,6016,6143)||Z(e,6624,6655))return {slot:"cs",script:"Khmr"};if(Z(e,768,879)||Z(e,6832,6911)||Z(e,7616,7679)||Z(e,8400,8447)||Z(e,8192,8303)||Z(e,65056,65071)||e<=47||Z(e,58,64)||Z(e,91,96)||Z(e,123,191)||e===5760||Z(e,8192,11263)||Z(e,65024,65039)||Z(e,65280,65381)||Z(e,65438,65439)||Z(e,65501,65535)||Z(e,126976,129791)||Z(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(Z(e,192,687)||Z(e,7424,7551)||Z(e,7552,7615)||Z(e,7680,7935)||Z(e,11360,11391)||Z(e,42784,43007)||Z(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Oa(e)};function Lh(e,n,t){let r=[];for(let l=0;l<e.length;){let s=e.codePointAt(l),d=l+(s>65535?2:1);r.push({from:l,to:d,classified:kh(s)}),l=d;}let o=null;for(let l of r)l.classified?o=l.classified:o&&(l.classified=o);o=null;for(let l=r.length-1;l>=0;l-=1){let s=r[l];s.classified?o=s.classified:o&&(s.classified=o);}let a=[],i=r.every(({from:l})=>e.codePointAt(l)<=127)?"ascii":"hAnsi";for(let l of r){let s=t.levels[n+l.from]??0,d=(s&1)===1?"rtl":"ltr",c=l.classified??{slot:i,script:"Zyyy"},u=a.at(-1);u&&u.to===l.from&&u.bidiLevel===s&&u.slot===c.slot&&u.script===c.script?a[a.length-1]={...u,to:l.to}:a.push({from:l.from,to:l.to,direction:d,bidiLevel:s,script:c.script,slot:c.slot});}return a}var Eh="und";function Mh(){return typeof Intl.Segmenter=="function"}function Nh(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function Fh(){let e=new(Nh())("und",{granularity:"grapheme"});return {segment(n){let t=[],r=0;for(let o of e.segment(n)){let a=o.index,i=a+o.segment.length;t.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return t}}}var _l=Fh(),zl=_l,eu=0;function Hl(){return eu}var vr=null,Zt=null,Ca=null,xo=null;function Mn(e){if(vr===e&&Zt)return Zt;if(Ca===e&&xo){let t=xo;return Ca=vr,xo=Zt,vr=e,Zt=t,t}let n=zl.segment(e);return Ca=vr,xo=Zt,vr=e,Zt=n,n}function Ah(e){zl=e,nu();}function Dh(){zl=_l,nu();}function nu(){eu+=1,vr=null,Zt=null,Ca=null,xo=null,Al=null,ka=null,Dl=0;}function _h(e){return Mn(e).length}var Al=null,ka=null,Dl=0;function zh(e){if(Al===e&&ka)return {offsets:ka,count:Dl};let n=Mn(e),t=new Int32Array(e.length+1);for(let r of n)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)t[o]=r.index;return t[e.length]=n.length,Al=e,ka=t,Dl=n.length,{offsets:t,count:n.length}}function La(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=zh(e);return r[t]}function Hh(e,n){let t=Mn(e);if(t.length===0)return 0;let r=Math.max(0,Math.min(n,t.length));return r>=t.length?e.length:t[r].utf16From}function jl(e){let n=new Set([0,e.text.length]);for(let r of Mn(e.text))n.add(r.utf16From),n.add(r.utf16To);let t=new Set([0,e.text.length]);for(let r of e.clusters)t.add(r.textStart),t.add(r.textEnd);return [...n].filter(r=>t.has(r)).sort((r,o)=>r-o)}function Ea(e,n){return jl(e).includes(n)}function jh(e,n){return Ea(e,n)}function Wh(e,n,t){return t>=n&&Ea(e,n)&&Ea(e,t)}function Gh(e){let n=Mn(e.text);return jl(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var Gl="und";function au(){return typeof Intl.Segmenter=="function"}function $h(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Gl})`);return e}function iu(){let e=new($h())(Gl,{granularity:"word"});return {segment(n){let t=[];for(let r of e.segment(n)){let o=r.index,a=o+r.segment.length;t.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return t}}}var Xh=/^[\p{L}\p{N}']$/u,Vh=/^\s$/u;function tu(e){return Xh.test(e)}function ru(e){return Vh.test(e)}function Wl(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function lu(e){let n=Mn(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(ru(o.text)){let a=r+1;for(;a<n.length&&ru(n[a].text);)a+=1;t.push(Wl(n,r,a,false)),r=a;continue}if(tu(o.text)){let a=r+1;for(;a<n.length&&tu(n[a].text);)a+=1;t.push(Wl(n,r,a,true)),r=a;continue}t.push(Wl(n,r,r+1,false)),r+=1;}return t}function su(){return {segment:lu}}function du(e={}){let n=e.isIntlAvailable??au,t=e.createIntlBoundary??iu,r=e.createFallbackBoundary??su;if(!n())return r();try{return t()}catch{return r()}}var ou;function cu(){return ou??=du(),ou}function Yh(e,n=cu()){return n.segment(e)}function Kh(e,n){return n.map(t=>({graphemeFrom:La(e,t.utf16From),graphemeTo:La(e,t.utf16To),wordLike:t.wordLike}))}var Ma=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},Br=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},Or=e=>(Ma(e.resourceEpoch,"resourceEpoch"),Ma(e.configEpoch,"configEpoch"),Ma(e.producerVersion,"producerVersion"),Br(e.extensionFingerprint,"extensionFingerprint"),Br(e.shapingHash,"shapingHash"),Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})),Uh=(e,n)=>{let t=Or(e),r=Or(n),a=["resourceEpoch","configEpoch","extensionFingerprint","shapingHash","producerVersion"].filter(i=>t[i]!==r[i]);return a.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(a)})},$l=e=>{let n=e.map(({key:t,fingerprint:r})=>(Br(t,"resource dependency key"),Br(r,"resource dependency fingerprint"),Object.freeze({key:t,fingerprint:r}))).sort((t,r)=>t.key<r.key?-1:t.key>r.key?1:0);for(let t=1;t<n.length;t+=1)if(n[t-1].key===n[t].key)throw new TypeError(`Duplicate resource dependency: ${n[t].key}`);return Object.freeze(n)},Zh=e=>(Ma(e.revision,"revision"),Br(e.dependencyFingerprint,"dependencyFingerprint"),Br(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:$l(e.resourceDependencies),...Or(e)})),qh=(e,n)=>{let t=$l(e),r=$l(n),o=Math.max(t.length,r.length);for(let a=0;a<o;a+=1){let i=t[a],l=r[a];if(i?.key!==l?.key||i?.fingerprint!==l?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??l.key}}return null};function Jh(e,n){if(e.dependencyFingerprint!==n.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==n.inputFingerprint)return {hit:false,reason:"input-changed"};let t=qh(e.resourceDependencies,n.resourceDependencies);if(t)return t;let r=["configEpoch","extensionFingerprint","shapingHash","producerVersion"];for(let o of r)if(e[o]!==n[o])return {hit:false,reason:"epoch-changed",epoch:o};return null}var Xl=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=Jh(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:Zh(r)});}evictEpoch(n){let t=Or(n),r=0;for(let[o,a]of this.entries){let i=a.provenance;(i.configEpoch!==t.configEpoch||i.extensionFingerprint!==t.extensionFingerprint||i.shapingHash!==t.shapingHash||i.producerVersion!==t.producerVersion)&&(this.entries.delete(o),r+=1);}return r}evictResources(n,t){let r=Or(n),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>t.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};var So=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});function Rn(e,n=false){return uu(e.fragments,n)}function uu(e,n=false){let t=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){t.push(a);continue}for(let i of a.rows)if(!(i.isHeaderRepeat&&!n))for(let l of i.cells)r(l.blocks);}};return r(e),t}function fu(e){let n=[];for(let t of e.pages)for(let r of Rn(t))n.push(...r.lines);return n}function Gw(e){return e.anchoredDrawings??[]}function Qh(e,n){let t=[];for(let r of e.pages)for(let o of Rn(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function ey(e,n,t){for(let r of fu(e))if(r.range.paragraphId===n&&t>=r.range.start&&t<=r.range.end)return r;return null}function Vl(e){return e.contentControls??[]}function Na(e){if(e.length===0)return null;let n=1/0,t=1/0,r=-1/0,o=-1/0;for(let a of e)n=Math.min(n,a.x),t=Math.min(t,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:n,y:t,width:r-n,height:o-t}}function Yl(e){let n=false,t=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(n=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(t=true);return n&&t?"sdtContentLocked":n?"contentLocked":t?"sdtLocked":"unlocked"}var pu=1,Fa=1;function Cr(e){let n=Math.max(e,1),t=3;if(n>=t){let i=n/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:n,insetPt:0}}let r=1,o=1,a=Math.max(n,t);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(n-a)/2}}var ny=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function ty(e){return ny.has(e)}function gu(e,n){return ty(e)?Cr(n).extentPt:n}function Zl(e){return e.some(n=>n.localName==="pageBreakBefore"&&n.attributes?.val!=="0"&&n.attributes?.val!=="false")}var hu=31680/20,Ro=12,yu=3168,bu=14,Lr=Object.freeze({rule:"auto",value:240}),ry=132,oy=1584,xu=["top","left","bottom","right","between","bar"],ay=Object.freeze({}),iy=/^[0-9A-Fa-f]{6}$/,ly=new Set(["nil","none"]);function Aa(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function Kl(e,n){return !Number.isFinite(e)||e<=0?0:e>n?n:e}function mu(e){let n=Aa(e,true);return n===null?0:Kl(n/20,hu)}function Ul(e){return e!=="0"&&e!=="false"&&e!=="off"}function sy(e){return e===void 0||e==="auto"?null:iy.test(e)?e.toUpperCase():null}function wo(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Vn(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function ql(e,n){let t=0,r=0,o=false,a=false;for(let i of e){if(i.localName!=="spacing")continue;let l=i.attributes?.before,s=i.attributes?.after;l!==void 0&&(t=mu(l)),s!==void 0&&(r=mu(s));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=Ul(d)),c!==void 0&&(a=Ul(c));}if(o||a){let i=n?.inList||n?.inTableCell?0:bu;o&&(t=i),a&&(r=i);}return {before:t,after:r}}function Jl(e){let n,t;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(n=i);let l=a.attributes?.line;if(l!==void 0){let s=Aa(l,true);s!==null&&(t=s);}}if(t===void 0)return Lr;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,ry)*240}:Lr}let o=t/20;return o>0?{rule:r,value:Math.min(o,oy)}:Lr}function Ql(e,n,t){let r=e.rule==="auto"?n*(e.value/240):e.rule==="exact"?e.value:Math.max(n,e.value),o=r-n;return o<0?{height:r,baseline:Math.max(0,Math.min(t,r))}:e.rule==="exact"?{height:r,baseline:t+o/2}:{height:r,baseline:t}}function es(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r===void 0||Ul(r);}return n}function kr(e){if(!e)return;let n=wo(e,"val");if(!n||ly.has(n))return;let t=Aa(wo(e,"sz")),r=t===null?.5:Kl(t/8,Ro)||.5,o=Aa(wo(e,"space")),a=o===null?0:Kl(o,yu),i=wo(e,"shadow"),l=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:sy(wo(e,"color")),widthPt:r,spacePt:a,...l?{shadow:true}:{}}}function Su(e){let n=kr(Vn(e,"top")),t=kr(Vn(e,"left")??Vn(e,"start")),r=kr(Vn(e,"bottom")),o=kr(Vn(e,"right")??Vn(e,"end")),a=kr(Vn(e,"between")),i=kr(Vn(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function st(e){if(!e||e.kind==="textValue")return {};let n=Vn(e,"pBdr");return n?Su(n):{}}function Po(e){let n=ay;for(let t of e){if(!t||t.kind==="textValue")continue;let r=Vn(t,"pBdr");r&&(n=Su(r));}return n}function fn(e){return gu(e.val,e.widthPt)}function Tt(e){return e?e.spacePt+fn(e):0}function dy(e){return Tt(e)}function ns(e){let n=[];for(let t of xu){let r=e[t];r&&n.push(`${t}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return n.join("|")}function Er(e,n){return Math.max(e,n)-n}function ts(e,n,t,r){return t&&!r?0:Er(e,n)}var cy=/^[0-9A-Fa-f]{6}$/;function Da(e){if(!(e===void 0||e==="auto"||e==="nil")&&cy.test(e))return e.toUpperCase()}function Io(e){if(e&&e.val!=="nil")return Da(e.fill)}function rs(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return Io(n)}function os(e){let n;for(let t of e)t.localName==="shd"&&(n=Io(t.attributes));return n}function To(e,n,t){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:n,y:r,width:t,height:Math.max(o.y+o.height-r,0)}}var uy=64,fy=31680,py=720,gy=36,as=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),Mr=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),my=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),hy=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function vo(e){return e.kind!=="textValue"}function _a(e,n){return e.attributes.find(t=>t.localName===n)?.value}function is(e,n){for(let t of e.children)if(vo(t)&&t.localName===n)return t}function wu(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function yy(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function Ru(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!vo(r)||r.localName!=="tab")continue;let o=yy(wu(_a(r,"pos"))??NaN);if(o===null)continue;let a=_a(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=my.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let l=_a(r,"leader");e.set(o,{alignment:i,...l!==void 0&&hy.has(l)?{leader:l}:{}});}}function Pu(e,n=36){let t=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<t.length&&o<64;o+=1){let[a,i]=t[o];r.push({positionPt:a/20,alignment:i.alignment,...by(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function by(e){return e.leader?{leader:e.leader}:{}}function ls(e){let n=new Map;for(let t of e)!t||!vo(t)||Ru(n,is(t,"tabs"));return Pu(n)}function ss(e){if(!e||!vo(e))return Mr;let n=new Map;return Ru(n,is(e,"tabs")),Pu(n)}function Bo(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function xy(e){if(!e||!vo(e))return 36;let n=is(e,"defaultTabStop");if(!n)return 36;let t=wu(_a(n,"val"));return t===null||t<=0||t>31680?36:t/20}function Nr(e,n,t){let r=Math.max(n,t);for(let i of e.stops)if(i.positionPt>n)return {positionPt:Math.min(i.positionPt,r),alignment:i.alignment,...i.leader?{leader:i.leader}:{}};let o=e.defaultIntervalPt>0?e.defaultIntervalPt:36,a=Math.ceil((n+1e-9)/o)*o;return a<=n&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function ds(e,n,t,r,o){let a=t;switch(e){case "center":a=t-r/2;break;case "right":a=t-r;break;case "decimal":a=t-o;break;default:a=t;}let i=a-n;return i>0?i:0}function qt(e){return `tabs(${e.stops.map(t=>`${t.alignment}@${Math.round(t.positionPt*1e3)}${t.leader?`/${t.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var Oo=256,cs=4,Iu=4096,vt=64,za=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),Sy=/\s*\\\*\s*MERGEFORMAT\s*$/i;function Tu(e){if(e.length>Oo)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>Oo?null:n.replace(Sy,"").trim()}function Fr(e){let n=Tu(e);return n==="PAGE"||n==="NUMPAGES"||n==="SECTIONPAGES"?n:null}function pn(e,n){return ec(e,n)}function Jt(e){return fc(e)}function us(){return {nodes:0,exhausted:false}}function dt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>Iu?(e.exhausted=true,false):true)}function ko(){return {nesting:0,instruction:"",instructionOverflow:false,nestingOverflow:false,phase:"idle"}}function Co(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="idle";}function Lo(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="instruction"),e.nesting+=1,e.nesting>cs&&(e.nestingOverflow=true);}function wy(e,n){if(!(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)){if(e.instruction.length+n.length>Oo){e.instructionOverflow=true,e.instruction="";return}e.instruction+=n;}}function Eo(e,n,t,r){if(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)return;if(r>vt){e.instructionOverflow=true,e.instruction="";return}let o=[],a=n.kind==="textValue"?[]:n.children??[];for(let i=a.length-1;i>=0;i-=1)o.push({node:a[i],depth:r+1});for(;o.length>0;){let i=o.pop();if(!dt(t)){e.instructionOverflow=true,e.instruction="";return}if(i.depth>vt){e.instructionOverflow=true,e.instruction="";return}if(i.node.kind==="textValue"){if(wy(e,i.node.value),e.instructionOverflow)return;continue}let l=i.node.children??[];for(let s=l.length-1;s>=0;s-=1)o.push({node:l[s],depth:i.depth+1});}}function Mo(e){return e.nesting!==1||e.phase!=="instruction"||(e.phase="result",e.instructionOverflow||e.nestingOverflow)?null:Fr(e.instruction)}function No(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&Co(e);}function Ha(e){return e.phase==="instruction"&&e.nesting>=1}function vu(e){return e.phase==="result"&&e.nesting>=1}function fs(e){let n=false,t=false,r=false,o=us(),a=ko(),i=()=>n&&t&&r,l=u=>{u==="PAGE"?n=true:u==="NUMPAGES"?t=true:r=true;},s=(u,f)=>{if(u.kind!=="runProperties"){if(pn(u,"begin")){Lo(a);return}if(Jt(u)){Eo(a,u,o,f);return}if(pn(u,"separate")){let p=Mo(a);p&&l(p);return}pn(u,"end")&&No(a);}},d=(u,f)=>{if(u.kind==="run")for(let p of u.children){if(!dt(o))return;if(s(p,f+1),(p.kind==="drawing"||p.kind==="generic")&&!Jt(p)&&"children"in p&&p.children.length>0){let g={...a};c(p,f+1),Object.assign(a,g);}if(i()||o.exhausted)return}},c=(u,f)=>{if(!i()&&dt(o)&&!(f>vt)&&u.kind!=="textValue"){if(u.kind==="paragraph"){Co(a);for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return;Co(a);return}if(u.kind==="run"){d(u,f);return}if(gc(u)){let p=Fr(ic(u)??"");if(p){l(p);return}}for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return}};return c(e,0),!n&&!t&&!r?za:{hasPage:n,hasNumPages:t,hasSectionPages:r}}var Ry=64,Py=64,Iy=[{value:1e3,glyph:"M"},{value:900,glyph:"CM"},{value:500,glyph:"D"},{value:400,glyph:"CD"},{value:100,glyph:"C"},{value:90,glyph:"XC"},{value:50,glyph:"L"},{value:40,glyph:"XL"},{value:10,glyph:"X"},{value:9,glyph:"IX"},{value:5,glyph:"V"},{value:4,glyph:"IV"},{value:1,glyph:"I"}];function ct(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function Bt(e){return String(ct(e))}function Bu(e){let n=ct(e);return n<10?`0${n}`:String(n)}function ps(e){let n=ct(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of Iy)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function Ou(e){return ps(e).toLowerCase()}function gs(e){let n=ct(e),t="";for(;n>0&&t.length<8;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t||"A"}function Cu(e){return gs(e).toLowerCase()}function Ty(e){let n=ct(e),t=n%100,r=n%10,o=t>=11&&t<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${n}${o}`}function vy(e){return ct(e).toString(16).toUpperCase()}function By(e){let n=["*","\u2020","\u2021","\xA7"],t=ct(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,Oy);return n[r].repeat(o)}var Oy=8,ja=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Cy=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Wa(e){let n=ct(e);if(n<20)return ja[n];if(n<100){let r=n%10;return Cy[Math.floor(n/10)]+(r===0?"":`-${ja[r]}`)}if(n<1e3){let r=n%100;return `${ja[Math.floor(n/100)]} hundred${r===0?"":` ${Wa(r)}`}`}let t=n%1e3;return `${ja[Math.floor(n/1e3)]} thousand${t===0?"":` ${Wa(t)}`}`}function ku(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function ky(e){return ku(Wa(e))}var Ly=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function Ey(e){let n=Ly.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function My(e){let n=Wa(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return ku(r+Ey(n.slice(t+1)))}function ut(e,n){switch(e){case "decimal":return Bt(n);case "decimalZero":return Bu(n);case "upperRoman":return ps(n);case "lowerRoman":return Ou(n);case "upperLetter":return gs(n);case "lowerLetter":return Cu(n);case "ordinal":return Ty(n);case "cardinalText":return ky(n);case "ordinalText":return My(n);case "hex":return vy(n);case "chicago":return By(n);case "numberInDash":return `- ${Bt(n)} -`;case "none":case "bullet":return "";default:return Bt(n)}}function ms(e,n,t){let r=e.length>64?e.slice(0,64):e,o="";for(let a=0;a<r.length&&!(o.length>=64);a+=1){let i=r[a];if(i==="%"&&a+1<r.length){let l=r[a+1];if(l>="1"&&l<="9"){let s=Number(l)-1,d=t[s]??"decimal",c=n[s]??1,u=d==="bullet"?"":ut(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}function hs(e,n){if(!Number.isFinite(e)||e<0)return "";let t=Math.floor(e),r=n&&n.length>0?n:"decimal";if(r==="none"||r==="bullet")return Bt(t);let o=ut(r,t);return o.length>0?o:Bt(t)}function Ar(e,n){if(e==="PAGE")return hs(n.pageNumber,n.format);let t=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;return !Number.isFinite(t)||t<0?"":Bt(Math.floor(t))}function Ot(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function ys(e,n=za){if(!e||!Ot(n))return "";let t=[];return n.hasPage&&(t.push(`p${e.pageNumber}`),e.format&&t.push(`f${e.format}`)),n.hasNumPages&&t.push(`n${e.pageCount}`),n.hasSectionPages&&t.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${t.join("/")}`}function Dr(e,n,t,r){let o=false,a=e.map((i,l)=>{let s=n+l,d=i.pageFieldSource;return d&&d.pageNumber===s&&d.sectionPageCount===t&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:s,sectionPageCount:t,...r?{format:r}:{}}})});return o?a:e}function Ct(e){let n=e.pages.length;if(n===0)return e;let t=false,r=e.pages.map(o=>{let a=o.pageFieldSource,i={pageNumber:a?.pageNumber??o.index+1,pageCount:n,sectionPageCount:a?.sectionPageCount??n,...a?.format?{format:a.format}:{}},l=c=>{if(!c?.pageFieldProjector)return c;t=true;let u=c.pageFieldProjector(i),{pageFieldProjector:f,...p}=u;return p},s=l(o.header),d=l(o.footer);return s===o.header&&d===o.footer?o:{...o,...s!==void 0?{header:s}:{},...d!==void 0?{footer:d}:{}}});return t?{revision:e.revision,pages:r}:e}var Yn=Object.freeze({fontFamily:null,fontSizePt:10,color:null,bold:false,italic:false,underline:null,strike:false,doubleStrike:false,highlight:null,shading:null,verticalAlign:"baseline",baselineShiftPt:0,caps:false,smallCaps:false,characterSpacingPt:0,horizontalScalePercent:100,kerningMinPt:0,hidden:false}),Ny=/^[0-9A-Fa-f]{6}$/;function kt(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function Fo(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function Lu(e){return e===void 0||e==="auto"?null:Ny.test(e)?e.toUpperCase():null}function Eu(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function dn(e,n){let t={...Yn};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?Eu(o?.asciiTheme,n)??Eu(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=Fo(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=Lu(r.attributes?.val);break}case "b":t.bold=kt(r);break;case "i":t.italic=kt(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!kt(r)?null:{variant:o,color:Lu(r.attributes?.color)};break}case "strike":t.strike=kt(r);break;case "dstrike":t.doubleStrike=kt(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=Io(r.attributes)??null;break}case "vertAlign":{let o=r.attributes?.val;o==="superscript"||o==="subscript"?t.verticalAlign=o:o==="baseline"&&(t.verticalAlign="baseline");break}case "position":{let o=Fo(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=kt(r);break;case "smallCaps":t.smallCaps=kt(r);break;case "spacing":{let o=Fo(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=Fo(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=Fo(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=kt(r);break;}return t}function Lt(e,n){return n.caps?e.toUpperCase():e}function Kn(e,n,t){return t.measure(Lt(e,n),n)}function Fy(e,n){return e.fontFamily===n.fontFamily&&e.fontSizePt===n.fontSizePt&&e.color===n.color&&e.bold===n.bold&&e.italic===n.italic&&e.strike===n.strike&&e.doubleStrike===n.doubleStrike&&e.highlight===n.highlight&&e.shading===n.shading&&e.verticalAlign===n.verticalAlign&&e.baselineShiftPt===n.baselineShiftPt&&e.caps===n.caps&&e.smallCaps===n.smallCaps&&e.characterSpacingPt===n.characterSpacingPt&&e.horizontalScalePercent===n.horizontalScalePercent&&e.kerningMinPt===n.kerningMinPt&&e.hidden===n.hidden&&e.underline?.variant===n.underline?.variant&&e.underline?.color===n.underline?.color}function bs(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var ft="all-markup",Mu=Object.freeze([]),Ay=32,Dy={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function _r(e,n){for(let t of e.attributes)if(t.localName===n&&t.namespaceUri===e.namespaceUri&&(t.kind==="wmlVal"||t.kind==="genericExtension"||t.kind==="xmlSpace"))return t.value}function Ga(e){if(e.kind==="textValue")return null;let n=Dy[e.kind];if(n===void 0)return null;let t=_r(e,"date");return {kind:n,id:_r(e,"id")??"",author:_r(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function $a(e,n){return e.length===0?[n]:[...e,n]}function Xa(e){return e.kind!=="textValue"&&qa$1(e.kind)}var zr=Ay;function Un(e,n){if(n==="all-markup"||e.length===0)return true;for(let t of e)if(n==="proposed"?t.kind==="delete"||t.kind==="moveFrom":t.kind==="insert"||t.kind==="moveTo")return false;return true}function xs(e){if(e.kind==="textValue")return null;let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n||n.kind==="textValue")return null;let t=n.children.find(r=>r.kind==="runProperties");if(!t||t.kind==="textValue")return null;for(let r of t.children){if(r.kind==="textValue"||r.namespaceUri!==la$1)continue;let o=r.localName==="ins"?"insert":r.localName==="del"?"delete":null;if(o===null)continue;let a=_r(r,"date");return {kind:o,id:_r(r,"id")??"",author:_r(r,"author")??"",...a===void 0?{}:{date:a},nodeId:r.id}}return null}function _y(e){for(let n of e){if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")continue;let t=n.attributes??{},r=t.date;return {kind:"format",id:t.id??"",author:t.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function pt(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}function zy(e){if(!e||e.kind==="textValue")return [];let n=[];for(let t of e.children){if(t.kind==="textValue")continue;let r={};for(let o of t.attributes)r[o.localName]=o.value;n.push(Object.keys(r).length>0?{localName:t.localName,attributes:r}:{localName:t.localName});}return n}function Hy(e,n,t){let r=zy(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}function jy(e){if(e.kind==="text"||e.kind==="deletedText"){let n="";for(let t of e.children)t.kind==="textValue"&&(n+=t.value);return n}return e.kind==="tab"?" ":e.kind==="hardBreak"?Zb$1(e):""}function Nu(e){let{simple:n,depth:t,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:l,cascadeRuns:s,themeFonts:d}=e,c="",u,f,p=ko(),g=null,y=false,h=false,b=false,x=(z,L)=>{u||(u=z,f=L);},v=()=>{!g||!r||h&&!b||(c+=Ar(g,r));},w=(z,L,M)=>{if(!(z.kind==="textValue"||L>vt)){for(let F of z.children)if(F.kind!=="textValue"){if(!dt(o))return;if(F.kind==="run"){let T=Hy(F,l,s),B=dn(T,d);for(let m of F.children){if(m.kind==="runProperties")continue;if(pn(m,"begin")){Lo(p),p.nesting===1&&(g=null,y=false,h=false,b=false);continue}if(Jt(m)){Ha(p)&&Eo(p,m,o,L+1);continue}if(pn(m,"separate")){let S=Mo(p);S&&r?(g=S,y=true,h=false,b=false):(g=null,y=false);continue}if(pn(m,"end")){p.nesting===1&&y&&v(),No(p),g=null,y=false,h=false,b=false;continue}if(lc(m))continue;let D=jy(m);if(D.length===0)continue;let W=pt(M),V=B.hidden||!Un(M,i)||m.kind==="deletedText"&&!W;if(y){h=true,V||(b=true,x(T,B));continue}V||(x(T,B),c+=D);}continue}if(gc(F)){let T=Fr(ic(F)??"");if(T&&r){if(!Un(M,i))continue;let B=c.length;w(F,L+1,M),c=c.slice(0,B),c+=Ar(T,r);continue}w(F,L+1,M);continue}if(F.kind==="hyperlink"){w(F,L+1,M);continue}if(Xa(F)&&M.length<zr){let T=Ga(F);w(F,L+1,T?$a(M,T):M);continue}w(F,L+1,M);}}};return w(n,t,a),y&&(g=null,y=false),{text:c,resultProps:u,resultStyle:f}}function Qt(e,n,t){if(t<=n)return;let r=e[e.length-1];if(r&&r.end>=n){r.end=Math.max(r.end,t);return}e.push({start:n,end:t});}var Wy=new Set(["left","center","right"]),Gy=new Set(["margin","indent","leftMargin"]),$y=new Set(["dot","hyphen","underscore","middleDot"]);function Fu(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==la$1)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===la$1&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:Wy.has(n)?n:"left",relativeTo:Gy.has(t)?t:"margin",...r!==void 0&&$y.has(r)?{leader:r}:{}}}Object.freeze({marks:Object.freeze(new Map)});function er(e,n){return ad$1(e,n)}function Ss(e,n){if(!rd$1(e))return null;if(hd$1(e)||id$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=fd$1(e),r=nd$1(e)??od$1(e);if(!r)return null;let o=kd$1(e),a=o!==null?er(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?Xy(a,r)??null:null,l=a,s=l!==void 0?t?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...s?{nav:s}:{},...l?{scopeId:l}:{}};if(t&&o!==null&&pd$1(e))return {text:"",...d};if(!n||!a)return {text:"",...d};let c=n.marks.get(a);return c==null?{text:"",...d}:n.reservedMarkText&&n.reservedMarkText.length>0?{text:c,measureText:n.reservedMarkText,...d}:{text:c,...d}}function Xy(e,n){let t=`${n}:`;if(!e.startsWith(t))return null;let r=e.slice(t.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function Au(e){return fd$1(e)||gd$1(e)||hd$1(e)||id$1(e)}function Vy(e,n,t){let r=Ao(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}function Ao(e){if(!e||e.kind==="textValue")return [];let n=[];for(let t of e.children){if(t.kind==="textValue")continue;let r={};for(let o of t.attributes)r[o.localName]=o.value;n.push(Object.keys(r).length>0?{localName:t.localName,attributes:r}:{localName:t.localName});}return n}function Du(e){if(e.kind==="text"||e.kind==="deletedText"){let n="";for(let t of e.children)t.kind==="textValue"&&(n+=t.value);return n}return e.kind==="tab"?" ":e.kind==="hardBreak"?Zb$1(e):""}function _u(e,n=[],t,r,o,a,i=ft,l,s,d){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let c=[],u=0,f,p=nc(e,{maxNesting:cs,maxInstructionChars:Oo}),g=p.filter(S=>S.addressing==="atomic"),y=new Set(g.filter(S=>S.kind==="complex").map(S=>S.node.id)),h=new Set(p.filter(S=>S.kind==="complex"&&S.addressing==="editable-result").map(S=>S.node.id)),b=new Set;for(let S of g)for(let I of S.removeNodeIds)b.add(I);let x=ko(),v=us(),w=null,z=null,L=Mu,M=(S,I,O,N,C,_,E)=>{if(S.length===0&&!N&&!E?.inlineDrawing)return;let X=E?.linkOverride??f,H=E?.revisionsOverride??L,K=X?{link:X}:{},G=H.length===0?{}:{revisions:H};if(N){c.push({text:S,props:I,style:O,start:C,end:_,projected:true,...E?.measureText!==void 0?{measureText:E.measureText}:{},...E?.noteNav?{noteNav:E.noteNav}:{},...E?.inlineDrawing?{inlineDrawing:E.inlineDrawing}:{},...E?.fieldAtom?{fieldAtom:E.fieldAtom}:{},...K,...G});return}S.length!==0&&c.push({text:S,props:I,style:O,start:C,end:_,...E?.positionalTab?{positionalTab:E.positionalTab}:{},...E?.breakKind?{breakKind:E.breakKind}:{},...K,...G});},F=()=>{if(!w||!w.atomic){w=null,z=null;return}let S=w.atomStart,I=S+1;if(w.style.hidden){w=null,z=null;return}if(!Un(w.resultRevisions,i)){l&&pt(w.resultRevisions)&&Qt(l,S,I),w=null,z=null;return}let O={...w.resultRevisions.length>0?{revisionsOverride:w.resultRevisions}:{},...w.resultLink?{linkOverride:w.resultLink}:{},fieldAtom:{formField:w.formField}};if(w.kind&&t){let N=Ar(w.kind,t);M(N,w.props,w.style,true,S,I,O);}else w.cachedText.length>0&&M(w.cachedText,w.props,w.style,true,S,I,O);w=null,z=null;},T=()=>{if(w){if(w.atomic){u=w.atomStart;for(let S of w.buffered)c.push({...S,start:u,end:u+(S.end-S.start)}),u+=S.end-S.start;w.cachedText.length>0&&w.buffered.length===0&&(M(w.cachedText,w.props,w.style,false,u,u+w.cachedText.length),u+=w.cachedText.length);}else {for(let S of w.buffered)c.push(S);u=w.bufferOffset;}w=null,z=null;}},B=(S,I,O)=>{let N=(H,K,G,U)=>{let se=pt(L),xe=O.hidden||!Un(L,i)||se;if(K.hidden||xe){if(se&&l&&Qt(l,G,U),!K.hidden)return;M("\uFFFC",I,O,true,G,U);return}M("\uFFFC",I,O,true,G,U,{inlineDrawing:Object.freeze({drawingNodeId:H,ownerPartName:s.ownerPartName,projection:K,resource:s.resourceOf(K)})});};if(S.kind==="drawing"){let H=u;u+=1;let K=u;if(!s)return;let G=s.projectionForAtom?.(S.id)??(S.kind==="drawing"?s.project(S):null);if(!G||G.kind!=="inline"){M("\uFFFC",I,O,true,H,K);return}N(S.id,G,H,K);return}if($a$1(S)){let H=u;u+=1;let K=u;if(!s)return;let G=s.projectionForAtom?.(S.id)??null;if(!G||G.kind!=="inline"){M("\uFFFC",I,O,true,H,K);return}N(S.id,G,H,K);return}if(Au(S)){let H=Ss(S,a),K=u,G=K+1;if(u=G,O.hidden||!H||H.text.length===0&&!H.measureText)return;let U=H.scopeId&&H.nav?{scopeId:H.scopeId,direction:H.nav}:void 0;M(H.text.length>0?H.text:H.measureText??"",I,O,true,K,G,{...H.measureText!==void 0?{measureText:H.measureText}:{},...U?{noteNav:U}:{}});return}let C=Fu(S);if(C){O.hidden||M(" ",I,O,false,u,u,{positionalTab:C});return}let _=Du(S);if(_.length===0)return;let E=pt(L);O.hidden||!Un(L,i)||S.kind==="deletedText"&&!E||M(_,I,O,false,u,u+_.length,{...S.kind==="hardBreak"?{breakKind:Xb$1(S)}:{}}),E&&l&&Qt(l,u,u+_.length),u+=_.length;},m=(S,I)=>{if(S.kind!=="run")return;let O=Vy(S,n,r),N=dn(O,d);for(let C of S.children){if(!dt(v)){if(T(),Co(x),C.kind==="runProperties"||pn(C,"begin")||pn(C,"separate")||pn(C,"end")||Jt(C)||b.has(C.id)&&z===null)continue;B(C,O,N);continue}if(C.kind!=="runProperties"){if(pn(C,"begin")){let _=y.has(C.id);Lo(x),x.nesting===1&&(T(),z=_?C.id:null,w={kind:null,atomic:_,editableResult:h.has(C.id),atomStart:u,props:O,style:N,capturedResultStyle:false,cachedText:"",buffered:[],bufferOffset:u,resultRevisions:L,capturedResultRevisions:L.length>0,formField:mc(C),...f?{resultLink:f}:{}},_&&(u+=1));continue}if(Jt(C)){Eo(x,C,v,I+1);continue}if(pn(C,"separate")){let _=x.nesting===1&&x.phase==="instruction",E=Mo(x);_&&w&&(w.kind=E&&t?E:null,w.props=O,w.style=N);continue}if(pn(C,"end")){let _=x.nesting===1;No(x),_&&(w?.atomic?F():T());continue}if(!(Ha(x)&&w?.atomic)){if(w&&vu(x)){let _=Du(C);if(_.length===0)continue;let E=pt(L),X=!Un(L,i)||C.kind==="deletedText"&&!E;if(E&&l&&(w.atomic?Qt(l,w.atomStart,w.atomStart+1):Qt(l,u,u+_.length)),X){w.atomic||(u+=_.length,w.bufferOffset=u);continue}if(w.atomic){if(N.hidden)continue;w.capturedResultStyle||(w.props=O,w.style=N,w.capturedResultStyle=true),w.capturedResultRevisions||(w.resultRevisions=L,w.capturedResultRevisions=true,!w.resultLink&&f&&(w.resultLink=f)),w.cachedText+=_;continue}if(N.hidden){u+=_.length,w.bufferOffset=u;continue}w.capturedResultStyle||(w.props=O,w.style=N,w.capturedResultStyle=true),w.buffered.push({text:_,props:O,style:N,start:u,end:u+_.length,...L.length>0?{revisions:L}:{},...f?{link:f}:{},...w.editableResult?{fieldAtom:{formField:w.formField}}:{}}),u+=_.length,w.bufferOffset=u;continue}b.has(C.id)&&z===null&&y.size>0,B(C,O,N);}}}};if(!dt(v))return c;let D=Va$1(),W=(S,I)=>{let O=u;if(u+=1,S.kind==="textValue"||(pt(L)&&l&&Qt(l,O,O+1),!Un(L,i)))return;let N=Nu({simple:S,depth:I,pageContext:t,budget:v,revisions:L,displayMode:i,inheritedRunProperties:n,cascadeRuns:r,themeFonts:d}),C=Fr(ic(S)??"");if(C&&t){let E=Ar(C,t),X=N.resultStyle??dn(n,d);X.hidden||M(E,N.resultProps??n,X,true,O,O+1,{fieldAtom:{formField:false}});return}if(N.text.length===0)return;let _=N.resultStyle??dn(n,d);_.hidden||M(N.text,N.resultProps??n,_,true,O,O+1,{fieldAtom:{formField:false}});},V=(S,I,O,N)=>{if(gc(S)){W(S,I);return}if(S.kind==="run"){m(S,I);return}if(Kb$1(S)){if(N>=Jb$1||I>vt)return;for(let X of Nb$1(S))V(X,I+1,O,N+1);return}if(I>vt||I>=zr)return;let C=S.kind!=="textValue"&&"localName"in S?Ua$1(O,S):O;if(S.kind==="hyperlink"){let X=f;f=o?.(S)??void 0;for(let H of S.children)V(H,I+1,C,N);f=X;return}if(!Xa(S))return;let _=Ga(S);if(!_||!dt(v))return;let E=L;L=$a(E,_);for(let X of S.children)V(X,I+1,C,N);L=E;};for(let S of e.children)V(S,1,D,0);return T(),c}function Yy(e){let n=Object.entries(e.attributes??{}).sort(([t],[r])=>t<r?-1:t>r?1:0).map(([t,r])=>`${t}=${r}`).join(",");return `${e.localName}(${n})`}function Ky(e){return e.map(Yy).join(";")}var zu=new WeakMap,ju=1<<18;function Wu(e){if(e.kind==="textValue")return `t:${e.value}`;let n=e.kind==="paragraph"||e.kind==="table";if(n){let r=zu.get(e);if(r!==void 0)return r}let t=Uy(e);return n&&t.length<=ju&&zu.set(e,t),t}function Uy(e){if(e.kind==="textValue")return `t:${e.value}`;let n=[`${e.kind}:${"localName"in e?e.localName:""}#${"id"in e?e.id:""}`];if("attributes"in e&&Array.isArray(e.attributes)){let t=[...e.attributes].map(r=>`${r.namespaceUri??""}:${r.localName}=${r.value}`).sort();for(let r of t)n.push(r);}for(let t of e.children??[])n.push(Wu(t));return `(${n.join("|")})`}var Hu=new WeakMap;function nr(e){let n=Math.round(e.width*1e3),t=e.drawingToken??"",r=e.exclusionToken??"",o=Ky(e.properties),a=Hu.get(e.paragraph);if(a&&a.producer===e.producer&&a.width===n&&a.drawingToken===t&&a.exclusionToken===r&&a.propertiesToken===o)return a.key;let i=[e.producer,n,t,r,o,Wu(e.paragraph)].join("\0");return i.length<=ju&&Hu.set(e.paragraph,{producer:e.producer,width:n,drawingToken:t,exclusionToken:r,propertiesToken:o,key:i}),i}function Zy(e={}){let n=Math.max(1,e.maxEntries??4096),t=new Map,r=0,o=0,a=0;return {get(i){let l=t.get(i);if(l===void 0){o+=1;return}return r+=1,t.delete(i),t.set(i,l),l},set(i,l){for(t.has(i)&&t.delete(i),t.set(i,l);t.size>n;){let s=t.keys().next();if(s.done)break;t.delete(s.value),a+=1;}},retain(i){for(let l of [...t.keys()])i.has(l)||(t.delete(l),a+=1);},clear(){t.clear();},get stats(){return {hits:r,misses:o,evictions:a,size:t.size}}}}var Gu=21600;function je(e){return Number.isFinite(e)?e:0}function Do(e){if(e.length===0)return Object.freeze([]);let n=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),t=[],r=n[0];for(let o=1;o<n.length;o+=1){let a=n[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(t.push(r),r=a);}return t.push(r),Object.freeze(t)}function qy(e,n){let t=[];for(let r of e)for(let o of n){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&t.push(Object.freeze({start:a,end:i}));}return Do(t)}function ws(e,n,t){let r=[];for(let o of e){let a=Math.max(o.start,n),i=Math.min(o.end,t);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return Do(r)}function Jy(e,n,t){let r=[],o=n;for(let a of e)a.start>o&&r.push(Object.freeze({start:o,end:a.start})),o=Math.max(o,a.end);return o<t&&r.push(Object.freeze({start:o,end:t})),Object.freeze(r)}function Xu(e,n){return Hr(e,n)}function Rs(e,n,t){return Xu(Hr(e,n),t)}function Qy(e,n){let t=[],r=Math.min(e.length,tn);if(r<2)return Object.freeze([]);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r],l=a.y,s=i.y;if(l===s)continue;let d=Math.min(l,s),c=Math.max(l,s);if(n<d||n>c||n===c&&s>l||n===d&&s<l)continue;let u=(n-l)/(s-l),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&t.push({x:f,delta:s>l?1:-1});}return t.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(t)}function eb(e,n){let t=[],r=Math.min(e.length,tn);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(n-a.y)>1e-6)continue;let l=Math.min(a.x,i.x),s=Math.max(a.x,i.x);s>l&&t.push(Object.freeze({start:l,end:s}));}return Do(t)}function $u(e,n,t){let r=nb(Qy(e,n),t),o=eb(e,n);return Do([...r,...o])}function nb(e,n){if(e.length===0)return Object.freeze([]);let t=[];if(n==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,l=e[a+1].x;l>i&&t.push(Object.freeze({start:i,end:l}));}return Object.freeze(t)}let r=0,o=null;for(let a of e){let i=r;r+=a.delta,i===0&&r!==0?o=a.x:i!==0&&r===0&&o!==null&&(a.x>o&&t.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(t)}function tb(e,n){return Object.freeze({top:je(e.top)+je(n.top),right:je(e.right)+je(n.right),bottom:je(e.bottom)+je(n.bottom),left:je(e.left)+je(n.left)})}function rb(e,n,t,r,o,a){let i=n.x-e.x,l=n.y-e.y,s=r.x-t.x,d=r.y-t.y,c=i*d-l*s;if(Math.abs(c)<1e-12)return null;let f=((t.x-e.x)*l-(t.y-e.y)*i)/c,p=((t.x-e.x)*d-(t.y-e.y)*s)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let g=e.y+f*l;return !Number.isFinite(g)||g<o-1e-6||g>a+1e-6?null:g}function ob(e,n,t,r){let o=[],a=Math.min(e.length,tn),i=Math.min(n.length,tn);if(a<2||i<2)return Object.freeze([]);let l=tn*tn,s=0;for(let d=0;d<a;d+=1){let c=e[d],u=e[(d+1)%a];for(let f=0;f<i;f+=1){if(s>=l)return Object.freeze(o);s+=1;let p=n[f],g=n[(f+1)%i],y=rb(c,u,p,g,t,r);y!==null&&o.push(y);}}return Object.freeze(o)}function ab(e,n,t){let r=new Set;r.add(n),r.add(t);for(let o of e){let a=Math.min(o.length,tn);for(let i=0;i<a;i+=1){let l=o[i].y;Number.isFinite(l)&&l>=n-1e-6&&l<=t+1e-6&&r.add(l);}for(let i=0;i<a;i+=1){let l=o[i],s=o[(i+1)%a],d=l.y,c=s.y;if(d!==c)for(let u of [n,t]){let f=Math.min(d,c),p=Math.max(d,c);u>=f&&u<=p&&r.add(u);}}}if(e.length>=2)for(let o of ob(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function ib(e,n,t,r){let o=$u(e,t,r);return n&&n.length>=3&&(o=qy(o,$u(n,t,"nonzero"))),o}function Vu(e,n,t,r,o=null){let a=je(t.top),i=je(t.bottom),l=je(t.left),s=je(t.right),d=n-i,c=n+a,u=ab(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((g,y)=>{if(y+1>=u.length)return [];let h=u[y+1];return h<=g+1e-6?[g]:[g,h,(g+h)/2]}):[d];for(let g of p){let y=ib(e,o,g,r);for(let h of y)f.push(Object.freeze({start:h.start-l,end:h.end+s}));}return Do(f)}function Yu(e){let{x:n,y:t,width:r,height:o}=e;return Object.freeze([Object.freeze({x:n,y:t}),Object.freeze({x:n+r,y:t}),Object.freeze({x:n+r,y:t+o}),Object.freeze({x:n,y:t+o})])}function lb(e){let n=Math.max(0,je(e.extentWidthPt)),t=Math.max(0,je(e.extentHeightPt)),r=Ya(e.transform,n,t),o=Math.min(e.polygonEmu.length,tn);if(o<3)return Yu({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/Gu,i=r.height/Gu,l=[];for(let s=0;s<o;s+=1){let d=e.polygonEmu[s];l.push(Object.freeze({x:je(d.x)*a,y:je(d.y)*i}));}return Ka({points:Object.freeze(l),sourceWidth:r.width,sourceHeight:r.height,offsetX:r.offsetX,offsetY:r.offsetY,crop:{left:0,top:0,right:0,bottom:0},transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:e.anchorX,anchorY:e.anchorY})}function sb(e,n){let t=n.effectInsets??Va,r=n.wrapDistances??Va,o=je(n.contentLeft),a=je(n.contentRight);if(n.mode==="topAndBottom"){let c=Xu(Hr(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ws([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=Rs(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ws([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:Yu(n.contentBounds),l=n.mode==="through"?"evenodd":"nonzero",s=tb(r,t),d=Vu(i,e,s,l,n.clipPolygon);return ws(d,o,a)}function db(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(n=>n.start)),end:Math.max(...e.map(n=>n.end))})}function cb(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=db(n);if(!a)return e;if(t==="left")return Object.freeze(e.filter(s=>s.end<=a.start+1e-4));if(t==="right")return Object.freeze(e.filter(s=>s.start>=a.end-1e-4));let i=Math.max(0,a.start-r),l=Math.max(0,o-a.end);return i===l?Object.freeze(e.filter(s=>s.start>=a.end-1e-4)):i>l?Object.freeze(e.filter(s=>s.end<=a.start+1e-4)):Object.freeze(e.filter(s=>s.start>=a.end-1e-4))}function Ku(e,n){let t=sb(e,n),r=Jy(t,n.contentLeft,n.contentRight);return cb(r,t,n.textSide,n.contentLeft,n.contentRight)}function ub(e,n,t,r){return t.length<3?false:Vu(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function Ps(e,n,t){let r=t.effectInsets??Va,o=t.hitBounds;if(e<o.x||e>o.x+o.width||n<o.y||n>o.y+o.height)return false;if(t.clipPolygon&&t.clipPolygon.length>=3)return ub(e,n,t.clipPolygon,r);let a=Hr(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Uu(e){let n=Object.freeze({top:je(e.wrapDistancesEmu.top/Zn),right:je(e.wrapDistancesEmu.right/Zn),bottom:je(e.wrapDistancesEmu.bottom/Zn),left:je(e.wrapDistancesEmu.left/Zn)}),t=e.mode==="tight"||e.mode==="through"?lb({polygonEmu:e.polygonEmu,extentWidthPt:e.extentWidthPt,extentHeightPt:e.extentHeightPt,anchorX:e.contentBounds.x,anchorY:e.contentBounds.y,transform:e.transform}):null;return Object.freeze({mode:e.mode,contentBounds:e.contentBounds,polygon:t,clipPolygon:e.geometry.clipPolygon,wrapDistances:n,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var gn=1e5,tn=D.maxPolygonPoints,Va=Object.freeze({top:0,right:0,bottom:0,left:0}),fb=32,pb=.1,gb=new Set(["rect","ellipse","roundRect"]);function ce(e){return Number.isFinite(e)?e:0}function Pn(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function Zu(e,n){let t=e+n;return Number.isFinite(t)?t:0}function qu(e,n,t){let r=Pn(e,0,t),o=Pn(n,0,t);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=t){let i=(t-1)/a;r*=i,o*=i;}return {left:r,right:o}}function mb(e){let n=qu(Pn(e.left,0,gn),Pn(e.right,0,gn),gn),t=qu(Pn(e.top,0,gn),Pn(e.bottom,0,gn),gn);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function hb(e){let n=mb({left:e.left*gn,top:e.top*gn,right:e.right*gn,bottom:e.bottom*gn});return Object.freeze({left:n.left/gn,top:n.top/gn,right:n.right/gn,bottom:n.bottom/gn})}function yb(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/Zn;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)})}function Hr(e,n){let t=ce(n.left),r=ce(n.right),o=ce(n.top),a=ce(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,Zu(e.width,t+r)),height:Math.max(0,Zu(e.height,o+a))})}function bb(e,n,t){let r=e*Pn(t.left,0,1),o=n*Pn(t.top,0,1),a=e*(1-Pn(t.right,0,1)),i=n*(1-Pn(t.bottom,0,1));if(a<=r||i<=o){let l=e/2,s=n/2;return Object.freeze({left:l,top:s,right:l,bottom:s})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function Ya(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?ce(Et(r)??n):Math.max(0,ce(n)),l=o>0?ce(Et(o)??t):Math.max(0,ce(t));return Object.freeze({offsetX:ce(Et(a.x)??0),offsetY:ce(Et(a.y)??0),width:i,height:l})}function xb(e,n,t,r){let o=bb(n,t,r),a=o.right-o.left,i=o.bottom-o.top,l=n>0?n:1,s=t>0?t:1,d=[],c=Math.min(e.length,tn);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+Pn(f.x/l,0,1)*a,g=i<=0?o.top:o.top+Pn(f.y/s,0,1)*i;d.push(Object.freeze({x:ce(p),y:ce(g)}));}return Object.freeze(d)}function Ju(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=ce(t.rotationDegrees)*Math.PI/180,i=Math.cos(a),l=Math.sin(a),s=r*i-o*l,d=r*l+o*i;return Object.freeze({x:ce(s+n.x),y:ce(d+n.y)})}function Qu(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let n=e[0].x,t=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,tn);for(let i=1;i<a;i+=1){let l=e[i];!Number.isFinite(l.x)||!Number.isFinite(l.y)||(n=Math.min(n,l.x),t=Math.max(t,l.x),r=Math.min(r,l.y),o=Math.max(o,l.y));}return Object.freeze({x:n,y:r,width:Math.max(0,t-n),height:Math.max(0,o-r)})}function Is(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=_o(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let l of t)r.push(Ju(Object.freeze({x:l.x+e.offsetX,y:l.y+e.offsetY}),n,e.transform));let o=Qu(r),a=Math.max(o.width,1e-6),i=Math.max(o.height,1e-6);return Object.freeze({bboxX:o.x,bboxY:o.y,scaleX:Math.max(0,ce(e.layoutWidth))/a,scaleY:Math.max(0,ce(e.layoutHeight))/i,anchorX:ce(e.anchorX),anchorY:ce(e.anchorY)})}function Sb(e,n){return Object.freeze({x:ce(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:ce(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function Ka(e){let n=e.mapping??Is({sourceWidth:e.sourceWidth,sourceHeight:e.sourceHeight,offsetX:e.offsetX,offsetY:e.offsetY,transform:e.transform,layoutWidth:e.layoutWidth,layoutHeight:e.layoutHeight,anchorX:e.anchorX,anchorY:e.anchorY}),t=xb(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(t.length>0?t.length:e.points.length,tn),o=t.length>0?t:e.points.slice(0,r),a=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),i=[];for(let l=0;l<r;l+=1){let s=o[l],d=Object.freeze({x:ce(s.x+e.offsetX),y:ce(s.y+e.offsetY)});i.push(Sb(Ju(d,a,e.transform),n));}return Object.freeze(i)}function _o(e,n,t,r){if(t<=0||r<=0){let o=Object.freeze({x:e,y:n});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:n}),Object.freeze({x:e+t,y:n}),Object.freeze({x:e+t,y:n+r}),Object.freeze({x:e,y:n+r})])}function wb(e,n,t){if(!e||!gb.has(e))return null;if(n<=0||t<=0)return _o(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return _o(0,0,n,t);if(e==="ellipse"){let l=[],s=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(fb,tn);for(let p=0;p<f;p+=1){let g=p/f*Math.PI*2;l.push(Object.freeze({x:s+c*Math.cos(g),y:d+u*Math.sin(g)}));}return Object.freeze(l)}let r=Math.min(n,t)*pb,o=Math.max(0,r),a=n,i=t;return Object.freeze([Object.freeze({x:o,y:0}),Object.freeze({x:a-o,y:0}),Object.freeze({x:a,y:o}),Object.freeze({x:a,y:i-o}),Object.freeze({x:a-o,y:i}),Object.freeze({x:o,y:i}),Object.freeze({x:0,y:i-o}),Object.freeze({x:0,y:o})])}function Wr(e){return Object.freeze({x:ce(e.x),y:ce(e.y)})}function Rb(e,n){if(e.length===0)return Object.freeze([]);let t=n.x+n.width,r=n.y+n.height,o=(i,l,s)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,tn);for(let u=0;u<c;u+=1){let f=Wr(i[u]),p=Wr(i[(u+1)%c]),g=l(f),y=l(p);if(g&&y?d.push(p):g&&!y?d.push(Wr(s(f,p))):!g&&y&&(d.push(Wr(s(f,p))),d.push(p)),d.length>=tn)break}return Object.freeze(d.slice(0,tn))},a=e.slice(0,tn).map(Wr);return a=[...o(a,i=>i.x>=n.x,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(n.x-i.x)/s:0;return Object.freeze({x:n.x,y:ce(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.x<=t,(i,l)=>{let s=l.x-i.x,d=Math.abs(s)>1e-6?(t-i.x)/s:0;return Object.freeze({x:t,y:ce(i.y+d*(l.y-i.y))})})],a=[...o(a,i=>i.y>=n.y,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(n.y-i.y)/s:0;return Object.freeze({x:ce(i.x+d*(l.x-i.x)),y:n.y})})],a=[...o(a,i=>i.y<=r,(i,l)=>{let s=l.y-i.y,d=Math.abs(s)>1e-6?(r-i.y)/s:0;return Object.freeze({x:ce(i.x+d*(l.x-i.x)),y:r})})],Object.freeze(a)}function Pb(e){let n=Qu(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function Ua(e,n){let t=Ib(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=a=>{if(!a||a.length===0)return a;let i=Rb(a,n);return i.length>=3?Object.freeze(i.map(Wr)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function Ib(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function Tb(e){let n=Math.max(0,ce(e.extentWidth)),t=Math.max(0,ce(e.extentHeight)),r=ce(e.anchorX),o=ce(e.anchorY),a=hb(e.crop),i=yb(e.effectExtentEmu),l=Ya(e.transform,n,t),s=Object.freeze({x:r,y:o,width:n,height:t}),d={sourceWidth:l.width,sourceHeight:l.height,offsetX:l.offsetX,offsetY:l.offsetY,crop:a,transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:r,anchorY:o},c=Is(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=Ka({points:_o(0,0,l.width,l.height),...d,crop:u,mapping:c}),p=wb(e.presetGeometry,l.width,l.height),g="none",y=p;y||(g=e.presetGeometry?"unsupported-preset":"none",y=_o(0,0,l.width,l.height));let h=Ka({points:y,...d,crop:u,mapping:c}),b=Pb(h.length>=3?h:f),x=Hr(b,i);return Object.freeze({contentBounds:s,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:h.length>=3?h:f,clipFallback:g,effectInsets:i})}function Gr(e){let n=e.projection.picture,t=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return Tb({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:n?.crop??{left:0,top:0,right:0,bottom:0},transform:n?.transform??t,presetGeometry:n?.presetGeometry??null})}function vb(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=Ya(n,t,r),a=o.width,i=o.height,l=Is({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),s=ce(n.rotationDegrees),d=Math.abs(s%360)>1e-4,c=n.flipHorizontal?-1:1,u=n.flipVertical?-1:1,f=l.scaleX,p=l.scaleY,g=a>0?a/t:1,y=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(g-1)<1e-4&&Math.abs(y-1)<1e-4)return null;let b=s*Math.PI/180,x=Math.cos(b),v=Math.sin(b),w=o.offsetX+a/2,z=o.offsetY+i/2,L=f*x*c,M=-f*v*u,F=p*v*c,T=p*x*u,B=f*(w-x*c*(a/2)+v*u*(i/2)-l.bboxX),m=p*(z-v*c*(a/2)-x*u*(i/2)-l.bboxY);return Object.freeze({a:ce(L*g),b:ce(F*g),c:ce(M*y),d:ce(T*y),e:ce(B),f:ce(m)})}function DR(e){let n=vb(e);if(n)return `matrix(${jr(n.a)}, ${jr(n.b)}, ${jr(n.c)}, ${jr(n.d)}, ${jr(n.e)}, ${jr(n.f)})`}function jr(e){return Number.isFinite(e)?String(e):"0"}var Bb=Object.freeze({"http://schemas.openxmlformats.org/drawingml/2006/chart":"chart","http://schemas.openxmlformats.org/drawingml/2006/diagram":"diagram","http://schemas.microsoft.com/office/word/2010/wordprocessingGroup":"group","http://schemas.microsoft.com/office/word/2010/wordprocessingShape":"textbox","http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas":"canvas"}),Ob=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),Cb=Object.freeze({left:0,top:0,right:0,bottom:0});function tf(e){let n=e.picture,t=null;if(!n){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";t=Bb[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??Cb,transform:n?.transform??Ob,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var Zn=12700;function Je(e){return e/Zn}function Et(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*Zn*72)return null;let n=e/Zn;return Number.isFinite(n)?n:null}function gt(e){let n=Je(e.inlineDistancesEmu.left),t=Je(e.inlineDistancesEmu.right),r=Je(e.inlineDistancesEmu.top),o=Je(e.inlineDistancesEmu.bottom),a=Je(e.effectExtentEmu.left),i=Je(e.effectExtentEmu.right),l=Je(e.effectExtentEmu.top),s=Je(e.effectExtentEmu.bottom),d=Je(e.extentEmu.cx),c=Je(e.extentEmu.cy);return Object.freeze({distL:n,distR:t,distT:r,distB:o,effectL:a,effectR:i,effectT:l,effectB:s,width:d,height:c,totalWidth:n+a+d+i+t,lineContribution:r+l+c+s+o})}function rf(e,n,t){let r=Math.max(t.distT+t.effectT,e-t.height),o=Math.max(n,r-t.effectT+t.height+t.effectB+t.distB),a=r+t.height+t.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function Za(e,n,t){if(Math.abs(n)<1e-4&&Math.abs(t)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+n,y:a.y+t}),o=a=>Object.freeze({x:a.x+n,y:a.y+t});return Object.freeze({...e,contentBounds:r(e.contentBounds),paintBounds:r(e.paintBounds),hitBounds:r(e.hitBounds),transformedCorners:Object.freeze(e.transformedCorners.map(o)),clipPolygon:e.clipPolygon?Object.freeze(e.clipPolygon.map(o)):null})}function qa(e,n,t){return Math.abs(n)<1e-4&&Math.abs(t)<1e-4?e:Object.freeze({...e,x:e.x+n,y:e.y+t,advanceStart:e.advanceStart+n,advanceEnd:e.advanceEnd+n,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+n,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+n,y:e.hitBounds.y+t}),geometry:Za(e.geometry,n,t)})}function Ts(e,n){return e.length===0?e:e.map(t=>{let r=t.geometry.effectInsets.bottom,o=n-t.height-r,a=o-t.y;return Math.abs(a)<1e-4&&t.baselineOffset===n?t:Object.freeze({...t,y:o,baselineOffset:n,geometry:Za(t.geometry,0,a),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+a}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+a})})})}function vs(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function Ja(e,n){let t=vs(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=Za(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:Ua(i,n)})}var ef=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),nf=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function qn(e){return e%2===1}function of(e,n){return !(!n.layoutInCell||n.cellBox===null||!Number.isFinite(n.cellBox.height)||n.cellBox.height<=0||!Number.isFinite(n.cellBox.width)||n.cellBox.width<=0)}function af(e,n){if(of(e,n)){let s=n.cellBox;if(!s)return null;let{x:d,width:c}=s;switch(e){case "page":case "column":case "margin":case "leftMargin":return {left:d,right:d+c,center:d+c/2};case "rightMargin":return {left:d,right:d+c,center:d+c/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "insideMargin":return qn(n.pageNumber)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return qn(n.pageNumber)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let t=-n.marginLeft,r=n.contentWidth+n.marginRight,o=0,a=n.contentWidth,i=n.columnBox.x,l=n.columnBox.x+n.columnBox.width;switch(e){case "page":return {left:t,right:r,center:(t+r)/2};case "margin":return {left:o,right:a,center:o+n.contentWidth/2};case "column":return {left:i,right:l,center:i+n.columnBox.width/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "leftMargin":return {left:t,right:t,center:t};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return qn(n.pageNumber)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return qn(n.pageNumber)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function lf(e,n){if(of(e,n)){let s=n.cellBox;if(!s)return null;let{y:d,height:c}=s;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:d,bottom:d+c,center:d+c/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "insideMargin":return qn(n.pageNumber)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return qn(n.pageNumber)?{top:d+c,bottom:d+c,center:d+c}:{top:d,bottom:d+c,center:d+c/2};default:return null}}let t=-n.marginTop,r=n.physicalContentHeight??n.contentHeight,o=r,a=r+n.marginBottom,i=0,l=n.contentHeight;switch(e){case "page":return {top:t,bottom:a,center:(t+a)/2};case "margin":return {top:i,bottom:l,center:i+n.contentHeight/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "topMargin":return {top:t,bottom:t,center:t};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return qn(n.pageNumber)?{top:i,bottom:i,center:i}:{top:l,bottom:l,center:l};case "outsideMargin":return qn(n.pageNumber)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function sf(e){return e===null?0:Et(e)}function kb(e,n,t){let r=qn(t.pageNumber);if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.width)&&t.cellBox.width>0){let{x:o,width:a}=t.cellBox;return e==="inside"?r?o:o+a-n:e==="outside"?r?o+a-n:o:null}return e==="inside"?r?0:t.contentWidth-n:e==="outside"?r?t.contentWidth-n:0:null}function Lb(e,n,t){let r=qn(t.pageNumber),o=t.physicalContentHeight??t.contentHeight;if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.height)&&t.cellBox.height>0){let{y:a,height:i}=t.cellBox;return e==="inside"?r?a:a+i-n:e==="outside"?r?a+i-n:a:null}return e==="inside"?r?0:o-n:e==="outside"?r?o-n:0:null}function Eb(e,n,t,r,o){let a=af(e,o);if(!a)return null;let i=sf(t);if(i===null)return null;if(n==="left")return a.left+i;if(n==="center")return a.center-r/2+i;if(n==="right")return a.right-r+i;if(n==="inside"||n==="outside"){let l=kb(n,r,o);if(l!==null)return l+i}return a.left+i}function Mb(e,n,t,r,o){let a=lf(e,o);if(!a)return null;let i=sf(t);if(i===null)return null;if(n==="top")return a.top+i;if(n==="center")return a.center-r/2+i;if(n==="bottom")return a.bottom-r+i;if(n==="inside"||n==="outside"){let l=Lb(n,r,o);if(l!==null)return l+i}return a.top+i}function zo(e){let n=e.physicalContentHeight??e.contentHeight;return Object.freeze({x:-e.marginLeft,y:-e.marginTop,width:e.pageWidth,height:n+e.marginTop+e.marginBottom})}function Bs(e,n){let t=gt(e),r=e.position,o=e.anchor,a="page",i="page";if(!r||!o)return Object.freeze({x:0,y:0,horizontalFrame:a,verticalFrame:i,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"});if(o.simplePos){let y=Et(r.simplePosition.xEmu),h=Et(r.simplePosition.yEmu);return Object.freeze(y===null||h===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:y-n.marginLeft,y:h-n.marginTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let l=r.horizontal.relativeFrom,s=r.vertical.relativeFrom,d=af(l,n),c=lf(s,n),u=d?.left??0,f=c?.top??0;if(!ef.has(l)||!nf.has(s))return Object.freeze({x:0,y:0,horizontalFrame:ef.has(l)?l:a,verticalFrame:nf.has(s)?s:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=Eb(l,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),g=Mb(s,r.vertical.align,r.vertical.offsetEmu,t.height,n);return Object.freeze(p===null||g===null?{x:0,y:0,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:g,horizontalFrame:l,verticalFrame:s,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function Nb(e){let n=e.input.projection,t=n.anchor,r=gt(n),o=Gr({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?vs(o.paintBounds,e.clipRegion):o.paintBounds,i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"anchoredDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.anchorParagraphId,anchorParagraphId:e.anchorParagraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:e.resolved.x,y:e.resolved.y,width:r.width,height:r.height,horizontalFrame:e.resolved.horizontalFrame,verticalFrame:e.resolved.verticalFrame,horizontalFrameOrigin:e.resolved.horizontalFrameOrigin,verticalFrameOrigin:e.resolved.verticalFrameOrigin,behindDocument:t?.behindDocument??false,allowOverlap:t?.allowOverlap??true,layoutInCell:t?.layoutInCell??true,relativeHeight:t?.relativeHeight??0,wrap:n.wrap==="inline"?"inFront":n.wrap,...e.sourceOrder!==void 0?{sourceOrder:e.sourceOrder}:{},...e.resolved.layoutFallback?{layoutFallback:e.resolved.layoutFallback}:{},...e.textboxStory?{textboxStory:e.textboxStory}:{},paintBounds:a,hitBounds:i,geometry:e.clipRegion?Ua(o,e.clipRegion):o,resource:e.input.resource,accessibility:ab$1(n),...tf(n)})}function In(e,n){if(e.kind!=="paragraph")return [];let t=[],r=o=>{if(o.kind==="drawing"){let a=n.projectionForAtom?.(o.id)??n.project(o);a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if($a$1(o)){let a=n.projectionForAtom?.(o.id)??null;a?.kind==="anchored"&&t.push({atomId:o.id,projection:a});return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children)r(o);return Object.freeze(t)}function Nn(e){let n=new Map;if(e.kind!=="paragraph")return n;let t=0,r=o=>{if(o.kind==="drawing"||$a$1(o)){n.set(o.id,t),t+=1;return}if(o.kind==="textValue"){t+=o.value.length;return}if("children"in o)for(let a of o.children)r(a);};for(let o of e.children){if(o.kind==="run"){for(let a of o.children)r(a);continue}if(o.kind==="hyperlink"){for(let a of o.children)if(a.kind==="run")for(let i of a.children)r(i);}}return n}function Fb(e,n,t){for(let o of e.spans){if(n<o.range.start)break;if(n<o.range.end){if(t&&o.text!==void 0&&o.style!==void 0){let l=n-o.range.start;return o.box.x+Kn(o.text.slice(0,l),o.style,t)}let a=o.range.end-o.range.start;if(a<=0)return o.box.x;let i=n-o.range.start;return o.box.x+o.box.width*i/a}if(n===o.range.end)return t&&o.text!==void 0&&o.style!==void 0?o.box.x+Kn(o.text,o.style,t):o.box.x+o.box.width}let r;for(let o of e.spans)o.range.end<=n&&(r=o);return r?t&&r.text!==void 0&&r.style!==void 0?r.box.x+Kn(r.text,r.style,t):r.box.x+r.box.width:e.box.x}function Ab(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function Os(e,n,t){if(!(Math.abs(t)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===n&&(e[r]=Object.freeze({...o,y:o.y+t,geometry:Za(o.geometry,0,t),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+t}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+t})}));}}function $r(e){let n=In(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=Nn(e.paragraph),r=[];for(let o of n){let a=o.projection;if(a.hidden)continue;let i=t.get(o.atomId);if(i===void 0||e.fragmentRange&&(i<e.fragmentRange.start||i>=e.fragmentRange.end))continue;let l=e.lines.find(h=>i>=h.range.start&&i<h.range.end);if(!l)continue;let s=a.anchor?.layoutInCell??true,c=a.position?.horizontal.relativeFrom==="character"?Ab(l,i):i,u=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:l.box,anchorCharacterX:Fb(l,c,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:s}),f=Bs(a,u),g=s&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0?e.cellBox:zo(e.frameBase),y=Nb({input:Object.freeze({drawingNodeId:o.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:a,resource:e.drawingLayout.resourceOf(a)}),anchorParagraphId:e.paragraphId,start:c,resolved:f,clipRegion:g,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(o.atomId)}:{},...a.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(a)}:{}});r.push(y);}return Object.freeze(r)}function df(e){let n=gt(e.input.projection),t=e.slotX+n.distL+n.effectL,r=Gr({projection:e.input.projection,anchorX:t,anchorY:e.y,extentWidth:n.width,extentHeight:n.height}),o=e.contentTop!==void 0&&e.contentBottom!==void 0?Object.freeze({x:e.contentLeft,y:e.contentTop,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,e.contentBottom-e.contentTop)}):Object.freeze({x:e.contentLeft,y:r.paintBounds.y,width:Math.max(0,e.contentRight-e.contentLeft),height:r.paintBounds.height}),a=vs(r.paintBounds,o),i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"inlineDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.paragraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:t,y:e.y,width:n.width,height:n.height,distL:n.distL,distR:n.distR,distT:n.distT,distB:n.distB,advanceStart:e.slotX,advanceEnd:e.slotX+n.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:Ua(r,o),resource:e.input.resource,accessibility:ab$1(e.input.projection),...tf(e.input.projection)})}var Db=256,Ls=8,tr=8,Xr=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function _b(e,n){let t=Math.max(1,n.columnCount);if(t<=1)return 0;let r=e.x+e.width/2;if(n.columnLefts&&n.columnWidths&&n.columnLefts.length===t){for(let i=0;i<t;i+=1){let l=n.columnLefts[i],s=l+n.columnWidths[i];if(r>=l-.001&&r<s+.001)return i}return t-1}let o=n.columnGapPt,a=(n.contentWidth-o*(t-1))/t;for(let i=0;i<t;i+=1){let l=i*(a+o),s=l+a;if(r>=l-.001&&r<s+.001)return i}return t-1}function ks(e){return e.behindDocument?"behind":"inFront"}function cf(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function zb(e){switch(e){case "inline":case "behind":case "inFront":return null;case "square":case "squareLeft":case "squareRight":return "square";case "tight":return "tight";case "through":return "through";case "topAndBottom":return "topAndBottom";default:return null}}function Hb(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function Es(e){let n=zb(e.projection.wrap);if(!n||!e.projection.wrapGeometry)return null;let t=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return Uu({mode:n,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:t.distancesEmu,polygonEmu:t.polygon,crop:e.projection.picture?.crop??{},transform:e.projection.picture?.transform??{rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:{x:0,y:0},extentEmu:{cx:0,cy:0}},extentWidthPt:e.geometry.contentBounds.width,extentHeightPt:e.geometry.contentBounds.height,textSide:n==="square"?Hb(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Ms(e){if(e.mode==="topAndBottom"||e.mode==="square")return Rs(e.contentBounds,e.effectInsets,e.wrapDistances);let n=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)n.push(o.y);let t=Math.min(...n)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...n)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:t,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-t)})}function jb(e){if(e.drawing.behindDocument||!cf(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=Es({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:n});return t?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:ks(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:Ms(t),input:t}):null}function uf(e,n){let t=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=n.sourceOrder??Number.MAX_SAFE_INTEGER;return t!==r?t-r:e.drawingNodeId.localeCompare(n.drawingNodeId)}function Wb(e,n){let t=ks(e),r=ks(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:uf(e,n)}function ff(e){return Object.freeze([...e].sort(Wb))}function Cs(e,n){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function Ns(e,n){if(Math.abs(n)<=1e-4)return e;let t=e.geometry;return Object.freeze({...e,y:e.y+n,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+n}),geometry:Object.freeze({...t,contentBounds:Object.freeze({...t.contentBounds,y:t.contentBounds.y+n}),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+n}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+n}),transformedCorners:t.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+n})),clipPolygon:t.clipPolygon?t.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+n})):null})})}function pf(e,n){let t=n.maxAttempts??Db,r=[...e].sort(uf),o=[],a=[],i=[];for(let l of r){if(l.allowOverlap){o.push(l);continue}let s=l,d=0;for(;d<t&&o.some(y=>Cs(y.paintBounds,s.paintBounds));){let p=o.find(y=>Cs(y.paintBounds,s.paintBounds)),g=p.paintBounds.y+p.paintBounds.height-s.paintBounds.y+.001;s=Ns(s,g),d+=1;}let c=o.some(f=>Cs(f.paintBounds,s.paintBounds)),u=s.paintBounds.y+s.paintBounds.height>n.pageBottom+.001;if(c||u){a.push(s),i.push(s.drawingNodeId);continue}o.push(s);}return Object.freeze({drawings:Object.freeze(o),deferred:Object.freeze(a),deferredNodeIds:Object.freeze(i)})}function Vr(e,n,t,r){let o=[{start:t,end:r}];for(let a of n){let i=a.verticalBand;if(e<i.y||e>=i.y+i.height)continue;let l=Ku(e,a.input),s=[];for(let d of o)for(let c of l){let u=Math.max(d.start,c.start),f=Math.min(d.end,c.end);f>u+1e-6&&s.push(Object.freeze({start:u,end:f}));}if(o=s,o.length===0)break}return Object.freeze(o)}function gf(e,n){for(let t of n)if(e>=t.start-1e-6&&e<t.end-1e-6)return Math.max(0,t.end-e);return 0}function Gb(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function Fs(e,n){let t=Gb(e,n);if(!t)return null;let r=Math.max(e,t.start),o=t.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function $b(e,n,t){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+n,y:r.y+t}),contentLeft:e.contentLeft+n,contentRight:e.contentRight+n,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{}})}function As(e,n){return Object.freeze({...e,layoutFallback:n})}function mf(e,n,t,r){return e.length===0?e:Object.freeze(e.map(o=>{let a=o.verticalBand,i=o.input;return Object.freeze({...o,y:o.y-t,verticalBand:Object.freeze({...a,x:a.x-n,y:a.y-t}),input:Object.freeze({...$b(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function hf(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function yf(e){let n=In(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Nn(e.paragraph),r=Math.max(1,e.contentRight-e.contentLeft),o=[];for(let a of n){if(a.projection.anchor?.behindDocument||!cf(a.projection.wrap)||a.projection.wrap==="topAndBottom")continue;let i=t.get(a.atomId);if(i===void 0)continue;let l=e.anchorLineTopByModelStart.get(i);if(l===void 0)continue;let s=Object.freeze({x:e.contentLeft,y:l,width:r,height:14}),d=e.anchorCellBox!=null,c=Bs(a.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+r,marginLeft:e.contentLeft,marginRight:0,marginTop:0,marginBottom:0,contentWidth:r,contentHeight:648,physicalContentHeight:648,paragraphBox:s,anchorLineBox:s,anchorCharacterX:e.contentLeft,columnBox:s,cellBox:d?e.anchorCellBox:null,layoutInCell:d,ownerPartName:e.drawingLayout.ownerPartName}),u=e.paragraphStartY+l,f=gt(a.projection),p=Gr({projection:a.projection,anchorX:c.x,anchorY:u,extentWidth:f.width,extentHeight:f.height}),g=Es({projection:a.projection,geometry:p,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:c.x,anchorY:u});g&&o.push(Object.freeze({drawingNodeId:a.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:i,sourceOrder:e.sourceOrderOf?.(a.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:a.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:a.projection.anchor?.relativeHeight??0,allowOverlap:a.projection.anchor?.allowOverlap??true,columnIndex:0,y:u,verticalBand:Ms(g),input:g}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}function Qa(e){let n=In(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Nn(e.paragraph),r=[];for(let o of n){if(o.projection.anchor?.behindDocument||o.projection.wrap!=="topAndBottom")continue;let a=t.get(o.atomId);if(a===void 0)continue;let i=e.anchorLineTopByModelStart.get(a);if(i===void 0)continue;let l=e.paragraphStartY+i,s=gt(o.projection),d=Gr({projection:o.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:s.width,extentHeight:s.height}),c=Es({projection:o.projection,geometry:d,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:l});c&&r.push(Object.freeze({drawingNodeId:o.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:a,sourceOrder:e.sourceOrderOf?.(o.atomId)??Number.MAX_SAFE_INTEGER,paintLayer:o.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:o.projection.anchor?.relativeHeight??0,allowOverlap:o.projection.anchor?.allowOverlap??true,columnIndex:e.columnIndex??0,y:l,verticalBand:Ms(c),input:c}));}return r.sort((o,a)=>o.sourceOrder-a.sourceOrder),Object.freeze(r)}var Xb=8;function Vb(e,n,t,r){return e<r&&n>t}function mt(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<Xb;o+=1){let a=e+r,i=a+n,l=a,s=false;for(let c of t){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;Vb(a,i,u,f)&&(s=true,l=Math.max(l,f));}if(!s)break;let d=l-e;if(d<=r+.001)break;r=d;}return r}function Yb(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function Kb(e){let n=e.contentBounds,t=e.wrapDistances,r=e.effectInsets,o=e.polygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"",a=e.clipPolygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"";return [e.mode,e.textSide,n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),t.top.toFixed(3),t.right.toFixed(3),t.bottom.toFixed(3),t.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function Jn(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=Vr(r,[n],n.input.contentLeft,n.input.contentRight);return [n.drawingNodeId,String(n.sourceOrder),String(n.columnIndex),n.y.toFixed(3),t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),Kb(n.input),Yb(o)].join("|")}).join(`
|
|
2
2
|
`)}function Ds(e,n,t,r,o,a){let i=[];for(let l of e){let s=n.projectionForAtom?.(l.drawingNodeId);if(!s)continue;let d=l.sourceOrder??o?.(l.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?_b(l,a):0,u=jb({drawing:l,projection:s,sourceOrder:d,contentLeft:t,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((l,s)=>l.sourceOrder-s.sourceOrder),Object.freeze(i)}function Ho(e,n,t,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:t}),i=new Map;for(let l of e){let s=l.anchoredDrawings??[],d=Ds(s,n,0,t,r,a);d.length>0&&i.set(l.index,d);}return i}function ei(e,n){if(e.size!==n.size)return false;for(let[t,r]of e){let o=n.get(t);if(!o||Jn(r)!==Jn(o))return false}return true}function ni(e){return e.size===0?"":[...e.entries()].sort(([n],[t])=>n-t).map(([n,t])=>`${n}:${Jn(t)}`).join(`
|
|
3
3
|
`)}var Ub=.001;function mn(e){return Ao(e)}var ri=new Set(["-","\u2010","\u2013","\u2014"]);function bf(e){let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];r===" "?(t>0&&n[n.length-1]!==t&&n.push(t),n.push(t+1)):(r===" "||ri.has(r)&&t>0&&e[t-1]!==" "&&t+1<e.length&&e[t+1]!==" "&&!ri.has(e[t+1]))&&n.push(t+1);}return n[n.length-1]!==e.length&&n.push(e.length),n}function Zb(e,n,t){for(let r=n;r<e.length;r+=1){let o=e[r];if(o.inlineDrawing)return true;let a=r===n?t:0;for(let i=a;i<o.text.length;i+=1){let l=o.text[i];if(l===`
|
|
4
4
|
`||l===Wb$1)return false;if(l!==" "&&l!==" ")return true}}return false}function qb(e,n,t,r){let o=0,a=0,i=false;for(let l=n;l<e.length;l+=1){let s=e[l],d=l===n?t:0;for(let c=d;c<s.text.length;){let u=s.text[c];if(u===" "||u===`
|