@restnfeel/agentc-starter-kit
Version:
한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템
315 lines (276 loc) • 12.2 kB
JavaScript
import { __module as XMLStreamWriter$1 } from '../../../_virtual/XMLStreamWriter2.js';
import { __require as requireXMLDeclaration } from './XMLDeclaration.js';
import { __require as requireXMLDocType } from './XMLDocType.js';
import { __require as requireXMLCData } from './XMLCData.js';
import { __require as requireXMLComment } from './XMLComment.js';
import { __require as requireXMLElement } from './XMLElement.js';
import { __require as requireXMLRaw } from './XMLRaw.js';
import { __require as requireXMLText } from './XMLText.js';
import { __require as requireXMLProcessingInstruction } from './XMLProcessingInstruction.js';
import { __require as requireXMLDummy } from './XMLDummy.js';
import { __require as requireXMLDTDAttList } from './XMLDTDAttList.js';
import { __require as requireXMLDTDElement } from './XMLDTDElement.js';
import { __require as requireXMLDTDEntity } from './XMLDTDEntity.js';
import { __require as requireXMLDTDNotation } from './XMLDTDNotation.js';
import { __require as requireXMLWriterBase } from './XMLWriterBase.js';
var XMLStreamWriter = XMLStreamWriter$1.exports;
var hasRequiredXMLStreamWriter;
function requireXMLStreamWriter () {
if (hasRequiredXMLStreamWriter) return XMLStreamWriter$1.exports;
hasRequiredXMLStreamWriter = 1;
// Generated by CoffeeScript 1.12.7
(function() {
var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, 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;
XMLDeclaration = /*@__PURE__*/ requireXMLDeclaration();
XMLDocType = /*@__PURE__*/ requireXMLDocType();
XMLCData = /*@__PURE__*/ requireXMLCData();
XMLComment = /*@__PURE__*/ requireXMLComment();
XMLElement = /*@__PURE__*/ requireXMLElement();
XMLRaw = /*@__PURE__*/ requireXMLRaw();
XMLText = /*@__PURE__*/ requireXMLText();
XMLProcessingInstruction = /*@__PURE__*/ requireXMLProcessingInstruction();
XMLDummy = /*@__PURE__*/ requireXMLDummy();
XMLDTDAttList = /*@__PURE__*/ requireXMLDTDAttList();
XMLDTDElement = /*@__PURE__*/ requireXMLDTDElement();
XMLDTDEntity = /*@__PURE__*/ requireXMLDTDEntity();
XMLDTDNotation = /*@__PURE__*/ requireXMLDTDNotation();
XMLWriterBase = /*@__PURE__*/ requireXMLWriterBase();
XMLStreamWriter$1.exports = (function(superClass) {
extend(XMLStreamWriter, superClass);
function XMLStreamWriter(stream, options) {
XMLStreamWriter.__super__.constructor.call(this, options);
this.stream = stream;
}
XMLStreamWriter.prototype.document = function(doc) {
var child, i, j, len, len1, ref, ref1, results;
ref = doc.children;
for (i = 0, len = ref.length; i < len; i++) {
child = ref[i];
child.isLastRootNode = false;
}
doc.children[doc.children.length - 1].isLastRootNode = true;
ref1 = doc.children;
results = [];
for (j = 0, len1 = ref1.length; j < len1; j++) {
child = ref1[j];
if (child instanceof XMLDummy) {
continue;
}
switch (false) {
case !(child instanceof XMLDeclaration):
results.push(this.declaration(child));
break;
case !(child instanceof XMLDocType):
results.push(this.docType(child));
break;
case !(child instanceof XMLComment):
results.push(this.comment(child));
break;
case !(child instanceof XMLProcessingInstruction):
results.push(this.processingInstruction(child));
break;
default:
results.push(this.element(child));
}
}
return results;
};
XMLStreamWriter.prototype.attribute = function(att) {
return this.stream.write(' ' + att.name + '="' + att.value + '"');
};
XMLStreamWriter.prototype.cdata = function(node, level) {
return this.stream.write(this.space(level) + '<![CDATA[' + node.text + ']]>' + this.endline(node));
};
XMLStreamWriter.prototype.comment = function(node, level) {
return this.stream.write(this.space(level) + '<!-- ' + node.text + ' -->' + this.endline(node));
};
XMLStreamWriter.prototype.declaration = function(node, level) {
this.stream.write(this.space(level));
this.stream.write('xml version="' + node.version + '"');
if (node.encoding != null) {
this.stream.write(' encoding="' + node.encoding + '"');
}
if (node.standalone != null) {
this.stream.write(' standalone="' + node.standalone + '"');
}
this.stream.write(this.spacebeforeslash + '');
return this.stream.write(this.endline(node));
};
XMLStreamWriter.prototype.docType = function(node, level) {
var child, i, len, ref;
level || (level = 0);
this.stream.write(this.space(level));
this.stream.write('' + node.target);
if (node.value) {
this.stream.write(' ' + node.value);
}
return this.stream.write(this.spacebeforeslash + '