PageSourceSearch

https://app.mentortools.com/app/_next/static/chunks/6825.128f55ed4e0f3bde.js

js mentortools.com collected 2026-09-24 10:31:10 UTC 74,457 bytes, 22 lines download raw bytes

1try{let e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b62e4c9b-fd00-4a93-8b93-858f95a9a41c",e._sentryDebugIdIdentifier="sentry-dbid-b62e4c9b-fd00-4a93-8b93-858f95a9a41c")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6825],{46825:(e,t,r)=>{r.d(t,{renderAsync:()=>eA});var a,s,n,l,i,o,c,h,m=r(27524);function u(e){return/^[^"'].*\s.*[^"']$/.test(e)?`'${e}'`:e}function p(e){let t=e.lastIndexOf("/")+1;return[0==t?"":e.substring(0,t),0==t?e:e.substring(t)]}function d(e,t){try{let r="http://docx/";return new URL(e,r+t).toString().substring(r.length)}catch{return`${t}${e}`}}function g(e,t){return e.reduce((e,r)=>(e[t(r)]=r,e),{})}function f(e){return e&&"object"==typeof e&&!Array.isArray(e)}function b(e){return"string"==typeof e||e instanceof String}function y(e,...t){if(!t.length)return e;let r=t.shift();if(f(e)&&f(r))for(let t in r)f(r[t])?y(e[t]??(e[t]={}),r[t]):e[t]=r[t];return y(e,...t)}function k(e){return Array.isArray(e)?e:[e]}(a=i||(i={})).OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",a.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",a.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",a.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",a.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",a.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",a.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",a.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",a.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",a.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",a.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",a.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",a.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",a.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",a.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",a.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",a.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties",a.Comments="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",a.CommentsExtended="http://schemas.microsoft.com/office/2011/relationships/commentsExtended",a.AltChunk="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk";let v="http://schemas.openxmlformats.org/wordprocessingml/2006/main",w={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt",min:.25,max:12},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"}};function P(e,t=w.Dxa){if(null==e||/.+(p[xt]|[%])$/.test(e))return e;var r,a,s,n=parseInt(e)*t.mul;return t.min&&t.max&&(r=n,a=t.min,s=t.max,n=a>r?a:s<r?s:r),`${n.toFixed(2)}${t.unit}`}function S(e,t,r){if(e.namespaceURI!=v)return!1;switch(e.localName){case"color":t.color=r.attr(e,"val");break;case"sz":t.fontSize=r.lengthAttr(e,"val",w.FontSize);break;default:return!1}return!0}class M{elements(e,t=null){let r=[];for(let a=0,s=e.childNodes.length;a<s;a++){let s=e.childNodes.item(a);s.nodeType==Node.ELEMENT_NODE&&(null==t||s.localName==t)&&r.push(s)}return r}element(e,t){for(let r=0,a=e.childNodes.length;r<a;r++){let a=e.childNodes.item(r);if(1==a.nodeType&&a.localName==t)return a}return null}elementAttr(e,t,r){var a=this.element(e,t);return a?this.attr(a,r):void 0}attrs(e){return Array.from(e.attributes)}attr(e,t){for(let r=0,a=e.attributes.length;r<a;r++){let a=e.attributes.item(r);if(a.localName==t)return a.value}return null}intAttr(e,t,r=null){var a=this.attr(e,t);return a?parseInt(a):r}hexAttr(e,t,r=null){var a=this.attr(e,t);return a?parseInt(a,16):r}floatAttr(e,t,r=null){var a=this.attr(e,t);return a?parseFloat(a):r}boolAttr(e,t,r=null){return function(e,t=!1){switch(e){case"1":case"on":case"true":return!0;case"0":case"off":case"false":return!1;default:return t}}(this.attr(e,t),r)}lengthAttr(e,t,r=w.Dxa){return P(this.attr(e,t),r)}}let x=new M;class N{constructor(e,t){this._package=e,this.path=t}async load(){this.rels=await this._package.loadRelationships(this.path);let e=await this._package.load(this.path),t=this._package.parseXmlDocument(e);this._package.options.keepOrigin&&(this._xmlDocument=t),this.parseXml(t.firstElementChild)}save(){var e;this._package.update(this.path,(e=this._xmlDocument,new XMLSerializer().serializeToString(e)))}parseXml(e){}}let C={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};class T extends N{parseXml(e){var t;this.fonts=(t=this._package.xmlParser).elements(e).map(e=>(function(e,t){let r={name:t.attr(e,"name"),embedFontRefs:[]};for(let n of t.elements(e))switch(n.localName){case"family":r.family=t.attr(n,"val");break;case"altName":r.altName=t.attr(n,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":var a,s;r.embedFontRefs.push((a=n,{id:(s=t).attr(a,"id"),key:s.attr(a,"fontKey"),type:C[a.localName]}))}return r})(e,t))}}class A{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new M}get(e){var t;let r=(t=e).startsWith("/")?t.substr(1):t;return this._zip.files[r]??this._zip.files[r.replace(/\//g,"\\")]}update(e,t){this._zip.file(e,t)}static async load(e,t){return new A(await m.loadAsync(e),t)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){return this.get(e)?.async(t)??Promise.resolve(null)}async loadRelationships(e=null){var t,r;let a="_rels/.rels";if(null!=e){let[t,r]=p(e);a=`${t}_rels/${r}.rels`}let s=await this.load(a);return s?(t=this.parseXmlDocument(s).firstElementChild,(r=this.xmlParser).elements(t).map(e=>({id:r.attr(e,"Id"),type:r.attr(e,"Type"),target:r.attr(e,"Target"),targetMode:r.attr(e,"TargetMode")}))):null}async loadContentTypes(){var e,t;let r=await this.load("[Content_Types].xml");return r?(e=this.parseXmlDocument(r).firstElementChild,(t=this.xmlParser).elements(e).map(e=>({extension:t.attr(e,"Extension"),partName:t.attr(e,"PartName"),contentType:t.attr(e,"ContentType")}))):[]}parseXmlDocument(e){return function(e,t=!1){var r,a;t&&(e=e.replace(/<[?].*[?]>/,"")),e=65279===(r=e).charCodeAt(0)?r.substring(1):r;let s=new DOMParser().parseFromString(e,"application/xml"),n=(a=s,a.getElementsByTagName("parsererror")[0]?.textContent);if(n)throw Error(n);return s}(e,this.options.trimXmlDeclaration)}}class E extends N{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}}function R(e,t){return{type:t.attr(e,"val"),color:t.attr(e,"color"),size:t.lengthAttr(e,"sz",w.Border),offset:t.lengthAttr(e,"space",w.Point),frame:t.boolAttr(e,"frame"),shadow:t.boolAttr(e,"shadow")}}function B(e,t=x){var r,a,s={};for(let n of t.elements(e))switch(n.localName){case"pgSz":s.pageSize={
1width:t.lengthAttr(n,"w"),height:t.lengthAttr(n,"h"),orientation:t.attr(n,"orient")};break;case"type":s.type=t.attr(n,"val");break;case"pgMar":s.pageMargins={left:t.lengthAttr(n,"left"),right:t.lengthAttr(n,"right"),top:t.lengthAttr(n,"top"),bottom:t.lengthAttr(n,"bottom"),header:t.lengthAttr(n,"header"),footer:t.lengthAttr(n,"footer"),gutter:t.lengthAttr(n,"gutter")};break;case"cols":s.columns=function(e,t){return{numberOfColumns:t.intAttr(e,"num"),space:t.lengthAttr(e,"space"),separator:t.boolAttr(e,"sep"),equalWidth:t.boolAttr(e,"equalWidth",!0),columns:t.elements(e,"col").map(e=>({width:t.lengthAttr(e,"w"),space:t.lengthAttr(e,"space")}))}}(n,t);break;case"headerReference":(s.headerRefs??(s.headerRefs=[])).push(D(n,t));break;case"footerReference":(s.footerRefs??(s.footerRefs=[])).push(D(n,t));break;case"titlePg":s.titlePage=t.boolAttr(n,"val",!0);break;case"pgBorders":s.pageBorders=function(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"left":r.left=R(a,t);break;case"top":r.top=R(a,t);break;case"right":r.right=R(a,t);break;case"bottom":r.bottom=R(a,t)}return r}(n,t);break;case"pgNumType":r=n,s.pageNumber={chapSep:(a=t).attr(r,"chapSep"),chapStyle:a.attr(r,"chapStyle"),format:a.attr(r,"fmt"),start:a.intAttr(r,"start")}}return s}function D(e,t){return{id:t.attr(e,"id"),type:t.attr(e,"type")}}function L(e,t){let r={};for(let a of t.elements(e))S(a,r,t);return r}function $(e,t){let r={};for(let a of t.elements(e))F(a,r,t);return r}function F(e,t,r){if(e.namespaceURI!=v)return!1;if(S(e,t,r))return!0;switch(e.localName){case"tabs":var a,s;a=e,t.tabs=(s=r).elements(a,"tab").map(e=>({position:s.lengthAttr(e,"pos"),leader:s.attr(e,"leader"),style:s.attr(e,"val")}));break;case"sectPr":t.sectionProps=B(e,r);break;case"numPr":t.numbering=function(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"numId":r.id=t.attr(a,"val");break;case"ilvl":r.level=t.intAttr(a,"val")}return r}(e,r);break;case"spacing":return t.lineSpacing={before:r.lengthAttr(e,"before"),after:r.lengthAttr(e,"after"),line:r.intAttr(e,"line"),lineRule:r.attr(e,"lineRule")},!1;case"textAlignment":return t.textAlignment=r.attr(e,"val"),!1;case"keepLines":t.keepLines=r.boolAttr(e,"val",!0);break;case"keepNext":t.keepNext=r.boolAttr(e,"val",!0);break;case"pageBreakBefore":t.pageBreakBefore=r.boolAttr(e,"val",!0);break;case"outlineLvl":t.outlineLevel=r.intAttr(e,"val");break;case"pStyle":t.styleName=r.attr(e,"val");break;case"rPr":t.runProps=L(e,r);break;default:return!1}return!0}function I(e,t){let r={level:t.intAttr(e,"ilvl")};for(let a of t.elements(e))switch(a.localName){case"start":r.start=t.attr(a,"val");break;case"lvlRestart":r.restart=t.intAttr(a,"val");break;case"numFmt":r.format=t.attr(a,"val");break;case"lvlText":r.text=t.attr(a,"val");break;case"lvlJc":r.justification=t.attr(a,"val");break;case"lvlPicBulletId":r.bulletPictureId=t.attr(a,"val");break;case"pStyle":r.paragraphStyle=t.attr(a,"val");break;case"pPr":r.paragraphProps=$(a,t);break;case"rPr":r.runProps=L(a,t)}return r}(s=o||(o={})).Continuous="continuous",s.NextPage="nextPage",s.NextColumn="nextColumn",s.EvenPage="evenPage",s.OddPage="oddPage";class H extends N{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,function(e,t){let r={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let a of t.elements(e))switch(a.localName){case"num":r.numberings.push(function(e,t){let r={id:t.attr(e,"numId"),overrides:[]};for(let a of t.elements(e))switch(a.localName){case"abstractNumId":r.abstractId=t.attr(a,"val");break;case"lvlOverride":r.overrides.push(function(e,t){let r={level:t.intAttr(e,"ilvl")};for(let a of t.elements(e))switch(a.localName){case"startOverride":r.start=t.intAttr(a,"val");break;case"lvl":r.numberingLevel=I(a,t)}return r}(a,t))}return r}(a,t));break;case"abstractNum":r.abstractNumberings.push(function(e,t){let r={id:t.attr(e,"abstractNumId"),levels:[]};for(let a of t.elements(e))switch(a.localName){case"name":r.name=t.attr(a,"val");break;case"multiLevelType":r.multiLevelType=t.attr(a,"val");break;case"numStyleLink":r.numberingStyleLink=t.attr(a,"val");break;case"styleLink":r.styleLink=t.attr(a,"val");break;case"lvl":r.levels.push(I(a,t))}return r}(a,t));break;case"numPicBullet":r.bulletPictures.push(function(e,t){var r=t.element(e,"pict"),a=r&&t.element(r,"shape"),s=a&&t.element(a,"imagedata");return s?{id:t.attr(e,"numPicBulletId"),referenceId:t.attr(s,"id"),style:t.attr(a,"style")}:null}(a,t))}return r}(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}}class _ extends N{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}}(n=c||(c={}
1)).Document="document",n.Paragraph="paragraph",n.Run="run",n.Break="break",n.NoBreakHyphen="noBreakHyphen",n.Table="table",n.Row="row",n.Cell="cell",n.Hyperlink="hyperlink",n.SmartTag="smartTag",n.Drawing="drawing",n.Image="image",n.Text="text",n.Tab="tab",n.Symbol="symbol",n.BookmarkStart="bookmarkStart",n.BookmarkEnd="bookmarkEnd",n.Footer="footer",n.Header="header",n.FootnoteReference="footnoteReference",n.EndnoteReference="endnoteReference",n.Footnote="footnote",n.Endnote="endnote",n.SimpleField="simpleField",n.ComplexField="complexField",n.Instruction="instruction",n.VmlPicture="vmlPicture",n.MmlMath="mmlMath",n.MmlMathParagraph="mmlMathParagraph",n.MmlFraction="mmlFraction",n.MmlFunction="mmlFunction",n.MmlFunctionName="mmlFunctionName",n.MmlNumerator="mmlNumerator",n.MmlDenominator="mmlDenominator",n.MmlRadical="mmlRadical",n.MmlBase="mmlBase",n.MmlDegree="mmlDegree",n.MmlSuperscript="mmlSuperscript",n.MmlSubscript="mmlSubscript",n.MmlPreSubSuper="mmlPreSubSuper",n.MmlSubArgument="mmlSubArgument",n.MmlSuperArgument="mmlSuperArgument",n.MmlNary="mmlNary",n.MmlDelimiter="mmlDelimiter",n.MmlRun="mmlRun",n.MmlEquationArray="mmlEquationArray",n.MmlLimit="mmlLimit",n.MmlLimitLower="mmlLimitLower",n.MmlMatrix="mmlMatrix",n.MmlMatrixRow="mmlMatrixRow",n.MmlBox="mmlBox",n.MmlBar="mmlBar",n.MmlGroupChar="mmlGroupChar",n.VmlElement="vmlElement",n.Inserted="inserted",n.Deleted="deleted",n.DeletedText="deletedText",n.Comment="comment",n.CommentReference="commentReference",n.CommentRangeStart="commentRangeStart",n.CommentRangeEnd="commentRangeEnd",n.AltChunk="altChunk";class O{constructor(){this.children=[],this.cssStyle={}}}class z extends O{constructor(){super(...arguments),this.type=c.Header}}class j extends O{constructor(){super(...arguments),this.type=c.Footer}}class V extends N{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}}class W extends V{createRootElement(){return new z}}class X extends V{createRootElement(){return new j}}function G(e){if(void 0!==e)return parseInt(e)}class U extends N{parseXml(e){this.props=function(e,t){let r={};for(let a of t.elements(e))switch(a.localName){case"Template":r.template=a.textContent;break;case"Pages":r.pages=G(a.textContent);break;case"Words":r.words=G(a.textContent);break;case"Characters":r.characters=G(a.textContent);break;case"Application":r.application=a.textContent;break;case"Lines":r.lines=G(a.textContent);break;case"Paragraphs":r.paragraphs=G(a.textContent);break;case"Company":r.company=a.textContent;break;case"AppVersion":r.appVersion=a.textContent}return r}(e,this._package.xmlParser)}}class q extends N{parseXml(e){this.props=function(e,t){let r={};for(let a of t.elements(e))switch(a.localName){case"title":r.title=a.textContent;break;case"description":r.description=a.textContent;break;case"subject":r.subject=a.textContent;break;case"creator":r.creator=a.textContent;break;case"keywords":r.keywords=a.textContent;break;case"language":r.language=a.textContent;break;case"lastModifiedBy":r.lastModifiedBy=a.textContent;break;case"revision":a.textContent&&(r.revision=parseInt(a.textContent))}return r}(e,this._package.xmlParser)}}class J{}function Y(e,t){return{latinTypeface:t.elementAttr(e,"latin","typeface"),eaTypeface:t.elementAttr(e,"ea","typeface"),csTypeface:t.elementAttr(e,"cs","typeface")}}class Z extends N{constructor(e,t){super(e,t)}parseXml(e){this.theme=function(e,t){var r=new J,a=t.element(e,"themeElements");for(let e of t.elements(a))switch(e.localName){case"clrScheme":r.colorScheme=function(e,t){var r={name:t.attr(e,"name"),colors:{}};for(let n of t.elements(e)){var a=t.element(n,"srgbClr"),s=t.element(n,"sysClr");a?r.colors[n.localName]=t.attr(a,"val"):s&&(r.colors[n.localName]=t.attr(s,"lastClr"))}return r}(e,t);break;case"fontScheme":r.fontScheme=function(e,t){var r={name:t.attr(e,"name")};for(let a of t.elements(e))switch(a.localName){case"majorFont":r.majorFont=Y(a,t);break;case"minorFont":r.minorFont=Y(a,t)}return r}(e,t)}return r}(e,this._package.xmlParser)}}class K{}class Q extends K{constructor(){super(...arguments),this.type=c.Footnote}}class ee extends K{constructor(){super(...arguments),this.type=c.Endnote}}class et extends N{constructor(e,t,r){super(e,t),this._documentParser=r}}class er extends et{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",Q)}}class ea extends et{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",ee)}}function es(e,t){var r={defaultNoteIds:[]};for(let a of t.elements(e))switch(a.localName){case"numFmt":r.nummeringFormat=t.attr(a,"val");break;case"footnote":case"endnote":r.defaultNoteIds.push(t.attr(a,"id"))}return r}class en extends N{constructor(e,t){super(e,t)}parseXml(e){this.settings=function(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"defaultTabStop":r.defaultTabStop=t.lengthAttr(a,"val");break;case"footnotePr":r.footnoteProps=es(a,t);break;case"endnotePr":r.endnoteProps=es(a,t);break;case"autoHyphenation":r.autoHyphenation=t.boolAttr(a,"val")}return r}(e,this._package.xmlParser)}}class el extends N{parseXml(e){var t;this.props=(t=this._package.xmlParser).elements(e,"property").map(e=>{let r=e.firstChild;return{formatId:t.attr(e,"fmtid"),name:t.attr(e,"name"),type:r.nodeName,value:r.textContent}})}}class ei extends N{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.comments=this._documentParser.parseComments(e),this.commentMap=g(this.comments,e=>e.id)}}class eo extends N{constructor(e,t){super(e,t),this.comments=[]}parseXml(e){let t=this._package.xmlParser;for(let r of t.elements(e,"commentEx"))this.comments.push({paraId:t.attr(r,"paraId"),paraIdParent:t.attr(r,"paraIdParent"),done:t.boolAttr(r,"done")});this.commentMap=g(this.comments,e=>e.paraId)}}
1let ec=[{type:i.OfficeDocument,target:"word/document.xml"},{type:i.ExtendedProperties,target:"docProps/app.xml"},{type:i.CoreProperties,target:"docProps/core.xml"},{type:i.CustomProperties,target:"docProps/custom.xml"}];class eh{constructor(){this.parts=[],this.partsMap={},this.contentTypes=[]}static async load(e,t,r){var a=new eh;return a._options=r,a._parser=t,a._package=await A.load(e,r),a.rels=await a._package.loadRelationships(),a.contentTypes=await a._package.loadContentTypes(),await Promise.all(ec.map(e=>{let t=a.rels.find(t=>t.type===e.type)??e;return a.loadRelationshipPart(t.target,t.type)})),a}save(e="blob"){return this._package.save(e)}async loadRelationshipPart(e,t){if(this.partsMap[e])return this.partsMap[e];if(!this._package.get(e))return null;let r=null;switch(t){case i.OfficeDocument:this.documentPart=r=new E(this._package,e,this._parser);break;case i.FontTable:this.fontTablePart=r=new T(this._package,e);break;case i.Numbering:this.numberingPart=r=new H(this._package,e,this._parser);break;case i.Styles:this.stylesPart=r=new _(this._package,e,this._parser);break;case i.Theme:this.themePart=r=new Z(this._package,e);break;case i.Footnotes:this.footnotesPart=r=new er(this._package,e,this._parser);break;case i.Endnotes:this.endnotesPart=r=new ea(this._package,e,this._parser);break;case i.Footer:r=new X(this._package,e,this._parser);break;case i.Header:r=new W(this._package,e,this._parser);break;case i.CoreProperties:this.corePropsPart=r=new q(this._package,e);break;case i.ExtendedProperties:this.extendedPropsPart=r=new U(this._package,e);break;case i.CustomProperties:r=new el(this._package,e);break;case i.Settings:this.settingsPart=r=new en(this._package,e);break;case i.Comments:this.commentsPart=r=new ei(this._package,e,this._parser);break;case i.CommentsExtended:this.commentsExtendedPart=r=new eo(this._package,e)}if(null==r)return Promise.resolve(null);if(this.partsMap[e]=r,this.parts.push(r),await r.load(),r.rels?.length>0){let[e]=p(r.path);await Promise.all(r.rels.map(t=>this.loadRelationshipPart(d(t.target,e),t.type)))}return r}async loadDocumentImage(e,t){let r=this.getPathById(t??this.documentPart,e);return r?this.blobToURL(await this._package.load(r,"blob"),r):null}async loadNumberingImage(e){let t=this.getPathById(this.numberingPart,e);return t?this.blobToURL(await this._package.load(t,"blob"),t):null}async loadFont(e,t){let r=this.getPathById(this.fontTablePart,e);if(!r)return null;let a=await this._package.load(r,"uint8array");return a?this.blobToURL(new Blob([function(e,t){let r=t.replace(/{|}|-/g,""),a=Array(16);for(let e=0;e<16;e++)a[16-e-1]=parseInt(r.substring(2*e,2*e+2),16);for(let t=0;t<32;t++)e[t]=e[t]^a[t%16];return e}(a,t)]),r):a}async loadAltChunk(e,t){let r=this.getPathById(t??this.documentPart,e);return r?this._package.load(r,"string"):Promise.resolve(null)}blobToURL(e,t){if(!e)return null;if(t){let r=this.contentTypes.find(e=>e.partName===t||e.extension&&t.endsWith(`.${e.extension}`));e=r?new Blob([e],{type:r.contentType}):e}if(this._options.useBase64URL){var r;return r=e,new Promise((e,t)=>{let a=new FileReader;a.onloadend=()=>e(a.result),a.onerror=()=>t(),a.readAsDataURL(r)})}return URL.createObjectURL(e)}findPartByRelId(e,t=null){var r=(t.rels??this.rels).find(t=>t.id==e);let a=t?p(t.path)[0]:"";return r?this.partsMap[d(r.target,a)]:null}getPathById(e,t){let r=e.rels.find(e=>e.id==t),[a]=p(e.path);return r?d(r.target,a):null}}class em extends O{constructor(){super(...arguments),this.type=c.VmlElement,this.attrs={}}}function eu(e){return e.split(",")}class ep extends O{constructor(){super(...arguments),this.type=c.Comment}}class ed extends O{constructor(e){super(),this.id=e,this.type=c.CommentReference}}class eg extends O{constructor(e){super(),this.id=e,this.type=c.CommentRangeStart}}class ef extends O{constructor(e){super(),this.id=e,this.type=c.CommentRangeEnd}}let eb=[],ey={oMath:c.MmlMath,oMathPara:c.MmlMathParagraph,f:c.MmlFraction,func:c.MmlFunction,fName:c.MmlFunctionName,num:c.MmlNumerator,den:c.MmlDenominator,rad:c.MmlRadical,deg:c.MmlDegree,e:c.MmlBase,sSup:c.MmlSuperscript,sSub:c.MmlSubscript,sPre:c.MmlPreSubSuper,sup:c.MmlSuperArgument,sub:c.MmlSubArgument,d:c.MmlDelimiter,nary:c.MmlNary,eqArr:c.MmlEquationArray,lim:c.MmlLimit,limLow:c.MmlLimitLower,m:c.MmlMatrix,mr:c.MmlMatrixRow,box:c.MmlBox,bar:c.MmlBar,groupChr:c.MmlGroupChar};class ek{constructor(e){this.options={ignoreWidth:!1,debug:!1,...e}}parseNotes(e,t,r){var a=[];for(let s of x.elements(e,t)){let e=new r;e.id=x.attr(s,"id"),e.noteType=x.attr(s,"type"),e.children=this.parseBodyElements(s),a.push(e)}return a}parseComments(e){var t=[];for(let r of x.elements(e,"comment")){let e=new ep;e.id=x.attr(r,"id"),e.author=x.attr(r,"author"),e.initials=x.attr(r,"initials"),e.date=x.attr(r,"date"),e.children=this.parseBodyElements(r),t.push(e)}return t}
1parseDocumentFile(e){var t=x.element(e,"body"),r=x.element(e,"background"),a=x.element(t,"sectPr");return{type:c.Document,children:this.parseBodyElements(t),props:a?B(a,x):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=ew.colorAttr(e,"color");return r&&(t["background-color"]=r),t}parseBodyElements(e){var t=[];for(let r of x.elements(e))switch(r.localName){case"p":t.push(this.parseParagraph(r));break;case"altChunk":t.push(this.parseAltChunk(r));break;case"tbl":t.push(this.parseTable(r));break;case"sdt":t.push(...this.parseSdt(r,e=>this.parseBodyElements(e)))}return t}parseStylesFile(e){var t=[];for(let r of x.elements(e))switch(r.localName){case"style":t.push(this.parseStyle(r));break;case"docDefaults":t.push(this.parseDefaultStyles(r))}return t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};for(let s of x.elements(e))switch(s.localName){case"rPrDefault":var r=x.element(s,"rPr");r&&t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})});break;case"pPrDefault":var a=x.element(s,"pPr");a&&t.styles.push({target:"p",values:this.parseDefaultProperties(a,{})})}return t}parseStyle(e){var t={id:x.attr(e,"styleId"),isDefault:x.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(x.attr(e,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span"}for(let r of x.elements(e))switch(r.localName){case"basedOn":t.basedOn=x.attr(r,"val");break;case"name":t.name=x.attr(r,"val");break;case"link":t.linked=x.attr(r,"val");break;case"next":t.next=x.attr(r,"val");break;case"aliases":t.aliases=x.attr(r,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(r,{})}),t.paragraphProps=$(r,x);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})}),t.runProps=L(r,x);break;case"tblPr":case"tcPr":t.styles.push({target:"td",values:this.parseDefaultProperties(r,{})});break;case"tblStylePr":for(let e of this.parseTableStyle(r))t.styles.push(e);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${r.localName}`)}return t}parseTableStyle(e){var t=[],r=x.attr(e,"type"),a="",s="";switch(r){case"firstRow":s=".first-row",a="tr.first-row td";break;case"lastRow":s=".last-row",a="tr.last-row td";break;case"firstCol":s=".first-col",a="td.first-col";break;case"lastCol":s=".last-col",a="td.last-col";break;case"band1Vert":s=":not(.no-vband)",a="td.odd-col";break;case"band2Vert":s=":not(.no-vband)",a="td.even-col";break;case"band1Horz":s=":not(.no-hband)",a="tr.odd-row";break;case"band2Horz":s=":not(.no-hband)",a="tr.even-row";break;default:return[]}for(let r of x.elements(e))switch(r.localName){case"pPr":t.push({target:`${a} p`,mod:s,values:this.parseDefaultProperties(r,{})});break;case"rPr":t.push({target:`${a} span`,mod:s,values:this.parseDefaultProperties(r,{})});break;case"tblPr":case"tcPr":t.push({target:a,mod:s,values:this.parseDefaultProperties(r,{})})}return t}parseNumberingFile(e){let t=[],r=[],a=[];for(let s of x.elements(e))switch(s.localName){case"abstractNum":t.push(...this.parseAbstractNumbering(s,a));break;case"numPicBullet":a.push(this.parseNumberingPicBullet(s));break;case"num":r.push({numId:x.attr(s,"numId"),abstractNumId:x.elementAttr(s,"abstractNumId","val")})}return r.flatMap(e=>t.filter(t=>e.abstractNumId==t.id).map(t=>({...t,id:e.numId})))}parseNumberingPicBullet(e){var t=x.element(e,"pict"),r=t&&x.element(t,"shape"),a=r&&x.element(r,"imagedata");return a?{id:x.intAttr(e,"numPicBulletId"),src:x.attr(a,"id"),style:x.attr(r,"style")}:null}parseAbstractNumbering(e,t){var r=[],a=x.attr(e,"abstractNumId");for(let s of x.elements(e))"lvl"===s.localName&&r.push(this.parseNumberingLevel(a,s,t));return r}parseNumberingLevel(e,t,r){var a={id:e,level:x.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};for(let e of x.elements(t))switch(e.localName){case"start":a.start=x.intAttr(e,"val");break;case"pPr":this.parseDefaultProperties(e,a.pStyle);break;case"rPr":this.parseDefaultProperties(e,a.rStyle);break;case"lvlPicBulletId":var s=x.intAttr(e,"val");a.bullet=r.find(e=>e?.id==s);break;case"lvlText":a.levelText=x.attr(e,"val");break;case"pStyle":a.pStyleName=x.attr(e,"val");break;case"numFmt":a.format=x.attr(e,"val");break;case"suff":a.suff=x.attr(e,"val")}return a}
1parseSdt(e,t){let r=x.element(e,"sdtContent");return r?t(r):[]}parseChange(e,t,r){return{type:e,children:r(t)?.children??[],id:x.attr(t,"id"),author:x.attr(t,"author"),date:x.attr(t,"date")}}parseAltChunk(e){return{type:c.AltChunk,children:[],id:x.attr(e,"id")}}parseParagraph(e){var t={type:c.Paragraph,children:[]};for(let r of x.elements(e))switch(r.localName){case"pPr":this.parseParagraphProperties(r,t);break;case"r":t.children.push(this.parseRun(r,t));break;case"hyperlink":t.children.push(this.parseHyperlink(r,t));break;case"smartTag":t.children.push(this.parseSmartTag(r,t));break;case"bookmarkStart":t.children.push({type:c.BookmarkStart,id:x.attr(r,"id"),name:x.attr(r,"name"),colFirst:x.intAttr(r,"colFirst"),colLast:x.intAttr(r,"colLast")});break;case"bookmarkEnd":t.children.push({type:c.BookmarkEnd,id:x.attr(r,"id")});break;case"commentRangeStart":t.children.push(new eg(x.attr(r,"id")));break;case"commentRangeEnd":t.children.push(new ef(x.attr(r,"id")));break;case"oMath":case"oMathPara":t.children.push(this.parseMathElement(r));break;case"sdt":t.children.push(...this.parseSdt(r,e=>this.parseParagraph(e).children));break;case"ins":t.children.push(this.parseChange(c.Inserted,r,e=>this.parseParagraph(e)));break;case"del":t.children.push(this.parseChange(c.Deleted,r,e=>this.parseParagraph(e)))}return t}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,e=>{if(F(e,t,x))return!0;switch(e.localName){case"pStyle":t.styleName=x.attr(e,"val");break;case"cnfStyle":t.className=eP.classNameOfCnfStyle(e);break;case"framePr":this.parseFrame(e,t);break;case"rPr":break;default:return!1}return!0})}parseFrame(e,t){"drop"==x.attr(e,"dropCap")&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:c.Hyperlink,parent:t,children:[]};for(let t of(r.anchor=x.attr(e,"anchor"),r.id=x.attr(e,"id"),x.elements(e)))"r"===t.localName&&r.children.push(this.parseRun(t,r));return r}parseSmartTag(e,t){var r={type:c.SmartTag,parent:t,children:[]},a=x.attr(e,"uri"),s=x.attr(e,"element");for(let t of(a&&(r.uri=a),s&&(r.element=s),x.elements(e)))switch(t.localName){case"r":r.children.push(this.parseRun(t,r));break;case"smartTag":r.children.push(this.parseSmartTag(t,r))}return r}parseRun(e,t){var r={type:c.Run,parent:t,children:[]};for(let t of x.elements(e))switch((t=this.checkAlternateContent(t)).localName){case"t":r.children.push({type:c.Text,text:t.textContent});break;case"delText":r.children.push({type:c.DeletedText,text:t.textContent});break;case"commentReference":r.children.push(new ed(x.attr(t,"id")));break;case"fldSimple":r.children.push({type:c.SimpleField,instruction:x.attr(t,"instr"),lock:x.boolAttr(t,"lock",!1),dirty:x.boolAttr(t,"dirty",!1)});break;case"instrText":r.fieldRun=!0,r.children.push({type:c.Instruction,text:t.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:c.ComplexField,charType:x.attr(t,"fldCharType"),lock:x.boolAttr(t,"lock",!1),dirty:x.boolAttr(t,"dirty",!1)});break;case"noBreakHyphen":r.children.push({type:c.NoBreakHyphen});break;case"br":r.children.push({type:c.Break,break:x.attr(t,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:c.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:c.Symbol,font:u(x.attr(t,"font")),char:x.hexAttr(t,"char")});break;case"tab":r.children.push({type:c.Tab});break;case"footnoteReference":r.children.push({type:c.FootnoteReference,id:x.attr(t,"id")});break;case"endnoteReference":r.children.push({type:c.EndnoteReference,id:x.attr(t,"id")});break;case"drawing":let e=this.parseDrawing(t);e&&r.children.push(e);break;case"pict":r.children.push(this.parseVmlPicture(t));break;case"rPr":this.parseRunProperties(t,r)}return r}parseMathElement(e){let t=`${e.localName}Pr`,r={type:ey[e.localName],children:[]};for(let s of x.elements(e))if(ey[s.localName])r.children.push(this.parseMathElement(s));else if("r"==s.localName){var a=this.parseRun(s);a.type=c.MmlRun,r.children.push(a)}else s.localName==t&&(r.props=this.parseMathProperies(s));return r}parseMathProperies(e){let t={};for(let r of x.elements(e))switch(r.localName){case"chr":t.char=x.attr(r,"val");break;case"vertJc":t.verticalJustification=x.attr(r,"val");break;case"pos":t.position=x.attr(r,"val");break;case"degHide":t.hideDegree=x.boolAttr(r,"val");break;case"begChr":t.beginChar=x.attr(r,"val");break;case"endChr":t.endChar=x.attr(r,"val")}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,e=>{switch(e.localName){case"rStyle":t.styleName=x.attr(e,"val");break;case"vertAlign":t.verticalAlign=eP.valueOfVertAlign(e,!0);break;default:return!1}return!0})}parseVmlPicture(e){let t={type:c.VmlPicture,children:[]};for(let r of x.elements(e)){let e=function e(t,r){var a,s=new em;
1switch(t.localName){case"rect":s.tagName="rect",Object.assign(s.attrs,{width:"100%",height:"100%"});break;case"oval":s.tagName="ellipse",Object.assign(s.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":s.tagName="line";break;case"shape":s.tagName="g";break;case"textbox":s.tagName="foreignObject",Object.assign(s.attrs,{width:"100%",height:"100%"});break;default:return null}for(let e of x.attrs(t))switch(e.localName){case"style":s.cssStyleText=e.value;break;case"fillcolor":s.attrs.fill=e.value;break;case"from":let[t,r]=eu(e.value);Object.assign(s.attrs,{x1:t,y1:r});break;case"to":let[a,n]=eu(e.value);Object.assign(s.attrs,{x2:a,y2:n})}for(let n of x.elements(t))switch(n.localName){case"stroke":Object.assign(s.attrs,(a=n,{stroke:x.attr(a,"color"),"stroke-width":x.lengthAttr(a,"weight",w.Emu)??"1px"}));break;case"fill":Object.assign(s.attrs,{});break;case"imagedata":s.tagName="image",Object.assign(s.attrs,{width:"100%",height:"100%"}),s.imageHref={id:x.attr(n,"id"),title:x.attr(n,"title")};break;case"txbxContent":s.children.push(...r.parseBodyElements(n));break;default:let t=e(n,r);t&&s.children.push(t)}return s}(r,this);e&&t.children.push(e)}return t}checkAlternateContent(e){if("AlternateContent"!=e.localName)return e;var t=x.element(e,"Choice");if(t){var r=x.attr(t,"Requires"),a=e.lookupNamespaceURI(r);if(eb.includes(a))return t.firstElementChild}return x.element(e,"Fallback")?.firstElementChild}parseDrawing(e){for(var t of x.elements(e))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var t={type:c.Drawing,children:[],cssStyle:{}},r="anchor"==e.localName;let a=null,s=x.boolAttr(e,"simplePos");x.boolAttr(e,"behindDoc");let n={relative:"page",align:"left",offset:"0"},l={relative:"page",align:"top",offset:"0"};for(var i of x.elements(e))switch(i.localName){case"simplePos":s&&(n.offset=x.lengthAttr(i,"x",w.Emu),l.offset=x.lengthAttr(i,"y",w.Emu));break;case"extent":t.cssStyle.width=x.lengthAttr(i,"cx",w.Emu),t.cssStyle.height=x.lengthAttr(i,"cy",w.Emu);break;case"positionH":case"positionV":if(!s){let e="positionH"==i.localName?n:l;var o=x.element(i,"align"),h=x.element(i,"posOffset");e.relative=x.attr(i,"relativeFrom")??e.relative,o&&(e.align=o.textContent),h&&(e.offset=P(h.textContent,w.Emu))}break;case"wrapTopAndBottom":a="wrapTopAndBottom";break;case"wrapNone":a="wrapNone";break;case"graphic":var m=this.parseGraphic(i);m&&t.children.push(m)}return"wrapTopAndBottom"==a?(t.cssStyle.display="block",n.align&&(t.cssStyle["text-align"]=n.align,t.cssStyle.width="100%")):"wrapNone"==a?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",n.offset&&(t.cssStyle.left=n.offset),l.offset&&(t.cssStyle.top=l.offset)):r&&("left"==n.align||"right"==n.align)&&(t.cssStyle.float=n.align),t}parseGraphic(e){var t=x.element(e,"graphicData");for(let e of x.elements(t))if("pic"===e.localName)return this.parsePicture(e);return null}parsePicture(e){var t={type:c.Image,src:"",cssStyle:{}}
1,r=x.element(e,"blipFill"),a=x.element(r,"blip"),s=x.element(r,"srcRect");t.src=x.attr(a,"embed"),s&&(t.srcRect=[x.intAttr(s,"l",0)/1e5,x.intAttr(s,"t",0)/1e5,x.intAttr(s,"r",0)/1e5,x.intAttr(s,"b",0)/1e5]);var n=x.element(e,"spPr"),l=x.element(n,"xfrm");if(t.cssStyle.position="relative",l)for(var i of(t.rotation=x.intAttr(l,"rot",0)/6e4,x.elements(l)))switch(i.localName){case"ext":t.cssStyle.width=x.lengthAttr(i,"cx",w.Emu),t.cssStyle.height=x.lengthAttr(i,"cy",w.Emu);break;case"off":t.cssStyle.left=x.lengthAttr(i,"x",w.Emu),t.cssStyle.top=x.lengthAttr(i,"y",w.Emu)}return t}parseTable(e){var t={type:c.Table,children:[]};for(let r of x.elements(e))switch(r.localName){case"tr":t.children.push(this.parseTableRow(r));break;case"tblGrid":t.columns=this.parseTableColumns(r);break;case"tblPr":this.parseTableProperties(r,t)}return t}parseTableColumns(e){var t=[];for(let r of x.elements(e))"gridCol"===r.localName&&t.push({width:x.lengthAttr(r,"w")});return t}parseTableProperties(e,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,e=>{switch(e.localName){case"tblStyle":t.styleName=x.attr(e,"val");break;case"tblLook":t.className=eP.classNameOftblLook(e);break;case"tblpPr":this.parseTablePosition(e,t);break;case"tblStyleColBandSize":t.colBandSize=x.intAttr(e,"val");break;case"tblStyleRowBandSize":t.rowBandSize=x.intAttr(e,"val");break;case"hidden":t.cssStyle.display="none";break;default:return!1}return!0}),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto"}}parseTablePosition(e,t){var r=x.lengthAttr(e,"topFromText"),a=x.lengthAttr(e,"bottomFromText"),s=x.lengthAttr(e,"rightFromText"),n=x.lengthAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=eP.addSize(t.cssStyle["margin-bottom"],a),t.cssStyle["margin-left"]=eP.addSize(t.cssStyle["margin-left"],n),t.cssStyle["margin-right"]=eP.addSize(t.cssStyle["margin-right"],s),t.cssStyle["margin-top"]=eP.addSize(t.cssStyle["margin-top"],r)}parseTableRow(e){var t={type:c.Row,children:[]};for(let r of x.elements(e))switch(r.localName){case"tc":t.children.push(this.parseTableCell(r));break;case"trPr":case"tblPrEx":this.parseTableRowProperties(r,t)}return t}parseTableRowProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,e=>{switch(e.localName){case"cnfStyle":t.className=eP.classNameOfCnfStyle(e);break;case"tblHeader":t.isHeader=x.boolAttr(e,"val");break;case"gridBefore":t.gridBefore=x.intAttr(e,"val");break;case"gridAfter":t.gridAfter=x.intAttr(e,"val");break;default:return!1}return!0})}parseTableCell(e){var t={type:c.Cell,children:[]};for(let r of x.elements(e))switch(r.localName){case"tbl":t.children.push(this.parseTable(r));break;case"p":t.children.push(this.parseParagraph(r));break;case"tcPr":this.parseTableCellProperties(r,t)}return t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,e=>{switch(e.localName){case"gridSpan":t.span=x.intAttr(e,"val",null);break;case"vMerge":t.verticalMerge=x.attr(e,"val")??"continue";break;case"cnfStyle":t.className=eP.classNameOfCnfStyle(e);break;default:return!1}return!0}),this.parseTableCellVerticalText(e,t)}parseTableCellVerticalText(e,t){let r={btLr:{writingMode:"vertical-rl",transform:"rotate(180deg)"},lrTb:{writingMode:"vertical-lr",transform:"none"},tbRl:{writingMode:"vertical-rl",transform:"none"}};for(let a of x.elements(e))if("textDirection"===a.localName){let e=r[x.attr(a,"val")]||{writingMode:"horizontal-tb"};t.cssStyle["writing-mode"]=e.writingMode,t.cssStyle.transform=e.transform}}parseDefaultProperties(e,t=null,r=null,a=null){for(let s of(t=t||{},x.elements(e)))if(!a?.(s))switch(s.localName){case"jc":t["text-align"]=eP.valueOfJc(s);break;case"textAlignment":t["vertical-align"]=eP.valueOfTextAlignment(s);break;case"color":t.color=ew.colorAttr(s,"val",null,"black");break;case"sz":t["font-size"]=t["min-height"]=x.lengthAttr(s,"val",w.FontSize);break;case"shd":t["background-color"]=ew.colorAttr(s,"fill",null,"inherit");break;case"highlight":t["background-color"]=ew.colorAttr(s,"val",null,"transparent");break;case"vertAlign":break;case"position":t.verticalAlign=x.lengthAttr(s,"val",w.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=eP.valueOfSize(s,"w");break;case"trHeight":this.parseTrHeight(s,t);break;case"strike":t["text-decoration"]=x.boolAttr(s,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=x.boolAttr(s,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=x.boolAttr(s,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=x.boolAttr(s,"val",!0)?"uppercase":"none";break;case"smallCaps":t["font-variant"]=x.boolAttr(s,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(s,t);break;case"ind":case"tblInd":this.parseIndentation(s,t);break;case"rFonts":this.parseFont(s,t);break;case"tblBorders":this.parseBorderProperties(s,r||t);break;case"tblCellSpacing":t["border-spacing"]=eP.valueOfMargin(s),t["border-collapse"]="separate";break;case"pBdr":case"tcBorders":this.parseBorderProperties(s,t);break;case"bdr":t.border=eP.valueOfBorder(s);break;case"vanish":x.boolAttr(s,"val",!0)&&(t.display="none");break;case"kern":case"noWrap":case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"noProof":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(s,r||t);break;case"tblLayout":t["table-layout"]=eP.valueOfTblLayout(s);break;case"vAlign":t["vertical-align"]=eP.valueOfTextAlignment(s);break;
1case"spacing":"pPr"==e.localName&&this.parseSpacing(s,t);break;case"wordWrap":x.boolAttr(s,"val")&&(t["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":t.hyphens=x.boolAttr(s,"val",!0)?"none":"auto";break;case"lang":t.$lang=x.attr(s,"val");break;case"rtl":case"bidi":x.boolAttr(s,"val",!0)&&(t.direction="rtl");break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${e.localName}.${s.localName}`)}return t}parseUnderline(e,t){var r=x.attr(e,"val");if(null!=r){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":t["text-decoration"]="underline dotted";break;case"double":t["text-decoration"]="underline double";break;case"single":case"thick":case"words":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration"]="underline wavy";break;case"none":t["text-decoration"]="none"}var a=ew.colorAttr(e,"color");a&&(t["text-decoration-color"]=a)}}parseFont(e,t){var r=[x.attr(e,"ascii"),eP.themeValue(e,"asciiTheme"),x.attr(e,"eastAsia")].filter(e=>e).map(e=>u(e));r.length>0&&(t["font-family"]=[...new Set(r)].join(", "))}parseIndentation(e,t){var r=x.lengthAttr(e,"firstLine"),a=x.lengthAttr(e,"hanging"),s=x.lengthAttr(e,"left"),n=x.lengthAttr(e,"start"),l=x.lengthAttr(e,"right"),i=x.lengthAttr(e,"end");r&&(t["text-indent"]=r),a&&(t["text-indent"]=`-${a}`),(s||n)&&(t["margin-inline-start"]=s||n),(l||i)&&(t["margin-inline-end"]=l||i)}parseSpacing(e,t){var r=x.lengthAttr(e,"before"),a=x.lengthAttr(e,"after"),s=x.intAttr(e,"line",null),n=x.attr(e,"lineRule");if(r&&(t["margin-top"]=r),a&&(t["margin-bottom"]=a),null!==s)switch(n){case"auto":t["line-height"]=`${(s/240).toFixed(2)}`;break;case"atLeast":t["line-height"]=`calc(100% + ${s/20}pt)`;break;default:t["line-height"]=t["min-height"]=`${s/20}pt`}}parseMarginProperties(e,t){for(let r of x.elements(e))switch(r.localName){case"left":t["padding-left"]=eP.valueOfMargin(r);break;case"right":t["padding-right"]=eP.valueOfMargin(r);break;case"top":t["padding-top"]=eP.valueOfMargin(r);break;case"bottom":t["padding-bottom"]=eP.valueOfMargin(r)}}parseTrHeight(e,t){x.attr(e,"hRule"),t.height=x.lengthAttr(e,"val")}parseBorderProperties(e,t){for(let r of x.elements(e))switch(r.localName){case"start":case"left":t["border-left"]=eP.valueOfBorder(r);break;case"end":case"right":t["border-right"]=eP.valueOfBorder(r);break;case"top":t["border-top"]=eP.valueOfBorder(r);break;case"bottom":t["border-bottom"]=eP.valueOfBorder(r)}}}let ev=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class ew{static colorAttr(e,t,r=null,a="black"){var s=x.attr(e,t);if(s)return"auto"==s?a:ev.includes(s)?s:`#${s}`;var n=x.attr(e,"themeColor");return n?`var(--docx-${n}-color)`:r}}class eP{static themeValue(e,t){var r=x.attr(e,t);return r?`var(--docx-${r}-font)`:null}static valueOfSize(e,t){var r=w.Dxa;switch(x.attr(e,"type")){case"dxa":break;case"pct":r=w.Percent;break;case"auto":return"auto"}return x.lengthAttr(e,t,r)}static valueOfMargin(e){return x.lengthAttr(e,"w")}static valueOfBorder(e){var t=eP.parseBorderType(x.attr(e,"val"));if("none"==t)return"none";var r=ew.colorAttr(e,"color"),a=x.lengthAttr(e,"sz",w.Border);return`${a} ${t} ${"auto"==r?"black":r}`}static parseBorderType(e){switch(e){case"single":case"dashDotStroked":case"thick":case"thickThinLargeGap":case"thickThinMediumGap":case"thickThinSmallGap":case"thinThickLargeGap":case"thinThickMediumGap":case"thinThickSmallGap":case"thinThickThinLargeGap":case"thinThickThinMediumGap":case"thinThickThinSmallGap":case"threeDEmboss":case"threeDEngrave":case"wave":break;case"dashed":case"dashSmallGap":return"dashed";case"dotDash":case"dotDotDash":case"dotted":return"dotted";case"double":case"doubleWave":case"triple":return"double";case"inset":return"inset";case"nil":case"none":return"none";case"outset":return"outset"}return"solid"}static valueOfTblLayout(e){return"fixed"==x.attr(e,"val")?"fixed":"auto"}static classNameOfCnfStyle(e){let t=x.attr(e,"val"),r=["first-row","last-row","first-col","last-col","odd-col","even-col","odd-row","even-row","ne-cell","nw-cell","se-cell","sw-cell"];if(t)return r.filter((e,r)=>"1"==t[r]).join(" ");let a=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowLastColumn","firstRowFirstColumn","lastRowLastColumn","lastRowFirstColumn"];return r.filter((t,r)=>x.boolAttr(e,a[r])).join(" ")}static valueOfJc(e){var t=x.attr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t}static valueOfVertAlign(e,t=!1){var r=x.attr(e,"val");switch(r){case"subscript":return"sub";case"superscript":return t?"sup":"super"}return t?null:r}static valueOfTextAlignment(e){var t=x.attr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t}static addSize(e,t){return null==e?t:null==t?e:`calc(${e} + ${t})`}static classNameOftblLook(e){let t=x.hexAttr(e,"val",0),r="";return(x.boolAttr(e,"firstRow")||32&t)&&(r+=" first-row"),(x.boolAttr(e,"lastRow")||64&t)&&(r+=" last-row"),(x.boolAttr(e,"firstColumn")||128&t)&&(r+=" first-col"),(x.boolAttr(e,"lastColumn")||256&t)&&(r+=" last-col"),(x.boolAttr(e,"noHBand")||512&t)&&(r+=" no-hband"),(x.boolAttr(e,"noVBand")||1024&t)&&(r+=" no-vband"),r.trim()}}let eS={pos:0,leader:"none",style:"left"};function eM(e){return parseFloat(e)}function ex(e){if(b(e))return document.createTextNode(e);if(e instanceof Node)return e;let{ns:t,tagName:r,className:a,style:s,children:n,...l}=e;if("#fragment"===r)return document.createDocumentFragment();if("#comment"===r)return document.createComment(n[0]);let i=t?document.createElementNS(t,r):document.createElement(r);if(a&&i.setAttribute("class",a),s&&(b(s)?i.setAttribute("style",s):Object.assign(i.style,s)),l)for(let[e,t]of Object.entries(l))void 0!==t&&(i[e]=t);
1return n&&n.forEach(e=>i.appendChild(ex(e))),i}(l=h||(h={})).html="http://www.w3.org/1999/xhtml",l.svg="http://www.w3.org/2000/svg",l.mathML="http://www.w3.org/1998/Math/MathML";class eN{constructor(){this.className="docx",this.styleMap={},this.currentPart=null,this.tableVerticalMerges=[],this.currentVerticalMerge=null,this.tableCellPositions=[],this.currentCellPosition=null,this.footnoteMap={},this.endnoteMap={},this.currentEndnoteIds=[],this.usedHederFooterParts=[],this.currentTabs=[],this.commentMap={},this.tasks=[],this.postRenderTasks=[],this.h=ex}async render(e,t){this.document=e,this.options=t,this.className=t.className,this.rootSelector=t.inWrapper?`.${this.className}-wrapper`:":root",this.h=t.h??ex,this.styleMap=null,this.tasks=[],this.options.renderComments&&globalThis.Highlight&&(this.commentHighlight=new Highlight);let r=[...this.renderDefaultStyle()];e.themePart&&r.push(...this.renderTheme(e.themePart)),null!=e.stylesPart&&(this.styleMap=this.processStyles(e.stylesPart.styles),r.push(...this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(this.prodessNumberings(e.numberingPart.domNumberings),r.push(...await this.renderNumbering(e.numberingPart.domNumberings))),e.footnotesPart&&(this.footnoteMap=g(e.footnotesPart.notes,e=>e.id)),e.endnotesPart&&(this.endnoteMap=g(e.endnotesPart.notes,e=>e.id)),e.settingsPart&&(this.defaultTabSize=e.settingsPart.settings?.defaultTabStop),!t.ignoreFonts&&e.fontTablePart&&r.push(...await this.renderFontTable(e.fontTablePart));var a=this.renderSections(e.documentPart.body);return this.options.inWrapper?r.push(this.renderWrapper(a)):r.push(...a),this.commentHighlight&&t.renderComments&&CSS.highlights.set(`${this.className}-comments`,this.commentHighlight),this.postRenderTasks.forEach(e=>e()),await Promise.allSettled(this.tasks),this.refreshTabStops(),r}renderTheme(e){let t={},r=e.theme?.fontScheme;r&&(r.majorFont&&(t["--docx-majorHAnsi-font"]=r.majorFont.latinTypeface),r.minorFont&&(t["--docx-minorHAnsi-font"]=r.minorFont.latinTypeface));let a=e.theme?.colorScheme;if(a)for(let[e,r]of Object.entries(a.colors))t[`--docx-${e}-color`]=`#${r}`;let s=this.styleToString(`.${this.className}`,t);return[this.h({tagName:"#comment",children:["docxjs document theme values"]}),this.h({tagName:"style",children:[s]})]}async renderFontTable(e){let t=[];for(let r of e.fonts)for(let e of r.embedFontRefs)try{let a=await this.document.loadFont(e.id,e.key),s={"font-family":u(r.name),src:`url(${a})`};("bold"==e.type||"boldItalic"==e.type)&&(s["font-weight"]="bold"),("italic"==e.type||"boldItalic"==e.type)&&(s["font-style"]="italic"),t.push(this.h({tagName:"#comment",children:[`docxjs ${r.name} font`]})),t.push(this.h({tagName:"style",children:[this.styleToString("@font-face",s)]}))}catch(t){this.options.debug&&console.warn(`Can't load font with id ${e.id} and key ${e.key}`)}return t}processStyleName(e){return e?`${this.className}_${e?.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}`:this.className}processStyles(e){let t=g(e.filter(e=>null!=e.id),e=>e.id);for(let a of e.filter(e=>e.basedOn)){var r=t[a.basedOn];if(r)for(let e of(a.paragraphProps=y(a.paragraphProps,r.paragraphProps),a.runProps=y(a.runProps,r.runProps),r.styles)){let t=a.styles.find(t=>t.target==e.target);t?this.copyStyleProperties(e.values,t.values):a.styles.push({...e,values:{...e.values}})}else this.options.debug&&console.warn(`Can't find base style ${a.basedOn}`)}for(let t of e)t.cssName=this.processStyleName(t.id);return t}prodessNumberings(e){for(let t of e.filter(e=>e.pStyleName)){let e=this.findStyle(t.pStyleName);e?.paragraphProps?.numbering&&(e.paragraphProps.numbering.level=t.level)}}processElement(e){if(e.children)for(var t of e.children)t.parent=e,t.type==c.Table?this.processTable(t):this.processElement(t)}processTable(e){for(var t of e.children)for(var r of t.children)r.cssStyle=this.copyStyleProperties(e.cellStyle,r.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(r)}copyStyleProperties(e,t,r=null){if(!e)return t;for(var a of(null==t&&(t={}),null==r&&(r=Object.getOwnPropertyNames(e)),r))e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(t[a]=e[a]);return t}createPageElement(e,t,r){let a={...r};return t&&(t.pageMargins&&(a.paddingLeft=t.pageMargins.left,a.paddingRight=t.pageMargins.right,a.paddingTop=t.pageMargins.top,a.paddingBottom=t.pageMargins.bottom),t.pageSize&&(this.options.ignoreWidth||(a.width=t.pageSize.width),this.options.ignoreHeight||(a.minHeight=t.pageSize.height))),this.h({tagName:"section",className:e,style:a})}createSectionContent(e){let t={};return e.columns&&e.columns.numberOfColumns&&(t.columnCount=`${e.columns.numberOfColumns}`,t.columnGap=e.columns.space,e.columns.separator&&(t.columnRule="1px solid black")),this.h({tagName:"article",style:t})}renderSections(e){let t=[];this.processElement(e);let r=this.splitBySection(e.children,e.props),a=this.groupByPageBreaks(r),s=null;for(let r=0,l=a.length;r<l;r++){this.currentFootnoteIds=[];let i=a[r][0].sectProps,o=this.createPageElement(this.className,i,e.cssStyle);for(let e of(this.options.renderHeaders&&this.renderHeaderFooter(i.headerRefs,i,t.length,s!=i,o),a[r])){var n=this.createSectionContent(e.sectProps);this.renderElements(e.elements,n),o.appendChild(n),i=e.sectProps}
1if(this.options.renderFootnotes){let e=this.renderNotes(this.currentFootnoteIds,this.footnoteMap);e&&o.appendChild(e)}if(this.options.renderEndnotes&&r==l-1){let e=this.renderNotes(this.currentEndnoteIds,this.endnoteMap);e&&o.appendChild(e)}this.options.renderFooters&&this.renderHeaderFooter(i.footerRefs,i,t.length,s!=i,o),t.push(o),s=i}return t}renderHeaderFooter(e,t,r,a,s){if(e){var n=(t.titlePage&&a?e.find(e=>"first"==e.type):null)??(r%2==1?e.find(e=>"even"==e.type):null)??e.find(e=>"default"==e.type),l=n&&this.document.findPartByRelId(n.id,this.document.documentPart);if(l){this.currentPart=l,this.usedHederFooterParts.includes(l.path)||(this.processElement(l.rootElement),this.usedHederFooterParts.push(l.path));let[e]=this.renderElements([l.rootElement],s);t?.pageMargins&&(l.rootElement.type===c.Header?(e.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,e.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):l.rootElement.type===c.Footer&&(e.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,e.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type==c.Break&&("lastRenderedPageBreak"==e.break?!this.options.ignoreLastRenderedPageBreak:"page"==e.break)}isPageBreakSection(e,t){return!!e&&!!t&&(e.pageSize?.orientation!=t.pageSize?.orientation||e.pageSize?.width!=t.pageSize?.width||e.pageSize?.height!=t.pageSize?.height)}splitBySection(e,t){var r={sectProps:null,elements:[],pageBreak:!1},a=[r];for(let t of e){if(t.type==c.Paragraph){let e=this.findStyle(t.styleName);e?.paragraphProps?.pageBreakBefore&&(r.sectProps=s,r.pageBreak=!0,r={sectProps:null,elements:[],pageBreak:!1},a.push(r))}if(r.elements.push(t),t.type==c.Paragraph){var s=t.sectionProps,n=-1,l=-1;if(this.options.breakPages&&t.children&&(n=t.children.findIndex(e=>-1!=(l=e.children?.findIndex(this.isPageBreakElement.bind(this))??-1))),(s||-1!=n)&&(r.sectProps=s,r.pageBreak=-1!=n,r={sectProps:null,elements:[],pageBreak:!1},a.push(r)),-1!=n){let e=t.children[n],a=l<e.children.length-1;if(n<t.children.length-1||a){var i=t.children,o={...t,children:i.slice(n)};if(t.children=i.slice(0,n),r.elements.push(o),a){let r=e.children,a={...e,children:r.slice(0,l)};t.children.push(a),e.children=r.slice(l)}}}}}let h=null;for(let e=a.length-1;e>=0;e--)null==a[e].sectProps?a[e].sectProps=h??t:h=a[e].sectProps;return a}groupByPageBreaks(e){let t,r=[],a=[r];for(let s of e)r.push(s),(this.options.ignoreLastRenderedPageBreak||s.pageBreak||this.isPageBreakSection(t,s.sectProps))&&a.push(r=[]),t=s.sectProps;return a.filter(e=>e.length>0)}renderWrapper(e){return this.h({tagName:"div",className:`${this.className}-wrapper`,children:e})}renderDefaultStyle(){var e=this.className,t=`
2.${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } 
3.${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }`;this.options.hideWrapperOnPrint&&(t=`@media not print { ${t} }`);var r=`${t}
4.${e} { color: black; hyphens: auto; text-underline-position: from-font; }
5section.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
6section.${e}>article { margin-bottom: auto; z-index: 1; }
7section.${e}>footer { z-index: 1; }
8.${e} table { border-collapse: collapse; }
9.${e} table td, .${e} table th { vertical-align: top; }
10.${e} p { margin: 0pt; min-height: 1em; }
11.${e} span { white-space: pre-wrap; overflow-wrap: break-word; }
12.${e} a { color: inherit; text-decoration: inherit; }
13.${e} svg { fill: transparent; }
14`;return this.options.renderComments&&(r+=`
15.${e}-comment-ref { cursor: default; }
16.${e}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; }
17.${e}-comment-ref:hover~.${e}-comment-popover { display: block; }
18.${e}-comment-author,.${e}-comment-date { font-size: 0.875rem; color: #888; }
19`),[this.h({tagName:"#comment",children:["docxjs library predefined styles"]}),this.h({tagName:"style",children:[r]})]}async renderNumbering(e){var t="",r=[];for(var a of e){var s=`p.${this.numberingClass(a.id,a.level)}`,n="none";if(a.bullet){let e=`--${this.className}-${a.bullet.src}`.toLowerCase();t+=this.styleToString(`${s}:before`,{content:"' '",display:"inline-block",background:`var(${e})`},a.bullet.style);try{let r=await this.document.loadNumberingImage(a.bullet.src);t+=`${this.rootSelector} { ${e}: url(${r}) }`}catch(e){this.options.debug&&console.warn(`Can't load numbering image with src ${a.bullet.src}`)}}else if(a.levelText){let e=this.numberingCounter(a.id,a.level),n=e+" "+(a.start-1);a.level>0&&(t+=this.styleToString(`p.${this.numberingClass(a.id,a.level-1)}`,{"counter-set":n})),r.push(n),t+=this.styleToString(`${s}:before`,{content:this.levelTextToContent(a.levelText,a.suff,a.id,this.numFormatToCssValue(a.format)),"counter-increment":e,...a.rStyle})}else n=this.numFormatToCssValue(a.format);t+=this.styleToString(s,{display:"list-item","list-style-position":"inside","list-style-type":n,...a.pStyle})}return r.length>0&&(t+=this.styleToString(this.rootSelector,{"counter-reset":r.join(" ")})),[this.h({tagName:"#comment",children:["docxjs document numbering styles"]}),this.h({tagName:"style",children:[t]})]}renderStyles(e){var t="";let r=this.styleMap,a=g(e.filter(e=>e.isDefault),e=>e.target);for(let i of e){var s=i.styles;if(i.linked){var n=i.linked&&r[i.linked];n?s=s.concat(n.styles):this.options.debug&&console.warn(`Can't find linked style ${i.linked}`)}for(let e of s){var l=`${i.target??""}.${i.cssName}`;i.target!=e.target&&(l+=` ${e.target}`),a[i.target]==i&&(l=`.${this.className} ${i.target}, `+l),t+=this.styleToString(l,e.values)}}return[this.h({tagName:"#comment",children:["docxjs document styles"]}),this.h({tagName:"style",children:[t]})]}renderNotes(e,t){var r=e.map(e=>t[e]).filter(e=>e);if(r.length>0)return this.h({tagName:"ol",children:this.renderElements(r)})}renderElement(e){switch(e.type){case c.Paragraph:return this.renderParagraph(e);case c.BookmarkStart:return this.renderBookmarkStart(e);case c.BookmarkEnd:break;
19case c.Run:return this.renderRun(e);case c.Table:return this.renderTable(e);case c.Row:return this.renderTableRow(e);case c.Cell:return this.renderTableCell(e);case c.Hyperlink:return this.renderHyperlink(e);case c.SmartTag:return this.renderSmartTag(e);case c.Drawing:return this.renderDrawing(e);case c.Image:return this.renderImage(e);case c.Text:case c.Text:return this.renderText(e);case c.DeletedText:return this.renderDeletedText(e);case c.Tab:return this.renderTab(e);case c.Symbol:return this.renderSymbol(e);case c.Break:return this.renderBreak(e);case c.Footer:return this.renderContainer(e,"footer");case c.Header:return this.renderContainer(e,"header");case c.Footnote:case c.Endnote:return this.renderContainer(e,"li");case c.FootnoteReference:return this.renderFootnoteReference(e);case c.EndnoteReference:return this.renderEndnoteReference(e);case c.NoBreakHyphen:return this.h({tagName:"wbr"});case c.VmlPicture:return this.renderVmlPicture(e);case c.VmlElement:return this.renderVmlElement(e);case c.MmlMath:return this.renderContainerNS(e,h.mathML,"math",{xmlns:h.mathML});case c.MmlMathParagraph:return this.renderContainer(e,"span");case c.MmlFraction:return this.renderContainerNS(e,h.mathML,"mfrac");case c.MmlBase:return this.renderContainerNS(e,h.mathML,e.parent.type==c.MmlMatrixRow?"mtd":"mrow");case c.MmlNumerator:case c.MmlDenominator:case c.MmlFunction:case c.MmlLimit:case c.MmlBox:return this.renderContainerNS(e,h.mathML,"mrow");case c.MmlGroupChar:return this.renderMmlGroupChar(e);case c.MmlLimitLower:return this.renderContainerNS(e,h.mathML,"munder");case c.MmlMatrix:return this.renderContainerNS(e,h.mathML,"mtable");case c.MmlMatrixRow:return this.renderContainerNS(e,h.mathML,"mtr");case c.MmlRadical:return this.renderMmlRadical(e);case c.MmlSuperscript:return this.renderContainerNS(e,h.mathML,"msup");case c.MmlSubscript:return this.renderContainerNS(e,h.mathML,"msub");case c.MmlDegree:case c.MmlSuperArgument:case c.MmlSubArgument:return this.renderContainerNS(e,h.mathML,"mn");case c.MmlFunctionName:return this.renderContainerNS(e,h.mathML,"ms");case c.MmlDelimiter:return this.renderMmlDelimiter(e);case c.MmlRun:return this.renderMmlRun(e);case c.MmlNary:return this.renderMmlNary(e);case c.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case c.MmlBar:return this.renderMmlBar(e);case c.MmlEquationArray:return this.renderMllList(e);case c.Inserted:return this.renderInserted(e);case c.Deleted:return this.renderDeleted(e);case c.CommentRangeStart:return this.renderCommentRangeStart(e);case c.CommentRangeEnd:return this.renderCommentRangeEnd(e);case c.CommentReference:return this.renderCommentReference(e);case c.AltChunk:return this.renderAltChunk(e)}return null}renderElements(e,t){if(null==e)return null;var r=e.flatMap(e=>this.renderElement(e)).filter(e=>null!=e);return t&&r.forEach(e=>t.appendChild(b(e)?document.createTextNode(e):e)),r}renderContainer(e,t,r){return this.h({tagName:t,children:this.renderElements(e.children),...r})}renderContainerNS(e,t,r,a){return this.h({ns:t,tagName:r,children:this.renderElements(e.children),...a})}renderParagraph(e){var t=this.toHTML(e,h.html,"p");let r=this.findStyle(e.styleName);e.tabs??(e.tabs=r?.paragraphProps?.tabs);let a=e.numbering??r?.paragraphProps?.numbering;return a&&t.classList.add(this.numberingClass(a.id,a.level)),t}renderHyperlink(e){let t=this.toH(e,h.html,"a");if(t.href="",e.id){let r=this.document.documentPart.rels.find(t=>t.id==e.id&&"External"===t.targetMode);t.href=r?.target??t.href}return e.anchor&&(t.href+=`#${e.anchor}`),this.h(t)}renderSmartTag(e){return this.renderContainer(e,"span")}renderCommentRangeStart(e){if(!this.options.renderComments)return null;let t=new Range;this.commentHighlight?.add(t);let r=this.h({tagName:"#comment",children:[`start of comment #${e.id}`]});return this.later(()=>t.setStart(r,0)),this.commentMap[e.id]=t,r}renderCommentRangeEnd(e){if(!this.options.renderComments)return null;let t=this.commentMap[e.id],r=this.h({tagName:"#comment",children:[`end of comment #${e.id}`]});return this.later(()=>t?.setEnd(r,0)),r}renderCommentReference(e){if(!this.options.renderComments)return null;var t=this.document.commentsPart?.commentMap[e.id];if(!t)return null;let r=this.h({tagName:"span",className:`${this.className}-comment-ref`,children:["\uD83D\uDCAC"]}),a=this.h({tagName:"div",className:`${this.className}-comment-popover`,children:[this.h({tagName:"div",className:`${this.className}-comment-author`,children:[t.author]}),this.h({tagName:"div",className:`${this.className}
19-comment-date`,children:[new Date(t.date).toLocaleString()]}),...this.renderElements(t.children)]});return this.h({tagName:"#fragment",children:[this.h({tagName:"#comment",children:[`comment #${t.id} by ${t.author} on ${t.date}`]}),r,a]})}renderAltChunk(e){if(!this.options.renderAltChunks)return null;var t=this.h({tagName:"iframe"});return this.tasks.push(this.document.loadAltChunk(e.id,this.currentPart).then(e=>{t.srcdoc=e})),t}renderDrawing(e){var t=this.toHTML(e,h.html,"div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",t}renderImage(e){let t=this.toHTML(e,h.html,"img",[]),r=e.cssStyle?.transform;if(e.srcRect&&e.srcRect.some(e=>0!=e)){var[a,s,n,l]=e.srcRect;r=`scale(${1/(1-a-n)}, ${1/(1-s-l)})`,t.style["clip-path"]=`rect(${(100*s).toFixed(2)}% ${(100*(1-n)).toFixed(2)}% ${(100*(1-l)).toFixed(2)}% ${(100*a).toFixed(2)}%)`}return e.rotation&&(r=`rotate(${e.rotation}deg) ${r??""}`),t.style.transform=r?.trim(),this.document&&this.tasks.push(this.document.loadDocumentImage(e.src,this.currentPart).then(e=>{t.src=e})),t}renderText(e){return this.h(e.text)}renderDeletedText(e){return this.options.renderChanges?this.renderText(e):null}renderBreak(e){return"textWrapping"==e.break?this.h({tagName:"br"}):null}renderInserted(e){return this.options.renderChanges?this.renderChange(e,"ins"):this.renderElements(e.children)}renderDeleted(e){return this.options.renderChanges?this.renderChange(e,"del"):null}renderChange(e,t){return this.renderContainer(e,t,{dateTime:e.date})}renderSymbol(e){return this.h({tagName:"span",children:[String.fromCharCode(e.char)],style:{fontFamily:e.font}})}renderFootnoteReference(e){return this.currentFootnoteIds.push(e.id),this.h({tagName:"sup",children:[`${this.currentFootnoteIds.length}`]})}renderEndnoteReference(e){return this.currentEndnoteIds.push(e.id),this.h({tagName:"sup",children:[`${this.currentEndnoteIds.length}`]})}renderTab(e){var t=this.h({tagName:"span",children:[" "]});if(this.options.experimental){t.className=this.tabStopClass();var r=function(e,t){for(var r=e.parent;null!=r&&r.type!=t;)r=r.parent;return r}(e,c.Paragraph)?.tabs;this.currentTabs.push({stops:r,span:t})}return t}renderBookmarkStart(e){return this.h({tagName:"span",id:e.name})}renderRun(e){if(e.fieldRun)return null;let t=this.renderElements(e.children);e.verticalAlign&&(t=[this.h({tagName:e.verticalAlign,children:this.renderElements(e.children)})]);let r=this.toHTML(e,h.html,"span",t);return e.id&&(r.id=e.id),r}renderTable(e){this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0};let t=[];return e.columns&&t.push(this.renderTableColumns(e.columns)),t.push(...this.renderElements(e.children)),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),this.toHTML(e,h.html,"table",t)}renderTableColumns(e){let t=e.map(e=>this.h({tagName:"col",style:{width:e.width}}));return this.h({tagName:"colgroup",children:t})}renderTableRow(e){this.currentCellPosition.col=0;let t=[];return e.gridBefore&&t.push(this.renderTableCellPlaceholder(e.gridBefore)),t.push(...this.renderElements(e.children)),e.gridAfter&&t.push(this.renderTableCellPlaceholder(e.gridAfter)),this.currentCellPosition.row++,this.toHTML(e,h.html,"tr",t)}renderTableCellPlaceholder(e){return this.h({tagName:"td",colSpan:e,style:{border:"none"}})}renderTableCell(e){let t=this.toHTML(e,h.html,"td"),r=this.currentCellPosition.col;return e.verticalMerge?"restart"==e.verticalMerge?(this.currentVerticalMerge[r]=t,t.rowSpan=1):this.currentVerticalMerge[r]&&(this.currentVerticalMerge[r].rowSpan+=1,t.style.display="none"):this.currentVerticalMerge[r]=null,e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){return this.renderContainer(e,"div")}renderVmlElement(e){var t=this.h({ns:h.svg,tagName:"svg",style:e.cssStyleText});let r=this.renderVmlChildElement(e);return e.imageHref?.id&&this.tasks.push(this.document?.loadDocumentImage(e.imageHref.id,this.currentPart).then(e=>r.setAttribute("href",e))),t.appendChild(r),requestAnimationFrame(()=>{let e=t.firstElementChild.getBBox();t.setAttribute("width",`${Math.ceil(e.x+e.width)}`),t.setAttribute("height",`${Math.ceil(e.y+e.height)}`)}),t}renderVmlChildElement(e){let t=this.createSvgElement(e.tagName);
19for(let r of(Object.entries(e.attrs).forEach(([e,r])=>t.setAttribute(e,r)),e.children))r.type==c.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...k(this.renderElement(r)));return t}renderMmlRadical(e){let t=e.children.find(e=>e.type==c.MmlBase);if(e.props?.hideDegree)return this.createMathMLElement("msqrt",null,this.renderElements([t]));let r=e.children.find(e=>e.type==c.MmlDegree);return this.createMathMLElement("mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){let t=[];return t.push(this.createMathMLElement("mo",null,[e.props.beginChar??"("])),t.push(...this.renderElements(e.children)),t.push(this.createMathMLElement("mo",null,[e.props.endChar??")"])),this.createMathMLElement("mrow",null,t)}renderMmlNary(e){let t=[],r=g(e.children,e=>e.type),a=r[c.MmlSuperArgument],s=r[c.MmlSubArgument],n=a?this.createMathMLElement("mo",null,k(this.renderElement(a))):null,l=s?this.createMathMLElement("mo",null,k(this.renderElement(s))):null,i=this.createMathMLElement("mo",null,[e.props?.char??"∫"]);return n||l?t.push(this.createMathMLElement("munderover",null,[i,l,n])):n?t.push(this.createMathMLElement("mover",null,[i,n])):l?t.push(this.createMathMLElement("munder",null,[i,l])):t.push(i),t.push(...this.renderElements(r[c.MmlBase].children)),this.createMathMLElement("mrow",null,t)}renderMmlPreSubSuper(e){let t=[],r=g(e.children,e=>e.type),a=r[c.MmlSuperArgument],s=r[c.MmlSubArgument],n=a?this.createMathMLElement("mo",null,k(this.renderElement(a))):null,l=s?this.createMathMLElement("mo",null,k(this.renderElement(s))):null,i=this.createMathMLElement("mo",null);return t.push(this.createMathMLElement("msubsup",null,[i,l,n])),t.push(...this.renderElements(r[c.MmlBase].children)),this.createMathMLElement("mrow",null,t)}renderMmlGroupChar(e){let t="bot"===e.props.verticalJustification?"mover":"munder",r=this.renderContainerNS(e,h.mathML,t);return e.props.char&&r.appendChild(this.createMathMLElement("mo",null,[e.props.char])),r}renderMmlBar(e){let t={};switch(e.props.position){case"top":t.textDecoration="overline";break;case"bottom":t.textDecoration="underline"}return this.renderContainerNS(e,h.mathML,"mrow",{style:t})}renderMmlRun(e){return this.toHTML(e,h.mathML,"ms")}renderMllList(e){let t=this.renderElements(e.children).map(e=>this.createMathMLElement("mtr",null,[this.createMathMLElement("mtd",null,[e])]));return this.toHTML(e,h.mathML,"mtable",t)}toH(e,t,r,a=null){let{$lang:s,...n}=e.cssStyle??{};return{ns:t,tagName:r,className:function(...e){return e.filter(Boolean).join(" ")}(e.className,e.styleName&&this.processStyleName(e.styleName)),lang:s,style:n,children:a??this.renderElements(e.children)}}toHTML(e,t,r,a=null){return this.h(this.toH(e,t,r,a))}findStyle(e){return e&&this.styleMap?.[e]}numberingClass(e,t){return`${this.className}-num-${e}-${t}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(e,t,r=null){let a=`${e} {\r
20`;for(let e in t)e.startsWith("$")||(a+=`  ${e}: ${t[e]};\r
21`);return r&&(a+=r),a+"}\r\n"}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,r,a){var s=e.replace(/%\d*/g,e=>{let t=parseInt(e.substring(1),10)-1;return`"counter(${this.numberingCounter(r,t)}, ${a})"`});return`"${s}${({tab:"\\9",space:"\\a0"})[t]??""}"`}numFormatToCssValue(e){return({none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"})[e]??e}refreshTabStops(){this.options.experimental&&setTimeout(()=>{let e=function(e=document.body){let t=document.createElement("div");t.style.width="100pt",e.appendChild(t);let r=100/t.offsetWidth;return e.removeChild(t),r}();for(let t of this.currentTabs)!function(e,t,r,a=.75){let s=e.closest("p"),n=e.getBoundingClientRect(),l=s.getBoundingClientRect(),i=getComputedStyle(s),o=t?.length>0?t.map(e=>({pos:eM(e.position),leader:e.leader,style:e.style})).sort((e,t)=>
21e.pos-t.pos):[eS],c=o[o.length-1],h=l.width*a,m=eM(r),u=c.pos+m;if(u<h)for(;u<h&&o.length<50;u+=m)o.push({...eS,pos:u});let p=parseFloat(i.marginLeft),d=l.left+p,g=(n.left-d)*a,f=o.find(e=>"clear"!=e.style&&e.pos>g);if(null==f)return;let b=1;if("right"==f.style||"center"==f.style){let t=Array.from(s.querySelectorAll(`.${e.className}`)),r=t.indexOf(e)+1,n=document.createRange();n.setStart(e,1),r<t.length?n.setEndBefore(t[r]):n.setEndAfter(s);let i="center"==f.style?.5:1,o=n.getBoundingClientRect(),c=o.left+i*o.width-(l.left-p);b=f.pos-c*a}else b=f.pos-g;switch(e.innerHTML="&nbsp;",e.style.textDecoration="inherit",e.style.wordSpacing=`${b.toFixed(0)}pt`,f.leader){case"dot":case"middleDot":e.style.textDecoration="underline",e.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":e.style.textDecoration="underline"}}(t.span,t.stops,this.defaultTabSize,e)},500)}createElementNS(e,t,r,a){return this.h({ns:e,tagName:t,children:a,...r})}createElement(e,t,r){return this.createElementNS(h.html,e,t,r)}createMathMLElement(e,t,r){return this.createElementNS(h.mathML,e,t,r)}createSvgElement(e,t,r){return this.createElementNS(h.svg,e,t,r)}later(e){this.postRenderTasks.push(e)}}let eC={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,hideWrapperOnPrint:!1,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1,renderComments:!1,renderAltChunks:!0,h:ex};async function eT(e,t){let r={...eC,...t},a=new eN;return await a.render(e,r)}async function eA(e,t,r,a){let s,n=await (s={...eC,...a},eh.load(e,new ek(s),s)),l=await eT(n,a);for(let e of(r??(r=t),r.innerHTML="",t.innerHTML="",l))("STYLE"===e.nodeName?r:t).appendChild(e);return n}}}]);
22//# sourceMappingURL=6825.128f55ed4e0f3bde.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.