@docx-editor.dev/core 2.9.1 → 2.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.js +1 -1
  3. package/dist/binding.cjs +1 -1
  4. package/dist/binding.d.cts +7 -7
  5. package/dist/binding.d.ts +7 -7
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-6JWP2H7K.js +2 -0
  8. package/dist/chunk-6KNLLEUW.cjs +18 -0
  9. package/dist/chunk-7ADTI533.cjs +10 -0
  10. package/dist/chunk-7ETDCPF6.cjs +2 -0
  11. package/dist/chunk-7I3BSGGS.js +1 -0
  12. package/dist/{chunk-XMHWBL3K.cjs → chunk-7UU5YFCD.cjs} +1 -1
  13. package/dist/chunk-CKDAK3MV.js +10 -0
  14. package/dist/chunk-DIMEYVNS.js +2 -0
  15. package/dist/{chunk-IEXDXWTA.cjs → chunk-H2656QDI.cjs} +1 -1
  16. package/dist/chunk-KQGENNL5.cjs +15 -0
  17. package/dist/chunk-LIXPSV4T.js +18 -0
  18. package/dist/{chunk-DKMKH77K.cjs → chunk-O4UULRAQ.cjs} +5 -5
  19. package/dist/chunk-SIIFNE6U.js +15 -0
  20. package/dist/chunk-VXYECPKA.js +5 -0
  21. package/dist/contracts/editor.d.cts +6 -6
  22. package/dist/contracts/editor.d.ts +6 -6
  23. package/dist/contracts/interaction.d.cts +6 -6
  24. package/dist/contracts/interaction.d.ts +6 -6
  25. package/dist/contracts/modules.d.cts +3 -3
  26. package/dist/contracts/modules.d.ts +3 -3
  27. package/dist/{custom-node-writes-QyVZdTUA.d.ts → custom-node-writes-D6SGwebL.d.ts} +20 -4
  28. package/dist/{custom-node-writes-7ERv0f_X.d.cts → custom-node-writes-Dy3b20PS.d.cts} +20 -4
  29. package/dist/{editor-PUlv5Pp7.d.ts → editor-Cvd7Geoc.d.ts} +4 -4
  30. package/dist/{editor-CojjwMmF.d.cts → editor-cAEf1uXW.d.cts} +4 -4
  31. package/dist/editor.cjs +1 -1
  32. package/dist/editor.css +9 -5
  33. package/dist/editor.d.cts +18 -18
  34. package/dist/editor.d.ts +18 -18
  35. package/dist/editor.js +1 -1
  36. package/dist/{image-resources-eZqD_-vC.d.ts → image-resources-BgA9EQxY.d.ts} +1 -1
  37. package/dist/{image-resources-DQOiwOuE.d.cts → image-resources-BiA-IXgo.d.cts} +1 -1
  38. package/dist/{index-oN-v8DQ5.d.ts → index-DRqY5JVF.d.ts} +58 -12
  39. package/dist/{index-DGPSeLI0.d.cts → index-wb-iOxfh.d.cts} +58 -12
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.cts +12 -12
  42. package/dist/index.d.ts +12 -12
  43. package/dist/index.js +1 -1
  44. package/dist/layout.cjs +1 -1
  45. package/dist/layout.d.cts +334 -306
  46. package/dist/layout.d.ts +334 -306
  47. package/dist/layout.js +1 -1
  48. package/dist/output.cjs +1 -1
  49. package/dist/output.d.cts +5 -5
  50. package/dist/output.d.ts +5 -5
  51. package/dist/output.js +1 -1
  52. package/dist/{review-items-DpsqTHio.d.cts → review-items-B8tffIXj.d.cts} +1 -1
  53. package/dist/{review-items-D5SPFtsO.d.ts → review-items-bdGxFWNA.d.ts} +1 -1
  54. package/dist/{review-reads-CP106AHp.d.cts → review-reads-Bxz03tHG.d.cts} +1 -1
  55. package/dist/{review-reads-B2Ji3fVU.d.ts → review-reads-CHODU0LI.d.ts} +1 -1
  56. package/dist/{semantic-cell-selection-DJPjBWzf.d.cts → semantic-cell-selection-BPzx6DdT.d.cts} +2 -2
  57. package/dist/{semantic-cell-selection-BWhVAk5B.d.ts → semantic-cell-selection-CsHcr-yk.d.ts} +2 -2
  58. package/dist/{semantic-interaction-BjOcDB06.d.cts → semantic-interaction-BfWDD_0V.d.cts} +1 -1
  59. package/dist/{semantic-interaction-Cca1-X_a.d.ts → semantic-interaction-D-RZ9Ust.d.ts} +1 -1
  60. package/dist/{semantic-paint-Ur7pAINj.d.cts → semantic-paint-Bd7EqzXV.d.cts} +2 -2
  61. package/dist/{semantic-paint-CufpIQFw.d.ts → semantic-paint-WhVtSDJK.d.ts} +2 -2
  62. package/dist/{semantic-records-Cc1MJrhM.d.ts → semantic-records-DCt-ZwKU.d.ts} +22 -4
  63. package/dist/{semantic-records-C3Z76KeN.d.cts → semantic-records-DadVT_E1.d.cts} +22 -4
  64. package/dist/{shaped-measurer-CwlTPDJO.d.ts → shaped-measurer-B9f4A7QA.d.ts} +1 -1
  65. package/dist/{shaped-measurer-CYSK20E2.d.cts → shaped-measurer-CninrHr_.d.cts} +1 -1
  66. package/dist/store.cjs +1 -1
  67. package/dist/store.d.cts +131 -131
  68. package/dist/store.d.ts +131 -131
  69. package/dist/store.js +1 -1
  70. package/dist/{tree-op-types-XMVsJSpe.d.ts → tree-op-types-CnRb7AYo.d.ts} +22 -1
  71. package/dist/{tree-op-types-B0-sCtw-.d.cts → tree-op-types-D1vNJ7XC.d.cts} +22 -1
  72. package/dist/{tree-session-D945D43B.d.cts → tree-session-Df02ajqc.d.cts} +5 -5
  73. package/dist/{tree-session-DBJgmdmc.d.ts → tree-session-ZuBFOhIh.d.ts} +5 -5
  74. package/dist/{tree-store-C6vc8E_2.d.cts → tree-store-B_sJBMIS.d.cts} +1 -1
  75. package/dist/{tree-store-ClA-qng4.d.ts → tree-store-DgETo6Mf.d.ts} +1 -1
  76. package/package.json +2 -2
  77. package/dist/chunk-5VC5HGJA.js +0 -2
  78. package/dist/chunk-A2JIBG75.js +0 -1
  79. package/dist/chunk-FWUI7EXG.cjs +0 -15
  80. package/dist/chunk-GZWMLQJO.js +0 -18
  81. package/dist/chunk-IMMAG4QP.cjs +0 -10
  82. package/dist/chunk-JTSNJQFO.js +0 -15
  83. package/dist/chunk-KBCC66CI.js +0 -5
  84. package/dist/chunk-LJ6BY6IU.cjs +0 -18
  85. package/dist/chunk-QDBAXFIK.js +0 -2
  86. package/dist/chunk-RD266XSK.cjs +0 -2
  87. package/dist/chunk-VUJGPCPU.js +0 -10
@@ -0,0 +1,18 @@
1
+ import {f,c,d,e}from'./chunk-WU7PUTVA.js';import {y}from'./chunk-DIMEYVNS.js';import {m,Pe,zd as zd$1,ca as ca$1,gd as gd$1,xd as xd$1,nd,od as od$1,ld as ld$1,td,ud as ud$1,qd as qd$1,vd as vd$1,I,Dc as Dc$1,te,g,Ub as Ub$1,hb as hb$1,Za as Za$1,Xa as Xa$1,xc as xc$1,Kb as Kb$1,ja as ja$1,Bc as Bc$1,Bd as Bd$1,sd as sd$1,rd,pd as pd$1,Cd as Cd$1,md as md$1,Va as Va$1,Ae,ye as ye$1,De as De$1,ze,yg as yg$1,Lb as Lb$1,a,va as va$1,na as na$1,Hb as Hb$1,Ra as Ra$1,Wa as Wa$1,Gb as Gb$1,Jb as Jb$1,fc as fc$1,hc as hc$1,Ke as Ke$1,$d as $d$1,me,we,Qa as Qa$1,Oa as Oa$1,s,Ud as Ud$1,Sa as Sa$1,ac as ac$1,_b as _b$1,dc as dc$1,nc as nc$1,oc as oc$1,Ma as Ma$1,cc as cc$1,ec as ec$1,Ta as Ta$1,Cb as Cb$1,La as La$1,lc as lc$1,mc as mc$1,ha as ha$1,Vb as Vb$1,Xb as Xb$1,kc as kc$1,Ya as Ya$1}from'./chunk-CKDAK3MV.js';var nS=Symbol("validated-resolved-font"),od=64*1024*1024,ad=256,id=128*1024*1024,$t=class extends Error{name="FontResolutionError";request;code;limit;actual;diagnostic;expectedHash;actualHash;constructor(n,t,r={}){super(`Font resolution failed (${n}) for ${Yr(t)}`),this.code=n,this.request=Kr(t),this.limit=r.limit,this.actual=r.actual,this.diagnostic=r.diagnostic,this.expectedHash=r.expectedHash,this.actualHash=r.actualHash;}},gp=e=>{if(e.family.trim().length===0)throw new TypeError("Font family must not be empty");if(!Number.isInteger(e.weight)||e.weight<1||e.weight>1e3)throw new RangeError("Font weight must be an integer from 1 through 1000");if(e.style!=="normal"&&e.style!=="italic")throw new TypeError("Font style must be normal or italic")},Kr=e=>(gp(e),Object.freeze({family:e.family,weight:e.weight,style:e.style})),Yr=e=>(gp(e),JSON.stringify([e.family,e.weight,e.style])),sd=class{[nS]=true;id;identity;request;family;byteLength;hash;faceIndex;substitution;constructor(n,t){if(n.id.length===0)throw new TypeError("Resolved font id must not be empty");if(!Number.isInteger(n.faceIndex)||n.faceIndex<0)throw new RangeError("Font face index must be a non-negative integer");this.id=n.id,this.request=Kr(n.request),this.family=this.request.family,this.hash=n.hash,this.faceIndex=n.faceIndex,this.identity=`${this.hash}#${this.faceIndex}`,this.byteLength=n.byteLength,this.substitution=null,t&&(this.substitution=Object.freeze({requested:Kr(t.requested),resolved:Kr(t.resolved)})),Object.freeze(this);}get bytes(){return xi(this).slice()}},hp=new WeakSet,yp=new WeakMap,bp=new WeakMap,xp=(e,n,t,r)=>{let o=new sd(e,r);return yp.set(o,n),bp.set(o,t),hp.add(o),o},xi=e=>{qr(e);let n=yp.get(e);if(!n)throw new TypeError("Resolved font has no owned byte capability");return n},Si=e=>{qr(e);let n=bp.get(e);if(!n)throw new TypeError("Resolved font has no admitted table metadata");return n},qr=e=>{if(typeof e!="object"||e===null||!hp.has(e))throw new TypeError("Shaping requires a validated resolved font")};var Sp=(e,n)=>e[n]<<8|e[n+1],Ur=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,mp=(e,n)=>{if(n>e.byteLength-12)return {valid:false,diagnostic:"truncated sfnt header"};let t=String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3]);if(!(e[n]===0&&e[n+1]===1&&e[n+2]===0&&e[n+3]===0)&&t!=="OTTO"&&t!=="true"&&t!=="typ1")return {valid:false,diagnostic:"unsupported sfnt signature"};let o=Sp(e,n+4),a=n+12+o*16;if(!Number.isSafeInteger(a)||a>e.byteLength)return {valid:false,diagnostic:"truncated sfnt table directory"};for(let i=0;i<o;i+=1){let s=n+12+i*16,l=Ur(e,s+8),d=Ur(e,s+12);if(l>e.byteLength||d>e.byteLength-l)return {valid:false,diagnostic:"sfnt table range exceeds font bytes"}}return {valid:true}},tS=(e,n)=>{let r=String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Ur(e,12+n*4):0,o=Sp(e,r+4),a=new Set;for(let i=0;i<o;i+=1){let s=r+12+i*16;a.add(String.fromCharCode(e[s],e[s+1],e[s+2],e[s+3]));}return Object.freeze(a)},Ri=(e,n)=>{if(!Number.isSafeInteger(n)||n<0)return {valid:false,diagnostic:"invalid font face index"};if(e.byteLength<12)return {valid:false,diagnostic:"truncated sfnt header"};if(String.fromCharCode(e[0],e[1],e[2],e[3])!=="ttcf")return n!==0?{valid:false,diagnostic:"standalone sfnt has only face index zero"}:mp(e,0);let r=Ur(e,4);if(r!==65536&&r!==131072)return {valid:false,diagnostic:"unsupported TTC version"};let o=Ur(e,8),a=12+o*4;if(o===0||!Number.isSafeInteger(a)||a>e.byteLength||n>=o)return {valid:false,diagnostic:"invalid TTC face directory"};let i=Ur(e,12+n*4);return i<a?{valid:false,diagnostic:"invalid TTC face offset"}:mp(e,i)},rS=(e,n,t,r)=>{if(e.availability==="forbidden")return {kind:"forbidden"};if(e.bytes.byteLength>n)return {kind:"overLimit",actual:e.bytes.byteLength};let o=e.bytes.slice();r?.onOwnedByteCopy?.(),r?.onHash?.();let a$1=a(o);if(e.hash!==a$1)return {kind:"hashMismatch",expectedHash:e.hash,actualHash:a$1};let i=Ri(o,e.faceIndex);if(!i.valid)return {kind:"malformed",diagnostic:i.diagnostic};r?.onTableScan?.();let s=tS(o,e.faceIndex);try{let d=t(o,e.faceIndex);if(!d.valid)return {kind:"malformed",diagnostic:d.diagnostic}}catch(d){return {kind:"malformed",diagnostic:d instanceof Error?d.message:"font validator threw"}}let l={kind:"resolved",font:xp({...e,byteLength:o.byteLength},o,s)};return r?.onAdmission?.(),l},oS=e=>{if(!Number.isSafeInteger(e.epoch)||e.epoch<0)throw new RangeError("Font resource epoch must be a non-negative safe integer");if(!Number.isSafeInteger(e.maxFontBytes)||e.maxFontBytes<=0||e.maxFontBytes>od)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${od}`);if(typeof e.validateFont!="function")throw new TypeError("Font snapshot requires a validator");if(e.resources.length>ad)throw new RangeError(`Font source count must not exceed ${ad}`);let n=0;for(let l of e.resources){if(l.bytes.byteLength>id-n)throw new RangeError(`Aggregate font bytes must not exceed ${id}`);n+=l.bytes.byteLength;}let t=e.epoch,r=e.maxFontBytes,o=e.validateFont,a=new Map;for(let l of e.resources){let d=Yr(l.request);if(a.has(d))throw new TypeError(`Duplicate font resource request: ${d}`);a.set(d,rS(l,r,o,e.instrumentation));}let i=new Map;for(let l of e.substitutions??[]){let d=Yr(l.from);if(i.has(d))throw new TypeError(`Duplicate font substitution request: ${d}`);i.set(d,Kr(l.to));}return Object.freeze({epoch:t,resolve:l=>{let d=Kr(l),c=Yr(d),u=i.get(c),f=u??d,p=a.get(Yr(f));return p?p.kind==="forbidden"?new $t("forbidden",d):p.kind==="overLimit"?new $t("overLimit",d,{limit:r,actual:p.actual}):p.kind==="malformed"?new $t("malformed",d,{diagnostic:p.diagnostic}):p.kind==="hashMismatch"?new $t("hashMismatch",d,{expectedHash:p.expectedHash,actualHash:p.actualHash}):u?xp({request:p.font.request,id:p.font.id,hash:p.font.hash,faceIndex:p.font.faceIndex,byteLength:p.font.byteLength},xi(p.font),Si(p.font),{requested:d,resolved:u}):p.font:new $t("missing",d)}})};var at=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},wi=(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`)},aS=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},Rp=(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(aS(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)},ld=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),iS=e=>e?Object.freeze({requested:ld(e.requested),resolved:ld(e.resolved)}):void 0,wp=new WeakSet,cd=e=>{if(qr(e),!wp.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");wp.add(e);}},dd=e=>(cd(e),e),Ii=e=>(cd(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:ld(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:iS(e.substitution)??null})),mr=e=>{if(wi(e.shapingLibrary.name,"shaping library name"),wi(e.shapingLibrary.version,"shaping library version"),wi(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(wi(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=dd(e.font),t=e.fallbackOrder.map(dd),r=new Set;for(let o of t){let a=JSON.stringify(Ii(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:Rp(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:Rp(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Ip=e=>{let n=mr(e);return Object.freeze({font:Ii(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(Ii)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},ud=e=>JSON.stringify(Ip(e)),pr=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},Kn=e=>{try{return at(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Pp=new WeakMap,Pi=e=>{let n=Pp.get(e);if(n)return n;cd(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 Pp.set(e,t),t},vi=(e,n)=>{let t=mr(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(pr(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(l=>{pr(l.id,"glyph id"),pr(l.cluster,"glyph cluster");let d=r.get(l.outline);if(!d){if(!Number.isSafeInteger(l.outline.unitsPerEm)||l.outline.unitsPerEm<=0)throw new RangeError("Glyph outline units per em must be a positive safe integer");d=Object.isFrozen(l.outline)?l.outline:Object.freeze({path:l.outline.path,unitsPerEm:l.outline.unitsPerEm}),r.set(l.outline,d);}return Object.freeze({id:l.id,cluster:l.cluster,originX:Kn(l.originX),originY:Kn(l.originY),advanceX:Kn(l.advanceX),advanceY:Kn(l.advanceY),offsetX:Kn(l.offsetX),offsetY:Kn(l.offsetY),outline:d})}),a=e.fontSpans.map(l=>{if(pr(l.glyphStart,"font span start"),pr(l.glyphEnd,"font span end"),l.glyphEnd<=l.glyphStart||l.glyphEnd>o.length)throw new RangeError("Font span glyph range is invalid");l.fallbackIndex!==null&&pr(l.fallbackIndex,"fallback index");let d=dd(l.font);if(l.fallbackIndex===null){if(Pi(d)!==Pi(t.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=t.fallbackOrder[l.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(Pi(d)!==Pi(c))throw new TypeError("Shaped fallback font does not match shaping environment provenance")}return Object.freeze({...l,font:d})});for(let l=0;l<a.length;l+=1){let d=l===0?0:a[l-1].glyphEnd;if(a[l].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(l=>{for(let[c,u]of [["cluster text start",l.textStart],["cluster text end",l.textEnd],["cluster glyph start",l.glyphStart],["cluster glyph end",l.glyphEnd],["cluster font span",l.fontSpan]])pr(u,c);if(l.textEnd<=l.textStart||l.textEnd>e.text.length||l.glyphEnd<=l.glyphStart||l.glyphEnd>o.length)throw new RangeError("Shaped cluster range is invalid");let d=a[l.fontSpan];if(!d||l.glyphStart<d.glyphStart||l.glyphEnd>d.glyphEnd)throw new RangeError("Shaped cluster does not belong to its declared font span");return Object.freeze({...l,advance:Kn(l.advance),caretEdges:Object.freeze(l.caretEdges.map(Kn))})}),s=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:s})},sS=(e,n)=>{let t=vi(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:Ii(r.font)}))),metrics:t.metrics})};var ta=Object.freeze({name:"HarfBuzz",version:"14.3.0"}),ra=null,ea=null;function lS(){return ra?Promise.resolve():ea||(ea=import('./dist-YFULGVS3.js').then(e=>{let n=e.versionString();if(n!==ta.version)throw new Fe("shapingLibraryMismatch",{diagnostic:f(ta.version,n)});ra=e;}).catch(e$1=>{throw ea=null,e$1 instanceof Fe?e$1:c(e$1)?new Fe("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new Fe("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),ea)}function dS(){return ra!==null}function cS(){if(!ra)throw new Fe("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return ra}var Fe=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(n,t={}){super(`HarfBuzz shaping failed (${n})`,{cause:t.cause}),this.code=n,this.limit=t.limit,this.actual=t.actual,this.diagnostic=t.diagnostic;}},uS=16*1024*1024,fS=1e6,pS=1e6,mS=1e6,gS=4,hS=512,yS=1024*1024,bS=16*1024*1024,xS=32*1024*1024,SS=64*1024*1024,RS=64*1024*1024,wS=1e6,PS=1e6,IS=1e6,vS=64,TS=4096,kS=4*1024*1024,CS=64*1024*1024,OS=64*1024*1024,BS=256*1024*1024,LS=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),vp=["cmap","head","hhea","hmtx","maxp"],MS=(e,n)=>e[n]<<8|e[n+1],FS=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,ES=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?FS(e,12+n*4):0,NS=(e,n)=>{let t=ES(e,n),r=MS(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},AS=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),DS=(e,n)=>{let t=Ri(e,n);if(!t.valid)return t;let r=NS(e,n);for(let o of vp)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},_S=DS,it=(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},HS=(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 s=r?-a:a,l=Number(s);if(!Number.isSafeInteger(l))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return l},Tp=(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 at(HS(BigInt(e)*BigInt(t),BigInt(n),r))},zS=(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=>Tp(i,a,o,r)},jS=(e,n)=>{if(n.length===0)return [];let t=[...new Set(n.map(i=>i.cluster))].sort((i,s)=>i-s),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,s=a+1;for(;s<n.length&&n[s].cluster===i;)s+=1;let l=n.slice(a,s).reduce((c,u)=>c+u.advanceX,0),d=at(l);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:s,advance:d,caretEdges:Object.freeze([at(0),d]),fontSpan:0}),a=s;}return o},st=64,St=8,gr=8,GS=32,kp=st+2*St,WS=st+St+gr,$S=st+St+gr,XS=st+St+gr,Cp=st+8*St,Op=st+8*gr+St,VS=st+6*gr+St,YS=st+3*gr+2*St,KS=st+3*gr,oa=e=>st+e.length*Uint16Array.BYTES_PER_ELEMENT,pd=e=>XS+oa(e),na=e=>GS+e*St,US=(e,n)=>kp+oa(e)+WS+pd(n),qS=e=>Cp+oa(e)+na(e.length)+e.length*Op,ZS=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return Cp+oa(e.text)+na(e.glyphs.length)+e.glyphs.length*Op+na(e.clusters.length)+e.clusters.length*VS+e.clusters.reduce((t,r)=>t+na(r.caretEdges.length),0)+na(e.fontSpans.length)+e.fontSpans.length*YS+KS+[...n].reduce((t,r)=>t+pd(r.path),0)},JS=(e,n)=>kp+oa(e)+$S+n,fd=class{#n;#s;#u;#f;#p;#y;#b;#m;#g;#l;#h;#d;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#c;constructor(n,t){this.#n=n,this.#s=it(t.maxFontBytes??uS,"maximum font bytes",RS),this.#u=it(t.maxInputUtf16??fS,"maximum input UTF-16 code units",wS),this.#f=it(t.maxCodepoints??pS,"maximum input code points",PS),this.#p=it(t.maxGlyphs??mS,"maximum shaped glyphs",IS),this.#y=it(t.maxCachedFaces??gS,"maximum cached faces",vS),this.#b=it(t.maxCachedShapes??hS,"maximum cached shape results",TS),this.#m=it(t.maxOutlineBytes??yS,"maximum outline bytes",kS),this.#g=it(t.maxCachedOutlineBytes??bS,"maximum cached outline bytes",CS),this.#l=it(t.maxShapedRunBytes??xS,"maximum shaped run bytes",OS),this.#h=it(t.maxCachedShapeBytes??SS,"maximum cached shape bytes",BS),this.#d=t.instrumentation?.onFaceCacheEvent,this.#e=t.instrumentation,this.#c=new this.#n.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#t.clear(),this.#i=0,this.#r=0,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#c=void 0;}#S(n,t){let r=this.#o.get(n.identity);if(r)return this.#o.delete(n.identity),this.#o.set(n.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:n.identity})),r;let o=Si(n);for(let c of vp)if(!o.has(c))throw new Fe("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(AS(t)),i=new this.#n.Face(a,n.faceIndex),s=new this.#n.Font(i),l=s.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(l.ascender)||!Number.isSafeInteger(l.descender)||!Number.isSafeInteger(l.lineGap))throw new Fe("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(s.setScale(i.upem,i.upem),this.#o.size>=this.#y){let c=this.#o.keys().next().value;c!==void 0&&(this.#o.delete(c),this.#d?.(Object.freeze({kind:"evicted",identity:c})));}let d={identity:n.identity,blob:a,face:i,font:s,unitsPerEm:i.upem};return this.#o.set(n.identity,d),this.#d?.(Object.freeze({kind:"created",identity:n.identity})),d}#R(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),s=pd(i);if(s>this.#m)throw new Fe("outlineOverLimit",{limit:this.#m,actual:s});let l=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=US(o,i);if(d>this.#g)return this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#i})),l;for(;this.#i+d>this.#g;){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:l,bytes:d}),this.#i+=d,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),l}#x(n){if(n.length>this.#u)throw new Fe("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 Fe("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#c)throw new Fe("disposed");if(qr(n.environment.font),n.environment.font.byteLength>this.#s)throw new Fe("fontOverLimit",{limit:this.#s,actual:n.environment.font.byteLength});this.#x(n.text);let t=qS(n.text);if(t>this.#l)throw new Fe("shapedRunOverLimit",{limit:this.#l,actual:t});let r=mr(n.environment),o=JSON.stringify([n.text,n.fontSizeHalfPoints,n.bidiLevel,ud(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!==ta.name||r.shapingLibrary.version!==ta.version)throw new Fe("shapingLibraryMismatch");if(r.normalization!=="none")throw new Fe("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new Fe("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new Fe("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new Fe("unsupportedFallback");let i=xi(r.font),s=Si(r.font);if([...LS].some(d=>s.has(d)))throw new Fe("unsupportedColorFont");let l=n.text;this.#x(l);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#c;f.reset(),f.addText(l),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(([O,k])=>new this.#n.Feature(O,k));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let m=f.getGlyphInfosAndPositions();if(m.length>this.#p)throw new Fe("glyphOverLimit",{limit:this.#p,actual:m.length});let g=zS(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),b=at(0),h=at(0),x=new Map,I=JSON.stringify(Object.entries(r.variationAxes).sort(([O],[k])=>O.localeCompare(k))),w=m.map(O=>{let k=g(O.xAdvance??0),D=g(O.yAdvance??0),A={id:O.codepoint,cluster:O.cluster,originX:b,originY:h,advanceX:k,advanceY:D,offsetX:g(O.xOffset??0),offsetY:g(O.yOffset??0),outline:x.get(O.codepoint)??(()=>{let y=this.#R(d,O.codepoint,I);return x.set(O.codepoint,y),y})()};return b=at(b+k),h=at(h+D),A}),C=u.hExtents(),M=vi({text:l,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:w,clusters:jS(l,w),fontSpans:w.length===0?[]:[{glyphStart:0,glyphEnd:w.length,font:r.font,fallbackIndex:null}],metrics:{ascent:g(C.ascender),descent:g(-C.descender),lineGap:g(C.lineGap)}},r),P=ZS(M);if(P>this.#l)throw new Fe("shapedRunOverLimit",{limit:this.#l,actual:P});let B=JS(o,P);if(B>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),M;for(;this.#t.size>=this.#b||this.#r+B>this.#h;){let O=this.#t.keys().next().value;if(O===void 0)break;let k=this.#t.get(O);this.#t.delete(O),this.#r-=k.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:M,bytes:B}),this.#r+=B,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),M}catch(d){throw d instanceof Fe?d:new Fe("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},QS=(e={})=>new fd(cS(),e);var re=(e,n,t)=>e>=n&&e<=t,Ti=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},eR=e=>{if(re(e,65313,65338)||re(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(re(e,1424,1535)||re(e,64285,64335))return {slot:"cs",script:"Hebr"};if(re(e,1536,1791)||re(e,1872,1919)||re(e,2160,2207)||re(e,2208,2303)||re(e,64336,65023)||re(e,65136,65279)||re(e,126464,126719))return {slot:"cs",script:"Arab"};if(re(e,4352,4607)||re(e,11904,12351)||re(e,12352,12543)||re(e,12544,12687)||re(e,12784,12799)||re(e,13312,19903)||re(e,19968,40959)||re(e,44032,55215)||re(e,63744,64255)||re(e,65382,65437)||re(e,65440,65500)||re(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(re(e,2304,2431)||re(e,43232,43263))return {slot:"cs",script:"Deva"};if(re(e,2432,2559))return {slot:"cs",script:"Beng"};if(re(e,880,1023)||re(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(re(e,1024,1327)||re(e,7296,7311)||re(e,11744,11775)||re(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(re(e,3584,3711))return {slot:"cs",script:"Thai"};if(re(e,6016,6143)||re(e,6624,6655))return {slot:"cs",script:"Khmr"};if(re(e,768,879)||re(e,6832,6911)||re(e,7616,7679)||re(e,8400,8447)||re(e,8192,8303)||re(e,65056,65071)||e<=47||re(e,58,64)||re(e,91,96)||re(e,123,191)||e===5760||re(e,8192,11263)||re(e,65024,65039)||re(e,65280,65381)||re(e,65438,65439)||re(e,65501,65535)||re(e,126976,129791)||re(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(re(e,192,687)||re(e,7424,7551)||re(e,7552,7615)||re(e,7680,7935)||re(e,11360,11391)||re(e,42784,43007)||re(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Ti(e)};function nR(e,n,t){let r=[];for(let s=0;s<e.length;){let l=e.codePointAt(s),d=s+(l>65535?2:1);r.push({from:s,to:d,classified:eR(l)}),s=d;}let o=null;for(let s of r)s.classified?o=s.classified:o&&(s.classified=o);o=null;for(let s=r.length-1;s>=0;s-=1){let l=r[s];l.classified?o=l.classified:o&&(l.classified=o);}let a=[],i=r.every(({from:s})=>e.codePointAt(s)<=127)?"ascii":"hAnsi";for(let s of r){let l=t.levels[n+s.from]??0,d=(l&1)===1?"rtl":"ltr",c=s.classified??{slot:i,script:"Zyyy"},u=a.at(-1);u&&u.to===s.from&&u.bidiLevel===l&&u.slot===c.slot&&u.script===c.script?a[a.length-1]={...u,to:s.to}:a.push({from:s.from,to:s.to,direction:d,bidiLevel:l,script:c.script,slot:c.slot});}return a}var tR="und";function rR(){return typeof Intl.Segmenter=="function"}function oR(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function aR(){let e=new(oR())("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 hd=aR(),yd=hd,Bp=0;function bd(){return Bp}var Zr=null,hr=null,ki=null,aa=null;function Un(e){if(Zr===e&&hr)return hr;if(ki===e&&aa){let t=aa;return ki=Zr,aa=hr,Zr=e,hr=t,t}let n=yd.segment(e);return ki=Zr,aa=hr,Zr=e,hr=n,n}function iR(e){yd=e,Lp();}function sR(){yd=hd,Lp();}function Lp(){Bp+=1,Zr=null,hr=null,ki=null,aa=null,md=null,Ci=null,gd=0;}function lR(e){return Un(e).length}var md=null,Ci=null,gd=0;function dR(e){if(md===e&&Ci)return {offsets:Ci,count:gd};let n=Un(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,md=e,Ci=t,gd=n.length,{offsets:t,count:n.length}}function Oi(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=dR(e);return r[t]}function cR(e,n){let t=Un(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 xd(e){let n=new Set([0,e.text.length]);for(let r of Un(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 Bi(e,n){return xd(e).includes(n)}function uR(e,n){return Bi(e,n)}function fR(e,n,t){return t>=n&&Bi(e,n)&&Bi(e,t)}function pR(e){let n=Un(e.text);return xd(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var Rd="und";function Np(){return typeof Intl.Segmenter=="function"}function mR(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Rd})`);return e}function Ap(){let e=new(mR())(Rd,{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 gR=/^[\p{L}\p{N}']$/u,hR=/^\s$/u;function Mp(e){return gR.test(e)}function Fp(e){return hR.test(e)}function Sd(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function Dp(e){let n=Un(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(Fp(o.text)){let a=r+1;for(;a<n.length&&Fp(n[a].text);)a+=1;t.push(Sd(n,r,a,false)),r=a;continue}if(Mp(o.text)){let a=r+1;for(;a<n.length&&Mp(n[a].text);)a+=1;t.push(Sd(n,r,a,true)),r=a;continue}t.push(Sd(n,r,r+1,false)),r+=1;}return t}function _p(){return {segment:Dp}}function Hp(e={}){let n=e.isIntlAvailable??Np,t=e.createIntlBoundary??Ap,r=e.createFallbackBoundary??_p;if(!n())return r();try{return t()}catch{return r()}}var Ep;function zp(){return Ep??=Hp(),Ep}function yR(e,n=zp()){return n.segment(e)}function bR(e,n){return n.map(t=>({graphemeFrom:Oi(e,t.utf16From),graphemeTo:Oi(e,t.utf16To),wordLike:t.wordLike}))}var jp={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},Id=Object.keys(jp),Gp=Id.filter(e=>jp[e]==="coarse-gate"),Li=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},Jr=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},xR={resourceEpoch:Li,configEpoch:Li,extensionFingerprint:Jr,shapingHash:Jr,producerVersion:Li},SR=(e,n)=>{xR[n](e[n],n);},Qr=e=>{for(let n of Id)SR(e,n);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},RR=(e,n)=>{let t=Qr(e),r=Qr(n),o=Id.filter(a=>t[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},wd=e=>{let n=e.map(({key:t,fingerprint:r})=>(Jr(t,"resource dependency key"),Jr(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)},wR=e=>(Li(e.revision,"revision"),Jr(e.dependencyFingerprint,"dependencyFingerprint"),Jr(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:wd(e.resourceDependencies),...Qr(e)})),PR=(e,n)=>{let t=wd(e),r=wd(n),o=Math.max(t.length,r.length);for(let a=0;a<o;a+=1){let i=t[a],s=r[a];if(i?.key!==s?.key||i?.fingerprint!==s?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??s.key}}return null};function IR(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=PR(e.resourceDependencies,n.resourceDependencies);if(t)return t;for(let r of Gp)if(e[r]!==n[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var Pd=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=IR(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:wR(r)});}evictEpoch(n){let t=Qr(n),r=0;for(let[o,a]of this.entries){let i=a.provenance;Gp.some(s=>i[s]!==t[s])&&(this.entries.delete(o),r+=1);}return r}evictResources(n,t){let r=Qr(n),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(l=>t.get(l.key)!==l.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function je(e,n=false){return Nn(e.fragments,n)}var Wp=new WeakMap;function Nn(e,n=false){let t=Wp.get(e),r=n?"withRepeats":"withoutRepeats",o=t?.[r];if(o)return o;let a=[],i=s=>{for(let l of s){if(l.kind==="paragraph"){a.push(l);continue}for(let d of l.rows)if(!(d.isHeaderRepeat&&!n))for(let c of d.cells)i(c.blocks);}};return i(e),t||(t={},Wp.set(e,t)),t[r]=a,a}function vd(e){let n=[];for(let t of e.pages)for(let r of je(t))n.push(...r.lines);return n}function vR(e){return e.anchoredDrawings??[]}var $p=16;function ia(e,n){let t=o=>{if(o.kind==="table"){for(let a of o.rows)for(let i of a.cells)for(let s of i.blocks)t(s);return}for(let a of o.lines)for(let i of a.drawings??[])n(i);},r=(o,a)=>{if(!(a>$p)){for(let i of o.anchoredDrawings??[])n(i),i.textboxStory&&r(i.textboxStory,a+1);for(let i of o.fragments)t(i);}};r(e,0);}function Td(e,n){let t=(r,o)=>{if(!(o>$p)){for(let a of r.anchoredDrawings??[])a.textboxStory&&t(a.textboxStory,o+1);for(let a of Nn(r.fragments,true))n(a);}};t(e,0);}function Xp(e,n){let t=[];for(let r of e.pages)for(let o of je(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function sa(e,n,t,r){for(let o of r??vd(e)){let a=o.range.paragraphId===n?o.range.start:Number.NaN,i=o.range.paragraphId===n?o.range.end:Number.NaN;for(let s of o.spans)s.range.paragraphId===n&&(a=Number.isNaN(a)?s.range.start:Math.min(a,s.range.start),i=Number.isNaN(i)?s.range.end:Math.max(i,s.range.end));for(let s of o.drawings??[])s.paragraphId===n&&(a=Number.isNaN(a)?s.start:Math.min(a,s.start),i=Number.isNaN(i)?s.start+1:Math.max(i,s.start+1));if(!Number.isNaN(a)&&t>=a&&t<=i)return o}return null}function Mi(e){return e.contentControls??[]}function la(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 Fi(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 da=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});var Vp=1,Ei=1;function eo(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 TR=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function kR(e){return TR.has(e)}function Yp(e,n){return kR(e)?eo(n).extentPt:n}function Cd(e){let n=false;for(let t of e){if(t.localName!=="pageBreakBefore")continue;let r=t.attributes?.val;n=r===void 0||Ai(r);}return n}var Up=31680/20,ua=12,qp=3168,Zp=14,to=Object.freeze({rule:"auto",value:240}),CR=132,OR=1584,Jp=["top","left","bottom","right","between","bar"],BR=Object.freeze({}),LR=/^[0-9A-Fa-f]{6}$/,MR=new Set(["nil","none"]);function Ni(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function kd(e,n){return !Number.isFinite(e)||e<=0?0:e>n?n:e}function Kp(e){let n=Ni(e,true);return n===null?0:kd(Dc$1(Bc$1(n)),Up)}function Ai(e){return e!=="0"&&e!=="false"&&e!=="off"}function FR(e){return e===void 0||e==="auto"?null:LR.test(e)?e.toUpperCase():null}function ca(e,n){return e.attributes.find(t=>t.localName===n)?.value}function lt(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function hC(e,n){let t=null;for(let r of e)r.localName===n&&(t={...t??{},...r.attributes??{}});return t}function Od(e,n){let t=0,r=0,o=false,a=false;for(let i of e){if(i.localName!=="spacing")continue;let s=i.attributes?.before,l=i.attributes?.after;s!==void 0&&(t=Kp(s)),l!==void 0&&(r=Kp(l));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=Ai(d)),c!==void 0&&(a=Ai(c));}if(o||a){let i=n?.inList||n?.inTableCell?0:Zp;o&&(t=i),a&&(r=i);}return {before:t,after:r}}function Bd(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 s=a.attributes?.line;if(s!==void 0){let l=Ni(s,true);l!==null&&(t=l);}}if(t===void 0)return to;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,CR)*240}:to}let o=t/20;return o>0?{rule:r,value:Math.min(o,OR)}:to}function Ld(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 Md(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r===void 0||Ai(r);}return n}function no(e){if(!e)return;let n=ca(e,"val");if(!n||MR.has(n))return;let t=Ni(ca(e,"sz")),r=t===null?.5:kd(t/8,ua)||.5,o=Ni(ca(e,"space")),a=o===null?0:kd(o,qp),i=ca(e,"shadow"),s=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:FR(ca(e,"color")),widthPt:r,spacePt:a,...s?{shadow:true}:{}}}function Qp(e){let n=no(lt(e,"top")),t=no(lt(e,"left")??lt(e,"start")),r=no(lt(e,"bottom")),o=no(lt(e,"right")??lt(e,"end")),a=no(lt(e,"between")),i=no(lt(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function Rt(e){if(!e||e.kind==="textValue")return {};let n=lt(e,"pBdr");return n?Qp(n):{}}function fa(e){let n=BR;for(let t of e){if(!t||t.kind==="textValue")continue;let r=lt(t,"pBdr");r&&(n=Qp(r));}return n}function In(e){return Yp(e.val,e.widthPt)}function Xt(e){return e?e.spacePt+In(e):0}function ER(e){return Xt(e)}function Fd(e){let n=[];for(let t of Jp){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 ro(e,n){return Math.max(e,n)-n}function Ed(e,n,t,r){return t&&!r?0:ro(e,n)}var NR=/^[0-9A-Fa-f]{6}$/;function Di(e){if(!(e===void 0||e==="auto"||e==="nil")&&NR.test(e))return e.toUpperCase()}function pa(e){if(e&&e.val!=="nil")return Di(e.fill)}function Nd(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return pa(n)}function Ad(e){let n;for(let t of e)t.localName==="shd"&&(n=pa(t.attributes));return n}function ma(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 AR=64,DR=31680,_R=720,HR=36,Dd=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),oo=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),zR=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),jR=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function ga(e){return e.kind!=="textValue"}function _i(e,n){return e.attributes.find(t=>t.localName===n)?.value}function _d(e,n){for(let t of e.children)if(ga(t)&&t.localName===n)return t}function em(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function GR(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function nm(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!ga(r)||r.localName!=="tab")continue;let o=GR(em(_i(r,"pos"))??NaN);if(o===null)continue;let a=_i(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=zR.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let s=_i(r,"leader");e.set(o,{alignment:i,...s!==void 0&&jR.has(s)?{leader:s}:{}});}}function tm(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,...WR(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function WR(e){return e.leader?{leader:e.leader}:{}}function Hd(e){let n=new Map;for(let t of e)!t||!ga(t)||nm(n,_d(t,"tabs"));return tm(n)}function zd(e){if(!e||!ga(e))return oo;let n=new Map;return nm(n,_d(e,"tabs")),tm(n)}function ha(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function $R(e){if(!e||!ga(e))return 36;let n=_d(e,"defaultTabStop");if(!n)return 36;let t=em(_i(n,"val"));return t===null||t<=0||t>31680?36:t/20}function ao(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 jd(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 yr(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 Hi=4,rm=4096,Vt=64,Xd=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),XR=/\s*\\\*\s*MERGEFORMAT\s*$/i;function io(e){if(e.length>nc$1)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>nc$1?null:n.replace(XR,"").trim()}function br(e){let n=io(e);return n==="PAGE"||n==="NUMPAGES"||n==="SECTIONPAGES"?n:null}function vn(e,n){return cc$1(e,n)}function xr(e){return dc$1(e)}function Vd(){return {nodes:0,exhausted:false}}function wt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>rm?(e.exhausted=true,false):true)}function ba(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function ya(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="idle",e.inner.length=0;}function zi(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function VR(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function xa(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="instruction",e.inner.length=0),e.nesting+=1,e.nesting>Hi?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function so(e){return e.nesting<2||e.nesting>Hi?null:e.inner[e.nesting-2]??null}function om(e){if(e.nesting===1)return e.phase==="instruction";let n=so(e);return n!==null&&!n.separated}function Wd(e,n){if(!om(e))return false;if(e.nesting===1)return n?!e.deletedInstructionOverflow:!e.instructionOverflow;let t=so(e);return n?!t.deletedOverflow:!t.overflow}function am(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let n=so(e);n&&(n.sawLive=true);}function $d(e,n){if(e.nesting===1){n?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let t=so(e);t&&(n?(t.deletedOverflow=true,t.deletedInstruction=""):(t.overflow=true,t.instruction=""));}function Gd(e){$d(e,false),$d(e,true);}function YR(e,n,t=false){if(!Wd(e,t))return;let r=so(e);t||am(e);let o=r?t?r.deletedInstruction:r.instruction:t?e.deletedInstruction:e.instruction;if(o.length+n.length>nc$1){$d(e,t);return}r?t?r.deletedInstruction=o+n:r.instruction=o+n:t?e.deletedInstruction=o+n:e.instruction=o+n;}function Sa(e,n,t,r){if(!om(e))return;let o=ec$1(n);if(o||am(e),!Wd(e,o))return;if(r>Vt){Gd(e);return}let a=[],i=n.kind==="textValue"?[]:n.children??[];for(let s=i.length-1;s>=0;s-=1)a.push({node:i[s],depth:r+1});for(;a.length>0;){let s=a.pop();if(!wt(t)){Gd(e);return}if(s.depth>Vt){Gd(e);return}if(s.node.kind==="textValue"){if(YR(e,s.node.value,o),!Wd(e,o))return;continue}let l=s.node.children??[];for(let d=l.length-1;d>=0;d-=1)a.push({node:l[d],depth:s.depth+1});}}function Ra(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=zi(e);return r.overflow?null:br(r.instruction)}let n=so(e);if(!n||n.separated)return null;n.separated=true;let t=VR(n);return t.overflow?null:br(t.instruction)}function wa(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&ya(e);}function im(e){return e.phase==="instruction"&&e.nesting>=1}function sm(e){return e.phase==="result"&&e.nesting>=1}function Yd(e){let n=false,t=false,r=false,o=Vd(),a=ba(),i=()=>n&&t&&r,s=p=>{p==="PAGE"?n=true:p==="NUMPAGES"?t=true:r=true;},l=false,d=[],c=(p,m)=>{if(p.kind!=="runProperties"){if(vn(p,"begin")){xa(a),a.nestingOverflow&&(l=true);return}if(xr(p)){Sa(a,p,o,m);return}if(vn(p,"separate")){let g=a.nesting,b=a.phase,h=Ra(a);if(l)return;h&&(g<=1||b==="result")&&d.push(h);return}if(vn(p,"end")&&(wa(a),a.nesting===0)){if(!l)for(let g of d)s(g);d.length=0;}}},u=(p,m)=>{if(p.kind==="run")for(let g of p.children){if(!wt(o))return;if(c(g,m+1),(g.kind==="drawing"||g.kind==="generic")&&!xr(g)&&"children"in g&&g.children.length>0){let b={...a,inner:a.inner.map(I=>({...I}))},h=l,x=d;d=[],f(g,m+1),Object.assign(a,b),l=h,d=x;}if(i()||o.exhausted)return}},f=(p,m)=>{if(!i()&&wt(o)&&!(m>Vt)&&p.kind!=="textValue"){if(p.kind==="paragraph"){ya(a),l=false,d.length=0;for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return;ya(a),l=false,d.length=0;return}if(p.kind==="run"){u(p,m);return}if(fc$1(p)){let g=br(hc$1(p)??"");if(g){s(g);return}}for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return}};return f(e,0),!n&&!t&&!r?Xd:{hasPage:n,hasNumPages:t,hasSectionPages:r}}var KR=64,UR=64,qR=[{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 Pt(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function Yt(e){return String(Pt(e))}function lm(e){let n=Pt(e);return n<10?`0${n}`:String(n)}function Kd(e){let n=Pt(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of qR)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function dm(e){return Kd(e).toLowerCase()}function Ud(e){let n=Pt(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 cm(e){return Ud(e).toLowerCase()}function ZR(e){let n=Pt(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 JR(e){return Pt(e).toString(16).toUpperCase()}function QR(e){let n=["*","\u2020","\u2021","\xA7"],t=Pt(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,ew);return n[r].repeat(o)}var ew=8,ji=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],nw=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Gi(e){let n=Pt(e);if(n<20)return ji[n];if(n<100){let r=n%10;return nw[Math.floor(n/10)]+(r===0?"":`-${ji[r]}`)}if(n<1e3){let r=n%100;return `${ji[Math.floor(n/100)]} hundred${r===0?"":` ${Gi(r)}`}`}let t=n%1e3;return `${ji[Math.floor(n/1e3)]} thousand${t===0?"":` ${Gi(t)}`}`}function um(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function tw(e){return um(Gi(e))}var rw=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function ow(e){let n=rw.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function aw(e){let n=Gi(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return um(r+ow(n.slice(t+1)))}function It(e,n){switch(e){case "decimal":return Yt(n);case "decimalZero":return lm(n);case "upperRoman":return Kd(n);case "lowerRoman":return dm(n);case "upperLetter":return Ud(n);case "lowerLetter":return cm(n);case "ordinal":return ZR(n);case "cardinalText":return tw(n);case "ordinalText":return aw(n);case "hex":return JR(n);case "chicago":return QR(n);case "numberInDash":return `- ${Yt(n)} -`;case "none":case "bullet":return "";default:return Yt(n)}}function qd(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 s=r[a+1];if(s>="1"&&s<="9"){let l=Number(s)-1,d=t[l]??"decimal",c=n[l]??1,u=d==="bullet"?"":It(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}var $i="0";function Jd(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 Yt(t);let o=It(r,t);return o.length>0?o:Yt(t)}function vt(e,n){if(e==="PAGE")return Jd(n.pageNumber,n.format);let t=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;return !Number.isFinite(t)||t<0?"":Yt(Math.floor(t))}function Kt(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function Qd(e,n=Xd){if(!e||!Kt(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 lo(e,n,t,r){let o=false,a=e.map((i,s)=>{let l=n+s,d=i.pageFieldSource;return d&&d.pageNumber===l&&d.sectionPageCount===t&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:l,sectionPageCount:t,...r?{format:r}:{}}})});return o?a:e}function iw(e){for(let n of e.spans)if(n.fieldAtom?.pageField)return true;return false}function fm(e){if(e.kind==="paragraph"){for(let n of e.lines)if(iw(n))return true;return false}for(let n of e.rows)for(let t of n.cells)for(let r of t.blocks)if(fm(r))return true;return false}function ec(e,n){let t=n,r=false;for(let o of e)t=Math.max(t,o.box.y+o.box.height),!r&&fm(o)&&(r=true);return {usedBottom:t,hasBodyPageFields:r}}function sw(e,n){let t=null;for(let r=0;r<e.spans.length;r+=1){let o=e.spans[r],a=o.fieldAtom?.pageField?.kind;if(!a)continue;let i=vt(a,n);i!==o.text&&(t||(t=e.spans.slice()),t[r]={...o,text:i});}return t?{...e,spans:t}:e}function pm(e,n){let t=null;for(let r=0;r<e.length;r+=1){let o=e[r],a=o;if(o.kind==="paragraph"){let i=null;for(let s=0;s<o.lines.length;s+=1){let l=o.lines[s],d=sw(l,n);d!==l&&(i||(i=o.lines.slice()),i[s]=d);}i&&(a={...o,lines:i});}else {let i=null;for(let s=0;s<o.rows.length;s+=1){let l=o.rows[s],d=null;for(let c=0;c<l.cells.length;c+=1){let u=l.cells[c],f=pm(u.blocks,n);f!==u.blocks&&(d||(d=l.cells.slice()),d[c]={...u,blocks:f});}d&&(i||(i=o.rows.slice()),i[s]={...l,cells:d});}i&&(a={...o,rows:i});}a!==o&&(t||(t=e.slice()),t[r]=a);}return t??e}var Wi=new WeakMap;function lw(e,n){return e.pageNumber===n.pageNumber&&e.pageCount===n.pageCount&&(e.sectionPageCount??e.pageCount)===(n.sectionPageCount??n.pageCount)&&e.format===n.format}function nc(e,n,t){let r=Wi.get(e);r&&Wi.set(n,{context:r.context,projector:r.projector,dy:r.dy+t});}var Zd=new WeakMap;function Ut(e){let n=e.pages.length;if(n===0)return e;let t=false,r=e.pages.map(o=>{let a=Zd.get(o);if(a&&a.pageCount===n)return a.result!==o&&(t=true),a.result;let i=o.pageFieldSource,s={pageNumber:i?.pageNumber??o.index+1,pageCount:n,sectionPageCount:i?.sectionPageCount??n,...i?.format?{format:i.format}:{}},l=p=>{if(!p)return p;let m=p.pageFieldProjector,g=0;if(!m){let C=Wi.get(p);if(!C||lw(C.context,s))return p;m=C.projector,g=C.dy;}t=true;let b=m(s),{pageFieldProjector:h,box:x,...I}=b,w={...I,box:g===0?x:{...x,y:x.y+g}};return Wi.set(w,{context:s,projector:m,dy:g}),w},d=l(o.header),c=l(o.footer),u=o.hasBodyPageFields===false?o.fragments:pm(o.fragments,s);if(d===o.header&&c===o.footer&&u===o.fragments)return Zd.set(o,{pageCount:n,result:o}),o;u!==o.fragments&&(t=true);let f={...o,...d!==void 0?{header:d}:{},...c!==void 0?{footer:c}:{},...u!==o.fragments?{fragments:u}:{}};return Zd.set(o,{pageCount:n,result:f}),f});return t?{revision:e.revision,pages:r}:e}var dw=`
2
+ \r`,cw=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function mm(e,n){let t=n;for(;t<e.length&&dw.includes(e[t]);)t+=1;return t}function gm(e,n){if(e[n]==='"'){let r=n+1;for(;r<e.length&&e[r]!=='"';)r+=1;return r<e.length?r+1:r}let t=n;for(;t<e.length&&!`
3
+ \r"`.includes(e[t]);)t+=1;return t}function Xi(e){if(e.length===0||e.length>256)return null;let n=mm(e,0);if(e[n]==='"')return null;let t=gm(e,n),r=e.slice(n,t).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=mm(e,t);if(o>=e.length)return null;let a=gm(e,o),i=e.slice(a).trim();for(;;){let s=i.replace(cw,"").trimEnd();if(s===i)break;i=s;}if(i[0]==='"'){let s=i.indexOf('"',1);s===-1?i=i.slice(1):s===i.length-1&&(i=i.slice(1,-1));}return i.length===0?null:{display:i}}var hm=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),uw=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function fw(e){let n=e;for(;;){let t=n.replace(uw,"").trimEnd();if(t===n)return n;n=t;}}function pw(e){let n=e.trimStart();if(n.length===0)return null;if(n[0]==='"'){let o=n.indexOf('"',1),a=o===-1?n.slice(1):n.slice(1,o);return a.length>0?a:null}let t=n.search(/\s/),r=t===-1?n:n.slice(0,t);return r.length>0?r:null}function Vi(e){let n=io(e);if(n===null||n.length===0)return null;let t=fw(n),r=hm[t];if(r)return {property:r};if(!t.startsWith("DOCPROPERTY"))return null;let o=t.slice(11);if(o.length===0||!/^\s/.test(o))return null;let a=pw(o);if(a===null)return null;let i=hm[a];return i?{property:i}:null}function Yi(e,n){if(!n)return null;let t=n[e.property];return t!==void 0&&t.length>0?t:null}var mw=nc$1,gw=2048,hw=256;function yw(e){let n=[],t=0;for(;t<e.length;){let r=e[t];if(r===" "||r===" "||r===`
4
+ `||r==="\r"){t+=1;continue}if(r==='"'){let a=t+1;for(;a<e.length&&e[a]!=='"';)a+=1;n.push({value:e.slice(t+1,a),quoted:true}),t=a<e.length?a+1:a;continue}let o=t;for(;o<e.length&&!`
5
+ \r"`.includes(e[o]);)o+=1;n.push({value:e.slice(t,o),quoted:false}),t=o;}return n}var bw=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function Ki(e){if(e.length===0||e.length>mw)return null;let n=yw(e);if(n.length<2)return null;let t=n[0];if(t.quoted||t.value.toUpperCase()!=="HYPERLINK")return null;let r=null,o=false,a=null,i=false,s=null,l=false;for(let d=1;d<n.length;d+=1){let c=n[d];if(!c.quoted&&c.value.startsWith("\\")){let u=c.value.toLowerCase();if(!bw.has(u))continue;let f=n[d+1];if(!f||!f.quoted&&f.value.startsWith("\\"))continue;d+=1;let p=f.value.length>0&&f.value.length<=hw;u==="\\l"?i||(i=true,p&&(a=f.value)):u==="\\o"&&(l||(l=true,p&&(s=f.value)));continue}o||(o=true,c.value.length>0&&c.value.length<=gw&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:s}}function Pa(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"?Xb$1(e):""}function co(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 Ui(e,n,t){let r=co(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}var dt=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}),xw=/^[0-9A-Fa-f]{6}$/;function qt(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function Ia(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function ym(e){return e===void 0||e==="auto"?null:xw.test(e)?e.toUpperCase():null}function bm(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function Ee(e,n){let t={...dt};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?bm(o?.asciiTheme,n)??bm(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=Ia(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=ym(r.attributes?.val);break}case "b":t.bold=qt(r);break;case "i":t.italic=qt(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!qt(r)?null:{variant:o,color:ym(r.attributes?.color)};break}case "strike":t.strike=qt(r);break;case "dstrike":t.doubleStrike=qt(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=pa(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=Ia(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=qt(r);break;case "smallCaps":t.smallCaps=qt(r);break;case "spacing":{let o=Ia(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=Ia(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=Ia(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=qt(r);break;}return t}function Zt(e,n){return n.caps?e.toUpperCase():e}function An(e,n,t){return t.measure(Zt(e,n),n)}function Sw(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 tc(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var Rw=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),xm=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),Sm=new Map([[167,"\u25AA"],[183,"\u2022"]]),Rm=new Map([["symbol",Rw],["wingdings",xm],["wingdings 2",Sm],["wingdings 3",Sm],["webdings",xm]]),ww=64;function va(e){return !e||e.length>ww?false:Rm.has(e.toLowerCase())}function uo(e,n,t){if(e.length===0||!va(n))return e;let r=Rm.get(n.toLowerCase());if(t?.(n)===true)return e;let o="",a=false;for(let i of e){let s=i.codePointAt(0);if(s>=61440&&s<=61695){let l=r.get(s-61440);if(l!==void 0){o+=l,a=true;continue}}o+=i;}return a?o:e}var Jt=61440,Ta=61695,rc=128;function fo(e){return e.kind==="generic"&&e.namespaceUri===ca$1&&e.localName==="sym"}function wm(e,n){if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes)if(t.localName===n&&(t.namespaceUri===ca$1||t.namespaceUri===""))return t.value}}function Pw(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function qi(e){return !(!Number.isInteger(e)||e<32||e>1114111||e>=127&&e<=159||e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65534)===65534||e===65532)}function po(e){if(!fo(e))return null;let n=Pw(wm(e,"char"));if(n===null)return null;let t=wm(e,"font"),r=t&&t.length<=rc?t:null,o=va(r),a=o&&n<=255&&n+Jt<=Ta?n+Jt:n;if(o&&a>=Jt&&a<=Ta){let i=uo(String.fromCodePoint(a),r),s=i.codePointAt(0)<Jt;return {text:i,font:r,unicode:s}}return qi(n)?{text:String.fromCodePoint(n),font:r,unicode:n<57344||n>63743}:null}function oc(e,n,t){if(!n.font)return {props:e,style:Ee(e,t)};let r=[...e,{localName:"rFonts",attributes:{ascii:n.font,hAnsi:n.font}}];return {props:r,style:Ee(r,t)}}var Iw=256,vw=9;function Tw(e){let n=[],t=0;for(;t<e.length;){let r=e[t];if(r===" "||r===" "||r===`
6
+ `||r==="\r"){t+=1;continue}if(r==='"'){let a=t+1;for(;a<e.length&&e[a]!=='"';)a+=1;n.push({value:e.slice(t+1,a),quoted:true}),t=a<e.length?a+1:a;continue}let o=t;for(;o<e.length&&!`
7
+ \r"`.includes(e[o]);)o+=1;n.push({value:e.slice(t,o),quoted:false}),t=o;}return n}function kw(e){if(e.quoted)return null;let n=e.value;if(n.length===0||n.length>vw)return null;let t;if(n.startsWith("0x")||n.startsWith("0X")){let r=n.slice(2);if(!/^[0-9A-Fa-f]{1,6}$/.test(r))return null;t=Number.parseInt(r,16);}else {if(!/^\d{1,7}$/.test(n))return null;t=Number.parseInt(n,10);}return t>1114111||t>=55296&&t<=57343?null:t}function Zi(e){if(e.length===0||e.length>Iw)return null;let n=Tw(e);if(n.length<2)return null;let t=n[0];if(t.quoted||t.value.toUpperCase()!=="SYMBOL")return null;let r=kw(n[1]);if(r===null)return null;let o=null,a=null,i=false;for(let s=2;s<n.length;s+=1){let l=n[s];if(l.quoted||!l.value.startsWith("\\"))continue;let d=l.value.toLowerCase();if(d==="\\f"){let c=n[s+1];c&&c.value.length>0&&c.value.length<=rc&&(c.quoted||!c.value.startsWith("\\"))&&(o=c.value,s+=1);continue}if(d==="\\s"){let c=n[s+1];if(c&&(c.quoted||!c.value.startsWith("\\"))&&(s+=1,/^\d{1,3}$/.test(c.value))){let u=Number(c.value);u>=1&&u<=999&&(a=u);}continue}d==="\\u"&&(i=true);}return {code:r,font:o,sizePt:a,unicode:i}}function Ji(e,n,t){let r=[];e.font&&r.push({localName:"rFonts",attributes:{ascii:e.font,hAnsi:e.font}}),e.sizePt!==null&&r.push({localName:"sz",attributes:{val:String(e.sizePt*2)}});let o=r.length>0?[...n,...r]:n,a=Ee(o,t);if(e.unicode)return qi(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(va(i)){let s=e.code<=255&&e.code+Jt<=Ta?e.code+Jt:e.code;if(s>=Jt&&s<=Ta)return {text:uo(String.fromCodePoint(s),i),props:o,style:a}}return qi(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function Qi(){let e=null,n=0,t=false,r=false,o=()=>{e=null,n=0,t=false,r=false;};return {get active(){return e!==null},onSeparate(a,i){e===null&&a!==null&&(e=a,n=i,t=false,r=false);},onEnd(a,i){if(e===null||a>n)return null;let s=a===n,d=s&&i&&!(t&&!r)?vt(e,i):"";return o(),s?d:null},reset:o,noteResult(a){t=true,a&&(r=true);}}}var un="all-markup",Pm=Object.freeze([]),Cw=32,Ow={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function Tt(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 ns(e){if(e.kind==="textValue")return null;let n=Ow[e.kind];if(n===void 0)return null;let t=Tt(e,"date");return {kind:n,id:Tt(e,"id")??"",author:Tt(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function ts(e,n){return e.length===0?[n]:[...e,n]}function rs(e){return e.kind!=="textValue"&&ha$1(e.kind)}var mo=Cw;function en(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 go(e){if(e.kind==="textValue")return es;let n=e.children.find(o=>o.kind==="paragraphProperties");if(!n||n.kind==="textValue")return es;let t=n.children.find(o=>o.kind==="runProperties");if(!t||t.kind==="textValue")return es;let r=[];for(let o of t.children){if(o.kind==="textValue"||o.namespaceUri!==ca$1)continue;let a=Bw[o.localName];if(a===void 0)continue;let i=Tt(o,"date");r.push({kind:a,id:Tt(o,"id")??"",author:Tt(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:es}var Bw={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function ka(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!==ca$1||r.localName!=="rPrChange")continue;let o=Tt(r,"date");return {kind:"format",id:Tt(r,"id")??"",author:Tt(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var es=Object.freeze([]);function ac(e){return e.find(n=>Im(n))??e[0]}function Im(e){return e.kind==="delete"||e.kind==="moveFrom"}function os(e,n){let t=ac(e);return {...t?{markRevisions:e,markRevision:t}:{},...n?{markFormatRevision:n}:{}}}function Lw(e){return ac(go(e))??null}function Mw(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 ct(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}function Fw(e){let{simple:n,depth:t,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:s,cascadeRuns:l,themeFonts:d}=e,c="",u,f,p=false,m=ba(),g=Qi(),b=(x,I)=>{u||(u=x,f=I);},h=(x,I,w)=>{if(!(x.kind==="textValue"||I>Vt)){for(let C of x.children)if(C.kind!=="textValue"){if(!wt(o))return;if(C.kind==="run"){let M=Ui(C,s,l),P=Ee(M,d);for(let B of C.children){if(B.kind==="runProperties")continue;if(vn(B,"begin")){xa(m),m.nesting===1&&g.reset();continue}if(xr(B)){Sa(m,B,o,I+1);continue}if(vn(B,"separate")){let y=m.nesting,ne=m.phase,v=Ra(m);(y===1||ne==="result"&&!m.nestingOverflow)&&g.onSeparate(r?v:null,y);continue}if(vn(B,"end")){let y=g.onEnd(m.nesting,r);y!==null&&(c+=y),wa(m);continue}if(kc$1(B))continue;if(fo(B)){if(en(w,i)&&(p=true),g.active){g.noteResult(!P.hidden&&en(w,i));continue}let y=po(B);if(!y?.unicode||P.hidden||!en(w,i))continue;b(M,P),c+=y.text;continue}let O=Pa(B);if(O.length===0)continue;let k=ct(w),D=!en(w,i)||B.kind==="deletedText"&&!k;D||(p=true);let A=P.hidden||D;if(g.active){g.noteResult(!A),A||b(M,P);continue}A||(b(M,P),c+=O);}continue}if(fc$1(C)){let M=g.active?null:br(hc$1(C)??"");if(M&&r){if(!en(w,i))continue;let P=c.length;h(C,I+1,w),c=c.slice(0,P),c+=vt(M,r);continue}h(C,I+1,w);continue}if(C.kind==="hyperlink"){h(C,I+1,w);continue}if(rs(C)&&w.length<mo){let M=ns(C);h(C,I+1,M?ts(w,M):w);continue}h(C,I+1,w);}}};return h(n,t,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:p}}function vm(e){let{simple:n,pageContext:t,inheritedRunProperties:r,themeFonts:o}=e,a=Fw(e),i=hc$1(n)??"",s=a.resultProps??r,l=br(i);if(l&&t){let g=a.resultStyle??Ee(r,o);return g.hidden?null:{text:vt(l,t),props:s,style:g}}if(l&&e.bodyPageFields&&!t&&a.text.length===0&&!a.sawResultContent){let g=a.resultStyle??Ee(r,o);return g.hidden?null:{text:$i,props:s,style:g,pageField:{kind:l}}}let d=Zi(i);if(d){let g=Ji(d,s,o);if(g)return g.style.hidden?null:{text:g.text,props:g.props,style:g.style}}let c=a.text.length===0&&!a.sawResultContent;if(c){let g=Vi(i);if(g){let b=Yi(g,e.documentProperties);if(b!==null){let h=a.resultStyle??Ee(r,o);return h.hidden?null:{text:b,props:s,style:h}}}}let u=c?Xi(i):null;if(u){let g=a.resultStyle??Ee(r,o);return g.hidden?null:{text:u.display,props:s,style:g}}if(a.text.length===0)return null;let f=a.resultStyle??Ee(r,o);if(f.hidden)return null;let p=e.currentLink?null:Ki(i),m=p?e.projectFieldLink?.(p)??null:null;return {text:a.text,props:s,style:f,...m?{link:m}:{}}}var Ew="\u2612",Nw="\u2610";function Aw(e){let n=io(e);return n==="FORMCHECKBOX"?"checkbox":n==="FORMDROPDOWN"?"dropdown":null}function ic(e,n){e.symbolSpec=Zi(n),!e.symbolSpec&&(e.linkSpec=Ki(n),!e.linkSpec&&(e.formSpec=Aw(n),!e.formSpec&&(e.buttonSpec=Xi(n),!e.buttonSpec&&(e.docPropertySpec=Vi(n)))));}function Tm(e,n){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let t=e.formData.checked?Ew:Nw;if(e.formData.sizeHalfPoints===null)return {text:t,props:e.props,style:e.style};let r=[...e.props,{localName:"sz",attributes:{val:String(e.formData.sizeHalfPoints)}}];return {text:t,props:r,style:Ee(r,n)}}if(e.formSpec==="dropdown"){if(e.cachedText.length>0||e.sawResultContent||e.formData?.kind!=="dropdown")return null;let t=e.formData.entries[e.formData.selectedIndex]??"";return t.length===0?null:{text:t,props:e.props,style:e.style}}return null}function km(e,n){if(e.symbolSpec){let r=Ji(e.symbolSpec,e.props,n.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let t=Tm(e,n.themeFonts);if(t)return {text:t.text,props:t.props,style:t.style};if(e.kind&&n.pageContext)return {text:vt(e.kind,n.pageContext),props:e.props,style:e.style};if(e.cachedText.length>0)return {text:e.cachedText,props:e.props,style:e.style};if(!e.sawResultContent){if(e.kind&&n.bodyPageFields)return {text:$i,props:e.props,style:e.style,pageField:{kind:e.kind}};if(e.docPropertySpec){let r=Yi(e.docPropertySpec,n.documentProperties);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.buttonSpec)return {text:e.buttonSpec.display,props:e.props,style:e.style}}return null}function Qt(e,n,t){if(t<=n)return;let r=e[e.length-1];if(r&&r.end>=n){r.end=Math.max(r.end,t);return}e.push({start:n,end:t});}var Dw=new Set(["left","center","right"]),_w=new Set(["margin","indent","leftMargin"]),Hw=new Set(["dot","hyphen","underscore","middleDot"]);function Cm(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==ca$1)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===ca$1&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:Dw.has(n)?n:"left",relativeTo:_w.has(t)?t:"margin",...r!==void 0&&Hw.has(r)?{leader:r}:{}}}Object.freeze({marks:Object.freeze(new Map)});function Sr(e,n){return gd$1(e,n)}function sc(e,n){if(!xd$1(e))return null;if(nd(e)||od$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=ld$1(e),r=td(e)??ud$1(e);if(!r)return null;let o=qd$1(e),a=o!==null?Sr(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?zw(a,r)??null:null,s=a,l=s!==void 0?t?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...l?{nav:l}:{},...s?{scopeId:s}:{}};if(t&&o!==null&&vd$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 zw(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 Bm(e){return ld$1(e)||md$1(e)||nd(e)||od$1(e)}function jw(e){let n=2166136261;for(let t=0;t<e.length;t+=1)n^=e.charCodeAt(t),n=Math.imul(n,16777619);return (n>>>0).toString(16).padStart(8,"0")}var Om=new WeakMap;function Lm(e){if(!e)return "";let n=Om.get(e);if(n!==void 0)return n;let t=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${jw(t)}`;return Om.set(e,r),r}var ho=.7,Gw=1.25,Mm="Cambria Math";function is(e){return e.fontFamily===Mm?e:Object.freeze({...e,fontFamily:Mm})}function ut(e,n,t,r){return Object.freeze({x:e,y:n,width:t,height:r})}function En(e,n,t){return Object.freeze({...e,box:ut(n,t,e.box.width,e.box.height)})}var Ww=4,$w=8,Fm=new WeakMap;function Xw(e){let n=is(e);return [n.fontFamily??"",n.fontSizePt,n.bold?1:0,n.italic?1:0,n.verticalAlign,n.baselineShiftPt,n.caps?1:0,n.smallCaps?1:0,n.characterSpacingPt,n.horizontalScalePercent,n.kerningMinPt].join("|")}function Vw(e,n){if(n===void 0)return {projections:new WeakMap};let t=Fm.get(e);t||(t=new Map,Fm.set(e,t));let r=t.get(n);if(r)return t.delete(n),t.set(n,r),r;if(t.size>=Ww){let a=t.keys().next().value;a!==void 0&&t.delete(a);}let o={projections:new WeakMap};return t.set(n,o),o}function yo(e,n,t){let r=t.styles.get(n);if(r)return r;let o=n===1?e:Object.freeze({...e,fontSizePt:e.fontSizePt*n,characterSpacingPt:e.characterSpacingPt*n});return t.styles.set(n,o),o}function Em(e,n,t,r){let o=r.metrics.get(t);if(o)return o;let a=e.lineMetrics(yo(n,t,r));return r.metrics.set(t,a),a}function as(e,n,t,r,o,a){let i=yo(r,o,a),s=Em(t,r,o,a);return Object.freeze({kind:e,text:n,fontSizePt:i.fontSizePt,box:ut(0,0,An(n,i,t),s.height),baseline:s.baseline})}function Yw(e,n){if(e.length===0)return Object.freeze({kind:"row",items:Object.freeze([]),box:ut(0,0,0,n.height),baseline:n.baseline});let t=Math.max(...e.map(i=>i.baseline)),r=Math.max(...e.map(i=>i.box.height-i.baseline)),o=0,a=e.map(i=>{let s=En(i,o,t-i.baseline);return o+=i.box.width,s});return Object.freeze({kind:"row",items:Object.freeze(a),box:ut(0,0,o,t+r),baseline:t})}function Dn(e,n,t,r,o){switch(e.kind){case "text":return as("text",e.value,n,t,r,o);case "fallback":return as("fallback",e.text||"\u2026",n,t,r,o);case "row":return Yw(e.items.map(a=>Dn(a,n,t,r,o)),Em(n,t,r,o));case "fraction":{let a=yo(t,r,o),i=Dn(e.numerator,n,t,r*ho,o),s=Dn(e.denominator,n,t,r*ho,o),l=Math.max(.75,a.fontSizePt*.08),d=Math.max(.75,a.fontSizePt*.08),c=Math.max(.6,a.fontSizePt*.055),u=Math.max(i.box.width,s.box.width)+l*2,f=i.box.height+d,p=f+c+d,m=p+s.box.height,g=Math.min(m,f+c/2+a.fontSizePt*.22);return Object.freeze({kind:"fraction",numerator:En(i,(u-i.box.width)/2,0),denominator:En(s,(u-s.box.width)/2,p),bar:ut(l/2,f,u-l,c),box:ut(0,0,u,m),baseline:g})}case "radical":{let a=yo(t,r,o),i=Dn(e.radicand,n,t,r,o),s=as("text","\u221A",n,t,r,o),l=e.degree?Dn(e.degree,n,t,r*.55,o):void 0,d=Math.max(.55,a.fontSizePt*.05),c=Math.max(.35,a.fontSizePt*.035),u=d+c,f=l?Math.max(0,l.box.width*.65):0,p=f+s.box.width,m=u+i.baseline,g=Math.max(u+i.box.height,m+(s.box.height-s.baseline));return Object.freeze({kind:"radical",sign:En(s,f,m-s.baseline),radicand:En(i,p,u),...l?{degree:En(l,0,0)}:{},bar:ut(p,0,i.box.width,d),box:ut(0,0,p+i.box.width,g),baseline:m})}case "script":{let a=yo(t,r,o),i=Dn(e.base,n,t,r,o),s=e.subscript?Dn(e.subscript,n,t,r*ho,o):void 0,l=e.superscript?Dn(e.superscript,n,t,r*ho,o):void 0,d=Math.max(.4,a.fontSizePt*.04),c=i.box.width+d,u=0,f=l?Math.max(0,l.box.height-i.baseline*.45):0,p=f+i.baseline,m=p+a.fontSizePt*.08,g=c+Math.max(s?.box.width??0,l?.box.width??0,-d),b=Math.max(f+i.box.height,l?u+l.box.height:0,s?m+s.box.height:0);return Object.freeze({kind:"script",base:En(i,0,f),...s?{subscript:En(s,c,m)}:{},...l?{superscript:En(l,c,u)}:{},box:ut(0,0,g,b),baseline:p})}case "nary":{let a=yo(t,r,o),i=as("text",e.operator,n,t,r*Gw,o),s=Dn(e.body,n,t,r,o),l=e.lowerLimit?Dn(e.lowerLimit,n,t,r*ho,o):void 0,d=e.upperLimit?Dn(e.upperLimit,n,t,r*ho,o):void 0,c=Math.max(.5,a.fontSizePt*.05),u=Math.max(i.box.width,l?.box.width??0,d?.box.width??0),p=d?d.box.height+c:0,m=p+i.baseline,g=p+i.box.height+(l?c:0),b=u+c,h=m-s.baseline,I=-Math.min(0,p,h,l?g:0),w=m+I,C=Math.max(p+i.box.height,l?g+l.box.height:0,h+s.box.height)+I;return Object.freeze({kind:"nary",operator:En(i,(u-i.box.width)/2,p+I),body:En(s,b,h+I),...l?{lowerLimit:En(l,(u-l.box.width)/2,g+I)}:{},...d?{upperLimit:En(d,(u-d.box.width)/2,I)}:{},box:ut(0,0,b+s.box.width,C),baseline:w})}}}function Nm(e,n,t){let r=is(t),o={styles:new Map,metrics:new Map};return Object.freeze({sourceNodeId:e.sourceNodeId,geometry:Dn(e.expression,n,r,1,o),fallbackText:e.fallbackText,truncated:e.truncated})}function Am(e,n){let t=Vw(e,n);return (r,o)=>{let a=Xw(o),i=t.projections.get(r),s=i?.get(a);if(s&&i)return i.delete(a),i.set(a,s),s;let l=Nm(r,e,o);if(i||(i=new Map,t.projections.set(r,i)),i.size>=$w){let d=i.keys().next().value;d!==void 0&&i.delete(d);}return i.set(a,l),l}}function ss(e,n=[],t,r,o,a,i=un,s,l,d,c,u,f=false){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let p=[],m=0,g,b=oc$1(e,{maxNesting:Hi,maxInstructionChars:nc$1}),h=b.filter(T=>T.addressing==="atomic"),x=new Set(h.filter(T=>T.kind==="complex").map(T=>T.node.id)),I=new Set(b.filter(T=>T.kind==="complex"&&T.addressing==="editable-result").map(T=>T.node.id)),w=new Set;for(let T of h)for(let H of T.removeNodeIds)w.add(H);let C=ba(),M=Vd(),P=null,B=null,O=Qi(),k=Pm,D=(T,H,F,q,G,X,V)=>{if(T.length===0&&!q&&!V?.inlineDrawing)return;let J=V?.linkOverride??g,K=V?.revisionsOverride??k,W=J?{link:J}:{},Q=K.length===0?{}:{revisions:K};if(q){p.push({text:T,props:H,style:F,start:G,end:X,projected:true,...V?.measureText!==void 0?{measureText:V.measureText}:{},...V?.noteNav?{noteNav:V.noteNav}:{},...V?.inlineDrawing?{inlineDrawing:V.inlineDrawing}:{},...V?.equation?{equation:V.equation}:{},...V?.fieldAtom?{fieldAtom:V.fieldAtom}:{},...W,...Q});return}T.length!==0&&p.push({text:T,props:H,style:F,start:G,end:X,...V?.positionalTab?{positionalTab:V.positionalTab}:{},...V?.breakKind?{breakKind:V.breakKind}:{},...W,...Q});},A=()=>{if(!P||!P.atomic){P=null,B=null;return}let T=P.atomStart,H=T+1;if(P.style.hidden){P=null,B=null;return}if(!en(P.resultRevisions,i)){s&&ct(P.resultRevisions)&&Qt(s,T,H),P=null,B=null;return}let{resultLink:F,linkSpec:q,resultRevisions:G,formField:X}=P,V,J=()=>{if(V)return V;let W=!F&&q?c?.(q)??null:null,Q=F??W;return V={...G.length>0?{revisionsOverride:G}:{},...Q?{linkOverride:Q}:{},fieldAtom:{formField:X}},V},K=km(P,{pageContext:t,themeFonts:d,documentProperties:u,bodyPageFields:f});if(K){let W=J(),Q=K.pageField?{...W,fieldAtom:{formField:P.formField,pageField:K.pageField}}:W;D(K.text,K.props,K.style,true,T,H,Q);}P=null,B=null;},y=()=>{if(!P)return;let T=!P.resultLink&&P.linkSpec?c?.(P.linkSpec)??null:null,H=F=>T&&!F.link?{...F,link:T}:F;if(P.atomic){m=P.atomStart;for(let F of P.buffered)p.push({...H(F),start:m,end:m+(F.end-F.start)}),m+=F.end-F.start;P.cachedText.length>0&&P.buffered.length===0&&(D(P.cachedText,P.props,P.style,false,m,m+P.cachedText.length,T?{linkOverride:T}:void 0),m+=P.cachedText.length);}else {for(let F of P.buffered)p.push(H(F));m=P.bufferOffset;}P=null,B=null;},ne=(T,H,F)=>{let q=(K,W,Q,we)=>{let ce=ct(k),oe=F.hidden||!en(k,i)||ce;if(W.hidden||oe){if(ce&&s&&Qt(s,Q,we),!W.hidden)return;D("\uFFFC",H,F,true,Q,we);return}D("\uFFFC",H,F,true,Q,we,{inlineDrawing:Object.freeze({drawingNodeId:K,ownerPartName:l.ownerPartName,projection:W,resource:l.resourceOf(W)})});};if(T.kind==="drawing"){let K=m;m+=1;let W=m;if(!l)return;let Q=l.projectionForAtom?.(T.id)??(T.kind==="drawing"?l.project(T):null);if(!Q||Q.kind!=="inline"){D("\uFFFC",H,F,true,K,W);return}q(T.id,Q,K,W);return}if(Sa$1(T)){let K=m;m+=1;let W=m;if(!l)return;let Q=l.projectionForAtom?.(T.id)??null;if(!Q||Q.kind!=="inline"){D("\uFFFC",H,F,true,K,W);return}q(T.id,Q,K,W);return}if(Bm(T)){let K=sc(T,a),W=m,Q=W+1;if(m=Q,F.hidden||!K||K.text.length===0&&!K.measureText)return;let we=K.scopeId&&K.nav?{scopeId:K.scopeId,direction:K.nav}:void 0;D(K.text.length>0?K.text:K.measureText??"",H,F,true,W,Q,{...K.measureText!==void 0?{measureText:K.measureText}:{},...we?{noteNav:we}:{}});return}let G=Cm(T);if(G){F.hidden||D(" ",H,F,false,m,m,{positionalTab:G});return}if(fo(T)){let K=po(T);if(!K||F.hidden||!en(k,i))return;let W=oc(H,K,d);D(K.text,W.props,W.style,true,m,m);return}let X=Pa(T);if(X.length===0)return;let V=ct(k);F.hidden||!en(k,i)||T.kind==="deletedText"&&!V||D(X,H,F,false,m,m+X.length,{...T.kind==="hardBreak"?{breakKind:Vb$1(T)}:{}}),V&&s&&Qt(s,m,m+X.length),m+=X.length;},v=(T,H)=>{if(T.kind!=="run")return;let F=Ui(T,n,r),q=Ee(F,d),G=()=>{P&&(P.capturedResultStyle||(P.props=F,P.style=q,P.capturedResultStyle=true),P.capturedResultRevisions||(P.resultRevisions=k,P.capturedResultRevisions=true,!P.resultLink&&g&&(P.resultLink=g)));};for(let X of T.children){if(!wt(M)){if(y(),ya(C),O.reset(),X.kind==="runProperties"||vn(X,"begin")||vn(X,"separate")||vn(X,"end")||xr(X)||w.has(X.id)&&B===null)continue;ne(X,F,q);continue}if(X.kind!=="runProperties"){if(vn(X,"begin")){let V=x.has(X.id);xa(C),C.nesting===1&&(y(),O.reset(),B=V?X.id:null,P={kind:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,formData:mc$1(X),atomic:V,editableResult:I.has(X.id),atomStart:m,props:F,style:q,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:m,resultRevisions:k,capturedResultRevisions:k.length>0,formField:lc$1(X),...g?{resultLink:g}:{}},V&&(m+=1));continue}if(xr(X)){Sa(C,X,M,H+1);continue}if(vn(X,"separate")){let V=C.nesting===1&&C.phase==="instruction",J=C.nesting,K=Ra(C);if(V&&P){P.kind=K;let W=zi(C);!P.kind&&!W.overflow&&!C.nestingOverflow&&ic(P,W.instruction),P.props=F,P.style=q;}else P?.atomic&&C.phase==="result"&&!C.nestingOverflow&&O.onSeparate(t?K:null,J);continue}if(vn(X,"end")){let V=C.nesting===1;if(V&&P?.atomic&&C.phase==="instruction"){let K=zi(C);!K.overflow&&!C.nestingOverflow&&ic(P,K.instruction);}let J=O.onEnd(C.nesting,t);J!==null&&P?.atomic&&(P.cachedText+=J),wa(C),V&&(P?.atomic?A():y());continue}if(!(im(C)&&P?.atomic)){if(P&&sm(C)){if(fo(X)){if(P.atomic){if(en(k,i)&&(P.sawResultContent=true),O.active){O.noteResult(!q.hidden&&en(k,i));continue}if(!q.hidden&&en(k,i)){let we=po(X);we?.unicode&&(G(),P.cachedText+=we.text);}continue}let W=po(X);if(!W||q.hidden||!en(k,i))continue;let Q=oc(F,W,d);P.buffered.push({text:W.text,props:Q.props,style:Q.style,start:m,end:m,projected:true,...k.length>0?{revisions:k}:{},...g?{link:g}:{},fieldAtom:{formField:P.formField}});continue}let V=Pa(X);if(V.length===0)continue;let J=ct(k),K=!en(k,i)||X.kind==="deletedText"&&!J;if(P.atomic&&!K&&(P.sawResultContent=true),J&&s&&(P.atomic?Qt(s,P.atomStart,P.atomStart+1):Qt(s,m,m+V.length)),K){P.atomic&&O.active&&O.noteResult(false),P.atomic||(m+=V.length,P.bufferOffset=m);continue}if(P.atomic){if(O.active){if(O.noteResult(!q.hidden),q.hidden)continue;G();continue}if(q.hidden)continue;G(),P.cachedText+=V;continue}if(q.hidden){m+=V.length,P.bufferOffset=m;continue}P.capturedResultStyle||(P.props=F,P.style=q,P.capturedResultStyle=true),P.buffered.push({text:V,props:F,style:q,start:m,end:m+V.length,...k.length>0?{revisions:k}:{},...g?{link:g}:{},fieldAtom:{formField:P.formField}}),m+=V.length,P.bufferOffset=m;continue}w.has(X.id)&&B===null&&x.size>0,ne(X,F,q);}}}};if(!wt(M))return p;let N=Ma$1(),j=(T,H)=>{let F=m;if(m+=1,T.kind==="textValue"||(ct(k)&&s&&Qt(s,F,F+1),!en(k,i)))return;let q=vm({simple:T,depth:H,pageContext:t,budget:M,revisions:k,displayMode:i,inheritedRunProperties:n,cascadeRuns:r,themeFonts:d,currentLink:g,projectFieldLink:c,documentProperties:u,bodyPageFields:f});q&&D(q.text,q.props,q.style,true,F,F+1,{fieldAtom:{formField:false,...q.pageField?{pageField:q.pageField}:{}},...q.link?{linkOverride:q.link}:{}});},E=(T,H,F,q)=>{let G=Cb$1(T);if(G){let K=m++;ct(k)&&s&&Qt(s,K,m);let W=is(Ee(n,d));return W.hidden||!en(k,i)?void 0:D("\uFFFC",n,W,true,K,m,{equation:G})}if(fc$1(T)){j(T,H);return}if(T.kind==="run"){v(T,H);return}if(Hb$1(T)){if(q>=Gb$1||H>Vt)return;for(let K of Kb$1(T))E(K,H+1,F,q+1);return}if(H>Vt||H>=mo)return;let X=T.kind!=="textValue"&&"localName"in T?La$1(F,T):F;if(T.kind==="hyperlink"){let K=g;g=o?.(T)??void 0;for(let W of T.children)E(W,H+1,X,q);g=K;return}if(!rs(T))return;let V=ns(T);if(!V||!wt(M))return;let J=k;k=ts(J,V);for(let K of T.children)E(K,H+1,X,q);k=J;};for(let T of e.children)E(T,1,N,0);return y(),p}function Kw(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 Uw(e){return e.map(Kw).join(";")}var Dm=new WeakMap,Hm=1<<18;function zm(e){if(e.kind==="textValue")return `t:${e.value}`;let n=e.kind==="paragraph"||e.kind==="table";if(n){let r=Dm.get(e);if(r!==void 0)return r}let t=qw(e);return n&&t.length<=Hm&&Dm.set(e,t),t}function qw(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(zm(t));return `(${n.join("|")})`}var _m=new WeakMap;function Rr(e){let n=Math.round(e.width*1e3),t=e.drawingToken??"",r=e.exclusionToken??"",o=Uw(e.properties),a=_m.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,zm(e.paragraph)].join("\0");return i.length<=Hm&&_m.set(e.paragraph,{producer:e.producer,width:n,drawingToken:t,exclusionToken:r,propertiesToken:o,key:i}),i}var jm=new WeakMap;function Gm(e,n){jm.set(e,n);}function Wm(e,n,t,r){if(!e)return;let o=n??new Set;for(let a of t)o.add(a);for(let a of r){let i=jm.get(a);if(i)for(let s of i)o.add(s);}n||e.retain(o);}var Zw=8,Jw=8;function Qw(e={}){let n=Math.max(1,e.maxEntries??4096),t=n*8,r=new Map,o=0,a=0,i=0,s=0,l=0;return {get(d){let c=r.get(d);if(c===void 0){s+=1;return}return i+=1,r.delete(d),c.generation=o,r.set(d,c),c.value},set(d,c){for(r.has(d)&&r.delete(d),r.set(d,{value:c,generation:o});r.size>n;){let u=r.entries().next();if(u.done||u.value[1].generation>=o&&r.size<=t)break;r.delete(u.value[0]),l+=1;}},retentionPassDue(){return a+=1,a%Zw===0},retain(d){o+=1;for(let c of d){let u=r.get(c);u&&(u.generation=o);}for(let[c,u]of r)o-u.generation>Jw&&(r.delete(c),l+=1);},clear(){r.clear();},get stats(){return {hits:i,misses:s,evictions:l,size:r.size}}}}var $m=21600;function Ge(e){return Number.isFinite(e)?e:0}function Ca(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 eP(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 Ca(t)}function lc(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 Ca(r)}function nP(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 Vm(e,n){return bo(e,n)}function dc(e,n,t){return Vm(bo(e,n),t)}function tP(e,n){let t=[],r=Math.min(e.length,fn);if(r<2)return Object.freeze([]);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r],s=a.y,l=i.y;if(s===l)continue;let d=Math.min(s,l),c=Math.max(s,l);if(n<d||n>c||n===c&&l>s||n===d&&l<s)continue;let u=(n-s)/(l-s),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&t.push({x:f,delta:l>s?1:-1});}return t.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(t)}function rP(e,n){let t=[],r=Math.min(e.length,fn);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 s=Math.min(a.x,i.x),l=Math.max(a.x,i.x);l>s&&t.push(Object.freeze({start:s,end:l}));}return Ca(t)}function Xm(e,n,t){let r=oP(tP(e,n),t),o=rP(e,n);return Ca([...r,...o])}function oP(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,s=e[a+1].x;s>i&&t.push(Object.freeze({start:i,end:s}));}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 aP(e,n){return Object.freeze({top:Ge(e.top)+Ge(n.top),right:Ge(e.right)+Ge(n.right),bottom:Ge(e.bottom)+Ge(n.bottom),left:Ge(e.left)+Ge(n.left)})}function iP(e,n,t,r,o,a){let i=n.x-e.x,s=n.y-e.y,l=r.x-t.x,d=r.y-t.y,c=i*d-s*l;if(Math.abs(c)<1e-12)return null;let f=((t.x-e.x)*s-(t.y-e.y)*i)/c,p=((t.x-e.x)*d-(t.y-e.y)*l)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let m=e.y+f*s;return !Number.isFinite(m)||m<o-1e-6||m>a+1e-6?null:m}function sP(e,n,t,r){let o=[],a=Math.min(e.length,fn),i=Math.min(n.length,fn);if(a<2||i<2)return Object.freeze([]);let s=fn*fn,l=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(l>=s)return Object.freeze(o);l+=1;let p=n[f],m=n[(f+1)%i],g=iP(c,u,p,m,t,r);g!==null&&o.push(g);}}return Object.freeze(o)}function lP(e,n,t){let r=new Set;r.add(n),r.add(t);for(let o of e){let a=Math.min(o.length,fn);for(let i=0;i<a;i+=1){let s=o[i].y;Number.isFinite(s)&&s>=n-1e-6&&s<=t+1e-6&&r.add(s);}for(let i=0;i<a;i+=1){let s=o[i],l=o[(i+1)%a],d=s.y,c=l.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 sP(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function dP(e,n,t,r){let o=Xm(e,t,r);return n&&n.length>=3&&(o=eP(o,Xm(n,t,"nonzero"))),o}function Ym(e,n,t,r,o=null){let a=Ge(t.top),i=Ge(t.bottom),s=Ge(t.left),l=Ge(t.right),d=n-i,c=n+a,u=lP(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((m,g)=>{if(g+1>=u.length)return [];let b=u[g+1];return b<=m+1e-6?[m]:[m,b,(m+b)/2]}):[d];for(let m of p){let g=dP(e,o,m,r);for(let b of g)f.push(Object.freeze({start:b.start-s,end:b.end+l}));}return Ca(f)}function Km(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 cP(e){let n=Math.max(0,Ge(e.extentWidthPt)),t=Math.max(0,Ge(e.extentHeightPt)),r=ds(e.transform,n,t),o=Math.min(e.polygonEmu.length,fn);if(o<3)return Km({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/$m,i=r.height/$m,s=[];for(let l=0;l<o;l+=1){let d=e.polygonEmu[l];s.push(Object.freeze({x:Ge(d.x)*a,y:Ge(d.y)*i}));}return cs({points:Object.freeze(s),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 uP(e,n){let t=n.effectInsets??ls,r=n.wrapDistances??ls,o=Ge(n.contentLeft),a=Ge(n.contentRight);if(n.mode==="topAndBottom"){let c=Vm(bo(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):lc([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=dc(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):lc([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:Km(n.contentBounds),s=n.mode==="through"?"evenodd":"nonzero",l=aP(r,t),d=Ym(i,e,l,s,n.clipPolygon);return lc(d,o,a)}function fP(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 pP(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=fP(n);if(!a)return e;if(t==="left")return Object.freeze(e.filter(l=>l.end<=a.start+1e-4));if(t==="right")return Object.freeze(e.filter(l=>l.start>=a.end-1e-4));let i=Math.max(0,a.start-r),s=Math.max(0,o-a.end);return i===s?Object.freeze(e.filter(l=>l.start>=a.end-1e-4)):i>s?Object.freeze(e.filter(l=>l.end<=a.start+1e-4)):Object.freeze(e.filter(l=>l.start>=a.end-1e-4))}function Um(e,n){let t=uP(e,n),r=nP(t,n.contentLeft,n.contentRight);return pP(r,t,n.textSide,n.contentLeft,n.contentRight)}function mP(e,n,t,r){return t.length<3?false:Ym(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function cc(e,n,t){let r=t.effectInsets??ls,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 mP(e,n,t.clipPolygon,r);let a=bo(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function qm(e){let n=Object.freeze({top:Ge(e.wrapDistancesEmu.top/ft),right:Ge(e.wrapDistancesEmu.right/ft),bottom:Ge(e.wrapDistancesEmu.bottom/ft),left:Ge(e.wrapDistancesEmu.left/ft)}),t=e.mode==="tight"||e.mode==="through"?cP({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 Tn=1e5,fn=m.maxPolygonPoints,ls=Object.freeze({top:0,right:0,bottom:0,left:0}),gP=32,hP=.1,yP=new Set(["rect","ellipse","roundRect"]);function ye(e){return Number.isFinite(e)?e:0}function _n(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function Zm(e,n){let t=e+n;return Number.isFinite(t)?t:0}function Jm(e,n,t){let r=_n(e,0,t),o=_n(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 bP(e){let n=Jm(_n(e.left,0,Tn),_n(e.right,0,Tn),Tn),t=Jm(_n(e.top,0,Tn),_n(e.bottom,0,Tn),Tn);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function xP(e){let n=bP({left:e.left*Tn,top:e.top*Tn,right:e.right*Tn,bottom:e.bottom*Tn});return Object.freeze({left:n.left/Tn,top:n.top/Tn,right:n.right/Tn,bottom:n.bottom/Tn})}function SP(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/ft;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 bo(e,n){let t=ye(n.left),r=ye(n.right),o=ye(n.top),a=ye(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,Zm(e.width,t+r)),height:Math.max(0,Zm(e.height,o+a))})}function RP(e,n,t){let r=e*_n(t.left,0,1),o=n*_n(t.top,0,1),a=e*(1-_n(t.right,0,1)),i=n*(1-_n(t.bottom,0,1));if(a<=r||i<=o){let s=e/2,l=n/2;return Object.freeze({left:s,top:l,right:s,bottom:l})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function ds(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?ye(er(r)??n):Math.max(0,ye(n)),s=o>0?ye(er(o)??t):Math.max(0,ye(t));return Object.freeze({offsetX:ye(er(a.x)??0),offsetY:ye(er(a.y)??0),width:i,height:s})}function wP(e,n,t,r){let o=RP(n,t,r),a=o.right-o.left,i=o.bottom-o.top,s=n>0?n:1,l=t>0?t:1,d=[],c=Math.min(e.length,fn);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+_n(f.x/s,0,1)*a,m=i<=0?o.top:o.top+_n(f.y/l,0,1)*i;d.push(Object.freeze({x:ye(p),y:ye(m)}));}return Object.freeze(d)}function Qm(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=ye(t.rotationDegrees)*Math.PI/180,i=Math.cos(a),s=Math.sin(a),l=r*i-o*s,d=r*s+o*i;return Object.freeze({x:ye(l+n.x),y:ye(d+n.y)})}function eg(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,fn);for(let i=1;i<a;i+=1){let s=e[i];!Number.isFinite(s.x)||!Number.isFinite(s.y)||(n=Math.min(n,s.x),t=Math.max(t,s.x),r=Math.min(r,s.y),o=Math.max(o,s.y));}return Object.freeze({x:n,y:r,width:Math.max(0,t-n),height:Math.max(0,o-r)})}function uc(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=Oa(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let s of t)r.push(Qm(Object.freeze({x:s.x+e.offsetX,y:s.y+e.offsetY}),n,e.transform));let o=eg(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,ye(e.layoutWidth))/a,scaleY:Math.max(0,ye(e.layoutHeight))/i,anchorX:ye(e.anchorX),anchorY:ye(e.anchorY)})}function PP(e,n){return Object.freeze({x:ye(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:ye(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function cs(e){let n=e.mapping??uc({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=wP(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(t.length>0?t.length:e.points.length,fn),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 s=0;s<r;s+=1){let l=o[s],d=Object.freeze({x:ye(l.x+e.offsetX),y:ye(l.y+e.offsetY)});i.push(PP(Qm(d,a,e.transform),n));}return Object.freeze(i)}function Oa(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 IP(e,n,t){if(!e||!yP.has(e))return null;if(n<=0||t<=0)return Oa(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return Oa(0,0,n,t);if(e==="ellipse"){let s=[],l=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(gP,fn);for(let p=0;p<f;p+=1){let m=p/f*Math.PI*2;s.push(Object.freeze({x:l+c*Math.cos(m),y:d+u*Math.sin(m)}));}return Object.freeze(s)}let r=Math.min(n,t)*hP,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 So(e){return Object.freeze({x:ye(e.x),y:ye(e.y)})}function vP(e,n){if(e.length===0)return Object.freeze([]);let t=n.x+n.width,r=n.y+n.height,o=(i,s,l)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,fn);for(let u=0;u<c;u+=1){let f=So(i[u]),p=So(i[(u+1)%c]),m=s(f),g=s(p);if(m&&g?d.push(p):m&&!g?d.push(So(l(f,p))):!m&&g&&(d.push(So(l(f,p))),d.push(p)),d.length>=fn)break}return Object.freeze(d.slice(0,fn))},a=e.slice(0,fn).map(So);return a=[...o(a,i=>i.x>=n.x,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(n.x-i.x)/l:0;return Object.freeze({x:n.x,y:ye(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.x<=t,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(t-i.x)/l:0;return Object.freeze({x:t,y:ye(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.y>=n.y,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(n.y-i.y)/l:0;return Object.freeze({x:ye(i.x+d*(s.x-i.x)),y:n.y})})],a=[...o(a,i=>i.y<=r,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(r-i.y)/l:0;return Object.freeze({x:ye(i.x+d*(s.x-i.x)),y:r})})],Object.freeze(a)}function TP(e){let n=eg(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function us(e,n){let t=kP(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=vP(a,n);return i.length>=3?Object.freeze(i.map(So)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function kP(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 CP(e){let n=Math.max(0,ye(e.extentWidth)),t=Math.max(0,ye(e.extentHeight)),r=ye(e.anchorX),o=ye(e.anchorY),a=xP(e.crop),i=SP(e.effectExtentEmu),s=ds(e.transform,n,t),l=Object.freeze({x:r,y:o,width:n,height:t}),d={sourceWidth:s.width,sourceHeight:s.height,offsetX:s.offsetX,offsetY:s.offsetY,crop:a,transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:r,anchorY:o},c=uc(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=cs({points:Oa(0,0,s.width,s.height),...d,crop:u,mapping:c}),p=IP(e.presetGeometry,s.width,s.height),m="none",g=p;g||(m=e.presetGeometry?"unsupported-preset":"none",g=Oa(0,0,s.width,s.height));let b=cs({points:g,...d,crop:u,mapping:c}),h=TP(b.length>=3?b:f),x=bo(h,i);return Object.freeze({contentBounds:l,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:b.length>=3?b:f,clipFallback:m,effectInsets:i})}function Ro(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 CP({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 OP(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=ds(n,t,r),a=o.width,i=o.height,s=uc({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),l=ye(n.rotationDegrees),d=Math.abs(l%360)>1e-4,c=n.flipHorizontal?-1:1,u=n.flipVertical?-1:1,f=s.scaleX,p=s.scaleY,m=a>0?a/t:1,g=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(m-1)<1e-4&&Math.abs(g-1)<1e-4)return null;let h=l*Math.PI/180,x=Math.cos(h),I=Math.sin(h),w=o.offsetX+a/2,C=o.offsetY+i/2,M=f*x*c,P=-f*I*u,B=p*I*c,O=p*x*u,k=f*(w-x*c*(a/2)+I*u*(i/2)-s.bboxX),D=p*(C-I*c*(a/2)-x*u*(i/2)-s.bboxY);return Object.freeze({a:ye(M*m),b:ye(B*m),c:ye(P*g),d:ye(O*g),e:ye(k),f:ye(D)})}function eB(e){let n=OP(e);if(n)return `matrix(${xo(n.a)}, ${xo(n.b)}, ${xo(n.c)}, ${xo(n.d)}, ${xo(n.e)}, ${xo(n.f)})`}function xo(e){return Number.isFinite(e)?String(e):"0"}var BP=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"}),LP=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),MP=Object.freeze({left:0,top:0,right:0,bottom:0});function rg(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=BP[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??MP,transform:n?.transform??LP,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var ft=12700;function on(e){return e/ft}function er(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*ft*72)return null;let n=e/ft;return Number.isFinite(n)?n:null}function kt(e){let n=on(e.inlineDistancesEmu.left),t=on(e.inlineDistancesEmu.right),r=on(e.inlineDistancesEmu.top),o=on(e.inlineDistancesEmu.bottom),a=on(e.effectExtentEmu.left),i=on(e.effectExtentEmu.right),s=on(e.effectExtentEmu.top),l=on(e.effectExtentEmu.bottom),d=on(e.extentEmu.cx),c=on(e.extentEmu.cy);return Object.freeze({distL:n,distR:t,distT:r,distB:o,effectL:a,effectR:i,effectT:s,effectB:l,width:d,height:c,totalWidth:n+a+d+i+t,lineContribution:r+s+c+l+o})}function og(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 fs(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 ps(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:fs(e.geometry,n,t)})}function fc(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:fs(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 pc(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 ms(e,n){let t=pc(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=fs(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:us(i,n)})}var ng=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),tg=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function pt(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function ag(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 ig(e,n){if(ag(e,n)){let l=n.cellBox;if(!l)return null;let{x:d,width:c}=l;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 pt(n)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return pt(n)?{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,s=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:s,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 pt(n)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return pt(n)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function sg(e,n){if(ag(e,n)){let l=n.cellBox;if(!l)return null;let{y:d,height:c}=l;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 pt(n)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return pt(n)?{top:d+c,bottom:d+c,center:d+c}:{top:d,bottom:d+c,center:d+c/2};default:return null}}let t=-n.contentInsetTop,r=n.contentBandHeight,o=t+n.pageHeight-n.marginBottom,a=r+n.contentInsetBottom,i=0,s=n.contentHeight;switch(e){case "page":return {top:t,bottom:a,center:(t+a)/2};case "margin":return {top:i,bottom:s,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 pt(n)?{top:i,bottom:i,center:i}:{top:s,bottom:s,center:s};case "outsideMargin":return pt(n)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function lg(e){return e===null?0:er(e)}function FP(e,n,t){let r=pt(t);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 EP(e,n,t){let r=pt(t),o=t.contentBandHeight;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 NP(e,n,t,r,o){let a=ig(e,o);if(!a)return null;let i=lg(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 s=FP(n,r,o);if(s!==null)return s+i}return a.left+i}function AP(e,n,t,r,o){let a=sg(e,o);if(!a)return null;let i=lg(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 s=EP(n,r,o);if(s!==null)return s+i}return a.top+i}function Ba(e){let n=e.contentBandHeight;return Object.freeze({x:-e.marginLeft,y:-e.contentInsetTop,width:e.pageWidth,height:n+e.contentInsetTop+e.contentInsetBottom})}function mc(e,n){let t=kt(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 g=er(r.simplePosition.xEmu),b=er(r.simplePosition.yEmu);return Object.freeze(g===null||b===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:g-n.marginLeft,y:b-n.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let s=r.horizontal.relativeFrom,l=r.vertical.relativeFrom,d=ig(s,n),c=sg(l,n),u=d?.left??0,f=c?.top??0;if(!ng.has(s)||!tg.has(l))return Object.freeze({x:0,y:0,horizontalFrame:ng.has(s)?s:a,verticalFrame:tg.has(l)?l:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=NP(s,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),m=AP(l,r.vertical.align,r.vertical.offsetEmu,t.height,n);return Object.freeze(p===null||m===null?{x:0,y:0,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:m,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function DP(e){let n=e.input.projection,t=n.anchor,r=kt(n),o=Ro({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?pc(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?us(o,e.clipRegion):o,resource:e.input.resource,accessibility:Ta$1(n),...rg(n)})}function Hn(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(Sa$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 qn(e){let n=new Map;if(e.kind!=="paragraph")return n;let t=0,r=o=>{if(o.kind==="drawing"||Sa$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 _P(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 s=n-o.range.start;return o.box.x+An(o.text.slice(0,s),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+An(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+An(r.text,r.style,t):r.box.x+r.box.width:e.box.x}function HP(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function gc(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:fs(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 wo(e){let n=Hn(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=qn(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 s=e.lines.find(b=>i>=b.range.start&&i<b.range.end);if(!s)continue;let l=a.anchor?.layoutInCell??true,c=a.position?.horizontal.relativeFrom==="character"?HP(s,i):i,u=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:s.box,anchorCharacterX:_P(s,c,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:l}),f=mc(a,u),m=l&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0?e.cellBox:Ba(e.frameBase),g=DP({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:m,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(o.atomId)}:{},...a.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(a)}:{}});r.push(g);}return Object.freeze(r)}function dg(e){let n=kt(e.input.projection),t=e.slotX+n.distL+n.effectL,r=Ro({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=pc(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:us(r,o),resource:e.input.resource,accessibility:Ta$1(e.input.projection),...rg(e.input.projection)})}var zP=256,bc=8,wr=8,Po=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function jP(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 s=n.columnLefts[i],l=s+n.columnWidths[i];if(r>=s-.001&&r<l+.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 s=i*(a+o),l=s+a;if(r>=s-.001&&r<l+.001)return i}return t-1}function yc(e){return e.behindDocument?"behind":"inFront"}function ug(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function GP(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 WP(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function xc(e){let n=GP(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 qm({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"?WP(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Sc(e){if(e.mode==="topAndBottom"||e.mode==="square")return dc(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 $P(e){if(e.drawing.behindDocument||!ug(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=xc({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:yc(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:Sc(t),input:t}):null}function fg(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 XP(e,n){let t=yc(e),r=yc(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:fg(e,n)}function pg(e){return Object.freeze([...e].sort(XP))}function hc(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 Rc(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 mg(e,n){let t=n.maxAttempts??zP,r=[...e].sort(fg),o=[],a=[],i=[];for(let s of r){if(s.allowOverlap){o.push(s);continue}let l=s,d=0;for(;d<t&&o.some(g=>hc(g.paintBounds,l.paintBounds));){let p=o.find(g=>hc(g.paintBounds,l.paintBounds)),m=p.paintBounds.y+p.paintBounds.height-l.paintBounds.y+.001;l=Rc(l,m),d+=1;}let c=o.some(f=>hc(f.paintBounds,l.paintBounds)),u=l.paintBounds.y+l.paintBounds.height>n.pageBottom+.001;if(c||u){a.push(l),i.push(l.drawingNodeId);continue}o.push(l);}return Object.freeze({drawings:Object.freeze(o),deferred:Object.freeze(a),deferredNodeIds:Object.freeze(i)})}function Io(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 s=Um(e,a.input),l=[];for(let d of o)for(let c of s){let u=Math.max(d.start,c.start),f=Math.min(d.end,c.end);f>u+1e-6&&l.push(Object.freeze({start:u,end:f}));}if(o=l,o.length===0)break}return Object.freeze(o)}function gg(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 VP(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function wc(e,n){let t=VP(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 YP(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 Pc(e,n){return Object.freeze({...e,layoutFallback:n})}function hg(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({...YP(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function yg(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function bg(e){let n=Hn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=qn(e.paragraph),r=Math.max(1,e.contentRight-e.contentLeft),o=[];for(let a of n){if(a.projection.anchor?.behindDocument||!ug(a.projection.wrap)||a.projection.wrap==="topAndBottom")continue;let i=t.get(a.atomId);if(i===void 0)continue;let s=e.anchorLineTopByModelStart.get(i);if(s===void 0)continue;let l=Object.freeze({x:e.contentLeft,y:s,width:r,height:14}),d=e.anchorCellBox!=null,c=mc(a.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+r,pageHeight:792,marginLeft:e.contentLeft,marginRight:0,marginBottom:0,contentInsetTop:0,contentInsetBottom:0,contentWidth:r,contentHeight:648,contentBandHeight:648,paragraphBox:l,anchorLineBox:l,anchorCharacterX:e.contentLeft,columnBox:l,cellBox:d?e.anchorCellBox:null,layoutInCell:d,ownerPartName:e.drawingLayout.ownerPartName,storyKind:"body"}),u=e.paragraphStartY+s,f=kt(a.projection),p=Ro({projection:a.projection,anchorX:c.x,anchorY:u,extentWidth:f.width,extentHeight:f.height}),m=xc({projection:a.projection,geometry:p,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:c.x,anchorY:u});m&&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:Sc(m),input:m}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}function gs(e){let n=Hn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=qn(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 s=e.paragraphStartY+i,l=kt(o.projection),d=Ro({projection:o.projection,anchorX:e.contentLeft,anchorY:s,extentWidth:l.width,extentHeight:l.height}),c=xc({projection:o.projection,geometry:d,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:s});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:s,verticalBand:Sc(c),input:c}));}return r.sort((o,a)=>o.sourceOrder-a.sourceOrder),Object.freeze(r)}var KP=8;function UP(e,n,t,r){return e<r&&n>t}function Ct(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<KP;o+=1){let a=e+r,i=a+n,s=a,l=false;for(let c of t){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;UP(a,i,u,f)&&(l=true,s=Math.max(s,f));}if(!l)break;let d=s-e;if(d<=r+.001)break;r=d;}return r}function qP(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function ZP(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 mt(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=Io(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),ZP(n.input),qP(o)].join("|")}).join(`
8
+ `)}function Ic(e,n,t,r,o,a){let i=[];for(let s of e){let l=n.projectionForAtom?.(s.drawingNodeId);if(!l)continue;let d=s.sourceOrder??o?.(s.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?jP(s,a):0,u=$P({drawing:s,projection:l,sourceOrder:d,contentLeft:t,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((s,l)=>s.sourceOrder-l.sourceOrder),Object.freeze(i)}function hs(e,n,t,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:t}),i=new Map;for(let s of e){let l=s.anchoredDrawings??[],d=Ic(l,n,0,t,r,a);d.length>0&&i.set(s.index,d);}return i}var cg=new WeakMap;function JP(e){return e?`${e.columnCount};${e.columnGapPt};${e.contentWidth};${(e.columnLefts??[]).join(",")};${(e.columnWidths??[]).join(",")}`:""}function vc(e,n,t,r,o,a){let i=JP(a),s=cg.get(e);if(s&&s.drawingLayout===n&&s.drawingLayoutEpoch===t&&s.contentWidth===r&&s.drawingSourceOrder===o&&s.columnToken===i)return s.zones;let l=hs(e,n,r,o?d=>o.get(d):void 0,a);return cg.set(e,{drawingLayout:n,drawingLayoutEpoch:t,contentWidth:r,drawingSourceOrder:o,columnToken:i,zones:l}),l}function ys(e,n){if(e.size!==n.size)return false;for(let[t,r]of e){let o=n.get(t);if(!o||mt(r)!==mt(o))return false}return true}function bs(e){return e.size===0?"":[...e.entries()].sort(([n],[t])=>n-t).map(([n,t])=>`${n}:${mt(t)}`).join(`
9
+ `)}var QP=.001;function kn(e){return co(e)}var Ss=new Set(["-","\u2010","\u2013","\u2014"]);function xg(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===" "||Ss.has(r)&&t>0&&e[t-1]!==" "&&t+1<e.length&&e[t+1]!==" "&&!Ss.has(e[t+1]))&&n.push(t+1);}return n[n.length-1]!==e.length&&n.push(e.length),n}function e0(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 s=o.text[i];if(s===`
10
+ `||s===Ub$1)return false;if(s!==" "&&s!==" ")return true}}return false}function n0(e,n,t,r){let o=0,a=0,i=false;for(let s=n;s<e.length;s+=1){let l=e[s],d=s===n?t:0;for(let c=d;c<l.text.length;){let u=l.text[c];if(u===" "||u===`
11
+ `||u===Ub$1)return {width:o,decimalOffset:i?a:o};let f=c+1,p=l.text.slice(c,f),m=r.measure(Zt(p,l.style),l.style);!i&&u==="."?i=true:i||(a+=m),o+=m,c=f;}}return {width:o,decimalOffset:i?a:o}}function t0(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 Sg(e,n,t,r=0){return (t.length>0?Ct(e,n.height,t):n.exclusionSkipBefore??0)+Math.max(0,n.height-n.trailingSpacing)+r}function r0(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 xs=31680;function La(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let n=Number(e);return Number.isFinite(n)?n>xs?Bc$1(xs):n<-xs?Bc$1(-xs):Bc$1(n):null}function Ma(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=La(o),s=La(a);i!==null&&(n=Dc$1(i)),s!==null&&(t=Dc$1(s));}return {left:n,right:t}}function Rg(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 o0(e){return e.endsWith(" ")}function a0(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(An(e.text.slice(0,o),e.style,n));return Object.freeze(r)}function vo(e,n){return e.map(t=>t.caretEdges?t:{...t,caretEdges:a0(t,n)})}function Rs(e,n,t,r,o,a,i){if(e.length===0)return e;if(o==="left")return vo(e,n);let s=e[e.length-1],l=s.text.replace(/\s+$/,""),d=l===s.text?0:s.box.width-An(l,s.style,n),c=i??s.box.x-t+s.box.width-d,u=r-c;if(u<=0)return vo(e,n);if(o==="both"){if(a)return vo(e,n);let p=[];for(let h=1;h<e.length;h+=1)o0(e[h-1].text)&&p.push(h);if(p.length===0)return vo(e,n);let m=u/p.length,g=new Set(p),b=0;return vo(e.map((h,x)=>(g.has(x)&&(b+=m),b===0?h:{...h,box:{...h.box,x:h.box.x+b}})),n)}let f=o==="center"?u/2:u;return vo(e.map(p=>({...p,box:{...p.box,x:p.box.x+f}})),n)}function ws(e,n){return n===0||e.length===0?e:e.map(t=>ps(t,n,0))}function Ps(e,n,t,r,o,a,i,s=[],l=oo,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let p=u?.lineSpacing??to,m=u?.firstLineOffset??0,g=[],b=ss(e,s,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??un,g,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false),h=Math.max(0,u?.startOffset??0),x=b.flatMap(L=>{if(L.end<=h)return [];if(L.start>=h)return [L];let S=h-L.start;return [{...L,text:L.projected?L.text:L.text.slice(S),start:h}]}),I=Am(o,u?.equationCacheToken),w=L=>L.equation?I(L.equation,L.style):null;if(x.length===0&&u?.suppressEmptyPlaceholderLine)return [];let C=L=>({...L.revisions===void 0?{}:{revisions:L.revisions},...L.fieldAtom===void 0?{}:{fieldAtom:L.fieldAtom}}),M=u?.markRunProperties??s,P=M.length===0?dt:Ee(M,u?.themeFonts),B=t+r,O=u?.contentLeft??t,k=u?.contentRight??B,D=u?.contentOriginX??0,A=[],y={spans:[],start:h,end:h,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},ne=false,v=new Map,N=(()=>{let L=new Set;if(!u?.inlineDrawingLayout)return L;let S=qn(e);for(let z of Hn(e,u.inlineDrawingLayout)){if(z.projection.wrap!=="topAndBottom")continue;let U=S.get(z.atomId);U!==void 0&&L.add(U);}return L})(),j=(()=>{let L=new Set;if(!u?.inlineDrawingLayout)return L;let S=qn(e);for(let z of Hn(e,u.inlineDrawingLayout)){if(z.projection.anchor?.behindDocument||z.projection.wrap==="topAndBottom"||z.projection.wrap==="inline"||z.projection.wrap==="behind"||z.projection.wrap==="inFront")continue;let U=S.get(z.atomId);U!==void 0&&L.add(U);}return L})(),E=[...(u?.pageExclusionZones??[]).filter(L=>L.anchorParagraphId===n).map(L=>L.anchorModelStart),...N,...j],T=(()=>{let L=new Map;if(E.length===0)return L;let S=0,z=0,U=0,te=()=>U===0?m:0,se=()=>Math.max(1,r-te()),Y=me=>{S=me,z=0,U+=1;};for(let me of x){let Be=w(me);if(Be){let Pe=Be.geometry.box.width;z>0&&z+Pe>se()&&Y(me.start),E.includes(me.start)&&L.set(me.start,S),z+=Pe;continue}if(me.inlineDrawing){let Pe=kt(me.inlineDrawing.projection).totalWidth;z>0&&z+Pe>se()&&Y(me.start),E.includes(me.start)&&L.set(me.start,S),z+=Pe;continue}if(me.text===`
12
+ `||me.text===Ub$1){Y(me.end);continue}let Ne=0;for(let Pe of xg(me.text)){let He=me.text.slice(Ne,Pe);if(He.length===0)continue;let Bn=me.style,wn=o.measure(He,Bn),We=me.start+Ne;z>0&&z+wn>se()&&Y(We),E.includes(We)&&L.set(We,S),E.includes(me.start)&&L.set(me.start,S),z+=wn,Ne=Pe;}}for(let me of E)L.has(me)||L.set(me,S);return L})();for(let L of j){let S=T.get(L);S!==void 0&&v.set(L,S);}let H=L=>{if(L.anchorParagraphId!==n)return true;let S=T.get(L.anchorModelStart);return S!==void 0&&y.start>=S||y.end>=L.anchorModelStart},F=()=>{let L=u?.pageExclusionZones?.filter(U=>!(!H(U)||U.anchorParagraphId===n&&(U.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],S=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&v.size>0?bg({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:O,contentRight:k,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:v,anchorCellBox:u.anchorCellBox}):Object.freeze([]),z=u?.inlineDrawingLayout&&v.size>0?gs({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:O,contentRight:k,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:v}):Object.freeze([]);return Object.freeze([...L,...S,...z])},q=()=>A.length===0?m:0,G=()=>D+t+q(),X=()=>Math.max(1,r-q()),V=()=>A.reduce((L,S)=>L+S.height+(S.exclusionSkipBefore??0),0),J=()=>(u?.paragraphStartY??0)+V(),K=L=>{N.has(L)&&v.set(L,V());},W=()=>{if(ne)return;let L=F();if(L.length===0||y.spans.length>0||y.drawings.length>0)return;let S=o.lineMetrics(P),z=Ct(J(),y.height>0?y.height:S.height,L);z>.001&&(ne=true,y.exclusionSkipBefore=z);},Q=()=>J()+(y.exclusionSkipBefore??0)+.001,we=()=>{let L=F();if(L.length===0)return true;W();let S=Io(Q(),L,O,k),z=G()+y.width,U=wc(z,S);return U?(U.x>z+.001&&(y.width=U.x-G()),true):false},ce=()=>{let L=X(),S=F();if(S.length===0)return L;if(W(),!we())return 0;let z=Io(Q(),S,O,k),U=G()+y.width,te=gg(U,z);return te<=.001?0:Math.min(L,y.width+te)},oe=()=>Math.max(0,ce()-y.width),Se=()=>{let L=F();if(L.length===0||!L.some(se=>se.anchorParagraphId!==n||y.end>se.anchorModelStart))return false;let z=Io(Q(),L,O,k),U=G()+y.width,te=false;for(let se of z){if(!te){U>=se.start-1e-6&&U<se.end-1e-6&&(te=true);continue}if(se.end-se.start>.001)return y.width=se.start-G(),true}return false},Ie=L=>{if(E.length===0||L<Math.min(...E))return;let S=F().filter(Y=>Y.anchorParagraphId===n&&L>=Y.anchorModelStart);if(S.length===0)return;W();let z=Io(Q(),S,O,k),U=G()+y.width,te=-1;for(let Y=0;Y<z.length;Y+=1){let me=z[Y];if(U>=me.start-.001&&U<me.end-.001){te=Y;break}}if(te>=0)return;let se=wc(U,z);se&&se.x>U+.001&&(y.width=se.x-G());},nn=L=>{F().filter(z=>z.input.mode==="topAndBottom"&&z.anchorParagraphId===n&&L>=z.anchorModelStart).length!==0&&((y.spans.length>0||y.drawings.length>0)&&Xe(),W());},fe=(L,S=0)=>S>64?oe()>=L:(W(),we()?L<=oe()+.001?true:y.spans.length>0||y.drawings.length>0?Se()&&L<=oe()+.001?true:(Xe(),fe(L,S+1)):Se()?fe(L,S+1):true:y.spans.length>0||y.drawings.length>0?(Xe(),fe(L,S+1)):true),tn=(L,S)=>g.filter(z=>z.start<S&&z.end>L).map(z=>({start:Math.max(z.start,L),end:Math.min(z.end,S)})),Oe=-1,Gn=0,yn=0,pn="",bn=(L,S)=>{let z=o.lineMetrics(L),U=og(z.baseline,y.height||z.height,S);return y.height===0?(y.height=U.lineHeight,y.baseline=U.baseline):(U.lineHeight>y.height&&(y.height=U.lineHeight),y.baseline=Math.max(y.baseline,U.baseline)),{extentTopY:U.extentTopY}},Wn=()=>{if(y.drawings.length===0)return;y.spans.length===0&&(y.baseline=Math.max(y.baseline,...y.drawings.map(S=>S.y+S.height)));let L=fc(y.drawings,y.baseline);y.drawings.splice(0,y.drawings.length,...L),y.baseline=Math.max(y.baseline,...y.drawings.map(S=>S.y+S.height));},$n=()=>{if(y.drawings.length===0)return;let L=fc(y.drawings,y.baseline);y.drawings.splice(0,y.drawings.length,...L);},mn=L=>{let S=0;for(let z of y.spans)S=Math.max(S,o.lineMetrics(z.style).height);return S>0?S:L},Xn=()=>{if(y.drawings.length===0)return;let L=Math.max(0,...y.drawings.map(S=>S.y+S.height+S.distB));y.height=Math.max(y.height,L);},sn=()=>{Wn(),Xn();},On=()=>{if(!(y.spans.length<2))for(let L=1;L<y.spans.length;L+=1){let S=y.spans[L-1],z=y.spans[L],U=z.box.x-(S.box.x+S.box.width);U<=.001||y.drawings.some(se=>se.start>=S.range.end&&se.start<z.range.start)||(y.spans[L]={...z,wrapAdvanceBefore:U});}},Xe=L=>{let S=o.lineMetrics(P),z=y.baseline;y.height===0?(y.height=S.height,y.baseline=S.baseline,z=S.baseline):L?.includeParagraphMark&&(y.height=Math.max(y.height,S.height)),sn();let U=y.height,te=p.rule==="auto"&&y.drawings.length>0,se=te?mn(S.height):U,Y=Ld(p,se,y.baseline);te||(y.baseline=Y.baseline),y.leading=Math.max(0,y.baseline-z),y.height=Y.height,$n(),p.rule!=="exact"&&Xn(),y.trailingSpacing=y.drawings.length===0&&p.rule!=="exact"?Math.max(0,Y.height-U):0,(()=>{let Ne=F();if(Ne.length===0)return;let Pe=Ct(J(),y.height,Ne);Pe>.001?y.exclusionSkipBefore=Pe:delete y.exclusionSkipBefore;})(),On();let Be=tn(y.start,y.end);Be.length>0&&(y.deletedRanges=Be),A.push(y),Oe=-1,Gn=0,ne=false,y={spans:[],drawings:[],start:y.end,end:y.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},W();},ln=false;for(let L=0;L<x.length;L+=1){let S=x[L];if(S.breakKind==="column"){let te=o.lineMetrics(S.style);y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:S.text,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:0,height:te.height},...S.link?{link:S.link}:{},...C(S)}),y.height=Math.max(y.height,te.height),y.baseline=Math.max(y.baseline,te.baseline),y.end=S.end,Xe(),A[A.length-1].columnBreakAfter=true,ln=true;continue}if(S.equation){let te=w(S),se=te.geometry.box.width;if((y.spans.length>0||y.drawings.length>0)&&y.width+se>ce()&&Xe(),!fe(se))continue;let me=Math.max(0,y.height-y.baseline),Be=Math.max(0,te.geometry.box.height-te.geometry.baseline);y.baseline=Math.max(y.baseline,te.geometry.baseline),y.height=y.baseline+Math.max(me,Be),y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:"\uFFFC",props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:se,height:te.geometry.box.height},projected:true,equation:te,...C(S)}),y.width+=se,y.end=S.end,Oe=-1,pn="";continue}if(S.projected&&!S.inlineDrawing&&S.text==="\uFFFC"){K(S.start),y.end=S.end;continue}if(S.inlineDrawing){K(S.start);let te=kt(S.inlineDrawing.projection),se=te.totalWidth;if((y.spans.length>0||y.drawings.length>0)&&y.width+se>ce()&&Xe(),!fe(se))continue;let{extentTopY:me}=bn(S.style,te),Be=G()+y.width;y.drawings.push(dg({input:S.inlineDrawing,paragraphId:n,start:S.start,slotX:Be,y:me,baseline:y.baseline,contentLeft:O,contentRight:k})),y.width+=se,y.end=S.end,Oe=-1,pn="";continue}if(S.text===Ub$1){let te=o.lineMetrics(S.style);y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:Ub$1,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:0,height:te.height},...S.link?{link:S.link}:{},...C(S)}),y.height=Math.max(y.height,te.height),y.baseline=Math.max(y.baseline,te.baseline),y.end=S.end,Xe(),A[A.length-1].pageBreakAfter=true,ln=false;continue}if(S.text===`
13
+ `){let te=o.lineMetrics(S.style);y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:`
14
+ `,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:0,height:te.height},...S.link?{link:S.link}:{},...C(S)}),y.height=Math.max(y.height,te.height),y.baseline=Math.max(y.baseline,te.baseline),y.end=S.end,Xe(),ln=true;continue}ln=false,nn(S.start),E.length>0&&S.start>=Math.min(...E)&&Ie(S.start);let z=o.lineMetrics(S.style),U=0;for(let te of xg(S.text)){let se=S.text.slice(U,te);if(se.length===0)continue;let Y=!!S.projected||!!S.positionalTab||S.end-S.start!==S.text.length,me=Y?{paragraphId:n,start:S.start,end:S.end}:{paragraphId:n,start:S.start+U,end:S.start+te};if(se===" "){(y.spans.length>0||y.drawings.length>0)&&y.width>=ce()&&e0(x,L,te)&&Xe();let We=G()+y.width,xe=n0(x,L,te,o),ze=S.positionalTab?t0(S.positionalTab,t,B,u?.marginExtent):null,Ln=ze===null?ao(l,We,B):ze.positionPt>We?ze:{...ao(l,We,B),...ze.leader?{leader:ze.leader}:{}},ir=jd(Ln.alignment,We,Ln.positionPt,xe.width,xe.decimalOffset);y.spans.push({range:me,text:" ",props:S.props,style:S.style,box:{x:We,y:0,width:ir,height:z.height},...Ln.leader?{tabLeader:Ln.leader,tabLeaderAdvancePt:o.measure(Dd.get(Ln.leader)??".",S.style)}:{},...S.link?{link:S.link}:{},...Ln.leader?{tabLeader:Ln.leader}:{},...Y&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...C(S)}),y.width+=ir,y.height=Math.max(y.height,z.height),y.baseline=Math.max(y.baseline,z.baseline),y.end=Y?S.end:S.start+te,pn=" ",U=te;continue}let Be=S.measureText??se,Ne=o.measure(Zt(Be,S.style),S.style),Pe=U>0||pn===""||/[\s\u00a0]$/.test(pn)||/^[\s\u00a0]/.test(se)||Ss.has(pn[pn.length-1])&&!Ss.has(se[0]);if(Pe&&(Oe=y.spans.length,Gn=y.width,yn=y.end),Ie(S.start+U),y.width+Ne>ce()+QP&&(y.spans.length>0||y.drawings.length>0))if(Pe||Oe<=0){if(!(Se()&&y.width+Ne<=ce()+.001)){if(Xe(),!fe(Ne))continue}}else {let We=y.spans.splice(Oe);y.width=Gn,y.end=yn,y.height=0,y.baseline=0;for(let xe of y.spans){let ze=o.lineMetrics(xe.style);y.height=Math.max(y.height,ze.height),y.baseline=Math.max(y.baseline,ze.baseline);}Xe();for(let xe of We){let ze=o.lineMetrics(xe.style);y.spans.push({...xe,box:{...xe.box,x:G()+y.width}}),y.width+=xe.box.width,y.height=Math.max(y.height,ze.height),y.baseline=Math.max(y.baseline,ze.baseline),y.end=xe.range.end;}Oe=0,Gn=0;}else if(y.spans.length===0&&y.drawings.length===0&&Ne>ce()+.001&&!fe(Ne))continue;let He=se,Bn=S.start+U,wn=Ne;if(!Y&&S.measureText===void 0)for(;y.spans.length===0&&He.length>1&&wn>ce();){let We=1,xe=He.length-1,ze=1;for(;We<=xe;){let sr=We+xe>>1;o.measure(Zt(He.slice(0,sr),S.style),S.style)<=ce()?(ze=sr,We=sr+1):xe=sr-1;}let Ln=He.slice(0,ze),ir=o.measure(Zt(Ln,S.style),S.style);y.spans.push({range:{paragraphId:n,start:Bn,end:Bn+ze},text:Ln,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:ir,height:z.height},...S.link?{link:S.link}:{},...S.noteNav?{noteNav:S.noteNav}:{},...C(S)}),y.width+=ir,y.height=Math.max(y.height,z.height),y.baseline=Math.max(y.baseline,z.baseline),y.end=Bn+ze,Xe(),He=He.slice(ze),Bn+=ze,wn=o.measure(Zt(He,S.style),S.style);}y.spans.push({range:Y?me:{paragraphId:n,start:Bn,end:S.start+te},text:He,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:wn,height:z.height},...S.link?{link:S.link}:{},...Y&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...C(S)}),y.width+=wn,y.height=Math.max(y.height,z.height),y.baseline=Math.max(y.baseline,z.baseline),y.end=Y?S.end:S.start+te,pn=se,U=te;}}return (y.spans.length>0||y.drawings.length>0||A.length===0||ln)&&Xe({includeParagraphMark:true}),i!==null&&a&&a.set(i,A.map(r0)),A}var vs=32,Pg=4096,i0=128,s0=/[\u0000-\u001F\u007F-\u009F]/,l0={major:null,minor:null};function Pr(e){return e.kind!=="textValue"}function Fa(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Ea(e,n){for(let t of e.children)if(Pr(t)&&t.localName===n)return t}function To(e){return !(e===void 0||e.length===0||e.length>i0||s0.test(e)||I(e))}function d0(e){return e==="1"||e==="true"||e==="on"}function Is(e){return e.map(n=>n.attributes?{n:n.localName,a:n.attributes}:{n:n.localName})}function Aa(e){if(e){for(let n of e.children)if(Pr(n)&&(n.kind==="runProperties"||n.localName==="rPr"))return n}}function Ts(e){if(e){for(let n of e.children)if(Pr(n)&&(n.kind==="paragraphProperties"||n.localName==="pPr"))return n}}var wg=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function ko(e){return e.some(n=>wg.has(n.localName))?e.filter(n=>!wg.has(n.localName)):e}function c0(e){let n=Ea(e,"docDefaults");if(!n)return {run:[],paragraph:[],paragraphNode:void 0};let t=Ea(n,"rPrDefault"),r=Ea(n,"pPrDefault"),o=Aa(t),a=Ts(r);return {run:ko(kn(o)),paragraph:ko(kn(a)),paragraphNode:a}}function u0(e){let n=Fa(e,"styleId");if(!To(n))return null;let t=Fa(e,"type")??"",r=(()=>{let d=Ea(e,"basedOn");return d?Fa(d,"val"):void 0})(),o=To(r)?r:null,a=Ts(e),i=Aa(e),s=new Map,l=0;for(let d of e.children){if(d.kind==="textValue"||d.localName!=="tblStylePr")continue;if(l>=f0)break;l+=1;let c=Fa(d,"type");c&&!s.has(c)&&s.set(c,d);}return {styleId:n,type:t,basedOn:o,isDefault:d0(Fa(e,"default")),paragraphProperties:ko(kn(a)),runProperties:ko(kn(i)),paragraphPropertiesNode:a,tablePropertiesNode:Ea(e,"tblPr"),conditionalTableFormats:s}}var f0=32,Na=Object.freeze({tablePropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function Ig(e,n){if(!n||!To(n))return Na;let t=Cc(e,n,"table");if(t.length===0)return Na;let r=[],o=[],a=[],i=[],s=new Map;for(let l of t){l.tablePropertiesNode&&r.push(l.tablePropertiesNode),l.paragraphPropertiesNode&&o.push(l.paragraphPropertiesNode),a.push(...l.paragraphProperties),i.push(...l.runProperties);for(let[d,c]of l.conditionalTableFormats)s.set(d,c);}return {tablePropertyNodes:r,paragraphPropertyNodes:o,paragraphProperties:a,runProperties:i,conditional:s}}var Tc=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function vg(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 s=Ts(i);s&&(t.push(s),r.push(...ko(kn(s))));let l=Aa(i);l&&o.push(...ko(kn(l)));}return t.length===0&&r.length===0&&o.length===0?Tc:{paragraphProperties:r,paragraphPropertyNodes:t,runProperties:o}}function p0(e,n=l0){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=c0(e),o=null,a=null,i=0;for(let l of e.children){if(!Pr(l)||l.localName!=="style")continue;if(i>=Pg)break;i+=1;let d=u0(l);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:Is(r.run),dP:Is(r.paragraph),defP:o,defC:a,theme:n,styles:[...t.values()].map(l=>({id:l.styleId,type:l.type,basedOn:l.basedOn,p:Is(l.paragraphProperties),r:Is(l.runProperties)}))}),docDefaultsRun:r.run,docDefaultsParagraph:r.paragraph,docDefaultsParagraphNode:r.paragraphNode,defaultParagraphStyleId:o,defaultCharacterStyleId:a,themeFonts:n,styles:t}}function kc(e,n){let t=null;for(let r of e){if(r.localName!==n)continue;let o=r.attributes?.val;t=To(o)?o:null;}return t}function Cc(e,n,t){let r=e.styles.get(n);if(!r||r.type!==t)return [];let o=[],a=new Set,i=n,s=0;for(;i!==null&&s<vs&&!(a.has(i)||!To(i));){a.add(i);let l=e.styles.get(i);if(!l)break;o.push(l),i=l.basedOn,s+=1;}return o.reverse()}function Co(e,n,t){let r=kn(n),o=kc(r,"pStyle")??e.defaultParagraphStyleId,a=o?Cc(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...t?.paragraphProperties??[],...a.flatMap(p=>p.paragraphProperties)],s=[...i,...r],l=[];e.docDefaultsParagraphNode&&l.push(e.docDefaultsParagraphNode),t&&l.push(...t.paragraphPropertyNodes);for(let p of a)p.paragraphPropertiesNode&&l.push(p.paragraphPropertiesNode);n&&l.push(n);let d=Aa(n&&Pr(n)?n:void 0),c=kn(d),u=[...e.docDefaultsRun,...t?.runProperties??[],...a.flatMap(p=>p.runProperties)],f=c.length===0?u:[...u,...c];return {paragraphProperties:s,inheritedParagraphProperties:i,paragraphPropertyNodes:l,runProperties:u,markRunProperties:f,styleId:o??null}}function Tg(e){let n;for(let t of e){if(!t||t.kind==="textValue")continue;let r=false;for(let o of t.children)if(Pr(o)&&o.localName==="pBdr"){r=true;break}r&&(n=Rt(t).bottom);}return n}function Ot(e,n,t){let r=[];if(t){let a=kc(n,"rStyle")??t.defaultCharacterStyleId;a&&(r=Cc(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 Da(e,n,t,r,o,a=false){let i=Ts(e),s=t?Co(t,i,o):null,l=s?[...s.paragraphProperties]:kn(i),d=kn(Aa(i&&Pr(i)?i:void 0)),c=s?s.runProperties:[],u=s?s.markRunProperties:d,f=Ma(l),p=0,m=0;if(r)p=r.indent.hanging,m=r.indent.firstLine;else for(let h of l){if(h.localName!=="ind")continue;let x=La(h.attributes?.hanging),I=La(h.attributes?.firstLine);(h.attributes?.hanging!==void 0||h.attributes?.firstLine!==void 0)&&(p=x!==null?Math.max(0,Dc$1(x)):0,m=I!==null?Dc$1(I):0);}let g=r?{left:r.indent.left,right:r.indent.right,hanging:p,firstLine:m}:{left:f.left,right:f.right,hanging:p,firstLine:m},b=s?Hd(s.paragraphPropertyNodes):zd(i);return {props:l,indent:g,available:Math.max(1,n-g.left-g.right),alignment:Rg(l),spacing:Od(l,{inList:r!==void 0,inTableCell:a}),lineSpacing:Bd(l),contextualSpacing:Md(l),styleId:s?s.styleId:kc(l,"pStyle")??null,bottomBorder:s?Tg(s.paragraphPropertyNodes):Rt(i).bottom,borders:s?fa(s.paragraphPropertyNodes):Rt(i),shading:Ad(l),inheritedRunProperties:c,markRunProperties:u,tabStops:b,tabStopsCacheToken:yr(b),...r?{listItem:r}:{}}}var kg=new WeakMap;function m0(e){let n=kg.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 kg.set(e,r),r}function Cg(e,n){return !n||!m0(n)?Rt(e):fa(Co(n,e).paragraphPropertyNodes)}var g0=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Oc(e){let n=e?.val;return n!=="0"&&n!=="false"&&n!=="off"}function Og(e){let n=false,t=false,r=true;for(let o of e)switch(o.localName){case "keepNext":n=Oc(o.attributes);break;case "keepLines":t=Oc(o.attributes);break;case "widowControl":r=Oc(o.attributes);break;}return !n&&!t&&r?g0:{keepNext:n,keepLines:t,widowControl:r}}function Bg(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 Lg(e,n,t,r){let o=0,a=t;for(let i=n;i-n<8;i+=1){let s=e[i];if(!s||s.kind!=="paragraph"||!s.spacing||!s.keeps)return null;o+=Math.max(s.spacing.before,a)-a;let l=r(i);if(!s.keeps.keepNext||i+1>=e.length)return o+=l[0]??0,s.keeps.widowControl&&l.length>1&&(o+=l[1]),o;for(let d of l)o+=d;o+=s.spacing.after,a=s.spacing.after;}return null}function h0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);o!==void 0&&(t===e&&(t=[...e]),t[r]=`${t[r]}~mk~${o}`);}return t}function y0(e,n,t){let r=e;for(let o=0;o<e.length;o+=1){if(!n(o))continue;let a=t(o);if(a===null)continue;let i=o>0&&t(o-1)===a,s=o+1<e.length&&t(o+1)===a;r===e&&(r=[...e]),r[o]=`${r[o]}~cs~${i?1:0}${s?1:0}`;}return r}function b0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);if(o==="")continue;let a=r>0&&n(r-1)===o,i=r+1<e.length&&n(r+1)===o;t===e&&(t=[...e]),t[r]=`${t[r]}~bg~${a?1:0}${i?1:0}`;}return t}function x0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);o!==""&&(t===e&&(t=[...e]),t[r]=`${t[r]}~toc~${o}`);}return t}function S0(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}function Mg(e,n){let t=y0(e,n.contextualSpacingAt,n.styleIdAt);return t=b0(t,n.borderGroupKeyAt),n.tocVerdicts.length>0&&(t=x0(t,r=>n.tocVerdicts[r])),t=h0(t,n.markerTextAt),t=S0(t,n.keepsNextAt),t}var R0=mo;function Zn(e,n){if(e.kind!=="textValue"){for(let t of e.children)if(t.kind!=="textValue"&&t.namespaceUri===ca$1&&t.localName===n)return t}}function Fg(e){if(e.kind==="textValue")return false;let n=Zn(e,"paragraphProperties")??Zn(e,"pPr");if(!n)return false;let t=Zn(n,"runProperties")??Zn(n,"rPr");return t===void 0?false:Zn(t,"del")!==void 0||Zn(t,"moveFrom")!==void 0}function Eg(e,n){if(e.kind==="textValue"||n>R0)return true;let t=(r,o)=>{for(let a of r){if(a.kind==="textValue")continue;if(a.kind==="run"){for(let s of a.children){if(s.kind==="text"){for(let l of s.children)if(l.kind==="textValue"&&l.value.length>0)return false;continue}if(s.kind!=="runProperties")return false}continue}if(Hb$1(a)){if(o>=Gb$1)continue;let s=Jb$1(a);if(s&&!t(s,o+1))return false;continue}if((a.kind==="hyperlink"||a.kind==="revisionInsert"||a.kind==="revisionMoveTo")&&!Eg(a,o+1))return false}return true};return t(e.children,n)}function Ng(e,n){if(n==="all-markup"||e.kind==="textValue")return false;let t=Zn(e,"paragraphProperties")??Zn(e,"pPr");if(!t)return false;let r=Zn(t,"runProperties")??Zn(t,"rPr");return r===void 0?false:(n==="proposed"?["del","moveFrom"]:["ins","moveTo"]).some(a=>Zn(r,a)!==void 0)}function Bc(e,n="proposed"){return e.kind!=="paragraph"||n!=="proposed"||!Fg(e)?false:Eg(e,0)}function w0(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 P0(e,n){return !(e.kind==="paragraph"&&Bc(e,n))}var zg=new WeakMap;function ks(e){return zg.get(e)??null}function jg(e,n){let t=n.children.filter(a=>Ag(a)),r=e.flatMap(a=>a.children.filter(i=>!Ag(i))),o={...n,children:[...t,...r]};return zg.set(o,{merged:o,members:e}),o}function Ag(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function I0(e,n){if(n==="all-markup")return e.map(i=>i.block);let t=[],r=[],o=null,a=()=>{t.push(...Dg(r)),r=[],o=null;};for(let{block:i,parentKey:s}of e){if(r.length>0&&s!==o&&a(),i.kind!=="paragraph"){a(),t.push(i);continue}let l=Ng(i,n);if((l||r.length>0)&&!T0(i,n)){a(),t.push(i);continue}if(l){r.push(i),o=s;continue}if(r.length===0){t.push(i);continue}let d=[...r,i];r=[],o=null,t.push(jg(d,i));}return t.push(...Dg(r)),t}function Dg(e){if(e.length<2)return e;let n=e[e.length-1];return [jg(e,n)]}function _a(e,n){return I0(v0(e),n).filter(r=>P0(r,n))}function v0(e){let n=[],t=(r,o,a)=>{for(let i of r)if(i.kind!=="textValue"){if(i.kind==="paragraph"||i.kind==="table"){n.push({block:i,parentKey:a});continue}Hb$1(i)&&o<Gb$1&&t(Kb$1(i),o+1,i.id);}};return t(e,0,""),n}var _g=new WeakMap;function T0(e,n){let t=_g.get(e),r=t?.get(n);if(r!==void 0)return r;let o=k0(e,n);return t?t.set(n,o):_g.set(e,new Map([[n,o]])),o}function k0(e,n){if(!C0(e))return false;let t=ss(e,[],void 0,void 0,void 0,void 0,n),r=0;for(let o of t)r=Math.max(r,o.end);return r<=Ud$1(e).length}function C0(e){let n=0,t=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===ca$1&&o.localName==="fldChar"){let a=o.attributes.find(i=>i.localName==="fldCharType")?.value;a==="begin"?n+=1:a==="end"&&(n-=1,n<0&&(t=true));}for(let a of o.children)r(a);}};return r(e),n===0&&!t}var Hg=Pe(16);function Bt(e,n="all-markup"){let t=Hg.get(e),r=t?.[n];if(r)return r;let o=w0(e),a=o?_a(o.children,n):[];return t?t[n]=a:Hg.set(e,{[n]:a}),a}function Cs(e,n="all-markup"){return e.kind!=="note"?[]:_a(e.children,n)}function Lc(e,n="all-markup"){return e.kind==="textValue"?[]:_a(e.children,n)}var O0={state:"none"},Gg=(e,n)=>n.state==="omitted"?e:n;function Os(e,n,t={}){return e.state==="omitted"?n:e.state==="none"?O0:e}function Mc(e,n){let t=Gg;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 Fc(e,n){let t=Gg;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 Bs(e=1048576){let n=e|0;return {intervalsRemaining:n>0?n:0}}function Wg(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]=B0(e[i],o,t,r);}return a}function B0(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,s=o[0].x,l=[],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>s&&i&&(!r||r.intervalsRemaining>0)){let u=l[l.length-1];u&&u.end===s&&u.cellIndex===i.cellIndex&&u.cell===i.cell?l[l.length-1]={start:u.start,end:c.x,cell:u.cell,cellIndex:u.cellIndex}:(l.push({start:s,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(),s=c.x;}return l}function L0(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 Ec(e,n,t,r){r&&(r.columnLookups+=1);let o=e[n];if(!o||t<0)return;let a=L0(o,t)-1;if(a<0)return;let i=o[a];if(!(t>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var Yg=256,Ye={state:"omitted"},As={state:"none"},Kg={top:Ye,left:Ye,bottom:Ye,right:Ye,insideH:Ye,insideV:Ye},Ug={top:Ye,left:Ye,bottom:Ye,right:Ye},$g={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},F0=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 Oo(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Nc(e,n){return e.attributes.find(t=>t.localName===n)?.value}function E0(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function N0(e){if(e===null)return .5;let n=e/8;return !Number.isFinite(n)||n<=0?.5:n>ua?ua:n}function Ds(e){if(!e)return Ye;let n=Nc(e,"val");if(!n)return Ye;if(n==="nil"||n==="none")return As;let t=F0.get(n)??"single",r=Nc(e,"color"),o=r===void 0||r==="auto"?null:Di(r)??null;return {state:"edge",style:t,color:o,widthPt:N0(E0(Nc(e,"sz")))}}function qg(e,n){if(!e)return Ug;let t={top:Ye,left:Ye,bottom:Ye,right:Ye};for(let r of n){let o=r==="left"?"start":r==="right"?"end":void 0,a=Oo(e,r)??(o?Oo(e,o):void 0);t[r]=Ds(a);}return t}function _s(e){let n=e&&Oo(e,"tblBorders");return n?{...qg(n,["top","left","bottom","right"]),insideH:Ds(Oo(n,"insideH")),insideV:Ds(Oo(n,"insideV"))}:Kg}function Hs(e){return qg(e&&Oo(e,"tcBorders"),["top","left","bottom","right"])}function Ac(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function Xg(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 Zg(e,n,t=true){if(e.state==="omitted")return n.state==="omitted"?Ye:n;if(n.state==="omitted")return e;if(e.state==="none")return n.state==="none"?As:n;if(n.state==="none")return e;let r=Ac(e),o=Ac(n);if(r>o)return e;if(o>r)return n;let a=$g[e.style],i=$g[n.style];if(a!==i)return a>i?e:n;let s=Xg(e.color),l=Xg(n.color);return s<l?e:l<s?n:t?e:n}function Ls(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function A0(e,n,t){return t?n==="top"||n==="bottom"?e.insideH:e.insideV:e[n]}function D0(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 Ms(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&&D0(t.edge,o.edge)?t={...t,gridEnd:o.gridEnd}:(n.push(t),t={...o});}return n.push(t),n}function Fs(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 Vg(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 _0(e){if(!(!e||e.style!=="double"))return eo(e.widthPt)}function Es(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function H0(e,n){return n?e==="outer"?n.insetPt:n.insetPt+n.strokePt+n.gapPt:0}function z0(e,n,t){return t?e==="outer"?n-t.insetPt:n-t.insetPt-t.strokePt-t.gapPt:n}function j0(e,n){return n?e==="outer"?n.insetPt+n.strokePt:n.insetPt+n.extentPt:0}function G0(e,n,t){return t?e==="outer"?n-t.insetPt-t.strokePt:n-t.insetPt-t.extentPt:n}function nr(e,n){e.length>=Yg||!(n.width>0)||!(n.height>0)||e.push(n);}function W0(e,n,t,r,o,a,i,s,l,d,c){let u=eo(t.widthPt),{strokePt:f,gapPt:p,extentPt:m,insetPt:g}=u,b=Math.abs(r)<1e-6,h=Math.abs(o-a)<1e-6,x=Math.abs(r)<1e-6,I=Math.abs(o-i)<1e-6;if(n==="top"||n==="bottom"){let M=n==="top"?g:i-g-f,P=n==="top"?g+f+p:i-g-m;for(let B of ["outer","inner"]){let O=r,k=o;b&&(O=H0(B,s)),h&&(k=z0(B,a,l)),nr(e,{side:n,role:B,color:t.color,cssStyle:"solid",x:O,y:B==="outer"?M:P,width:k-O,height:f});}return}let w=n==="left"?g:a-g-f,C=n==="left"?g+f+p:a-g-m;for(let M of ["outer","inner"]){let P=r,B=o;x&&(P=j0(M,d)),I&&(B=G0(M,i,c)),nr(e,{side:n,role:M,color:t.color,cssStyle:"solid",x:M==="outer"?w:C,y:P,width:f,height:B-P});}}function $0(e,n,t,r,o,a,i){let s=t.widthPt,l=Math.max(1,s),d=s*3+l*2;if(n==="top"||n==="bottom"){let u=n==="top"?0:i-d;for(let f=0;f<3;f+=1)nr(e,{side:n,role:f===0?"outer":f===1?"middle":"inner",color:t.color,cssStyle:"solid",x:r,y:u+f*(s+l),width:o-r,height:s});return}let c=n==="left"?0:a-d;for(let u=0;u<3;u+=1)nr(e,{side:n,role:u===0?"outer":u===1?"middle":"inner",color:t.color,cssStyle:"solid",x:c+u*(s+l),y:r,width:s,height:o-r});}function X0(e,n,t,r,o,a,i){let s=t.widthPt;n==="top"?nr(e,{side:n,role:"edge",color:t.color,cssStyle:Es(t.style),x:r,y:0,width:o-r,height:s}):n==="bottom"?nr(e,{side:n,role:"edge",color:t.color,cssStyle:Es(t.style),x:r,y:i-s,width:o-r,height:s}):n==="left"?nr(e,{side:n,role:"edge",color:t.color,cssStyle:Es(t.style),x:0,y:r,width:s,height:o-r}):nr(e,{side:n,role:"edge",color:t.color,cssStyle:Es(t.style),x:a-s,y:r,width:s,height:o-r});}function Ns(e,n){if(e.length===0)return;let t=e[0];return _0(t.edge)}function V0(e,n,t,r,o,a,i,s,l,d){let c=(A,y,ne)=>{let v=[];for(let N of y){if(!N.edge)continue;let j,E;ne?(j=Vg(i,s,N.gridStart),E=Vg(i,s,N.gridEnd)):(j=l[N.gridStart-d]??0,E=l[N.gridEnd-d]??a),v.push({side:A,gridStart:N.gridStart,gridEnd:N.gridEnd,startPt:j,endPt:E,edge:N.edge});}return v},u=c("top",e,true),f=c("left",n,false),p=c("bottom",t,true),m=c("right",r,false),g=[...u,...m,...p,...f],b=Ns(n),h=Ns(r),x=Ns(e),I=Ns(t),w=(A,y)=>A.length===1&&Math.abs(A[0].startPt)<1e-6&&Math.abs(A[0].endPt-y)<1e-6,C=w(u,o),M=w(f,a),P=w(p,o),B=w(m,a),O=[],k=(A,y,ne)=>{for(let v of y){let{edge:N,startPt:j,endPt:E}=v;N.style==="double"?W0(O,A,N,j,E,o,a,A==="top"||A==="bottom"?b:void 0,A==="top"||A==="bottom"?h:void 0,A==="left"||A==="right"?x:void 0,A==="left"||A==="right"?I:void 0):N.style==="triple"?$0(O,A,N,j,E,o,a):ne||X0(O,A,N,j,E,o,a);}};k("top",u,C),k("left",f,M),k("bottom",p,P),k("right",m,B);let D={};return C&&u[0]&&(D.top=u[0].edge),M&&f[0]&&(D.left=f[0].edge),P&&p[0]&&(D.bottom=p[0].edge),B&&m[0]&&(D.right=m[0].edge),g.length>0&&(D.edgeSegments=g),O.length>0&&(D.strokes=O),D}function Dc(e,n,t,r,o,a){let i=e.length,s=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let l=Wg(e,t,o,a),d=(u,f,p)=>Os(u.borders[f],A0(n,f,p),{}),c=(u,f,p,m)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?As:Zg(p,m);for(let u=0;u<i;u+=1){let f=e[u];for(let p=0;p<f.length;p+=1){let m=f[p];if(m.vMergeContinue){s[u][p]={};continue}let g=m.mergeRowSpan??1,b=u+g-1,h=u===0,x=b===i-1,I=m.gridColumn===0,w=m.gridColumn+m.gridSpan-1,C=w>=t-1,M=[];if(h)for(let j=m.gridColumn;j<=w;j+=1)M.push({gridStart:j,gridEnd:j+1,edge:Ls(d(m,"top",false))});let P=[];if(I)for(let j=u;j<=b;j+=1)P.push({gridStart:j,gridEnd:j+1,edge:Ls(d(m,"left",false))});let B=[];for(let j=m.gridColumn;j<=w;j+=1){let E;if(x)E=d(m,"bottom",false);else {let T=Ec(l,b+1,j,o);T?.cell.vMergeContinue?E=Ye:E=c(m.borders.bottom,T?T.cell.borders.top:Ye,d(m,"bottom",true),T?d(T.cell,"top",true):n.insideH);}B.push({gridStart:j,gridEnd:j+1,edge:Ls(E)});}let O=[];for(let j=u;j<=b;j+=1){let E;if(C)E=d(m,"right",false);else {let T=Ec(l,j,w+1,o);E=c(m.borders.right,T?T.cell.borders.left:Ye,d(m,"right",true),T?d(T.cell,"left",true):n.insideV);}O.push({gridStart:j,gridEnd:j+1,edge:Ls(E)});}let k=Ms(M),D=Ms(P),A=Ms(B),y=Ms(O);if(!r){let j={},E=Fs(k,m.gridColumn,w+1),T=Fs(D,u,b+1),H=Fs(A,m.gridColumn,w+1),F=Fs(y,u,b+1);E&&(j.top=E),T&&(j.left=T),H&&(j.bottom=H),F&&(j.right=F);let q=[],G=(X,V)=>{for(let J of V)J.edge&&q.push({side:X,gridStart:J.gridStart,gridEnd:J.gridEnd,startPt:J.gridStart,endPt:J.gridEnd,edge:J.edge});};G("top",k),G("left",D),G("bottom",A),G("right",y),q.length>0&&(j.edgeSegments=q),s[u][p]=j;continue}let ne=r.cellBoxes[u][p],v=[0],N=0;for(let j=u;j<=b;j+=1){let E=r.rowBands[j];N+=E.height,v.push(N);}v.length>1&&(v[v.length-1]=ne.height),s[u][p]=V0(k,D,A,y,ne.width,ne.height,r.columnWidthsPt,m.gridColumn,v,u);}}return s}function Ir(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var _c=Kg,Hc=Ug;var Qg=31680/20,Jn=Object.freeze({type:"auto",value:0}),Y0=100,K0=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function U0(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function jc(e,n){return e.attributes.find(t=>t.localName===n)?.value}function eh(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])*K0[t[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function vr(e){if(!e)return Jn;let n=jc(e,"type");if(n!==void 0&&n!=="pct"&&n!=="dxa")return n==="nil"?{type:"nil",value:0}:Jn;let t=jc(e,"w");if(t===void 0)return Jn;let r=eh(t);if(!r)return Jn;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?Jn:{type:"pct",value:Math.min(a,Y0)}}return !Number.isFinite(r.pt)||r.pt<=0?Jn:{type:"dxa",value:Math.min(r.pt,Qg)}}function Ha(e,n){if(!e)return;let t=vr(e);if(t.type==="dxa")return Math.min(t.value,n)}function nh(e){let n=U0(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 q0(e){let n=[];for(let t of e){let r=jc(t,"w"),o=r===void 0?null:eh(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){n.push(void 0);continue}n.push(o.pt>Qg?void 0:o.pt);}return n}var zc=1,Jg=.001;function Z0(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,s)=>i.span-s.span);for(let i of a){let s=Math.min(i.start+i.span,t);if(s<=i.start)continue;let l=i.preferred.type==="pct"?r*i.preferred.value/100:i.preferred.value;if(!Number.isFinite(l)||l<=0)continue;if(s-i.start===1){let f=o[i.start];o[i.start]=f===void 0?l:Math.max(f,l);continue}let d=[],c=l;for(let f=i.start;f<s;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 th(e){let{columnCount:n,tableWidth:t}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:zc,a=t.type==="dxa"?t.value:t.type==="pct"?o*t.value/100:0,i=q0(e.gridCols),s=Z0(i,e.claims,n,a),l=0,d=0;for(let h of s)h===void 0?d+=1:l+=h;let c=[];if(d>0){let h=l>0?l/Math.max(n-d,1):o/n,x=Math.max(o-l,0)/d,I=Math.max(Math.min(x,h),zc);for(let w of s)c.push(w??I);}else for(let h of s)c.push(h);let u=c.reduce((h,x)=>h+x,0);if(!Number.isFinite(u)||u<=0)return new Array(n).fill(o/n);let f=n*zc,p=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,m=Math.max(a>0?Math.min(a,p):Math.min(u,p),f),g=t.type==="pct"&&a>0;if(u<=m+Jg&&!g||Math.abs(u-m)<=Jg)return c;let b=m/u;return c.map(h=>h*b)}var Gs=16,ja=3,js=31680/20,hh=31680/20,rh=1023,J0=256,oh=31680/20;function ah(e){let n=e&&be(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 ih=31680/20,yh={top:ja,right:ja,bottom:ja,left:ja};function be(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 Q0(e){let n=e&&be(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 sh(e,n){let t=e&&be(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 eI(e){let n=e&&be(e,"vMerge");return n?De(n,"val")!=="restart":false}function nI(e){let n=e&&be(e,"vAlign"),t=n&&De(n,"val");return t==="center"?"center":t==="bottom"?"bottom":"top"}function lh(e){return Nd(e&&be(e,"shd"))}function dh(e,n){let t=e&&be(e,n);if(!t)return false;let r=De(t,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var za=Object.freeze({rule:"auto"});function tI(e){let n=e&&be(e,"trHeight");if(!n)return za;let t=De(n,"hRule"),r=t==="auto"||t==="exact"||t==="atLeast"?t:void 0;if(r==="auto")return za;let o=De(n,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return za;let a=Number(o);if(!Number.isFinite(a)||a<=0)return za;let i=Math.min(a/20,hh);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:za}function zs(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>js?js:r}function Gc(e){if(!e)return {};let n=zs(be(e,"top")),t=zs(be(e,"left")??be(e,"start")),r=zs(be(e,"bottom")),o=zs(be(e,"right")??be(e,"end"));return {...n===void 0?{}:{top:n},...t===void 0?{}:{left:t},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function Wc(e,n){return {top:n.top??e.top,right:n.right??e.right,bottom:n.bottom??e.bottom,left:n.left??e.left}}function Ga(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 ch(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function uh(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(-ih,Math.min(ih,t))}function fh(e){let n=e&&be(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:ch(De(n,"horzAnchor"))??"text",vertAnchor:ch(De(n,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:uh(De(n,"tblpX"))??0,...a?{ySpec:a}:{},yPt:uh(De(n,"tblpY"))??0}}function bh(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 rI=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function Lt(e,n){let t=De(e,n);if(t!==void 0)return t!=="0"&&t!=="false"&&t!=="off"}function oI(e){let n=e&&be(e,"tblLook");if(!n)return rI;let t=De(n,"val"),r=t&&/^[0-9A-Fa-f]{1,4}$/.test(t)?Number.parseInt(t,16):0;return {firstRow:Lt(n,"firstRow")??(r&32)!==0,lastRow:Lt(n,"lastRow")??(r&64)!==0,firstColumn:Lt(n,"firstColumn")??(r&128)!==0,lastColumn:Lt(n,"lastColumn")??(r&256)!==0,rowBanding:Lt(n,"noHBand")===void 0?(r&512)===0:!Lt(n,"noHBand"),columnBanding:Lt(n,"noVBand")===void 0?(r&1024)===0:!Lt(n,"noVBand")}}var $c=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],ph=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function mh(e,n){let t=e&&be(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<$c.length;o+=1)r[o]==="1"&&n.add($c[o]);for(let o=0;o<ph.length;o+=1)Lt(t,ph[o])===true&&n.add($c[o]);}var aI=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function iI(e){let n=new Set;mh(e.rowProperties,n),mh(e.cellProperties,n);let{look:t,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:s}=e,l=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>=s;if(!(n.has("band1Vert")||n.has("band2Vert"))&&t.columnBanding&&!c&&!u){let g=a-(t.firstColumn?1:0);n.add(g%2===0?"band1Vert":"band2Vert");}if(!(n.has("band1Horz")||n.has("band2Horz"))&&t.rowBanding&&!l&&!d){let g=r-(t.firstRow?1:0);n.add(g%2===0?"band1Horz":"band2Horz");}c&&n.add("firstCol"),u&&n.add("lastCol"),l&&n.add("firstRow"),d&&n.add("lastRow"),l&&c&&n.add("nwCell"),l&&u&&n.add("neCell"),d&&c&&n.add("swCell"),d&&u&&n.add("seCell");let m=[];for(let g of aI)n.has(g)&&m.push(g);return m}var gh=new WeakMap;function Bo(e,n,t,r,o="all-markup"){let a=gh.get(e);if(a&&a.contentWidthPt===n&&a.depth===t&&a.styleCascade===r&&a.displayMode===o)return a.structure;let i=sI(e,n,t,r,o);return gh.set(e,{contentWidthPt:n,depth:t,styleCascade:r,displayMode:o,structure:i}),i}function sI(e,n,t,r,o){if(t>=Gs||e.kind!=="table")return null;let a=be(e,"tblPr"),i=a&&be(a,"tblStyle")?De(be(a,"tblStyle"),"val"):void 0,s=r?Ig(r,i):Na,l=oI(a),d=yh,c=_c;for(let H of s.tablePropertyNodes)d=Wc(d,Gc(be(H,"tblCellMar"))),c=Mc(c,_s(H));let u=Wc(d,Gc(a&&be(a,"tblCellMar"))),f=Mc(c,a?_s(a):_c),p=new Map,m=H=>{if(s===Na)return Tc;let F=H.join("|"),q=p.get(F);if(q)return q;let G=vg(s,H);return p.size<J0&&p.set(F,G),G},g=[],b=[],h=1;for(let H of te(e.children)){if(H.kind!=="tableRow")continue;let F=be(H,"trPr"),q=[],G=[],X=[],V=Math.min(sh(F,"gridBefore"),rh);V>0&&b.push({start:0,span:V,preferred:vr(F&&be(F,"wBefore"))});let J=V,K=te(H.children);for(let we of K){if(we.kind!=="tableCell")continue;let ce=be(we,"tcPr"),oe=Math.min(J,rh),Se=Math.min(Q0(ce),1024-oe),Ie=vr(ce&&be(ce,"tcW"));q.push(oe),G.push(Se),X.push(Ie),b.push({start:oe,span:Se,preferred:Ie}),J=oe+Se;}let W=sh(F,"gridAfter"),Q=Math.min(J+W,1024);W>0&&J<1024&&b.push({start:J,span:Math.min(W,1024-J),preferred:vr(F&&be(F,"wAfter"))}),Q>h&&(h=Q),g.push({node:H,cells:K,properties:F,starts:q,spans:G,preferred:X,gridColumns:Q});}let x=nh(e),I=x.length>0?x.length:h,w=g.length,C=[];for(let H=0;H<g.length;H+=1){let F=g[H],q=F.node,G=F.properties,X=0,V=[];for(let ce of F.cells){if(ce.kind!=="tableCell")continue;let oe=be(ce,"tcPr"),Se=F.starts[X],Ie=F.spans[X],nn=F.preferred[X]??Jn,fe=iI({look:l,rowIndex:H,rowCount:w,gridColumn:Se,gridSpan:Ie,columnCount:I,rowProperties:G,cellProperties:oe});X+=1;let tn,Oe=Hc;for(let bn of fe){let Wn=s.conditional.get(bn);if(!Wn)continue;let $n=be(Wn,"tcPr");tn=lh($n)??tn,Oe=Fc(Oe,Hs($n));}let Gn=lh(oe)??tn,yn=Wc(u,Gc(oe&&be(oe,"tcMar"))),pn=_a(ce.children,o);V.push({id:ce.id,gridSpan:Ie,gridColumn:Se,...x[Se]?.id?{gridColumnId:x[Se].id}:{},vMergeContinue:eI(oe),vAlign:nI(oe),margins:yn,borders:Fc(Oe,oe?Hs(oe):Hc),...Gn===void 0?{}:{shading:Gn},preferredWidth:nn,styleFormatting:m(fe),blocks:pn});}let J=G?be(G,"ins")??be(G,"del"):void 0,K=J?J.localName==="ins"?"insert":"delete":void 0,W=J&&De(J,"id"),Q=J&&De(J,"author"),we=J&&De(J,"date");C.push({id:q.id,...K?{revisionKind:K}:{},...W!==void 0?{revisionId:W}:{},...Q!==void 0?{revisionAuthor:Q}:{},...we!==void 0?{revisionDate:we}:{},isHeader:dh(G,"tblHeader"),cantSplit:dh(G,"cantSplit"),height:tI(G),cells:V});}let M=Jn,P,B,O,k,D;for(let H of s.tablePropertyNodes){let F=be(H,"tblW");F&&(M=vr(F));let q=be(H,"tblLayout");q&&(P=De(q,"type")==="fixed"),B=Ha(be(H,"tblInd"),oh)??B,O=ah(H)??O,k=Ha(be(H,"tblCellSpacing"),js)??k,D=fh(H)??D;}let A=a&&be(a,"tblW"),y=A?vr(A):M,ne=a&&be(a,"tblLayout"),v=ne?De(ne,"type")==="fixed":P??false,N=Ha(a&&be(a,"tblInd"),oh)??B??0,j=ah(a)??O??"left",E=t===0?fh(a)??D:void 0,T=Ha(a&&be(a,"tblCellSpacing"),js)??k??0;return {columnWidthsPt:th({gridCols:x,claims:b,columnCount:I,contentWidthPt:n,tableWidth:y,layoutFixed:v}),rows:C,tableWidth:y,layoutFixed:v,indentPt:N,alignment:j,...E?{float:E}:{},cellSpacingPt:T,tableBorders:f,defaultMargins:u}}function Ws(e){let n=[],t=0;for(let r of e.members){let o=Ud$1(r).length;n.push({paragraphId:r.id,base:t,length:o}),t+=o;}return {members:n,total:t}}function Xc(e,n){let t;for(let r of e.members){if(r.base>n)break;(t===void 0||r.length>0||r.base>t.base)&&(t=r);}return t??e.members[e.members.length-1]}function xh(e,n){let t=Xc(n,e.start);if(!t)return e;let r=e.end-t.base;return {paragraphId:t.paragraphId,start:e.start-t.base,end:Math.min(r,t.length)}}function lI(e,n){return {...e,range:xh(e.range,n)}}function $s(e,n){return e.map(t=>{let r=t.spans.map(u=>lI(u,n)),o=r[0],a=t.drawings?.map(u=>{let f=Xc(n,u.start);return f?{...u,paragraphId:f.paragraphId,start:u.start-f.base}:u}),i=o?r.filter(u=>u.range.paragraphId===o.range.paragraphId):[],s=o?(a??[]).filter(u=>u.paragraphId===o.range.paragraphId):[],l=o?{paragraphId:o.range.paragraphId,start:Math.min(o.range.start,...s.map(u=>u.start)),end:Math.max(i[i.length-1].range.end,...s.map(u=>u.start+1))}:xh(t.range,n),d=a,c=t.deletedRanges?.map(u=>({deleted:u,member:Xc(n,u.start)})).filter(({member:u})=>u?.paragraphId===l.paragraphId).map(({deleted:u,member:f})=>({start:u.start-(f?.base??0),end:u.end-(f?.base??0)}));return {...t,range:l,spans:r,...d?{drawings:d}:{},...c?{deletedRanges:c}:{}}})}var Yc=512,Rh=9,Qn=31680/20,dI=8,cI=128;function Wa(e,n){return e.kind!=="textValue"&&e.namespaceUri===ca$1&&e.localName===n}function Ke(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function Cn(e,n){for(let t of e.children)if(Wa(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 uI(e){let n=e/20;return !Number.isFinite(n)||n<=0?0:n>Qn?Qn:n}function Vc(e){let n=e/20;return Number.isFinite(n)?n>Qn?Qn:n<-Qn?-Qn:n:0}function fI(e){let n={left:0,right:0,hanging:0,firstLine:0};if(!e)return n;let t=Cn(e,"ind");if(!t)return n;let r=Mt(Ke(t,"left")??Ke(t,"start"),true),o=Mt(Ke(t,"right")??Ke(t,"end"),true),a=Mt(Ke(t,"hanging")),i=Mt(Ke(t,"firstLine"),true);return {left:r===null?0:Vc(r),right:o===null?0:Vc(o),hanging:a===null?0:uI(a),firstLine:i===null?0:Vc(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function pI(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function mI(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function gI(e,n){let t=Cn(e,n);if(!t)return false;let r=Ke(t,"val");return r!=="0"&&r!=="false"&&r!=="off"}function Sh(e,n){let t=Cn(e,n);if(!t)return;let r=Ke(t,"val");if(!(r===void 0||r.length===0||r.length>cI))return r}function hI(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 wh(e){let n=Mt(Ke(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=Cn(e,"start"),r=1;if(t){let h=Mt(Ke(t,"val"));h!==null&&h>=0&&(r=Math.min(h,9999));}let o=Cn(e,"numFmt"),a=(o?Ke(o,"val"):void 0)??"decimal",i=Cn(e,"lvlText"),s=i?Ke(i,"val")??"":"",l=Cn(e,"lvlJc"),d=mI(l?Ke(l,"val"):void 0),c=Cn(e,"suff"),u=pI(c?Ke(c,"val"):void 0),f=Cn(e,"lvlRestart"),p;if(f){let h=Mt(Ke(f,"val"));h!==null&&h>=0&&h<=9&&(p=h);}let m=Cn(e,"pPr"),g=Cn(e,"rPr"),b=g?co(g):[];return {ilvl:n,start:r,numFmt:a.length>64?"decimal":a,lvlText:s.length>64?s.slice(0,64):s,lvlJc:d,suff:u,indent:fI(m),...p!==void 0?{lvlRestart:p}:{},isLgl:gI(e,"isLgl"),runProperties:b,vanish:hI(b,"vanish")}}function yI(e){let n=Ke(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(!Wa(a,"lvl"))continue;if(t.size>=9)break;let i=wh(a);i&&!t.has(i.ilvl)&&t.set(i.ilvl,i);}let r=Sh(e,"numStyleLink"),o=Sh(e,"styleLink");return {abstractNumId:n,levels:t,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function bI(e){let n=Mt(Ke(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=Cn(e,"startOverride"),r;if(t){let i=Mt(Ke(t,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=Cn(e,"lvl"),a=o?wh(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 xI(e){let n=Ke(e,"numId");if(n===void 0||n.length===0||n.length>64)return null;let t=Cn(e,"abstractNumId"),r=t?Ke(t,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!Wa(a,"lvlOverride"))continue;if(o.size>=Rh)break;let i=bI(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:n,abstractNumId:r,overrides:o}}function SI(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(Wa(a,"abstractNum")){if(r>=Yc)continue;r+=1;let i=yI(a);i&&!n.has(i.abstractNumId)&&n.set(i.abstractNumId,i);continue}if(Wa(a,"num")){if(o>=Yc)continue;o+=1;let i=xI(a);i&&!t.has(i.numId)&&t.set(i.numId,i);}}return {abstractNums:n,nums:t}}function RI(e,n,t){let r=new Set([n.abstractNumId]),o=n;for(let a=0;a<dI;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let s=t(i);if(s===void 0)return null;let l=e.nums.get(s);if(!l)return null;let d=e.abstractNums.get(l.abstractNumId);if(!d||r.has(d.abstractNumId))return null;r.add(d.abstractNumId),o=d;}return null}function Ph(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=RI(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 Lo(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 Kc=Object.freeze({abstractNums:new Map,nums:new Map});function wI(e,n){let t=e.nums.get(n),r=[];for(let o=0;o<=8;o+=1){let a=Lo(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 PI(e,n,t){let r=[];for(let o=0;o<=8;o+=1){let a=Lo(e,n,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...t]}}function II(e,n){if(n===0)return null;if(n===void 0)return e-1;let t=n-1;return t>=e?null:t}function Uc(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 s=t.get(a);s||(s=[false,false,false,false,false,false,false,false,false],t.set(a,s));let l=r.get(a);return l||(l=wI(e,a),r.set(a,l)),{counters:i,initialized:s,starts:l}};return {advance(a,i){if(i<0||i>8||a.length===0||a.length>64)return null;let s=Lo(e,a,i);if(!s)return null;let{abstractNumId:l,level:d}=s,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=PI(e,a,f);for(let w=i+1;w<=8;w+=1){let C=Lo(e,a,w);if(!C)continue;let M=II(w,C.level.lvlRestart);M!==null&&i<=M&&(u[w]=false);}let m=f[i]??d.start;u[i]?c[i]+=1:(c[i]=m,u[i]=true);let g=c.slice(),b=u.slice(),h=g.map((w,C)=>b[C]?w:f[C]??1),x=d.isLgl?p.map(w=>w==="bullet"||w==="none"?w:"decimal"):p,I=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:qd(d.lvlText,h,x);return {abstractNumId:l,numId:a,ilvl:i,level:d,counters:g,markerText:I}}}}var Jc=new WeakMap;function LL(e,n){let t=n.dependencyKeys.size===0||[...n.dependencyKeys].every(r=>r===g.story);Jc.set(e,{preservesNumberedSequence:n.impact==="text-local"&&!n.structural&&n.created.size===0&&n.deleted.size===0&&t});}function TI(e){let n=Jc.get(e);return Jc.delete(e),n}function kI(e){return [e.fontFamily??"",e.fontSizePt,e.bold?1:0,e.italic?1:0,e.characterSpacingPt,e.horizontalScalePercent,e.verticalAlign,e.hidden?1:0,e.kerningMinPt,e.caps?1:0,e.smallCaps?1:0].join(",")}function Qc(e){return e.kind!=="textValue"}function Ih(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function Xs(e,n){for(let t of e.children)if(Qc(t)&&t.localName===n)return t}function eu(e){let n=null;for(let t of e){if(!Qc(t))continue;let r=Xs(t,"numPr");if(!r)continue;let o=Xs(r,"ilvl"),a=Xs(r,"numId"),i=a?Ih(a,"val"):void 0,s=o?Ih(o,"val"):"0";if(!i||i==="0"){n=null;continue}if(i.length>64){n=null;continue}let l=/^\d{1,2}$/.test(s??"")?Number(s):0;if(l<0||l>8){n=null;continue}n={numId:i,ilvl:l};}return n}function CI(e,n){let t=new Set,r=e.styles.get(n);for(let o=0;r!==void 0&&o<vs;o+=1){if(t.has(r.styleId))return;t.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?eu([a]):null;if(i)return i.numId;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}var qc=new WeakMap;function $a(e,n){if(!n)return e;let t=qc.get(e);if(t&&t.styleCascade===n)return t.linked;let r=Ph(e,a=>CI(n,a)),o={styleCascade:n,linked:r};return qc.set(e,o),qc.set(r,o),r}function vh(e){return Number.isFinite(e)?e>Qn?Qn:e<-Qn?-Qn:e:0}function Th(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)?vh(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?vh(Number(o)/20):0});}return n}function kh(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.start!==void 0))}function Ch(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.end!==void 0))}function Mh(e,n,t=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=Ma(n),a=Ma(t),i={hanging:e.hanging,firstLine:e.firstLine},s=kh(t)?a.left:r.left?e.left:kh(n)?o.left:e.left,l=Ch(t)?a.right:r.right?e.right:Ch(n)?o.right:e.right,d=Th(t)??(r.firstLineOffset?i:Th(n)??i);return {left:s,right:l,...d}}function nu(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 s of te(i.children))if(s.kind==="tableRow")for(let l of te(s.children)){if(l.kind!=="tableCell")continue;let d=Lb$1(l.children);r(d,a+1);}}}};return r(e,0),t}var Oh=new WeakMap;function Fh(e,n){let t=Oh.get(e);if(t&&t.styleCascade===n)return t;let r=e.children.find(l=>l.kind==="paragraphProperties"),o=n?Co(n,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&Qc(r)?Xs(r,"rPr"):void 0,s={styleCascade:n,numPr:eu(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:kn(r),inheritedMarkProps:o?o.markRunProperties:kn(i),perLevel:new WeakMap};return Oh.set(e,s),s}function Vs(e,n,t,r){let o=new Map;if(n.nums.size===0)return o;let a=$a(n,t),i=Uc(a);for(let s of nu(e)){let l=Fh(s,t),d=l.numPr;if(!d)continue;let c=i.advance(d.numId,d.ilvl);if(!c)continue;let u=l.perLevel.get(c.level);if(!u){let b=Mh(c.level.indent,l.inheritedParagraphProperties,l.directProps),h=Ot(l.inheritedMarkProps,c.level.runProperties,t);u={indent:b,markerStyle:Ee(h,t?.themeFonts)},l.perLevel.set(c.level,u);}let{indent:f,markerStyle:p}=u,m=uo(c.markerText,p.fontFamily,r),g=[c.numId,c.ilvl,c.level.numFmt,c.level.lvlText,f.left,f.right,f.hanging,f.firstLine,c.level.lvlJc,c.level.suff,c.level.vanish?1:0,m,kI(p)].join("|");o.set(s.id,{numId:c.numId,ilvl:c.ilvl,abstractNumId:c.abstractNumId,numFmt:c.level.numFmt,markerText:m,markerAlign:c.level.lvlJc,suffix:c.level.suff,indent:f,markerStyle:p,cacheToken:g});}return o}var Eh=new WeakMap,Nh=new WeakMap;function Bh(e,n,t){let r=t?Nh.get(t):Eh.get(n);if(r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable)return r}function OI(e,n,t){n?Nh.set(n,t):Eh.set(e,t);}function Ah(e,n,t){if(e.listItems===void 0){let i=Bh(e,n,t);if(i&&t===void 0)return {...e,numberingIndex:i.linkedIndex,...i.listItems?{listItems:i.listItems}:{}}}let r=e.listItems===void 0?Bh(e,n,t):void 0,o=r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable?r.linkedIndex:$a(e.numberingIndex??Kc,e.styleCascade),a=e.listItems??(o.nums.size>0?FI(n,e.numberingIndex,o,e.styleCascade,e.isFontAvailable,t):void 0);return e.listItems===void 0&&OI(n,t,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:o,listItems:a}),{...e,numberingIndex:o,...a?{listItems:a}:{}}}function Tr(e,n){return Ah(e,n,void 0)}function Dh(e,n,t){return Ah(e,n,t)}var Lh=new WeakMap,BI=Object.freeze([]);function LI(e,n){let t=Lh.get(e);if(t&&t.styleCascade===n)return t.numbered;let r=nu([e]).filter(a=>Fh(a,n).numPr!==null),o=r.length>0?r:BI;return Lh.set(e,{styleCascade:n,numbered:o}),o}var Mo=new WeakMap,Zc=new WeakMap;function MI(e,n){return e.length===n.length&&e.every((t,r)=>{let o=n[r];if(!o||t.id!==o.id)return false;let a=t.children.find(s=>s.kind==="paragraphProperties"),i=o.children.find(s=>s.kind==="paragraphProperties");return a===i})}function FI(e,n,t,r,o,a){let i=e[0],s=e[e.length-1],l=a?Zc.get(a):(i?Mo.get(i):void 0)??(s?Mo.get(s):void 0);if((a?TI(a):void 0)?.preservesNumberedSequence&&l&&l.rawIndex===n&&l.styleCascade===r&&l.isFontAvailable===o)return l.listItems;let c=new Array(e.length),u=l!==void 0&&l.rawIndex===n&&l.styleCascade===r&&l.isFontAvailable===o&&l.blocks.length===e.length;for(let m=0;m<e.length;m+=1){let g=e[m],b=l&&l.blocks[m]===g?l.numberedByBlock[m]:LI(g,r);c[m]=b,u&&!MI(b,l.numberedByBlock[m])&&(u=false);}if(l&&u){let m={...l,blocks:e,numberedByBlock:c};return a?Zc.set(a,m):(i&&Mo.set(i,m),s&&s!==i&&Mo.set(s,m)),l.listItems}let f=Vs(e,t,r,o),p={rawIndex:n,styleCascade:r,isFontAvailable:o,blocks:e,numberedByBlock:c,listItems:f};return a?Zc.set(a,p):(i&&Mo.set(i,p),s&&s!==i&&Mo.set(s,p)),f}function Ys(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),s=Math.max(i,o-a),l=Math.max(a,n),d=s;return e.markerAlign==="right"?d=o-n:e.markerAlign==="center"&&(d=s+(l-n)/2),d<i&&(d=i),{x:d,y:t,width:Math.max(n,0),height:r}}function EI(e,n,t=oo,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=n.measure(e.markerText,e.markerStyle),a=Ys(e,o,0,0);if(!a)return 0;let i=e.indent.left,s=a.x+a.width;return e.suffix==="nothing"?s-i:e.suffix==="space"?s+n.measure(" ",e.markerStyle)-i:s<=i?0:ao(t,s,r).positionPt-i}function Ks(e,n,t,r,o){return e?EI(e,t,r,o===void 0?void 0:n.left+o):n.hanging>0?-n.hanging:n.firstLine}function Us(e,n,t,r=0){if(!e||!e.markerText||!t)return;let o=n.measure(e.markerText,e.markerStyle),a=Ys(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 _h=new WeakMap,Hh=new WeakMap,zh=new WeakMap,jh=new WeakMap;function Gh(e){let n=jh.get(e);if(n)return n;let t=new Set,r=[];for(let o of je(e)){for(let a of o.lines)for(let i of an(a))t.has(i.paragraphId)||(t.add(i.paragraphId),r.push(i.paragraphId));o.lines.length===0&&!t.has(o.paragraphId)&&(t.add(o.paragraphId),r.push(o.paragraphId));}return jh.set(e,r),r}function kr(e){let n=_h.get(e);if(n)return n;let t=new Set,r=[];for(let o of e.pages)for(let a of Gh(o))t.has(a)||(t.add(a),r.push(a));return _h.set(e,r),r}function Xa(e){let n=Hh.get(e);if(n)return n;let t=new Map;for(let[r,o]of kr(e).entries())t.set(o,r);return Hh.set(e,t),t}function Wh(e){let n=zh.get(e);if(n)return n;let t=new Set,r=[],o=a=>{for(let i of Nn(a)){for(let s of i.lines)for(let l of an(s))t.has(l.paragraphId)||(t.add(l.paragraphId),r.push(l.paragraphId));i.lines.length===0&&!t.has(i.paragraphId)&&(t.add(i.paragraphId),r.push(i.paragraphId));}};for(let a of e.pages){for(let i of Gh(a))t.has(i)||(t.add(i),r.push(i));for(let i of [a.header,a.footer])i&&o(i.fragments);for(let i of [a.footnotes,a.endnotes])if(i){i.separator&&o(i.separator.fragments);for(let s of i.notes)o(s.fragments);}}return zh.set(e,r),r}var $h=new WeakMap;function tu(e){let n=$h.get(e);if(n)return n;let t=[...je(e)];for(let r of [e.header,e.footer])r&&t.push(...Nn(r.fragments));for(let r of [e.footnotes,e.endnotes])if(r)for(let o of r.notes)t.push(...Nn(o.fragments));return $h.set(e,t),t}var Xh=new WeakMap;function an(e){let n=Xh.get(e);if(n)return n;let t={paragraphId:e.range.paragraphId,start:e.range.start,end:e.range.end,spans:e.spans,drawings:e.drawings??[]},o=e.spans.some(a=>a.range.paragraphId!==e.range.paragraphId)?NI(e):[t];return Xh.set(e,o),o}function NI(e){let n=[];for(let t of e.spans){let r=n[n.length-1];if(r&&r.paragraphId===t.range.paragraphId){n[n.length-1]={...r,start:Math.min(r.start,t.range.start),end:Math.max(r.end,t.range.end),spans:[...r.spans,t]};continue}n.push({paragraphId:t.range.paragraphId,start:t.range.start,end:t.range.end,spans:[t],drawings:[]});}return n.map(t=>({...t,drawings:(e.drawings??[]).filter(r=>r.paragraphId===t.paragraphId)}))}function Ft(e,n){return an(e).find(t=>t.paragraphId===n)??null}function Fo(e,n,t,r){let o=Xa(e),a=o.get(n.paragraphId)??-1,i=o.get(t.paragraphId)??-1,s=o.get(r.paragraphId)??-1;if(a<i||a>s)return null;let l=a===i?Math.max(n.start,t.offset):n.start,d=a===s?Math.min(n.end,r.offset):n.end;return d>l?{start:l,end:d}:null}function WL(e,n){for(let t of e.pages)for(let r of je(t)){let o=tr(r).indexOf(n);if(o>0)return tr(r).slice(0,o).reverse()}return []}var Vh=new WeakMap;function tr(e){let n=Vh.get(e);if(n)return n;let t=[];for(let r of e.lines??[])for(let o of an(r))t.includes(o.paragraphId)||t.push(o.paragraphId);return t.includes(e.paragraphId)||t.push(e.paragraphId),Vh.set(e,t),t}function AI(e,n){let t=tr(e);if(t.length===1)return t[0]===n?{start:e.range.start,end:e.range.end}:null;let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let a of e.lines??[]){let i=Ft(a,n);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function ru(e,n,t){let r=AI(e,n);return r!==null&&t>=r.start&&t<r.end}function $L(e,n){for(let t of e.pages)for(let r of tu(t))if(r.paragraphId===n)return r;for(let t of e.pages)for(let r of tu(t))if(tr(r).includes(n))return r;return null}var lu=8,Yh=new WeakMap;function Zs(e){let n=Yh.get(e);if(n)return n;let t=[],r=new Map,o=new Map,a=new Map,i=new Map,s=new Map,l=(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 m=a.get(f.tableId)??0;r.set(p.id,m),a.set(f.tableId,m+1);}for(let m of p.cells){if(!p.isHeaderRepeat&&!u){let g=`${f.tableId}|${m.gridColumn}`;if(m.blocks.length===0){let b=s.get(g);b&&i.set(m,b);}else s.set(g,{row:p,cell:m});}l(m.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)t.push(c.box.y),l(c.fragments,false);let d={pageTops:t,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return Yh.set(e,d),d}function Ka(e,n){let t=Zs(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 DI(e,n){let t=e.pages[Ka(e,n.y)];if(!t)return false;for(let r of [t.header,t.footer])if(r&&Qs(r.box,n))return true;return false}function iu(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||!Va(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 Js(e,n,t,r={}){let o=e.pages[n];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??lu,measurer:r.measurer},i=Kh(e,o.index,t),s=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),l=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=iu(s,t,a.pageIndex);if(d)return {...d,contentControlId:i};let c=qs(o.fragments,t,a,null);if(c?.onGlyphs)return {...c,contentControlId:i};let u=iu(l,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 m=e.pages[p];if(!m)continue;let g=qs(m.fragments,t,{...a,pageIndex:m.index},null);if(g)return {...g,contentControlId:Kh(e,m.index,t)}}return null}function ZL(e,n,t,r,o={}){let a=e.pages[n];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??lu,measurer:o.measurer};return qs(t,r,i,null)}function _I(e,n,t={}){let r=e.pages[Ka(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=iu(o.anchoredDrawings,a,r.index);if(i)return i}return Js(e,r.index,{x:n.x-r.contentBox.x,y:n.y-r.contentBox.y},t)}function Qs(e,n){return n.x>=e.x&&n.x<e.x+e.width&&n.y>=e.y&&n.y<e.y+e.height}function el(e,n,t){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===n&&Qs(i.box,t)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function Kh(e,n,t){return el(e,n,t)?.id??null}function su(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 HI(e,n,t){return e.kind!=="table"||Math.max(e.box.y-n.y,0,n.y-(e.box.y+e.box.height))>0?su(e.box,n,t):0}function qs(e,n,t,r){if(e.length===0)return null;let o=null;for(let i of e){if(!Qs(i.box,n))continue;o=i;let s=Uh(i,n,t,r);if(s)return s;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:HI(i,n,t.verticalWeight)})).sort((i,s)=>i.score-s.score);for(let{block:i}of a){let s=Uh(i,n,t,r);if(s)return s}return null}function Uh(e,n,t,r){return e.kind==="paragraph"?zI(e,n,t,r,Qs(e.box,n)):KI(e,n,t)}function zI(e,n,t,r,o){let a=jI(e.lines,n.y);if(!a)return null;let i=XI(a,n.x,n.y,t),s=WI(a,n.x),l=Math.min(Math.max(i.offset,s.start),s.end),d={paragraphId:s.paragraphId,offset:l},c=Ua(a,l,t.measurer,s);return {position:d,caret:{position:d,x:i.x,y:c.y,height:c.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?GI(i.drawing):null}}function jI(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 GI(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function WI(e,n){let t=an(e),r=t[0];for(let o of t){let a=o.spans[0];if(a===void 0)continue;let i=o.spans[o.spans.length-1];if(n>=a.box.x&&(r=o),n<i.box.x+i.box.width)break}return r}function $I(e,n,t){for(let r of t??e.drawings??[])if(r.start===n||r.start+1===n)return r;return null}function Va(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:cc(n.x,n.y,e.geometry)}function XI(e,n,t,r){let o=e.spans;for(let l of e.drawings??[])if(Va(l,{x:n,y:t}))return {offset:l.start,x:l.hitBounds.x,withinSpan:true,drawing:l};if(o.length===0&&(e.drawings?.length??0)>0){let l=e.drawings[0];if(n<=l.advanceStart)return {offset:e.range.start,x:l.advanceStart,withinSpan:false,drawing:l};let d=e.drawings[e.drawings.length-1];if(n>=d.advanceEnd)return ou(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:Va(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],s=i.box.x+i.box.width;if(n>=s)return ou(e,s,r);for(let l of o)if(n>=l.box.x&&n<l.box.x+l.box.width)return VI(l,n,r);for(let l=0;l<o.length;l+=1){let d=o[l];for(let c of e.drawings??[]){if(n>=c.advanceStart&&n<c.advanceEnd){let u=Va(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(Va(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[l-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[l-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 ou(e,s,r)}function ou(e,n,t){let r=ny(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,s=t.measurer?Ya(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+s,withinSpan:false}}return {offset:r,x:n,withinSpan:false}}function ny(e,n){let t=n.range.end;if(t>n.range.start&&au(n,t-1)===Ub$1)return t-1;if(Zs(e).lastLineIdOfParagraph.get(n.range.paragraphId)===n.id)return t;let r=t;for(r>n.range.start&&au(n,r-1)===`
15
+ `&&(r-=1);r>n.range.start&&au(n,r-1)===" ";)r-=1;return r}function au(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 qh=new WeakMap,Zh=new WeakMap;function Jh(e){let n=bd(),t=qh.get(e);if(t&&t.epoch===n)return t.boundaries;let r=[0];for(let o of Un(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),qh.set(e,{epoch:n,boundaries:r}),r}function Ya(e,n,t){let r=e.caretEdges;if(r&&n>=0&&n<r.length)return r[n];let o=Zh.get(t);o||(o=new WeakMap,Zh.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 s=n<=0?0:An(e.text.slice(0,n),e.style,t);return a.set(n,s),s}function du(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function nl(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||du(e)?e.box.x+e.box.width*(o/r):e.box.x+Ya(e,o,t)}function Ua(e,n,t,r){let o=$I(e,n,r?.drawings);if(o)return {x:n>o.start?o.advanceEnd:o.advanceStart,y:o.y,height:o.height};let a=r?r.spans:e.spans;if(a.length===0){let d=e.leading??0;return {x:e.contentX,y:e.box.y+d,height:Math.max(0,e.box.height-d-(e.trailingSpacing??0))}}let i=a[0];for(let d=0;d<a.length;d+=1){let c=a[d];if(n>c.range.start&&n<c.range.end){i=c;break}if(n===c.range.end){let u=a[d+1];if(u&&u.range.start===n&&du(c)){i=u;break}if(u&&u.range.start===n&&c.text.endsWith(" ")&&u.box.x-(c.box.x+c.box.width)>.25){i=u;break}i=c;}else n>c.range.end&&(i=c);}let s=nl(i,n,t),l=t?.lineMetrics(i.style);return !l||l.height<=0?{x:s,y:e.box.y,height:e.box.height}:{x:s,y:e.box.y+e.baseline-l.baseline-tc(i.style),height:l.height}}function VI(e,n,t){let r=n-e.box.x,o=e.range.end-e.range.start;if(o<=0||du(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))),m=Math.round(p*o),g=Jh(e),b=g[0],h=Number.POSITIVE_INFINITY;for(let x of g){let I=Math.abs(x-m);I<h&&(h=I,b=x);}return {offset:e.range.start+b,x:e.box.x+e.box.width*(b/o),withinSpan:true}}let a=Jh(e),i=1,s=a.length-1;for(;i<s;){let p=i+s>>1;Ya(e,a[p],t.measurer)<r?i=p+1:s=p;}let l=a[i],d=a[i-1],c=Ya(e,l,t.measurer),u=Ya(e,d,t.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:l),x:e.box.x+(f?u:c),withinSpan:true}}function Qh(e,n,t,r){if(e.length===0)return null;for(let i of e){let s=t(i);if(n>=s&&n<s+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let s=t(i),l=n<s?s-n:n-(s+r(i));l<a&&(a=l,o=i);}return o}function YI(e,n,t,r){return {tableId:n.tableId,rowId:t.id,cellId:r.id,rowIndex:Zs(e).rowIndexById.get(t.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function KI(e,n,t,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],s=Qh(a,n.y,d=>d.box.y,d=>d.box.height);if(s){let d=Qh(s.cells,n.x,c=>c.box.x,c=>c.box.width);d&&i.push(UI(t,s,d));}let l=[];for(let d of a)for(let c of d.cells)c.blocks.length!==0&&(i.some(u=>u.cell===c)||l.push({entry:{row:d,cell:c},score:su(c.box,n,t.verticalWeight)}));l.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...l.map(u=>u.entry)]){let u=YI(t.layout,e,d,c),f=qs(c.blocks,n,t,u);if(f)return f}return null}function UI(e,n,t){return t.blocks.length>0?{row:n,cell:t}:Zs(e.layout).mergeOriginOf.get(t)??{row:n,cell:t}}function ty(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 qI(e,n,t){for(let r of n.lines)for(let o of r.drawings??[])if(o.drawingNodeId===t)return ty(e,o);return null}function ry(e,n,t){if(n.kind==="paragraph")return qI(e,n,t);for(let r of n.rows)for(let o of r.cells)for(let a of o.blocks){let i=ry(e,a,t);if(i)return i}return null}function ey(e,n,t){for(let r of n){let o=ry(e,r,t);if(o)return o}return null}function ZI(e,n){for(let t of e.pages){for(let o of t.anchoredDrawings??[])if(o.drawingNodeId===n)return ty(t.index,o);let r=ey(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 s=i.paintBounds;return s.width<=0||s.height<=0?null:Object.freeze({pageIndex:t.index,x:o.box.x+s.x-t.contentBox.x,y:o.box.y+s.y-t.contentBox.y,width:s.width,height:s.height,record:i})}let a=ey(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 JI(e){let n=[0],t=0;for(let r of e)t+=r,n.push(t);return n}function QI(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 tl(e,n,t,r){return {...e,nestingDepth:t,columnEdges:e.columnEdges??JI(n),rows:e.rows.map(o=>QI(o,r))}}var oy=new WeakMap,Eo=4,cu=6,ay=14,ev={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function uu(e,n,t,r,o){for(let a of e){if(a.kind!=="table")continue;let i=a.nestingDepth??r;for(let s of a.rows){o({pageIndex:n,table:a,row:s,rowOrdinal:s.rowIndex,nestingDepth:i,editable:!s.isHeaderRepeat,pageContentBox:t});for(let l of s.cells)uu(l.blocks,n,t,i+1,o);}}}function eM(e){let n=oy.get(e);if(n)return n;let t=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o],i=s=>{t.push(s);};uu(a.fragments,o,a.contentBox,0,i);for(let s of [a.header,a.footer])s&&uu(s.fragments,o,s.box,0,i);}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(t)});return oy.set(e,r),r}function nM(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 tM(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 rM(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=qa(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 qa(e,n){for(let t of e.cells)if(t.gridColumn===n)return t.gridColumnId??null;return null}function nv(e,n,t,r,o){if(!e.pages[n.pageIndex])return null;let i=n.pageContentBox,s=t-i.x-o,l=r-i.y,d=n.table,c=s-d.box.x,u=l-d.box.y;return c<-Eo||u<-ay||c>d.box.width+Eo||u>d.box.height+cu?null:{x:c,y:u}}function tv(e,n,t,r){if(n.row.isHeaderRepeat)return null;let o=n.table,a=n.row.box.y-o.box.y+n.row.box.height;if(!o.columnEdges.slice(1).some(l=>Math.abs(t-l)<=Eo)&&t>=0&&t<=o.box.width&&Math.abs(r-a)<=Eo)return {kind:"rowDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeY:a};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 l=1;l<o.columnEdges.length-1;l+=1){let d=o.columnEdges[l];if(Math.abs(t-d)>Eo)continue;let c=qa(n.row,l-1),u=qa(n.row,l);if(!(!c||!u))return {kind:"columnDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,leftGridColumnId:c,rightGridColumnId:u,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:d,sheetY:n.pageContentBox.y+o.box.y+r}}let s=o.columnEdges.at(-1);if(Math.abs(t-s)<=Eo){let l=o.columnEdges.length-2,d=qa(n.row,l);return d?{kind:"rightEdge",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,gridColumnId:d,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:s,sheetY:n.pageContentBox.y+o.box.y+r}:null}return null}function oM(e,n,t,r,o=0,a){let i=a??Ka(r,t),s=i>=0?o:0,l=null,d=-1,c=-1,u=f=>{if(!f)return;let p=ev[f.kind];f.nestingDepth<d||f.nestingDepth===d&&p<=c||(d=f.nestingDepth,c=p,l=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let p=nv(r,f,n,t,s);if(!p||(u(tv(e,f,p.x,p.y)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let m=f.row.box.y-f.table.box.y;p.x<=cu&&Math.abs(p.y-(m+f.row.box.height/2))<=f.row.box.height/2+cu&&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 g=0;g<f.table.columnEdges.length-1;g+=1){let b=f.table.columnEdges[g],h=f.table.columnEdges[g+1],x=(b+h)/2;if(Math.abs(p.x-x)>(h-b)/2+2||p.y>ay)continue;let I=qa(f.row,g);if(I){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:I,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return l}var iy=1048576;function fu(e=iy){let n=e|0;return {cellsRemaining:n>0?n:0}}function pu(e,n,t,r){let o=new Map,a=new Map,i=r?.pageFragment===true,s=new Set,l=i,c=p=>{let m=a.get(p);m&&(o.set(m.id,m.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}l&&p.isHeaderRepeat!==true&&(l=false,f(),s?.clear());let m=new Set,g=false;for(let b of p.cells){if(t){if(t.cellsRemaining<=0){g=true;break}t.cellsRemaining-=1;}let h=Math.max(0,Math.min(b.gridColumn|0,1023));if(m.add(h),b.vMergeContinue){let x=a.get(h);x?x.span+=1:s&&!s.has(h)&&(a.set(h,{id:b.id,span:1}));}else c(h),a.set(h,{id:b.id,span:1});s?.add(h);}if(g){f();break}for(let b of [...a.keys()])m.has(b)||c(b);}return f(),o}function ly(e,n,t,r){let o=new Map,a=0,i=s=>{let l=Bo(s,n,0,t,r);if(l)for(let d of l.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 s of e)s.kind==="paragraph"&&s.paragraph?o.set(s.paragraph.id,a++):s.kind==="table"&&s.table&&i(s.table);return o}var ol=4096,sy=1,zn=class extends Error{code;constructor(n,t){super(t),this.name="TablePaginationError",this.code=n;}};function mu(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0}))}function dy(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function cy(e,n,t,r,o){let a=dy(o);if(!(e.length===0||!a||!o.inlineDrawingLayout||!o.anchorFrameBase||!o.pageContentClip))for(let i of e){let s=null,l=null,d=i.lines;for(let u of n){for(let f of u.blocks)if(f.kind==="paragraph"&&f.paragraphId===i.paragraphId){s=f.box,d=f.lines,l=u.box;break}if(s)break}if(!s)continue;let c=l??Object.freeze({x:i.cellOriginX,y:t,width:i.cellContentWidth,height:r});a(wo({paragraph:i.paragraph,paragraphId:i.paragraphId,paragraphBox:s,lines:d,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(s)??s,cellBox:c,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{}}));}}function rv(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(s=>s.kind==="paragraph"&&s.id===o.paragraphId);!a||a.kind!=="paragraph"||Hn(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,wo({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 ov(e,n){let t=dy(e),r=e.deferAnchoredDrawings;return !t&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:t,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{n.push(i);}},flushDeferred:(i,s,l)=>{if(n.length!==0){if(t&&!e.anchorDeferOnly)cy(n,i,s,l,e);else if(r)for(let d of n)r(d);n.length=0;}}}}function rl(e,n,t){let r=0;for(let o=n;o<t&&o<e.length;o+=1)r+=e[o];return r}function gu(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:gu(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=>ps(o,0,n))}:{}}))})}function av(e,n,t,r,o,a,i){let s=e.id,l=o.listItems?.get(s),{props:d,indent:c,available:u,alignment:f,spacing:p,lineSpacing:m,bottomBorder:g,borders:b,shading:h,inheritedRunProperties:x,markRunProperties:I,tabStops:w,tabStopsCacheToken:C}=Da(e,t,o.styleCascade,l,i?.tableCellStyle,true),M=ha(w,o.defaultTabStopPt),P=M===w?C:yr(M),B=Ks(l,c,o.measurer,M,u),O=o.pageExclusionZones?.()??Object.freeze([]),k=o.paragraphOrderIndex?.(s)??Number.MAX_SAFE_INTEGER,D=o.paragraphOrderIndex?yg(O,k,S=>o.paragraphOrderIndex?.(S)):O,A=hg(D,n,0,{left:0,right:c.left+u+c.right}),y=mt(A),ne=y?`${r.toFixed(3)}|${y}`:"",v=Rr({paragraph:e,properties:[...d,...x,...I,{localName:"tabStops",attributes:{token:P}},...l?[{localName:"list",attributes:{token:l.cacheToken}}]:[]],width:u,producer:o.producer,...o.drawingTokenForParagraph?.(e)?{drawingToken:o.drawingTokenForParagraph(e)}:o.drawingLayoutToken?{drawingToken:o.drawingLayoutToken}:{},...ne?{exclusionToken:ne}:{}});o.cache&&o.onCellBreakKey?.(v);let N=Ps(e,s,c.left,u,o.measurer,o.cache,o.cache?v:null,x,M,o.pageContext,o.styleCascade?(S,z)=>Ot(S,z,o.styleCascade):void 0,{lineSpacing:m,equationCacheToken:o.producer,firstLineOffset:B,marginExtent:{left:0,right:c.left+u+c.right},...o.projectLink?{projectLink:o.projectLink}:{},...o.projectFieldLink?{projectFieldLink:o.projectFieldLink}:{},...o.documentProperties?{documentProperties:o.documentProperties}:{},...o.bodyPageFields?{bodyPageFields:true}:{},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)}),...A.length>0?{pageExclusionZones:A}:{},...o.styleCascade?{themeFonts:o.styleCascade.themeFonts}:{},markRunProperties:I}),j=i?.lineStart??0,E=i?.fragmentIndex??0,T=i?.maxBottom??Number.POSITIVE_INFINITY,H=i?.includeAfter??true,F=i?.includeBottomBorder??true,q=j===0?ro(p.before,a):0,G=n+c.left,X=j===0?Xt(b.top):0,V=[],J=r+q+X,K=j,W=false;for(let S=j;S<N.length;S+=1){let z=N[S],U=S===N.length-1,te=U&&F&&g?Xt(g):0,se=U&&H?p.after:0,Y=A.length>0?Ct(J,z.height,A):z.exclusionSkipBefore??0;if(J+Y+z.height+te+se>T+.001)break;J+=Y;let Be=n+c.left+(S===0?B:0),Ne=Math.max(1,u-(S===0?B:0)),Pe=z.spans.map(xe=>({...xe,range:{...xe.range,paragraphId:s},box:{...xe.box,x:xe.box.x+n,y:J}})),He=Rs(Pe,o.measurer,Be,Ne,f,U,f==="center"||f==="right"?z.width:void 0),Bn=Pe.length>0&&He.length>0?He[0].box.x-Pe[0].box.x:f!=="left"&&f!=="both"?(()=>{let xe=Ne-z.width;return xe<=0?0:f==="center"?xe/2:xe})():0,wn=Object.freeze({x:n,y:r,width:t,height:Math.max(0,T-r)}),We=ws(z.drawings.map(xe=>ms(Object.freeze({...xe,paragraphId:s,x:n+xe.x,advanceStart:n+xe.advanceStart,advanceEnd:n+xe.advanceEnd,y:J+xe.y,paintBounds:Object.freeze({...xe.paintBounds,x:n+xe.paintBounds.x,y:J+xe.paintBounds.y}),hitBounds:Object.freeze({...xe.hitBounds,x:n+xe.hitBounds.x,y:J+xe.hitBounds.y})}),wn)),Bn);V.push({id:o.nextLineId(s,z.start,S),range:{paragraphId:s,start:z.start,end:z.end},spans:He,...We.length>0?{drawings:We}:{},box:{x:n+c.left,y:J,width:u,height:z.height},contentX:He[0]?.box.x??Be+Bn,baseline:z.baseline,leading:z.leading,trailingSpacing:z.trailingSpacing,...z.deletedRanges?{deletedRanges:z.deletedRanges}:{}}),J+=z.height,K=S+1,W=true;}if(!W)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:j,complete:false,fitted:false};let Q=K>=N.length,we=V[0].box.y,ce=J,oe=[],Se,Ie=we,nn=ce,fe=b.left?In(b.left):0,tn=b.right?In(b.right):0,Oe=b.left?G-b.left.spacePt-fe:G,Gn=b.right?G+u+b.right.spacePt+tn:G+u,yn=Math.max(Gn-Oe,0);if(X>0&&b.top){let S=In(b.top),z=we-b.top.spacePt-S;oe.push({side:"top",edge:b.top,box:{x:Oe,y:z,width:yn,height:S}}),Ie=z;}if(Q&&F&&g){let S=In(g),z=ce+g.spacePt,U={x:Oe,y:z,width:yn,height:S};Se={edge:g,box:U},oe.push({side:"bottom",edge:g,box:U}),nn=z+S;}let pn=Math.max(nn-Ie,0);if(b.left&&oe.push({side:"left",edge:b.left,box:{x:G-b.left.spacePt-fe,y:Ie,width:fe,height:pn}}),b.right&&oe.push({side:"right",edge:b.right,box:{x:G+u+b.right.spacePt,y:Ie,width:tn,height:pn}}),b.bar){let S=In(b.bar);oe.push({side:"bar",edge:b.bar,box:{x:G-b.bar.spacePt-S,y:we,width:S,height:Math.max(ce-we,0)}});}let bn=Q&&H?p.after:0,Wn=nn+bn,$n=h===void 0?void 0:b.left||b.right?{x:Oe,y:Ie,width:yn,height:Math.max(nn-Ie,0)}:ma(V,G,u),mn=Q&&o.displayMode==="all-markup",Xn=mn?go(e):[],sn=mn?ka(e):null,On=j===0?Us(l,o.measurer,V[0]?{y:V[0].box.y,height:V[0].box.height}:void 0,n):void 0,Xe=ks(e),ln=Xe?$s(V,Ws(Xe)):V,L={kind:"paragraph",id:`${s}#f${E}`,paragraphId:s,fragmentIndex:E,range:{paragraphId:s,start:ln[0].range.start,end:ln[ln.length-1].range.end},props:d,spacing:{before:q,after:bn},indent:c,tabStops:M,...Se?{bottomBorder:Se}:{},...oe.length>0?{borders:oe}:{},...h===void 0?{}:{shading:h},...$n===void 0?{}:{shadingBox:$n},...On?{marker:On}:{},...os(Xn,sn),lines:ln,box:{x:G,y:r,width:u,height:Wn-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let S=Object.freeze({x:n,y:r,width:t,height:Math.max(0,T-r)}),z=L.box,U={paragraph:e,paragraphId:s,paragraphBox:z,lines:ln};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...U,cellOriginX:n,cellContentWidth:t}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(wo({paragraph:e,paragraphId:s,paragraphBox:z,lines:ln,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(z)??z,cellBox:S,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{}}));}return {fragment:L,bottom:Wn,spaceAfter:bn,nextLineIndex:K,complete:Q,fitted:true}}function Cr(e,n,t,r,o,a){let i=uy(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 uy(e,n,t,r,o,a,i,s,l){let d=[],c=r,u=s.previousSpaceAfter,f=s.blockIndex,p=s.lineIndex,m=s.paragraphFragmentIndex,g=false,b=false;for(;f<e.length;){let h=e[f];if(h.kind==="table"){p!==0&&(p=0),u=0;let I=lv(h,n,t,c,a+1,i);if(!I){f+=1;continue}if(I.bottom>o+.001){b=!g;break}d.push(I.fragment),c=I.bottom,g=true,f+=1,p=0;continue}if(h.kind!=="paragraph"){f+=1,p=0;continue}let x=av(h,n,Math.max(1,t-n),c,i,u,{lineStart:p,fragmentIndex:m,maxBottom:o,includeAfter:true,includeBottomBorder:true,...l?{tableCellStyle:l}:{}});if(!x.fitted||!x.fragment)break;if(d.push(x.fragment),c=x.bottom,g=true,x.complete)u=x.spaceAfter,f+=1,p=0,m=0;else return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:x.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:m+1},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:p,previousSpaceAfter:u,paragraphFragmentIndex:m},complete:f>=e.length,fitted:g,nestedSplitBlocked:b}}function fy(e,n){return {top:e.top+Ir(n.top),right:e.right+Ir(n.right),bottom:e.bottom+Ir(n.bottom),left:e.left+Ir(n.left)}}function iv(e,n,t){return {top:n?{state:"none"}:e.top,left:e.left,bottom:t?{state:"none"}:e.bottom,right:e.right}}function py(e,n,t){return !n&&!t?e:{...e,cells:e.cells.map(r=>({...r,borders:iv(r.borders,n,t)}))}}function Za(e,n,t,r,o,a,i,s=0){let l=hu(e,n,t,r,Number.POSITIVE_INFINITY,o,false,a,i,mu(e),s);return {record:l.record,bottom:l.bottom}}function hu(e,n,t,r,o,a,i,s,l,d,c=0){let u=rl(n,0,n.length),f=Number.isFinite(c)&&c>0?c/2:0,p=l.measurer.lineMetrics(dt).height,m=e.height,g=m.rule==="exact"?m.valuePt:void 0,b=m.rule==="atLeast"?m.valuePt:void 0,h=[],{rowDeps:x,flushDeferred:I}=ov(l,h),w=a&&l.pageOccurrenceKey?{...x,nextLineId:(v,N,j)=>x.nextLineId(v,N,j,l.pageOccurrenceKey())}:x,C=g===void 0?o:Math.min(o,r+Math.max(0,g)),M=[],P=false,B=false,O=r;for(let v=0;v<e.cells.length;v+=1){let N=e.cells[v],j=d[v]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0},E=N.gridSpan,T=N.gridColumn,H=t+rl(n,0,T),F=rl(n,T,Math.min(T+E,n.length))||u,q=Math.min(f,Math.max((F-sy)/2,0)),G=H+q,X=Math.max(F-2*q,sy),V=fy(N.margins,N.borders),J=i?Ir(N.borders.top):V.top,K=r+J,W=C-V.bottom,Q=[],we=K,ce=j,oe=true,Se=false,Ie=false;if(!N.vMergeContinue)if(W<K+.001)oe=j.blockIndex>=N.blocks.length;else {let fe=uy(N.blocks,G+V.left,G+X-V.right,K,W,s,w,j,N.styleFormatting);Q=fe.blocks,we=fe.bottom,ce=fe.cursor,oe=fe.complete,Se=fe.fitted,Ie=fe.nestedSplitBlocked,Se&&(P=true),Ie&&(B=true);}let nn=Math.min(C,Se?we+V.bottom:r+J+p+V.bottom);nn>O&&(O=nn),M.push({cell:N,x:G,width:X,gridColumn:T,blocks:Q,contentTop:K,contentBottom:we,insets:{...V,top:J},nextCursor:ce,complete:N.vMergeContinue?true:oe,fitted:Se,nestedSplitBlocked:Ie});}O=Math.min(C,Math.max(O,r));for(let v of M){let N=v.fitted?v.contentBottom+v.insets.bottom:r+v.insets.top+p+v.insets.bottom;N>O&&N<=C+.001&&(O=N);}O=Math.min(C,O);let k=false;if(g!==void 0){let v=r+g;v<=o+.001?(O=v,k=true):O=Math.min(o,O);}else if(b!==void 0){let v=r+b;M.every(j=>j.complete)&&v<=o+.001&&v>O&&(O=v);}O=Math.min(o,O);let D=Math.max(0,O-r),A=M.map(v=>{let N=v.blocks,j=k?true:v.complete;if(!v.cell.vMergeContinue&&j&&v.cell.vAlign!=="top"&&N.length>0){let E=v.contentBottom-v.contentTop,T=D-v.insets.top-v.insets.bottom-E;if(T>0){let H=v.cell.vAlign==="center"?T/2:T;N=gu(N,H);}}return {id:v.cell.id,gridColumn:v.gridColumn,...v.cell.gridColumnId?{gridColumnId:v.cell.gridColumnId}:{},gridSpan:v.cell.gridSpan,vMergeContinue:v.cell.vMergeContinue,...v.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...v.cell.shading===void 0?{}:{shading:v.cell.shading},blocks:N,box:{x:v.x,y:r,width:v.width,height:D}}}),y=k||M.every(v=>v.complete)?null:M.map(v=>v.nextCursor),ne=k||M.every(v=>v.complete);return I(A,r,D),{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:A,box:{x:t,y:r,width:u,height:D}},bottom:O,remainder:ne?null:y,fitted:P||e.cells.every(v=>v.vMergeContinue)||k,nestedSplitBlocked:B}}function sv(e){return {...e,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function yu(e,n,t,r,o,a=0){let i=0,s={...sv(o),pageExclusionZones:void 0,nextLineId:()=>`probe-${i++}`};return Za(e,n,t,0,false,r,s,a).record.box.height}function bu(e,n,t,r,o,a,i,s){if(e.length===0)return [];let l=new Map;for(let b of t)for(let h of b.cells)l.set(h.id,h);let d=pu(e,a,o,{pageFragment:true}),c=e.map((b,h)=>({...b,cells:b.cells.map(x=>{let I=d.get(x.id);if(x.vMergeContinue&&I===void 0)return {...x,paintInert:true,rowSpan:1,borders:{},blocks:[]};let w=x.vMergeContinue,C=I??1,M=x.box.height;if(C>1){let k=e[h+C-1];M=k.box.y+k.box.height-x.box.y;}let P=l.get(x.id),B=x.blocks;if(P&&P.vAlign!=="top"&&B.length>0){let k=fy(P.margins,P.borders),D=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(let y of B)D=Math.min(D,y.box.y),A=Math.max(A,y.box.y+y.box.height);if(Number.isFinite(D)&&Number.isFinite(A)){let y=M-k.top-k.bottom-(A-D),v=x.box.y+k.top+(y>0?P.vAlign==="center"?y/2:y:0)-D;if(Math.abs(v)>.001){B=gu(B,v);for(let N of B)N.kind==="paragraph"&&i?.(N.paragraphId,v);}}}let O=Object.freeze({x:x.box.x,y:x.box.y,width:x.box.width,height:M});return P&&s&&(C>1||P.vAlign!=="top"&&B.length>0)&&rv(B,P.blocks,O,s),{...x,...w?{vMergeContinue:false,paintInert:false}:{},rowSpan:C,blocks:B,box:{...x.box,height:M}}})})),u=c.map(b=>b.cells.map(h=>{let x=l.get(h.id);return {gridColumn:h.gridColumn,gridSpan:h.gridSpan,vMergeContinue:h.vMergeContinue,borders:x?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:h.rowSpan??1}})),f=n.columnWidthsPt.length,p=n.tableBorders,m={columnWidthsPt:n.columnWidthsPt,rowBands:c.map(b=>({y:b.box.y,height:b.box.height})),cellBoxes:c.map(b=>b.cells.map(h=>({width:h.box.width,height:h.box.height})))},g=Dc(u,p,f,m,void 0,r);return c.map((b,h)=>({...b,cells:b.cells.map((x,I)=>{let w=g[h][I];return x.paintInert||x.vMergeContinue?{...x,borders:{},paintInert:true}:{...x,borders:w}})}))}function lv(e,n,t,r,o,a){if(o>=Gs)return null;let i=Math.max(1,t-n),s=Bo(e,i,o,a.styleCascade,a.displayMode);if(!s||s.rows.length===0)return null;let l=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:b=>{l.push(b);}},c=n+Ga(s,i),u=[],f=r;for(let b of s.rows){let h=Za(b,s.columnWidthsPt,c,f,false,o,d,s.cellSpacingPt);u.push(h.record),f=h.bottom;}let p=bu(u,s,s.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let b of l)for(let h of p)if(h.cells.some(I=>I.blocks.some(w=>w.kind==="paragraph"&&w.paragraphId===b.paragraphId))){cy([b],h.cells,h.box.y,h.box.height,a);break}let m=rl(s.columnWidthsPt,0,s.columnWidthsPt.length),g=new Map;return {fragment:tl({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:p,box:{x:c,y:r,width:m,height:f-r}},s.columnWidthsPt,o,g),bottom:f}}function my(e){let n=e.picture;return n?.embeddedRelationshipId?`embed:${e.ownerPartName}:${n.embeddedRelationshipId}`:n?.linkedRelationshipId?`link:${e.ownerPartName}:${n.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var gy=new WeakMap,xu=new Map,dv=16,cv=32;function Sy(e,n){let t=gy.get(e);if(t)return t;let r;if(e.kind==="drawing"||Sa$1(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:xu,visited:1,deepest:0};else if((n<2||e.children.length>=dv)&&n<cv){let o=null,a=1,i=0;for(let s of e.children){let l=Sy(s,n+1);if(a+=l.visited,l.deepest+1>i&&(i=l.deepest+1),l.atoms.size>0){o||(o=new Map);for(let[d,c]of l.atoms)o.set(d,c);}}r={atoms:o??xu,visited:a,deepest:i};}else {let o=new Map,a=0,i=0,s=[{node:e,depth:0}];for(;s.length>0;){let l=s.pop();if(a+=1,a>Qa$1)break;l.depth>i&&(i=l.depth);let d=l.node;if(d.kind==="drawing"||Sa$1(d)){o.set(d.id,d);continue}if("children"in d)for(let c=d.children.length-1;c>=0;c-=1)s.push({node:d.children[c],depth:l.depth+1});}r={atoms:o.size>0?o:xu,visited:a,deepest:i};}return gy.set(e,r),r}function hy(e){let n=Sy(e.root,0);return n.visited>Qa$1||n.deepest>Oa$1.maxDrawingDepth?null:n.atoms}function Su(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 Ja(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 uv=1;function Ru(e,n){if(e.kind==="drawing"||Sa$1(e)){n.push(e.id);return}if("children"in e)for(let t of e.children)Ru(t,n);}function fv(e){if(e.kind!=="paragraph")return [];let n=[];for(let t of e.children)Ru(t,n);return Object.freeze(n)}function pv(e){let{ownerPartName:n,part:t,pkg:r,lookup:o,onResourceSettled:a,rememberReadyHandle:i,forgetReadyHandle:s}=e,l=false,d=0,c=new Map,u=new Set,f=new Map,p=new WeakMap,m=new WeakMap,g=0,b=Ra$1(r,n),h=Wa$1(t,{resolveRelationship:b}),x=hy(t),I=(O,k)=>{if(l||u.has(k))return;u.add(k);let D=d;o.resolveForProjection(O).then(A=>{l||D!==d||(c.set(k,A),A.kind==="ready"&&i(A.validatedHandle),g+=1,f.set(k,g),a(n));}).catch(()=>{l||D!==d||(c.set(k,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(k,g),a(n));}).finally(()=>{u.delete(k);});},w=O=>{let k=my(O),D=c.get(k);if(D)return D;let A=O.picture?.linkedRelationshipId;if(A){let ne=o.resolveLinked(n,A);return c.set(k,ne),g+=1,f.set(k,g),ne}let y=Object.freeze({kind:"pending",resourceKey:k});return c.set(k,y),g+=1,f.set(k,g),I(O,k),y},C=O=>h.get(O)??null,M=Object.freeze({ownerPartName:n,projectionForAtom:C,project:O=>C(O.id),resourceOf:w}),P=O=>{let k=m.get(O);if(k)return k;let D=fv(O),A=null,y=(v,N)=>{if(!(N>=uv))for(let j of v){let E=h.get(j)?.textboxStory;if(!E)continue;let T=[];if(Ru(E.content,T),T.length!==0){A||(A=[...D]);for(let H of T)A.push(H);y(T,N+1);}}};y(D,0);let ne=A??D;return m.set(O,ne),ne};return {context:M,cacheTokenForPart:()=>`${n}|${g}|${d}|${h.size}`,drawingTokenForParagraph:O=>{let k=p.get(O);if(k?.resourceEpoch===g)return k.token;let D=P(O);if(D.length===0)return p.set(O,{resourceEpoch:g,token:""}),"";let y=D.map(ne=>{let v=h.get(ne);if(!v)return `${ne}:refused`;let N=w(v);return [ne,Su(v),Ja(N),String(f.get(my(v))??0)].join("|")}).sort().join(";");return p.set(O,{resourceEpoch:g,token:y}),y},isCompatibleWith:(O,k)=>{if(O===t)return true;let D=hy(O);if(x&&D&&x.size===D.size){let y=true;for(let[ne,v]of x)if(D.get(ne)!==v){y=false;break}if(y)return true}let A=Wa$1(O,{resolveRelationship:Ra$1(k,n)});if(A.size!==h.size)return false;for(let[y,ne]of h){let v=A.get(y);if(!v||Su(v)!==Su(ne))return false}return true},dispose:()=>{l=true,d+=1;for(let O of c.values())O.kind==="ready"&&s(O.validatedHandle);c.clear(),u.clear(),f.clear();}}}var yy=0;function MM(e){let n=e.session.packageRevision(),t=e.session.currentPackage(),r=e.resourceLookup??hb$1(t,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new WeakMap,s=new Map,l=new Map,d=m=>{s.set(m.resourceKey,m);let g=Ya$1(m);g&&l.set(m.resourceKey,g);},c=m=>{s.delete(m.resourceKey);let g=l.get(m.resourceKey);g&&(Za$1(g),l.delete(m.resourceKey));},u=(m,g)=>{let h=g.currentPackage().parts.get(m)??a.get(m);if(h)return h;if(m===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${m}`)},f=(m,g)=>{let b=o.get(m);if(b)return b;let h=u(m,g);a.set(m,h);let x=pv({ownerPartName:m,part:h,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:d,forgetReadyHandle:c});return o.set(m,x),yy+=1,i.set(x,yy),x},p=m=>{let g=m.currentPackage();if(g.partBytes===t.partBytes&&g.relationships===t.relationships&&g.contentTypes===t.contentTypes){for(let[h,x]of o){let I=g.parts.get(h)??(h===m.part().name?m.part():void 0);if(I&&x.isCompatibleWith(I,g)){a.set(h,I);continue}x.dispose(),o.delete(h),a.delete(h);}n=m.packageRevision(),t=g;return}for(let h of o.values())h.dispose();o.clear(),a.clear();for(let h of l.values())Za$1(h);l.clear(),s.clear(),e.resourceLookup||r.dispose(),n=m.packageRevision(),t=g,r=e.resourceLookup??hb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return f(e.session.part().name,e.session).context},contextForPart(m){return f(m,e.session).context},cacheTokenForPart(m){let g=f(m,e.session);return `${i.get(g)??0}|${g.cacheTokenForPart()}`},drawingTokenForParagraph(m,g){return f(g,e.session).drawingTokenForParagraph(m)},mintValidatedBytes(m,g){let b=s.get(m.resourceKey);return !b||b.contentId!==m.contentId?null:Xa$1(m,g)},sync(m){m.packageRevision()!==n&&p(m);},dispose(){for(let m of o.values())m.dispose();o.clear(),a.clear();for(let m of l.values())Za$1(m);l.clear(),s.clear(),e.resourceLookup||r.dispose();}})}function Ry(e,n,t){if(n===void 0)return xy(e,t);let r=by.get(e);if(r&&r.epoch===n)return r.token;let o=xy(e,t);return by.set(e,{epoch:n,token:o}),o}var by=new WeakMap;function xy(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(";")}var wy=new WeakMap;function mv(e){let n=wy.get(e);if(n!==void 0)return n;let t=gv(e);return wy.set(e,t),t}function gv(e){let n=t=>{if(t.kind==="textValue"||ac$1(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 Ty(e,n){for(let t of n.resultParagraphIds){let r=va$1(e,t);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&mv(r))return true}return false}var Py=new WeakMap,Iy=new WeakMap,vy=new WeakMap;function wu(e){let n=Py.get(e);if(n)return n;let t=new Set;for(let r of xc$1(e))t.add(r.beginParagraphId),t.add(r.endParagraphId);return Py.set(e,t),t}function Pu(e){let n=Iy.get(e);if(n)return n;let t=new Set;for(let r of xc$1(e))Ty(e,r)||t.add(r.beginParagraphId);return Iy.set(e,t),t}function Iu(e){let n=vy.get(e);if(n)return n;let t=new Set;for(let r of xc$1(e))if(!Ty(e,r))for(let o of r.resultParagraphIds)t.add(o);return vy.set(e,t),t}var hv=4,vu=256;function yv(e){return `txbx-${e}`}var ky=new WeakMap;function Fy(e,n,t,r="all-markup"){if(!n||n.nums.size===0)return;let o=ky.get(e);if(o&&o.rawIndex===n&&o.styleCascade===t&&o.displayMode===r)return o.listItems;let a=$a(n,t),i=Lc(e,r),s=Vs(i,a,t),l=s.size>0?s:void 0;return ky.set(e,{rawIndex:n,styleCascade:t,displayMode:r,listItems:l}),l}var bv=2e4,xv=Object.freeze({contents:Object.freeze([]),truncated:false}),Cy=new WeakMap;function Sv(e){let n=Cy.get(e);if(n)return n;let t=[],r=0,o=false,a=[e];for(;a.length>0;){let s=a.pop();if(r+=1,r>bv){o=true;break}if(s.kind!=="textValue"&&s.localName==="txbxContent"){t.push(s);continue}if("children"in s)for(let l=s.children.length-1;l>=0;l-=1)a.push(s.children[l]);}let i=t.length>0||o?Object.freeze({contents:Object.freeze(t),truncated:o}):xv;return Cy.set(e,i),i}var Oy=1,By=new WeakMap;function Rv(e){let n=By.get(e);return n===void 0&&(n=Oy,Oy+=1,By.set(e,n)),n}var Ly=new WeakMap;function Ey(e,n,t,r="all-markup"){if(!n||n.nums.size===0)return "";let o=Sv(e);if(o.contents.length===0&&!o.truncated)return "";let a=Ly.get(e);if(a&&a.rawIndex===n&&a.styleCascade===t&&a.displayMode===r)return a.token;let i=[];for(let l of o.contents){let d=Fy(l,n,t,r);if(d)for(let[c,u]of d)i.push(`${c}=${u.cacheToken}`);}o.truncated&&i.push(`truncated:${Rv(n)}`);let s=i.length===0?"":`|txbxlist:${i.join(",")}`;return Ly.set(e,{rawIndex:n,styleCascade:t,displayMode:r,token:s}),s}function al(e,n){let t=e.textboxStory;if(!t)return null;let r=on(e.extentEmu.cx),o=on(e.extentEmu.cy),a=on(t.insetsEmu.left),i=on(t.insetsEmu.right),s=on(t.insetsEmu.top),l=on(t.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-s-l),u=on(t.strokeWidthEmu),f={fillHex:t.fillHex,strokeHex:t.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((n.depth??0)>=hv)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:s},...f,fallbackReason:"textbox-nesting-limit"};let m=Lc(t.content,n.displayMode),g=Fy(t.content,n.numberingIndex,n.styleCascade,n.displayMode),b=yv(e.drawingNodeId),h=0,x=Cr(m,0,d,0,0,{measurer:n.measurer,cache:n.cache,producer:`${n.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${b}-line-${h++}`,styleCascade:n.styleCascade,...g?{listItems:g}:{},...n.pageContext?{pageContext:n.pageContext}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...n.displayMode?{displayMode:n.displayMode}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},...n.drawingTokenForParagraph?{drawingTokenForParagraph:n.drawingTokenForParagraph}:{}}),I=x.blocks,w=x.bottom,C,M=[];if(I.length>vu){My(I.slice(vu),M),I=I.slice(0,vu);let O=I[I.length-1];w=O?O.box.y+O.box.height:0,C="textbox-fragment-limit";}if(w>c+.001){let O=I.filter(k=>k.box.y<c-.001);O.length<I.length&&(My(I.filter(k=>k.box.y>=c-.001),M),I=O,C=C??"textbox-height-clip");}let P=Math.max(0,c-w),B=t.verticalAnchor==="center"?P/2:t.verticalAnchor==="bottom"?P:0;return {fragments:I,flowHeight:w,contentOffset:{x:a,y:s+B},...f,...C?{fallbackReason:C}:{},...M.length>0?{clippedResourceToken:M.join("!")}:{}}}function My(e,n){ia({fragments:e},t=>{n.push(Ja(t.resource));});}var wv=128,Ny=new WeakMap;function Pv(e){let n=Ny.get(e);if(n!==void 0)return n;let t=y(na$1(e));return Ny.set(e,t),t}function Iv(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 vv(e,n,t,r,o,a,i,s=wv,l,d=un,c,u,f,p,m,g){let b=Yd(e.root),h=Iv(s),x=Bt(e,d),I=Tr({numberingIndex:g?.numberingIndex,styleCascade:a},x).listItems,w=Pv(e),C,M=P=>{let B=Kt(b)||c?P:void 0,O=B?.pageNumber??p?.pageNumber??1,k=Qd(B,b)+(c?`|pn:${O}`:"");if(k===""){if(C)return C}else {let j=h.get(k);if(j)return j}let D=0,A=[],y=()=>{let j=B?.pageNumber??p?.pageNumber??1,E=p?.pageWidth??n,T=p?.pageHeight??Math.max(1,n),H=p?.marginLeft??0,F=p?.marginRight??0,q=p?.marginTop??0,G=p?.marginBottom??0,X=Math.max(1,T-q-G);return Object.freeze({pageNumber:j,pageWidth:E,pageHeight:T,marginLeft:H,marginRight:F,marginBottom:G,contentInsetTop:q,contentInsetBottom:G,contentWidth:n,contentHeight:X,contentBandHeight:X,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},ne=Object.freeze([]),v;if(c){let j=false;for(let E=0;E<wr;E+=1){A.splice(0,A.length),D=0,v=Cr(x,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+k+(d===un?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${D++}`,styleCascade:a,...I?{listItems:I}:{},pageContext:B,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,anchorFrameBase:y,pageContentClip:()=>Ba(y()),layoutTextboxStoryFor:H=>al(H,{measurer:t,producer:r+k+(d===un?"":`|rev:${d}`),cache:o,styleCascade:a,...B?{pageContext:B}:{},...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{},...g?.numberingIndex?{numberingIndex:g.numberingIndex}:{}}),collectAnchoredDrawings:H=>{A.push(...H);},columnBoxForParagraph:H=>Object.freeze({x:0,y:H.y,width:n,height:H.height}),pageExclusionZones:()=>ne,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{}});let T=Ic(A,c,0,n);if(T.length===0){j=true,ne=T;break}if(E>0&&mt(ne)===mt(T)){j=true,ne=T;break}ne=T;}if(!j)throw new Po(`header/footer exclusion reflow did not converge within ${wr} passes`)}else v=Cr(x,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+k+(d===un?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${D++}`,styleCascade:a,...I?{listItems:I}:{},pageContext:B,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{}});let N={partName:e.name,part:e,contentKey:w,fragments:v.blocks,flowHeight:v.bottom,pageFieldNeeds:b,...A.length>0?{anchoredDrawings:Object.freeze([...A])}:{},withPageContext:j=>!Kt(b)&&!N.anchoredDrawings?.length?C??N:M(j)};return k===""?C=N:h.set(k,N),N};return M(i)}function Qa(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 nc(u,f,r),f;let p=u.pageFieldProjector;return {...f,pageFieldProjector:m=>{let g=p(m);return {...g,box:o(g.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)}))}},s=a(e.header),l=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),...s?{header:s}:{},...l?{footer:l}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}var Ay=new WeakMap;function Tu(e){let n=Ay.get(e);if(n!==void 0)return n;let t=[];Td(e,o=>{let a=o.marker;a&&t.push(`${o.paragraphId}=${a.text}@${a.numFmt}:${a.level}`);});let r=t.length===0?"":`|list:${t.join(",")}`;return Ay.set(e,r),r}var Dy=new WeakMap;function ku(e){let n=Dy.get(e);if(n!==void 0)return n;let t=[];ia(e,o=>{t.push(Ja(o.resource)),o.kind==="anchoredDrawing"&&o.textboxStory?.clippedResourceToken&&t.push(`clip:${o.textboxStory.clippedResourceToken}`);});let r=t.length===0?"":`!${t.join("!")}`;return Dy.set(e,r),r}function _y(e,n,t){if(!e)return "";let r=(o,a)=>[...a].map(([i,s])=>`${o}${i}=${s.flowHeight}@${s.contentKey}${ku(s)}${Tu(s)}`).sort().join(",");return `|hf:${n},${t},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+r("h",e.headers)+";"+r("f",e.footers)}function Hy(e){return e.delta===0?true:(e.delta%2===0||!e.evenAndOddHeaders&&!e.parityDependent&&!e.usedPageParity)&&(!e.titlePage||e.markPageCount>0)&&!e.hasNoteReserves&&!e.hasExclusionZones}var Tv="http://schemas.openxmlformats.org/wordprocessingml/2006/main",kv="http://schemas.microsoft.com/office/word/2010/wordml",Cv="http://schemas.microsoft.com/office/word/2012/wordml";function Ov(e){if(e.kind!=="textValue"){for(let n of e.attributes)if(n.localName==="val"&&n.namespaceUri===Tv)return n.value}}function No(e){for(let n of e.children)if(n.kind!=="textValue"&&(n.kind==="contentControlProperties"||n.localName==="sdtPr"))return n}function Or(e,n){if(e){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function Et(e,n){let t=Or(e,n);return t?Ov(t):void 0}function ei(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function il(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===kv)return "checkbox";if(r==="repeatingSection"&&o===Cv)return "repeatingSection"}return "richText"}function zy(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(Hb$1(o)&&r<Gb$1){let a=n(Kb$1(o),r+1);if(a)return a}}return null};return n(Kb$1(e),0)??"inline"}function Ao(e){let n=jy.get(e);if(n!==void 0)return n;let t=Bv(e);return sl!==null&&sl===t?t=sl:sl=t,jy.set(e,t),t}var sl=null,jy=new WeakMap,Gy=new WeakMap;function Bv(e){let n=(t,r)=>{if(t.kind==="textValue")return "";let o=t.kind==="paragraph"||t.kind==="table"||Hb$1(t);if(o){let i=Gy.get(t);if(i!==void 0&&i.depth===r)return i.token}let a;if(Hb$1(t)){if(r>=Gb$1)return "";let i=No(t),s=[t.id,Et(i,"alias")??"",Et(i,"tag")??"",ei(Et(i,"lock")),il(i),Or(i,"showingPlcHdr")?"1":"0",Or(i,"dataBinding")?"1":"0"].join(":"),l=Kb$1(t).map(d=>n(d,r+1)).filter(d=>d.length>0);a=[s,...l].join("|");}else a=t.children.map(i=>n(i,r)).filter(i=>i.length>0).join("|");return o&&Gy.set(t,{depth:r,token:a}),a};return n(e.root,0)}function $y(e,n){let t=[n],r=new Set([n]);for(let o of e.pages)for(let a of [o.header,o.footer])!a?.part||r.has(a.part)||(r.add(a.part),t.push(a.part));return t}var Cu=new WeakMap,Wy=new WeakMap;function Xy(e){if(e.length===1)return ni(e[0]);let n=Cu.get(e[0]);if(n&&ll(n.parts,e))return n.index;let t=e.map(d=>ni(d)),r=Wy.get(t[0]);if(r&&ll(r.indexes,t))return Cu.set(e[0],{parts:e,index:r.index}),r.index;let o=[],a=new Set,i=new Set;for(let d of t){for(let c of d.controls)o.push(c);for(let c of d.neededBlockIds)a.add(c);for(let c of d.neededParagraphIds)i.add(c);}let s=`${[...a].sort().join(",")};${[...i].sort().join(",")}`,l={controls:o,neededBlockIds:a,neededParagraphIds:i,neededToken:s};return Wy.set(t[0],{indexes:t,index:l}),Cu.set(e[0],{parts:e,index:l}),l}function dl(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(Hb$1(e)){let t=0;for(let r of Kb$1(e))t+=dl(r);return t}let n=0;for(let t of e.children)n+=dl(t);return n}var Ou=new WeakMap;function ll(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 Vy=new WeakMap;function Lv(e){for(let n of Ke$1(e))if(n.root.kind!=="textValue"){for(let t of n.root.children)if(t.kind!=="textValue")return t}return null}function ni(e){let n=Ou.get(e);if(n!==void 0)return n;let t=Fv(e),r=Lv(e),o=r?Vy.get(r):void 0;if(o&&ll(o.lists,t))return Ou.set(e,o.index),o.index;let a=[];for(let d of t)for(let c of d)a.push(c);let i=new Set,s=new Set;for(let d of a){for(let c of d.blockIds)i.add(c);d.paragraphId!==void 0&&s.add(d.paragraphId);}let l={controls:a,neededBlockIds:i,neededParagraphIds:s,neededToken:`${[...i].sort().join(",")};${[...s].sort().join(",")}`};return r&&Vy.set(r,{lists:t,index:l}),Ou.set(e,l),l}var Mv=Object.freeze([]);function Fv(e){let n=[],t=(i,s)=>{for(let l of i){if(l.kind==="paragraph"||l.kind==="table"){s.push(l.id);continue}if(Hb$1(l)){t(Kb$1(l),s);continue}(l.kind==="tableRow"||l.kind==="tableCell")&&t(l.children,s);}},r=(i,s,l,d,c)=>{let u=l;for(let f of i)if(!(f.kind==="textValue"||f.kind==="paragraphProperties")){if(Hb$1(f)){if(d>=Gb$1){u+=dl(f);continue}let p=No(f),m=ei(Et(p,"lock")),g=[...c,m],b=u,h=r(Kb$1(f),s,u,d+1,g);n.push({control:f,nestingDepth:d,lockStack:g,level:"inline",paragraphId:s,range:{start:b,end:h},blockIds:[]}),u=h;continue}if(f.kind==="hyperlink"){u=r(f.children,s,u,d,c);continue}u+=dl(f);}return u},o=(i,s,l)=>{for(let d of i){if(d.kind==="textValue")continue;if(d.kind==="paragraph"){r(d.children,d.id,0,s,l);continue}if(d.kind==="table"){for(let b of d.children)b.kind==="tableRow"&&o([b],s,l);continue}if(d.kind==="tableRow"){for(let b of d.children)b.kind==="tableCell"?o(b.children,s,l):Hb$1(b)&&o([b],s,l);continue}if(!Hb$1(d)||s>=Gb$1)continue;let c=No(d),u=ei(Et(c,"lock")),f=[...l,u],p=zy(d),m=Kb$1(d);if(p==="inline"){o(m,s+1,f);continue}let g=[];t(m,g),n.push({control:d,nestingDepth:s,lockStack:f,level:p,blockIds:g}),o(m,s+1,f);}},a=[];for(let i of Ke$1(e))if(i.root.kind!=="textValue")for(let s of i.root.children){if(s.kind==="textValue")continue;let l=Yy.get(s);if(l!==void 0){a.push(l);continue}let d=n.length;o([s],0,[]);let c=n.length===d?Mv:Object.freeze(n.slice(d));Yy.set(s,c),a.push(c);}return a}var Yy=new WeakMap,Bu=1<<20,Ky=new WeakMap,Uy=null,qy=0;function Ev(e){return e!==Uy&&(Uy=e,qy+=1),qy}function Nv(e,n,t,r){let o=Ky.get(e);if(o!==void 0&&o.neededStamp===t)return o;let a=[],i=[],s=e.index*Bu,l=0,d=0,c=p=>l===0&&d===0?p:{x:p.x+l,y:p.y+d,width:p.width,height:p.height},u=(p,m)=>{if(m.kind==="paragraph"){n.neededBlockIds.has(m.paragraphId)&&(a.push({pageIndex:p,blockId:m.paragraphId,box:c(m.box)}));let g=n.neededParagraphIds.has(m.paragraphId);for(let b of m.lines){let h=s;if(s=Math.min(s+1,e.index*Bu+Bu-1),!g)continue;let x=Math.max(0,b.box.height-b.leading-(b.trailingSpacing??0));for(let I of b.spans)i.push({pageIndex:p,paragraphId:I.range.paragraphId,start:I.range.start,end:I.range.end,line:h,box:{x:I.box.x+l,y:I.box.y+b.leading+d,width:I.box.width,height:x}});}return}n.neededBlockIds.has(m.tableId)&&(a.push({pageIndex:p,blockId:m.tableId,box:c(m.box)}));for(let g of m.rows)if(!g.isHeaderRepeat)for(let b of g.cells)for(let h of b.blocks)u(p,h);};for(let p of e.fragments)u(e.index,p);for(let p of [e.header,e.footer])if(p){l=p.box.x-e.contentBox.x,d=p.box.y-e.contentBox.y;for(let m of p.fragments)u(e.index,m);}l=0,d=0;let f={neededStamp:t,blocks:a,spans:i};return Ky.set(e,f),f}function Av(e,n,t){let r=Ev(n.neededToken),o=new Map,a=new Map,i=new Set;for(let s of e.pages){let l=Nv(s,n,r);for(let d of l.blocks){let c=o.get(d.blockId);c?c.push(d):o.set(d.blockId,[d]);}for(let d of l.spans){let c=a.get(d.paragraphId);c?(d.start<c[c.length-1].start&&i.add(d.paragraphId),c.push(d)):a.set(d.paragraphId,[d]);}}return {blocksById:o,spansByParagraph:a,repeatedParagraphs:i}}function Dv(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 s=r.get(i.pageIndex);s?s.push(i.box):r.set(i.pageIndex,[i.box]);}}return [...r.entries()].sort(([a],[i])=>a-i).flatMap(([a,i])=>{let s=la(i);return s?[{pageIndex:a,box:s}]:[]})}function _v(e,n,t,r){let o=t.spansByParagraph.get(e)??[],a=new Map,i=t.repeatedParagraphs.has(e),s=0,l=o.length;for(;!i&&s<l;){let d=s+(l-s>>1);(n.start===n.end?o[d].end<n.start:o[d].end<=n.start)?s=d+1:l=d;}i&&(s=0);for(let d=s;d<o.length;d+=1){let c=o[d];if(c.end<=n.start)continue;if(c.start>=n.end){if(i)continue;break}let u=a.get(c.line);u?u.boxes.push(c.box):a.set(c.line,{pageIndex:c.pageIndex,boxes:[c.box]});}if(a.size===0&&n.start===n.end){let d=[],c=new Set;for(let u=s;u<o.length;u+=1){let f=o[u];if(f.start>n.start){if(i)continue;break}if(n.start>f.end||c.has(f.pageIndex))continue;c.add(f.pageIndex);let p=f.start===f.end?f.box.x:f.box.x+f.box.width*(n.start-f.start)/Math.max(1,f.end-f.start);if(d.push({pageIndex:f.pageIndex,box:{x:p,y:f.box.y,width:0,height:f.box.height}}),!i)break}if(d.length>0)return d}return [...a.entries()].sort(([d],[c])=>d-c).flatMap(([,d])=>{let c=la(d.boxes);return c?[{pageIndex:d.pageIndex,box:c}]:[]})}var Zy=new WeakMap;function Hv(e){let n=Zy.get(e);if(n!==void 0)return n;let t=No(e),r=Et(t,"alias"),o=Et(t,"tag"),a={...r!==void 0?{alias:r}:{},...o!==void 0?{tag:o}:{},controlType:il(t),placeholder:Or(t,"showingPlcHdr")!==void 0,bound:Or(t,"dataBinding")!==void 0};return Zy.set(e,a),a}function zv(e,n,t){let r=e.level==="inline"&&e.paragraphId&&e.range?_v(e.paragraphId,e.range,n):Dv(e.blockIds,n);return {...Fu(e),fragments:r}}function jv(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 Gv(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&&jv(e.fragments,n.fragments)}function Do(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(!Gv(e[t],n[t]))return false;return true}function Lu(e,n){return {revision:e.revision,pages:e.pages,...n.contentControls!==void 0?{contentControls:n.contentControls}:{},...n.controlContextToken!==void 0?{controlContextToken:n.controlContextToken}:{}}}var Jy=new WeakMap;function Mu(e,n,t=Ao(n),r){let o=$y(e,n);if(o.length>1){let f=o.map(p=>Ao(p));t=f.some(p=>p!=="")?f.join("|"):"";}if(t===""){let f=e.pages.some(m=>m.contentControls!==void 0&&m.contentControls.length>0);if(!f&&e.controlContextToken===t&&Do(e.contentControls,[]))return e;let p=f?e.pages.map(m=>m.contentControls!==void 0&&m.contentControls.length>0?{...m,contentControls:[]}:m):e.pages;return {revision:e.revision,pages:p,contentControls:[],controlContextToken:t}}let a=Xy(o),i=Av(e,a),s=a.controls.map(f=>zv(f,i)),l=new Map;for(let f of s)for(let p of f.fragments){let m=l.get(p.pageIndex),g={...f,fragments:[p]};m?m.push(g):l.set(p.pageIndex,[g]);}if(e.controlContextToken===t&&Do(e.contentControls,s)&&e.pages.every(f=>Do(f.contentControls,l.get(f.index)??[])))return e;let d=false,c=e.pages.map(f=>{let p=l.get(f.index)??[];if(Do(f.contentControls,p)||p.length===0&&!f.contentControls)return f;d=true;let m=Jy.get(f);if(m&&Do(m.controls,p))return m.wrapped;let g={...f,contentControls:p};return Jy.set(f,{controls:p,wrapped:g}),g}),u=d?c:e.pages;return u===e.pages&&e.controlContextToken===t&&Do(e.contentControls,s)?e:{revision:e.revision,pages:u,contentControls:s,controlContextToken:t}}function Wv(e,n){return ni(e).controls.filter(r=>n?r.paragraphId!==void 0?n.has(r.paragraphId):Qy(r.control).some(o=>n.has(o)):true).map(Fu)}function Qy(e){let n=[],t=r=>{for(let o of r)if(o.kind!=="textValue"){if(o.kind==="paragraph"){n.push(o.id);continue}if(Hb$1(o)){t(Kb$1(o));continue}t(o.children);}};return t(Kb$1(e)),n}function $v(e,n){let t=null;for(let r of ni(e).controls)(r.paragraphId===n||r.blockIds.includes(n)||Qy(r.control).includes(n))&&(!t||r.nestingDepth>=t.nestingDepth)&&(t=r);return t?Fu(t):null}function Fu(e){let n=Hv(e.control);return {id:e.control.id,...n.alias!==void 0?{alias:n.alias}:{},...n.tag!==void 0?{tag:n.tag}:{},controlType:n.controlType,lock:e.lockStack[e.lockStack.length-1]??"unlocked",effectiveLock:Fi(e.lockStack),placeholder:n.placeholder,bound:n.bound,nestingDepth:e.nestingDepth,level:e.level,fragments:[]}}var cl=4096,et=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 Eu(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 Br(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 ob(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 Ue=(e,n)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes??[])if(t.localName===n)return t.value}},Lr=(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 eb(e,n,t){let r=Ue(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 Xv(e){if(!e)return 1;let n=Ue(e,"num");return !n||!/^\d{1,7}$/.test(n)?1:Math.max(1,Math.min(12,Number(n)))}function Vv(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:Eu(Ue(o,"w"),1,31680),gapTwips:a===n-1?0:ob(Ue(o,"space"),t)});}return r}function Yv(e){let n=e?Lr(e,"type"):void 0,t=n?Ue(n,"val"):void 0;return t==="continuous"||t==="evenPage"||t==="oddPage"||t==="nextColumn"?t:"nextPage"}var Kv=new Set(["hyphen","period","colon","emDash","enDash"]);function ab(e){let n=Lr(e,"pgNumType");if(!n||n.kind==="textValue")return;let t={},r=Ue(n,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let s=Number(r);Number.isFinite(s)&&s>=0&&s<=9999&&(t.start=s);}let o=Ue(n,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(t.fmt=o);let a=Ue(n,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let s=Number(a);Number.isFinite(s)&&s>=0&&s<=9&&(t.chapStyle=s);}let i=Ue(n,"chapSep");return i!==void 0&&Kv.has(i)&&(t.chapSep=i),t}var nb=new WeakMap;function ul(e){if(!e)return et;let n=nb.get(e);if(n!==void 0)return n;let t=Uv(e);return nb.set(e,t),t}function Uv(e){let n=Lr(e,"pgSz"),t=Lr(e,"pgMar"),r=Lr(e,"cols"),o=et,a=n?Ue(n,"orient"):void 0,i=n?Eu(Ue(n,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,s=n?Eu(Ue(n,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,l=ab(e),d=Xv(r),c=r?ob(Ue(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?eb(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:s},margins:{topTwips:t?Br(Ue(t,"top"),1440):o.margins.topTwips,rightTwips:t?Br(Ue(t,"right"),1440):o.margins.rightTwips,bottomTwips:t?Br(Ue(t,"bottom"),1440):o.margins.bottomTwips,leftTwips:t?Br(Ue(t,"left"),1440):o.margins.leftTwips,headerTwips:t?Br(Ue(t,"header"),720):o.margins.headerTwips,footerTwips:t?Br(Ue(t,"footer"),720):o.margins.footerTwips,gutterTwips:t?Br(Ue(t,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?eb(r,"sep",false):false,definitions:u?[]:Vv(r,d,c)},landscape:a==="landscape"||i>s,titlePage:ja$1(e,"titlePg"),breakType:Yv(e),...l!==void 0?{pageNumbering:l}:{}}}function qv(e){let n=t=>{if(t.kind!=="textValue"){if(t.kind==="body")return Lr(t,"sectPr");for(let r of t.children??[]){let o=n(r);if(o)return o}}};return n(e.root)}var tb=new WeakMap;function fl(e){let n=tb.get(e);if(n!==void 0)return n??void 0;let t=e.children.find(a=>a.kind==="paragraphProperties"),r=t?Lr(t,"sectPr"):void 0,o=r&&r.kind!=="textValue"?r:void 0;return tb.set(e,o??null),o}function Zv(e){let n=ib(e);return n[n.length-1]?.properties??et}function ib(e,n="all-markup"){return sb(e,n).sections}function sb(e,n="all-markup"){return Nu(e,Bt(e,n))}var rb=Pe(16);function Nu(e,n){let t=rb.get(n);if(t&&t.part===e)return t.result;let r=Jv(e,n);return rb.set(n,{part:e,result:r}),r}function Jv(e,n){let t=[],r=0,o=false;for(let i=0;i<n.length;i+=1){let s=n[i];if(s.kind!=="paragraph")continue;let l=fl(s);if(l){if(t.length>=cl){o=true;continue}t.push({index:t.length,properties:ul(l),blockStart:r,blockEndExclusive:i+1}),r=i+1;}}if(o){if(t.length>0){let i=t[t.length-1];t[t.length-1]={...i,blockEndExclusive:n.length};}return {sections:t,truncated:true}}let a=qv(e);if(r<n.length||t.length===0){if(t.length>=cl){let i=t[t.length-1];return t[t.length-1]={...i,blockEndExclusive:n.length},{sections:t,truncated:true}}t.push({index:t.length,properties:ul(a),blockStart:r,blockEndExclusive:n.length});}else if(a){if(t.length>=cl)return {sections:t,truncated:true};t.push({index:t.length,properties:ul(a),blockStart:r,blockEndExclusive:n.length});}return {sections:t,truncated:o}}function Mr(e){let n=Dc$1(Bc$1(e.pageSize.widthTwips)),t=Dc$1(Bc$1(e.pageSize.heightTwips)),r=Dc$1(Bc$1(e.margins.leftTwips+e.margins.gutterTwips)),o=Dc$1(Bc$1(e.margins.rightTwips)),a=Dc$1(Bc$1(e.margins.topTwips)),i=Dc$1(Bc$1(e.margins.bottomTwips));return n-r-o<=0||t-a-i<=0?da:{width:n,height:t,margin:{top:a,right:o,bottom:i,left:r},headerDistance:Dc$1(Bc$1(Math.max(0,e.margins.headerTwips))),footerDistance:Dc$1(Bc$1(Math.max(0,e.margins.footerTwips)))}}var _o=1;function Au(e,n){let t=Math.max(_o,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,s;if(a){i=o.map(p=>Math.max(_o,Dc$1(Bc$1(p.widthTwips)))),s=o.slice(0,-1).map(p=>Math.max(0,Dc$1(Bc$1(p.gapTwips))));let c=s.reduce((p,m)=>p+m,0),u=Math.max(r*_o,t-c),f=i.reduce((p,m)=>p+m,0);if(f>u){let p=u/f;i=i.map(m=>Math.max(_o,m*p));}}else {let c=Math.max(0,Dc$1(Bc$1(e.gapTwips))),u=Math.min(c,Math.max(0,(t-r*_o)/(r-1||1)));s=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(_o,(t-s.reduce((p,m)=>p+m,0))/r);i=Array.from({length:r},()=>f);}let l=[],d=0;for(let c=0;c<r;c+=1)l.push(d),d+=i[c]+(s[c]??0);return {count:r,widths:i,gaps:s,lefts:l,separator:e.separator===true&&r>1}}function Qv(e,n,t){return ti(e,n,()=>t)}function ti(e,n,t){let r=[],o=null,a=-1,i=-1;for(let s of n){let l=t(s.sectionIndex);if(s.customMarkFollows){r.push({noteId:s.noteId,mark:null});continue}o===null?(o=l.numStart,a=s.sectionIndex,i=s.pageIndex??-1):l.numRestart==="eachSect"&&s.sectionIndex!==a?(o=l.numStart,a=s.sectionIndex):l.numRestart==="eachPage"&&s.pageIndex!==void 0&&s.pageIndex!==i?(o=l.numStart,i=s.pageIndex):l.numRestart==="eachSect"?a=s.sectionIndex:l.numRestart==="eachPage"&&s.pageIndex!==void 0&&(i=s.pageIndex);let d=o;o+=1,r.push({noteId:s.noteId,mark:It(l.numFmt,d),displayNumber:d});}return r}function lb(e){let n=new Map;for(let t of e)n.set(t.noteId,t.mark);return n}var Ho=zd$1,ri=512,Du=6,eT=1/3;function db(e,n){return `note-${e}-${n}`}function nT(e){if(!e)return [];let n=[];for(let t of Bd$1(e.root)){if(n.length>=Ho)break;sd$1(t)&&n.push(t);}return n}function cb(e,n){if(e){for(let t of Bd$1(e.root))if(rd(t)===n)return t}}function _u(e,n,t){let r=pd$1(e),o=qd$1(e);if(!r||o===null)return null;let a=gd$1(r,o),i=Cs(e),s=db(r,o),l=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=Tr({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},i).listItems,m=Cr(i,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|${a}`,nextLineId:()=>`${s}-line-${l++}`,styleCascade:t.styleCascade,...p?{listItems:p}:{},noteMarks:u,...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{},...f?{inlineDrawingLayout:f.inlineDrawingLayout,...f.drawingTokenForParagraph?{drawingTokenForParagraph:f.drawingTokenForParagraph}:{}}:{}}),g=m.blocks,b=m.bottom,h;if(g.length>ri){g=g.slice(0,ri);let x=g[g.length-1];b=x?x.box.y+x.box.height:0,h="note-fragment-limit";}if(b>c){let x=[],I=0;for(let w of g){let C=w.box.y+w.box.height;if(C>c+.001&&x.length>0)break;x.push(w),I=C;}g=x,b=I,h=h??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:rd(e),fragments:g,flowHeight:b,...h?{fallbackReason:h}:{}}}function pl(e,n,t,r){if(!e)return null;let o=Cd$1(e.root,n);return o?_u(o,t,{...r,ownerPartName:e.name}):null}function ub(e,n){return "single"}function fb(e){let n=Cs(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(Rt(r)).length>0||!tT(t))return false}return true}function tT(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="paragraphProperties"){if(n.kind==="run"){if(!rT(n))return false;continue}return false}return true}function rT(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="runProperties"&&!(nd(n)||od$1(n)||md$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 oi(e,n,t,r,o,a){let i=ub(),s=cb(e,n);if(s){if(fb(s))return {kind:n,fragments:[],flowHeight:Du,synthetic:false,ruleStyle:i};let l=_u(s,t,{...r,...e?{ownerPartName:e.name}:{}});if(l&&l.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return l.flowHeight>d+.001?{kind:n,fragments:[],flowHeight:Du,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:n,fragments:l.fragments,flowHeight:l.flowHeight,synthetic:false}}}return {kind:n,fragments:[],flowHeight:Du,synthetic:true,ruleStyle:i}}function pb(e,n){let t=Math.max(1,e*eT);return {x:0,y:Math.max(0,(n-.75)/2),width:t,height:.75}}function ml(e,n,t,r){if(e.ruleStyle!==void 0||e.synthetic){let o=pb(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 zu=8,vb=4096,Tb=256,kb=14,ju=12;function oT(e){let n=[];for(let t of e)n.push(`${t.noteKind}|${t.noteId}|${t.paragraphId}|${t.atomOffset}|${t.customMarkFollows?1:0}|${t.sectionIndex}`);return n.join(";")}function gl(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function aT(e){return e.drawingsForPart!==void 0&&e.drawingLayoutEpoch===void 0?null:[e.producer,e.defaultTabStopPt??"",e.drawingLayoutEpoch??"",gl(e.documentFootnoteProps),gl(e.documentEndnoteProps),e.footnotePropsBySection.map(gl).join(";"),e.endnotePropsBySection.map(gl).join(";")].join("\0")}var mb=new WeakMap;function iT(e,n,t){if(!e)return {memo:null,allHits:n,reused:false};let r=aT(t);if(r===null)return e.notes=null,{memo:null,allHits:n,reused:false};let o=oT(n),a=e.notes;if(a&&a.hitsFingerprint===o){let s=mb.get(a);if(a.inputFingerprint===r&&s&&s.footnotesPart===t.footnotesPart&&s.endnotesPart===t.endnotesPart&&s.measurer===t.measurer&&s.cache===t.cache&&s.styleCascade===t.styleCascade&&s.numberingIndex===t.numberingIndex)return {memo:a,allHits:a.allHits,reused:true}}let i={hitsFingerprint:o,inputFingerprint:r,allHits:n,provisionalMarks:Uu(n,t),finalMarks:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return mb.set(i,{footnotesPart:t.footnotesPart,endnotesPart:t.endnotesPart,measurer:t.measurer,cache:t.cache,styleCascade:t.styleCascade,numberingIndex:t.numberingIndex}),e.notes=i,{memo:i,allHits:n,reused:false}}function sT(e,n){return n>=e.range.start&&n<e.range.end}var gb=new WeakMap;function Cb(e){let n=gb.get(e);if(n)return n;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)for(let s of i.cells)r(s.blocks);}};return r(e),gb.set(e,t),t}var hb=new WeakMap;function $u(e){let n=hb.get(e);if(n)return n;let t=new Map;for(let r of e){let o=t.get(r.paragraphId);o?o.push(r):t.set(r.paragraphId,[r]);}return hb.set(e,t),t}var yb=new WeakMap;function yl(e,n,t){let r=Cb(e.fragments);if(!t)return n.filter(s=>r.some(l=>ru(l,s.paragraphId,s.atomOffset)));let o=yb.get(e.fragments);if(o&&o.refIndex===t)return o.result;let a=[],i=new Set;for(let s of r)for(let l of tr(s)){let d=t.get(l);if(d)for(let c of d)i.has(c)||ru(s,l,c.atomOffset)&&(i.add(c),a.push(c));}return yb.set(e.fragments,{refIndex:t,result:a}),a}function Ob(){let e=new Map;return {get(n,t,r,o,a,i,s){let d=`${n?.name??"none"}\0${o}\0${t}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=oi(n,t,r,i,o,a);return e.set(d,u),u.fallbackReason&&s.push(u.fallbackReason),u}}}function lT(e,n){let t=[];for(let r of e){if(t.length>=Ho)break;t.push({...r,sectionIndex:n.get(r.paragraphId)??0});}return t}function zo(e,n){return e.footnotePropsBySection[n]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function Xu(e,n){return e.endnotePropsBySection[n]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function Bb(e,n){return {measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:e.defaultTabStopPt,projectLink:e.projectLink,projectFieldLink:e.projectFieldLink,documentProperties:e.documentProperties,noteMarks:n,drawingsForPart:e.drawingsForPart}}function dT(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 bb(e,n){return n===0?[...e]:e.map(t=>t.kind==="paragraph"?dT(t,n):{...t,box:{...t.box,y:t.box.y+n}})}function cT(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 g=e.lines[t];if(g.box.y+g.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,s=a.box.y+a.box.height,l=e.borders?.filter(g=>g.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,s-i)},...l&&l.length>0?{borders:l}:{borders:void 0},bottomBorder:void 0,...e.shadingBox?{shadingBox:{...e.shadingBox,height:Math.max(0,s-e.shadingBox.y)}}:{}},c=o[o.length-1],u=o[0].box.y,f=c.box.y+c.box.height,p=e.borders?.filter(g=>g.side!=="top"),m={...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:m}}function uT(e){let n=0;for(let t of e)n=Math.max(n,t.box.y+t.box.height);return n}function bl(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<ri;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 m=cT(f,n);if(m.head)r.push(m.head),o=m.head.box.y+m.head.box.height,i=m.tail,a=u+1;else {let g=t?.fullContentHeight??n,h=f.lines[0]?.box.height??f.box.height;if(r.length===0&&n>=g-.001&&h>g+.001){t?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let x=e.fragments.slice(a),I=x[0]?.box.y??0;return {head:[],headHeight:0,tail:bb(x,-I),tailHeight:Math.max(0,e.flowHeight-I)}}a=u,i=null;}break}a=u;break}let s=[...i?[i]:[],...e.fragments.slice(a)];if(s.length===0)return {head:r,headHeight:o,tail:[],tailHeight:0};let l=s[0]?.box.y??0,d=bb(s,-l),c=uT(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}function fT(e,n){let t="FootnoteReference";if(!n)return {...dt,verticalAlign:"superscript"};let r=Ot([],[{localName:"rStyle",attributes:{val:t}}],n);return Ee(r,n.themeFonts)}function pT(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=zo(n,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<ju;p+=1){let m=It(u.numFmt,u.numStart+p);m.length>0&&o.add(m);}}let f=Xu(n,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<ju;p+=1){let m=It(f.numFmt,f.numStart+p);m.length>0&&o.add(m);}}}if(!i||o.size===0)return;let s=fT("footnote",n.styleCascade),l,d=-1;for(let c of o){let u=n.measurer.measure(c,s);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(l?.length??0))&&(l=c,d=u);}return l}function Lb(e,n,t){let r=ti("footnote",e,s=>zo(t,s)),o=ti("endnote",n,s=>Xu(t,s)),a=new Map;for(let s of r)a.set(Sr("footnote",s.noteId),s.mark);for(let s of o)a.set(Sr("endnote",s.noteId),s.mark);let i=pT(a,t,e,n);return {marks:a,...i?{reservedMarkText:i}:{}}}function xl(e){let n=0;for(let t of e.fragments)n=Math.max(n,t.box.y+t.box.height);return n}function Gu(e){if(e.footnotes===void 0&&e.endnotes===void 0&&e.noteStream===void 0)return e;let{footnotes:n,endnotes:t,noteStream:r,...o}=e;return o}function mT(e,n){if(n.marks.size===0)return e;let t=false,r=e.pages.map(o=>{if(!gT(o.fragments))return o;let a=Mb(o.fragments,n);return a===o.fragments?o:(t=true,{...o,fragments:a})});return t?{revision:e.revision,pages:r}:e}var xb=new WeakMap;function gT(e){let n=xb.get(e);if(n!==void 0)return n;let t=false,r=o=>{for(let a of o){if(t)return;if(a.kind==="paragraph"){for(let i of a.lines)for(let s of i.spans)if(s.projected&&s.noteNav?.direction==="to-note"){t=true;return}continue}for(let i of a.rows)for(let s of i.cells)r(s.blocks);}};return r(e),xb.set(e,t),t}function Mb(e,n){let t=false,r=e.map(o=>{if(o.kind==="paragraph"){let s=hT(o,n);return s!==o&&(t=true),s}let a=false,i=o.rows.map(s=>{let l=false,d=s.cells.map(c=>{let u=Mb(c.blocks,n);return u===c.blocks?c:(l=true,{...c,blocks:u})});return l?(a=true,{...s,cells:d}):s});return a?(t=true,{...o,rows:i}):o});return t?r:e}function hT(e,n){let t=false,r=e.lines.map(o=>{let a=yT(o,n);return a!==o&&(t=true),a});return t?{...e,lines:r}:e}function yT(e,n){let t=false,r=e.spans.map(o=>{let a=bT(o,n);return a!==o&&(t=true),a});return t?{...e,spans:r}:e}function bT(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 xT(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function Fb(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function ST(e){for(let n=e.length-1;n>=0;n-=1)if(Fb(e[n]))return n;return Math.max(0,e.length-1)}function Vu(e,n,t,r,o,a,i,s){let l=new Map(a),d=n.filter(v=>v.noteKind==="footnote"),c=e.contentBox.width,u=Bb(t,r),f=[],p=0,m=vb,g=a.size>0?"continuationSeparator":"separator",b=Math.max(0,e.contentBox.height),h=s?.separatorCache?s.separatorCache.get(t.footnotesPart,g,c,"footnote",b,u,i):(()=>{let v=oi(t.footnotesPart,g,c,u,"footnote",b);return v.fallbackReason&&i.push(v.fallbackReason),v})(),x=Math.max(0,e.contentBox.height-xl(e)-h.flowHeight),I=Math.max(0,e.contentBox.height-kb-h.flowHeight),w=s?.reserveColumnBudget?I:x,M={fullContentHeight:Math.max(0,e.contentBox.height-h.flowHeight),reasons:i};for(let[v,N]of a){let j=v.match(/^(footnote|endnote):(-?\d+)$/);if(!j||j[1]!=="footnote")continue;let E=Number(j[2]),T=Math.max(0,w-p);if(N.height<=T+.001)f.push({noteKind:"footnote",noteId:E,scopeId:v,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:N.height},fragments:N.fragments}),p+=N.height,l.delete(v);else {let H=bl({fragments:N.fragments,flowHeight:N.height},T,M);H.head.length>0&&(f.push({noteKind:"footnote",noteId:E,scopeId:v,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?l.set(v,{fragments:H.tail,height:H.tailHeight,mark:null}):l.delete(v);}}for(let v of d){if(f.length>=Ho){i.push("note-count-limit");break}let N=pl(t.footnotesPart,v.noteId,c,u);if(!N){i.push("missing-note-body");continue}let j=r.marks.get(Sr("footnote",v.noteId))??null,E=Math.max(0,w-p);if(m-=N.fragments.length,m<0){i.push("note-area-fragment-limit");break}if(N.flowHeight<=E+.001)f.push({noteKind:"footnote",noteId:v.noteId,scopeId:N.scopeId,mark:v.customMarkFollows?null:j,box:{x:e.contentBox.x,y:0,width:c,height:N.flowHeight},fragments:N.fragments}),p+=N.flowHeight;else {let T=bl(N,E,M);T.head.length>0&&(f.push({noteKind:"footnote",noteId:v.noteId,scopeId:N.scopeId,mark:v.customMarkFollows?null:j,box:{x:e.contentBox.x,y:0,width:c,height:T.headHeight},fragments:T.head}),p+=T.headHeight),T.tail.length>0&&l.set(N.scopeId,{fragments:T.tail,height:T.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:l};let P=h.flowHeight,B=P+p,O=xl(e),k;o==="beneathText"?k=e.contentBox.y+O:(k=e.contentBox.y+e.contentBox.height-B,k=Math.max(k,e.contentBox.y+O));let D=k+P,A=f.map(v=>{let N={...v,box:{...v.box,y:D}};return D+=v.box.height,N}),y=ml(h,e.contentBox.x,c,k);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:k,width:c,height:B},separator:{kind:g,box:y,fragments:h.fragments,synthetic:h.synthetic,...h.ruleStyle!==void 0?{ruleStyle:h.ruleStyle}:{}},notes:A},nextCarry:l}}function Eb(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 Yu(e,n){let t=new Set;for(let r of Cb(e.fragments))t.add(n.get(r.paragraphId)??0);return [...t].sort((r,o)=>r-o)}function Nb(e,n,t){for(let r=e.length-1;r>=0;r-=1)if(Yu(e[r],t).includes(n))return r;return Math.max(0,e.length-1)}function RT(e,n,t){let r=Nb(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=Yu(a,t);if(i.length!==0&&!i.includes(n))return o}return e.length}function wT(e){return e.map((n,t)=>n.index===t&&n.id===`page-${t}`?n:{...n,id:`page-${t}`,index:t})}function PT(e){let n=wT(e);return [...Ut({revision:0,pages:n}).pages]}function IT(e,n,t,r,o,a,i,s){let l=new Map(a),d=[];if(n.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};let c=e.contentBox.width,u=Bb(t,r),f=s?.separatorKind??"separator",p=E=>E==="footnote"?t.footnotesPart:t.endnotesPart,m=t.endnotesPart??t.footnotesPart,g=Math.max(0,e.contentBox.height),b=s?.separatorCache?s.separatorCache.get(m,f,c,"endnote",g,u,i):(()=>{let E=oi(m,f,c,u,"endnote",g);return E.fallbackReason&&i.push(E.fallbackReason),E})(),h=b.flowHeight,x=xl(e),I=e.endnotes?Math.max(x,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):x,w=xT(e),C=Math.max(0,w-I-h),P={fullContentHeight:Math.max(0,w-h),reasons:i},B=[],O=0,k=vb;for(let[E,T]of a){let H=E.match(/^(footnote|endnote):(-?\d+)$/);if(!H)continue;let F=H[1],q=Number(H[2]),G=Math.max(0,C-O);if(T.height<=G+.001)B.push({noteKind:F,noteId:q,scopeId:E,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:T.height},fragments:T.fragments}),O+=T.height,l.delete(E);else {let X=bl({fragments:T.fragments,flowHeight:T.height},G,P);X.head.length>0&&(B.push({noteKind:F,noteId:q,scopeId:E,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:X.headHeight},fragments:X.head}),O+=X.headHeight),X.tail.length>0?l.set(E,{fragments:X.tail,height:X.tailHeight,mark:null}):l.delete(E);}}for(let E=0;E<n.length;E+=1){let T=n[E];if(B.length>=Ho){i.push("note-count-limit"),d.push(...n.slice(E));break}let H=p(T.noteKind),F=pl(H,T.noteId,c,u);if(!F){i.push("missing-note-body");continue}let q=r.marks.get(Sr(T.noteKind,T.noteId))??null,G=Math.max(0,C-O);if(k-=F.fragments.length,k<0){i.push("note-area-fragment-limit"),d.push(...n.slice(E));break}if(F.flowHeight<=G+.001)B.push({noteKind:T.noteKind,noteId:T.noteId,scopeId:F.scopeId,mark:T.customMarkFollows?null:q,box:{x:e.contentBox.x,y:0,width:c,height:F.flowHeight},fragments:F.fragments}),O+=F.flowHeight;else {let X=bl(F,G,P);X.head.length>0&&(B.push({noteKind:T.noteKind,noteId:T.noteId,scopeId:F.scopeId,mark:T.customMarkFollows?null:q,box:{x:e.contentBox.x,y:0,width:c,height:X.headHeight},fragments:X.head}),O+=X.headHeight),X.tail.length>0&&l.set(F.scopeId,{fragments:X.tail,height:X.tailHeight,mark:null}),d.push(...n.slice(E+1));break}}if(B.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};if(B.length===0)return {area:void 0,nextCarry:l,remainingRefs:d};let D=e.contentBox.y+I,A=D+h,y=B.map(E=>{let T={...E,box:{...E.box,y:A}};return A+=E.box.height,T}),ne=ml(b,e.contentBox.x,c,D),v=h+O,N=Math.max(0,w-I),j=Math.min(v,N);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:D,width:c,height:j},separator:{kind:f,box:ne,fragments:b.fragments,synthetic:b.synthetic,...b.ruleStyle!==void 0?{ruleStyle:b.ruleStyle}:{}},notes:y},nextCarry:l,remainingRefs:d}}function vT(e,n,t,r,o,a,i){let s=e,l=n;for(;l.size>0&&a.remaining>0;){let d=s[s.length-1],c=Eb(d,d.index+1,"footnote-drain"),u=Vu(c,[],t,r,"pageBottom",l,o,{separatorCache:i}),f=u.area?.notes.length??0;if(l=u.nextCarry,f===0){o.push("note-overflow-stalled"),u.area&&(s=[...s,{...c,footnotes:u.area}],a.remaining-=1);break}s=[...s,{...c,footnotes:u.area}],a.remaining-=1;}return l.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:s,carry:l}}function TT(e,n,t,r="endnote-overflow"){let o=Eb(t,n,r);return {pages:[...e.slice(0,n),o,...e.slice(n)],pageIndex:n}}function Sb(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,s=r-n,l=[...e];for(let d=n;d<r;d+=1){let c=l[d];l[d]={...c,pageFieldSource:{pageNumber:a+(d-n),sectionPageCount:s,...i?{format:i}:{}}};}return l}function Rb(e,n,t,r,o,a,i,s,l){if(t.length===0||e.length===0)return e;let d=[...e],c=[...t],u=new Map,f=n,p=0,m="separator",g=l?.stopBeforeIndex??Number.POSITIVE_INFINITY,b=l?.sectionStartIndex??n,h=l?.stopBeforeIndex!==void 0,x=l?.separatorCache;for(;c.length>0||u.size>0;){if(f>=d.length||f>=g){if(s.remaining<=0){i.push("note-overflow-page-limit");break}let M=d[Math.min(Math.max(f,1),d.length)-1]??d[d.length-1],P=Math.min(f,g,d.length),B=TT(d,P,M,"endnote-overflow");d=B.pages,f=B.pageIndex,h&&(g=P+1),p+=1,s.remaining-=1;}let I=d[f];if(!Fb(I)){f+=1;continue}let w=IT(I,c,r,o,a,u,i,{separatorKind:m,...x?{separatorCache:x}:{}});u=w.nextCarry,c=w.remainingRefs;let C=w.area?.notes.length??0;if(w.area){let M=d[f];d[f]={...M,endnotes:M.endnotes?{...w.area,notes:[...M.endnotes.notes,...w.area.notes],box:{...w.area.box,y:M.endnotes.box.y,height:M.endnotes.box.height+w.area.box.height}}:w.area};}else {if(u.size===0&&c.length===0)break;if(!w.area&&u.size===0&&c.length>0){f+=1,m="separator";continue}}if(C===0&&(u.size>0||c.length>0)&&I.fragments.length===0&&I.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(u.size>0||c.length>0){m="continuationSeparator",f+=1;continue}break}return (c.length>0||u.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),h?d=Sb(d,b,Math.min(g,d.length)):p>0&&(d=Sb(d,b,d.length)),d}function Ab(e,n,t,r,o){let a=o??null,i=new Map,s=[],l=new Map,d=$u(n),c=Ob();for(let f of e.pages){let p=Gu(f),g=yl(p,n,d).filter(B=>B.noteKind==="footnote"),b=g[0]?.sectionIndex??0,h=zo(t,b);if(h.pos==="sectEnd"||h.pos==="docEnd")continue;if(a&&l.size===0){let B=a.pageReserve.get(f);if(B&&B.allHits===n&&B.marks===r){for(let O of B.reasons)s.push(O);B.reserve>0&&i.set(f.index,Math.max(i.get(f.index)??0,B.reserve));continue}}let x=Math.max(0,p.contentBox.height-kb),I=l.size===0,w=s.length,{area:C,nextCarry:M}=Vu(p,g,t,r,h.pos,l,s,{reserveColumnBudget:true,separatorCache:c});l=M;let P=Math.min(C?.box.height??0,x);if(a&&I&&l.size===0&&a.pageReserve.set(f,{allHits:n,marks:r,reserve:P>0?P:0,reasons:s.slice(w)}),P>0){let B=i.get(f.index)??0;i.set(f.index,Math.max(B,P));}}let u=true;for(let f of e.pages){let p=i.get(f.index)??0;if(p<=0)continue;if(xl(Gu(f))+p>f.contentBox.height+.5){u=false;break}}return {reserves:i,stable:u,reasons:s}}function Db(e,n,t,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,s={remaining:Tb},l=$u(n),d=Ob(),c=[],u=[];for(let w of e.pages)for(let C of yl(w,n,l)){let M={noteId:C.noteId,sectionIndex:C.sectionIndex,pageIndex:w.index,customMarkFollows:C.customMarkFollows};C.noteKind==="footnote"?c.push(M):u.push(M);}let f=o?[...c,...u].map(w=>`${w.noteId}|${w.sectionIndex}|${w.pageIndex??""}|${w.customMarkFollows?1:0}`).join(";"):"",p;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===f?p=o.finalMarks.marks:(p=Lb(c,u,t),o&&(o.finalMarks={sitesFingerprint:f,marks:p}));let m=new Map,g=new Map,b=[],h=e.pages.map(w=>{let C=yl(w,n,l),M=C.filter(v=>v.noteKind==="footnote"),P=C.filter(v=>v.noteKind==="endnote");for(let v of P)if(Xu(t,v.sectionIndex).pos==="sectEnd"){let j=g.get(v.sectionIndex)??[];j.push(v),g.set(v.sectionIndex,j);}else b.push(v);for(let v of M){let N=zo(t,v.sectionIndex);if(N.pos==="sectEnd"){let j=g.get(v.sectionIndex)??[];j.push(v),g.set(v.sectionIndex,j);}else N.pos==="docEnd"&&b.push(v);}if(o&&m.size===0){let v=o.pageAttach.get(w);if(v&&v.allHits===n&&v.marks===p){for(let N of v.reasons)a.push(N);return v.attached}}let B=Gu(w),O=M[0]?.sectionIndex??0,k=zo(t,O),D,A=m.size===0,y=a.length;if(k.pos==="pageBottom"||k.pos==="beneathText"){let v=M.filter(j=>{let E=zo(t,j.sectionIndex).pos;return E==="pageBottom"||E==="beneathText"}),N=Vu(B,v,t,p,k.pos,m,a,{separatorCache:d});D=N.area,m=N.nextCarry;}let ne=D?{...B,footnotes:D}:B;return o&&A&&m.size===0&&o.pageAttach.set(w,{allHits:n,marks:p,attached:ne,reserve:0,reasons:a.slice(y)}),ne}),x=h.length;if(m.size>0){let w=vT(h,m,t,p,a,s,d);h=w.pages,m=w.carry;}if(g.size>0&&h.length>0){let w=[...g.keys()].sort((C,M)=>C-M);for(let C of w){let M=g.get(C),P=Nb(h,C,i),B=RT(h,C,i),O=P;for(let k=0;k<=P;k+=1)if(Yu(h[k],i).includes(C)){O=k;break}h=Rb(h,P,M,t,p,"sectEnd",a,s,{stopBeforeIndex:B,sectionStartIndex:O,separatorCache:d});}}return b.length>0&&h.length>0&&(h=Rb(h,ST(h),b,t,p,"docEnd",a,s,{separatorCache:d})),h.length!==x&&(h=PT(h)),{layout:mT({revision:e.revision,pages:h},p),fallbackReasons:a,noteMarks:p}}function kT(e){return $d$1(e).map(n=>({noteKind:n.noteKind,noteId:n.noteId,paragraphId:n.paragraphId,atomOffset:n.atomOffset,customMarkFollows:n.customMarkFollows}))}var wb=new WeakMap;function CT(e,n){return `${n};${e.map(t=>`${t.blockStart}-${t.blockEndExclusive}`).join(",")}`}function OT(e,n){if(e.kind!==n.kind)return false;if(e.kind==="paragraph")return e.id===n.id;let t=Wu(e),r=Wu(n);if(t.length!==r.length)return false;for(let o=0;o<t.length;o+=1)if(t[o]!==r[o])return false;return true}function BT(e,n,t,r){let o=Bt(e,t),a=CT(n,t),i=r?wb.get(r):void 0;if(i&&i.boundsFingerprint===a&&i.blocks.length===o.length){let l=true;for(let d=0;d<o.length;d+=1){let c=o[d],u=i.blocks[d];if(c!==u&&!OT(c,u)){l=false;break}}if(l)return i.blocks=o,i.map}let s=new Map;for(let l=0;l<n.length;l+=1){let d=n[l];for(let c=d.blockStart;c<d.blockEndExclusive;c+=1){let u=o[c];if(u){if(u.kind==="paragraph"){s.set(u.id,l);continue}for(let f of Wu(u))s.set(f,l);}}}return r&&wb.set(r,{blocks:o,boundsFingerprint:a,map:s}),s}var Pb=new WeakMap;function Wu(e){let n=Pb.get(e);if(n)return n;let t=[],r=(o,a)=>{if(!(a>32)&&o.kind!=="textValue"){if(o.kind==="paragraph"){t.push(o.id);return}for(let i of o.children)r(i,a+1);}};return r(e,0),Pb.set(e,t),t}function Ku(e,n,t){if(!e)return "";let r=[];for(let[o,a]of e){let i=o-n;i>=0&&i<t&&r.push([i,a]);}return r.length===0?"":(r.sort((o,a)=>o[0]-a[0]),`|nr:${r.map(([o,a])=>`${o}=${a}`).join(",")}`)}function Fr(e){let n=new Map;for(let[t,r]of e)r>0&&n.set(t,r);return n}function Hu(e,n){let t=Fr(e),r=Fr(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 Ib(e,n){let t=Fr(e);for(let[r,o]of n)o<=0||t.set(r,Math.max(t.get(r)??0,o));return t}function hl(e){return [...Fr(e)].map(([n,t])=>`${n}=${t}`).sort().join(",")}function _b(e,n,t,r,o){let a=kT(e);if(a.length===0)return t.session&&(t.session.notes=null,t.session.notePageBottomReserves=null),o({...t,noteMarks:void 0,pageBottomReserves:void 0});let i=BT(e,n,t.displayMode??un,t.session),s=lT(a,i),l=iT(t.session,s,r),d=l.memo,c=l.allHits,u=d?.provisionalMarks??Uu(c,r),f=t.session?.notePageBottomReserves,p=f?Fr(f):new Map,m=[],g=o({...t,noteMarks:u,pageBottomReserves:p}),b=new Set([hl(p)]);for(let x=0;x<zu;x+=1){let I=Ab(g,c,r,u,d);if(m=[...I.reasons],I.stable&&Hu(I.reserves,p))break;let w=I.stable?Fr(I.reserves):Ib(p,I.reserves);if(Hu(w,p)){m.push("note-reflow-exhausted");break}let C=hl(w);if(b.has(C)){w=Ib(p,I.reserves);let M=hl(w);if(Hu(w,p)||b.has(M)){m.push("note-reflow-exhausted");break}}p=w,b.add(hl(p)),g=o({...t,noteMarks:u,pageBottomReserves:p}),x===zu-1&&m.push("note-reflow-exhausted");}let h=Db(g,c,r,{fallbackReasons:m,paragraphSectionIndex:i,memo:d});return t.session&&(t.session.previous=h.layout,t.session.notePageBottomReserves=Fr(p)),h.layout}function Uu(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 Lb(t,r,n)}function Hb(e,n){let t=e.projectLink??n.projectLink,r=e.projectFieldLink??n.projectFieldLink,o=e.documentProperties??n.documentProperties;return {...e,...t?{projectLink:t}:{},...r?{projectFieldLink:r}:{},...o?{documentProperties:o}:{}}}var zb=null;function Wb(e,n){let t=zb;if(t&&t.base===e&&t.token===n)return t.producer;let r=`${e??"unversioned-measurer"}|cc:${n}`;return zb={base:e,token:n,producer:r},r}var jb=new WeakMap,Gb=null;function LT(e,n,t,r,o){return e!=null&&e.base===n&&e.noteMarks===t&&e.defaultTabStopPt===r&&e.displayMode===o}function $b(e,n,t,r,o){let a=n?jb.get(n):Gb;if(LT(a,e,t,r,o))return a.producer;let i=(e??"unversioned-measurer")+(n?`|sc:${n.cacheToken}`:"")+(t?`|nm:${Lm(t)}`:"")+(r!==void 0?`|dts:${r}`:"")+(o===un?"":`|rev:${o}`),s={base:e,noteMarks:t,defaultTabStopPt:r,displayMode:o,producer:i};return n?jb.set(n,s):Gb=s,i}var MT={kind:"covered",id:"hashed",paragraphId:"covered",fragmentIndex:"covered",range:"hashed",props:"hashed",spacing:"hashed",indent:"hashed",bottomBorder:"hashed",borders:"hashed",shading:"hashed",shadingBox:"hashed",markRevisions:"hashed",markRevision:"covered",markFormatRevision:"hashed",marker:"hashed",tabStops:"hashed",lines:"hashed",box:"hashed"},FT={kind:"covered",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function Yb(e){return Object.keys(e).filter(n=>e[n]==="hashed")}var ET=Yb(MT),NT=Yb(FT),Xb=new WeakMap;function Vb(e){let n=Xb.get(e);if(n!==void 0)return n;let t=e.kind==="table"?JSON.stringify(NT.map(r=>e[r])):JSON.stringify(ET.map(r=>e[r]));return Xb.set(e,t),t}function Kb(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&&Vb(r)!==Vb(o))return false}return true}function qu(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 Ub=Object.freeze([]),qb=new Map;function Zb(e,n){if(e===n)return true;if(e.size!==n.size)return false;for(let[t,r]of e)if(n.get(t)!==r)return false;return true}function Sl(){return {previous:null,checkpoints:[],keys:[],context:"",producer:"",parityDependent:false,startPageParity:0,prepass:null,startLineCounter:0,endLineCounter:0,endCursorY:0,endSpaceAfter:0,endsOpenPage:true,stats:{placed:0,total:0,reusedPages:0,fullPasses:0},balanceLimit:null,multi:null,notePageBottomReserves:null,notes:null}}function Jb(e,n){return [...e].map(([t,r])=>`${t}=${r.flowHeight}`).sort().join(",")}function nx(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${Jb(e.headers)};f:${Jb(e.footers)}`:""}function Rl(e,n,t){if(e.sectionFurniture)return e.sectionFurniture[n];if(n===t-1)return e.furniture}function AT(e,n){return e.map((t,r)=>{let o=Mr(t.properties),a=Rl(n,r,e.length),i=t.properties.pageNumbering,s=i?`pn:${i.start??""},${i.fmt??""},${i.chapStyle??""},${i.chapSep??""}`:"pn:",l=t.properties.columns,d=`cols:${l.count},${l.gapTwips},${l.equalWidth===false?0:1},${l.separator?1:0};${(l.definitions??[]).map(c=>`${c.widthTwips}/${c.gapTwips}`).join(",")}`;return [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,nx(a),s,d].join(":")}).join("|")}function DT(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},()=>Sl()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1};return e.multi=o,o}function _T(e){return e!=="continuous"}function HT(e,n){return e.width===n.width&&e.height===n.height}function zT(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 Qb(e,n,t){e.previous=n,e.startLineCounter=0,e.endLineCounter=t,e.keys=[],e.checkpoints=[],e.context="",e.producer="";}var ex=new WeakMap;function jT(e,n,t,r,o,a){let i=ex.get(e);if(i&&i.globalIndex===n&&i.sheetY===t&&i.pageNumber===r&&i.sectionPageCount===o&&i.format===a)return i.published;let s=Qa(e,n,t),l=lo([s],r,o,a)[0];return ex.set(e,{globalIndex:n,sheetY:t,pageNumber:r,sectionPageCount:o,format:a,published:l}),l}function tx(e,n,t,r,o){let{session:a,...i}=r,s=AT(n,r),l=DT(a,s,n.length),d=i.cache&&i.retainKeys!==false?i.retainKeys??(i.cache.retentionPassDue?.()??true?new Set:false):false,c=()=>{d&&!i.retainKeys&&i.cache?.retain(d);},u=[],f=[],p=[],m=0,g=0,b=0,h=0,x=0,I=0,w=0,C=true,M=null,P="",B=1;for(let D=0;D<n.length;D+=1){let A=n[D],y=e.slice(A.blockStart,A.blockEndExclusive),ne=Mr(A.properties),v=Rl(r,D,n.length),N=u.length,j=m,E=l?.spans[D],T=nx(v);if(y.length===0&&!_T(A.properties.breakType)){p.push({startIndex:N,pageCount:0,sheetY:j,remappedPages:[],sourcePages:[]});continue}let H=D>0&&A.properties.breakType==="continuous"&&u.length>0&&C&&M!==null&&HT(M,ne)&&P===T,F=l?.sections[D],q=A.properties.columns.count>1&&n[D+1]?.properties.breakType==="continuous",G=o(y,t,{...i,retainKeys:d,geometry:ne,furniture:v,sectionColumns:A.properties.columns,...q?{balanceColumns:q}:{},lineCounterStart:g,pageIndexStart:H?N-1:N,...H?{flowStartY:I,spaceBeforeCarry:w}:{},...F?{session:F}:{}});g=G.lineCounter,I=G.endCursorY,w=G.endSpaceAfter,C=G.endsOpenPage,M=ne,P=T,F?(b+=F.stats.placed,h+=F.stats.total):(b+=y.length,h+=y.length);let X=F!==void 0&&F.stats.placed===0&&F.stats.reusedPages===G.pages.length&&E!==void 0&&E.pageCount===G.pages.length&&E.sourcePages.length===G.pages.length&&E.sourcePages.every((oe,Se)=>oe===G.pages[Se]),V=E!==void 0&&E.startIndex===N&&E.sheetY===j&&E.remappedPages.length===G.pages.length,J=A.properties.pageNumbering,K=J?.start!==void 0?J.start:B,W=J?.fmt,Q=E?.remappedPages[0],we=E===void 0||E.remappedPages.length===0||Q?.pageFieldSource!==void 0&&Q.pageFieldSource.pageNumber===K&&Q.pageFieldSource.sectionPageCount===E.remappedPages.length&&Q.pageFieldSource.format===W,ce;if(H){let oe=u.length-1,Se=u[oe],Ie=zT(Se,G.pages[0]);if(Ie!==Se){u[oe]=Ie;let tn=f.lastIndexOf(Se);tn!==-1&&(f[tn]=Ie);}let nn=[];for(let tn of G.pages.slice(1)){let Oe=Qa(tn,u.length+nn.length,m);nn.push(Oe),m=Oe.box.y+Oe.box.height+24;}let fe=nn.length+1;ce=lo(nn,K+1,fe,W);for(let tn of ce)u.push(tn),f.push(tn);B=K+fe;}else if(X&&V&&we){ce=E.remappedPages,x+=ce.length;for(let oe of ce)u.push(oe),f.push(oe),m=oe.box.y+oe.box.height+24;B=K+ce.length;}else {let oe=[];for(let Se of G.pages){let Ie=jT(Se,u.length+oe.length,m,K+oe.length,G.pages.length,W);oe.push(Ie),m=Ie.box.y+Ie.box.height+24;}ce=oe;for(let Se of ce)u.push(Se),f.push(Se);B=K+ce.length;}p.push({startIndex:N,pageCount:ce.length,sheetY:j,remappedPages:ce,sourcePages:G.pages});}if(u.length===0){let D=Mr(n[0]?.properties??et),A=o([],t,{...i,retainKeys:d,geometry:D,sectionColumns:n[0]?.properties.columns??et.columns});c();let y=Ut({revision:t,pages:A.pages});return l&&(l.spans=[],l.previousRemapped=A.pages,l.previousFinalized=y,l.previousPageCount=y.pages.length),a&&(Qb(a,y,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),y}let O=Ut({revision:t,pages:u}),k=O;if(l?.previousFinalized&&l.previousPageCount===O.pages.length&&l.previousRemapped.length===f.length){let D=l.previousFinalized.pages,A=l.previousRemapped,y=O.pages.map((ne,v)=>f[v]===A[v]&&D[v]?D[v]:ne);k={revision:t,pages:y};}return l&&(l.spans=p,l.previousRemapped=f,l.previousFinalized=k,l.previousPageCount=k.pages.length),a&&(Qb(a,k,g),a.stats={placed:b,total:h||1,reusedPages:x,fullPasses:a.stats.fullPasses+(b===h&&x===0?1:0)}),c(),k}function wl(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 GT=2;function WT(e,n){if(!n||n.size===0)return "";let t=[],r=o=>{if(o.kind==="paragraph"){let a=n.get(o.id)?.cacheToken;a&&t.push(a);return}if("children"in o)for(let a of o.children)r(a);};return r(e),t.join(";")}var rx=new WeakMap,ox=new WeakMap;function Ju(e){if(e===void 0||e.size===0)return "";let n=ox.get(e);if(n!==void 0)return n;let t=[...e].join(",");return ox.set(e,t),t}function $T(e){let n=Ju(e.chrome),t=Ju(e.placeholder),r=Ju(e.suppressed);return n===""&&t===""&&r===""?"":`${n}|${t}|${r}`}function XT(e,n){let t=n.chrome?.has(e)??false,r=n.placeholder?.has(e)??false,o=n.suppressed?.has(e)??false;return !t&&!r&&!o?"":`${t?1:0}${r?1:0}${o?1:0}`}var ax=new WeakMap;function VT(e,n,t){let r=t.displayMode??un,o=Bt(e,r),a=Nu(e,o).sections,i=Ao(e),s={...t,producer:Wb(t.producer,i),tocFieldChromeParagraphIds:t.tocFieldChromeParagraphIds??wu(e),emptyTocPlaceholderParagraphIds:t.emptyTocPlaceholderParagraphIds??Pu(e),emptyTocSuppressedResultParagraphIds:t.emptyTocSuppressedResultParagraphIds??Iu(e)},l=t.drawingSourceOrder;!l&&t.inlineDrawingLayout&&(l=ax.get(t.inlineDrawingLayout),l||(l=(()=>{let p=new Map;return Va$1(e).forEach((m,g)=>{p.set(m.drawingNodeId,g);}),p})(),ax.set(t.inlineDrawingLayout,l)));let d=t.session?Dh(l?{...s,drawingSourceOrder:l}:s,o,t.session):Tr(l?{...s,drawingSourceOrder:l}:s,o),c=p=>{if(a.length>1)return tx(o,a,n,p,jo);let m=a[0],g=p.geometry??(m?Mr(m.properties):da),b=Rl(p,0,a.length)??p.furniture,h=jo(o,n,{...p,geometry:g,furniture:b,sectionColumns:m?.properties.columns??et.columns}),x=m?.properties.pageNumbering,I=Lu({revision:h.layout.revision,pages:lo(h.pages,x?.start??1,h.pages.length,x?.fmt)},h.layout),w=Ut(I);return p.session&&(p.session.multi=null,p.session.previous=w),w},u=p=>{let m=Mu(p,e,i);return t.session&&(t.session.previous=m),m};if(!t.notes)return t.session&&(t.session.notes=null,t.session.notePageBottomReserves=null),u(c(d));let f=Hb(t.notes,t);return u(_b(e,a,d,f,c))}function ix(e,n,t,r){let o=`line:${e}:${t}:${n}`;return r===void 0?o:`${o}:occ:${r}`}function Er(e,n,t){let r=t.geometry,o=r.width-r.margin.left-r.margin.right,a=Au(t.sectionColumns??et.columns,o);if(t.inlineDrawingLayout&&t.drawingExclusionPass===void 0&&!t.drawingExclusionConverged){let R=Z=>t.drawingSourceOrder?.get(Z),$=Object.freeze({columnCount:a.count,columnGapPt:a.gaps[0]??0,contentWidth:o,columnLefts:a.lefts,columnWidths:a.widths}),_=new Map,ae=null,he=false,pe=new Set,ue=t.session?.previous?.pages;if(ue){if(_=vc(ue,t.inlineDrawingLayout,t.drawingLayoutEpoch,o,t.drawingSourceOrder,$),ae=jo(e,n,{...t,drawingExclusionPass:0,drawingExclusionZonesByPage:_}),ae.pages===ue)return ae;let Z=vc(ae.pages,t.inlineDrawingLayout,t.drawingLayoutEpoch,o,t.drawingSourceOrder,$);if(ys(_,Z))return ae;_=new Map(Z),pe.add(bs(Z));}for(let Z=0;Z<wr;Z+=1){ae=jo(e,n,{...t,session:void 0,drawingExclusionPass:Z,drawingExclusionZonesByPage:_});let ge=hs(ae.pages,t.inlineDrawingLayout,o,R,$);if(ge.size===0){he=true,_=ge;break}let ee=bs(ge);if(pe.has(ee)){he=true,_=ge;break}if(pe.add(ee),Z>0&&ys(_,ge)){he=true,_=ge;break}_=new Map(ge);}if(!he)for(let Z=0;Z<GT&&!he;Z+=1){ae=jo(e,n,{...t,session:void 0,drawingExclusionPass:wr+Z,drawingExclusionZonesByPage:_});let ge=hs(ae.pages,t.inlineDrawingLayout,o,R,$),ee=bs(ge);if(ys(_,ge)||pe.has(ee)){he=true,_=ge;break}pe.add(ee),_=new Map(ge);}if(!he)throw new Po(`wrap exclusion reflow did not converge within ${wr} passes`);return jo(e,n,{...t,drawingExclusionConverged:true,drawingExclusionZonesByPage:_})}let i=t.measurer,s$1=t.cache,l=t.styleCascade,d=t.listItems,c=t.defaultTabStopPt,u=t.displayMode??un,f=u==="all-markup",p=t.tocFieldChromeParagraphIds,m=t.emptyTocPlaceholderParagraphIds,g=t.emptyTocSuppressedResultParagraphIds,b={chrome:p,placeholder:m,suppressed:g},h=$T(b),x=$b(t.producer,l,t.noteMarks,c,u),I=a.widths[0],w=t.furniture,C=r.headerDistance??36,M=r.footerDistance??36,P=R=>{let $=0;for(let _ of R?.values()??[])$=Math.max($,_.flowHeight);return $},B=r.height*.4,O=Math.min(B,Math.max(r.margin.top,w?C+P(w.headers):0)),k=Math.min(B,Math.max(r.margin.bottom,w?M+P(w.footers):0)),D=r.height-O-k,A=t.pageBottomReserves,y=t.session,ne=t.lineCounterStart??0,v=_y(w,C,M),N=t.flowStartY??0,j=t.spaceBeforeCarry??0,E=t.pageIndexStart??0,T=y?.previous?y.previous.pages.length+1:1/0,H=t.columnRegionBottom,F=`|cols:${a.widths.join(",")};${a.gaps.join(",")};${a.separator?1:0}${H!==void 0?`;bal:${H}`:""}`,q=R=>`${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|fs:${N},${j}${v}${R}${F}`,G=q(Ku(A,E,T)),X=E&1,V=false,J=null,K=()=>{V=true;},W=[],Q=()=>{let R=Math.max(1,D-(A?.get(E+W.length)??0));return H!==void 0&&W.length===0?Math.max(1,Math.min(R,H)):R},we=(R,$)=>{let _=R.kind==="paragraph"?t.drawingTokenForParagraph?.(R)??t.drawingLayoutToken??"":R.kind==="table"&&t.drawingTokenForParagraph?Ry(R,t.drawingLayoutEpoch,t.drawingTokenForParagraph):"",ae=Ey(R,t.numberingIndex,l,u),he=(R.kind==="table"?WT(R,d):d?.get(R.id)?.cacheToken??"")+ae,pe=rx.get(R);if(pe&&pe.contentWidth===$&&pe.producer===x&&pe.drawingToken===_&&pe.listToken===he)return pe.entry;let ue;if(R.kind==="table")ue={kind:"table",table:R,key:Rr({paragraph:R,properties:ae?[{localName:"txbxList",attributes:{token:ae}}]:[],width:$,producer:x,..._?{drawingToken:_}:{}})};else {let Z=d?.get(R.id),ge=Da(R,$,l,Z),{props:ee,indent:Re,available:ve,alignment:Te,spacing:ke,lineSpacing:rn,contextualSpacing:le,styleId:_e,shading:Le,inheritedRunProperties:Ae,markRunProperties:gt}=ge,Ve=Cg(R.children.find(_t=>_t.kind==="paragraphProperties"),l),Dt=Fd(Ve),gn=ha(ge.tabStops,c),lr=gn===ge.tabStops?ge.tabStopsCacheToken:yr(gn);ue={kind:"paragraph",paragraph:R,props:ee,indent:Re,available:ve,alignment:Te,spacing:ke,lineSpacing:rn,contextualSpacing:le,styleId:_e,borders:Ve,borderGroupKey:Dt===""?"":`${Dt}@${Re.left},${Re.right}`,shading:Le,inheritedRunProperties:Ae,markRunProperties:gt,tabStops:gn,keeps:Og(ee),...Z?{listItem:Z}:{},key:Rr({paragraph:R,properties:[...ee,...Ae,...gt,{localName:"tabStops",attributes:{token:lr}},...Z?[{localName:"list",attributes:{token:Z.cacheToken}}]:[],...ae?[{localName:"txbxList",attributes:{token:ae}}]:[]],width:ve,producer:x,..._?{drawingToken:_}:{}})};}return rx.set(R,{contentWidth:$,producer:x,drawingToken:_,listToken:he,entry:ue}),ue},ce=t.drawingTokenForParagraph===void 0&&t.drawingLayoutToken===void 0?t.drawingLayoutEpoch??"":t.drawingLayoutEpoch??null,oe=y?.prepass,Se=oe!=null&&ce!==null&&oe.drawingEpoch===ce&&oe.producer===x&&oe.contentWidth===I&&oe.styleCascade===l&&oe.listItems===d&&oe.tocToken===h&&oe.bodies.length===e.length&&oe.bodies.every((R,$)=>R===e[$]),Ie=Se?oe:nn();function nn(){let R=e.map(ee=>we(ee,I)),$=R.map(ee=>ee.key),_=R.map(ee=>ee.kind==="paragraph"&&ee.keeps.keepNext),ae=R.map(ee=>ee.kind==="paragraph"?d?.get(ee.paragraph.id)?.markerText:void 0),he=R.map(ee=>ee.kind==="paragraph"&&ee.contextualSpacing),pe=R.map(ee=>ee.kind==="paragraph"?ee.styleId:null),ue=R.map(ee=>ee.kind==="paragraph"?ee.borderGroupKey:""),Z=h===""?[]:R.map(ee=>ee.kind==="paragraph"?XT(ee.paragraph.id,b):""),ge=Mg($,{contextualSpacingAt:ee=>he[ee],styleIdAt:ee=>pe[ee]??null,borderGroupKeyAt:ee=>ue[ee],tocVerdicts:Z,markerTextAt:ee=>ae[ee],keepsNextAt:ee=>_[ee]});return {bodies:e,producer:x,contentWidth:I,styleCascade:l,listItems:d,drawingEpoch:ce??"",prepared:R,keys:$,paragraphDocumentOrder:ly(R,I,l,u),keepsNext:_,markerTexts:ae,tocToken:h,flowKeys:ge}}y&&ce!==null&&!Se&&(y.prepass=Ie);let{prepared:fe,keys:tn,paragraphDocumentOrder:Oe,keepsNext:Gn,flowKeys:yn}=Ie,pn=()=>{t.retainKeys!==false&&(t.retainKeys===void 0&&s$1&&!(s$1.retentionPassDue?.()??true)||Wm(s$1,t.retainKeys,tn,fe.flatMap(R=>R.kind==="table"?[R.table]:[])));},bn=y?.previous??null,Wn=bn!==null&&y!==void 0&&y.context===G&&y.producer===x&&(!y.parityDependent||y.startPageParity===X),$n=a.count===1&&Wn,mn=0;if(Wn){let R=Math.min(yn.length,y.keys.length);for(;mn<R&&yn[mn]===y.keys[mn];)mn+=1;}let Xn=0;if($n){let R=Math.min(yn.length,y.keys.length)-mn;for(;Xn<R&&yn[yn.length-1-Xn]===y.keys[y.keys.length-1-Xn];)Xn+=1;}if(Wn&&mn===fe.length&&fe.length===y.keys.length){let R=Lu({revision:n,pages:bn.pages},bn),$=ne+(y.endLineCounter-y.startLineCounter);return y.previous=R,y.startLineCounter=ne,y.endLineCounter=$,y.startPageParity=X,y.stats={placed:0,total:fe.length,reusedPages:bn.pages.length,fullPasses:y.stats.fullPasses},pn(),{layout:R,pages:R.pages,lineCounter:$,endCursorY:y.endCursorY,endSpaceAfter:y.endSpaceAfter,endsOpenPage:y.endsOpenPage}}let sn=[],On=0,Xe=0,ln=()=>a.lefts[On],L=()=>a.widths[On],S=()=>({text:{left:ln(),width:L()},margin:{left:0,width:o},page:{left:-r.margin.left,width:r.width}}),z=()=>sn.length>Xe,U=[],te=[],se=new Map,Y=N,me=N,Be=0,Ne=ne,Pe=j,He=[],Bn=()=>({pageCount:W.length,pageFragments:[...sn],pendingAnchoredDrawings:[...U],deferredAnchoredDrawings:te.length>0?[...te]:Ub,anchorPageDeferCounts:se.size>0?new Map(se):qb,cursorY:Y,lineCounter:Ne,previousSpaceAfter:Pe,flowColumnIndex:Be}),wn=0,We=0,xe=0,ze=N===0;if($n&&mn>0&&mn<y.checkpoints.length){let R=y.checkpoints[mn];W.push(...bn.pages.slice(0,R.pageCount)),sn=[...R.pageFragments],U=[...R.pendingAnchoredDrawings],te=[...R.deferredAnchoredDrawings],se.clear();for(let[$,_]of R.anchorPageDeferCounts)se.set($,_);Y=R.cursorY,Be=R.flowColumnIndex,On=R.flowColumnIndex,Ne=R.lineCounter,Pe=R.previousSpaceAfter,wn=mn,ze=false,xe=W.length,He.push(...y.checkpoints.slice(0,mn));}let Ln=R=>({x:0,y:R*(r.height+24),width:r.width,height:r.height}),ir=R=>w?.titlePage&&R===0?"first":w?.evenAndOddHeaders&&(E+R+1)%2===0?"even":"default",sr=(R,$,_)=>{if(!w)return;let ae=ir($),he=(R==="header"?w.headers:w.footers).get(ae);if(!he)return;let pe=Te=>{let ke=R==="header"?_.y+C:_.y+r.height-M-Te.flowHeight;return {kind:R,variant:ae,partName:Te.partName,...Te.part?{part:Te.part}:{},...Te.rId?{rId:Te.rId}:{},box:{x:_.x+r.margin.left,y:ke,width:o,height:Te.flowHeight},fragments:Te.fragments,...Te.anchoredDrawings?{anchoredDrawings:Te.anchoredDrawings}:{}}},ue=E+$+1,Z={pageNumber:ue,pageCount:Math.max(ue,W.length+1),sectionPageCount:$+1},ge=he.pageFieldNeeds,Re=Kt(ge)||(he.anchoredDrawings?.length??0)>0?he.withPageContext(Z):he,ve=pe(Re);return Kt(ge)?{...ve,pageFieldProjector:Te=>pe(he.withPageContext(Te))}:ve},Wo=a.count,Nr=ln,Cl=R=>Object.freeze({x:a.lefts[Be]??0,y:R.y,width:a.widths[Be]??I,height:R.height}),Ol=()=>Object.freeze({pageNumber:E+W.length+1,onPageParityRead:K,pageWidth:r.width,pageHeight:r.height,marginLeft:r.margin.left,marginRight:r.margin.right,marginBottom:r.margin.bottom,contentInsetTop:O,contentInsetBottom:k,contentWidth:I,contentHeight:Q(),contentBandHeight:D,ownerPartName:t.inlineDrawingLayout?.ownerPartName??s,storyKind:"body"}),af=()=>Ba(Ol()),Bl=R=>t.drawingSourceOrder?.get(R),li=R=>{if(R.length===0)return;for(let _ of R)U.some(ae=>ae.drawingNodeId===_.drawingNodeId)||U.push(_.sourceOrder===void 0&&Bl(_.drawingNodeId)!==void 0?Object.freeze({..._,sourceOrder:Bl(_.drawingNodeId)}):_);if(!t.inlineDrawingLayout)return;let $=mg(U,{pageBottom:Q()});if(U.splice(0,U.length,...$.drawings),$.deferred.length>0)for(let _ of $.deferred){let ae=(se.get(_.drawingNodeId)??0)+1;se.set(_.drawingNodeId,ae),ae>=bc?U.push(Pc(_,"page-defer-exhausted")):te.push(_);}},sf=()=>{if(te.length===0)return;let R=te.map($=>Rc($,Y-$.y));te=[],li(R);},Ar=()=>{let R=W.length,$=Ln(R),_=sr("header",R,$),ae=sr("footer",R,$),{usedBottom:he,hasBodyPageFields:pe}=ec(sn,me);W.push({id:`page-${R}`,index:R,box:$,contentBox:{x:$.x+r.margin.left,y:$.y+O,width:o,height:D},fragments:sn,hasBodyPageFields:pe,...a.separator?{columnSeparators:a.gaps.map((ue,Z)=>({x:a.lefts[Z]+a.widths[Z]+ue/2-.375,y:me,width:.75,height:Math.max(0,he-me)}))}:{},...U.length>0?{anchoredDrawings:pg(U)}:{},..._?{header:_}:{},...ae?{footer:ae}:{}}),sn=[],U=[],Y=0,On=0,Be=0,me=0,Xe=0;},Xx=(R,$)=>{if(R.kind!=="paragraph"||R.listItem!==void 0||R.shading!==void 0)return false;let{top:_,bottom:ae,left:he,right:pe,between:ue}=R.borders;if(_??ae??he??pe??ue)return false;let Z=t.inlineDrawingLayout;return Z&&Hn(R.paragraph,Z).length>0?false:$.every(ge=>ge.drawings.length===0&&!ge.pageBreakAfter&&!ge.columnBreakAfter&&ge.spans.every(ee=>ee.text.length===0))},$o=()=>{if(On+1<a.count){On+=1,Be=On,Y=me,Pe=0,Xe=sn.length;return}Ar(),sf();},lf=R=>al(R,{measurer:i,producer:x,cache:s$1,styleCascade:l,...c!==void 0?{defaultTabStopPt:c}:{},...u?{displayMode:u}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.numberingIndex?{numberingIndex:t.numberingIndex}:{},inlineDrawingLayout:t.inlineDrawingLayout,drawingTokenForParagraph:t.drawingTokenForParagraph}),Nt={measurer:i,cache:s$1,producer:x,onCellBreakKey:R=>{J?.push(R);},nextLineId:(R,$,_,ae)=>(Ne+=1,ix(R,$,_,ae)),pageOccurrenceKey:()=>String(W.length),styleCascade:l,listItems:d,...c!==void 0?{defaultTabStopPt:c}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},bodyPageFields:true,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:t.drawingLayoutToken?{drawingLayoutToken:t.drawingLayoutToken}:{},...t.inlineDrawingLayout?{anchorFrameBase:Ol,pageContentClip:af,layoutTextboxStoryFor:lf,publishAnchoredDrawings:li,collectAnchoredDrawings:li,columnBoxForParagraph:Cl,pageExclusionZones:()=>t.drawingExclusionZonesByPage?.get(W.length)??Object.freeze([]),paragraphOrderIndex:R=>Oe.get(R),onAnchorShift:(R,$)=>gc(U,R,$),onAnchorRepublish:(R,$)=>{for(let _=U.length-1;_>=0;_-=1)U[_].anchorParagraphId===R&&U.splice(_,1);U.push(...$);}}:{},borderOwnershipBudget:Bs(),vMergeResolveBudget:fu(),displayMode:u},Ll=R=>Ks(d?.get(R.paragraph.id)??R.listItem,R.indent,i,R.tabStops,R.available),Ml=(R,$,_=0)=>{let ae=R.paragraph.id,pe=!(m?.has(ae)??false)&&((p?.has(ae)??false)||(g?.has(ae)??false)),ue=R.available,Z=Nr(),ee=(t.drawingExclusionZonesByPage?.get(W.length)??Object.freeze([])).filter(rn=>{let le=Oe.get(R.paragraph.id),_e=Oe.get(rn.anchorParagraphId);if(le!==void 0&&_e!==void 0){if(_e>le)return false}else {let Le=fe.findIndex(Ae=>Ae.kind==="paragraph"&&Ae.paragraph.id===rn.anchorParagraphId);if(Le<0||Le>$)return false}return !(Wo>1&&rn.columnIndex!==Be)}),Re=mt(ee),ve=t.drawingTokenForParagraph?.(R.paragraph)??t.drawingLayoutToken??(t.inlineDrawingLayout?"drawing":void 0),Te=s$1&&!pe?Re||ve?Rr({paragraph:R.paragraph,properties:R.props,width:ue,producer:x,...ve?{drawingToken:ve}:{},...Re?{exclusionToken:`${Be}|${Y.toFixed(3)}|${Re}`}:{},..._>0?{startOffset:_}:{}}):_===0?R.key:`${R.key}|from:${_}`:null,ke=Wo>1;return Ps(R.paragraph,ae,R.indent.left,ue,i,s$1,Te,R.inheritedRunProperties,R.tabStops,void 0,l?(rn,le)=>Ot(rn,le,l):void 0,{lineSpacing:R.lineSpacing,equationCacheToken:x,firstLineOffset:_===0?Ll(R):0,startOffset:_,marginExtent:{left:0,right:R.indent.left+ue+R.indent.right},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},bodyPageFields:true,displayMode:u,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},contentLeft:ke?Z:0,contentRight:ke?Z+L():R.indent.left+ue+R.indent.right,paragraphStartY:Y,...ee.length>0?{pageExclusionZones:ee}:{},...pe?{suppressEmptyPlaceholderLine:true}:{},...l?{themeFonts:l.themeFonts}:{},markRunProperties:R.markRunProperties})},df=(R,$)=>(t.drawingExclusionZonesByPage?.get(W.length)??Object.freeze([])).filter(ae=>{let he=Oe.get(R.paragraph.id),pe=Oe.get(ae.anchorParagraphId);if(he!==void 0&&pe!==void 0){if(pe>he)return false}else {let ue=fe.findIndex(Z=>Z.kind==="paragraph"&&Z.paragraph.id===ae.anchorParagraphId);if(ue<0||ue>$)return false}return !(Wo>1&&ae.columnIndex!==Be||ae.anchorParagraphId===R.paragraph.id&&ae.input.mode==="topAndBottom")}),cf=(R,$,_,ae,he,pe,ue)=>{let Z=df(R,$);if(!t.inlineDrawingLayout||ae<=he)return Z;let ge=qn(R.paragraph),ee=new Map,Re=0;for(let le=he;le<ae;le+=1){let _e=_[le];for(let Ae of ge.values())Ae>=_e.start&&Ae<_e.end&&ee.set(Ae,Re);let Le=ue.get(le)??_[le].exclusionSkipBefore??0;Re+=Le+_[le].height;}if(ee.size===0)return Z;let ve=Wo>1,Te=R.available,ke=Nr(),rn=gs({paragraph:R.paragraph,paragraphId:R.paragraph.id,drawingLayout:t.inlineDrawingLayout,contentLeft:ve?ke:0,contentRight:ve?ke+L():R.indent.left+Te+R.indent.right,paragraphStartY:pe,anchorLineTopByModelStart:ee,columnIndex:Be});return Object.freeze([...Z,...rn])},Vx=(R,$,_,ae,he,pe,ue,Z)=>{if(t.inlineDrawingLayout){let ve=[...qn(R.paragraph).values()];if(ve.length>0){let Te=Math.min(...ve);if(ue.end<=Te||ve.some(ke=>ke>=ue.start&&ke<ue.end)&&ue.end<=Te+1)return 0}}let ge=cf(R,$,_,ae,he,pe,Z),ee=ge.length>0?Ct(Y,ue.height,ge):0,Re=ue.exclusionSkipBefore??0;return ee>.001?ee:Re},Yx=R=>{let $=L(),_=Bo(R,$,0,l,u);if(!_||_.rows.length===0)return;let ae=_.columnWidthsPt.reduce((le,_e)=>le+_e,0),he=()=>_.float?bh(_.float,ae,S()):ln()+Ga(_,L()),pe=he();_.float&&_.float.vertAnchor==="text"&&!_.float.ySpec&&(Y=Math.max(0,Math.min(Y+_.float.yPt,Q())));let ue=[];for(let le of _.rows)if(le.isHeader)ue.push(le);else break;let Z=0,ge=Y,ee=[],Re=new Map,ve=[],Te=()=>{if(ee.length===0)return;let le=bu(ee,_,ve,Nt.borderOwnershipBudget,Nt.vMergeResolveBudget,void 0,(Le,Ae)=>{gc(U,Le,Ae);},Nt),_e=le[le.length-1];sn.push(tl({kind:"table",id:`${R.id}#f${Z}`,tableId:R.id,fragmentIndex:Z,rows:le,box:{x:pe,y:ge,width:_.columnWidthsPt.reduce((Le,Ae)=>Le+Ae,0),height:_e.box.y+_e.box.height-ge}},_.columnWidthsPt,0,Re)),Z+=1,ee=[],ve=[];},ke=le=>{if(ue.length===0)return;let _e=0;for(let Le of ue)_e+=yu(Le,_.columnWidthsPt,pe,0,Nt,_.cellSpacingPt);if(_e>Q()+.001)throw new zn("table-row-overheight",`Table header group (${ue.length} row(s)) is taller than the page content box`);Y+_e>Q()+.001&&Y>0&&(Te(),$o(),pe=he(),ge=Y);for(let Le of ue){let Ae=Za(Le,_.columnWidthsPt,pe,Y,le,0,Nt,_.cellSpacingPt);if(Ae.bottom>Q()+.001)throw new zn("table-row-overheight",`Table header row ${Le.id} overflowed the page content box`);ee.push(Ae.record),ve.push(Le),Y=Ae.bottom;}},rn=le=>{Te(),$o(),pe=he(),ge=Y,ke(true);};ke(false);for(let le of _.rows.slice(ue.length)){let _e=yu(le,_.columnWidthsPt,pe,0,Nt,_.cellSpacingPt),Le=mu(le),Ae=false,gt=0,Ve=false;for(_e<=Q()+.001&&Y+_e>Q()+.001&&Y>0&&(rn(),Ve=true);;){if(gt+=1,gt>ol)throw new zn("table-row-fragment-limit",`Table row ${le.id} exceeded ${ol} page fragments`);let Dt=Q()-Y;if(Dt<=.001&&Y>0){if(Ve)throw new zn("table-row-overheight",`Table row ${le.id} cannot fit after repeated header rows`);rn(),Ve=true;continue}if(!Ae&&_e<=Dt+.001){let ht=Za(le,_.columnWidthsPt,pe,Y,false,0,Nt,_.cellSpacingPt);if(ht.bottom>Q()+.001)throw new zn("table-row-overheight",`Table row ${le.id} overflowed the page content box after placement`);ee.push(ht.record),ve.push(le),Y=ht.bottom;break}if(le.cantSplit||le.height.rule==="exact"){if(Y>0&&!Ve){rn(),Ve=true;continue}throw new zn("table-row-overheight",le.height.rule==="exact"?`Table row ${le.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${le.id} has w:cantSplit and is taller than the available page content`)}let gn=hu(le,_.columnWidthsPt,pe,Y,Q(),false,Ae,0,Nt,Le,_.cellSpacingPt);if(!gn.fitted&&Y>0&&!Ve){rn(),Ve=true;continue}if(!gn.fitted)throw new zn(gn.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",gn.nestedSplitBlocked?`Table row ${le.id} contains a nested table taller than the page content box`:`Table row ${le.id} has content that cannot fit a page content box`);if(gn.bottom>Q()+.001)throw new zn("table-row-overheight",`Table row ${le.id} overflowed the page content box`);let lr=gn.remainder!==null,_t=py(le,Ae,lr);if(ee.push(gn.record),ve.push(_t),Y=gn.bottom,!lr)break;Le=gn.remainder,Ae=true,Ve=false,rn();}}Te();},At=false,Fl=fe.length,El=0;for(let R=wn;R<fe.length;R+=1){let $=we(e[R],L());if(He[R]=Bn(),$n&&Xn>0&&R>=fe.length-Xn){let ie=y.checkpoints[R+(y.keys.length-fe.length)];if(ie&&ie.cursorY===Y&&ie.previousSpaceAfter===Pe&&ie.flowColumnIndex===Be&&Kb(ie.pageFragments,sn)&&qu(ie.pendingAnchoredDrawings,U)&&qu(ie.deferredAnchoredDrawings,te)&&Zb(ie.anchorPageDeferCounts,se)){let de=W.length-ie.pageCount;if(Hy({delta:de,titlePage:w?.titlePage===true,evenAndOddHeaders:w?.evenAndOddHeaders===true,parityDependent:y.parityDependent,usedPageParity:V,markPageCount:ie.pageCount,hasNoteReserves:A!==void 0,hasExclusionZones:(t.drawingExclusionZonesByPage?.size??0)>0})){let Mn=de===0?bn.pages.slice(ie.pageCount):bn.pages.slice(ie.pageCount).map((xn,nt)=>Qa(xn,W.length+nt,Ln(W.length+nt).y));W.push(...Mn),xe+=Mn.length,At=true,Fl=R,El=de,Ne+=y.endLineCounter-ie.lineCounter;break}}}if(We+=1,$.kind==="table"){Pe=0,J=[];try{Yx($.table),Gm($.table,J);}finally{J=null;}continue}let{paragraph:_,props:ae,spacing:he,contextualSpacing:pe,styleId:ue,borders:Z,shading:ge,keeps:ee}=$,{indent:Re,alignment:ve,markRunProperties:Te}=$,ke=$.available,rn=R>0?fe[R-1]:void 0,le=fe[R+1],_e=ie=>ie?.kind==="paragraph"&&ie.styleId===ue&&ue!==null,Le=pe?{before:_e(rn)?0:he.before,after:_e(le)?0:he.after}:he,Ae=d?.get(_.id)??$.listItem,gt=Ll($),Ve=_.id,Dt=$.borderGroupKey,gn=ie=>Dt!==""&&ie?.kind==="paragraph"&&ie.borderGroupKey===Dt,lr=gn(rn),_t=gn(le),ht=lr?void 0:Z.top,Dr=_t?Z.between:Z.bottom,dr=Xt(ht),yf=Xt(Dr);Cd(ae)&&(sn.length>0||W.length===0)&&(Ar(),Pe=0);let qe=Ml($,R);if(qe.length===0)continue;let Ux=fl(_)!==void 0&&Xx($,qe),bf=()=>Ux&&H===void 0&&On+1>=a.count,Nl=ie=>{let de=we(_,L());de.kind==="paragraph"&&(Re=de.indent,ve=de.alignment,ke=de.available,Te=de.markRunProperties,gt=ie===0?Ll(de):0,qe=[...Ml(de,R,ie)]);};{let ie=ro(Le.before,Pe),de=Te.length===0?dt:Ee(Te,l?.themeFonts),hn=qe.length<=1?yf+Le.after:0,Mn=Y+ie+dr,xn=cf($,R,qe,0,0,Mn,new Map),nt=qe[0]?Sg(Mn,qe[0],xn,hn):i.lineMetrics(de).height+hn,zt=ie+dr+nt;if(ee.keepNext&&!Gn[R-1]){let Ze=Lg(fe,R,Pe,yt=>{let tt=fe[yt];return tt?.kind==="paragraph"?Ml(tt,yt).map(Vn=>Vn.height):[]});Ze!==null&&Ze+dr<=Q()&&(zt=Math.max(zt,Ze+dr));}Y+zt>Q()&&Y>0&&!bf()&&($o(),Pe=0,Nl(0));}let qx=Y===0&&!z(),Al=Ed(Le.before,Pe,qx,ze);Al>0&&(Y+=Al),dr>0&&(Y+=dr),ze=false;let cr=0,Me=[],xf=qe[0]?.start??0,_r=Al,ur=dr,Dl=false,Xo=Y,Sf=0,di=new Map;Pe=0;let Rf=t.inlineDrawingLayout!==void 0&&Hn($.paragraph,t.inlineDrawingLayout).length>0,wf=false,_l=null,Zx=go($.paragraph),Pf=ks($.paragraph),If=Pf?Ws(Pf):null,Jx=()=>{let ie=Me[0];if(!ie)return 0;let de=Sf;if(de<=.001)return 0;let hn=Ct(Xo,ie.box.height,df($,R));return Math.max(0,de-hn)},ci=ie=>{if(Me.length===0)return;let de=ln(),hn=Nr(),Mn=Me[0].box.y,xn=Mn-_r-ur,nt=Me[Me.length-1].box.y+Me[Me.length-1].box.height,zt=ie?Le.after:0,Ze=[],yt,tt=Mn,Vn=nt,jt=Z.left?In(Z.left):0,Yo=Z.right?In(Z.right):0,Hr=Z.left?de+Re.left-Z.left.spacePt-jt:de+Re.left,zl=Z.right?de+Re.left+ke+Z.right.spacePt+Yo:de+Re.left+ke,zr=Math.max(zl-Hr,0);if(ur>0&&ht){let dn=In(ht),rt=Mn-ht.spacePt-dn;Ze.push({side:"top",edge:ht,box:{x:Hr,y:rt,width:zr,height:dn}}),tt=rt;}if(ie&&Dr){let dn=In(Dr),rt=nt+Dr.spacePt,Gt={x:Hr,y:rt,width:zr,height:dn};Ze.push({side:_t?"between":"bottom",edge:Dr,box:Gt}),_t||(yt={edge:Dr,box:Gt}),Vn=rt+dn;}ie&&(Y=Math.max(Y,Vn+zt));let jr=Math.max(Vn+zt-xn,0),Ce=lr&&cr===0?xn:tt,bt=_t&&ie?xn+jr:Vn,Gr=Math.max(bt-Ce,0);if(Z.left&&Ze.push({side:"left",edge:Z.left,box:{x:de+Re.left-Z.left.spacePt-jt,y:Ce,width:jt,height:Gr}}),Z.right&&Ze.push({side:"right",edge:Z.right,box:{x:de+Re.left+ke+Z.right.spacePt,y:Ce,width:Yo,height:Gr}}),Z.bar){let dn=In(Z.bar);Ze.push({side:"bar",edge:Z.bar,box:{x:de+Re.left-Z.bar.spacePt-dn,y:Mn,width:dn,height:Math.max(nt-Mn,0)}});}let Wr=If?$s(Me,If):null,$r=cr===0?Us(Ae,i,Me[0]?{y:Me[0].box.y,height:Me[0].box.height}:void 0):void 0,ui=$r?{...$r,box:{...$r.box,x:$r.box.x+de}}:void 0;if(sn.push({kind:"paragraph",id:`${Ve}#f${cr}`,paragraphId:Ve,fragmentIndex:cr,range:Wr?Wr[Wr.length-1].range:{paragraphId:Ve,start:xf,end:Me[Me.length-1].range.end},props:ae,spacing:{before:_r,after:zt},indent:Re,...yt?{bottomBorder:yt}:{},...Ze.length>0?{borders:Ze}:{},...ge===void 0?{}:{shading:ge,shadingBox:Z.left||Z.right?{x:Hr,y:tt,width:zr,height:Math.max(Vn-tt,0)}:ma(Me,de+Re.left,ke)},tabStops:$.tabStops,...ui?{marker:ui}:{},...ie&&f?os(Zx,ka($.paragraph)):{},lines:Wr??Me,box:{x:hn+Re.left,y:xn,width:ke,height:jr}}),t.inlineDrawingLayout&&Rf&&!wf){wf=true;let dn=[...qn($.paragraph).values()],rt=dn.length>0&&dn.every(Fn=>Me.some(fr=>Fn>=fr.range.start&&Fn<fr.range.end)),Gt,fi,jl;if(rt){let Fn=xn-Jx();Gt=Me,fi={x:hn+Re.left,y:Fn,width:ke,height:jr},jl=Cl({x:hn+Re.left,y:Fn,height:jr});}else {let Fn=_l??{columnX:hn,columnWidth:L(),startY:xn},fr=Fn.startY;Gt=qe.map((Yn,Qx)=>{let eS={id:`anchor-line-${Qx}`,range:{paragraphId:Ve,start:Yn.start,end:Yn.end},box:{x:Fn.columnX+Re.left,y:fr,width:ke,height:Yn.height},contentX:Yn.spans.length>0?Yn.spans[0].box.x+Fn.columnX:Fn.columnX+Re.left,baseline:Yn.baseline,leading:Yn.leading,trailingSpacing:Yn.trailingSpacing,spans:Yn.spans.map(Gl=>({...Gl,box:{...Gl.box,x:Gl.box.x+Fn.columnX,y:fr}}))};return fr+=Yn.height+(Yn.exclusionSkipBefore??0),eS});let vf=Fn.startY;fi={x:Fn.columnX+Re.left,y:vf,width:ke,height:Math.max(fr-vf,Me[0]?.box.height??0)},jl=Cl(fi);}li(wo({paragraph:$.paragraph,paragraphId:Ve,paragraphBox:fi,lines:Gt,drawingLayout:t.inlineDrawingLayout,frameBase:Ol(),columnBox:jl,cellBox:null,pageClip:af(),measurer:i,sourceOrderOf:Bl,layoutTextboxStory:lf}));}cr+=1,xf=Me[Me.length-1].range.end,Me=[],_r=0,ur=0;},Ht=0,Hl=0,Vo=qe.length+8;for(let ie=0;ie<qe.length;ie+=1){let de=qe[ie],hn=ie===qe.length-1,Mn=hn?yf+Le.after:0;ie===Ht&&(Xo=Y,Rf&&_l===null&&cr===0&&(_l=Object.freeze({columnX:Nr(),columnWidth:L(),startY:Xo})));let xn=Vx($,R,qe,ie,Ht,Xo,de,di),nt=xn+Math.max(0,de.height-de.trailingSpacing)+Mn;if(Y+nt>Q()&&!bf()&&(Me.length>0||sn.length>0||W.length>0)){let Ce=!z(),bt=Hl<Vo?Bg(ie,Ht,qe.length,ee,Ce):ie,Gr=bt<ie;for(let dn=ie;dn>bt;dn-=1){Me.pop();let rt=qe[dn-1],Gt=di.get(dn-1)??rt.exclusionSkipBefore??0;di.delete(dn-1),Y-=rt.height+Gt,Ne-=1;}let Wr=Gr&&Me.length===0&&cr===0,$r=qe[bt].start,ui=L();if(ci(false),$o(),_r=0,Wr?Y=ur:ur=0,L()!==ui){Nl($r),Vo=Math.max(Vo,qe.length+8),Ht=0,Gr&&(Hl+=1),ie=-1;continue}if(Ht=bt,Xo=Y,Gr){Hl+=1,ie=bt-1;continue}}let Ze=Nr();di.set(ie,xn),Y+=xn;let yt=Ze+Re.left+(ie===0?gt:0),tt=Math.max(1,ke-(ie===0?gt:0)),Vn=de.spans.map(Ce=>({...Ce,range:{...Ce.range,paragraphId:Ve},box:{...Ce.box,x:Ce.box.x+Ze,y:Y}})),jt=Rs(Vn,i,yt,tt,ve,hn,ve==="center"||ve==="right"?de.width:void 0),Yo=Vn.length>0&&jt.length>0?jt[0].box.x-Vn[0].box.x:ve!=="left"&&ve!=="both"?(()=>{let Ce=tt-de.width;return Ce<=0?0:ve==="center"?Ce/2:Ce})():0,Hr=Object.freeze({x:0,y:0,width:I,height:Q()}),zl=de.drawings.map(Ce=>{let bt=Object.freeze({...Ce,paragraphId:Ve,x:Ze+Ce.x,y:Y+Ce.y,advanceStart:Ce.advanceStart+Ze,advanceEnd:Ce.advanceEnd+Ze,paintBounds:Object.freeze({...Ce.paintBounds,x:Ze+Ce.paintBounds.x,y:Y+Ce.paintBounds.y}),hitBounds:Object.freeze({...Ce.hitBounds,x:Ze+Ce.hitBounds.x,y:Y+Ce.hitBounds.y})});return ms(bt,Hr)}),zr=ws(zl,Yo),jr={id:ix(_.id,de.start,ie),range:{paragraphId:Ve,start:de.start,end:de.end},spans:jt,box:{x:Nr()+Re.left,y:Y,width:ke,height:de.height},contentX:jt[0]?.box.x??yt+Yo,baseline:de.baseline,leading:de.leading,trailingSpacing:de.trailingSpacing,...de.deletedRanges?{deletedRanges:de.deletedRanges}:{},...zr.length>0?{drawings:zr}:{}};if(Ne+=1,Me.length===0&&(Sf=xn),Me.push(jr),Y+=de.height,de.columnBreakAfter){let Ce=L();if(ci(hn),$o(),_r=0,ur=0,Dl=true,!hn&&L()!==Ce){Nl(de.end),Vo=Math.max(Vo,qe.length+8),Ht=0,ie=-1;continue}Ht=ie+1;}else de.pageBreakAfter&&(ci(hn),Ar(),_r=0,ur=0,Dl=true,Ht=ie+1);}ci(true),Pe=Dl?0:Le.after;}At||(He[fe.length]=Bn());let uf=At&&y?y.endCursorY:Y,ff=At&&y?y.endSpaceAfter:Pe,pf=!At&&(sn.length>0||W.length===0),mf=At&&y?y.endsOpenPage:pf;pf&&Ar();let gf=0,Kx=bc*4+8;for(;(U.length>0||te.length>0)&&gf<Kx;)gf+=1,U.length===0&&sf(),Ar();te.length>0&&(U.push(...te.map(R=>Pc(R,"page-defer-exhausted"))),te=[],Ar()),pn();let hf={revision:n,pages:W};if(y){y.previous=hf,y.checkpoints=At?[...He.slice(0,Fl),...y.checkpoints.slice(Fl+(y.keys.length-fe.length)).map($=>El===0?$:{...$,pageCount:$.pageCount+El})]:He,y.keys=yn,y.context=W.length+1===T?G:q(Ku(A,E,W.length+1)),y.producer=x;let R=V||w?.evenAndOddHeaders===true;y.parityDependent=wn===0&&!At?R:y.parityDependent||R,y.startPageParity=X,y.startLineCounter=ne,y.endLineCounter=Ne,y.endCursorY=uf,y.endSpaceAfter=ff,y.endsOpenPage=mf,y.stats={placed:We,total:fe.length,reusedPages:xe,fullPasses:y.stats.fullPasses+(wn===0?1:0)};}return {layout:hf,pages:W,lineCounter:Ne,endCursorY:uf,endSpaceAfter:ff,endsOpenPage:mf}}function sx(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 YT=.25,KT=20;function jo(e,n,t){let r=Au(t.sectionColumns??et.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),Er(e,n,t);let o=t.session,a=t.flowStartY??0,{session:i,...s}=t,l=b=>{let h=b.pages[0],x=h?Math.max(...sx(h,r,a)):b.endCursorY;return o&&(o.endCursorY=x),{...b,endCursorY:x}};if(o&&o.balanceLimit!==null){let b=o.balanceLimit,h=Er(e,n,{...t,columnRegionBottom:b});if(o.stats.placed===0&&o.stats.reusedPages===h.pages.length)return o.balanceLimit=b,l(h)}let d=Er(e,n,s);if(d.pages.length!==1||!d.endsOpenPage)return o&&(o.balanceLimit=null),Er(e,n,t);let c=sx(d.pages[0],r,a),u=c.reduce((b,h)=>b+Math.max(0,h-a),0);if(u<=0)return o&&(o.balanceLimit=null),Er(e,n,t);let f=a+u/r.count,p=Math.max(...c)+.01,m=b=>{try{let h=Er(e,n,{...s,columnRegionBottom:b});return h.pages.length===1&&h.endsOpenPage}catch{return false}};for(let b=0;b<KT&&p-f>YT;b+=1){let h=(f+p)/2;m(h)?p=h:f=h;}let g=Er(e,n,{...t,columnRegionBottom:p});return o&&(o.balanceLimit=p),l(g)}var ux="Calibri, Carlito, Helvetica, Arial, sans-serif",KE=new Map([["calibri","Carlito"]]),UT=65536,qT=256;function lx(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 dx(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 cx=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function fx(e=null){return e!=null&&typeof e.measureText=="function"}function px(e={}){let n=e.scale??1;if(!(n>0)||!Number.isFinite(n))return null;let t=e.fallbackFamily??ux,r=e.context??null;if(!fx(r))return null;let o=r,a=dx(lx(e.maxWidthEntries,UT)),i=dx(lx(e.maxMetricsEntries,qT)),s=e.fontAlias,l=c=>{let u=c.fontFamily&&cx.test(c.fontFamily)?c.fontFamily:null,f=u?s?.(u):void 0,p=f&&cx.test(f)?f:null,m=u?p?`"${p}", "${u}", ${t}`:`"${u}", ${t}`:t,g=c.bold?"bold":"normal",b=c.italic?"italic":"normal",h=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*n;return `${b} ${g} ${h}px ${m}`},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=l(u),p=`${f}\0${c}`,m=a.get(p);if(m!==void 0)return d(m,c,u);o.font=f;let g=o.measureText(c).width;return a.set(p,g),d(g,c,u)},lineMetrics(c){let u=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75),f=l(c),p=i.get(f);if(p)return p;let m=u*1.15,g=u*.8;o.font=f;let b=o.measureText("Hxg"),h=b.fontBoundingBoxAscent,x=b.fontBoundingBoxDescent;if(typeof h=="number"&&Number.isFinite(h)&&h>0&&(g=h/n,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let w=(h+x)/n;w>0&&(m=w);}m>0||(m=u*1.15);let I={height:m,baseline:g};return i.set(f,I),I}}}function ZT(e=1,n={}){let t=px({...n,scale:n.scale??e});return t?{measurer:t,producer:n.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:wl(),producer:"fixed-measurer"}}function JT(e){return e.box}function mx(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)mx(o,n);}function QT(e){let n=new Map,t=(o,a,i)=>{if(!(o.kind==="textValue"||i>me*4)){for(let s of o.children)if(s.kind!=="textValue"){if(s.kind==="paragraph"){for(let l of r)n.get(l)?.push(s.id);t(s,s.id,i+1);continue}if(s.kind==="contentControl"){n.set(s.id,[]),r.push(s.id);let l=we(s);l&&t(l,a,i+1),r.pop();let d=n.get(s.id);d&&d.length===0&&a!==null&&d.push(a);continue}t(s,a,i+1);}}},r=[];return t(e,null,0),n}function ek(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 nk(e,n){let t=Ae(e.root);if(t.length===0)return tk;let r=new Map;n.pages.forEach((i,s)=>{(d=>{for(let c of d){let u=new Set;mx(c,u);for(let f of u){let p=r.get(f)??[];p.push({pageIndex:s,box:JT(c)}),r.set(f,p);}}})(i.fragments);});let o=QT(e.root),a=[];for(let i of t){let s=ye$1(i.node),l=[...i.ancestors.map(f=>ye$1(f).lock),s.lock],d=o.get(i.node.id)??[],c=new Map;for(let f of d)for(let p of r.get(f)??[]){let m=c.get(p.pageIndex);c.set(p.pageIndex,m?ek(m,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:s.type,level:ze(i.node),depth:i.depth,lock:s.lock,effectiveLock:De$1(l),showingPlaceholder:s.showingPlaceholder,temporary:s.temporary,...s.tag===void 0?{}:{tag:s.tag},...s.alias===void 0?{}:{alias:s.alias},...s.id===void 0?{}:{id:s.id},...s.dataBinding===void 0?{}:{dataBinding:s.dataBinding},paragraphIds:d,fragments:u});}return a}var tk=Object.freeze([]);function hx(e,n,t){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return t<o.range.end;let i=a.filter(s=>s.range.paragraphId===n);return i.length===a.length?t<o.range.end:i.length>0&&t<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function pk(e,n){let t=new Map;for(let r of e.pages)for(let[o,a]of mk(r,n))t.has(o)||t.set(o,a);return t}var gx=new WeakMap;function mk(e,n){let t=gx.get(n);t||(t=new WeakMap,gx.set(n,t));let r=t.get(e);if(r)return r;let o=new Map;for(let a of n(e)){let i=new Set([a.paragraphId]);for(let s of a.lines??[])for(let l of s.spans??[])i.add(l.range.paragraphId);for(let s of i)o.has(s)||o.set(s,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return t.set(e,o),o}function gk(e,n){let t=yg$1(e);if(!t)return null;let r=n.get(t.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+hx(r,t.start.paragraphId,t.start.offset)}:null}var yx=e=>e.verticalAlign==="baseline"?1:.75;function Qu(e){let n=Math.round(e.fontSizePt*2);return Math.max(1,n)}function hk(e){let{shaper:n,resolveFont:t,fallback:r,shapingLibrary:o,unicodeDataVersion:a,fixedPointScale:i=1e3,script:s="Latn",language:l="en"}=e,d=new WeakMap,c=new WeakMap,u=new WeakMap,f=g=>{let b=u.get(g);if(b!==void 0)return b;let h=t(g);return u.set(g,h),h},p=(g,b)=>{let h=d.get(g);h||(h=new Map,d.set(g,h));let x=h.get(b);return x||(x=new Map,h.set(b,x)),x},m=(g,b,h)=>n.shape({text:g,fontSizeHalfPoints:Qu(h),bidiLevel:0,environment:mr({font:b,variationAxes:{},shapingLibrary:o,unicodeDataVersion:a,normalization:"none",script:s,language:l,direction:"ltr",features:{},fallbackOrder:[],fixedPointScale:i,roundingMode:"halfToEven"})});return {measure(g,b){if(g.length===0)return 0;let h=f(b);if(!h)return r.measure(g,b);let x=p(h,Qu(b)),I=x.get(g);if(I===void 0){let w=0;try{for(let C of m(g,h,b).glyphs)w+=C.advanceX;}catch{return r.measure(g,b)}I=w/i,x.set(g,I);}return I*yx(b)*(b.horizontalScalePercent/100)+g.length*b.characterSpacingPt},lineMetrics(g){let b=f(g);if(!b)return r.lineMetrics(g);let h=yx(g),x=c.get(b);x||(x=new Map,c.set(b,x));let I=Qu(g),w=x.get(I);if(w)return h===1?w:{height:w.height*h,baseline:w.baseline*h};let C,M=true;try{let P=m(" ",b,g),B=P.metrics.ascent/i,O=P.metrics.descent/i,k=B+O;k>0?C={height:k,baseline:B}:(C=r.lineMetrics(g),M=!1);}catch{C=r.lineMetrics(g),M=false;}return M?(x.set(I,C),h===1?C:{height:C.height*h,baseline:C.baseline*h}):C}}}function yk(e){let{layout:n,viewport:t}=e,r=new Set;if(!t){for(let l of n.pages)r.add(l.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=t.top+t.height,i=-1,s=-1;for(let l of n.pages){let d=l.box.y;d+l.box.height>=t.top&&d<=a&&(i===-1&&(i=l.index),s=l.index);}if(i===-1){let l=bk(n,t.top);l!==null&&(i=l,s=l);}if(i!==-1){let l=Math.max(0,i-o),d=Math.min(n.pages.length-1,s+o);for(let c=l;c<=d;c+=1)r.add(c);}for(let l of e.pinnedPages??[])l>=0&&l<n.pages.length&&r.add(l);return r}function bk(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 bx=["text-local","paragraph-local","flow-structural","global"];function xx(e,n){return bx.indexOf(n)>bx.indexOf(e)?n:e}function xk(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function Sk(e){let{run:n,currentRevision:t,publish:r,schedule:o}=e,a=null,i=null,s=null,l=0,d=0;function c(b){let h=e.runCooperatively;if(!h)return n(b);let x=h(b);s=x;try{for(;;){let I=x.step();if(I)return I;if(t()!==b.revision)return x.cancel(),d+=1,null;if(s!==x)return null}}finally{s===x&&(s=null);}}function u(b){let h=p(t());h.impact=xx(h.impact,b.impact),h.structural=h.structural||b.structural;for(let x of b.paragraphIds)h.paragraphIds.add(x);for(let x of b.created)h.created.add(x);for(let x of b.deleted)h.deleted.add(x);for(let x of b.dependencyKeys)h.dependencyKeys.add(x);}let f=b=>({impact:b.impact,paragraphIds:b.paragraphIds,created:b.created,deleted:b.deleted,dependencyKeys:b.dependencyKeys,structural:b.structural,revision:b.revision});function p(b){return a||(a=xk(b)),a.revision=Math.max(a.revision,b),a}function m(){!o||i||(i=o(()=>{i=null,g();}));}function g(){i&&(i(),i=null),s&&(s.cancel(),s=null,d+=1);let b=a;if(!b)return false;a=null;let h=f(b),x=c(h);return !x||x.revision!==t()?(l+=1,u(h),m(),false):(r(x,h),true)}return {notify(b){let h=p(t());h.impact=xx(h.impact,b.impact);for(let x of b.dirty)h.paragraphIds.add(x);for(let x of b.created)h.created.add(x),h.paragraphIds.add(x);for(let x of b.deleted)h.deleted.add(x),h.paragraphIds.add(x);for(let x of b.dependencyKeys)h.dependencyKeys.add(x);for(let x of b.splitJoin)h.structural=true,"split"in x?(h.paragraphIds.add(x.split.from),h.paragraphIds.add(x.split.tail)):(h.paragraphIds.add(x.join.kept),h.paragraphIds.add(x.join.removed));(b.impact==="flow-structural"||b.impact==="global")&&(h.structural=true),m();},invalidateAll(b,h){let x=p(b);x.impact="flow-structural",x.structural=true,h&&x.dependencyKeys.add(h),m();},flush:g,pending:()=>a?f(a):null,cancel(){i?.(),i=null,s?.cancel(),s=null,a=null;},get staleDiscards(){return l},get cancelledRuns(){return d}}}function rr(e,n,t,r){let o=r?r.spans:e.spans;for(let i of r?r.drawings:e.drawings??[]){if(n===i.start)return i.advanceStart;if(n===i.start+1)return i.advanceEnd}let a=r?r.spans[0]?.box.x??e.contentX:e.contentX;for(let i of o){if(n<=i.range.start)return i.box.x;if(n>=i.range.end){a=i.box.x+i.box.width;continue}return nl(i,n,t)}return a}function wx(e,n,t){return Px(e,n,t,true)}function mN(e,n,t){return Px(e,n,t,false)}var Sx=new WeakMap,Rx=new WeakMap;function Rk(e){let n=Sx.get(e);if(n)return n;let t=new Map;for(let r of e.pages)for(let o of je(r))for(let a of o.lines)for(let i of an(a)){let s=t.get(i.paragraphId);(!s||i.end>s.end||i.end===s.end&&i.start>s.start)&&t.set(i.paragraphId,{end:i.end,start:i.start});}return Sx.set(e,t),t}function wk(e){let n=Rx.get(e);if(n)return n;let t=new Map(e.map((r,o)=>[r,o]));return Rx.set(e,t),t}function Pk(e){return Math.max(3,Math.min(8,e*.25))}function Px(e,n,t,r){let o=ef(n,t);if(!o)return [];let a=wk(t),i=a.get(o.from.paragraphId),s=a.get(o.to.paragraphId),l=Rk(e),d=[];for(let c of e.pages)for(let u of je(c))for(let f of u.lines){let p=an(f);for(let[m,g]of p.entries()){let b=Fo(e,g,o.from,o.to),h=a.get(g.paragraphId),x=l.get(g.paragraphId),I=i!==void 0&&s!==void 0&&h!==void 0&&h>=i&&h<s&&x?.end===g.end&&x.start===g.start&&m===p.length-1;if((!r||!b)&&!I)continue;let w=r&&b?rr(f,b.start,void 0,g):null,C=r&&b?rr(f,b.end,void 0,g):null,M=I?rr(f,g.end,void 0,g):null,P=M!==null?M+Pk(Math.max(0,f.box.height-f.leading-(f.trailingSpacing??0))):null,B=[w,C,M,P].filter(D=>D!==null),O=Math.min(...B),k=Math.max(...B);d.push({pageIndex:c.index,x:O,y:f.box.y,width:k-O,height:f.box.height});}}return d}function Ix(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 je(o))for(let i of a.lines)for(let s of an(i))for(let l of n){let d=Fo(e,s,l.from,l.to);if(!d)continue;let c=rr(i,d.start,void 0,s),u=rr(i,d.end,void 0,s),f=r.get(l.key)??[];f.push({pageIndex:o.index,x:Math.min(c,u),y:i.box.y,width:Math.abs(u-c),height:i.box.height}),r.set(l.key,f);}return r}function nf(e){let n=new Map;for(let t=0;t<e.length;t+=1){let r=e[t].position,o=n.get(r.paragraphId);o||(o=new Map,n.set(r.paragraphId,o)),o.has(r.offset)||o.set(r.offset,t);}return {stops:e,index:n}}var Pl=class{#n=new WeakMap;#s=new WeakMap;get(n,t,r,o){let a;if(!r)a=this.#n.get(n)??new Map,this.#n.has(n)||this.#n.set(n,a);else {let l=this.#s.get(n);l||(l=new WeakMap,this.#s.set(n,l)),a=l.get(r)??new Map,l.has(r)||l.set(r,a);}let i=a.get(t);if(i)return i;let s=o();return a.set(t,s),s}};function vx(e){let n=[],t=new Set;for(let r of e)t.has(r.lineId)||(t.add(r.lineId),n.push(r.lineId));return n}function Tx(e,n,t){let r=null;for(let o of e)o.lineId===n&&(!r||Math.abs(o.x-t)<Math.abs(r.x-t))&&(r=o);return r}function ai(e,n){let t=null;for(let r of e)r.position.paragraphId===n.paragraphId&&(!t||Math.abs(r.position.offset-n.offset)<Math.abs(t.position.offset-n.offset))&&(t=r);return t}function tf(e,n,t){let r=null;for(let o of e){if(o.position.paragraphId!==n.paragraphId)continue;let a=o.position.offset;t===1?a>n.offset&&(!r||a<r.position.offset)&&(r=o):a<n.offset&&(!r||a>r.position.offset)&&(r=o);}return r}function kx(e,n,t){let r=t.index.get(e.paragraphId)?.get(e.offset),o=r===void 0?ai(t.stops,e):t.stops[r];if(!o)return null;let a=o.lineId,i=t.stops.filter(s=>s.lineId===a);return (n===-1?i[0]:i[i.length-1])?.position??null}function Cx(e,n,t,r,o){let a=o(e.paragraphId),i=a.index.get(e.paragraphId)?.get(e.offset);if(i===void 0){let c=tf(a.stops,e,n);if(c)return {position:c.position,desiredX:null}}else {let c=i+n;if(c>=0&&c<a.stops.length)return {position:a.stops[c].position,desiredX:null}}let s=t[r+n];if(!s)return {position:e,desiredX:null};let l=o(s).stops,d=n===-1?l[l.length-1]:l[0];return d?{position:d.position,desiredX:null}:null}function Ox(e,n,t){let r=e===-1?n[0]:n[n.length-1];if(!r)return null;let o=t(r).stops;return (e===-1?o[0]:o[o.length-1])?.position??null}function Bx(e,n,t,r,o,a){let i=a(e.paragraphId),s=i.index.get(e.paragraphId)?.get(e.offset),l=s===void 0?ai(i.stops,e):i.stops[s];if(!l)return null;let d=t??l.x,c=vx(i.stops),u=c.indexOf(l.lineId),f=c[u+n];if(f){let m=Tx(i.stops,f,d);return m?{position:m.position,desiredX:d}:null}for(let m=o+n;m>=0&&m<r.length;m+=n){let g=a(r[m]),b=vx(g.stops),h=n===-1?b[b.length-1]:b[0];if(!h)continue;let x=Tx(g.stops,h,d);if(x)return {position:x.position,desiredX:d}}let p=n===-1?i.stops[0]:i.stops[i.stops.length-1];return p?{position:p.position,desiredX:d}:null}var Lx=new WeakMap,Mx=new WeakMap;function jn(e){let n=Lx.get(e);if(n)return n;let t=new Map;for(let r of e.pages)for(let[o,a]of Ik(r)){let i=t.get(o);i?i.push(...a):t.set(o,[...a]);}return Lx.set(e,t),t}function Ik(e){let n=Mx.get(e);if(n)return n;let t=new Map,r=(a,i)=>{for(let s of an(a)){let l={line:a,pageIndex:i},d=t.get(s.paragraphId);d?d.push(l):t.set(s.paragraphId,[l]);}},o=(a,i)=>{let s=l=>{for(let d of l){if(d.kind==="paragraph"){for(let c of d.lines)r(c,i);continue}for(let c of d.rows)if(!c.isHeaderRepeat)for(let u of c.cells)s(u.blocks);}};s(a);};for(let a of je(e))for(let i of a.lines)r(i,e.index);e.header&&o(e.header.fragments,e.index),e.footer&&o(e.footer.fragments,e.index);for(let a of [e.footnotes,e.endnotes])if(a)for(let i of a.notes)o(i.fragments,e.index);return Mx.set(e,t),t}function SN(e,n,t){let r=jn(e).get(n);if(r&&r.length>0){let o=sa(e,n,t,r.map(a=>a.line));if(o)return o}return sa(e,n,t)}var Fx=new WeakMap;function rf(e,n){let t=Fx.get(e);t||(t=new Map,Fx.set(e,t));let r=t.get(n);if(r)return r;let o=[];for(let{line:i}of jn(e).get(n)??[])if(i.range.paragraphId===n)for(let s of i.deletedRanges??[])o.push({start:s.start,end:s.end});o.sort((i,s)=>i.start-s.start);let a=[];for(let i of o){let s=a[a.length-1];s&&i.start<=s.end?s.end=Math.max(s.end,i.end):a.push(i);}return t.set(n,a),a}function Ex(e,n){for(let t of e)if(n>t.start&&n<t.end)return true;return false}function Nx(e,n){for(let t of rf(e,n.paragraphId))if(n.offset>t.start&&n.offset<t.end)return {paragraphId:n.paragraphId,offset:t.end};return n}var vk=/[\p{L}\p{N}_'\u2019]/u;function ii(e,n,t){let r=a=>{let i=e[a];return i!==void 0&&vk.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 Tk(e,n,t){let r=jn(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 kk(e,n,t){for(let{line:r}of jn(e).get(n)??[])if(r.range.start===t&&r.drawings?.some(o=>o.start===t))return r;return null}function Ck(e,n,t){for(let r of t?t.spans:e.spans)if(!(n<=r.range.start||n>=r.range.end)&&(r.projected||r.text.length!==r.range.end-r.range.start))return true;return false}function _x(e){let n=e.spans[e.spans.length-1]?.text;return n===`
16
+ `||n===Ub$1}function Tl(e,n,t,r,o,a,i){for(let s of an(t))i!==void 0&&s.paragraphId!==i||Ok(e,n,t,s,r,o,a);}function Ok(e,n,t,r,o,a,i){let s=an(t).length>1,l=rf(n,r.paragraphId),d=c=>r.spans.some(u=>u.range.start<=c&&c<=u.range.end);for(let c=r.start;c<=r.end;c+=1)if(!(c===r.end&&c>r.start&&!s&&_x(t)&&Tk(n,t,c))){if(c===r.start&&c>a&&e.length>0){let u=e[e.length-1];if(u.position.paragraphId===r.paragraphId&&u.position.offset===c)continue}Ck(t,c,r)||Ex(l,c)&&!d(c)||e.push({position:{paragraphId:r.paragraphId,offset:c},x:rr(t,c,i,r),y:t.box.y,height:t.box.height,lineId:t.id,pageIndex:o});}}function Hx(e,n,t,r,o){for(let a of n){if(a.kind==="paragraph"){for(let i of a.lines)Tl(r,e,i,t,a.range.start,o);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)Hx(e,s.blocks,t,r,o);}}var Bk=new Pl;function zx(e,n){let t=[];for(let r of e.pages)for(let o of je(r))for(let a of o.lines)Tl(t,e,a,r.index,o.range.start,n);return t}function Lk(e,n,t){let o=(jn(e).get(n.paragraphId)??[]).find(({line:i})=>{let s=Ft(i,n.paragraphId);return s!==null&&n.offset>=s.start&&n.offset<=s.end});if(!o||an(o.line).length<2)return null;let a=[];return Tl(a,e,o.line,o.pageIndex,0,t),nf(a)}function Il(e,n,t){return Bk.get(e,n,t,()=>{let r=[];for(let{line:o,pageIndex:a}of jn(e).get(n)??[])Tl(r,e,o,a,0,t,n);return nf(r)})}function Mk(e,n,t,r){if(!e.pages[n])return [];let o=[];return Hx(e,t,n,o,r),o}function Fk(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function Ek(e,n,t){let r=e.pages[n];if(!r)return [];let o=[];for(let a of je(r,true))if(a.paragraphId===t)for(let i of a.lines)o.push({line:i,pageIndex:n});return o}function jx(e,n,t){let r=Fk(t),o=jn(e).get(n.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?[]:Ek(e,a,n.paragraphId),s=new Set(o.map(f=>f.line.id)),l=i.filter(f=>!s.has(f.line.id)),d=l.length>0?[...o,...l]:o,c=a===void 0?d:[...d].sort((f,p)=>{let m=f.pageIndex===a?0:1,g=p.pageIndex===a?0:1;return m-g}),u=null;for(let{line:f,pageIndex:p}of c){let m=Ft(f,n.paragraphId);if(!m||n.offset<m.start||n.offset>m.end)continue;if(n.offset===m.end&&n.offset>m.start&&an(f).length===1&&_x(f)){u??={line:f,pageIndex:p};continue}if(n.offset===m.end&&n.offset>m.start&&kk(e,n.paragraphId,n.offset))continue;let g=Ua(f,n.offset,r.measurer,m);return {position:n,x:g.x,y:g.y,height:g.height,lineId:f.id,pageIndex:p}}if(u){let f=Ua(u.line,n.offset,r.measurer,Ft(u.line,n.paragraphId));return {position:n,x:f.x,y:f.y,height:f.height,lineId:u.line.id,pageIndex:u.pageIndex}}return null}function Nk(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return Js(e,t,n)?.caret??null}function Ak(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return el(e,t,n)}function Dk(e){return Mi(e)}var Ax=new WeakMap;function vl(e,n){let t=Ax.get(e);return t||(t=new Map,e.forEach((r,o)=>{t.has(r)||t.set(r,o);}),Ax.set(e,t)),t.get(n)??-1}function ef(e,n){if(e.anchor.paragraphId===e.head.paragraphId)return e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor};let t=vl(n,e.anchor.paragraphId),r=vl(n,e.head.paragraphId);return t===-1||r===-1?null:t<r||t===r&&e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor}}function Go(e,n){let t=[],r=new Set;for(let{line:a}of jn(e).get(n)??[]){let i=Ft(a,n);if(i){for(let s of i.spans){if(s.range.end===s.range.start)continue;let l=`${s.range.start}:${s.range.end}`;if(r.has(l))continue;r.add(l);let d=s.range.end-s.range.start,c=s.text.length===d?s.text:s.text.slice(0,d).padEnd(d," ");t.push({start:s.range.start,text:c});}for(let s of i.drawings){let l=s.start,d=l+1,c=`${l}:${d}`;r.has(c)||(r.add(c),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}function Dx(e,n,t,r){let o=kr(e),a=Xa(e).get(n.paragraphId);return a===void 0?null:Cx(n,t,o,a,i=>Il(e,i,r))}function _k(e,n,t,r=null,o={}){if(!o.stops&&(t==="left"||t==="right"))return Dx(e,n,t==="left"?-1:1,o.measurer);if(!o.stops&&(t==="wordLeft"||t==="wordRight")){let l=t==="wordLeft"?-1:1,d=ii(Go(e,n.paragraphId),n.offset,l);return d===n.offset?Dx(e,n,l,o.measurer):{position:{paragraphId:n.paragraphId,offset:d},desiredX:null}}if(!o.stops&&(t==="lineStart"||t==="lineEnd")){let l=kx(n,t==="lineStart"?-1:1,Lk(e,n,o.measurer)??Il(e,n.paragraphId,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(t==="documentStart"||t==="documentEnd")){let l=Ox(t==="documentStart"?-1:1,kr(e),d=>Il(e,d,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(t==="up"||t==="down")){let l=Xa(e).get(n.paragraphId);return l===void 0?null:Bx(n,t==="up"?-1:1,r,kr(e),l,d=>Il(e,d,o.measurer))}let a=o.stops?[...o.stops]:zx(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(l=>l.position.paragraphId===n.paragraphId&&l.position.offset===n.offset);if(i===-1){if(t==="left"||t==="right"){let d=tf(a,n,t==="left"?-1:1)??ai(a,n);return d?{position:d.position,desiredX:null}:null}let l=ai(a,n);if(!l)return null;i=a.indexOf(l);}let s=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===s.lineId)[0].position,desiredX:null};case "lineEnd":{let l=a.filter(d=>d.lineId===s.lineId);return {position:l[l.length-1].position,desiredX:null}}case "wordLeft":case "wordRight":{let l=Go(e,n.paragraphId),d=t==="wordLeft"?-1:1,c=ii(l,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 l=r??s.x,d=s.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:l};let u=c[0],f=Number.POSITIVE_INFINITY;for(let p of c){let m=Math.abs(p.y-s.y)*1e3+Math.abs(p.x-l);m<f&&(f=m,u=p);}return {position:u.position,desiredX:l}}case "up":case "down":{let l=r??s.x,d=[],c=new Set;for(let g of a)c.has(g.lineId)||(c.add(g.lineId),d.push(g.lineId));let u=d.indexOf(s.lineId),f=t==="up"?u-1:u+1;if(f<0||f>=d.length)return {position:(t==="up"?a[0]:a[a.length-1]).position,desiredX:l};let p=a.filter(g=>g.lineId===d[f]),m=p[0];for(let g of p)Math.abs(g.x-l)<Math.abs(m.x-l)&&(m=g);return {position:m.position,desiredX:l}}default:return null}}function Hk(e,n){return jx(e,n)}function zk(e,n,t){let r=ef(n,t);if(!r)return [];if(r.from.paragraphId===r.to.paragraphId&&r.from.offset===r.to.offset)return jk(e,r.from);let o=[];if(r.from.paragraphId===r.to.paragraphId){for(let{line:l}of jn(e).get(r.from.paragraphId)??[]){let d=Ft(l,r.from.paragraphId);if(!d)continue;let c=Fo(e,d,r.from,r.to);if(c)for(let u of d.spans)u.range.end>c.start&&u.range.start<c.end&&o.push(u);}return o}let a=jn(e),i=vl(t,r.from.paragraphId),s=vl(t,r.to.paragraphId);if(i===-1||s===-1)return [];for(let l=i;l<=s;l+=1)for(let{line:d}of a.get(t[l])??[]){let c=Ft(d,t[l]);if(!c)continue;let u=Fo(e,c,r.from,r.to);if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&o.push(f);}return o}function jk(e,n){let t=null;for(let{line:r}of jn(e).get(n.paragraphId)??[])for(let o of Ft(r,n.paragraphId)?.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 Gx=new WeakMap;function ar(e){let n=Gx.get(e);if(n)return n;let t=new Map,r=new Map,o=new Map,a=(s,l,d,c)=>{for(let u of s){if(u.kind==="paragraph")continue;let f=u.tableId,p=o.get(f);p||(p=new Map,o.set(f,p),t.set(f,[]),r.set(f,new Map));for(let m of u.rows){let g=p.get(m.id);g===void 0&&(g=p.size,p.set(m.id,g),r.get(f).set(g,m.cells));for(let b of m.cells)t.get(f).push({pageIndex:l,tableId:f,row:m,cell:b,rowIndex:g,isHeaderRepeat:m.isHeaderRepeat,offsetX:d,offsetY:c}),a(b.blocks,l,d,c);}}};for(let s of e.pages){a(s.fragments,s.index,0,0);for(let l of [s.header,s.footer])l&&a(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);for(let l of [s.footnotes,s.endnotes])if(l)for(let d of l.notes)a(d.fragments,s.index,d.box.x-s.contentBox.x,d.box.y-s.contentBox.y);}let i=new Map;for(let[s,l]of t)i.set(s,{placed:l,rows:r.get(s)??new Map});return Gx.set(e,i),i}function Wx(e){let n=0;for(let t of e.rows.values())for(let r of t)n=Math.max(n,or(r).to+1);return n}var or=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function Gk(e,n,t){if(n.tableId!==t.tableId)return null;let r=ar(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(or(n).from,or(t).from),s=Math.max(or(n).to,or(t).to),l=p=>{let{from:m,to:g}=or(p);return g>=i&&m<=s},d=p=>(r.rows.get(p)??[]).some(m=>m.vMergeContinue&&l(m)),c=r.rows.size+Wx(r)+2;for(let p=0;!(p>c);p+=1){let m=false;for(let[g,b]of r.rows)if(!(g<o||g>a))for(let h of b){if(!l(h))continue;let{from:x,to:I}=or(h);x<i&&(i=x,m=true),I>s&&(s=I,m=true);}for(;o>0&&d(o);)o-=1,m=true;for(;d(a+1);)a+=1,m=true;if(!m)break}let u=[],f=new Set;for(let p of r.placed){if(p.isHeaderRepeat||p.rowIndex<o||p.rowIndex>a)continue;let{from:m,to:g}=or(p.cell);g<i||m>s||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:s},text:Wk(e,n.tableId,u)}}function jN(e,n){return $x(e,n,true)}function kl(e,n){return $x(e,n,false)}function $x(e,n,t){let r=new Set(n),o=[],a=new Set;for(let i of ar(e).values())for(let s of i.placed)if(!(s.isHeaderRepeat||!r.has(s.cell.id)))for(let l of s.cell.blocks)t&&l.kind!=="paragraph"||si(l,o,a);return o}function si(e,n,t){if(e.kind==="paragraph"){for(let r of tr(e))t.has(r)||(t.add(r),n.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)si(a,n,t);}function Wk(e,n,t){let r=kl(e,t),o=r[0],a=r[r.length-1];return !o||!a?$k(e,n):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Go(e,a).length}}}function $k(e,n){let t=ar(e).get(n);for(let o of t?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let s of o.cell.blocks)si(s,a,new Set);let i=a[0];if(i){let s={paragraphId:i,offset:0};return {anchor:s,head:s}}}for(let o of e.pages)for(let a of je(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function Xk(e){let n=[...je(e)];for(let t of [e.header,e.footer])t&&n.push(...Nn(t.fragments));for(let t of [e.footnotes,e.endnotes])if(t)for(let r of t.notes)n.push(...Nn(r.fragments));return n}function Vk(e,n){let t=new Set(kl(e,n)),r=[],o=new Set;for(let a of e.pages)for(let i of Xk(a))if(t.has(i.paragraphId))for(let s of i.lines)for(let l of s.spans){let d=`${l.range.paragraphId}:${l.range.start}:${l.range.end}`;o.has(d)||(o.add(d),r.push(l));}return r}function Yk(e,n){let t=new Set(n),r=[];for(let o of ar(e).values())for(let a of o.placed)t.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function Kk(e,n){let t=ar(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 s=kl(e,[i.cell.id]).map(d=>Go(e,d)).join(`
17
+ `),l=o.get(i.rowIndex);l?l.set(i.cell.gridColumn,s):o.set(i.rowIndex,new Map([[i.cell.gridColumn,s]]));}return [...o.keys()].sort((i,s)=>i-s).map(i=>{let s=o.get(i),l=[];for(let d=n.columns.from;d<=n.columns.to;d+=1)l.push(s.get(d)??"");return l.join(" ")}).join(`
18
+ `)}function of(e,n){let t=null,r=-1;for(let[o,a]of ar(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)si(d,s,new Set);if(!s.includes(n))continue;let l=o.length;l<=r||(r=l,t={tableId:o,rows:a.rows.size,columns:Wx(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return t}function GN(e,n,t){if(t){let a=of(e,n);if(!a||a.tableId!==t.tableId)return null;let i=t.cellIds[0];if(!i)return null;let s=ar(e).get(t.tableId);if(!s)return null;for(let l of s.placed)if(l.cell.id===i)return {tableId:t.tableId,rowId:l.row.id,cellId:i,cellIds:t.cellIds,gridColumnIndex:l.cell.gridColumn,isHeaderRepeat:l.isHeaderRepeat};return null}let r=of(e,n);if(!r)return null;let o=ar(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let s of a.cell.blocks)si(s,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{ia as $,dm as $a,ja as $b,qv as $c,Nk as $d,Un as A,Fd as Aa,yc as Ab,DI as Ac,Ab as Ad,iR as B,ro as Ba,xs as Bb,Js as Bc,Db as Bd,sR as C,Ed as Ca,Rg as Cb,ZL as Cc,Uu as Cd,lR as D,Di as Da,vs as Db,_I as Dc,Sl as Dd,Oi as E,pa as Ea,Pg as Eb,el as Ec,wl as Ed,cR as F,Nd as Fa,To as Fb,ny as Fc,VT as Fd,xd as G,Ad as Ga,p0 as Gb,nl as Gc,ux as Gd,Bi as H,ma as Ha,Co as Hb,Ua as Hc,KE as Hd,uR as I,AR as Ia,Tg as Ib,ZI as Ic,fx as Id,fR as J,DR as Ja,Ot as Jb,eM as Jc,px as Jd,pR as K,_R as Ka,Da as Kb,nM as Kc,ZT as Kd,Rd as L,HR as La,Og as Lb,tM as Lc,nk as Ld,Np as M,Dd as Ma,Fg as Mb,rM as Mc,hx as Md,Ap as N,oo as Na,Bc as Nb,oM as Nc,pk as Nd,Dp as O,Hd as Oa,Bt as Ob,ol as Oc,gk as Od,_p as P,zd as Pa,Cs as Pb,zn as Pc,hk as Pd,Hp as Q,ha as Qa,Os as Qb,MM as Qc,yk as Qd,zp as R,$R as Ra,Yg as Rb,wu as Rc,Sk as Rd,yR as S,ao as Sa,Ds as Sb,Pu as Sc,wx as Sd,bR as T,jd as Ta,_s as Tb,Iu as Tc,mN as Td,Qr as U,yr as Ua,Hs as Ub,vv as Uc,Ix as Ud,RR as V,KR as Va,Ac as Vb,Wv as Vc,SN as Vd,Pd as W,UR as Wa,Zg as Wb,$v as Wc,Nx as Wd,je as X,Pt as Xa,Dc as Xb,cl as Xc,ii as Xd,Nn as Y,Yt as Ya,Ir as Yb,et as Yc,zx as Yd,vd as Z,lm as Za,Jn as Zb,ab as Zc,Mk as Zd,vR as _,Kd as _a,Gs as _b,ul as _c,jx as _d,od as a,Xp as aa,Ud as ab,hh as ac,fl as ad,Ak as ae,ad as b,sa as ba,cm as bb,yh as bc,Zv as bd,Dk as be,id as c,Mi as ca,It as cb,Ga as cc,ib as cd,Go as ce,$t as d,la as da,qd as db,Bo as dc,sb as dd,_k as de,Yr as e,Fi as ea,Jd as eb,Yc as ec,Mr as ed,Hk as ee,Ri as f,da as fa,dt as fb,Rh as fc,Qv as fd,zk as fe,oS as g,Vp as ga,Ee as gb,SI as gc,ti as gd,Gk as ge,at as h,Ei as ha,Zt as hb,Lo as hc,lb as hd,jN as he,mr as i,eo as ia,An as ib,Kc as ic,Ho as id,kl as ie,Ip as j,Cd as ja,Sw as jb,Uc as jc,ri as jd,Vk as je,ud as k,Up as ka,tc as kb,LL as kc,db as kd,Yk as ke,vi as l,ua as la,un as lb,eu as lc,nT as ld,Kk as le,sS as m,qp as ma,en as mb,$a as mc,cb as md,of as me,ta as n,Zp as na,go as nb,Mh as nc,_u as nd,GN as ne,lS as o,to as oa,ka as ob,nu as oc,pl as od,dS as p,Jp as pa,ac as pb,Vs as pc,ub as pd,Fe as q,hC as qa,Im as qb,Tr as qc,fb as qd,_S as r,Od as ra,Lw as rb,Ys as rc,oi as rd,Tp as s,Bd as sa,Mw as sb,kr as sc,pb as sd,QS as t,Ld as ta,ct as tb,Wh as tc,ml as td,Ti as u,Md as ua,Sr as ub,an as uc,zu as ud,nR as v,Rt as va,sc as vb,WL as vc,Tb as vd,tR as w,fa as wa,Nm as wb,tr as wc,ju as wd,rR as x,In as xa,Rr as xb,$L as xc,sT as xd,hd as y,Xt as ya,Qw as yb,lu as yc,$u as yd,bd as z,ER as za,eB as zb,Ka as zc,yl as zd};