!function(){var e={60:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r>>6,s[o++]=128|63&t):t<65536?(s[o++]=224|t>>>12,s[o++]=128|t>>>6&63,s[o++]=128|63&t):(s[o++]=240|t>>>18,s[o++]=128|t>>>12&63,s[o++]=128|t>>>6&63,s[o++]=128|63&t);return s}e.exports=function(e,r){for(var n=0,o=r.modules;n65536){var h=t(s);a+=h.length,u.push(h),s=""}s+=f,l+=f.length,delete i[c]}var d=t(s);a+=d.length,u.push(d);for(var v=new Uint8Array(a),g=0,m=0;m0;){var a=b(o);c(r,a.errors),o=a.traits}if(r.length>0)return{pairs:n,errors:r};for(var i=0,s=0;s=0?i:0}return{pairs:n,errors:r}}(s=i(s)),h=p.pairs,d=p.errors,v=0,y=null,x=h.map((function(t){var n,o,i=t[0].part.expandTo;if("auto"===i&&"text"!==a){var s=f(e,t,r.expandTags);s.error&&d.push(s.error),i=s.value}if(!i||"text"===a){var c=t[0].offset,p=t[1].offset;return c0)return{postparsed:e,errors:d};var w,T=0;return{postparsed:e.reduce((function(t,r,n){var a=Te.length)&&(t=e.length);for(var r=0,n=Array(t);r",">"],['"',"""],["'","'"]],v=d.map((function(e){var t,r,o=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}(t,r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1];return{rstart:new RegExp(i,"g"),rend:new RegExp(a,"g"),start:i,end:a}})),g=new RegExp(String.fromCharCode(160),"g");function m(e,t){return e===""}function y(e,t){return 0===e.indexOf("<"+t)&&-1!==[">"," ","/"].indexOf(e[t.length+1])}function b(e,t,r){"string"==typeof t&&(t=[t]);for(var n=1,o=r,a=e.length;o=0;o--)for(var a=e[o],i=0,s=t;i0&&s.push(u)}return s},last:u,first:c,xml2str:function(e){return(new i).serializeToString(e).replace(/xmlns(:[a-z0-9]+)?="" ?/g,"")},str2xml:function(e){return 65279===e.charCodeAt(0)&&(e=e.substr(1)),(new a).parseFromString(e,"text/xml")},getRightOrNull:b,getRight:function(e,t,r){var n=b(e,t,r);if(null!==n)return n;s({position:"right",element:t,parsed:e,index:r})},getLeftOrNull:x,getLeft:function(e,t,r){var n=x(e,t,r);if(null!==n)return n;s({position:"left",element:t,parsed:e,index:r})},pregMatchAll:function(e,t){for(var r,n=[];null!=(r=e.exec(t));)n.push({array:r,offset:r.index});return n},convertSpaces:function(e){return e.replace(g," ")},charMapRegexes:v,hasCorruptCharacters:function(e){return w.lastIndex=0,w.test(e)},removeCorruptCharacters:function(e){return"string"!=typeof e&&(e=String(e)),e.replace(w,"")},getDefaults:function(){return{errorLogging:"json",stripInvalidXMLChars:!1,paragraphLoop:!1,nullGetter:function(e){return e.module?"":"undefined"},xmlFileNames:["[Content_Types].xml"],parser:p,warnFn:f,linebreaks:!1,fileTypeConfig:null,delimiters:{start:"{",end:"}"},syntax:{changeDelimiterPrefix:"="}}},wordToUtf8:function(e){for(var t=v.length-1;t>=0;t--){var r=v[t];e=e.replace(r.rstart,r.end)}return e},utf8ToWord:function(e){var t,r;e=null!==(t=e)&&void 0!==t&&t.toString?e.toString():"";for(var n=0,o=v.length;n");return-1===o&&(o=e.lastIndexOf(">")),e.substr(0,o)+" ".concat(t,'="').concat(r,'"')+e.substr(o)},isWhiteSpace:function(e){return/^[ \n\r\t]+$/.test(e)},stableSort:function(e,t){return e.map((function(e,t){return{item:e,index:t}})).sort((function(e,r){return t(e.item,r.item)||e.index-r.index})).map((function(e){return e.item}))}}},208:function(e,t,r){var n=r(207),o=n.startsWith,a=n.endsWith,i=n.isStarting,s=n.isEnding,l=n.isWhiteSpace,u=r(322);e.exports=function(e,t){var r=t.fileTypeConfig.tagShouldContain||[],n="",c=-1;-1!==u.docx.indexOf(t.contentType)&&(e=function(e){for(var t="",r=0,n=e.length;r")&&(o(i,"")||o(i,"")||(i="".concat(i))),t=i,e[r]=i)}return e}(e));for(var p=-1,f=0,h=r.length;f0;O--)if(i(e[O],b)){P=O;break}for(var S=P;S<=e.length;S++){if(s(e[S],b)){e[S]="";break}e[S]=""}}else{for(var j=p;j<=x;j++)e[j]="";y||(e[x]=n+m+T)}n+=T;for(var E=0,C=g.length;E0&&void 0!==arguments[0]?arguments[0]:{}).noPostParse;this.setModules({inspect:{filePath:this.filePath}});var t=this.getOptions();return this.parsed=f.parse(this.lexed,this.modules,t),this.setModules({inspect:{filePath:this.filePath,parsed:this.parsed}}),e?this:this.postparse()}},{key:"postparse",value:function(){var e=this.getOptions(),t=f.postparse(this.parsed,this.modules,e),r=t.postparsed,n=t.errors;return this.postparsed=r,this.setModules({inspect:{filePath:this.filePath,postparsed:this.postparsed}}),s(this.allErrors,n),this.errorChecker(this.allErrors),this}},{key:"errorChecker",value:function(e){for(var t=0,r=e;t0?(this.allErrors=n,this.errorChecker(n),this):(this.content=d(o,t),this.setModules({inspect:{filePath:this.filePath,content:this.content}}),this)}}],t&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},263:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&(l=g,g=0);for(var u=0;u0&&s.push({type:"content",value:p}):l=c.offset-n+c.length;else{p.length>0&&(s.push({type:"content",value:p}),l+=p.length);var f={type:"delimiter",position:c.position,offset:l+n};s.push(f),l=c.offset-n+c.length}}g=l-a.length;var h=a.substr(l);return h.length>0&&s.push({type:"content",value:h}),s}),this);return{parsed:y,errors:v}}function C(e){return"content"===e.type&&"insidetag"===e.position}e.exports={parseDelimiters:E,parse:function(e,t,r,n){!function(e,t){for(var r=!1,n=0;n/g,">"))}}(e,n);for(var o=E(e.filter(C),t,r),a=o.parsed,i=o.errors,s=[],l=0,u=0,c=0;c",n))||-1!==c&&n>c)&&v(e,u);var p=e.slice(u,n+1),f=O(p),h=f.tag,d=f.position,g=a[h];null!=g&&l.push({type:"tag",position:d,text:g,offset:u,value:p,tag:h})}return l}(e,t.text,t.other),n=0,o=[],a=0;an&&i.offset-n>0&&o.push({type:"content",value:e.substr(n,i.offset-n)}),n=i.offset+i.value.length,delete i.offset,o.push(i)}return e.length>n&&o.push({type:"content",value:e.substr(n)}),o}}},271:function(e,t,r){var n=r(885),o=r(522),a=r(60),i=r(201),s=r(307);e.exports={docx:function(){return{getTemplatedFiles:function(){return[]},templatedNs:["http://schemas.microsoft.com/office/2006/coverPageProps"],textPath:function(e){return e.textTarget},tagsXmlTextArray:["Company","HyperlinkBase","Manager","cp:category","cp:keywords","dc:creator","dc:description","dc:subject","dc:title","cp:contentStatus","PublishDate","Abstract","CompanyAddress","CompanyPhone","CompanyFax","CompanyEmail","w:t","a:t","m:t","vt:lpstr","vt:lpwstr"],tagsXmlLexedArray:["w:proofState","w:tc","w:tr","w:tbl","w:ftr","w:hdr","w:body","w:document","w:p","w:r","w:br","w:rPr","w:pPr","w:spacing","w:sdtContent","w:sdt","w:drawing","w:sectPr","w:type","w:headerReference","w:footerReference","w:bookmarkStart","w:bookmarkEnd","w:commentRangeStart","w:commentRangeEnd","w:commentReference"],droppedTagsInsidePlaceholder:["w:p","w:br","w:bookmarkStart","w:bookmarkEnd"],expandTags:[{contains:"w:tc",expand:"w:tr"}],onParagraphLoop:[{contains:"w:p",expand:"w:p",onlyTextInTag:!0}],tagRawXml:"w:p",baseModules:[n,o,i,a,s],tagShouldContain:[{tag:"w:sdtContent",shouldContain:["w:p","w:r","w:commentRangeStart","w:sdt"],value:""},{tag:"w:tc",shouldContain:["w:p"],value:""},{tag:"w:tr",shouldContain:["w:tc"],drop:!0},{tag:"w:tbl",shouldContain:["w:tr"],drop:!0}]}},pptx:function(){return{getTemplatedFiles:function(){return[]},textPath:function(e){return e.textTarget},tagsXmlTextArray:["Company","HyperlinkBase","Manager","cp:category","cp:keywords","dc:creator","dc:description","dc:subject","dc:title","a:t","m:t","vt:lpstr","vt:lpwstr"],tagsXmlLexedArray:["p:sp","a:tc","a:tr","a:tbl","a:graphicData","a:p","a:r","a:rPr","p:txBody","a:txBody","a:off","a:ext","p:graphicFrame","p:xfrm","a16:rowId","a:endParaRPr"],droppedTagsInsidePlaceholder:["a:p","a:endParaRPr"],expandTags:[{contains:"a:tc",expand:"a:tr"}],onParagraphLoop:[{contains:"a:p",expand:"a:p",onlyTextInTag:!0}],tagRawXml:"p:sp",baseModules:[n,i,a,s],tagShouldContain:[{tag:"a:tbl",shouldContain:["a:tr"],dropParent:"p:graphicFrame"},{tag:"p:txBody",shouldContain:["a:p"],value:""},{tag:"a:txBody",shouldContain:["a:p"],value:""}]}}}},307:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r":"",this.prefix=g[t.fileType],this.runStartTag="".concat(this.prefix,":r"),this.runPropsStartTag="".concat(this.prefix,":rPr"),e}},{key:"postparse",value:function(e,t){for(var r=[],n=0;n").concat(this.brTag,"<").concat(this.prefix,":r>").concat(this.recordedRun,"<").concat(this.prefix,":t").concat("docx"===this.docxtemplater.fileType?' xml:space="preserve"':"",">"));return t}}],t&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();e.exports=function(){return i(new m)}},320:function(e){e.exports={last:function(e){return e[e.length-1]},first:function(e){return e[0]}}},322:function(e){var t=["application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","application/vnd.ms-word.document.macroEnabled.main+xml","application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml","application/vnd.ms-word.template.macroEnabledTemplate.main+xml"],r={main:t,docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"].concat(t,["application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml","application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"]),pptx:["application/vnd.openxmlformats-officedocument.presentationml.slide+xml","application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml","application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml","application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml","application/vnd.ms-excel.sheet.macroEnabled.main+xml","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]};e.exports=r},356:function(e){e.exports={settingsContentType:"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml",coreContentType:"application/vnd.openxmlformats-package.core-properties+xml",appContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml",customContentType:"application/vnd.openxmlformats-officedocument.custom-properties+xml",diagramDataContentType:"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml",diagramDrawingContentType:"application/vnd.ms-office.drawingml.diagramDrawing+xml"}},367:function(e,t,r){var n=r(207).pregMatchAll;e.exports=function(e,t){var r={content:e},o=t.join("|"),a=new RegExp("(?:(<(?:".concat(o,")[^>]*>)([^<>]*))|(<(?:").concat(o,")[^>]*/>)"),"g");return r.matches=n(a,r.content),r}},438:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r"===e[t+1].value||-1!==r.indexOf('xml:space="preserve"')?r:r.substr(0,r.length-1)+' xml:space="preserve">'}var d=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name="SpacePreserveModule"},(t=[{key:"postparse",value:function(e,t){var r=[],n=!1,o=0,a=0,i=e.reduce((function(e,i){return function(e){return l(e)&&"w:t"===e.tag}(i)&&(n=!0,a=r.length),n?(r.push(i),function(e,t){return e&&e.basePart&&t.length>1}(t,r)&&(o=t.basePart.endLindex,r[0].value=h(r,0)),function(e,t){return"placeholder"===e.type&&t.length>1}(i,r)&&(r[a].value=h(r,a),o=i.endLindex),u(i)&&i.lIndex>o&&(0!==o&&(r[a].value=h(r,a)),f(e,r),r=[],n=!1,o=0,a=0),e):(e.push(i),e)}),[]);return f(i,r),i}},{key:"postrender",value:function(e){for(var t="",r=0,n=0,o=e.length;n')&&p(a,"")&&(e[r]=t.substr(0,t.length-26)+"",a=a.substr(6)),t=a,r=n,e[n]=a)}return e}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();e.exports=function(){return i(new d)}},536:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0?s[y-1].right:0),!(w.lefte.length)&&(t=e.length);for(var r=0,n=Array(t);r0){for(var c=null,f=0;fc.priority)&&(c=g)}return c.offset=o,delete c.priority,c.endLindex=i,c.lIndex=i,c.raw=e,c.onMatch&&c.onMatch(c),delete c.onMatch,delete c.prefix,c}for(var m=0;m>>0,o=0;o0?c.call(this,e,t,r-1):n}function p(e,t,r){var n,o=this,a=this.scopeList[r];return n=this.cachedParsers&&t.part?this.cachedParsers[t.part.lIndex]?this.cachedParsers[t.part.lIndex]:this.cachedParsers[t.part.lIndex]=this.parser(e,{tag:t.part,scopePath:this.scopePath}):this.parser(e,{tag:t.part,scopePath:this.scopePath}),Promise.resolve().then((function(){return n.get(a,o.getContext(t,r))})).catch((function(r){throw i({tag:e,scope:a,error:r,offset:t.part.offset})})).then((function(n){return null==n&&r>0?p.call(o,e,t,r-1):n}))}var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.root=t.root||this,this.resolveOffset=t.resolveOffset||0,this.scopePath=t.scopePath,this.scopePathItem=t.scopePathItem,this.scopePathLength=t.scopePathLength,this.scopeList=t.scopeList,this.scopeType="",this.scopeTypes=t.scopeTypes,this.scopeLindex=t.scopeLindex,this.parser=t.parser,this.resolved=t.resolved,this.cachedParsers=t.cachedParsers}return t=e,(r=[{key:"loopOver",value:function(e,t,r,n){return this.loopOverValue(this.getValue(e,n),t,r)}},{key:"functorIfInverted",value:function(e,t,r,n,o){return e&&t(r,n,o),e}},{key:"isValueFalsy",value:function(e,t){return null==e||!e||"[object Array]"===t&&0===e.length}},{key:"loopOverValue",value:function(e,t,r){this.root.finishedResolving&&(r=!1);var n=Object.prototype.toString.call(e);if(this.isValueFalsy(e,n))return this.scopeType=!1,this.functorIfInverted(r,t,s(this.scopeList),0,1);if("[object Array]"===n){this.scopeType="array";for(var o=0;o=e[n].length||(-1===r||e[n][t[n]].offset0}));for(var a=new Array(r),i=e.map((function(){return 0})),s=0;se.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},a=o.modules,i=void 0===a?[]:a,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;nZ[1]&&R("The minor api version is not uptodate, you probably have to update docxtemplater with npm install --save docxtemplater",{neededVersion:e,currentModuleApiVersion:Z,explanation:"moduleAPIVersionMismatch : needed=".concat(e.join("."),", current=").concat(Z.join("."))}),e[1]===Z[1]&&e[2]>Z[2]&&R("The patch api version is not uptodate, you probably have to update docxtemplater with npm install --save docxtemplater",{neededVersion:e,currentModuleApiVersion:Z,explanation:"moduleAPIVersionMismatch : needed=".concat(e.join("."),", current=").concat(Z.join("."))}),!0}},{key:"setModules",value:function(e){for(var t=0,r=this.modules;t=3, please use pizzip");e.xtRendered&&this.options.warnFn([new Error("This zip file appears to be the outcome of a previous docxtemplater generation. This typically indicates that docxtemplater was integrated by reusing the same zip file. It is recommended to create a new Pizzip instance for each docxtemplater generation.")]),this.zip=e,this.updateFileTypeConfig(),this.modules=U([this.fileTypeConfig.baseModules.map((function(e){return e()})),this.modules]);for(var t=0,r=this.modules;t0)throw new M('Detected duplicate module "'.concat(t[0],'"'))}(this.modules),this.modules=(e=this.modules,B(e,(function(e,t){return(t.priority||0)-(e.priority||0)}))),Object.keys(this.compiled).length)return this;for(var t=this.options,r=0,n=this.modules;r0&&I(),arguments.length>0&&(this.data=e),this.setModules({data:this.data,Lexer:O}),this.mapper||(this.mapper=this.modules.reduce((function(e,t){return t.getRenderedMap(e)}),{}));var t=[];for(var r in this.mapper){var n=this.mapper[r],o=n.from,a=n.data,i=this.compiled[o];i.scopeManager=this.getScopeManager(r,i,a),i.render(r),t.push([r,i.content,i]),delete i.content}for(var l=0;l0)for(var t in this.filesContentTypes)if(/^customXml\/item\d+\.xml$/.test(t))for(var r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);r':""}function C(e){return function(e){for(var t=0;t"===e.parts[t]?e.parts.splice(t,0,''):e.parts.push('')}function I(e){for(var t=0;t0){r.sectPrCount=function(e){for(var t=!1,r=0,n=0;n=0;n--){var o=e[n];if(b("w:sectPr",o)&&(r=!0),x("w:sectPr",o)&&(t.unshift(o.value),r=!1),r&&t.unshift(o.value),h(o)){if(t.length>0)return t.join("");break}}return""}(e)}if(!r||"auto"!==r.expandTo||r.module!==S||!function(e){return e.length&&h(e[0])&&g(f(e))}(e))return e;r.paragraphLoop=!0;var s=0,l=p(e,(function(e){return h(e)&&1==++s?"start":g(e)&&0==--s?"end":null})),u=l[0],c=f(l),d=C(u),v=C(c);return r.hasPageBreakBeginning=M(u),r.hasPageBreak=M(c),D(u)&&(d=0),D(c)&&(v=0),e.slice(d,e.length-v)}},{key:"resolve",value:function(e,t){var r=this;if(!d(e,S))return null;var n,o=t.scopeManager,i=o.getValueAsync(e.value,{part:e}),s=[];function l(i,l,u){var c=o.createSubScopeManager(i,e.value,l,e,u);r.resolveSerially?(n=n.then((function(){return t.resolve(a(a({},t),{},{compiled:e.subparsed,tags:{},scopeManager:c}))})),s.push(n)):s.push(t.resolve(a(a({},t),{},{compiled:e.subparsed,tags:{},scopeManager:c})))}r.resolveSerially&&(n=Promise.resolve(null));var u=[];return i.then((function(r){return null!=r||(r=t.nullGetter(e)),r instanceof Promise?r.then((function(e){return e instanceof Array?Promise.all(e):e})):r instanceof Array?Promise.all(r):r})).then((function(t){return o.loopOverValue(t,l,e.inverted),Promise.all(s).then((function(e){return e.map((function(e){var t=e.resolved,r=e.errors;return v(u,r),t}))})).then((function(e){if(u.length>0)throw u;return e}))}))}},{key:"render",value:function(e,t){var r=this;if("p:xfrm"===e.tag&&(r.inXfrm="start"===e.position),"a:ext"===e.tag&&r.inXfrm)return r.lastExt=e,e;if(!d(e,S))return null;var n=[],o=[],i=0,s=e.subparsed[0],l=0;"a:tr"===(null==s?void 0:s.tag)&&(l=+w(s.value,"h")),i-=l;var u=0,c=j(e),p=t.scopeManager.getValue(e.value,{part:e});if(null!=p||(p=t.nullGetter(e)),!1===t.scopeManager.loopOverValue(p,(function(s,p,f){i+=l;for(var h=t.scopeManager.createSubScopeManager(s,e.value,p,e,f),d=0,g=e.subparsed;d'),n++))}return e}(S.parts))):e.addNextPage&&(P=S.parts,O=r.sects[e.addNextPage.index],P.unshift("".concat(O.map((function(e){return e.value})).join(""),""))),e.addNextPage&&k(S),e.hasPageBreakBeginning&&c&&function(e){e.parts.unshift('')}(S);for(var j=0,E=S.parts;j".concat(e.lastParagrapSectPr,"")}:{value:"".concat(e.lastParagrapSectPr,"")}:{value:E(e)||"",errors:o};if(0!==i){var f=+w(r.lastExt.value,"cy");r.lastExt.value=T(r.lastExt.value,"cy",f+i)}return{value:t.joinUncorrupt(n,a(a({},t),{},{basePart:e})),errors:o}}}],t&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();e.exports=function(){return O(new L)}},899:function(e,t,r){var n=r(946).XTInternalError;function o(){}function a(e){return e}e.exports=function(e){var t={on:o,set:o,getFileType:o,optionsTransformer:a,preparse:a,matchers:function(){return[]},parse:o,getTraits:o,postparse:a,errorsTransformer:a,preResolve:o,resolve:o,getRenderedMap:a,render:o,nullGetter:o,postrender:a};if(Object.keys(t).every((function(t){return!e[t]}))){var r=new n("This module cannot be wrapped, because it doesn't define any of the necessary functions");throw r.properties={id:"module_cannot_be_wrapped",explanation:"This module cannot be wrapped, because it doesn't define any of the necessary functions"},r}for(var i in t)e[i]||(e[i]=t[i]);return e}},903:function(e){function t(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&void 0!==arguments[2]?arguments[2]:t.length,n=e,o=0;oe.lIndex&&r--}return r}for(;o.length>0;)for(var l=o.pop(),u=i(r,l.path),c=0,p=l.items;ce.length)&&(t=e.length);for(var r=0,n=Array(t);r0?{success:!1,error:"Unexpected properties: ".concat(n.join(", "))}:t}))},o}},{key:"record",value:function(t){return e.createSchema((function(e){if(null===e)return{success:!1,error:"Expected object, received null"};if("object"!==n(e))return{success:!1,error:"Expected object, received ".concat(n(e))};for(var r=0,o=Object.keys(e);r