Skip to content
Snippets Groups Projects
index.js 7.4 MiB
Newer Older
  • Learn to ignore specific revisions
  • Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLNode = __webpack_require__(1523);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLDTDEntity = (function(superClass) {
        extend(XMLDTDEntity, superClass);
    
        function XMLDTDEntity(parent, pe, name, value) {
          XMLDTDEntity.__super__.constructor.call(this, parent);
          if (name == null) {
            throw new Error("Missing DTD entity name. " + this.debugInfo(name));
          }
          if (value == null) {
            throw new Error("Missing DTD entity value. " + this.debugInfo(name));
          }
          this.pe = !!pe;
          this.name = this.stringify.name(name);
          this.type = NodeType.EntityDeclaration;
          if (!isObject(value)) {
            this.value = this.stringify.dtdEntityValue(value);
            this.internal = true;
          } else {
            if (!value.pubID && !value.sysID) {
              throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
            }
            if (value.pubID && !value.sysID) {
              throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
            }
            this.internal = false;
            if (value.pubID != null) {
              this.pubID = this.stringify.dtdPubID(value.pubID);
            }
            if (value.sysID != null) {
              this.sysID = this.stringify.dtdSysID(value.sysID);
            }
            if (value.nData != null) {
              this.nData = this.stringify.dtdNData(value.nData);
            }
            if (this.pe && this.nData) {
              throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
            }
          }
        }
    
        Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {
          get: function() {
            return this.pubID;
          }
        });
    
        Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {
          get: function() {
            return this.sysID;
          }
        });
    
        Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {
          get: function() {
            return this.nData || null;
          }
        });
    
        Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {
          get: function() {
            return null;
          }
        });
    
        Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {
          get: function() {
            return null;
          }
        });
    
        Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {
          get: function() {
            return null;
          }
        });
    
        XMLDTDEntity.prototype.toString = function(options) {
          return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
        };
    
        return XMLDTDEntity;
    
      })(XMLNode);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1535 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var NodeType, XMLDTDElement, XMLNode,
        extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      XMLNode = __webpack_require__(1523);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLDTDElement = (function(superClass) {
        extend(XMLDTDElement, superClass);
    
        function XMLDTDElement(parent, name, value) {
          XMLDTDElement.__super__.constructor.call(this, parent);
          if (name == null) {
            throw new Error("Missing DTD element name. " + this.debugInfo());
          }
          if (!value) {
            value = '(#PCDATA)';
          }
          if (Array.isArray(value)) {
            value = '(' + value.join(',') + ')';
          }
          this.name = this.stringify.name(name);
          this.type = NodeType.ElementDeclaration;
          this.value = this.stringify.dtdElementValue(value);
        }
    
        XMLDTDElement.prototype.toString = function(options) {
          return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
        };
    
        return XMLDTDElement;
    
      })(XMLNode);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1536 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var NodeType, XMLDTDNotation, XMLNode,
        extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      XMLNode = __webpack_require__(1523);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLDTDNotation = (function(superClass) {
        extend(XMLDTDNotation, superClass);
    
        function XMLDTDNotation(parent, name, value) {
          XMLDTDNotation.__super__.constructor.call(this, parent);
          if (name == null) {
            throw new Error("Missing DTD notation name. " + this.debugInfo(name));
          }
          if (!value.pubID && !value.sysID) {
            throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
          }
          this.name = this.stringify.name(name);
          this.type = NodeType.NotationDeclaration;
          if (value.pubID != null) {
            this.pubID = this.stringify.dtdPubID(value.pubID);
          }
          if (value.sysID != null) {
            this.sysID = this.stringify.dtdSysID(value.sysID);
          }
        }
    
        Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {
          get: function() {
            return this.pubID;
          }
        });
    
        Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {
          get: function() {
            return this.sysID;
          }
        });
    
        XMLDTDNotation.prototype.toString = function(options) {
          return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
        };
    
        return XMLDTDNotation;
    
      })(XMLNode);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1537 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var NodeType, XMLNode, XMLRaw,
        extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLNode = __webpack_require__(1523);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLRaw = (function(superClass) {
        extend(XMLRaw, superClass);
    
        function XMLRaw(parent, text) {
          XMLRaw.__super__.constructor.call(this, parent);
          if (text == null) {
            throw new Error("Missing raw text. " + this.debugInfo());
          }
          this.type = NodeType.Raw;
          this.value = this.stringify.raw(text);
        }
    
        XMLRaw.prototype.clone = function() {
          return Object.create(this);
        };
    
        XMLRaw.prototype.toString = function(options) {
          return this.options.writer.raw(this, this.options.writer.filterOptions(options));
        };
    
        return XMLRaw;
    
      })(XMLNode);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1538 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var NodeType, XMLCharacterData, XMLText,
        extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLCharacterData = __webpack_require__(1529);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLText = (function(superClass) {
        extend(XMLText, superClass);
    
        function XMLText(parent, text) {
          XMLText.__super__.constructor.call(this, parent);
          if (text == null) {
            throw new Error("Missing element text. " + this.debugInfo());
          }
          this.name = "#text";
          this.type = NodeType.Text;
          this.value = this.stringify.text(text);
        }
    
        Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {
          get: function() {
            throw new Error("This DOM method is not implemented." + this.debugInfo());
          }
        });
    
        Object.defineProperty(XMLText.prototype, 'wholeText', {
          get: function() {
            var next, prev, str;
            str = '';
            prev = this.previousSibling;
            while (prev) {
              str = prev.data + str;
              prev = prev.previousSibling;
            }
            str += this.data;
            next = this.nextSibling;
            while (next) {
              str = str + next.data;
              next = next.nextSibling;
            }
            return str;
          }
        });
    
        XMLText.prototype.clone = function() {
          return Object.create(this);
        };
    
        XMLText.prototype.toString = function(options) {
          return this.options.writer.text(this, this.options.writer.filterOptions(options));
        };
    
        XMLText.prototype.splitText = function(offset) {
          throw new Error("This DOM method is not implemented." + this.debugInfo());
        };
    
        XMLText.prototype.replaceWholeText = function(content) {
          throw new Error("This DOM method is not implemented." + this.debugInfo());
        };
    
        return XMLText;
    
      })(XMLCharacterData);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1539 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var NodeType, XMLCharacterData, XMLProcessingInstruction,
        extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLCharacterData = __webpack_require__(1529);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLProcessingInstruction = (function(superClass) {
        extend(XMLProcessingInstruction, superClass);
    
        function XMLProcessingInstruction(parent, target, value) {
          XMLProcessingInstruction.__super__.constructor.call(this, parent);
          if (target == null) {
            throw new Error("Missing instruction target. " + this.debugInfo());
          }
          this.type = NodeType.ProcessingInstruction;
          this.target = this.stringify.insTarget(target);
          this.name = this.target;
          if (value) {
            this.value = this.stringify.insValue(value);
          }
        }
    
        XMLProcessingInstruction.prototype.clone = function() {
          return Object.create(this);
        };
    
        XMLProcessingInstruction.prototype.toString = function(options) {
          return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));
        };
    
        XMLProcessingInstruction.prototype.isEqualNode = function(node) {
          if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
            return false;
          }
          if (node.target !== this.target) {
            return false;
          }
          return true;
        };
    
        return XMLProcessingInstruction;
    
      })(XMLCharacterData);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1540 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var NodeType, XMLDummy, XMLNode,
        extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      XMLNode = __webpack_require__(1523);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLDummy = (function(superClass) {
        extend(XMLDummy, superClass);
    
        function XMLDummy(parent) {
          XMLDummy.__super__.constructor.call(this, parent);
          this.type = NodeType.Dummy;
        }
    
        XMLDummy.prototype.clone = function() {
          return Object.create(this);
        };
    
        XMLDummy.prototype.toString = function(options) {
          return '';
        };
    
        return XMLDummy;
    
      })(XMLNode);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1541 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var XMLNodeList;
    
      module.exports = XMLNodeList = (function() {
        function XMLNodeList(nodes) {
          this.nodes = nodes;
        }
    
        Object.defineProperty(XMLNodeList.prototype, 'length', {
          get: function() {
            return this.nodes.length || 0;
          }
        });
    
        XMLNodeList.prototype.clone = function() {
          return this.nodes = null;
        };
    
        XMLNodeList.prototype.item = function(index) {
          return this.nodes[index] || null;
        };
    
        return XMLNodeList;
    
      })();
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1542 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      module.exports = {
        Disconnected: 1,
        Preceding: 2,
        Following: 4,
        Contains: 8,
        ContainedBy: 16,
        ImplementationSpecific: 32
      };
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1543 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    219457 219458 219459 219460 219461 219462 219463 219464 219465 219466 219467 219468 219469 219470 219471 219472 219473 219474 219475 219476 219477 219478 219479 219480 219481 219482 219483 219484 219485 219486 219487 219488 219489 219490 219491 219492 219493 219494 219495 219496 219497 219498 219499 219500 219501 219502 219503 219504 219505 219506 219507 219508 219509 219510 219511 219512 219513 219514 219515 219516 219517 219518 219519 219520 219521 219522 219523 219524 219525 219526 219527 219528 219529 219530 219531 219532 219533 219534 219535 219536 219537 219538 219539 219540 219541 219542 219543 219544 219545 219546 219547 219548 219549 219550 219551 219552 219553 219554 219555 219556 219557 219558 219559 219560 219561 219562 219563 219564 219565 219566 219567 219568 219569 219570 219571 219572 219573 219574 219575 219576 219577 219578 219579 219580 219581 219582 219583 219584 219585 219586 219587 219588 219589 219590 219591 219592 219593 219594 219595 219596 219597 219598 219599 219600 219601 219602 219603 219604 219605 219606 219607 219608 219609 219610 219611 219612 219613 219614 219615 219616 219617 219618 219619 219620 219621 219622 219623 219624 219625 219626 219627 219628 219629 219630 219631 219632 219633 219634 219635 219636 219637 219638 219639 219640 219641 219642 219643 219644 219645 219646 219647 219648 219649 219650 219651 219652 219653 219654 219655 219656 219657 219658 219659 219660 219661 219662 219663 219664 219665 219666 219667 219668 219669 219670 219671 219672 219673 219674 219675 219676 219677 219678 219679 219680 219681 219682 219683 219684 219685 219686 219687 219688 219689 219690 219691 219692 219693 219694 219695 219696 219697 219698 219699 219700 219701
    /***/ (function(module) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var XMLStringifier,
        bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
        hasProp = {}.hasOwnProperty;
    
      module.exports = XMLStringifier = (function() {
        function XMLStringifier(options) {
          this.assertLegalName = bind(this.assertLegalName, this);
          this.assertLegalChar = bind(this.assertLegalChar, this);
          var key, ref, value;
          options || (options = {});
          this.options = options;
          if (!this.options.version) {
            this.options.version = '1.0';
          }
          ref = options.stringify || {};
          for (key in ref) {
            if (!hasProp.call(ref, key)) continue;
            value = ref[key];
            this[key] = value;
          }
        }
    
        XMLStringifier.prototype.name = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalName('' + val || '');
        };
    
        XMLStringifier.prototype.text = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar(this.textEscape('' + val || ''));
        };
    
        XMLStringifier.prototype.cdata = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          val = '' + val || '';
          val = val.replace(']]>', ']]]]><![CDATA[>');
          return this.assertLegalChar(val);
        };
    
        XMLStringifier.prototype.comment = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          val = '' + val || '';
          if (val.match(/--/)) {
            throw new Error("Comment text cannot contain double-hypen: " + val);
          }
          return this.assertLegalChar(val);
        };
    
        XMLStringifier.prototype.raw = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return '' + val || '';
        };
    
        XMLStringifier.prototype.attValue = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar(this.attEscape(val = '' + val || ''));
        };
    
        XMLStringifier.prototype.insTarget = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.insValue = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          val = '' + val || '';
          if (val.match(/\?>/)) {
            throw new Error("Invalid processing instruction value: " + val);
          }
          return this.assertLegalChar(val);
        };
    
        XMLStringifier.prototype.xmlVersion = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          val = '' + val || '';
          if (!val.match(/1\.[0-9]+/)) {
            throw new Error("Invalid version number: " + val);
          }
          return val;
        };
    
        XMLStringifier.prototype.xmlEncoding = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          val = '' + val || '';
          if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
            throw new Error("Invalid encoding: " + val);
          }
          return this.assertLegalChar(val);
        };
    
        XMLStringifier.prototype.xmlStandalone = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          if (val) {
            return "yes";
          } else {
            return "no";
          }
        };
    
        XMLStringifier.prototype.dtdPubID = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.dtdSysID = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.dtdElementValue = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.dtdAttType = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.dtdAttDefault = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.dtdEntityValue = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.dtdNData = function(val) {
          if (this.options.noValidation) {
            return val;
          }
          return this.assertLegalChar('' + val || '');
        };
    
        XMLStringifier.prototype.convertAttKey = '@';
    
        XMLStringifier.prototype.convertPIKey = '?';
    
        XMLStringifier.prototype.convertTextKey = '#text';
    
        XMLStringifier.prototype.convertCDataKey = '#cdata';
    
        XMLStringifier.prototype.convertCommentKey = '#comment';
    
        XMLStringifier.prototype.convertRawKey = '#raw';
    
        XMLStringifier.prototype.assertLegalChar = function(str) {
          var regex, res;
          if (this.options.noValidation) {
            return str;
          }
          regex = '';
          if (this.options.version === '1.0') {
            regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
            if (res = str.match(regex)) {
              throw new Error("Invalid character in string: " + str + " at index " + res.index);
            }
          } else if (this.options.version === '1.1') {
            regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
            if (res = str.match(regex)) {
              throw new Error("Invalid character in string: " + str + " at index " + res.index);
            }
          }
          return str;
        };
    
        XMLStringifier.prototype.assertLegalName = function(str) {
          var regex;
          if (this.options.noValidation) {
            return str;
          }
          this.assertLegalChar(str);
          regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
          if (!str.match(regex)) {
            throw new Error("Invalid character in name");
          }
          return str;
        };
    
        XMLStringifier.prototype.textEscape = function(str) {
          var ampregex;
          if (this.options.noValidation) {
            return str;
          }
          ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
          return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\r/g, '&#xD;');
        };
    
        XMLStringifier.prototype.attEscape = function(str) {
          var ampregex;
          if (this.options.noValidation) {
            return str;
          }
          ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
          return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/\t/g, '&#x9;').replace(/\n/g, '&#xA;').replace(/\r/g, '&#xD;');
        };
    
        return XMLStringifier;
    
      })();
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1544 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var XMLStringWriter, XMLWriterBase,
        extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      XMLWriterBase = __webpack_require__(1545);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
      module.exports = XMLStringWriter = (function(superClass) {
        extend(XMLStringWriter, superClass);
    
        function XMLStringWriter(options) {
          XMLStringWriter.__super__.constructor.call(this, options);
        }
    
        XMLStringWriter.prototype.document = function(doc, options) {
          var child, i, len, r, ref;
          options = this.filterOptions(options);
          r = '';
          ref = doc.children;
          for (i = 0, len = ref.length; i < len; i++) {
            child = ref[i];
            r += this.writeChildNode(child, options, 0);
          }
          if (options.pretty && r.slice(-options.newline.length) === options.newline) {
            r = r.slice(0, -options.newline.length);
          }
          return r;
        };
    
        return XMLStringWriter;
    
      })(XMLWriterBase);
    
    }).call(this);
    
    
    /***/ }),
    
    build-token's avatar
    build-token committed
    /* 1545 */
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
    
    // Generated by CoffeeScript 1.12.7
    (function() {
      var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
        hasProp = {}.hasOwnProperty;
    
    
    build-token's avatar
    build-token committed
      assign = (__webpack_require__(1517).assign);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      NodeType = __webpack_require__(1525);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLDeclaration = __webpack_require__(1531);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLDocType = __webpack_require__(1532);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLCData = __webpack_require__(1528);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLComment = __webpack_require__(1530);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLElement = __webpack_require__(1524);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLRaw = __webpack_require__(1537);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLText = __webpack_require__(1538);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLProcessingInstruction = __webpack_require__(1539);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLDummy = __webpack_require__(1540);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLDTDAttList = __webpack_require__(1533);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLDTDElement = __webpack_require__(1535);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLDTDEntity = __webpack_require__(1534);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      XMLDTDNotation = __webpack_require__(1536);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    build-token's avatar
    build-token committed
      WriterState = __webpack_require__(1546);
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    219782 219783 219784 219785 219786 219787 219788 219789 219790 219791 219792 219793 219794 219795 219796 219797 219798 219799 219800 219801 219802 219803 219804 219805 219806 219807 219808 219809 219810 219811 219812 219813 219814 219815 219816 219817 219818 219819 219820 219821 219822 219823 219824 219825 219826 219827 219828 219829 219830 219831 219832 219833 219834 219835 219836 219837 219838 219839 219840 219841 219842 219843 219844 219845 219846 219847 219848 219849 219850 219851 219852 219853 219854 219855 219856 219857 219858 219859 219860 219861 219862 219863 219864 219865 219866 219867 219868 219869 219870 219871 219872 219873 219874 219875 219876 219877 219878 219879 219880 219881 219882 219883 219884 219885 219886 219887 219888 219889 219890 219891 219892 219893 219894 219895 219896 219897 219898 219899 219900 219901 219902 219903 219904 219905 219906 219907 219908 219909 219910 219911 219912 219913 219914 219915 219916 219917 219918 219919 219920 219921 219922 219923 219924 219925 219926 219927 219928 219929 219930 219931 219932 219933 219934 219935 219936 219937 219938 219939 219940 219941 219942 219943 219944 219945 219946 219947 219948 219949 219950 219951 219952 219953 219954 219955 219956 219957 219958 219959 219960 219961 219962 219963 219964 219965 219966 219967 219968 219969 219970 219971 219972 219973 219974 219975 219976 219977 219978 219979 219980 219981 219982 219983 219984 219985 219986 219987 219988 219989 219990 219991 219992 219993 219994 219995 219996 219997 219998 219999 220000
    
      module.exports = XMLWriterBase = (function() {
        function XMLWriterBase(options) {
          var key, ref, value;
          options || (options = {});
          this.options = options;
          ref = options.writer || {};
          for (key in ref) {
            if (!hasProp.call(ref, key)) continue;
            value = ref[key];
            this["_" + key] = this[key];
            this[key] = value;
          }
        }
    
        XMLWriterBase.prototype.filterOptions = function(options) {
          var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6;
          options || (options = {});
          options = assign({}, this.options, options);
          filteredOptions = {
            writer: this
          };
          filteredOptions.pretty = options.pretty || false;
          filteredOptions.allowEmpty = options.allowEmpty || false;
          filteredOptions.indent = (ref = options.indent) != null ? ref : '  ';
          filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
          filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
          filteredOptions.dontPrettyTextNodes = (ref3 = (ref4 = options.dontPrettyTextNodes) != null ? ref4 : options.dontprettytextnodes) != null ? ref3 : 0;
          filteredOptions.spaceBeforeSlash = (ref5 = (ref6 = options.spaceBeforeSlash) != null ? ref6 : options.spacebeforeslash) != null ? ref5 : '';
          if (filteredOptions.spaceBeforeSlash === true) {
            filteredOptions.spaceBeforeSlash = ' ';
          }
          filteredOptions.suppressPrettyCount = 0;
          filteredOptions.user = {};
          filteredOptions.state = WriterState.None;
          return filteredOptions;
        };
    
        XMLWriterBase.prototype.indent = function(node, options, level) {
          var indentLevel;
          if (!options.pretty || options.suppressPrettyCount) {
            return '';
          } else if (options.pretty) {
            indentLevel = (level || 0) + options.offset + 1;
            if (indentLevel > 0) {
              return new Array(indentLevel).join(options.indent);
            }
          }
          return '';
        };
    
        XMLWriterBase.prototype.endline = function(node, options, level) {
          if (!options.pretty || options.suppressPrettyCount) {
            return '';
          } else {
            return options.newline;
          }
        };
    
        XMLWriterBase.prototype.attribute = function(att, options, level) {
          var r;
          this.openAttribute(att, options, level);
          r = ' ' + att.name + '="' + att.value + '"';
          this.closeAttribute(att, options, level);
          return r;
        };
    
        XMLWriterBase.prototype.cdata = function(node, options, level) {
          var r;
          this.openNode(node, options, level);
          options.state = WriterState.OpenTag;
          r = this.indent(node, options, level) + '<![CDATA[';
          options.state = WriterState.InsideTag;
          r += node.value;
          options.state = WriterState.CloseTag;
          r += ']]>' + this.endline(node, options, level);
          options.state = WriterState.None;
          this.closeNode(node, options, level);
          return r;
        };
    
        XMLWriterBase.prototype.comment = function(node, options, level) {
          var r;
          this.openNode(node, options, level);
          options.state = WriterState.OpenTag;
          r = this.indent(node, options, level) + '<!-- ';
          options.state = WriterState.InsideTag;
          r += node.value;
          options.state = WriterState.CloseTag;
          r += ' -->' + this.endline(node, options, level);
          options.state = WriterState.None;
          this.closeNode(node, options, level);
          return r;
        };
    
        XMLWriterBase.prototype.declaration = function(node, options, level) {
          var r;
          this.openNode(node, options, level);
          options.state = WriterState.OpenTag;
          r = this.indent(node, options, level) + '<?xml';
          options.state = WriterState.InsideTag;
          r += ' version="' + node.version + '"';
          if (node.encoding != null) {
            r += ' encoding="' + node.encoding + '"';
          }
          if (node.standalone != null) {
            r += ' standalone="' + node.standalone + '"';
          }
          options.state = WriterState.CloseTag;
          r += options.spaceBeforeSlash + '?>';
          r += this.endline(node, options, level);
          options.state = WriterState.None;
          this.closeNode(node, options, level);
          return r;
        };
    
        XMLWriterBase.prototype.docType = function(node, options, level) {
          var child, i, len, r, ref;
          level || (level = 0);
          this.openNode(node, options, level);
          options.state = WriterState.OpenTag;
          r = this.indent(node, options, level);
          r += '<!DOCTYPE ' + node.root().name;
          if (node.pubID && node.sysID) {
            r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
          } else if (node.sysID) {
            r += ' SYSTEM "' + node.sysID + '"';
          }
          if (node.children.length > 0) {
            r += ' [';
            r += this.endline(node, options, level);
            options.state = WriterState.InsideTag;
            ref = node.children;
            for (i = 0, len = ref.length; i < len; i++) {
              child = ref[i];
              r += this.writeChildNode(child, options, level + 1);
            }
            options.state = WriterState.CloseTag;
            r += ']';
          }
          options.state = WriterState.CloseTag;
          r += options.spaceBeforeSlash + '>';
          r += this.endline(node, options, level);
          options.state = WriterState.None;
          this.closeNode(node, options, level);
          return r;
        };
    
        XMLWriterBase.prototype.element = function(node, options, level) {
          var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2;
          level || (level = 0);
          prettySuppressed = false;
          r = '';
          this.openNode(node, options, level);
          options.state = WriterState.OpenTag;
          r += this.indent(node, options, level) + '<' + node.name;
          ref = node.attribs;
          for (name in ref) {
            if (!hasProp.call(ref, name)) continue;
            att = ref[name];
            r += this.attribute(att, options, level);
          }
          childNodeCount = node.children.length;
          firstChildNode = childNodeCount === 0 ? null : node.children[0];
          if (childNodeCount === 0 || node.children.every(function(e) {
            return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';
          })) {
            if (options.allowEmpty) {
              r += '>';
              options.state = WriterState.CloseTag;
              r += '</' + node.name + '>' + this.endline(node, options, level);
            } else {
              options.state = WriterState.CloseTag;
              r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
            }
          } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {
            r += '>';
            options.state = WriterState.InsideTag;
            options.suppressPrettyCount++;
            prettySuppressed = true;
            r += this.writeChildNode(firstChildNode, options, level + 1);
            options.suppressPrettyCount--;
            prettySuppressed = false;
            options.state = WriterState.CloseTag;
            r += '</' + node.name + '>' + this.endline(node, options, level);
          } else {
            if (options.dontPrettyTextNodes) {
              ref1 = node.children;
              for (i = 0, len = ref1.length; i < len; i++) {
                child = ref1[i];
                if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {
                  options.suppressPrettyCount++;
                  prettySuppressed = true;
                  break;
                }
              }
            }
            r += '>' + this.endline(node, options, level);
            options.state = WriterState.InsideTag;
            ref2 = node.children;
            for (j = 0, len1 = ref2.length; j < len1; j++) {
              child = ref2[j];
              r += this.writeChildNode(child, options, level + 1);
            }
            options.state = WriterState.CloseTag;
            r += this.indent(node, options, level) + '</' + node.name + '>';
            if (prettySuppressed) {
              options.suppressPrettyCount--;
            }
            r += this.endline(node, options, level);
            options.state = WriterState.None;
          }
          this.closeNode(node, options, level);
          return r;
        };
    
        XMLWriterBase.prototype.writeChildNode = function(node, options, level) {
          switch (node.type) {
            case NodeType.CData: