{"version":3,"sources":["jsdelivr-header.js","/npm/raml-xml-validation@0.1.0/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,IAAI,UAAY,QAAQ,WACpB,aAA8B,WAC9B,SAAS,EAAa,GAClB,KAAK,OAAS,CAClB,CAiBA,OAhBA,EAAa,UAAU,SAAW,SAAU,EAAK,GAE7C,QADmB,IAAf,IAAyB,EAAa,IAChB,IAAtB,EAAW,OAEX,OADI,EAAS,UAAU,YAAY,CAAE,IAAK,EAAK,OAAQ,KAAK,WAC1C,EAAO,QAAU,EAAO,OAAO,KAAI,SAAU,GAAS,OAAO,IAAI,MAAM,EAAQ,KAAO,GAE5G,IAEI,EAFA,EAAU,KAAK,cAAc,GAGjC,OAFA,EAAQ,KAAK,KAAK,SACd,EAAS,UAAU,YAAY,CAAE,IAAK,EAAK,OAAQ,MACrC,EAAO,QAAU,EAAO,OAAO,KAAI,SAAU,GAC3D,OAAO,IAAI,MAAM,EACrB,KAAO,EACX,EACA,EAAa,UAAU,cAAgB,SAAU,GAC7C,OAAO,EAAK,KAAI,SAAU,GAAO,OAAO,EAAI,cAAgB,GAChE,EACO,CACX,CArBiC,GAsBjC,QAAQ,aAAe,aACvB,IAAI,mBACA,SAA4B,EAAc,EAAc,GACpD,KAAK,aAAe,EACpB,KAAK,aAAe,EACpB,KAAK,eAAiB,CAC1B,EAGJ,QAAQ,mBAAqB","file":"/npm/raml-xml-validation@0.1.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/raml-xml-validation@0.1.0/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar validator = require('xmllint');\nvar XMLValidator = /** @class */ (function () {\n    function XMLValidator(schema) {\n        this.schema = schema;\n    }\n    XMLValidator.prototype.validate = function (xml, references) {\n        if (references === void 0) { references = []; }\n        if (references.length === 0) {\n            var result = validator.validateXML({ xml: xml, schema: this.schema });\n            return (result && result.errors && result.errors.map(function (error) { return new Error(error); })) || [];\n        }\n        var schemas = this.remoteSchemas(references);\n        schemas.push(this.schema);\n        var result = validator.validateXML({ xml: xml, schema: schemas });\n        return (result && result.errors && result.errors.map(function (error) {\n            return new Error(error);\n        })) || [];\n    };\n    XMLValidator.prototype.remoteSchemas = function (refs) {\n        return refs.map(function (ref) { return ref.patchedContent; });\n    };\n    return XMLValidator;\n}());\nexports.XMLValidator = XMLValidator;\nvar XMLSchemaReference = /** @class */ (function () {\n    function XMLSchemaReference(originalPath, virtualIndex, patchedContent) {\n        this.originalPath = originalPath;\n        this.virtualIndex = virtualIndex;\n        this.patchedContent = patchedContent;\n    }\n    return XMLSchemaReference;\n}());\nexports.XMLSchemaReference = XMLSchemaReference;\n"]}