@docx-editor.dev/core 2.1.3 → 2.2.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/README.md +4 -5
- package/dist/automation.cjs +1 -1
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.js +1 -1
- package/dist/chunk-5OSFUHGF.js +10 -0
- package/dist/chunk-C24AINST.js +12 -0
- package/dist/{chunk-O2WQY7IT.cjs → chunk-CY47CFM5.cjs} +5 -5
- package/dist/chunk-EUTHPVTG.cjs +2 -0
- package/dist/chunk-FJCBZ5BL.cjs +12 -0
- package/dist/{chunk-REZUWYB7.js → chunk-GRGRIDHF.js} +1 -1
- package/dist/{chunk-PC76F2HR.cjs → chunk-KZ5HPHW6.cjs} +1 -1
- package/dist/{chunk-TBBXCC7D.js → chunk-LVZSKP2F.js} +3 -3
- package/dist/{chunk-HBL3NNH5.cjs → chunk-MIUELYVA.cjs} +1 -1
- package/dist/chunk-MO7GAUO7.js +2 -0
- package/dist/chunk-NCGKMEKU.js +2 -0
- package/dist/chunk-PFTVNFMI.js +1 -0
- package/dist/chunk-QVGTZUEV.js +12 -0
- package/dist/chunk-T2LVH6D3.cjs +2 -0
- package/dist/chunk-UAOJHPQ4.cjs +10 -0
- package/dist/chunk-VXEF32A5.cjs +12 -0
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +3 -3
- package/dist/contracts/editor.d.ts +3 -3
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.cts +4 -4
- package/dist/contracts/interaction.d.ts +4 -4
- package/dist/{editor-BGBZn9c9.d.cts → editor-25RmHnxu.d.cts} +64 -2
- package/dist/{editor-DQRRxKMG.d.ts → editor-C8oaTHr3.d.ts} +64 -2
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +86 -11
- package/dist/editor.d.cts +51 -11
- package/dist/editor.d.ts +51 -11
- package/dist/editor.js +1 -1
- package/dist/{index-DptRpcqa.d.cts → index-CiEakUbq.d.cts} +32 -5
- package/dist/{index-BzqHsd4Y.d.ts → index-gvw4VGE9.d.ts} +32 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +95 -61
- package/dist/layout.d.ts +95 -61
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +4 -101
- package/dist/output.d.ts +4 -101
- package/dist/output.js +1 -1
- package/dist/{semantic-cell-selection-DwLB71fF.d.cts → semantic-cell-selection-CI3loBKq.d.cts} +2 -2
- package/dist/{semantic-cell-selection-D_8RbPII.d.ts → semantic-cell-selection-Cx8P64j2.d.ts} +2 -2
- package/dist/{semantic-interaction-DqcEonqD.d.cts → semantic-interaction-B4HrJFQ2.d.cts} +1 -1
- package/dist/{semantic-interaction-CXH2wFqi.d.ts → semantic-interaction-unGpRNCk.d.ts} +1 -1
- package/dist/semantic-paint-BBNaqr1s.d.ts +133 -0
- package/dist/semantic-paint-DdGGra4m.d.cts +133 -0
- package/dist/{semantic-records-zTC0_1zi.d.ts → semantic-records-BC4bIKKL.d.ts} +28 -32
- package/dist/{semantic-records-COVFW5aS.d.cts → semantic-records-DC6V1U3T.d.cts} +28 -32
- package/dist/{shaped-measurer-CZXL-a6v.d.ts → shaped-measurer-ChSWkuAT.d.ts} +1 -1
- package/dist/{shaped-measurer-AFnFxoot.d.cts → shaped-measurer-SIqZp-Ty.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +35 -14
- package/dist/store.d.ts +35 -14
- package/dist/store.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-2DTQDAN7.js +0 -2
- package/dist/chunk-3HEU7MHP.js +0 -12
- package/dist/chunk-3JKQE4QJ.cjs +0 -2
- package/dist/chunk-6WIIHJFY.js +0 -1
- package/dist/chunk-BZK64YU3.cjs +0 -10
- package/dist/chunk-EDLUMMQN.cjs +0 -12
- package/dist/chunk-JQFDLZXQ.cjs +0 -2
- package/dist/chunk-QRAUDDVY.js +0 -2
- package/dist/chunk-STCITBJK.js +0 -12
- package/dist/chunk-TSXT537P.cjs +0 -12
- package/dist/chunk-Y7TA7TPF.js +0 -10
- package/dist/semantic-paint-drawings-B5Wk2so5.d.ts +0 -21
- package/dist/semantic-paint-drawings-x8g44lD_.d.cts +0 -21
package/dist/chunk-STCITBJK.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {y}from'./chunk-2DTQDAN7.js';import {D,qd,j,g,h,f,Zc as Zc$1,od as od$1,ed as ed$1,fd as fd$1,cd as cd$1,kd,ld as ld$1,hd as hd$1,md as md$1,la,R,fe,Nb as Nb$1,Vb as Vb$1,pb as pb$1,fb as fb$1,db as db$1,tc,sa,sd as sd$1,jd,id as id$1,gd as gd$1,td as td$1,dd as dd$1,bb as bb$1,me,ke,pe,le,Ea as Ea$1,wa as wa$1,Jb as Jb$1,Ib as Ib$1,Mb as Mb$1,Za as Za$1,cb as cb$1,Lb as Lb$1,Sd as Sd$1,_d,ie,Xa as Xa$1,_a as _a$1,bc,$b as $b$1,m,ec,lc,Va as Va$1,$a as $a$1,dc,fc,Ua as Ua$1,qa as qa$1,Wb as Wb$1,Yb as Yb$1,eb as eb$1}from'./chunk-Y7TA7TPF.js';var Gn=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},da=(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`)},mm=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},Oc=(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(mm(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)},fl=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),hm=e=>e?Object.freeze({requested:fl(e.requested),resolved:fl(e.resolved)}):void 0,Cc=new WeakSet,gl=e=>{if(h(e),!Cc.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");Cc.add(e);}},pl=e=>(gl(e),e),ua=e=>(gl(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:fl(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:hm(e.substitution)??null})),jt=e=>{if(da(e.shapingLibrary.name,"shaping library name"),da(e.shapingLibrary.version,"shaping library version"),da(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(da(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=pl(e.font),t=e.fallbackOrder.map(pl),r=new Set;for(let o of t){let a=JSON.stringify(ua(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:Oc(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:Oc(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Ec=e=>{let n=jt(e);return Object.freeze({font:ua(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(ua)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},ml=e=>JSON.stringify(Ec(e)),Ht=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},kn=e=>{try{return Gn(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},kc=new WeakMap,ca=e=>{let n=kc.get(e);if(n)return n;gl(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 kc.set(e,t),t},fa=(e,n)=>{let t=jt(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(Ht(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=>{Ht(s.id,"glyph id"),Ht(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:kn(s.originX),originY:kn(s.originY),advanceX:kn(s.advanceX),advanceY:kn(s.advanceY),offsetX:kn(s.offsetX),offsetY:kn(s.offsetY),outline:d})}),a=e.fontSpans.map(s=>{if(Ht(s.glyphStart,"font span start"),Ht(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&&Ht(s.fallbackIndex,"fallback index");let d=pl(s.font);if(s.fallbackIndex===null){if(ca(d)!==ca(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(ca(d)!==ca(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]])Ht(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:kn(s.advance),caretEdges:Object.freeze(s.caretEdges.map(kn))})}),l=Object.freeze({ascent:kn(e.metrics.ascent),descent:kn(e.metrics.descent),lineGap:kn(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})},ym=(e,n)=>{let t=fa(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:ua(r.font)}))),metrics:t.metrics})};var ro=Object.freeze({name:"HarfBuzz",version:"14.2.1"}),oo=null,no=null;function bm(){return oo?Promise.resolve():no||(no=import('harfbuzzjs').then(e=>{let n=e.versionString();if(n!==ro.version)throw new ze("shapingLibraryMismatch",{diagnostic:`expected ${ro.version}, loaded ${n}`});oo=e;}).catch(e=>{throw no=null,e}),no)}function xm(){return oo!==null}function Sm(){if(!oo)throw new ze("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return oo}var ze=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;}},wm=16*1024*1024,Rm=1e6,Pm=1e6,Im=1e6,Tm=4,vm=512,Bm=1024*1024,Om=16*1024*1024,Cm=32*1024*1024,km=64*1024*1024,Em=64*1024*1024,Lm=1e6,Mm=1e6,Nm=1e6,Fm=64,Am=4096,Dm=4*1024*1024,_m=64*1024*1024,zm=64*1024*1024,Hm=256*1024*1024,jm=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Lc=["cmap","head","hhea","hmtx","maxp"],Gm=(e,n)=>e[n]<<8|e[n+1],Wm=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,$m=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Wm(e,12+n*4):0,Xm=(e,n)=>{let t=$m(e,n),r=Gm(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},Vm=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Ym=(e,n)=>{let t=j(e,n);if(!t.valid)return t;let r=Xm(e,n);for(let o of Lc)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},Km=Ym,Wn=(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},Um=(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},Mc=(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(Um(BigInt(e)*BigInt(t),BigInt(n),r))},Zm=(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=>Mc(i,a,o,r)},qm=(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},$n=64,it=8,Gt=8,Jm=32,Nc=$n+2*it,Qm=$n+it+Gt,eh=$n+it+Gt,nh=$n+it+Gt,Fc=$n+8*it,Ac=$n+8*Gt+it,th=$n+6*Gt+it,rh=$n+3*Gt+2*it,oh=$n+3*Gt,ao=e=>$n+e.length*Uint16Array.BYTES_PER_ELEMENT,yl=e=>nh+ao(e),to=e=>Jm+e*it,ah=(e,n)=>Nc+ao(e)+Qm+yl(n),ih=e=>Fc+ao(e)+to(e.length)+e.length*Ac,lh=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return Fc+ao(e.text)+to(e.glyphs.length)+e.glyphs.length*Ac+to(e.clusters.length)+e.clusters.length*th+e.clusters.reduce((t,r)=>t+to(r.caretEdges.length),0)+to(e.fontSpans.length)+e.fontSpans.length*rh+oh+[...n].reduce((t,r)=>t+yl(r.path),0)},sh=(e,n)=>Nc+ao(e)+eh+n,hl=class{#n;#c;#u;#f;#p;#y;#b;#g;#m;#l;#h;#s;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#d;constructor(n,t){this.#n=n,this.#c=Wn(t.maxFontBytes??wm,"maximum font bytes",Em),this.#u=Wn(t.maxInputUtf16??Rm,"maximum input UTF-16 code units",Lm),this.#f=Wn(t.maxCodepoints??Pm,"maximum input code points",Mm),this.#p=Wn(t.maxGlyphs??Im,"maximum shaped glyphs",Nm),this.#y=Wn(t.maxCachedFaces??Tm,"maximum cached faces",Fm),this.#b=Wn(t.maxCachedShapes??vm,"maximum cached shape results",Am),this.#g=Wn(t.maxOutlineBytes??Bm,"maximum outline bytes",Dm),this.#m=Wn(t.maxCachedOutlineBytes??Om,"maximum cached outline bytes",_m),this.#l=Wn(t.maxShapedRunBytes??Cm,"maximum shaped run bytes",zm),this.#h=Wn(t.maxCachedShapeBytes??km,"maximum cached shape bytes",Hm),this.#s=t.instrumentation?.onFaceCacheEvent,this.#e=t.instrumentation,this.#d=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.#d=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.#s?.(Object.freeze({kind:"hit",identity:n.identity})),r;let o=g(n);for(let c of Lc)if(!o.has(c))throw new ze("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(Vm(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 ze("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.#s?.(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.#s?.(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=yl(i);if(l>this.#g)throw new ze("outlineOverLimit",{limit:this.#g,actual:l});let s=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=ah(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 ze("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 ze("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#d)throw new ze("disposed");if(h(n.environment.font),n.environment.font.byteLength>this.#c)throw new ze("fontOverLimit",{limit:this.#c,actual:n.environment.font.byteLength});this.#x(n.text);let t=ih(n.text);if(t>this.#l)throw new ze("shapedRunOverLimit",{limit:this.#l,actual:t});let r=jt(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!==ro.name||r.shapingLibrary.version!==ro.version)throw new ze("shapingLibraryMismatch");if(r.normalization!=="none")throw new ze("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new ze("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new ze("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new ze("unsupportedFallback");let i=f(r.font),l=g(r.font);if([...jm].some(d=>l.has(d)))throw new ze("unsupportedColorFont");let s=n.text;this.#x(s);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#d;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(([k,v])=>new this.#n.Feature(k,v));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let g=f.getGlyphInfosAndPositions();if(g.length>this.#p)throw new ze("glyphOverLimit",{limit:this.#p,actual:g.length});let b=Zm(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),h=Gn(0),y=Gn(0),x=new Map,P=JSON.stringify(Object.entries(r.variationAxes).sort(([k],[v])=>k.localeCompare(v))),T=g.map(k=>{let v=b(k.xAdvance??0),m=b(k.yAdvance??0),R={id:k.codepoint,cluster:k.cluster,originX:h,originY:y,advanceX:v,advanceY:m,offsetX:b(k.xOffset??0),offsetY:b(k.yOffset??0),outline:x.get(k.codepoint)??(()=>{let N=this.#w(d,k.codepoint,P);return x.set(k.codepoint,N),N})()};return h=Gn(h+v),y=Gn(y+m),R}),_=u.hExtents(),j=fa({text:s,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:T,clusters:qm(s,T),fontSpans:T.length===0?[]:[{glyphStart:0,glyphEnd:T.length,font:r.font,fallbackIndex:null}],metrics:{ascent:b(_.ascender),descent:b(-_.descender),lineGap:b(_.lineGap)}},r),z=lh(j);if(z>this.#l)throw new ze("shapedRunOverLimit",{limit:this.#l,actual:z});let L=sh(o,z);if(L>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),j;for(;this.#t.size>=this.#b||this.#r+L>this.#h;){let k=this.#t.keys().next().value;if(k===void 0)break;let v=this.#t.get(k);this.#t.delete(k),this.#r-=v.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:j,bytes:L}),this.#r+=L,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),j}catch(d){throw d instanceof ze?d:new ze("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},dh=(e={})=>new hl(Sm(),e);var Y=(e,n,t)=>e>=n&&e<=t,pa=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},ch=e=>{if(Y(e,65313,65338)||Y(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(Y(e,1424,1535)||Y(e,64285,64335))return {slot:"cs",script:"Hebr"};if(Y(e,1536,1791)||Y(e,1872,1919)||Y(e,2160,2207)||Y(e,2208,2303)||Y(e,64336,65023)||Y(e,65136,65279)||Y(e,126464,126719))return {slot:"cs",script:"Arab"};if(Y(e,4352,4607)||Y(e,11904,12351)||Y(e,12352,12543)||Y(e,12544,12687)||Y(e,12784,12799)||Y(e,13312,19903)||Y(e,19968,40959)||Y(e,44032,55215)||Y(e,63744,64255)||Y(e,65382,65437)||Y(e,65440,65500)||Y(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(Y(e,2304,2431)||Y(e,43232,43263))return {slot:"cs",script:"Deva"};if(Y(e,2432,2559))return {slot:"cs",script:"Beng"};if(Y(e,880,1023)||Y(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(Y(e,1024,1327)||Y(e,7296,7311)||Y(e,11744,11775)||Y(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(Y(e,3584,3711))return {slot:"cs",script:"Thai"};if(Y(e,6016,6143)||Y(e,6624,6655))return {slot:"cs",script:"Khmr"};if(Y(e,768,879)||Y(e,6832,6911)||Y(e,7616,7679)||Y(e,8400,8447)||Y(e,8192,8303)||Y(e,65056,65071)||e<=47||Y(e,58,64)||Y(e,91,96)||Y(e,123,191)||e===5760||Y(e,8192,11263)||Y(e,65024,65039)||Y(e,65280,65381)||Y(e,65438,65439)||Y(e,65501,65535)||Y(e,126976,129791)||Y(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(Y(e,192,687)||Y(e,7424,7551)||Y(e,7552,7615)||Y(e,7680,7935)||Y(e,11360,11391)||Y(e,42784,43007)||Y(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new pa(e)};function uh(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:ch(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 fh="und";function ph(){return typeof Intl.Segmenter=="function"}function gh(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function mh(){let e=new(gh())("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 Sl=mh(),wl=Sl,Dc=0;function Rl(){return Dc}var br=null,Wt=null,ga=null,io=null;function En(e){if(br===e&&Wt)return Wt;if(ga===e&&io){let t=io;return ga=br,io=Wt,br=e,Wt=t,t}let n=wl.segment(e);return ga=br,io=Wt,br=e,Wt=n,n}function hh(e){wl=e,_c();}function yh(){wl=Sl,_c();}function _c(){Dc+=1,br=null,Wt=null,ga=null,io=null,bl=null,ma=null,xl=0;}function bh(e){return En(e).length}var bl=null,ma=null,xl=0;function xh(e){if(bl===e&&ma)return {offsets:ma,count:xl};let n=En(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,bl=e,ma=t,xl=n.length,{offsets:t,count:n.length}}function ha(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=xh(e);return r[t]}function Sh(e,n){let t=En(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 Pl(e){let n=new Set([0,e.text.length]);for(let r of En(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 ya(e,n){return Pl(e).includes(n)}function wh(e,n){return ya(e,n)}function Rh(e,n,t){return t>=n&&ya(e,n)&&ya(e,t)}function Ph(e){let n=En(e.text);return Pl(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var Tl="und";function Gc(){return typeof Intl.Segmenter=="function"}function Ih(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Tl})`);return e}function Wc(){let e=new(Ih())(Tl,{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 Th=/^[\p{L}\p{N}']$/u,vh=/^\s$/u;function zc(e){return Th.test(e)}function Hc(e){return vh.test(e)}function Il(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function $c(e){let n=En(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(Hc(o.text)){let a=r+1;for(;a<n.length&&Hc(n[a].text);)a+=1;t.push(Il(n,r,a,false)),r=a;continue}if(zc(o.text)){let a=r+1;for(;a<n.length&&zc(n[a].text);)a+=1;t.push(Il(n,r,a,true)),r=a;continue}t.push(Il(n,r,r+1,false)),r+=1;}return t}function Xc(){return {segment:$c}}function Vc(e={}){let n=e.isIntlAvailable??Gc,t=e.createIntlBoundary??Wc,r=e.createFallbackBoundary??Xc;if(!n())return r();try{return t()}catch{return r()}}var jc;function Yc(){return jc??=Vc(),jc}function Bh(e,n=Yc()){return n.segment(e)}function Oh(e,n){return n.map(t=>({graphemeFrom:ha(e,t.utf16From),graphemeTo:ha(e,t.utf16To),wordLike:t.wordLike}))}var ba=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},xr=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},Sr=e=>(ba(e.resourceEpoch,"resourceEpoch"),ba(e.configEpoch,"configEpoch"),ba(e.producerVersion,"producerVersion"),xr(e.extensionFingerprint,"extensionFingerprint"),xr(e.shapingHash,"shapingHash"),Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})),Ch=(e,n)=>{let t=Sr(e),r=Sr(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)})},vl=e=>{let n=e.map(({key:t,fingerprint:r})=>(xr(t,"resource dependency key"),xr(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)},kh=e=>(ba(e.revision,"revision"),xr(e.dependencyFingerprint,"dependencyFingerprint"),xr(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:vl(e.resourceDependencies),...Sr(e)})),Eh=(e,n)=>{let t=vl(e),r=vl(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 Lh(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=Eh(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 Bl=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=Lh(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:kh(r)});}evictEpoch(n){let t=Sr(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=Sr(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 lo=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});function Sn(e,n=false){return Kc(e.fragments,n)}function Kc(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 Uc(e){let n=[];for(let t of e.pages)for(let r of Sn(t))n.push(...r.lines);return n}function ww(e){return e.anchoredDrawings??[]}function Mh(e,n){let t=[];for(let r of e.pages)for(let o of Sn(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function Nh(e,n,t){for(let r of Uc(e))if(r.range.paragraphId===n&&t>=r.range.start&&t<=r.range.end)return r;return null}function Ol(e){return e.contentControls??[]}function xa(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 Cl(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 Zc=1,Sa=1;function wr(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 Fh=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function Ah(e){return Fh.has(e)}function qc(e,n){return Ah(e)?wr(n).extentPt:n}function Ll(e){return e.some(n=>n.localName==="pageBreakBefore"&&n.attributes?.val!=="0"&&n.attributes?.val!=="false")}var Qc=31680/20,co=12,eu=3168,nu=14,Pr=Object.freeze({rule:"auto",value:240}),Dh=132,_h=1584,tu=["top","left","bottom","right","between","bar"],zh=Object.freeze({}),Hh=/^[0-9A-Fa-f]{6}$/,jh=new Set(["nil","none"]);function wa(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 Jc(e){let n=wa(e,true);return n===null?0:kl(n/20,Qc)}function El(e){return e!=="0"&&e!=="false"&&e!=="off"}function Gh(e){return e===void 0||e==="auto"?null:Hh.test(e)?e.toUpperCase():null}function so(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Xn(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Ml(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=Jc(l)),s!==void 0&&(r=Jc(s));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=El(d)),c!==void 0&&(a=El(c));}if(o||a){let i=n?.inList||n?.inTableCell?0:nu;o&&(t=i),a&&(r=i);}return {before:t,after:r}}function Nl(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=wa(l,true);s!==null&&(t=s);}}if(t===void 0)return Pr;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,Dh)*240}:Pr}let o=t/20;return o>0?{rule:r,value:Math.min(o,_h)}:Pr}function Fl(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 Al(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r===void 0||El(r);}return n}function Rr(e){if(!e)return;let n=so(e,"val");if(!n||jh.has(n))return;let t=wa(so(e,"sz")),r=t===null?.5:kl(t/8,co)||.5,o=wa(so(e,"space")),a=o===null?0:kl(o,eu),i=so(e,"shadow"),l=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:Gh(so(e,"color")),widthPt:r,spacePt:a,...l?{shadow:true}:{}}}function ru(e){let n=Rr(Xn(e,"top")),t=Rr(Xn(e,"left")??Xn(e,"start")),r=Rr(Xn(e,"bottom")),o=Rr(Xn(e,"right")??Xn(e,"end")),a=Rr(Xn(e,"between")),i=Rr(Xn(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function lt(e){if(!e||e.kind==="textValue")return {};let n=Xn(e,"pBdr");return n?ru(n):{}}function uo(e){let n=zh;for(let t of e){if(!t||t.kind==="textValue")continue;let r=Xn(t,"pBdr");r&&(n=ru(r));}return n}function un(e){return qc(e.val,e.widthPt)}function Rt(e){return e?e.spacePt+un(e):0}function Wh(e){return Rt(e)}function Dl(e){let n=[];for(let t of tu){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 Ir(e,n){return Math.max(e,n)-n}function _l(e,n,t,r){return t&&!r?0:Ir(e,n)}var $h=/^[0-9A-Fa-f]{6}$/;function Ra(e){if(!(e===void 0||e==="auto"||e==="nil")&&$h.test(e))return e.toUpperCase()}function fo(e){if(e&&e.val!=="nil")return Ra(e.fill)}function zl(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return fo(n)}function Hl(e){let n;for(let t of e)t.localName==="shd"&&(n=fo(t.attributes));return n}function po(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 Xh=64,Vh=31680,Yh=720,Kh=36,jl=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),Tr=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),Uh=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),Zh=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function go(e){return e.kind!=="textValue"}function Pa(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Gl(e,n){for(let t of e.children)if(go(t)&&t.localName===n)return t}function ou(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function qh(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function au(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!go(r)||r.localName!=="tab")continue;let o=qh(ou(Pa(r,"pos"))??NaN);if(o===null)continue;let a=Pa(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=Uh.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let l=Pa(r,"leader");e.set(o,{alignment:i,...l!==void 0&&Zh.has(l)?{leader:l}:{}});}}function iu(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,...Jh(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function Jh(e){return e.leader?{leader:e.leader}:{}}function Wl(e){let n=new Map;for(let t of e)!t||!go(t)||au(n,Gl(t,"tabs"));return iu(n)}function $l(e){if(!e||!go(e))return Tr;let n=new Map;return au(n,Gl(e,"tabs")),iu(n)}function mo(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function Qh(e){if(!e||!go(e))return 36;let n=Gl(e,"defaultTabStop");if(!n)return 36;let t=ou(Pa(n,"val"));return t===null||t<=0||t>31680?36:t/20}function vr(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 Xl(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 $t(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 ho=256,Vl=4,lu=4096,Br=64,Yl=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),ey=/\s*\\\*\s*MERGEFORMAT\s*$/i;function su(e){if(e.length>ho)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>ho?null:n.replace(ey,"").trim()}function du(e){let n=su(e);return n==="PAGE"||n==="NUMPAGES"||n==="SECTIONPAGES"?n:null}function Vn(e,n){return dc(e,n)}function yo(e){return ec(e)}function Kl(){return {nodes:0,exhausted:false}}function Xt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>lu?(e.exhausted=true,false):true)}function Ul(){return {nesting:0,instruction:"",instructionOverflow:false,nestingOverflow:false,phase:"idle"}}function bo(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="idle";}function Zl(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.nestingOverflow=false,e.phase="instruction"),e.nesting+=1,e.nesting>Vl&&(e.nestingOverflow=true);}function ny(e,n){if(!(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)){if(e.instruction.length+n.length>ho){e.instructionOverflow=true,e.instruction="";return}e.instruction+=n;}}function ql(e,n,t,r){if(e.phase!=="instruction"||e.nesting!==1||e.instructionOverflow)return;if(r>Br){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(!Xt(t)){e.instructionOverflow=true,e.instruction="";return}if(i.depth>Br){e.instructionOverflow=true,e.instruction="";return}if(i.node.kind==="textValue"){if(ny(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 Jl(e){return e.nesting!==1||e.phase!=="instruction"||(e.phase="result",e.instructionOverflow||e.nestingOverflow)?null:du(e.instruction)}function Ql(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&bo(e);}function cu(e){return e.phase==="instruction"&&e.nesting>=1}function uu(e){return e.phase==="result"&&e.nesting>=1}function es(e){let n=false,t=false,r=false,o=Kl(),a=Ul(),i=()=>n&&t&&r,l=u=>{u==="PAGE"?n=true:u==="NUMPAGES"?t=true:r=true;},s=(u,f)=>{if(u.kind!=="runProperties"){if(Vn(u,"begin")){Zl(a);return}if(yo(u)){ql(a,u,o,f);return}if(Vn(u,"separate")){let p=Jl(a);p&&l(p);return}Vn(u,"end")&&Ql(a);}},d=(u,f)=>{if(u.kind==="run")for(let p of u.children){if(!Xt(o))return;if(s(p,f+1),(p.kind==="drawing"||p.kind==="generic")&&!yo(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()&&Xt(o)&&!(f>Br)&&u.kind!=="textValue"){if(u.kind==="paragraph"){bo(a);for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return;bo(a);return}if(u.kind==="run"){d(u,f);return}for(let p of u.children)if(c(p,f+1),i()||o.exhausted)return}};return c(e,0),!n&&!t&&!r?Yl:{hasPage:n,hasNumPages:t,hasSectionPages:r}}var ty=64,ry=64,oy=[{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 st(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function Pt(e){return String(st(e))}function fu(e){let n=st(e);return n<10?`0${n}`:String(n)}function ns(e){let n=st(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of oy)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function pu(e){return ns(e).toLowerCase()}function ts(e){let n=st(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 gu(e){return ts(e).toLowerCase()}function ay(e){let n=st(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 iy(e){return st(e).toString(16).toUpperCase()}function ly(e){let n=["*","\u2020","\u2021","\xA7"],t=st(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,sy);return n[r].repeat(o)}var sy=8,Ia=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],dy=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Ta(e){let n=st(e);if(n<20)return Ia[n];if(n<100){let r=n%10;return dy[Math.floor(n/10)]+(r===0?"":`-${Ia[r]}`)}if(n<1e3){let r=n%100;return `${Ia[Math.floor(n/100)]} hundred${r===0?"":` ${Ta(r)}`}`}let t=n%1e3;return `${Ia[Math.floor(n/1e3)]} thousand${t===0?"":` ${Ta(t)}`}`}function mu(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function cy(e){return mu(Ta(e))}var uy=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function fy(e){let n=uy.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function py(e){let n=Ta(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return mu(r+fy(n.slice(t+1)))}function dt(e,n){switch(e){case "decimal":return Pt(n);case "decimalZero":return fu(n);case "upperRoman":return ns(n);case "lowerRoman":return pu(n);case "upperLetter":return ts(n);case "lowerLetter":return gu(n);case "ordinal":return ay(n);case "cardinalText":return cy(n);case "ordinalText":return py(n);case "hex":return iy(n);case "chicago":return ly(n);case "numberInDash":return `- ${Pt(n)} -`;case "none":case "bullet":return "";default:return Pt(n)}}function rs(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"?"":dt(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}Object.freeze({marks:Object.freeze(new Map)});function Vt(e,n){return Zc$1(e,n)}function os(e,n){if(!od$1(e))return null;if(ed$1(e)||fd$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=cd$1(e),r=kd(e)??ld$1(e);if(!r)return null;let o=hd$1(e),a=o!==null?Vt(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?gy(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&&md$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 gy(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 hu(e){return cd$1(e)||dd$1(e)||ed$1(e)||fd$1(e)}var ct="all-markup",yu=Object.freeze([]),my=32,hy={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function Or(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 bu(e){if(e.kind==="textValue")return null;let n=hy[e.kind];if(n===void 0)return null;let t=Or(e,"date");return {kind:n,id:Or(e,"id")??"",author:Or(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function xu(e,n){return e.length===0?[n]:[...e,n]}function Su(e){return e.kind!=="textValue"&&qa$1(e.kind)}var va=my;function xo(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 as(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)continue;let o=r.localName==="ins"?"insert":r.localName==="del"?"delete":null;if(o===null)continue;let a=Or(r,"date");return {kind:o,id:Or(r,"id")??"",author:Or(r,"author")??"",...a===void 0?{}:{date:a},nodeId:r.id}}return null}function yy(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 So(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}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}),by=/^[0-9A-Fa-f]{6}$/;function It(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function wo(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function wu(e){return e===void 0||e==="auto"?null:by.test(e)?e.toUpperCase():null}function Ru(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function Ln(e,n){let t={...Yn};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?Ru(o?.asciiTheme,n)??Ru(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=wo(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=wu(r.attributes?.val);break}case "b":t.bold=It(r);break;case "i":t.italic=It(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!It(r)?null:{variant:o,color:wu(r.attributes?.color)};break}case "strike":t.strike=It(r);break;case "dstrike":t.doubleStrike=It(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=fo(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=wo(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=It(r);break;case "smallCaps":t.smallCaps=It(r);break;case "spacing":{let o=wo(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=wo(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=wo(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=It(r);break;}return t}function Tt(e,n){return n.caps?e.toUpperCase():e}function Kn(e,n,t){return t.measure(Tt(e,n),n)}function xy(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 is(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}function ls(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 Sy=new Set(["left","center","right"]),wy=new Set(["margin","indent","leftMargin"]),Ry=new Set(["dot","hyphen","underscore","middleDot"]);function Py(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==la)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===la&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:Sy.has(n)?n:"left",relativeTo:wy.has(t)?t:"margin",...r!==void 0&&Ry.has(r)?{leader:r}:{}}}function Iu(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 Pt(t);let o=dt(r,t);return o.length>0?o:Pt(t)}function Iy(e,n){if(e==="PAGE")return Iu(n.pageNumber,n.format);let t=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;return !Number.isFinite(t)||t<0?"":Pt(Math.floor(t))}function Ty(e,n,t){let r=Ro(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}function Ro(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 Pu(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"?Yb$1(e):""}function Tu(e,n=[],t,r,o,a,i=ct,l,s,d){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let c=[],u=0,f,p=lc(e,{maxNesting:Vl,maxInstructionChars:ho}),g=new Set(p.filter(R=>R.kind==="complex").map(R=>R.node.id)),b=new Set;for(let R of p)for(let N of R.removeNodeIds)b.add(N);let h=Ul(),y=Kl(),x=null,P=null,T=yu,_=(R,N,I,C,B,E,M)=>{if(R.length===0&&!C&&!M?.inlineDrawing)return;let F=f?{link:f}:{},H=T.length===0?{}:{revisions:T};if(C){c.push({text:R,props:N,style:I,start:B,end:E,projected:true,...M?.measureText!==void 0?{measureText:M.measureText}:{},...M?.noteNav?{noteNav:M.noteNav}:{},...M?.inlineDrawing?{inlineDrawing:M.inlineDrawing}:{},...F,...H});return}R.length!==0&&c.push({text:R,props:N,style:I,start:B,end:E,...M?.positionalTab?{positionalTab:M.positionalTab}:{},...M?.breakKind?{breakKind:M.breakKind}:{},...F,...H});},j=()=>{if(!x||!x.atomic){x=null,P=null;return}let R=x.atomStart,N=R+1;if(x.style.hidden){x=null,P=null;return}if(x.kind&&t){let I=Iy(x.kind,t);_(I,x.props,x.style,true,R,N);}else x.cachedText.length>0&&_(x.cachedText,x.props,x.style,true,R,N);x=null,P=null;},z=()=>{if(x){if(x.atomic){u=x.atomStart;for(let R of x.buffered)c.push({...R,start:u,end:u+(R.end-R.start)}),u+=R.end-R.start;x.cachedText.length>0&&x.buffered.length===0&&(_(x.cachedText,x.props,x.style,false,u,u+x.cachedText.length),u+=x.cachedText.length);}else {for(let R of x.buffered)c.push(R);u=x.bufferOffset;}x=null,P=null;}},L=(R,N,I)=>{let C=(H,D,$,X)=>{let J=So(T),K=I.hidden||!xo(T,i)||J;if(D.hidden||K){if(J&&l&&ls(l,$,X),!D.hidden)return;_("\uFFFC",N,I,true,$,X);return}_("\uFFFC",N,I,true,$,X,{inlineDrawing:Object.freeze({drawingNodeId:H,ownerPartName:s.ownerPartName,projection:D,resource:s.resourceOf(D)})});};if(R.kind==="drawing"){let H=u;u+=1;let D=u;if(!s)return;let $=s.projectionForAtom?.(R.id)??(R.kind==="drawing"?s.project(R):null);if(!$||$.kind!=="inline"){_("\uFFFC",N,I,true,H,D);return}C(R.id,$,H,D);return}if(_a$1(R)){let H=u;u+=1;let D=u;if(!s)return;let $=s.projectionForAtom?.(R.id)??null;if(!$||$.kind!=="inline"){_("\uFFFC",N,I,true,H,D);return}C(R.id,$,H,D);return}if(hu(R)){let H=os(R,a),D=u,$=D+1;if(u=$,I.hidden||!H||H.text.length===0&&!H.measureText)return;let X=H.scopeId&&H.nav?{scopeId:H.scopeId,direction:H.nav}:void 0;_(H.text.length>0?H.text:H.measureText??"",N,I,true,D,$,{...H.measureText!==void 0?{measureText:H.measureText}:{},...X?{noteNav:X}:{}});return}let B=Py(R);if(B){I.hidden||_(" ",N,I,false,u,u,{positionalTab:B});return}let E=Pu(R);if(E.length===0)return;let M=So(T);I.hidden||!xo(T,i)||R.kind==="deletedText"&&!M||_(E,N,I,false,u,u+E.length,{...R.kind==="hardBreak"?{breakKind:Wb$1(R)}:{}}),M&&l&&ls(l,u,u+E.length),u+=E.length;},k=(R,N)=>{if(R.kind!=="run")return;let I=Ty(R,n,r),C=Ln(I,d);for(let B of R.children){if(!Xt(y)){if(z(),bo(h),B.kind==="runProperties"||Vn(B,"begin")||Vn(B,"separate")||Vn(B,"end")||yo(B)||b.has(B.id)&&P===null)continue;L(B,I,C);continue}if(B.kind!=="runProperties"){if(Vn(B,"begin")){let E=g.has(B.id);Zl(h),h.nesting===1&&(z(),P=E?B.id:null,x={kind:null,atomic:E,atomStart:u,props:I,style:C,capturedResultStyle:false,cachedText:"",buffered:[],bufferOffset:u},E&&(u+=1));continue}if(yo(B)){ql(h,B,y,N+1);continue}if(Vn(B,"separate")){let E=h.nesting===1&&h.phase==="instruction",M=Jl(h);E&&x&&(x.kind=M&&t?M:null,x.props=I,x.style=C);continue}if(Vn(B,"end")){let E=h.nesting===1;Ql(h),E&&(x?.atomic?j():z());continue}if(!(cu(h)&&x?.atomic)){if(x&&uu(h)){let E=Pu(B);if(E.length===0)continue;let M=So(T);if(!xo(T,i)||B.kind==="deletedText"&&!M){x.atomic||(u+=E.length,x.bufferOffset=u),M&&l&&ls(l,u-E.length,u);continue}if(x.atomic){if(C.hidden)continue;x.capturedResultStyle||(x.props=I,x.style=C,x.capturedResultStyle=true),x.cachedText+=E;continue}if(C.hidden){u+=E.length,x.bufferOffset=u;continue}x.capturedResultStyle||(x.props=I,x.style=C,x.capturedResultStyle=true),x.buffered.push({text:E,props:I,style:C,start:u,end:u+E.length}),u+=E.length,x.bufferOffset=u;continue}b.has(B.id)&&P===null&&g.size>0,L(B,I,C);}}}};if(!Xt(y))return c;let v=Va$1(),m=(R,N,I,C)=>{if(fc(R)){u+=1;return}if(R.kind==="run"){k(R,N);return}if(Jb$1(R)){if(C>=Ib$1||N>Br)return;for(let F of Mb$1(R))m(F,N+1,I,C+1);return}if(N>Br||N>=va)return;let B=R.kind!=="textValue"&&"localName"in R?Ua$1(I,R):I;if(R.kind==="hyperlink"){let F=f;f=o?.(R)??void 0;for(let H of R.children)m(H,N+1,B,C);f=F;return}if(!Su(R))return;let E=bu(R);if(!E||!Xt(y))return;let M=T;T=xu(M,E);for(let F of R.children)m(F,N+1,B,C);T=M;};for(let R of e.children)m(R,1,v,0);return z(),c}function Yt(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function vu(e,n=Yl){if(!e||!Yt(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 Po(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 Kt(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}function vy(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 By(e){return e.map(vy).join(";")}var Bu=new WeakMap,Cu=1<<18;function ku(e){if(e.kind==="textValue")return `t:${e.value}`;let n=e.kind==="paragraph"||e.kind==="table";if(n){let r=Bu.get(e);if(r!==void 0)return r}let t=Oy(e);return n&&t.length<=Cu&&Bu.set(e,t),t}function Oy(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(ku(t));return `(${n.join("|")})`}var Ou=new WeakMap;function Ut(e){let n=Math.round(e.width*1e3),t=e.drawingToken??"",r=e.exclusionToken??"",o=By(e.properties),a=Ou.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,ku(e.paragraph)].join("\0");return i.length<=Cu&&Ou.set(e.paragraph,{producer:e.producer,width:n,drawingToken:t,exclusionToken:r,propertiesToken:o,key:i}),i}function Cy(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 Eu=21600;function je(e){return Number.isFinite(e)?e:0}function Io(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 ky(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 Io(t)}function ss(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 Io(r)}function Ey(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 Mu(e,n){return Cr(e,n)}function ds(e,n,t){return Mu(Cr(e,n),t)}function Ly(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 My(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 Io(t)}function Lu(e,n,t){let r=Ny(Ly(e,n),t),o=My(e,n);return Io([...r,...o])}function Ny(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 Fy(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 Ay(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 Dy(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],b=Ay(c,u,p,g,t,r);b!==null&&o.push(b);}}return Object.freeze(o)}function _y(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 Dy(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function zy(e,n,t,r){let o=Lu(e,t,r);return n&&n.length>=3&&(o=ky(o,Lu(n,t,"nonzero"))),o}function Nu(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=_y(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((g,b)=>{if(b+1>=u.length)return [];let h=u[b+1];return h<=g+1e-6?[g]:[g,h,(g+h)/2]}):[d];for(let g of p){let b=zy(e,o,g,r);for(let h of b)f.push(Object.freeze({start:h.start-l,end:h.end+s}));}return Io(f)}function Fu(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 Hy(e){let n=Math.max(0,je(e.extentWidthPt)),t=Math.max(0,je(e.extentHeightPt)),r=Oa(e.transform,n,t),o=Math.min(e.polygonEmu.length,tn);if(o<3)return Fu({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/Eu,i=r.height/Eu,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 Ca({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 jy(e,n){let t=n.effectInsets??Ba,r=n.wrapDistances??Ba,o=je(n.contentLeft),a=je(n.contentRight);if(n.mode==="topAndBottom"){let c=Mu(Cr(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ss([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=ds(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):ss([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:Fu(n.contentBounds),l=n.mode==="through"?"evenodd":"nonzero",s=Fy(r,t),d=Nu(i,e,s,l,n.clipPolygon);return ss(d,o,a)}function Gy(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 Wy(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=Gy(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 Au(e,n){let t=jy(e,n),r=Ey(t,n.contentLeft,n.contentRight);return Wy(r,t,n.textSide,n.contentLeft,n.contentRight)}function $y(e,n,t,r){return t.length<3?false:Nu(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function cs(e,n,t){let r=t.effectInsets??Ba,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 $y(e,n,t.clipPolygon,r);let a=Cr(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Du(e){let n=Object.freeze({top:je(e.wrapDistancesEmu.top/Un),right:je(e.wrapDistancesEmu.right/Un),bottom:je(e.wrapDistancesEmu.bottom/Un),left:je(e.wrapDistancesEmu.left/Un)}),t=e.mode==="tight"||e.mode==="through"?Hy({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 fn=1e5,tn=D.maxPolygonPoints,Ba=Object.freeze({top:0,right:0,bottom:0,left:0}),Xy=32,Vy=.1,Yy=new Set(["rect","ellipse","roundRect"]);function de(e){return Number.isFinite(e)?e:0}function wn(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function _u(e,n){let t=e+n;return Number.isFinite(t)?t:0}function zu(e,n,t){let r=wn(e,0,t),o=wn(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 Ky(e){let n=zu(wn(e.left,0,fn),wn(e.right,0,fn),fn),t=zu(wn(e.top,0,fn),wn(e.bottom,0,fn),fn);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function Uy(e){let n=Ky({left:e.left*fn,top:e.top*fn,right:e.right*fn,bottom:e.bottom*fn});return Object.freeze({left:n.left/fn,top:n.top/fn,right:n.right/fn,bottom:n.bottom/fn})}function Zy(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/Un;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 Cr(e,n){let t=de(n.left),r=de(n.right),o=de(n.top),a=de(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,_u(e.width,t+r)),height:Math.max(0,_u(e.height,o+a))})}function qy(e,n,t){let r=e*wn(t.left,0,1),o=n*wn(t.top,0,1),a=e*(1-wn(t.right,0,1)),i=n*(1-wn(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 Oa(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?de(vt(r)??n):Math.max(0,de(n)),l=o>0?de(vt(o)??t):Math.max(0,de(t));return Object.freeze({offsetX:de(vt(a.x)??0),offsetY:de(vt(a.y)??0),width:i,height:l})}function Jy(e,n,t,r){let o=qy(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+wn(f.x/l,0,1)*a,g=i<=0?o.top:o.top+wn(f.y/s,0,1)*i;d.push(Object.freeze({x:de(p),y:de(g)}));}return Object.freeze(d)}function Hu(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=de(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:de(s+n.x),y:de(d+n.y)})}function ju(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 us(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=To(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let l of t)r.push(Hu(Object.freeze({x:l.x+e.offsetX,y:l.y+e.offsetY}),n,e.transform));let o=ju(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,de(e.layoutWidth))/a,scaleY:Math.max(0,de(e.layoutHeight))/i,anchorX:de(e.anchorX),anchorY:de(e.anchorY)})}function Qy(e,n){return Object.freeze({x:de(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:de(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function Ca(e){let n=e.mapping??us({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=Jy(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:de(s.x+e.offsetX),y:de(s.y+e.offsetY)});i.push(Qy(Hu(d,a,e.transform),n));}return Object.freeze(i)}function To(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 eb(e,n,t){if(!e||!Yy.has(e))return null;if(n<=0||t<=0)return To(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return To(0,0,n,t);if(e==="ellipse"){let l=[],s=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(Xy,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)*Vy,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 Er(e){return Object.freeze({x:de(e.x),y:de(e.y)})}function nb(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=Er(i[u]),p=Er(i[(u+1)%c]),g=l(f),b=l(p);if(g&&b?d.push(p):g&&!b?d.push(Er(s(f,p))):!g&&b&&(d.push(Er(s(f,p))),d.push(p)),d.length>=tn)break}return Object.freeze(d.slice(0,tn))},a=e.slice(0,tn).map(Er);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:de(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:de(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:de(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:de(i.x+d*(l.x-i.x)),y:r})})],Object.freeze(a)}function tb(e){let n=ju(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function ka(e,n){let t=rb(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=nb(a,n);return i.length>=3?Object.freeze(i.map(Er)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function rb(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 ob(e){let n=Math.max(0,de(e.extentWidth)),t=Math.max(0,de(e.extentHeight)),r=de(e.anchorX),o=de(e.anchorY),a=Uy(e.crop),i=Zy(e.effectExtentEmu),l=Oa(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=us(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=Ca({points:To(0,0,l.width,l.height),...d,crop:u,mapping:c}),p=eb(e.presetGeometry,l.width,l.height),g="none",b=p;b||(g=e.presetGeometry?"unsupported-preset":"none",b=To(0,0,l.width,l.height));let h=Ca({points:b,...d,crop:u,mapping:c}),y=tb(h.length>=3?h:f),x=Cr(y,i);return Object.freeze({contentBounds:s,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:h.length>=3?h:f,clipFallback:g,effectInsets:i})}function Lr(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 ob({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 ab(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=Oa(n,t,r),a=o.width,i=o.height,l=us({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),s=de(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,b=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(b-1)<1e-4)return null;let y=s*Math.PI/180,x=Math.cos(y),P=Math.sin(y),T=o.offsetX+a/2,_=o.offsetY+i/2,j=f*x*c,z=-f*P*u,L=p*P*c,k=p*x*u,v=f*(T-x*c*(a/2)+P*u*(i/2)-l.bboxX),m=p*(_-P*c*(a/2)-x*u*(i/2)-l.bboxY);return Object.freeze({a:de(j*g),b:de(L*g),c:de(z*b),d:de(k*b),e:de(v),f:de(m)})}function nR(e){let n=ab(e);if(n)return `matrix(${kr(n.a)}, ${kr(n.b)}, ${kr(n.c)}, ${kr(n.d)}, ${kr(n.e)}, ${kr(n.f)})`}function kr(e){return Number.isFinite(e)?String(e):"0"}var ib=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"}),lb=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),sb=Object.freeze({left:0,top:0,right:0,bottom:0});function $u(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=ib[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??sb,transform:n?.transform??lb,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var Un=12700;function Je(e){return e/Un}function vt(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*Un*72)return null;let n=e/Un;return Number.isFinite(n)?n:null}function ut(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 Xu(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 Ea(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 La(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:Ea(e.geometry,n,t)})}function fs(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:Ea(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 ps(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 Ma(e,n){let t=ps(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=Ea(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:ka(i,n)})}var Gu=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),Wu=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function Zn(e){return e%2===1}function Vu(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 Yu(e,n){if(Vu(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 Zn(n.pageNumber)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return Zn(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 Zn(n.pageNumber)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return Zn(n.pageNumber)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function Ku(e,n){if(Vu(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 Zn(n.pageNumber)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return Zn(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 Zn(n.pageNumber)?{top:i,bottom:i,center:i}:{top:l,bottom:l,center:l};case "outsideMargin":return Zn(n.pageNumber)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function Uu(e){return e===null?0:vt(e)}function db(e,n,t){let r=Zn(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 cb(e,n,t){let r=Zn(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 ub(e,n,t,r,o){let a=Yu(e,o);if(!a)return null;let i=Uu(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=db(n,r,o);if(l!==null)return l+i}return a.left+i}function fb(e,n,t,r,o){let a=Ku(e,o);if(!a)return null;let i=Uu(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=cb(n,r,o);if(l!==null)return l+i}return a.top+i}function vo(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 gs(e,n){let t=ut(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 b=vt(r.simplePosition.xEmu),h=vt(r.simplePosition.yEmu);return Object.freeze(b===null||h===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:b-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=Yu(l,n),c=Ku(s,n),u=d?.left??0,f=c?.top??0;if(!Gu.has(l)||!Wu.has(s))return Object.freeze({x:0,y:0,horizontalFrame:Gu.has(l)?l:a,verticalFrame:Wu.has(s)?s:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=ub(l,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),g=fb(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 pb(e){let n=e.input.projection,t=n.anchor,r=ut(n),o=Lr({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?ps(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?ka(o,e.clipRegion):o,resource:e.input.resource,accessibility:$a$1(n),...$u(n)})}function Rn(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 Mn(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 gb(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 mb(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function ms(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:Ea(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 Mr(e){let n=Rn(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=Mn(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"?mb(l,i):i,u=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:l.box,anchorCharacterX:gb(l,c,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:s}),f=gs(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:vo(e.frameBase),b=pb({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(b);}return Object.freeze(r)}function Zu(e){let n=ut(e.input.projection),t=e.slotX+n.distL+n.effectL,r=Lr({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=ps(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:ka(r,o),resource:e.input.resource,accessibility:$a$1(e.input.projection),...$u(e.input.projection)})}var hb=256,bs=8,Zt=8,Nr=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function yb(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 ys(e){return e.behindDocument?"behind":"inFront"}function qu(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function bb(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 xb(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function xs(e){let n=bb(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 Du({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"?xb(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Ss(e){if(e.mode==="topAndBottom"||e.mode==="square")return ds(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 Sb(e){if(e.drawing.behindDocument||!qu(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=xs({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:ys(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:Ss(t),input:t}):null}function Ju(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=ys(e),r=ys(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:Ju(e,n)}function Qu(e){return Object.freeze([...e].sort(wb))}function hs(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 ws(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 ef(e,n){let t=n.maxAttempts??hb,r=[...e].sort(Ju),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(b=>hs(b.paintBounds,s.paintBounds));){let p=o.find(b=>hs(b.paintBounds,s.paintBounds)),g=p.paintBounds.y+p.paintBounds.height-s.paintBounds.y+.001;s=ws(s,g),d+=1;}let c=o.some(f=>hs(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 Fr(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=Au(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 nf(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 Rb(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function Rs(e,n){let t=Rb(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 Pb(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 Ps(e,n){return Object.freeze({...e,layoutFallback:n})}function tf(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({...Pb(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function rf(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function of(e){let n=Rn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Mn(e.paragraph),r=Math.max(1,e.contentRight-e.contentLeft),o=[];for(let a of n){if(a.projection.anchor?.behindDocument||!qu(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=gs(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=ut(a.projection),p=Lr({projection:a.projection,anchorX:c.x,anchorY:u,extentWidth:f.width,extentHeight:f.height}),g=xs({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:Ss(g),input:g}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}function Na(e){let n=Rn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Mn(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=ut(o.projection),d=Lr({projection:o.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:s.width,extentHeight:s.height}),c=xs({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:Ss(c),input:c}));}return r.sort((o,a)=>o.sourceOrder-a.sourceOrder),Object.freeze(r)}var Ib=8;function Tb(e,n,t,r){return e<r&&n>t}function ft(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<Ib;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;Tb(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 vb(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function Bb(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 qn(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=Fr(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),Bb(n.input),vb(o)].join("|")}).join(`
|
|
2
|
-
`)}function Is(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?yb(l,a):0,u=Sb({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 Bo(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=Is(s,n,0,t,r,a);d.length>0&&i.set(l.index,d);}return i}function Fa(e,n){if(e.size!==n.size)return false;for(let[t,r]of e){let o=n.get(t);if(!o||qn(r)!==qn(o))return false}return true}function Aa(e){return e.size===0?"":[...e.entries()].sort(([n],[t])=>n-t).map(([n,t])=>`${n}:${qn(t)}`).join(`
|
|
3
|
-
`)}var Ob=.001;function pn(e){return Ro(e)}var _a=new Set(["-","\u2010","\u2013","\u2014"]);function af(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===" "||_a.has(r)&&t>0&&e[t-1]!==" "&&t+1<e.length&&e[t+1]!==" "&&!_a.has(e[t+1]))&&n.push(t+1);}return n[n.length-1]!==e.length&&n.push(e.length),n}function Cb(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
|
-
`||l===Vb$1)return false;if(l!==" "&&l!==" ")return true}}return false}function kb(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===`
|
|
5
|
-
`||u===Vb$1)return {width:o,decimalOffset:i?a:o};let f=c+1,p=s.text.slice(c,f),g=r.measure(Tt(p,s.style),s.style);!i&&u==="."?i=true:i||(a+=g),o+=g,c=f;}}return {width:o,decimalOffset:i?a:o}}function Eb(e,n,t,r){let o=e.relativeTo==="indent"||!r?{left:n,right:t}:r;return {positionPt:e.alignment==="right"?o.right:e.alignment==="center"?(o.left+o.right)/2:o.left,alignment:e.alignment,...e.leader?{leader:e.leader}:{}}}function lf(e,n,t,r=0){return (t.length>0?ft(e,n.height,t):n.exclusionSkipBefore??0)+Math.max(0,n.height-n.trailingSpacing)+r}function Lb(e){return Object.freeze({spans:e.spans.map(n=>Object.freeze({...n,box:Object.freeze({...n.box})})),drawings:e.drawings.map(n=>Object.freeze({...n,paintBounds:Object.freeze({...n.paintBounds}),hitBounds:Object.freeze({...n.hitBounds})})),start:e.start,end:e.end,width:e.width,height:e.height,baseline:e.baseline,leading:e.leading,trailingSpacing:e.trailingSpacing,...e.pageBreakAfter?{pageBreakAfter:true}:{},...e.columnBreakAfter?{columnBreakAfter:true}:{},...e.deletedRanges?{deletedRanges:Object.freeze(e.deletedRanges)}:{},...e.exclusionSkipBefore?{exclusionSkipBefore:e.exclusionSkipBefore}:{}})}var Da=31680;function Oo(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let n=Number(e);return Number.isFinite(n)?n>Da?Da:n<-Da?-Da:n:null}function Co(e){let n=0,t=0;for(let r of e){if(r.localName!=="ind")continue;let o=r.attributes?.left??r.attributes?.start,a=r.attributes?.right??r.attributes?.end,i=Oo(o),l=Oo(a);i!==null&&(n=i/20),l!==null&&(t=l/20);}return {left:n,right:t}}function sf(e){let n="left";for(let t of e)if(t.localName==="jc")switch(t.attributes?.val){case "center":n="center";break;case "right":case "end":n="right";break;case "both":case "distribute":n="both";break;default:n="left";}return n}function Mb(e){return e.endsWith(" ")}function Nb(e,n){let t=e.range.end-e.range.start;if(t<=0||e.text===" "||e.projected||e.text.length!==t)return Object.freeze([0,e.box.width]);let r=[0];for(let o=1;o<=e.text.length;o+=1)r.push(Kn(e.text.slice(0,o),e.style,n));return Object.freeze(r)}function Ar(e,n){return e.map(t=>t.caretEdges?t:{...t,caretEdges:Nb(t,n)})}function za(e,n,t,r,o,a,i){if(e.length===0)return e;if(o==="left")return Ar(e,n);let l=e[e.length-1],s=l.text.replace(/\s+$/,""),d=s===l.text?0:l.box.width-Kn(s,l.style,n),c=i??l.box.x-t+l.box.width-d,u=r-c;if(u<=0)return Ar(e,n);if(o==="both"){if(a)return Ar(e,n);let p=[];for(let y=1;y<e.length;y+=1)Mb(e[y-1].text)&&p.push(y);if(p.length===0)return Ar(e,n);let g=u/p.length,b=new Set(p),h=0;return Ar(e.map((y,x)=>(b.has(x)&&(h+=g),h===0?y:{...y,box:{...y.box,x:y.box.x+h}})),n)}let f=o==="center"?u/2:u;return Ar(e.map(p=>({...p,box:{...p.box,x:p.box.x+f}})),n)}function Ha(e,n){return n===0||e.length===0?e:e.map(t=>La(t,n,0))}function ja(e,n,t,r,o,a,i,l=[],s=Tr,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let p=u?.lineSpacing??Pr,g=u?.firstLineOffset??0,b=[],h=Tu(e,l,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??ct,b,u?.inlineDrawingLayout,u?.themeFonts),y=Math.max(0,u?.startOffset??0),x=h.flatMap(O=>{if(O.end<=y)return [];if(O.start>=y)return [O];let S=y-O.start;return [{...O,text:O.projected?O.text:O.text.slice(S),start:y}]});if(x.length===0&&u?.suppressEmptyPlaceholderLine)return [];let P=O=>O.revisions===void 0?{}:{revisions:O.revisions},T=u?.markRunProperties??l,_=T.length===0?Yn:Ln(T,u?.themeFonts),j=t+r,z=u?.contentLeft??t,L=u?.contentRight??j,k=u?.contentOriginX??0,v=[],m={spans:[],start:y,end:y,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},R=false,N=new Map,I=(()=>{let O=new Set;if(!u?.inlineDrawingLayout)return O;let S=Mn(e);for(let W of Rn(e,u.inlineDrawingLayout)){if(W.projection.wrap!=="topAndBottom")continue;let Z=S.get(W.atomId);Z!==void 0&&O.add(Z);}return O})(),C=(()=>{let O=new Set;if(!u?.inlineDrawingLayout)return O;let S=Mn(e);for(let W of Rn(e,u.inlineDrawingLayout)){if(W.projection.anchor?.behindDocument||W.projection.wrap==="topAndBottom"||W.projection.wrap==="inline"||W.projection.wrap==="behind"||W.projection.wrap==="inFront")continue;let Z=S.get(W.atomId);Z!==void 0&&O.add(Z);}return O})(),B=[...(u?.pageExclusionZones??[]).filter(O=>O.anchorParagraphId===n).map(O=>O.anchorModelStart),...I,...C],E=(()=>{let O=new Map;if(B.length===0)return O;let S=0,W=0,Z=0,ie=()=>Z===0?g:0,ue=()=>Math.max(1,r-ie()),Be=ye=>{S=ye,W=0,Z+=1;};for(let ye of x){if(ye.inlineDrawing){let _e=ut(ye.inlineDrawing.projection).totalWidth;W>0&&W+_e>ue()&&Be(ye.start),B.includes(ye.start)&&O.set(ye.start,S),W+=_e;continue}if(ye.text===`
|
|
6
|
-
`||ye.text===Vb$1){Be(ye.end);continue}let Ze=0;for(let _e of af(ye.text)){let Qe=ye.text.slice(Ze,_e);if(Qe.length===0)continue;let en=ye.style,Se=o.measure(Qe,en),Tn=ye.start+Ze;W>0&&W+Se>ue()&&Be(Tn),B.includes(Tn)&&O.set(Tn,S),B.includes(ye.start)&&O.set(ye.start,S),W+=Se,Ze=_e;}}for(let ye of B)O.has(ye)||O.set(ye,S);return O})();for(let O of C){let S=E.get(O);S!==void 0&&N.set(O,S);}let M=O=>{if(O.anchorParagraphId!==n)return true;let S=E.get(O.anchorModelStart);return S!==void 0&&m.start>=S||m.end>=O.anchorModelStart},F=()=>{let O=u?.pageExclusionZones?.filter(Z=>!(!M(Z)||Z.anchorParagraphId===n&&(Z.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],S=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&N.size>0?of({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:z,contentRight:L,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:N,anchorCellBox:u.anchorCellBox}):Object.freeze([]),W=u?.inlineDrawingLayout&&N.size>0?Na({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:z,contentRight:L,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:N}):Object.freeze([]);return Object.freeze([...O,...S,...W])},H=()=>v.length===0?g:0,D=()=>k+t+H(),$=()=>Math.max(1,r-H()),X=()=>v.reduce((O,S)=>O+S.height+(S.exclusionSkipBefore??0),0),J=()=>(u?.paragraphStartY??0)+X(),K=O=>{I.has(O)&&N.set(O,X());},q=()=>{if(R)return;let O=F();if(O.length===0||m.spans.length>0||m.drawings.length>0)return;let S=o.lineMetrics(_),W=ft(J(),m.height>0?m.height:S.height,O);W>.001&&(R=true,m.exclusionSkipBefore=W);},he=()=>J()+(m.exclusionSkipBefore??0)+.001,Ie=()=>{let O=F();if(O.length===0)return true;q();let S=Fr(he(),O,z,L),W=D()+m.width,Z=Rs(W,S);return Z?(Z.x>W+.001&&(m.width=Z.x-D()),true):false},ce=()=>{let O=$(),S=F();if(S.length===0)return O;if(q(),!Ie())return 0;let W=Fr(he(),S,z,L),Z=D()+m.width,ie=nf(Z,W);return ie<=.001?0:Math.min(O,m.width+ie)},Pe=()=>Math.max(0,ce()-m.width),ve=()=>{let O=F();if(O.length===0||!O.some(ue=>ue.anchorParagraphId!==n||m.end>ue.anchorModelStart))return false;let W=Fr(he(),O,z,L),Z=D()+m.width,ie=false;for(let ue of W){if(!ie){Z>=ue.start-1e-6&&Z<ue.end-1e-6&&(ie=true);continue}if(ue.end-ue.start>.001)return m.width=ue.start-D(),true}return false},me=O=>{if(B.length===0||O<Math.min(...B))return;let S=F().filter(Be=>Be.anchorParagraphId===n&&O>=Be.anchorModelStart);if(S.length===0)return;q();let W=Fr(he(),S,z,L),Z=D()+m.width,ie=-1;for(let Be=0;Be<W.length;Be+=1){let ye=W[Be];if(Z>=ye.start-.001&&Z<ye.end-.001){ie=Be;break}}if(ie>=0)return;let ue=Rs(Z,W);ue&&ue.x>Z+.001&&(m.width=ue.x-D());},fe=O=>{F().filter(W=>W.input.mode==="topAndBottom"&&W.anchorParagraphId===n&&O>=W.anchorModelStart).length!==0&&((m.spans.length>0||m.drawings.length>0)&&ee(),q());},be=(O,S=0)=>S>64?Pe()>=O:(q(),Ie()?O<=Pe()+.001?true:m.spans.length>0||m.drawings.length>0?ve()&&O<=Pe()+.001?true:(ee(),be(O,S+1)):ve()?be(O,S+1):true:m.spans.length>0||m.drawings.length>0?(ee(),be(O,S+1)):true),Te=(O,S)=>b.filter(W=>W.start<S&&W.end>O).map(W=>({start:Math.max(W.start,O),end:Math.min(W.end,S)})),He=-1,an=0,rn=0,Me="",Jn=(O,S)=>{let W=o.lineMetrics(O),Z=Xu(W.baseline,m.height||W.height,S);return m.height===0?(m.height=Z.lineHeight,m.baseline=Z.baseline):(Z.lineHeight>m.height&&(m.height=Z.lineHeight),m.baseline=Math.max(m.baseline,Z.baseline)),{extentTopY:Z.extentTopY}},Qn=()=>{if(m.drawings.length===0)return;m.spans.length===0&&(m.baseline=Math.max(m.baseline,...m.drawings.map(S=>S.y+S.height)));let O=fs(m.drawings,m.baseline);m.drawings.splice(0,m.drawings.length,...O),m.baseline=Math.max(m.baseline,...m.drawings.map(S=>S.y+S.height));},xe=()=>{if(m.drawings.length===0)return;let O=fs(m.drawings,m.baseline);m.drawings.splice(0,m.drawings.length,...O);},on=O=>{let S=0;for(let W of m.spans)S=Math.max(S,o.lineMetrics(W.style).height);return S>0?S:O},In=()=>{if(m.drawings.length===0)return;let O=Math.max(0,...m.drawings.map(S=>S.y+S.height+S.distB));m.height=Math.max(m.height,O);},U=()=>{Qn(),In();},Dn=()=>{if(!(m.spans.length<2))for(let O=1;O<m.spans.length;O+=1){let S=m.spans[O-1],W=m.spans[O],Z=W.box.x-(S.box.x+S.box.width);Z<=.001||m.drawings.some(ue=>ue.start>=S.range.end&&ue.start<W.range.start)||(m.spans[O]={...W,wrapAdvanceBefore:Z});}},ee=O=>{let S=o.lineMetrics(_),W=m.baseline;m.height===0?(m.height=S.height,m.baseline=S.baseline,W=S.baseline):O?.includeParagraphMark&&(m.height=Math.max(m.height,S.height)),U();let Z=m.height,ie=p.rule==="auto"&&m.drawings.length>0,ue=ie?on(S.height):Z,Be=Fl(p,ue,m.baseline);ie||(m.baseline=Be.baseline),m.leading=Math.max(0,m.baseline-W),m.height=Be.height,xe(),p.rule!=="exact"&&In(),m.trailingSpacing=m.drawings.length===0&&p.rule!=="exact"?Math.max(0,Be.height-Z):0,(()=>{let _e=F();if(_e.length===0)return;let Qe=ft(J(),m.height,_e);Qe>.001?m.exclusionSkipBefore=Qe:delete m.exclusionSkipBefore;})(),Dn();let Ze=Te(m.start,m.end);Ze.length>0&&(m.deletedRanges=Ze),v.push(m),He=-1,an=0,R=false,m={spans:[],drawings:[],start:m.end,end:m.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},q();},ne=false;for(let O=0;O<x.length;O+=1){let S=x[O];if(S.breakKind==="column"){let ie=o.lineMetrics(S.style);m.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:S.text,props:S.props,style:S.style,box:{x:D()+m.width,y:0,width:0,height:ie.height},...S.link?{link:S.link}:{},...P(S)}),m.height=Math.max(m.height,ie.height),m.baseline=Math.max(m.baseline,ie.baseline),m.end=S.end,ee(),v[v.length-1].columnBreakAfter=true,ne=true;continue}if(S.projected&&!S.inlineDrawing&&S.text==="\uFFFC"){K(S.start),m.end=S.end;continue}if(S.inlineDrawing){K(S.start);let ie=ut(S.inlineDrawing.projection),ue=ie.totalWidth;if((m.spans.length>0||m.drawings.length>0)&&m.width+ue>ce()&&ee(),!be(ue))continue;let{extentTopY:ye}=Jn(S.style,ie),Ze=D()+m.width;m.drawings.push(Zu({input:S.inlineDrawing,paragraphId:n,start:S.start,slotX:Ze,y:ye,baseline:m.baseline,contentLeft:z,contentRight:L})),m.width+=ue,m.end=S.end,He=-1,Me="";continue}if(S.text===Vb$1){let ie=o.lineMetrics(S.style);m.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:Vb$1,props:S.props,style:S.style,box:{x:D()+m.width,y:0,width:0,height:ie.height},...S.link?{link:S.link}:{},...P(S)}),m.height=Math.max(m.height,ie.height),m.baseline=Math.max(m.baseline,ie.baseline),m.end=S.end,ee(),v[v.length-1].pageBreakAfter=true,ne=false;continue}if(S.text===`
|
|
7
|
-
`){let ie=o.lineMetrics(S.style);m.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:`
|
|
8
|
-
`,props:S.props,style:S.style,box:{x:D()+m.width,y:0,width:0,height:ie.height},...S.link?{link:S.link}:{},...P(S)}),m.height=Math.max(m.height,ie.height),m.baseline=Math.max(m.baseline,ie.baseline),m.end=S.end,ee(),ne=true;continue}ne=false,fe(S.start),B.length>0&&S.start>=Math.min(...B)&&me(S.start);let W=o.lineMetrics(S.style),Z=0;for(let ie of af(S.text)){let ue=S.text.slice(Z,ie);if(ue.length===0)continue;let Be=!!S.projected||!!S.positionalTab||S.end-S.start!==S.text.length,ye=Be?{paragraphId:n,start:S.start,end:S.end}:{paragraphId:n,start:S.start+Z,end:S.start+ie};if(ue===" "){(m.spans.length>0||m.drawings.length>0)&&m.width>=ce()&&Cb(x,O,ie)&&ee();let ln=D()+m.width,Ye=kb(x,O,ie,o),Ge=S.positionalTab?Eb(S.positionalTab,t,j,u?.marginExtent):null,nn=Ge===null?vr(s,ln,j):Ge.positionPt>ln?Ge:{...vr(s,ln,j),...Ge.leader?{leader:Ge.leader}:{}},Et=Xl(nn.alignment,ln,nn.positionPt,Ye.width,Ye.decimalOffset);m.spans.push({range:ye,text:" ",props:S.props,style:S.style,box:{x:ln,y:0,width:Et,height:W.height},...nn.leader?{tabLeader:nn.leader,tabLeaderAdvancePt:o.measure(jl.get(nn.leader)??".",S.style)}:{},...S.link?{link:S.link}:{},...nn.leader?{tabLeader:nn.leader}:{},...Be&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...P(S)}),m.width+=Et,m.height=Math.max(m.height,W.height),m.baseline=Math.max(m.baseline,W.baseline),m.end=Be?S.end:S.start+ie,Me=" ",Z=ie;continue}let Ze=S.measureText??ue,_e=o.measure(Tt(Ze,S.style),S.style),Qe=Z>0||Me===""||/[\s\u00a0]$/.test(Me)||/^[\s\u00a0]/.test(ue)||_a.has(Me[Me.length-1])&&!_a.has(ue[0]);if(Qe&&(He=m.spans.length,an=m.width,rn=m.end),me(S.start+Z),m.width+_e>ce()+Ob&&(m.spans.length>0||m.drawings.length>0))if(Qe||He<=0){if(!(ve()&&m.width+_e<=ce()+.001)){if(ee(),!be(_e))continue}}else {let ln=m.spans.splice(He);m.width=an,m.end=rn,m.height=0,m.baseline=0;for(let Ye of m.spans){let Ge=o.lineMetrics(Ye.style);m.height=Math.max(m.height,Ge.height),m.baseline=Math.max(m.baseline,Ge.baseline);}ee();for(let Ye of ln){let Ge=o.lineMetrics(Ye.style);m.spans.push({...Ye,box:{...Ye.box,x:D()+m.width}}),m.width+=Ye.box.width,m.height=Math.max(m.height,Ge.height),m.baseline=Math.max(m.baseline,Ge.baseline),m.end=Ye.range.end;}He=0,an=0;}else if(m.spans.length===0&&m.drawings.length===0&&_e>ce()+.001&&!be(_e))continue;let en=ue,Se=S.start+Z,Tn=_e;if(!Be&&S.measureText===void 0)for(;m.spans.length===0&&en.length>1&&Tn>ce();){let ln=1,Ye=en.length-1,Ge=1;for(;ln<=Ye;){let _n=ln+Ye>>1;o.measure(Tt(en.slice(0,_n),S.style),S.style)<=ce()?(Ge=_n,ln=_n+1):Ye=_n-1;}let nn=en.slice(0,Ge),Et=o.measure(Tt(nn,S.style),S.style);m.spans.push({range:{paragraphId:n,start:Se,end:Se+Ge},text:nn,props:S.props,style:S.style,box:{x:D()+m.width,y:0,width:Et,height:W.height},...S.link?{link:S.link}:{},...S.noteNav?{noteNav:S.noteNav}:{},...P(S)}),m.width+=Et,m.height=Math.max(m.height,W.height),m.baseline=Math.max(m.baseline,W.baseline),m.end=Se+Ge,ee(),en=en.slice(Ge),Se+=Ge,Tn=o.measure(Tt(en,S.style),S.style);}m.spans.push({range:Be?ye:{paragraphId:n,start:Se,end:S.start+ie},text:en,props:S.props,style:S.style,box:{x:D()+m.width,y:0,width:Tn,height:W.height},...S.link?{link:S.link}:{},...Be&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...P(S)}),m.width+=Tn,m.height=Math.max(m.height,W.height),m.baseline=Math.max(m.baseline,W.baseline),m.end=Be?S.end:S.start+ie,Me=ue,Z=ie;}}return (m.spans.length>0||m.drawings.length>0||v.length===0||ne)&&ee({includeParagraphMark:true}),i!==null&&a&&a.set(i,v.map(Lb)),v}var Wa=32,cf=4096,Fb=128,Ab=/[\u0000-\u001F\u007F-\u009F]/,Db={major:null,minor:null};function qt(e){return e.kind!=="textValue"}function ko(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Eo(e,n){for(let t of e.children)if(qt(t)&&t.localName===n)return t}function Dr(e){return !(e===void 0||e.length===0||e.length>Fb||Ab.test(e)||R(e))}function _b(e){return e==="1"||e==="true"}function Ga(e){return e.map(n=>n.attributes?{n:n.localName,a:n.attributes}:{n:n.localName})}function Mo(e){if(e){for(let n of e.children)if(qt(n)&&(n.kind==="runProperties"||n.localName==="rPr"))return n}}function $a(e){if(e){for(let n of e.children)if(qt(n)&&(n.kind==="paragraphProperties"||n.localName==="pPr"))return n}}var df=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function _r(e){return e.some(n=>df.has(n.localName))?e.filter(n=>!df.has(n.localName)):e}function zb(e){let n=Eo(e,"docDefaults");if(!n)return {run:[],paragraph:[],paragraphNode:void 0};let t=Eo(n,"rPrDefault"),r=Eo(n,"pPrDefault"),o=Mo(t),a=$a(r);return {run:_r(pn(o)),paragraph:_r(pn(a)),paragraphNode:a}}function Hb(e){let n=ko(e,"styleId");if(!Dr(n))return null;let t=ko(e,"type")??"",r=(()=>{let d=Eo(e,"basedOn");return d?ko(d,"val"):void 0})(),o=Dr(r)?r:null,a=$a(e),i=Mo(e),l=new Map,s=0;for(let d of e.children){if(d.kind==="textValue"||d.localName!=="tblStylePr")continue;if(s>=jb)break;s+=1;let c=ko(d,"type");c&&!l.has(c)&&l.set(c,d);}return {styleId:n,type:t,basedOn:o,isDefault:_b(ko(e,"default")),paragraphProperties:_r(pn(a)),runProperties:_r(pn(i)),paragraphPropertiesNode:a,tablePropertiesNode:Eo(e,"tblPr"),conditionalTableFormats:l}}var jb=32,Lo=Object.freeze({tablePropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function uf(e,n){if(!n||!Dr(n))return Lo;let t=Bs(e,n,"table");if(t.length===0)return Lo;let r=[],o=[],a=[],i=[],l=new Map;for(let s of t){s.tablePropertiesNode&&r.push(s.tablePropertiesNode),s.paragraphPropertiesNode&&o.push(s.paragraphPropertiesNode),a.push(...s.paragraphProperties),i.push(...s.runProperties);for(let[d,c]of s.conditionalTableFormats)l.set(d,c);}return {tablePropertyNodes:r,paragraphPropertyNodes:o,paragraphProperties:a,runProperties:i,conditional:l}}var Ts=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function ff(e,n){let t=[...e.paragraphPropertyNodes],r=[...e.paragraphProperties],o=[...e.runProperties];for(let a of n){let i=e.conditional.get(a);if(!i)continue;let l=$a(i);l&&(t.push(l),r.push(..._r(pn(l))));let s=Mo(i);s&&o.push(..._r(pn(s)));}return t.length===0&&r.length===0&&o.length===0?Ts:{paragraphProperties:r,paragraphPropertyNodes:t,runProperties:o}}function Gb(e,n=Db){let t=new Map;if(!e)return {cacheToken:y({empty:true,theme:n}),docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,themeFonts:n,styles:t};let r=zb(e),o=null,a=null,i=0;for(let s of e.children){if(!qt(s)||s.localName!=="style")continue;if(i>=cf)break;i+=1;let d=Hb(s);if(!d)continue;let{isDefault:c,...u}=d;t.set(u.styleId,u),u.type==="paragraph"?c?o=u.styleId:o===u.styleId&&(o=null):u.type==="character"&&(c?a=u.styleId:a===u.styleId&&(a=null));}return {cacheToken:y({dR:Ga(r.run),dP:Ga(r.paragraph),defP:o,defC:a,theme:n,styles:[...t.values()].map(s=>({id:s.styleId,type:s.type,basedOn:s.basedOn,p:Ga(s.paragraphProperties),r:Ga(s.runProperties)}))}),docDefaultsRun:r.run,docDefaultsParagraph:r.paragraph,docDefaultsParagraphNode:r.paragraphNode,defaultParagraphStyleId:o,defaultCharacterStyleId:a,themeFonts:n,styles:t}}function vs(e,n){let t=null;for(let r of e){if(r.localName!==n)continue;let o=r.attributes?.val;t=Dr(o)?o:null;}return t}function Bs(e,n,t){let r=e.styles.get(n);if(!r||r.type!==t)return [];let o=[],a=new Set,i=n,l=0;for(;i!==null&&l<Wa&&!(a.has(i)||!Dr(i));){a.add(i);let s=e.styles.get(i);if(!s)break;o.push(s),i=s.basedOn,l+=1;}return o.reverse()}function zr(e,n,t){let r=pn(n),o=vs(r,"pStyle")??e.defaultParagraphStyleId,a=o?Bs(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...t?.paragraphProperties??[],...a.flatMap(p=>p.paragraphProperties)],l=[...i,...r],s=[];e.docDefaultsParagraphNode&&s.push(e.docDefaultsParagraphNode),t&&s.push(...t.paragraphPropertyNodes);for(let p of a)p.paragraphPropertiesNode&&s.push(p.paragraphPropertiesNode);n&&s.push(n);let d=Mo(n&&qt(n)?n:void 0),c=pn(d),u=[...e.docDefaultsRun,...t?.runProperties??[],...a.flatMap(p=>p.runProperties)],f=c.length===0?u:[...u,...c];return {paragraphProperties:l,inheritedParagraphProperties:i,paragraphPropertyNodes:s,runProperties:u,markRunProperties:f,styleId:o??null}}function pf(e){let n;for(let t of e){if(!t||t.kind==="textValue")continue;let r=false;for(let o of t.children)if(qt(o)&&o.localName==="pBdr"){r=true;break}r&&(n=lt(t).bottom);}return n}function pt(e,n,t){let r=[];if(t){let a=vs(n,"rStyle")??t.defaultCharacterStyleId;a&&(r=Bs(t,a,"character").flatMap(i=>i.runProperties));}return e.length===0&&r.length===0?n:n.length===0&&r.length===0?e:[...e,...r,...n]}function No(e,n,t,r,o,a=false){let i=$a(e),l=t?zr(t,i,o):null,s=l?[...l.paragraphProperties]:pn(i),d=pn(Mo(i&&qt(i)?i:void 0)),c=l?l.runProperties:[],u=l?l.markRunProperties:d,f=Co(s),p=0,g=0;if(r)p=r.indent.hanging,g=r.indent.firstLine;else for(let y of s){if(y.localName!=="ind")continue;let x=Oo(y.attributes?.hanging),P=Oo(y.attributes?.firstLine);(y.attributes?.hanging!==void 0||y.attributes?.firstLine!==void 0)&&(p=x!==null?Math.max(0,x)/20:0,g=P!==null?P/20:0);}let b=r?{left:r.indent.left,right:r.indent.right,hanging:p,firstLine:g}:{left:f.left,right:f.right,hanging:p,firstLine:g},h=l?Wl(l.paragraphPropertyNodes):$l(i);return {props:s,indent:b,available:Math.max(1,n-b.left-b.right),alignment:sf(s),spacing:Ml(s,{inList:r!==void 0,inTableCell:a}),lineSpacing:Nl(s),contextualSpacing:Al(s),styleId:l?l.styleId:vs(s,"pStyle")??null,bottomBorder:l?pf(l.paragraphPropertyNodes):lt(i).bottom,borders:l?uo(l.paragraphPropertyNodes):lt(i),shading:Hl(s),inheritedRunProperties:c,markRunProperties:u,tabStops:h,tabStopsCacheToken:$t(h),...r?{listItem:r}:{}}}var gf=new WeakMap;function Wb(e){let n=gf.get(e);if(n!==void 0)return n;let t=o=>o.some(a=>a.localName==="pBdr"),r=t(e.docDefaultsParagraph);if(!r){for(let o of e.styles.values())if(t(o.paragraphProperties)){r=true;break}}return gf.set(e,r),r}function mf(e,n){return !n||!Wb(n)?lt(e):uo(zr(n,e).paragraphPropertyNodes)}var $b=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Os(e){let n=e?.val;return n!=="0"&&n!=="false"&&n!=="off"}function hf(e){let n=false,t=false,r=true;for(let o of e)switch(o.localName){case "keepNext":n=Os(o.attributes);break;case "keepLines":t=Os(o.attributes);break;case "widowControl":r=Os(o.attributes);break;}return !n&&!t&&r?$b:{keepNext:n,keepLines:t,widowControl:r}}function yf(e,n,t,r,o){if(e<=n)return e;if(r.keepLines&&!o)return n;if(!r.widowControl||t<2)return e;let a=e;return t-a<2&&(a-=1),a-n===1&&(a-=1),a<n&&(a=n),a===n&&o?e:a}function bf(e,n,t,r){let o=0,a=t;for(let i=n;i-n<8;i+=1){let l=e[i];if(!l||l.kind!=="paragraph"||!l.spacing||!l.keeps)return null;o+=Math.max(l.spacing.before,a)-a;let s=r(i);if(!l.keeps.keepNext||i+1>=e.length)return o+=s[0]??0,l.keeps.widowControl&&s.length>1&&(o+=s[1]),o;for(let d of s)o+=d;o+=l.spacing.after,a=l.spacing.after;}return null}function xf(e,n){let t=e,r=0;for(let o=e.length-2;o>=0;o-=1)n(o)&&r<8?(t===e&&(t=[...e]),t[o]=`${e[o]}~kn~${t[o+1]}`,r+=1):r=0;return t}var Xb=va;function Fo(e,n){if(e.kind!=="textValue"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function Sf(e){if(e.kind==="textValue")return false;let n=Fo(e,"paragraphProperties")??Fo(e,"pPr");if(!n)return false;let t=Fo(n,"runProperties")??Fo(n,"rPr");return t!==void 0&&Fo(t,"del")!==void 0}function wf(e,n){if(e.kind==="textValue"||n>Xb)return true;let t=(r,o)=>{for(let a of r){if(a.kind==="textValue")continue;if(a.kind==="run"){for(let l of a.children){if(l.kind==="text"){for(let s of l.children)if(s.kind==="textValue"&&s.value.length>0)return false;continue}if(l.kind!=="runProperties")return false}continue}if(Jb$1(a)){if(o>=Ib$1)continue;let l=Lb$1(a);if(l&&!t(l,o+1))return false;continue}if((a.kind==="hyperlink"||a.kind==="revisionInsert"||a.kind==="revisionMoveTo")&&!wf(a,o+1))return false}return true};return t(e.children,n)}function Ao(e,n="proposed"){return e.kind!=="paragraph"||n!=="proposed"||!Sf(e)?false:wf(e,0)}var Vb={state:"none"},Rf=(e,n)=>n.state==="omitted"?e:n;function Xa(e,n,t={}){return e.state==="omitted"?n:e.state==="none"?Vb:e}function Cs(e,n){let t=Rf;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right),insideH:t(e.insideH,n.insideH),insideV:t(e.insideV,n.insideV)}}function ks(e,n){let t=Rf;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right)}}function Va(e=1048576){let n=e|0;return {intervalsRemaining:n>0?n:0}}function Pf(e,n,t,r){let o=Math.max(0,Math.min(n|0,1024)),a=new Array(e.length);for(let i=0;i<e.length;i+=1){if(r&&r.intervalsRemaining<=0){a[i]=[];continue}a[i]=Yb(e[i],o,t,r);}return a}function Yb(e,n,t,r){let o=[];for(let c=0;c<e.length;c+=1){let u=e[c],f=Math.max(0,u.gridColumn|0),p=Math.min(n,f+Math.max(0,u.gridSpan|0));f>=p||(o.push({x:f,kind:1,cellIndex:c,cell:u}),o.push({x:p,kind:0,cellIndex:c,cell:u}));}if(o.length===0)return [];o.sort((c,u)=>c.x!==u.x?c.x-u.x:c.kind!==u.kind?c.kind-u.kind:c.cellIndex-u.cellIndex);let a=new Map,i,l=o[0].x,s=[],d=()=>{i=void 0;for(let c of a.values())(!i||c.cellIndex<i.cellIndex)&&(i=c);};for(let c of o){if(c.x>l&&i&&(!r||r.intervalsRemaining>0)){let u=s[s.length-1];u&&u.end===l&&u.cellIndex===i.cellIndex&&u.cell===i.cell?s[s.length-1]={start:u.start,end:c.x,cell:u.cell,cellIndex:u.cellIndex}:(s.push({start:l,end:c.x,cell:i.cell,cellIndex:i.cellIndex}),t&&(t.ownershipSlotsWritten+=1),r&&(r.intervalsRemaining-=1));}c.kind===1?a.set(c.cellIndex,{cell:c.cell,cellIndex:c.cellIndex}):a.delete(c.cellIndex),d(),l=c.x;}return s}function Kb(e,n){let t=0,r=e.length;for(;t<r;){let o=t+r>>1;e[o].start<=n?t=o+1:r=o;}return t}function Es(e,n,t,r){r&&(r.columnLookups+=1);let o=e[n];if(!o||t<0)return;let a=Kb(o,t)-1;if(a<0)return;let i=o[a];if(!(t>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var Bf=256,$e={state:"omitted"},Ja={state:"none"},Of={top:$e,left:$e,bottom:$e,right:$e,insideH:$e,insideV:$e},Cf={top:$e,left:$e,bottom:$e,right:$e},If={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},Zb=new Map([["single","single"],["thick","thick"],["double","double"],["dotted","dotted"],["dashed","dashed"],["dashSmallGap","dashed"],["dotDash","dashed"],["dotDotDash","dashed"],["triple","triple"],["wave","single"],["hairline","single"],["inset","single"],["outset","single"]]);function Do(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Ls(e,n){return e.attributes.find(t=>t.localName===n)?.value}function qb(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function Jb(e){if(e===null)return .5;let n=e/8;return !Number.isFinite(n)||n<=0?.5:n>co?co:n}function Qa(e){if(!e)return $e;let n=Ls(e,"val");if(!n)return $e;if(n==="nil"||n==="none")return Ja;let t=Zb.get(n)??"single",r=Ls(e,"color"),o=r===void 0||r==="auto"?null:Ra(r)??null;return {state:"edge",style:t,color:o,widthPt:Jb(qb(Ls(e,"sz")))}}function kf(e,n){if(!e)return Cf;let t={top:$e,left:$e,bottom:$e,right:$e};for(let r of n)t[r]=Qa(Do(e,r));return t}function ei(e){let n=e&&Do(e,"tblBorders");return n?{...kf(n,["top","left","bottom","right"]),insideH:Qa(Do(n,"insideH")),insideV:Qa(Do(n,"insideV"))}:Of}function ni(e){return kf(e&&Do(e,"tcBorders"),["top","left","bottom","right"])}function Ms(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function Tf(e){if(!e)return 0;let n=Number.parseInt(e.slice(0,2),16),t=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return n+t+r}function Ef(e,n,t=true){if(e.state==="omitted")return n.state==="omitted"?$e:n;if(n.state==="omitted")return e;if(e.state==="none")return n.state==="none"?Ja:n;if(n.state==="none")return e;let r=Ms(e),o=Ms(n);if(r>o)return e;if(o>r)return n;let a=If[e.style],i=If[n.style];if(a!==i)return a>i?e:n;let l=Tf(e.color),s=Tf(n.color);return l<s?e:s<l?n:t?e:n}function Ya(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function Qb(e,n,t){return t?n==="top"||n==="bottom"?e.insideH:e.insideV:e[n]}function ex(e,n){return e===void 0&&n===void 0?true:!e||!n?false:e.style===n.style&&e.color===n.color&&e.widthPt===n.widthPt}function Ka(e){if(e.length===0)return [];let n=[],t={...e[0]};for(let r=1;r<e.length;r+=1){let o=e[r];t.gridEnd===o.gridStart&&ex(t.edge,o.edge)?t={...t,gridEnd:o.gridEnd}:(n.push(t),t={...o});}return n.push(t),n}function Ua(e,n,t){let r=e.filter(a=>a.edge!==void 0);if(r.length!==1)return;let o=r[0];if(!(o.gridStart!==n||o.gridEnd!==t))return o.edge}function vf(e,n,t){let r=0,o=Math.min(t,e.length);for(let a=Math.max(0,n);a<o;a+=1)r+=e[a];return r}function nx(e){if(!(!e||e.style!=="double"))return wr(e.widthPt)}function Za(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function tx(e,n){return n?e==="outer"?n.insetPt:n.insetPt+n.strokePt+n.gapPt:0}function rx(e,n,t){return t?e==="outer"?n-t.insetPt:n-t.insetPt-t.strokePt-t.gapPt:n}function ox(e,n){return n?e==="outer"?n.insetPt+n.strokePt:n.insetPt+n.extentPt:0}function ax(e,n,t){return t?e==="outer"?n-t.insetPt-t.strokePt:n-t.insetPt-t.extentPt:n}function Bt(e,n){e.length>=Bf||!(n.width>0)||!(n.height>0)||e.push(n);}function ix(e,n,t,r,o,a,i,l,s,d,c){let u=wr(t.widthPt),{strokePt:f,gapPt:p,extentPt:g,insetPt:b}=u,h=Math.abs(r)<1e-6,y=Math.abs(o-a)<1e-6,x=Math.abs(r)<1e-6,P=Math.abs(o-i)<1e-6;if(n==="top"||n==="bottom"){let j=n==="top"?b:i-b-f,z=n==="top"?b+f+p:i-b-g;for(let L of ["outer","inner"]){let k=r,v=o;h&&(k=tx(L,l)),y&&(v=rx(L,a,s)),Bt(e,{side:n,role:L,color:t.color,cssStyle:"solid",x:k,y:L==="outer"?j:z,width:v-k,height:f});}return}let T=n==="left"?b:a-b-f,_=n==="left"?b+f+p:a-b-g;for(let j of ["outer","inner"]){let z=r,L=o;x&&(z=ox(j,d)),P&&(L=ax(j,i,c)),Bt(e,{side:n,role:j,color:t.color,cssStyle:"solid",x:j==="outer"?T:_,y:z,width:f,height:L-z});}}function lx(e,n,t,r,o,a,i){let l=t.widthPt,s=Math.max(1,l),d=l*3+s*2;if(n==="top"||n==="bottom"){let u=n==="top"?0:i-d;for(let f=0;f<3;f+=1)Bt(e,{side:n,role:f===0?"outer":f===1?"middle":"inner",color:t.color,cssStyle:"solid",x:r,y:u+f*(l+s),width:o-r,height:l});return}let c=n==="left"?0:a-d;for(let u=0;u<3;u+=1)Bt(e,{side:n,role:u===0?"outer":u===1?"middle":"inner",color:t.color,cssStyle:"solid",x:c+u*(l+s),y:r,width:l,height:o-r});}function sx(e,n,t,r,o,a,i){let l=t.widthPt;n==="top"?Bt(e,{side:n,role:"edge",color:t.color,cssStyle:Za(t.style),x:r,y:0,width:o-r,height:l}):n==="bottom"?Bt(e,{side:n,role:"edge",color:t.color,cssStyle:Za(t.style),x:r,y:i-l,width:o-r,height:l}):n==="left"?Bt(e,{side:n,role:"edge",color:t.color,cssStyle:Za(t.style),x:0,y:r,width:l,height:o-r}):Bt(e,{side:n,role:"edge",color:t.color,cssStyle:Za(t.style),x:a-l,y:r,width:l,height:o-r});}function qa(e,n){if(e.length===0)return;let t=e[0];return nx(t.edge)}function dx(e,n,t,r,o,a,i,l,s,d){let c=(R,N,I)=>{let C=[];for(let B of N){if(!B.edge)continue;let E,M;I?(E=vf(i,l,B.gridStart),M=vf(i,l,B.gridEnd)):(E=s[B.gridStart-d]??0,M=s[B.gridEnd-d]??a),C.push({side:R,gridStart:B.gridStart,gridEnd:B.gridEnd,startPt:E,endPt:M,edge:B.edge});}return C},u=c("top",e,true),f=c("left",n,false),p=c("bottom",t,true),g=c("right",r,false),b=[...u,...g,...p,...f],h=qa(n),y=qa(r),x=qa(e),P=qa(t),T=(R,N)=>R.length===1&&Math.abs(R[0].startPt)<1e-6&&Math.abs(R[0].endPt-N)<1e-6,_=T(u,o),j=T(f,a),z=T(p,o),L=T(g,a),k=[],v=(R,N,I)=>{for(let C of N){let{edge:B,startPt:E,endPt:M}=C;B.style==="double"?ix(k,R,B,E,M,o,a,R==="top"||R==="bottom"?h:void 0,R==="top"||R==="bottom"?y:void 0,R==="left"||R==="right"?x:void 0,R==="left"||R==="right"?P:void 0):B.style==="triple"?lx(k,R,B,E,M,o,a):I||sx(k,R,B,E,M,o,a);}};v("top",u,_),v("left",f,j),v("bottom",p,z),v("right",g,L);let m={};return _&&u[0]&&(m.top=u[0].edge),j&&f[0]&&(m.left=f[0].edge),z&&p[0]&&(m.bottom=p[0].edge),L&&g[0]&&(m.right=g[0].edge),b.length>0&&(m.edgeSegments=b),k.length>0&&(m.strokes=k),m}function Ns(e,n,t,r,o,a){let i=e.length,l=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let s=Pf(e,t,o,a),d=(u,f,p)=>Xa(u.borders[f],Qb(n,f,p),{}),c=(u,f,p,g)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?Ja:Ef(p,g);for(let u=0;u<i;u+=1){let f=e[u];for(let p=0;p<f.length;p+=1){let g=f[p];if(g.vMergeContinue){l[u][p]={};continue}let b=g.mergeRowSpan??1,h=u+b-1,y=u===0,x=h===i-1,P=g.gridColumn===0,T=g.gridColumn+g.gridSpan-1,_=T>=t-1,j=[];if(y)for(let E=g.gridColumn;E<=T;E+=1)j.push({gridStart:E,gridEnd:E+1,edge:Ya(d(g,"top",false))});let z=[];if(P)for(let E=u;E<=h;E+=1)z.push({gridStart:E,gridEnd:E+1,edge:Ya(d(g,"left",false))});let L=[];for(let E=g.gridColumn;E<=T;E+=1){let M;if(x)M=d(g,"bottom",false);else {let F=Es(s,h+1,E,o);F?.cell.vMergeContinue?M=$e:M=c(g.borders.bottom,F?F.cell.borders.top:$e,d(g,"bottom",true),F?d(F.cell,"top",true):n.insideH);}L.push({gridStart:E,gridEnd:E+1,edge:Ya(M)});}let k=[];for(let E=u;E<=h;E+=1){let M;if(_)M=d(g,"right",false);else {let F=Es(s,E,T+1,o);M=c(g.borders.right,F?F.cell.borders.left:$e,d(g,"right",true),F?d(F.cell,"left",true):n.insideV);}k.push({gridStart:E,gridEnd:E+1,edge:Ya(M)});}let v=Ka(j),m=Ka(z),R=Ka(L),N=Ka(k);if(!r){let E={},M=Ua(v,g.gridColumn,T+1),F=Ua(m,u,h+1),H=Ua(R,g.gridColumn,T+1),D=Ua(N,u,h+1);M&&(E.top=M),F&&(E.left=F),H&&(E.bottom=H),D&&(E.right=D);let $=[],X=(J,K)=>{for(let q of K)q.edge&&$.push({side:J,gridStart:q.gridStart,gridEnd:q.gridEnd,startPt:q.gridStart,endPt:q.gridEnd,edge:q.edge});};X("top",v),X("left",m),X("bottom",R),X("right",N),$.length>0&&(E.edgeSegments=$),l[u][p]=E;continue}let I=r.cellBoxes[u][p],C=[0],B=0;for(let E=u;E<=h;E+=1){let M=r.rowBands[E];B+=M.height,C.push(B);}C.length>1&&(C[C.length-1]=I.height),l[u][p]=dx(v,m,R,N,I.width,I.height,r.columnWidthsPt,g.gridColumn,C,u);}}return l}function Jt(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var Fs=Of,As=Cf;var Mf=31680/20,Nn=Object.freeze({type:"auto",value:0}),cx=100,ux=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function fx(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function _s(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Nf(e){if(/^\d{1,9}$/.test(e)){let r=Number(e)/20;return Number.isFinite(r)?{kind:"length",pt:r}:null}let n=/^(\d{1,7}(?:\.\d{1,4})?)%$/.exec(e);if(n){let r=Number(n[1]);return Number.isFinite(r)?{kind:"percent",percent:r}:null}let t=/^(\d{1,9}(?:\.\d{1,4})?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(t){let r=Number(t[1])*ux[t[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function Qt(e){if(!e)return Nn;let n=_s(e,"type");if(n!==void 0&&n!=="pct"&&n!=="dxa")return n==="nil"?{type:"nil",value:0}:Nn;let t=_s(e,"w");if(t===void 0)return Nn;let r=Nf(t);if(!r)return Nn;let o=/^\d{1,9}$/.test(t);if(r.kind==="percent"||o&&n==="pct"){let a=r.kind==="percent"?r.percent:Number(t)/50;return !Number.isFinite(a)||a<=0?Nn:{type:"pct",value:Math.min(a,cx)}}return !Number.isFinite(r.pt)||r.pt<=0?Nn:{type:"dxa",value:Math.min(r.pt,Mf)}}function _o(e,n){if(!e)return;let t=Qt(e);if(t.type==="dxa")return Math.min(t.value,n)}function Ff(e){let n=fx(e,"tblGrid");if(!n)return [];let t=[];for(let r of n.children)if(r.kind!=="textValue"&&r.localName==="gridCol"&&(t.push(r),t.length>=1024))break;return t}function px(e){let n=[];for(let t of e){let r=_s(t,"w"),o=r===void 0?null:Nf(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){n.push(void 0);continue}n.push(o.pt>Mf?void 0:o.pt);}return n}var Ds=1,Lf=.001;function gx(e,n,t,r){let o=[];for(let i=0;i<t;i+=1)o.push(e[i]);let a=n.filter(i=>i.start<t&&(i.preferred.type==="dxa"||i.preferred.type==="pct"&&r>0)).sort((i,l)=>i.span-l.span);for(let i of a){let l=Math.min(i.start+i.span,t);if(l<=i.start)continue;let s=i.preferred.type==="pct"?r*i.preferred.value/100:i.preferred.value;if(!Number.isFinite(s)||s<=0)continue;if(l-i.start===1){let f=o[i.start];o[i.start]=f===void 0?s:Math.max(f,s);continue}let d=[],c=s;for(let f=i.start;f<l;f+=1){let p=o[f];p===void 0?d.push(f):c-=p;}if(d.length===0||c<=0)continue;let u=c/d.length;for(let f of d)o[f]=u;}return o}function Af(e){let{columnCount:n,tableWidth:t}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:Ds,a=t.type==="dxa"?t.value:t.type==="pct"?o*t.value/100:0,i=px(e.gridCols),l=gx(i,e.claims,n,a),s=0,d=0;for(let y of l)y===void 0?d+=1:s+=y;let c=[];if(d>0){let y=s>0?s/Math.max(n-d,1):o/n,x=Math.max(o-s,0)/d,P=Math.max(Math.min(x,y),Ds);for(let T of l)c.push(T??P);}else for(let y of l)c.push(y);let u=c.reduce((y,x)=>y+x,0);if(!Number.isFinite(u)||u<=0)return new Array(n).fill(o/n);let f=n*Ds,p=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,g=Math.max(a>0?Math.min(a,p):Math.min(u,p),f),b=t.type==="pct"&&a>0;if(u<=g+Lf&&!b||Math.abs(u-g)<=Lf)return c;let h=g/u;return c.map(y=>y*h)}var oi=16,Ho=3,ri=31680/20,Zf=31680/20,Df=1023,mx=256,_f=31680/20;function zf(e){let n=e&&ge(e,"jc");if(!n)return;let t=De(n,"val");if(t==="center")return "center";if(t==="right"||t==="end")return "right";if(t==="left"||t==="start")return "left"}var Hf=31680/20,qf={top:Ho,right:Ho,bottom:Ho,left:Ho};function ge(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function De(e,n){return e.attributes.find(t=>t.localName===n)?.value}function hx(e){let n=e&&ge(e,"gridSpan"),t=n&&De(n,"val");if(!t||!/^\d{1,7}$/.test(t))return 1;let r=Number(t);return Number.isInteger(r)&&r>1?Math.min(r,1024):1}function jf(e,n){let t=e&&ge(e,n),r=t&&De(t,"val");if(!r||!/^\d{1,7}$/.test(r))return 0;let o=Number(r);return Number.isInteger(o)&&o>0?Math.min(o,1024):0}function yx(e){let n=e&&ge(e,"vMerge");return n?De(n,"val")!=="restart":false}function bx(e){let n=e&&ge(e,"vAlign"),t=n&&De(n,"val");return t==="center"?"center":t==="bottom"?"bottom":"top"}function Gf(e){return zl(e&&ge(e,"shd"))}function Wf(e,n){let t=e&&ge(e,n);if(!t)return false;let r=De(t,"val");return r!=="0"&&r!=="false"}var zo=Object.freeze({rule:"auto"});function xx(e){let n=e&&ge(e,"trHeight");if(!n)return zo;let t=De(n,"hRule"),r=t==="auto"||t==="exact"||t==="atLeast"?t:void 0;if(r==="auto")return zo;let o=De(n,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return zo;let a=Number(o);if(!Number.isFinite(a)||a<=0)return zo;let i=Math.min(a/20,Zf);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:zo}function ti(e){if(!e)return;let n=De(e,"w");if(n===void 0||!/^\d{1,9}$/.test(n))return;let t=Number(n);if(!Number.isFinite(t)||t<0)return;let r=t/20;return r>ri?ri:r}function zs(e){if(!e)return {};let n=ti(ge(e,"top")),t=ti(ge(e,"left")),r=ti(ge(e,"bottom")),o=ti(ge(e,"right"));return {...n===void 0?{}:{top:n},...t===void 0?{}:{left:t},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function Hs(e,n){return {top:n.top??e.top,right:n.right??e.right,bottom:n.bottom??e.bottom,left:n.left??e.left}}function jo(e,n){let t=e.columnWidthsPt.reduce((o,a)=>o+a,0),r=n-t;return !Number.isFinite(r)||r<=0?0:e.alignment==="center"?r/2:e.alignment==="right"?r:Math.min(e.indentPt,r)}function $f(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function Xf(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return;let n=Number(e);if(!Number.isFinite(n))return;let t=n/20;return Math.max(-Hf,Math.min(Hf,t))}function Vf(e){let n=e&&ge(e,"tblpPr");if(!n)return;let t=De(n,"tblpXSpec"),r=t==="left"||t==="center"||t==="right"||t==="inside"||t==="outside"?t:void 0,o=De(n,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:$f(De(n,"horzAnchor"))??"text",vertAnchor:$f(De(n,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:Xf(De(n,"tblpX"))??0,...a?{ySpec:a}:{},yPt:Xf(De(n,"tblpY"))??0}}function Jf(e,n,t){let r=t[e.horzAnchor],o=r.width-n,a;if(e.xSpec==="center"?a=r.left+o/2:e.xSpec==="right"||e.xSpec==="outside"?a=r.left+o:e.xSpec?a=r.left:a=r.left+e.xPt,!Number.isFinite(a))return r.left;let i=t.page.left+t.page.width;return Math.max(t.page.left,Math.min(a,i))}var Sx=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function gt(e,n){let t=De(e,n);if(t!==void 0)return t!=="0"&&t!=="false"&&t!=="off"}function wx(e){let n=e&&ge(e,"tblLook");if(!n)return Sx;let t=De(n,"val"),r=t&&/^[0-9A-Fa-f]{1,4}$/.test(t)?Number.parseInt(t,16):0;return {firstRow:gt(n,"firstRow")??(r&32)!==0,lastRow:gt(n,"lastRow")??(r&64)!==0,firstColumn:gt(n,"firstColumn")??(r&128)!==0,lastColumn:gt(n,"lastColumn")??(r&256)!==0,rowBanding:gt(n,"noHBand")===void 0?(r&512)===0:!gt(n,"noHBand"),columnBanding:gt(n,"noVBand")===void 0?(r&1024)===0:!gt(n,"noVBand")}}var js=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],Yf=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function Kf(e,n){let t=e&&ge(e,"cnfStyle");if(!t)return;let r=De(t,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<js.length;o+=1)r[o]==="1"&&n.add(js[o]);for(let o=0;o<Yf.length;o+=1)gt(t,Yf[o])===true&&n.add(js[o]);}var Rx=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function Px(e){let n=new Set;Kf(e.rowProperties,n),Kf(e.cellProperties,n);let{look:t,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:l}=e,s=n.has("firstRow")||t.firstRow&&r===0,d=n.has("lastRow")||t.lastRow&&r===o-1,c=n.has("firstCol")||t.firstColumn&&a===0,u=n.has("lastCol")||t.lastColumn&&a+i>=l;if(!(n.has("band1Vert")||n.has("band2Vert"))&&t.columnBanding&&!c&&!u){let b=a-(t.firstColumn?1:0);n.add(b%2===0?"band1Vert":"band2Vert");}if(!(n.has("band1Horz")||n.has("band2Horz"))&&t.rowBanding&&!s&&!d){let b=r-(t.firstRow?1:0);n.add(b%2===0?"band1Horz":"band2Horz");}c&&n.add("firstCol"),u&&n.add("lastCol"),s&&n.add("firstRow"),d&&n.add("lastRow"),s&&c&&n.add("nwCell"),s&&u&&n.add("neCell"),d&&c&&n.add("swCell"),d&&u&&n.add("seCell");let g=[];for(let b of Rx)n.has(b)&&g.push(b);return g}var Uf=new WeakMap;function Hr(e,n,t,r,o="all-markup"){let a=Uf.get(e);if(a&&a.contentWidthPt===n&&a.depth===t&&a.styleCascade===r&&a.displayMode===o)return a.structure;let i=Ix(e,n,t,r,o);return Uf.set(e,{contentWidthPt:n,depth:t,styleCascade:r,displayMode:o,structure:i}),i}function Ix(e,n,t,r,o){if(t>=oi||e.kind!=="table")return null;let a=ge(e,"tblPr"),i=a&&ge(a,"tblStyle")?De(ge(a,"tblStyle"),"val"):void 0,l=r?uf(r,i):Lo,s=wx(a),d=qf,c=Fs;for(let H of l.tablePropertyNodes)d=Hs(d,zs(ge(H,"tblCellMar"))),c=Cs(c,ei(H));let u=Hs(d,zs(a&&ge(a,"tblCellMar"))),f=Cs(c,a?ei(a):Fs),p=new Map,g=H=>{if(l===Lo)return Ts;let D=H.join("|"),$=p.get(D);if($)return $;let X=ff(l,H);return p.size<mx&&p.set(D,X),X},b=[],h=[],y=1;for(let H of fe(e.children)){if(H.kind!=="tableRow")continue;let D=ge(H,"trPr"),$=[],X=[],J=[],K=Math.min(jf(D,"gridBefore"),Df);K>0&&h.push({start:0,span:K,preferred:Qt(D&&ge(D,"wBefore"))});let q=K,he=fe(H.children);for(let Pe of he){if(Pe.kind!=="tableCell")continue;let ve=ge(Pe,"tcPr"),me=Math.min(q,Df),fe=Math.min(hx(ve),1024-me),be=Qt(ve&&ge(ve,"tcW"));$.push(me),X.push(fe),J.push(be),h.push({start:me,span:fe,preferred:be}),q=me+fe;}let Ie=jf(D,"gridAfter"),ce=Math.min(q+Ie,1024);Ie>0&&q<1024&&h.push({start:q,span:Math.min(Ie,1024-q),preferred:Qt(D&&ge(D,"wAfter"))}),ce>y&&(y=ce),b.push({node:H,cells:he,properties:D,starts:$,spans:X,preferred:J,gridColumns:ce});}let x=Ff(e),P=x.length>0?x.length:y,T=b.length,_=[];for(let H=0;H<b.length;H+=1){let D=b[H],$=D.node,X=D.properties,J=0,K=[];for(let ve of D.cells){if(ve.kind!=="tableCell")continue;let me=ge(ve,"tcPr"),fe=D.starts[J],be=D.spans[J],Te=D.preferred[J]??Nn,He=Px({look:s,rowIndex:H,rowCount:T,gridColumn:fe,gridSpan:be,columnCount:P,rowProperties:X,cellProperties:me});J+=1;let an,rn=As;for(let xe of He){let on=l.conditional.get(xe);if(!on)continue;let In=ge(on,"tcPr");an=Gf(In)??an,rn=ks(rn,ni(In));}let Me=Gf(me)??an,Jn=Hs(u,zs(me&&ge(me,"tcMar"))),Qn=Nb$1(ve.children,0,xe=>!(xe.kind==="paragraph"&&Ao(xe,o)));K.push({id:ve.id,gridSpan:be,gridColumn:fe,...x[fe]?.id?{gridColumnId:x[fe].id}:{},vMergeContinue:yx(me),vAlign:bx(me),margins:Jn,borders:ks(rn,me?ni(me):As),...Me===void 0?{}:{shading:Me},preferredWidth:Te,styleFormatting:g(He),blocks:Qn});}let q=X?ge(X,"ins")??ge(X,"del"):void 0,he=q?q.localName==="ins"?"insert":"delete":void 0,Ie=q&&De(q,"id"),ce=q&&De(q,"author"),Pe=q&&De(q,"date");_.push({id:$.id,...he?{revisionKind:he}:{},...Ie!==void 0?{revisionId:Ie}:{},...ce!==void 0?{revisionAuthor:ce}:{},...Pe!==void 0?{revisionDate:Pe}:{},isHeader:Wf(X,"tblHeader"),cantSplit:Wf(X,"cantSplit"),height:xx(X),cells:K});}let j=Nn,z,L,k,v,m;for(let H of l.tablePropertyNodes){let D=ge(H,"tblW");D&&(j=Qt(D));let $=ge(H,"tblLayout");$&&(z=De($,"type")==="fixed"),L=_o(ge(H,"tblInd"),_f)??L,k=zf(H)??k,v=_o(ge(H,"tblCellSpacing"),ri)??v,m=Vf(H)??m;}let R=a&&ge(a,"tblW"),N=R?Qt(R):j,I=a&&ge(a,"tblLayout"),C=I?De(I,"type")==="fixed":z??false,B=_o(a&&ge(a,"tblInd"),_f)??L??0,E=zf(a)??k??"left",M=t===0?Vf(a)??m:void 0,F=_o(a&&ge(a,"tblCellSpacing"),ri)??v??0;return {columnWidthsPt:Af({gridCols:x,claims:h,columnCount:P,contentWidthPt:n,tableWidth:N,layoutFixed:C}),rows:_,tableWidth:N,layoutFixed:C,indentPt:B,alignment:E,...M?{float:M}:{},cellSpacingPt:F,tableBorders:f,defaultMargins:u}}var Ws=512,ep=9,Fn=31680/20,Tx=8,vx=128;function Go(e,n){return e.kind!=="textValue"&&e.namespaceUri===la&&e.localName===n}function Xe(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function gn(e,n){for(let t of e.children)if(Go(t,n))return t}function mt(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function Bx(e){let n=e/20;return !Number.isFinite(n)||n<=0?0:n>Fn?Fn:n}function Gs(e){let n=e/20;return Number.isFinite(n)?n>Fn?Fn:n<-Fn?-Fn:n:0}function Ox(e){let n={left:0,right:0,hanging:0,firstLine:0};if(!e)return n;let t=gn(e,"ind");if(!t)return n;let r=mt(Xe(t,"left")??Xe(t,"start"),true),o=mt(Xe(t,"right")??Xe(t,"end"),true),a=mt(Xe(t,"hanging")),i=mt(Xe(t,"firstLine"),true);return {left:r===null?0:Gs(r),right:o===null?0:Gs(o),hanging:a===null?0:Bx(a),firstLine:i===null?0:Gs(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function Cx(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function kx(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function Ex(e,n){let t=gn(e,n);if(!t)return false;let r=Xe(t,"val");return r!=="0"&&r!=="false"&&r!=="off"}function Qf(e,n){let t=gn(e,n);if(!t)return;let r=Xe(t,"val");if(!(r===void 0||r.length===0||r.length>vx))return r}function Lx(e,n){for(let t of e){if(t.localName!==n)continue;let r=t.attributes?.val;return !(r==="0"||r==="false")}return false}function np(e){let n=mt(Xe(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=gn(e,"start"),r=1;if(t){let y=mt(Xe(t,"val"));y!==null&&y>=0&&(r=Math.min(y,9999));}let o=gn(e,"numFmt"),a=(o?Xe(o,"val"):void 0)??"decimal",i=gn(e,"lvlText"),l=i?Xe(i,"val")??"":"",s=gn(e,"lvlJc"),d=kx(s?Xe(s,"val"):void 0),c=gn(e,"suff"),u=Cx(c?Xe(c,"val"):void 0),f=gn(e,"lvlRestart"),p;if(f){let y=mt(Xe(f,"val"));y!==null&&y>=0&&y<=9&&(p=y);}let g=gn(e,"pPr"),b=gn(e,"rPr"),h=b?Ro(b):[];return {ilvl:n,start:r,numFmt:a.length>64?"decimal":a,lvlText:l.length>64?l.slice(0,64):l,lvlJc:d,suff:u,indent:Ox(g),...p!==void 0?{lvlRestart:p}:{},isLgl:Ex(e,"isLgl"),runProperties:h,vanish:Lx(h,"vanish")}}function Mx(e){let n=Xe(e,"abstractNumId");if(n===void 0||n.length===0||n.length>64)return null;let t=new Map;for(let a of e.children){if(!Go(a,"lvl"))continue;if(t.size>=9)break;let i=np(a);i&&!t.has(i.ilvl)&&t.set(i.ilvl,i);}let r=Qf(e,"numStyleLink"),o=Qf(e,"styleLink");return {abstractNumId:n,levels:t,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function Nx(e){let n=mt(Xe(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=gn(e,"startOverride"),r;if(t){let i=mt(Xe(t,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=gn(e,"lvl"),a=o?np(o)??void 0:void 0;return r===void 0&&a===void 0?{ilvl:n,override:{}}:{ilvl:n,override:{...r!==void 0?{startOverride:r}:{},...a?{level:a}:{}}}}function Fx(e){let n=Xe(e,"numId");if(n===void 0||n.length===0||n.length>64)return null;let t=gn(e,"abstractNumId"),r=t?Xe(t,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!Go(a,"lvlOverride"))continue;if(o.size>=ep)break;let i=Nx(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:n,abstractNumId:r,overrides:o}}function Ax(e){let n=new Map,t=new Map;if(!e)return {abstractNums:n,nums:t};let r=0,o=0;for(let a of e.children){if(Go(a,"abstractNum")){if(r>=Ws)continue;r+=1;let i=Mx(a);i&&!n.has(i.abstractNumId)&&n.set(i.abstractNumId,i);continue}if(Go(a,"num")){if(o>=Ws)continue;o+=1;let i=Fx(a);i&&!t.has(i.numId)&&t.set(i.numId,i);}}return {abstractNums:n,nums:t}}function Dx(e,n,t){let r=new Set([n.abstractNumId]),o=n;for(let a=0;a<Tx;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let l=t(i);if(l===void 0)return null;let s=e.nums.get(l);if(!s)return null;let d=e.abstractNums.get(s.abstractNumId);if(!d||r.has(d.abstractNumId))return null;r.add(d.abstractNumId),o=d;}return null}function tp(e,n){let t=false,r=new Map(e.abstractNums);for(let[o,a]of e.abstractNums){if(a.numStyleLink===void 0)continue;let i=Dx(e,a,n);!i||i.levels===a.levels||i.levels.size===0||(r.set(o,{...a,levels:i.levels}),t=true);}return t?{abstractNums:r,nums:e.nums}:e}function jr(e,n,t){if(t<0||t>8)return null;let r=e.nums.get(n);if(!r)return null;let o=e.abstractNums.get(r.abstractNumId);if(!o)return null;let a=r.overrides.get(t),i=a?.level??o.levels.get(t);return i?{abstractNumId:r.abstractNumId,level:i,...a?.startOverride!==void 0?{startOverride:a.startOverride}:{}}:null}var $s=Object.freeze({abstractNums:new Map,nums:new Map});function _x(e,n){let t=e.nums.get(n),r=[];for(let o=0;o<=8;o+=1){let a=jr(e,n,o);if(!a){r.push(1);continue}let i=t?.overrides.get(o)?.startOverride;r.push(i??a.level.start);}return r}function zx(e,n,t){let r=[];for(let o=0;o<=8;o+=1){let a=jr(e,n,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...t]}}function Hx(e,n){if(n===0)return null;if(n===void 0)return e-1;let t=n-1;return t>=e?null:t}function Xs(e){let n=new Map,t=new Map,r=new Map,o=a=>{let i=n.get(a);i||(i=[0,0,0,0,0,0,0,0,0],n.set(a,i));let l=t.get(a);l||(l=[false,false,false,false,false,false,false,false,false],t.set(a,l));let s=r.get(a);return s||(s=_x(e,a),r.set(a,s)),{counters:i,initialized:l,starts:s}};return {advance(a,i){if(i<0||i>8||a.length===0||a.length>64)return null;let l=jr(e,a,i);if(!l)return null;let{abstractNumId:s,level:d}=l,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=zx(e,a,f);for(let T=i+1;T<=8;T+=1){let _=jr(e,a,T);if(!_)continue;let j=Hx(T,_.level.lvlRestart);j!==null&&i<=j&&(u[T]=false);}let g=f[i]??d.start;u[i]?c[i]+=1:(c[i]=g,u[i]=true);let b=c.slice(),h=u.slice(),y=b.map((T,_)=>h[_]?T:f[_]??1),x=d.isLgl?p.map(T=>T==="bullet"||T==="none"?T:"decimal"):p,P=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:rs(d.lvlText,y,x);return {abstractNumId:s,numId:a,ilvl:i,level:d,counters:b,markerText:P}}}}var jx=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),rp=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),op=new Map([[167,"\u25AA"],[183,"\u2022"]]),ap=new Map([["symbol",jx],["wingdings",rp],["wingdings 2",op],["wingdings 3",op],["webdings",rp]]),Gx=64;function Wx(e){return !e||e.length>Gx?false:ap.has(e.toLowerCase())}function ip(e,n,t){if(e.length===0||!Wx(n))return e;let r=ap.get(n.toLowerCase());if(t?.(n)===true)return e;let o="",a=false;for(let i of e){let l=i.codePointAt(0);if(l>=61440&&l<=61695){let s=r.get(l-61440);if(s!==void 0){o+=s,a=true;continue}}o+=i;}return a?o:e}function Vs(e){return e.kind!=="textValue"}function lp(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function ai(e,n){for(let t of e.children)if(Vs(t)&&t.localName===n)return t}function Ys(e){let n=null;for(let t of e){if(!Vs(t))continue;let r=ai(t,"numPr");if(!r)continue;let o=ai(r,"ilvl"),a=ai(r,"numId"),i=a?lp(a,"val"):void 0,l=o?lp(o,"val"):"0";if(!i||i==="0"){n=null;continue}if(i.length>64){n=null;continue}let s=/^\d{1,2}$/.test(l??"")?Number(l):0;if(s<0||s>8){n=null;continue}n={numId:i,ilvl:s};}return n}function $x(e,n){let t=new Set,r=e.styles.get(n);for(let o=0;r!==void 0&&o<Wa;o+=1){if(t.has(r.styleId))return;t.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?Ys([a]):null;if(i)return i.numId;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}function Ks(e,n){return n?tp(e,t=>$x(n,t)):e}function sp(e){return Number.isFinite(e)?e>Fn?Fn:e<-Fn?-Fn:e:0}function dp(e){let n=null;for(let t of e){if(t.localName!=="ind")continue;let r=t.attributes?.hanging,o=t.attributes?.firstLine;r===void 0&&o===void 0||(n={hanging:r!==void 0&&/^\d{1,9}$/.test(r)?sp(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?sp(Number(o)/20):0});}return n}function cp(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.start!==void 0))}function up(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.end!==void 0))}function fp(e,n,t=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=Co(n),a=Co(t),i={hanging:e.hanging,firstLine:e.firstLine},l=cp(t)?a.left:r.left?e.left:cp(n)?o.left:e.left,s=up(t)?a.right:r.right?e.right:up(n)?o.right:e.right,d=dp(t)??(r.firstLineOffset?i:dp(n)??i);return {left:l,right:s,...d}}function pp(e,n=8){let t=[],r=(o,a)=>{for(let i of o){if(i.kind==="paragraph"){t.push(i);continue}if(!(i.kind!=="table"||a>=n)){for(let l of fe(i.children))if(l.kind==="tableRow")for(let s of fe(l.children)){if(s.kind!=="tableCell")continue;let d=Nb$1(s.children);r(d,a+1);}}}};return r(e,0),t}function gp(e,n,t,r){let o=new Map;if(n.nums.size===0)return o;let a=Ks(n,t),i=Xs(a);for(let l of pp(e)){let s=l.children.find(j=>j.kind==="paragraphProperties"),d=t?zr(t,s):null,c=d?d.paragraphPropertyNodes:s?[s]:[],u=Ys(c);if(!u)continue;let f=i.advance(u.numId,u.ilvl);if(!f)continue;let p=pn(s),g=fp(f.level.indent,d?.inheritedParagraphProperties??[],p),b=s&&Vs(s)?ai(s,"rPr"):void 0,h=pn(b),y=d?d.markRunProperties:h,x=pt(y,f.level.runProperties,t),P=Ln(x,t?.themeFonts),T=ip(f.markerText,P.fontFamily,r),_=[f.numId,f.ilvl,f.level.numFmt,f.level.lvlText,g.left,g.right,g.hanging,g.firstLine,f.level.lvlJc,f.level.suff,f.level.vanish?1:0,T.length].join("|");o.set(l.id,{numId:f.numId,ilvl:f.ilvl,abstractNumId:f.abstractNumId,numFmt:f.level.numFmt,markerText:T,markerAlign:f.level.lvlJc,suffix:f.level.suff,indent:g,markerStyle:P,cacheToken:_});}return o}function Us(e,n){let t=Ks(e.numberingIndex??$s,e.styleCascade),r=e.listItems??(t.nums.size>0?gp(n,t,e.styleCascade,e.isFontAvailable):void 0);return {...e,numberingIndex:t,...r?{listItems:r}:{}}}function ii(e,n,t,r){if((!e.markerText||e.indent.hanging<=0&&n<=0)&&!e.markerText||!e.markerText)return null;let o=e.indent.left,a=e.indent.hanging,i=Math.min(0,o),l=Math.max(i,o-a),s=Math.max(a,n),d=l;return e.markerAlign==="right"?d=o-n:e.markerAlign==="center"&&(d=l+(s-n)/2),d<i&&(d=i),{x:d,y:t,width:Math.max(n,0),height:r}}function Xx(e,n,t=Tr,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=n.measure(e.markerText,e.markerStyle),a=ii(e,o,0,0);if(!a)return 0;let i=e.indent.left,l=a.x+a.width;return e.suffix==="nothing"?l-i:e.suffix==="space"?l+n.measure(" ",e.markerStyle)-i:l<=i?0:vr(t,l,r).positionPt-i}function li(e,n,t,r,o){return e?Xx(e,t,r,o===void 0?void 0:n.left+o):n.hanging>0?-n.hanging:n.firstLine}function si(e,n,t,r=0){if(!e||!e.markerText||!t)return;let o=n.measure(e.markerText,e.markerStyle),a=ii(e,o,t.y,t.height);if(a)return {text:e.markerText,style:e.markerStyle,box:{x:a.x+r,y:a.y,width:a.width,height:a.height},level:e.ilvl,numId:e.numId,numFmt:e.numFmt}}var ed=8,mp=new WeakMap;function ci(e){let n=mp.get(e);if(n)return n;let t=[],r=new Map,o=new Map,a=new Map,i=new Map,l=new Map,s=(c,u)=>{for(let f of c){if(f.kind==="paragraph"){if(!u)for(let p of f.lines)o.set(p.range.paragraphId,p.id);continue}for(let p of f.rows){if(!p.isHeaderRepeat&&!r.has(p.id)){let g=a.get(f.tableId)??0;r.set(p.id,g),a.set(f.tableId,g+1);}for(let g of p.cells){if(!p.isHeaderRepeat&&!u){let b=`${f.tableId}|${g.gridColumn}`;if(g.blocks.length===0){let h=l.get(b);h&&i.set(g,h);}else l.set(b,{row:p,cell:g});}s(g.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)t.push(c.box.y),s(c.fragments,false);let d={pageTops:t,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return mp.set(e,d),d}function Xo(e,n){let t=ci(e).pageTops;if(t.length===0)return -1;let r=0,o=t.length-1,a=0;for(;r<=o;){let i=r+o>>1;t[i]<=n?(a=i,r=i+1):o=i-1;}return a}function Vx(e,n){let t=e.pages[Xo(e,n.y)];if(!t)return false;for(let r of [t.header,t.footer])if(r&&fi(r.box,n))return true;return false}function Js(e,n,t,r=false){if(!e||e.length===0)return null;let o=[...e].sort((a,i)=>a.behindDocument!==i.behindDocument?a.behindDocument?-1:1:i.relativeHeight-a.relativeHeight);for(let a of o){if(r&&a.behindDocument||!Wo(a,n))continue;let i={paragraphId:a.anchorParagraphId,offset:a.start};return {position:i,caret:{position:i,x:a.x,y:a.y,height:a.height,lineId:"",pageIndex:t},pageIndex:t,lineId:"",cell:null,contentControlId:null,onGlyphs:true,drawing:Object.freeze({drawingNodeId:a.drawingNodeId,paragraphId:a.anchorParagraphId,start:a.start})}}return null}function ui(e,n,t,r={}){let o=e.pages[n];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??ed,measurer:r.measurer},i=hp(e,o.index,t),l=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),s=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=Js(l,t,a.pageIndex);if(d)return {...d,contentControlId:i};let c=di(o.fragments,t,a,null);if(c?.onGlyphs)return {...c,contentControlId:i};let u=Js(s,t,a.pageIndex);if(u)return {...u,contentControlId:i};if(c)return {...c,contentControlId:i};for(let f=1;f<e.pages.length;f+=1)for(let p of [n-f,n+f]){let g=e.pages[p];if(!g)continue;let b=di(g.fragments,t,{...a,pageIndex:g.index},null);if(b)return {...b,contentControlId:hp(e,g.index,t)}}return null}function BP(e,n,t,r,o={}){let a=e.pages[n];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??ed,measurer:o.measurer};return di(t,r,i,null)}function Yx(e,n,t={}){let r=e.pages[Xo(e,n.y)];if(!r)return null;for(let o of [r.header,r.footer]){if(!o?.anchoredDrawings||o.anchoredDrawings.length===0)continue;let a=Object.freeze({x:n.x-o.box.x,y:n.y-o.box.y}),i=Js(o.anchoredDrawings,a,r.index);if(i)return i}return ui(e,r.index,{x:n.x-r.contentBox.x,y:n.y-r.contentBox.y},t)}function fi(e,n){return n.x>=e.x&&n.x<e.x+e.width&&n.y>=e.y&&n.y<e.y+e.height}function pi(e,n,t){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===n&&fi(i.box,t)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function hp(e,n,t){return pi(e,n,t)?.id??null}function Qs(e,n,t){let r=Math.max(e.x-n.x,0,n.x-(e.x+e.width)),o=Math.max(e.y-n.y,0,n.y-(e.y+e.height));return r+o*t}function Kx(e,n,t){return e.kind!=="table"||Math.max(e.box.y-n.y,0,n.y-(e.box.y+e.box.height))>0?Qs(e.box,n,t):0}function di(e,n,t,r){if(e.length===0)return null;let o=null;for(let i of e){if(!fi(i.box,n))continue;o=i;let l=yp(i,n,t,r);if(l)return l;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:Kx(i,n,t.verticalWeight)})).sort((i,l)=>i.score-l.score);for(let{block:i}of a){let l=yp(i,n,t,r);if(l)return l}return null}function yp(e,n,t,r){return e.kind==="paragraph"?Ux(e,n,t,r,fi(e.box,n)):tS(e,n,t)}function Ux(e,n,t,r,o){let a=Zx(e.lines,n.y);if(!a)return null;let i=Qx(a,n.x,n.y,t),l={paragraphId:a.range.paragraphId,offset:i.offset},s=Vo(a,i.offset,t.measurer);return {position:l,caret:{position:l,x:i.x,y:s.y,height:s.height,lineId:a.id,pageIndex:t.pageIndex},pageIndex:t.pageIndex,lineId:a.id,cell:r,onGlyphs:o&&i.withinSpan&&n.y>=a.box.y&&n.y<a.box.y+a.box.height,contentControlId:null,drawing:i.drawing&&i.withinSpan?qx(a,i.drawing):null}}function Zx(e,n){if(e.length===0)return null;for(let o of e)if(n>=o.box.y&&n<o.box.y+o.box.height)return o;let t=e[0],r=Number.POSITIVE_INFINITY;for(let o of e){let a=n<o.box.y?o.box.y-n:n-(o.box.y+o.box.height);a<r&&(r=a,t=o);}return t}function qx(e,n){return Object.freeze({drawingNodeId:n.drawingNodeId,paragraphId:e.range.paragraphId,start:n.start})}function Jx(e,n){for(let t of e.drawings??[])if(t.start===n||t.start+1===n)return t;return null}function Wo(e,n){let t=e.hitBounds;return n.x<t.x||n.x>=t.x+t.width||n.y<t.y||n.y>=t.y+t.height?false:cs(n.x,n.y,e.geometry)}function Qx(e,n,t,r){let o=e.spans;for(let s of e.drawings??[])if(Wo(s,{x:n,y:t}))return {offset:s.start,x:s.hitBounds.x,withinSpan:true,drawing:s};if(o.length===0&&(e.drawings?.length??0)>0){let s=e.drawings[0];if(n<=s.advanceStart)return {offset:e.range.start,x:s.advanceStart,withinSpan:false,drawing:s};let d=e.drawings[e.drawings.length-1];if(n>=d.advanceEnd)return Zs(e,d.advanceEnd,r);for(let c of e.drawings??[])if(n>=c.advanceStart&&n<c.advanceEnd){let u=n>=c.x+c.width/2;return {offset:u?c.start+1:c.start,x:u?c.advanceEnd:c.advanceStart,withinSpan:Wo(c,{x:n,y:t}),drawing:c}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=o[0];if(n<=a.box.x)return {offset:e.range.start,x:a.box.x,withinSpan:false};let i=o[o.length-1],l=i.box.x+i.box.width;if(n>=l)return Zs(e,l,r);for(let s of o)if(n>=s.box.x&&n<s.box.x+s.box.width)return eS(s,n,r);for(let s=0;s<o.length;s+=1){let d=o[s];for(let c of e.drawings??[]){if(n>=c.advanceStart&&n<c.advanceEnd){let u=Wo(c,{x:n,y:t}),f=n>=c.x+c.width/2;return {offset:f?c.start+1:c.start,x:f?c.advanceEnd:c.advanceStart,withinSpan:u,drawing:c}}if(!(c.start<=d.range.start&&c.hitBounds.x+c.hitBounds.width<=d.box.x)){if(Wo(c,{x:n,y:t}))return {offset:c.start,x:c.hitBounds.x,withinSpan:true,drawing:c};if(n<d.box.x&&n>=c.hitBounds.x+c.hitBounds.width)return {offset:c.start+1,x:c.hitBounds.x+c.hitBounds.width,withinSpan:false,drawing:c};if(n<c.hitBounds.x&&n>=(o[s-1]?.box.x??e.contentX))return {offset:c.start,x:c.hitBounds.x,withinSpan:false,drawing:c}}}if(n<d.box.x){let c=o[s-1],u=c.box.x+c.box.width;return n-u<=d.box.x-n?{offset:c.range.end,x:u,withinSpan:false}:{offset:d.range.start,x:d.box.x,withinSpan:false}}}return Zs(e,l,r)}function Zs(e,n,t){let r=Pp(t.layout,e);if(r===e.range.end)return {offset:r,x:n,withinSpan:false};for(let o=e.spans.length-1;o>=0;o-=1){let a=e.spans[o];if(r<a.range.start)continue;let i=r-a.range.start,l=t.measurer?$o(a,i,t.measurer):a.box.width*(a.range.end>a.range.start?i/(a.range.end-a.range.start):0);return {offset:r,x:a.box.x+l,withinSpan:false}}return {offset:r,x:n,withinSpan:false}}function Pp(e,n){let t=n.range.end;if(t>n.range.start&&qs(n,t-1)===Vb$1)return t-1;if(ci(e).lastLineIdOfParagraph.get(n.range.paragraphId)===n.id)return t;let r=t;for(r>n.range.start&&qs(n,r-1)===`
|
|
9
|
-
`&&(r-=1);r>n.range.start&&qs(n,r-1)===" ";)r-=1;return r}function qs(e,n){for(let t of e.spans)if(!(n<t.range.start||n>=t.range.end))return t.text.length!==t.range.end-t.range.start?null:t.text[n-t.range.start]??null;return null}var bp=new WeakMap,xp=new WeakMap;function Sp(e){let n=Rl(),t=bp.get(e);if(t&&t.epoch===n)return t.boundaries;let r=[0];for(let o of En(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),bp.set(e,{epoch:n,boundaries:r}),r}function $o(e,n,t){let r=e.caretEdges;if(r&&n>=0&&n<r.length)return r[n];let o=xp.get(t);o||(o=new WeakMap,xp.set(t,o));let a=o.get(e);a||(a=new Map,o.set(e,a));let i=a.get(n);if(i!==void 0)return i;let l=n<=0?0:Kn(e.text.slice(0,n),e.style,t);return a.set(n,l),l}function nd(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function gi(e,n,t){let r=e.range.end-e.range.start;if(r<=0)return e.box.x;let o=Math.max(0,Math.min(n-e.range.start,r)),a=e.caretEdges;return a&&o<a.length?e.box.x+a[o]:!t||nd(e)?e.box.x+e.box.width*(o/r):e.box.x+$o(e,o,t)}function Vo(e,n,t){let r=Jx(e,n);if(r)return {x:n>r.start?r.advanceEnd:r.advanceStart,y:r.y,height:r.height};let o=e.spans;if(o.length===0){let s=e.leading??0;return {x:e.contentX,y:e.box.y+s,height:Math.max(0,e.box.height-s-(e.trailingSpacing??0))}}let a=o[0];for(let s=0;s<o.length;s+=1){let d=o[s];if(n>d.range.start&&n<d.range.end){a=d;break}if(n===d.range.end){let c=o[s+1];if(c&&c.range.start===n&&nd(d)){a=c;break}if(c&&c.range.start===n&&d.text.endsWith(" ")&&c.box.x-(d.box.x+d.box.width)>.25){a=c;break}a=d;}else n>d.range.end&&(a=d);}let i=gi(a,n,t),l=t?.lineMetrics(a.style);return !l||l.height<=0?{x:i,y:e.box.y,height:e.box.height}:{x:i,y:e.box.y+e.baseline-l.baseline-is(a.style),height:l.height}}function eS(e,n,t){let r=n-e.box.x,o=e.range.end-e.range.start;if(o<=0||nd(e)){let p=r>e.box.width/2;return {offset:p?e.range.end:e.range.start,x:p?e.box.x+e.box.width:e.box.x,withinSpan:true}}if(!t.measurer){let p=Math.max(0,Math.min(1,r/Math.max(e.box.width,Number.EPSILON))),g=Math.round(p*o),b=Sp(e),h=b[0],y=Number.POSITIVE_INFINITY;for(let x of b){let P=Math.abs(x-g);P<y&&(y=P,h=x);}return {offset:e.range.start+h,x:e.box.x+e.box.width*(h/o),withinSpan:true}}let a=Sp(e),i=1,l=a.length-1;for(;i<l;){let p=i+l>>1;$o(e,a[p],t.measurer)<r?i=p+1:l=p;}let s=a[i],d=a[i-1],c=$o(e,s,t.measurer),u=$o(e,d,t.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:s),x:e.box.x+(f?u:c),withinSpan:true}}function wp(e,n,t,r){if(e.length===0)return null;for(let i of e){let l=t(i);if(n>=l&&n<l+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let l=t(i),s=n<l?l-n:n-(l+r(i));s<a&&(a=s,o=i);}return o}function nS(e,n,t,r){return {tableId:n.tableId,rowId:t.id,cellId:r.id,rowIndex:ci(e).rowIndexById.get(t.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function tS(e,n,t,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],l=wp(a,n.y,d=>d.box.y,d=>d.box.height);if(l){let d=wp(l.cells,n.x,c=>c.box.x,c=>c.box.width);d&&i.push(rS(t,l,d));}let s=[];for(let d of a)for(let c of d.cells)c.blocks.length!==0&&(i.some(u=>u.cell===c)||s.push({entry:{row:d,cell:c},score:Qs(c.box,n,t.verticalWeight)}));s.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...s.map(u=>u.entry)]){let u=nS(t.layout,e,d,c),f=di(c.blocks,n,t,u);if(f)return f}return null}function rS(e,n,t){return t.blocks.length>0?{row:n,cell:t}:ci(e.layout).mergeOriginOf.get(t)??{row:n,cell:t}}function Ip(e,n){let t=n.paintBounds;return t.width<=0||t.height<=0?null:Object.freeze({pageIndex:e,x:t.x,y:t.y,width:t.width,height:t.height,record:n})}function oS(e,n,t){for(let r of n.lines)for(let o of r.drawings??[])if(o.drawingNodeId===t)return Ip(e,o);return null}function Tp(e,n,t){if(n.kind==="paragraph")return oS(e,n,t);for(let r of n.rows)for(let o of r.cells)for(let a of o.blocks){let i=Tp(e,a,t);if(i)return i}return null}function Rp(e,n,t){for(let r of n){let o=Tp(e,r,t);if(o)return o}return null}function aS(e,n){for(let t of e.pages){for(let o of t.anchoredDrawings??[])if(o.drawingNodeId===n)return Ip(t.index,o);let r=Rp(t.index,t.fragments,n);if(r)return r;for(let o of [t.header,t.footer]){if(!o)continue;for(let i of o.anchoredDrawings??[]){if(i.drawingNodeId!==n)continue;let l=i.paintBounds;return l.width<=0||l.height<=0?null:Object.freeze({pageIndex:t.index,x:o.box.x+l.x-t.contentBox.x,y:o.box.y+l.y-t.contentBox.y,width:l.width,height:l.height,record:i})}let a=Rp(t.index,o.fragments,n);if(a){let i=a.record.paintBounds;return Object.freeze({pageIndex:t.index,x:t.header?.box.x===o.box.x||t.footer?.box.x===o.box.x?o.box.x+i.x-t.contentBox.x:a.x,y:o.box.y+i.y-t.contentBox.y,width:a.width,height:a.height,record:a.record})}}}return null}function iS(e){let n=[0],t=0;for(let r of e)t+=r,n.push(t);return n}function lS(e,n){let t=n.get(e.id);return t===void 0&&(e.isHeaderRepeat?t=0:(t=n.size,n.set(e.id,t))),{...e,rowIndex:t}}function mi(e,n,t,r){return {...e,nestingDepth:t,columnEdges:e.columnEdges??iS(n),rows:e.rows.map(o=>lS(o,r))}}var vp=new WeakMap,Gr=4,td=6,Bp=14,sS={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function Op(e,n,t,r,o){for(let a of e){if(a.kind!=="table")continue;let i=a.nestingDepth??r;for(let l of a.rows){o({pageIndex:n,table:a,row:l,rowOrdinal:l.rowIndex,nestingDepth:i,editable:!l.isHeaderRepeat,pageContentBox:t});for(let s of l.cells)Op(s.blocks,n,t,i+1,o);}}}function kP(e){let n=vp.get(e);if(n)return n;let t=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o];Op(a.fragments,o,a.contentBox,0,i=>{t.push(i);});}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(t)});return vp.set(e,r),r}function EP(e){let n=e.sourceRevision;switch(e.kind){case "rowDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function LP(e){switch(e.kind){case "rowDivider":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function MP(e,n){if(n.kind==="insertRow"){for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat)return t.editable?{kind:"insertRow",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}:null;return null}for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat&&t.editable)for(let r=0;r<t.table.columnEdges.length-1;r+=1){let o=Yo(t.row,r);if(o===n.gridColumnId)return {kind:"insertColumn",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,gridColumnId:o,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}}return null}function Yo(e,n){for(let t of e.cells)if(t.gridColumn===n)return t.gridColumnId??null;return null}function dS(e,n,t,r,o){let a=e.pages[n.pageIndex];if(!a)return null;let i=t-a.contentBox.x-o,l=r-a.contentBox.y,s=n.table,d=i-s.box.x,c=l-s.box.y;return d<-Gr||c<-Bp||d>s.box.width+Gr||c>s.box.height+td?null:{x:d,y:c}}function cS(e,n,t,r,o){if(n.row.isHeaderRepeat)return null;let a=n.table,i=n.row.box.y-a.box.y+n.row.box.height;if(!a.columnEdges.slice(1).some(d=>Math.abs(t-d)<=Gr)&&t>=0&&t<=a.box.width&&Math.abs(r-i)<=Gr)return {kind:"rowDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeY:i};if(r<n.row.box.y-n.table.box.y||r>n.row.box.y-n.table.box.y+n.row.box.height)return null;for(let d=1;d<a.columnEdges.length-1;d+=1){let c=a.columnEdges[d];if(Math.abs(t-c)>Gr)continue;let u=Yo(n.row,d-1),f=Yo(n.row,d);if(!u||!f)continue;let p=o.pages[n.pageIndex];return {kind:"columnDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,leftGridColumnId:u,rightGridColumnId:f,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:c,sheetY:p.contentBox.y+a.box.y+r}}let s=a.columnEdges.at(-1);if(Math.abs(t-s)<=Gr){let d=a.columnEdges.length-2,c=Yo(n.row,d);if(!c)return null;let u=o.pages[n.pageIndex];return {kind:"rightEdge",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:a.tableId,rowId:n.row.id,gridColumnId:c,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:s,sheetY:u.contentBox.y+a.box.y+r}}return null}function NP(e,n,t,r,o=0,a){let i=a??Xo(r,t),l=i>=0?o:0,s=null,d=-1,c=-1,u=f=>{if(!f)return;let p=sS[f.kind];f.nestingDepth<d||f.nestingDepth===d&&p<=c||(d=f.nestingDepth,c=p,s=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let p=dS(r,f,n,t,l);if(!p||(u(cS(e,f,p.x,p.y,r)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let g=f.row.box.y-f.table.box.y;p.x<=td&&Math.abs(p.y-(g+f.row.box.height/2))<=f.row.box.height/2+td&&u({kind:"insertRow",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});for(let b=0;b<f.table.columnEdges.length-1;b+=1){let h=f.table.columnEdges[b],y=f.table.columnEdges[b+1],x=(h+y)/2;if(Math.abs(p.x-x)>(y-h)/2+2||p.y>Bp)continue;let P=Yo(f.row,b);if(P){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:P,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return s}var Cp=1048576;function rd(e=Cp){let n=e|0;return {cellsRemaining:n>0?n:0}}function od(e,n,t,r){let o=new Map,a=new Map,i=r?.pageFragment===true,l=new Set,s=i,c=p=>{let g=a.get(p);g&&(o.set(g.id,g.span),a.delete(p));},u=()=>t!==void 0&&t.cellsRemaining<=0,f=()=>{for(let p of [...a.keys()])c(p);};for(let p of e){if(u()){f();break}s&&p.isHeaderRepeat!==true&&(s=false,f(),l?.clear());let g=new Set,b=false;for(let h of p.cells){if(t){if(t.cellsRemaining<=0){b=true;break}t.cellsRemaining-=1;}let y=Math.max(0,Math.min(h.gridColumn|0,1023));if(g.add(y),h.vMergeContinue){let x=a.get(y);x?x.span+=1:l&&!l.has(y)&&(a.set(y,{id:h.id,span:1}));}else c(y),a.set(y,{id:h.id,span:1});l?.add(y);}if(b){f();break}for(let h of [...a.keys()])g.has(h)||c(h);}return f(),o}function Ep(e,n,t,r){let o=new Map,a=0,i=l=>{let s=Hr(l,n,0,t,r);if(s)for(let d of s.rows)for(let c of d.cells)for(let u of c.blocks)u.localName==="p"?o.set(u.id,a++):u.localName==="tbl"&&i(u);};for(let l of e)l.kind==="paragraph"&&l.paragraph?o.set(l.paragraph.id,a++):l.kind==="table"&&l.table&&i(l.table);return o}var yi=4096,kp=1,Pn=class extends Error{code;constructor(n,t){super(t),this.name="TablePaginationError",this.code=n;}};function ad(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0}))}function Lp(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function Mp(e,n,t,r,o){let a=Lp(o);if(!(e.length===0||!a||!o.inlineDrawingLayout||!o.anchorFrameBase||!o.pageContentClip))for(let i of e){let l=null,s=null,d=i.lines;for(let u of n){for(let f of u.blocks)if(f.kind==="paragraph"&&f.paragraphId===i.paragraphId){l=f.box,d=f.lines,s=u.box;break}if(l)break}if(!l)continue;let c=s??Object.freeze({x:i.cellOriginX,y:t,width:i.cellContentWidth,height:r});a(Mr({paragraph:i.paragraph,paragraphId:i.paragraphId,paragraphBox:l,lines:d,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(l)??l,cellBox:c,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{}}));}}function uS(e,n,t,r){if(!(!r.onAnchorRepublish||!r.inlineDrawingLayout||!r.anchorFrameBase||!r.pageContentClip))for(let o of e){if(o.kind!=="paragraph")continue;let a=n.find(l=>l.kind==="paragraph"&&l.id===o.paragraphId);!a||a.kind!=="paragraph"||Rn(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,Mr({paragraph:a,paragraphId:o.paragraphId,paragraphBox:o.box,lines:o.lines,drawingLayout:r.inlineDrawingLayout,frameBase:r.anchorFrameBase(),columnBox:r.columnBoxForParagraph?.(o.box)??o.box,cellBox:t,pageClip:r.pageContentClip(),measurer:r.measurer,...r.layoutTextboxStoryFor?{layoutTextboxStory:r.layoutTextboxStoryFor}:{}}));}}function fS(e,n){let t=Lp(e),r=e.deferAnchoredDrawings;return !t&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:t,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{n.push(i);}},flushDeferred:(i,l,s)=>{if(n.length!==0){if(t&&!e.anchorDeferOnly)Mp(n,i,l,s,e);else if(r)for(let d of n)r(d);n.length=0;}}}}function hi(e,n,t){let r=0;for(let o=n;o<t&&o<e.length;o+=1)r+=e[o];return r}function id(e,n){return n===0?[...e]:e.map(t=>t.kind==="table"?{...t,box:{...t.box,y:t.box.y+n},rows:t.rows.map(r=>({...r,box:{...r.box,y:r.box.y+n},cells:r.cells.map(o=>({...o,box:{...o.box,y:o.box.y+n},blocks:id(o.blocks,n)}))}))}:{...t,box:{...t.box,y:t.box.y+n},...t.shadingBox?{shadingBox:{...t.shadingBox,y:t.shadingBox.y+n}}:{},...t.bottomBorder?{bottomBorder:{...t.bottomBorder,box:{...t.bottomBorder.box,y:t.bottomBorder.box.y+n}}}:{},...t.borders?{borders:t.borders.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}:{},...t.marker?{marker:{...t.marker,box:{...t.marker.box,y:t.marker.box.y+n}}}:{},lines:t.lines.map(r=>({...r,box:{...r.box,y:r.box.y+n},spans:r.spans.map(o=>({...o,box:{...o.box,y:o.box.y+n}})),...r.drawings?{drawings:r.drawings.map(o=>La(o,0,n))}:{}}))})}function pS(e,n,t,r,o,a,i){let l=e.id,s=o.listItems?.get(l),{props:d,indent:c,available:u,alignment:f,spacing:p,lineSpacing:g,bottomBorder:b,borders:h,shading:y,inheritedRunProperties:x,markRunProperties:P,tabStops:T,tabStopsCacheToken:_}=No(e,t,o.styleCascade,s,i?.tableCellStyle,true),j=mo(T,o.defaultTabStopPt),z=j===T?_:$t(j),L=li(s,c,o.measurer,j,u),k=o.pageExclusionZones?.()??Object.freeze([]),v=o.paragraphOrderIndex?.(l)??Number.MAX_SAFE_INTEGER,m=o.paragraphOrderIndex?rf(k,v,ee=>o.paragraphOrderIndex?.(ee)):k,R=tf(m,n,0,{left:0,right:c.left+u+c.right}),N=qn(R),I=N?`${r.toFixed(3)}|${N}`:"",C=Ut({paragraph:e,properties:[...d,...x,...P,{localName:"tabStops",attributes:{token:z}},...s?[{localName:"list",attributes:{token:s.cacheToken}}]:[]],width:u,producer:o.producer,...o.drawingTokenForParagraph?.(e)?{drawingToken:o.drawingTokenForParagraph(e)}:o.drawingLayoutToken?{drawingToken:o.drawingLayoutToken}:{},...I?{exclusionToken:I}:{}}),B=ja(e,l,c.left,u,o.measurer,o.cache,o.cache?C:null,x,j,o.pageContext,o.styleCascade?(ee,ne)=>pt(ee,ne,o.styleCascade):void 0,{lineSpacing:g,firstLineOffset:L,marginExtent:{left:0,right:c.left+u+c.right},...o.projectLink?{projectLink:o.projectLink}:{},displayMode:o.displayMode,...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:c.left+u+c.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:c.left+u+c.right,height:Math.max(1,u)}),...R.length>0?{pageExclusionZones:R}:{},...o.styleCascade?{themeFonts:o.styleCascade.themeFonts}:{},markRunProperties:P}),E=i?.lineStart??0,M=i?.fragmentIndex??0,F=i?.maxBottom??Number.POSITIVE_INFINITY,H=i?.includeAfter??true,D=i?.includeBottomBorder??true,$=E===0?Ir(p.before,a):0,X=n+c.left,J=E===0?Rt(h.top):0,K=[],q=r+$+J,he=E,Ie=false;for(let ee=E;ee<B.length;ee+=1){let ne=B[ee],O=ee===B.length-1,S=O&&D&&b?Rt(b):0,W=O&&H?p.after:0,Z=R.length>0?ft(q,ne.height,R):ne.exclusionSkipBefore??0;if(q+Z+ne.height+S+W>F+.001)break;q+=Z;let ue=n+c.left+(ee===0?L:0),Be=Math.max(1,u-(ee===0?L:0)),ye=ne.spans.map(Se=>({...Se,range:{...Se.range,paragraphId:l},box:{...Se.box,x:Se.box.x+n,y:q}})),Ze=za(ye,o.measurer,ue,Be,f,O,f==="center"||f==="right"?ne.width:void 0),_e=ye.length>0&&Ze.length>0?Ze[0].box.x-ye[0].box.x:f!=="left"&&f!=="both"?(()=>{let Se=Be-ne.width;return Se<=0?0:f==="center"?Se/2:Se})():0,Qe=Object.freeze({x:n,y:r,width:t,height:Math.max(0,F-r)}),en=Ha(ne.drawings.map(Se=>Ma(Object.freeze({...Se,paragraphId:l,x:n+Se.x,advanceStart:n+Se.advanceStart,advanceEnd:n+Se.advanceEnd,y:q+Se.y,paintBounds:Object.freeze({...Se.paintBounds,x:n+Se.paintBounds.x,y:q+Se.paintBounds.y}),hitBounds:Object.freeze({...Se.hitBounds,x:n+Se.hitBounds.x,y:q+Se.hitBounds.y})}),Qe)),_e);K.push({id:o.nextLineId(),range:{paragraphId:l,start:ne.start,end:ne.end},spans:Ze,...en.length>0?{drawings:en}:{},box:{x:n+c.left,y:q,width:u,height:ne.height},contentX:Ze[0]?.box.x??ue+_e,baseline:ne.baseline,leading:ne.leading,trailingSpacing:ne.trailingSpacing,...ne.deletedRanges?{deletedRanges:ne.deletedRanges}:{}}),q+=ne.height,he=ee+1,Ie=true;}if(!Ie)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:E,complete:false,fitted:false};let ce=he>=B.length,Pe=K[0].box.y,ve=q,me=[],fe,be=Pe,Te=ve,He=h.left?un(h.left):0,an=h.right?un(h.right):0,rn=h.left?X-h.left.spacePt-He:X,Me=h.right?X+u+h.right.spacePt+an:X+u,Jn=Math.max(Me-rn,0);if(J>0&&h.top){let ee=un(h.top),ne=Pe-h.top.spacePt-ee;me.push({side:"top",edge:h.top,box:{x:rn,y:ne,width:Jn,height:ee}}),be=ne;}if(ce&&D&&b){let ee=un(b),ne=ve+b.spacePt,O={x:rn,y:ne,width:Jn,height:ee};fe={edge:b,box:O},me.push({side:"bottom",edge:b,box:O}),Te=ne+ee;}let Qn=Math.max(Te-be,0);if(h.left&&me.push({side:"left",edge:h.left,box:{x:X-h.left.spacePt-He,y:be,width:He,height:Qn}}),h.right&&me.push({side:"right",edge:h.right,box:{x:X+u+h.right.spacePt,y:be,width:an,height:Qn}}),h.bar){let ee=un(h.bar);me.push({side:"bar",edge:h.bar,box:{x:X-h.bar.spacePt-ee,y:Pe,width:ee,height:Math.max(ve-Pe,0)}});}let xe=ce&&H?p.after:0,on=Te+xe,In=y===void 0?void 0:h.left||h.right?{x:rn,y:be,width:Jn,height:Math.max(Te-be,0)}:po(K,X,u),U=E===0?si(s,o.measurer,K[0]?{y:K[0].box.y,height:K[0].box.height}:void 0,n):void 0,Dn={kind:"paragraph",id:`${l}#f${M}`,paragraphId:l,fragmentIndex:M,range:{paragraphId:l,start:K[0].range.start,end:K[K.length-1].range.end},props:d,spacing:{before:$,after:xe},indent:c,...fe?{bottomBorder:fe}:{},...me.length>0?{borders:me}:{},...y===void 0?{}:{shading:y},...In===void 0?{}:{shadingBox:In},...U?{marker:U}:{},lines:K,box:{x:X,y:r,width:u,height:on-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let ee=Object.freeze({x:n,y:r,width:t,height:Math.max(0,F-r)}),ne=Dn.box,O={paragraph:e,paragraphId:l,paragraphBox:ne,lines:K};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...O,cellOriginX:n,cellContentWidth:t}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(Mr({paragraph:e,paragraphId:l,paragraphBox:ne,lines:K,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(ne)??ne,cellBox:ee,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{}}));}return {fragment:Dn,bottom:on,spaceAfter:xe,nextLineIndex:he,complete:ce,fitted:true}}function er(e,n,t,r,o,a){let i=Np(e,n,t,r,Number.POSITIVE_INFINITY,o,a,{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0});return {blocks:i.blocks,bottom:i.bottom}}function Np(e,n,t,r,o,a,i,l,s){let d=[],c=r,u=l.previousSpaceAfter,f=l.blockIndex,p=l.lineIndex,g=l.paragraphFragmentIndex,b=false,h=false;for(;f<e.length;){let y=e[f];if(y.kind==="table"){p!==0&&(p=0),u=0;let P=hS(y,n,t,c,a+1,i);if(!P){f+=1;continue}if(P.bottom>o+.001){h=!b;break}d.push(P.fragment),c=P.bottom,b=true,f+=1,p=0;continue}if(y.kind!=="paragraph"){f+=1,p=0;continue}let x=pS(y,n,Math.max(1,t-n),c,i,u,{lineStart:p,fragmentIndex:g,maxBottom:o,includeAfter:true,includeBottomBorder:true,...s?{tableCellStyle:s}:{}});if(!x.fitted||!x.fragment)break;if(d.push(x.fragment),c=x.bottom,b=true,x.complete)u=x.spaceAfter,f+=1,p=0,g=0;else return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:x.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:g+1},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:p,previousSpaceAfter:u,paragraphFragmentIndex:g},complete:f>=e.length,fitted:b,nestedSplitBlocked:h}}function Fp(e,n){return {top:e.top+Jt(n.top),right:e.right+Jt(n.right),bottom:e.bottom+Jt(n.bottom),left:e.left+Jt(n.left)}}function gS(e,n,t){return {top:n?{state:"none"}:e.top,left:e.left,bottom:t?{state:"none"}:e.bottom,right:e.right}}function Ap(e,n,t){return !n&&!t?e:{...e,cells:e.cells.map(r=>({...r,borders:gS(r.borders,n,t)}))}}function Ko(e,n,t,r,o,a,i,l=0){let s=ld(e,n,t,r,Number.POSITIVE_INFINITY,o,false,a,i,ad(e),l);return {record:s.record,bottom:s.bottom}}function ld(e,n,t,r,o,a,i,l,s,d,c=0){let u=hi(n,0,n.length),f=Number.isFinite(c)&&c>0?c/2:0,p=s.measurer.lineMetrics(Yn).height,g=e.height,b=g.rule==="exact"?g.valuePt:void 0,h=g.rule==="atLeast"?g.valuePt:void 0,y=[],{rowDeps:x,flushDeferred:P}=fS(s,y),T=b===void 0?o:Math.min(o,r+Math.max(0,b)),_=[],j=false,z=false,L=r;for(let I=0;I<e.cells.length;I+=1){let C=e.cells[I],B=d[I]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0},E=C.gridSpan,M=C.gridColumn,F=t+hi(n,0,M),H=hi(n,M,Math.min(M+E,n.length))||u,D=Math.min(f,Math.max((H-kp)/2,0)),$=F+D,X=Math.max(H-2*D,kp),J=Fp(C.margins,C.borders),K=i?Jt(C.borders.top):J.top,q=r+K,he=T-J.bottom,Ie=[],ce=q,Pe=B,ve=true,me=false,fe=false;if(!C.vMergeContinue)if(he<q+.001)ve=B.blockIndex>=C.blocks.length;else {let Te=Np(C.blocks,$+J.left,$+X-J.right,q,he,l,x,B,C.styleFormatting);Ie=Te.blocks,ce=Te.bottom,Pe=Te.cursor,ve=Te.complete,me=Te.fitted,fe=Te.nestedSplitBlocked,me&&(j=true),fe&&(z=true);}let be=Math.min(T,me?ce+J.bottom:r+K+p+J.bottom);be>L&&(L=be),_.push({cell:C,x:$,width:X,gridColumn:M,blocks:Ie,contentTop:q,contentBottom:ce,insets:{...J,top:K},nextCursor:Pe,complete:C.vMergeContinue?true:ve,fitted:me,nestedSplitBlocked:fe});}L=Math.min(T,Math.max(L,r));for(let I of _){let C=I.fitted?I.contentBottom+I.insets.bottom:r+I.insets.top+p+I.insets.bottom;C>L&&C<=T+.001&&(L=C);}L=Math.min(T,L);let k=false;if(b!==void 0){let I=r+b;I<=o+.001?(L=I,k=true):L=Math.min(o,L);}else if(h!==void 0){let I=r+h;_.every(B=>B.complete)&&I<=o+.001&&I>L&&(L=I);}L=Math.min(o,L);let v=Math.max(0,L-r),m=_.map(I=>{let C=I.blocks,B=k?true:I.complete;if(!I.cell.vMergeContinue&&B&&I.cell.vAlign!=="top"&&C.length>0){let E=I.contentBottom-I.contentTop,M=v-I.insets.top-I.insets.bottom-E;if(M>0){let F=I.cell.vAlign==="center"?M/2:M;C=id(C,F);}}return {id:I.cell.id,gridColumn:I.gridColumn,...I.cell.gridColumnId?{gridColumnId:I.cell.gridColumnId}:{},gridSpan:I.cell.gridSpan,vMergeContinue:I.cell.vMergeContinue,...I.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...I.cell.shading===void 0?{}:{shading:I.cell.shading},blocks:C,box:{x:I.x,y:r,width:I.width,height:v}}}),R=k||_.every(I=>I.complete)?null:_.map(I=>I.nextCursor),N=k||_.every(I=>I.complete);return P(m,r,v),{record:{id:e.id,...e.revisionKind?{revisionKind:e.revisionKind}:{},...e.revisionId!==void 0?{revisionId:e.revisionId}:{},...e.revisionAuthor!==void 0?{revisionAuthor:e.revisionAuthor}:{},...e.revisionDate!==void 0?{revisionDate:e.revisionDate}:{},rowIndex:0,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:m,box:{x:t,y:r,width:u,height:v}},bottom:L,remainder:N?null:R,fitted:j||e.cells.every(I=>I.vMergeContinue)||k,nestedSplitBlocked:z}}function mS(e){return {...e,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function sd(e,n,t,r,o,a=0){let i=0,l={...mS(o),pageExclusionZones:void 0,nextLineId:()=>`probe-${i++}`};return Ko(e,n,t,0,false,r,l,a).record.box.height}function dd(e,n,t,r,o,a,i,l){if(e.length===0)return [];let s=new Map;for(let h of t)for(let y of h.cells)s.set(y.id,y);let d=od(e,a,o,{pageFragment:true}),c=e.map((h,y)=>({...h,cells:h.cells.map(x=>{let P=d.get(x.id);if(x.vMergeContinue&&P===void 0)return {...x,paintInert:true,rowSpan:1,borders:{},blocks:[]};let T=x.vMergeContinue,_=P??1,j=x.box.height;if(_>1){let v=e[y+_-1];j=v.box.y+v.box.height-x.box.y;}let z=s.get(x.id),L=x.blocks;if(z&&z.vAlign!=="top"&&L.length>0){let v=Fp(z.margins,z.borders),m=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(let N of L)m=Math.min(m,N.box.y),R=Math.max(R,N.box.y+N.box.height);if(Number.isFinite(m)&&Number.isFinite(R)){let N=j-v.top-v.bottom-(R-m),C=x.box.y+v.top+(N>0?z.vAlign==="center"?N/2:N:0)-m;if(Math.abs(C)>.001){L=id(L,C);for(let B of L)B.kind==="paragraph"&&i?.(B.paragraphId,C);}}}let k=Object.freeze({x:x.box.x,y:x.box.y,width:x.box.width,height:j});return z&&l&&(_>1||z.vAlign!=="top"&&L.length>0)&&uS(L,z.blocks,k,l),{...x,...T?{vMergeContinue:false,paintInert:false}:{},rowSpan:_,blocks:L,box:{...x.box,height:j}}})})),u=c.map(h=>h.cells.map(y=>{let x=s.get(y.id);return {gridColumn:y.gridColumn,gridSpan:y.gridSpan,vMergeContinue:y.vMergeContinue,borders:x?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:y.rowSpan??1}})),f=n.columnWidthsPt.length,p=n.tableBorders,g={columnWidthsPt:n.columnWidthsPt,rowBands:c.map(h=>({y:h.box.y,height:h.box.height})),cellBoxes:c.map(h=>h.cells.map(y=>({width:y.box.width,height:y.box.height})))},b=Ns(u,p,f,g,void 0,r);return c.map((h,y)=>({...h,cells:h.cells.map((x,P)=>{let T=b[y][P];return x.paintInert||x.vMergeContinue?{...x,borders:{},paintInert:true}:{...x,borders:T}})}))}function hS(e,n,t,r,o,a){if(o>=oi)return null;let i=Math.max(1,t-n),l=Hr(e,i,o,a.styleCascade,a.displayMode);if(!l||l.rows.length===0)return null;let s=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:h=>{s.push(h);}},c=n+jo(l,i),u=[],f=r;for(let h of l.rows){let y=Ko(h,l.columnWidthsPt,c,f,false,o,d,l.cellSpacingPt);u.push(y.record),f=y.bottom;}let p=dd(u,l,l.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let h of s)for(let y of p)if(y.cells.some(P=>P.blocks.some(T=>T.kind==="paragraph"&&T.paragraphId===h.paragraphId))){Mp([h],y.cells,y.box.y,y.box.height,a);break}let g=hi(l.columnWidthsPt,0,l.columnWidthsPt.length),b=new Map;return {fragment:mi({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:p,box:{x:c,y:r,width:g,height:f-r}},l.columnWidthsPt,o,b),bottom:f}}function yS(e){let n=e.root;if(n.localName==="hdr"||n.localName==="ftr")return n;let t=r=>{if(r.kind!=="textValue"){if(r.kind==="body")return r;for(let o of r.children){let a=t(o);if(a)return a}}};return t(n)}function cd(e,n){return !(e.kind==="paragraph"&&Ao(e,n))}function ht(e,n="all-markup"){let t=yS(e);return t?Nb$1(t.children,0,r=>cd(r,n)):[]}function bi(e,n="all-markup"){return e.kind!=="note"?[]:Nb$1(e.children,0,t=>cd(t,n))}function Dp(e,n="all-markup"){return e.kind==="textValue"?[]:Nb$1(e.children,0,t=>cd(t,n))}function _p(e){let n=e.picture;return n?.embeddedRelationshipId?`embed:${e.ownerPartName}:${n.embeddedRelationshipId}`:n?.linkedRelationshipId?`link:${e.ownerPartName}:${n.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}function zp(e){let n=new Map,t=[{node:e.root,depth:0}],r=0;for(;t.length>0;){let o=t.pop();if(r+=1,r>Xa$1.maxVisitedElements||o.depth>Xa$1.maxDrawingDepth)return null;let{node:a}=o;if(a.kind==="drawing"||_a$1(a)){n.set(a.id,a);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)t.push({node:a.children[i],depth:o.depth+1});}return n}function ud(e){let n=e.position,t=e.anchor,r=e.picture,o=e.wrapGeometry;return [e.drawingNodeId,e.ownerPartName,e.kind,e.hidden?"1":"0",String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.effectExtentEmu.top),String(e.effectExtentEmu.right),String(e.effectExtentEmu.bottom),String(e.effectExtentEmu.left),e.compatibilityBranchNodeId??"",t?.simplePos?"sp":"pv",t?String(t.relativeHeight):"",t?t.layoutInCell?"1":"0":"",r?[String(r.crop.left),String(r.crop.top),String(r.crop.right),String(r.crop.bottom),String(r.transform.rotationDegrees),r.transform.flipHorizontal?"1":"0",r.transform.flipVertical?"1":"0",String(r.transform.offsetEmu.x),String(r.transform.offsetEmu.y),String(r.transform.extentEmu.cx),String(r.transform.extentEmu.cy),r.embeddedRelationshipId??"",r.linkedRelationshipId??"",r.presetGeometry??""].join(":"):"",o?[o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length)].join(":"):"",n?[n.horizontal.relativeFrom,n.horizontal.align??"",String(n.horizontal.offsetEmu??""),n.vertical.relativeFrom,n.vertical.align??"",String(n.vertical.offsetEmu??""),String(n.simplePosition.xEmu),String(n.simplePosition.yEmu)].join(":"):""].join("|")}function xi(e){switch(e.kind){case "ready":return `ready:${e.resourceKey}:${e.contentId}:${e.pixelWidth}x${e.pixelHeight}`;case "pending":return `pending:${e.resourceKey}`;case "external":return `external:${e.relationshipId}:${e.sinkSafe?"1":"0"}`;case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}var bS=1;function fd(e,n){if(e.kind==="drawing"||_a$1(e)){n.push(e.id);return}if("children"in e)for(let t of e.children)fd(t,n);}function xS(e){if(e.kind!=="paragraph")return [];let n=[];for(let t of e.children)fd(t,n);return Object.freeze(n)}function SS(e){let{ownerPartName:n,part:t,pkg:r,lookup:o,onResourceSettled:a,rememberReadyHandle:i,forgetReadyHandle:l}=e,s=false,d=0,c=new Map,u=new Set,f=new Map,p=new WeakMap,g=new WeakMap,b=0,h=Za$1(r,n),y=cb$1(t,{resolveRelationship:h}),x=zp(t),P=(k,v)=>{if(s||u.has(v))return;u.add(v);let m=d;o.resolveForProjection(k).then(R=>{s||m!==d||(c.set(v,R),R.kind==="ready"&&i(R.validatedHandle),b+=1,f.set(v,b),a(n));}).catch(()=>{s||m!==d||(c.set(v,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),b+=1,f.set(v,b),a(n));}).finally(()=>{u.delete(v);});},T=k=>{let v=_p(k),m=c.get(v);if(m)return m;let R=k.picture?.linkedRelationshipId;if(R){let I=o.resolveLinked(n,R);return c.set(v,I),b+=1,f.set(v,b),I}let N=Object.freeze({kind:"pending",resourceKey:v});return c.set(v,N),b+=1,f.set(v,b),P(k,v),N},_=k=>y.get(k)??null,j=Object.freeze({ownerPartName:n,projectionForAtom:_,project:k=>_(k.id),resourceOf:T}),z=k=>{let v=g.get(k);if(v)return v;let m=xS(k),R=null,N=(C,B)=>{if(!(B>=bS))for(let E of C){let M=y.get(E)?.textboxStory;if(!M)continue;let F=[];if(fd(M.content,F),F.length!==0){R||(R=[...m]);for(let H of F)R.push(H);N(F,B+1);}}};N(m,0);let I=R??m;return g.set(k,I),I};return {context:j,cacheTokenForPart:()=>`${n}|${b}|${d}|${y.size}`,drawingTokenForParagraph:k=>{let v=p.get(k);if(v?.resourceEpoch===b)return v.token;let m=z(k);if(m.length===0)return p.set(k,{resourceEpoch:b,token:""}),"";let N=m.map(I=>{let C=y.get(I);if(!C)return `${I}:refused`;let B=T(C);return [I,ud(C),xi(B),String(f.get(_p(C))??0)].join("|")}).sort().join(";");return p.set(k,{resourceEpoch:b,token:N}),N},isCompatibleWith:(k,v)=>{if(k===t)return true;let m=zp(k);if(x&&m&&x.size===m.size){let N=true;for(let[I,C]of x)if(m.get(I)!==C){N=false;break}if(N)return true}let R=cb$1(k,{resolveRelationship:Za$1(v,n)});if(R.size!==y.size)return false;for(let[N,I]of y){let C=R.get(N);if(!C||ud(C)!==ud(I))return false}return true},dispose:()=>{s=true,d+=1;for(let k of c.values())k.kind==="ready"&&l(k.validatedHandle);c.clear(),u.clear(),f.clear();}}}function dI(e){let n=e.session.packageRevision(),t=e.session.currentPackage(),r=e.resourceLookup??pb$1(t,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new Map,l=new Map,s=p=>{i.set(p.resourceKey,p);let g=eb$1(p);g&&l.set(p.resourceKey,g);},d=p=>{i.delete(p.resourceKey);let g=l.get(p.resourceKey);g&&(fb$1(g),l.delete(p.resourceKey));},c=(p,g)=>{let h=g.currentPackage().parts.get(p)??a.get(p);if(h)return h;if(p===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${p}`)},u=(p,g)=>{let b=c(p,g);a.set(p,b);let h=o.get(p);return h||(h=SS({ownerPartName:p,part:b,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:s,forgetReadyHandle:d}),o.set(p,h),h)},f=p=>{let g=p.currentPackage();if(g.partBytes===t.partBytes&&g.relationships===t.relationships&&g.contentTypes===t.contentTypes){for(let[h,y]of o){let x=g.parts.get(h)??(h===p.part().name?p.part():void 0);if(x&&y.isCompatibleWith(x,g)){a.set(h,x);continue}y.dispose(),o.delete(h),a.delete(h);}n=p.packageRevision(),t=g;return}for(let h of o.values())h.dispose();o.clear(),a.clear();for(let h of l.values())fb$1(h);l.clear(),i.clear(),e.resourceLookup||r.dispose(),n=p.packageRevision(),t=g,r=e.resourceLookup??pb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return u(e.session.part().name,e.session).context},contextForPart(p){return u(p,e.session).context},cacheTokenForPart(p){return u(p,e.session).cacheTokenForPart()},drawingTokenForParagraph(p,g){return u(g,e.session).drawingTokenForParagraph(p)},mintValidatedBytes(p,g){let b=i.get(p.resourceKey);return !b||b.contentId!==p.contentId?null:db$1(p,g)},sync(p){p.packageRevision()!==n&&f(p);},dispose(){for(let p of o.values())p.dispose();o.clear(),a.clear();for(let p of l.values())fb$1(p);l.clear(),i.clear(),e.resourceLookup||r.dispose();}})}function Hp(e,n){let t=[],r=o=>{if(o.kind==="paragraph"){let a=n(o);a&&t.push(a);return}if("children"in o)for(let a of o.children)r(a);};return r(e),t.sort().join(";")}function wS(e){let n=t=>{if(t.kind==="textValue"||bc(t)||$b$1(t)!==null)return false;if(t.kind==="text"||t.localName==="t"){for(let r of t.children)if(r.kind==="textValue"&&r.value.trim().length>0)return true;return false}for(let r of t.children)if(r.kind!=="textValue"&&n(r))return true;return false};for(let t of e.children)if(t.kind!=="textValue"&&n(t))return true;return false}function $p(e,n){for(let t of n.resultParagraphIds){let r=Ea$1(e,t);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&wS(r))return true}return false}var jp=new WeakMap,Gp=new WeakMap,Wp=new WeakMap;function pd(e){let n=jp.get(e);if(n)return n;let t=new Set;for(let r of tc(e))t.add(r.beginParagraphId),t.add(r.endParagraphId);return jp.set(e,t),t}function gd(e){let n=Gp.get(e);if(n)return n;let t=new Set;for(let r of tc(e))$p(e,r)||t.add(r.beginParagraphId);return Gp.set(e,t),t}function md(e){let n=Wp.get(e);if(n)return n;let t=new Set;for(let r of tc(e))if(!$p(e,r))for(let o of r.resultParagraphIds)t.add(o);return Wp.set(e,t),t}var Si=4096,Ot=20,An=Object.freeze({pageSize:Object.freeze({widthTwips:12240,heightTwips:15840}),margins:Object.freeze({topTwips:1440,rightTwips:1440,bottomTwips:1440,leftTwips:1440,headerTwips:720,footerTwips:720,gutterTwips:0}),columns:Object.freeze({count:1,gapTwips:720,equalWidth:true,separator:false,definitions:Object.freeze([])}),landscape:false,titlePage:false,breakType:"nextPage"});function hd(e,n,t=31680*2){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<=0||r>t?n:r}function nr(e,n){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let t=Number(e);return !Number.isFinite(t)||Math.abs(t)>31680?n:t}function Vp(e,n,t=31680){if(e===void 0||!/^\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<0||r>t?n:r}var Ve=(e,n)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes??[])if(t.localName===n)return t.value}},tr=(e,n)=>{if(e.kind!=="textValue"){for(let t of e.children??[])if(t.kind!=="textValue"&&"localName"in t&&t.localName===n)return t}};function Xp(e,n,t){let r=Ve(e,n);return r===void 0?t:r==="0"||r==="false"||r==="off"||r==="no"?false:r==="1"||r==="true"||r==="on"||r==="yes"?true:t}function RS(e){if(!e)return 1;let n=Ve(e,"num");return !n||!/^\d{1,7}$/.test(n)?1:Math.max(1,Math.min(12,Number(n)))}function PS(e,n,t){if(!e||e.kind==="textValue")return [];let r=[];for(let o of e.children??[]){if(r.length>=n||o.kind==="textValue"||!("localName"in o)||o.localName!=="col")continue;let a=r.length;r.push({widthTwips:hd(Ve(o,"w"),1,31680),gapTwips:a===n-1?0:Vp(Ve(o,"space"),t)});}return r}function IS(e){let n=e?tr(e,"type"):void 0,t=n?Ve(n,"val"):void 0;return t==="continuous"||t==="evenPage"||t==="oddPage"||t==="nextColumn"?t:"nextPage"}var TS=new Set(["hyphen","period","colon","emDash","enDash"]);function Yp(e){let n=tr(e,"pgNumType");if(!n||n.kind==="textValue")return;let t={},r=Ve(n,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let l=Number(r);Number.isFinite(l)&&l>=0&&l<=9999&&(t.start=l);}let o=Ve(n,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(t.fmt=o);let a=Ve(n,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let l=Number(a);Number.isFinite(l)&&l>=0&&l<=9&&(t.chapStyle=l);}let i=Ve(n,"chapSep");return i!==void 0&&TS.has(i)&&(t.chapSep=i),t}function wi(e){if(!e)return An;let n=tr(e,"pgSz"),t=tr(e,"pgMar"),r=tr(e,"cols"),o=An,a=n?Ve(n,"orient"):void 0,i=n?hd(Ve(n,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,l=n?hd(Ve(n,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,s=Yp(e),d=RS(r),c=r?Vp(Ve(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?Xp(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:l},margins:{topTwips:t?nr(Ve(t,"top"),1440):o.margins.topTwips,rightTwips:t?nr(Ve(t,"right"),1440):o.margins.rightTwips,bottomTwips:t?nr(Ve(t,"bottom"),1440):o.margins.bottomTwips,leftTwips:t?nr(Ve(t,"left"),1440):o.margins.leftTwips,headerTwips:t?nr(Ve(t,"header"),720):o.margins.headerTwips,footerTwips:t?nr(Ve(t,"footer"),720):o.margins.footerTwips,gutterTwips:t?nr(Ve(t,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?Xp(r,"sep",false):false,definitions:u?[]:PS(r,d,c)},landscape:a==="landscape"||i>l,titlePage:sa(e,"titlePg"),breakType:IS(e),...s!==void 0?{pageNumbering:s}:{}}}function vS(e){let n=t=>{if(t.kind!=="textValue"){if(t.kind==="body")return tr(t,"sectPr");for(let r of t.children??[]){let o=n(r);if(o)return o}}};return n(e.root)}function Ri(e){let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n)return;let t=tr(n,"sectPr");return t&&t.kind!=="textValue"?t:void 0}function BS(e){let n=Pi(e);return n[n.length-1]?.properties??An}function Pi(e,n="all-markup"){return Kp(e,n).sections}function Kp(e,n="all-markup"){let t=ht(e,n),r=[],o=0,a=false;for(let l=0;l<t.length;l+=1){let s=t[l];if(s.kind!=="paragraph")continue;let d=Ri(s);if(d){if(r.length>=Si){a=true;continue}r.push({index:r.length,properties:wi(d),blockStart:o,blockEndExclusive:l+1}),o=l+1;}}if(a){if(r.length>0){let l=r[r.length-1];r[r.length-1]={...l,blockEndExclusive:t.length};}return {sections:r,truncated:true}}let i=vS(e);if(o<t.length||r.length===0){if(r.length>=Si){let l=r[r.length-1];return r[r.length-1]={...l,blockEndExclusive:t.length},{sections:r,truncated:true}}r.push({index:r.length,properties:wi(i),blockStart:o,blockEndExclusive:t.length});}else if(i){if(r.length>=Si)return {sections:r,truncated:true};r.push({index:r.length,properties:wi(i),blockStart:o,blockEndExclusive:t.length});}return {sections:r,truncated:a}}function rr(e){let n=e.pageSize.widthTwips/Ot,t=e.pageSize.heightTwips/Ot,r=(e.margins.leftTwips+e.margins.gutterTwips)/Ot,o=e.margins.rightTwips/Ot,a=e.margins.topTwips/Ot,i=e.margins.bottomTwips/Ot;return n-r-o<=0||t-a-i<=0?lo:{width:n,height:t,margin:{top:a,right:o,bottom:i,left:r},headerDistance:Math.max(0,e.margins.headerTwips)/Ot,footerDistance:Math.max(0,e.margins.footerTwips)/Ot}}function yd(e,n){let t=Math.max(1,n),r=Math.max(1,Math.min(12,Math.floor(e.count))),o=e.definitions??[],a=e.equalWidth===false&&o.length===r&&o.every(c=>c.widthTwips>0),i,l;if(a){i=o.map(p=>Math.max(1,p.widthTwips/20)),l=o.slice(0,-1).map(p=>Math.max(0,p.gapTwips/20));let c=l.reduce((p,g)=>p+g,0),u=Math.max(r*1,t-c),f=i.reduce((p,g)=>p+g,0);if(f>u){let p=u/f;i=i.map(g=>Math.max(1,g*p));}}else {let c=Math.max(0,e.gapTwips/20),u=Math.min(c,Math.max(0,(t-r*1)/(r-1||1)));l=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(1,(t-l.reduce((p,g)=>p+g,0))/r);i=Array.from({length:r},()=>f);}let s=[],d=0;for(let c=0;c<r;c+=1)s.push(d),d+=i[c]+(l[c]??0);return {count:r,widths:i,gaps:l,lefts:s,separator:e.separator===true&&r>1}}function OS(e,n,t){return Uo(e,n,()=>t)}function Uo(e,n,t){let r=[],o=null,a=-1,i=-1;for(let l of n){let s=t(l.sectionIndex);if(l.customMarkFollows){r.push({noteId:l.noteId,mark:null});continue}o===null?(o=s.numStart,a=l.sectionIndex,i=l.pageIndex??-1):s.numRestart==="eachSect"&&l.sectionIndex!==a?(o=s.numStart,a=l.sectionIndex):s.numRestart==="eachPage"&&l.pageIndex!==void 0&&l.pageIndex!==i?(o=s.numStart,i=l.pageIndex):s.numRestart==="eachSect"?a=l.sectionIndex:s.numRestart==="eachPage"&&l.pageIndex!==void 0&&(i=l.pageIndex);let d=o;o+=1,r.push({noteId:l.noteId,mark:dt(s.numFmt,d),displayNumber:d});}return r}function Up(e){let n=new Map;for(let t of e)n.set(t.noteId,t.mark);return n}var Wr=qd,Zo=512,bd=6,CS=1/3;function Zp(e,n){return `note-${e}-${n}`}function kS(e){if(!e)return [];let n=[];for(let t of sd$1(e.root)){if(n.length>=Wr)break;jd(t)&&n.push(t);}return n}function qp(e,n){if(e){for(let t of sd$1(e.root))if(id$1(t)===n)return t}}function xd(e,n,t){let r=gd$1(e),o=hd$1(e);if(!r||o===null)return null;let a=Zc$1(r,o),i=bi(e),l=Zp(r,o),s=0,d=Math.max(1,n),c=t.maxFlowHeightPt??Number.POSITIVE_INFINITY,u=t.noteMarks?{...t.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},f=t.ownerPartName?t.drawingsForPart?.(t.ownerPartName):void 0,p=er(i,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|${a}`,nextLineId:()=>`${l}-line-${s++}`,styleCascade:t.styleCascade,noteMarks:u,...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{},...f?{inlineDrawingLayout:f.inlineDrawingLayout,...f.drawingTokenForParagraph?{drawingTokenForParagraph:f.drawingTokenForParagraph}:{}}:{}}),g=p.blocks,b=p.bottom,h;if(g.length>Zo){g=g.slice(0,Zo);let y=g[g.length-1];b=y?y.box.y+y.box.height:0,h="note-fragment-limit";}if(b>c){let y=[],x=0;for(let P of g){let T=P.box.y+P.box.height;if(T>c+.001&&y.length>0)break;y.push(P),x=T;}g=y,b=x,h=h??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:id$1(e),fragments:g,flowHeight:b,...h?{fallbackReason:h}:{}}}function Ii(e,n,t,r){if(!e)return null;let o=td$1(e.root,n);return o?xd(o,t,{...r,ownerPartName:e.name}):null}function Jp(e,n){return "single"}function Qp(e){let n=bi(e);if(n.length===0)return true;for(let t of n){if(t.kind!=="paragraph")return false;let r=t.children.find(o=>o.kind==="paragraphProperties");if(Object.keys(lt(r)).length>0||!ES(t))return false}return true}function ES(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="paragraphProperties"){if(n.kind==="run"){if(!LS(n))return false;continue}return false}return true}function LS(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="runProperties"&&!(ed$1(n)||fd$1(n)||dd$1(n))){if(n.kind==="text"){if(n.children.map(r=>r.value).join("").trim().length>0)return false;continue}return false}return true}function qo(e,n,t,r,o,a){let i=Jp(),l=qp(e,n);if(l){if(Qp(l))return {kind:n,fragments:[],flowHeight:bd,synthetic:false,ruleStyle:i};let s=xd(l,t,{...r,...e?{ownerPartName:e.name}:{}});if(s&&s.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return s.flowHeight>d+.001?{kind:n,fragments:[],flowHeight:bd,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:n,fragments:s.fragments,flowHeight:s.flowHeight,synthetic:false}}}return {kind:n,fragments:[],flowHeight:bd,synthetic:true,ruleStyle:i}}function eg(e,n){let t=Math.max(1,e*CS);return {x:0,y:Math.max(0,(n-.75)/2),width:t,height:.75}}function Ti(e,n,t,r){if(e.ruleStyle!==void 0||e.synthetic){let o=eg(t,e.flowHeight);return {x:n+o.x,y:r+o.y,width:o.width,height:Math.max(o.height,e.ruleStyle==="double"?2.25:.75)}}return {x:n,y:r,width:t,height:e.flowHeight}}var wd=8,ag=4096,ig=256,lg=14,Rd=12;function Pd(e,n){return n>=e.range.start&&n<e.range.end}function sg(e){let n=[],t=r=>{for(let o of r){if(o.kind==="paragraph"){n.push(o);continue}for(let a of o.rows)if(!a.isHeaderRepeat)for(let i of a.cells)t(i.blocks);}};return t(e),n}function Td(e){let n=new Map;for(let t of e){let r=n.get(t.paragraphId);r?r.push(t):n.set(t.paragraphId,[t]);}return n}function Bi(e,n,t){let r=sg(e.fragments);if(!t)return n.filter(i=>r.some(l=>l.paragraphId===i.paragraphId&&Pd(l,i.atomOffset)));let o=[],a=new Set;for(let i of r){let l=t.get(i.paragraphId);if(l)for(let s of l)a.has(s)||Pd(i,s.atomOffset)&&(a.add(s),o.push(s));}return o}function dg(){let e=new Map;return {get(n,t,r,o,a,i,l){let d=`${n?.name??"none"}\0${o}\0${t}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=qo(n,t,r,i,o,a);return e.set(d,u),u.fallbackReason&&l.push(u.fallbackReason),u}}}function MS(e,n){let t=[];for(let r of e){if(t.length>=Wr)break;t.push({...r,sectionIndex:n.get(r.paragraphId)??0});}return t}function $r(e,n){return e.footnotePropsBySection[n]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function vd(e,n){return e.endnotePropsBySection[n]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function cg(e,n){return {measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,defaultTabStopPt:e.defaultTabStopPt,noteMarks:n,drawingsForPart:e.drawingsForPart}}function NS(e,n){return n===0?e:{...e,box:{...e.box,y:e.box.y+n},...e.shadingBox?{shadingBox:{...e.shadingBox,y:e.shadingBox.y+n}}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:{...e.bottomBorder.box,y:e.bottomBorder.box.y+n}}}:{},...e.borders?{borders:e.borders.map(t=>({...t,box:{...t.box,y:t.box.y+n}}))}:{},...e.marker?{marker:{...e.marker,box:{...e.marker.box,y:e.marker.box.y+n}}}:{},lines:e.lines.map(t=>({...t,box:{...t.box,y:t.box.y+n},spans:t.spans.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}))}}function ng(e,n){return n===0?[...e]:e.map(t=>t.kind==="paragraph"?NS(t,n):{...t,box:{...t.box,y:t.box.y+n}})}function FS(e,n){if(e.lines.length===0)return e.box.y+e.box.height<=n+.001?{head:e,tail:null}:{head:null,tail:e};let t=0;for(;t<e.lines.length;t+=1){let b=e.lines[t];if(b.box.y+b.box.height>n+.001)break}if(t===0)return {head:null,tail:e};if(t>=e.lines.length)return {head:e,tail:null};let r=e.lines.slice(0,t),o=e.lines.slice(t),a=r[r.length-1],i=e.box.y,l=a.box.y+a.box.height,s=e.borders?.filter(b=>b.side!=="bottom"),d={...e,range:{paragraphId:e.paragraphId,start:r[0].range.start,end:a.range.end},spacing:{before:e.spacing.before,after:0},lines:r,box:{...e.box,height:Math.max(0,l-i)},...s&&s.length>0?{borders:s}:{borders:void 0},bottomBorder:void 0,...e.shadingBox?{shadingBox:{...e.shadingBox,height:Math.max(0,l-e.shadingBox.y)}}:{}},c=o[o.length-1],u=o[0].box.y,f=c.box.y+c.box.height,p=e.borders?.filter(b=>b.side!=="top"),g={...e,id:`${e.paragraphId}#f${e.fragmentIndex+1}`,fragmentIndex:e.fragmentIndex+1,range:{paragraphId:e.paragraphId,start:o[0].range.start,end:o[o.length-1].range.end},spacing:{before:0,after:e.spacing.after},lines:o,box:{x:e.box.x,y:u,width:e.box.width,height:Math.max(0,f-u)},marker:void 0,...p&&p.length>0?{borders:p}:{borders:void 0},...e.bottomBorder?{bottomBorder:e.bottomBorder}:{},...e.shadingBox?{shadingBox:{x:e.shadingBox.x,y:u,width:e.shadingBox.width,height:Math.max(0,f-u)}}:{}};return {head:d,tail:g}}function AS(e){let n=0;for(let t of e)n=Math.max(n,t.box.y+t.box.height);return n}function Oi(e,n,t){if(e.flowHeight<=n+.001)return {head:e.fragments,headHeight:e.flowHeight,tail:[],tailHeight:0};if(n<=.001)return {head:[],headHeight:0,tail:e.fragments,tailHeight:e.flowHeight};let r=[],o=0,a=0,i=null;for(let u=0;u<e.fragments.length&&u<Zo;u+=1){let f=e.fragments[u],p=f.box.y+f.box.height;if(p<=n+.001){r.push(f),o=p,a=u+1;continue}if(f.kind==="paragraph"){let g=FS(f,n);if(g.head)r.push(g.head),o=g.head.box.y+g.head.box.height,i=g.tail,a=u+1;else {let b=t?.fullContentHeight??n,y=f.lines[0]?.box.height??f.box.height;if(r.length===0&&n>=b-.001&&y>b+.001){t?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let x=e.fragments.slice(a),P=x[0]?.box.y??0;return {head:[],headHeight:0,tail:ng(x,-P),tailHeight:Math.max(0,e.flowHeight-P)}}a=u,i=null;}break}a=u;break}let l=[...i?[i]:[],...e.fragments.slice(a)];if(l.length===0)return {head:r,headHeight:o,tail:[],tailHeight:0};let s=l[0]?.box.y??0,d=ng(l,-s),c=AS(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}function DS(e,n){let t="FootnoteReference";if(!n)return {...Yn,verticalAlign:"superscript"};let r=pt([],[{localName:"rStyle",attributes:{val:t}}],n);return Ln(r,n.themeFonts)}function _S(e,n,t,r){let o=new Set;for(let c of e.values())c&&c.length>0&&o.add(c);let a=Math.max(n.footnotePropsBySection.length,n.endnotePropsBySection.length,1,...t.map(c=>c.sectionIndex+1),...r.map(c=>c.sectionIndex+1)),i=false;for(let c=0;c<a;c+=1){let u=$r(n,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<Rd;p+=1){let g=dt(u.numFmt,u.numStart+p);g.length>0&&o.add(g);}}let f=vd(n,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<Rd;p+=1){let g=dt(f.numFmt,f.numStart+p);g.length>0&&o.add(g);}}}if(!i||o.size===0)return;let l=DS("footnote",n.styleCascade),s,d=-1;for(let c of o){let u=n.measurer.measure(c,l);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(s?.length??0))&&(s=c,d=u);}return s}function ug(e,n,t){let r=Uo("footnote",e,l=>$r(t,l)),o=Uo("endnote",n,l=>vd(t,l)),a=new Map;for(let l of r)a.set(Vt("footnote",l.noteId),l.mark);for(let l of o)a.set(Vt("endnote",l.noteId),l.mark);let i=_S(a,t,e,n);return {marks:a,...i?{reservedMarkText:i}:{}}}function Ci(e){let n=0;for(let t of e.fragments)n=Math.max(n,t.box.y+t.box.height);return n}function Id(e){let{footnotes:n,endnotes:t,noteStream:r,...o}=e;return o}function zS(e,n){if(n.marks.size===0)return e;let t=false,r=e.pages.map(o=>{let a=fg(o.fragments,n);return a===o.fragments?o:(t=true,{...o,fragments:a})});return t?{revision:e.revision,pages:r}:e}function fg(e,n){let t=false,r=e.map(o=>{if(o.kind==="paragraph"){let l=HS(o,n);return l!==o&&(t=true),l}let a=false,i=o.rows.map(l=>{let s=false,d=l.cells.map(c=>{let u=fg(c.blocks,n);return u===c.blocks?c:(s=true,{...c,blocks:u})});return s?(a=true,{...l,cells:d}):l});return a?(t=true,{...o,rows:i}):o});return t?r:e}function HS(e,n){let t=false,r=e.lines.map(o=>{let a=jS(o,n);return a!==o&&(t=true),a});return t?{...e,lines:r}:e}function jS(e,n){let t=false,r=e.spans.map(o=>{let a=GS(o,n);return a!==o&&(t=true),a});return t?{...e,spans:r}:e}function GS(e,n){if(!e.projected||e.noteNav?.direction!=="to-note")return e;let t=n.marks.get(e.noteNav.scopeId);if(t===void 0)return e;let r=t??"";return e.text===r?e:{...e,text:r}}function WS(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function pg(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function $S(e){for(let n=e.length-1;n>=0;n-=1)if(pg(e[n]))return n;return Math.max(0,e.length-1)}function Bd(e,n,t,r,o,a,i,l){let s=new Map(a),d=n.filter(C=>C.noteKind==="footnote"),c=e.contentBox.width,u=cg(t,r),f=[],p=0,g=ag,b=a.size>0?"continuationSeparator":"separator",h=Math.max(0,e.contentBox.height),y=l?.separatorCache?l.separatorCache.get(t.footnotesPart,b,c,"footnote",h,u,i):(()=>{let C=qo(t.footnotesPart,b,c,u,"footnote",h);return C.fallbackReason&&i.push(C.fallbackReason),C})(),x=Math.max(0,e.contentBox.height-Ci(e)-y.flowHeight),P=Math.max(0,e.contentBox.height-lg-y.flowHeight),T=l?.reserveColumnBudget?P:x,j={fullContentHeight:Math.max(0,e.contentBox.height-y.flowHeight),reasons:i};for(let[C,B]of a){let E=C.match(/^(footnote|endnote):(-?\d+)$/);if(!E||E[1]!=="footnote")continue;let M=Number(E[2]),F=Math.max(0,T-p);if(B.height<=F+.001)f.push({noteKind:"footnote",noteId:M,scopeId:C,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:B.height},fragments:B.fragments}),p+=B.height,s.delete(C);else {let H=Oi({fragments:B.fragments,flowHeight:B.height},F,j);H.head.length>0&&(f.push({noteKind:"footnote",noteId:M,scopeId:C,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:H.headHeight},fragments:H.head}),p+=H.headHeight),H.tail.length>0?s.set(C,{fragments:H.tail,height:H.tailHeight,mark:null}):s.delete(C);}}for(let C of d){if(f.length>=Wr){i.push("note-count-limit");break}let B=Ii(t.footnotesPart,C.noteId,c,u);if(!B){i.push("missing-note-body");continue}let E=r.marks.get(Vt("footnote",C.noteId))??null,M=Math.max(0,T-p);if(g-=B.fragments.length,g<0){i.push("note-area-fragment-limit");break}if(B.flowHeight<=M+.001)f.push({noteKind:"footnote",noteId:C.noteId,scopeId:B.scopeId,mark:C.customMarkFollows?null:E,box:{x:e.contentBox.x,y:0,width:c,height:B.flowHeight},fragments:B.fragments}),p+=B.flowHeight;else {let F=Oi(B,M,j);F.head.length>0&&(f.push({noteKind:"footnote",noteId:C.noteId,scopeId:B.scopeId,mark:C.customMarkFollows?null:E,box:{x:e.contentBox.x,y:0,width:c,height:F.headHeight},fragments:F.head}),p+=F.headHeight),F.tail.length>0&&s.set(B.scopeId,{fragments:F.tail,height:F.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:s};let z=y.flowHeight,L=z+p,k=Ci(e),v;o==="beneathText"?v=e.contentBox.y+k:(v=e.contentBox.y+e.contentBox.height-L,v=Math.max(v,e.contentBox.y+k));let m=v+z,R=f.map(C=>{let B={...C,box:{...C.box,y:m}};return m+=C.box.height,B}),N=Ti(y,e.contentBox.x,c,v);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:v,width:c,height:L},separator:{kind:b,box:N,fragments:y.fragments,synthetic:y.synthetic,...y.ruleStyle!==void 0?{ruleStyle:y.ruleStyle}:{}},notes:R},nextCarry:s}}function gg(e,n,t){return {id:`page-${n}`,index:n,box:e.box,contentBox:e.contentBox,fragments:[],...t?{noteStream:t}:{},...e.header?{header:e.header}:{},...e.footer?{footer:e.footer}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+(n-e.index)}}:{}}}function Od(e,n){let t=new Set;for(let r of sg(e.fragments))t.add(n.get(r.paragraphId)??0);return [...t].sort((r,o)=>r-o)}function mg(e,n,t){for(let r=e.length-1;r>=0;r-=1)if(Od(e[r],t).includes(n))return r;return Math.max(0,e.length-1)}function XS(e,n,t){let r=mg(e,n,t);for(let o=r+1;o<e.length;o+=1){let a=e[o];if(a.noteStream==="footnote-drain"||a.noteStream==="endnote-overflow"||a.fragments.length===0&&(a.footnotes?.notes.length??0)>0)continue;let i=Od(a,t);if(i.length!==0&&!i.includes(n))return o}return e.length}function VS(e){return e.map((n,t)=>n.index===t&&n.id===`page-${t}`?n:{...n,id:`page-${t}`,index:t})}function YS(e){let n=VS(e);return [...Kt({revision:0,pages:n}).pages]}function KS(e,n,t,r,o,a,i,l){let s=new Map(a),d=[];if(n.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};let c=e.contentBox.width,u=cg(t,r),f=l?.separatorKind??"separator",p=M=>M==="footnote"?t.footnotesPart:t.endnotesPart,g=t.endnotesPart??t.footnotesPart,b=Math.max(0,e.contentBox.height),h=l?.separatorCache?l.separatorCache.get(g,f,c,"endnote",b,u,i):(()=>{let M=qo(g,f,c,u,"endnote",b);return M.fallbackReason&&i.push(M.fallbackReason),M})(),y=h.flowHeight,x=Ci(e),P=e.endnotes?Math.max(x,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):x,T=WS(e),_=Math.max(0,T-P-y),z={fullContentHeight:Math.max(0,T-y),reasons:i},L=[],k=0,v=ag;for(let[M,F]of a){let H=M.match(/^(footnote|endnote):(-?\d+)$/);if(!H)continue;let D=H[1],$=Number(H[2]),X=Math.max(0,_-k);if(F.height<=X+.001)L.push({noteKind:D,noteId:$,scopeId:M,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:F.height},fragments:F.fragments}),k+=F.height,s.delete(M);else {let J=Oi({fragments:F.fragments,flowHeight:F.height},X,z);J.head.length>0&&(L.push({noteKind:D,noteId:$,scopeId:M,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:J.headHeight},fragments:J.head}),k+=J.headHeight),J.tail.length>0?s.set(M,{fragments:J.tail,height:J.tailHeight,mark:null}):s.delete(M);}}for(let M=0;M<n.length;M+=1){let F=n[M];if(L.length>=Wr){i.push("note-count-limit"),d.push(...n.slice(M));break}let H=p(F.noteKind),D=Ii(H,F.noteId,c,u);if(!D){i.push("missing-note-body");continue}let $=r.marks.get(Vt(F.noteKind,F.noteId))??null,X=Math.max(0,_-k);if(v-=D.fragments.length,v<0){i.push("note-area-fragment-limit"),d.push(...n.slice(M));break}if(D.flowHeight<=X+.001)L.push({noteKind:F.noteKind,noteId:F.noteId,scopeId:D.scopeId,mark:F.customMarkFollows?null:$,box:{x:e.contentBox.x,y:0,width:c,height:D.flowHeight},fragments:D.fragments}),k+=D.flowHeight;else {let J=Oi(D,X,z);J.head.length>0&&(L.push({noteKind:F.noteKind,noteId:F.noteId,scopeId:D.scopeId,mark:F.customMarkFollows?null:$,box:{x:e.contentBox.x,y:0,width:c,height:J.headHeight},fragments:J.head}),k+=J.headHeight),J.tail.length>0&&s.set(D.scopeId,{fragments:J.tail,height:J.tailHeight,mark:null}),d.push(...n.slice(M+1));break}}if(L.length===0&&a.size===0)return {area:void 0,nextCarry:s,remainingRefs:d};if(L.length===0)return {area:void 0,nextCarry:s,remainingRefs:d};let m=e.contentBox.y+P,R=m+y,N=L.map(M=>{let F={...M,box:{...M.box,y:R}};return R+=M.box.height,F}),I=Ti(h,e.contentBox.x,c,m),C=y+k,B=Math.max(0,T-P),E=Math.min(C,B);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:m,width:c,height:E},separator:{kind:f,box:I,fragments:h.fragments,synthetic:h.synthetic,...h.ruleStyle!==void 0?{ruleStyle:h.ruleStyle}:{}},notes:N},nextCarry:s,remainingRefs:d}}function US(e,n,t,r,o,a,i){let l=e,s=n;for(;s.size>0&&a.remaining>0;){let d=l[l.length-1],c=gg(d,d.index+1,"footnote-drain"),u=Bd(c,[],t,r,"pageBottom",s,o,{separatorCache:i}),f=u.area?.notes.length??0;if(s=u.nextCarry,f===0){o.push("note-overflow-stalled"),u.area&&(l=[...l,{...c,footnotes:u.area}],a.remaining-=1);break}l=[...l,{...c,footnotes:u.area}],a.remaining-=1;}return s.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:l,carry:s}}function ZS(e,n,t,r="endnote-overflow"){let o=gg(t,n,r);return {pages:[...e.slice(0,n),o,...e.slice(n)],pageIndex:n}}function tg(e,n,t){if(t<=n||n>=e.length)return e;let r=Math.min(t,e.length),o=e[n],a=o.pageFieldSource?.pageNumber??n+1,i=o.pageFieldSource?.format,l=r-n,s=[...e];for(let d=n;d<r;d+=1){let c=s[d];s[d]={...c,pageFieldSource:{pageNumber:a+(d-n),sectionPageCount:l,...i?{format:i}:{}}};}return s}function rg(e,n,t,r,o,a,i,l,s){if(t.length===0||e.length===0)return e;let d=[...e],c=[...t],u=new Map,f=n,p=0,g="separator",b=s?.stopBeforeIndex??Number.POSITIVE_INFINITY,h=s?.sectionStartIndex??n,y=s?.stopBeforeIndex!==void 0,x=s?.separatorCache;for(;c.length>0||u.size>0;){if(f>=d.length||f>=b){if(l.remaining<=0){i.push("note-overflow-page-limit");break}let j=d[Math.min(Math.max(f,1),d.length)-1]??d[d.length-1],z=Math.min(f,b,d.length),L=ZS(d,z,j,"endnote-overflow");d=L.pages,f=L.pageIndex,y&&(b=z+1),p+=1,l.remaining-=1;}let P=d[f];if(!pg(P)){f+=1;continue}let T=KS(P,c,r,o,a,u,i,{separatorKind:g,...x?{separatorCache:x}:{}});u=T.nextCarry,c=T.remainingRefs;let _=T.area?.notes.length??0;if(T.area){let j=d[f];d[f]={...j,endnotes:j.endnotes?{...T.area,notes:[...j.endnotes.notes,...T.area.notes],box:{...T.area.box,y:j.endnotes.box.y,height:j.endnotes.box.height+T.area.box.height}}:T.area};}else {if(u.size===0&&c.length===0)break;if(!T.area&&u.size===0&&c.length>0){f+=1,g="separator";continue}}if(_===0&&(u.size>0||c.length>0)&&P.fragments.length===0&&P.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(u.size>0||c.length>0){g="continuationSeparator",f+=1;continue}break}return (c.length>0||u.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),y?d=tg(d,h,Math.min(b,d.length)):p>0&&(d=tg(d,h,d.length)),d}function hg(e,n,t,r){let o=new Map,a=[],i=new Map,l=Td(n),s=dg();for(let c of e.pages){let u=Id(c),p=Bi(u,n,l).filter(T=>T.noteKind==="footnote"),g=p[0]?.sectionIndex??0,b=$r(t,g);if(b.pos==="sectEnd"||b.pos==="docEnd")continue;let h=Math.max(0,u.contentBox.height-lg),{area:y,nextCarry:x}=Bd(u,p,t,r,b.pos,i,a,{reserveColumnBudget:true,separatorCache:s});i=x;let P=Math.min(y?.box.height??0,h);if(P>0){let T=o.get(c.index)??0;o.set(c.index,Math.max(T,P));}}let d=true;for(let c of e.pages){let u=o.get(c.index)??0;if(u<=0)continue;if(Ci(Id(c))+u>c.contentBox.height+.5){d=false;break}}return {reserves:o,stable:d,reasons:a}}function yg(e,n,t,r){let o=[...r?.fallbackReasons??[]],a=r?.paragraphSectionIndex??new Map,i={remaining:ig},l=Td(n),s=dg(),d=[],c=[];for(let x of e.pages)for(let P of Bi(x,n,l)){let T={noteId:P.noteId,sectionIndex:P.sectionIndex,pageIndex:x.index,customMarkFollows:P.customMarkFollows};P.noteKind==="footnote"?d.push(T):c.push(T);}let u=ug(d,c,t),f=new Map,p=new Map,g=[],b=e.pages.map(x=>{let P=Id(x),T=Bi(x,n,l),_=T.filter(v=>v.noteKind==="footnote"),j=T.filter(v=>v.noteKind==="endnote");for(let v of j)if(vd(t,v.sectionIndex).pos==="sectEnd"){let R=p.get(v.sectionIndex)??[];R.push(v),p.set(v.sectionIndex,R);}else g.push(v);for(let v of _){let m=$r(t,v.sectionIndex);if(m.pos==="sectEnd"){let R=p.get(v.sectionIndex)??[];R.push(v),p.set(v.sectionIndex,R);}else m.pos==="docEnd"&&g.push(v);}let z=_[0]?.sectionIndex??0,L=$r(t,z),k;if(L.pos==="pageBottom"||L.pos==="beneathText"){let v=_.filter(R=>{let N=$r(t,R.sectionIndex).pos;return N==="pageBottom"||N==="beneathText"}),m=Bd(P,v,t,u,L.pos,f,o,{separatorCache:s});k=m.area,f=m.nextCarry;}return {...P,...k?{footnotes:k}:{}}}),h=b.length;if(f.size>0){let x=US(b,f,t,u,o,i,s);b=x.pages,f=x.carry;}if(p.size>0&&b.length>0){let x=[...p.keys()].sort((P,T)=>P-T);for(let P of x){let T=p.get(P),_=mg(b,P,a),j=XS(b,P,a),z=_;for(let L=0;L<=_;L+=1)if(Od(b[L],a).includes(P)){z=L;break}b=rg(b,_,T,t,u,"sectEnd",o,i,{stopBeforeIndex:j,sectionStartIndex:z,separatorCache:s});}}return g.length>0&&b.length>0&&(b=rg(b,$S(b),g,t,u,"docEnd",o,i,{separatorCache:s})),b.length!==h&&(b=YS(b)),{layout:zS({revision:e.revision,pages:b},u),fallbackReasons:o,noteMarks:u}}function qS(e){return Sd$1(e).map(n=>({noteKind:n.noteKind,noteId:n.noteId,paragraphId:n.paragraphId,atomOffset:n.atomOffset,customMarkFollows:n.customMarkFollows}))}function JS(e,n){let t=new Map,r=ht(e);for(let o=0;o<n.length;o+=1){let a=n[o];for(let i=a.blockStart;i<a.blockEndExclusive;i+=1){let l=r[i];if(!l)continue;if(l.kind==="paragraph"){t.set(l.id,o);continue}let s=(d,c)=>{if(!(c>32)&&d.kind!=="textValue"){if(d.kind==="paragraph"){t.set(d.id,o);return}for(let u of d.children)s(u,c+1);}};s(l,0);}}return t}function or(e){let n=new Map;for(let[t,r]of e)r>0&&n.set(t,r);return n}function Sd(e,n){let t=or(e),r=or(n);if(t.size!==r.size)return false;for(let[o,a]of t)if((r.get(o)??0)!==a)return false;return true}function og(e,n){let t=or(e);for(let[r,o]of n)o<=0||t.set(r,Math.max(t.get(r)??0,o));return t}function vi(e){return [...or(e)].map(([n,t])=>`${n}=${t}`).sort().join(",")}function bg(e,n,t,r,o){let a=qS(e),i=JS(e,n),l=MS(a,i),s=xg(l,r),d=t.session?.notePageBottomReserves,c=d?or(d):new Map,u=[],f=o({...t,noteMarks:s,pageBottomReserves:c}),p=new Set([vi(c)]);for(let b=0;b<wd;b+=1){let h=hg(f,l,r,s);if(u=[...h.reasons],h.stable&&Sd(h.reserves,c))break;let y=h.stable?or(h.reserves):og(c,h.reserves);if(Sd(y,c)){u.push("note-reflow-exhausted");break}let x=vi(y);if(p.has(x)){y=og(c,h.reserves);let P=vi(y);if(Sd(y,c)||p.has(P)){u.push("note-reflow-exhausted");break}}c=y,p.add(vi(c)),f=o({...t,noteMarks:s,pageBottomReserves:c}),b===wd-1&&u.push("note-reflow-exhausted");}let g=yg(f,l,r,{fallbackReasons:u,paragraphSectionIndex:i});return t.session&&(t.session.previous=g.layout,t.session.notePageBottomReserves=or(c)),g.layout}function xg(e,n){let t=[],r=[];for(let o of e){let a={noteId:o.noteId,sectionIndex:o.sectionIndex,customMarkFollows:o.customMarkFollows};o.noteKind==="footnote"?t.push(a):r.push(a);}return ug(t,r,n)}var Sg=new WeakMap;function wg(e){let n=Sg.get(e);if(n!==void 0)return n;let t=e.kind==="table"?JSON.stringify([e.id,e.tableId,e.fragmentIndex,e.nestingDepth,e.columnEdges,e.box,e.rows]):JSON.stringify([e.id,e.box,e.range,e.props,e.spacing,e.indent,e.bottomBorder,e.borders,e.shading,e.shadingBox,e.marker,e.lines.map(r=>[r.id,r.box,r.contentX,r.baseline,r.spans])]);return Sg.set(e,t),t}function Rg(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];if(r!==o&&wg(r)!==wg(o))return false}return true}function Pg(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(e[t]!==n[t])return false;return true}var QS=4,Ig=256;function e0(e){return `txbx-${e}`}function ki(e,n){let t=e.textboxStory;if(!t)return null;let r=Je(e.extentEmu.cx),o=Je(e.extentEmu.cy),a=Je(t.insetsEmu.left),i=Je(t.insetsEmu.right),l=Je(t.insetsEmu.top),s=Je(t.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-l-s),u=Je(t.strokeWidthEmu),f={fillHex:t.fillHex,strokeHex:t.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((n.depth??0)>=QS)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:l},...f,fallbackReason:"textbox-nesting-limit"};let g=Dp(t.content,n.displayMode),b=e0(e.drawingNodeId),h=0,y=er(g,0,d,0,0,{measurer:n.measurer,cache:n.cache,producer:`${n.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${b}-line-${h++}`,styleCascade:n.styleCascade,...n.pageContext?{pageContext:n.pageContext}:{},...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...n.displayMode?{displayMode:n.displayMode}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},...n.drawingTokenForParagraph?{drawingTokenForParagraph:n.drawingTokenForParagraph}:{}}),x=y.blocks,P=y.bottom,T;if(x.length>Ig){x=x.slice(0,Ig);let z=x[x.length-1];P=z?z.box.y+z.box.height:0,T="textbox-fragment-limit";}if(P>c+.001){let z=x.filter(L=>L.box.y<c-.001);z.length<x.length&&(x=z,T=T??"textbox-height-clip");}let _=Math.max(0,c-P),j=t.verticalAnchor==="center"?_/2:t.verticalAnchor==="bottom"?_:0;return {fragments:x,flowHeight:P,contentOffset:{x:a,y:l+j},...f,...T?{fallbackReason:T}:{}}}var n0=128;function t0(e){return y(wa$1(e))}function r0(e){let n=Math.max(1,Math.floor(e)),t=new Map;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>n;){let a=t.keys().next();if(a.done)break;t.delete(a.value);}},get size(){return t.size}}}function o0(e,n,t,r,o,a,i,l=n0,s,d,c,u,f,p){let g=es(e.root),b=r0(l),h=ht(e),y=t0(e),x,P=T=>{let _=Yt(g)||c?T:void 0,j=_?.pageNumber??p?.pageNumber??1,z=vu(_,g)+(c?`|pn:${j}`:"");if(z===""){if(x)return x}else {let I=b.get(z);if(I)return I}let L=0,k=[],v=()=>{let I=_?.pageNumber??p?.pageNumber??1,C=p?.pageWidth??n,B=p?.pageHeight??Math.max(1,n),E=p?.marginLeft??0,M=p?.marginRight??0,F=p?.marginTop??0,H=p?.marginBottom??0,D=Math.max(1,B-F-H);return Object.freeze({pageNumber:I,pageWidth:C,pageHeight:B,marginLeft:E,marginRight:M,marginTop:F,marginBottom:H,contentWidth:n,contentHeight:D,physicalContentHeight:D,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},m=Object.freeze([]),R;if(c){let I=false;for(let C=0;C<Zt;C+=1){k.splice(0,k.length),L=0,R=er(h,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+z+(d?`|rev:${d}`:""),nextLineId:()=>`hf-${e.name}-line-${L++}`,styleCascade:a,pageContext:_,...s!==void 0?{defaultTabStopPt:s}:{},...d?{displayMode:d}:{},inlineDrawingLayout:c,anchorFrameBase:v,pageContentClip:()=>vo(v()),layoutTextboxStoryFor:E=>ki(E,{measurer:t,producer:r+z+(d?`|rev:${d}`:""),cache:o,styleCascade:a,..._?{pageContext:_}:{},...s!==void 0?{defaultTabStopPt:s}:{},...d?{displayMode:d}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{}}),collectAnchoredDrawings:E=>{k.push(...E);},columnBoxForParagraph:E=>Object.freeze({x:0,y:E.y,width:n,height:E.height}),pageExclusionZones:()=>m,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{}});let B=Is(k,c,0,n);if(B.length===0){I=true,m=B;break}if(C>0&&qn(m)===qn(B)){I=true,m=B;break}m=B;}if(!I)throw new Nr(`header/footer exclusion reflow did not converge within ${Zt} passes`)}else R=er(h,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+z+(d?`|rev:${d}`:""),nextLineId:()=>`hf-${e.name}-line-${L++}`,styleCascade:a,pageContext:_,...s!==void 0?{defaultTabStopPt:s}:{},...d?{displayMode:d}:{}});let N={partName:e.name,contentKey:y,fragments:R.blocks,flowHeight:R.bottom,pageFieldNeeds:g,...k.length>0?{anchoredDrawings:Object.freeze([...k])}:{},withPageContext:I=>!Yt(g)&&!N.anchoredDrawings?.length?x??N:P(I)};return z===""?x=N:b.set(z,N),N};return P(i)}function Cd(e,n,t){let r=t-e.box.y,o=u=>({...u,y:u.y+r}),a=u=>{if(!u)return;let f={...u,box:o(u.box),...u.anchoredDrawings?{anchoredDrawings:u.anchoredDrawings}:{}};if(!u.pageFieldProjector)return f;let p=u.pageFieldProjector;return {...f,pageFieldProjector:g=>{let b=p(g);return {...b,box:o(b.box)}}}},i=u=>{if(u)return {...u,box:o(u.box),...u.separator?{separator:{...u.separator,box:o(u.separator.box)}}:{},notes:u.notes.map(f=>({...f,box:o(f.box)}))}},l=a(e.header),s=a(e.footer),d=i(e.footnotes),c=i(e.endnotes);return {...e,id:`page-${n}`,index:n,box:o(e.box),contentBox:o(e.contentBox),...l?{header:l}:{},...s?{footer:s}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}function Ei(){return {previous:null,checkpoints:[],keys:[],context:"",endLineCounter:0,endCursorY:0,endSpaceAfter:0,endsOpenPage:true,stats:{placed:0,total:0,reusedPages:0,fullPasses:0},balanceLimit:null,multi:null,notePageBottomReserves:null}}function Tg(e,n){return [...e].map(([t,r])=>`${t}=${r.flowHeight}`).sort().join(",")}function Bg(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${Tg(e.headers)};f:${Tg(e.footers)}`:""}function Li(e,n,t){if(e.sectionFurniture)return e.sectionFurniture[n];if(n===t-1)return e.furniture}function a0(e,n){return e.map((t,r)=>{let o=rr(t.properties),a=Li(n,r,e.length),i=t.properties.pageNumbering,l=i?`pn:${i.start??""},${i.fmt??""},${i.chapStyle??""},${i.chapSep??""}`:"pn:",s=t.properties.columns,d=`cols:${s.count},${s.gapTwips},${s.equalWidth===false?0:1},${s.separator?1:0};${(s.definitions??[]).map(c=>`${c.widthTwips}/${c.gapTwips}`).join(",")}`;return [t.blockStart,t.blockEndExclusive,t.properties.breakType,o.width,o.height,o.margin.top,o.margin.right,o.margin.bottom,o.margin.left,o.headerDistance??36,o.footerDistance??36,Bg(a),l,d].join(":")}).join("|")}function i0(e,n,t){if(!e)return null;let r=e.multi;if(r&&r.structureKey===n&&r.sections.length===t)return r;let o={structureKey:n,sections:Array.from({length:t},()=>Ei()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1};return e.multi=o,o}function l0(e){return e!=="continuous"}function s0(e,n){return e.width===n.width&&e.height===n.height}function d0(e,n){if(n.fragments.length===0&&!n.columnSeparators?.length&&!n.anchoredDrawings?.length)return e;let t=e.anchoredDrawings||n.anchoredDrawings?Object.freeze([...e.anchoredDrawings??[],...n.anchoredDrawings??[]]):void 0;return {...e,fragments:n.fragments.length>0?[...e.fragments,...n.fragments]:e.fragments,...(e.columnSeparators?.length||n.columnSeparators?.length)&&{columnSeparators:[...e.columnSeparators??[],...n.columnSeparators??[]]},...t?{anchoredDrawings:t}:{}}}function vg(e,n,t){e.previous=n,e.endLineCounter=t,e.keys=[],e.checkpoints=[],e.context="";}function Og(e,n,t,r,o){let{session:a,...i}=r,l=a0(n,r),s=i0(a,l,n.length),d=[],c=[],u=[],f=0,p=0,g=0,b=0,h=0,y=0,x=0,P=true,T=null,_="",j=1;for(let k=0;k<n.length;k+=1){let v=n[k],m=e.slice(v.blockStart,v.blockEndExclusive),R=rr(v.properties),N=Li(r,k,n.length),I=d.length,C=f,B=s?.spans[k],E=Bg(N);if(m.length===0&&!l0(v.properties.breakType)){u.push({startIndex:I,pageCount:0,sheetY:C,remappedPages:[]});continue}let M=k>0&&v.properties.breakType==="continuous"&&d.length>0&&P&&T!==null&&s0(T,R)&&_===E,F=s?.sections[k],H=v.properties.columns.count>1&&n[k+1]?.properties.breakType==="continuous",D=o(m,t,{...i,geometry:R,furniture:N,sectionColumns:v.properties.columns,...H?{balanceColumns:H}:{},lineCounterStart:p,pageIndexStart:M?I-1:I,...M?{flowStartY:y,spaceBeforeCarry:x}:{},...F?{session:F}:{}});p=D.lineCounter,y=D.endCursorY,x=D.endSpaceAfter,P=D.endsOpenPage,T=R,_=E,F?(g+=F.stats.placed,b+=F.stats.total):(g+=m.length,b+=m.length);let $=F!==void 0&&F.stats.placed===0&&F.stats.reusedPages===D.pages.length&&B!==void 0&&B.pageCount===D.pages.length,X=B!==void 0&&B.startIndex===I&&B.sheetY===C&&B.remappedPages.length===D.pages.length,J=v.properties.pageNumbering,K=J?.start!==void 0?J.start:j,q=J?.fmt,he;if(M){let Ie=d.length-1,ce=d[Ie],Pe=d0(ce,D.pages[0]);if(Pe!==ce){d[Ie]=Pe;let fe=c.lastIndexOf(ce);fe!==-1&&(c[fe]=Pe);}let ve=[];for(let fe of D.pages.slice(1)){let be=Cd(fe,d.length+ve.length,f);ve.push(be),f=be.box.y+be.box.height+24;}let me=ve.length+1;he=Po(ve,K+1,me,q);for(let fe of he)d.push(fe),c.push(fe);j=K+me;}else if($&&X){he=B.remappedPages,h+=he.length;for(let Ie of he)d.push(Ie),c.push(Ie),f=Ie.box.y+Ie.box.height+24;j=K+he.length;}else {let Ie=[];for(let ce of D.pages){let Pe=Cd(ce,d.length+Ie.length,f);Ie.push(Pe),f=Pe.box.y+Pe.box.height+24;}he=Po(Ie,K,Ie.length,q);for(let ce of he)d.push(ce),c.push(ce);j=K+he.length;}u.push({startIndex:I,pageCount:he.length,sheetY:C,remappedPages:he});}if(d.length===0){let k=rr(n[0]?.properties??An),v=o([],t,{...i,geometry:k,sectionColumns:n[0]?.properties.columns??An.columns}),m=Kt({revision:t,pages:v.pages});return s&&(s.spans=[],s.previousRemapped=v.pages,s.previousFinalized=m,s.previousPageCount=m.pages.length),a&&(vg(a,m,p),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),m}let z=Kt({revision:t,pages:d}),L=z;if(s?.previousFinalized&&s.previousPageCount===z.pages.length&&s.previousRemapped.length===c.length){let k=s.previousFinalized.pages,v=s.previousRemapped,m=z.pages.map((R,N)=>c[N]===v[N]&&k[N]?k[N]:R);L={revision:t,pages:m};}return s&&(s.spans=u,s.previousRemapped=c,s.previousFinalized=L,s.previousPageCount=L.pages.length),a&&(vg(a,L,p),a.stats={placed:g,total:b||1,reusedPages:h,fullPasses:a.stats.fullPasses+(g===b&&h===0?1:0)}),L}function Mi(e=6,n=14){let t=r=>r.fontSizePt/11;return {measure:(r,o)=>r.length*e*t(o)*(o.horizontalScalePercent/100)+r.length*o.characterSpacingPt,lineMetrics:r=>{let o=r.verticalAlign==="baseline"?1:.75,a=n*t(r)*o;return {height:a,baseline:a*.8}}}}var c0=2,Cg=new WeakMap,kg=new WeakMap;function Eg(e){let n=[],t=r=>{if(r.kind==="table"){for(let o of r.rows)for(let a of o.cells)for(let i of a.blocks)t(i);return}for(let o of r.lines)for(let a of o.drawings??[])n.push(xi(a.resource));};for(let r of e.anchoredDrawings??[])n.push(xi(r.resource));for(let r of e.fragments)t(r);return n.length===0?"":`!${n.join("!")}`}function u0(e,n,t){let r=t.displayMode??ct,o=Pi(e,r),a=ht(e,r),i=Fg(e),l={...t,producer:`${t.producer??"unversioned-measurer"}|cc:${i}`,tocFieldChromeParagraphIds:t.tocFieldChromeParagraphIds??pd(e),emptyTocPlaceholderParagraphIds:t.emptyTocPlaceholderParagraphIds??gd(e),emptyTocSuppressedResultParagraphIds:t.emptyTocSuppressedResultParagraphIds??md(e)},s=t.drawingSourceOrder;!s&&t.inlineDrawingLayout&&(s=kg.get(t.inlineDrawingLayout),s||(s=(()=>{let f=new Map;return bb$1(e).forEach((p,g)=>{f.set(p.drawingNodeId,g);}),f})(),kg.set(t.inlineDrawingLayout,s)));let d=Us(s?{...l,drawingSourceOrder:s}:l,a),c=f=>{if(o.length>1)return Og(a,o,n,f,Xr);let p=o[0],g=f.geometry??(p?rr(p.properties):lo),b=Li(f,0,o.length)??f.furniture,h=Xr(a,n,{...f,geometry:g,furniture:b,sectionColumns:p?.properties.columns??An.columns}),y=p?.properties.pageNumbering,x=Ag({revision:h.layout.revision,pages:Po(h.pages,y?.start??1,h.pages.length,y?.fmt)},h.layout),P=Kt(x);return f.session&&(f.session.multi=null,f.session.previous=P),P},u=f=>{let p=B0(f,e,i);return t.session&&(t.session.previous=p),p};return t.notes?u(bg(e,o,d,t.notes,c)):u(c(d))}function ar(e,n,t){let r=t.geometry,o=r.width-r.margin.left-r.margin.right,a=yd(t.sectionColumns??An.columns,o);if(t.inlineDrawingLayout&&t.drawingExclusionPass===void 0&&!t.drawingExclusionConverged){let w=V=>t.drawingSourceOrder?.get(V),G=Object.freeze({columnCount:a.count,columnGapPt:a.gaps[0]??0,contentWidth:o,columnLefts:a.lefts,columnWidths:a.widths}),A=new Map,te=null,se=false,le=new Set,oe=t.session?.previous?.pages;if(oe){A=Bo(oe,t.inlineDrawingLayout,o,w,G),te=Xr(e,n,{...t,drawingExclusionPass:0,drawingExclusionZonesByPage:A});let V=Bo(te.pages,t.inlineDrawingLayout,o,w,G);if(Fa(A,V))return te;A=new Map(V),le.add(Aa(V));}for(let V=0;V<Zt;V+=1){te=Xr(e,n,{...t,session:void 0,drawingExclusionPass:V,drawingExclusionZonesByPage:A});let pe=Bo(te.pages,t.inlineDrawingLayout,o,w,G);if(pe.size===0){se=true,A=pe;break}let we=Aa(pe);if(le.has(we)){se=true,A=pe;break}if(le.add(we),V>0&&Fa(A,pe)){se=true,A=pe;break}A=new Map(pe);}if(!se)for(let V=0;V<c0&&!se;V+=1){te=Xr(e,n,{...t,session:void 0,drawingExclusionPass:Zt+V,drawingExclusionZonesByPage:A});let pe=Bo(te.pages,t.inlineDrawingLayout,o,w,G),we=Aa(pe);if(Fa(A,pe)||le.has(we)){se=true,A=pe;break}le.add(we),A=new Map(pe);}if(!se)throw new Nr(`wrap exclusion reflow did not converge within ${Zt} passes`);return Xr(e,n,{...t,drawingExclusionConverged:true,drawingExclusionZonesByPage:A})}let i=t.measurer,l=t.cache,s=t.styleCascade,d=t.listItems,c=t.defaultTabStopPt,u=t.displayMode??ct,f=t.tocFieldChromeParagraphIds,p=t.emptyTocPlaceholderParagraphIds,g=t.emptyTocSuppressedResultParagraphIds,b=(t.producer??"unversioned-measurer")+(s?`|sc:${s.cacheToken}`:"")+(d&&d.size>0?`|num:${d.size}`:"")+(c!==void 0?`|dts:${c}`:"")+(u===ct?"":`|rev:${u}`),h=a.widths[0],y=t.furniture,x=r.headerDistance??36,P=r.footerDistance??36,T=w=>{let G=0;for(let A of w?.values()??[])G=Math.max(G,A.flowHeight);return G},_=r.height*.4,j=Math.min(_,Math.max(r.margin.top,y?x+T(y.headers):0)),z=Math.min(_,Math.max(r.margin.bottom,y?P+T(y.footers):0)),L=r.height-j-z,k=r.height-r.margin.top-r.margin.bottom,v=t.pageBottomReserves,m$1=t.session,R=t.lineCounterStart??0,N=y?`|hf:${x},${P},${y.titlePage?1:0}${y.evenAndOddHeaders?1:0};`+[...y.headers].map(([w,G])=>`h${w}=${G.flowHeight}@${G.contentKey}${Eg(G)}`).sort().join(",")+";"+[...y.footers].map(([w,G])=>`f${w}=${G.flowHeight}@${G.contentKey}${Eg(G)}`).sort().join(","):"",I=t.flowStartY??0,C=t.spaceBeforeCarry??0,B=t.pageIndexStart??0,E=v?`|nr:${[...v].map(([w,G])=>`${w}=${G}`).join(",")}`:"",M=t.noteMarks?`|nm:${t.noteMarks.reservedMarkText??""}:${t.noteMarks.marks.size}`:"",F=t.columnRegionBottom,H=`|cols:${a.widths.join(",")};${a.gaps.join(",")};${a.separator?1:0}${F!==void 0?`;bal:${F}`:""}`,D=`${b}|${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|lc:${R}|fs:${I},${C}|pi:${B}${N}${E}${M}${H}`,$=[],X=()=>{let w=Math.max(1,L-(v?.get($.length)??0));return F!==void 0&&$.length===0?Math.max(1,Math.min(w,F)):w},J=(w,G)=>{let A=w.kind==="paragraph"?t.drawingTokenForParagraph?.(w)??t.drawingLayoutToken??"":w.kind==="table"&&t.drawingTokenForParagraph?Hp(w,t.drawingTokenForParagraph):"",te=Cg.get(w);if(te&&te.contentWidth===G&&te.producer===b&&te.drawingToken===A)return te.entry;let se;if(w.kind==="table")se={kind:"table",table:w,key:Ut({paragraph:w,properties:[],width:G,producer:b,...A?{drawingToken:A}:{}})};else {let le=d?.get(w.id),oe=No(w,G,s,le),{props:V,indent:pe,available:we,alignment:Re,spacing:Oe,lineSpacing:Ee,contextualSpacing:Ce,styleId:qe,shading:re,inheritedRunProperties:Fe,markRunProperties:Le}=oe,Ae=mf(w.children.find(dn=>dn.kind==="paragraphProperties"),s),et=Dl(Ae),We=mo(oe.tabStops,c),Mt=We===oe.tabStops?oe.tabStopsCacheToken:$t(We);se={kind:"paragraph",paragraph:w,props:V,indent:pe,available:we,alignment:Re,spacing:Oe,lineSpacing:Ee,contextualSpacing:Ce,styleId:qe,borders:Ae,borderGroupKey:et===""?"":`${et}@${pe.left},${pe.left+we}`,shading:re,inheritedRunProperties:Fe,markRunProperties:Le,tabStops:We,keeps:hf(V),...le?{listItem:le}:{},key:Ut({paragraph:w,properties:[...V,...Fe,...Le,{localName:"tabStops",attributes:{token:Mt}},...le?[{localName:"list",attributes:{token:le.cacheToken}}]:[]],width:we,producer:b,...A?{drawingToken:A}:{}})};}return Cg.set(w,{contentWidth:G,producer:b,drawingToken:A,entry:se}),se},K=e.map(w=>J(w,h)),q=K.map(w=>w.key),he=Ep(K,h,s,u),Ie=K.map(w=>w.kind==="paragraph"&&w.keeps.keepNext),ce=xf(q,w=>Ie[w]),Pe=m$1?.previous??null,ve=Pe!==null&&m$1!==void 0&&m$1.context===D,me=a.count===1&&ve,fe=0;if(ve){let w=Math.min(ce.length,m$1.keys.length);for(;fe<w&&ce[fe]===m$1.keys[fe];)fe+=1;}let be=0;if(me){let w=Math.min(ce.length,m$1.keys.length)-fe;for(;be<w&&ce[ce.length-1-be]===m$1.keys[m$1.keys.length-1-be];)be+=1;}if(ve&&fe===K.length&&K.length===m$1.keys.length){let w=Ag({revision:n,pages:Pe.pages},Pe);return m$1.previous=w,m$1.stats={placed:0,total:K.length,reusedPages:Pe.pages.length,fullPasses:m$1.stats.fullPasses},l?.retain(new Set(q)),{layout:w,pages:w.pages,lineCounter:m$1.endLineCounter,endCursorY:m$1.endCursorY,endSpaceAfter:m$1.endSpaceAfter,endsOpenPage:m$1.endsOpenPage}}let Te=[],He=0,an=0,rn=()=>a.lefts[He],Me=()=>a.widths[He],Jn=()=>({text:{left:rn(),width:Me()},margin:{left:0,width:o},page:{left:-r.margin.left,width:r.width}}),Qn=()=>Te.length>an,xe=[],on=[],In=new Map,U=I,Dn=I,ee=0,ne=R,O=C,S=[],W=0,Z=0,ie=0,ue=I===0;if(me&&fe>0&&fe<m$1.checkpoints.length){let w=m$1.checkpoints[fe];$.push(...Pe.pages.slice(0,w.pageCount)),Te=[...w.pageFragments],xe=[...w.pendingAnchoredDrawings],U=w.cursorY,ee=w.flowColumnIndex,He=w.flowColumnIndex,ne=w.lineCounter,O=w.previousSpaceAfter,W=fe,ue=false,ie=$.length,S.push(...m$1.checkpoints.slice(0,fe));}let Be=w=>({x:0,y:w*(r.height+24),width:r.width,height:r.height}),ye=w=>y?.titlePage&&w===0?"first":y?.evenAndOddHeaders&&(B+w+1)%2===0?"even":"default",Ze=(w,G,A)=>{if(!y)return;let te=ye(G),se=(w==="header"?y.headers:y.footers).get(te);if(!se)return;let le=Ee=>{let Ce=w==="header"?A.y+x:A.y+r.height-P-Ee.flowHeight;return {kind:w,variant:te,partName:Ee.partName,...Ee.rId?{rId:Ee.rId}:{},box:{x:A.x+r.margin.left,y:Ce,width:o,height:Ee.flowHeight},fragments:Ee.fragments,...Ee.anchoredDrawings?{anchoredDrawings:Ee.anchoredDrawings}:{}}},oe=B+G+1,V={pageNumber:oe,pageCount:Math.max(oe,$.length+1),sectionPageCount:G+1},pe=se.pageFieldNeeds,Re=Yt(pe)||(se.anchoredDrawings?.length??0)>0?se.withPageContext(V):se,Oe=le(Re);return Yt(pe)?{...Oe,pageFieldProjector:Ee=>le(se.withPageContext(Ee))}:Oe},_e=a.count,Qe=rn,en=w=>Object.freeze({x:a.lefts[ee]??0,y:w.y,width:a.widths[ee]??h,height:w.height}),Se=()=>Object.freeze({pageNumber:B+$.length+1,pageWidth:r.width,pageHeight:r.height,marginLeft:r.margin.left,marginRight:r.margin.right,marginTop:r.margin.top,marginBottom:r.margin.bottom,contentWidth:h,contentHeight:X(),physicalContentHeight:k,ownerPartName:t.inlineDrawingLayout?.ownerPartName??m,storyKind:"body"}),Tn=()=>vo(Se()),ln=w=>t.drawingSourceOrder?.get(w),Ye=w=>{if(w.length===0)return;for(let A of w)xe.some(te=>te.drawingNodeId===A.drawingNodeId)||xe.push(A.sourceOrder===void 0&&ln(A.drawingNodeId)!==void 0?Object.freeze({...A,sourceOrder:ln(A.drawingNodeId)}):A);if(!t.inlineDrawingLayout)return;let G=ef(xe,{pageBottom:X()});if(xe.splice(0,xe.length,...G.drawings),G.deferred.length>0)for(let A of G.deferred){let te=(In.get(A.drawingNodeId)??0)+1;In.set(A.drawingNodeId,te),te>=bs?xe.push(Ps(A,"page-defer-exhausted")):on.push(A);}},Ge=()=>{if(on.length===0)return;let w=on.map(G=>ws(G,U-G.y));on=[],Ye(w);},nn=()=>{let w=$.length,G=Be(w),A=Ze("header",w,G),te=Ze("footer",w,G),se=Te.reduce((le,oe)=>Math.max(le,oe.box.y+oe.box.height),Dn);$.push({id:`page-${w}`,index:w,box:G,contentBox:{x:G.x+r.margin.left,y:G.y+j,width:o,height:L},fragments:Te,...a.separator?{columnSeparators:a.gaps.map((le,oe)=>({x:a.lefts[oe]+a.widths[oe]+le/2-.375,y:Dn,width:.75,height:Math.max(0,se-Dn)}))}:{},...xe.length>0?{anchoredDrawings:Qu(xe)}:{},...A?{header:A}:{},...te?{footer:te}:{}}),Te=[],xe=[],U=0,He=0,ee=0,Dn=0,an=0;},Et=(w,G)=>{if(w.kind!=="paragraph"||w.listItem!==void 0||w.shading!==void 0)return false;let{top:A,bottom:te,left:se,right:le,between:oe}=w.borders;if(A??te??se??le??oe)return false;let V=t.inlineDrawingLayout;return V&&Rn(w.paragraph,V).length>0?false:G.every(pe=>pe.drawings.length===0&&!pe.pageBreakAfter&&!pe.columnBreakAfter&&pe.spans.every(we=>we.text.length===0))},_n=()=>{if(He+1<a.count){He+=1,ee=He,U=Dn,O=0,an=Te.length;return}nn(),Ge();},Hi=w=>ki(w,{measurer:i,producer:b,cache:l,styleCascade:s,...c!==void 0?{defaultTabStopPt:c}:{},...u?{displayMode:u}:{},inlineDrawingLayout:t.inlineDrawingLayout,drawingTokenForParagraph:t.drawingTokenForParagraph}),yt={measurer:i,cache:l,producer:b,nextLineId:()=>`line-${ne++}`,styleCascade:s,listItems:d,...c!==void 0?{defaultTabStopPt:c}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:t.drawingLayoutToken?{drawingLayoutToken:t.drawingLayoutToken}:{},...t.inlineDrawingLayout?{anchorFrameBase:Se,pageContentClip:Tn,layoutTextboxStoryFor:Hi,publishAnchoredDrawings:Ye,collectAnchoredDrawings:Ye,columnBoxForParagraph:en,pageExclusionZones:()=>t.drawingExclusionZonesByPage?.get($.length)??Object.freeze([]),paragraphOrderIndex:w=>he.get(w),onAnchorShift:(w,G)=>ms(xe,w,G),onAnchorRepublish:(w,G)=>{for(let A=xe.length-1;A>=0;A-=1)xe[A].anchorParagraphId===w&&xe.splice(A,1);xe.push(...G);}}:{},borderOwnershipBudget:Va(),vMergeResolveBudget:rd(),displayMode:u},ji=w=>li(d?.get(w.paragraph.id)??w.listItem,w.indent,i,w.tabStops,w.available),Gi=(w,G,A=0)=>{let te=w.paragraph.id,le=!(p?.has(te)??false)&&((f?.has(te)??false)||(g?.has(te)??false)),oe=w.available,V=Qe(),we=(t.drawingExclusionZonesByPage?.get($.length)??Object.freeze([])).filter(qe=>{let re=he.get(w.paragraph.id),Fe=he.get(qe.anchorParagraphId);if(re!==void 0&&Fe!==void 0){if(Fe>re)return false}else {let Le=K.findIndex(Ae=>Ae.kind==="paragraph"&&Ae.paragraph.id===qe.anchorParagraphId);if(Le<0||Le>G)return false}return !(_e>1&&qe.columnIndex!==ee)}),Re=qn(we),Oe=t.drawingTokenForParagraph?.(w.paragraph)??t.drawingLayoutToken??(t.inlineDrawingLayout?"drawing":void 0),Ee=l&&!le?Re||Oe?Ut({paragraph:w.paragraph,properties:w.props,width:oe,producer:b,...Oe?{drawingToken:Oe}:{},...Re?{exclusionToken:`${ee}|${U.toFixed(3)}|${Re}`}:{},...A>0?{startOffset:A}:{}}):A===0?w.key:`${w.key}|from:${A}`:null,Ce=_e>1;return ja(w.paragraph,te,w.indent.left,oe,i,l,Ee,w.inheritedRunProperties,w.tabStops,void 0,s?(qe,re)=>pt(qe,re,s):void 0,{lineSpacing:w.lineSpacing,firstLineOffset:A===0?ji(w):0,startOffset:A,marginExtent:{left:0,right:w.indent.left+oe+w.indent.right},...t.projectLink?{projectLink:t.projectLink}:{},displayMode:u,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},contentLeft:Ce?V:0,contentRight:Ce?V+Me():w.indent.left+oe+w.indent.right,paragraphStartY:U,...we.length>0?{pageExclusionZones:we}:{},...le?{suppressEmptyPlaceholderLine:true}:{},...s?{themeFonts:s.themeFonts}:{},markRunProperties:w.markRunProperties})},Md=(w,G)=>(t.drawingExclusionZonesByPage?.get($.length)??Object.freeze([])).filter(te=>{let se=he.get(w.paragraph.id),le=he.get(te.anchorParagraphId);if(se!==void 0&&le!==void 0){if(le>se)return false}else {let oe=K.findIndex(V=>V.kind==="paragraph"&&V.paragraph.id===te.anchorParagraphId);if(oe<0||oe>G)return false}return !(_e>1&&te.columnIndex!==ee||te.anchorParagraphId===w.paragraph.id&&te.input.mode==="topAndBottom")}),Nd=(w,G,A,te,se,le,oe)=>{let V=Md(w,G);if(!t.inlineDrawingLayout||te<=se)return V;let pe=Mn(w.paragraph),we=new Map,Re=0;for(let re=se;re<te;re+=1){let Fe=A[re];for(let Ae of pe.values())Ae>=Fe.start&&Ae<Fe.end&&we.set(Ae,Re);let Le=oe.get(re)??A[re].exclusionSkipBefore??0;Re+=Le+A[re].height;}if(we.size===0)return V;let Oe=_e>1,Ee=w.available,Ce=Qe(),qe=Na({paragraph:w.paragraph,paragraphId:w.paragraph.id,drawingLayout:t.inlineDrawingLayout,contentLeft:Oe?Ce:0,contentRight:Oe?Ce+Me():w.indent.left+Ee+w.indent.right,paragraphStartY:le,anchorLineTopByModelStart:we,columnIndex:ee});return Object.freeze([...V,...qe])},lm=(w,G,A,te,se,le,oe,V)=>{if(t.inlineDrawingLayout){let Oe=[...Mn(w.paragraph).values()];if(Oe.length>0){let Ee=Math.min(...Oe);if(oe.end<=Ee||Oe.some(Ce=>Ce>=oe.start&&Ce<oe.end)&&oe.end<=Ee+1)return 0}}let pe=Nd(w,G,A,te,se,le,V),we=pe.length>0?ft(U,oe.height,pe):0,Re=oe.exclusionSkipBefore??0;return we>.001?we:Re},sm=w=>{let G=Me(),A=Hr(w,G,0,s,u);if(!A||A.rows.length===0)return;let te=A.columnWidthsPt.reduce((re,Fe)=>re+Fe,0),se=()=>A.float?Jf(A.float,te,Jn()):rn()+jo(A,Me()),le=se();A.float&&A.float.vertAnchor==="text"&&!A.float.ySpec&&(U=Math.max(0,Math.min(U+A.float.yPt,X())));let oe=[];for(let re of A.rows)if(re.isHeader)oe.push(re);else break;let V=0,pe=U,we=[],Re=new Map,Oe=[],Ee=()=>{if(we.length===0)return;let re=dd(we,A,Oe,yt.borderOwnershipBudget,yt.vMergeResolveBudget,void 0,(Le,Ae)=>{ms(xe,Le,Ae);},yt),Fe=re[re.length-1];Te.push(mi({kind:"table",id:`${w.id}#f${V}`,tableId:w.id,fragmentIndex:V,rows:re,box:{x:le,y:pe,width:A.columnWidthsPt.reduce((Le,Ae)=>Le+Ae,0),height:Fe.box.y+Fe.box.height-pe}},A.columnWidthsPt,0,Re)),V+=1,we=[],Oe=[];},Ce=re=>{if(oe.length===0)return;let Fe=0;for(let Le of oe)Fe+=sd(Le,A.columnWidthsPt,le,0,yt,A.cellSpacingPt);if(Fe>X()+.001)throw new Pn("table-row-overheight",`Table header group (${oe.length} row(s)) is taller than the page content box`);U+Fe>X()+.001&&U>0&&(Ee(),_n(),le=se(),pe=U);for(let Le of oe){let Ae=Ko(Le,A.columnWidthsPt,le,U,re,0,yt,A.cellSpacingPt);if(Ae.bottom>X()+.001)throw new Pn("table-row-overheight",`Table header row ${Le.id} overflowed the page content box`);we.push(Ae.record),Oe.push(Le),U=Ae.bottom;}},qe=re=>{Ee(),_n(),le=se(),pe=U,Ce(true);};Ce(false);for(let re of A.rows.slice(oe.length)){let Fe=sd(re,A.columnWidthsPt,le,0,yt,A.cellSpacingPt),Le=ad(re),Ae=false,et=0,We=false;for(Fe<=X()+.001&&U+Fe>X()+.001&&U>0&&(qe(),We=true);;){if(et+=1,et>yi)throw new Pn("table-row-fragment-limit",`Table row ${re.id} exceeded ${yi} page fragments`);let Mt=X()-U;if(Mt<=.001&&U>0){if(We)throw new Pn("table-row-overheight",`Table row ${re.id} cannot fit after repeated header rows`);qe(),We=true;continue}if(!Ae&&Fe<=Mt+.001){let nt=Ko(re,A.columnWidthsPt,le,U,false,0,yt,A.cellSpacingPt);if(nt.bottom>X()+.001)throw new Pn("table-row-overheight",`Table row ${re.id} overflowed the page content box after placement`);we.push(nt.record),Oe.push(re),U=nt.bottom;break}if(re.cantSplit||re.height.rule==="exact"){if(U>0&&!We){qe(),We=true;continue}throw new Pn("table-row-overheight",re.height.rule==="exact"?`Table row ${re.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${re.id} has w:cantSplit and is taller than the available page content`)}let dn=ld(re,A.columnWidthsPt,le,U,X(),false,Ae,0,yt,Le,A.cellSpacingPt);if(!dn.fitted&&U>0&&!We){qe(),We=true;continue}if(!dn.fitted)throw new Pn(dn.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",dn.nestedSplitBlocked?`Table row ${re.id} contains a nested table taller than the page content box`:`Table row ${re.id} has content that cannot fit a page content box`);if(dn.bottom>X()+.001)throw new Pn("table-row-overheight",`Table row ${re.id} overflowed the page content box`);let Vr=dn.remainder!==null,sr=Ap(re,Ae,Vr);if(we.push(dn.record),Oe.push(sr),U=dn.bottom,!Vr)break;Le=dn.remainder,Ae=true,We=false,qe();}}Ee();},Lt=false,Wi=K.length;for(let w=W;w<K.length;w+=1){let G=J(e[w],Me());if(S[w]={pageCount:$.length,pageFragments:[...Te],pendingAnchoredDrawings:[...xe],cursorY:U,lineCounter:ne,previousSpaceAfter:O,flowColumnIndex:ee},me&&be>0&&w>=K.length-be){let Q=m$1.checkpoints[w+(m$1.keys.length-K.length)];if(Q&&Q.cursorY===U&&Q.lineCounter===ne&&Q.previousSpaceAfter===O&&Q.flowColumnIndex===ee&&Q.pageCount===$.length&&Rg(Q.pageFragments,Te)&&Pg(Q.pendingAnchoredDrawings,xe)){let ae=Pe.pages.slice(Q.pageCount);$.push(...ae),ie+=ae.length,Lt=true,Wi=w,ne=m$1.endLineCounter;break}}if(Z+=1,G.kind==="table"){O=0,sm(G.table);continue}let{paragraph:A,props:te,spacing:se,contextualSpacing:le,styleId:oe,borders:V,shading:pe,keeps:we}=G,{indent:Re,alignment:Oe,markRunProperties:Ee}=G,Ce=G.available,qe=w>0?K[w-1]:void 0,re=K[w+1],Fe=Q=>Q?.kind==="paragraph"&&Q.styleId===oe&&oe!==null,Le=le?{before:Fe(qe)?0:se.before,after:Fe(re)?0:se.after}:se,Ae=d?.get(A.id)??G.listItem,et=ji(G),We=A.id,Mt=G.borderGroupKey,dn=Q=>Mt!==""&&Q?.kind==="paragraph"&&Q.borderGroupKey===Mt,Vr=dn(qe),sr=dn(re),nt=Vr?void 0:V.top,dr=sr?V.between:V.bottom,Nt=Rt(nt),jd=Rt(dr);Ll(te)&&(Te.length>0||$.length===0)&&(nn(),O=0);let Ke=Gi(G,w);if(Ke.length===0)continue;let cm=Ri(A)!==void 0&&Et(G,Ke),Gd=()=>cm&&F===void 0&&He+1>=a.count,$i=Q=>{let ae=J(A,Me());ae.kind==="paragraph"&&(Re=ae.indent,Oe=ae.alignment,Ce=ae.available,Ee=ae.markRunProperties,et=Q===0?ji(ae):0,Ke=[...Gi(ae,w,Q)]);};{let Q=Ir(Le.before,O),ae=Ee.length===0?Yn:Ln(Ee,s?.themeFonts),sn=Ke.length<=1?jd+Le.after:0,zn=U+Q+Nt,mn=Nd(G,w,Ke,0,0,zn,new Map),Dt=Ke[0]?lf(zn,Ke[0],mn,sn):i.lineMetrics(ae).height+sn,xt=Q+Nt+Dt;if(we.keepNext&&!Ie[w-1]){let Ue=bf(K,w,O,tt=>{let Hn=K[tt];return Hn?.kind==="paragraph"?Gi(Hn,tt).map(vn=>vn.height):[]});Ue!==null&&Ue+Nt<=X()&&(xt=Math.max(xt,Ue+Nt));}U+xt>X()&&U>0&&!Gd()&&(_n(),O=0,$i(0));}let um=U===0&&!Qn(),Xi=_l(Le.before,O,um,ue);Xi>0&&(U+=Xi),Nt>0&&(U+=Nt),ue=false;let Ft=0,Ne=[],Wd=Ke[0]?.start??0,cr=Xi,At=Nt,Vi=false,Yr=U,$d=0,ta=new Map;O=0;let Xd=t.inlineDrawingLayout!==void 0&&Rn(G.paragraph,t.inlineDrawingLayout).length>0,Vd=false,Yi=null,Yd=as(G.paragraph),fm=()=>{let Q=Ne[0];if(!Q)return 0;let ae=$d;if(ae<=.001)return 0;let sn=ft(Yr,Q.box.height,Md(G,w));return Math.max(0,ae-sn)},ra=Q=>{if(Ne.length===0)return;let ae=rn(),sn=Qe(),zn=Ne[0].box.y,mn=zn-cr-At,Dt=Ne[Ne.length-1].box.y+Ne[Ne.length-1].box.height,xt=Q?Le.after:0,Ue=[],tt,Hn=zn,vn=Dt,St=V.left?un(V.left):0,Ur=V.right?un(V.right):0,ur=V.left?ae+Re.left-V.left.spacePt-St:ae+Re.left,Ui=V.right?ae+Re.left+Ce+V.right.spacePt+Ur:ae+Re.left+Ce,fr=Math.max(Ui-ur,0);if(At>0&&nt){let hn=un(nt),yn=zn-nt.spacePt-hn;Ue.push({side:"top",edge:nt,box:{x:ur,y:yn,width:fr,height:hn}}),Hn=yn;}if(Q&&dr){let hn=un(dr),yn=Dt+dr.spacePt,ot={x:ur,y:yn,width:fr,height:hn};Ue.push({side:sr?"between":"bottom",edge:dr,box:ot}),sr||(tt={edge:dr,box:ot}),vn=yn+hn;}Q&&(U=Math.max(U,vn+xt));let pr=Math.max(vn+xt-mn,0),ke=Vr&&Ft===0?mn:Hn,rt=sr&&Q?mn+pr:vn,gr=Math.max(rt-ke,0);if(V.left&&Ue.push({side:"left",edge:V.left,box:{x:ae+Re.left-V.left.spacePt-St,y:ke,width:St,height:gr}}),V.right&&Ue.push({side:"right",edge:V.right,box:{x:ae+Re.left+Ce+V.right.spacePt,y:ke,width:Ur,height:gr}}),V.bar){let hn=un(V.bar);Ue.push({side:"bar",edge:V.bar,box:{x:ae+Re.left-V.bar.spacePt-hn,y:zn,width:hn,height:Math.max(Dt-zn,0)}});}let mr=Ft===0?si(Ae,i,Ne[0]?{y:Ne[0].box.y,height:Ne[0].box.height}:void 0):void 0,oa=mr?{...mr,box:{...mr.box,x:mr.box.x+ae}}:void 0;if(Te.push({kind:"paragraph",id:`${We}#f${Ft}`,paragraphId:We,fragmentIndex:Ft,range:{paragraphId:We,start:Wd,end:Ne[Ne.length-1].range.end},props:te,spacing:{before:cr,after:xt},indent:Re,...tt?{bottomBorder:tt}:{},...Ue.length>0?{borders:Ue}:{},...pe===void 0?{}:{shading:pe,shadingBox:V.left||V.right?{x:ur,y:Hn,width:fr,height:Math.max(vn-Hn,0)}:po(Ne,ae+Re.left,Ce)},...oa?{marker:oa}:{},...Q&&Yd?{markRevision:Yd}:{},lines:Ne,box:{x:sn+Re.left,y:mn,width:Ce,height:pr}}),t.inlineDrawingLayout&&Xd&&!Vd){Vd=true;let hn=[...Mn(G.paragraph).values()],yn=hn.length>0&&hn.every(bn=>Ne.some(_t=>bn>=_t.range.start&&bn<_t.range.end)),ot,hr,Zi;if(yn){let bn=mn-fm();ot=Ne,hr={x:sn+Re.left,y:bn,width:Ce,height:pr},Zi=en({x:sn+Re.left,y:bn,height:pr});}else {let bn=Yi??{columnX:sn,columnWidth:Me(),startY:mn},_t=bn.startY;ot=Ke.map((Bn,pm)=>{let gm={id:`anchor-line-${pm}`,range:{paragraphId:We,start:Bn.start,end:Bn.end},box:{x:bn.columnX+Re.left,y:_t,width:Ce,height:Bn.height},contentX:Bn.spans.length>0?Bn.spans[0].box.x+bn.columnX:bn.columnX+Re.left,baseline:Bn.baseline,leading:Bn.leading,trailingSpacing:Bn.trailingSpacing,spans:Bn.spans.map(qi=>({...qi,box:{...qi.box,x:qi.box.x+bn.columnX,y:_t}}))};return _t+=Bn.height+(Bn.exclusionSkipBefore??0),gm});let Kd=bn.startY;hr={x:bn.columnX+Re.left,y:Kd,width:Ce,height:Math.max(_t-Kd,Ne[0]?.box.height??0)},Zi=en(hr);}Ye(Mr({paragraph:G.paragraph,paragraphId:We,paragraphBox:hr,lines:ot,drawingLayout:t.inlineDrawingLayout,frameBase:Se(),columnBox:Zi,cellBox:null,pageClip:Tn(),measurer:i,sourceOrderOf:ln,layoutTextboxStory:Hi}));}Ft+=1,Wd=Ne[Ne.length-1].range.end,Ne=[],cr=0,At=0;},bt=0,Ki=0,Kr=Ke.length+8;for(let Q=0;Q<Ke.length;Q+=1){let ae=Ke[Q],sn=Q===Ke.length-1,zn=sn?jd+Le.after:0;Q===bt&&(Yr=U,Xd&&Yi===null&&Ft===0&&(Yi=Object.freeze({columnX:Qe(),columnWidth:Me(),startY:Yr})));let mn=lm(G,w,Ke,Q,bt,Yr,ae,ta),Dt=mn+Math.max(0,ae.height-ae.trailingSpacing)+zn;if(U+Dt>X()&&!Gd()&&(Ne.length>0||Te.length>0||$.length>0)){let ke=!Qn(),rt=Ki<Kr?yf(Q,bt,Ke.length,we,ke):Q,gr=rt<Q;for(let yn=Q;yn>rt;yn-=1){Ne.pop();let ot=Ke[yn-1],hr=ta.get(yn-1)??ot.exclusionSkipBefore??0;ta.delete(yn-1),U-=ot.height+hr,ne-=1;}let mr=gr&&Ne.length===0&&Ft===0,oa=Ke[rt].start,hn=Me();if(ra(false),_n(),cr=0,mr?U=At:At=0,Me()!==hn){$i(oa),Kr=Math.max(Kr,Ke.length+8),bt=0,gr&&(Ki+=1),Q=-1;continue}if(bt=rt,Yr=U,gr){Ki+=1,Q=rt-1;continue}}let Ue=Qe();ta.set(Q,mn),U+=mn;let tt=Ue+Re.left+(Q===0?et:0),Hn=Math.max(1,Ce-(Q===0?et:0)),vn=ae.spans.map(ke=>({...ke,range:{...ke.range,paragraphId:We},box:{...ke.box,x:ke.box.x+Ue,y:U}})),St=za(vn,i,tt,Hn,Oe,sn,Oe==="center"||Oe==="right"?ae.width:void 0),Ur=vn.length>0&&St.length>0?St[0].box.x-vn[0].box.x:Oe!=="left"&&Oe!=="both"?(()=>{let ke=Hn-ae.width;return ke<=0?0:Oe==="center"?ke/2:ke})():0,ur=Object.freeze({x:0,y:0,width:h,height:X()}),Ui=ae.drawings.map(ke=>{let rt=Object.freeze({...ke,paragraphId:We,x:Ue+ke.x,y:U+ke.y,advanceStart:ke.advanceStart+Ue,advanceEnd:ke.advanceEnd+Ue,paintBounds:Object.freeze({...ke.paintBounds,x:Ue+ke.paintBounds.x,y:U+ke.paintBounds.y}),hitBounds:Object.freeze({...ke.hitBounds,x:Ue+ke.hitBounds.x,y:U+ke.hitBounds.y})});return Ma(rt,ur)}),fr=Ha(Ui,Ur),pr={id:`line-${ne}`,range:{paragraphId:We,start:ae.start,end:ae.end},spans:St,box:{x:Qe()+Re.left,y:U,width:Ce,height:ae.height},contentX:St[0]?.box.x??tt+Ur,baseline:ae.baseline,leading:ae.leading,trailingSpacing:ae.trailingSpacing,...ae.deletedRanges?{deletedRanges:ae.deletedRanges}:{},...fr.length>0?{drawings:fr}:{}};if(ne+=1,Ne.length===0&&($d=mn),Ne.push(pr),U+=ae.height,ae.columnBreakAfter){let ke=Me();if(ra(sn),_n(),cr=0,At=0,Vi=true,!sn&&Me()!==ke){$i(ae.end),Kr=Math.max(Kr,Ke.length+8),bt=0,Q=-1;continue}bt=Q+1;}else ae.pageBreakAfter&&(ra(sn),nn(),cr=0,At=0,Vi=true,bt=Q+1);}ra(true),O=Vi?0:Le.after;}Lt||(S[K.length]={pageCount:$.length,pageFragments:[...Te],pendingAnchoredDrawings:[...xe],cursorY:U,lineCounter:ne,previousSpaceAfter:O,flowColumnIndex:ee});let Fd=Lt&&m$1?m$1.endCursorY:U,Ad=Lt&&m$1?m$1.endSpaceAfter:O,Dd=!Lt&&(Te.length>0||$.length===0),_d=Lt&&m$1?m$1.endsOpenPage:Dd;Dd&&nn();let zd=0,dm=bs*4+8;for(;(xe.length>0||on.length>0)&&zd<dm;)zd+=1,xe.length===0&&Ge(),nn();on.length>0&&(xe.push(...on.map(w=>Ps(w,"page-defer-exhausted"))),on=[],nn()),l?.retain(new Set(q));let Hd={revision:n,pages:$};return m$1&&(m$1.previous=Hd,m$1.checkpoints=Lt?[...S.slice(0,Wi),...m$1.checkpoints.slice(Wi+(m$1.keys.length-K.length))]:S,m$1.keys=ce,m$1.context=D,m$1.endLineCounter=ne,m$1.endCursorY=Fd,m$1.endSpaceAfter=Ad,m$1.endsOpenPage=_d,m$1.stats={placed:Z,total:K.length,reusedPages:ie,fullPasses:m$1.stats.fullPasses+(W===0?1:0)}),{layout:Hd,pages:$,lineCounter:ne,endCursorY:Fd,endSpaceAfter:Ad,endsOpenPage:_d}}function Lg(e,n,t){let r=n.lefts.map(()=>t);for(let o of e.fragments){let a=0;for(let i=n.count-1;i>=0;i-=1)if(o.box.x+.5>=n.lefts[i]){a=i;break}r[a]=Math.max(r[a],o.box.y+o.box.height);}return r}var f0=.25,p0=20;function Xr(e,n,t){let r=yd(t.sectionColumns??An.columns,t.geometry.width-t.geometry.margin.left-t.geometry.margin.right);if(!t.balanceColumns||r.count<2||t.columnRegionBottom!==void 0)return t.session&&(t.session.balanceLimit=null),ar(e,n,t);let o=t.session,a=t.flowStartY??0,{session:i,...l}=t,s=h=>{let y=h.pages[0],x=y?Math.max(...Lg(y,r,a)):h.endCursorY;return o&&(o.endCursorY=x),{...h,endCursorY:x}};if(o&&o.balanceLimit!==null){let h=o.balanceLimit,y=ar(e,n,{...t,columnRegionBottom:h});if(o.stats.placed===0&&o.stats.reusedPages===y.pages.length)return o.balanceLimit=h,s(y)}let d=ar(e,n,l);if(d.pages.length!==1||!d.endsOpenPage)return o&&(o.balanceLimit=null),ar(e,n,t);let c=Lg(d.pages[0],r,a),u=c.reduce((h,y)=>h+Math.max(0,y-a),0);if(u<=0)return o&&(o.balanceLimit=null),ar(e,n,t);let f=a+u/r.count,p=Math.max(...c)+.01,g=h=>{try{let y=ar(e,n,{...l,columnRegionBottom:h});return y.pages.length===1&&y.endsOpenPage}catch{return false}};for(let h=0;h<p0&&p-f>f0;h+=1){let y=(f+p)/2;g(y)?p=y:f=y;}let b=ar(e,n,{...t,columnRegionBottom:p});return o&&(o.balanceLimit=p),s(b)}var g0="http://schemas.openxmlformats.org/wordprocessingml/2006/main",m0="http://schemas.microsoft.com/office/word/2010/wordml",h0="http://schemas.microsoft.com/office/word/2012/wordml";function y0(e){if(e.kind!=="textValue"){for(let n of e.attributes)if(n.localName==="val"&&n.namespaceUri===g0)return n.value}}function Fi(e){for(let n of e.children)if(n.kind!=="textValue"&&(n.kind==="contentControlProperties"||n.localName==="sdtPr"))return n}function Jo(e,n){if(e){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function ir(e,n){let t=Jo(e,n);return t?y0(t):void 0}function Ed(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function Ng(e){if(!e)return "richText";for(let n of e.children){if(n.kind==="textValue")continue;let t=n.kind,r=n.localName,o=n.namespaceUri;if(t==="contentControlDropDownList"||r==="dropDownList")return "dropdown";if(t==="contentControlComboBox"||r==="comboBox")return "comboBox";if(t==="contentControlDate"||r==="date")return "date";if(r==="picture")return "picture";if(t==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(t==="contentControlCheckbox"||r==="checkbox"&&o===m0)return "checkbox";if(r==="repeatingSection"&&o===h0)return "repeatingSection"}return "richText"}function b0(e){let n=(t,r)=>{for(let o of t)if(o.kind!=="textValue"){if(o.kind==="tableRow")return "row";if(o.kind==="tableCell")return "cell";if(o.kind==="paragraph"||o.kind==="table")return "block";if(Jb$1(o)&&r<Ib$1){let a=n(Mb$1(o),r+1);if(a)return a}}return null};return n(Mb$1(e),0)??"inline"}function Fg(e){let n=Mg.get(e);if(n!==void 0)return n;let t=x0(e);return Mg.set(e,t),t}var Mg=new WeakMap;function x0(e){let n=[],t=(r,o)=>{if(r.kind!=="textValue"){if(Jb$1(r)){if(o>=Ib$1)return;let a=Fi(r);n.push([r.id,ir(a,"alias")??"",ir(a,"tag")??"",Ed(ir(a,"lock")),Ng(a),Jo(a,"showingPlcHdr")?"1":"0",Jo(a,"dataBinding")?"1":"0"].join(":"));for(let i of Mb$1(r))t(i,o+1);return}for(let a of r.children)t(a,o);}};return t(e.root,0),n.join("|")}function Ai(e){if(e.kind==="textValue")return e.value.length;if(e.kind==="tab"||e.kind==="hardBreak")return 1;if(e.kind==="runProperties"||e.kind==="paragraphProperties"||e.kind==="generic")return 0;if(Jb$1(e)){let t=0;for(let r of Mb$1(e))t+=Ai(r);return t}let n=0;for(let t of e.children)n+=Ai(t);return n}function S0(e){let n=[],t=(i,l)=>{for(let s of i){if(s.kind==="paragraph"||s.kind==="table"){l.push(s.id);continue}if(Jb$1(s)){t(Mb$1(s),l);continue}(s.kind==="tableRow"||s.kind==="tableCell")&&t(s.children,l);}},r=(i,l,s,d,c)=>{let u=s;for(let f of i)if(!(f.kind==="textValue"||f.kind==="paragraphProperties")){if(Jb$1(f)){if(d>=Ib$1){u+=Ai(f);continue}let p=Fi(f),g=Ed(ir(p,"lock")),b=[...c,g],h=u,y=r(Mb$1(f),l,u,d+1,b);n.push({control:f,nestingDepth:d,lockStack:b,level:"inline",paragraphId:l,range:{start:h,end:y},blockIds:[]}),u=y;continue}if(f.kind==="hyperlink"){u=r(f.children,l,u,d,c);continue}u+=Ai(f);}return u},o=(i,l,s)=>{for(let d of i){if(d.kind==="textValue")continue;if(d.kind==="paragraph"){r(d.children,d.id,0,l,s);continue}if(d.kind==="table"){for(let h of d.children)h.kind==="tableRow"&&o([h],l,s);continue}if(d.kind==="tableRow"){for(let h of d.children)h.kind==="tableCell"?o(h.children,l,s):Jb$1(h)&&o([h],l,s);continue}if(!Jb$1(d)||l>=Ib$1)continue;let c=Fi(d),u=Ed(ir(c,"lock")),f=[...s,u],p=b0(d),g=Mb$1(d);if(p==="inline"){o(g,l+1,f);continue}let b=[];t(g,b),n.push({control:d,nestingDepth:l,lockStack:f,level:p,blockIds:b}),o(g,l+1,f);}},a=e.root.children.find(i=>i.kind==="body");return a&&a.kind!=="textValue"&&o(a.children,0,[]),n}function w0(e,n){let t=new Map,r=new Map,o=s=>{let d=t.get(s.blockId);d?d.push(s):t.set(s.blockId,[s]);},a=s=>{let d=r.get(s.paragraphId);d?d.push(s):r.set(s.paragraphId,[s]);},i=0,l=(s,d)=>{if(d.kind==="paragraph"){o({pageIndex:s,blockId:d.paragraphId,box:d.box});for(let c of d.lines){let u=i;i+=1;let f=Math.max(0,c.box.height-c.leading-(c.trailingSpacing??0));for(let p of c.spans)a({pageIndex:s,paragraphId:p.range.paragraphId,start:p.range.start,end:p.range.end,line:u,box:{x:p.box.x,y:p.box.y+c.leading,width:p.box.width,height:f}});}return}o({pageIndex:s,blockId:d.tableId,box:d.box});for(let c of d.rows)if(!c.isHeaderRepeat)for(let u of c.cells)for(let f of u.blocks)l(s,f);};for(let s of e.pages)for(let d of s.fragments)l(s.index,d);return {blocksById:t,spansByParagraph:r}}function R0(e,n,t){let r=new Map,o=new Set;for(let a of e)if(!o.has(a)){o.add(a);for(let i of n.blocksById.get(a)??[]){let l=r.get(i.pageIndex);l?l.push(i.box):r.set(i.pageIndex,[i.box]);}}return [...r.entries()].sort(([a],[i])=>a-i).flatMap(([a,i])=>{let l=xa(i);return l?[{pageIndex:a,box:l}]:[]})}function P0(e,n,t,r){let o=t.spansByParagraph.get(e)??[],a=new Map,i=0,l=o.length;for(;i<l;){let s=i+(l-i>>1);(n.start===n.end?o[s].end<n.start:o[s].end<=n.start)?i=s+1:l=s;}for(let s=i;s<o.length;s+=1){let d=o[s];if(d.end<=n.start)continue;if(d.start>=n.end)break;let c=a.get(d.line);c?c.boxes.push(d.box):a.set(d.line,{pageIndex:d.pageIndex,boxes:[d.box]});}if(a.size===0&&n.start===n.end)for(let s=i;s<o.length;s+=1){let d=o[s];if(d.start>n.start)break;if(n.start>d.end)continue;let c=d.start===d.end?d.box.x:d.box.x+d.box.width*(n.start-d.start)/Math.max(1,d.end-d.start);return [{pageIndex:d.pageIndex,box:{x:c,y:d.box.y,width:0,height:d.box.height}}]}return [...a.entries()].sort(([s],[d])=>s-d).flatMap(([,s])=>{let d=xa(s.boxes);return d?[{pageIndex:s.pageIndex,box:d}]:[]})}function I0(e,n,t){let r=Fi(e.control),o=ir(r,"alias"),a=ir(r,"tag"),i=e.lockStack[e.lockStack.length-1]??"unlocked",l=e.level==="inline"&&e.paragraphId&&e.range?P0(e.paragraphId,e.range,n):R0(e.blockIds,n);return {id:e.control.id,...o!==void 0?{alias:o}:{},...a!==void 0?{tag:a}:{},controlType:Ng(r),lock:i,effectiveLock:Cl(e.lockStack),placeholder:Jo(r,"showingPlcHdr")!==void 0,bound:Jo(r,"dataBinding")!==void 0,nestingDepth:e.nestingDepth,level:e.level,fragments:l}}function T0(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];if(r!==o&&(r.pageIndex!==o.pageIndex||r.box.x!==o.box.x||r.box.y!==o.box.y||r.box.width!==o.box.width||r.box.height!==o.box.height))return false}return true}function v0(e,n){return e.id===n.id&&e.alias===n.alias&&e.tag===n.tag&&e.controlType===n.controlType&&e.lock===n.lock&&e.effectiveLock===n.effectiveLock&&e.placeholder===n.placeholder&&e.bound===n.bound&&e.nestingDepth===n.nestingDepth&&e.level===n.level&&T0(e.fragments,n.fragments)}function Ni(e,n){if(!e)return n.length===0;if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(!v0(e[t],n[t]))return false;return true}function Ag(e,n){return {revision:e.revision,pages:e.pages,...n.contentControls!==void 0?{contentControls:n.contentControls}:{},...n.controlContextToken!==void 0?{controlContextToken:n.controlContextToken}:{}}}function B0(e,n,t=Fg(n),r){let o=S0(n),a=w0(e),i=o.map(u=>I0(u,a)),l=new Map;for(let u of i)for(let f of u.fragments){let p=l.get(f.pageIndex),g={...u,fragments:[f]};p?p.push(g):l.set(f.pageIndex,[g]);}if(e.controlContextToken===t&&Ni(e.contentControls,i)&&e.pages.every(u=>Ni(u.contentControls,l.get(u.index)??[])))return e;let s=false,d=e.pages.map(u=>{let f=l.get(u.index)??[];return Ni(u.contentControls,f)||f.length===0&&!u.contentControls?u:(s=true,{...u,contentControls:f})}),c=s?d:e.pages;return c===e.pages&&e.controlContextToken===t&&Ni(e.contentControls,i)?e:{revision:e.revision,pages:c,contentControls:i,controlContextToken:t}}var Hg="Calibri, Carlito, Helvetica, Arial, sans-serif",O0=4096,C0=256;function Dg(e,n){return e===void 0?Math.max(1,Math.floor(n)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function _g(e){let n=new Map,t=0;return {get(r){let o=n.get(r);if(o!==void 0)return n.delete(r),n.set(r,o),o},set(r,o){for(n.has(r)&&n.delete(r),n.set(r,o);n.size>e;){let a=n.keys().next();if(a.done)break;n.delete(a.value),t+=1;}},get size(){return n.size},get evictions(){return t}}}var zg=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function jg(e=null){return e!=null&&typeof e.measureText=="function"}function Gg(e={}){let n=e.scale??1;if(!(n>0)||!Number.isFinite(n))return null;let t=e.fallbackFamily??Hg,r=e.context??null;if(!jg(r))return null;let o=r,a=_g(Dg(e.maxWidthEntries,O0)),i=_g(Dg(e.maxMetricsEntries,C0)),l=e.fontAlias,s=c=>{let u=c.fontFamily&&zg.test(c.fontFamily)?c.fontFamily:null,f=u?l?.(u):void 0,p=f&&zg.test(f)?f:null,g=u?p?`"${p}", "${u}", ${t}`:`"${u}", ${t}`:t,b=c.bold?"bold":"normal",h=c.italic?"italic":"normal",y=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*n;return `${h} ${b} ${y}px ${g}`},d=(c,u,f)=>c/n*(f.horizontalScalePercent/100)+u.length*f.characterSpacingPt;return {measure(c,u){if(c.length===0)return 0;let f=s(u),p=`${f}\0${c}`,g=a.get(p);if(g!==void 0)return d(g,c,u);o.font=f;let b=o.measureText(c).width;return a.set(p,b),d(b,c,u)},lineMetrics(c){let u=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75),f=s(c),p=i.get(f);if(p)return p;let g=u*1.15,b=u*.8;o.font=f;let h=o.measureText("Hxg"),y=h.fontBoundingBoxAscent,x=h.fontBoundingBoxDescent;if(typeof y=="number"&&Number.isFinite(y)&&y>0&&(b=y/n,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let T=(y+x)/n;T>0&&(g=T);}g>0||(g=u*1.15);let P={height:g,baseline:b};return i.set(f,P),P}}}function k0(e=1,n={}){let t=Gg({...n,scale:n.scale??e});return t?{measurer:t,producer:n.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:Mi(),producer:"fixed-measurer"}}function E0(e){return e.box}function Wg(e,n){if(e.kind==="paragraph"){n.add(e.paragraphId);return}for(let t of e.rows)for(let r of t.cells)for(let o of r.blocks)Wg(o,n);}function L0(e){let n=new Map,t=(o,a,i)=>{if(!(o.kind==="textValue"||i>_d*4)){for(let l of o.children)if(l.kind!=="textValue"){if(l.kind==="paragraph"){for(let s of r)n.get(s)?.push(l.id);t(l,l.id,i+1);continue}if(l.kind==="contentControl"){n.set(l.id,[]),r.push(l.id);let s=ie(l);s&&t(s,a,i+1),r.pop();let d=n.get(l.id);d&&d.length===0&&a!==null&&d.push(a);continue}t(l,a,i+1);}}},r=[];return t(e,null,0),n}function M0(e,n){let t=Math.min(e.x,n.x),r=Math.min(e.y,n.y);return {x:t,y:r,width:Math.max(e.x+e.width,n.x+n.width)-t,height:Math.max(e.y+e.height,n.y+n.height)-r}}function N0(e,n){let t=me(e.root);if(t.length===0)return F0;let r=new Map;n.pages.forEach((i,l)=>{(d=>{for(let c of d){let u=new Set;Wg(c,u);for(let f of u){let p=r.get(f)??[];p.push({pageIndex:l,box:E0(c)}),r.set(f,p);}}})(i.fragments);});let o=L0(e.root),a=[];for(let i of t){let l=ke(i.node),s=[...i.ancestors.map(f=>ke(f).lock),l.lock],d=o.get(i.node.id)??[],c=new Map;for(let f of d)for(let p of r.get(f)??[]){let g=c.get(p.pageIndex);c.set(p.pageIndex,g?M0(g,p.box):p.box);}let u=[...c.entries()].sort((f,p)=>f[0]-p[0]).map(([f,p])=>({pageIndex:f,...p}));a.push({controlId:i.node.id,type:l.type,level:le(i.node),depth:i.depth,lock:l.lock,effectiveLock:pe(s),showingPlaceholder:l.showingPlaceholder,temporary:l.temporary,...l.tag===void 0?{}:{tag:l.tag},...l.alias===void 0?{}:{alias:l.alias},...l.id===void 0?{}:{id:l.id},...l.dataBinding===void 0?{}:{dataBinding:l.dataBinding},paragraphIds:d,fragments:u});}return a}var F0=Object.freeze([]);var $g=e=>e.verticalAlign==="baseline"?1:.75;function Xg(e){let n=Math.round(e.fontSizePt*2);return Math.max(1,n)}function A0(e){let{shaper:n,resolveFont:t,fallback:r,shapingLibrary:o,unicodeDataVersion:a,fixedPointScale:i=1e3,script:l="Latn",language:s="en"}=e,d=new Map,c=new Map,u=(p,g)=>`${p.identity}|${Xg(g)}`,f=(p,g,b)=>n.shape({text:p,fontSizeHalfPoints:Xg(b),bidiLevel:0,environment:jt({font:g,variationAxes:{},shapingLibrary:o,unicodeDataVersion:a,normalization:"none",script:l,language:s,direction:"ltr",features:{},fallbackOrder:[],fixedPointScale:i,roundingMode:"halfToEven"})});return {measure(p,g){if(p.length===0)return 0;let b=t(g);if(!b)return r.measure(p,g);let h=`${u(b,g)}|${p}`,y=d.get(h);if(y===void 0){let x=0;try{for(let P of f(p,b,g).glyphs)x+=P.advanceX;}catch{return r.measure(p,g)}y=x/i,d.set(h,y);}return y*$g(g)*(g.horizontalScalePercent/100)+p.length*g.characterSpacingPt},lineMetrics(p){let g=t(p);if(!g)return r.lineMetrics(p);let b=$g(p),h=u(g,p),y=c.get(h);if(y)return b===1?y:{height:y.height*b,baseline:y.baseline*b};let x,P=true;try{let T=f(" ",g,p),_=T.metrics.ascent/i,j=T.metrics.descent/i,z=_+j;z>0?x={height:z,baseline:_}:(x=r.lineMetrics(p),P=!1);}catch{x=r.lineMetrics(p),P=false;}return P?(c.set(h,x),b===1?x:{height:x.height*b,baseline:x.baseline*b}):x}}}function D0(e){let{layout:n,viewport:t}=e,r=new Set;if(!t){for(let s of n.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=t.top+t.height,i=-1,l=-1;for(let s of n.pages){let d=s.box.y;d+s.box.height>=t.top&&d<=a&&(i===-1&&(i=s.index),l=s.index);}if(i===-1){let s=_0(n,t.top);s!==null&&(i=s,l=s);}if(i!==-1){let s=Math.max(0,i-o),d=Math.min(n.pages.length-1,l+o);for(let c=s;c<=d;c+=1)r.add(c);}for(let s of e.pinnedPages??[])s>=0&&s<n.pages.length&&r.add(s);return r}function _0(e,n){let t=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=n<o.box.y?o.box.y-n:n>o.box.y+o.box.height?n-(o.box.y+o.box.height):0;a<r&&(r=a,t=o.index);}return t}var Vg=["text-local","paragraph-local","flow-structural","global"];function Yg(e,n){return Vg.indexOf(n)>Vg.indexOf(e)?n:e}function z0(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function H0(e){let{run:n,currentRevision:t,publish:r,schedule:o}=e,a=null,i=null,l=null,s=0,d=0;function c(h){let y=e.runCooperatively;if(!y)return n(h);let x=y(h);l=x;try{for(;;){let P=x.step();if(P)return P;if(t()!==h.revision)return x.cancel(),d+=1,null;if(l!==x)return null}}finally{l===x&&(l=null);}}function u(h){let y=p(t());y.impact=Yg(y.impact,h.impact),y.structural=y.structural||h.structural;for(let x of h.paragraphIds)y.paragraphIds.add(x);for(let x of h.created)y.created.add(x);for(let x of h.deleted)y.deleted.add(x);for(let x of h.dependencyKeys)y.dependencyKeys.add(x);}let f=h=>({impact:h.impact,paragraphIds:h.paragraphIds,created:h.created,deleted:h.deleted,dependencyKeys:h.dependencyKeys,structural:h.structural,revision:h.revision});function p(h){return a||(a=z0(h)),a.revision=Math.max(a.revision,h),a}function g(){!o||i||(i=o(()=>{i=null,b();}));}function b(){i&&(i(),i=null),l&&(l.cancel(),l=null,d+=1);let h=a;if(!h)return false;a=null;let y=f(h),x=c(y);return !x||x.revision!==t()?(s+=1,u(y),g(),false):(r(x,y),true)}return {notify(h){let y=p(h.toRevision);y.impact=Yg(y.impact,h.impact);for(let x of h.dirty)y.paragraphIds.add(x);for(let x of h.created)y.created.add(x),y.paragraphIds.add(x);for(let x of h.deleted)y.deleted.add(x),y.paragraphIds.add(x);for(let x of h.dependencyKeys)y.dependencyKeys.add(x);for(let x of h.splitJoin)y.structural=true,"split"in x?(y.paragraphIds.add(x.split.from),y.paragraphIds.add(x.split.tail)):(y.paragraphIds.add(x.join.kept),y.paragraphIds.add(x.join.removed));(h.impact==="flow-structural"||h.impact==="global")&&(y.structural=true),g();},invalidateAll(h,y){let x=p(h);x.impact="flow-structural",x.structural=true,y&&x.dependencyKeys.add(y),g();},flush:b,pending:()=>a?f(a):null,cancel(){i?.(),i=null,l?.cancel(),l=null,a=null;},get staleDiscards(){return s},get cancelledRuns(){return d}}}var Kg=new WeakMap;function lr(e){let n=Kg.get(e);if(n)return n;let t=new Map,r=(o,a)=>{let i=l=>{for(let s of l){if(s.kind==="paragraph"){for(let d of s.lines){let c=t.get(d.range.paragraphId),u={line:d,pageIndex:a};c?c.push(u):t.set(d.range.paragraphId,[u]);}continue}for(let d of s.rows)if(!d.isHeaderRepeat)for(let c of d.cells)i(c.blocks);}};i(o);};for(let o of e.pages){for(let a of Sn(o))for(let i of a.lines){let l=t.get(i.range.paragraphId),s={line:i,pageIndex:o.index};l?l.push(s):t.set(i.range.paragraphId,[s]);}o.header&&r(o.header.fragments,o.index),o.footer&&r(o.footer.fragments,o.index);for(let a of [o.footnotes,o.endnotes])if(a)for(let i of a.notes)r(i.fragments,o.index);}return Kg.set(e,t),t}function Qo(e,n,t){for(let o of e.drawings??[]){if(n===o.start)return o.advanceStart;if(n===o.start+1)return o.advanceEnd}let r=e.contentX;for(let o of e.spans){if(n<=o.range.start)return o.box.x;if(n>=o.range.end){r=o.box.x+o.box.width;continue}return gi(o,n,t)}return r}function j0(e,n,t){let r=lr(e).get(n.range.paragraphId)??[],o=false;for(let a of r){if(a.line===n){o=true;continue}if(o&&a.line.range.start===t)return true}return false}function G0(e,n,t){for(let{line:r}of lr(e).get(n)??[])if(r.range.start===t&&r.drawings?.some(o=>o.start===t))return r;return null}function W0(e,n){let t=e.deletedRanges;if(t===void 0)return false;for(let r of t)if(n>r.start&&n<r.end)return true;return false}function $0(e,n){for(let t of e.spans)if(!(n<=t.range.start||n>=t.range.end)&&(t.projected||t.text.length!==t.range.end-t.range.start))return true;return false}function qg(e){let n=e.spans[e.spans.length-1]?.text;return n===`
|
|
10
|
-
`||n===Vb$1}function Jg(e,n,t,r,o,a){for(let i=t.range.start;i<=t.range.end;i+=1)if(!(i===t.range.end&&i>t.range.start&&qg(t)&&j0(n,t,i))){if(i===t.range.start&&i>o&&e.length>0){let l=e[e.length-1];if(l.position.paragraphId===t.range.paragraphId&&l.position.offset===i)continue}$0(t,i)||W0(t,i)||e.push({position:{paragraphId:t.range.paragraphId,offset:i},x:Qo(t,i,a),y:t.box.y,height:t.box.height,lineId:t.id,pageIndex:r});}}function Qg(e,n,t,r,o){for(let a of n){if(a.kind==="paragraph"){for(let i of a.lines)Jg(r,e,i,t,a.range.start,o);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let l of i.cells)Qg(e,l.blocks,t,r,o);}}function em(e,n){let t=[];for(let r of e.pages)for(let o of Sn(r))for(let a of o.lines)Jg(t,e,a,r.index,o.range.start,n);return t}function X0(e,n,t,r){if(!e.pages[n])return [];let o=[];return Qg(e,t,n,o,r),o}function V0(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function nm(e,n,t){let r=V0(t),o=lr(e).get(n.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?o:[...o].sort((s,d)=>{let c=s.pageIndex===a?0:1,u=d.pageIndex===a?0:1;return c-u}),l=null;for(let{line:s,pageIndex:d}of i){if(n.offset<s.range.start||n.offset>s.range.end)continue;if(n.offset===s.range.end&&n.offset>s.range.start&&qg(s)){l??={line:s,pageIndex:d};continue}if(n.offset===s.range.end&&n.offset>s.range.start&&G0(e,n.paragraphId,n.offset))continue;let c=Vo(s,n.offset,r.measurer);return {position:n,x:c.x,y:c.y,height:c.height,lineId:s.id,pageIndex:d}}if(l){let s=Vo(l.line,n.offset,r.measurer);return {position:n,x:s.x,y:s.y,height:s.height,lineId:l.line.id,pageIndex:l.pageIndex}}return null}function Y0(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return ui(e,t,n)?.caret??null}function K0(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return pi(e,t,n)}function U0(e){return Ol(e)}function Z0(e,n){let t=rm(e,n);if(!t)return [];let r=[];for(let o of e.pages)for(let a of Sn(o))for(let i of a.lines){let l=Di(e,i,t.from,t.to);if(!l)continue;let s=Qo(i,l.start),d=Qo(i,l.end);r.push({pageIndex:o.index,x:Math.min(s,d),y:i.box.y,width:Math.abs(d-s),height:i.box.height});}return r}function q0(e,n,t){let r=new Map;if(n.length===0)return r;for(let o of e.pages)if(!(t&&!t.has(o.index)))for(let a of Sn(o))for(let i of a.lines)for(let l of n){let s=Di(e,i,l.from,l.to);if(!s)continue;let d=Qo(i,s.start),c=Qo(i,s.end),u=r.get(l.key)??[];u.push({pageIndex:o.index,x:Math.min(d,c),y:i.box.y,width:Math.abs(c-d),height:i.box.height}),r.set(l.key,u);}return r}function Di(e,n,t,r){let o=tm(e),a=o.get(n.range.paragraphId)??-1,i=o.get(t.paragraphId)??-1,l=o.get(r.paragraphId)??-1;if(a<i||a>l)return null;let s=a===i?Math.max(n.range.start,t.offset):n.range.start,d=a===l?Math.min(n.range.end,r.offset):n.range.end;return d>s?{start:s,end:d}:null}var Ug=new WeakMap,Zg=new WeakMap;function _i(e){let n=Ug.get(e);if(n)return n;let t=new Set,r=[];for(let o of e.pages)for(let a of Sn(o))t.has(a.paragraphId)||(t.add(a.paragraphId),r.push(a.paragraphId));return Ug.set(e,r),r}function tm(e){let n=Zg.get(e);if(n)return n;let t=new Map;for(let[r,o]of _i(e).entries())t.set(o,r);return Zg.set(e,t),t}function rm(e,n){if(n.anchor.paragraphId===n.head.paragraphId)return n.anchor.offset<=n.head.offset?{from:n.anchor,to:n.head}:{from:n.head,to:n.anchor};let t=_i(e),r=t.indexOf(n.anchor.paragraphId),o=t.indexOf(n.head.paragraphId);return r===-1||o===-1?null:r<o||r===o&&n.anchor.offset<=n.head.offset?{from:n.anchor,to:n.head}:{from:n.head,to:n.anchor}}function ea(e,n){let t=[],r=new Set;for(let{line:a}of lr(e).get(n)??[]){for(let i of a.spans){if(i.range.end===i.range.start)continue;let l=`${i.range.start}:${i.range.end}`;r.has(l)||(r.add(l),t.push({start:i.range.start,text:i.text}));}for(let i of a.drawings??[]){let l=i.start,s=l+1,d=`${l}:${s}`;r.has(d)||(r.add(d),t.push({start:l,text:"\uFFFC"}));}}t.sort((a,i)=>a.start-i.start);let o="";for(let a of t)a.start>o.length&&(o+=" ".repeat(a.start-o.length)),o=o.slice(0,a.start)+a.text;return o}var J0=/[\p{L}\p{N}_'\u2019]/u;function om(e,n,t){let r=a=>{let i=e[a];return i!==void 0&&J0.test(i)},o=Math.max(0,Math.min(n,e.length));if(t===-1){for(;o>0&&!r(o-1);)o-=1;for(;o>0&&r(o-1);)o-=1;return o}for(;o<e.length&&!r(o);)o+=1;for(;o<e.length&&r(o);)o+=1;return o}function Q0(e,n,t,r=null,o={}){let a=o.stops?[...o.stops]:em(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(s=>s.position.paragraphId===n.paragraphId&&s.position.offset===n.offset);if(i===-1)return null;let l=a[i];switch(t){case "left":return {position:a[Math.max(0,i-1)].position,desiredX:null};case "right":return {position:a[Math.min(a.length-1,i+1)].position,desiredX:null};case "lineStart":return {position:a.filter(d=>d.lineId===l.lineId)[0].position,desiredX:null};case "lineEnd":{let s=a.filter(d=>d.lineId===l.lineId);return {position:s[s.length-1].position,desiredX:null}}case "wordLeft":case "wordRight":{let s=ea(e,n.paragraphId),d=t==="wordLeft"?-1:1,c=om(s,n.offset,d);return c===n.offset?{position:a[d===-1?Math.max(0,i-1):Math.min(a.length-1,i+1)].position,desiredX:null}:{position:{paragraphId:n.paragraphId,offset:c},desiredX:null}}case "documentStart":return {position:a[0].position,desiredX:null};case "documentEnd":return {position:a[a.length-1].position,desiredX:null};case "pageUp":case "pageDown":{let s=r??l.x,d=l.pageIndex+(t==="pageUp"?-1:1),c=a.filter(p=>p.pageIndex===d);if(c.length===0)return {position:(t==="pageUp"?a[0]:a[a.length-1]).position,desiredX:s};let u=c[0],f=Number.POSITIVE_INFINITY;for(let p of c){let g=Math.abs(p.y-l.y)*1e3+Math.abs(p.x-s);g<f&&(f=g,u=p);}return {position:u.position,desiredX:s}}case "up":case "down":{let s=r??l.x,d=[];for(let g of a)d.includes(g.lineId)||d.push(g.lineId);let c=d.indexOf(l.lineId),u=t==="up"?c-1:c+1;if(u<0||u>=d.length)return {position:(t==="up"?a[0]:a[a.length-1]).position,desiredX:s};let f=a.filter(g=>g.lineId===d[u]),p=f[0];for(let g of f)Math.abs(g.x-s)<Math.abs(p.x-s)&&(p=g);return {position:p.position,desiredX:s}}default:return null}}function ew(e,n){return nm(e,n)}function nw(e,n){let t=rm(e,n);if(!t)return [];if(t.from.paragraphId===t.to.paragraphId&&t.from.offset===t.to.offset)return tw(e,t.from);let r=[];if(t.from.paragraphId===t.to.paragraphId){for(let{line:d}of lr(e).get(t.from.paragraphId)??[]){let c=Di(e,d,t.from,t.to);if(c)for(let u of d.spans)u.range.end>c.start&&u.range.start<c.end&&r.push(u);}return r}let o=_i(e),a=tm(e),i=lr(e),l=a.get(t.from.paragraphId)??-1,s=a.get(t.to.paragraphId)??-1;if(l===-1||s===-1)return [];for(let d=l;d<=s;d+=1)for(let{line:c}of i.get(o[d])??[]){let u=Di(e,c,t.from,t.to);if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&r.push(f);}return r}function tw(e,n){let t=null;for(let{line:r}of lr(e).get(n.paragraphId)??[])for(let o of r.spans){if(o.range.start<n.offset&&n.offset<=o.range.end)return [o];t===null&&o.range.start===n.offset&&(t=o);}return t?[t]:[]}var am=new WeakMap;function kt(e){let n=am.get(e);if(n)return n;let t=new Map,r=new Map,o=new Map,a=(l,s)=>{for(let d of l){if(d.kind==="paragraph")continue;let c=d.tableId,u=o.get(c);u||(u=new Map,o.set(c,u),t.set(c,[]),r.set(c,new Map));for(let f of d.rows){let p=u.get(f.id);p===void 0&&(p=u.size,u.set(f.id,p),r.get(c).set(p,f.cells));for(let g of f.cells)t.get(c).push({pageIndex:s,tableId:c,row:f,cell:g,rowIndex:p,isHeaderRepeat:f.isHeaderRepeat}),a(g.blocks,s);}}};for(let l of e.pages)a(l.fragments,l.index);let i=new Map;for(let[l,s]of t)i.set(l,{placed:s,rows:r.get(l)??new Map});return am.set(e,i),i}function im(e){let n=0;for(let t of e.rows.values())for(let r of t)n=Math.max(n,Ct(r).to+1);return n}var Ct=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function rw(e,n,t){if(n.tableId!==t.tableId)return null;let r=kt(e).get(n.tableId);if(!r)return null;let o=Math.min(n.rowIndex,t.rowIndex),a=Math.max(n.rowIndex,t.rowIndex),i=Math.min(Ct(n).from,Ct(t).from),l=Math.max(Ct(n).to,Ct(t).to),s=p=>{let{from:g,to:b}=Ct(p);return b>=i&&g<=l},d=p=>(r.rows.get(p)??[]).some(g=>g.vMergeContinue&&s(g)),c=r.rows.size+im(r)+2;for(let p=0;!(p>c);p+=1){let g=false;for(let[b,h]of r.rows)if(!(b<o||b>a))for(let y of h){if(!s(y))continue;let{from:x,to:P}=Ct(y);x<i&&(i=x,g=true),P>l&&(l=P,g=true);}for(;o>0&&d(o);)o-=1,g=true;for(;d(a+1);)a+=1,g=true;if(!g)break}let u=[],f=new Set;for(let p of r.placed){if(p.isHeaderRepeat||p.rowIndex<o||p.rowIndex>a)continue;let{from:g,to:b}=Ct(p.cell);b<i||g>l||f.has(p.cell.id)||(f.add(p.cell.id),u.push(p.cell.id));}return u.length===0?null:{kind:"cells",tableId:n.tableId,cellIds:u,rows:{from:o,to:a},columns:{from:i,to:l},text:ow(e,n.tableId,u)}}function zi(e,n){let t=new Set(n),r=[],o=new Set;for(let a of kt(e).values())for(let i of a.placed)if(!(i.isHeaderRepeat||!t.has(i.cell.id)))for(let l of i.cell.blocks)na(l,r,o);return r}function na(e,n,t){if(e.kind==="paragraph"){t.has(e.paragraphId)||(t.add(e.paragraphId),n.push(e.paragraphId));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)na(a,n,t);}function ow(e,n,t){let r=zi(e,t),o=r[0],a=r[r.length-1];return !o||!a?aw(e,n):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:ea(e,a).length}}}function aw(e,n){let t=kt(e).get(n);for(let o of t?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let l of o.cell.blocks)na(l,a,new Set);let i=a[0];if(i){let l={paragraphId:i,offset:0};return {anchor:l,head:l}}}for(let o of e.pages)for(let a of Sn(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function iw(e,n){let t=new Set(zi(e,n)),r=[],o=new Set;for(let a of e.pages)for(let i of Sn(a))if(t.has(i.paragraphId))for(let l of i.lines)for(let s of l.spans){let d=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(d)||(o.add(d),r.push(s));}return r}function lw(e,n){let t=new Set(n),r=[];for(let o of kt(e).values())for(let a of o.placed)t.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x,y:a.cell.box.y,width:a.cell.box.width,height:a.cell.box.height});return r}function sw(e,n){let t=kt(e).get(n.tableId);if(!t)return "";let r=new Set(n.cellIds),o=new Map,a=new Set;for(let i of t.placed){if(i.isHeaderRepeat||!r.has(i.cell.id)||a.has(i.cell.id))continue;a.add(i.cell.id);let l=zi(e,[i.cell.id]).map(d=>ea(e,d)).join(`
|
|
11
|
-
`),s=o.get(i.rowIndex);s?s.set(i.cell.gridColumn,l):o.set(i.rowIndex,new Map([[i.cell.gridColumn,l]]));}return [...o.keys()].sort((i,l)=>i-l).map(i=>{let l=o.get(i),s=[];for(let d=n.columns.from;d<=n.columns.to;d+=1)s.push(l.get(d)??"");return s.join(" ")}).join(`
|
|
12
|
-
`)}function Ld(e,n){let t=null,r=-1;for(let[o,a]of kt(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let l=[];for(let d of i.cell.blocks)na(d,l,new Set);if(!l.includes(n))continue;let s=o.length;s<=r||(r=s,t={tableId:o,rows:a.rows.size,columns:im(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return t}function rv(e,n,t){if(t){let a=Ld(e,n);if(!a||a.tableId!==t.tableId)return null;let i=t.cellIds[0];if(!i)return null;let l=kt(e).get(t.tableId);if(!l)return null;for(let s of l.placed)if(s.cell.id===i)return {tableId:t.tableId,rowId:s.row.id,cellId:i,cellIds:t.cellIds,gridColumnIndex:s.cell.gridColumn,isHeaderRepeat:s.isHeaderRepeat};return null}let r=Ld(e,n);if(!r)return null;let o=kt(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let l of a.cell.blocks)na(l,i,new Set);if(i.includes(n))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}export{Sa as $,as as $a,ed as $b,hg as $c,ya as A,Vh as Aa,Qa as Ab,wi as Ac,ew as Ad,wh as B,Yh as Ba,ei as Bb,Ri as Bc,nw as Bd,Rh as C,Kh as Ca,ni as Cb,BS as Cc,rw as Cd,Ph as D,jl as Da,Ms as Db,Pi as Dc,zi as Dd,Tl as E,Tr as Ea,Ef as Eb,Kp as Ec,iw as Ed,Gc as F,Wl as Fa,Ns as Fb,rr as Fc,lw as Fd,Wc as G,$l as Ga,Jt as Gb,OS as Gc,sw as Gd,$c as H,mo as Ha,Nn as Hb,Uo as Hc,Ld as Hd,Xc as I,Qh as Ia,oi as Ib,Up as Ic,rv as Id,Vc as J,vr as Ja,Ho as Jb,Wr as Jc,Yc as K,Xl as Ka,Zf as Kb,Zo as Kc,Bh as L,$t as La,qf as Lb,Zp as Lc,Oh as M,ty as Ma,jo as Mb,kS as Mc,Sr as N,ry as Na,Hr as Nb,qp as Nc,Ch as O,st as Oa,Ws as Ob,xd as Oc,Bl as P,Pt as Pa,ep as Pb,Ii as Pc,lo as Q,fu as Qa,Ax as Qb,Jp as Qc,Sn as R,ns as Ra,jr as Rb,Qp as Rc,Kc as S,pu as Sa,$s as Sb,qo as Sc,Uc as T,ts as Ta,Xs as Tb,eg as Tc,ww as U,gu as Ua,Ys as Ub,Ti as Uc,Mh as V,dt as Va,Ks as Vb,wd as Vc,Nh as W,rs as Wa,fp as Wb,ig as Wc,Ol as X,Vt as Xa,pp as Xb,Rd as Xc,xa as Y,os as Ya,gp as Yb,Pd as Yc,Cl as Z,ct as Za,Us as Zb,Td as Zc,Zc as _,xo as _a,ii as _b,Bi as _c,Gn as a,wr as aa,yy as ab,Xo as ac,yg as ad,jt as b,Ll as ba,So as bb,Vx as bc,xg as bd,Ec as c,Qc as ca,Yn as cb,ui as cc,o0 as cd,ml as d,co as da,Ln as db,BP as dc,Ei as dd,fa as e,eu as ea,Tt as eb,Yx as ec,Mi as ed,ym as f,nu as fa,Kn as fb,pi as fc,u0 as fd,ro as g,Pr as ga,xy as gb,Pp as gc,Hg as gd,bm as h,tu as ha,is as hb,gi as hc,jg as hd,xm as i,Ml as ia,Iu as ib,Vo as ic,Gg as id,ze as j,Nl as ja,Ut as jb,aS as jc,k0 as jd,Km as k,Fl as ka,Cy as kb,kP as kc,N0 as kd,Mc as l,Al as la,nR as lb,EP as lc,A0 as ld,dh as m,lt as ma,ys as mb,LP as mc,D0 as md,pa as n,uo as na,Da as nb,MP as nc,H0 as nd,uh as o,un as oa,Wa as ob,NP as oc,em as od,fh as p,Rt as pa,cf as pb,yi as pc,X0 as pd,ph as q,Wh as qa,Dr as qb,Pn as qc,nm as qd,Sl as r,Dl as ra,Gb as rb,ht as rc,Y0 as rd,Rl as s,Ir as sa,zr as sb,bi as sc,K0 as sd,En as t,_l as ta,pf as tb,dI as tc,U0 as td,hh as u,Ra as ua,pt as ub,pd as uc,Z0 as ud,yh as v,fo as va,No as vb,gd as vc,q0 as vd,bh as w,zl as wa,Sf as wb,md as wc,_i as wd,ha as x,Hl as xa,Ao as xb,Si as xc,ea as xd,Sh as y,po as ya,Xa as yb,An as yc,om as yd,Pl as z,Xh as za,Bf as zb,Yp as zc,Q0 as zd};
|