window["docxtemplater"] =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./es6/docxtemplater.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./es6/browser-versions/xmldom.js":
/*!****************************************!*\
  !*** ./es6/browser-versions/xmldom.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = {\n  XMLSerializer: window.XMLSerializer,\n  DOMParser: window.DOMParser,\n  XMLDocument: window.XMLDocument\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/browser-versions/xmldom.js?");

/***/ }),

/***/ "./es6/doc-utils.js":
/*!**************************!*\
  !*** ./es6/doc-utils.js ***!
  \**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _require = __webpack_require__(/*! xmldom */ \"./es6/browser-versions/xmldom.js\"),\n    DOMParser = _require.DOMParser,\n    XMLSerializer = _require.XMLSerializer;\n\nvar _require2 = __webpack_require__(/*! ./errors */ \"./es6/errors.js\"),\n    throwXmlTagNotFound = _require2.throwXmlTagNotFound;\n\nfunction parser(tag) {\n  return _defineProperty({}, \"get\", function get(scope) {\n    if (tag === \".\") {\n      return scope;\n    }\n\n    return scope[tag];\n  });\n}\n\nfunction endsWith(str, suffix) {\n  return str.indexOf(suffix, str.length - suffix.length) !== -1;\n}\n\nfunction startsWith(str, prefix) {\n  return str.substring(0, prefix.length) === prefix;\n}\n\nfunction unique(arr) {\n  var hash = {},\n      result = [];\n\n  for (var i = 0, l = arr.length; i < l; ++i) {\n    if (!hash.hasOwnProperty(arr[i])) {\n      hash[arr[i]] = true;\n      result.push(arr[i]);\n    }\n  }\n\n  return result;\n}\n\nfunction chunkBy(parsed, f) {\n  return parsed.reduce(function (chunks, p) {\n    var currentChunk = last(chunks);\n\n    if (currentChunk.length === 0) {\n      currentChunk.push(p);\n      return chunks;\n    }\n\n    var res = f(p);\n\n    if (res === \"start\") {\n      chunks.push([p]);\n    } else if (res === \"end\") {\n      currentChunk.push(p);\n      chunks.push([]);\n    } else {\n      currentChunk.push(p);\n    }\n\n    return chunks;\n  }, [[]]).filter(function (p) {\n    return p.length > 0;\n  });\n}\n\nfunction last(a) {\n  return a[a.length - 1];\n}\n\nvar defaults = {\n  nullGetter: function nullGetter(part) {\n    if (!part.module) {\n      return \"undefined\";\n    }\n\n    if (part.module === \"rawxml\") {\n      return \"\";\n    }\n\n    return \"\";\n  },\n  xmlFileNames: [],\n  parser: parser,\n  linebreaks: false,\n  delimiters: {\n    start: \"{\",\n    end: \"}\"\n  }\n};\n\nfunction mergeObjects() {\n  var resObj = {};\n  var obj, keys;\n\n  for (var i = 0; i < arguments.length; i += 1) {\n    obj = arguments[i];\n    keys = Object.keys(obj);\n\n    for (var j = 0; j < keys.length; j += 1) {\n      resObj[keys[j]] = obj[keys[j]];\n    }\n  }\n\n  return resObj;\n}\n\nfunction xml2str(xmlNode) {\n  var a = new XMLSerializer();\n  return a.serializeToString(xmlNode).replace(/xmlns(:[a-z0-9]+)?=\"\" ?/g, \"\");\n}\n\nfunction str2xml(str) {\n  var parser = new DOMParser();\n  return parser.parseFromString(str, \"text/xml\");\n}\n\nvar charMap = {\n  \"&\": \"&amp;\",\n  \"'\": \"&apos;\",\n  \"<\": \"&lt;\",\n  \">\": \"&gt;\",\n  '\"': \"&quot;\"\n};\nvar regexStripRegexp = /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;\n\nfunction escapeRegExp(str) {\n  return str.replace(regexStripRegexp, \"\\\\$&\");\n}\n\nvar charMapRegexes = Object.keys(charMap).map(function (endChar) {\n  var startChar = charMap[endChar];\n  return {\n    rstart: new RegExp(escapeRegExp(startChar), \"g\"),\n    rend: new RegExp(escapeRegExp(endChar), \"g\"),\n    start: startChar,\n    end: endChar\n  };\n});\n\nfunction wordToUtf8(string) {\n  var r;\n\n  for (var i = 0, l = charMapRegexes.length; i < l; i++) {\n    r = charMapRegexes[i];\n    string = string.replace(r.rstart, r.end);\n  }\n\n  return string;\n}\n\nfunction utf8ToWord(string) {\n  if (typeof string !== \"string\") {\n    string = string.toString();\n  }\n\n  var r;\n\n  for (var i = 0, l = charMapRegexes.length; i < l; i++) {\n    r = charMapRegexes[i];\n    string = string.replace(r.rend, r.start);\n  }\n\n  return string;\n} // This function is written with for loops for performance\n\n\nfunction concatArrays(arrays) {\n  var result = [];\n\n  for (var i = 0; i < arrays.length; i++) {\n    var array = arrays[i];\n\n    for (var j = 0, len = array.length; j < len; j++) {\n      result.push(array[j]);\n    }\n  }\n\n  return result;\n}\n\nvar spaceRegexp = new RegExp(String.fromCharCode(160), \"g\");\n\nfunction convertSpaces(s) {\n  return s.replace(spaceRegexp, \" \");\n}\n\nfunction pregMatchAll(regex, content) {\n  /* regex is a string, content is the content. It returns an array of all matches with their offset, for example:\n  \t regex=la\n  \t content=lolalolilala\n  returns: [{array: {0: 'la'},offset: 2},{array: {0: 'la'},offset: 8},{array: {0: 'la'} ,offset: 10}]\n  */\n  var matchArray = [];\n  var match;\n\n  while ((match = regex.exec(content)) != null) {\n    matchArray.push({\n      array: match,\n      offset: match.index\n    });\n  }\n\n  return matchArray;\n}\n\nfunction getRight(parsed, element, index) {\n  var val = getRightOrNull(parsed, element, index);\n\n  if (val !== null) {\n    return val;\n  }\n\n  throwXmlTagNotFound({\n    position: \"right\",\n    element: element,\n    parsed: parsed,\n    index: index\n  });\n}\n\nfunction getRightOrNull(parsed, element, index) {\n  for (var i = index, l = parsed.length; i < l; i++) {\n    var part = parsed[i];\n\n    if (part.value === \"</\" + element + \">\") {\n      return i;\n    }\n  }\n\n  return null;\n}\n\nfunction getLeft(parsed, element, index) {\n  var val = getLeftOrNull(parsed, element, index);\n\n  if (val !== null) {\n    return val;\n  }\n\n  throwXmlTagNotFound({\n    position: \"left\",\n    element: element,\n    parsed: parsed,\n    index: index\n  });\n}\n\nfunction getLeftOrNull(parsed, element, index) {\n  for (var i = index; i >= 0; i--) {\n    var part = parsed[i];\n\n    if (part.value.indexOf(\"<\" + element) === 0 && [\">\", \" \"].indexOf(part.value[element.length + 1]) !== -1) {\n      return i;\n    }\n  }\n\n  return null;\n}\n\nfunction isTagStart(tagType, _ref2) {\n  var type = _ref2.type,\n      tag = _ref2.tag,\n      position = _ref2.position;\n  return type === \"tag\" && tag === tagType && position === \"start\";\n}\n\nfunction isTagEnd(tagType, _ref3) {\n  var type = _ref3.type,\n      tag = _ref3.tag,\n      position = _ref3.position;\n  return type === \"tag\" && tag === tagType && position === \"end\";\n}\n\nfunction isParagraphStart(options) {\n  return isTagStart(\"w:p\", options) || isTagStart(\"a:p\", options);\n}\n\nfunction isParagraphEnd(options) {\n  return isTagEnd(\"w:p\", options) || isTagEnd(\"a:p\", options);\n}\n\nfunction isTextStart(part) {\n  return part.type === \"tag\" && part.position === \"start\" && part.text;\n}\n\nfunction isTextEnd(part) {\n  return part.type === \"tag\" && part.position === \"end\" && part.text;\n}\n\nfunction isContent(p) {\n  return p.type === \"placeholder\" || p.type === \"content\" && p.position === \"insidetag\";\n}\n\nvar corruptCharacters = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/; // 00    NUL '\\0' (null character)\n// 01    SOH (start of heading)\n// 02    STX (start of text)\n// 03    ETX (end of text)\n// 04    EOT (end of transmission)\n// 05    ENQ (enquiry)\n// 06    ACK (acknowledge)\n// 07    BEL '\\a' (bell)\n// 08    BS  '\\b' (backspace)\n// 0B    VT  '\\v' (vertical tab)\n// 0C    FF  '\\f' (form feed)\n// 0E    SO  (shift out)\n// 0F    SI  (shift in)\n// 10    DLE (data link escape)\n// 11    DC1 (device control 1)\n// 12    DC2 (device control 2)\n// 13    DC3 (device control 3)\n// 14    DC4 (device control 4)\n// 15    NAK (negative ack.)\n// 16    SYN (synchronous idle)\n// 17    ETB (end of trans. blk)\n// 18    CAN (cancel)\n// 19    EM  (end of medium)\n// 1A    SUB (substitute)\n// 1B    ESC (escape)\n// 1C    FS  (file separator)\n// 1D    GS  (group separator)\n// 1E    RS  (record separator)\n// 1F    US  (unit separator)\n\nfunction hasCorruptCharacters(string) {\n  return corruptCharacters.test(string);\n}\n\nmodule.exports = {\n  endsWith: endsWith,\n  startsWith: startsWith,\n  isContent: isContent,\n  isParagraphStart: isParagraphStart,\n  isParagraphEnd: isParagraphEnd,\n  isTagStart: isTagStart,\n  isTagEnd: isTagEnd,\n  isTextStart: isTextStart,\n  isTextEnd: isTextEnd,\n  unique: unique,\n  chunkBy: chunkBy,\n  last: last,\n  mergeObjects: mergeObjects,\n  xml2str: xml2str,\n  str2xml: str2xml,\n  getRightOrNull: getRightOrNull,\n  getRight: getRight,\n  getLeftOrNull: getLeftOrNull,\n  getLeft: getLeft,\n  pregMatchAll: pregMatchAll,\n  convertSpaces: convertSpaces,\n  escapeRegExp: escapeRegExp,\n  charMapRegexes: charMapRegexes,\n  hasCorruptCharacters: hasCorruptCharacters,\n  defaults: defaults,\n  wordToUtf8: wordToUtf8,\n  utf8ToWord: utf8ToWord,\n  concatArrays: concatArrays,\n  charMap: charMap\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/doc-utils.js?");

/***/ }),

/***/ "./es6/docxtemplater.js":
/*!******************************!*\
  !*** ./es6/docxtemplater.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar DocUtils = __webpack_require__(/*! ./doc-utils */ \"./es6/doc-utils.js\");\n\nDocUtils.traits = __webpack_require__(/*! ./traits */ \"./es6/traits.js\");\nDocUtils.moduleWrapper = __webpack_require__(/*! ./module-wrapper */ \"./es6/module-wrapper.js\");\nvar defaults = DocUtils.defaults,\n    str2xml = DocUtils.str2xml,\n    xml2str = DocUtils.xml2str,\n    moduleWrapper = DocUtils.moduleWrapper,\n    utf8ToWord = DocUtils.utf8ToWord,\n    concatArrays = DocUtils.concatArrays,\n    unique = DocUtils.unique;\n\nvar _require = __webpack_require__(/*! ./errors */ \"./es6/errors.js\"),\n    XTInternalError = _require.XTInternalError,\n    throwFileTypeNotIdentified = _require.throwFileTypeNotIdentified,\n    throwFileTypeNotHandled = _require.throwFileTypeNotHandled,\n    throwApiVersionError = _require.throwApiVersionError;\n\nvar currentModuleApiVersion = [3, 6, 0];\n\nvar Docxtemplater =\n/*#__PURE__*/\nfunction () {\n  function Docxtemplater() {\n    _classCallCheck(this, Docxtemplater);\n\n    if (arguments.length > 0) {\n      throw new Error(\"The constructor with parameters has been removed in docxtemplater 3, please check the upgrade guide.\");\n    }\n\n    this.compiled = {};\n    this.modules = [];\n    this.setOptions({});\n  }\n\n  _createClass(Docxtemplater, [{\n    key: \"getModuleApiVersion\",\n    value: function getModuleApiVersion() {\n      return currentModuleApiVersion.join(\".\");\n    }\n  }, {\n    key: \"verifyApiVersion\",\n    value: function verifyApiVersion(neededVersion) {\n      neededVersion = neededVersion.split(\".\").map(function (i) {\n        return parseInt(i, 10);\n      });\n\n      if (neededVersion.length !== 3) {\n        throwApiVersionError(\"neededVersion is not a valid version\", {\n          neededVersion: neededVersion,\n          explanation: \"the neededVersion must be an array of length 3\"\n        });\n      }\n\n      if (neededVersion[0] !== currentModuleApiVersion[0]) {\n        throwApiVersionError(\"The major api version do not match, you probably have to update docxtemplater with npm install --save docxtemplater\", {\n          neededVersion: neededVersion,\n          currentModuleApiVersion: currentModuleApiVersion,\n          explanation: \"moduleAPIVersionMismatch : needed=\".concat(neededVersion.join(\".\"), \", current=\").concat(currentModuleApiVersion.join(\".\"))\n        });\n      }\n\n      if (neededVersion[1] > currentModuleApiVersion[1]) {\n        throwApiVersionError(\"The minor api version is not uptodate, you probably have to update docxtemplater with npm install --save docxtemplater\", {\n          neededVersion: neededVersion,\n          currentModuleApiVersion: currentModuleApiVersion,\n          explanation: \"moduleAPIVersionMismatch : needed=\".concat(neededVersion.join(\".\"), \", current=\").concat(currentModuleApiVersion.join(\".\"))\n        });\n      }\n\n      return true;\n    }\n  }, {\n    key: \"setModules\",\n    value: function setModules(obj) {\n      this.modules.forEach(function (module) {\n        module.set(obj);\n      });\n    }\n  }, {\n    key: \"sendEvent\",\n    value: function sendEvent(eventName) {\n      this.modules.forEach(function (module) {\n        module.on(eventName);\n      });\n    }\n  }, {\n    key: \"attachModule\",\n    value: function attachModule(module) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var prefix = options.prefix;\n\n      if (prefix) {\n        module.prefix = prefix;\n      }\n\n      this.modules.push(moduleWrapper(module));\n      return this;\n    }\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      var _this = this;\n\n      if (options.delimiters) {\n        options.delimiters.start = utf8ToWord(options.delimiters.start);\n        options.delimiters.end = utf8ToWord(options.delimiters.end);\n      }\n\n      this.options = options;\n      Object.keys(defaults).forEach(function (key) {\n        var defaultValue = defaults[key];\n        _this.options[key] = _this.options[key] != null ? _this.options[key] : defaultValue;\n        _this[key] = _this.options[key];\n      });\n\n      if (this.zip) {\n        this.updateFileTypeConfig();\n      }\n\n      return this;\n    }\n  }, {\n    key: \"loadZip\",\n    value: function loadZip(zip) {\n      if (zip.loadAsync) {\n        throw new XTInternalError(\"Docxtemplater doesn't handle JSZip version >=3, see changelog\");\n      }\n\n      this.zip = zip;\n      this.updateFileTypeConfig();\n      this.modules = concatArrays([this.fileTypeConfig.baseModules.map(function (moduleFunction) {\n        return moduleFunction();\n      }), this.modules]);\n      return this;\n    }\n  }, {\n    key: \"compileFile\",\n    value: function compileFile(fileName) {\n      var currentFile = this.createTemplateClass(fileName);\n      currentFile.parse();\n      this.compiled[fileName] = currentFile;\n    }\n  }, {\n    key: \"resolveData\",\n    value: function resolveData(data) {\n      var _this2 = this;\n\n      return Promise.all(Object.keys(this.compiled).map(function (from) {\n        var currentFile = _this2.compiled[from];\n        return currentFile.resolveTags(data);\n      })).then(function (resolved) {\n        return concatArrays(resolved);\n      });\n    }\n  }, {\n    key: \"compile\",\n    value: function compile() {\n      var _this3 = this;\n\n      if (Object.keys(this.compiled).length) {\n        return this;\n      }\n\n      this.options = this.modules.reduce(function (options, module) {\n        return module.optionsTransformer(options, _this3);\n      }, this.options);\n      this.options.xmlFileNames = unique(this.options.xmlFileNames);\n      this.xmlDocuments = this.options.xmlFileNames.reduce(function (xmlDocuments, fileName) {\n        var content = _this3.zip.files[fileName].asText();\n\n        xmlDocuments[fileName] = str2xml(content);\n        return xmlDocuments;\n      }, {});\n      this.setModules({\n        zip: this.zip,\n        xmlDocuments: this.xmlDocuments\n      });\n      this.getTemplatedFiles();\n      this.setModules({\n        compiled: this.compiled\n      }); // Loop inside all templatedFiles (ie xml files with content).\n      // Sometimes they don't exist (footer.xml for example)\n\n      this.templatedFiles.forEach(function (fileName) {\n        if (_this3.zip.files[fileName] != null) {\n          _this3.compileFile(fileName);\n        }\n      });\n      return this;\n    }\n  }, {\n    key: \"updateFileTypeConfig\",\n    value: function updateFileTypeConfig() {\n      var fileType;\n\n      if (this.zip.files.mimetype) {\n        fileType = \"odt\";\n      }\n\n      if (this.zip.files[\"word/document.xml\"] || this.zip.files[\"word/document2.xml\"]) {\n        fileType = \"docx\";\n      }\n\n      if (this.zip.files[\"ppt/presentation.xml\"]) {\n        fileType = \"pptx\";\n      }\n\n      if (fileType === \"odt\") {\n        throwFileTypeNotHandled(fileType);\n      }\n\n      if (!fileType) {\n        throwFileTypeNotIdentified();\n      }\n\n      this.fileType = fileType;\n      this.fileTypeConfig = this.options.fileTypeConfig || Docxtemplater.FileTypeConfig[this.fileType];\n      return this;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this4 = this;\n\n      this.compile();\n      this.setModules({\n        data: this.data\n      });\n      this.mapper = this.modules.reduce(function (value, module) {\n        return module.getRenderedMap(value);\n      }, {});\n      this.fileTypeConfig.tagsXmlLexedArray = unique(this.fileTypeConfig.tagsXmlLexedArray);\n      this.fileTypeConfig.tagsXmlTextArray = unique(this.fileTypeConfig.tagsXmlTextArray);\n      Object.keys(this.mapper).forEach(function (to) {\n        var _this4$mapper$to = _this4.mapper[to],\n            from = _this4$mapper$to.from,\n            data = _this4$mapper$to.data;\n        var currentFile = _this4.compiled[from];\n        currentFile.setTags(data);\n        currentFile.render(to);\n\n        _this4.zip.file(to, currentFile.content, {\n          createFolders: true\n        });\n      });\n      this.sendEvent(\"syncing-zip\");\n      this.syncZip();\n      return this;\n    }\n  }, {\n    key: \"syncZip\",\n    value: function syncZip() {\n      var _this5 = this;\n\n      Object.keys(this.xmlDocuments).forEach(function (fileName) {\n        _this5.zip.remove(fileName);\n\n        var content = xml2str(_this5.xmlDocuments[fileName]);\n        return _this5.zip.file(fileName, content, {\n          createFolders: true\n        });\n      });\n    }\n  }, {\n    key: \"setData\",\n    value: function setData(data) {\n      this.data = data;\n      return this;\n    }\n  }, {\n    key: \"getZip\",\n    value: function getZip() {\n      return this.zip;\n    }\n  }, {\n    key: \"createTemplateClass\",\n    value: function createTemplateClass(path) {\n      var usedData = this.zip.files[path].asText();\n      return this.createTemplateClassFromContent(usedData, path);\n    }\n  }, {\n    key: \"createTemplateClassFromContent\",\n    value: function createTemplateClassFromContent(content, filePath) {\n      var _this6 = this;\n\n      var xmltOptions = {\n        filePath: filePath\n      };\n      Object.keys(defaults).forEach(function (key) {\n        xmltOptions[key] = _this6[key];\n      });\n      xmltOptions.fileTypeConfig = this.fileTypeConfig;\n      xmltOptions.modules = this.modules;\n      return new Docxtemplater.XmlTemplater(content, xmltOptions);\n    }\n  }, {\n    key: \"getFullText\",\n    value: function getFullText(path) {\n      return this.createTemplateClass(path || this.fileTypeConfig.textPath(this.zip)).getFullText();\n    }\n  }, {\n    key: \"getTemplatedFiles\",\n    value: function getTemplatedFiles() {\n      this.templatedFiles = this.fileTypeConfig.getTemplatedFiles(this.zip);\n      return this.templatedFiles;\n    }\n  }]);\n\n  return Docxtemplater;\n}();\n\nDocxtemplater.DocUtils = DocUtils;\nDocxtemplater.Errors = __webpack_require__(/*! ./errors */ \"./es6/errors.js\");\nDocxtemplater.XmlTemplater = __webpack_require__(/*! ./xml-templater */ \"./es6/xml-templater.js\");\nDocxtemplater.FileTypeConfig = __webpack_require__(/*! ./file-type-config */ \"./es6/file-type-config.js\");\nDocxtemplater.XmlMatcher = __webpack_require__(/*! ./xml-matcher */ \"./es6/xml-matcher.js\");\nmodule.exports = Docxtemplater;\n\n//# sourceURL=webpack://docxtemplater/./es6/docxtemplater.js?");

/***/ }),

/***/ "./es6/errors.js":
/*!***********************!*\
  !*** ./es6/errors.js ***!
  \***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction first(a) {\n  return a[0];\n}\n\nfunction last(a) {\n  return a[a.length - 1];\n}\n\nfunction XTError(message) {\n  this.name = \"GenericError\";\n  this.message = message;\n  this.stack = new Error(message).stack;\n}\n\nXTError.prototype = Error.prototype;\n\nfunction XTTemplateError(message) {\n  this.name = \"TemplateError\";\n  this.message = message;\n  this.stack = new Error(message).stack;\n}\n\nXTTemplateError.prototype = new XTError();\n\nfunction RenderingError(message) {\n  this.name = \"RenderingError\";\n  this.message = message;\n  this.stack = new Error(message).stack;\n}\n\nRenderingError.prototype = new XTError();\n\nfunction XTScopeParserError(message) {\n  this.name = \"ScopeParserError\";\n  this.message = message;\n  this.stack = new Error(message).stack;\n}\n\nXTScopeParserError.prototype = new XTError();\n\nfunction XTInternalError(message) {\n  this.name = \"InternalError\";\n  this.properties = {\n    explanation: \"InternalError\"\n  };\n  this.message = message;\n  this.stack = new Error(message).stack;\n}\n\nXTInternalError.prototype = new XTError();\n\nfunction XTAPIVersionError(message) {\n  this.name = \"APIVersionError\";\n  this.properties = {\n    explanation: \"APIVersionError\"\n  };\n  this.message = message;\n  this.stack = new Error(message).stack;\n}\n\nXTAPIVersionError.prototype = new XTError();\n\nfunction throwApiVersionError(msg, properties) {\n  var err = new XTAPIVersionError(msg);\n  err.properties = _objectSpread({\n    id: \"api_version_error\"\n  }, properties);\n  throw err;\n}\n\nfunction throwMultiError(errors) {\n  var err = new XTTemplateError(\"Multi error\");\n  err.properties = {\n    errors: errors,\n    id: \"multi_error\",\n    explanation: \"The template has multiple errors\"\n  };\n  throw err;\n}\n\nfunction getUnopenedTagException(options) {\n  var err = new XTTemplateError(\"Unopened tag\");\n  err.properties = {\n    xtag: last(options.xtag.split(\" \")),\n    id: \"unopened_tag\",\n    context: options.xtag,\n    offset: options.offset,\n    lIndex: options.lIndex,\n    explanation: \"The tag beginning with \\\"\".concat(options.xtag.substr(0, 10), \"\\\" is unopened\")\n  };\n  return err;\n}\n\nfunction getUnclosedTagException(options) {\n  var err = new XTTemplateError(\"Unclosed tag\");\n  err.properties = {\n    xtag: first(options.xtag.split(\" \")).substr(1),\n    id: \"unclosed_tag\",\n    context: options.xtag,\n    offset: options.offset,\n    lIndex: options.lIndex,\n    explanation: \"The tag beginning with \\\"\".concat(options.xtag.substr(0, 10), \"\\\" is unclosed\")\n  };\n  return err;\n}\n\nfunction throwXmlTagNotFound(options) {\n  var err = new XTTemplateError(\"No tag \\\"\".concat(options.element, \"\\\" was found at the \").concat(options.position));\n  err.properties = {\n    id: \"no_xml_tag_found_at_\".concat(options.position),\n    explanation: \"No tag \\\"\".concat(options.element, \"\\\" was found at the \").concat(options.position),\n    part: options.parsed[options.index],\n    parsed: options.parsed,\n    index: options.index,\n    element: options.element\n  };\n  throw err;\n}\n\nfunction throwCorruptCharacters(_ref) {\n  var tag = _ref.tag,\n      value = _ref.value;\n  var err = new RenderingError(\"There are some XML corrupt characters\");\n  err.properties = {\n    id: \"invalid_xml_characters\",\n    xtag: tag,\n    value: value,\n    explanation: \"There are some corrupt characters for the field ${tag}\"\n  };\n  throw err;\n}\n\nfunction throwContentMustBeString(type) {\n  var err = new XTInternalError(\"Content must be a string\");\n  err.properties.id = \"xmltemplater_content_must_be_string\";\n  err.properties.type = type;\n  throw err;\n}\n\nfunction throwRawTagNotInParagraph(options) {\n  var err = new XTTemplateError(\"Raw tag not in paragraph\");\n  var _options$part = options.part,\n      value = _options$part.value,\n      offset = _options$part.offset;\n  err.properties = {\n    id: \"raw_tag_outerxml_invalid\",\n    explanation: \"The tag \\\"\".concat(value, \"\\\" is not inside a paragraph\"),\n    rootError: options.rootError,\n    xtag: value,\n    offset: offset,\n    postparsed: options.postparsed,\n    expandTo: options.expandTo,\n    index: options.index\n  };\n  throw err;\n}\n\nfunction throwRawTagShouldBeOnlyTextInParagraph(options) {\n  var err = new XTTemplateError(\"Raw tag should be the only text in paragraph\");\n  var tag = options.part.value;\n  err.properties = {\n    id: \"raw_xml_tag_should_be_only_text_in_paragraph\",\n    explanation: \"The raw tag \\\"\".concat(tag, \"\\\" should be the only text in this paragraph. This means that this tag should not be surrounded by any text or spaces.\"),\n    xtag: tag,\n    offset: options.part.offset,\n    paragraphParts: options.paragraphParts\n  };\n  throw err;\n}\n\nfunction getUnmatchedLoopException(options) {\n  var location = options.location;\n  var t = location === \"start\" ? \"unclosed\" : \"unopened\";\n  var T = location === \"start\" ? \"Unclosed\" : \"Unopened\";\n  var err = new XTTemplateError(\"\".concat(T, \" loop\"));\n  var tag = options.part.value;\n  err.properties = {\n    id: \"\".concat(t, \"_loop\"),\n    explanation: \"The loop with tag \\\"\".concat(tag, \"\\\" is \").concat(t),\n    xtag: tag\n  };\n  return err;\n}\n\nfunction getClosingTagNotMatchOpeningTag(options) {\n  var tags = options.tags;\n  var err = new XTTemplateError(\"Closing tag does not match opening tag\");\n  err.properties = {\n    id: \"closing_tag_does_not_match_opening_tag\",\n    explanation: \"The tag \\\"\".concat(tags[0].value, \"\\\" is closed by the tag \\\"\").concat(tags[1].value, \"\\\"\"),\n    openingtag: tags[0].value,\n    offset: [tags[0].offset, tags[1].offset],\n    closingtag: tags[1].value\n  };\n  return err;\n}\n\nfunction getScopeCompilationError(_ref2) {\n  var tag = _ref2.tag,\n      rootError = _ref2.rootError;\n  var err = new XTScopeParserError(\"Scope parser compilation failed\");\n  err.properties = {\n    id: \"scopeparser_compilation_failed\",\n    tag: tag,\n    explanation: \"The scope parser for the tag \\\"\".concat(tag, \"\\\" failed to compile\"),\n    rootError: rootError\n  };\n  return err;\n}\n\nfunction getScopeParserExecutionError(_ref3) {\n  var tag = _ref3.tag,\n      scope = _ref3.scope,\n      error = _ref3.error;\n  var err = new XTScopeParserError(\"Scope parser execution failed\");\n  err.properties = {\n    id: \"scopeparser_execution_failed\",\n    explanation: \"The scope parser for the tag \".concat(tag, \" failed to execute\"),\n    scope: scope,\n    tag: tag,\n    rootError: error\n  };\n  return err;\n}\n\nfunction getLoopPositionProducesInvalidXMLError(_ref4) {\n  var tag = _ref4.tag;\n  var err = new XTTemplateError(\"The position of the loop tags \\\"\".concat(tag, \"\\\" would produce invalid XML\"));\n  err.properties = {\n    tag: tag,\n    id: \"loop_position_invalid\",\n    explanation: \"The tags \\\"\".concat(tag, \"\\\" are misplaced in the document, for example one of them is in a table and the other one outside the table\")\n  };\n  return err;\n}\n\nfunction throwUnimplementedTagType(part) {\n  var err = new XTTemplateError(\"Unimplemented tag type \\\"\".concat(part.type, \"\\\"\"));\n  err.properties = {\n    part: part,\n    id: \"unimplemented_tag_type\"\n  };\n  throw err;\n}\n\nfunction throwMalformedXml(part) {\n  var err = new XTInternalError(\"Malformed xml\");\n  err.properties = {\n    part: part,\n    id: \"malformed_xml\"\n  };\n  throw err;\n}\n\nfunction throwLocationInvalid(part) {\n  throw new XTInternalError(\"Location should be one of \\\"start\\\" or \\\"end\\\" (given : \".concat(part.location, \")\"));\n}\n\nfunction throwFileTypeNotHandled(fileType) {\n  var err = new XTInternalError(\"The filetype \\\"\".concat(fileType, \"\\\" is not handled by docxtemplater\"));\n  err.properties = {\n    id: \"filetype_not_handled\",\n    explanation: \"The file you are trying to generate is of type \\\"\".concat(fileType, \"\\\", but only docx and pptx formats are handled\"),\n    fileType: fileType\n  };\n  throw err;\n}\n\nfunction throwFileTypeNotIdentified() {\n  var err = new XTInternalError(\"The filetype for this file could not be identified, is this file corrupted ?\");\n  err.properties = {\n    id: \"filetype_not_identified\"\n  };\n  throw err;\n}\n\nfunction throwXmlInvalid(content, offset) {\n  var err = new XTTemplateError(\"An XML file has invalid xml\");\n  err.properties = {\n    id: \"file_has_invalid_xml\",\n    content: content,\n    offset: offset,\n    explanation: \"The docx contains invalid XML, it is most likely corrupt\"\n  };\n  throw err;\n}\n\nmodule.exports = {\n  XTError: XTError,\n  XTTemplateError: XTTemplateError,\n  XTInternalError: XTInternalError,\n  XTScopeParserError: XTScopeParserError,\n  XTAPIVersionError: XTAPIVersionError,\n  RenderingError: RenderingError,\n  getClosingTagNotMatchOpeningTag: getClosingTagNotMatchOpeningTag,\n  getLoopPositionProducesInvalidXMLError: getLoopPositionProducesInvalidXMLError,\n  getScopeCompilationError: getScopeCompilationError,\n  getScopeParserExecutionError: getScopeParserExecutionError,\n  getUnclosedTagException: getUnclosedTagException,\n  getUnmatchedLoopException: getUnmatchedLoopException,\n  getUnopenedTagException: getUnopenedTagException,\n  throwApiVersionError: throwApiVersionError,\n  throwContentMustBeString: throwContentMustBeString,\n  throwCorruptCharacters: throwCorruptCharacters,\n  throwFileTypeNotHandled: throwFileTypeNotHandled,\n  throwFileTypeNotIdentified: throwFileTypeNotIdentified,\n  throwLocationInvalid: throwLocationInvalid,\n  throwMalformedXml: throwMalformedXml,\n  throwMultiError: throwMultiError,\n  throwRawTagNotInParagraph: throwRawTagNotInParagraph,\n  throwRawTagShouldBeOnlyTextInParagraph: throwRawTagShouldBeOnlyTextInParagraph,\n  throwUnimplementedTagType: throwUnimplementedTagType,\n  throwXmlTagNotFound: throwXmlTagNotFound,\n  throwXmlInvalid: throwXmlInvalid\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/errors.js?");

/***/ }),

/***/ "./es6/file-type-config.js":
/*!*********************************!*\
  !*** ./es6/file-type-config.js ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar loopModule = __webpack_require__(/*! ./modules/loop */ \"./es6/modules/loop.js\");\n\nvar spacePreserveModule = __webpack_require__(/*! ./modules/space-preserve */ \"./es6/modules/space-preserve.js\");\n\nvar rawXmlModule = __webpack_require__(/*! ./modules/rawxml */ \"./es6/modules/rawxml.js\");\n\nvar expandPairTrait = __webpack_require__(/*! ./modules/expand-pair-trait */ \"./es6/modules/expand-pair-trait.js\");\n\nvar render = __webpack_require__(/*! ./modules/render */ \"./es6/modules/render.js\");\n\nvar PptXFileTypeConfig = {\n  getTemplatedFiles: function getTemplatedFiles(zip) {\n    var slideTemplates = zip.file(/ppt\\/(slides|slideMasters)\\/(slide|slideMaster)\\d+\\.xml/).map(function (file) {\n      return file.name;\n    });\n    return slideTemplates.concat([\"ppt/presentation.xml\", \"docProps/app.xml\", \"docProps/core.xml\"]);\n  },\n  textPath: function textPath() {\n    return \"ppt/slides/slide1.xml\";\n  },\n  tagsXmlTextArray: [\"Company\", \"HyperlinkBase\", \"Manager\", \"cp:category\", \"cp:keywords\", \"dc:creator\", \"dc:description\", \"dc:subject\", \"dc:title\", \"a:t\", \"m:t\", \"vt:lpstr\"],\n  tagsXmlLexedArray: [\"p:sp\", \"a:tc\", \"a:tr\", \"a:table\", \"a:p\", \"a:r\", \"a:rPr\"],\n  expandTags: [{\n    contains: \"a:tc\",\n    expand: \"a:tr\"\n  }],\n  onParagraphLoop: [{\n    contains: \"a:p\",\n    expand: \"a:p\",\n    onlyTextInTag: true\n  }],\n  tagRawXml: \"p:sp\",\n  tagTextXml: \"a:t\",\n  baseModules: [loopModule, expandPairTrait, rawXmlModule, render]\n};\nvar DocXFileTypeConfig = {\n  getTemplatedFiles: function getTemplatedFiles(zip) {\n    var baseTags = [\"docProps/core.xml\", \"docProps/app.xml\", \"word/document.xml\", \"word/document2.xml\"];\n    var slideTemplates = zip.file(/word\\/(header|footer)\\d+\\.xml/).map(function (file) {\n      return file.name;\n    });\n    return slideTemplates.concat(baseTags);\n  },\n  textPath: function textPath(zip) {\n    if (zip.files[\"word/document.xml\"]) {\n      return \"word/document.xml\";\n    }\n\n    if (zip.files[\"word/document2.xml\"]) {\n      return \"word/document2.xml\";\n    }\n  },\n  tagsXmlTextArray: [\"Company\", \"HyperlinkBase\", \"Manager\", \"cp:category\", \"cp:keywords\", \"dc:creator\", \"dc:description\", \"dc:subject\", \"dc:title\", \"w:t\", \"m:t\", \"vt:lpstr\"],\n  tagsXmlLexedArray: [\"w:tc\", \"w:tr\", \"w:table\", \"w:p\", \"w:r\", \"w:rPr\", \"w:pPr\", \"w:spacing\"],\n  expandTags: [{\n    contains: \"w:tc\",\n    expand: \"w:tr\"\n  }],\n  onParagraphLoop: [{\n    contains: \"w:p\",\n    expand: \"w:p\",\n    onlyTextInTag: true\n  }],\n  tagRawXml: \"w:p\",\n  tagTextXml: \"w:t\",\n  baseModules: [loopModule, spacePreserveModule, expandPairTrait, rawXmlModule, render]\n};\nmodule.exports = {\n  docx: DocXFileTypeConfig,\n  pptx: PptXFileTypeConfig\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/file-type-config.js?");

/***/ }),

/***/ "./es6/lexer.js":
/*!**********************!*\
  !*** ./es6/lexer.js ***!
  \**********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar _require = __webpack_require__(/*! ./errors */ \"./es6/errors.js\"),\n    getUnclosedTagException = _require.getUnclosedTagException,\n    getUnopenedTagException = _require.getUnopenedTagException,\n    throwMalformedXml = _require.throwMalformedXml,\n    throwXmlInvalid = _require.throwXmlInvalid;\n\nvar _require2 = __webpack_require__(/*! ./doc-utils */ \"./es6/doc-utils.js\"),\n    concatArrays = _require2.concatArrays,\n    isTextStart = _require2.isTextStart,\n    isTextEnd = _require2.isTextEnd;\n\nvar EQUAL = 0;\nvar START = -1;\nvar END = 1;\n\nfunction inRange(range, match) {\n  return range[0] <= match.offset && match.offset < range[1];\n}\n\nfunction updateInTextTag(part, inTextTag) {\n  if (isTextStart(part)) {\n    if (inTextTag) {\n      throwMalformedXml(part);\n    }\n\n    return true;\n  }\n\n  if (isTextEnd(part)) {\n    if (!inTextTag) {\n      throwMalformedXml(part);\n    }\n\n    return false;\n  }\n\n  return inTextTag;\n}\n\nfunction getTag(tag) {\n  var position = \"start\";\n  var start = 1;\n\n  if (tag[tag.length - 2] === \"/\") {\n    position = \"selfclosing\";\n  }\n\n  if (tag[1] === \"/\") {\n    start = 2;\n    position = \"end\";\n  }\n\n  var index = tag.indexOf(\" \");\n  var end = index === -1 ? tag.length - 1 : index;\n  return {\n    tag: tag.slice(start, end),\n    position: position\n  };\n}\n\nfunction tagMatcher(content, textMatchArray, othersMatchArray) {\n  var cursor = 0;\n  var contentLength = content.length;\n  var allMatches = concatArrays([textMatchArray.map(function (tag) {\n    return {\n      tag: tag,\n      text: true\n    };\n  }), othersMatchArray.map(function (tag) {\n    return {\n      tag: tag,\n      text: false\n    };\n  })]).reduce(function (allMatches, t) {\n    allMatches[t.tag] = t.text;\n    return allMatches;\n  }, {});\n  var totalMatches = [];\n\n  while (cursor < contentLength) {\n    cursor = content.indexOf(\"<\", cursor);\n\n    if (cursor === -1) {\n      break;\n    }\n\n    var offset = cursor;\n    var nextOpening = content.indexOf(\"<\", cursor + 1);\n    cursor = content.indexOf(\">\", cursor);\n\n    if (cursor === -1 || nextOpening !== -1 && cursor > nextOpening) {\n      throwXmlInvalid(content, offset);\n    }\n\n    var tagText = content.slice(offset, cursor + 1);\n\n    var _getTag = getTag(tagText),\n        tag = _getTag.tag,\n        position = _getTag.position;\n\n    var text = allMatches[tag];\n\n    if (text == null) {\n      continue;\n    }\n\n    totalMatches.push({\n      type: \"tag\",\n      position: position,\n      text: text,\n      offset: offset,\n      value: tagText,\n      tag: tag\n    });\n  }\n\n  return totalMatches;\n}\n\nfunction getDelimiterErrors(delimiterMatches, fullText, ranges) {\n  if (delimiterMatches.length === 0) {\n    return [];\n  }\n\n  var errors = [];\n  var inDelimiter = false;\n  var lastDelimiterMatch = {\n    offset: 0\n  };\n  var xtag;\n  var rangeIndex = 0;\n  delimiterMatches.forEach(function (delimiterMatch) {\n    while (ranges[rangeIndex + 1]) {\n      if (ranges[rangeIndex + 1].offset > delimiterMatch.offset) {\n        break;\n      }\n\n      rangeIndex++;\n    }\n\n    xtag = fullText.substr(lastDelimiterMatch.offset, delimiterMatch.offset - lastDelimiterMatch.offset);\n\n    if (delimiterMatch.position === \"start\" && inDelimiter || delimiterMatch.position === \"end\" && !inDelimiter) {\n      if (delimiterMatch.position === \"start\") {\n        errors.push(getUnclosedTagException({\n          xtag: xtag,\n          offset: lastDelimiterMatch.offset\n        }));\n        delimiterMatch.error = true;\n      } else {\n        errors.push(getUnopenedTagException({\n          xtag: xtag,\n          offset: delimiterMatch.offset\n        }));\n        delimiterMatch.error = true;\n      }\n    } else {\n      inDelimiter = !inDelimiter;\n    }\n\n    lastDelimiterMatch = delimiterMatch;\n  });\n  var delimiterMatch = {\n    offset: fullText.length\n  };\n  xtag = fullText.substr(lastDelimiterMatch.offset, delimiterMatch.offset - lastDelimiterMatch.offset);\n\n  if (inDelimiter) {\n    errors.push(getUnclosedTagException({\n      xtag: xtag,\n      offset: lastDelimiterMatch.offset\n    }));\n    delimiterMatch.error = true;\n  }\n\n  return errors;\n}\n\nfunction compareOffsets(startOffset, endOffset) {\n  if (startOffset === endOffset) {\n    return EQUAL;\n  }\n\n  if (startOffset === -1 || endOffset === -1) {\n    return endOffset < startOffset ? START : END;\n  }\n\n  return startOffset < endOffset ? START : END;\n}\n\nfunction splitDelimiters(inside) {\n  var newDelimiters = inside.split(\" \");\n\n  if (newDelimiters.length !== 2) {\n    throw new Error(\"New Delimiters cannot be parsed\");\n  }\n\n  var _newDelimiters = _slicedToArray(newDelimiters, 2),\n      start = _newDelimiters[0],\n      end = _newDelimiters[1];\n\n  if (start.length === 0 || end.length === 0) {\n    throw new Error(\"New Delimiters cannot be parsed\");\n  }\n\n  return [start, end];\n}\n\nfunction getAllIndexes(fullText, delimiters) {\n  var indexes = [];\n  var start = delimiters.start,\n      end = delimiters.end;\n  var offset = -1;\n\n  while (true) {\n    var startOffset = fullText.indexOf(start, offset + 1);\n    var endOffset = fullText.indexOf(end, offset + 1);\n    var position = null;\n    var len = void 0;\n    var compareResult = compareOffsets(startOffset, endOffset);\n\n    if (compareResult === EQUAL) {\n      return indexes;\n    }\n\n    if (compareResult === END) {\n      offset = endOffset;\n      position = \"end\";\n      len = end.length;\n    }\n\n    if (compareResult === START) {\n      offset = startOffset;\n      position = \"start\";\n      len = start.length;\n    }\n\n    if (position === \"start\" && fullText[offset + start.length] === \"=\") {\n      indexes.push({\n        offset: startOffset,\n        position: \"start\",\n        length: start.length,\n        changedelimiter: true\n      });\n      var nextEqual = fullText.indexOf(\"=\", offset + start.length + 1);\n\n      var _endOffset = fullText.indexOf(end, nextEqual + 1);\n\n      indexes.push({\n        offset: _endOffset,\n        position: \"end\",\n        length: end.length,\n        changedelimiter: true\n      });\n      var insideTag = fullText.substr(offset + start.length + 1, nextEqual - offset - start.length - 1);\n\n      var _splitDelimiters = splitDelimiters(insideTag);\n\n      var _splitDelimiters2 = _slicedToArray(_splitDelimiters, 2);\n\n      start = _splitDelimiters2[0];\n      end = _splitDelimiters2[1];\n      offset = _endOffset;\n      continue;\n    }\n\n    indexes.push({\n      offset: offset,\n      position: position,\n      length: len\n    });\n  }\n}\n\nfunction Reader(innerContentParts) {\n  var _this = this;\n\n  this.innerContentParts = innerContentParts;\n  this.full = \"\";\n\n  this.parseDelimiters = function (delimiters) {\n    _this.full = _this.innerContentParts.map(function (p) {\n      return p.value;\n    }).join(\"\");\n    var delimiterMatches = getAllIndexes(_this.full, delimiters);\n    var offset = 0;\n\n    var ranges = _this.innerContentParts.map(function (part) {\n      offset += part.value.length;\n      return {\n        offset: offset - part.value.length,\n        lIndex: part.lIndex\n      };\n    });\n\n    var errors = getDelimiterErrors(delimiterMatches, _this.full, ranges);\n    var cutNext = 0;\n    var delimiterIndex = 0;\n    _this.parsed = ranges.map(function (p, i) {\n      var offset = p.offset;\n      var range = [offset, offset + this.innerContentParts[i].value.length];\n      var partContent = this.innerContentParts[i].value;\n      var delimitersInOffset = [];\n\n      while (delimiterIndex < delimiterMatches.length && inRange(range, delimiterMatches[delimiterIndex])) {\n        delimitersInOffset.push(delimiterMatches[delimiterIndex]);\n        delimiterIndex++;\n      }\n\n      var parts = [];\n      var cursor = 0;\n\n      if (cutNext > 0) {\n        cursor = cutNext;\n        cutNext = 0;\n      }\n\n      var insideDelimiterChange;\n      delimitersInOffset.forEach(function (delimiterInOffset) {\n        var value = partContent.substr(cursor, delimiterInOffset.offset - offset - cursor);\n\n        if (value.length > 0) {\n          if (insideDelimiterChange) {\n            if (delimiterInOffset.changedelimiter) {\n              cursor = delimiterInOffset.offset - offset + delimiterInOffset.length;\n              insideDelimiterChange = delimiterInOffset.position === \"start\";\n            }\n\n            return;\n          }\n\n          parts.push({\n            type: \"content\",\n            value: value,\n            offset: cursor + offset\n          });\n          cursor += value.length;\n        }\n\n        var delimiterPart = {\n          type: \"delimiter\",\n          position: delimiterInOffset.position,\n          offset: cursor + offset\n        };\n\n        if (delimiterInOffset.error) {\n          delimiterPart.error = delimiterInOffset.error;\n        }\n\n        if (delimiterInOffset.changedelimiter) {\n          insideDelimiterChange = delimiterInOffset.position === \"start\";\n          cursor = delimiterInOffset.offset - offset + delimiterInOffset.length;\n          return;\n        }\n\n        parts.push(delimiterPart);\n        cursor = delimiterInOffset.offset - offset + delimiterInOffset.length;\n      });\n      cutNext = cursor - partContent.length;\n      var value = partContent.substr(cursor);\n\n      if (value.length > 0) {\n        parts.push({\n          type: \"content\",\n          value: value,\n          offset: offset\n        });\n      }\n\n      return parts;\n    }, _this);\n    _this.errors = errors;\n  };\n}\n\nfunction getContentParts(xmlparsed) {\n  var inTextTag = false;\n  var innerContentParts = [];\n  xmlparsed.forEach(function (part) {\n    inTextTag = updateInTextTag(part, inTextTag);\n\n    if (inTextTag && part.type === \"content\") {\n      innerContentParts.push(part);\n    }\n  });\n  return innerContentParts;\n}\n\nmodule.exports = {\n  parse: function parse(xmlparsed, delimiters) {\n    var inTextTag = false;\n    var reader = new Reader(getContentParts(xmlparsed));\n    reader.parseDelimiters(delimiters);\n    var lexed = [];\n    var index = 0;\n    xmlparsed.forEach(function (part) {\n      inTextTag = updateInTextTag(part, inTextTag);\n\n      if (part.type === \"content\") {\n        part.position = inTextTag ? \"insidetag\" : \"outsidetag\";\n      }\n\n      if (inTextTag && part.type === \"content\") {\n        Array.prototype.push.apply(lexed, reader.parsed[index].map(function (p) {\n          if (p.type === \"content\") {\n            p.position = \"insidetag\";\n          }\n\n          return p;\n        }));\n        index++;\n      } else {\n        lexed.push(part);\n      }\n    });\n    lexed = lexed.map(function (p, i) {\n      p.lIndex = i;\n      return p;\n    });\n    return {\n      errors: reader.errors,\n      lexed: lexed\n    };\n  },\n  xmlparse: function xmlparse(content, xmltags) {\n    var matches = tagMatcher(content, xmltags.text, xmltags.other);\n    var cursor = 0;\n    var parsed = matches.reduce(function (parsed, match) {\n      var value = content.substr(cursor, match.offset - cursor);\n\n      if (value.length > 0) {\n        parsed.push({\n          type: \"content\",\n          value: value\n        });\n      }\n\n      cursor = match.offset + match.value.length;\n      delete match.offset;\n\n      if (match.value.length > 0) {\n        parsed.push(match);\n      }\n\n      return parsed;\n    }, []);\n    var value = content.substr(cursor);\n\n    if (value.length > 0) {\n      parsed.push({\n        type: \"content\",\n        value: value\n      });\n    }\n\n    return parsed;\n  }\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/lexer.js?");

/***/ }),

/***/ "./es6/mergesort.js":
/*!**************************!*\
  !*** ./es6/mergesort.js ***!
  \**************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function getMinFromArrays(arrays, state) {\n  var minIndex = -1;\n\n  for (var i = 0, l = arrays.length; i < l; i++) {\n    if (state[i] >= arrays[i].length) {\n      continue;\n    }\n\n    if (minIndex === -1 || arrays[i][state[i]].offset < arrays[minIndex][state[minIndex]].offset) {\n      minIndex = i;\n    }\n  }\n\n  if (minIndex === -1) {\n    throw new Error(\"minIndex negative\");\n  }\n\n  return minIndex;\n}\n\nmodule.exports = function (arrays) {\n  var totalLength = arrays.reduce(function (sum, array) {\n    return sum + array.length;\n  }, 0);\n  arrays = arrays.filter(function (array) {\n    return array.length > 0;\n  });\n  var resultArray = new Array(totalLength);\n  var state = arrays.map(function () {\n    return 0;\n  });\n  var i = 0;\n\n  while (i <= totalLength - 1) {\n    var arrayIndex = getMinFromArrays(arrays, state);\n    resultArray[i] = arrays[arrayIndex][state[arrayIndex]];\n    state[arrayIndex]++;\n    i++;\n  }\n\n  return resultArray;\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/mergesort.js?");

/***/ }),

/***/ "./es6/module-wrapper.js":
/*!*******************************!*\
  !*** ./es6/module-wrapper.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function emptyFun() {}\n\nfunction identity(i) {\n  return i;\n}\n\nmodule.exports = function (module) {\n  var defaults = {\n    set: emptyFun,\n    parse: emptyFun,\n    render: emptyFun,\n    getTraits: emptyFun,\n    nullGetter: emptyFun,\n    optionsTransformer: identity,\n    postrender: identity,\n    errorsTransformer: identity,\n    getRenderedMap: identity,\n    postparse: identity,\n    on: emptyFun,\n    resolve: emptyFun\n  };\n\n  if (Object.keys(defaults).every(function (key) {\n    return !module[key];\n  })) {\n    throw new Error(\"This module cannot be wrapped, because it doesn't define any of the necessary functions\");\n  }\n\n  Object.keys(defaults).forEach(function (key) {\n    module[key] = module[key] || defaults[key];\n  });\n  return module;\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/module-wrapper.js?");

/***/ }),

/***/ "./es6/modules/expand-pair-trait.js":
/*!******************************************!*\
  !*** ./es6/modules/expand-pair-trait.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar traitName = \"expandPair\";\n\nvar mergeSort = __webpack_require__(/*! ../mergesort */ \"./es6/mergesort.js\");\n\nvar _require = __webpack_require__(/*! ../doc-utils */ \"./es6/doc-utils.js\"),\n    getLeft = _require.getLeft,\n    getRight = _require.getRight;\n\nvar wrapper = __webpack_require__(/*! ../module-wrapper */ \"./es6/module-wrapper.js\");\n\nvar _require2 = __webpack_require__(/*! ../traits */ \"./es6/traits.js\"),\n    getExpandToDefault = _require2.getExpandToDefault;\n\nvar _require3 = __webpack_require__(/*! ../errors */ \"./es6/errors.js\"),\n    getUnmatchedLoopException = _require3.getUnmatchedLoopException,\n    getClosingTagNotMatchOpeningTag = _require3.getClosingTagNotMatchOpeningTag,\n    throwLocationInvalid = _require3.throwLocationInvalid;\n\nfunction getOpenCountChange(part) {\n  switch (part.location) {\n    case \"start\":\n      return 1;\n\n    case \"end\":\n      return -1;\n\n    default:\n      throwLocationInvalid(part);\n  }\n}\n\nfunction getPairs(traits) {\n  var errors = [];\n  var pairs = [];\n\n  if (traits.length === 0) {\n    return {\n      pairs: pairs,\n      errors: errors\n    };\n  }\n\n  var countOpen = 1;\n\n  var _traits = _slicedToArray(traits, 1),\n      firstTrait = _traits[0];\n\n  if (firstTrait.part.location === \"start\") {\n    for (var i = 1; i < traits.length; i++) {\n      var currentTrait = traits[i];\n      countOpen += getOpenCountChange(currentTrait.part);\n\n      if (countOpen === 0) {\n        var _outer = getPairs(traits.slice(i + 1));\n\n        if (currentTrait.part.value !== firstTrait.part.value && currentTrait.part.value !== \"\") {\n          errors.push(getClosingTagNotMatchOpeningTag({\n            tags: [firstTrait.part, currentTrait.part]\n          }));\n        } else {\n          pairs = [[firstTrait, currentTrait]];\n        }\n\n        return {\n          pairs: pairs.concat(_outer.pairs),\n          errors: errors.concat(_outer.errors)\n        };\n      }\n    }\n  }\n\n  var part = firstTrait.part;\n  errors.push(getUnmatchedLoopException({\n    part: part,\n    location: part.location\n  }));\n  var outer = getPairs(traits.slice(1));\n  return {\n    pairs: outer.pairs,\n    errors: errors.concat(outer.errors)\n  };\n}\n\nvar expandPairTrait = {\n  name: \"ExpandPairTrait\",\n  optionsTransformer: function optionsTransformer(options, docxtemplater) {\n    this.expandTags = docxtemplater.fileTypeConfig.expandTags.concat(docxtemplater.options.paragraphLoop ? docxtemplater.fileTypeConfig.onParagraphLoop : []);\n    return options;\n  },\n  postparse: function postparse(postparsed, _ref) {\n    var _this = this;\n\n    var getTraits = _ref.getTraits,\n        _postparse = _ref.postparse;\n    var traits = getTraits(traitName, postparsed);\n    traits = traits.map(function (trait) {\n      return trait || [];\n    });\n    traits = mergeSort(traits);\n\n    var _getPairs = getPairs(traits),\n        pairs = _getPairs.pairs,\n        errors = _getPairs.errors;\n\n    var expandedPairs = pairs.map(function (pair) {\n      var expandTo = pair[0].part.expandTo;\n\n      if (expandTo === \"auto\") {\n        var result = getExpandToDefault(postparsed, pair, _this.expandTags);\n\n        if (result.error) {\n          errors.push(result.error);\n        }\n\n        expandTo = result.value;\n      }\n\n      if (!expandTo) {\n        return [pair[0].offset, pair[1].offset];\n      }\n\n      var left = getLeft(postparsed, expandTo, pair[0].offset);\n      var right = getRight(postparsed, expandTo, pair[1].offset);\n      return [left, right];\n    });\n    var currentPairIndex = 0;\n    var innerParts;\n    var newParsed = postparsed.reduce(function (newParsed, part, i) {\n      var inPair = currentPairIndex < pairs.length && expandedPairs[currentPairIndex][0] <= i;\n      var pair = pairs[currentPairIndex];\n      var expandedPair = expandedPairs[currentPairIndex];\n\n      if (!inPair) {\n        newParsed.push(part);\n        return newParsed;\n      }\n\n      if (expandedPair[0] === i) {\n        innerParts = [];\n      }\n\n      if (pair[0].offset !== i && pair[1].offset !== i) {\n        innerParts.push(part);\n      }\n\n      if (expandedPair[1] === i) {\n        var basePart = postparsed[pair[0].offset];\n        basePart.subparsed = _postparse(innerParts, {\n          basePart: basePart\n        });\n        delete basePart.location;\n        delete basePart.expandTo;\n        newParsed.push(basePart);\n        currentPairIndex++;\n      }\n\n      return newParsed;\n    }, []);\n    return {\n      postparsed: newParsed,\n      errors: errors\n    };\n  }\n};\n\nmodule.exports = function () {\n  return wrapper(expandPairTrait);\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/modules/expand-pair-trait.js?");

/***/ }),

/***/ "./es6/modules/loop.js":
/*!*****************************!*\
  !*** ./es6/modules/loop.js ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = __webpack_require__(/*! ../doc-utils */ \"./es6/doc-utils.js\"),\n    mergeObjects = _require.mergeObjects,\n    chunkBy = _require.chunkBy,\n    last = _require.last,\n    isParagraphStart = _require.isParagraphStart,\n    isParagraphEnd = _require.isParagraphEnd,\n    isContent = _require.isContent;\n\nvar wrapper = __webpack_require__(/*! ../module-wrapper */ \"./es6/module-wrapper.js\");\n\nvar _require2 = __webpack_require__(/*! ../prefix-matcher */ \"./es6/prefix-matcher.js\"),\n    match = _require2.match,\n    getValue = _require2.getValue,\n    getValues = _require2.getValues;\n\nvar moduleName = \"loop\";\n\nfunction hasContent(parts) {\n  return parts.some(function (part) {\n    return isContent(part);\n  });\n}\n\nfunction isEnclosedByParagraphs(parsed) {\n  if (parsed.length === 0) {\n    return false;\n  }\n\n  return isParagraphStart(parsed[0]) && isParagraphEnd(last(parsed));\n}\n\nfunction getOffset(chunk) {\n  return hasContent(chunk) ? 0 : chunk.length;\n}\n\nvar LoopModule =\n/*#__PURE__*/\nfunction () {\n  function LoopModule() {\n    _classCallCheck(this, LoopModule);\n\n    this.name = \"LoopModule\";\n    this.prefix = {\n      start: \"#\",\n      end: \"/\",\n      dash: /^-([^\\s]+)\\s(.+)$/,\n      inverted: \"^\"\n    };\n  }\n\n  _createClass(LoopModule, [{\n    key: \"parse\",\n    value: function parse(placeHolderContent) {\n      var module = moduleName;\n      var type = \"placeholder\";\n      var _this$prefix = this.prefix,\n          start = _this$prefix.start,\n          inverted = _this$prefix.inverted,\n          dash = _this$prefix.dash,\n          end = _this$prefix.end;\n\n      if (match(start, placeHolderContent)) {\n        return {\n          type: type,\n          value: getValue(start, placeHolderContent),\n          expandTo: \"auto\",\n          module: module,\n          location: \"start\",\n          inverted: false\n        };\n      }\n\n      if (match(inverted, placeHolderContent)) {\n        return {\n          type: type,\n          value: getValue(inverted, placeHolderContent),\n          expandTo: \"auto\",\n          module: module,\n          location: \"start\",\n          inverted: true\n        };\n      }\n\n      if (match(end, placeHolderContent)) {\n        return {\n          type: type,\n          value: getValue(end, placeHolderContent),\n          module: module,\n          location: \"end\"\n        };\n      }\n\n      if (match(dash, placeHolderContent)) {\n        var _getValues = getValues(dash, placeHolderContent),\n            _getValues2 = _slicedToArray(_getValues, 3),\n            expandTo = _getValues2[1],\n            value = _getValues2[2];\n\n        return {\n          type: type,\n          value: value,\n          expandTo: expandTo,\n          module: module,\n          location: \"start\",\n          inverted: false\n        };\n      }\n\n      return null;\n    }\n  }, {\n    key: \"getTraits\",\n    value: function getTraits(traitName, parsed) {\n      if (traitName !== \"expandPair\") {\n        return;\n      }\n\n      return parsed.reduce(function (tags, part, offset) {\n        if (part.type === \"placeholder\" && part.module === moduleName) {\n          tags.push({\n            part: part,\n            offset: offset\n          });\n        }\n\n        return tags;\n      }, []);\n    }\n  }, {\n    key: \"postparse\",\n    value: function postparse(parsed, _ref) {\n      var basePart = _ref.basePart;\n\n      if (!isEnclosedByParagraphs(parsed)) {\n        return parsed;\n      }\n\n      if (!basePart || basePart.expandTo !== \"auto\" || basePart.module !== moduleName) {\n        return parsed;\n      }\n\n      var chunks = chunkBy(parsed, function (p) {\n        if (isParagraphStart(p)) {\n          return \"start\";\n        }\n\n        if (isParagraphEnd(p)) {\n          return \"end\";\n        }\n\n        return null;\n      });\n\n      if (chunks.length <= 2) {\n        return parsed;\n      }\n\n      var firstChunk = chunks[0];\n      var lastChunk = last(chunks);\n      var firstOffset = getOffset(firstChunk);\n      var lastOffset = getOffset(lastChunk);\n\n      if (firstOffset === 0 || lastOffset === 0) {\n        return parsed;\n      }\n\n      return parsed.slice(firstOffset, parsed.length - lastOffset);\n    }\n  }, {\n    key: \"render\",\n    value: function render(part, options) {\n      if (!part.type === \"placeholder\" || part.module !== moduleName) {\n        return null;\n      }\n\n      var totalValue = [];\n      var errors = [];\n\n      function loopOver(scope, i) {\n        var scopeManager = options.scopeManager.createSubScopeManager(scope, part.value, i, part);\n        var subRendered = options.render(mergeObjects({}, options, {\n          compiled: part.subparsed,\n          tags: {},\n          scopeManager: scopeManager\n        }));\n        totalValue = totalValue.concat(subRendered.parts);\n        errors = errors.concat(subRendered.errors || []);\n      }\n\n      options.scopeManager.loopOver(part.value, loopOver, part.inverted, {\n        part: part\n      });\n      return {\n        value: totalValue.join(\"\"),\n        errors: errors\n      };\n    }\n  }, {\n    key: \"resolve\",\n    value: function resolve(part, options) {\n      if (!part.type === \"placeholder\" || part.module !== moduleName) {\n        return null;\n      }\n\n      var value = options.scopeManager.getValue(part.value, {\n        part: part\n      });\n      var promises = [];\n\n      function loopOver(scope, i) {\n        var scopeManager = options.scopeManager.createSubScopeManager(scope, part.value, i, part);\n        promises.push(options.resolve(mergeObjects(options, {\n          compiled: part.subparsed,\n          tags: {},\n          scopeManager: scopeManager\n        })));\n      }\n\n      return Promise.resolve(value).then(function (value) {\n        options.scopeManager.loopOverValue(value, loopOver, part.inverted);\n        return Promise.all(promises).then(function (r) {\n          return r.map(function (_ref2) {\n            var resolved = _ref2.resolved;\n            return resolved;\n          });\n        });\n      }).then(function (r) {\n        return r;\n      });\n    }\n  }]);\n\n  return LoopModule;\n}();\n\nmodule.exports = function () {\n  return wrapper(new LoopModule());\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/modules/loop.js?");

/***/ }),

/***/ "./es6/modules/rawxml.js":
/*!*******************************!*\
  !*** ./es6/modules/rawxml.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar traits = __webpack_require__(/*! ../traits */ \"./es6/traits.js\");\n\nvar _require = __webpack_require__(/*! ../doc-utils */ \"./es6/doc-utils.js\"),\n    isContent = _require.isContent;\n\nvar _require2 = __webpack_require__(/*! ../errors */ \"./es6/errors.js\"),\n    throwRawTagShouldBeOnlyTextInParagraph = _require2.throwRawTagShouldBeOnlyTextInParagraph;\n\nvar _require3 = __webpack_require__(/*! ../prefix-matcher */ \"./es6/prefix-matcher.js\"),\n    match = _require3.match,\n    getValue = _require3.getValue;\n\nvar moduleName = \"rawxml\";\n\nvar wrapper = __webpack_require__(/*! ../module-wrapper */ \"./es6/module-wrapper.js\");\n\nfunction getNearestLeft(parsed, elements, index) {\n  for (var i = index; i >= 0; i--) {\n    var part = parsed[i];\n\n    for (var j = 0, len = elements.length; j < len; j++) {\n      var element = elements[j];\n\n      if (part.value.indexOf(\"<\" + element) === 0 && [\">\", \" \"].indexOf(part.value[element.length + 1]) !== -1) {\n        return elements[j];\n      }\n    }\n  }\n\n  return null;\n}\n\nfunction getNearestRight(parsed, elements, index) {\n  for (var i = index, l = parsed.length; i < l; i++) {\n    var part = parsed[i];\n\n    for (var j = 0, len = elements.length; j < len; j++) {\n      var element = elements[j];\n\n      if (part.value === \"</\" + element + \">\") {\n        return elements[j];\n      }\n    }\n  }\n\n  return -1;\n}\n\nfunction getInner(_ref) {\n  var part = _ref.part,\n      left = _ref.left,\n      right = _ref.right,\n      postparsed = _ref.postparsed,\n      index = _ref.index;\n  var before = getNearestLeft(postparsed, [\"w:p\", \"w:tc\"], left - 1);\n  var after = getNearestRight(postparsed, [\"w:p\", \"w:tc\"], right + 1);\n\n  if (after === \"w:tc\" && before === \"w:tc\") {\n    part.emptyValue = \"<w:p></w:p>\";\n  }\n\n  var paragraphParts = postparsed.slice(left + 1, right);\n  paragraphParts.forEach(function (p, i) {\n    if (i === index - left - 1) {\n      return;\n    }\n\n    if (isContent(p)) {\n      throwRawTagShouldBeOnlyTextInParagraph({\n        paragraphParts: paragraphParts,\n        part: part\n      });\n    }\n  });\n  return part;\n}\n\nvar RawXmlModule =\n/*#__PURE__*/\nfunction () {\n  function RawXmlModule() {\n    _classCallCheck(this, RawXmlModule);\n\n    this.name = \"RawXmlModule\";\n    this.prefix = \"@\";\n  }\n\n  _createClass(RawXmlModule, [{\n    key: \"optionsTransformer\",\n    value: function optionsTransformer(options, docxtemplater) {\n      this.fileTypeConfig = docxtemplater.fileTypeConfig;\n      return options;\n    }\n  }, {\n    key: \"parse\",\n    value: function parse(placeHolderContent) {\n      var type = \"placeholder\";\n\n      if (match(this.prefix, placeHolderContent)) {\n        return {\n          type: type,\n          value: getValue(this.prefix, placeHolderContent),\n          module: moduleName\n        };\n      }\n\n      return null;\n    }\n  }, {\n    key: \"postparse\",\n    value: function postparse(postparsed) {\n      return traits.expandToOne(postparsed, {\n        moduleName: moduleName,\n        getInner: getInner,\n        expandTo: this.fileTypeConfig.tagRawXml\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render(part, options) {\n      if (part.module !== moduleName) {\n        return null;\n      }\n\n      var value = options.scopeManager.getValue(part.value, {\n        part: part\n      });\n\n      if (value == null) {\n        value = options.nullGetter(part);\n      }\n\n      if (!value) {\n        return {\n          value: part.emptyValue || \"\"\n        };\n      }\n\n      return {\n        value: value\n      };\n    }\n  }, {\n    key: \"resolve\",\n    value: function resolve(part, options) {\n      if (!part.type === \"placeholder\" || part.module !== moduleName) {\n        return null;\n      }\n\n      return options.scopeManager.getValueAsync(part.value, {\n        part: part\n      }).then(function (value) {\n        if (value == null) {\n          return options.nullGetter(part);\n        }\n\n        return value;\n      });\n    }\n  }]);\n\n  return RawXmlModule;\n}();\n\nmodule.exports = function () {\n  return wrapper(new RawXmlModule());\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/modules/rawxml.js?");

/***/ }),

/***/ "./es6/modules/render.js":
/*!*******************************!*\
  !*** ./es6/modules/render.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar wrapper = __webpack_require__(/*! ../module-wrapper */ \"./es6/module-wrapper.js\");\n\nvar _require = __webpack_require__(/*! ../errors */ \"./es6/errors.js\"),\n    getScopeCompilationError = _require.getScopeCompilationError;\n\nvar _require2 = __webpack_require__(/*! ../doc-utils */ \"./es6/doc-utils.js\"),\n    utf8ToWord = _require2.utf8ToWord,\n    hasCorruptCharacters = _require2.hasCorruptCharacters;\n\nvar _require3 = __webpack_require__(/*! ../errors */ \"./es6/errors.js\"),\n    throwCorruptCharacters = _require3.throwCorruptCharacters;\n\nvar ftprefix = {\n  docx: \"w\",\n  pptx: \"a\"\n};\n\nvar Render =\n/*#__PURE__*/\nfunction () {\n  function Render() {\n    _classCallCheck(this, Render);\n\n    this.name = \"Render\";\n    this.recordRun = false;\n    this.recordedRun = [];\n  }\n\n  _createClass(Render, [{\n    key: \"set\",\n    value: function set(obj) {\n      if (obj.compiled) {\n        this.compiled = obj.compiled;\n      }\n\n      if (obj.data != null) {\n        this.data = obj.data;\n      }\n    }\n  }, {\n    key: \"getRenderedMap\",\n    value: function getRenderedMap(mapper) {\n      var _this = this;\n\n      return Object.keys(this.compiled).reduce(function (mapper, from) {\n        mapper[from] = {\n          from: from,\n          data: _this.data\n        };\n        return mapper;\n      }, mapper);\n    }\n  }, {\n    key: \"optionsTransformer\",\n    value: function optionsTransformer(options, docxtemplater) {\n      this.parser = docxtemplater.parser;\n      this.fileType = docxtemplater.fileType;\n      return options;\n    }\n  }, {\n    key: \"postparse\",\n    value: function postparse(postparsed) {\n      var _this2 = this;\n\n      var errors = [];\n      postparsed.forEach(function (p) {\n        if (p.type === \"placeholder\") {\n          var tag = p.value;\n\n          try {\n            _this2.parser(tag, {\n              tag: p\n            });\n          } catch (rootError) {\n            errors.push(getScopeCompilationError({\n              tag: tag,\n              rootError: rootError\n            }));\n          }\n        }\n      });\n      return {\n        postparsed: postparsed,\n        errors: errors\n      };\n    }\n  }, {\n    key: \"recordRuns\",\n    value: function recordRuns(part) {\n      if (part.tag === \"\".concat(ftprefix[this.fileType], \":r\")) {\n        this.recordRun = false;\n        this.recordedRun = [];\n      } else if (part.tag === \"\".concat(ftprefix[this.fileType], \":rPr\")) {\n        if (part.position === \"start\") {\n          this.recordRun = true;\n          this.recordedRun = [part.value];\n        }\n\n        if (part.position === \"end\") {\n          this.recordedRun.push(part.value);\n          this.recordRun = false;\n        }\n      } else if (this.recordRun) {\n        this.recordedRun.push(part.value);\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render(part, _ref) {\n      var scopeManager = _ref.scopeManager,\n          linebreaks = _ref.linebreaks,\n          nullGetter = _ref.nullGetter;\n\n      if (linebreaks) {\n        this.recordRuns(part);\n      }\n\n      if (part.type === \"placeholder\" && !part.module) {\n        var value = scopeManager.getValue(part.value, {\n          part: part\n        });\n\n        if (value == null) {\n          value = nullGetter(part);\n        }\n\n        if (hasCorruptCharacters(value)) {\n          throwCorruptCharacters({\n            tag: part.value,\n            value: value\n          });\n        }\n\n        if (typeof value !== \"string\") {\n          value = value.toString();\n        }\n\n        if (linebreaks) {\n          var p = ftprefix[this.fileType];\n          var br = this.fileType === \"docx\" ? \"<w:r><w:br/></w:r>\" : \"<a:br/>\";\n          var lines = value.split(\"\\n\");\n          var runprops = this.recordedRun.join(\"\");\n          return {\n            value: lines.map(function (line) {\n              return utf8ToWord(line);\n            }).join(\"</\".concat(p, \":t></\").concat(p, \":r>\").concat(br, \"<\").concat(p, \":r>\").concat(runprops, \"<\").concat(p, \":t>\"))\n          };\n        }\n\n        return {\n          value: utf8ToWord(value)\n        };\n      }\n    }\n  }]);\n\n  return Render;\n}();\n\nmodule.exports = function () {\n  return wrapper(new Render());\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/modules/render.js?");

/***/ }),

/***/ "./es6/modules/space-preserve.js":
/*!***************************************!*\
  !*** ./es6/modules/space-preserve.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var wrapper = __webpack_require__(/*! ../module-wrapper */ \"./es6/module-wrapper.js\");\n\nvar _require = __webpack_require__(/*! ../doc-utils */ \"./es6/doc-utils.js\"),\n    isTextStart = _require.isTextStart,\n    isTextEnd = _require.isTextEnd,\n    endsWith = _require.endsWith,\n    startsWith = _require.startsWith;\n\nvar wTpreserve = '<w:t xml:space=\"preserve\">';\nvar wTpreservelen = wTpreserve.length;\nvar wtEnd = \"</w:t>\";\nvar wtEndlen = wtEnd.length;\n\nfunction isWtStart(part) {\n  return isTextStart(part) && part.tag === \"w:t\";\n}\n\nfunction addXMLPreserve(chunk, index) {\n  var tag = chunk[index].value;\n\n  if (chunk[index + 1].value === \"</w:t>\") {\n    return tag;\n  }\n\n  if (tag.indexOf('xml:space=\"preserve\"') !== -1) {\n    return tag;\n  }\n\n  return tag.substr(0, tag.length - 1) + ' xml:space=\"preserve\">';\n}\n\nfunction isInsideLoop(meta, chunk) {\n  return meta && meta.basePart && chunk.length > 1;\n}\n\nvar spacePreserve = {\n  name: \"SpacePreserveModule\",\n  postparse: function postparse(postparsed, meta) {\n    var chunk = [],\n        inTextTag = false,\n        endLindex = 0,\n        lastTextTag = 0;\n\n    function isStartingPlaceHolder(part, chunk) {\n      return !endLindex && part.type === \"placeholder\" && (!part.module || part.module === \"loop\") && chunk.length > 1;\n    }\n\n    var result = postparsed.reduce(function (postparsed, part) {\n      if (isWtStart(part)) {\n        inTextTag = true;\n        lastTextTag = chunk.length;\n      }\n\n      if (!inTextTag) {\n        postparsed.push(part);\n        return postparsed;\n      }\n\n      chunk.push(part);\n\n      if (isInsideLoop(meta, chunk)) {\n        endLindex = meta.basePart.endLindex;\n        chunk[0].value = addXMLPreserve(chunk, 0);\n      }\n\n      if (isStartingPlaceHolder(part, chunk)) {\n        endLindex = part.endLindex;\n        chunk[0].value = addXMLPreserve(chunk, 0);\n      }\n\n      if (isTextEnd(part) && part.lIndex > endLindex) {\n        if (endLindex !== 0) {\n          chunk[lastTextTag].value = addXMLPreserve(chunk, lastTextTag);\n        }\n\n        Array.prototype.push.apply(postparsed, chunk);\n        chunk = [];\n        inTextTag = false;\n        endLindex = 0;\n        lastTextTag = 0;\n      }\n\n      return postparsed;\n    }, []);\n    Array.prototype.push.apply(result, chunk);\n    return result;\n  },\n  postrender: function postrender(parts) {\n    return parts.filter(function (p) {\n      return p.length !== 0;\n    }).reduce(function (newParts, p, index, parts) {\n      if (p.indexOf('<w:t xml:space=\"preserve\"></w:t>') !== -1) {\n        p = p.replace(/<w:t xml:space=\"preserve\"><\\/w:t>/g, \"<w:t/>\");\n      }\n\n      if (endsWith(p, wTpreserve) && startsWith(parts[index + 1], wtEnd)) {\n        p = p.substr(0, p.length - wTpreservelen) + \"<w:t/>\";\n        parts[index + 1] = parts[index + 1].substr(wtEndlen);\n      }\n\n      newParts.push(p);\n      return newParts;\n    }, []);\n  }\n};\n\nmodule.exports = function () {\n  return wrapper(spacePreserve);\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/modules/space-preserve.js?");

/***/ }),

/***/ "./es6/parser.js":
/*!***********************!*\
  !*** ./es6/parser.js ***!
  \***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _require = __webpack_require__(/*! ./doc-utils */ \"./es6/doc-utils.js\"),\n    wordToUtf8 = _require.wordToUtf8,\n    concatArrays = _require.concatArrays;\n\nfunction moduleParse(modules, placeHolderContent, parsed, startOffset, endLindex) {\n  var moduleParsed;\n\n  for (var i = 0, l = modules.length; i < l; i++) {\n    var _module = modules[i];\n    moduleParsed = _module.parse(placeHolderContent);\n\n    if (moduleParsed) {\n      moduleParsed.offset = startOffset;\n      moduleParsed.endLindex = endLindex;\n      moduleParsed.lIndex = endLindex;\n      moduleParsed.raw = placeHolderContent;\n      parsed.push(moduleParsed);\n      return parsed;\n    }\n  }\n\n  parsed.push({\n    type: \"placeholder\",\n    value: placeHolderContent,\n    offset: startOffset,\n    endLindex: endLindex,\n    lIndex: endLindex\n  });\n  return parsed;\n}\n\nvar parser = {\n  postparse: function postparse(postparsed, modules) {\n    function getTraits(traitName, postparsed) {\n      return modules.map(function (module) {\n        return module.getTraits(traitName, postparsed);\n      });\n    }\n\n    var errors = [];\n\n    function postparse(postparsed, options) {\n      return modules.reduce(function (postparsed, module) {\n        var r = module.postparse(postparsed, _objectSpread({}, options, {\n          postparse: postparse,\n          getTraits: getTraits\n        }));\n\n        if (r.errors) {\n          errors = concatArrays([errors, r.errors]);\n          return r.postparsed;\n        }\n\n        return r;\n      }, postparsed);\n    }\n\n    return {\n      postparsed: postparse(postparsed),\n      errors: errors\n    };\n  },\n  parse: function parse(lexed, modules) {\n    var inPlaceHolder = false;\n    var placeHolderContent = \"\";\n    var startOffset;\n    var tailParts = [];\n    return lexed.reduce(function lexedToParsed(parsed, token) {\n      if (token.type === \"delimiter\") {\n        inPlaceHolder = token.position === \"start\";\n\n        if (token.position === \"end\") {\n          var endLindex = token.lIndex;\n          placeHolderContent = wordToUtf8(placeHolderContent);\n          parsed = moduleParse(modules, placeHolderContent, parsed, startOffset, endLindex);\n          startOffset = null;\n          Array.prototype.push.apply(parsed, tailParts);\n          tailParts = [];\n        }\n\n        if (token.position === \"start\") {\n          tailParts = [];\n          startOffset = token.offset;\n        }\n\n        placeHolderContent = \"\";\n        return parsed;\n      }\n\n      if (!inPlaceHolder) {\n        parsed.push(token);\n        return parsed;\n      }\n\n      if (token.type !== \"content\" || token.position !== \"insidetag\") {\n        tailParts.push(token);\n        return parsed;\n      }\n\n      placeHolderContent += token.value;\n      return parsed;\n    }, []);\n  }\n};\nmodule.exports = parser;\n\n//# sourceURL=webpack://docxtemplater/./es6/parser.js?");

/***/ }),

/***/ "./es6/postrender.js":
/*!***************************!*\
  !*** ./es6/postrender.js ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction postrender(parts, options) {\n  for (var i = 0, l = options.modules.length; i < l; i++) {\n    var _module = options.modules[i];\n    parts = _module.postrender(parts, options);\n  }\n\n  return parts.join(\"\");\n}\n\nmodule.exports = postrender;\n\n//# sourceURL=webpack://docxtemplater/./es6/postrender.js?");

/***/ }),

/***/ "./es6/prefix-matcher.js":
/*!*******************************!*\
  !*** ./es6/prefix-matcher.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function match(condition, placeHolderContent) {\n  if (typeof condition === \"string\") {\n    return placeHolderContent.substr(0, condition.length) === condition;\n  }\n\n  if (condition instanceof RegExp) {\n    return condition.test(placeHolderContent);\n  }\n}\n\nfunction getValue(condition, placeHolderContent) {\n  if (typeof condition === \"string\") {\n    return placeHolderContent.substr(condition.length);\n  }\n\n  if (condition instanceof RegExp) {\n    return placeHolderContent.match(condition)[1];\n  }\n}\n\nfunction getValues(condition, placeHolderContent) {\n  if (condition instanceof RegExp) {\n    return placeHolderContent.match(condition);\n  }\n}\n\nmodule.exports = {\n  match: match,\n  getValue: getValue,\n  getValues: getValues\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/prefix-matcher.js?");

/***/ }),

/***/ "./es6/render.js":
/*!***********************!*\
  !*** ./es6/render.js ***!
  \***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar _require = __webpack_require__(/*! ./doc-utils */ \"./es6/doc-utils.js\"),\n    concatArrays = _require.concatArrays;\n\nvar _require2 = __webpack_require__(/*! ./errors */ \"./es6/errors.js\"),\n    throwUnimplementedTagType = _require2.throwUnimplementedTagType;\n\nfunction moduleRender(part, options) {\n  var moduleRendered;\n\n  for (var i = 0, l = options.modules.length; i < l; i++) {\n    var _module = options.modules[i];\n    moduleRendered = _module.render(part, options);\n\n    if (moduleRendered) {\n      return moduleRendered;\n    }\n  }\n\n  return false;\n}\n\nfunction render(options) {\n  var baseNullGetter = options.baseNullGetter;\n  var compiled = options.compiled,\n      scopeManager = options.scopeManager;\n\n  options.nullGetter = function (part, sm) {\n    return baseNullGetter(part, sm || scopeManager);\n  };\n\n  var errors = [];\n  var parts = compiled.map(function (part) {\n    var moduleRendered = moduleRender(part, options);\n\n    if (moduleRendered) {\n      if (moduleRendered.errors) {\n        errors = concatArrays([errors, moduleRendered.errors]);\n      }\n\n      return moduleRendered.value;\n    }\n\n    if (part.type === \"content\" || part.type === \"tag\") {\n      return part.value;\n    }\n\n    throwUnimplementedTagType(part);\n  });\n  return {\n    errors: errors,\n    parts: parts\n  };\n}\n\nmodule.exports = render;\n\n//# sourceURL=webpack://docxtemplater/./es6/render.js?");

/***/ }),

/***/ "./es6/resolve.js":
/*!************************!*\
  !*** ./es6/resolve.js ***!
  \************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction moduleResolve(part, options) {\n  var moduleResolved;\n\n  for (var i = 0, l = options.modules.length; i < l; i++) {\n    var _module = options.modules[i];\n    moduleResolved = _module.resolve(part, options);\n\n    if (moduleResolved) {\n      return moduleResolved;\n    }\n  }\n\n  return false;\n}\n\nfunction resolve(options) {\n  var resolved = [];\n  var baseNullGetter = options.baseNullGetter;\n  var compiled = options.compiled,\n      scopeManager = options.scopeManager;\n\n  options.nullGetter = function (part, sm) {\n    return baseNullGetter(part, sm || scopeManager);\n  };\n\n  options.resolved = resolved;\n  var errors = [];\n  return Promise.all(compiled.map(function (part) {\n    var moduleResolved = moduleResolve(part, options);\n\n    if (moduleResolved) {\n      return moduleResolved.then(function (value) {\n        resolved.push({\n          tag: part.value,\n          value: value,\n          lIndex: part.lIndex\n        });\n      });\n    }\n\n    if (part.type === \"placeholder\") {\n      return scopeManager.getValueAsync(part.value, {\n        part: part\n      }).then(function (value) {\n        if (value == null) {\n          value = options.nullGetter(part);\n        }\n\n        resolved.push({\n          tag: part.value,\n          value: value,\n          lIndex: part.lIndex\n        });\n        return value;\n      });\n    }\n\n    return;\n  }).filter(function (a) {\n    return a;\n  })).then(function () {\n    return {\n      errors: errors,\n      resolved: resolved\n    };\n  });\n}\n\nmodule.exports = resolve;\n\n//# sourceURL=webpack://docxtemplater/./es6/resolve.js?");

/***/ }),

/***/ "./es6/scope-manager.js":
/*!******************************!*\
  !*** ./es6/scope-manager.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = __webpack_require__(/*! ./errors */ \"./es6/errors.js\"),\n    getScopeParserExecutionError = _require.getScopeParserExecutionError;\n\nfunction find(list, fn) {\n  var length = list.length >>> 0;\n  var value;\n\n  for (var i = 0; i < length; i++) {\n    value = list[i];\n\n    if (fn.call(this, value, i, list)) {\n      return value;\n    }\n  }\n\n  return undefined;\n}\n\nfunction _getValue(tag, meta, num) {\n  var _this = this;\n\n  this.num = num;\n  var scope = this.scopeList[this.num];\n\n  if (this.resolved) {\n    var w = this.resolved;\n    this.scopePath.forEach(function (p, index) {\n      var lIndex = _this.scopeLindex[index];\n      w = find(w, function (r) {\n        return r.lIndex === lIndex;\n      });\n      w = w.value[_this.scopePathItem[index]];\n    });\n    return find(w, function (r) {\n      return meta.part.lIndex === r.lIndex;\n    }).value;\n  } // search in the scopes (in reverse order) and keep the first defined value\n\n\n  var result;\n  var parser = this.parser(tag, {\n    scopePath: this.scopePath\n  });\n\n  try {\n    result = parser.get(scope, this.getContext(meta));\n  } catch (error) {\n    throw getScopeParserExecutionError({\n      tag: tag,\n      scope: scope,\n      error: error\n    });\n  }\n\n  if (result == null && this.num > 0) {\n    return _getValue.call(this, tag, meta, num - 1);\n  }\n\n  return result;\n}\n\nfunction _getValueAsync(tag, meta, num) {\n  var _this2 = this;\n\n  this.num = num;\n  var scope = this.scopeList[this.num]; // search in the scopes (in reverse order) and keep the first defined value\n\n  var parser = this.parser(tag, {\n    scopePath: this.scopePath\n  });\n  return Promise.resolve(parser.get(scope, this.getContext(meta))).catch(function (error) {\n    throw getScopeParserExecutionError({\n      tag: tag,\n      scope: scope,\n      error: error\n    });\n  }).then(function (result) {\n    if (result == null && num > 0) {\n      return _getValueAsync.call(_this2, tag, meta, num - 1);\n    }\n\n    return result;\n  });\n} // This class responsibility is to manage the scope\n\n\nvar ScopeManager =\n/*#__PURE__*/\nfunction () {\n  function ScopeManager(options) {\n    _classCallCheck(this, ScopeManager);\n\n    this.scopePath = options.scopePath;\n    this.scopePathItem = options.scopePathItem;\n    this.scopeList = options.scopeList;\n    this.scopeLindex = options.scopeLindex;\n    this.parser = options.parser;\n    this.resolved = options.resolved;\n  }\n\n  _createClass(ScopeManager, [{\n    key: \"loopOver\",\n    value: function loopOver(tag, callback, inverted, meta) {\n      inverted = inverted || false;\n      return this.loopOverValue(this.getValue(tag, meta), callback, inverted);\n    }\n  }, {\n    key: \"functorIfInverted\",\n    value: function functorIfInverted(inverted, functor, value, i) {\n      if (inverted) {\n        functor(value, i);\n      }\n    }\n  }, {\n    key: \"isValueFalsy\",\n    value: function isValueFalsy(value, type) {\n      return value == null || !value || type === \"[object Array]\" && value.length === 0;\n    }\n  }, {\n    key: \"loopOverValue\",\n    value: function loopOverValue(value, functor, inverted) {\n      if (this.resolved) {\n        inverted = false;\n      }\n\n      var type = Object.prototype.toString.call(value);\n      var currentValue = this.scopeList[this.num];\n\n      if (this.isValueFalsy(value, type)) {\n        return this.functorIfInverted(inverted, functor, currentValue, 0);\n      }\n\n      if (type === \"[object Array]\") {\n        for (var i = 0, scope; i < value.length; i++) {\n          scope = value[i];\n          this.functorIfInverted(!inverted, functor, scope, i);\n        }\n\n        return;\n      }\n\n      if (type === \"[object Object]\") {\n        return this.functorIfInverted(!inverted, functor, value, 0);\n      }\n\n      return this.functorIfInverted(!inverted, functor, currentValue, 0);\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue(tag, meta) {\n      var num = this.scopeList.length - 1;\n      return _getValue.call(this, tag, meta, num);\n    }\n  }, {\n    key: \"getValueAsync\",\n    value: function getValueAsync(tag, meta) {\n      var num = this.scopeList.length - 1;\n      return _getValueAsync.call(this, tag, meta, num);\n    }\n  }, {\n    key: \"getContext\",\n    value: function getContext(meta) {\n      return {\n        num: this.num,\n        meta: meta,\n        scopeList: this.scopeList,\n        resolved: this.resolved,\n        scopePath: this.scopePath,\n        scopePathItem: this.scopePathItem\n      };\n    }\n  }, {\n    key: \"createSubScopeManager\",\n    value: function createSubScopeManager(scope, tag, i, part) {\n      return new ScopeManager({\n        resolved: this.resolved,\n        parser: this.parser,\n        scopeList: this.scopeList.concat(scope),\n        scopePath: this.scopePath.concat(tag),\n        scopePathItem: this.scopePathItem.concat(i),\n        scopeLindex: this.scopeLindex.concat(part.lIndex)\n      });\n    }\n  }]);\n\n  return ScopeManager;\n}();\n\nmodule.exports = function (options) {\n  options.scopePath = [];\n  options.scopePathItem = [];\n  options.scopeLindex = [];\n  options.scopeList = [options.tags];\n  return new ScopeManager(options);\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/scope-manager.js?");

/***/ }),

/***/ "./es6/traits.js":
/*!***********************!*\
  !*** ./es6/traits.js ***!
  \***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _require = __webpack_require__(/*! ./doc-utils */ \"./es6/doc-utils.js\"),\n    getRightOrNull = _require.getRightOrNull,\n    getRight = _require.getRight,\n    getLeft = _require.getLeft,\n    getLeftOrNull = _require.getLeftOrNull,\n    concatArrays = _require.concatArrays,\n    chunkBy = _require.chunkBy,\n    isTagStart = _require.isTagStart,\n    isTagEnd = _require.isTagEnd,\n    isContent = _require.isContent,\n    last = _require.last;\n\nvar _require2 = __webpack_require__(/*! ./errors */ \"./es6/errors.js\"),\n    XTTemplateError = _require2.XTTemplateError,\n    throwRawTagNotInParagraph = _require2.throwRawTagNotInParagraph,\n    getLoopPositionProducesInvalidXMLError = _require2.getLoopPositionProducesInvalidXMLError;\n\nfunction lastTagIsOpenTag(array, tag) {\n  if (array.length === 0) {\n    return false;\n  }\n\n  var lastTag = array[array.length - 1];\n  var innerLastTag = lastTag.tag.substr(1);\n  var innerCurrentTag = tag.substr(2, tag.length - 3);\n  return innerLastTag.indexOf(innerCurrentTag) === 0;\n}\n\nfunction addTag(array, tag) {\n  array.push({\n    tag: tag\n  });\n  return array;\n}\n\nfunction getListXmlElements(parts) {\n  /*\n  get the different closing and opening tags between two texts (doesn't take into account tags that are opened then closed (those that are closed then opened are returned)):\n  returns:[{\"tag\":\"</w:r>\",\"offset\":13},{\"tag\":\"</w:p>\",\"offset\":265},{\"tag\":\"</w:tc>\",\"offset\":271},{\"tag\":\"<w:tc>\",\"offset\":828},{\"tag\":\"<w:p>\",\"offset\":883},{\"tag\":\"<w:r>\",\"offset\":1483}]\n  */\n  var tags = parts.filter(function (part) {\n    return part.type === \"tag\";\n  });\n  var result = [];\n\n  for (var i = 0, tag; i < tags.length; i++) {\n    tag = tags[i].value; // closing tag\n\n    if (tag[1] === \"/\") {\n      if (lastTagIsOpenTag(result, tag)) {\n        result.pop();\n      } else {\n        result = addTag(result, tag);\n      }\n    } else if (tag[tag.length - 2] !== \"/\") {\n      result = addTag(result, tag);\n    }\n  }\n\n  return result;\n}\n\nfunction has(name, xmlElements) {\n  for (var i = 0; i < xmlElements.length; i++) {\n    var xmlElement = xmlElements[i];\n\n    if (xmlElement.tag.indexOf(\"<\".concat(name)) === 0) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction getExpandToDefault(postparsed, pair, expandTags) {\n  var parts = postparsed.slice(pair[0].offset, pair[1].offset);\n  var xmlElements = getListXmlElements(parts);\n  var closingTagCount = xmlElements.filter(function (xmlElement) {\n    return xmlElement.tag[1] === \"/\";\n  }).length;\n  var startingTagCount = xmlElements.filter(function (xmlElement) {\n    var tag = xmlElement.tag;\n    return tag[1] !== \"/\" && tag[tag.length - 2] !== \"/\";\n  }).length;\n\n  if (closingTagCount !== startingTagCount) {\n    return {\n      error: getLoopPositionProducesInvalidXMLError({\n        tag: pair[0].part.value\n      })\n    };\n  }\n\n  var _loop = function _loop(i, len) {\n    var _expandTags$i = expandTags[i],\n        contains = _expandTags$i.contains,\n        expand = _expandTags$i.expand,\n        onlyTextInTag = _expandTags$i.onlyTextInTag;\n\n    if (has(contains, xmlElements)) {\n      if (onlyTextInTag) {\n        var left = getLeftOrNull(postparsed, contains, pair[0].offset);\n        var right = getRightOrNull(postparsed, contains, pair[1].offset);\n\n        if (left === null || right === null) {\n          return \"continue\";\n        }\n\n        var chunks = chunkBy(postparsed.slice(left, right), function (p) {\n          if (isTagStart(contains, p)) {\n            return \"start\";\n          }\n\n          if (isTagEnd(contains, p)) {\n            return \"end\";\n          }\n\n          return null;\n        });\n\n        if (chunks.length <= 2) {\n          return \"continue\";\n        }\n\n        var firstChunk = chunks[0];\n        var lastChunk = last(chunks);\n        var firstContent = firstChunk.filter(isContent);\n        var lastContent = lastChunk.filter(isContent);\n\n        if (firstContent.length !== 1 || lastContent.length !== 1) {\n          return \"continue\";\n        }\n      }\n\n      return {\n        v: {\n          value: expand\n        }\n      };\n    }\n  };\n\n  for (var i = 0, len = expandTags.length; i < len; i++) {\n    var _ret = _loop(i, len);\n\n    switch (_ret) {\n      case \"continue\":\n        continue;\n\n      default:\n        if (_typeof(_ret) === \"object\") return _ret.v;\n    }\n  }\n\n  return false;\n}\n\nfunction expandOne(part, postparsed, options) {\n  var expandTo = part.expandTo || options.expandTo;\n  var index = postparsed.indexOf(part);\n\n  if (!expandTo) {\n    return postparsed;\n  }\n\n  var right, left;\n\n  try {\n    right = getRight(postparsed, expandTo, index);\n    left = getLeft(postparsed, expandTo, index);\n  } catch (rootError) {\n    if (rootError instanceof XTTemplateError) {\n      throwRawTagNotInParagraph({\n        part: part,\n        rootError: rootError,\n        postparsed: postparsed,\n        expandTo: expandTo,\n        index: index\n      });\n    }\n\n    throw rootError;\n  }\n\n  var leftParts = postparsed.slice(left, index);\n  var rightParts = postparsed.slice(index + 1, right + 1);\n  var inner = options.getInner({\n    index: index,\n    part: part,\n    leftParts: leftParts,\n    rightParts: rightParts,\n    left: left,\n    right: right,\n    postparsed: postparsed\n  });\n\n  if (!inner.length) {\n    inner.expanded = [leftParts, rightParts];\n    inner = [inner];\n  }\n\n  return concatArrays([postparsed.slice(0, left), inner, postparsed.slice(right + 1)]);\n}\n\nfunction expandToOne(postparsed, options) {\n  var errors = [];\n\n  if (postparsed.errors) {\n    errors = postparsed.errors;\n    postparsed = postparsed.postparsed;\n  }\n\n  var expandToElements = postparsed.reduce(function (elements, part) {\n    if (part.type === \"placeholder\" && part.module === options.moduleName) {\n      elements.push(part);\n    }\n\n    return elements;\n  }, []);\n  expandToElements.forEach(function (part) {\n    try {\n      postparsed = expandOne(part, postparsed, options);\n    } catch (error) {\n      if (error instanceof XTTemplateError) {\n        errors.push(error);\n      } else {\n        throw error;\n      }\n    }\n  });\n  return {\n    postparsed: postparsed,\n    errors: errors\n  };\n}\n\nmodule.exports = {\n  expandToOne: expandToOne,\n  getExpandToDefault: getExpandToDefault\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/traits.js?");

/***/ }),

/***/ "./es6/xml-matcher.js":
/*!****************************!*\
  !*** ./es6/xml-matcher.js ***!
  \****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval(" // res class responsibility is to parse the XML.\n\nvar _require = __webpack_require__(/*! ./doc-utils */ \"./es6/doc-utils.js\"),\n    pregMatchAll = _require.pregMatchAll;\n\nfunction handleRecursiveCase(res) {\n  /*\n  * Because xmlTemplater is recursive (meaning it can call it self), we need to handle special cases where the XML is not valid:\n  * For example with res string \"I am</w:t></w:r></w:p><w:p><w:r><w:t>sleeping\",\n  *   - we need to match also the string that is inside an implicit <w:t> (that's the role of replacerUnshift) (in res case 'I am')\n  *   - we need to match the string that is at the right of a <w:t> (that's the role of replacerPush) (in res case 'sleeping')\n  * the test: describe \"scope calculation\" it \"should compute the scope between 2 <w:t>\" makes sure that res part of code works\n  * It should even work if they is no XML at all, for example if the code is just \"I am sleeping\", in res case however, they should only be one match\n  */\n  function replacerUnshift() {\n    var pn = {\n      array: Array.prototype.slice.call(arguments)\n    };\n    pn.array.shift();\n    var match = pn.array[0] + pn.array[1]; // add match so that pn[0] = whole match, pn[1]= first parenthesis,...\n\n    pn.array.unshift(match);\n    pn.array.pop();\n    var offset = pn.array.pop();\n    pn.offset = offset;\n    pn.first = true; // add at the beginning\n\n    res.matches.unshift(pn);\n  }\n\n  if (res.content.indexOf(\"<\") === -1 && res.content.indexOf(\">\") === -1) {\n    res.content.replace(/^()([^<>]*)$/, replacerUnshift);\n  }\n\n  var r = new RegExp(\"^()([^<]+)</(?:\".concat(res.tagsXmlArrayJoined, \")>\"));\n  res.content.replace(r, replacerUnshift);\n\n  function replacerPush() {\n    var pn = {\n      array: Array.prototype.slice.call(arguments)\n    };\n    pn.array.pop();\n    var offset = pn.array.pop();\n    pn.offset = offset;\n    pn.last = true;\n\n    if (pn.array[0].indexOf(\"/>\") !== -1) {\n      return;\n    } // add at the end\n\n\n    res.matches.push(pn);\n  }\n\n  r = new RegExp(\"(<(?:\".concat(res.tagsXmlArrayJoined, \")[^>]*>)([^>]+)$\"));\n  res.content.replace(r, replacerPush);\n  return res;\n}\n\nmodule.exports = function xmlMatcher(content, tagsXmlArray) {\n  var res = {};\n  res.content = content;\n  res.tagsXmlArray = tagsXmlArray;\n  res.tagsXmlArrayJoined = res.tagsXmlArray.join(\"|\");\n  var regexp = new RegExp(\"(?:(<(?:\".concat(res.tagsXmlArrayJoined, \")[^>]*>)([^<>]*)</(?:\").concat(res.tagsXmlArrayJoined, \")>)|(<(?:\").concat(res.tagsXmlArrayJoined, \")[^>]*/>)\"), \"g\");\n  res.matches = pregMatchAll(regexp, res.content);\n  return handleRecursiveCase(res);\n};\n\n//# sourceURL=webpack://docxtemplater/./es6/xml-matcher.js?");

/***/ }),

/***/ "./es6/xml-templater.js":
/*!******************************!*\
  !*** ./es6/xml-templater.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = __webpack_require__(/*! ./doc-utils */ \"./es6/doc-utils.js\"),\n    wordToUtf8 = _require.wordToUtf8,\n    convertSpaces = _require.convertSpaces,\n    defaults = _require.defaults;\n\nvar createScope = __webpack_require__(/*! ./scope-manager */ \"./es6/scope-manager.js\");\n\nvar xmlMatcher = __webpack_require__(/*! ./xml-matcher */ \"./es6/xml-matcher.js\");\n\nvar _require2 = __webpack_require__(/*! ./errors */ \"./es6/errors.js\"),\n    throwMultiError = _require2.throwMultiError,\n    throwContentMustBeString = _require2.throwContentMustBeString;\n\nvar Lexer = __webpack_require__(/*! ./lexer */ \"./es6/lexer.js\");\n\nvar Parser = __webpack_require__(/*! ./parser.js */ \"./es6/parser.js\");\n\nvar _render = __webpack_require__(/*! ./render.js */ \"./es6/render.js\");\n\nvar postrender = __webpack_require__(/*! ./postrender.js */ \"./es6/postrender.js\");\n\nvar resolve = __webpack_require__(/*! ./resolve.js */ \"./es6/resolve.js\");\n\nfunction _getFullText(content, tagsXmlArray) {\n  var matcher = xmlMatcher(content, tagsXmlArray);\n  var result = matcher.matches.map(function (match) {\n    return match.array[2];\n  });\n  return wordToUtf8(convertSpaces(result.join(\"\")));\n}\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n  function XmlTemplater(content, options) {\n    _classCallCheck(this, XmlTemplater);\n\n    this.filePath = options.filePath;\n    this.modules = options.modules;\n    this.fileTypeConfig = options.fileTypeConfig;\n    Object.keys(defaults).map(function (key) {\n      this[key] = options[key] != null ? options[key] : defaults[key];\n    }, this);\n    this.setModules({\n      inspect: {\n        filePath: this.filePath\n      }\n    });\n    this.load(content);\n  }\n\n  _createClass(XmlTemplater, [{\n    key: \"load\",\n    value: function load(content) {\n      if (typeof content !== \"string\") {\n        throwContentMustBeString(_typeof(content));\n      }\n\n      this.content = content;\n    }\n  }, {\n    key: \"setTags\",\n    value: function setTags(tags) {\n      this.tags = tags != null ? tags : {};\n      this.scopeManager = createScope({\n        tags: this.tags,\n        parser: this.parser\n      });\n      return this;\n    }\n  }, {\n    key: \"resolveTags\",\n    value: function resolveTags(tags) {\n      var _this = this;\n\n      this.tags = tags != null ? tags : {};\n      this.scopeManager = createScope({\n        tags: this.tags,\n        parser: this.parser\n      });\n      var options = this.getOptions();\n      options.scopeManager = createScope(options);\n      options.resolve = resolve;\n      return resolve(options).then(function (_ref) {\n        var resolved = _ref.resolved;\n        return Promise.all(resolved.map(function (r) {\n          return Promise.resolve(r);\n        })).then(function (resolved) {\n          _this.setModules({\n            inspect: {\n              resolved: resolved\n            }\n          });\n\n          return _this.resolved = resolved;\n        });\n      });\n    }\n  }, {\n    key: \"getFullText\",\n    value: function getFullText() {\n      return _getFullText(this.content, this.fileTypeConfig.tagsXmlTextArray);\n    }\n  }, {\n    key: \"setModules\",\n    value: function setModules(obj) {\n      this.modules.forEach(function (module) {\n        module.set(obj);\n      });\n    }\n  }, {\n    key: \"parse\",\n    value: function parse() {\n      var allErrors = [];\n      this.xmllexed = Lexer.xmlparse(this.content, {\n        text: this.fileTypeConfig.tagsXmlTextArray,\n        other: this.fileTypeConfig.tagsXmlLexedArray\n      });\n      this.setModules({\n        inspect: {\n          xmllexed: this.xmllexed\n        }\n      });\n\n      var _Lexer$parse = Lexer.parse(this.xmllexed, this.delimiters),\n          lexed = _Lexer$parse.lexed,\n          lexerErrors = _Lexer$parse.errors;\n\n      allErrors = allErrors.concat(lexerErrors);\n      this.lexed = lexed;\n      this.setModules({\n        inspect: {\n          lexed: this.lexed\n        }\n      });\n      this.parsed = Parser.parse(this.lexed, this.modules);\n      this.setModules({\n        inspect: {\n          parsed: this.parsed\n        }\n      });\n\n      var _Parser$postparse = Parser.postparse(this.parsed, this.modules),\n          postparsed = _Parser$postparse.postparsed,\n          postparsedErrors = _Parser$postparse.errors;\n\n      this.postparsed = postparsed;\n      this.setModules({\n        inspect: {\n          postparsed: this.postparsed\n        }\n      });\n      allErrors = allErrors.concat(postparsedErrors);\n      this.errorChecker(allErrors);\n      return this;\n    }\n  }, {\n    key: \"errorChecker\",\n    value: function errorChecker(errors) {\n      var _this2 = this;\n\n      if (errors.length) {\n        this.modules.forEach(function (module) {\n          errors = module.errorsTransformer(errors);\n        });\n        errors.forEach(function (error) {\n          error.properties.file = _this2.filePath;\n        });\n        throwMultiError(errors);\n      }\n    }\n  }, {\n    key: \"baseNullGetter\",\n    value: function baseNullGetter(part, sm) {\n      var _this3 = this;\n\n      var value = this.modules.reduce(function (value, module) {\n        if (value != null) {\n          return value;\n        }\n\n        return module.nullGetter(part, sm, _this3);\n      }, null);\n\n      if (value != null) {\n        return value;\n      }\n\n      return this.nullGetter(part, sm);\n    }\n  }, {\n    key: \"getOptions\",\n    value: function getOptions() {\n      return {\n        compiled: this.postparsed,\n        tags: this.tags,\n        modules: this.modules,\n        parser: this.parser,\n        baseNullGetter: this.baseNullGetter.bind(this),\n        filePath: this.filePath,\n        linebreaks: this.linebreaks\n      };\n    }\n  }, {\n    key: \"render\",\n    value: function render(to) {\n      this.filePath = to;\n      var options = this.getOptions();\n      options.resolved = this.resolved;\n      options.scopeManager = createScope(options);\n      options.render = _render;\n\n      var _render2 = _render(options),\n          errors = _render2.errors,\n          parts = _render2.parts;\n\n      this.errorChecker(errors);\n      this.content = postrender(parts, options);\n      this.setModules({\n        inspect: {\n          content: this.content\n        }\n      });\n      return this;\n    }\n  }]);\n\n  return XmlTemplater;\n}();\n\n//# sourceURL=webpack://docxtemplater/./es6/xml-templater.js?");

/***/ })

/******/ });