diff --git a/bower.json b/bower.json index 5cf084b21..25849ff12 100644 --- a/bower.json +++ b/bower.json @@ -22,7 +22,7 @@ "jszip": "~2.0.0", "marked": "~0.3.1", "raml-client-generator": "~0.0.7", - "raml-1-parser": "https://github.com/raml-org/raml-js-parser-2/releases/download/1.1.47/raml-1-parser.zip", + "raml-1-parser": "https://github.com/raml-org/raml-js-parser-2/releases/download/1.1.48/raml-1-parser.zip", "resolve-url": "~0.2.1", "slug": "~0.8.0", "velocity": "~1.1.0", diff --git a/dist/scripts/api-console-vendor.js b/dist/scripts/api-console-vendor.js index 2948fa041..4ca2bc82e 100644 --- a/dist/scripts/api-console-vendor.js +++ b/dist/scripts/api-console-vendor.js @@ -1387,26 +1387,26 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } })(this || (typeof window !== 'undefined' ? window : global)); -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("RAML.XmlValidation")}catch(e){}}(),function(){try{return require("RAML.JsonValidation")}catch(e){}}(),require("typescript")):"function"==typeof define&&define.amd?define(["RAML.XmlValidation","RAML.JsonValidation","typescript"],t):"object"==typeof exports?exports.Parser=t(function(){try{return require("RAML.XmlValidation")}catch(e){}}(),function(){try{return require("RAML.JsonValidation")}catch(e){}}(),require("typescript")):(e.RAML=e.RAML||{},e.RAML.Parser=t(e["RAML.XmlValidation"],e["RAML.JsonValidation"],e.typescript))}(this,function(__WEBPACK_EXTERNAL_MODULE_64__,__WEBPACK_EXTERNAL_MODULE_66__,__WEBPACK_EXTERNAL_MODULE_184__){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t){return y.load(e,t)}function i(e,t){return y.loadSync(e,t)}function a(e,t){return y.parse(e,t)}function o(e,t){return y.parseSync(e,t)}function s(e,t,n){return y.loadApi(e,t,n).getOrElse(null)}function u(e,t,n){return y.loadApi(e,t,n).getOrElse(null)}function l(e,t){var n=y.virtualFilePath(t),r=y.optionsForContent(e,t,n);return y.loadApi(n,[],r).getOrElse(null)}function p(e,t){var n=y.virtualFilePath(t),r=y.optionsForContent(e,t,n);return y.loadApiAsync(n,[],r)}function c(e,t,n){return y.loadApiAsync(e,t,n)}function f(e,t,n){return y.loadRAMLAsync(e,t,n)}function h(e){return y.getLanguageElementByRuntimeType(e)}function d(e){return t.api10.isFragment(e)}function m(e){return t.api10.asFragment(e)}Object.defineProperty(t,"__esModule",{value:!0});var y=n(1);t.jsonTypings=n(280);var v=n(294);t.api10=n(221),t.api08=n(295),t.load=r,t.loadSync=i,t.parse=a,t.parseSync=o,t.loadApiSync=s,t.loadRAMLSync=u,t.parseRAMLSync=l,t.parseRAML=p,t.loadApi=c,t.loadRAML=f,t.getLanguageElementByRuntimeType=h,t.isFragment=d,t.asFragment=m,t.hl=n(197),t.ll=n(5),t.search=n(208),t.stubs=n(296),t.utils=n(262),t.project=n(297),t.universeHelpers=n(204),t.ds=n(56),t.schema=n(298),t.universes=t.ds.universesInfo,t.parser=n(300),t.expander=n(302),t.wrapperHelper=n(303),"undefined"==typeof Promise&&"undefined"!=typeof window&&(window.Promise=v)},function(e,t,n){"use strict";function r(e,t){var n=b(t);return a(e,t).then(function(e){return B.dump(e,n)})}function i(e,t){var n=b(t),r=o(e,t);return B.dump(r,n)}function a(e,t){t=t||{};var n=e;I(e)&&(t=N(e,t,t.filePath),n=R(t));var r=S(t);return h(n,r).then(function(e){var n;return n=!t.hasOwnProperty("expandLibraries")||t.expandLibraries?U.expandLibrariesHL(e):U.expandTraitsAndResourceTypesHL(e)})}function o(e,t){t=t||{};var n=e;I(e)&&(t=N(e,t,t.filePath),n=R(t));var r,i=S(t),a=p(n,i);return r=!t.hasOwnProperty("expandLibraries")||t.expandLibraries?V.isLibraryType(a.definition())?U.expandLibraryHL(a)||a:U.expandLibrariesHL(a)||a:U.expandTraitsAndResourceTypesHL(a)||a}function s(e,t,n){var r=p(e,t,n);if(!r)return P.empty();var i=r.wrapperNode(),a=Array.isArray(t)?n:t;return T(i,a),new P(i)}function u(e,t,n){var r=p(e,t,n);if(!r)return P.empty();var i=r.wrapperNode(),a=Array.isArray(t)?n:t;return T(i,a),new P(i)}function l(e,t,n){var r=p(e,t,n);return r?new P(r):P.empty()}function p(e,t,n){var r=Array.isArray(t),i=r?t:null,a=r?n:t;a=a||{};var o=y(e,a),s=e.indexOf("://"),u=s!=-1&&s<6?e:w.basename(e),l=o.unit(u);n&&!i&&(i=null);var p;if(l)if(i&&i.length>0){var c=[];i.forEach(function(e){if(!e||0==e.trim().length)throw new Error(W.EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS.message)}),i.forEach(function(e){c.push(o.unit(e,w.isAbsolute(e)))}),c.forEach(function(e){return v(e,a)}),p=v(U.mergeAPIs(l,c,O.OverlayMergeMode.MERGE),a)}else p=v(l,a),p.setMergeMode(O.OverlayMergeMode.MERGE);if(!l)throw new Error(j.applyTemplate(W.CAN_NOT_RESOLVE,{path:e}));if(a.rejectOnErrors&&p&&p.errors().filter(function(e){return!e.isWarning}).length)throw g(p);return p}function c(e,t,n){var r=f(e,t,n);return r.then(function(e){return e})}function f(e,t,n){return h(e,t,n).then(function(e){if(!e)return null;for(var r=Array.isArray(t),i=r?n:t,a=e;null!=a;){var o=a.wrapperNode();T(o,i);var s=a.getMaster();a=s&&s!==a?s.asElement():null}return e.wrapperNode()})}function h(e,t,n){var r=Array.isArray(t),i=r?t:null,a=r?n:t;a=a||{};var o=y(e,a),s=e.indexOf("://"),u=s!=-1&&s<6?e:w.basename(e);return n&&!i&&(i=null),i&&0!=i.length?(i.forEach(function(e){if(!e||0==e.trim().length)throw new Error(W.EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS.message)}),m(o,u,a).then(function(e){var t=[];return i.forEach(function(e){t.push(m(o,e,a))}),Promise.all(t).then(function(t){var n=[];t.forEach(function(e){return n.push(e.lowLevel().unit())});var r=U.mergeAPIs(e.lowLevel().unit(),n,O.OverlayMergeMode.MERGE);return r}).then(function(e){return v(e,a)})})):m(o,u,a).then(function(e){return e.setMergeMode(O.OverlayMergeMode.MERGE),e})}function d(e){if(null==e)return null;var t=e.getAdapter(F.RAMLService).getDeclaringNode();return null==t?null:t.wrapperNode()}function m(e,t,n){var r=t.replace(/\\/g,"/");return D.fetchIncludesAndMasterAsync(e,r).then(function(e){try{var t=v(e,n);return n.rejectOnErrors&&t&&t.errors().filter(function(e){return!e.isWarning}).length?Promise.reject(g(t)):t}catch(e){return Promise.reject(e)}})}function y(e,t){t=t||{};var n,r=t.fsResolver,i=t.httpResolver,a=t.reusedNode;if(a){var o=a.lowLevel().unit();n=o.project(),n.namespaceResolver().deleteUnitModel(o.absolutePath()),n.deleteUnit(w.basename(e)),r&&n.setFSResolver(r),i&&n.setHTTPResolver(i)}else{var s=w.dirname(e);n=new L.Project(s,r,i)}return n}function v(e,t,n){if(void 0===n&&(n=!1),t=t||{},!e)return null;var r=null,i=null;e.isRAMLUnit?r=e:(i=e,r=i.lowLevel().unit());var a=r.contents(),o=O.ramlFirstLine(a);if(!o)throw new Error(W.INVALID_FIRST_LINE.message);var s,u,l=o[1];o[2];if("0.8"==l?u="RAML08":"1.0"==l&&(u="RAML10"),!u)throw new Error(W.UNKNOWN_RAML_VERSION.message);if("RAML08"==u&&n)throw new Error(W.EXTENSIONS_AND_OVERLAYS_NOT_SUPPORTED_0_8.message);var p=H(u);p.type(s);return i||(i=O.fromUnit(r),t.reusedNode&&t.reusedNode.lowLevel().unit().absolutePath()==r.absolutePath()&&E(i,t.reusedNode)&&i.setReusedNode(t.reusedNode)),i}function g(e){var t=new Error(W.API_CONTAINS_ERROR.message);return t.parserErrors=O.toParserErrors(e.errors(),e),t}function A(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0);var r=H("RAML10"),i=r.type(k.Universe10.Api.name),a=new L.Project(e),o=[];return a.units().forEach(function(e){var r=e.ast();t&&(r=D.toChildCachingNode(r));var a=new C.ApiImpl(new O.ASTNodeImpl(r,null,i,null));n&&(a=U.expandTraitsAndResourceTypes(a)),o.push(a)}),o}function E(e,t){if(!t)return!1;for(var n=e.lowLevel().unit().contents(),r=t.lowLevel().unit().contents(),i=Math.min(n.length,r.length),a=-1,o=0;o0&&""==n.charAt(a).replace(/\s/,"");)a--;a<0&&n.length!=r.length&&(a=i);var s=K.deepFindNode(t,a,a+1);if(!s)return!0;if(s.lowLevel().unit().absolutePath()!=e.lowLevel().unit().absolutePath())return!0;var u=s.isElement()?s.asElement():s.parent();if(!u)return!0;var l=u.property();if(!l)return!0;if(V.isAnnotationsProperty(l)&&(u=u.parent()),!u)return!0;for(var p=u;p;){var c=p.definition();if(V.isResourceTypeType(c)||V.isTraitType(c))return!1;var f=p.property();if(!f)return!0;if(V.isTypeDeclarationDescendant(c)&&(V.isTypesProperty(f)||V.isAnnotationTypesProperty(f)))return!1;var h=f.range();if(V.isResourceTypeRefType(h)||V.isTraitRefType(h))return!1;p=p.parent()}return!0}function T(e,t){t=t||{},null!=t.attributeDefaults&&e?e.setAttributeDefaults(t.attributeDefaults):e&&e.setAttributeDefaults(!0)}function _(e,t,n){var r=n||R(t),i=M(r,e,t&&t.fsResolver);return{fsResolver:i,httpResolver:t?t.httpResolver:null,rejectOnErrors:!!t&&t.rejectOnErrors,attributeDefaults:!t||t.attributeDefaults}}function S(e){return e?{fsResolver:e.fsResolver,httpResolver:e.httpResolver,rejectOnErrors:!1,attributeDefaults:!0}:{}}function N(e,t,n){var r=n||R(t),i=M(r,e,t&&t.fsResolver),a={fsResolver:i};if(!t)return a;for(var o=0,s=Object.keys(t);o=0)}function b(e){return e=e||{},{rootNodeDetails:!0,attributeDefaults:!0,serializeMetadata:e.serializeMetadata||!1,expandExpressions:e.expandExpressions,typeReferences:e.typeReferences,expandTypes:e.expandTypes,typeExpansionRecursionDepth:e.typeExpansionRecursionDepth,sourceMap:e.sourceMap}}function M(e,t,n){return null!=e&&(e=e.replace(/\\/g,"/")),{content:function(r){return r===e?t:n?n.content(r):void 0},contentAsync:function(r){return r===e?Promise.resolve(t):n?n.contentAsync(r):void 0}}}function R(e){var t=e&&e.filePath||w.resolve("/#local.raml");return t.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0});var C=n(2),w=n(6),P=n(17),L=n(4),O=n(55),D=n(4),U=n(216),x=n(15),k=n(203),F=n(274),B=n(254),V=n(204),K=n(208),j=n(19),W=n(206),H=n(263);t.load=r,t.loadSync=i,t.parse=a,t.parseSync=o,t.loadApi=s,t.loadRAML=u,t.loadRAMLHL=l,t.loadApiAsync=c,t.loadRAMLAsync=f,t.loadRAMLAsyncHL=h,t.getLanguageElementByRuntimeType=d,t.toError=g,t.loadApis1=A,t.optionsForContent=_,t.loadOptionsForContent=N,t.virtualFSResolver=M,t.virtualFilePath=R},function(e,t,n){"use strict";function r(e){var t=J.getUniverse("RAML10"),n=t.type("Api"),r=$.createStubNode(n,null,e);return r}function i(e){var t=J.getUniverse("RAML10"),n=t.type("LibraryBase"),r=$.createStubNode(n,null,e);return r}function a(e){var t=J.getUniverse("RAML10"),n=t.type("FragmentDeclaration"),r=$.createStubNode(n,null,e);return r}function o(e){var t=J.getUniverse("RAML10"),n=t.type("Trait"),r=$.createStubNode(n,null,e);return r}function s(e){var t=J.getUniverse("RAML10"),n=t.type("MethodBase"),r=$.createStubNode(n,null,e);return r}function u(e){var t=J.getUniverse("RAML10"),n=t.type("Operation"),r=$.createStubNode(n,null,e);return r}function l(e){var t=J.getUniverse("RAML10"),n=t.type("TypeDeclaration"),r=$.createStubNode(n,null,e);return r}function p(e){var t=J.getUniverse("RAML10"),n=t.type("UsesDeclaration"),r=$.createStubNode(n,null,e);return r}function c(e){var t=J.getUniverse("RAML10"),n=t.type("XMLFacetInfo"),r=$.createStubNode(n,null,e);return r}function f(e){var t=J.getUniverse("RAML10"),n=t.type("ArrayTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function h(e){var t=J.getUniverse("RAML10"),n=t.type("UnionTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function d(e){var t=J.getUniverse("RAML10"),n=t.type("ObjectTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function m(e){var t=J.getUniverse("RAML10"),n=t.type("StringTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function y(e){var t=J.getUniverse("RAML10"),n=t.type("BooleanTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function v(e){var t=J.getUniverse("RAML10"),n=t.type("NumberTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function g(e){var t=J.getUniverse("RAML10"),n=t.type("IntegerTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function A(e){var t=J.getUniverse("RAML10"),n=t.type("DateOnlyTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function E(e){var t=J.getUniverse("RAML10"),n=t.type("TimeOnlyTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function T(e){var t=J.getUniverse("RAML10"),n=t.type("DateTimeOnlyTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function _(e){var t=J.getUniverse("RAML10"),n=t.type("DateTimeTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function S(e){var t=J.getUniverse("RAML10"),n=t.type("FileTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function N(e){var t=J.getUniverse("RAML10"),n=t.type("Response"),r=$.createStubNode(n,null,e);return r}function I(e){var t=J.getUniverse("RAML10"),n=t.type("SecuritySchemePart"),r=$.createStubNode(n,null,e);return r}function b(e){var t=J.getUniverse("RAML10"),n=t.type("AbstractSecurityScheme"),r=$.createStubNode(n,null,e);return r}function M(e){var t=J.getUniverse("RAML10"),n=t.type("SecuritySchemeSettings"),r=$.createStubNode(n,null,e);return r}function R(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth1SecuritySchemeSettings"),r=$.createStubNode(n,null,e);return r}function C(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth2SecuritySchemeSettings"),r=$.createStubNode(n,null,e);return r}function w(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth2SecurityScheme"),r=$.createStubNode(n,null,e);return r}function P(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth1SecurityScheme"),r=$.createStubNode(n,null,e);return r}function L(e){var t=J.getUniverse("RAML10"),n=t.type("PassThroughSecurityScheme"),r=$.createStubNode(n,null,e);return r}function O(e){var t=J.getUniverse("RAML10"),n=t.type("BasicSecurityScheme"),r=$.createStubNode(n,null,e);return r}function D(e){var t=J.getUniverse("RAML10"),n=t.type("DigestSecurityScheme"),r=$.createStubNode(n,null,e);return r}function U(e){var t=J.getUniverse("RAML10"),n=t.type("CustomSecurityScheme"),r=$.createStubNode(n,null,e);return r}function x(e){var t=J.getUniverse("RAML10"),n=t.type("Method"),r=$.createStubNode(n,null,e);return r}function k(e){var t=J.getUniverse("RAML10"),n=t.type("ResourceType"),r=$.createStubNode(n,null,e);return r}function F(e){var t=J.getUniverse("RAML10"),n=t.type("ResourceBase"),r=$.createStubNode(n,null,e);return r}function B(e){var t=J.getUniverse("RAML10"),n=t.type("Resource"),r=$.createStubNode(n,null,e);return r}function V(e){var t=J.getUniverse("RAML10"),n=t.type("DocumentationItem"),r=$.createStubNode(n,null,e);return r}function K(e){var t=J.getUniverse("RAML10"),n=t.type("Library"),r=$.createStubNode(n,null,e);return r}function j(e){var t=J.getUniverse("RAML10"),n=t.type("Overlay"),r=$.createStubNode(n,null,e);return r}function W(e){var t=J.getUniverse("RAML10"),n=t.type("Extension"),r=$.createStubNode(n,null,e);return r}function H(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function Y(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function q(e,t,n){return Z.loadApiAsync(e,t,n)}function G(e,t,n){return Z.loadRAMLAsync(e,t,n)}function X(e){return Z.getLanguageElementByRuntimeType(e)}var z=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var $=n(3),J=n(56),Q=n(218),Z=n(1),ee=n(248),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.annotations=function(){return e.prototype.attributes.call(this,"annotations",function(e){return new Pt(e)})},t.prototype.wrapperClassName=function(){return"AnnotableImpl"},t.prototype.kind=function(){return"Annotable"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat("Annotable")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat("RAML10.AnnotableImpl")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&"function"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t0?i[0]:null})}Object.defineProperty(t,"__esModule",{value:!0});var _=n(5),S=n(6),N=n(8),I=n(273),b=n(21),M=n(16),R=n(247),C=n(55),w=n(274),P=n(211),L=n(15),O=n(275),D=n(278),U=n(203),x=n(216),k=n(223),F=n(19),B=n(206),V=b.YAMLException;t.Kind={SCALAR:b.Kind.SCALAR};var K=function(){function e(e){this.text="",this.indent=e}return e.prototype.isLastNL=function(){return this.text.length>0&&"\n"==this.text[this.text.length-1]},e.prototype.addWithIndent=function(e,t){this.isLastNL()&&(this.text+=R.indent(e),this.text+=this.indent),this.text+=t},e.prototype.addChar=function(e){this.isLastNL()&&(this.text+=this.indent),this.text+=e},e.prototype.append=function(e){for(var t=0;t300&&a<400){var o=n.getResponseHeader("location");if(o)return e.url=o,this.execute(e,!1)}var s={status:a,statusText:n.statusText,headers:n.getAllResponseHeaders().split("\n").map(function(e){var t=e.indexOf(":");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}};return s},e.prototype.appendParams=function(e,t){var n=e.queryString&&e.queryString.length>0;if(n){t+="?";var r=[];n&&(r=r.concat(e.queryString.map(function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}))),t+=r.join("&")}return t},e.prototype.log=function(e,t){},e.prototype.executeAsync=function(e,t){void 0===t&&(t=!0);var n=r(),i=e.url;t&&(i=this.appendParams(e,e.url));var a=this;return new Promise(function(t,r){n.open(e.method,i,!0),n.onload=function(){var e=n.status,r={status:e,statusText:n.statusText,headers:n.getAllResponseHeaders().split("\n").map(function(e){var t=e.indexOf(":");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}};t(r)},n.onerror=function(){r(new V(B.NETWORK_ERROR.message))},a.doRequest(e,n)})},e.prototype.doRequest=function(e,t){if(e.headers&&e.headers.forEach(function(e){return t.setRequestHeader(e.name,e.value)}),e.postData)if(e.postData.params){var n=e.postData.params.map(function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}).join("&");t.send(n)}else t.send(e.postData.text);else t.send()},e}();t.SimpleExecutor=q;var G=function(){function e(){this.executor=new q; -}return e.prototype.getResource=function(e){if("undefined"!=typeof atom&&null!=atom){var t=P.get(e);if(t)return t;P.addNotify(e);try{var n={content:""};return this.getResourceAsync(e).then(function(t){try{t.errorMessage?P.set(e,{content:null,errorMessage:null}):(t.errorMessage=null,P.set(e,t))}finally{n.callback&&n.callback(P.get(e)),P.removeNotity(e)}},function(t){P.set(e,{content:null,errorMessage:null}),n.callback&&n.callback(P.get(e)),P.removeNotity(e)}),n}catch(e){console.log("Error"),console.log(e)}}var r=this.executor.execute({method:"get",url:e});if(!r)throw new V(F.applyTemplate(B.UNABLE_TO_EXECUTE_GET,{url:e}));var i=this.toResponse(r,e);return i},e.prototype.getResourceAsync=function(e){var t=this;return this.executor.executeAsync({method:"get",url:e}).then(function(n){if(!n)return Promise.reject(new V(F.applyTemplate(B.UNABLE_TO_EXECUTE_GET,{url:e})));var r=t.toResponse(n,e);return r},function(t){return Promise.reject(F.applyTemplate(B.UNABLE_TO_EXECUTE_GET,{url:e}))})},e.prototype.toResponse=function(e,t){var n=null;e.status>=400&&(n="GET "+t+"\nreturned error: "+e.status,e.statusText&&(n+=" "+e.statusText));var r=null;e.content&&e.content.text&&(r=e.content.text);var i={content:r,errorMessage:n};return i},e}();t.HTTPResolverImpl=G;var X=function(){function e(){}return e.prototype.content=function(e){if("string"!=typeof e&&(e=""+e),!I.existsSync(e))return null;try{return I.readFileSync(e).toString()}catch(e){return null}},e.prototype.list=function(e){return I.readdirSync(e)},e.prototype.contentAsync=function(e){return new Promise(function(t,n){I.readFile(e,function(e,r){if(null!=e)return n(e);var i=r.toString();t(i)})})},e.prototype.listAsync=function(e){return new Promise(function(t,n){I.readdir(e,function(e,t){return null!=e?Promise.reject(e):void n(t)})})},e}();t.FSResolverImpl=X;var z=function(e,t,n){if(t&&(t.startPosition>=e&&(t.startPosition+=n),t.endPosition>e&&(t.endPosition+=n),t.kind==b.Kind.MAPPING)){var r=t;z(e,r.key,n),z(e,r.value,n)}},$=function(e,t){for(var n="",r=e.start()-1;r>0;){var i=t[r];if(" "!=i&&"-"!=i)break;n=" "+n,r--}return n},J=function(){function e(e,t,n){this.rootPath=e,this.resolver=t,this._httpResolver=n,this.listeners=[],this.tlisteners=[],this.pathToUnit={},this.failedUnits={},this._fsEnabled=!0,this._namespaceResolver=new k.NamespaceResolver,null==this.resolver?this.resolver=new X:this._fsEnabled=!1,null==this._httpResolver&&(this._httpResolver=new G)}return e.prototype.getMainUnit=function(){return this.mainUnitPath?this.unit(this.mainUnitPath,!0):null},e.prototype.getRootPath=function(){return this.rootPath},e.prototype.getMainUnitPath=function(){return this.mainUnitPath},e.prototype.setMainUnitPath=function(e){this.mainUnitPath=e},e.prototype.setFSResolver=function(e){this.resolver=e},e.prototype.setHTTPResolver=function(e){this._httpResolver=e},e.prototype.fsEnabled=function(){return this._fsEnabled},e.prototype.cloneWithResolver=function(t,n){void 0===n&&(n=null);var r=new e(this.rootPath,t,n?n:this._httpResolver);for(var i in this.pathToUnit)r.pathToUnit[i]=this.pathToUnit[i].cloneToProject(r);return r},e.prototype.setCachedUnitContent=function(e,t,n){void 0===n&&(n=!0);var r=e,i=_.toAbsolutePath(this.rootPath,e),a=new j(r,t,n,this,i);return this.pathToUnit[i]=a,a},e.prototype.resolveAsync=function(e,t){var n=this;if(!t)return Promise.reject(new V(B.UNIT_PATH_IS_NULL.message));var r=O.getIncludeReference(t),i=t;r&&(t=r.getIncludePath());var a=_.buildPath(t,e,this.rootPath);if(r){var o,s=_.toAbsolutePath(S.dirname(_.toAbsolutePath(this.rootPath,e)),r.encodedName());this.pathToUnit[a]?Promise.resolve(o).then(function(e){return n.pathToUnit[s]=new j(r.encodedName(),O.resolveContents(i,n.pathToUnit[a].contents()),!1,n,s),n.pathToUnit[s]}):this.unitAsync(a,!0).then(function(e){return n.pathToUnit[a]=e,n.pathToUnit[s]=new j(r.encodedName(),O.resolveContents(i,n.pathToUnit[a].contents()),!1,n,s),n.pathToUnit[s]})}return this.unitAsync(a,!0)},e.prototype.resolve=function(e,t){if(!t)return null;t=t.replace(/\\/g,"/");var n=O.getIncludeReference(t),r=t;n&&(t=n.getIncludePath());var i=_.buildPath(t,e,this.rootPath);if(n){this.pathToUnit[i]||(this.pathToUnit[i]=this.unit(i,!0));var a=this.pathToUnit[i],o=_.toAbsolutePath(S.dirname(_.toAbsolutePath(this.rootPath,e)),n.encodedName());return this.pathToUnit[o]?this.pathToUnit[o]:(this.pathToUnit[o]=new j(n.encodedName(),O.resolveContents(r,a&&a.contents()),!1,this,o),this.pathToUnit[o])}return this.unit(i,!0)},e.prototype.units=function(){var e=this;if(!this.resolver.list)throw new V(B.FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER.message);var t=this.resolver.list(this.rootPath).filter(function(e){return".raml"==S.extname(e)});return t.map(function(t){return e.unit(t)}).filter(function(e){return e.isTopLevel()})},e.prototype.unitsAsync=function(){var e=this;return this.resolver.listAsync?this.resolver.listAsync(this.rootPath).then(function(t){var n=t.filter(function(e){return".raml"==S.extname(e)}).map(function(t){return e.unitAsync(t).then(function(e){return e.isTopLevel()?e:null},function(e){return null})});return Promise.all(n).then(function(e){return e.filter(function(e){return null!=e})})}):Promise.reject(new V(B.FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER.message))},e.prototype.lexerErrors=function(){var e=[];return this.units().forEach(function(t){e=e.concat(t.lexerErrors())}),e},e.prototype.deleteUnit=function(e,t){void 0===t&&(t=!1);var n=null;n=_.isWebPath(e)?e:t?e:_.toAbsolutePath(this.rootPath,e),delete this.pathToUnit[n]},e.prototype.unit=function(e,t){if(void 0===t&&(t=!1),t||_.isWebPath(e)){if(null!=this.failedUnits[e]&&!this.failedUnits[e].inner)return null}else{var n=_.toAbsolutePath(this.rootPath,e);if(this.failedUnits[n]&&!this.failedUnits[e].inner)return null}var r,i=null,a=e;if(_.isWebPath(e)){if(this.pathToUnit[a])return this.pathToUnit[a];if(this._httpResolver){if(r=this._httpResolver.getResource(e),r&&r.errorMessage)throw new V(r.errorMessage);i=r?r.content:null}else r=(new G).getResource(a),i=r?r.content:null}else{"/"!=e.charAt(0)||t||(e=e.substr(1));var a=_.toAbsolutePath(this.rootPath,e);if(this.pathToUnit[a])return this.pathToUnit[a];if(_.isWebPath(a))if(this._httpResolver){var o=this._httpResolver.getResource(a);if(o&&o.errorMessage)throw new V(o.errorMessage);i=o?o.content:null}else{var s=(new G).getResource(a);i=s?s.content:null}else i=this.resolver.content(a)}if(null==i)return null;var u=L.stringStartsWith(i,"#%RAML"),l=_.isWebPath(this.rootPath)==_.isWebPath(a)?S.relative(this.rootPath,a):a,p=new j(l,i,u,this,a);return this.pathToUnit[a]=p,r&&(r.callback=function(e){p.updateContent(e&&e.content)}),p},e.prototype.unitAsync=function(e,t){var n=this;void 0===t&&(t=!1);var r=null,i=e;if(_.isWebPath(e)){if(this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new V(e.errorMessage)):e.content})}else r=(new G).getResourceAsync(i).then(function(e){return e.errorMessage?Promise.reject(e.errorMessage):e.content})}else{if("/"!=e.charAt(0)||t||(e=e.substr(1)),i=t?e:_.toAbsolutePath(this.rootPath,e),this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(_.isWebPath(i))if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new V(e.errorMessage)):e.content})}else r=(new G).getResourceAsync(i).then(function(e){return e.errorMessage?Promise.reject(new V(e.errorMessage)):e.content});else r=this.resolver.contentAsync(i)}if(null==r)return Promise.resolve(null);var o=_.isWebPath(this.rootPath)==_.isWebPath(i)?S.relative(this.rootPath,i):i;return r.then(function(e){if(null==e)return Promise.reject(new V(F.applyTemplate(B.CAN_NOT_RESOLVE,{path:i})));var t=L.stringStartsWith(e,"#%RAML"),r=new j(o,e,t,n,i);return n.pathToUnit[i]=r,r},function(e){return"object"==typeof e&&e instanceof V?Promise.reject(e):Promise.reject(new V(e.toString()))}).then(function(e){return e.isRAMLUnit()?e:D.isScheme(e.contents())?D.startDownloadingReferencesAsync(e.contents(),e):e})},e.prototype.visualizeNewlines=function(e){for(var t="",n=0;n1&&r[1].trim().length>0){var i=s(r[1]);return n+i}return n+" "},e.prototype.startIndent=function(e){e.unit().contents();if(e==e.root())return"";var t=a(e.dump());if(t.length>0){console.log("FIRST: "+t[0]);var n=s(t[0]);return n+" "}return""},e.prototype.canWriteInOneLine=function(e){return!1},e.prototype.isOneLine=function(e){return e.text().indexOf("\n")<0},e.prototype.recalcPositionsUp=function(e){for(var t=e;t;)t.recalcEndPositionFromChilds(),t=t.parent()},e.prototype.add2=function(e,t,n,r,i){void 0===i&&(i=!1);var a=e.unit(),o=(e.root(),null);if(r&&(Q.isInstance(r)&&(o=r),ee.isInstance(r)&&(o=r.point)),e.isValueInclude()){var s=e.children();if(0==s.length)throw new V(B.NOT_IMPLEMENTED_INSERT_INTO_EMPTY_REF.message);var u=s[0].parent();return void this.add2(u,t,n,o,i)}var l=(new R.TextRange(a.contents(),t.start(),t.end()),new R.TextRange(a.contents(),e.start(),e.end()),e.unit().contents());e.valueKind()==b.Kind.SEQ&&(e=h(e.valueAsSeq(),e,e.unit()));var i=this.isJson(e),p=i?"":this.indent(e.isSeq()?e.parent():e),c=p,f=p.length,d=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value);n=n,n&&(i||d&&(c+=" ",f+=2));var m=new K(c);t.markupNode(m,t._actualNode(),0,i);var y=m.text;if(n){var v=R.trimEnd(y),g=y.length-v.length;if(g>0){var A=y.length;y=y.substring(0,A-g),t.shiftNodes(A-g,-g)}}n&&!i?(t.highLevelNode(),e.isMapping(),y=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value)?p+"- "+y:p+y):y=p+y;var E=e.end();if(o)o!=e?E=o.end():i&&n||(E=e.keyEnd()+1,E=new R.TextRange(l,E,E).extendAnyUntilNewLines().endpos());else if(i&&n){var T=e.asSeq();T&&(E=T.items.length>0?T.items[T.items.length-1].endPosition:T.endPosition-1)}else if(r&&ee.isInstance(r)){var _=r;_.type==Z.START&&(E=e.keyEnd()+1,E=new R.TextRange(l,E,E).extendAnyUntilNewLines().endpos())}var S=new R.TextRange(l,0,E);if(E=S.extendToNewlines().reduceSpaces().endpos(),i&&e.isSeq()){var T=e.asSeq();T.items.length>0&&(y=", "+y,f+=2)}else E>0&&"\n"!=l[E-1]&&(y="\n"+y,f++);var N=0;n&&!i&&(y+="\n",N++);var I=l.substring(0,E)+y+l.substring(E,l.length),M=a;if(M.updateContentSafe(I),this.executeReplace(new R.TextRange(l,E,E),y,M),e.root().shiftNodes(E,f+(t.end()-t.start())+N),o){for(var s=e.children(),C=-1,w=0;w=0?e.addChild(t,C+1):e.addChild(t)}else e.addChild(t);t.shiftNodes(0,E+f),this.recalcPositionsUp(e),t.setUnit(e.unit()),t.visit(function(t){var n=t;return n.setUnit(e.unit()),!0})},e.prototype.isJsonMap=function(e){if(!e.isMap())return!1;var t=e.text().trim();return t.length>=2&&"{"==t[0]&&"}"==t[t.length-1]},e.prototype.isJsonSeq=function(e){if(!e.isSeq())return!1;var t=e.text().trim();return t.length>=2&&"["==t[0]&&"]"==t[t.length-1]},e.prototype.isJson=function(e){return this.isJsonMap(e)||this.isJsonSeq(e)},e.prototype.remove=function(e,t,n){var r=n.parent();if(n._oldText=n.dump(),this.isOneLine(n)&&n.isMapping()&&n.parent().isMap()){var i=n.parent();if(1==i.asMap().mappings.length&&null!=i.parent())return void this.remove(e,i.parent(),i)}if(this.isOneLine(n)&&n.isScalar()&&n.parent().isSeq()){var a=n.parent(),o=a.asSeq();if(1==o.items.length)return void this.remove(e,a.parent(),a)}if(t.isMapping()&&n.isSeq()){var s=t.parent();return void this.remove(e,s,t)}var u=new R.TextRange(e.contents(),n.start(),n.end()),l=(new R.TextRange(e.contents(),t.start(),t.end()),new R.TextRange(e.contents(),r.start(),r.end()),u.startpos());if(t.isSeq()){var p=n.isSeq()?n:n.parentOfKind(b.Kind.SEQ);u=p&&this.isJson(p)?u.extendSpaces().extendCharIfAny(",").extendSpaces():u.extendToStartOfLine().extendAnyUntilNewLines().extendToNewlines()}t.isMap()&&(u=u.trimEnd().extendAnyUntilNewLines().extendToNewlines(),u=u.extendToStartOfLine().extendUntilNewlinesBack()),t.kind()==b.Kind.MAPPING&&(this.isJson(n)&&this.isOneLine(n)||(u=u.extendSpacesUntilNewLines(),u=u.extendToNewlines(),u=u.extendToStartOfLine().extendUntilNewlinesBack())),n.isSeq()&&(u=u.reduceSpaces());var c=e;c.updateContentSafe(u.remove()),this.executeReplace(u,"",c),n.parent().removeChild(n);var f=-u.len();t.root().shiftNodes(l,f),this.recalcPositionsUp(t)},e.prototype.changeKey=function(e,t,n){var r=new R.TextRange(t.unit().contents(),t.keyStart(),t.keyEnd());if(t.kind()==b.Kind.MAPPING){var i=t._actualNode().key;i.value=n,i.endPosition=i.startPosition+n.length}var a=e;this.executeReplace(r,n,a);var o=n.length-r.len();t.root().shiftNodes(r.startpos(),o,t),this.recalcPositionsUp(t)},e.prototype.executeReplace=function(e,t,n){var r=new _.TextChangeCommand(e.startpos(),e.endpos()-e.startpos(),t,n);n.project();try{this.tlisteners.forEach(function(e){return e(r)})}catch(e){return!1}var i=e.replace(t);return n.updateContentSafe(i),!0},e.prototype.changeValue=function(e,t,n){var r,i=new R.TextRange(t.unit().contents(),t.start(),t.end()),a=0,o=0,s=null,u=null;if(t.kind()==b.Kind.SCALAR){if("string"!=typeof n)throw new V(B.NOT_IMPLEMENTED.message);t.asScalar().value=n,r=n}else if(t.kind()==b.Kind.MAPPING){if(u=t.asMapping(),t.isValueInclude()){var l=t.valueAsInclude(),p=l.value,f=p,h=t.unit().resolve(f);if(null==h)return void console.log(F.applyTemplate(B.ATTR_SETVALUE_NOT_RESOLVE,{path:f}));if(h.isRAMLUnit())return;return void(O.getIncludeReference(p)||h.updateContent(n))}if(i=u.value?i.withStart(t.valueStart()).withEnd(t.valueEnd()):i.withStart(t.keyEnd()+1).withEnd(t.keyEnd()+1),i=i.reduceNewlinesEnd(),null==n)r="",u.value=null;else if("string"==typeof n||null==n){var d=n,m=this.indent(t);if(d&&R.isMultiLine(d)&&(d=""+R.makeMutiLine(d,m.length/2)),r=d,u.value){if(u.value.kind==b.Kind.SEQ){console.log("seq value");u.value.items[0];throw"assign value!!!"}if(u.value.kind==b.Kind.SCALAR){var y=u.value,v=y.value||"";y.value=d,u.value.endPosition=u.value.startPosition+d.length,u.endPosition=u.value.endPosition,o+=d.length-v.length}}else if(console.log("no value"),u.value=b.newScalar(d),u.value.startPosition=t.keyEnd()+1,u.value.endPosition=u.value.startPosition+d.length,u.endPosition=u.value.endPosition,e.contents().length>t.keyEnd()+1){var g=t.keyEnd()+1;":"==e.contents()[g-1]&&(r=" "+r,u.value.startPosition++,u.value.endPosition++,u.endPosition++,o++)}}else{var A=n;if(A.isMapping())n=c([A.asMapping()]),A=n;else if(!A.isMap())throw new V(B.ONLY_MAP_NODES_ALLOWED.message);var E=new K("");A.markupNode(E,A._actualNode(),0,!0),r=""+E.text,A.shiftNodes(0,i.startpos()+o),s=A}}else console.log(F.applyTemplate(B.UNSUPPORTED_CHANGE_VALUE_CASE,{name:t.kindName()}));var T=e;this.executeReplace(i,r,T);var _=r.length-i.len();t.root().shiftNodes(i.endpos()+a,_,t),s&&(u.value=s._actualNode()),this.recalcPositionsUp(t)},e.prototype.initWithRoot=function(e,t){var n=e.end();t.markup(!1),t._actualNode().startPosition=n,t._actualNode().endPosition=n,t.setUnit(e.unit())},e.prototype.execute=function(e){var t=this;e.commands.forEach(function(e){switch(e.kind){case _.CommandKind.CHANGE_VALUE:var n=e.target,r=n.value();r||(r="");var i=e.value;if(console.log("set value: "+typeof r+" ==> "+typeof i),"string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r||"string"!=typeof i)if("string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r||"string"==typeof i)if("string"!=typeof r&&"string"==typeof i){var a=e.value;if(r.kind()!=b.Kind.MAPPING)throw new V(F.applyTemplate(B.UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION,{curval:r,newval:i}));R.isMultiLine(a)?(n.children().forEach(function(e){t.remove(n.unit(),n,e)}),t.changeValue(n.unit(),n,a)):t.changeKey(n.unit(),r,a)}else{if("string"==typeof r||"string"==typeof i)throw new V(F.applyTemplate(B.UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION,{curval:r,newval:i}));var o=i;if(o.isMapping()&&(i=c([o.asMapping()])),r==i)break;var s=i;s.asMap();n.children().forEach(function(e){t.remove(n.unit(),n,e)}),s.children().forEach(function(e){}),t.changeValue(n.unit(),n,i)}else t.changeValue(n.unit(),n,i);else r!=i&&t.changeValue(n.unit(),n,i);return;case _.CommandKind.CHANGE_KEY:var n=e.target;return void t.changeKey(n.unit(),n,e.value);case _.CommandKind.ADD_CHILD:var n=e.target,u=e.value;return void t.add2(n,u,e.toSeq,e.insertionPoint);case _.CommandKind.REMOVE_CHILD:var l=e.target,s=e.value;return void t.remove(l.unit(),l,s);case _.CommandKind.INIT_RAML_FILE:var p=e.target,f=e.value;return void t.initWithRoot(p,f);default:return void console.log(F.applyTemplate(B.UNSUPPORTED_COMMAND,{name:_.CommandKind[e.kind]}))}})},e.prototype.replaceYamlNode=function(e,t,n,r,i){var a=b.load(t,{ignoreDuplicateKeys:!0});this.updatePositions(e.start(),a),e.root().shiftNodes(n,r);var o=e.parent(),s=e._actualNode(),u=s.parent;if(a.parent=u,o&&o.kind()==b.Kind.MAP){var l=o._actualNode();l.mappings=l.mappings.map(function(e){return e!=s?e:a})}e.updateFrom(a),this.recalcPositionsUp(e)},e.prototype.executeTextChange2=function(e){var t=e.unit,n=t.contents(),r=e.target;if(r){var i=n.substring(r.start(),r.end());n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);var a=i.substr(0,e.offset-r.start())+e.text+i.substr(e.offset-r.start()+e.replacementLength);if(t.updateContentSafe(n),e.offset>r.start())try{var o=e.text.length-e.replacementLength,s=e.offset;r.unit().project().replaceYamlNode(r,a,s,o,e.unit)}catch(e){console.log("New node contents (causes error below): \n"+a),console.log("Reparse error: "+e.stack)}}else n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);t.updateContent(n),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})},e.prototype.executeTextChange=function(e){(new Date).getTime();try{var t=e.unit.contents(),n=e.target;null==n&&(n=this.findNode(e.unit.ast(),e.offset,e.offset+e.replacementLength));var r=e.unit;if(n){var a=t.substring(n.start(),n.end()),o=t;t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);var s=a.substr(0,e.offset-n.start())+e.text+a.substr(e.offset-n.start()+e.replacementLength);r.updateContentSafe(t);u(o,e);if(e.offset>n.start())try{var l=b.load(s,{ignoreDuplicateKeys:!0});this.updatePositions(n.start(),l);var p=e.text.length-e.replacementLength;if(e.unit.ast().shiftNodes(e.offset,p),null!=l&&l.kind==b.Kind.MAP){var c=l.mappings[0],f=n._actualNode(),h=f.parent,d=new _.ASTDelta,m=e.unit;if(d.commands=[new _.ASTChangeCommand(_.CommandKind.CHANGE_VALUE,new Q(i(f),m,null,null,null),new Q(c,m,null,null,null),0)],h&&h.kind==b.Kind.MAP){var y=h;y.mappings=y.mappings.map(function(e){return e!=f?e:c})}return c.parent=h,this.recalcPositionsUp(n),n.updateFrom(c),this.listeners.forEach(function(e){e(d)}),void this.tlisteners.forEach(function(t){t(e)})}}catch(e){console.log(F.applyTemplate(B.NEW_NODE_CONTENTS_ERROR_BELOW,{content:s})),console.log(F.applyTemplate(B.REPARSE_ERROR,{content:e.stack}))}}else t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);(new Date).getTime(); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("RAML.XmlValidation")}catch(e){}}(),function(){try{return require("RAML.JsonValidation")}catch(e){}}(),require("typescript")):"function"==typeof define&&define.amd?define(["RAML.XmlValidation","RAML.JsonValidation","typescript"],t):"object"==typeof exports?exports.Parser=t(function(){try{return require("RAML.XmlValidation")}catch(e){}}(),function(){try{return require("RAML.JsonValidation")}catch(e){}}(),require("typescript")):(e.RAML=e.RAML||{},e.RAML.Parser=t(e["RAML.XmlValidation"],e["RAML.JsonValidation"],e.typescript))}(this,function(__WEBPACK_EXTERNAL_MODULE_64__,__WEBPACK_EXTERNAL_MODULE_66__,__WEBPACK_EXTERNAL_MODULE_185__){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t){return y.load(e,t)}function i(e,t){return y.loadSync(e,t)}function a(e,t){return y.parse(e,t)}function o(e,t){return y.parseSync(e,t)}function s(e,t,n){return y.loadApi(e,t,n).getOrElse(null)}function u(e,t,n){return y.loadApi(e,t,n).getOrElse(null)}function l(e,t){var n=y.virtualFilePath(t),r=y.optionsForContent(e,t,n);return y.loadApi(n,[],r).getOrElse(null)}function p(e,t){var n=y.virtualFilePath(t),r=y.optionsForContent(e,t,n);return y.loadApiAsync(n,[],r)}function c(e,t,n){return y.loadApiAsync(e,t,n)}function f(e,t,n){return y.loadRAMLAsync(e,t,n)}function h(e){return y.getLanguageElementByRuntimeType(e)}function d(e){return t.api10.isFragment(e)}function m(e){return t.api10.asFragment(e)}Object.defineProperty(t,"__esModule",{value:!0});var y=n(1);t.jsonTypings=n(281);var v=n(295);t.api10=n(222),t.api08=n(296),t.load=r,t.loadSync=i,t.parse=a,t.parseSync=o,t.loadApiSync=s,t.loadRAMLSync=u,t.parseRAMLSync=l,t.parseRAML=p,t.loadApi=c,t.loadRAML=f,t.getLanguageElementByRuntimeType=h,t.isFragment=d,t.asFragment=m,t.hl=n(198),t.ll=n(5),t.search=n(209),t.stubs=n(297),t.utils=n(263),t.project=n(298),t.universeHelpers=n(205),t.ds=n(56),t.schema=n(299),t.universes=t.ds.universesInfo,t.parser=n(301),t.expander=n(303),t.wrapperHelper=n(304),"undefined"==typeof Promise&&"undefined"!=typeof window&&(window.Promise=v)},function(e,t,n){"use strict";function r(e,t){var n=b(t);return a(e,t).then(function(e){return B.dump(e,n)})}function i(e,t){var n=b(t),r=o(e,t);return B.dump(r,n)}function a(e,t){t=t||{};var n=e;I(e)&&(t=N(e,t,t.filePath),n=M(t));var r=S(t);return h(n,r).then(function(e){var n;return n=!t.hasOwnProperty("expandLibraries")||t.expandLibraries?U.expandLibrariesHL(e):U.expandTraitsAndResourceTypesHL(e)})}function o(e,t){t=t||{};var n=e;I(e)&&(t=N(e,t,t.filePath),n=M(t));var r,i=S(t),a=p(n,i);return r=!t.hasOwnProperty("expandLibraries")||t.expandLibraries?V.isLibraryType(a.definition())?U.expandLibraryHL(a)||a:U.expandLibrariesHL(a)||a:U.expandTraitsAndResourceTypesHL(a)||a}function s(e,t,n){var r=p(e,t,n);if(!r)return P.empty();var i=r.wrapperNode(),a=Array.isArray(t)?n:t;return _(i,a),new P(i)}function u(e,t,n){var r=p(e,t,n);if(!r)return P.empty();var i=r.wrapperNode(),a=Array.isArray(t)?n:t;return _(i,a),new P(i)}function l(e,t,n){var r=p(e,t,n);return r?new P(r):P.empty()}function p(e,t,n){var r=Array.isArray(t),i=r?t:null,a=r?n:t;a=a||{};var o=y(e,a),s=e.indexOf("://"),u=s!=-1&&s<6?e:w.basename(e),l=o.unit(u);n&&!i&&(i=null);var p;if(l)if(i&&i.length>0){var c=[];i.forEach(function(e){if(!e||0==e.trim().length)throw new Error(W.EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS.message)}),i.forEach(function(e){c.push(o.unit(e,w.isAbsolute(e)))}),c.forEach(function(e){return v(e,a)}),p=v(U.mergeAPIs(l,c,O.OverlayMergeMode.MERGE),a)}else p=v(l,a),p.setMergeMode(O.OverlayMergeMode.MERGE);if(!l)throw new Error(j.applyTemplate(W.CAN_NOT_RESOLVE,{path:e}));if(a.rejectOnErrors&&p&&p.errors().filter(function(e){return!e.isWarning}).length)throw g(p);return p}function c(e,t,n){var r=f(e,t,n);return r.then(function(e){return e})}function f(e,t,n){return h(e,t,n).then(function(e){if(!e)return null;for(var r=Array.isArray(t),i=r?n:t,a=e;null!=a;){var o=a.wrapperNode();_(o,i);var s=a.getMaster();a=s&&s!==a?s.asElement():null}return e.wrapperNode()})}function h(e,t,n){var r=Array.isArray(t),i=r?t:null,a=r?n:t;a=a||{};var o=y(e,a),s=e.indexOf("://"),u=s!=-1&&s<6?e:w.basename(e);return n&&!i&&(i=null),i&&0!=i.length?(i.forEach(function(e){if(!e||0==e.trim().length)throw new Error(W.EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS.message)}),m(o,u,a).then(function(e){var t=[];return i.forEach(function(e){t.push(m(o,e,a))}),Promise.all(t).then(function(t){var n=[];t.forEach(function(e){return n.push(e.lowLevel().unit())});var r=U.mergeAPIs(e.lowLevel().unit(),n,O.OverlayMergeMode.MERGE);return r}).then(function(e){return v(e,a)})})):m(o,u,a).then(function(e){return e.setMergeMode(O.OverlayMergeMode.MERGE),e})}function d(e){if(null==e)return null;var t=e.getAdapter(F.RAMLService).getDeclaringNode();return null==t?null:t.wrapperNode()}function m(e,t,n){var r=t.replace(/\\/g,"/");return D.fetchIncludesAndMasterAsync(e,r).then(function(e){try{var t=v(e,n);return n.rejectOnErrors&&t&&t.errors().filter(function(e){return!e.isWarning}).length?Promise.reject(g(t)):t}catch(e){return Promise.reject(e)}})}function y(e,t){t=t||{};var n,r=t.fsResolver,i=t.httpResolver,a=t.reusedNode;if(a){var o=a.lowLevel().unit();n=o.project(),n.namespaceResolver().deleteUnitModel(o.absolutePath()),n.deleteUnit(w.basename(e)),r&&n.setFSResolver(r),i&&n.setHTTPResolver(i)}else{var s=w.dirname(e);n=new L.Project(s,r,i)}return n}function v(e,t,n){if(void 0===n&&(n=!1),t=t||{},!e)return null;var r=null,i=null;e.isRAMLUnit?r=e:(i=e,r=i.lowLevel().unit());var a=r.contents(),o=O.ramlFirstLine(a);if(!o)throw new Error(W.INVALID_FIRST_LINE.message);var s,u,l=o[1];o[2];if("0.8"==l?u="RAML08":"1.0"==l&&(u="RAML10"),!u)throw new Error(W.UNKNOWN_RAML_VERSION.message);if("RAML08"==u&&n)throw new Error(W.EXTENSIONS_AND_OVERLAYS_NOT_SUPPORTED_0_8.message);var p=H(u);p.type(s);return i||(i=O.fromUnit(r),t.reusedNode&&t.reusedNode.lowLevel().unit().absolutePath()==r.absolutePath()&&E(i,t.reusedNode)&&i.setReusedNode(t.reusedNode)),i}function g(e){var t=new Error(W.API_CONTAINS_ERROR.message);return t.parserErrors=O.toParserErrors(e.errors(),e),t}function A(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0);var r=H("RAML10"),i=r.type(k.Universe10.Api.name),a=new L.Project(e),o=[];return a.units().forEach(function(e){var r=e.ast();t&&(r=D.toChildCachingNode(r));var a=new C.ApiImpl(new O.ASTNodeImpl(r,null,i,null));n&&(a=U.expandTraitsAndResourceTypes(a)),o.push(a)}),o}function E(e,t){if(!t)return!1;for(var n=e.lowLevel().unit().contents(),r=t.lowLevel().unit().contents(),i=Math.min(n.length,r.length),a=-1,o=0;o0&&""==n.charAt(a).replace(/\s/,"");)a--;a<0&&n.length!=r.length&&(a=i);var s=K.deepFindNode(t,a,a+1);if(!s)return!0;if(s.lowLevel().unit().absolutePath()!=e.lowLevel().unit().absolutePath())return!0;var u=s.isElement()?s.asElement():s.parent();if(!u)return!0;var l=u.property();if(!l)return!0;if(V.isAnnotationsProperty(l)&&(u=u.parent()),!u)return!0;for(var p=u;p;){var c=p.definition();if(V.isResourceTypeType(c)||V.isTraitType(c))return!1;var f=p.property();if(!f)return!0;if(V.isTypeDeclarationDescendant(c)&&(V.isTypesProperty(f)||V.isAnnotationTypesProperty(f)))return!1;var h=f.range();if(V.isResourceTypeRefType(h)||V.isTraitRefType(h))return!1;p=p.parent()}return!0}function _(e,t){t=t||{},null!=t.attributeDefaults&&e?e.setAttributeDefaults(t.attributeDefaults):e&&e.setAttributeDefaults(!0)}function T(e,t,n){var r=n||M(t),i=R(r,e,t&&t.fsResolver);return{fsResolver:i,httpResolver:t?t.httpResolver:null,rejectOnErrors:!!t&&t.rejectOnErrors,attributeDefaults:!t||t.attributeDefaults}}function S(e){return e?{fsResolver:e.fsResolver,httpResolver:e.httpResolver,rejectOnErrors:!1,attributeDefaults:!0}:{}}function N(e,t,n){var r=n||M(t),i=R(r,e,t&&t.fsResolver),a={fsResolver:i};if(!t)return a;for(var o=0,s=Object.keys(t);o=0)}function b(e){return e=e||{},{rootNodeDetails:!0,attributeDefaults:!0,serializeMetadata:e.serializeMetadata||!1,expandExpressions:e.expandExpressions,typeReferences:e.typeReferences,expandTypes:e.expandTypes,typeExpansionRecursionDepth:e.typeExpansionRecursionDepth,sourceMap:e.sourceMap}}function R(e,t,n){return null!=e&&(e=e.replace(/\\/g,"/")),{content:function(r){return r===e?t:n?n.content(r):void 0},contentAsync:function(r){return r===e?Promise.resolve(t):n?n.contentAsync(r):void 0}}}function M(e){var t=e&&e.filePath||w.resolve("/#local.raml");return t.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0});var C=n(2),w=n(6),P=n(17),L=n(4),O=n(55),D=n(4),U=n(217),x=n(15),k=n(204),F=n(275),B=n(255),V=n(205),K=n(209),j=n(19),W=n(207),H=n(264);t.load=r,t.loadSync=i,t.parse=a,t.parseSync=o,t.loadApi=s,t.loadRAML=u,t.loadRAMLHL=l,t.loadApiAsync=c,t.loadRAMLAsync=f,t.loadRAMLAsyncHL=h,t.getLanguageElementByRuntimeType=d,t.toError=g,t.loadApis1=A,t.optionsForContent=T,t.loadOptionsForContent=N,t.virtualFSResolver=R,t.virtualFilePath=M},function(e,t,n){"use strict";function r(e){var t=J.getUniverse("RAML10"),n=t.type("Api"),r=$.createStubNode(n,null,e);return r}function i(e){var t=J.getUniverse("RAML10"),n=t.type("LibraryBase"),r=$.createStubNode(n,null,e);return r}function a(e){var t=J.getUniverse("RAML10"),n=t.type("FragmentDeclaration"),r=$.createStubNode(n,null,e);return r}function o(e){var t=J.getUniverse("RAML10"),n=t.type("Trait"),r=$.createStubNode(n,null,e);return r}function s(e){var t=J.getUniverse("RAML10"),n=t.type("MethodBase"),r=$.createStubNode(n,null,e);return r}function u(e){var t=J.getUniverse("RAML10"),n=t.type("Operation"),r=$.createStubNode(n,null,e);return r}function l(e){var t=J.getUniverse("RAML10"),n=t.type("TypeDeclaration"),r=$.createStubNode(n,null,e);return r}function p(e){var t=J.getUniverse("RAML10"),n=t.type("UsesDeclaration"),r=$.createStubNode(n,null,e);return r}function c(e){var t=J.getUniverse("RAML10"),n=t.type("XMLFacetInfo"),r=$.createStubNode(n,null,e);return r}function f(e){var t=J.getUniverse("RAML10"),n=t.type("ArrayTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function h(e){var t=J.getUniverse("RAML10"),n=t.type("UnionTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function d(e){var t=J.getUniverse("RAML10"),n=t.type("ObjectTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function m(e){var t=J.getUniverse("RAML10"),n=t.type("StringTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function y(e){var t=J.getUniverse("RAML10"),n=t.type("BooleanTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function v(e){var t=J.getUniverse("RAML10"),n=t.type("NumberTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function g(e){var t=J.getUniverse("RAML10"),n=t.type("IntegerTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function A(e){var t=J.getUniverse("RAML10"),n=t.type("DateOnlyTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function E(e){var t=J.getUniverse("RAML10"),n=t.type("TimeOnlyTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function _(e){var t=J.getUniverse("RAML10"),n=t.type("DateTimeOnlyTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function T(e){var t=J.getUniverse("RAML10"),n=t.type("DateTimeTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function S(e){var t=J.getUniverse("RAML10"),n=t.type("FileTypeDeclaration"),r=$.createStubNode(n,null,e);return r}function N(e){var t=J.getUniverse("RAML10"),n=t.type("Response"),r=$.createStubNode(n,null,e);return r}function I(e){var t=J.getUniverse("RAML10"),n=t.type("SecuritySchemePart"),r=$.createStubNode(n,null,e);return r}function b(e){var t=J.getUniverse("RAML10"),n=t.type("AbstractSecurityScheme"),r=$.createStubNode(n,null,e);return r}function R(e){var t=J.getUniverse("RAML10"),n=t.type("SecuritySchemeSettings"),r=$.createStubNode(n,null,e);return r}function M(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth1SecuritySchemeSettings"),r=$.createStubNode(n,null,e);return r}function C(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth2SecuritySchemeSettings"),r=$.createStubNode(n,null,e);return r}function w(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth2SecurityScheme"),r=$.createStubNode(n,null,e);return r}function P(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth1SecurityScheme"),r=$.createStubNode(n,null,e);return r}function L(e){var t=J.getUniverse("RAML10"),n=t.type("PassThroughSecurityScheme"),r=$.createStubNode(n,null,e);return r}function O(e){var t=J.getUniverse("RAML10"),n=t.type("BasicSecurityScheme"),r=$.createStubNode(n,null,e);return r}function D(e){var t=J.getUniverse("RAML10"),n=t.type("DigestSecurityScheme"),r=$.createStubNode(n,null,e);return r}function U(e){var t=J.getUniverse("RAML10"),n=t.type("CustomSecurityScheme"),r=$.createStubNode(n,null,e);return r}function x(e){var t=J.getUniverse("RAML10"),n=t.type("Method"),r=$.createStubNode(n,null,e);return r}function k(e){var t=J.getUniverse("RAML10"),n=t.type("ResourceType"),r=$.createStubNode(n,null,e);return r}function F(e){var t=J.getUniverse("RAML10"),n=t.type("ResourceBase"),r=$.createStubNode(n,null,e);return r}function B(e){var t=J.getUniverse("RAML10"),n=t.type("Resource"),r=$.createStubNode(n,null,e);return r}function V(e){var t=J.getUniverse("RAML10"),n=t.type("DocumentationItem"),r=$.createStubNode(n,null,e);return r}function K(e){var t=J.getUniverse("RAML10"),n=t.type("Library"),r=$.createStubNode(n,null,e);return r}function j(e){var t=J.getUniverse("RAML10"),n=t.type("Overlay"),r=$.createStubNode(n,null,e);return r}function W(e){var t=J.getUniverse("RAML10"),n=t.type("Extension"),r=$.createStubNode(n,null,e);return r}function H(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function Y(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function q(e,t,n){return Z.loadApiAsync(e,t,n)}function G(e,t,n){return Z.loadRAMLAsync(e,t,n)}function X(e){return Z.getLanguageElementByRuntimeType(e)}var z=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var $=n(3),J=n(56),Q=n(219),Z=n(1),ee=n(249),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return z(t,e),t.prototype.annotations=function(){return e.prototype.attributes.call(this,"annotations",function(e){return new Pt(e)})},t.prototype.wrapperClassName=function(){return"AnnotableImpl"},t.prototype.kind=function(){return"Annotable"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat("Annotable")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat("RAML10.AnnotableImpl")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&"function"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t0?i[0]:null})}Object.defineProperty(t,"__esModule",{value:!0});var T=n(5),S=n(6),N=n(8),I=n(274),b=n(21),R=n(16),M=n(248),C=n(55),w=n(275),P=n(212),L=n(15),O=n(276),D=n(279),U=n(204),x=n(217),k=n(224),F=n(19),B=n(207),V=b.YAMLException;t.Kind={SCALAR:b.Kind.SCALAR};var K=function(){function e(e){this.text="",this.indent=e}return e.prototype.isLastNL=function(){return this.text.length>0&&"\n"==this.text[this.text.length-1]},e.prototype.addWithIndent=function(e,t){this.isLastNL()&&(this.text+=M.indent(e),this.text+=this.indent),this.text+=t},e.prototype.addChar=function(e){this.isLastNL()&&(this.text+=this.indent),this.text+=e},e.prototype.append=function(e){for(var t=0;t300&&a<400){var o=n.getResponseHeader("location");if(o)return e.url=o,this.execute(e,!1)}var s={status:a,statusText:n.statusText,headers:n.getAllResponseHeaders().split("\n").map(function(e){var t=e.indexOf(":");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}};return s},e.prototype.appendParams=function(e,t){var n=e.queryString&&e.queryString.length>0;if(n){t+="?";var r=[];n&&(r=r.concat(e.queryString.map(function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}))),t+=r.join("&")}return t},e.prototype.log=function(e,t){},e.prototype.executeAsync=function(e,t){void 0===t&&(t=!0);var n=r(),i=e.url;t&&(i=this.appendParams(e,e.url));var a=this;return new Promise(function(t,r){n.open(e.method,i,!0),n.onload=function(){var e=n.status,r={status:e,statusText:n.statusText,headers:n.getAllResponseHeaders().split("\n").map(function(e){var t=e.indexOf(":");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}};t(r)},n.onerror=function(){r(new V(B.NETWORK_ERROR.message))},a.doRequest(e,n)})},e.prototype.doRequest=function(e,t){if(e.headers&&e.headers.forEach(function(e){return t.setRequestHeader(e.name,e.value)}),e.postData)if(e.postData.params){var n=e.postData.params.map(function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}).join("&");t.send(n)}else t.send(e.postData.text);else t.send()},e}();t.SimpleExecutor=q;var G=function(){function e(){this.executor=new q; +}return e.prototype.getResource=function(e){if("undefined"!=typeof atom&&null!=atom){var t=P.get(e);if(t)return t;P.addNotify(e);try{var n={content:""};return this.getResourceAsync(e).then(function(t){try{t.errorMessage?P.set(e,{content:null,errorMessage:null}):(t.errorMessage=null,P.set(e,t))}finally{n.callback&&n.callback(P.get(e)),P.removeNotity(e)}},function(t){P.set(e,{content:null,errorMessage:null}),n.callback&&n.callback(P.get(e)),P.removeNotity(e)}),n}catch(e){console.log("Error"),console.log(e)}}var r=this.executor.execute({method:"get",url:e});if(!r)throw new V(F.applyTemplate(B.UNABLE_TO_EXECUTE_GET,{url:e}));var i=this.toResponse(r,e);return i},e.prototype.getResourceAsync=function(e){var t=this;return this.executor.executeAsync({method:"get",url:e}).then(function(n){if(!n)return Promise.reject(new V(F.applyTemplate(B.UNABLE_TO_EXECUTE_GET,{url:e})));var r=t.toResponse(n,e);return r},function(t){return Promise.reject(F.applyTemplate(B.UNABLE_TO_EXECUTE_GET,{url:e}))})},e.prototype.toResponse=function(e,t){var n=null;e.status>=400&&(n="GET "+t+"\nreturned error: "+e.status,e.statusText&&(n+=" "+e.statusText));var r=null;e.content&&e.content.text&&(r=e.content.text);var i={content:r,errorMessage:n};return i},e}();t.HTTPResolverImpl=G;var X=function(){function e(){}return e.prototype.content=function(e){if("string"!=typeof e&&(e=""+e),!I.existsSync(e))return null;try{return I.readFileSync(e).toString()}catch(e){return null}},e.prototype.list=function(e){return I.readdirSync(e)},e.prototype.contentAsync=function(e){return new Promise(function(t,n){I.readFile(e,function(e,r){if(null!=e)return n(e);var i=r.toString();t(i)})})},e.prototype.listAsync=function(e){return new Promise(function(t,n){I.readdir(e,function(e,t){return null!=e?Promise.reject(e):void n(t)})})},e}();t.FSResolverImpl=X;var z=function(e,t,n){if(t&&(t.startPosition>=e&&(t.startPosition+=n),t.endPosition>e&&(t.endPosition+=n),t.kind==b.Kind.MAPPING)){var r=t;z(e,r.key,n),z(e,r.value,n)}},$=function(e,t){for(var n="",r=e.start()-1;r>0;){var i=t[r];if(" "!=i&&"-"!=i)break;n=" "+n,r--}return n},J=function(){function e(e,t,n){this.rootPath=e,this.resolver=t,this._httpResolver=n,this.listeners=[],this.tlisteners=[],this.pathToUnit={},this.failedUnits={},this._fsEnabled=!0,this._namespaceResolver=new k.NamespaceResolver,null==this.resolver?this.resolver=new X:this._fsEnabled=!1,null==this._httpResolver&&(this._httpResolver=new G)}return e.prototype.getMainUnit=function(){return this.mainUnitPath?this.unit(this.mainUnitPath,!0):null},e.prototype.getRootPath=function(){return this.rootPath},e.prototype.getMainUnitPath=function(){return this.mainUnitPath},e.prototype.setMainUnitPath=function(e){this.mainUnitPath=e},e.prototype.setFSResolver=function(e){this.resolver=e},e.prototype.setHTTPResolver=function(e){this._httpResolver=e},e.prototype.fsEnabled=function(){return this._fsEnabled},e.prototype.cloneWithResolver=function(t,n){void 0===n&&(n=null);var r=new e(this.rootPath,t,n?n:this._httpResolver);for(var i in this.pathToUnit)r.pathToUnit[i]=this.pathToUnit[i].cloneToProject(r);return r},e.prototype.setCachedUnitContent=function(e,t,n){void 0===n&&(n=!0);var r=e,i=T.toAbsolutePath(this.rootPath,e),a=new j(r,t,n,this,i);return this.pathToUnit[i]=a,a},e.prototype.resolveAsync=function(e,t){var n=this;if(!t)return Promise.reject(new V(B.UNIT_PATH_IS_NULL.message));var r=O.getIncludeReference(t),i=t;r&&(t=r.getIncludePath());var a=T.buildPath(t,e,this.rootPath);if(r){var o,s=T.toAbsolutePath(S.dirname(T.toAbsolutePath(this.rootPath,e)),r.encodedName());this.pathToUnit[a]?Promise.resolve(o).then(function(e){return n.pathToUnit[s]=new j(r.encodedName(),O.resolveContents(i,n.pathToUnit[a].contents()),!1,n,s),n.pathToUnit[s]}):this.unitAsync(a,!0).then(function(e){return n.pathToUnit[a]=e,n.pathToUnit[s]=new j(r.encodedName(),O.resolveContents(i,n.pathToUnit[a].contents()),!1,n,s),n.pathToUnit[s]})}return this.unitAsync(a,!0)},e.prototype.resolve=function(e,t){if(!t)return null;t=t.replace(/\\/g,"/");var n=O.getIncludeReference(t),r=t;n&&(t=n.getIncludePath());var i=T.buildPath(t,e,this.rootPath);if(n){this.pathToUnit[i]||(this.pathToUnit[i]=this.unit(i,!0));var a=this.pathToUnit[i],o=T.toAbsolutePath(S.dirname(T.toAbsolutePath(this.rootPath,e)),n.encodedName());return this.pathToUnit[o]?this.pathToUnit[o]:(this.pathToUnit[o]=new j(n.encodedName(),O.resolveContents(r,a&&a.contents()),!1,this,o),this.pathToUnit[o])}return this.unit(i,!0)},e.prototype.units=function(){var e=this;if(!this.resolver.list)throw new V(B.FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER.message);var t=this.resolver.list(this.rootPath).filter(function(e){return".raml"==S.extname(e)});return t.map(function(t){return e.unit(t)}).filter(function(e){return e.isTopLevel()})},e.prototype.unitsAsync=function(){var e=this;return this.resolver.listAsync?this.resolver.listAsync(this.rootPath).then(function(t){var n=t.filter(function(e){return".raml"==S.extname(e)}).map(function(t){return e.unitAsync(t).then(function(e){return e.isTopLevel()?e:null},function(e){return null})});return Promise.all(n).then(function(e){return e.filter(function(e){return null!=e})})}):Promise.reject(new V(B.FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER.message))},e.prototype.lexerErrors=function(){var e=[];return this.units().forEach(function(t){e=e.concat(t.lexerErrors())}),e},e.prototype.deleteUnit=function(e,t){void 0===t&&(t=!1);var n=null;n=T.isWebPath(e)?e:t?e:T.toAbsolutePath(this.rootPath,e),delete this.pathToUnit[n]},e.prototype.unit=function(e,t){if(void 0===t&&(t=!1),t||T.isWebPath(e)){if(null!=this.failedUnits[e]&&!this.failedUnits[e].inner)return null}else{var n=T.toAbsolutePath(this.rootPath,e);if(this.failedUnits[n]&&!this.failedUnits[e].inner)return null}var r,i=null,a=e;if(T.isWebPath(e)){if(this.pathToUnit[a])return this.pathToUnit[a];if(this._httpResolver){if(r=this._httpResolver.getResource(e),r&&r.errorMessage)throw new V(r.errorMessage);i=r?r.content:null}else r=(new G).getResource(a),i=r?r.content:null}else{"/"!=e.charAt(0)||t||(e=e.substr(1));var a=T.toAbsolutePath(this.rootPath,e);if(this.pathToUnit[a])return this.pathToUnit[a];if(T.isWebPath(a))if(this._httpResolver){var o=this._httpResolver.getResource(a);if(o&&o.errorMessage)throw new V(o.errorMessage);i=o?o.content:null}else{var s=(new G).getResource(a);i=s?s.content:null}else i=this.resolver.content(a)}if(null==i)return null;var u=L.stringStartsWith(i,"#%RAML"),l=T.isWebPath(this.rootPath)==T.isWebPath(a)?S.relative(this.rootPath,a):a,p=new j(l,i,u,this,a);return this.pathToUnit[a]=p,r&&(r.callback=function(e){p.updateContent(e&&e.content)}),p},e.prototype.unitAsync=function(e,t){var n=this;void 0===t&&(t=!1);var r=null,i=e;if(T.isWebPath(e)){if(this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new V(e.errorMessage)):e.content})}else r=(new G).getResourceAsync(i).then(function(e){return e.errorMessage?Promise.reject(e.errorMessage):e.content})}else{if("/"!=e.charAt(0)||t||(e=e.substr(1)),i=t?e:T.toAbsolutePath(this.rootPath,e),this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(T.isWebPath(i))if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new V(e.errorMessage)):e.content})}else r=(new G).getResourceAsync(i).then(function(e){return e.errorMessage?Promise.reject(new V(e.errorMessage)):e.content});else r=this.resolver.contentAsync(i)}if(null==r)return Promise.resolve(null);var o=T.isWebPath(this.rootPath)==T.isWebPath(i)?S.relative(this.rootPath,i):i;return r.then(function(e){if(null==e)return Promise.reject(new V(F.applyTemplate(B.CAN_NOT_RESOLVE,{path:i})));var t=L.stringStartsWith(e,"#%RAML"),r=new j(o,e,t,n,i);return n.pathToUnit[i]=r,r},function(e){return"object"==typeof e&&e instanceof V?Promise.reject(e):Promise.reject(new V(e.toString()))}).then(function(e){return e.isRAMLUnit()?e:D.isScheme(e.contents())?D.startDownloadingReferencesAsync(e.contents(),e):e})},e.prototype.visualizeNewlines=function(e){for(var t="",n=0;n1&&r[1].trim().length>0){var i=s(r[1]);return n+i}return n+" "},e.prototype.startIndent=function(e){e.unit().contents();if(e==e.root())return"";var t=a(e.dump());if(t.length>0){console.log("FIRST: "+t[0]);var n=s(t[0]);return n+" "}return""},e.prototype.canWriteInOneLine=function(e){return!1},e.prototype.isOneLine=function(e){return e.text().indexOf("\n")<0},e.prototype.recalcPositionsUp=function(e){for(var t=e;t;)t.recalcEndPositionFromChilds(),t=t.parent()},e.prototype.add2=function(e,t,n,r,i){void 0===i&&(i=!1);var a=e.unit(),o=(e.root(),null);if(r&&(Q.isInstance(r)&&(o=r),ee.isInstance(r)&&(o=r.point)),e.isValueInclude()){var s=e.children();if(0==s.length)throw new V(B.NOT_IMPLEMENTED_INSERT_INTO_EMPTY_REF.message);var u=s[0].parent();return void this.add2(u,t,n,o,i)}var l=(new M.TextRange(a.contents(),t.start(),t.end()),new M.TextRange(a.contents(),e.start(),e.end()),e.unit().contents());e.valueKind()==b.Kind.SEQ&&(e=h(e.valueAsSeq(),e,e.unit()));var i=this.isJson(e),p=i?"":this.indent(e.isSeq()?e.parent():e),c=p,f=p.length,d=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value);n=n,n&&(i||d&&(c+=" ",f+=2));var m=new K(c);t.markupNode(m,t._actualNode(),0,i);var y=m.text;if(n){var v=M.trimEnd(y),g=y.length-v.length;if(g>0){var A=y.length;y=y.substring(0,A-g),t.shiftNodes(A-g,-g)}}n&&!i?(t.highLevelNode(),e.isMapping(),y=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value)?p+"- "+y:p+y):y=p+y;var E=e.end();if(o)o!=e?E=o.end():i&&n||(E=e.keyEnd()+1,E=new M.TextRange(l,E,E).extendAnyUntilNewLines().endpos());else if(i&&n){var _=e.asSeq();_&&(E=_.items.length>0?_.items[_.items.length-1].endPosition:_.endPosition-1)}else if(r&&ee.isInstance(r)){var T=r;T.type==Z.START&&(E=e.keyEnd()+1,E=new M.TextRange(l,E,E).extendAnyUntilNewLines().endpos())}var S=new M.TextRange(l,0,E);if(E=S.extendToNewlines().reduceSpaces().endpos(),i&&e.isSeq()){var _=e.asSeq();_.items.length>0&&(y=", "+y,f+=2)}else E>0&&"\n"!=l[E-1]&&(y="\n"+y,f++);var N=0;n&&!i&&(y+="\n",N++);var I=l.substring(0,E)+y+l.substring(E,l.length),R=a;if(R.updateContentSafe(I),this.executeReplace(new M.TextRange(l,E,E),y,R),e.root().shiftNodes(E,f+(t.end()-t.start())+N),o){for(var s=e.children(),C=-1,w=0;w=0?e.addChild(t,C+1):e.addChild(t)}else e.addChild(t);t.shiftNodes(0,E+f),this.recalcPositionsUp(e),t.setUnit(e.unit()),t.visit(function(t){var n=t;return n.setUnit(e.unit()),!0})},e.prototype.isJsonMap=function(e){if(!e.isMap())return!1;var t=e.text().trim();return t.length>=2&&"{"==t[0]&&"}"==t[t.length-1]},e.prototype.isJsonSeq=function(e){if(!e.isSeq())return!1;var t=e.text().trim();return t.length>=2&&"["==t[0]&&"]"==t[t.length-1]},e.prototype.isJson=function(e){return this.isJsonMap(e)||this.isJsonSeq(e)},e.prototype.remove=function(e,t,n){var r=n.parent();if(n._oldText=n.dump(),this.isOneLine(n)&&n.isMapping()&&n.parent().isMap()){var i=n.parent();if(1==i.asMap().mappings.length&&null!=i.parent())return void this.remove(e,i.parent(),i)}if(this.isOneLine(n)&&n.isScalar()&&n.parent().isSeq()){var a=n.parent(),o=a.asSeq();if(1==o.items.length)return void this.remove(e,a.parent(),a)}if(t.isMapping()&&n.isSeq()){var s=t.parent();return void this.remove(e,s,t)}var u=new M.TextRange(e.contents(),n.start(),n.end()),l=(new M.TextRange(e.contents(),t.start(),t.end()),new M.TextRange(e.contents(),r.start(),r.end()),u.startpos());if(t.isSeq()){var p=n.isSeq()?n:n.parentOfKind(b.Kind.SEQ);u=p&&this.isJson(p)?u.extendSpaces().extendCharIfAny(",").extendSpaces():u.extendToStartOfLine().extendAnyUntilNewLines().extendToNewlines()}t.isMap()&&(u=u.trimEnd().extendAnyUntilNewLines().extendToNewlines(),u=u.extendToStartOfLine().extendUntilNewlinesBack()),t.kind()==b.Kind.MAPPING&&(this.isJson(n)&&this.isOneLine(n)||(u=u.extendSpacesUntilNewLines(),u=u.extendToNewlines(),u=u.extendToStartOfLine().extendUntilNewlinesBack())),n.isSeq()&&(u=u.reduceSpaces());var c=e;c.updateContentSafe(u.remove()),this.executeReplace(u,"",c),n.parent().removeChild(n);var f=-u.len();t.root().shiftNodes(l,f),this.recalcPositionsUp(t)},e.prototype.changeKey=function(e,t,n){var r=new M.TextRange(t.unit().contents(),t.keyStart(),t.keyEnd());if(t.kind()==b.Kind.MAPPING){var i=t._actualNode().key;i.value=n,i.endPosition=i.startPosition+n.length}var a=e;this.executeReplace(r,n,a);var o=n.length-r.len();t.root().shiftNodes(r.startpos(),o,t),this.recalcPositionsUp(t)},e.prototype.executeReplace=function(e,t,n){var r=new T.TextChangeCommand(e.startpos(),e.endpos()-e.startpos(),t,n);n.project();try{this.tlisteners.forEach(function(e){return e(r)})}catch(e){return!1}var i=e.replace(t);return n.updateContentSafe(i),!0},e.prototype.changeValue=function(e,t,n){var r,i=new M.TextRange(t.unit().contents(),t.start(),t.end()),a=0,o=0,s=null,u=null;if(t.kind()==b.Kind.SCALAR){if("string"!=typeof n)throw new V(B.NOT_IMPLEMENTED.message);t.asScalar().value=n,r=n}else if(t.kind()==b.Kind.MAPPING){if(u=t.asMapping(),t.isValueInclude()){var l=t.valueAsInclude(),p=l.value,f=p,h=t.unit().resolve(f);if(null==h)return void console.log(F.applyTemplate(B.ATTR_SETVALUE_NOT_RESOLVE,{path:f}));if(h.isRAMLUnit())return;return void(O.getIncludeReference(p)||h.updateContent(n))}if(i=u.value?i.withStart(t.valueStart()).withEnd(t.valueEnd()):i.withStart(t.keyEnd()+1).withEnd(t.keyEnd()+1),i=i.reduceNewlinesEnd(),null==n)r="",u.value=null;else if("string"==typeof n||null==n){var d=n,m=this.indent(t);if(d&&M.isMultiLine(d)&&(d=""+M.makeMutiLine(d,m.length/2)),r=d,u.value){if(u.value.kind==b.Kind.SEQ){console.log("seq value");u.value.items[0];throw"assign value!!!"}if(u.value.kind==b.Kind.SCALAR){var y=u.value,v=y.value||"";y.value=d,u.value.endPosition=u.value.startPosition+d.length,u.endPosition=u.value.endPosition,o+=d.length-v.length}}else if(console.log("no value"),u.value=b.newScalar(d),u.value.startPosition=t.keyEnd()+1,u.value.endPosition=u.value.startPosition+d.length,u.endPosition=u.value.endPosition,e.contents().length>t.keyEnd()+1){var g=t.keyEnd()+1;":"==e.contents()[g-1]&&(r=" "+r,u.value.startPosition++,u.value.endPosition++,u.endPosition++,o++)}}else{var A=n;if(A.isMapping())n=c([A.asMapping()]),A=n;else if(!A.isMap())throw new V(B.ONLY_MAP_NODES_ALLOWED.message);var E=new K("");A.markupNode(E,A._actualNode(),0,!0),r=""+E.text,A.shiftNodes(0,i.startpos()+o),s=A}}else console.log(F.applyTemplate(B.UNSUPPORTED_CHANGE_VALUE_CASE,{name:t.kindName()}));var _=e;this.executeReplace(i,r,_);var T=r.length-i.len();t.root().shiftNodes(i.endpos()+a,T,t),s&&(u.value=s._actualNode()),this.recalcPositionsUp(t)},e.prototype.initWithRoot=function(e,t){var n=e.end();t.markup(!1),t._actualNode().startPosition=n,t._actualNode().endPosition=n,t.setUnit(e.unit())},e.prototype.execute=function(e){var t=this;e.commands.forEach(function(e){switch(e.kind){case T.CommandKind.CHANGE_VALUE:var n=e.target,r=n.value();r||(r="");var i=e.value;if(console.log("set value: "+typeof r+" ==> "+typeof i),"string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r||"string"!=typeof i)if("string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r||"string"==typeof i)if("string"!=typeof r&&"string"==typeof i){var a=e.value;if(r.kind()!=b.Kind.MAPPING)throw new V(F.applyTemplate(B.UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION,{curval:r,newval:i}));M.isMultiLine(a)?(n.children().forEach(function(e){t.remove(n.unit(),n,e)}),t.changeValue(n.unit(),n,a)):t.changeKey(n.unit(),r,a)}else{if("string"==typeof r||"string"==typeof i)throw new V(F.applyTemplate(B.UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION,{curval:r,newval:i}));var o=i;if(o.isMapping()&&(i=c([o.asMapping()])),r==i)break;var s=i;s.asMap();n.children().forEach(function(e){t.remove(n.unit(),n,e)}),s.children().forEach(function(e){}),t.changeValue(n.unit(),n,i)}else t.changeValue(n.unit(),n,i);else r!=i&&t.changeValue(n.unit(),n,i);return;case T.CommandKind.CHANGE_KEY:var n=e.target;return void t.changeKey(n.unit(),n,e.value);case T.CommandKind.ADD_CHILD:var n=e.target,u=e.value;return void t.add2(n,u,e.toSeq,e.insertionPoint);case T.CommandKind.REMOVE_CHILD:var l=e.target,s=e.value;return void t.remove(l.unit(),l,s);case T.CommandKind.INIT_RAML_FILE:var p=e.target,f=e.value;return void t.initWithRoot(p,f);default:return void console.log(F.applyTemplate(B.UNSUPPORTED_COMMAND,{name:T.CommandKind[e.kind]}))}})},e.prototype.replaceYamlNode=function(e,t,n,r,i){var a=b.load(t,{ignoreDuplicateKeys:!0});this.updatePositions(e.start(),a),e.root().shiftNodes(n,r);var o=e.parent(),s=e._actualNode(),u=s.parent;if(a.parent=u,o&&o.kind()==b.Kind.MAP){var l=o._actualNode();l.mappings=l.mappings.map(function(e){return e!=s?e:a})}e.updateFrom(a),this.recalcPositionsUp(e)},e.prototype.executeTextChange2=function(e){var t=e.unit,n=t.contents(),r=e.target;if(r){var i=n.substring(r.start(),r.end());n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);var a=i.substr(0,e.offset-r.start())+e.text+i.substr(e.offset-r.start()+e.replacementLength);if(t.updateContentSafe(n),e.offset>r.start())try{var o=e.text.length-e.replacementLength,s=e.offset;r.unit().project().replaceYamlNode(r,a,s,o,e.unit)}catch(e){console.log("New node contents (causes error below): \n"+a),console.log("Reparse error: "+e.stack)}}else n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);t.updateContent(n),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})},e.prototype.executeTextChange=function(e){(new Date).getTime();try{var t=e.unit.contents(),n=e.target;null==n&&(n=this.findNode(e.unit.ast(),e.offset,e.offset+e.replacementLength));var r=e.unit;if(n){var a=t.substring(n.start(),n.end()),o=t;t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);var s=a.substr(0,e.offset-n.start())+e.text+a.substr(e.offset-n.start()+e.replacementLength);r.updateContentSafe(t);u(o,e);if(e.offset>n.start())try{var l=b.load(s,{ignoreDuplicateKeys:!0});this.updatePositions(n.start(),l);var p=e.text.length-e.replacementLength;if(e.unit.ast().shiftNodes(e.offset,p),null!=l&&l.kind==b.Kind.MAP){var c=l.mappings[0],f=n._actualNode(),h=f.parent,d=new T.ASTDelta,m=e.unit;if(d.commands=[new T.ASTChangeCommand(T.CommandKind.CHANGE_VALUE,new Q(i(f),m,null,null,null),new Q(c,m,null,null,null),0)],h&&h.kind==b.Kind.MAP){var y=h;y.mappings=y.mappings.map(function(e){return e!=f?e:c})}return c.parent=h,this.recalcPositionsUp(n),n.updateFrom(c),this.listeners.forEach(function(e){e(d)}),void this.tlisteners.forEach(function(t){t(e)})}}catch(e){console.log(F.applyTemplate(B.NEW_NODE_CONTENTS_ERROR_BELOW,{content:s})),console.log(F.applyTemplate(B.REPARSE_ERROR,{content:e.stack}))}}else t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);(new Date).getTime(); //!find node in scope -r.updateContent(t),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})}finally{(new Date).getTime()}},e.prototype.updatePositions=function(e,t){var n=this;if(null!=t)switch(t.startPosition==-1?t.startPosition=e:t.startPosition=e+t.startPosition,t.endPosition=e+t.endPosition,t.kind){case b.Kind.MAP:var r=t;r.mappings.forEach(function(t){return n.updatePositions(e,t)});break;case b.Kind.MAPPING:var i=t;this.updatePositions(e,i.key),this.updatePositions(e,i.value);break;case b.Kind.SCALAR:break;case b.Kind.SEQ:var a=t;a.items.forEach(function(t){return n.updatePositions(e,t)})}},e.prototype.findNode=function(e,t,n){var r=this;if(null==e)return null;var i=e;if(e.start()<=t&&e.end()>=n){var a=e;return i.directChildren().forEach(function(e){var i=r.findNode(e,t,n);i&&(a=i)}),a}return null},e.prototype.addTextChangeListener=function(e){this.tlisteners.push(e)},e.prototype.removeTextChangeListener=function(e){this.tlisteners=this.tlisteners.filter(function(t){return t!=e})},e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){this.listeners=this.listeners.filter(function(t){return t!=e})},e.prototype.namespaceResolver=function(){return this._namespaceResolver},e}();t.Project=J;var Q=function(){function e(e,t,n,r,i,a,o){void 0===a&&(a=!1),void 0===o&&(o=!1),this._node=e,this._unit=t,this._parent=n,this._anchor=r,this._include=i,this.cacheChildren=a,this._includesContents=o,this._errors=[]}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&M.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.actual=function(){return this._node},e.prototype.yamlNode=function(){return this._node},e.prototype.includesContents=function(){return this._includesContents},e.prototype.setIncludesContents=function(e){this._includesContents=e},e.prototype.gatherIncludes=function(t,n,r,i){var a=this;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=!0),null!=this._node){var o=this._node.kind;if(o!=b.Kind.SCALAR)if(o==b.Kind.MAP){var s=this._node;1!=s.mappings.length||i?s.mappings.map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)}):new e(s.mappings[0].value,this._unit,this,n,r,this.cacheChildren).gatherIncludes(t)}else if(o==b.Kind.MAPPING){var u=this._node;null==u.value||new e(u.value,this._unit,this,r?r:this._anchor,n?n:this._include,this.cacheChildren).gatherIncludes(t)}else if(o==b.Kind.SEQ){var l=this._node;l.items.filter(function(e){return null!=e}).map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)})}else o==b.Kind.INCLUDE_REF&&this._unit&&t.push(this);else if(D.isScheme(this._node.value)){var p=D.getReferences(this._node.value,this.unit());p.forEach(function(n){var r=b.newScalar(n);r.kind=b.Kind.INCLUDE_REF;var i=new e(r,a.unit(),null,null,null);t.push(i)})}}},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.start=function(){return this._node.startPosition},e.prototype.errors=function(){return this._errors},e.prototype.addIncludeError=function(e){if(!M.find(this._errors,function(t){return t.message==e.message})){var t=this._node;t.includeErrors||(t.includeErrors=[]),M.find(t.includeErrors,function(t){return t.message==e.message})||(this._errors.push(e),t.includeErrors.push(e))}},e.prototype.parent=function(){return this._parent},e.prototype.recalcEndPositionFromChilds=function(){var e=(this.children(),this.children()[0]),t=this.children()[this.children().length-1];if(this.isMapping()){var n=this.asMapping();if(n.value)if(n.value.kind==b.Kind.MAP){var r=n.value;r.startPosition<0&&e&&(r.startPosition=e.start()),t&&(this._node.endPosition=t._node.endPosition),this._node.endPosition=Math.max(this._node.endPosition,n.value.endPosition)}else if(n.value.kind==b.Kind.SEQ){var i=n.value;if(i.startPosition<0&&i.items.length>0){var a=i.items[0].startPosition,o=new R.TextRange(this.unit().contents(),a,a);o=o.extendSpacesBack().extendCharIfAnyBack("-"),i.startPosition=o.startpos()}if(i.items.length>0){var s=i.items[i.items.length-1];this._node.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition),i.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition)}}else n.value.kind==b.Kind.SCALAR||t&&(this._node.endPosition=t._node.endPosition)}else t&&(this._node.endPosition=t._node.endPosition)},e.prototype.isValueLocal=function(){if(this._node.kind==b.Kind.MAPPING){var e=this._node.value.kind;return e!=b.Kind.INCLUDE_REF&&e!=b.Kind.ANCHOR_REF}return!0},e.prototype.keyStart=function(){return this._node.kind==b.Kind.MAPPING?this._node.key.startPosition:-1},e.prototype.keyEnd=function(){return this._node.kind==b.Kind.MAPPING?this._node.key.endPosition:-1},e.prototype.valueStart=function(){if(this._node.kind==b.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.startPosition:e.endPosition}return this._node.kind==b.Kind.SCALAR?this.start():-1},e.prototype.valueEnd=function(){if(this._node.kind==b.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.endPosition:e.endPosition}return this._node.kind==b.Kind.SCALAR?this.end():-1},e.prototype.end=function(){return this._node.endPosition},e.prototype.dump=function(){if(this._oldText)return this._oldText;if(this._unit&&this._node.startPosition>0&&this._node.endPosition>0){var e=this._unit.contents().substring(this._node.startPosition,this._node.endPosition);return e=o(e,$(this,this._unit.contents()))}return b.dump(this.dumpToObject(),{})},e.prototype.dumpToObject=function(e){return void 0===e&&(e=!1),this.dumpNode(this._node,e)},e.prototype.dumpNode=function(e,t){var n=this;if(void 0===t&&(t=!1),!e)return null;if(e.kind==b.Kind.INCLUDE_REF){if(this._unit){var r=e,i=r.value,a=null;try{a=this._unit.resolve(i)}catch(e){}if(null==a)return null;if(a.isRAMLUnit()&&this.canInclude(a)){var o=this.unit(),s=a;s.addIncludedBy(o.absolutePath()),o.getIncludedByPaths().forEach(function(e){s.addIncludedBy(e)});var u=a.ast();if(u)return u.dumpToObject(t)}else if(this.canInclude(a))return a.contents()}return null}if(e.kind==b.Kind.SEQ){var p=e,c=[];return p.items.forEach(function(e){return c.push(n.dumpNode(e,t))}),c}if(e.kind==b.Kind.ANCHOR_REF){var f=e;return this.dumpNode(f.value,t)}if(e.kind==b.Kind.MAPPING){var h=e,d={},m=h.value,y=this.dumpNode(m,t);return d[""+this.dumpNode(h.key,t)]=y,d}if(e.kind==b.Kind.SCALAR){var r=e,v=r.value;return r.plainScalar&&(v=l(v)),v}if(e.kind==b.Kind.MAP){var g=e,A={};return g.mappings&&g.mappings.forEach(function(e){var r=n.dumpNode(e.value,t);null==r&&(r=t?"!$$$novalue":r),A[n.dumpNode(e.key,t)+""]=r}),A}},e.prototype.keyKind=function(){return this._node.key?this._node.key.kind:null},e.prototype._actualNode=function(){return this._node},e.prototype.execute=function(e){this.unit()?this.unit().project().execute(e):e.commands.forEach(function(e){switch(e.kind){case _.CommandKind.CHANGE_VALUE:var t=e.target,n=e.value,r=t._actualNode();t.start();return void(r.kind==b.Kind.MAPPING&&(r.value=b.newScalar(""+n)));case _.CommandKind.CHANGE_KEY:var t=e.target,n=e.value,r=t._actualNode();if(r.kind==b.Kind.MAPPING){var i=r.key;i.value=n}return}})},e.prototype.updateFrom=function(e){this._node=e},e.prototype.isAnnotatedScalar=function(){if(!this.unit())return!1;for(var e,t=this;!e&&t;)e=t.highLevelNode(),t=t.parent();if(e){var n=void 0;if(e.isElement())n=e.asElement().definition();else{var r=e.property();n=r&&(r.domain()||r.range())}if(n){var i=n.universe().version();if("RAML08"==i)return!1}}var a;if(this.kind()==b.Kind.MAPPING&&this.valueKind()==b.Kind.MAP?a=this._node.value.mappings:null==this.key()&&this.kind()==b.Kind.MAP&&(a=this._node.mappings),a){var o=a.length>0;return a.forEach(function(e){"value"!==e.key.value&&(e.key.value&&"("==e.key.value.charAt(0)&&")"==e.key.value.charAt(e.key.value.length-1)||(o=!1))}),o}return!1},e.prototype.value=function(t){if(!this._node)return"";if(this._node.kind==b.Kind.SCALAR){if("~"===this._node.value&&null===this._node.valueObject)return null;if(!t&&""+this._node.valueObject===this._node.value)return this._node.valueObject;var n=null;return n=this._node.hasOwnProperty("valueObject")&&null==this._node.valueObject?this._node.valueObject:this._node.value,t||this._node.plainScalar&&(n=l(n)),n}if(this._node.kind==b.Kind.ANCHOR_REF){var r=this._node;return new e(r.value,this._unit,this,null,null).value(t)}if(this._node.kind==b.Kind.MAPPING){var i=this._node;if(null==i.value)return null;if(this.isAnnotatedScalar())for(var a=new e(i.value,this._unit,this,null,null),o=a.children(),s=0;s=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else if(this.isMapping()){var i=this.asMapping(),a=i.value;if(!i.value&&n.isMap())return void(i.value=n._actualNode());if(i.value&&i.value.kind==b.Kind.SCALAR&&(i.value=null,a=null),a||(a=n.isScalar()||n.highLevelNode()&&n.highLevelNode().property().getAdapter(w.RAMLPropertyParserService).isEmbedMap()?b.newSeq():b.newMap(),i.value=a),a.kind==b.Kind.MAP){var r=a;null!=r.mappings&&void 0!=r.mappings||(r.mappings=[]),n.isScalar(),t>=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else{if(a.kind!=b.Kind.SEQ)throw new V(F.applyTemplate(B.INSERT_INTO_MAPPING_VALUE_NOT_SUPPORTED,{value:b.Kind[i.value.kind]}));var o=a;t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}}else{if(!this.isSeq())throw new V(F.applyTemplate(B.INSERT_INTO_NOT_SUPPORTED,{name:this.kindName()}));var o=this.asSeq();t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}},e.prototype.removeChild=function(e){this._oldText=null;var t,n,r=e;if(this.kind()==b.Kind.SEQ){var i=this.asSeq();t=r._node,n=i.items.indexOf(t),n>-1&&i.items.splice(n,1)}else if(this.kind()==b.Kind.MAP){var a=this.asMap();t=r.asMapping(),n=a.mappings.indexOf(t),n>-1&&a.mappings.splice(n,1)}else{if(this.kind()!=b.Kind.MAPPING)throw new V(F.applyTemplate(B.DELETE_FROM_NOT_SUPPORTED,{name:b.Kind[this.kind()]}));var o=this.asMapping();if(r._actualNode()==o.value)o.value=null;else{var a=o.value;t=r.asMapping(),a&&a.mappings&&(n=a.mappings.indexOf(t),n>-1&&a.mappings.splice(n,1))}}},e.prototype.hasInnerIncludeError=function(){return this.innerIncludeErrors},e.prototype.includeErrors=function(){if(this._node.kind==b.Kind.MAPPING){var t=this._node;if(null==t.value)return[];var n=new e(t.value,this._unit,this,this._anchor,this._include),r=n.includeErrors();return this.innerIncludeErrors=n.hasInnerIncludeError(),r}var i=[];if(this._node.kind==b.Kind.INCLUDE_REF){var t=this._node;if(null==t.value)return[];var a=this.includePath(),o=null;try{o=this._unit.resolve(a)}catch(e){this.innerIncludeErrors=e.inner;var s=F.applyTemplate(B.CAN_NOT_RESOLVE_REASON,{path:a,reason:e.message});return i.push(s),i}var u=this._node.includeErrors;if(u&&u.length>0)return this.innerIncludeErrors=!0,i=u.map(function(e){return"object"==typeof e&&e instanceof V?e.message:e.toString()});if(null==o)return i.push(F.applyTemplate(B.CAN_NOT_RESOLVE,{path:a})),i;if(o.isRAMLUnit()){var l=o.ast();if(l)return[];i.push(F.applyTemplate(B.CAN_NOT_BE_PARSED,{path:a}))}}return i},e.prototype.joinMappingsWithFullIncludeAnchor=function(t,n,r){var i=this,a=M.find(t,function(e){return e.key&&e.value&&e.key.kind==b.Kind.SCALAR&&"<<"==e.key.value&&e.value.kind==b.Kind.ANCHOR_REF});if(!a)return t.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)});var o=M.filter(t,function(e){return!(e.key.kind==b.Kind.SCALAR&&"<<"==e.key.value&&e.value.kind==b.Kind.ANCHOR_REF)}),s=new e(a.value,this._unit,this,n,r,this.cacheChildren).children(null,null,!0),u=o.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)});return u.concat(s)},e.prototype.children=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),null==this._node)return[];if(this.cacheChildren&&this._children)return this._children;var a,o=this._node.kind;if(o==b.Kind.SCALAR)a=[];else if(o==b.Kind.MAP){var s=this._node;a=1!=s.mappings.length||r?this.joinMappingsWithFullIncludeAnchor(s.mappings,t,n):new e(s.mappings[0].value,this._unit,this,t,n,this.cacheChildren).children(null,null,!0)}else if(o==b.Kind.MAPPING){var u=this._node;if(null==u.value)a=[];else{var l=new e(u.value,this._unit,this,n?n:this._anchor,t?t:this._include,this.cacheChildren);a=l.children(),l.includesContents()&&this.setIncludesContents(!0)}}else if(o==b.Kind.SEQ){var p=this._node;a=p.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include,i.cacheChildren)})}else if(o==b.Kind.INCLUDE_REF){if(this._unit){var c=this.includePath(),f=null;try{f=this._unit.resolve(c)}catch(e){}if(null==f)a=[];else if(f.isRAMLUnit())if(this.canInclude(f)){var h=this.unit(),d=f;d.addIncludedBy(h.absolutePath()),h.getIncludedByPaths().forEach(function(e){d.addIncludedBy(e)});var m=f.ast();m&&(this.cacheChildren&&(m=v(m)),a=f.ast().children(this,null),this.setIncludesContents(!0))}else this.addIncludeError&&this.addIncludeError(new V(B.RECURSIVE_DEFINITION_EMPTY.message))}a||(a=[])}else{if(o!=b.Kind.ANCHOR_REF)throw new V(F.applyTemplate(B.SHOULD_NEVER_HAPPEN_KIND,{kind:b.Kind[this._node.kind]}));var y=this._node;a=new e(y.value,this._unit,this,null,null,this.cacheChildren).children()}return this.cacheChildren&&(this._children=a),a},e.prototype.canInclude=function(e){for(var t=this.includedFrom();null!=t;){if(t.unit().absolutePath()==e.absolutePath())return!1;t=t.includedFrom()}return!this.unit().includedByContains(e.absolutePath())},e.prototype.directChildren=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),this._node){switch(this._node.kind){case b.Kind.SCALAR:return[];case b.Kind.MAP:var a=this._node;return 1!=a.mappings.length||r?a.mappings.map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)}):new e(a.mappings[0].value,this._unit,this,t,n).directChildren(null,null,!0);case b.Kind.MAPPING:var o=this._node;return null==o.value?[]:new e(o.value,this._unit,this,n?n:this._anchor,t?t:this._include).directChildren();case b.Kind.SEQ:var s=this._node;return s.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)});case b.Kind.INCLUDE_REF:return[];case b.Kind.ANCHOR_REF:return[]}throw new V(F.applyTemplate(B.SHOULD_NEVER_HAPPEN_KIND,{kind:b.Kind[this._node.kind]}))}return[]},e.prototype.anchorId=function(){return this._node.anchorId},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this.valueKind()==b.Kind.INCLUDE_REF?this.unit().resolve(this._node.value.value):this.kind()==b.Kind.INCLUDE_REF?this.unit().resolve(this._node.value):this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.setUnit=function(e){this._unit=e},e.prototype.includePath=function(){var e=this.getIncludeString();return e?e:null},e.prototype.includeReference=function(){var e=this.getIncludeString();return e?O.getIncludeReference(e):null},e.prototype.getIncludeString=function(){if(!this._node)return null;if(this._node.kind==b.Kind.INCLUDE_REF){var t=this._node.value;return t}if(this._node.kind==b.Kind.MAPPING){var n=this._node;return null==n.value?null:new e(n.value,this._unit,this,null,null).getIncludeString()}if(this._node.kind==b.Kind.ANCHOR_REF){var r=this._node.value;return new e(r,this._unit,this,null,null).getIncludeString()}return null},e.prototype.anchoredFrom=function(){return this._anchor},e.prototype.includedFrom=function(){return this._include},e.prototype.kind=function(){return this._actualNode().kind},e.prototype.valueKind=function(){if(this._node.kind!=b.Kind.MAPPING)return null;var e=this._node;return e.value?e.value.kind:null},e.prototype.anchorValueKind=function(){if(this.valueKind()==b.Kind.ANCHOR_REF){var e=this._node.value;return e&&e.value&&e.value.kind}return null},e.prototype.resolvedValueKind=function(){var e=this.valueKind();if(e==b.Kind.ANCHOR_REF){var t=this.anchorValueKind();if(t==b.Kind.INCLUDE_REF){var n=this._node.value,r=n.value.value;return this.unitKind(r)}return t}if(e==b.Kind.INCLUDE_REF){var r=this.includePath();return this.unitKind(r)}return e},e.prototype.unitKind=function(e){var t;try{t=this._unit.resolve(e)}catch(e){return null}if(null==t)return b.Kind.SCALAR;if(t.isRAMLUnit()){var n=t.ast();if(n)return n.kind()}return b.Kind.SCALAR},e.prototype.valueKindName=function(){var e=this.valueKind();return void 0!=e?b.Kind[e]:null},e.prototype.kindName=function(){return b.Kind[this.kind()]},e.prototype.indent=function(e,t){void 0===t&&(t="");for(var n="",r=0;r0&&e.append(", "),this.markupNode(e,o[s],n,r);r&&e.append("}");break;case b.Kind.SEQ:for(var u=t.items,s=0;s=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return t=n(r(t.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+t||"."; -},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return e=n(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,u=0;u1)for(var n=1;n",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),y=["%","/","?",";","#"].concat(m),v=["/","?","#"],g=255,A=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,T={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=n(12);r.prototype.parse=function(e,t,n){if(!l.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?"x":D[x];if(!U.match(A)){var F=L.slice(0,M),B=L.slice(M+1),V=D.match(E);V&&(F.push(V[1]),B.unshift(V[2])),B.length&&(s="/"+B.join(".")+s),this.hostname=F.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=u.toASCII(this.hostname));var K=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+K,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!T[d])for(var M=0,O=m.length;M0)&&n.host.split("@");I&&(n.auth=I.shift(),n.host=n.hostname=I.shift())}return n.search=e.search,n.query=e.query,l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var b=T.slice(-1)[0],M=(n.host||e.host||T.length>1)&&("."===b||".."===b)||""===b,R=0,C=T.length;C>=0;C--)b=T[C],"."===b?T.splice(C,1):".."===b?(T.splice(C,1),R++):R&&(T.splice(C,1),R--);if(!A&&!E)for(;R--;R)T.unshift("..");!A||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),M&&"/"!==T.join("/").substr(-1)&&T.push("");var w=""===T[0]||T[0]&&"/"===T[0].charAt(0);if(N){n.hostname=n.host=w?"":T.length?T.shift():"";var I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");I&&(n.auth=I.shift(),n.host=n.hostname=I.shift())}return A=A||n.host&&T.length,A&&!w&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(a){function o(e){throw RangeError(L[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(P,".");var i=e.split("."),a=s(i,t).join(".");return r+a}function l(e){for(var t,n,r=[],i=0,a=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=U(e>>>10&1023|55296),e=56320|1023&e),t+=U(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:T}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?D(e/I):e>>1,e+=D(e/t);e>O*S>>1;r+=T)e=D(e/O);return D(r+(O+1)*e/(e+N))}function d(e){var t,n,r,i,a,s,u,l,f,d,m=[],y=e.length,v=0,g=M,A=b;for(n=e.lastIndexOf(R),n<0&&(n=0),r=0;r=128&&o("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=y&&o("invalid-input"),l=c(e.charCodeAt(i++)),(l>=T||l>D((E-v)/s))&&o("overflow"),v+=l*s,f=u<=A?_:u>=A+S?S:u-A,!(lD(E/d)&&o("overflow"),s*=d;t=m.length+1,A=h(v-a,t,0==a),D(v/t)>E-g&&o("overflow"),g+=D(v/t),v%=t,m.splice(v++,0,g)}return p(m)}function m(e){var t,n,r,i,a,s,u,p,c,d,m,y,v,g,A,N=[];for(e=l(e),y=e.length,t=M,n=0,a=b,s=0;s=t&&mD((E-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;sE&&o("overflow"),m==t){for(p=n,c=T;d=c<=a?_:c>=a+S?S:c-a,!(p= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=T-_,D=Math.floor,U=String.fromCharCode;A={version:"1.3.2",ucs2:{decode:l,encode:p},decode:d,encode:m,toASCII:v,toUnicode:y},r=function(){return A}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(10)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(13),t.encode=t.stringify=n(14)},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var o=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;l=0?(p=d.substr(0,m),c=d.substr(m+1)):(p=d,c=""),f=decodeURIComponent(p),h=decodeURIComponent(c),n(a,f)?Array.isArray(a[f])?a[f].push(h):a[f]=[a[f],h]:a[f]=h}return a}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var a=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){"use strict";function r(e){var t={};return e.forEach(function(e){return Object.keys(e).forEach(function(n){return t[n]=e[n]})}),t}function i(e,t){return new I(N.find(e||[],t))}function a(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function o(e){var t={};return e.forEach(function(e){return t[e[0]]=e[1]}),t}function s(e,t){return t(e),e}function u(e,t){"object"==typeof e&&Object.keys(e).forEach(function(n){return t(n,e[n])})}function l(e,n,r){void 0===r&&(r=!1);var i={};return e.forEach(function(e){var a=t.shallowCopy(e);r&&delete a[n],i[e[n]]=a}),i}function p(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n}function c(e,t,n){return void 0===n&&(n=0),e.length-t.length>=n&&e.substring(n,n+t.length)===t}function f(e){return"_"==e[e.length-1]}function h(e,t,n){var r,i=!1;e[t]=function(){return i||(i=!0,r=n.apply(e)),r}}function d(e,n){void 0===n&&(n=f);for(var r in e)n(r)&&t.ifInstanceOf(e[r],Function,function(t){return 0===t.length?h(e,r,t):null})}function m(e,t){void 0!==e&&t(e)}function y(e){return"string"==typeof e&&""!=e&&p(e,".raml")}function v(e){for(var t,n=[],r=new RegExp("require\\('([^']+)'\\)","gi");t=r.exec(e);)n.push(t[1]);for(var i=new RegExp('require\\("([^"]+)"\\)',"gi");t=i.exec(e);)n.push(t[1]);return n=N.unique(n).filter(function(e){return""!=e}),n.sort(),n}function g(e){return"undefined"!=typeof e&&null!=e}function A(e){return 0==e.length?e:e.charAt(0).toUpperCase()+e.substr(1)}function E(e,t,n){void 0===n&&(n=!1);var r=Object.keys(t);if(n){var i={};r.forEach(function(e){return i[e]=!0}),Object.keys(e).forEach(function(e){return i[e]=!0}),r=Object.keys(i)}r.forEach(function(n){var r=e[n];r instanceof Object?(t[n]||(t[n]={}),E(r,t[n],!0)):void 0!=r&&(t[n]=e[n])})}function T(e,t){return Object.keys(t).forEach(function(n){return e=_(e,n,t[n])}),e}function _(e,t,n){for(var r="",i=0,a=e.indexOf(t);a=0;a=e.indexOf(t,i))r+=e.substring(i,a),r+=n,i=a+t.length;return r+=e.substring(i,e.length)}function S(e){if(null==e||"object"!=typeof e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0,r=e;n=0&&t<=M};g.each=g.forEach=function(e,t,n){t=E(t,n);var r,i;if(C(e))for(r=0,i=e.length;r0?0:o-1;for(i||(r=t[a?a[s]:s],s+=e);s>=0&&s=3;return t(e,E(n,i,4),r,a)}};g.reduce=g.foldl=g.inject=w(1),g.reduceRight=g.foldr=w(-1),g.find=g.detect=function(e,t,n){var r=C(e)?g.findIndex:g.findKey,i=r(e,t,n);if(void 0!==i&&i!==-1)return e[i]},g.filter=g.select=function(e,t,n){var r=[];return t=T(t,n),g.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},g.reject=function(e,t,n){return g.filter(e,g.negate(T(t)),n)},g.every=g.all=function(e,t,n){t=T(t,n);for(var r=!C(e)&&g.keys(e),i=(r||e).length,a=0;a=0},g.invoke=_(function(e,t,n){var r,i;return g.isFunction(t)?i=t:g.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),g.map(e,function(e){var a=i;if(!a){if(r&&r.length&&(e=b(e,r)),null==e)return;a=e[t]}return null==a?a:a.apply(e,n)})}),g.pluck=function(e,t){return g.map(e,g.property(t))},g.where=function(e,t){return g.filter(e,g.matcher(t))},g.findWhere=function(e,t){return g.find(e,g.matcher(t))},g.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sa&&(a=r)}else t=T(t,n),g.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},g.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sr||void 0===n)return 1;if(n0?0:i-1;a>=0&&a0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(c.call(r,o,s),g.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&at?(r&&(clearTimeout(r),r=null),s=l,o=e.apply(i,a),r||(i=a=null)):r||n.trailing===!1||(r=setTimeout(u,p)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l},g.debounce=function(e,t,n){var r,i,a=function(t,n){r=null,n&&(i=e.apply(t,n))},o=_(function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,t),s&&(i=e.apply(this,o))}else r=g.delay(a,t,this,o);return i});return o.cancel=function(){clearTimeout(r),r=null},o},g.wrap=function(e,t){return g.partial(t,e)},g.negate=function(e){return function(){return!e.apply(this,arguments)}},g.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},g.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},g.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},g.once=g.partial(g.before,2),g.restArguments=_;var k=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=F.length,r=e.constructor,i=g.isFunction(r)&&r.prototype||u,a="constructor";for(I(e,a)&&!g.contains(t,a)&&t.push(a);n--;)a=F[n],a in e&&e[a]!==i[a]&&!g.contains(t,a)&&t.push(a)};g.keys=function(e){if(!g.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)I(e,n)&&t.push(n);return k&&B(e,t),t},g.allKeys=function(e){if(!g.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&B(e,t),t},g.values=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=E(r,t[1])),t=g.allKeys(e)):(r=K,t=O(t,!1,!1),e=Object(e));for(var i=0,a=t.length;i1&&(n=t[1])):(t=g.map(O(t,!1,!1),String),r=function(e,n){return!g.contains(t,n)}),g.pick(e,r,n)}),g.defaults=V(g.allKeys,!0),g.create=function(e,t){var n=S(e);return t&&g.extendOwn(n,t),n},g.clone=function(e){return g.isObject(e)?g.isArray(e)?e.slice():g.extend({},e):e},g.tap=function(e,t){return t(e),e},g.isMatch=function(e,t){var n=g.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a":">",'"':""","'":"'","`":"`"},q=g.invert(Y),G=function(e){var t=function(t){return e[t]},n="(?:"+g.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};g.escape=G(Y),g.unescape=G(q),g.result=function(e,t,n){g.isArray(t)||(t=[t]);var r=t.length;if(!r)return g.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var z=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+$[e]};g.template=function(e,t,n){!t&&n&&(t=n),t=g.defaults({},t,g.templateSettings);var r=RegExp([(t.escape||z).source,(t.interpolate||z).source,(t.evaluate||z).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(J,Q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";var o;try{o=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return o.call(this,e,g)},u=t.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},g.chain=function(e){var t=g(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?g(t).chain():t};g.mixin=function(e){return g.each(g.functions(e),function(t){var n=g[t]=e[t];g.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),Z(this,n.apply(g,e))}}),g},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];g.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),g.each(["concat","join","slice"],function(e){var t=s[e];g.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return String(this._wrapped)},r=[],i=function(){return g}.apply(t,r),!(void 0!==i&&(n.exports=i))}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){"use strict";var r,i=n(18),a=function(e){return null!=e},o=function(){function e(t){var n=this;this._value=t,this._isDefined=!1,this._isEmpty=!0,this._arr=void 0,this.getOrThrow=function(){return i(n._isDefined,"Opt is empty. Use `Opt#getOrElse` or check `Opt#isDefined`."),n._value},this.value=function(){return n._value},this.isDefined=function(){return n._isDefined},this.isEmpty=function(){return n._isEmpty},this.toArray=function(){return n._arr||(n._arr=n._isDefined?[n._value]:[])},this.getOrElse=function(e){return n._isDefined?n._value:e},this.getOrElseF=function(e){return n._isDefined?n._value:e()},this.map=function(t){return n._isEmpty?e.empty():new e(t(n._value))},this.flatMap=function(t){return n.map(t).getOrElse(e.empty())},this.equals=function(t){return i(t instanceof e,"Expected other to be an `Opt`, but got `%s`",typeof t),n._isDefined===t.isDefined()&&n._value===t.value()},a(this._value)&&(this._isDefined=!0,this._isEmpty=!1)}return e.prototype.forEach=function(e){this.isDefined()&&e(this._value)},e.empty=function(){return r||(r=new e)},e}();e.exports=o},function(e,t,n){(function(t){"use strict";var n=function(e,n,r,i,a,o,s,u){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,i,a,o,s,u],c=0;l=new Error(n.replace(/%s/g,function(){return p[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=n}).call(t,n(7))},function(e,t,n){(function(e){"use strict";function r(e,t,n){return new Be.Function(e).call(t,n)}function i(e,t){var n=e.property();return n&&n.getContextRequirements().forEach(function(r){e.checkContextValue(r.name,r.value,r.value)||t.accept(Z(xe.CONTEXT_REQUIREMENT,{name:r.name,value:r.value,propName:n.nameId()},e))}),n}function a(e,t){var n;try{n=e.lowLevel().unit().project().fsEnabled()}catch(e){n=!0}if(n&&"undefined"!=typeof Ee&&Ee){for(var r=["exists","readFile","writeFile","readdir","existsSync","readFileSync","writeFileSync","readdirSync"],i=(Object.keys(Ee),0);i=0){var u=o.substring(0,s+1)+" "+o.substring(s+1);r=Z(xe.UNUSED_PARAMETER_MISSING_SEPARATING_SPACE,{paramName:o,correctMapping:u},e,!0)}else r=Z(xe.UNUSED_PARAMETER,{paramName:o},e,!0)}}}if(!r){var l=e.name(),p=Se("RAML08"),c=i.universe().version()==p.version();if(c){var f=Te.Universe08.Parameter.name;Te.Universe10.TypeDeclaration.name;if(c&&i.isAssignableFrom(f)){for(var h=p.type(f).allSubTypes().filter(function(e){return null!=Te.Universe08[e.nameId()].properties[l]}),d={},m=0;m0){var T=E.map(function(e,t){var n="'"+e+"'";return t==E.length-1?n:t==E.length-2?n+" or ":n+", "}).join("");r=Z(xe.INVALID_PROPERTY_OWNER_TYPE,{propName:l,namesStr:T},e)}}}}return r}function h(e,t){if(e.isElement()){if(e.invalidSequence){var n=e.property().nameId();n=De.sentenceCase(Ue.singular(n)),t.acceptUnique(te(xe.SEQUENCE_NOT_ALLOWED_10,{propName:n},e.lowLevel().parent().parent(),e))}var r=e.asElement();if(r.definition().isAssignableFrom(Te.Universe10.LibraryBase.name)){var i,a=!1,o=!1;r.lowLevel().children().forEach(function(e){"schemas"==e.key()&&(a=!0,i=e),"types"==e.key()&&(o=!0)}),a&&o&&t.accept(_t(i,r,he.IssueCode.ILLEGAL_PROPERTY_VALUE,!1,"types and schemas are mutually exclusive",!1))}r.definition().requiredProperties()&&r.definition().requiredProperties().length>0;d(e,t),(new at).validate(r,t),(new At).validate(r,t)}else d(e,t);(new vt).validate(e,t)}function d(e,t,n){void 0===n&&(n=!1);var r=e.parent(),i=e.lowLevel().value();if(e.lowLevel()&&(e.lowLevel().keyKind()==ye.Kind.MAP&&t.accept(Z(xe.NODE_KEY_IS_A_MAP,{},e)),e.lowLevel().keyKind()==ye.Kind.SEQ&&null==i)){var a=!1;e.isElement()&&e.asElement().definition().isAssignableFrom(Te.Universe10.TypeDeclaration.name)&&(a=!0),a||t.accept(Z(xe.NODE_KEY_IS_A_SEQUENCE,{},e))}if(e.isUnknown()){if("string"==typeof e.name()&&e.name().indexOf("<<")>=0&&null!=c(r))return(new Ye).validateName(e,t),!1;if(e.needSequence&&t.accept(Z(xe.SEQUENCE_REQUIRED,{name:e.name()},e)),e.needMap)return e.knownProperty?t.accept(Z(xe.PROPERTY_MUST_BE_A_MAP_10,{propName:e.knownProperty.nameId()},e)):t.accept(Z(xe.MAP_REQUIRED,{},e)),!1;if(e.unresolvedRef&&t.accept(Z(xe.UNRESOLVED_REFERENCE,{ref:i},e)),e.knownProperty){if(0==e.lowLevel().includeErrors().length){if(c(r)&&Ce.startsWith(i,"<<")&&Ce.endsWith(i,">>"))return!1;if("body"==e.name()&&e.computedValue("mediaType"))return!1;"~"!=e.lowLevel().value()&&(oe(e,t,xe.SCALAR_PROHIBITED.code,!1)||t.accept(Z(xe.SCALAR_PROHIBITED,{propName:e.name()},e)))}}else{var o="string"==typeof e.name()?e.name().indexOf("<<"):-1;if(o>0&&c(r)&&e.name().indexOf(">>",o))return!1;var s=f(e);s||(s=m(e)),t.accept(s)}}if(e.markCh()&&!e.allowRecursive())return!!e.property()&&(t.accept(Z(xe.RECURSIVE_DEFINITION,{name:e.name()},e)),!1);if(e.definition&&e.definition().isAssignableFrom(Te.Universe10.Operation.name)){var u=v(e.wrapperNode()),l=u.queryStringComesFrom,p=u.queryParamsComesFrom;l&&p&&(t.accept(y(l,e,!1)),t.accept(y(p,e,!0)))}var h=e.definition&&e.definition()&&(e.definition().key()===Te.Universe10.Overlay||e.definition().key()===Te.Universe10.Extension);return h&&S(e,t,n),!0}function m(e){var t,n=e.parent();if(n){var r=n.definition();if(r){var i=e.name(),a=r.nameId();if(be.isPossibleMethodName(i))t=Z(xe.INVALID_METHOD_USAGE,{typeName:a},e);else if("/"==i.charAt(0))t=Z(xe.INVALID_SUBRESOURCE_USAGE,{typeName:a},e);else{var o=r&&r.universe();if(o){var s=St.getInstance().hasProperty(i);if(s){var u=void 0;"RAML10"==o.version()?u="RAML 1.0":"RAML08"==o.version()&&(u="RAML 0.8"),u&&(t=Z(xe.INVALID_PROPERTY_USAGE,{propName:i,typeName:a,ramlVersion:u},e))}}}}}return t||(t=Z(xe.UNKNOWN_NODE,{name:e.name()},e)),t}function y(e,t,n){var r=e,i=e,a=n?Te.Universe10.Operation.properties.queryString.name:Te.Universe10.Operation.properties.queryParameters.name;return r.unit?te(xe.QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE,{propName:a},r,t):Z(xe.QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE,{propName:a},i)}function v(e){return{queryParamsComesFrom:g(e,!0),queryStringComesFrom:g(e,!1)}}function g(e,t,n,r){if(void 0===n&&(n=!0),void 0===r&&(r={}),!e)return null;if(e.name){var i=e.name();if(r[i])return;r[i]=!0}var a=E(e,t);if(a)return a;var o=e.is&&e.is()||[],s=me.find(o,function(e){return g(e.trait(),t,n,r)});if(s)return s.highLevel();if(n){var u=e.parentResource&&e.parentResource(),l=u&&A(u,t,r);if(l)return l;if(u=e.parent&&e.parent(),u&&u.highLevel().definition().isAssignableFrom(Te.Universe10.ResourceBase.name))return A(u,t,r)}return null}function A(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r={}),e.name){var i=e.name();if(r[i])return;r[i]=!0}var a=e.is(),o=me.find(a,function(e){return g(e.trait(),t,!1,n)});if(o)return o.highLevel();var s=e.type(),u=s&&s.resourceType(),l=u&&A(u,t,n,r);return l?s.highLevel():void 0}function E(e,t){return t?T(e):_(e)}function T(e){var t=e.highLevel();return t.lowLevel&&me.find(t.lowLevel().children(),function(e){return e.key&&e.key()===Te.Universe10.Operation.properties.queryParameters.name})}function _(e){var t=e.highLevel(),n=t.element(Te.Universe10.Operation.properties.queryString.name);return n}function S(e,t,n){if(void 0===n&&(n=!1),!e.parent()){var r=e.asElement();if(r&&r.isAuxilary()){var i=r.getMaster();i&&h(i,t)}}}function N(e,t,n){if(void 0===n&&(n=!1),d(e,t,n))try{var r=e.definition&&e.definition()&&(e.definition().key()===Te.Universe10.Overlay||e.definition().key()===Te.Universe10.Extension),i=r?e.children():e.directChildren();i.filter(function(e){return!n||e.property&&e.property()&&e.property().isRequired()}).forEach(function(n){if(n&&n.errorMessage){var r=n.errorMessage;return void t.accept(Z(r.entry,r.parameters,n.name()?n:e))}n.validate(t)})}finally{e.unmarkCh()}}function I(e,t){if(!e.parent()){try{M(e,t)}finally{b(e,t)}var n=e.lowLevel().unit().contents().length;e.lowLevel().errors().forEach(function(r){var i=r.mark?r.mark.position:0,a=i>=n?i:i+1;if(r.mark&&r.mark.toLineEnd){var o=r.mark.buffer,s=o.indexOf("\n",i);s<0&&(s=o.length),s0)return void N(e,t,!0)}if(i.definition().isAnnotationType()||i.property()&&"annotations"==i.property().nameId())return void(new rt).validate(i,t);if(i.definition().isAssignableFrom(Te.Universe10.UsesDeclaration.name)&&(new dt).validate(i,t),i.definition().isAssignableFrom(Te.Universe10.TypeDeclaration.name))return i.attrs().forEach(function(n){var r=n.property().range().key();if(r==Te.Universe08.RelativeUriString||r==Te.Universe10.RelativeUriString)return void(new $e).validate(n,t);if(r==Te.Universe08.FullUriTemplateString||r==Te.Universe10.FullUriTemplateString)return void(new $e).validate(n,t);if(n.property().getAdapter(Ne.RAMLPropertyService).isKey()){var a=e.property()&&e.property().nameId();if(a==Te.Universe08.Resource.properties.uriParameters.name||a==Te.Universe08.Resource.properties.baseUriParameters.name)return;if(i.property()&&i.property().nameId()==Te.Universe10.MethodBase.properties.body.name)return void(new Je).validate(n,t)}}),(new ct).validate(i,t),(new ft).validate(i,t),(new ut).validate(i,t),(new it).validate(i,t),void(null==i.parent()&&i.elements().filter(function(e){return e.definition().isAssignableFrom(Te.Universe10.UsesDeclaration.name)}).forEach(function(e){return(new dt).validate(e,t)}));if(i.definition().isAssignableFrom(Te.Universe10.LibraryBase.name)){var s,u=!1,l=!1;i.lowLevel().children().forEach(function(e){"schemas"==e.key()&&(u=!0,s=e),"types"==e.key()&&(l=!0)}),u&&l&&t.accept(te(xe.TYPES_AND_SCHEMAS_ARE_EXCLUSIVE,{},s,i))}var p=i.definition().requiredProperties()&&i.definition().requiredProperties().length>0,c=i.definition().getAdapter(Ne.RAMLService).getAllowAny();c?p&&N(e,t,!0):N(e,t),(new gt).validate(i,t),(new lt).validate(i,t),(new at).validate(i,t),(new At).validate(i,t)}else N(e,t);(new vt).validate(e,t)}function b(e,t){if(e.lowLevel()){var n=e.lowLevel().actual();delete n._inc,e.children().forEach(function(e){return b(e,t)})}}function M(e,t){var n=e.lowLevel();if(n){var r=n.actual();if(!r._inc){if(e.isElement()){var i=e.name();null!=c(e)&&(i=i.replace(/<<[^<>]*>>/g,"")),"string"==typeof i&&null!=i&&i.indexOf(" ")!=-1&&t.accept(Z(xe.SPACES_IN_KEY,{value:i},e,!0))}if(r._inc=!0,n){n.includeErrors().forEach(function(n){var r=!1;e.lowLevel().hasInnerIncludeError()&&(r=!0);var i=Z(xe.INCLUDE_ERROR,{msg:n},e,r);t.accept(i)});var a=n.includePath();if(null!=a&&!Ae.isAbsolute(a)&&!de.isWebPath(a)){var o=n.unit().absolutePath();if(n instanceof fe.LowLevelCompositeNode){var s=n.adoptedNodes().find(function(e){return e.includePath()==a});s&&(o=s.unit().absolutePath())}var u=C(Ae.dirname(o),a);if(u>0){var l=Z(xe.PATH_EXCEEDS_ROOT,{},e,!0);t.accept(l)}}}e.children().forEach(function(e){return M(e,t)}),0==e.children().length&&null!=n&&n.children().forEach(function(n){return R(n,t,e)})}}}function R(e,t,n){e.includeErrors().forEach(function(r){var i=!1;e.hasInnerIncludeError()&&(i=!0);var a=te(xe.INCLUDE_ERROR,{msg:r},e,n,i);t.accept(a)});var r=e.includePath();if(null!=r&&!Ae.isAbsolute(r)&&!de.isWebPath(r)){var i=e.unit().absolutePath(),a=C(Ae.dirname(i),r);if(a>0){var o=te(xe.PATH_EXCEEDS_ROOT,{},e,n,!0);t.accept(o)}}e.children().forEach(function(e){return R(e,t,n)})}function C(e,t){for(var n=We(e),r=We(t),i=n.length,a=0,o=0,s=r;o0){var l=!1,p=t.definition().allSuperTypes();p=p.concat([t.definition()]);var c=p.map(function(e){return e.nameId()});if(u.forEach(function(e){"API"==e&&(e="Api"),"NamedExample"==e&&(e="ExampleSpec"),"SecurityScheme"==e&&(e="AbstractSecurityScheme"),"SecuritySchemeSettings"==e&&(e="SecuritySchemeSettings"),me.find(c,function(t){return t==e})?l=!0:("Parameter"==e&&t.computedValue("location")&&(l=!0),"Field"==e&&t.computedValue("field")&&(l=!0))}),!l){var f=u.map(function(e){return"'"+e+"'"}).join(", ");return new Xe(xe.INVALID_ANNOTATION_LOCATION,{aName:n,aValues:f})}}}}return g}if(e.key()==Te.Universe08.SchemaString||e.key()==Te.Universe10.SchemaString){var h=!1;if(ve.UserDefinedProp.isInstance(r)){var d=r,m=d.node();if(m){var y=m.property();y&&(h=_e.isTypeProperty(y)||_e.isSchemaProperty(y))}}if(h)return!1;var v=n&&n.trim().length>0&&("{"==n.trim().charAt(0)||"<"==n.trim().charAt(0)),g=Le.createSchema(n,Y(t.lowLevel(),i&&i.lowLevel()));if(!g)return g;if(g instanceof Error)g.isWarning=!0,v||(g.canBeRef=!0);else{var A=!1;try{JSON.parse(n),A=!0}catch(e){}if(A)try{g.validateSelf()}catch(e){return e.isWarning=!0,e}}return g}if(e.key()==Te.Universe08.StatusCodeString||e.key()==Te.Universe10.StatusCodeString){var E=re(""+n);if(null!=E)return E}if(e.key()==Te.Universe08.BooleanType||e.isAssignableFrom(Te.Universe10.BooleanType.name)){if("true"!==n&&"false"!==n&&n!==!0&&n!==!1)return new Xe(xe.BOOLEAN_EXPECTED);if(i){var T=i.lowLevel().value(!0);if("true"!==T&&"false"!==T)return new Xe(xe.BOOLEAN_EXPECTED)}}if(e.key()==Te.Universe08.NumberType||e.isAssignableFrom(Te.Universe10.NumberType.name)){var _=parseFloat(n);if(isNaN(_))return new Xe(xe.NUMBER_EXPECTED,{propName:r.nameId()})}if((e.key()==Te.Universe08.StringType||e.isAssignableFrom(Te.Universe10.StringType.name))&&null===n&&t&&r){var S=t.attr(r.nameId());if(S&&!S.isAnnotatedScalar()){var N=S.lowLevel().children();if(N&&N.length>0)return new Xe(xe.INVALID_PROPERTY_RANGE,{propName:r.nameId(),range:"string"})}}return!0}catch(e){return e.canBeRef=!0,e}}function O(e){if(!e)return!1;var t=e.toLowerCase(),n=e.toUpperCase();return e!==t&&e!==n}function D(e){if(!e)return null;if(e.isElement()){var n=e,r=n.definition();if(r&&t.typeToName.hasOwnProperty(r.nameId()))return t.typeToName[r.nameId()];if(r.isAssignableFrom(Te.Universe10.TypeDeclaration.name)||r.isAssignableFrom(Te.Universe08.Parameter.name)){if(n.property()&&t.parameterPropertyToName.hasOwnProperty(n.property().nameId()))return t.parameterPropertyToName[n.property().nameId()];if(n.property()&&n.parent()&&n.property().nameId()==Te.Universe10.LibraryBase.properties.types.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(Te.Universe10.LibraryBase.name))return"type";if(n.property()&&n.parent()&&n.property().nameId()==Te.Universe10.LibraryBase.properties.securitySchemes.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(Te.Universe10.LibraryBase.name))return"security scheme"}}return null}function U(e,t,n){var r=Me.declRoot(n);fe.LowLevelProxyNode.isInstance(n.lowLevel())&&(n=r),r._cach||(r._cach={});var i=e.id();if(e.domain()&&(i+=e.domain().nameId()),i){var a=r._cach[i];if(a)return null!=a[t]}var o=Me.enumValues(e,n),s={};return o.forEach(function(e){return s[e]=1}),e.id()&&(r._cach[i]=s),null!=s[t]}function x(e,n,r,i){var a="string"==typeof r?r.indexOf("<<"):-1;if(!(a>=0&&r.indexOf(">>",a)>=0&&null!=c(n))&&(F(e,n,i),B(e,n,i),r&&("null"!=r||!e.isAllowNull()))){var o=e.getAdapter(Ne.RAMLPropertyService),s=n.parent(),u=!1,l=fe.LowLevelCompositeNode.isInstance(n.lowLevel())&&n.lowLevel().getMeta("chaining");if(l||(u=U(e,r,s),u||n.lowLevel().unit().absolutePath()===s.lowLevel().unit().absolutePath()||(u=U(e,r,ge.fromUnit(n.lowLevel().unit())))),!u){if("string"==typeof r&&0==r.indexOf("x-")&&e.nameId()==Te.Universe10.TypeDeclaration.properties.type.name)return!0;var p=o.isReference&&o.isReference()&&o.referencesTo&&o.referencesTo()&&o.referencesTo().nameId&&o.referencesTo().nameId(),f=t.typeToName[p]||K(n),h={referencedToName:f,ref:r,typeName:r},d=f?xe.UNRECOGNIZED_ELEMENT:xe.UNRESOLVED_REFERENCE,m=V(d,e,n,r),y=e.range().key()===Te.Universe08.SchemaString;return oe(n,i,m.code,y)||i.accept(Z(m,h,n,y)),!0}return!(!k(n)||!_e.isTraitRefType(n.definition()))&&(i.accept(Z(xe.DUPLICATE_TRAIT_REFERENCE,{refValue:r},n)),!0)}}function k(e){var t,n=e.property().domain().universe().version();if(t="RAML10"==n?ce(pe.serialize(e.lowLevel())):e.value()&&e.value().valueName&&e.value().valueName(),!t)return!1;var r=e.parent&&e.parent();if(!r)return!1;var i=e.name&&e.name();if(!i)return!1;var a=r.attributes&&r.attributes(i);if(!a)return!1;if(0===a.length)return!1;var o=0;return a.forEach(function(e){var r;"RAML10"==n?t=ce(pe.serialize(e.lowLevel())):r=e.value&&e.value()&&e.value().valueName&&e.value().valueName(),r===t&&o++}),o>1}function F(e,t,n){if(_e.isIsProperty(e)){var r=t.lowLevel();if(null!=r){var i=null,a=r.parent(),o=null!=a?a.parent():null;if(r.kind()==ye.Kind.MAPPING&&r.key()&&"is"==r.key()?i=r:null!=a&&a.kind()==ye.Kind.MAPPING&&a.key()&&"is"==a.key()?i=a:null!=o&&o.kind()==ye.Kind.MAPPING&&o.key()&&"is"==o.key()&&(i=o),null!=i){null==i.value()||i.children()&&0!=i.children().length||n.accept(Z(xe.IS_IS_ARRAY,{},t));var s=!1;i.children().forEach(function(e){e.kind()!=ye.Kind.SCALAR&&e.kind()!=ye.Kind.MAP&&(s=!0)}),s&&n.accept(Z(xe.IS_IS_ARRAY,{},t))}}}}function B(e,t,n){if(_e.isTypeProperty(e)&&_e.isResourceTypeRefType(t.definition())){var r=t.lowLevel();null==t.value()&&r&&r.children()&&0==r.children().length?r.kind()==ye.Kind.MAPPING&&null!=r.valueKind()&&n.accept(Z(xe.RESOURCE_TYPE_NAME,{},t)):null==t.value()&&r&&r.children()&&r.children().length>1&&n.accept(Z(xe.MULTIPLE_RESOURCE_TYPES,{},t))}}function V(e,t,n,r){if("type"==t.nameId()&&"RAML08"==t.domain().universe().version()&&t.domain().isAssignableFrom(Te.Universe08.Parameter.name))return xe.TYPES_VARIETY_RESTRICTION;if(null!=n.parent()&&_e.isSecuritySchemaType(n.parent().definition()))return xe.UNRECOGNIZED_SECURITY_SCHEME;if(_e.isAnnotationsProperty(t)){var i=fe.LowLevelCompositeNode.isInstance(n.lowLevel())&&n.lowLevel().getMeta("chaining"),a=n.parent().types(),o=a&&a.getAnnotationTypeRegistry();return i||o&&o.getByChain(r)?xe.LIBRARY_CHAINIG_IN_ANNOTATION_TYPE:xe.UNKNOWN_ANNOTATION_TYPE}return e}function K(e){var t=e&&e.lowLevel()&&e.lowLevel().key();if(t===Te.Universe10.AbstractSecurityScheme.properties.type.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===Te.Universe10.AbstractSecurityScheme.name)return"security scheme type"}else if(t===Te.Universe08.BodyLike.properties.schema.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===Te.Universe08.BodyLike.name)return"schema"}}function j(e,t){var n=t.getValidationPath(),r=H(e,n),i=t.getInternalPath(),a=!1;if(i){var o=H(r,i);o&&o!=r&&(r=o,a=!0)}return{node:r,internalPathUsed:a}}function W(e,t){var n=e.getExtra(Re.SOURCE_EXTRA);return ge.LowLevelWrapperForTypeSystem.isInstance(n)?n.node():null}function H(e,t){if(!t)return e;var n=e.children().filter(function(e){return(!e.isAttr()||!e.asAttr().isFromKey())&&e.name()===t.name});if(e.isElement()&&_e.isTypeDeclarationDescendant(e.asElement().definition())){var r=e.lowLevel();n=me.uniq(e.directChildren().concat(e.children())).filter(function(e){return(!e.isAttr()||!e.asAttr().isFromKey())&&e.name()===t.name}).sort(function(e,t){for(var n=e.lowLevel().parent();n&&n.kind()!=ye.Kind.MAPPING;)n=n.parent();for(var i=t.lowLevel().parent();i&&i.kind()!=ye.Kind.MAPPING;)i=i.parent();return n==r?-1:i==r?1:0})}var i=t.child&&"number"==typeof t.child.name?t.child.name:-1;if(i>=0&&n.length>i)return H(n[i],t.child.child);if(n.length>0)return H(n[0],t.child);if(!e.lowLevel())return e;for(var a=e.lowLevel().children(),o=0;o0){n.lowLevel().valueKind()!=n.lowLevel().resolvedValueKind()?(s=Tt(n,e,r,t,!1,u,null,i,a),i=null,a=!1):s=Tt(n,e,r,t,!1,u,null);for(var c=s;c.extras.length>0;)c=c.extras[0];for(var f=0;f0;)c=c.extras[0];if(c.extras.push(_),n.lowLevel().valueKind()==ye.Kind.INCLUDE_REF){var S=xe.ERROR_IN_INCLUDED_FILE;_.code=S.code,_.message=ie(S,{msg:_.message})}_=s}return _}function te(e,t,n,r,i,a,o){void 0===i&&(i=!1),void 0===a&&(a=!1);var s=ie(e,t);return ne(e.code,s,n,r,i,a,o)}function ne(e,t,n,r,i,a,o){void 0===i&&(i=!1),void 0===a&&(a=!1);var s=null;if(n){var u=r.root().lowLevel().unit();if(r.lowLevel().unit()!=u){s=_t(n,r,e,i,t,!0,o);var l=r.lowLevel().unit();for(l&&(t=t+" "+l.path());r.lowLevel().unit()!=u;)r=r.parent()}}s&&(o=null,r.property()&&r.property().nameId()==Te.Universe10.FragmentDeclaration.properties.uses.name&&null!=r.parent()&&(r=r.parent()),n=r.lowLevel());var p=_t(n,r,e,i,t,a,o);return s&&(s.extras.push(p),n.valueKind()==ye.Kind.INCLUDE_REF&&(p.message=ie(xe.ERROR_IN_INCLUDED_FILE,{msg:p.message})),p=s),p}function re(e){if(3!=e.length)return new Xe(xe.STATUS_MUST_BE_3NUMBER);for(var t=0;t=0;a=r.indexOf("{{",i)){if(n+=r.substring(i,a),i=r.indexOf("}}",a),i<0){i=a;break}a+="{{".length;var o=r.substring(a,i),s=o.split("|"),u=s[0].trim(),l=be.getTransformersForOccurence(o);i+="}}".length;var p=t[u];if(void 0===p)throw new Error(ie(xe.MESSAGE_PARAMETER_NO_VALUE,{paramName:u}));for(var c=0,f=l;c=0||e.indexOf("\r")>=0)return!1;Ce.startsWith(e,"http://")?e=e.substring("http://".length):Ce.startsWith(e,"https://")?e=e.substring("https://".length):Ce.startsWith(e,"./")?e=e.substring("./".length):Ce.startsWith(e,"/")&&(e=e.substring("/".length)),e=e.replace(/\.\.\//g,"");var t=e.split("/");if(0==t.length)return!1;for(var n=0,r=t;n1&&":"==t.charAt(1)&&/^win/.test(e.platform)&&(t=t.substring(2));var n=t.split("/");return 0==n[0].length&&(n=n.slice(1)),n.length>0&&0==n[n.length-1].length&&(n=n.slice(0,n.length-1)),n},He=function(e,t,n){try{new RegExp(e)}catch(r){t.accept(Z(xe.ILLEGAL_PATTERN,{value:e},n))}},Ye=function(){function e(){}return e.prototype.validateName=function(e,t){var n=e.name();if(n){var r=e.lowLevel().keyStart();this.check(n,r,e,t)}},e.prototype.validateValue=function(e,t){var n=e.value();if("string"==typeof n){var r=e.lowLevel().valueStart();this.check(n,r,e,t)}},e.prototype.hasTraitOrResourceTypeParent=function(e){for(var t=e.parent();null!=t;){if(!t.definition())return!1;if(_e.isTraitType(t.definition())||_e.isResourceTypeType(t.definition()))return!0;t=t.parent()}return!1},e.prototype.check=function(e,t,n,r){if(!this.hasTraitOrResourceTypeParent(n))return[];for(var i=[],a=0,o=e.indexOf("<<");o>=0;o=e.indexOf("<<",a)){o+="<<".length,a=e.indexOf(">>",o);var s=e.substring(o,a),u=s.indexOf("|"),l=u>=0?s.substring(0,u):s;if(0==l.trim().length){var p=Z(xe.TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS,{},n);p.start=t+o,p.end=t+a,r.accept(p)}if(u!=-1){u++;for(var c=s.split("|").slice(1).map(function(e){return e.trim()}),f=be.getTransformNames(),h=0,d=c;h>".length}return i},e}(),qe=function(){function e(){}return e.prototype.validate=function(t,n){var r=t.parent();if(r&&(r.definition().isAssignableFrom(Te.Universe08.Method.name)||r.definition().isAssignableFrom(Te.Universe10.Method.name))){var i=me.find(r.lowLevel()&&r.lowLevel().children()||[],function(e){var t=e.key();return t&&(Te.Universe08.MethodBase.properties.body.name===t||Te.Universe10.MethodBase.properties.body.name===t)});i&&me.find(e.methodsWithoutRequestBody,function(e){return r.name()===e})&&n.accept(Z(xe.REQUEST_BODY_DISABLED,{methodName:r.name()},r))}},e.methodsWithoutRequestBody=["trace"],e}(),Ge=function(){function e(){}return e.prototype.validate=function(e,t){var n=i(e,t),r=e.value(),a=e.parent(),l=a.definition(),f=l.universe().version(),h=null!=c(a),d=e.property();if(!d.range().hasStructure()){if(ge.StructuredValue.isInstance(r)&&!d.isSelfNode()){if(o(d)&&d.domain().key()==Te.Universe08.BodyLike){var m=new ge.ASTNodeImpl(e.lowLevel(),a,l.universe().type(Te.Universe08.BodyLike.name),d);return void m.validate(t)}if("RAML10"==f&&h)return;t.accept(Z(xe.SCALAR_EXPECTED,{},e))}else{var y=e.lowLevel().valueKind();if(e.lowLevel().valueKind()!=ye.Kind.INCLUDE_REF&&!d.getAdapter(Ne.RAMLPropertyService).isKey()&&!(d.isMultiValue()||_e.isApiType(l)&&_e.isTitleProperty(d))){var v=d.range().key();v!=Te.Universe08.StringType&&v!=Te.Universe08.MarkdownString&&v!=Te.Universe08.MimeType||y!=ye.Kind.SEQ&&y!=ye.Kind.MAPPING&&y!=ye.Kind.MAP&&(!d.isRequired()&&!_e.isMediaTypeProperty(d)||null!=y&&void 0!==y)||d.domain().getAdapter(Ne.RAMLService).isInlinedTemplates()||t.accept(Z(xe.INVALID_PROPERTY_RANGE,{propName:e.name(),range:"string"},e))}}if(e.isAnnotatedScalar()){var g=new rt;e.annotations().forEach(function(e){var n=e.value(),r=n.toHighLevel();r?g.validate(r,t):t.accept(Z(xe.UNKNOWN_ANNOTATION,{aName:n.valueName()},e))})}}var A;if("string"==typeof r?A=r:ge.StructuredValue.isInstance(r)&&(A=r.valueName()),!(A&&A.indexOf("<<")!=-1&&A.indexOf(">>")>A.indexOf("<<")&&((new Ye).validateValue(e,t),h))){if((new qe).validate(e,t),d.range().key()==Te.Universe08.MimeType||d.range().key()==Te.Universe10.MimeType||d.nameId()==Te.Universe10.TypeDeclaration.properties.name.name&&a.property().nameId()==Te.Universe10.MethodBase.properties.body.name)return void(new Je).validate(e,t);if((u(d)||s(d))&&(new mt).validate(e,t),p(d)){if("RAML08"==f){var E=e.lowLevel().parent(),T=ye.Kind.SEQ;fe.LowLevelProxyNode.isInstance(e.lowLevel())?E.valueKind()!=T&&t.accept(Z(xe.SECUREDBY_LIST_08,{},e,!1)):E.kind()!=T&&t.accept(Z(xe.SECUREDBY_LIST_08,{},e,!1))}if((new mt).validate(e,t),"RAML10"==f&&ge.StructuredValue.isInstance(r)){var _=r,S=_.children().filter(function(e){return"scopes"==e.valueName()});if(S.length>0){var N=e.findReferencedValue();if(N){var I=[];S.forEach(function(e){var t=e.children();if(t.length>0)t.forEach(function(e){var t=e.lowLevel().value();null==t||h&&t.indexOf("<<")>=0||I.push(e)});else{var n=e.lowLevel().value();null==n||h&&n.indexOf("<<")>=0||I.push(e)}});var b={},M=N.element(ve.universesInfo.Universe10.AbstractSecurityScheme.properties.settings.name);if(M){var R=M.attributes(ve.universesInfo.Universe10.OAuth2SecuritySchemeSettings.properties.scopes.name);R.forEach(function(e){return b[e.value()]=!0})}for(var C=0,w=I;C0&&(me.find(N,function(e){return e==n})||n&&0==n.indexOf("x-")&&r.nameId()==Te.Universe08.AbstractSecurityScheme.properties.type.name||f.accept(Z(xe.INVALID_VALUE,{iValue:n,aValues:N.map(function(e){return"'"+e+"'"}).join(", ")},e)))}},e}(),$e=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=(new Qe).parseUrl(e.value()||"");if(n.some(function(e){return"version"==e})&&"baseUri"==e.property().nameId()){var r=e.root().attr("version");r||t.accept(Z(xe.MISSING_VERSION,{},e,!1))}n.some(function(e){return 0==e.length})&&t.accept(Z(xe.URI_PARAMETER_NAME_MISSING,{},e,!1))}catch(n){t.accept(Z(xe.URI_EXCEPTION,{msg:n.message},e,!1))}},e}(),Je=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=e.value();if("body"==n&&e.parent().parent()){var r=e.parent().parent().definition().key();(r===Te.Universe08.Response||r===Te.Universe10.Response||e.parent().parent().definition().isAssignableFrom(Te.Universe10.MethodBase.name))&&(n=e.parent().computedValue("mediaType"))}if(null!=c(e)&&"string"==typeof n&&n.indexOf("<<")>=0)return;var i=be.parseMediaType(n);if(!i)return;i.type.match(/[\w\d][\w\d!#\$&\-\^_+\.]*/)||t.accept(Z(xe.INVALID_MEDIATYPE,{mediaType:i.type},e))}catch(n){t.accept(Z(xe.MEDIATYPE_EXCEPTION,{msg:n.message},e))}(e.value()&&"multipart/form-data"==e.value()||"application/x-www-form-urlencoded"==e.value())&&e.parent()&&e.parent().parent()&&e.parent().parent().property()&&e.parent().parent().property().nameId()==Te.Universe10.MethodBase.properties.responses.name&&t.accept(Z(xe.FORM_IN_RESPONSE,{},e,!0))},e}(),Qe=function(){function e(){}return e.prototype.checkBaseUri=function(e,t,n,r){var i=t.root().attr("baseUri");if(i){var a=i.value();try{var o=this.parseUrl(a);me.find(o,function(e){return e==n})||r.accept(Z(xe.UNUSED_URL_PARAMETER,{paramName:""},e))}catch(e){}}else r.accept(Z(xe.UNUSED_URL_PARAMETER,{paramName:""},e))},e.prototype.parseUrl=function(e){for(var t=[],n="",r=!1,i=0,a=0;a0)throw new Error(ie(xe.INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL,{symbol:"{"}));if(i<0)throw new Error(ie(xe.INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL,{symbol:"}"}));return t},e.prototype.validate=function(e,t){var n=e.value();if(e.parent().property().nameId()==Te.Universe10.Api.properties.baseUri.name){var r=e.parent().parent();return void this.checkBaseUri(e,r,n,t)}var r=e.parent().parent(),i=r.name();if(r.definition().key()===Te.Universe10.Api||r.definition().key()===Te.Universe08.Api)return void this.checkBaseUri(e,r,n,t);if(r.definition().key()!=Te.Universe10.ResourceType&&r.definition().key()!=Te.Universe08.ResourceType)try{var a=this.parseUrl(i),o=me.find(a,function(e){return e==n});if(!o){var s=e.root().attr(Te.Universe10.Api.properties.baseUri.name);if(s&&e.name()===Te.Universe08.Api.properties.baseUriParameters.name){var u=s.value();if(u&&(a=this.parseUrl(u),a&&a.length>0&&me.find(a,function(e){return e==n})))return}t.accept(Z(xe.UNUSED_URL_PARAMETER,{paramName:"'"+n+"'"},e))}}catch(e){}},e}();t.UrlParameterNameValidator=Qe,t.typeToName={},t.typeToName[Te.Universe08.Trait.name]="trait",t.typeToName[Te.Universe08.ResourceType.name]="resource type",t.typeToName[Te.Universe10.Trait.name]="trait",t.typeToName[Te.Universe10.ResourceType.name]="resource type",t.typeToName[Te.Universe10.AbstractSecurityScheme.name]="security scheme",t.typeToName[Te.Universe10.Method.name]="method",t.typeToName[Te.Universe08.Method.name]="method",t.typeToName[Te.Universe10.Resource.name]="resource",t.typeToName[Te.Universe08.Resource.name]="resource",t.typeToName[Te.Universe10.Api.name]="api",t.typeToName[Te.Universe08.Api.name]="api",t.typeToName[Te.Universe10.Response.name]="response",t.typeToName[Te.Universe08.Response.name]="response",t.typeToName[Te.Universe08.BodyLike.name]="body",t.parameterPropertyToName={},t.parameterPropertyToName[Te.Universe08.MethodBase.properties.headers.name]="header",t.parameterPropertyToName[Te.Universe08.MethodBase.properties.queryParameters.name]="query parameter",t.parameterPropertyToName[Te.Universe08.Api.properties.uriParameters.name]="uri parameter",t.parameterPropertyToName[Te.Universe08.Api.properties.baseUriParameters.name]="base uri parameter",t.parameterPropertyToName[Te.Universe08.BodyLike.properties.formParameters.name]="form parameter",t.parameterPropertyToName[Te.Universe10.MethodBase.properties.headers.name]="header",t.parameterPropertyToName[Te.Universe10.MethodBase.properties.queryParameters.name]="query parameter",t.parameterPropertyToName[Te.Universe10.ResourceBase.properties.uriParameters.name]="uri parameter",t.parameterPropertyToName[Te.Universe10.Api.properties.baseUriParameters.name]="base uri parameter",t.parameterPropertyToName[Te.Universe10.MethodBase.properties.body.name]="body",t.getHumanReadableNodeName=D;var Ze=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.value(),r=n,i=e.property();if("string"==typeof n){if(x(i,e,n,t),ve.ReferenceType.isInstance(i.range())){var a=(i.range(),le.createNode(""+n,e.lowLevel().parent(),e.lowLevel().unit()));a._actualNode().startPosition=e.lowLevel().valueStart(),a._actualNode().endPosition=e.lowLevel().valueEnd();var o=new ge.StructuredValue(a,e.parent(),e.property()),s=o.toHighLevel();s&&s.validate(t)}}else if(ge.StructuredValue.isInstance(n)){var u=n;if(u){r=u.valueName();var l=u.valueName();if(!x(i,e,l,t)){var p=u.toHighLevel();p&&p.validate(t)}}else r=null}else"number"==typeof n||"boolean"==typeof n?e.definition().isAssignableFrom(Te.Universe10.Reference.name)&&x(i,e,n+"",t):e.definition().isAssignableFrom(Te.Universe10.Reference.name)&&x(i,e,null,t);if(r){var c=w(i.range(),e.parent(),r,i);c instanceof Error&&(Xe.isInstance(c)?t.accept(Q(c,e)):t.accept(Z(xe.SCHEMA_EXCEPTION,{msg:c.message},e,c.isWarning)),c=null)}},e}(),et=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.universe(),r=n.getTypedVersion();if(r){if("0.8"!==r&&"1.0"!==r){var i=Z(xe.UNKNOWN_RAML_VERSION,{},e);t.accept(i)}var a=n.getOriginalTopLevelText();if(a){var o={typeName:a};if(a!=e.definition().nameId()){if("Api"==e.definition().nameId()){var i=Z(xe.UNKNOWN_TOPL_LEVEL_TYPE,o,e);t.accept(i)}}else if("Api"==n.getOriginalTopLevelText()){var i=Z(xe.REDUNDANT_FRAGMENT_NAME,o,e);t.accept(i)}}}},e}(),tt=function(){function e(){}return e.prototype.validate=function(e,t){var n=this;e.definition().getAdapter(Ne.RAMLService).getContextRequirements().forEach(function(n){if(!e.checkContextValue(n.name,n.value,n.value)){var r={v1:n.name,v2:n.value,v3:e.definition().nameId()},i=xe.CONTEXT_REQUIREMENT_VIOLATION;"location"==n.name&&"ParameterLocation.FORM"==n.value&&(i=xe.WEB_FORMS),t.accept(Z(i,r,e))}});var r,i=e.definition().getAdapter(Ne.RAMLService).isInlinedTemplates();if(i){for(var a={},o=0,s=e.lowLevel().children();o0&&a&&a.getByChain(s)){var l=u[0].value();t.accept(Z(xe.LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE,{typeName:s,chainedType:l},e))}else t.accept(Z(xe.UNKNOWN_ANNOTATION_TYPE,{typeName:s},e))}else t.accept(ee(n.getCode(),n.getMessage(),j(e,n).node,!1))}):o.getErrors().forEach(function(n){return t.accept(ee(n.getCode(),n.getMessage(),j(e,n).node,!1))}))}},e}(),it=function(){function e(){this.annotables={API:!0,DocumentationItem:!0,Resource:!0,Method:!0,Response:!0,RequestBody:!0,ResponseBody:!0,TypeDeclaration:!0,Example:!0,ResourceType:!0,Trait:!0,SecurityScheme:!0,SecuritySchemeSettings:!0,AnnotationType:!0,Library:!0,Overlay:!0,Extension:!0}}return e.prototype.validate=function(e,t){var n=(e.definition(),e.parsedType()),r=n.validateType(e.types().getAnnotationTypeRegistry());if(!r.isOk())for(var i=0,a=r.getErrors();i0?t.accept(Z(xe.ALLOWED_TARGETS_MUST_BE_ARRAY,{},e,!1)):this.annotables[r]||t.accept(Z(xe.UNSUPPORTED_ANNOTATION_TARGET,{aTarget:r},e,!1))}},e}(),at=function(){function e(){}return e.prototype.validate=function(e,t){if(!e.definition().isAnnotationType()){if(e.lowLevel().keyKind()==ye.Kind.SEQ){var n=e.definition().isAssignableFrom(Te.Universe10.TypeDeclaration.name);n||t.accept(Z(xe.NODE_KEY_IS_A_SEQUENCE,{},e))}var r=e.name();if(null==r&&(r=e.lowLevel().key(),null==r&&(r="")),e.definition().key()==Te.Universe08.GlobalSchema&&e.lowLevel().valueKind()!=ye.Kind.SCALAR){var o=!1;if(e.lowLevel().valueKind()==ye.Kind.ANCHOR_REF||e.lowLevel().valueKind()==ye.Kind.INCLUDE_REF){var s=e.lowLevel().value();"string"==typeof s&&(o=!0)}o||t.accept(Z(xe.SCHEMA_NAME_MUST_BE_STRING,{name:r},e))}e.parent()||((new et).validate(e,t),e.definition().key()!=Te.Universe08.Api&&e.definition().key()!=Te.Universe10.Api||(new Ie).validateApi(e.wrapperNode(),t),(new nt).validate(e,t),a(e,t)),(new pt).validate(e,t);var u=e.definition();if(u.key()==Te.Universe08.BodyLike&&e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return"formParameters"===e}))if(e.parent()&&e.parent().definition().key()==Te.Universe08.Response){var l=Z(xe.FORM_PARAMS_IN_RESPONSE,{},e);t.accept(l)}else if(e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return"schema"===e||"example"===e})){var l=Z(xe.FORM_PARAMS_WITH_EXAMPLE,{},e);t.accept(l)}if(u.key()==Te.Universe10.OAuth2SecuritySchemeSettings){var p=!1;if(e.attributes("authorizationGrants").forEach(function(e){var n=e.value();if("authorization_code"===n||"implicit"===n)p=!0;else if("password"!==n&&"client_credentials"!==n&&n&&"string"==typeof n&&n.indexOf("://")==-1&&n.indexOf(":")==-1){var r=Z(xe.AUTHORIZATION_GRANTS_ENUM,{},e);t.accept(r)}}),p&&!e.attr("authorizationUri")){var l=Z(xe.AUTHORIZATION_URI_REQUIRED,{},e);t.accept(l)}}if(e.definition().isAssignableFrom(Te.Universe08.Parameter.name)||e.definition().isAssignableFrom(Te.Universe10.TypeDeclaration.name)){var f=e.attributes("enum").map(function(e){return e.value()});if(f.length!=me.uniq(f).length){var l=Z(xe.REPEATING_COMPONENTS_IN_ENUM,{},e);t.accept(l)}if(e.definition().isAssignableFrom(Te.Universe08.NumberTypeDeclaration.name)||e.definition().isAssignableFrom(Te.Universe10.NumberTypeDeclaration.name)){var h=e.definition().isAssignableFrom(Te.Universe08.IntegerTypeDeclaration.name)||e.definition().isAssignableFrom(Te.Universe10.IntegerTypeDeclaration.name);e.attributes("enum").forEach(function(e){var n=h?parseInt(e.value()):parseFloat(e.value()),r=h?!isNaN(n)&&e.value().indexOf(".")===-1:!isNaN(n);if(!r){var i=Z(h?xe.INTEGER_EXPECTED:xe.NUMBER_EXPECTED_2,{},e);t.accept(i)}})}}_e.isResourceTypeType(e.definition())&&null==e.value()&&0==e.lowLevel().children().length&&"RAML08"==e.definition().universe().version()&&e.lowLevel().resolvedValueKind()==ye.Kind.SCALAR&&t.accept(Z(xe.RESOURCE_TYPE_NULL,{},e)),i(e,t);var d=e.value();if(("string"==typeof d||"number"==typeof d||"boolean"==typeof d)&&!e.definition().getAdapter(Ne.RAMLService).allowValue()&&e.parent()&&"~"!=d){var m=null!=c(e)&&"string"==typeof d&&Ce.startsWith(d,"<<")&&Ce.endsWith(d,">>"),y=!0;if(""==d){var v=e.lowLevel().actual()&&e.lowLevel().actual().value;v&&(v.doubleQuoted||v.singleQuoted)||(y=!1); -}if(y&&!m&&!oe(e,t,xe.SCALAR_PROHIBITED_2.code)){var l=Z(xe.SCALAR_PROHIBITED_2,{name:r},e);t.accept(l)}}(new tt).validate(e,t),(new ht).validate(e,t),(new ut).validate(e,t)}},e}(),ot=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.attrValue(Te.Universe10.TypeDeclaration.properties.name.name);"version"==n&&t.accept(Z(xe.VERSION_NOT_ALLOWED,{},e))},e}(),st=function(){function e(e,t,n,r){void 0===r&&(r=!1),this.definitions=e,this.propertyName=t,this.assignableFrom=r,this.validator=n}return e.prototype.validate=function(e,t){var n=e.definition();if(null!=n){var r=!1;if(r=this.assignableFrom?this.definitions.some(function(e){return n.isAssignableFrom(e.name)}):this.definitions.some(function(e){return e===n})){if(null!=this.propertyName){if(null==e.property())return;if(e.property().nameId()!=this.propertyName)return}this.validator.validate(e,t)}}},e}(),ut=function(){function e(){}return e.createRegistry=function(){var t=[];return e.registerValidator(t,[Te.Universe10.TypeDeclaration,Te.Universe08.Parameter],Te.Universe10.Api.properties.baseUriParameters.name,new ot,!0),t},e.registerValidator=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new st(t,n,r,i);e.push(a)},e.prototype.validate=function(t,n){e.entries.forEach(function(e){return e.validate(t,n)})},e.entries=e.createRegistry(),e}(),lt=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.definition();if(n&&(_e.isApiSibling(n)||_e.isMethodBaseSibling(n))){var r=e.lowLevel(),i=r.children().find(function(e){return e.key()==Te.Universe10.Api.properties.protocols.name});if(i){var a=i.value();null==a&&0==i.children().length?t.accept(te(xe.PROTOCOLS_ARRAY,{},i,e)):i.resolvedValueKind()!=ye.Kind.SEQ&&t.accept(te(xe.PROTOCOLS_ARRAY,{},i,e))}}},e}(),pt=function(){function e(){}return e.prototype.allowsAnyChildren=function(e,t){var n=e.property(),r=e.definition();return!(!_e.isAnnotationTypeType(r)&&!_e.isTypeDeclarationTypeOrDescendant(r)||!_e.isAnnotationTypesProperty(n))||(!(e.parent()!=t||!_e.isTypesProperty(n)||!_e.isTypeDeclarationTypeOrDescendant(r))||(!(!_e.isSchemasProperty(n)||!_e.isTypeDeclarationTypeOrDescendant(r))||(!(e.parent()!=t||!_e.isDocumentationProperty(n)||!_e.isDocumentationType(r))||(!!_e.isAnnotationsProperty(n)||(!!_e.isUsesProperty(n)||!!_e.isExamplesProperty(n))))))},e.prototype.nodeAllowedDueToParent=function(e,t){for(var n=e;n!=t&&null!=n;){if(this.allowsAnyChildren(n,t))return!0;n=n.parent()}return!1},e.prototype.validate=function(e,t){var n=e.root();if(!n.isExpanded()||n.lowLevel().unit().absolutePath()==e.lowLevel().unit().absolutePath()){e.property(),e.definition();if(_e.isOverlayType(n.definition())){if(e==n)return void this.validateProperties(e,t);if(!this.nodeAllowedDueToParent(e,n)){var r=n.knownIds();if(r){var i=r.hasOwnProperty(e.id());return i?void this.validateProperties(e,t):void t.accept(Z(xe.INVALID_OVERLAY_NODE,{nodeId:e.id()},e))}}}}},e.prototype.validateProperties=function(e,t){var n=e.root(),r=n.lowLevel().unit().absolutePath(),i=n.isExpanded();e.attrs().forEach(function(n){i&&r!=n.lowLevel().unit().absolutePath()||n.property().getAdapter(Ne.RAMLPropertyService).isKey()||n.parent()==e&&(n.isElement()||_e.isTitlePropertyName(n.name())||_e.isDescriptionPropertyName(n.name())||_e.isDisplayNamePropertyName(n.name())||_e.isUsagePropertyName(n.name())||_e.isExampleProperty(n.property())||_e.isMasterRefProperty(n.property())||_e.isAnnotationsProperty(n.property())||_e.isUsesProperty(n.property())||t.accept(Z(xe.INVALID_OVERRIDE_IN_OVERLAY,{propName:n.name()},n)))})},e}(),ct=function(){function e(){}return e.prototype.validate=function(e,t){var n=this,r=new pt;r.validate(e,t),e.directChildren().forEach(function(e){e.isElement()&&n.validate(e.asElement(),t)})},e}(),ft=function(){function e(){}return e.prototype.val=function(e,t,n){var r=this;if(e.kind()==ye.Kind.MAP||e.kind()==ye.Kind.MAPPING){var i={};e.children().forEach(function(e){var r=e.key();if(r){if(i.hasOwnProperty(r)){var a=Z(xe.KEYS_SHOULD_BE_UNIQUE,{},n,!1);e.unit()==n.lowLevel().unit()&&(a.start=e.keyStart(),a.end=e.keyEnd()),t.accept(a)}i[r]=1}})}e.children().forEach(function(e){r.val(e,t,n)})},e.prototype.validate=function(e,t){this.val(e.lowLevel(),t,e)},e}(),ht=function(){function e(){}return e.prototype.validate=function(e,t){this.validateChildElements(e,t);var n=e.lowLevel().children(),r=me.groupBy(n.filter(function(e){return null!=e.key()}),function(e){return e.key()});this.validateChildAttributes(e,r,t),this.validateUnrecognizedLowLevelChildren(e,r,t)},e.prototype.validateChildElements=function(e,t){var n={},r=e.directChildren().filter(function(e){return e.isElement()});r.forEach(function(e){var t=e;if(!t._computed&&t.name()){var r=t.name()+t.property().nameId();n.hasOwnProperty(r)?t.isNamePatch()||n[r].push(t):n[r]=[t]}}),Object.keys(n).forEach(function(e){var r=n[e];!r||r.length<2||r.forEach(function(e){var n=D(e),r={name:e.name()},i=xe.ALREADY_EXISTS_IN_CONTEXT;n&&(r.capitalized=De.upperCaseFirst(n),i=xe.ALREADY_EXISTS);var a=Z(i,r,e);t.accept(a)})})},e.prototype.validateChildAttributes=function(e,t,n){var r=this.getHighLevelAttributes(e),i=me.groupBy(r,function(e){return e.name()}),a=this.allowsAnyAndHasRequireds(e);Object.keys(i).forEach(function(r){if(!(i[r].length<2)){var o=i[r][0].isUnknown(),s=!o&&i[r][0].property().isMultiValue();s&&(e.definition().isAssignableFrom(Te.Universe08.SecuritySchemeSettings.name)||e.definition().isAssignableFrom(Te.Universe10.SecuritySchemeSettings.name))&&(s=t[r]&&1===t[r].length),(o&&a||!s||s&&null!=t[r]&&t[r].length>1)&&i[r].forEach(function(e){var t={propName:e.property()?e.property().nameId():e.name()},r=xe.PROPERTY_USED,i=D(e.parent());i&&(t.parent=De.upperCaseFirst(i),r=xe.PARENT_PROPERTY_USED);var a=Z(r,t,e);n.accept(a)})}})},e.prototype.validateUnrecognizedLowLevelChildren=function(e,t,n){var r=e.directChildren(),i=me.groupBy(r,function(e){return e.name()});Object.keys(t).forEach(function(r){if(r&&t[r].length>1&&!i[r]){if(e.definition().isAssignableFrom(Te.Universe10.ObjectTypeDeclaration.name))return;var a={propName:r},o=xe.PROPERTY_USED,s=D(e);s&&(a.parent=De.upperCaseFirst(s),o=xe.PARENT_PROPERTY_USED),t[r].forEach(function(t){var r=te(o,a,t,e);r.start=t.keyStart(),r.end=t.keyEnd(),n.accept(r)})}})},e.prototype.filterMultiValueAnnotations=function(e,t,n){this.getHighLevelAttributes(e);Object.keys(t).forEach(function(e){"("!==e.charAt(0)||t[e].length<2})},e.prototype.getHighLevelAttributes=function(e){var t=this.allowsAnyAndHasRequireds(e);return e.directChildren().filter(function(e){return e.isAttr()||t})},e.prototype.allowsAnyAndHasRequireds=function(e){var t=e.definition().requiredProperties(),n=t&&t.length>0,r=e.definition().getAdapter(Ne.RAMLService),i=r&&r.getAllowAny(),a=i&&n;return a},e}(),dt=function(){function e(){}return e.prototype.validate=function(e,t){if(e.definition().isAssignableFrom(Te.Universe10.UsesDeclaration.name)){var n=e.attr(Te.Universe10.UsesDeclaration.properties.value.name),r=n&&n.value();if(null!=r&&"string"==typeof r){var i=e.lowLevel().unit().resolve(r);if(e.root().lowLevel().actual().libExpanded){var a=i,o=a.ast(),s=o.children().filter(function(e){var t=e.key();return Ce.startsWith(t,"(")&&Ce.endsWith(t,")")});if(s.length>0)for(var u=e.root().lowLevel().unit(),l=u.project().namespaceResolver(),p=e.root().definition().universe().type(Te.Universe10.Annotable.name),c=(p.property(Te.Universe10.Annotable.properties.annotations.name),0),f=s;c=0&&(g=y.substring(0,A),v=y.substring(A+1));var E=a;if(g){var T=l.nsMap(a);T.hasOwnProperty(g)&&(E=T[g].unit)}var _=!1;if(E){var S=l.unitModel(E);S.annotationTypes.hasElement(v)||(_=!0)}else _=!0;if(_){var N=Re.messageRegistry.UNKNOWN_ANNOTATION_TYPE,I=te(N,{typeName:y},h,e),b=Z(xe.ISSUES_IN_THE_LIBRARY,{value:r},e,!0);I.extras.push(b),t.accept(I)}}}return}if(i&&null!==i.contents()){if(!Pe.isWaitingFor(r)){var M=[];if(0===i.contents().trim().length)return void t.accept(Z(xe.EMPTY_FILE,{path:r},e,!1));var R=i.highLevel().asElement(),C=new ge.ASTNodeImpl(R.lowLevel(),R.parent(),R.definition(),R.property());if(C.setValueSource(e),C.validate(ge.createBasicValidationAcceptor(M,C)),M.length>0&&e.lowLevel().start()>=0){var w=je(n,e);M.forEach(function(e){e.unit=null==e.unit?i:e.unit,e.path||(e.path=i.path())});for(var P=0,L=M;P0;)if(D=D.extras[0],D==w){U=!0;break}U||(D.extras||(D.extras=[]),D.extras.push(w)),t.accept(O)}}}}else t.accept(Z(xe.INVALID_LIBRARY_PATH,{path:r},e,!1))}}},e}(),mt=function(){function e(){}return e.prototype.validate=function(e,t){var n=this.isStrict(e);if(n||Fe.validateNotStrictExamples){var r=this.parseObject(e,t,n);if(null!=r){var i=this.aquireSchema(e);if(i){var a=r;"object"==typeof a&&(a=e.value()),i.validate(a,t,n)}}}},e.prototype.isExampleNode=function(e){return this.isSingleExampleNode(e)||this.isExampleNodeInMultipleDecl(e)},e.prototype.isSingleExampleNode=function(e){return e.name()==Te.Universe10.TypeDeclaration.properties.example.name},e.prototype.isExampleNodeInMultipleDecl=function(e){var t=e.parent();return!!t&&_e.isExampleSpecType(t.definition())},e.prototype.findParentSchemaOrTypeAttribute=function(e){var t=e.parent().attr(Te.Universe10.TypeDeclaration.properties.schema.name);return t?t:(t=e.parent().attr(Te.Universe10.TypeDeclaration.properties.type.name))?t:e.parent()?(t=e.parent().parent().attr(Te.Universe10.TypeDeclaration.properties.schema.name))?t:(t=e.parent().parent().attr(Te.Universe10.TypeDeclaration.properties.type.name),t?t:null):null},e.prototype.aquireSchema=function(e){var t=e.parent().definition().isAssignableFrom(Te.Universe10.TypeDeclaration.name);if(this.isExampleNode(e)){var n=e;if(this.isExampleNodeInMultipleDecl(e)&&(n=e.parent()),n.parent()&&(n.parent().definition().isAssignableFrom(Te.Universe10.TypeDeclaration.name)&&null===n.parent().parent()?t=!1:n.parent().property().nameId()==Te.Universe10.LibraryBase.properties.types.name&&(t=!1),n.parent().parent())){var r=n.parent().parent().definition().key();r!=Te.Universe08.Method&&r!=Te.Universe10.Method||n.parent().property().nameId()==Te.Universe10.MethodBase.properties.queryParameters.name||(t=!0),r!=Te.Universe08.Response&&r!=Te.Universe10.Response||(t=!0)}}if(e.parent().definition().key()==Te.Universe08.BodyLike||t){var i=this.findParentSchemaOrTypeAttribute(e);if(i){var a=i.value();if(ge.StructuredValue.isInstance(a))return null;var o=(""+a).trim(),s=null;if("{"==o.charAt(0))try{s=Le.getJSONSchema(o,Y(i.lowLevel()))}catch(e){return null}if("<"==o.charAt(0))try{s=Le.getXMLSchema(o)}catch(e){return null}if(s)return{validate:function(t,n,r){try{if(t.__$validated)return;if(s instanceof Error)return void n.accept(Z(xe.INVALID_VALUE_SCHEMA,{iValue:s.message},e,!r));s.validate(t)}catch(t){var a="Cannot assign to read only property '__$validated' of ";if(t.message&&0==t.message.indexOf(a)){var o=t.message.substr(a.length,t.message.length-a.length);return void n.accept(Z(xe.INVALID_JSON_SCHEMA,{propName:o},i,!r))}if("Object.keys called on non-object"==t.message)return;return Xe.isInstance(t)?void(oe(e,n,t.messageEntry.code,!r)||n.accept(Q(t,e,!r))):void n.accept(Z(xe.EXAMPLE_SCHEMA_FAILURE,{msg:t.message},e,!r))}}};if(o.length>0){var u=e.parent(),l=u&&u.parent(),p=u&&u.definition()&&u.definition().isAssignableFrom(Te.Universe10.ObjectTypeDeclaration.name)&&u;if(p=p||l&&l.definition()&&l.definition().isAssignableFrom(Te.Universe10.ObjectTypeDeclaration.name)&&l)return this.typeValidator(p,e)}}}return this.getSchemaFromModel(e)},e.prototype.getSchemaFromModel=function(e){var t=e.parent();return this.typeValidator(t,e)},e.prototype.typeValidator=function(e,t){var n={validate:function(n,r,i){var a=e.parsedType();if(a&&!a.isUnknown()){"number"==typeof n&&a.isString()&&(n=""+n),"boolean"==typeof n&&a.isString()&&(n=""+n),a.getExtra("repeat")&&(n=[n]);var o=a.validate(n,!1);o.isOk()||o.getErrors().forEach(function(e){return r.accept(ee(e.getCode(),e.getMessage(),t,!i,e.getInternalRange()))})}}};return n},e.prototype.toObject=function(e,t,n){var r=t.lowLevel().dumpToObject(!0);return this.testDublication(e,t.lowLevel(),n),r.example?r.example:r.content?r.content:void 0},e.prototype.testDublication=function(e,t,n){var r=this,i={};t.children().forEach(function(t){t.key()&&(i[t.key()]&&n.accept(Z(xe.KEYS_SHOULD_BE_UNIQUE,{},new ge.BasicASTNode(t,e.parent()))),i[t.key()]=t),r.testDublication(e,t,n)})},e.prototype.parseObject=function(e,t,n){var r=null,i=e.value(),a=X(e);if(ge.StructuredValue.isInstance(i))r=this.toObject(e,i,t);else if(a){var o=se(a,i,t,e,!n);if(!o.status)return;r=o.result}else try{if(!(i&&i.length>0)||"["!=i.trim().charAt(0)&&"{"!=i.trim().charAt(0)&&"<"!=i.trim().charAt(0))return i;r=JSON.parse(i)}catch(a){if(0!=i.trim().indexOf("<"))return i;try{r=Oe.parseXML(i)}catch(r){return void t.accept(Z(xe.CAN_NOT_PARSE_XML,{msg:r.message},e,!n))}}return null!=r&&"object"!=typeof r?i:r},e.prototype.isStrict=function(e){if(_e.isDefaultValue(e.property()))return!0;if(_e.isExampleProperty(e.property())&&"RAML08"==e.parent().definition().universe().version())return!1;var t=!1,n=e.parent().attr("strict");return n&&"true"==n.value()&&(t=!0),t},e}();t.ExampleAndDefaultValueValidator=mt;var yt=function(e,t,n){var r=De.sentence(e).toLowerCase();return t||(r=De.ucFirst(r)),n&&(r=Ue.plural(r)),r},vt=function(){function e(){}return e.prototype.validate=function(e,t){if(e.isAttr()){if(!e.optional())return;var n=e,r=n.property();if(r.isMultiValue()||r.range().isArray())return;if(!r.isFromParentKey()){var i=c(n.parent());if(i&&r.isValueProperty()){var a=Z(xe.OPTIONAL_SCLARAR_PROPERTIES_10,{templateName:i.nameId(),propName:n.name()},n,!1);t.accept(a)}}}else if(e.isElement()){var o=e,r=o.property(),s=o.allowsQuestion();s||o.optionalProperties().forEach(function(n){o.children().forEach(function(n){var i={propName:r.nameId(),oPropName:n.lowLevel().key()},a=Z(xe.OPTIONAL_PROPERTIES_10,i,e,!1);t.accept(a)})});var u=e.asElement().definition();if(e.optional()&&"RAML10"==u.universe().version()){var r=e.property(),l=_e.isQueryParametersProperty(r)||_e.isUriParametersProperty(r)||_e.isHeadersProperty(r);if(!(_e.isMethodType(u)||_e.isTypeDeclarationType(u)&&l)){var a=Z(xe.ONLY_METHODS_CAN_BE_OPTIONAL,{},e,!1);t.accept(a)}}}},e}(),gt=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.definition(),r=Te.Universe10.Api.properties.baseUri.name,i=Te.Universe10.Api.properties.baseUriParameters.name,a=Te.Universe10.Resource.properties.relativeUri.name,o=Te.Universe10.ResourceBase.properties.uriParameters.name;if(_e.isApiSibling(n))this.inspectParameters(e,t,r,i);else if(_e.isResourceType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s),this.inspectParameters(e,t,a,o)}else if(_e.isResourceTypeType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s)}},e.prototype.inspectParameters=function(e,t,n,r,i){i=i||e;var a="",o=i.attr(n);o&&(a=o.value(),a&&"string"==typeof a||(a=""));var s=e.elementsOfKind(r);s.forEach(function(n){var i=n.attr(Te.Universe10.TypeDeclaration.properties.name.name);if(i){var o=i.value();if(null!=o&&a.indexOf("{"+o+"}")<0){if(_e.isResourceTypeType(e.definition())&&o.indexOf("<<")>=0)return;var s=De.upperCaseFirst(Ue.singular(De.sentence(r))),u=Z(xe.PROPERTY_UNUSED,{propName:s},n,!0);t.accept(u)}}})},e}(),At=function(){function e(){this.nameProperty=Te.Universe10.ResourceType.properties.name.name}return e.prototype.validate=function(e,t){var n=e.definition();if(_e.isLibraryBaseSibling(n)||_e.isApiType(n)){var r,i,a=(Te.Universe10.LibraryBase.properties.resourceTypes.name,Te.Universe10.ResourceBase.properties.type.name),o=(Te.Universe10.LibraryBase.properties.traits.name,Te.Universe10.MethodBase.properties.is.name);e.root().lowLevel().actual().libExpanded?(r=e.elementsOfKind(Te.Universe10.LibraryBase.properties.resourceTypes.name),i=e.elementsOfKind(Te.Universe10.LibraryBase.properties.traits.name)):(r=Me.globalDeclarations(e).filter(function(e){return _e.isResourceTypeType(e.definition())}),i=Me.globalDeclarations(e).filter(function(e){return _e.isTraitType(e.definition())})),this.checkCycles(r,a,t),this.checkCycles(i,o,t)}},e.prototype.checkCycles=function(e,t,n){var r=this,i={};e.forEach(function(e){var t=r.templateName(e);i[t]=e});var a={};e.forEach(function(e){var o=r.templateName(e);a[o]||r.findCyclesInDefinition(e,t,i).forEach(function(t){t.forEach(function(e){return a[e]=!0}),t=t.reverse();var r=yt(e.definition().nameId()),i=t.join(" -> "),o={typeName:r,cycle:i},s=Z(xe.CYCLE_IN_DEFINITION,o,e,!1);n.accept(s)})})},e.prototype.templateName=function(e){var t=e.attr(this.nameProperty);return t?t.value():null},e.prototype.findCyclesInDefinition=function(e,t,n,r){void 0===r&&(r={});var i=this.templateName(e);if(r[i])return[[i]];var a={};Object.keys(r).forEach(function(e){return a[e]=r[e]}),a[i]=!0;for(var o=[],s=e.attributes(t),u=0;u0&&(h=m);var y=l.keyEnd();y>0&&(d=y)}if(d0&&y>m&&(h=m,d=y)}}return{code:t,isWarning:n,message:r,node:e,start:h,end:d,path:i?l.unit()?l.unit().path():"":null,extras:[],unit:e?l.unit():null}},_t=function(e,t,n,r,i,a,o,s,u){if(void 0===s&&(s=!1),void 0===u&&(u=!1),o){var l=$(null,e,n,r,i,a,null,o,u,s);if(l)return l}var p=e.unit()&&e.unit().contents(),c=p&&p.length,f=e.start(),h=e.end();if(c&&h>=c&&(h=c-1),e.key()&&e.keyStart()){var d=e.keyStart();d>0&&(f=d);var m=e.keyEnd();m>0&&(h=m)}var y=e.value(!0);return s&&y&&y.length>0&&(f=e.valueStart(),h=e.valueEnd()),{code:n,isWarning:r,message:i,node:t,start:f,end:h,path:a?e.unit()?e.unit().path():"":null,extras:[],unit:e?e.unit():null}};t.toIssue=J,t.createIssue1=Z,t.createIssue=ee,t.createLLIssue=ne,t.validateResponseString=re,t.applyTemplate=ie;var St=function(){function e(){this.propertiesMap={},this.init()}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.init=function(){for(var e=ve.getUniverse.availableUniverses(),t=0,n=e;t0&&(n.__$errors__=r)}return n}var s=[];return e.children().forEach(function(e){s.push(i(e,t))}),s}function a(e){var t=[].concat(e.errors());return e.children().forEach(function(e){var n=e.children();return 0==n.length?void e.errors().forEach(function(e){return t.push(e)}):void(n[0].key()||n.forEach(function(e){0==e.children().length&&e.errors().forEach(function(e){return t.push(e)})}))}),t}function o(e,t){return t&&e&&t.escapeNumericKeys&&0==e.replace(/\d/g,"").trim().length?"__$EscapedKey$__"+e:e}function s(e,t){return e?(t=t||{},t.escapeNumericKeys&&f.stringStartsWith(e,"__$EscapedKey$__")&&0==e.substring("__$EscapedKey$__".length).replace(/\d/g,"").trim().length?e.substring("__$EscapedKey$__".length):e):e}Object.defineProperty(t,"__esModule",{value:!0});var u=n(21),l=n(5),p=n(55),c=n(16),f=n(15),h=n(4),d=n(206),m=u.YAMLException,y=function(){function e(e,t,n,r,i,a){void 0===a&&(a={}),this._absolutePath=e,this._path=t,this._content=n,this._project=r,this._isTopoLevel=i,this.serializeOptions=a,this._node=new v(this,JSON.parse(this._content),null,a)}return e.prototype.highLevel=function(){return p.fromUnit(this)},e.prototype.absolutePath=function(){return this._absolutePath},e.prototype.clone=function(){return null},e.prototype.contents=function(){return this._content},e.prototype.lexerErrors=function(){return[]},e.prototype.path=function(){return this._content},e.prototype.isTopLevel=function(){return this._isTopoLevel},e.prototype.ast=function(){return this._node},e.prototype.expandedHighLevel=function(){return this.highLevel()},e.prototype.isDirty=function(){return!0},e.prototype.getIncludeNodes=function(){return[]},e.prototype.resolveAsync=function(e){return null},e.prototype.isRAMLUnit=function(){return!0},e.prototype.project=function(){return this._project},e.prototype.updateContent=function(e){},e.prototype.ramlVersion=function(){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.lineMapper=function(){return new l.LineMapperImpl(this.contents(),this.absolutePath())},e.prototype.resolve=function(e){return null},e.prototype.isOverlayOrExtension=function(){return!1},e.prototype.getMasterReferenceNode=function(){return null},e}();t.CompilationUnit=y;var v=function(){function e(e,t,n,r,i){void 0===r&&(r={});var a=this;this._unit=e,this._object=t,this._parent=n,this.options=r,this._key=i,this._isOptional=!1,this._object instanceof Object&&Object.keys(this._object).forEach(function(e){var t=s(e,a.options);if(t!=e){var n=a._object[e];delete a._object[e],a._object[t]=n}}),this._key&&f.stringEndsWith(this._key,"?")&&(this._isOptional=!0,this._key=this._key.substring(0,this._key.length-1))}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&c.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.keyKind=function(){return null},e.prototype.isAnnotatedScalar=function(){return!1},e.prototype.hasInnerIncludeError=function(){return!1},e.prototype.start=function(){return-1},e.prototype.end=function(){return-1},e.prototype.value=function(){return this._object},e.prototype.actual=function(){return this._object},e.prototype.includeErrors=function(){return[]},e.prototype.includePath=function(){return null},e.prototype.includeReference=function(){return null},e.prototype.key=function(){return this._key},e.prototype.optional=function(){return this._isOptional},e.prototype.children=function(){var t=this;return this._object?Array.isArray(this._object)?this._object.map(function(n){return new e(t._unit,n,t,t.options)}):this._object instanceof Object?Object.keys(this._object).map(function(n){return new e(t._unit,t._object[n],t,t.options,n)}):[]:[]},e.prototype.parent=function(){return this._parent},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.anchorId=function(){return null},e.prototype.errors=function(){return[]},e.prototype.anchoredFrom=function(){return this},e.prototype.includedFrom=function(){return this},e.prototype.visit=function(e){e(this)&&this.children().forEach(function(t){return t.visit(e)})},e.prototype.dumpToObject=function(){return this._object},e.prototype.addChild=function(e){},e.prototype.execute=function(e){},e.prototype.dump=function(){return JSON.stringify(this._object)},e.prototype.keyStart=function(){return-1},e.prototype.keyEnd=function(){return-1},e.prototype.valueStart=function(){return-1},e.prototype.valueEnd=function(){return-1},e.prototype.isValueLocal=function(){return!0},e.prototype.kind=function(){return Array.isArray(this._object)?u.Kind.SEQ:this._object instanceof Object?u.Kind.MAP:u.Kind.SCALAR},e.prototype.valueKind=function(){if(!this._object)return null;var e=typeof this._object;return Array.isArray(this._object)?u.Kind.SEQ:"object"==e?u.Kind.MAP:"string"==e||"number"==e||"boolean"==e?u.Kind.SCALAR:null},e.prototype.anchorValueKind=function(){return null},e.prototype.resolvedValueKind=function(){return this.valueKind()},e.prototype.show=function(e){},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.text=function(e){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.copy=function(){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.markup=function(e){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.nodeDefinition=function(){return h.getDefinitionForLowLevelNode(this)},e.prototype.includesContents=function(){return!1},e.CLASS_IDENTIFIER="json2LowLeve.AstNode",e}();t.AstNode=v,t.serialize2=r,t.serialize=i},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var i=n(22);t.load=i.load,t.loadAll=i.loadAll,t.safeLoad=i.safeLoad,t.safeLoadAll=i.safeLoadAll;var a=n(53);t.dump=a.dump,t.safeDump=a.safeDump,t.YAMLException=n(25),r(n(23)),r(n(54))},function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function a(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function l(e){return 48<=e&&e<=57?e-48:-1}function p(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function c(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t,n){return void 0===n&&(n=!1),new j(t,new W(e.filename,e.input,e.position,e.line,e.position-e.lineStart),n)}function h(e,t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!1);var a=A(e,t);if(a){var o=n+t;if(!e.errorMap[o]){var s=new W(e.filename,e.input,t,a.line,t-a.start);i&&(s.toLineEnd=!0);var u=new j(n,s,r);e.errors.push(u)}}}function d(e,t){var n=f(e,t),r=n.message+n.mark.position;if(!e.errorMap[r]){e.errors.push(n),e.errorMap[r]=1;for(var i=e.position;;){if(e.position>=e.input.length-1)return;var a=e.input.charAt(e.position);if("\n"==a)return e.position--,void(e.position==i&&(e.position+=1));if("\r"==a)return e.position--,void(e.position==i&&(e.position+=1));e.position++}}}function m(e,t){var n=f(e,t);e.onWarning&&e.onWarning.call(null,n)}function y(e,t,n,r){var i,a,o,s,u=e.result;if(u.startPosition==-1&&(u.startPosition=t),t<=n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;it);r++)n=e.lines[r];return n?n:{start:0,line:0}}function E(e,t,n){for(var a=0,o=e.input.charCodeAt(e.position);0!==o;){for(;i(o);)9===o&&e.errors.push(f(e,"Using tabs can lead to unpredictable results",!0)),o=e.input.charCodeAt(++e.position);if(t&&35===o)do o=e.input.charCodeAt(++e.position);while(10!==o&&13!==o&&0!==o);if(!r(o))break;for(g(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==a&&e.lineIndent1&&(t.value+=K.repeat("\n",n-1))}function S(e,t,n){var s,u,l,p,c,f,h,d,m,v=e.kind,g=e.result,A=V.newScalar();if(A.plainScalar=!0,e.result=A,m=e.input.charCodeAt(e.position),a(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u)))return!1;for(e.kind="scalar",l=p=e.position,c=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),a(s))break}else{if(e.position===e.lineStart&&T(e)||n&&o(m))break;if(r(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,E(e,!1,-1),e.lineIndent>=t){c=!0,m=e.input.charCodeAt(e.position);continue}e.position=p,e.line=f,e.lineStart=h,e.lineIndent=d;break}}if(c&&(y(e,l,p,!1),_(e,A,e.line-f),l=p=e.position,c=!1),i(m)||(p=e.position+1),m=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return y(e,l,p,!1),e.result.startPosition!=-1?(A.rawValue=e.input.substring(A.startPosition,A.endPosition), -!0):(e.kind=v,e.result=g,!1)}function N(e,t){var n,i,a;if(n=e.input.charCodeAt(e.position),39!==n)return!1;var o=V.newScalar();for(o.singleQuoted=!0,e.kind="scalar",e.result=o,o.startPosition=e.position,e.position++,i=a=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(y(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),o.endPosition=e.position,39!==n)return!0;i=a=e.position,e.position++}else r(n)?(y(e,i,a,!0),_(e,o,E(e,!1,t)),i=a=e.position):e.position===e.lineStart&&T(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position,o.endPosition=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function I(e,t){var n,i,a,o,l,p;if(p=e.input.charCodeAt(e.position),34!==p)return!1;e.kind="scalar";var f=V.newScalar();for(f.doubleQuoted=!0,e.result=f,f.startPosition=e.position,e.position++,n=i=e.position;0!==(p=e.input.charCodeAt(e.position));){if(34===p)return y(e,n,e.position,!0),e.position++,f.endPosition=e.position,f.rawValue=e.input.substring(f.startPosition,f.endPosition),!0;if(92===p){if(y(e,n,e.position,!0),p=e.input.charCodeAt(++e.position),r(p))E(e,!1,t);else if(p<256&&(e.allowAnyEscape?se[p]:ae[p]))f.value+=e.allowAnyEscape?ue[p]:oe[p],e.position++;else if((l=u(p))>0){for(a=l,o=0;a>0;a--)p=e.input.charCodeAt(++e.position),(l=s(p))>=0?o=(o<<4)+l:d(e,"expected hexadecimal character");f.value+=c(o),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(p)?(y(e,n,i,!0),_(e,f,E(e,!1,t)),n=i=e.position):e.position===e.lineStart&&T(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function b(e,t){var n,r,i,o,s,u,l,p,c,f,h,m=!0,y=e.tag,g=e.anchor;if(h=e.input.charCodeAt(e.position),91===h)o=93,l=!1,r=V.newItems(),r.startPosition=e.position;else{if(123!==h)return!1;o=125,l=!0,r=V.newMap(),r.startPosition=e.position}for(null!==e.anchor&&(r.anchorId=e.anchor,e.anchorMap[e.anchor]=r),h=e.input.charCodeAt(++e.position);0!==h;){if(E(e,!0,t),h=e.input.charCodeAt(e.position),h===o)return e.position++,e.tag=y,e.anchor=g,e.kind=l?"mapping":"sequence",e.result=r,r.endPosition=e.position,!0;if(!m){var A=e.position;d(e,"missed comma between flow collection entries"),e.position=A+1}if(c=p=f=null,s=u=!1,63===h&&(i=e.input.charCodeAt(e.position+1),a(i)&&(s=u=!0,e.position++,E(e,!0,t))),n=e.line,O(e,t,G,!1,!0),c=e.tag,p=e.result,E(e,!0,t),h=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),E(e,!0,t),O(e,t,G,!1,!0),f=e.result),l)v(e,r,c,p,f);else if(s){var T=v(e,null,c,p,f);T.parent=r,r.items.push(T)}else p&&(p.parent=r),r.items.push(p);r.endPosition=e.position+1,E(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function M(e,t){var n,a,o,s,u=J,p=!1,c=t,f=0,h=!1;if(s=e.input.charCodeAt(e.position),124===s)a=!1;else{if(62!==s)return!1;a=!0}var m=V.newScalar();for(e.kind="scalar",e.result=m,m.startPosition=e.position;0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)J===u?u=43===s?Z:Q:d(e,"repeat of a chomping mode identifier");else{if(!((o=l(s))>=0))break;0===o?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?d(e,"repeat of an indentation width identifier"):(c=t+o-1,p=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(g(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentc&&(c=e.lineIndent),r(s))f++;else{if(e.lineIndentt)&&0!==i)d(e,"bad indentation of a sequence entry");else if(e.lineIndent0;)if(l=e.input.charCodeAt(--e.position),r(l)){e.position++;break}}}else 63===l?(g&&(v(e,f,h,m,null),h=m=y=null),A=!0,g=!0,s=!0):g?(g=!1,s=!0):d(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,l=o;if((e.line===u||e.lineIndent>t)&&(O(e,t,$,!0,s)&&(g?m=e.result:y=e.result),g||(v(e,f,h,m,y),h=m=y=null),E(e,!0,-1),l=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==l)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndent tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):h(e,g,"unknown tag <"+e.tag+">",!1,!0);return null!==e.tag||null!==e.anchor||v}function D(e){var t,n,o,s,u=e.position,l=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(E(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(l=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),o=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==s&&g(e),q.call(ce,n)?ce[n](e,n,o):(m(e,'unknown document directive "'+n+'"'),e.position++)}return E(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,E(e,!0,-1)):l&&d(e,"directives end mark is expected"),O(e,e.lineIndent-1,$,!1,!0),E(e,!0,-1),e.checkLineBreaks&&te.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&T(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,E(e,!0,-1))):void(e.position0&&(o[s-1].endPosition=n);for(var u=0,l=o;up.endPosition&&(p.startPosition=p.endPosition)}return o}function x(e,t,n){void 0===n&&(n={});var r,i,a=U(e,n);for(r=0,i=a.length;r0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(a="",o=this.position;ot/2-1){a=" ... ",o-=5;break}return s=this.buffer.slice(i,o),r.repeat(" ",e)+n+s+a+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},e.prototype.toString=function(e){void 0===e&&(e=!0);var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},e}();e.exports=i},function(e,t,n){"use strict";var r=n(28),i=new r.Schema({include:[n(30)],implicit:[n(40),n(41)],explicit:[n(42),n(47),n(48),n(49)]});e.exports=i},function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===i.indexOf(t)})}function i(){function e(e){r[e.tag]=e}var t,n,r={};for(t=0,n=arguments.length;t64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,a=l,o=0,u=[];for(t=0;t>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===n?(u.push(o>>10&255),u.push(o>>2&255)):12===n&&u.push(o>>4&255),s?new s(u):u}function a(e){var t,n,r="",i=0,a=e.length,o=l;for(t=0;t>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+e[t];return n=a%3,0===n?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function o(e){return s&&s.isBuffer(e)}var s=n(43).Buffer,u=n(29),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){(function(e){/*! +r.updateContent(t),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})}finally{(new Date).getTime()}},e.prototype.updatePositions=function(e,t){var n=this;if(null!=t)switch(t.startPosition==-1?t.startPosition=e:t.startPosition=e+t.startPosition,t.endPosition=e+t.endPosition,t.kind){case b.Kind.MAP:var r=t;r.mappings.forEach(function(t){return n.updatePositions(e,t)});break;case b.Kind.MAPPING:var i=t;this.updatePositions(e,i.key),this.updatePositions(e,i.value);break;case b.Kind.SCALAR:break;case b.Kind.SEQ:var a=t;a.items.forEach(function(t){return n.updatePositions(e,t)})}},e.prototype.findNode=function(e,t,n){var r=this;if(null==e)return null;var i=e;if(e.start()<=t&&e.end()>=n){var a=e;return i.directChildren().forEach(function(e){var i=r.findNode(e,t,n);i&&(a=i)}),a}return null},e.prototype.addTextChangeListener=function(e){this.tlisteners.push(e)},e.prototype.removeTextChangeListener=function(e){this.tlisteners=this.tlisteners.filter(function(t){return t!=e})},e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){this.listeners=this.listeners.filter(function(t){return t!=e})},e.prototype.namespaceResolver=function(){return this._namespaceResolver},e}();t.Project=J;var Q=function(){function e(e,t,n,r,i,a,o){void 0===a&&(a=!1),void 0===o&&(o=!1),this._node=e,this._unit=t,this._parent=n,this._anchor=r,this._include=i,this.cacheChildren=a,this._includesContents=o,this._errors=[]}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&R.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.actual=function(){return this._node},e.prototype.yamlNode=function(){return this._node},e.prototype.includesContents=function(){return this._includesContents},e.prototype.setIncludesContents=function(e){this._includesContents=e},e.prototype.gatherIncludes=function(t,n,r,i){var a=this;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=!0),null!=this._node){var o=this._node.kind;if(o!=b.Kind.SCALAR)if(o==b.Kind.MAP){var s=this._node;1!=s.mappings.length||i?s.mappings.map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)}):new e(s.mappings[0].value,this._unit,this,n,r,this.cacheChildren).gatherIncludes(t)}else if(o==b.Kind.MAPPING){var u=this._node;null==u.value||new e(u.value,this._unit,this,r?r:this._anchor,n?n:this._include,this.cacheChildren).gatherIncludes(t)}else if(o==b.Kind.SEQ){var l=this._node;l.items.filter(function(e){return null!=e}).map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)})}else o==b.Kind.INCLUDE_REF&&this._unit&&t.push(this);else if(D.isScheme(this._node.value)){var p=D.getReferences(this._node.value,this.unit());p.forEach(function(n){var r=b.newScalar(n);r.kind=b.Kind.INCLUDE_REF;var i=new e(r,a.unit(),null,null,null);t.push(i)})}}},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.start=function(){return this._node.startPosition},e.prototype.errors=function(){return this._errors},e.prototype.addIncludeError=function(e){if(!R.find(this._errors,function(t){return t.message==e.message})){var t=this._node;t.includeErrors||(t.includeErrors=[]),R.find(t.includeErrors,function(t){return t.message==e.message})||(this._errors.push(e),t.includeErrors.push(e))}},e.prototype.parent=function(){return this._parent},e.prototype.recalcEndPositionFromChilds=function(){var e=(this.children(),this.children()[0]),t=this.children()[this.children().length-1];if(this.isMapping()){var n=this.asMapping();if(n.value)if(n.value.kind==b.Kind.MAP){var r=n.value;r.startPosition<0&&e&&(r.startPosition=e.start()),t&&(this._node.endPosition=t._node.endPosition),this._node.endPosition=Math.max(this._node.endPosition,n.value.endPosition)}else if(n.value.kind==b.Kind.SEQ){var i=n.value;if(i.startPosition<0&&i.items.length>0){var a=i.items[0].startPosition,o=new M.TextRange(this.unit().contents(),a,a);o=o.extendSpacesBack().extendCharIfAnyBack("-"),i.startPosition=o.startpos()}if(i.items.length>0){var s=i.items[i.items.length-1];this._node.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition),i.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition)}}else n.value.kind==b.Kind.SCALAR||t&&(this._node.endPosition=t._node.endPosition)}else t&&(this._node.endPosition=t._node.endPosition)},e.prototype.isValueLocal=function(){if(this._node.kind==b.Kind.MAPPING){var e=this._node.value.kind;return e!=b.Kind.INCLUDE_REF&&e!=b.Kind.ANCHOR_REF}return!0},e.prototype.keyStart=function(){return this._node.kind==b.Kind.MAPPING?this._node.key.startPosition:-1},e.prototype.keyEnd=function(){return this._node.kind==b.Kind.MAPPING?this._node.key.endPosition:-1},e.prototype.valueStart=function(){if(this._node.kind==b.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.startPosition:e.endPosition}return this._node.kind==b.Kind.SCALAR?this.start():-1},e.prototype.valueEnd=function(){if(this._node.kind==b.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.endPosition:e.endPosition}return this._node.kind==b.Kind.SCALAR?this.end():-1},e.prototype.end=function(){return this._node.endPosition},e.prototype.dump=function(){if(this._oldText)return this._oldText;if(this._unit&&this._node.startPosition>0&&this._node.endPosition>0){var e=this._unit.contents().substring(this._node.startPosition,this._node.endPosition);return e=o(e,$(this,this._unit.contents()))}return b.dump(this.dumpToObject(),{})},e.prototype.dumpToObject=function(e){return void 0===e&&(e=!1),this.dumpNode(this._node,e)},e.prototype.dumpNode=function(e,t){var n=this;if(void 0===t&&(t=!1),!e)return null;if(e.kind==b.Kind.INCLUDE_REF){if(this._unit){var r=e,i=r.value,a=null;try{a=this._unit.resolve(i)}catch(e){}if(null==a)return null;if(a.isRAMLUnit()&&this.canInclude(a)){var o=this.unit(),s=a;s.addIncludedBy(o.absolutePath()),o.getIncludedByPaths().forEach(function(e){s.addIncludedBy(e)});var u=a.ast();if(u)return u.dumpToObject(t)}else if(this.canInclude(a))return a.contents()}return null}if(e.kind==b.Kind.SEQ){var p=e,c=[];return p.items.forEach(function(e){return c.push(n.dumpNode(e,t))}),c}if(e.kind==b.Kind.ANCHOR_REF){var f=e;return this.dumpNode(f.value,t)}if(e.kind==b.Kind.MAPPING){var h=e,d={},m=h.value,y=this.dumpNode(m,t);return d[""+this.dumpNode(h.key,t)]=y,d}if(e.kind==b.Kind.SCALAR){var r=e,v=r.value;return r.plainScalar&&(v=l(v)),v}if(e.kind==b.Kind.MAP){var g=e,A={};return g.mappings&&g.mappings.forEach(function(e){var r=n.dumpNode(e.value,t);null==r&&(r=t?"!$$$novalue":r),A[n.dumpNode(e.key,t)+""]=r}),A}},e.prototype.keyKind=function(){return this._node.key?this._node.key.kind:null},e.prototype._actualNode=function(){return this._node},e.prototype.execute=function(e){this.unit()?this.unit().project().execute(e):e.commands.forEach(function(e){switch(e.kind){case T.CommandKind.CHANGE_VALUE:var t=e.target,n=e.value,r=t._actualNode();t.start();return void(r.kind==b.Kind.MAPPING&&(r.value=b.newScalar(""+n)));case T.CommandKind.CHANGE_KEY:var t=e.target,n=e.value,r=t._actualNode();if(r.kind==b.Kind.MAPPING){var i=r.key;i.value=n}return}})},e.prototype.updateFrom=function(e){this._node=e},e.prototype.isAnnotatedScalar=function(){if(!this.unit())return!1;for(var e,t=this;!e&&t;)e=t.highLevelNode(),t=t.parent();if(e){var n=void 0;if(e.isElement())n=e.asElement().definition();else{var r=e.property();n=r&&(r.domain()||r.range())}if(n){var i=n.universe().version();if("RAML08"==i)return!1}}var a;if(this.kind()==b.Kind.MAPPING&&this.valueKind()==b.Kind.MAP?a=this._node.value.mappings:null==this.key()&&this.kind()==b.Kind.MAP&&(a=this._node.mappings),a){var o=a.length>0;return a.forEach(function(e){"value"!==e.key.value&&(e.key.value&&"("==e.key.value.charAt(0)&&")"==e.key.value.charAt(e.key.value.length-1)||(o=!1))}),o}return!1},e.prototype.value=function(t){if(!this._node)return"";if(this._node.kind==b.Kind.SCALAR){if("~"===this._node.value&&null===this._node.valueObject)return null;if(!t&&""+this._node.valueObject===this._node.value)return this._node.valueObject;var n=null;return n=this._node.hasOwnProperty("valueObject")&&null==this._node.valueObject?this._node.valueObject:this._node.value,t||this._node.plainScalar&&(n=l(n)),n}if(this._node.kind==b.Kind.ANCHOR_REF){var r=this._node;return new e(r.value,this._unit,this,null,null).value(t)}if(this._node.kind==b.Kind.MAPPING){var i=this._node;if(null==i.value)return null;if(this.isAnnotatedScalar())for(var a=new e(i.value,this._unit,this,null,null),o=a.children(),s=0;s=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else if(this.isMapping()){var i=this.asMapping(),a=i.value;if(!i.value&&n.isMap())return void(i.value=n._actualNode());if(i.value&&i.value.kind==b.Kind.SCALAR&&(i.value=null,a=null),a||(a=n.isScalar()||n.highLevelNode()&&n.highLevelNode().property().getAdapter(w.RAMLPropertyParserService).isEmbedMap()?b.newSeq():b.newMap(),i.value=a),a.kind==b.Kind.MAP){var r=a;null!=r.mappings&&void 0!=r.mappings||(r.mappings=[]),n.isScalar(),t>=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else{if(a.kind!=b.Kind.SEQ)throw new V(F.applyTemplate(B.INSERT_INTO_MAPPING_VALUE_NOT_SUPPORTED,{value:b.Kind[i.value.kind]}));var o=a;t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}}else{if(!this.isSeq())throw new V(F.applyTemplate(B.INSERT_INTO_NOT_SUPPORTED,{name:this.kindName()}));var o=this.asSeq();t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}},e.prototype.removeChild=function(e){this._oldText=null;var t,n,r=e;if(this.kind()==b.Kind.SEQ){var i=this.asSeq();t=r._node,n=i.items.indexOf(t),n>-1&&i.items.splice(n,1)}else if(this.kind()==b.Kind.MAP){var a=this.asMap();t=r.asMapping(),n=a.mappings.indexOf(t),n>-1&&a.mappings.splice(n,1)}else{if(this.kind()!=b.Kind.MAPPING)throw new V(F.applyTemplate(B.DELETE_FROM_NOT_SUPPORTED,{name:b.Kind[this.kind()]}));var o=this.asMapping();if(r._actualNode()==o.value)o.value=null;else{var a=o.value;t=r.asMapping(),a&&a.mappings&&(n=a.mappings.indexOf(t),n>-1&&a.mappings.splice(n,1))}}},e.prototype.hasInnerIncludeError=function(){return this.innerIncludeErrors},e.prototype.includeErrors=function(){if(this._node.kind==b.Kind.MAPPING){var t=this._node;if(null==t.value)return[];var n=new e(t.value,this._unit,this,this._anchor,this._include),r=n.includeErrors();return this.innerIncludeErrors=n.hasInnerIncludeError(),r}var i=[];if(this._node.kind==b.Kind.INCLUDE_REF){var t=this._node;if(null==t.value)return[];var a=this.includePath(),o=null;try{o=this._unit.resolve(a)}catch(e){this.innerIncludeErrors=e.inner;var s=F.applyTemplate(B.CAN_NOT_RESOLVE_REASON,{path:a,reason:e.message});return i.push(s),i}var u=this._node.includeErrors;if(u&&u.length>0)return this.innerIncludeErrors=!0,i=u.map(function(e){return"object"==typeof e&&e instanceof V?e.message:e.toString()});if(null==o)return i.push(F.applyTemplate(B.CAN_NOT_RESOLVE,{path:a})),i;if(o.isRAMLUnit()){var l=o.ast();if(l)return[];i.push(F.applyTemplate(B.CAN_NOT_BE_PARSED,{path:a}))}}return i},e.prototype.joinMappingsWithFullIncludeAnchor=function(t,n,r){var i=this,a=R.find(t,function(e){return e.key&&e.value&&e.key.kind==b.Kind.SCALAR&&"<<"==e.key.value&&e.value.kind==b.Kind.ANCHOR_REF});if(!a)return t.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)});var o=R.filter(t,function(e){return!(e.key.kind==b.Kind.SCALAR&&"<<"==e.key.value&&e.value.kind==b.Kind.ANCHOR_REF)}),s=new e(a.value,this._unit,this,n,r,this.cacheChildren).children(null,null,!0),u=o.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)});return u.concat(s)},e.prototype.children=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),null==this._node)return[];if(this.cacheChildren&&this._children)return this._children;var a,o=this._node.kind;if(o==b.Kind.SCALAR)a=[];else if(o==b.Kind.MAP){var s=this._node;a=1!=s.mappings.length||r?this.joinMappingsWithFullIncludeAnchor(s.mappings,t,n):new e(s.mappings[0].value,this._unit,this,t,n,this.cacheChildren).children(null,null,!0)}else if(o==b.Kind.MAPPING){var u=this._node;if(null==u.value)a=[];else{var l=new e(u.value,this._unit,this,n?n:this._anchor,t?t:this._include,this.cacheChildren);a=l.children(),l.includesContents()&&this.setIncludesContents(!0)}}else if(o==b.Kind.SEQ){var p=this._node;a=p.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include,i.cacheChildren)})}else if(o==b.Kind.INCLUDE_REF){if(this._unit){var c=this.includePath(),f=null;try{f=this._unit.resolve(c)}catch(e){}if(null==f)a=[];else if(f.isRAMLUnit())if(this.canInclude(f)){var h=this.unit(),d=f;d.addIncludedBy(h.absolutePath()),h.getIncludedByPaths().forEach(function(e){d.addIncludedBy(e)});var m=f.ast();m&&(this.cacheChildren&&(m=v(m)),a=f.ast().children(this,null),this.setIncludesContents(!0))}else this.addIncludeError&&this.addIncludeError(new V(B.RECURSIVE_DEFINITION_EMPTY.message))}a||(a=[])}else{if(o!=b.Kind.ANCHOR_REF)throw new V(F.applyTemplate(B.SHOULD_NEVER_HAPPEN_KIND,{kind:b.Kind[this._node.kind]}));var y=this._node;a=new e(y.value,this._unit,this,null,null,this.cacheChildren).children()}return this.cacheChildren&&(this._children=a),a},e.prototype.canInclude=function(e){for(var t=this.includedFrom();null!=t;){if(t.unit().absolutePath()==e.absolutePath())return!1;t=t.includedFrom()}return!this.unit().includedByContains(e.absolutePath())},e.prototype.directChildren=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),this._node){switch(this._node.kind){case b.Kind.SCALAR:return[];case b.Kind.MAP:var a=this._node;return 1!=a.mappings.length||r?a.mappings.map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)}):new e(a.mappings[0].value,this._unit,this,t,n).directChildren(null,null,!0);case b.Kind.MAPPING:var o=this._node;return null==o.value?[]:new e(o.value,this._unit,this,n?n:this._anchor,t?t:this._include).directChildren();case b.Kind.SEQ:var s=this._node;return s.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)});case b.Kind.INCLUDE_REF:return[];case b.Kind.ANCHOR_REF:return[]}throw new V(F.applyTemplate(B.SHOULD_NEVER_HAPPEN_KIND,{kind:b.Kind[this._node.kind]}))}return[]},e.prototype.anchorId=function(){return this._node.anchorId},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this.valueKind()==b.Kind.INCLUDE_REF?this.unit().resolve(this._node.value.value):this.kind()==b.Kind.INCLUDE_REF?this.unit().resolve(this._node.value):this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.setUnit=function(e){this._unit=e},e.prototype.includePath=function(){var e=this.getIncludeString();return e?e:null},e.prototype.includeReference=function(){var e=this.getIncludeString();return e?O.getIncludeReference(e):null},e.prototype.getIncludeString=function(){if(!this._node)return null;if(this._node.kind==b.Kind.INCLUDE_REF){var t=this._node.value;return t}if(this._node.kind==b.Kind.MAPPING){var n=this._node;return null==n.value?null:new e(n.value,this._unit,this,null,null).getIncludeString()}if(this._node.kind==b.Kind.ANCHOR_REF){var r=this._node.value;return new e(r,this._unit,this,null,null).getIncludeString()}return null},e.prototype.anchoredFrom=function(){return this._anchor},e.prototype.includedFrom=function(){return this._include},e.prototype.kind=function(){return this._actualNode().kind},e.prototype.valueKind=function(){if(this._node.kind!=b.Kind.MAPPING)return null;var e=this._node;return e.value?e.value.kind:null},e.prototype.anchorValueKind=function(){if(this.valueKind()==b.Kind.ANCHOR_REF){var e=this._node.value;return e&&e.value&&e.value.kind}return null},e.prototype.resolvedValueKind=function(){var e=this.valueKind();if(e==b.Kind.ANCHOR_REF){var t=this.anchorValueKind();if(t==b.Kind.INCLUDE_REF){var n=this._node.value,r=n.value.value;return this.unitKind(r)}return t}if(e==b.Kind.INCLUDE_REF){var r=this.includePath();return this.unitKind(r)}return e},e.prototype.unitKind=function(e){var t;try{t=this._unit.resolve(e)}catch(e){return null}if(null==t)return b.Kind.SCALAR;if(t.isRAMLUnit()){var n=t.ast();if(n)return n.kind()}return b.Kind.SCALAR},e.prototype.valueKindName=function(){var e=this.valueKind();return void 0!=e?b.Kind[e]:null},e.prototype.kindName=function(){return b.Kind[this.kind()]},e.prototype.indent=function(e,t){void 0===t&&(t="");for(var n="",r=0;r0&&e.append(", "),this.markupNode(e,o[s],n,r);r&&e.append("}");break;case b.Kind.SEQ:for(var u=t.items,s=0;s=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return t=n(r(t.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+t||"."; +},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return e=n(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,u=0;u1)for(var n=1;n",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),y=["%","/","?",";","#"].concat(m),v=["/","?","#"],g=255,A=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},T={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=n(12);r.prototype.parse=function(e,t,n){if(!l.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?"x":D[x];if(!U.match(A)){var F=L.slice(0,R),B=L.slice(R+1),V=D.match(E);V&&(F.push(V[1]),B.unshift(V[2])),B.length&&(s="/"+B.join(".")+s),this.hostname=F.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=u.toASCII(this.hostname));var K=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+K,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!_[d])for(var R=0,O=m.length;R0)&&n.host.split("@");I&&(n.auth=I.shift(),n.host=n.hostname=I.shift())}return n.search=e.search,n.query=e.query,l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var b=_.slice(-1)[0],R=(n.host||e.host||_.length>1)&&("."===b||".."===b)||""===b,M=0,C=_.length;C>=0;C--)b=_[C],"."===b?_.splice(C,1):".."===b?(_.splice(C,1),M++):M&&(_.splice(C,1),M--);if(!A&&!E)for(;M--;M)_.unshift("..");!A||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),R&&"/"!==_.join("/").substr(-1)&&_.push("");var w=""===_[0]||_[0]&&"/"===_[0].charAt(0);if(N){n.hostname=n.host=w?"":_.length?_.shift():"";var I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");I&&(n.auth=I.shift(),n.host=n.hostname=I.shift())}return A=A||n.host&&_.length,A&&!w&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(a){function o(e){throw RangeError(L[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(P,".");var i=e.split("."),a=s(i,t).join(".");return r+a}function l(e){for(var t,n,r=[],i=0,a=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=U(e>>>10&1023|55296),e=56320|1023&e),t+=U(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:_}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?D(e/I):e>>1,e+=D(e/t);e>O*S>>1;r+=_)e=D(e/O);return D(r+(O+1)*e/(e+N))}function d(e){var t,n,r,i,a,s,u,l,f,d,m=[],y=e.length,v=0,g=R,A=b;for(n=e.lastIndexOf(M),n<0&&(n=0),r=0;r=128&&o("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=y&&o("invalid-input"),l=c(e.charCodeAt(i++)),(l>=_||l>D((E-v)/s))&&o("overflow"),v+=l*s,f=u<=A?T:u>=A+S?S:u-A,!(lD(E/d)&&o("overflow"),s*=d;t=m.length+1,A=h(v-a,t,0==a),D(v/t)>E-g&&o("overflow"),g+=D(v/t),v%=t,m.splice(v++,0,g)}return p(m)}function m(e){var t,n,r,i,a,s,u,p,c,d,m,y,v,g,A,N=[];for(e=l(e),y=e.length,t=R,n=0,a=b,s=0;s=t&&mD((E-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;sE&&o("overflow"),m==t){for(p=n,c=_;d=c<=a?T:c>=a+S?S:c-a,!(p= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=_-T,D=Math.floor,U=String.fromCharCode;A={version:"1.3.2",ucs2:{decode:l,encode:p},decode:d,encode:m,toASCII:v,toUnicode:y},r=function(){return A}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(10)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(13),t.encode=t.stringify=n(14)},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var o=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;l=0?(p=d.substr(0,m),c=d.substr(m+1)):(p=d,c=""),f=decodeURIComponent(p),h=decodeURIComponent(c),n(a,f)?Array.isArray(a[f])?a[f].push(h):a[f]=[a[f],h]:a[f]=h}return a}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var a=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){"use strict";function r(e){var t={};return e.forEach(function(e){return Object.keys(e).forEach(function(n){return t[n]=e[n]})}),t}function i(e,t){return new I(N.find(e||[],t))}function a(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function o(e){var t={};return e.forEach(function(e){return t[e[0]]=e[1]}),t}function s(e,t){return t(e),e}function u(e,t){"object"==typeof e&&Object.keys(e).forEach(function(n){return t(n,e[n])})}function l(e,n,r){void 0===r&&(r=!1);var i={};return e.forEach(function(e){var a=t.shallowCopy(e);r&&delete a[n],i[e[n]]=a}),i}function p(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n}function c(e,t,n){return void 0===n&&(n=0),e.length-t.length>=n&&e.substring(n,n+t.length)===t}function f(e){return"_"==e[e.length-1]}function h(e,t,n){var r,i=!1;e[t]=function(){return i||(i=!0,r=n.apply(e)),r}}function d(e,n){void 0===n&&(n=f);for(var r in e)n(r)&&t.ifInstanceOf(e[r],Function,function(t){return 0===t.length?h(e,r,t):null})}function m(e,t){void 0!==e&&t(e)}function y(e){return"string"==typeof e&&""!=e&&p(e,".raml")}function v(e){for(var t,n=[],r=new RegExp("require\\('([^']+)'\\)","gi");t=r.exec(e);)n.push(t[1]);for(var i=new RegExp('require\\("([^"]+)"\\)',"gi");t=i.exec(e);)n.push(t[1]);return n=N.unique(n).filter(function(e){return""!=e}),n.sort(),n}function g(e){return"undefined"!=typeof e&&null!=e}function A(e){return 0==e.length?e:e.charAt(0).toUpperCase()+e.substr(1)}function E(e,t,n){void 0===n&&(n=!1);var r=Object.keys(t);if(n){var i={};r.forEach(function(e){return i[e]=!0}),Object.keys(e).forEach(function(e){return i[e]=!0}),r=Object.keys(i)}r.forEach(function(n){var r=e[n];r instanceof Object?(t[n]||(t[n]={}),E(r,t[n],!0)):void 0!=r&&(t[n]=e[n])})}function _(e,t){return Object.keys(t).forEach(function(n){return e=T(e,n,t[n])}),e}function T(e,t,n){for(var r="",i=0,a=e.indexOf(t);a=0;a=e.indexOf(t,i))r+=e.substring(i,a),r+=n,i=a+t.length;return r+=e.substring(i,e.length)}function S(e){if(null==e||"object"!=typeof e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0,r=e;n=0&&t<=R};g.each=g.forEach=function(e,t,n){t=E(t,n);var r,i;if(C(e))for(r=0,i=e.length;r0?0:o-1;for(i||(r=t[a?a[s]:s],s+=e);s>=0&&s=3;return t(e,E(n,i,4),r,a)}};g.reduce=g.foldl=g.inject=w(1),g.reduceRight=g.foldr=w(-1),g.find=g.detect=function(e,t,n){var r=C(e)?g.findIndex:g.findKey,i=r(e,t,n);if(void 0!==i&&i!==-1)return e[i]},g.filter=g.select=function(e,t,n){var r=[];return t=_(t,n),g.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},g.reject=function(e,t,n){return g.filter(e,g.negate(_(t)),n)},g.every=g.all=function(e,t,n){t=_(t,n);for(var r=!C(e)&&g.keys(e),i=(r||e).length,a=0;a=0},g.invoke=T(function(e,t,n){var r,i;return g.isFunction(t)?i=t:g.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),g.map(e,function(e){var a=i;if(!a){if(r&&r.length&&(e=b(e,r)),null==e)return;a=e[t]}return null==a?a:a.apply(e,n)})}),g.pluck=function(e,t){return g.map(e,g.property(t))},g.where=function(e,t){return g.filter(e,g.matcher(t))},g.findWhere=function(e,t){return g.find(e,g.matcher(t))},g.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sa&&(a=r)}else t=_(t,n),g.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},g.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sr||void 0===n)return 1;if(n0?0:i-1;a>=0&&a0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(c.call(r,o,s),g.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&at?(r&&(clearTimeout(r),r=null),s=l,o=e.apply(i,a),r||(i=a=null)):r||n.trailing===!1||(r=setTimeout(u,p)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l},g.debounce=function(e,t,n){var r,i,a=function(t,n){r=null,n&&(i=e.apply(t,n))},o=T(function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,t),s&&(i=e.apply(this,o))}else r=g.delay(a,t,this,o);return i});return o.cancel=function(){clearTimeout(r),r=null},o},g.wrap=function(e,t){return g.partial(t,e)},g.negate=function(e){return function(){return!e.apply(this,arguments)}},g.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},g.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},g.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},g.once=g.partial(g.before,2),g.restArguments=T;var k=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=F.length,r=e.constructor,i=g.isFunction(r)&&r.prototype||u,a="constructor";for(I(e,a)&&!g.contains(t,a)&&t.push(a);n--;)a=F[n],a in e&&e[a]!==i[a]&&!g.contains(t,a)&&t.push(a)};g.keys=function(e){if(!g.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)I(e,n)&&t.push(n);return k&&B(e,t),t},g.allKeys=function(e){if(!g.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&B(e,t),t},g.values=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=E(r,t[1])),t=g.allKeys(e)):(r=K,t=O(t,!1,!1),e=Object(e));for(var i=0,a=t.length;i1&&(n=t[1])):(t=g.map(O(t,!1,!1),String),r=function(e,n){return!g.contains(t,n)}),g.pick(e,r,n)}),g.defaults=V(g.allKeys,!0),g.create=function(e,t){var n=S(e);return t&&g.extendOwn(n,t),n},g.clone=function(e){return g.isObject(e)?g.isArray(e)?e.slice():g.extend({},e):e},g.tap=function(e,t){return t(e),e},g.isMatch=function(e,t){var n=g.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a":">",'"':""","'":"'","`":"`"},q=g.invert(Y),G=function(e){var t=function(t){return e[t]},n="(?:"+g.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};g.escape=G(Y),g.unescape=G(q),g.result=function(e,t,n){g.isArray(t)||(t=[t]);var r=t.length;if(!r)return g.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var z=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+$[e]};g.template=function(e,t,n){!t&&n&&(t=n),t=g.defaults({},t,g.templateSettings);var r=RegExp([(t.escape||z).source,(t.interpolate||z).source,(t.evaluate||z).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(J,Q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";var o;try{o=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return o.call(this,e,g)},u=t.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},g.chain=function(e){var t=g(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?g(t).chain():t};g.mixin=function(e){return g.each(g.functions(e),function(t){var n=g[t]=e[t];g.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),Z(this,n.apply(g,e))}}),g},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];g.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),g.each(["concat","join","slice"],function(e){var t=s[e];g.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return String(this._wrapped)},r=[],i=function(){return g}.apply(t,r),!(void 0!==i&&(n.exports=i))}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){"use strict";var r,i=n(18),a=function(e){return null!=e},o=function(){function e(t){var n=this;this._value=t,this._isDefined=!1,this._isEmpty=!0,this._arr=void 0,this.getOrThrow=function(){return i(n._isDefined,"Opt is empty. Use `Opt#getOrElse` or check `Opt#isDefined`."),n._value},this.value=function(){return n._value},this.isDefined=function(){return n._isDefined},this.isEmpty=function(){return n._isEmpty},this.toArray=function(){return n._arr||(n._arr=n._isDefined?[n._value]:[])},this.getOrElse=function(e){return n._isDefined?n._value:e},this.getOrElseF=function(e){return n._isDefined?n._value:e()},this.map=function(t){return n._isEmpty?e.empty():new e(t(n._value))},this.flatMap=function(t){return n.map(t).getOrElse(e.empty())},this.equals=function(t){return i(t instanceof e,"Expected other to be an `Opt`, but got `%s`",typeof t),n._isDefined===t.isDefined()&&n._value===t.value()},a(this._value)&&(this._isDefined=!0,this._isEmpty=!1)}return e.prototype.forEach=function(e){this.isDefined()&&e(this._value)},e.empty=function(){return r||(r=new e)},e}();e.exports=o},function(e,t,n){(function(t){"use strict";var n=function(e,n,r,i,a,o,s,u){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,i,a,o,s,u],c=0;l=new Error(n.replace(/%s/g,function(){return p[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=n}).call(t,n(7))},function(e,t,n){(function(e){"use strict";function r(e,t,n){return new Be.Function(e).call(t,n)}function i(e,t){var n=e.property();return n&&n.getContextRequirements().forEach(function(r){e.checkContextValue(r.name,r.value,r.value)||t.accept(Z(xe.CONTEXT_REQUIREMENT,{name:r.name,value:r.value,propName:n.nameId()},e))}),n}function a(e,t){var n;try{n=e.lowLevel().unit().project().fsEnabled()}catch(e){n=!0}if(n&&"undefined"!=typeof Ee&&Ee){for(var r=["exists","readFile","writeFile","readdir","existsSync","readFileSync","writeFileSync","readdirSync"],i=(Object.keys(Ee),0);i=0){var u=o.substring(0,s+1)+" "+o.substring(s+1);r=Z(xe.UNUSED_PARAMETER_MISSING_SEPARATING_SPACE,{paramName:o,correctMapping:u},e,!0)}else r=Z(xe.UNUSED_PARAMETER,{paramName:o},e,!0)}}}if(!r){var l=e.name(),p=Se("RAML08"),c=i.universe().version()==p.version();if(c){var f=_e.Universe08.Parameter.name;_e.Universe10.TypeDeclaration.name;if(c&&i.isAssignableFrom(f)){for(var h=p.type(f).allSubTypes().filter(function(e){return null!=_e.Universe08[e.nameId()].properties[l]}),d={},m=0;m0){var _=E.map(function(e,t){var n="'"+e+"'";return t==E.length-1?n:t==E.length-2?n+" or ":n+", "}).join("");r=Z(xe.INVALID_PROPERTY_OWNER_TYPE,{propName:l,namesStr:_},e)}}}}return r}function h(e,t){if(e.isElement()){if(e.invalidSequence){var n=e.property().nameId();n=De.sentenceCase(Ue.singular(n)),t.acceptUnique(te(xe.SEQUENCE_NOT_ALLOWED_10,{propName:n},e.lowLevel().parent().parent(),e))}var r=e.asElement();if(r.definition().isAssignableFrom(_e.Universe10.LibraryBase.name)){var i,a=!1,o=!1;r.lowLevel().children().forEach(function(e){"schemas"==e.key()&&(a=!0,i=e),"types"==e.key()&&(o=!0)}),a&&o&&t.accept(Tt(i,r,he.IssueCode.ILLEGAL_PROPERTY_VALUE,!1,"types and schemas are mutually exclusive",!1))}r.definition().requiredProperties()&&r.definition().requiredProperties().length>0;d(e,t),(new at).validate(r,t),(new At).validate(r,t)}else d(e,t);(new vt).validate(e,t)}function d(e,t,n){void 0===n&&(n=!1);var r=e.parent(),i=e.lowLevel().value();if(e.lowLevel()&&(e.lowLevel().keyKind()==ye.Kind.MAP&&t.accept(Z(xe.NODE_KEY_IS_A_MAP,{},e)),e.lowLevel().keyKind()==ye.Kind.SEQ&&null==i)){var a=!1;e.isElement()&&e.asElement().definition().isAssignableFrom(_e.Universe10.TypeDeclaration.name)&&(a=!0),a||t.accept(Z(xe.NODE_KEY_IS_A_SEQUENCE,{},e))}if(e.isUnknown()){if("string"==typeof e.name()&&e.name().indexOf("<<")>=0&&null!=c(r))return(new Ye).validateName(e,t),!1;if(e.needSequence&&t.accept(Z(xe.SEQUENCE_REQUIRED,{name:e.name()},e)),e.needMap)return e.knownProperty?t.accept(Z(xe.PROPERTY_MUST_BE_A_MAP_10,{propName:e.knownProperty.nameId()},e)):t.accept(Z(xe.MAP_REQUIRED,{},e)),!1;if(e.unresolvedRef&&t.accept(Z(xe.UNRESOLVED_REFERENCE,{ref:i},e)),e.knownProperty){if(0==e.lowLevel().includeErrors().length){if(c(r)&&Ce.startsWith(i,"<<")&&Ce.endsWith(i,">>"))return!1;if("body"==e.name()&&e.computedValue("mediaType"))return!1;"~"!=e.lowLevel().value()&&(oe(e,t,xe.SCALAR_PROHIBITED.code,!1)||t.accept(Z(xe.SCALAR_PROHIBITED,{propName:e.name()},e)))}}else{var o="string"==typeof e.name()?e.name().indexOf("<<"):-1;if(o>0&&c(r)&&e.name().indexOf(">>",o))return!1;var s=f(e);s||(s=m(e)),t.accept(s)}}if(e.markCh()&&!e.allowRecursive())return!!e.property()&&(t.accept(Z(xe.RECURSIVE_DEFINITION,{name:e.name()},e)),!1);if(e.definition&&e.definition().isAssignableFrom(_e.Universe10.Operation.name)){var u=v(e.wrapperNode()),l=u.queryStringComesFrom,p=u.queryParamsComesFrom;l&&p&&(t.accept(y(l,e,!1)),t.accept(y(p,e,!0)))}var h=e.definition&&e.definition()&&(e.definition().key()===_e.Universe10.Overlay||e.definition().key()===_e.Universe10.Extension);return h&&S(e,t,n),!0}function m(e){var t,n=e.parent();if(n){var r=n.definition();if(r){var i=e.name(),a=r.nameId();if(be.isPossibleMethodName(i))t=Z(xe.INVALID_METHOD_USAGE,{typeName:a},e);else if("/"==i.charAt(0))t=Z(xe.INVALID_SUBRESOURCE_USAGE,{typeName:a},e);else{var o=r&&r.universe();if(o){var s=St.getInstance().hasProperty(i);if(s){var u=void 0;"RAML10"==o.version()?u="RAML 1.0":"RAML08"==o.version()&&(u="RAML 0.8"),u&&(t=Z(xe.INVALID_PROPERTY_USAGE,{propName:i,typeName:a,ramlVersion:u},e))}}}}}return t||(t=Z(xe.UNKNOWN_NODE,{name:e.name()},e)),t}function y(e,t,n){var r=e,i=e,a=n?_e.Universe10.Operation.properties.queryString.name:_e.Universe10.Operation.properties.queryParameters.name;return r.unit?te(xe.QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE,{propName:a},r,t):Z(xe.QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE,{propName:a},i)}function v(e){return{queryParamsComesFrom:g(e,!0),queryStringComesFrom:g(e,!1)}}function g(e,t,n,r){if(void 0===n&&(n=!0),void 0===r&&(r={}),!e)return null;if(e.name){var i=e.name();if(r[i])return;r[i]=!0}var a=E(e,t);if(a)return a;var o=e.is&&e.is()||[],s=me.find(o,function(e){return g(e.trait(),t,n,r)});if(s)return s.highLevel();if(n){var u=e.parentResource&&e.parentResource(),l=u&&A(u,t,r);if(l)return l;if(u=e.parent&&e.parent(),u&&u.highLevel().definition().isAssignableFrom(_e.Universe10.ResourceBase.name))return A(u,t,r)}return null}function A(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r={}),e.name){var i=e.name();if(r[i])return;r[i]=!0}var a=e.is(),o=me.find(a,function(e){return g(e.trait(),t,!1,n)});if(o)return o.highLevel();var s=e.type(),u=s&&s.resourceType(),l=u&&A(u,t,n,r);return l?s.highLevel():void 0}function E(e,t){return t?_(e):T(e)}function _(e){var t=e.highLevel();return t.lowLevel&&me.find(t.lowLevel().children(),function(e){return e.key&&e.key()===_e.Universe10.Operation.properties.queryParameters.name})}function T(e){var t=e.highLevel(),n=t.element(_e.Universe10.Operation.properties.queryString.name);return n}function S(e,t,n){if(void 0===n&&(n=!1),!e.parent()){var r=e.asElement();if(r&&r.isAuxilary()){var i=r.getMaster();i&&h(i,t)}}}function N(e,t,n){if(void 0===n&&(n=!1),d(e,t,n))try{var r=e.definition&&e.definition()&&(e.definition().key()===_e.Universe10.Overlay||e.definition().key()===_e.Universe10.Extension),i=r?e.children():e.directChildren();i.filter(function(e){return!n||e.property&&e.property()&&e.property().isRequired()}).forEach(function(n){if(n&&n.errorMessage){var r=n.errorMessage;return void t.accept(Z(r.entry,r.parameters,n.name()?n:e))}n.validate(t)})}finally{e.unmarkCh()}}function I(e,t){if(!e.parent()){try{R(e,t)}finally{b(e,t)}var n=e.lowLevel().unit().contents().length;e.lowLevel().errors().forEach(function(r){var i=r.mark?r.mark.position:0,a=i>=n?i:i+1;if(r.mark&&r.mark.toLineEnd){var o=r.mark.buffer,s=o.indexOf("\n",i);s<0&&(s=o.length),s0)return void N(e,t,!0)}if(i.definition().isAnnotationType()||i.property()&&"annotations"==i.property().nameId())return void(new rt).validate(i,t);if(i.definition().isAssignableFrom(_e.Universe10.UsesDeclaration.name)&&(new dt).validate(i,t),i.definition().isAssignableFrom(_e.Universe10.TypeDeclaration.name))return i.attrs().forEach(function(n){var r=n.property().range().key();if(r==_e.Universe08.RelativeUriString||r==_e.Universe10.RelativeUriString)return void(new $e).validate(n,t);if(r==_e.Universe08.FullUriTemplateString||r==_e.Universe10.FullUriTemplateString)return void(new $e).validate(n,t);if(n.property().getAdapter(Ne.RAMLPropertyService).isKey()){var a=e.property()&&e.property().nameId();if(a==_e.Universe08.Resource.properties.uriParameters.name||a==_e.Universe08.Resource.properties.baseUriParameters.name)return;if(i.property()&&i.property().nameId()==_e.Universe10.MethodBase.properties.body.name)return void(new Je).validate(n,t)}}),(new ct).validate(i,t),(new ft).validate(i,t),(new ut).validate(i,t),(new it).validate(i,t),void(null==i.parent()&&i.elements().filter(function(e){return e.definition().isAssignableFrom(_e.Universe10.UsesDeclaration.name)}).forEach(function(e){return(new dt).validate(e,t)}));if(i.definition().isAssignableFrom(_e.Universe10.LibraryBase.name)){var s,u=!1,l=!1;i.lowLevel().children().forEach(function(e){"schemas"==e.key()&&(u=!0,s=e),"types"==e.key()&&(l=!0)}),u&&l&&t.accept(te(xe.TYPES_AND_SCHEMAS_ARE_EXCLUSIVE,{},s,i))}var p=i.definition().requiredProperties()&&i.definition().requiredProperties().length>0,c=i.definition().getAdapter(Ne.RAMLService).getAllowAny();c?p&&N(e,t,!0):N(e,t),(new gt).validate(i,t),(new lt).validate(i,t),(new at).validate(i,t),(new At).validate(i,t)}else N(e,t);(new vt).validate(e,t)}function b(e,t){if(e.lowLevel()){var n=e.lowLevel().actual();delete n._inc,e.children().forEach(function(e){return b(e,t)})}}function R(e,t){var n=e.lowLevel();if(n){var r=n.actual();if(!r._inc){if(e.isElement()){var i=e.name();null!=c(e)&&(i=i.replace(/<<[^<>]*>>/g,"")),"string"==typeof i&&null!=i&&i.indexOf(" ")!=-1&&t.accept(Z(xe.SPACES_IN_KEY,{value:i},e,!0))}if(r._inc=!0,n){n.includeErrors().forEach(function(n){var r=!1;e.lowLevel().hasInnerIncludeError()&&(r=!0);var i=Z(xe.INCLUDE_ERROR,{msg:n},e,r);t.accept(i)});var a=n.includePath();if(null!=a&&!Ae.isAbsolute(a)&&!de.isWebPath(a)){var o=n.unit().absolutePath();if(n instanceof fe.LowLevelCompositeNode){var s=n.adoptedNodes().find(function(e){return e.includePath()==a});s&&(o=s.unit().absolutePath())}var u=C(Ae.dirname(o),a);if(u>0){var l=Z(xe.PATH_EXCEEDS_ROOT,{},e,!0);t.accept(l)}}}e.children().forEach(function(e){return R(e,t)}),0==e.children().length&&null!=n&&n.children().forEach(function(n){return M(n,t,e)})}}}function M(e,t,n){e.includeErrors().forEach(function(r){var i=!1;e.hasInnerIncludeError()&&(i=!0);var a=te(xe.INCLUDE_ERROR,{msg:r},e,n,i);t.accept(a)});var r=e.includePath();if(null!=r&&!Ae.isAbsolute(r)&&!de.isWebPath(r)){var i=e.unit().absolutePath(),a=C(Ae.dirname(i),r);if(a>0){var o=te(xe.PATH_EXCEEDS_ROOT,{},e,n,!0);t.accept(o)}}e.children().forEach(function(e){return M(e,t,n)})}function C(e,t){for(var n=We(e),r=We(t),i=n.length,a=0,o=0,s=r;o0){var l=!1,p=t.definition().allSuperTypes();p=p.concat([t.definition()]);var c=p.map(function(e){return e.nameId()});if(u.forEach(function(e){"API"==e&&(e="Api"),"NamedExample"==e&&(e="ExampleSpec"),"SecurityScheme"==e&&(e="AbstractSecurityScheme"),"SecuritySchemeSettings"==e&&(e="SecuritySchemeSettings"),me.find(c,function(t){return t==e})?l=!0:("Parameter"==e&&t.computedValue("location")&&(l=!0),"Field"==e&&t.computedValue("field")&&(l=!0))}),!l){var f=u.map(function(e){return"'"+e+"'"}).join(", ");return new Xe(xe.INVALID_ANNOTATION_LOCATION,{aName:n,aValues:f})}}}}return g}if(e.key()==_e.Universe08.SchemaString||e.key()==_e.Universe10.SchemaString){var h=!1;if(ve.UserDefinedProp.isInstance(r)){var d=r,m=d.node();if(m){var y=m.property();y&&(h=Te.isTypeProperty(y)||Te.isSchemaProperty(y))}}if(h)return!1;var v=n&&n.trim().length>0&&("{"==n.trim().charAt(0)||"<"==n.trim().charAt(0)),g=Le.createSchema(n,Y(t.lowLevel(),i&&i.lowLevel()));if(!g)return g;if(g instanceof Error)g.isWarning=!0,v||(g.canBeRef=!0);else{var A=!1;try{JSON.parse(n),A=!0}catch(e){}if(A)try{g.validateSelf()}catch(e){return e.isWarning=!0,e}}return g}if(e.key()==_e.Universe08.StatusCodeString||e.key()==_e.Universe10.StatusCodeString){var E=re(""+n);if(null!=E)return E}if(e.key()==_e.Universe08.BooleanType||e.isAssignableFrom(_e.Universe10.BooleanType.name)){if("true"!==n&&"false"!==n&&n!==!0&&n!==!1)return new Xe(xe.BOOLEAN_EXPECTED);if(i){var _=i.lowLevel().value(!0);if("true"!==_&&"false"!==_)return new Xe(xe.BOOLEAN_EXPECTED)}}if(e.key()==_e.Universe08.NumberType||e.isAssignableFrom(_e.Universe10.NumberType.name)){var T=parseFloat(n);if(isNaN(T))return new Xe(xe.NUMBER_EXPECTED,{propName:r.nameId()})}if((e.key()==_e.Universe08.StringType||e.isAssignableFrom(_e.Universe10.StringType.name))&&null===n&&t&&r){var S=t.attr(r.nameId());if(S&&!S.isAnnotatedScalar()){var N=S.lowLevel().children();if(N&&N.length>0)return new Xe(xe.INVALID_PROPERTY_RANGE,{propName:r.nameId(),range:"string"})}}return!0}catch(e){return e.canBeRef=!0,e}}function O(e){if(!e)return!1;var t=e.toLowerCase(),n=e.toUpperCase();return e!==t&&e!==n}function D(e){if(!e)return null;if(e.isElement()){var n=e,r=n.definition();if(r&&t.typeToName.hasOwnProperty(r.nameId()))return t.typeToName[r.nameId()];if(r.isAssignableFrom(_e.Universe10.TypeDeclaration.name)||r.isAssignableFrom(_e.Universe08.Parameter.name)){if(n.property()&&t.parameterPropertyToName.hasOwnProperty(n.property().nameId()))return t.parameterPropertyToName[n.property().nameId()];if(n.property()&&n.parent()&&n.property().nameId()==_e.Universe10.LibraryBase.properties.types.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(_e.Universe10.LibraryBase.name))return"type";if(n.property()&&n.parent()&&n.property().nameId()==_e.Universe10.LibraryBase.properties.securitySchemes.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(_e.Universe10.LibraryBase.name))return"security scheme"}}return null}function U(e,t,n){var r=Re.declRoot(n);fe.LowLevelProxyNode.isInstance(n.lowLevel())&&(n=r),r._cach||(r._cach={});var i=e.id();if(e.domain()&&(i+=e.domain().nameId()),i){var a=r._cach[i];if(a)return null!=a[t]}var o=Re.enumValues(e,n),s={};return o.forEach(function(e){return s[e]=1}),e.id()&&(r._cach[i]=s),null!=s[t]}function x(e,n,r,i){var a="string"==typeof r?r.indexOf("<<"):-1;if(!(a>=0&&r.indexOf(">>",a)>=0&&null!=c(n))&&(F(e,n,i),B(e,n,i),r&&("null"!=r||!e.isAllowNull()))){var o=e.getAdapter(Ne.RAMLPropertyService),s=n.parent(),u=!1,l=fe.LowLevelCompositeNode.isInstance(n.lowLevel())&&n.lowLevel().getMeta("chaining");if(l||(u=U(e,r,s),u||n.lowLevel().unit().absolutePath()===s.lowLevel().unit().absolutePath()||(u=U(e,r,ge.fromUnit(n.lowLevel().unit())))),!u){if("string"==typeof r&&0==r.indexOf("x-")&&e.nameId()==_e.Universe10.TypeDeclaration.properties.type.name)return!0;var p=o.isReference&&o.isReference()&&o.referencesTo&&o.referencesTo()&&o.referencesTo().nameId&&o.referencesTo().nameId(),f=t.typeToName[p]||K(n),h={referencedToName:f,ref:r,typeName:r},d=f?xe.UNRECOGNIZED_ELEMENT:xe.UNRESOLVED_REFERENCE,m=V(d,e,n,r),y=e.range().key()===_e.Universe08.SchemaString;return oe(n,i,m.code,y)||i.accept(Z(m,h,n,y)),!0}return!(!k(n)||!Te.isTraitRefType(n.definition()))&&(i.accept(Z(xe.DUPLICATE_TRAIT_REFERENCE,{refValue:r},n)),!0)}}function k(e){var t,n=e.property().domain().universe().version();if(t="RAML10"==n?ce(pe.serialize(e.lowLevel())):e.value()&&e.value().valueName&&e.value().valueName(),!t)return!1;var r=e.parent&&e.parent();if(!r)return!1;var i=e.name&&e.name();if(!i)return!1;var a=r.attributes&&r.attributes(i);if(!a)return!1;if(0===a.length)return!1;var o=0;return a.forEach(function(e){var r;"RAML10"==n?t=ce(pe.serialize(e.lowLevel())):r=e.value&&e.value()&&e.value().valueName&&e.value().valueName(),r===t&&o++}),o>1}function F(e,t,n){if(Te.isIsProperty(e)){var r=t.lowLevel();if(null!=r){var i=null,a=r.parent(),o=null!=a?a.parent():null;if(r.kind()==ye.Kind.MAPPING&&r.key()&&"is"==r.key()?i=r:null!=a&&a.kind()==ye.Kind.MAPPING&&a.key()&&"is"==a.key()?i=a:null!=o&&o.kind()==ye.Kind.MAPPING&&o.key()&&"is"==o.key()&&(i=o),null!=i){null==i.value()||i.children()&&0!=i.children().length||n.accept(Z(xe.IS_IS_ARRAY,{},t));var s=!1;i.children().forEach(function(e){e.kind()!=ye.Kind.SCALAR&&e.kind()!=ye.Kind.MAP&&(s=!0)}),s&&n.accept(Z(xe.IS_IS_ARRAY,{},t))}}}}function B(e,t,n){if(Te.isTypeProperty(e)&&Te.isResourceTypeRefType(t.definition())){var r=t.lowLevel();null==t.value()&&r&&r.children()&&0==r.children().length?r.kind()==ye.Kind.MAPPING&&null!=r.valueKind()&&n.accept(Z(xe.RESOURCE_TYPE_NAME,{},t)):null==t.value()&&r&&r.children()&&r.children().length>1&&n.accept(Z(xe.MULTIPLE_RESOURCE_TYPES,{},t))}}function V(e,t,n,r){if("type"==t.nameId()&&"RAML08"==t.domain().universe().version()&&t.domain().isAssignableFrom(_e.Universe08.Parameter.name))return xe.TYPES_VARIETY_RESTRICTION;if(null!=n.parent()&&Te.isSecuritySchemaType(n.parent().definition()))return xe.UNRECOGNIZED_SECURITY_SCHEME;if(Te.isAnnotationsProperty(t)){var i=fe.LowLevelCompositeNode.isInstance(n.lowLevel())&&n.lowLevel().getMeta("chaining"),a=n.parent().types(),o=a&&a.getAnnotationTypeRegistry();return i||o&&o.getByChain(r)?xe.LIBRARY_CHAINIG_IN_ANNOTATION_TYPE:xe.UNKNOWN_ANNOTATION_TYPE}return e}function K(e){var t=e&&e.lowLevel()&&e.lowLevel().key();if(t===_e.Universe10.AbstractSecurityScheme.properties.type.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===_e.Universe10.AbstractSecurityScheme.name)return"security scheme type"}else if(t===_e.Universe08.BodyLike.properties.schema.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===_e.Universe08.BodyLike.name)return"schema"}}function j(e,t){var n=t.getValidationPath(),r=H(e,n),i=t.getInternalPath(),a=!1;if(i){var o=H(r,i);o&&o!=r&&(r=o,a=!0)}return{node:r,internalPathUsed:a}}function W(e,t){var n=e.getExtra(Me.SOURCE_EXTRA);return ge.LowLevelWrapperForTypeSystem.isInstance(n)?n.node():null}function H(e,t){if(!t)return e;var n=e.children().filter(function(e){return(!e.isAttr()||!e.asAttr().isFromKey())&&e.name()===t.name});if(e.isElement()&&Te.isTypeDeclarationDescendant(e.asElement().definition())){var r=e.lowLevel();n=me.uniq(e.directChildren().concat(e.children())).filter(function(e){return(!e.isAttr()||!e.asAttr().isFromKey())&&e.name()===t.name}).sort(function(e,t){for(var n=e.lowLevel().parent();n&&n.kind()!=ye.Kind.MAPPING;)n=n.parent();for(var i=t.lowLevel().parent();i&&i.kind()!=ye.Kind.MAPPING;)i=i.parent();return n==r?-1:i==r?1:0})}var i=t.child&&"number"==typeof t.child.name?t.child.name:-1;if(i>=0&&n.length>i)return H(n[i],t.child.child);if(n.length>0)return H(n[0],t.child);if(!e.lowLevel())return e;for(var a=e.lowLevel().children(),o=0;o0){n.lowLevel().valueKind()!=n.lowLevel().resolvedValueKind()?(s=_t(n,e,r,t,!1,u,null,i,a),i=null,a=!1):s=_t(n,e,r,t,!1,u,null);for(var c=s;c.extras.length>0;)c=c.extras[0];for(var f=0;f0;)c=c.extras[0];if(c.extras.push(T),n.lowLevel().valueKind()==ye.Kind.INCLUDE_REF){var S=xe.ERROR_IN_INCLUDED_FILE;T.code=S.code,T.message=ie(S,{msg:T.message})}T=s}return T}function te(e,t,n,r,i,a,o){void 0===i&&(i=!1),void 0===a&&(a=!1);var s=ie(e,t);return ne(e.code,s,n,r,i,a,o)}function ne(e,t,n,r,i,a,o){void 0===i&&(i=!1),void 0===a&&(a=!1);var s=null;if(n){var u=r.root().lowLevel().unit();if(r.lowLevel().unit()!=u){s=Tt(n,r,e,i,t,!0,o);var l=r.lowLevel().unit();for(l&&(t=t+" "+l.path());r.lowLevel().unit()!=u;)r=r.parent()}}s&&(o=null,r.property()&&r.property().nameId()==_e.Universe10.FragmentDeclaration.properties.uses.name&&null!=r.parent()&&(r=r.parent()),n=r.lowLevel());var p=Tt(n,r,e,i,t,a,o);return s&&(s.extras.push(p),n.valueKind()==ye.Kind.INCLUDE_REF&&(p.message=ie(xe.ERROR_IN_INCLUDED_FILE,{msg:p.message})),p=s),p}function re(e){if(3!=e.length)return new Xe(xe.STATUS_MUST_BE_3NUMBER);for(var t=0;t=0;a=r.indexOf("{{",i)){if(n+=r.substring(i,a),i=r.indexOf("}}",a),i<0){i=a;break}a+="{{".length;var o=r.substring(a,i),s=o.split("|"),u=s[0].trim(),l=be.getTransformersForOccurence(o);i+="}}".length;var p=t[u];if(void 0===p)throw new Error(ie(xe.MESSAGE_PARAMETER_NO_VALUE,{paramName:u}));for(var c=0,f=l;c=0||e.indexOf("\r")>=0)return!1;Ce.startsWith(e,"http://")?e=e.substring("http://".length):Ce.startsWith(e,"https://")?e=e.substring("https://".length):Ce.startsWith(e,"./")?e=e.substring("./".length):Ce.startsWith(e,"/")&&(e=e.substring("/".length)),e=e.replace(/\.\.\//g,"");var t=e.split("/");if(0==t.length)return!1;for(var n=0,r=t;n1&&":"==t.charAt(1)&&/^win/.test(e.platform)&&(t=t.substring(2));var n=t.split("/");return 0==n[0].length&&(n=n.slice(1)),n.length>0&&0==n[n.length-1].length&&(n=n.slice(0,n.length-1)),n},He=function(e,t,n){try{new RegExp(e)}catch(r){t.accept(Z(xe.ILLEGAL_PATTERN,{value:e},n))}},Ye=function(){function e(){}return e.prototype.validateName=function(e,t){var n=e.name();if(n){var r=e.lowLevel().keyStart();this.check(n,r,e,t)}},e.prototype.validateValue=function(e,t){var n=e.value();if("string"==typeof n){var r=e.lowLevel().valueStart();this.check(n,r,e,t)}},e.prototype.hasTraitOrResourceTypeParent=function(e){for(var t=e.parent();null!=t;){if(!t.definition())return!1;if(Te.isTraitType(t.definition())||Te.isResourceTypeType(t.definition()))return!0;t=t.parent()}return!1},e.prototype.check=function(e,t,n,r){if(!this.hasTraitOrResourceTypeParent(n))return[];for(var i=[],a=0,o=e.indexOf("<<");o>=0;o=e.indexOf("<<",a)){o+="<<".length,a=e.indexOf(">>",o);var s=e.substring(o,a),u=s.indexOf("|"),l=u>=0?s.substring(0,u):s;if(0==l.trim().length){var p=Z(xe.TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS,{},n);p.start=t+o,p.end=t+a,r.accept(p)}if(u!=-1){u++;for(var c=s.split("|").slice(1).map(function(e){return e.trim()}),f=be.getTransformNames(),h=0,d=c;h>".length}return i},e}(),qe=function(){function e(){}return e.prototype.validate=function(t,n){var r=t.parent();if(r&&(r.definition().isAssignableFrom(_e.Universe08.Method.name)||r.definition().isAssignableFrom(_e.Universe10.Method.name))){var i=me.find(r.lowLevel()&&r.lowLevel().children()||[],function(e){var t=e.key();return t&&(_e.Universe08.MethodBase.properties.body.name===t||_e.Universe10.MethodBase.properties.body.name===t)});i&&me.find(e.methodsWithoutRequestBody,function(e){return r.name()===e})&&n.accept(Z(xe.REQUEST_BODY_DISABLED,{methodName:r.name()},r))}},e.methodsWithoutRequestBody=["trace"],e}(),Ge=function(){function e(){}return e.prototype.validate=function(e,t){var n=i(e,t),r=e.value(),a=e.parent(),l=a.definition(),f=l.universe().version(),h=null!=c(a),d=e.property();if(!d.range().hasStructure()){if(ge.StructuredValue.isInstance(r)&&!d.isSelfNode()){if(o(d)&&d.domain().key()==_e.Universe08.BodyLike){var m=new ge.ASTNodeImpl(e.lowLevel(),a,l.universe().type(_e.Universe08.BodyLike.name),d);return void m.validate(t)}if("RAML10"==f&&h)return;t.accept(Z(xe.SCALAR_EXPECTED,{},e))}else{var y=e.lowLevel().valueKind();if(e.lowLevel().valueKind()!=ye.Kind.INCLUDE_REF&&!d.getAdapter(Ne.RAMLPropertyService).isKey()&&!(d.isMultiValue()||Te.isApiType(l)&&Te.isTitleProperty(d))){var v=d.range().key();v!=_e.Universe08.StringType&&v!=_e.Universe08.MarkdownString&&v!=_e.Universe08.MimeType||y!=ye.Kind.SEQ&&y!=ye.Kind.MAPPING&&y!=ye.Kind.MAP&&(!d.isRequired()&&!Te.isMediaTypeProperty(d)||null!=y&&void 0!==y)||d.domain().getAdapter(Ne.RAMLService).isInlinedTemplates()||t.accept(Z(xe.INVALID_PROPERTY_RANGE,{propName:e.name(),range:"string"},e))}}if(e.isAnnotatedScalar()){var g=new rt;e.annotations().forEach(function(e){var n=e.value(),r=n.toHighLevel();r?g.validate(r,t):t.accept(Z(xe.UNKNOWN_ANNOTATION,{aName:n.valueName()},e))})}}var A;if("string"==typeof r?A=r:ge.StructuredValue.isInstance(r)&&(A=r.valueName()),!(A&&A.indexOf("<<")!=-1&&A.indexOf(">>")>A.indexOf("<<")&&((new Ye).validateValue(e,t),h))){if((new qe).validate(e,t),d.range().key()==_e.Universe08.MimeType||d.range().key()==_e.Universe10.MimeType||d.nameId()==_e.Universe10.TypeDeclaration.properties.name.name&&a.property().nameId()==_e.Universe10.MethodBase.properties.body.name)return void(new Je).validate(e,t);if((u(d)||s(d))&&(new mt).validate(e,t),p(d)){if("RAML08"==f){var E=e.lowLevel().parent(),_=ye.Kind.SEQ;fe.LowLevelProxyNode.isInstance(e.lowLevel())?E.valueKind()!=_&&t.accept(Z(xe.SECUREDBY_LIST_08,{},e,!1)):E.kind()!=_&&t.accept(Z(xe.SECUREDBY_LIST_08,{},e,!1))}if((new mt).validate(e,t),"RAML10"==f&&ge.StructuredValue.isInstance(r)){var T=r,S=T.children().filter(function(e){return"scopes"==e.valueName()});if(S.length>0){var N=e.findReferencedValue();if(N){var I=[];S.forEach(function(e){var t=e.children();if(t.length>0)t.forEach(function(e){var t=e.lowLevel().value();null==t||h&&t.indexOf("<<")>=0||I.push(e)});else{var n=e.lowLevel().value();null==n||h&&n.indexOf("<<")>=0||I.push(e)}});var b={},R=N.element(ve.universesInfo.Universe10.AbstractSecurityScheme.properties.settings.name);if(R){var M=R.attributes(ve.universesInfo.Universe10.OAuth2SecuritySchemeSettings.properties.scopes.name);M.forEach(function(e){return b[e.value()]=!0})}for(var C=0,w=I;C0&&(me.find(N,function(e){return e==n})||n&&0==n.indexOf("x-")&&r.nameId()==_e.Universe08.AbstractSecurityScheme.properties.type.name||f.accept(Z(xe.INVALID_VALUE,{iValue:n,aValues:N.map(function(e){return"'"+e+"'"}).join(", ")},e)))}},e}(),$e=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=(new Qe).parseUrl(e.value()||"");if(n.some(function(e){return"version"==e})&&"baseUri"==e.property().nameId()){var r=e.root().attr("version");r||t.accept(Z(xe.MISSING_VERSION,{},e,!1))}n.some(function(e){return 0==e.length})&&t.accept(Z(xe.URI_PARAMETER_NAME_MISSING,{},e,!1))}catch(n){t.accept(Z(xe.URI_EXCEPTION,{msg:n.message},e,!1))}},e}(),Je=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=e.value();if("body"==n&&e.parent().parent()){var r=e.parent().parent().definition().key();(r===_e.Universe08.Response||r===_e.Universe10.Response||e.parent().parent().definition().isAssignableFrom(_e.Universe10.MethodBase.name))&&(n=e.parent().computedValue("mediaType"))}if(null!=c(e)&&"string"==typeof n&&n.indexOf("<<")>=0)return;var i=be.parseMediaType(n);if(!i)return;i.type.match(/[\w\d][\w\d!#\$&\-\^_+\.]*/)||t.accept(Z(xe.INVALID_MEDIATYPE,{mediaType:i.type},e))}catch(n){t.accept(Z(xe.MEDIATYPE_EXCEPTION,{msg:n.message},e))}(e.value()&&"multipart/form-data"==e.value()||"application/x-www-form-urlencoded"==e.value())&&e.parent()&&e.parent().parent()&&e.parent().parent().property()&&e.parent().parent().property().nameId()==_e.Universe10.MethodBase.properties.responses.name&&t.accept(Z(xe.FORM_IN_RESPONSE,{},e,!0))},e}(),Qe=function(){function e(){}return e.prototype.checkBaseUri=function(e,t,n,r){var i=t.root().attr("baseUri");if(i){var a=i.value();try{var o=this.parseUrl(a);me.find(o,function(e){return e==n})||r.accept(Z(xe.UNUSED_URL_PARAMETER,{paramName:""},e))}catch(e){}}else r.accept(Z(xe.UNUSED_URL_PARAMETER,{paramName:""},e))},e.prototype.parseUrl=function(e){for(var t=[],n="",r=!1,i=0,a=0;a0)throw new Error(ie(xe.INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL,{symbol:"{"}));if(i<0)throw new Error(ie(xe.INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL,{symbol:"}"}));return t},e.prototype.validate=function(e,t){var n=e.value();if(e.parent().property().nameId()==_e.Universe10.Api.properties.baseUri.name){var r=e.parent().parent();return void this.checkBaseUri(e,r,n,t)}var r=e.parent().parent(),i=r.name();if(r.definition().key()===_e.Universe10.Api||r.definition().key()===_e.Universe08.Api)return void this.checkBaseUri(e,r,n,t);if(r.definition().key()!=_e.Universe10.ResourceType&&r.definition().key()!=_e.Universe08.ResourceType)try{var a=this.parseUrl(i),o=me.find(a,function(e){return e==n});if(!o){var s=e.root().attr(_e.Universe10.Api.properties.baseUri.name);if(s&&e.name()===_e.Universe08.Api.properties.baseUriParameters.name){var u=s.value();if(u&&(a=this.parseUrl(u),a&&a.length>0&&me.find(a,function(e){return e==n})))return}t.accept(Z(xe.UNUSED_URL_PARAMETER,{paramName:"'"+n+"'"},e))}}catch(e){}},e}();t.UrlParameterNameValidator=Qe,t.typeToName={},t.typeToName[_e.Universe08.Trait.name]="trait",t.typeToName[_e.Universe08.ResourceType.name]="resource type",t.typeToName[_e.Universe10.Trait.name]="trait",t.typeToName[_e.Universe10.ResourceType.name]="resource type",t.typeToName[_e.Universe10.AbstractSecurityScheme.name]="security scheme",t.typeToName[_e.Universe10.Method.name]="method",t.typeToName[_e.Universe08.Method.name]="method",t.typeToName[_e.Universe10.Resource.name]="resource",t.typeToName[_e.Universe08.Resource.name]="resource",t.typeToName[_e.Universe10.Api.name]="api",t.typeToName[_e.Universe08.Api.name]="api",t.typeToName[_e.Universe10.Response.name]="response",t.typeToName[_e.Universe08.Response.name]="response",t.typeToName[_e.Universe08.BodyLike.name]="body",t.parameterPropertyToName={},t.parameterPropertyToName[_e.Universe08.MethodBase.properties.headers.name]="header",t.parameterPropertyToName[_e.Universe08.MethodBase.properties.queryParameters.name]="query parameter",t.parameterPropertyToName[_e.Universe08.Api.properties.uriParameters.name]="uri parameter",t.parameterPropertyToName[_e.Universe08.Api.properties.baseUriParameters.name]="base uri parameter",t.parameterPropertyToName[_e.Universe08.BodyLike.properties.formParameters.name]="form parameter",t.parameterPropertyToName[_e.Universe10.MethodBase.properties.headers.name]="header",t.parameterPropertyToName[_e.Universe10.MethodBase.properties.queryParameters.name]="query parameter",t.parameterPropertyToName[_e.Universe10.ResourceBase.properties.uriParameters.name]="uri parameter",t.parameterPropertyToName[_e.Universe10.Api.properties.baseUriParameters.name]="base uri parameter",t.parameterPropertyToName[_e.Universe10.MethodBase.properties.body.name]="body",t.getHumanReadableNodeName=D;var Ze=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.value(),r=n,i=e.property();if("string"==typeof n){if(x(i,e,n,t),ve.ReferenceType.isInstance(i.range())){var a=(i.range(),le.createNode(""+n,e.lowLevel().parent(),e.lowLevel().unit()));a._actualNode().startPosition=e.lowLevel().valueStart(),a._actualNode().endPosition=e.lowLevel().valueEnd();var o=new ge.StructuredValue(a,e.parent(),e.property()),s=o.toHighLevel();s&&s.validate(t)}}else if(ge.StructuredValue.isInstance(n)){var u=n;if(u){r=u.valueName();var l=u.valueName();if(!x(i,e,l,t)){var p=u.toHighLevel();p&&p.validate(t)}}else r=null}else"number"==typeof n||"boolean"==typeof n?e.definition().isAssignableFrom(_e.Universe10.Reference.name)&&x(i,e,n+"",t):e.definition().isAssignableFrom(_e.Universe10.Reference.name)&&x(i,e,null,t);if(r){var c=w(i.range(),e.parent(),r,i);c instanceof Error&&(Xe.isInstance(c)?t.accept(Q(c,e)):t.accept(Z(xe.SCHEMA_EXCEPTION,{msg:c.message},e,c.isWarning)),c=null)}},e}(),et=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.universe(),r=n.getTypedVersion();if(r){if("0.8"!==r&&"1.0"!==r){var i=Z(xe.UNKNOWN_RAML_VERSION,{},e);t.accept(i)}var a=n.getOriginalTopLevelText();if(a){var o={typeName:a};if(a!=e.definition().nameId()){if("Api"==e.definition().nameId()){var i=Z(xe.UNKNOWN_TOPL_LEVEL_TYPE,o,e);t.accept(i)}}else if("Api"==n.getOriginalTopLevelText()){var i=Z(xe.REDUNDANT_FRAGMENT_NAME,o,e);t.accept(i)}}}},e}(),tt=function(){function e(){}return e.prototype.validate=function(e,t){var n=this;e.definition().getAdapter(Ne.RAMLService).getContextRequirements().forEach(function(n){if(!e.checkContextValue(n.name,n.value,n.value)){var r={v1:n.name,v2:n.value,v3:e.definition().nameId()},i=xe.CONTEXT_REQUIREMENT_VIOLATION;"location"==n.name&&"ParameterLocation.FORM"==n.value&&(i=xe.WEB_FORMS),t.accept(Z(i,r,e))}});var r,i=e.definition().getAdapter(Ne.RAMLService).isInlinedTemplates();if(i){for(var a={},o=0,s=e.lowLevel().children();o0&&a&&a.getByChain(s)){var l=u[0].value();t.accept(Z(xe.LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE,{typeName:s,chainedType:l},e))}else t.accept(Z(xe.UNKNOWN_ANNOTATION_TYPE,{typeName:s},e))}else t.accept(ee(n.getCode(),n.getMessage(),j(e,n).node,!1))}):o.getErrors().forEach(function(n){return t.accept(ee(n.getCode(),n.getMessage(),j(e,n).node,!1))}))}},e}(),it=function(){function e(){this.annotables={API:!0,DocumentationItem:!0,Resource:!0,Method:!0,Response:!0,RequestBody:!0,ResponseBody:!0,TypeDeclaration:!0,Example:!0,ResourceType:!0,Trait:!0,SecurityScheme:!0,SecuritySchemeSettings:!0,AnnotationType:!0,Library:!0,Overlay:!0,Extension:!0}}return e.prototype.validate=function(e,t){var n=(e.definition(),e.parsedType()),r=n.validateType(e.types().getAnnotationTypeRegistry());if(!r.isOk())for(var i=0,a=r.getErrors();i0?t.accept(Z(xe.ALLOWED_TARGETS_MUST_BE_ARRAY,{},e,!1)):this.annotables[r]||t.accept(Z(xe.UNSUPPORTED_ANNOTATION_TARGET,{aTarget:r},e,!1))}},e}(),at=function(){function e(){}return e.prototype.validate=function(e,t){if(!e.definition().isAnnotationType()){if(e.lowLevel().keyKind()==ye.Kind.SEQ){var n=e.definition().isAssignableFrom(_e.Universe10.TypeDeclaration.name);n||t.accept(Z(xe.NODE_KEY_IS_A_SEQUENCE,{},e))}var r=e.name();if(null==r&&(r=e.lowLevel().key(),null==r&&(r="")),e.definition().key()==_e.Universe08.GlobalSchema&&e.lowLevel().valueKind()!=ye.Kind.SCALAR){var o=!1;if(e.lowLevel().valueKind()==ye.Kind.ANCHOR_REF||e.lowLevel().valueKind()==ye.Kind.INCLUDE_REF){var s=e.lowLevel().value();"string"==typeof s&&(o=!0)}o||t.accept(Z(xe.SCHEMA_NAME_MUST_BE_STRING,{name:r},e))}e.parent()||((new et).validate(e,t),e.definition().key()!=_e.Universe08.Api&&e.definition().key()!=_e.Universe10.Api||(new Ie).validateApi(e.wrapperNode(),t),(new nt).validate(e,t),a(e,t)),(new pt).validate(e,t);var u=e.definition();if(u.key()==_e.Universe08.BodyLike&&e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return"formParameters"===e}))if(e.parent()&&e.parent().definition().key()==_e.Universe08.Response){var l=Z(xe.FORM_PARAMS_IN_RESPONSE,{},e);t.accept(l)}else if(e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return"schema"===e||"example"===e})){var l=Z(xe.FORM_PARAMS_WITH_EXAMPLE,{},e);t.accept(l)}if(u.key()==_e.Universe10.OAuth2SecuritySchemeSettings){var p=!1;if(e.attributes("authorizationGrants").forEach(function(e){var n=e.value();if("authorization_code"===n||"implicit"===n)p=!0;else if("password"!==n&&"client_credentials"!==n&&n&&"string"==typeof n&&n.indexOf("://")==-1&&n.indexOf(":")==-1){var r=Z(xe.AUTHORIZATION_GRANTS_ENUM,{},e);t.accept(r)}}),p&&!e.attr("authorizationUri")){var l=Z(xe.AUTHORIZATION_URI_REQUIRED,{},e);t.accept(l)}}if(e.definition().isAssignableFrom(_e.Universe08.Parameter.name)||e.definition().isAssignableFrom(_e.Universe10.TypeDeclaration.name)){var f=e.attributes("enum").map(function(e){return e.value()});if(f.length!=me.uniq(f).length){var l=Z(xe.REPEATING_COMPONENTS_IN_ENUM,{},e);t.accept(l)}if(e.definition().isAssignableFrom(_e.Universe08.NumberTypeDeclaration.name)||e.definition().isAssignableFrom(_e.Universe10.NumberTypeDeclaration.name)){var h=e.definition().isAssignableFrom(_e.Universe08.IntegerTypeDeclaration.name)||e.definition().isAssignableFrom(_e.Universe10.IntegerTypeDeclaration.name);e.attributes("enum").forEach(function(e){var n=h?parseInt(e.value()):parseFloat(e.value()),r=h?!isNaN(n)&&e.value().indexOf(".")===-1:!isNaN(n);if(!r){var i=Z(h?xe.INTEGER_EXPECTED:xe.NUMBER_EXPECTED_2,{},e);t.accept(i)}})}}Te.isResourceTypeType(e.definition())&&null==e.value()&&0==e.lowLevel().children().length&&"RAML08"==e.definition().universe().version()&&e.lowLevel().resolvedValueKind()==ye.Kind.SCALAR&&t.accept(Z(xe.RESOURCE_TYPE_NULL,{},e)),i(e,t);var d=e.value();if(("string"==typeof d||"number"==typeof d||"boolean"==typeof d)&&!e.definition().getAdapter(Ne.RAMLService).allowValue()&&e.parent()&&"~"!=d){var m=null!=c(e)&&"string"==typeof d&&Ce.startsWith(d,"<<")&&Ce.endsWith(d,">>"),y=!0;if(""==d){var v=e.lowLevel().actual()&&e.lowLevel().actual().value;v&&(v.doubleQuoted||v.singleQuoted)||(y=!1); +}if(y&&!m&&!oe(e,t,xe.SCALAR_PROHIBITED_2.code)){var l=Z(xe.SCALAR_PROHIBITED_2,{name:r},e);t.accept(l)}}(new tt).validate(e,t),(new ht).validate(e,t),(new ut).validate(e,t)}},e}(),ot=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.attrValue(_e.Universe10.TypeDeclaration.properties.name.name);"version"==n&&t.accept(Z(xe.VERSION_NOT_ALLOWED,{},e))},e}(),st=function(){function e(e,t,n,r){void 0===r&&(r=!1),this.definitions=e,this.propertyName=t,this.assignableFrom=r,this.validator=n}return e.prototype.validate=function(e,t){var n=e.definition();if(null!=n){var r=!1;if(r=this.assignableFrom?this.definitions.some(function(e){return n.isAssignableFrom(e.name)}):this.definitions.some(function(e){return e===n})){if(null!=this.propertyName){if(null==e.property())return;if(e.property().nameId()!=this.propertyName)return}this.validator.validate(e,t)}}},e}(),ut=function(){function e(){}return e.createRegistry=function(){var t=[];return e.registerValidator(t,[_e.Universe10.TypeDeclaration,_e.Universe08.Parameter],_e.Universe10.Api.properties.baseUriParameters.name,new ot,!0),t},e.registerValidator=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new st(t,n,r,i);e.push(a)},e.prototype.validate=function(t,n){e.entries.forEach(function(e){return e.validate(t,n)})},e.entries=e.createRegistry(),e}(),lt=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.definition();if(n&&(Te.isApiSibling(n)||Te.isMethodBaseSibling(n))){var r=e.lowLevel(),i=r.children().find(function(e){return e.key()==_e.Universe10.Api.properties.protocols.name});if(i){var a=i.value();null==a&&0==i.children().length?t.accept(te(xe.PROTOCOLS_ARRAY,{},i,e)):i.resolvedValueKind()!=ye.Kind.SEQ&&t.accept(te(xe.PROTOCOLS_ARRAY,{},i,e))}}},e}(),pt=function(){function e(){}return e.prototype.allowsAnyChildren=function(e,t){var n=e.property(),r=e.definition();return!(!Te.isAnnotationTypeType(r)&&!Te.isTypeDeclarationTypeOrDescendant(r)||!Te.isAnnotationTypesProperty(n))||(!(e.parent()!=t||!Te.isTypesProperty(n)||!Te.isTypeDeclarationTypeOrDescendant(r))||(!(!Te.isSchemasProperty(n)||!Te.isTypeDeclarationTypeOrDescendant(r))||(!(e.parent()!=t||!Te.isDocumentationProperty(n)||!Te.isDocumentationType(r))||(!!Te.isAnnotationsProperty(n)||(!!Te.isUsesProperty(n)||!!Te.isExamplesProperty(n))))))},e.prototype.nodeAllowedDueToParent=function(e,t){for(var n=e;n!=t&&null!=n;){if(this.allowsAnyChildren(n,t))return!0;n=n.parent()}return!1},e.prototype.validate=function(e,t){var n=e.root();if(!n.isExpanded()||n.lowLevel().unit().absolutePath()==e.lowLevel().unit().absolutePath()){e.property(),e.definition();if(Te.isOverlayType(n.definition())){if(e==n)return void this.validateProperties(e,t);if(!this.nodeAllowedDueToParent(e,n)){var r=n.knownIds();if(r){var i=r.hasOwnProperty(e.id());return i?void this.validateProperties(e,t):void t.accept(Z(xe.INVALID_OVERLAY_NODE,{nodeId:e.id()},e))}}}}},e.prototype.validateProperties=function(e,t){var n=e.root(),r=n.lowLevel().unit().absolutePath(),i=n.isExpanded();e.attrs().forEach(function(n){i&&r!=n.lowLevel().unit().absolutePath()||n.property().getAdapter(Ne.RAMLPropertyService).isKey()||n.parent()==e&&(n.isElement()||Te.isTitlePropertyName(n.name())||Te.isDescriptionPropertyName(n.name())||Te.isDisplayNamePropertyName(n.name())||Te.isUsagePropertyName(n.name())||Te.isExampleProperty(n.property())||Te.isMasterRefProperty(n.property())||Te.isAnnotationsProperty(n.property())||Te.isUsesProperty(n.property())||t.accept(Z(xe.INVALID_OVERRIDE_IN_OVERLAY,{propName:n.name()},n)))})},e}(),ct=function(){function e(){}return e.prototype.validate=function(e,t){var n=this,r=new pt;r.validate(e,t),e.directChildren().forEach(function(e){e.isElement()&&n.validate(e.asElement(),t)})},e}(),ft=function(){function e(){}return e.prototype.val=function(e,t,n){var r=this;if(e.kind()==ye.Kind.MAP||e.kind()==ye.Kind.MAPPING){var i={};e.children().forEach(function(e){var r=e.key();if(r){if(i.hasOwnProperty(r)){var a=Z(xe.KEYS_SHOULD_BE_UNIQUE,{},n,!1);e.unit()==n.lowLevel().unit()&&(a.start=e.keyStart(),a.end=e.keyEnd()),t.accept(a)}i[r]=1}})}e.children().forEach(function(e){r.val(e,t,n)})},e.prototype.validate=function(e,t){this.val(e.lowLevel(),t,e)},e}(),ht=function(){function e(){}return e.prototype.validate=function(e,t){this.validateChildElements(e,t);var n=e.lowLevel().children(),r=me.groupBy(n.filter(function(e){return null!=e.key()}),function(e){return e.key()});this.validateChildAttributes(e,r,t),this.validateUnrecognizedLowLevelChildren(e,r,t)},e.prototype.validateChildElements=function(e,t){var n={},r=e.directChildren().filter(function(e){return e.isElement()});r.forEach(function(e){var t=e;if(!t._computed&&t.name()){var r=t.name()+t.property().nameId();n.hasOwnProperty(r)?t.isNamePatch()||n[r].push(t):n[r]=[t]}}),Object.keys(n).forEach(function(e){var r=n[e];!r||r.length<2||r.forEach(function(e){var n=D(e),r={name:e.name()},i=xe.ALREADY_EXISTS_IN_CONTEXT;n&&(r.capitalized=De.upperCaseFirst(n),i=xe.ALREADY_EXISTS);var a=Z(i,r,e);t.accept(a)})})},e.prototype.validateChildAttributes=function(e,t,n){var r=this.getHighLevelAttributes(e),i=me.groupBy(r,function(e){return e.name()}),a=this.allowsAnyAndHasRequireds(e);Object.keys(i).forEach(function(r){if(!(i[r].length<2)){var o=i[r][0].isUnknown(),s=!o&&i[r][0].property().isMultiValue();s&&(e.definition().isAssignableFrom(_e.Universe08.SecuritySchemeSettings.name)||e.definition().isAssignableFrom(_e.Universe10.SecuritySchemeSettings.name))&&(s=t[r]&&1===t[r].length),(o&&a||!s||s&&null!=t[r]&&t[r].length>1)&&i[r].forEach(function(e){var t={propName:e.property()?e.property().nameId():e.name()},r=xe.PROPERTY_USED,i=D(e.parent());i&&(t.parent=De.upperCaseFirst(i),r=xe.PARENT_PROPERTY_USED);var a=Z(r,t,e);n.accept(a)})}})},e.prototype.validateUnrecognizedLowLevelChildren=function(e,t,n){var r=e.directChildren(),i=me.groupBy(r,function(e){return e.name()});Object.keys(t).forEach(function(r){if(r&&t[r].length>1&&!i[r]){if(e.definition().isAssignableFrom(_e.Universe10.ObjectTypeDeclaration.name))return;var a={propName:r},o=xe.PROPERTY_USED,s=D(e);s&&(a.parent=De.upperCaseFirst(s),o=xe.PARENT_PROPERTY_USED),t[r].forEach(function(t){var r=te(o,a,t,e);r.start=t.keyStart(),r.end=t.keyEnd(),n.accept(r)})}})},e.prototype.filterMultiValueAnnotations=function(e,t,n){this.getHighLevelAttributes(e);Object.keys(t).forEach(function(e){"("!==e.charAt(0)||t[e].length<2})},e.prototype.getHighLevelAttributes=function(e){var t=this.allowsAnyAndHasRequireds(e);return e.directChildren().filter(function(e){return e.isAttr()||t})},e.prototype.allowsAnyAndHasRequireds=function(e){var t=e.definition().requiredProperties(),n=t&&t.length>0,r=e.definition().getAdapter(Ne.RAMLService),i=r&&r.getAllowAny(),a=i&&n;return a},e}(),dt=function(){function e(){}return e.prototype.validate=function(e,t){if(e.definition().isAssignableFrom(_e.Universe10.UsesDeclaration.name)){var n=e.attr(_e.Universe10.UsesDeclaration.properties.value.name),r=n&&n.value();if(null!=r&&"string"==typeof r){var i=e.lowLevel().unit().resolve(r);if(null!=i&&e.root().lowLevel().actual().libExpanded){var a=i,o=a.ast(),s=o.children().filter(function(e){var t=e.key();return Ce.startsWith(t,"(")&&Ce.endsWith(t,")")});if(s.length>0)for(var u=e.root().lowLevel().unit(),l=u.project().namespaceResolver(),p=e.root().definition().universe().type(_e.Universe10.Annotable.name),c=(p.property(_e.Universe10.Annotable.properties.annotations.name),0),f=s;c=0&&(g=y.substring(0,A),v=y.substring(A+1));var E=a;if(g){var _=l.nsMap(a);_.hasOwnProperty(g)&&(E=_[g].unit)}var T=!1;if(E){var S=l.unitModel(E);S.annotationTypes.hasElement(v)||(T=!0)}else T=!0;if(T){var N=Me.messageRegistry.UNKNOWN_ANNOTATION_TYPE,I=te(N,{typeName:y},h,e),b=Z(xe.ISSUES_IN_THE_LIBRARY,{value:r},e,!0);I.extras.push(b),t.accept(I)}}}return}if(i&&null!==i.contents()){if(!Pe.isWaitingFor(r)){var R=[];if(0===i.contents().trim().length)return void t.accept(Z(xe.EMPTY_FILE,{path:r},e,!1));var M=i.highLevel().asElement(),C=new ge.ASTNodeImpl(M.lowLevel(),M.parent(),M.definition(),M.property());if(C.setValueSource(e),C.validate(ge.createBasicValidationAcceptor(R,C)),R.length>0&&e.lowLevel().start()>=0){var w=je(n,e);R.forEach(function(e){e.unit=null==e.unit?i:e.unit,e.path||(e.path=i.path())});for(var P=0,L=R;P0;)if(D=D.extras[0],D==w){U=!0;break}U||(D.extras||(D.extras=[]),D.extras.push(w)),t.accept(O)}}}}else t.accept(Z(xe.INVALID_LIBRARY_PATH,{path:r},e,!1))}}},e}(),mt=function(){function e(){}return e.prototype.validate=function(e,t){var n=this.isStrict(e);if(n||Fe.validateNotStrictExamples){var r=this.parseObject(e,t,n);if(null!=r){var i=this.aquireSchema(e);if(i){var a=r;"object"==typeof a&&(a=e.value()),i.validate(a,t,n)}}}},e.prototype.isExampleNode=function(e){return this.isSingleExampleNode(e)||this.isExampleNodeInMultipleDecl(e)},e.prototype.isSingleExampleNode=function(e){return e.name()==_e.Universe10.TypeDeclaration.properties.example.name},e.prototype.isExampleNodeInMultipleDecl=function(e){var t=e.parent();return!!t&&Te.isExampleSpecType(t.definition())},e.prototype.findParentSchemaOrTypeAttribute=function(e){var t=e.parent().attr(_e.Universe10.TypeDeclaration.properties.schema.name);return t?t:(t=e.parent().attr(_e.Universe10.TypeDeclaration.properties.type.name))?t:e.parent()?(t=e.parent().parent().attr(_e.Universe10.TypeDeclaration.properties.schema.name))?t:(t=e.parent().parent().attr(_e.Universe10.TypeDeclaration.properties.type.name),t?t:null):null},e.prototype.aquireSchema=function(e){var t=e.parent().definition().isAssignableFrom(_e.Universe10.TypeDeclaration.name);if(this.isExampleNode(e)){var n=e;if(this.isExampleNodeInMultipleDecl(e)&&(n=e.parent()),n.parent()&&(n.parent().definition().isAssignableFrom(_e.Universe10.TypeDeclaration.name)&&null===n.parent().parent()?t=!1:n.parent().property().nameId()==_e.Universe10.LibraryBase.properties.types.name&&(t=!1),n.parent().parent())){var r=n.parent().parent().definition().key();r!=_e.Universe08.Method&&r!=_e.Universe10.Method||n.parent().property().nameId()==_e.Universe10.MethodBase.properties.queryParameters.name||(t=!0),r!=_e.Universe08.Response&&r!=_e.Universe10.Response||(t=!0)}}if(e.parent().definition().key()==_e.Universe08.BodyLike||t){var i=this.findParentSchemaOrTypeAttribute(e);if(i){var a=i.value();if(ge.StructuredValue.isInstance(a))return null;var o=(""+a).trim(),s=null;if("{"==o.charAt(0))try{s=Le.getJSONSchema(o,Y(i.lowLevel()))}catch(e){return null}if("<"==o.charAt(0))try{s=Le.getXMLSchema(o)}catch(e){return null}if(s)return{validate:function(t,n,r){try{if(t.__$validated)return;if(s instanceof Error)return void n.accept(Z(xe.INVALID_VALUE_SCHEMA,{iValue:s.message},e,!r));s.validate(t)}catch(t){var a="Cannot assign to read only property '__$validated' of ";if(t.message&&0==t.message.indexOf(a)){var o=t.message.substr(a.length,t.message.length-a.length);return void n.accept(Z(xe.INVALID_JSON_SCHEMA,{propName:o},i,!r))}if("Object.keys called on non-object"==t.message)return;return Xe.isInstance(t)?void(oe(e,n,t.messageEntry.code,!r)||n.accept(Q(t,e,!r))):void n.accept(Z(xe.EXAMPLE_SCHEMA_FAILURE,{msg:t.message},e,!r))}}};if(o.length>0){var u=e.parent(),l=u&&u.parent(),p=u&&u.definition()&&u.definition().isAssignableFrom(_e.Universe10.ObjectTypeDeclaration.name)&&u;if(p=p||l&&l.definition()&&l.definition().isAssignableFrom(_e.Universe10.ObjectTypeDeclaration.name)&&l)return this.typeValidator(p,e)}}}return this.getSchemaFromModel(e)},e.prototype.getSchemaFromModel=function(e){var t=e.parent();return this.typeValidator(t,e)},e.prototype.typeValidator=function(e,t){var n={validate:function(n,r,i){var a=e.parsedType();if(a&&!a.isUnknown()){"number"==typeof n&&a.isString()&&(n=""+n),"boolean"==typeof n&&a.isString()&&(n=""+n),a.getExtra("repeat")&&(n=[n]);var o=a.validate(n,!1);o.isOk()||o.getErrors().forEach(function(e){return r.accept(ee(e.getCode(),e.getMessage(),t,!i,e.getInternalRange()))})}}};return n},e.prototype.toObject=function(e,t,n){var r=t.lowLevel().dumpToObject(!0);return this.testDublication(e,t.lowLevel(),n),r.example?r.example:r.content?r.content:void 0},e.prototype.testDublication=function(e,t,n){var r=this,i={};t.children().forEach(function(t){t.key()&&(i[t.key()]&&n.accept(Z(xe.KEYS_SHOULD_BE_UNIQUE,{},new ge.BasicASTNode(t,e.parent()))),i[t.key()]=t),r.testDublication(e,t,n)})},e.prototype.parseObject=function(e,t,n){var r=null,i=e.value(),a=X(e);if(ge.StructuredValue.isInstance(i))r=this.toObject(e,i,t);else if(a){var o=se(a,i,t,e,!n);if(!o.status)return;r=o.result}else try{if(!(i&&i.length>0)||"["!=i.trim().charAt(0)&&"{"!=i.trim().charAt(0)&&"<"!=i.trim().charAt(0))return i;r=JSON.parse(i)}catch(a){if(0!=i.trim().indexOf("<"))return i;try{r=Oe.parseXML(i)}catch(r){return void t.accept(Z(xe.CAN_NOT_PARSE_XML,{msg:r.message},e,!n))}}return null!=r&&"object"!=typeof r?i:r},e.prototype.isStrict=function(e){if(Te.isDefaultValue(e.property()))return!0;if(Te.isExampleProperty(e.property())&&"RAML08"==e.parent().definition().universe().version())return!1;var t=!1,n=e.parent().attr("strict");return n&&"true"==n.value()&&(t=!0),t},e}();t.ExampleAndDefaultValueValidator=mt;var yt=function(e,t,n){var r=De.sentence(e).toLowerCase();return t||(r=De.ucFirst(r)),n&&(r=Ue.plural(r)),r},vt=function(){function e(){}return e.prototype.validate=function(e,t){if(e.isAttr()){if(!e.optional())return;var n=e,r=n.property();if(r.isMultiValue()||r.range().isArray())return;if(!r.isFromParentKey()){var i=c(n.parent());if(i&&r.isValueProperty()){var a=Z(xe.OPTIONAL_SCLARAR_PROPERTIES_10,{templateName:i.nameId(),propName:n.name()},n,!1);t.accept(a)}}}else if(e.isElement()){var o=e,r=o.property(),s=o.allowsQuestion();s||o.optionalProperties().forEach(function(n){o.children().forEach(function(n){var i={propName:r.nameId(),oPropName:n.lowLevel().key()},a=Z(xe.OPTIONAL_PROPERTIES_10,i,e,!1);t.accept(a)})});var u=e.asElement().definition();if(e.optional()&&"RAML10"==u.universe().version()){var r=e.property(),l=Te.isQueryParametersProperty(r)||Te.isUriParametersProperty(r)||Te.isHeadersProperty(r);if(!(Te.isMethodType(u)||Te.isTypeDeclarationType(u)&&l)){var a=Z(xe.ONLY_METHODS_CAN_BE_OPTIONAL,{},e,!1);t.accept(a)}}}},e}(),gt=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.definition(),r=_e.Universe10.Api.properties.baseUri.name,i=_e.Universe10.Api.properties.baseUriParameters.name,a=_e.Universe10.Resource.properties.relativeUri.name,o=_e.Universe10.ResourceBase.properties.uriParameters.name;if(Te.isApiSibling(n))this.inspectParameters(e,t,r,i);else if(Te.isResourceType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s),this.inspectParameters(e,t,a,o)}else if(Te.isResourceTypeType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s)}},e.prototype.inspectParameters=function(e,t,n,r,i){i=i||e;var a="",o=i.attr(n);o&&(a=o.value(),a&&"string"==typeof a||(a=""));var s=e.elementsOfKind(r);s.forEach(function(n){var i=n.attr(_e.Universe10.TypeDeclaration.properties.name.name);if(i){var o=i.value();if(null!=o&&a.indexOf("{"+o+"}")<0){if(Te.isResourceTypeType(e.definition())&&o.indexOf("<<")>=0)return;var s=De.upperCaseFirst(Ue.singular(De.sentence(r))),u=Z(xe.PROPERTY_UNUSED,{propName:s},n,!0);t.accept(u)}}})},e}(),At=function(){function e(){this.nameProperty=_e.Universe10.ResourceType.properties.name.name}return e.prototype.validate=function(e,t){var n=e.definition();if(Te.isLibraryBaseSibling(n)||Te.isApiType(n)){var r,i,a=(_e.Universe10.LibraryBase.properties.resourceTypes.name,_e.Universe10.ResourceBase.properties.type.name),o=(_e.Universe10.LibraryBase.properties.traits.name,_e.Universe10.MethodBase.properties.is.name);e.root().lowLevel().actual().libExpanded?(r=e.elementsOfKind(_e.Universe10.LibraryBase.properties.resourceTypes.name),i=e.elementsOfKind(_e.Universe10.LibraryBase.properties.traits.name)):(r=Re.globalDeclarations(e).filter(function(e){return Te.isResourceTypeType(e.definition())}),i=Re.globalDeclarations(e).filter(function(e){return Te.isTraitType(e.definition())})),this.checkCycles(r,a,t),this.checkCycles(i,o,t)}},e.prototype.checkCycles=function(e,t,n){var r=this,i={};e.forEach(function(e){var t=r.templateName(e);i[t]=e});var a={};e.forEach(function(e){var o=r.templateName(e);a[o]||r.findCyclesInDefinition(e,t,i).forEach(function(t){t.forEach(function(e){return a[e]=!0}),t=t.reverse();var r=yt(e.definition().nameId()),i=t.join(" -> "),o={typeName:r,cycle:i},s=Z(xe.CYCLE_IN_DEFINITION,o,e,!1);n.accept(s)})})},e.prototype.templateName=function(e){var t=e.attr(this.nameProperty);return t?t.value():null},e.prototype.findCyclesInDefinition=function(e,t,n,r){void 0===r&&(r={});var i=this.templateName(e);if(r[i])return[[i]];var a={};Object.keys(r).forEach(function(e){return a[e]=r[e]}),a[i]=!0;for(var o=[],s=e.attributes(t),u=0;u0&&(h=m);var y=l.keyEnd();y>0&&(d=y)}if(d0&&y>m&&(h=m,d=y)}}return{code:t,isWarning:n,message:r,node:e,start:h,end:d,path:i?l.unit()?l.unit().path():"":null,extras:[],unit:e?l.unit():null}},Tt=function(e,t,n,r,i,a,o,s,u){if(void 0===s&&(s=!1),void 0===u&&(u=!1),o){var l=$(null,e,n,r,i,a,null,o,u,s);if(l)return l}var p=e.unit()&&e.unit().contents(),c=p&&p.length,f=e.start(),h=e.end();if(c&&h>=c&&(h=c-1),e.key()&&e.keyStart()){var d=e.keyStart();d>0&&(f=d);var m=e.keyEnd();m>0&&(h=m)}var y=e.value(!0);return s&&y&&y.length>0&&(f=e.valueStart(),h=e.valueEnd()),{code:n,isWarning:r,message:i,node:t,start:f,end:h,path:a?e.unit()?e.unit().path():"":null,extras:[],unit:e?e.unit():null}};t.toIssue=J,t.createIssue1=Z,t.createIssue=ee,t.createLLIssue=ne,t.validateResponseString=re,t.applyTemplate=ie;var St=function(){function e(){this.propertiesMap={},this.init()}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.init=function(){for(var e=ve.getUniverse.availableUniverses(),t=0,n=e;t0&&(n.__$errors__=r)}return n}var s=[];return e.children().forEach(function(e){s.push(i(e,t))}),s}function a(e){var t=[].concat(e.errors());return e.children().forEach(function(e){var n=e.children();return 0==n.length?void e.errors().forEach(function(e){return t.push(e)}):void(n[0].key()||n.forEach(function(e){0==e.children().length&&e.errors().forEach(function(e){return t.push(e)})}))}),t}function o(e,t){return t&&e&&t.escapeNumericKeys&&0==e.replace(/\d/g,"").trim().length?"__$EscapedKey$__"+e:e}function s(e,t){return e?(t=t||{},t.escapeNumericKeys&&f.stringStartsWith(e,"__$EscapedKey$__")&&0==e.substring("__$EscapedKey$__".length).replace(/\d/g,"").trim().length?e.substring("__$EscapedKey$__".length):e):e}Object.defineProperty(t,"__esModule",{value:!0});var u=n(21),l=n(5),p=n(55),c=n(16),f=n(15),h=n(4),d=n(207),m=u.YAMLException,y=function(){function e(e,t,n,r,i,a){void 0===a&&(a={}),this._absolutePath=e,this._path=t,this._content=n,this._project=r,this._isTopoLevel=i,this.serializeOptions=a,this._node=new v(this,JSON.parse(this._content),null,a)}return e.prototype.highLevel=function(){return p.fromUnit(this)},e.prototype.absolutePath=function(){return this._absolutePath},e.prototype.clone=function(){return null},e.prototype.contents=function(){return this._content},e.prototype.lexerErrors=function(){return[]},e.prototype.path=function(){return this._content},e.prototype.isTopLevel=function(){return this._isTopoLevel},e.prototype.ast=function(){return this._node},e.prototype.expandedHighLevel=function(){return this.highLevel()},e.prototype.isDirty=function(){return!0},e.prototype.getIncludeNodes=function(){return[]},e.prototype.resolveAsync=function(e){return null},e.prototype.isRAMLUnit=function(){return!0},e.prototype.project=function(){return this._project},e.prototype.updateContent=function(e){},e.prototype.ramlVersion=function(){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.lineMapper=function(){return new l.LineMapperImpl(this.contents(),this.absolutePath())},e.prototype.resolve=function(e){return null},e.prototype.isOverlayOrExtension=function(){return!1},e.prototype.getMasterReferenceNode=function(){return null},e}();t.CompilationUnit=y;var v=function(){function e(e,t,n,r,i){void 0===r&&(r={});var a=this;this._unit=e,this._object=t,this._parent=n,this.options=r,this._key=i,this._isOptional=!1,this._object instanceof Object&&Object.keys(this._object).forEach(function(e){var t=s(e,a.options);if(t!=e){var n=a._object[e];delete a._object[e],a._object[t]=n}}),this._key&&f.stringEndsWith(this._key,"?")&&(this._isOptional=!0,this._key=this._key.substring(0,this._key.length-1))}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&c.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.keyKind=function(){return null},e.prototype.isAnnotatedScalar=function(){return!1},e.prototype.hasInnerIncludeError=function(){return!1},e.prototype.start=function(){return-1},e.prototype.end=function(){return-1},e.prototype.value=function(){return this._object},e.prototype.actual=function(){return this._object},e.prototype.includeErrors=function(){return[]},e.prototype.includePath=function(){return null},e.prototype.includeReference=function(){return null},e.prototype.key=function(){return this._key},e.prototype.optional=function(){return this._isOptional},e.prototype.children=function(){var t=this;return this._object?Array.isArray(this._object)?this._object.map(function(n){return new e(t._unit,n,t,t.options)}):this._object instanceof Object?Object.keys(this._object).map(function(n){return new e(t._unit,t._object[n],t,t.options,n)}):[]:[]},e.prototype.parent=function(){return this._parent},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.anchorId=function(){return null},e.prototype.errors=function(){return[]},e.prototype.anchoredFrom=function(){return this},e.prototype.includedFrom=function(){return this},e.prototype.visit=function(e){e(this)&&this.children().forEach(function(t){return t.visit(e)})},e.prototype.dumpToObject=function(){return this._object},e.prototype.addChild=function(e){},e.prototype.execute=function(e){},e.prototype.dump=function(){return JSON.stringify(this._object)},e.prototype.keyStart=function(){return-1},e.prototype.keyEnd=function(){return-1},e.prototype.valueStart=function(){return-1},e.prototype.valueEnd=function(){return-1},e.prototype.isValueLocal=function(){return!0},e.prototype.kind=function(){return Array.isArray(this._object)?u.Kind.SEQ:this._object instanceof Object?u.Kind.MAP:u.Kind.SCALAR},e.prototype.valueKind=function(){if(!this._object)return null;var e=typeof this._object;return Array.isArray(this._object)?u.Kind.SEQ:"object"==e?u.Kind.MAP:"string"==e||"number"==e||"boolean"==e?u.Kind.SCALAR:null},e.prototype.anchorValueKind=function(){return null},e.prototype.resolvedValueKind=function(){return this.valueKind()},e.prototype.show=function(e){},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.text=function(e){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.copy=function(){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.markup=function(e){throw new m(d.NOT_IMPLEMENTED.message)},e.prototype.nodeDefinition=function(){return h.getDefinitionForLowLevelNode(this)},e.prototype.includesContents=function(){return!1},e.CLASS_IDENTIFIER="json2LowLeve.AstNode",e}();t.AstNode=v,t.serialize2=r,t.serialize=i},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var i=n(22);t.load=i.load,t.loadAll=i.loadAll,t.safeLoad=i.safeLoad,t.safeLoadAll=i.safeLoadAll;var a=n(53);t.dump=a.dump,t.safeDump=a.safeDump,t.YAMLException=n(25),r(n(23)),r(n(54))},function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function a(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function l(e){return 48<=e&&e<=57?e-48:-1}function p(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function c(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t,n){return void 0===n&&(n=!1),new j(t,new W(e.filename,e.input,e.position,e.line,e.position-e.lineStart),n)}function h(e,t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!1);var a=A(e,t);if(a){var o=n+t;if(!e.errorMap[o]){var s=new W(e.filename,e.input,t,a.line,t-a.start);i&&(s.toLineEnd=!0);var u=new j(n,s,r);e.errors.push(u)}}}function d(e,t){var n=f(e,t),r=n.message+n.mark.position;if(!e.errorMap[r]){e.errors.push(n),e.errorMap[r]=1;for(var i=e.position;;){if(e.position>=e.input.length-1)return;var a=e.input.charAt(e.position);if("\n"==a)return e.position--,void(e.position==i&&(e.position+=1));if("\r"==a)return e.position--,void(e.position==i&&(e.position+=1));e.position++}}}function m(e,t){var n=f(e,t);e.onWarning&&e.onWarning.call(null,n)}function y(e,t,n,r){var i,a,o,s,u=e.result;if(u.startPosition==-1&&(u.startPosition=t),t<=n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;it);r++)n=e.lines[r];return n?n:{start:0,line:0}}function E(e,t,n){for(var a=0,o=e.input.charCodeAt(e.position);0!==o;){for(;i(o);)9===o&&e.errors.push(f(e,"Using tabs can lead to unpredictable results",!0)),o=e.input.charCodeAt(++e.position);if(t&&35===o)do o=e.input.charCodeAt(++e.position);while(10!==o&&13!==o&&0!==o);if(!r(o))break;for(g(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==a&&e.lineIndent1&&(t.value+=K.repeat("\n",n-1))}function S(e,t,n){var s,u,l,p,c,f,h,d,m,v=e.kind,g=e.result,A=V.newScalar();if(A.plainScalar=!0,e.result=A,m=e.input.charCodeAt(e.position),a(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u)))return!1;for(e.kind="scalar",l=p=e.position,c=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),a(s))break}else{if(e.position===e.lineStart&&_(e)||n&&o(m))break;if(r(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,E(e,!1,-1),e.lineIndent>=t){c=!0,m=e.input.charCodeAt(e.position);continue}e.position=p,e.line=f,e.lineStart=h,e.lineIndent=d;break}}if(c&&(y(e,l,p,!1),T(e,A,e.line-f),l=p=e.position,c=!1),i(m)||(p=e.position+1),m=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return y(e,l,p,!1),e.result.startPosition!=-1?(A.rawValue=e.input.substring(A.startPosition,A.endPosition), +!0):(e.kind=v,e.result=g,!1)}function N(e,t){var n,i,a;if(n=e.input.charCodeAt(e.position),39!==n)return!1;var o=V.newScalar();for(o.singleQuoted=!0,e.kind="scalar",e.result=o,o.startPosition=e.position,e.position++,i=a=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(y(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),o.endPosition=e.position,39!==n)return!0;i=a=e.position,e.position++}else r(n)?(y(e,i,a,!0),T(e,o,E(e,!1,t)),i=a=e.position):e.position===e.lineStart&&_(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position,o.endPosition=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function I(e,t){var n,i,a,o,l,p;if(p=e.input.charCodeAt(e.position),34!==p)return!1;e.kind="scalar";var f=V.newScalar();for(f.doubleQuoted=!0,e.result=f,f.startPosition=e.position,e.position++,n=i=e.position;0!==(p=e.input.charCodeAt(e.position));){if(34===p)return y(e,n,e.position,!0),e.position++,f.endPosition=e.position,f.rawValue=e.input.substring(f.startPosition,f.endPosition),!0;if(92===p){if(y(e,n,e.position,!0),p=e.input.charCodeAt(++e.position),r(p))E(e,!1,t);else if(p<256&&(e.allowAnyEscape?se[p]:ae[p]))f.value+=e.allowAnyEscape?ue[p]:oe[p],e.position++;else if((l=u(p))>0){for(a=l,o=0;a>0;a--)p=e.input.charCodeAt(++e.position),(l=s(p))>=0?o=(o<<4)+l:d(e,"expected hexadecimal character");f.value+=c(o),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(p)?(y(e,n,i,!0),T(e,f,E(e,!1,t)),n=i=e.position):e.position===e.lineStart&&_(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function b(e,t){var n,r,i,o,s,u,l,p,c,f,h,m=!0,y=e.tag,g=e.anchor;if(h=e.input.charCodeAt(e.position),91===h)o=93,l=!1,r=V.newItems(),r.startPosition=e.position;else{if(123!==h)return!1;o=125,l=!0,r=V.newMap(),r.startPosition=e.position}for(null!==e.anchor&&(r.anchorId=e.anchor,e.anchorMap[e.anchor]=r),h=e.input.charCodeAt(++e.position);0!==h;){if(E(e,!0,t),h=e.input.charCodeAt(e.position),h===o)return e.position++,e.tag=y,e.anchor=g,e.kind=l?"mapping":"sequence",e.result=r,r.endPosition=e.position,!0;if(!m){var A=e.position;d(e,"missed comma between flow collection entries"),e.position=A+1}if(c=p=f=null,s=u=!1,63===h&&(i=e.input.charCodeAt(e.position+1),a(i)&&(s=u=!0,e.position++,E(e,!0,t))),n=e.line,O(e,t,G,!1,!0),c=e.tag,p=e.result,E(e,!0,t),h=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),E(e,!0,t),O(e,t,G,!1,!0),f=e.result),l)v(e,r,c,p,f);else if(s){var _=v(e,null,c,p,f);_.parent=r,r.items.push(_)}else p&&(p.parent=r),r.items.push(p);r.endPosition=e.position+1,E(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function R(e,t){var n,a,o,s,u=J,p=!1,c=t,f=0,h=!1;if(s=e.input.charCodeAt(e.position),124===s)a=!1;else{if(62!==s)return!1;a=!0}var m=V.newScalar();for(e.kind="scalar",e.result=m,m.startPosition=e.position;0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)J===u?u=43===s?Z:Q:d(e,"repeat of a chomping mode identifier");else{if(!((o=l(s))>=0))break;0===o?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?d(e,"repeat of an indentation width identifier"):(c=t+o-1,p=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(g(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentc&&(c=e.lineIndent),r(s))f++;else{if(e.lineIndentt)&&0!==i)d(e,"bad indentation of a sequence entry");else if(e.lineIndent0;)if(l=e.input.charCodeAt(--e.position),r(l)){e.position++;break}}}else 63===l?(g&&(v(e,f,h,m,null),h=m=y=null),A=!0,g=!0,s=!0):g?(g=!1,s=!0):d(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,l=o;if((e.line===u||e.lineIndent>t)&&(O(e,t,$,!0,s)&&(g?m=e.result:y=e.result),g||(v(e,f,h,m,y),h=m=y=null),E(e,!0,-1),l=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==l)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndent tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):h(e,g,"unknown tag <"+e.tag+">",!1,!0);return null!==e.tag||null!==e.anchor||v}function D(e){var t,n,o,s,u=e.position,l=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(E(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(l=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),o=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==s&&g(e),q.call(ce,n)?ce[n](e,n,o):(m(e,'unknown document directive "'+n+'"'),e.position++)}return E(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,E(e,!0,-1)):l&&d(e,"directives end mark is expected"),O(e,e.lineIndent-1,$,!1,!0),E(e,!0,-1),e.checkLineBreaks&&te.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&_(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,E(e,!0,-1))):void(e.position0&&(o[s-1].endPosition=n);for(var u=0,l=o;up.endPosition&&(p.startPosition=p.endPosition)}return o}function x(e,t,n){void 0===n&&(n={});var r,i,a=U(e,n);for(r=0,i=a.length;r0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(a="",o=this.position;ot/2-1){a=" ... ",o-=5;break}return s=this.buffer.slice(i,o),r.repeat(" ",e)+n+s+a+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},e.prototype.toString=function(e){void 0===e&&(e=!0);var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},e}();e.exports=i},function(e,t,n){"use strict";var r=n(28),i=new r.Schema({include:[n(30)],implicit:[n(40),n(41)],explicit:[n(42),n(47),n(48),n(49)]});e.exports=i},function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===i.indexOf(t)})}function i(){function e(e){r[e.tag]=e}var t,n,r={};for(t=0,n=arguments.length;t64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,a=l,o=0,u=[];for(t=0;t>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===n?(u.push(o>>10&255),u.push(o>>2&255)):12===n&&u.push(o>>4&255),s?new s(u):u}function a(e){var t,n,r="",i=0,a=e.length,o=l;for(t=0;t>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+e[t];return n=a%3,0===n?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function o(e){return s&&s.isBuffer(e)}var s=n(43).Buffer,u=n(29),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){(function(e){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),o.alloc(+e)}function v(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function A(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function E(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:T(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function T(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}var l;if(i){var p=-1;for(l=n;ls&&(n=s-u),l=n;l>=0;l--){for(var c=!0,f=0;fi&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=n){var u,l,p,c;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[i+1],128===(192&u)&&(c=(31&a)<<6|63&u,c>127&&(o=c));break;case 3:u=e[i+1],l=e[i+2],128===(192&u)&&128===(192&l)&&(c=(15&a)<<12|(63&u)<<6|63&l,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:u=e[i+1],l=e[i+2],p=e[i+3],128===(192&u)&&128===(192&l)&&128===(192&p)&&(c=(15&a)<<18|(63&u)<<12|(63&l)<<6|63&p,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return w(r)}function w(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function k(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function F(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function B(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function V(e,t,n,r,i){return i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function K(e,t,n,r,i){return i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function j(e){if(e=W(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function q(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function X(e){return J.toByteArray(j(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e){return e!==e}var J=n(44),Q=n(45),Z=n(46);t.Buffer=o,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return l(null,e,t,n)},o.allocUnsafe=function(e){return p(null,e)},o.allocUnsafeSlow=function(e){return p(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,u=Math.min(a,s),l=this.slice(r,i),p=e.slice(t,n),c=0;ci)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return N(this,e,t,n);case"latin1":case"binary":return I(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),Q.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),Q.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),Q.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),Q.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;x(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return V(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return V(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,a,o,s=e.length;a=n(e),o=new p(3*s/4-a),r=a>0?s-4:s;var u=0;for(t=0;t>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}function a(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function o(e,t,n){for(var r,i=[],o=t;op?p:l+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),a.push(i),a.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=s;for(var u=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=c.length;f>1,p=-7,c=n?i-1:0,f=n?-1:1,h=e[t+c];for(c+=f,a=h&(1<<-p)-1,h>>=-p,p+=s;p>0;a=256*a+e[t+c],c+=f,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=256*o+e[t+c],c+=f,p-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:(h?-1:1)*(1/0);o+=Math.pow(2,r),a-=l}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,p=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+c>=1?f/u:f*Math.pow(2,1-c),t*u>=2&&(o++,u/=2),o+c>=p?(s=0,o=p):o+c>=1?(s=(t*u-1)*Math.pow(2,i),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(o=o<0;e[n+h]=255&o,h+=d,o/=256,l-=8);e[n+h-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,u=[],l=e;for(t=0,n=l.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1;t=t.slice(1,t.length-r.length-1)}try{new RegExp(t,r);return!0}catch(e){return!1}}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function a(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=n(29);e.exports=new s.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){"use strict";function r(e,t){var n,r,i,a,o,s,u;if(null===t)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i0&&(I=t.charCodeAt(_-1),I===D&&(p=!1,s=!1)),s&&(b=_-v,v=_,b>g&&(g=b))),T!==x&&(f=!1),m.takeUpTo(_),m.escapeChar())}if(r&&u(e,t)&&(r=!1),M="",(s||p)&&(R=0,t.charCodeAt(t.length-1)===L&&(R+=1,t.charCodeAt(t.length-2)===L&&(R+=1)),0===R?M="-":2===R&&(M="+")),p&&g"+M+"\n"+o(C,A);else if(p)M||(t=t.replace(/\n$/,"")),e.dump="|"+M+"\n"+o(t,A);else{if(!m)throw new Error("Failed to dump scalar value");m.finish(),e.dump='"'+m.result+'"'}}function c(e,t){var n,r="",i=0,a=e.length,o=/\n+$/.exec(e);for(o&&(a=o.index+1);ia||n===-1?(r&&(r+="\n\n"),r+=f(e.slice(i,a),t),i=a):(r&&(r+="\n\n"),r+=f(e.slice(i,n),t),i=n+1);return o&&"\n"!==o[0]&&(r+=o[0]),r}function f(e,t){if(""===e)return e;for(var n,r,i,a=/[^\s] [^\s]/g,o="",s=0,u=0,l=a.exec(e);l;)n=l.index,n-u>t&&(r=s!==u?s:n,o&&(o+="\n"),i=e.slice(u,r),o+=i,u=r+1),s=n+1,l=a.exec(e);return o&&(o+="\n"),o+=u!==s&&e.length-u>t?e.slice(u,s)+"\n"+e.slice(s+1):e.slice(u)}function h(e){return P!==e&&L!==e&&O!==e&&j!==e&&X!==e&&z!==e&&J!==e&&Z!==e&&k!==e&&B!==e&&K!==e&&U!==e&&Q!==e&&Y!==e&&V!==e&&x!==e&&F!==e&&H!==e&&!ee[e]&&!d(e)}function d(e){return!(32<=e&&e<=126||133===e||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function m(e,t,n){var r,i,a="",o=e.tag;for(r=0,i=n.length;r1024&&(s+="? "),s+=e.dump+": ",E(e,t,o,!1,!1)&&(s+=e.dump,u+=s));e.tag=l,e.dump="{"+u+"}"}function g(e,t,n,r){var i,a,o,u,l,p,c="",f=e.tag,h=Object.keys(n);for(i=0,a=h.length;i1024,l&&(p+=e.dump&&L===e.dump.charCodeAt(0)?"?":"? "),p+=e.dump,l&&(p+=s(e,t)),E(e,t+1,u,!0,l)&&(p+=e.dump&&L===e.dump.charCodeAt(0)?":":": ",p+=e.dump,c+=p));e.tag=f,e.dump=c||"{}"}function A(e,t,n){var r,i,a,o,s,u;for(i=n?e.explicitTypes:e.implicitTypes,a=0,o=i.length;a tag resolver accepts not "'+u+'" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function E(e,t,n,r,i){e.tag=null,e.dump=n,A(e,n,!1)||A(e,n,!0);var a=C.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t),(null!==e.tag&&"?"!==e.tag||2!==e.indent&&t>0)&&(i=!1);var o,s,u="[object Object]"===a||"[object Array]"===a;if(u&&(o=e.duplicates.indexOf(n),s=o!==-1),s&&e.usedDuplicates[o])e.dump="*ref_"+o;else{if(u&&s&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),"[object Object]"===a)r&&0!==Object.keys(e.dump).length?(g(e,t,e.dump,i),s&&(e.dump="&ref_"+o+(0===t?"\n":"")+e.dump)):(v(e,t,e.dump),s&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===a)r&&0!==e.dump.length?(y(e,t,e.dump,i),s&&(e.dump="&ref_"+o+(0===t?"\n":"")+e.dump)):(m(e,t,e.dump),s&&(e.dump="&ref_"+o+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new b("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&p(e,e.dump,t)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function T(e,t){var n,r,i=[],a=[];for(_(e,i,a),n=0,r=a.length;n checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},l.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||i(e),this.result+=t,this.checkpoint+=1, -this},l.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.dump=S,t.safeDump=N},function(e,t){"use strict";function n(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw'Invalid boolean "'+e+'"'}function r(e){return 0===e.lastIndexOf("0o",0)?parseInt(e.substring(2),8):parseInt(e)}function i(e){var t=r(e);if(isNaN(t))throw'Invalid integer "'+e+'"';return t}function a(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;var t=/^([-+])?(?:\.inf|\.Inf|\.INF)$/,n=t.exec(e);if(n)return"-"===n[1]?-(1/0):1/0;var r=parseFloat(e);if(!isNaN(r))return r;throw'Invalid float "'+e+'"'}function o(e){if(void 0===e)return s.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return s.string;var t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0)return s.null;if(null===t||void 0===t)return s.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return s.bool;var n=/^[-+]?[0-9]+$/,r=/^0o[0-7]+$/,i=/^0x[0-9a-fA-F]+$/;if(n.test(t)||r.test(t)||i.test(t))return s.int;var a=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/,o=/^[-+]?(\.inf|\.Inf|\.INF)$/;return a.test(t)||o.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?s.float:s.string}Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlBoolean=n,t.parseYamlInteger=i,t.parseYamlFloat=a;var s;!function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"}(s=t.ScalarType||(t.ScalarType={})),t.determineScalarType=o},function(e,t,n){"use strict";function r(e,t){var n=e.name();if(D.LowLevelProxyNode.isInstance(t.lowLevel())){if(D.LowLevelProxyNode.isInstance(e.lowLevel()))return n;var r=t.root().lowLevel().unit(),i=r.project().namespaceResolver(),a=e.lowLevel().unit(),o=i.resolveNamespace(t.lowLevel().unit(),a);if(null!=o){var s=o.namespace();if(null!=s)return s+"."+n}}if(e.lowLevel().unit()!=t.lowLevel().unit())for(var u=t;;){if(u.lowLevel().includePath()||null==u.parent()){u.unitMap||(u.unitMap={},u.asElement().elements().forEach(function(e){if(e.definition().key()==j.Universe10.UsesDeclaration){var t=e.attr("value");if(t){var n=R(e)?e.lowLevel().unit():e.root().lowLevel().unit(),r=n.resolve(t.value());if(null!=r){var i=e.attr("key");i&&(u.unitMap[r.absolutePath()]=i.value())}}}}));var l=u.unitMap[e.lowLevel().unit().absolutePath()];if(l)return l+"."+n}if(!u.parent())break;u=u.parent()}return n}function i(e){var t=e;return t&&t.valueName&&t.toHighLevel&&t.toHighLevel2}function a(e){var t=e.property();if(!t)return!1;var n=e.parent(),r=n&&n.definition();if(!r)return!1;if("RAML08"==r.universe().version()){if(J.isStringTypeDeclarationDescendant(r)&&(J.isExampleProperty(t)||J.isDefaultValue(t)||J.isEnumProperty(t)))return!0}else if(J.isTypeOrSchemaProperty(t)&&J.isTypeDeclarationDescendant(r))return!1;return!!J.isStringTypeType(t.range())}function o(e){var t=e;return t&&t.isString&&t.isFromKey&&t.isEmbedded}function s(e){var t=q.newMap([q.newMapping(q.newScalar("example"),e.lowLevel().actual())]),n=q.newMapping(q.newScalar("types"),q.newMap([q.newMapping(q.newScalar("__AUX_TYPE__"),t)])),r=q.newMap([n]),i=new W.ASTNode(r,e.lowLevel().unit(),null,null,null),a=Z.parseFromAST(new pe(i,e)),o=Z.toNominal(a.types()[0],function(e){return null});return o}function u(e){if(!e.trim().startsWith("#%RAML 1.0"))return null;var t=l(e),n=t&&t.length>2&&t[2]||"Api";return"API"==n?n="Api":"NamedExample"==n?n="ExampleSpec":"DataType"==n?n="TypeDeclaration":"SecurityScheme"==n?n="AbstractSecurityScheme":"AnnotationTypeDeclaration"==n&&(n="TypeDeclaration"),n}function l(e){return e.match(/^\s*#%RAML\s+(\d\.\d)\s*(\w*)\s*$/m)}function p(e){var t=e.lowLevel()&&e.lowLevel().unit()&&e.lowLevel().unit().contents();return null==t?null:he(t,e.lowLevel()).ptype}function c(e){if(null==e)return null;var t=e.contents(),n=e.ast(),r=he(t,n),i=r.ptype,a=r.localUniverse,o=a.type(i);o||(o=a.type("Api"));var s=new fe(n,null,o,null);s.setUniverse(a);var u=o&&o.universe();return u&&"RAML10"==u.version()?o.isAssignableFrom(U.universesInfo.Universe10.LibraryBase.name)||s.children():s.children(),s}function f(e,t){if(t){var n=t.root().lowLevel().unit();return n?new re.PointOfViewValidationAcceptorImpl(e,t.root()):{accept:function(t){e.push(t)},begin:function(){},end:function(){},acceptUnique:function(t){for(var n=0,r=e;n0&&(o.trace=e.extras.map(function(e){return A(e,t)})),o}function E(e){if(e.kind()==q.Kind.SCALAR)return void(_(e.value())&&e.addMeta("skipValidation",!0));var t=e.childWithKey(U.universesInfo.Universe10.TypeDeclaration.properties.type.name),n=e.childWithKey(U.universesInfo.Universe10.TypeDeclaration.properties.schema.name),r=[];t&&(t.kind()==q.Kind.SEQ?r=r.concat(t.children()):r.push(t)),n&&(n&&n.kind()==q.Kind.SEQ?r=r.concat(n.children()):r.push(n));for(var i=!1,a=0,o=r;a0&&"("==f.charAt(0)&&")"==f.charAt(f.length-1)&&S(c.node())&&c.addMeta("skipValidation",!0)}i&&e.addMeta("skipValidation",!0);var h=e.childWithKey(U.universesInfo.Universe10.ObjectTypeDeclaration.properties.properties.name);T(h);var d=e.childWithKey(U.universesInfo.Universe10.TypeDeclaration.properties.facets.name);T(d);var m=e.childWithKey(U.universesInfo.Universe10.ArrayTypeDeclaration.properties.items.name);if(m)if(m.kind()==q.Kind.SCALAR)_(m.value())&&m.addMeta("skipValidation",!0);else if(m.kind()==q.Kind.MAP||m.kind()==q.Kind.MAPPING)for(var y=0,v=m.children();y=0&&e.indexOf(">>",t)>0)return!0}return!1}function S(e){var t=e.value();if("string"==typeof t&&t.indexOf("<<")!=-1)return!0;for(var n=e.children(),r=0;r=0){var o=i.substring(0,a),s=i.substring(a);if(s.length>1){var u=e.lowLevel().unit().resolve(o);if(u){var l=u.contents(),p=JSON.parse(l),c=te.create(s),f=c.resolve(p,function(){return null});Array.isArray(f)&&f.length&&(n=JSON.stringify(f[0],null,2))}}}}}}catch(e){}return n}function M(e,t){if(!e.id()||e.id()!=t.id()){for(var n=0,r=e.types();n1){var r=n.indexOf(this);t+="["+r+"]"}return this.cachedId=t,t}return this.cachedId="",this.cachedId},e.prototype.localId=function(){return this.name()},e.prototype.resetIDs=function(){this.cachedId=null,this.cachedFullId=null},e.prototype.fullLocalId=function(){var e=this;if(this.cachedFullId)return this.cachedFullId;if(this._parent){var t=".";t+=null!=this.property()&&J.isAnnotationsProperty(this.property())?this.lowLevel().key():this.name();var n=this.parent().directChildren().filter(function(t){return t.name()==e.name()});if(n.length>1){var r=n.indexOf(this);t+="["+r+"]"}return this.cachedFullId=t,t}return this.cachedFullId=this.localId(),this.cachedFullId},e.prototype.property=function(){return null},e.prototype.reuseMode=function(){return this._reuseMode},e.prototype.setReuseMode=function(e){this._reuseMode=e},e.prototype.isReused=function(){return this._isReused},e.prototype.setReused=function(e){this._isReused=e,this.children().forEach(function(t){return t.setReused(e)})},e.prototype.setJSON=function(e){this._jsonCache=e},e.prototype.getJSON=function(){return this._jsonCache},e.CLASS_IDENTIFIER="highLevelImpl.BasicASTNode",e}();t.BasicASTNode=ae;var oe=function(){function e(e,t,n,r){void 0===r&&(r=null),this.node=e,this._parent=t,this.kv=r,this._pr=n}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&O.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.valueName=function(){var e=null;return this.kv&&(e=this.kv),e=this.node.key(),this._pr&&this._pr.isAnnotation()&&e&&"("==e.charAt(0)&&(e=e.substring(1,e.length-1)),e},e.prototype.children=function(){return this.node.children().map(function(t){return new e(t,null,null)})},e.prototype.lowLevel=function(){return this.node},e.prototype.toHighLevel=function(e){if(!e&&this._parent&&(e=this._parent),this._hl)return this._hl;var t=this.valueName(),n=e;if(D.LowLevelProxyNode.isInstance(this.node)){var i=this.node.definingUnitSequence(),a=i&&i[0]&&i[0].highLevel().asElement(),o=a&&a.lowLevel().unit().absolutePath();o==e.lowLevel().unit().absolutePath()?a=e:o==e.root().lowLevel().unit().absolutePath()&&(a=e.root()),n=a||n}var s=k.referenceTargets(this._pr,n).filter(function(e){return r(e,n)==t});if(s&&s[0]){var u=s[0].localType(),l=new fe(this.node,e,u,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){l.setComputed(e.name,e.value)}),this._hl=l,l}return null},e.prototype.toHighLevel2=function(e){!e&&this._parent&&(e=this._parent);var t=this.valueName(),n=k.referenceTargets(this._pr,e).filter(function(n){return r(n,e)==t});if(n&&n[0]){var i=n[0].localType(),a=new fe(this.node,e,i,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}if(this._pr.range()){var a=new fe(this.node.parent(),e,this._pr.range(),this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}return null},e.prototype.resetHighLevelNode=function(){this._hl=null},e.CLASS_IDENTIFIER="highLevelImpl.StructuredValue",e}();t.StructuredValue=oe,t.isStructuredValue=i;var se=function(e){function t(t,n,r,i,a){void 0===a&&(a=!1);var o=e.call(this,t,n)||this;return o._def=r,o._prop=i,o.fromKey=a,o}return C(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&O.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.definition=function(){return this._def},t.prototype.asAttr=function(){return this},t.prototype.errors=function(){var e=[],t=f(e,this);return this.parent().validate(t),e},t.prototype.isString=function(){return!(!this._def||this._def.key()!==j.Universe08.StringType&&this._def.key()!=j.Universe10.StringType)},t.prototype.isAnnotatedScalar=function(){return!this.property().isAnnotation()&&!this.property().isKey()&&this.lowLevel().isAnnotatedScalar()},t.prototype.annotations=function(){var e=this.lowLevel().children(),n=[],r=this.definition().universe().type(j.Universe10.Annotable.name);if(!r)return n;for(var i=r.property("annotations"),a=0;a0&&this.property()&&(J.isTypeOrSchemaProperty(this.property())||J.isItemsProperty(this.property()))&&this.parent()&&J.isTypeDeclarationDescendant(this.parent().definition()))return new oe(this._node,this.parent(),this._prop);if(this.property()&&(J.isTypeOrSchemaProperty(this.property())||J.isItemsProperty(this.property()))&&this.parent()&&J.isTypeDeclarationDescendant(this.parent().definition())&&"string"==typeof i&&this.lowLevel().valueKind()==q.Kind.INCLUDE_REF){var u=b(this,i);u&&(i=u)}return i},t.prototype.name=function(){return this._prop.nameId()},t.prototype.printDetails=function(e){var t=this.definition().nameId(),n=this.property().range().nameId(),r=(e?e:"")+(this.name()+" : "+t+"["+n+"] = "+this.value())+(this.property().isKey()&&this.optional()?"?":"")+"\n";if(oe.isInstance(this.value())){var i=this.value().toHighLevel();i&&i.printDetails&&(r+=i.printDetails(e+"\t"))}return r},t.prototype.testSerialize=function(e){var t=this.definition().nameId(),n=(e?e:"")+(this.name()+" : "+t+" = "+this.value())+"\n";if(oe.isInstance(this.value())){var r=this.value().toHighLevel();if(r&&r.testSerialize)n+=r.testSerialize((e?e:"")+" ");else{var i=this.value().lowLevel(),a=i.dumpToObject(),o=JSON.stringify(a),s="",u=o.split("\n");u.forEach(function(t){return s+=(e?e:"")+" "+t+"\n"}),n+=s+"\n"}}return n},t.prototype.isAttr=function(){return!0},t.prototype.isUnknown=function(){return!1},t.prototype.setValue=function(e){F.setValue(this,e),this._value=null},t.prototype.setKey=function(e){F.setKey(this,e),this._value=null},t.prototype.children=function(){return[]},t.prototype.addStringValue=function(e){F.addStringValue(this,e),this._value=null},t.prototype.addStructuredValue=function(e){F.addStructuredValue(this,e),this._value=null},t.prototype.addValue=function(e){if(!this.property().isMultiValue())throw new Error(ie.SETVALUE_ONLY_MULTI_VALUES_PROPERTIES.message);"string"==typeof e?this.addStringValue(e):this.addStructuredValue(e),this._value=null},t.prototype.isEmbedded=function(){var e=this.lowLevel().asMapping().key.value;return this.property().canBeValue()&&e!=this.property().nameId()},t.prototype.remove=function(){F.removeAttr(this)},t.prototype.setValues=function(e){F.setValues(this,e),this._value=null},t.prototype.isEmpty=function(){if(!this.property().isMultiValue())throw new Error(ie.ISEMPTY_ONLY_MULTI_VALUES_ATTRIBUTES.message);var e=this.parent(),t=(e.lowLevel(),e.attributes(this.name()));if(0==t.length)return!0;if(1==t.length){var n=t[0].lowLevel();return!(!n.isMapping()||null!=n.value())}return!1},t.prototype.isFromKey=function(){return this.fromKey},t.CLASS_IDENTIFIER_ASTPropImpl="highLevelImpl.ASTPropImpl",t}(ae);t.ASTPropImpl=se,t.isASTPropImpl=o;var ue,le=new x.BasicNodeBuilder;!function(e){e[e.MERGE=0]="MERGE",e[e.AGGREGATE=1]="AGGREGATE"}(ue=t.OverlayMergeMode||(t.OverlayMergeMode={}));var pe=function(e){function t(n,r){var i=e.call(this)||this;i._node=n,i._highLevelRoot=r;var a=r.root(),o=a.getMaster();if(o&&i._node===r.lowLevel()){var s=r.getMasterCounterPart();s&&(i._toMerge=new t(s.lowLevel(),s))}return i}return C(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&O.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.contentProvider=function(){var e=this._node&&this._node.includeBaseUnit()&&(this._node.includePath&&this._node.includePath()?this._node.includeBaseUnit().resolve(this._node.includePath()):this._node.includeBaseUnit());return new ne.ContentProvider(e)},t.prototype.path=function(){return this._node.unit()&&this._node.unit().absolutePath()},t.prototype.key=function(){var e=this._node.key();return this._node.optional()&&(e+="?"),e},t.prototype.value=function(){var e=this._node.resolvedValueKind();if(e===q.Kind.SEQ)return this.children().map(function(e){return e.value()});if(e===q.Kind.MAP){var t=this._node.dumpToObject(!1);return t[this.key()]}if(this._node.kind()==q.Kind.MAP){var t=this._node.dumpToObject(!1);return t}var n=this._node.value();return n},t.prototype.children=function(){var e=this;if(this._children)return this._children;var n="uses"==this.key();if(n){var r=this._node.parent(),i=r.parent();null!=i&&this._node.unit().absolutePath()==i.unit().absolutePath()&&(n=!1)}n?this._children=this._node.children().map(function(t){return new ce(t,e._highLevelRoot)}):this._children=this._node.children().map(function(n){return new t(n,e._highLevelRoot)}),this.childByKey={};for(var a=0;a0?Z.NodeKind.MAP:Z.NodeKind.SCALAR},t.prototype.getSource=function(){if(!this._node)return null;var e=this._node.highLevelNode();if(!e){var t=this._node.start(),n=k.deepFindNode(this._highLevelRoot,t,t,!0,!1);return n&&(this._node.setHighLevelParseResult(n),fe.isInstance(n)&&this._node.setHighLevelNode(n)),n}return e},t.prototype.node=function(){return this._node},t.prototype.getMeta=function(e){return this.ownMeta&&this.ownMeta.hasOwnProperty(e)?this.ownMeta[e]:D.LowLevelProxyNode.isInstance(this._node)&&this._node.getMeta(e)},t.prototype.addMeta=function(e,t){this.ownMeta||(this.ownMeta={}),this.ownMeta[e]=t},t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem="highLevelImpl.LowLevelWrapperForTypeSystem",t}(w.SourceProvider);t.LowLevelWrapperForTypeSystem=pe;var ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.children=function(){var e=this._node.unit().resolve(this.value());return e&&e.isRAMLUnit()&&e.contents().trim().length>0?new pe(e.ast(),this._highLevelRoot).children():[]},t.prototype.path=function(){var e=this._node.unit()&&this._node.unit().resolve(this.value());return e&&e.absolutePath()},t.prototype.anchor=function(){return this._node.actual()},t.prototype.childWithKey=function(e){for(var t=this.children(),n=0;n=0)for(var r=this.parent();null!=r;){if(J.isResourceTypeType(r.definition())||J.isTraitType(r.definition())){e=!0;break}r=r.parent()}}return e},t.prototype.localType=function(){return K.typeFromNode(this)},t.prototype.patchProp=function(e){this._prop=e},t.prototype.getKind=function(){return P.NodeKind.NODE},t.prototype.wrapperNode=function(){if(!this._wrapperNode){if(J.isExampleSpecType(this.definition())){var e=s(this),t=G.examplesFromNominal(e,this,!0,!1);return t[0]}var n=this.definition()&&this.definition().universe();n&&"RAML10"==n.version()?this.definition()&&this.definition().isAssignableFrom(U.universesInfo.Universe10.LibraryBase.name)||this.children():this.children(),this._wrapperNode=this.buildWrapperNode()}return this._wrapperNode},t.prototype.asElement=function(){return this},t.prototype.buildWrapperNode=function(){var e=this.definition().universe().version();return"RAML10"==e?z.buildWrapperNode(this):"RAML08"==e?$.buildWrapperNode(this):null},t.prototype.propertiesAllowedToUse=function(){var e=this;return this.definition().allProperties().filter(function(t){return e.isAllowedToUse(t)})},t.prototype.isAllowedToUse=function(e){var t=this,n=!0;return!e.getAdapter(Y.RAMLPropertyService).isSystem()&&(e.getContextRequirements().forEach(function(e){if(e.name.indexOf("(")!=-1)return!0;var r=t.computedValue(e.name);r?n=n&&r==e.value:e.value&&(n=!1)}),n)},t.prototype.allowRecursive=function(){return!!this.definition().getAdapter(Y.RAMLService).isUserDefined()},t.prototype.setWrapperNode=function(e){this._wrapperNode=e},t.prototype.setAssociatedType=function(e){this._associatedDef=e},t.prototype.associatedType=function(){return this._associatedDef},t.prototype.knownIds=function(){return this.isAuxilary(),this._knownIds?this._knownIds:{}},t.prototype.findById=function(e){var t=this,n=this.root();if(n!=this)return n.findById(e);if(!this._knownIds){this._knownIds={};var r=k.allChildren(this);r.forEach(function(e){return t._knownIds[e.id()]=e})}if(this.isAuxilary()){if(!this._slaveIds){this._slaveIds={},this._slaveIds[this.id()]=this;var r=k.allChildren(this);r.forEach(function(e){return t._slaveIds[e.id()]=e})}var i=this._slaveIds[e];if(i)return i}return this._knownIds[e]},t.prototype.isAuxilary=function(){if(this._isAux)return!0;if(this._auxChecked)return!1;this._auxChecked=!0;var e=this.getMaster();return!!e&&(this._isAux=!0,this.initilizeKnownIDs(e),!0)},t.prototype.initilizeKnownIDs=function(e){var t=this;this._knownIds={};var n=k.allChildren(e);n.forEach(function(e){return t._knownIds[e.id()]=e}),this._knownIds[""]=e},t.prototype.getMaster=function(){if(this.masterApi)return this.masterApi;var e=this.calculateMasterByRef();return e&&e.setSlave(this),e},t.prototype.overrideMaster=function(e){this.masterApi=e,this.resetAuxilaryState(),e&&e.setSlave(this)},t.prototype.setSlave=function(e){this.slave=e},t.prototype.setMergeMode=function(e){this.overlayMergeMode=e,this.resetAuxilaryState()},t.prototype.getMergeMode=function(){return this.overlayMergeMode},t.prototype.calculateMasterByRef=function(){var e=this.lowLevel().unit();if(!e)return null;var t=e.getMasterReferenceNode();if(!t||!t.value())return null;var n=this.lowLevel();if(n.master)return n.master;var r=t.value(),i=this.lowLevel().unit().project().resolve(this.lowLevel().unit().path(),r);if(!i)return null;var a=i.expandedHighLevel();return a.setMergeMode(this.overlayMergeMode),n.master=a,a},t.prototype.resetAuxilaryState=function(){this._isAux=!1,this._auxChecked=!1,this._knownIds=null,this.clearChildrenCache()},t.prototype.printDetails=function(e){var t="";e||(e="");var n=this.definition().nameId(),r=this.property()?this.property().range().nameId():"",i=this.property()?this.property().nameId():"";return t+=e+n+"["+r+"] <--- "+i+"\n",this.children().forEach(function(n){t+=n.printDetails(e+"\t")}),t},t.prototype.testSerialize=function(e){var t="";e||(e="");var n=this.definition().nameId(),r=this.property()?this.property().nameId():"";return t+=e+n+" <-- "+r+"\n",this.children().forEach(function(n){n.testSerialize&&(t+=n.testSerialize(e+" "))}),t},t.prototype.getExtractedChildren=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){var t=e._knownIds[this.id()];if(t){var n=t.children();return n}}return[]}return[]},t.prototype.getMasterCounterPart=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){var t=e._knownIds[this.id()];return t}return null}return null},t.prototype.getSlaveCounterPart=function(){var e=this.root();return e.slave?e.slave.findById(this.id()):null},t.prototype.getLastSlaveCounterPart=function(){var e=this.root(),t=e.slave;if(null==t)return null;for(;null!=t.slave;)t=t.slave;return""==this.id()?t:t.findById(this.id())},t.prototype.getExtractedLowLevelChildren=function(e){var t=this.root();if(t.isAuxilary()){if(t._knownLowLevelIds){var n=t._knownLowLevelIds[this.id()];if(n)return n.children()}return[]}return[]},t.prototype.allowsQuestion=function(){return this._allowQuestion||this.definition().getAdapter(Y.RAMLService).getAllowQuestion()},t.prototype.findReferences=function(){var e=this,t=[];k.refFinder(this.root(),this,t),t.length>1&&(t=t.filter(function(t){return t!=e&&t.parent()!=e}));var n=[];return t.forEach(function(e){O.find(n,function(t){return t==e})||n.push(e)}),n},t.prototype.setNamePatch=function(e){this._patchedName=e},t.prototype.isNamePatch=function(){return this._patchedName},t.prototype.name=function(){if(this._patchedName)return this._patchedName;var t=O.find(this.directChildren(),function(e){return e.property()&&e.property().getAdapter(Y.RAMLPropertyService).isKey()});if(t&&se.isInstance(t)){var n=null,r=this.definition(),i=r.universe().version();if(r&&"RAML10"==i&&t.isFromKey()){var a=this._computedKey||this._node.key();n=this._node.optional()?a+"?":a}else n=t.value();return n}return e.prototype.name.call(this)},t.prototype.findElementAtOffset=function(e){return this._findNode(this,e,e)},t.prototype.isElement=function(){return!0},t.prototype.universe=function(){return this._universe?this._universe:this.definition().universe()},t.prototype.setUniverse=function(e){this._universe=e},t.prototype._findNode=function(e,t,n){var r=this;if(null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){var i=e;return e.elements().forEach(function(a){if(a.lowLevel().unit()==e.lowLevel().unit()){var o=r._findNode(a,t,n);o&&(i=o)}}),i}return null},t.prototype.isStub=function(){return!this.lowLevel().unit()||this.lowLevel().unit().isStubUnit()},t.prototype.add=function(e){F.addToNode(this,e)},t.prototype.remove=function(e){F.removeNodeFrom(this,e)},t.prototype.dump=function(e){return this._node.dump()},t.prototype.patchType=function(e){this._def=e;this._associatedDef;this._associatedDef=null,this._children=null,this._mergedChildren=null},t.prototype.children=function(){var e=this.lowLevel();return e&&e.isValueInclude&&e.isValueInclude()&&Q.isWaitingFor(e.includePath())?(this._children=null,[]):this._children?this._mergedChildren?this._mergedChildren:(this._mergedChildren=this.mergeChildren(this._children,this.getExtractedChildren()),this._mergedChildren):this._node?(this._children=le.process(this,this._node.children()),this._children=this._children.filter(function(e){return null!=e}),this.mergeChildren(this._children,this.getExtractedChildren())):[]},t.prototype.mergeChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==ue.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==ue.MERGE){var i=[];return e.forEach(function(e){var r=O.find(t,function(t){return t.fullLocalId()==e.fullLocalId()});r?n.mergeChild(i,e,r):i.push(e)}),t.forEach(function(t){var n=O.find(e,function(e){return t.fullLocalId()==e.fullLocalId()});n||i.push(t)}),i}return null},t.prototype.mergeLowLevelChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==ue.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==ue.MERGE){var i=[];return e.forEach(function(e){var r=O.find(t,function(t){return t.key()==e.key()});r?n.mergeLowLevelChild(i,e,r):i.push(e)}),t.forEach(function(t){var n=O.find(e,function(e){return t.key()==e.key()});n||i.push(t)}),i}return null},t.prototype.mergeLowLevelChild=function(e,t,n){return t.kind()!=n.kind()?(e.push(t),void e.push(n)):void e.push(t)},t.prototype.mergeChild=function(e,t,n){return t.getKind()!=n.getKind()?(e.push(t),void e.push(n)):t.getKind()==P.NodeKind.NODE?void e.push(t):t.getKind()==P.NodeKind.ATTRIBUTE?void e.push(t):t.getKind()==P.NodeKind.BASIC?(e.push(t),void e.push(n)):void 0},t.prototype.directChildren=function(){return this._children?this._children:this._node?(this._children=le.process(this,this._node.children()),this._mergedChildren=null,this._children):[]},t.prototype.resetChildren=function(){this._children=null,this._mergedChildren=null},t.prototype.isEmptyRamlFile=function(){var e=this.lowLevel().root();return e.isScalar()},t.prototype.initRamlFile=function(){F.initEmptyRAMLFile(this)},t.prototype.createAttr=function(e,t){F.createAttr(this,e,t)},t.prototype.isAttr=function(){return!1},t.prototype.isUnknown=function(){return!1},t.prototype.value=function(){return this._node.value()},t.prototype.valuesOf=function(e){var t=this._def.property(e);return null!=t?this.elements().filter(function(e){return e.property()==t}):[]},t.prototype.attr=function(e){return O.find(this.attrs(),function(t){return t.name()==e})},t.prototype.attrOrCreate=function(e){var t=this.attr(e);return t||this.createAttr(e,""),this.attr(e)},t.prototype.attrValue=function(e){var t=this.attr(e);return t?t.value():null},t.prototype.attributes=function(e){return O.filter(this.attrs(),function(t){return t.name()==e})},t.prototype.attrs=function(){var e=this.children().filter(function(e){return e.isAttr()});if(this._patchedName){var t=O.find(this.definition().allProperties(),function(e){return e.getAdapter(Y.RAMLPropertyService).isKey()});if(t){var n=new se(this.lowLevel(),this,t.range(),t,!0);return n._value=this._patchedName,[n].concat(e)}}return e},t.prototype.elements=function(){return this.children().filter(function(e){return!e.isAttr()&&!e.isUnknown()})},t.prototype.element=function(e){var t=this.elementsOfKind(e);return t.length>0?t[0]:null},t.prototype.elementsOfKind=function(e){var t=this.elements().filter(function(t){return t.property().nameId()==e});return t},t.prototype.definition=function(){return this._def},t.prototype.property=function(){return this._prop},t.prototype.isExpanded=function(){return this._expanded},t.prototype.copy=function(){return new t(this.lowLevel().copy(),this.parent(),this.definition(),this.property())},t.prototype.clearChildrenCache=function(){this._children=null,this._mergedChildren=null},t.prototype.optionalProperties=function(){var e=this.definition();if(null==e)return[];var t=[],n={},r=this.lowLevel().children();r.forEach(function(e){e.optional()&&(n[e.key()]=!0)});var i=e.allProperties();return i.forEach(function(e){var r=e;n[r.nameId()]&&t.push(r.nameId())}),t},t.prototype.setReuseMode=function(e){this._reuseMode=e,this._children&&this.lowLevel().valueKind()!=q.Kind.SEQ&&this._children.forEach(function(t){return t.setReuseMode(e)})},t.prototype.reusedNode=function(){return this._reusedNode},t.prototype.setReusedNode=function(e){this._reusedNode=e},t.prototype.resetRuntimeTypes=function(){delete this._associatedDef,this.elements().forEach(function(e){return e.resetRuntimeTypes()})},t.prototype.toJSON=function(e){return new X.JsonSerializer(e).dump(this)},t.CLASS_IDENTIFIER_ASTNodeImpl="highLevelImpl.ASTNodeImpl",t}(ae);t.ASTNodeImpl=fe,t.universeProvider=n(263);var he=function(e,n){var r=l(e),i=r&&r[1]||"",a=u(e),o=r&&r.length>2&&r[2],s="1.0"==i?new U.Universe(null,"RAML10",t.universeProvider("RAML10"),"RAML10"):new U.Universe(null,"RAML08",t.universeProvider("RAML08"));return s.setOriginalTopLevelText(o),s.setTopLevel(a),s.setTypedVersion(i),{ptype:a,localUniverse:s}};t.ramlFirstLine=l,t.getFragmentDefenitionName=p,t.fromUnit=c,t.createBasicValidationAcceptor=f,t.isAnnotationTypeFragment=h;var de=function(){function e(e){this._node=e}return e.prototype.kind=function(){return"AnnotatedNode"},e.prototype.annotationsMap=function(){var e=this;return this._annotationsMap||(this._annotationsMap={},this.annotations().forEach(function(t){var n=t.name(),r=n.lastIndexOf(".");r>=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){if(!this._annotations){var e=[];this._node.isElement()?e=this._node.asElement().attributes(U.universesInfo.Universe10.Annotable.properties.annotations.name):this._node.isAttr()&&(e=this._node.asAttr().annotations()),this._annotations=e.map(function(e){return new me(e)})}return this._annotations},e.prototype.value=function(){if(this._node.isElement())return this._node.asElement().wrapperNode().toJSON();if(this._node.isAttr()){var e=this._node.asAttr().value();return oe.isInstance(e)?e.lowLevel().dump():e}return this._node.lowLevel().dump()},e.prototype.name=function(){return this._node.name()},e.prototype.entry=function(){return this._node},e}();t.AnnotatedNode=de;var me=function(){function e(e){this.attr=e}return e.prototype.name=function(){return this.attr.value().valueName()},e.prototype.value=function(){var e=this.attr.value();if(oe.isInstance(e)){var t=e.lowLevel().dumpToObject(),n=Object.keys(t)[0];return t[n]}return e},e.prototype.definition=function(){var e=this.attr.parent(),t=this.name(),n=k.referenceTargets(this.attr.property(),e).filter(function(n){return r(n,e)==t});return 0==n.length?null:n[0].parsedType()},e}();t.AnnotationInstance=me,t.applyNodeValidationPlugins=m,t.applyNodeAnnotationValidationPlugins=y,t.toParserErrors=v,t.actualPath=N,t.actualUnit=I,t.resolveSchemaFragment=b},function(e,t,n){"use strict";function r(){return t.rt.getSchemaUtils()}function i(e){e.isUnion?e.addAdapter(new I(e)):e.range&&e.addAdapter(new N(e))}function a(e){return e.getSource&&"function"==typeof e.getSource}function o(e){var t=e;return t.genuineUserDefinedType&&t.isUserDefined&&t.isUserDefined()}function s(e,t,n,r,i){var a=new E(e,t);return a.withDomain(n,i).withRange(r)}var u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.rt=n(57);var l=t.rt.nominalTypes;t.getSchemaUtils=r,t.TOP_LEVEL_EXTRA=t.rt.TOP_LEVEL_EXTRA,t.DEFINED_IN_TYPES_EXTRA=t.rt.DEFINED_IN_TYPES_EXTRA,t.USER_DEFINED_EXTRA=t.rt.USER_DEFINED_EXTRA,t.SOURCE_EXTRA=t.rt.SOURCE_EXTRA,t.tsInterfaces=t.rt.tsInterfaces,t.injector={inject:function(e){i(e)}},l.registerInjector(t.injector);var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(l.AbstractType);t.AbstractType=p;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(l.ValueType);t.ValueType=c;var f=function(){function e(){}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),o.alloc(+e)}function v(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return M(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function A(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function E(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}var l;if(i){var p=-1;for(l=n;ls&&(n=s-u),l=n;l>=0;l--){for(var c=!0,f=0;fi&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=n){var u,l,p,c;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[i+1],128===(192&u)&&(c=(31&a)<<6|63&u,c>127&&(o=c));break;case 3:u=e[i+1],l=e[i+2],128===(192&u)&&128===(192&l)&&(c=(15&a)<<12|(63&u)<<6|63&l,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:u=e[i+1],l=e[i+2],p=e[i+3],128===(192&u)&&128===(192&l)&&128===(192&p)&&(c=(15&a)<<18|(63&u)<<12|(63&l)<<6|63&p,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return w(r)}function w(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function k(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function F(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function B(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function V(e,t,n,r,i){return i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function K(e,t,n,r,i){return i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function j(e){if(e=W(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function q(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function X(e){return J.toByteArray(j(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e){return e!==e}var J=n(44),Q=n(45),Z=n(46);t.Buffer=o,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return l(null,e,t,n)},o.allocUnsafe=function(e){return p(null,e)},o.allocUnsafeSlow=function(e){return p(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,u=Math.min(a,s),l=this.slice(r,i),p=e.slice(t,n),c=0;ci)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return T(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return N(this,e,t,n);case"latin1":case"binary":return I(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),Q.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),Q.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),Q.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),Q.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;x(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return V(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return V(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,a,o,s=e.length;a=n(e),o=new p(3*s/4-a),r=a>0?s-4:s;var u=0;for(t=0;t>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}function a(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function o(e,t,n){for(var r,i=[],o=t;op?p:l+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),a.push(i),a.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=s;for(var u=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=c.length;f>1,p=-7,c=n?i-1:0,f=n?-1:1,h=e[t+c];for(c+=f,a=h&(1<<-p)-1,h>>=-p,p+=s;p>0;a=256*a+e[t+c],c+=f,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=256*o+e[t+c],c+=f,p-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:(h?-1:1)*(1/0);o+=Math.pow(2,r),a-=l}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,p=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+c>=1?f/u:f*Math.pow(2,1-c),t*u>=2&&(o++,u/=2),o+c>=p?(s=0,o=p):o+c>=1?(s=(t*u-1)*Math.pow(2,i),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(o=o<0;e[n+h]=255&o,h+=d,o/=256,l-=8);e[n+h-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,u=[],l=e;for(t=0,n=l.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1;t=t.slice(1,t.length-r.length-1)}try{new RegExp(t,r);return!0}catch(e){return!1}}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function a(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=n(29);e.exports=new s.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){"use strict";function r(e,t){var n,r,i,a,o,s,u;if(null===t)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i0&&(I=t.charCodeAt(T-1),I===D&&(p=!1,s=!1)),s&&(b=T-v,v=T,b>g&&(g=b))),_!==x&&(f=!1),m.takeUpTo(T),m.escapeChar())}if(r&&u(e,t)&&(r=!1),R="",(s||p)&&(M=0,t.charCodeAt(t.length-1)===L&&(M+=1,t.charCodeAt(t.length-2)===L&&(M+=1)),0===M?R="-":2===M&&(R="+")),p&&g"+R+"\n"+o(C,A);else if(p)R||(t=t.replace(/\n$/,"")),e.dump="|"+R+"\n"+o(t,A);else{if(!m)throw new Error("Failed to dump scalar value");m.finish(),e.dump='"'+m.result+'"'}}function c(e,t){var n,r="",i=0,a=e.length,o=/\n+$/.exec(e);for(o&&(a=o.index+1);ia||n===-1?(r&&(r+="\n\n"),r+=f(e.slice(i,a),t),i=a):(r&&(r+="\n\n"),r+=f(e.slice(i,n),t),i=n+1);return o&&"\n"!==o[0]&&(r+=o[0]),r}function f(e,t){if(""===e)return e;for(var n,r,i,a=/[^\s] [^\s]/g,o="",s=0,u=0,l=a.exec(e);l;)n=l.index,n-u>t&&(r=s!==u?s:n,o&&(o+="\n"),i=e.slice(u,r),o+=i,u=r+1),s=n+1,l=a.exec(e);return o&&(o+="\n"),o+=u!==s&&e.length-u>t?e.slice(u,s)+"\n"+e.slice(s+1):e.slice(u)}function h(e){return P!==e&&L!==e&&O!==e&&j!==e&&X!==e&&z!==e&&J!==e&&Z!==e&&k!==e&&B!==e&&K!==e&&U!==e&&Q!==e&&Y!==e&&V!==e&&x!==e&&F!==e&&H!==e&&!ee[e]&&!d(e)}function d(e){return!(32<=e&&e<=126||133===e||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function m(e,t,n){var r,i,a="",o=e.tag;for(r=0,i=n.length;r1024&&(s+="? "),s+=e.dump+": ",E(e,t,o,!1,!1)&&(s+=e.dump,u+=s));e.tag=l,e.dump="{"+u+"}"}function g(e,t,n,r){var i,a,o,u,l,p,c="",f=e.tag,h=Object.keys(n);for(i=0,a=h.length;i1024,l&&(p+=e.dump&&L===e.dump.charCodeAt(0)?"?":"? "),p+=e.dump,l&&(p+=s(e,t)),E(e,t+1,u,!0,l)&&(p+=e.dump&&L===e.dump.charCodeAt(0)?":":": ",p+=e.dump,c+=p));e.tag=f,e.dump=c||"{}"}function A(e,t,n){var r,i,a,o,s,u;for(i=n?e.explicitTypes:e.implicitTypes,a=0,o=i.length;a tag resolver accepts not "'+u+'" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function E(e,t,n,r,i){e.tag=null,e.dump=n,A(e,n,!1)||A(e,n,!0);var a=C.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t),(null!==e.tag&&"?"!==e.tag||2!==e.indent&&t>0)&&(i=!1);var o,s,u="[object Object]"===a||"[object Array]"===a;if(u&&(o=e.duplicates.indexOf(n),s=o!==-1),s&&e.usedDuplicates[o])e.dump="*ref_"+o;else{if(u&&s&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),"[object Object]"===a)r&&0!==Object.keys(e.dump).length?(g(e,t,e.dump,i),s&&(e.dump="&ref_"+o+(0===t?"\n":"")+e.dump)):(v(e,t,e.dump),s&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===a)r&&0!==e.dump.length?(y(e,t,e.dump,i),s&&(e.dump="&ref_"+o+(0===t?"\n":"")+e.dump)):(m(e,t,e.dump),s&&(e.dump="&ref_"+o+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new b("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&p(e,e.dump,t)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function _(e,t){var n,r,i=[],a=[];for(T(e,i,a),n=0,r=a.length;n checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},l.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||i(e),this.result+=t,this.checkpoint+=1, +this},l.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.dump=S,t.safeDump=N},function(e,t){"use strict";function n(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw'Invalid boolean "'+e+'"'}function r(e){return 0===e.lastIndexOf("0o",0)?parseInt(e.substring(2),8):parseInt(e)}function i(e){var t=r(e);if(isNaN(t))throw'Invalid integer "'+e+'"';return t}function a(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;var t=/^([-+])?(?:\.inf|\.Inf|\.INF)$/,n=t.exec(e);if(n)return"-"===n[1]?-(1/0):1/0;var r=parseFloat(e);if(!isNaN(r))return r;throw'Invalid float "'+e+'"'}function o(e){if(void 0===e)return s.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return s.string;var t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0)return s.null;if(null===t||void 0===t)return s.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return s.bool;var n=/^[-+]?[0-9]+$/,r=/^0o[0-7]+$/,i=/^0x[0-9a-fA-F]+$/;if(n.test(t)||r.test(t)||i.test(t))return s.int;var a=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/,o=/^[-+]?(\.inf|\.Inf|\.INF)$/;return a.test(t)||o.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?s.float:s.string}Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlBoolean=n,t.parseYamlInteger=i,t.parseYamlFloat=a;var s;!function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"}(s=t.ScalarType||(t.ScalarType={})),t.determineScalarType=o},function(e,t,n){"use strict";function r(e,t){var n=e.name();if(D.LowLevelProxyNode.isInstance(t.lowLevel())){if(D.LowLevelProxyNode.isInstance(e.lowLevel()))return n;var r=t.root().lowLevel().unit(),i=r.project().namespaceResolver(),a=e.lowLevel().unit(),o=i.resolveNamespace(t.lowLevel().unit(),a);if(null!=o){var s=o.namespace();if(null!=s)return s+"."+n}}if(e.lowLevel().unit()!=t.lowLevel().unit())for(var u=t;;){if(u.lowLevel().includePath()||null==u.parent()){u.unitMap||(u.unitMap={},u.asElement().elements().forEach(function(e){if(e.definition().key()==j.Universe10.UsesDeclaration){var t=e.attr("value");if(t){var n=M(e)?e.lowLevel().unit():e.root().lowLevel().unit(),r=n.resolve(t.value());if(null!=r){var i=e.attr("key");i&&(u.unitMap[r.absolutePath()]=i.value())}}}}));var l=u.unitMap[e.lowLevel().unit().absolutePath()];if(l)return l+"."+n}if(!u.parent())break;u=u.parent()}return n}function i(e){var t=e;return t&&t.valueName&&t.toHighLevel&&t.toHighLevel2}function a(e){var t=e.property();if(!t)return!1;var n=e.parent(),r=n&&n.definition();if(!r)return!1;if("RAML08"==r.universe().version()){if(J.isStringTypeDeclarationDescendant(r)&&(J.isExampleProperty(t)||J.isDefaultValue(t)||J.isEnumProperty(t)))return!0}else if(J.isTypeOrSchemaProperty(t)&&J.isTypeDeclarationDescendant(r))return!1;return!!J.isStringTypeType(t.range())}function o(e){var t=e;return t&&t.isString&&t.isFromKey&&t.isEmbedded}function s(e){var t=q.newMap([q.newMapping(q.newScalar("example"),e.lowLevel().actual())]),n=q.newMapping(q.newScalar("types"),q.newMap([q.newMapping(q.newScalar("__AUX_TYPE__"),t)])),r=q.newMap([n]),i=new W.ASTNode(r,e.lowLevel().unit(),null,null,null),a=Z.parseFromAST(new pe(i,e)),o=Z.toNominal(a.types()[0],function(e){return null});return o}function u(e){if(!e.trim().startsWith("#%RAML 1.0"))return null;var t=l(e),n=t&&t.length>2&&t[2]||"Api";return"API"==n?n="Api":"NamedExample"==n?n="ExampleSpec":"DataType"==n?n="TypeDeclaration":"SecurityScheme"==n?n="AbstractSecurityScheme":"AnnotationTypeDeclaration"==n&&(n="TypeDeclaration"),n}function l(e){return e.match(/^\s*#%RAML\s+(\d\.\d)\s*(\w*)\s*$/m)}function p(e){var t=e.lowLevel()&&e.lowLevel().unit()&&e.lowLevel().unit().contents();return null==t?null:he(t,e.lowLevel()).ptype}function c(e){if(null==e)return null;var t=e.contents(),n=e.ast(),r=he(t,n),i=r.ptype,a=r.localUniverse,o=a.type(i);o||(o=a.type("Api"));var s=new fe(n,null,o,null);s.setUniverse(a);var u=o&&o.universe();return u&&"RAML10"==u.version()?o.isAssignableFrom(U.universesInfo.Universe10.LibraryBase.name)||s.children():s.children(),s}function f(e,t){if(t){var n=t.root().lowLevel().unit();return n?new re.PointOfViewValidationAcceptorImpl(e,t.root()):{accept:function(t){e.push(t)},begin:function(){},end:function(){},acceptUnique:function(t){for(var n=0,r=e;n0&&(o.trace=e.extras.map(function(e){return A(e,t)})),o}function E(e){if(e.kind()==q.Kind.SCALAR)return void(T(e.value())&&e.addMeta("skipValidation",!0));var t=e.childWithKey(U.universesInfo.Universe10.TypeDeclaration.properties.type.name),n=e.childWithKey(U.universesInfo.Universe10.TypeDeclaration.properties.schema.name),r=[];t&&(t.kind()==q.Kind.SEQ?r=r.concat(t.children()):r.push(t)),n&&(n&&n.kind()==q.Kind.SEQ?r=r.concat(n.children()):r.push(n));for(var i=!1,a=0,o=r;a0&&"("==f.charAt(0)&&")"==f.charAt(f.length-1)&&S(c.node())&&c.addMeta("skipValidation",!0)}i&&e.addMeta("skipValidation",!0);var h=e.childWithKey(U.universesInfo.Universe10.ObjectTypeDeclaration.properties.properties.name);_(h);var d=e.childWithKey(U.universesInfo.Universe10.TypeDeclaration.properties.facets.name);_(d);var m=e.childWithKey(U.universesInfo.Universe10.ArrayTypeDeclaration.properties.items.name);if(m)if(m.kind()==q.Kind.SCALAR)T(m.value())&&m.addMeta("skipValidation",!0);else if(m.kind()==q.Kind.MAP||m.kind()==q.Kind.MAPPING)for(var y=0,v=m.children();y=0&&e.indexOf(">>",t)>0)return!0}return!1}function S(e){var t=e.value();if("string"==typeof t&&t.indexOf("<<")!=-1)return!0;for(var n=e.children(),r=0;r=0){var o=i.substring(0,a),s=i.substring(a);if(s.length>1){var u=e.lowLevel().unit().resolve(o);if(u){var l=u.contents(),p=JSON.parse(l),c=te.create(s),f=c.resolve(p,function(){return null});Array.isArray(f)&&f.length&&(n=JSON.stringify(f[0],null,2))}}}}}}catch(e){}return n}function R(e,t){if(!e.id()||e.id()!=t.id()){for(var n=0,r=e.types();n1){var r=n.indexOf(this);t+="["+r+"]"}return this.cachedId=t,t}return this.cachedId="",this.cachedId},e.prototype.localId=function(){return this.name()},e.prototype.resetIDs=function(){this.cachedId=null,this.cachedFullId=null},e.prototype.fullLocalId=function(){var e=this;if(this.cachedFullId)return this.cachedFullId;if(this._parent){var t=".";t+=null!=this.property()&&J.isAnnotationsProperty(this.property())?this.lowLevel().key():this.name();var n=this.parent().directChildren().filter(function(t){return t.name()==e.name()});if(n.length>1){var r=n.indexOf(this);t+="["+r+"]"}return this.cachedFullId=t,t}return this.cachedFullId=this.localId(),this.cachedFullId},e.prototype.property=function(){return null},e.prototype.reuseMode=function(){return this._reuseMode},e.prototype.setReuseMode=function(e){this._reuseMode=e},e.prototype.isReused=function(){return this._isReused},e.prototype.setReused=function(e){this._isReused=e,this.children().forEach(function(t){return t.setReused(e)})},e.prototype.setJSON=function(e){this._jsonCache=e},e.prototype.getJSON=function(){return this._jsonCache},e.CLASS_IDENTIFIER="highLevelImpl.BasicASTNode",e}();t.BasicASTNode=ae;var oe=function(){function e(e,t,n,r){void 0===r&&(r=null),this.node=e,this._parent=t,this.kv=r,this._pr=n}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&O.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.valueName=function(){var e=null;return this.kv&&(e=this.kv),e=this.node.key(),this._pr&&this._pr.isAnnotation()&&e&&"("==e.charAt(0)&&(e=e.substring(1,e.length-1)),e},e.prototype.children=function(){return this.node.children().map(function(t){return new e(t,null,null)})},e.prototype.lowLevel=function(){return this.node},e.prototype.toHighLevel=function(e){if(!e&&this._parent&&(e=this._parent),this._hl)return this._hl;var t=this.valueName(),n=e;if(D.LowLevelProxyNode.isInstance(this.node)){var i=this.node.definingUnitSequence(),a=i&&i[0]&&i[0].highLevel().asElement(),o=a&&a.lowLevel().unit().absolutePath();o==e.lowLevel().unit().absolutePath()?a=e:o==e.root().lowLevel().unit().absolutePath()&&(a=e.root()),n=a||n}var s=k.referenceTargets(this._pr,n).filter(function(e){return r(e,n)==t});if(s&&s[0]){var u=s[0].localType(),l=new fe(this.node,e,u,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){l.setComputed(e.name,e.value)}),this._hl=l,l}return null},e.prototype.toHighLevel2=function(e){!e&&this._parent&&(e=this._parent);var t=this.valueName(),n=k.referenceTargets(this._pr,e).filter(function(n){return r(n,e)==t});if(n&&n[0]){var i=n[0].localType(),a=new fe(this.node,e,i,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}if(this._pr.range()){var a=new fe(this.node.parent(),e,this._pr.range(),this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}return null},e.prototype.resetHighLevelNode=function(){this._hl=null},e.CLASS_IDENTIFIER="highLevelImpl.StructuredValue",e}();t.StructuredValue=oe,t.isStructuredValue=i;var se=function(e){function t(t,n,r,i,a){void 0===a&&(a=!1);var o=e.call(this,t,n)||this;return o._def=r,o._prop=i,o.fromKey=a,o}return C(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&O.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.definition=function(){return this._def},t.prototype.asAttr=function(){return this},t.prototype.errors=function(){var e=[],t=f(e,this);return this.parent().validate(t),e},t.prototype.isString=function(){return!(!this._def||this._def.key()!==j.Universe08.StringType&&this._def.key()!=j.Universe10.StringType)},t.prototype.isAnnotatedScalar=function(){return!this.property().isAnnotation()&&!this.property().isKey()&&this.lowLevel().isAnnotatedScalar()},t.prototype.annotations=function(){var e=this.lowLevel().children(),n=[],r=this.definition().universe().type(j.Universe10.Annotable.name);if(!r)return n;for(var i=r.property("annotations"),a=0;a0&&this.property()&&(J.isTypeOrSchemaProperty(this.property())||J.isItemsProperty(this.property()))&&this.parent()&&J.isTypeDeclarationDescendant(this.parent().definition()))return new oe(this._node,this.parent(),this._prop);if(this.property()&&(J.isTypeOrSchemaProperty(this.property())||J.isItemsProperty(this.property()))&&this.parent()&&J.isTypeDeclarationDescendant(this.parent().definition())&&"string"==typeof i&&this.lowLevel().valueKind()==q.Kind.INCLUDE_REF){var u=b(this,i);u&&(i=u)}return i},t.prototype.name=function(){return this._prop.nameId()},t.prototype.printDetails=function(e){var t=this.definition().nameId(),n=this.property().range().nameId(),r=(e?e:"")+(this.name()+" : "+t+"["+n+"] = "+this.value())+(this.property().isKey()&&this.optional()?"?":"")+"\n";if(oe.isInstance(this.value())){var i=this.value().toHighLevel();i&&i.printDetails&&(r+=i.printDetails(e+"\t"))}return r},t.prototype.testSerialize=function(e){var t=this.definition().nameId(),n=(e?e:"")+(this.name()+" : "+t+" = "+this.value())+"\n";if(oe.isInstance(this.value())){var r=this.value().toHighLevel();if(r&&r.testSerialize)n+=r.testSerialize((e?e:"")+" ");else{var i=this.value().lowLevel(),a=i.dumpToObject(),o=JSON.stringify(a),s="",u=o.split("\n");u.forEach(function(t){return s+=(e?e:"")+" "+t+"\n"}),n+=s+"\n"}}return n},t.prototype.isAttr=function(){return!0},t.prototype.isUnknown=function(){return!1},t.prototype.setValue=function(e){F.setValue(this,e),this._value=null},t.prototype.setKey=function(e){F.setKey(this,e),this._value=null},t.prototype.children=function(){return[]},t.prototype.addStringValue=function(e){F.addStringValue(this,e),this._value=null},t.prototype.addStructuredValue=function(e){F.addStructuredValue(this,e),this._value=null},t.prototype.addValue=function(e){if(!this.property().isMultiValue())throw new Error(ie.SETVALUE_ONLY_MULTI_VALUES_PROPERTIES.message);"string"==typeof e?this.addStringValue(e):this.addStructuredValue(e),this._value=null},t.prototype.isEmbedded=function(){var e=this.lowLevel().asMapping().key.value;return this.property().canBeValue()&&e!=this.property().nameId()},t.prototype.remove=function(){F.removeAttr(this)},t.prototype.setValues=function(e){F.setValues(this,e),this._value=null},t.prototype.isEmpty=function(){if(!this.property().isMultiValue())throw new Error(ie.ISEMPTY_ONLY_MULTI_VALUES_ATTRIBUTES.message);var e=this.parent(),t=(e.lowLevel(),e.attributes(this.name()));if(0==t.length)return!0;if(1==t.length){var n=t[0].lowLevel();return!(!n.isMapping()||null!=n.value())}return!1},t.prototype.isFromKey=function(){return this.fromKey},t.CLASS_IDENTIFIER_ASTPropImpl="highLevelImpl.ASTPropImpl",t}(ae);t.ASTPropImpl=se,t.isASTPropImpl=o;var ue,le=new x.BasicNodeBuilder;!function(e){e[e.MERGE=0]="MERGE",e[e.AGGREGATE=1]="AGGREGATE"}(ue=t.OverlayMergeMode||(t.OverlayMergeMode={}));var pe=function(e){function t(n,r){var i=e.call(this)||this;i._node=n,i._highLevelRoot=r;var a=r.root(),o=a.getMaster();if(o&&i._node===r.lowLevel()){var s=r.getMasterCounterPart();s&&(i._toMerge=new t(s.lowLevel(),s))}return i}return C(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&O.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.contentProvider=function(){var e=this._node&&this._node.includeBaseUnit()&&(this._node.includePath&&this._node.includePath()?this._node.includeBaseUnit().resolve(this._node.includePath()):this._node.includeBaseUnit());return new ne.ContentProvider(e)},t.prototype.path=function(){return this._node.unit()&&this._node.unit().absolutePath()},t.prototype.key=function(){var e=this._node.key();return this._node.optional()&&(e+="?"),e},t.prototype.value=function(){var e=this._node.resolvedValueKind();if(e===q.Kind.SEQ)return this.children().map(function(e){return e.value()});if(e===q.Kind.MAP){var t=this._node.dumpToObject(!1);return t[this.key()]}if(this._node.kind()==q.Kind.MAP){var t=this._node.dumpToObject(!1);return t}var n=this._node.value();return n},t.prototype.children=function(){var e=this;if(this._children)return this._children;var n="uses"==this.key();if(n){var r=this._node.parent(),i=r.parent();null!=i&&this._node.unit().absolutePath()==i.unit().absolutePath()&&(n=!1)}n?this._children=this._node.children().map(function(t){return new ce(t,e._highLevelRoot)}):this._children=this._node.children().map(function(n){return new t(n,e._highLevelRoot)}),this.childByKey={};for(var a=0;a0?Z.NodeKind.MAP:Z.NodeKind.SCALAR},t.prototype.getSource=function(){if(!this._node)return null;var e=this._node.highLevelNode();if(!e){var t=this._node.start(),n=k.deepFindNode(this._highLevelRoot,t,t,!0,!1);return n&&(this._node.setHighLevelParseResult(n),fe.isInstance(n)&&this._node.setHighLevelNode(n)),n}return e},t.prototype.node=function(){return this._node},t.prototype.getMeta=function(e){return this.ownMeta&&this.ownMeta.hasOwnProperty(e)?this.ownMeta[e]:D.LowLevelProxyNode.isInstance(this._node)&&this._node.getMeta(e)},t.prototype.addMeta=function(e,t){this.ownMeta||(this.ownMeta={}),this.ownMeta[e]=t},t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem="highLevelImpl.LowLevelWrapperForTypeSystem",t}(w.SourceProvider);t.LowLevelWrapperForTypeSystem=pe;var ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.children=function(){var e=this._node.unit().resolve(this.value());return e&&e.isRAMLUnit()&&e.contents().trim().length>0?new pe(e.ast(),this._highLevelRoot).children():[]},t.prototype.path=function(){var e=this._node.unit()&&this._node.unit().resolve(this.value());return e&&e.absolutePath()},t.prototype.anchor=function(){return this._node.actual()},t.prototype.childWithKey=function(e){for(var t=this.children(),n=0;n=0)for(var r=this.parent();null!=r;){if(J.isResourceTypeType(r.definition())||J.isTraitType(r.definition())){e=!0;break}r=r.parent()}}return e},t.prototype.localType=function(){return K.typeFromNode(this)},t.prototype.patchProp=function(e){this._prop=e},t.prototype.getKind=function(){return P.NodeKind.NODE},t.prototype.wrapperNode=function(){if(!this._wrapperNode){if(J.isExampleSpecType(this.definition())){var e=s(this),t=G.examplesFromNominal(e,this,!0,!1);return t[0]}var n=this.definition()&&this.definition().universe();n&&"RAML10"==n.version()?this.definition()&&this.definition().isAssignableFrom(U.universesInfo.Universe10.LibraryBase.name)||this.children():this.children(),this._wrapperNode=this.buildWrapperNode()}return this._wrapperNode},t.prototype.asElement=function(){return this},t.prototype.buildWrapperNode=function(){var e=this.definition().universe().version();return"RAML10"==e?z.buildWrapperNode(this):"RAML08"==e?$.buildWrapperNode(this):null},t.prototype.propertiesAllowedToUse=function(){var e=this;return this.definition().allProperties().filter(function(t){return e.isAllowedToUse(t)})},t.prototype.isAllowedToUse=function(e){var t=this,n=!0;return!e.getAdapter(Y.RAMLPropertyService).isSystem()&&(e.getContextRequirements().forEach(function(e){if(e.name.indexOf("(")!=-1)return!0;var r=t.computedValue(e.name);r?n=n&&r==e.value:e.value&&(n=!1)}),n)},t.prototype.allowRecursive=function(){return!!this.definition().getAdapter(Y.RAMLService).isUserDefined()},t.prototype.setWrapperNode=function(e){this._wrapperNode=e},t.prototype.setAssociatedType=function(e){this._associatedDef=e},t.prototype.associatedType=function(){return this._associatedDef},t.prototype.knownIds=function(){return this.isAuxilary(),this._knownIds?this._knownIds:{}},t.prototype.findById=function(e){var t=this,n=this.root();if(n!=this)return n.findById(e);if(!this._knownIds){this._knownIds={};var r=k.allChildren(this);r.forEach(function(e){return t._knownIds[e.id()]=e})}if(this.isAuxilary()){if(!this._slaveIds){this._slaveIds={},this._slaveIds[this.id()]=this;var r=k.allChildren(this);r.forEach(function(e){return t._slaveIds[e.id()]=e})}var i=this._slaveIds[e];if(i)return i}return this._knownIds[e]},t.prototype.isAuxilary=function(){if(this._isAux)return!0;if(this._auxChecked)return!1;this._auxChecked=!0;var e=this.getMaster();return!!e&&(this._isAux=!0,this.initilizeKnownIDs(e),!0)},t.prototype.initilizeKnownIDs=function(e){var t=this;this._knownIds={};var n=k.allChildren(e);n.forEach(function(e){return t._knownIds[e.id()]=e}),this._knownIds[""]=e},t.prototype.getMaster=function(){if(this.masterApi)return this.masterApi;var e=this.calculateMasterByRef();return e&&e.setSlave(this),e},t.prototype.overrideMaster=function(e){this.masterApi=e,this.resetAuxilaryState(),e&&e.setSlave(this)},t.prototype.setSlave=function(e){this.slave=e},t.prototype.setMergeMode=function(e){this.overlayMergeMode=e,this.resetAuxilaryState()},t.prototype.getMergeMode=function(){return this.overlayMergeMode},t.prototype.calculateMasterByRef=function(){var e=this.lowLevel().unit();if(!e)return null;var t=e.getMasterReferenceNode();if(!t||!t.value())return null;var n=this.lowLevel();if(n.master)return n.master;var r=t.value(),i=this.lowLevel().unit().project().resolve(this.lowLevel().unit().path(),r);if(!i)return null;var a=i.expandedHighLevel();return a.setMergeMode(this.overlayMergeMode),n.master=a,a},t.prototype.resetAuxilaryState=function(){this._isAux=!1,this._auxChecked=!1,this._knownIds=null,this.clearChildrenCache()},t.prototype.printDetails=function(e){var t="";e||(e="");var n=this.definition().nameId(),r=this.property()?this.property().range().nameId():"",i=this.property()?this.property().nameId():"";return t+=e+n+"["+r+"] <--- "+i+"\n",this.children().forEach(function(n){t+=n.printDetails(e+"\t")}),t},t.prototype.testSerialize=function(e){var t="";e||(e="");var n=this.definition().nameId(),r=this.property()?this.property().nameId():"";return t+=e+n+" <-- "+r+"\n",this.children().forEach(function(n){n.testSerialize&&(t+=n.testSerialize(e+" "))}),t},t.prototype.getExtractedChildren=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){var t=e._knownIds[this.id()];if(t){var n=t.children();return n}}return[]}return[]},t.prototype.getMasterCounterPart=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){var t=e._knownIds[this.id()];return t}return null}return null},t.prototype.getSlaveCounterPart=function(){var e=this.root();return e.slave?e.slave.findById(this.id()):null},t.prototype.getLastSlaveCounterPart=function(){var e=this.root(),t=e.slave;if(null==t)return null;for(;null!=t.slave;)t=t.slave;return""==this.id()?t:t.findById(this.id())},t.prototype.getExtractedLowLevelChildren=function(e){var t=this.root();if(t.isAuxilary()){if(t._knownLowLevelIds){var n=t._knownLowLevelIds[this.id()];if(n)return n.children()}return[]}return[]},t.prototype.allowsQuestion=function(){return this._allowQuestion||this.definition().getAdapter(Y.RAMLService).getAllowQuestion()},t.prototype.findReferences=function(){var e=this,t=[];k.refFinder(this.root(),this,t),t.length>1&&(t=t.filter(function(t){return t!=e&&t.parent()!=e}));var n=[];return t.forEach(function(e){O.find(n,function(t){return t==e})||n.push(e)}),n},t.prototype.setNamePatch=function(e){this._patchedName=e},t.prototype.isNamePatch=function(){return this._patchedName},t.prototype.name=function(){if(this._patchedName)return this._patchedName;var t=O.find(this.directChildren(),function(e){return e.property()&&e.property().getAdapter(Y.RAMLPropertyService).isKey()});if(t&&se.isInstance(t)){var n=null,r=this.definition(),i=r.universe().version();if(r&&"RAML10"==i&&t.isFromKey()){var a=this._computedKey||this._node.key();n=this._node.optional()?a+"?":a}else n=t.value();return n}return e.prototype.name.call(this)},t.prototype.findElementAtOffset=function(e){return this._findNode(this,e,e)},t.prototype.isElement=function(){return!0},t.prototype.universe=function(){return this._universe?this._universe:this.definition().universe()},t.prototype.setUniverse=function(e){this._universe=e},t.prototype._findNode=function(e,t,n){var r=this;if(null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){var i=e;return e.elements().forEach(function(a){if(a.lowLevel().unit()==e.lowLevel().unit()){var o=r._findNode(a,t,n);o&&(i=o)}}),i}return null},t.prototype.isStub=function(){return!this.lowLevel().unit()||this.lowLevel().unit().isStubUnit()},t.prototype.add=function(e){F.addToNode(this,e)},t.prototype.remove=function(e){F.removeNodeFrom(this,e)},t.prototype.dump=function(e){return this._node.dump()},t.prototype.patchType=function(e){this._def=e;this._associatedDef;this._associatedDef=null,this._children=null,this._mergedChildren=null},t.prototype.children=function(){var e=this.lowLevel();return e&&e.isValueInclude&&e.isValueInclude()&&Q.isWaitingFor(e.includePath())?(this._children=null,[]):this._children?this._mergedChildren?this._mergedChildren:(this._mergedChildren=this.mergeChildren(this._children,this.getExtractedChildren()),this._mergedChildren):this._node?(this._children=le.process(this,this._node.children()),this._children=this._children.filter(function(e){return null!=e}),this.mergeChildren(this._children,this.getExtractedChildren())):[]},t.prototype.mergeChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==ue.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==ue.MERGE){var i=[];return e.forEach(function(e){var r=O.find(t,function(t){return t.fullLocalId()==e.fullLocalId()});r?n.mergeChild(i,e,r):i.push(e)}),t.forEach(function(t){var n=O.find(e,function(e){return t.fullLocalId()==e.fullLocalId()});n||i.push(t)}),i}return null},t.prototype.mergeLowLevelChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==ue.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==ue.MERGE){var i=[];return e.forEach(function(e){var r=O.find(t,function(t){return t.key()==e.key()});r?n.mergeLowLevelChild(i,e,r):i.push(e)}),t.forEach(function(t){var n=O.find(e,function(e){return t.key()==e.key()});n||i.push(t)}),i}return null},t.prototype.mergeLowLevelChild=function(e,t,n){return t.kind()!=n.kind()?(e.push(t),void e.push(n)):void e.push(t)},t.prototype.mergeChild=function(e,t,n){return t.getKind()!=n.getKind()?(e.push(t),void e.push(n)):t.getKind()==P.NodeKind.NODE?void e.push(t):t.getKind()==P.NodeKind.ATTRIBUTE?void e.push(t):t.getKind()==P.NodeKind.BASIC?(e.push(t),void e.push(n)):void 0},t.prototype.directChildren=function(){return this._children?this._children:this._node?(this._children=le.process(this,this._node.children()),this._mergedChildren=null,this._children):[]},t.prototype.resetChildren=function(){this._children=null,this._mergedChildren=null},t.prototype.isEmptyRamlFile=function(){var e=this.lowLevel().root();return e.isScalar()},t.prototype.initRamlFile=function(){F.initEmptyRAMLFile(this)},t.prototype.createAttr=function(e,t){F.createAttr(this,e,t)},t.prototype.isAttr=function(){return!1},t.prototype.isUnknown=function(){return!1},t.prototype.value=function(){return this._node.value()},t.prototype.valuesOf=function(e){var t=this._def.property(e);return null!=t?this.elements().filter(function(e){return e.property()==t}):[]},t.prototype.attr=function(e){return O.find(this.attrs(),function(t){return t.name()==e})},t.prototype.attrOrCreate=function(e){var t=this.attr(e);return t||this.createAttr(e,""),this.attr(e)},t.prototype.attrValue=function(e){var t=this.attr(e);return t?t.value():null},t.prototype.attributes=function(e){return O.filter(this.attrs(),function(t){return t.name()==e})},t.prototype.attrs=function(){var e=this.children().filter(function(e){return e.isAttr()});if(this._patchedName){var t=O.find(this.definition().allProperties(),function(e){return e.getAdapter(Y.RAMLPropertyService).isKey()});if(t){var n=new se(this.lowLevel(),this,t.range(),t,!0);return n._value=this._patchedName,[n].concat(e)}}return e},t.prototype.elements=function(){return this.children().filter(function(e){return!e.isAttr()&&!e.isUnknown()})},t.prototype.element=function(e){var t=this.elementsOfKind(e);return t.length>0?t[0]:null},t.prototype.elementsOfKind=function(e){var t=this.elements().filter(function(t){return t.property().nameId()==e});return t},t.prototype.definition=function(){return this._def},t.prototype.property=function(){return this._prop},t.prototype.isExpanded=function(){return this._expanded},t.prototype.copy=function(){return new t(this.lowLevel().copy(),this.parent(),this.definition(),this.property())},t.prototype.clearChildrenCache=function(){this._children=null,this._mergedChildren=null},t.prototype.optionalProperties=function(){var e=this.definition();if(null==e)return[];var t=[],n={},r=this.lowLevel().children();r.forEach(function(e){e.optional()&&(n[e.key()]=!0)});var i=e.allProperties();return i.forEach(function(e){var r=e;n[r.nameId()]&&t.push(r.nameId())}),t},t.prototype.setReuseMode=function(e){this._reuseMode=e,this._children&&this.lowLevel().valueKind()!=q.Kind.SEQ&&this._children.forEach(function(t){return t.setReuseMode(e)})},t.prototype.reusedNode=function(){return this._reusedNode},t.prototype.setReusedNode=function(e){this._reusedNode=e},t.prototype.resetRuntimeTypes=function(){delete this._associatedDef,this.elements().forEach(function(e){return e.resetRuntimeTypes()})},t.prototype.toJSON=function(e){return new X.JsonSerializer(e).dump(this)},t.CLASS_IDENTIFIER_ASTNodeImpl="highLevelImpl.ASTNodeImpl",t}(ae);t.ASTNodeImpl=fe,t.universeProvider=n(264);var he=function(e,n){var r=l(e),i=r&&r[1]||"",a=u(e),o=r&&r.length>2&&r[2],s="1.0"==i?new U.Universe(null,"RAML10",t.universeProvider("RAML10"),"RAML10"):new U.Universe(null,"RAML08",t.universeProvider("RAML08"));return s.setOriginalTopLevelText(o),s.setTopLevel(a),s.setTypedVersion(i),{ptype:a,localUniverse:s}};t.ramlFirstLine=l,t.getFragmentDefenitionName=p,t.fromUnit=c,t.createBasicValidationAcceptor=f,t.isAnnotationTypeFragment=h;var de=function(){function e(e){this._node=e}return e.prototype.kind=function(){return"AnnotatedNode"},e.prototype.annotationsMap=function(){var e=this;return this._annotationsMap||(this._annotationsMap={},this.annotations().forEach(function(t){var n=t.name(),r=n.lastIndexOf(".");r>=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){if(!this._annotations){var e=[];this._node.isElement()?e=this._node.asElement().attributes(U.universesInfo.Universe10.Annotable.properties.annotations.name):this._node.isAttr()&&(e=this._node.asAttr().annotations()),this._annotations=e.map(function(e){return new me(e)})}return this._annotations},e.prototype.value=function(){if(this._node.isElement())return this._node.asElement().wrapperNode().toJSON();if(this._node.isAttr()){var e=this._node.asAttr().value();return oe.isInstance(e)?e.lowLevel().dump():e}return this._node.lowLevel().dump()},e.prototype.name=function(){return this._node.name()},e.prototype.entry=function(){return this._node},e}();t.AnnotatedNode=de;var me=function(){function e(e){this.attr=e}return e.prototype.name=function(){return this.attr.value().valueName()},e.prototype.value=function(){var e=this.attr.value();if(oe.isInstance(e)){var t=e.lowLevel().dumpToObject(),n=Object.keys(t)[0];return t[n]}return e},e.prototype.definition=function(){var e=this.attr.parent(),t=this.name(),n=k.referenceTargets(this.attr.property(),e).filter(function(n){return r(n,e)==t});return 0==n.length?null:n[0].parsedType()},e}();t.AnnotationInstance=me,t.applyNodeValidationPlugins=m,t.applyNodeAnnotationValidationPlugins=y,t.toParserErrors=v,t.actualPath=N,t.actualUnit=I,t.resolveSchemaFragment=b},function(e,t,n){"use strict";function r(){return t.rt.getSchemaUtils()}function i(e){e.isUnion?e.addAdapter(new I(e)):e.range&&e.addAdapter(new N(e))}function a(e){return e.getSource&&"function"==typeof e.getSource}function o(e){var t=e;return t.genuineUserDefinedType&&t.isUserDefined&&t.isUserDefined()}function s(e,t,n,r,i){var a=new E(e,t);return a.withDomain(n,i).withRange(r)}var u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.rt=n(57);var l=t.rt.nominalTypes;t.getSchemaUtils=r,t.TOP_LEVEL_EXTRA=t.rt.TOP_LEVEL_EXTRA,t.DEFINED_IN_TYPES_EXTRA=t.rt.DEFINED_IN_TYPES_EXTRA,t.USER_DEFINED_EXTRA=t.rt.USER_DEFINED_EXTRA,t.SOURCE_EXTRA=t.rt.SOURCE_EXTRA,t.tsInterfaces=t.rt.tsInterfaces,t.injector={inject:function(e){i(e)}},l.registerInjector(t.injector);var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(l.AbstractType);t.AbstractType=p;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(l.ValueType);t.ValueType=c;var f=function(){function e(){}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n0){var e=[];return this.subStatus.forEach(function(t){return e=e.concat(t.getErrors())}),e}return[this]}return[]},e.prototype.getSubStatuses=function(){return this.subStatus},e.prototype.getSeverity=function(){return this.severity},e.prototype.getMessage=function(){return this.message},e.prototype.setMessage=function(e){this.message=e},e.prototype.getSource=function(){return this.source},e.prototype.getCode=function(){return this.code},e.prototype.setCode=function(e){this.code=e},e.prototype.isWarning=function(){return this.severity==e.WARNING},e.prototype.isError=function(){return this.severity==e.ERROR},e.prototype.isOk=function(){return this.severity===e.OK},e.prototype.isInfo=function(){return this.severity===e.INFO},e.prototype.setSource=function(e){this.source=e},e.prototype.toString=function(){return this.isOk()?"OK":this.message},e.prototype.getExtra=function(e){return this.takeNodeFromSource&&e==N.SOURCE_EXTRA&&this.source instanceof M?this.source.node():null},e.prototype.putExtra=function(e,t){},e.prototype.setInternalRange=function(e){this.internalRange=e},e.prototype.getInternalRange=function(){return this.internalRange},e.prototype.getInternalPath=function(){return this.internalPath},e.prototype.setInternalPath=function(e){this.internalPath=e},e.prototype.getFilePath=function(){return this.filePath},e.prototype.setFilePath=function(e){this.filePath=e},e.CODE_CONFLICTING_TYPE_KIND=4,e.CODE_INCORRECT_DISCRIMINATOR=t.messageRegistry.INCORRECT_DISCRIMINATOR,e.CODE_MISSING_DISCRIMINATOR=t.messageRegistry.MISSING_DISCRIMINATOR,e.ERROR=3,e.INFO=1,e.OK=0,e.WARNING=2,e}();t.Status=I,t.ok=r,t.SCHEMA_AND_TYPE=N.SCHEMA_AND_TYPE_EXTRA,t.GLOBAL=N.GLOBAL_EXTRA,t.TOPLEVEL=N.TOP_LEVEL_EXTRA,t.SOURCE_EXTRA=N.SOURCE_EXTRA;var b=function(e,n){for(var r="",i=e.message,a=0,o=i.indexOf("{{");o>=0;o=i.indexOf("{{",a)){if(r+=i.substring(a,o),a=i.indexOf("}}",o),a<0){a=o;break}o+="{{".length;var s=i.substring(o,a);a+="}}".length;var u=n[s];if(void 0===u)throw new Error(b(t.messageRegistry.MESSAGE_PARAMETER_NO_VALUE,{paramName:s}));r+=u}return r+=i.substring(a,i.length)};t.error=i;var M=function(){function e(e){this._inheritable=e,this._annotations=[]}return e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER_TypeInformation)},e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&_.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER_TypeInformation)},e.prototype.node=function(){return this._node},e.prototype.setNode=function(e){this._node=e},e.prototype.owner=function(){return this._owner},e.prototype.isInheritable=function(){return this._inheritable},e.prototype.validateSelf=function(e){var t=r();if(this.node()&&this.node().getMeta("skipValidation"))return t;for(var n=0,i=this._annotations;n=0;r=e.indexOf(".",r+1)){var i=e.substring(0,r),a=e.substr(r+1),o=t.library(i);if(o&&(n=this.getTypeByChainFromCollection(a,o)))return n}return null},e.prototype.types=function(){return this.typeList},e.prototype.typeMap=function(){return this._types},e.prototype.parent=function(){return this._parent},e.CLASS_IDENTIFIER_TypeRegistry="typesystem.TypeRegistry",e}();t.TypeRegistry=K;var j=function(){function e(){}return e.prototype.getInfos=function(e){if(e.getExtra("PInfos"))return e.getExtra("PInfos");var t={};return e.meta().forEach(function(e){if(e instanceof w.HasProperty){var n=e.value();t[n]={name:n,type:null}}}),e.meta().forEach(function(e){if(e instanceof w.PropertyIs){var n=e.propertyName();t[n]&&(t[n].type=e.value())}}),e.putExtra("PInfos",t),t},e.prototype.validate=function(e,t){var n=this,r=this.getInfos(e),i=!1;return Object.keys(r).forEach(function(e){i=i||n.validateInfo(r[e],t)}),i},e.prototype.validateInfo=function(e,t){var n=this;if(t.some(function(t){return t==e}))return!0;if(e.type instanceof ne){var r=e.type,i=!0;return r.options().forEach(function(r){n.validate(r,[e].concat(t))||(i=!1)}),i}return e.type.isArray()?void 0:this.validate(e.type,[e].concat(t))},e.prototype.validateType=function(e){var t=this,n=this.getInfos(e),r=[];return Object.keys(n).forEach(function(e){t.validateInfo(n[e],[])&&r.push(e)}),r},e}(),W=function(e){function n(n,r,i){var a=e.call(this,I.ERROR,t.messageRegistry.RESTRICTIONS_CONFLICT.code,null,i)||this;return a._conflicting=n,a._stack=r,a.source=i,a.computeMessage(),a}return T(n,e),n.prototype.computeMessage=function(){var e=null;if(null!=this._stack&&this._stack.getRestriction()instanceof w.MinMaxRestriction){var t=this._stack.getRestriction();e=this._conflicting.conflictMessage(t.facetPath(),t.value())}null==e&&(e=this._conflicting+" and "+(null!=this._stack?this._stack.getRestriction().toString():""));var n="";if(this.source instanceof q){for(var r=[],i=this._stack;i;){var a=i.getRestriction();if(a instanceof x.PropertyIs){var o={name:a.propId()};r.length>0&&(o.child=r[r.length-1]),r.push(o)}i=i.pop()}d(this,r.pop());var s=w.anotherRestrictionComponent();n=s?" between types '"+f(this.source)+"' and '"+f(s)+"'":" in type '"+f(this.source)+"'"}this.message="Restrictions conflict"+n+": "+e},n.prototype.getConflictDescription=function(){var e="";return e+="Restrictions coflict:\n",e+=this._stack.getRestriction()+" conflicts with "+this._conflicting+"\n",e+="at\n",e+=this._stack.pop()},n.prototype.getConflicting=function(){return this._conflicting},n.prototype.getStack=function(){return this._stack},n.prototype.toRestriction=function(){return new se(this._stack,this.message,this._conflicting)},n}(I);t.RestrictionsConflict=W;var H=0;t.VALIDATED_TYPE=null;var Y=function(){function e(e){if(w.MatchesProperty.isInstance(e)){this._matches=e;var t=this._matches.facetName();"propertyIs"==t?this.isProp=!0:"mapPropertyIs"==t?this.isMap=!0:"additionalProperties"==t&&(this.isAdditionalProp=!0)}else this.isFacet=!0,this._facetDecl=e}return e.prototype.name=function(){return this.isFacet?this._facetDecl.actualName():this._matches.path()},e.prototype.isPattern=function(){return this.isMap},e.prototype.isAdditional=function(){return this.isAdditionalProp},e.prototype.declaredAt=function(){return this.isFacet?this._facetDecl.owner():this._matches.owner()},e.prototype.range=function(){return this.isFacet?this._facetDecl.type():this._matches.range()},e.prototype.required=function(){return void 0!==this._required?this._required:this.isProp?!this.property().isOptional():this.isMap?!this.mapProperty().isOptional():!!this.isAdditionalProp&&!this.additionalProperty().isOptional()},e.prototype.setRequired=function(e){this._required=e},e.prototype.property=function(){return this.isProp?this._matches:null},e.prototype.mapProperty=function(){return this.isMap?this._matches:null},e.prototype.additionalProperty=function(){return this.isAdditionalProp?this._matches:null},e.prototype.annotations=function(){return this._matches?this._matches.annotations():[]},e}();t.PropertyInfo=Y;var q=function(){function e(e){this._name=e,this.metaInfo=[],this._subTypes=[],this.innerid=H++,this.extras={},this._locked=!1}return e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER_AbstractType)},e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&_.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER_AbstractType)},e.prototype.annotation=function(e){for(var t=0,n=this.annotations();t0&&c.forEach(function(e){var a=i(t.messageRegistry.CYCLIC_DEPENDENCY,n,{typeName:e});d(a,{name:e}),r.addSubStatus(a)})}if(this.supertypeAnnotations)for(var f=0;f0){var o=[];r.forEach(function(e){o.push(i(t.messageRegistry.INHERITING_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN,n,{typeName:e.value()}))}),o.forEach(function(t){return e.addSubStatus(t,"type")})}else e.addSubStatus(i(t.messageRegistry.INHERITING_UNKNOWN_TYPE,this),"type")}if(this.isUnion()){for(var s=this.typeFamily(),u=[],l=!1,p=!1,c=0,f=s;c0?(u=_.unique(u),u.length>0&&u.forEach(function(r){var a=r.value(),o=t.messageRegistry.UNION_OPTION_TYPE_DEPENDS_ON_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN;n.options().some(function(e){return e.name()==a})&&(o=t.messageRegistry.UNION_OPTION_TYPE_OPTION_IMPORTED_THROUGH_LIBRARY_CHAIN),e.addSubStatus(i(o,n,{typeName:a}),"type")})):e.addSubStatus(i(t.messageRegistry.UNKNOWN_UNION_OPTION,this),"type"))}if(this.isArray()){for(var m=this.familyWithArray(),y=this.getExtra(N.HAS_ITEMS)?"items":"type",v=[],l=!1,g=!1,A=0,T=m;A0?(v=_.unique(v),v.forEach(function(r){var a=S,o=t.messageRegistry.ARRAY_COMPONENT_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN;a?r.value()!=a&&(o=t.messageRegistry.ARRAY_COMPONENT_TYPE_DEPENDES_ON_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN,a=r.value()):S=r.value(),e.addSubStatus(i(o,n,{componentTypeName:S,typeName:a}),y)})):e.addSubStatus(i(t.messageRegistry.UNKNOWN_ARRAY_COMPONENT_TYPE,this,{componentTypeName:S}),y)}}var I=this.superTypes(),b=!1,M=!1;if(I.length>1&&I.forEach(function(e){e.isExternal()?b=!0:M=!0}),b&&M&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,this)),this instanceof ne){var R=this;R.options().forEach(function(r){r.isExternal()&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,n))})}if(this.isExternal()&&this.getExtra(N.HAS_FACETS)){var C=this.getExtra(N.HAS_FACETS);if(C.length){var w=C[C.length-1],L=i(t.messageRegistry.EXTERNAL_FACET,this,{name:w});d(L,{name:w}),e.addSubStatus(L)}}},e.prototype.familyWithArray=function(){if(this.oneMeta(P.SkipValidation))return[];var e=[];this.fillSuperTypes(e,!0);var t=this.oneMeta(k.ComponentShouldBeOfType);if(t){var n=t.value();n.oneMeta(P.SkipValidation)||(e=e.concat(n.familyWithArray().concat(n)))}return e},e.prototype.validateMeta=function(e){var t=new I(I.OK,"","",this);return this.declaredMeta().forEach(function(n){n.validateSelf(e).getErrors().forEach(function(e){return t.addSubStatus(e)})}),this.validateFacets(t),t},e.prototype.validateFacets=function(e){var n=this,r={},a={},o={};this.meta().forEach(function(e){if(e instanceof D.FacetDeclaration){var t=e;r[t.actualName()]=t,t.isOptional()||t.owner()!==n&&(o[t.actualName()]=t),t.owner()!=n&&(a[t.actualName()]=t)}}),this.declaredMeta().forEach(function(r){if(r instanceof D.FacetDeclaration){var o=r;if(o.owner()==n){var s=o.actualName();a.hasOwnProperty(s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_FACET,n,{name:s}));var u=L.getInstance().facetPrototypeWithName(s);(u&&u.isApplicable(n)||"type"==s||"properties"==o.facetName()||"schema"==s||"facets"==s||"uses"==s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_BUILTIN_FACET,n,{name:s})),"("==s.charAt(0)&&e.addSubStatus(i(t.messageRegistry.FACET_START_BRACKET,n,{name:s}))}}});var s={};this.meta().forEach(function(e){e instanceof x.PropertyIs&&(s[e.propId()]=!0)});for(var u=0,l=this.meta();u0&&e.addSubStatus(i(t.messageRegistry.MISSING_REQUIRED_FACETS,this,{facetsList:Object.keys(o).map(function(e){return"'"+e+"'"}).join(",")}))},e.prototype.allSuperTypes=function(){var e=[];return this.fillSuperTypes(e),e},e.prototype.fillSuperTypes=function(e,t){void 0===t&&(t=!1);for(var n=0,r=this.superTypes();n2)&&0==this.metaInfo.filter(function(e){return!B.NotScalar.isInstance(e)&&(P.DiscriminatorValue.isInstance(e)?e.isStrict():!P.SourceMap.isInstance(e)&&!P.ImportedByChain.isInstance(e))}).length)},e.prototype.isArray=function(){return this===t.ARRAY||this.allSuperTypes().indexOf(t.ARRAY)!=-1},e.prototype.propertySet=function(){var e=[];return this.meta().forEach(function(t){if(t instanceof x.PropertyIs){var n=t;e.push(n.propertyName())}}),_.uniq(e)},e.prototype.checkConfluent=function(){if(this.oneMeta(P.SkipValidation))return r();if(this.computeConfluent)return r();this.computeConfluent=!0;var e=w.anotherRestrictionComponentsCount();try{var t=w.optimize(this.restrictions()),n=_.find(t,function(e){return e instanceof ae});if(n){var i=null,a=null;if(n instanceof se){var o=n;i=o.getStack(),a=o.another()}var s=new W(a,i,this);return s}return r()}finally{this.computeConfluent=!1,w.releaseAnotherRestrictionComponent(e)}},e.prototype.isObject=function(){return this==t.OBJECT||_.some(this.allSuperTypes(),function(e){return e.isObject()})},e.prototype.isExternal=function(){return this==t.EXTERNAL||this.allSuperTypes().indexOf(t.EXTERNAL)!=-1},e.prototype.isBoolean=function(){return this==t.BOOLEAN||this.allSuperTypes().indexOf(t.BOOLEAN)!=-1},e.prototype.isString=function(){return this==t.STRING||this.allSuperTypes().indexOf(t.STRING)!=-1},e.prototype.isNumber=function(){return this==t.NUMBER||this.allSuperTypes().indexOf(t.NUMBER)!=-1},e.prototype.isFile=function(){return this==t.FILE||this.allSuperTypes().indexOf(t.FILE)!=-1},e.prototype.isScalar=function(){return this==t.SCALAR||this.allSuperTypes().indexOf(t.SCALAR)!=-1},e.prototype.isDateTime=function(){return this==t.DATETIME||this.allSuperTypes().indexOf(t.DATETIME)!=-1},e.prototype.isDateOnly=function(){return this==t.DATE_ONLY||this.allSuperTypes().indexOf(t.DATE_ONLY)!=-1},e.prototype.isTimeOnly=function(){return this==t.TIME_ONLY||this.allSuperTypes().indexOf(t.TIME_ONLY)!=-1},e.prototype.isInteger=function(){return this==t.INTEGER||this.allSuperTypes().indexOf(t.INTEGER)!=-1},e.prototype.isDateTimeOnly=function(){return this==t.DATETIME_ONLY||this.allSuperTypes().indexOf(t.DATETIME_ONLY)!=-1},e.prototype.isUnknown=function(){return this==t.UNKNOWN||this.allSuperTypes().indexOf(t.UNKNOWN)!=-1},e.prototype.isRecurrent=function(){return this==t.RECURRENT||this.allSuperTypes().indexOf(t.RECURRENT)!=-1},e.prototype.isBuiltin=function(){return this.metaInfo.indexOf(Q)!=-1},e.prototype.exampleObject=function(){return F.example(this)},e.prototype.isPolymorphic=function(){return this.meta().some(function(e){return e instanceof X})},e.prototype.restrictions=function(e){if(void 0===e&&(e=!1),this.isUnion()){var t=[];return this.superTypes().forEach(function(e){t=t.concat(e.restrictions())}),t=t.concat(this.meta().filter(function(e){return e instanceof C}))}var n=[],r=null;return this.meta().forEach(function(t){if(t instanceof C){if(t instanceof ue&&e){if(r)return;r=t}n.push(t)}}),n},e.prototype.customFacets=function(){return this.declaredMeta().filter(function(e){return e instanceof P.CustomFacet})},e.prototype.allCustomFacets=function(){return this.meta().filter(function(e){return e instanceof P.CustomFacet})},e.prototype.isUnion=function(){var e=!1;return!this.isBuiltin()&&(this.allSuperTypes().forEach(function(t){return e=e||t instanceof ne}),e)},e.prototype.isIntersection=function(){var e=!1;return!this.isBuiltin()&&(this.allSuperTypes().forEach(function(t){return e=e||t instanceof re}),e)},e.prototype.meta=function(){return[].concat(this.metaInfo)},e.prototype.validateDirect=function(e,n,r,a){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===a&&(a=null);var s=t.VALIDATED_TYPE;try{var u=t.autoCloseFlag;n&&(t.autoCloseFlag=!0),t.VALIDATED_TYPE=this;var l=new I(I.OK,"","",this);if(!(r||null!==e&&void 0!==e||this.nullable)){var p=null;return this.restrictions(!0).forEach(function(e){if(e instanceof le){if(p)return;p=e}}),p?i(t.messageRegistry.TYPE_EXPECTED,p,{expectedType:p.value(),actualType:"null"}):i(t.messageRegistry.OBJECT_EXPECTED,this)}if(this.restrictions(!0).forEach(function(t){return l.addSubStatus(t.check(e,a))}),(n||t.autoCloseFlag)&&this.isObject()&&!this.oneMeta(O.KnownPropertyRestriction)){var c=new O.KnownPropertyRestriction(!1);c.patchOwner(this),c.check(e).getErrors().forEach(function(e){var t=new I(I.WARNING,e.getCode(),e.getMessage(),o);d(t,e.getValidationPath()),l.addSubStatus(t)})}}finally{t.autoCloseFlag=u,t.VALIDATED_TYPE=s}return l},e.prototype.validate=function(e,n,a){void 0===n&&(n=!1),void 0===a&&(a=!0);var o=t.autoCloseFlag;if(!(a||null!==e&&void 0!==e||this.nullable))return i(t.messageRegistry.NULL_NOT_ALLOWED,this);n&&(t.autoCloseFlag=!0);try{var s=[],u=_.find([this].concat(this.allSuperTypes()),function(e){return e.getExtra(t.GLOBAL)}),l=this.allSubTypes().concat(this);u&&u!=this&&(l=l.concat(u.allSubTypes()),l.push(u));for(var p,c=0,f=l;c1;){var i=!1;e:for(var a=0;a0?t[0].value().label()+"[]":e.prototype.label.call(this)},n.prototype.contextMeta=function(){return this._contextMeta},n.prototype.setContextMeta=function(e){this._contextMeta=e},n.prototype.patch=function(e){var n=this;for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r]);this.metaInfo.filter(function(t){return t._owner===e}).forEach(function(e){return e._owner=n});for(var i=0;i=0)&&(this._superTypes[i]=t.RECURRENT)}},n.CLASS_IDENTIFIER_InheritedType="typesystem.InheritedType",n}(q);t.InheritedType=ee;var te=function(e){function t(t,n){var r=e.call(this,t)||this;return r._options=n,r}return T(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_DerivedType)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&_.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_DerivedType)},t.prototype.cloneWithFilter=function(e,t){var n=this.clone(),r=[];return t&&(n._options=this.options().map(function(e){return t(e)})),this.metaInfo.forEach(function(t){var i=e(t,n);"boolean"==typeof i?i&&r.push(t):i&&r.push(i)}),n.metaInfo=r,n},t.prototype.allOptions=function(){var e=this,t=[];return this._options.forEach(function(n){n.kind()==e.kind()?t=t.concat(n.allOptions()):t.push(n)}),_.unique(t)},t.prototype.options=function(){return this._options},t.CLASS_IDENTIFIER_DerivedType="typesystem.DerivedType",t}(q);t.DerivedType=te;var ne=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.options().forEach(function(e){e.nullable&&(r.nullable=!0)}),r}return T(n,e),n.prototype.getClassIdentifier=function(){var t=e.prototype.getClassIdentifier.call(this);return t.concat(n.CLASS_IDENTIFIER_UnionType)},n.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&_.contains(e.getClassIdentifier(),n.CLASS_IDENTIFIER_UnionType)},n.prototype.kind=function(){return"union"},n.prototype.clone=function(){return new n(this.name(),this.options())},n.prototype.isSubTypeOf=function(e){var t=!0;return this.allOptions().forEach(function(n){n.isSubTypeOf(e)||(t=!1)}),t},n.prototype.validate=function(e){return this.validateDirect(e)},n.prototype.typeFamily=function(){var e=[];return this.allOptions().forEach(function(t){e=e.concat(t.typeFamily())}),e},n.prototype.knownProperties=function(){var e=this.metaOfType(V.MatchesProperty);return this.options().forEach(function(t){e=e.concat(t.knownProperties())}),e},n.prototype.validateDirect=function(e,t){void 0===t&&(t=!1);var n=new I(I.OK,"","",this);return this.restrictions().forEach(function(t){return n.addSubStatus(t.check(e,null))}),n},n.prototype.isUnion=function(){return!0},n.prototype.isObject=function(){return _.all(this.allOptions(),function(e){return e.isObject()})},n.prototype.restrictions=function(){return[new he(this.allOptions().map(function(e){return new de(e.restrictions())}),t.messageRegistry.UNION_TYPE_FAILURE,t.messageRegistry.UNION_TYPE_FAILURE_DETAILS)]},n.prototype.label=function(){return this.options().map(function(e){return e.label()}).join("|")},n.CLASS_IDENTIFIER_UnionType="typesystem.UnionType",n}(te);t.UnionType=ne;var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_IntersectionType)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&_.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_IntersectionType)},t.prototype.kind=function(){return"intersection"},t.prototype.clone=function(){return new t(this.name(),this.options())},t.prototype.restrictions=function(){var e=[];return this.allOptions().forEach(function(t){t.oneMeta(P.SkipValidation)||(e=e.concat(t.restrictions()))}),[new de(e)]},t.prototype.label=function(){return this.options().map(function(e){return e.label()}).join("&")},t.prototype.isIntersection=function(){return!0},t.CLASS_IDENTIFIER_IntersectionType="typesystem.IntersectionType",t}(te);t.IntersectionType=re;var ie=new K;t.builtInRegistry=a,t.union=o,t.intersect=s,t.derive=u,t.deriveObjectType=l;var ae=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return T(n,e),n.prototype.check=function(e){return null===e||void 0===e?r():i(t.messageRegistry.NOTHING,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"nothing"},n.prototype.value=function(){return"!!!"},n}(C);t.NothingRestriction=ae;var oe=function(){function e(e,t,n){this._previous=e,this._restriction=t,this.id=n}return e.prototype.getRestriction=function(){return this._restriction},e.prototype.pop=function(){return this._previous},e.prototype.push=function(t){return new e(this,t,t.toString())},e}();t.RestrictionStackEntry=oe;var se=function(e){function t(t,n,r){var i=e.call(this)||this;return i._entry=t,i._message=n,i._another=r,i}return T(t,e),t.prototype.getMessage=function(){return this._message},t.prototype.getStack=function(){return this._entry},t.prototype.another=function(){return this._another},t}(ae);t.NothingRestrictionWithLocation=se;var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_GenericTypeOf)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&_.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_GenericTypeOf)},t.CLASS_IDENTIFIER_GenericTypeOf="typesystem.GenericTypeOf",t}(C);t.GenericTypeOf=ue;var le=function(e){function n(t){var n=e.call(this)||this;return n.val=t,n}return T(n,e),n.prototype.check=function(e){var n=typeof e;return null===e||void 0===e?r():(Array.isArray(e)&&(n="array"),n===this.val?r():i(t.messageRegistry.TYPE_EXPECTED,this,{expectedType:this.val,actualType:n}))},n.prototype.value=function(){return this.val},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"typeOf"},n.prototype.composeWith=function(e){if(e instanceof n){var t=e;return t.val==this.val?this:this.nothing(e)}return null},n.prototype.toString=function(){return"should be of type "+this.val},n}(ue);t.TypeOfRestriction=le;var pe=function(e){function n(){return e.call(this)||this}return T(n,e),n.prototype.check=function(e){return"number"==typeof e&&c(e)?r():i(t.messageRegistry.INTEGER_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.value=function(){return!0},n.prototype.facetName=function(){return"should be integer"},n}(ue);t.IntegerRestriction=pe;var ce=function(e){function n(){return e.call(this,"nil")||this}return T(n,e),n.prototype.check=function(e){return null===e||void 0==e||"null"===e?r():i(t.messageRegistry.NULL_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"should be nil"},n}(le);t.NullRestriction=ce;var fe=function(e){function n(){return e.call(this)||this}return T(n,e),n.prototype.check=function(e){return e?"number"==typeof e||"boolean"==typeof e||"string"==typeof e?r():i(t.messageRegistry.SCALAR_EXPECTED,this):r()},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return t.messageRegistry.SHOULD_BE_SCALAR.message},n.prototype.value=function(){return!0},n}(ue);t.ScalarRestriction=fe;var he=function(e){function n(t,n,r){var i=e.call(this)||this;return i.val=t,i._extraMessage=n,i._extraOptionMessage=r,i}return T(n,e),n.prototype.check=function(e,t){for(var n=this,a=new I(I.OK,"","",this),o=[],s=0;s0){for(var l=0,p=o;l=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){var e=this;return this._annotations||(this._annotations=this._type.meta().filter(function(e){return e.kind()==N.MetaInformationKind.Annotation}).map(function(t){return new _e(t,e.reg)})),this._annotations},e.prototype.value=function(){return Ee.storeAsJSON(this._type)},e.prototype.name=function(){return this._type.name()},e.prototype.entry=function(){return this._type},e}();t.AnnotatedType=Te;var _e=function(){function e(e,t){this.actual=e}return e.prototype.name=function(){return this.actual.facetName()},e.prototype.value=function(){return this.actual.value()},e.prototype.definition=function(){var e=ie.get(this.actual.facetName());return e},e.prototype.annotation=function(){return this.actual},e}();t.AnnotationInstance=_e,t.applyAnnotationValidationPlugins=y,t.applyTypeValidationPlugins=v,t.toValidationPath=A,t.isUnknown=E},function(e,t,n){var r,i;(function(e,n){!function(){var a="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=a._,s=Array.prototype,u=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,p=s.push,c=s.slice,f=u.toString,h=u.hasOwnProperty,d=Array.isArray,m=Object.keys,y=Object.create,v=function(){},g=function(e){return e instanceof g?e:this instanceof g?void(this._wrapped=e):new g(e)};"undefined"==typeof t||t.nodeType?a._=g:("undefined"!=typeof n&&!n.nodeType&&n.exports&&(t=n.exports=g),t._=g),g.VERSION="1.9.1";var A,E=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},T=function(e,t,n){return g.iteratee!==A?g.iteratee(e,t):null==e?g.identity:g.isFunction(e)?E(e,t,n):g.isObject(e)&&!g.isArray(e)?g.matcher(e):g.property(e)};g.iteratee=A=function(e,t){return T(e,t,1/0)};var _=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i=0&&t<=M};g.each=g.forEach=function(e,t,n){t=E(t,n);var r,i;if(C(e))for(r=0,i=e.length;r0?0:o-1;for(i||(r=t[a?a[s]:s],s+=e);s>=0&&s=3;return t(e,E(n,i,4),r,a)}};g.reduce=g.foldl=g.inject=w(1),g.reduceRight=g.foldr=w(-1),g.find=g.detect=function(e,t,n){var r=C(e)?g.findIndex:g.findKey,i=r(e,t,n);if(void 0!==i&&i!==-1)return e[i]},g.filter=g.select=function(e,t,n){var r=[];return t=T(t,n),g.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},g.reject=function(e,t,n){return g.filter(e,g.negate(T(t)),n)},g.every=g.all=function(e,t,n){t=T(t,n);for(var r=!C(e)&&g.keys(e),i=(r||e).length,a=0;a=0},g.invoke=_(function(e,t,n){var r,i;return g.isFunction(t)?i=t:g.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),g.map(e,function(e){var a=i;if(!a){if(r&&r.length&&(e=b(e,r)),null==e)return;a=e[t]}return null==a?a:a.apply(e,n)})}),g.pluck=function(e,t){return g.map(e,g.property(t))},g.where=function(e,t){return g.filter(e,g.matcher(t))},g.findWhere=function(e,t){return g.find(e,g.matcher(t))},g.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sa&&(a=r)}else t=T(t,n),g.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},g.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sr||void 0===n)return 1;if(n0?0:i-1;a>=0&&a0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(c.call(r,o,s),g.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&at?(r&&(clearTimeout(r),r=null),s=l,o=e.apply(i,a),r||(i=a=null)):r||n.trailing===!1||(r=setTimeout(u,p)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l},g.debounce=function(e,t,n){var r,i,a=function(t,n){r=null,n&&(i=e.apply(t,n))},o=_(function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,t),s&&(i=e.apply(this,o))}else r=g.delay(a,t,this,o);return i});return o.cancel=function(){clearTimeout(r),r=null},o},g.wrap=function(e,t){return g.partial(t,e)},g.negate=function(e){return function(){return!e.apply(this,arguments)}},g.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},g.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},g.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},g.once=g.partial(g.before,2),g.restArguments=_;var k=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=F.length,r=e.constructor,i=g.isFunction(r)&&r.prototype||u,a="constructor";for(I(e,a)&&!g.contains(t,a)&&t.push(a);n--;)a=F[n],a in e&&e[a]!==i[a]&&!g.contains(t,a)&&t.push(a)};g.keys=function(e){if(!g.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)I(e,n)&&t.push(n);return k&&B(e,t),t},g.allKeys=function(e){if(!g.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&B(e,t),t},g.values=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=E(r,t[1])),t=g.allKeys(e)):(r=K,t=O(t,!1,!1),e=Object(e));for(var i=0,a=t.length;i1&&(n=t[1])):(t=g.map(O(t,!1,!1),String),r=function(e,n){return!g.contains(t,n)}),g.pick(e,r,n)}),g.defaults=V(g.allKeys,!0),g.create=function(e,t){var n=S(e);return t&&g.extendOwn(n,t),n},g.clone=function(e){return g.isObject(e)?g.isArray(e)?e.slice():g.extend({},e):e},g.tap=function(e,t){return t(e),e},g.isMatch=function(e,t){var n=g.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a":">",'"':""","'":"'","`":"`"},q=g.invert(Y),G=function(e){var t=function(t){return e[t]},n="(?:"+g.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};g.escape=G(Y),g.unescape=G(q),g.result=function(e,t,n){g.isArray(t)||(t=[t]);var r=t.length;if(!r)return g.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var z=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+$[e]};g.template=function(e,t,n){!t&&n&&(t=n),t=g.defaults({},t,g.templateSettings);var r=RegExp([(t.escape||z).source,(t.interpolate||z).source,(t.evaluate||z).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(J,Q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";var o;try{o=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return o.call(this,e,g)},u=t.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},g.chain=function(e){var t=g(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?g(t).chain():t};g.mixin=function(e){return g.each(g.functions(e),function(t){var n=g[t]=e[t];g.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),Z(this,n.apply(g,e))}}),g},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];g.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),g.each(["concat","join","slice"],function(e){var t=s[e];g.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return String(this._wrapped)},r=[],i=function(){return g}.apply(t,r),!(void 0!==i&&(n.exports=i))}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){(function(e){"use strict";function r(e){var t=null!=e.rootPath&&"function"==typeof e.rootPath,n=null!=e.isWebPath&&"function"==typeof e.isWebPath,r=null!=e.relativePath&&"function"==typeof e.relativePath;return t&&n&&r}function i(e){if(null==e||0==e.trim().length)return e;var t="https://".length;if(e.length>=t&&"https://"==e.substring(0,t))return e;e=e.replace("//","__/DOUBLESLASH/__"),e=e.replace(/^([a-zA-Z]):/,"$1__/COLON/__");var n="https://__/APPENDED_PROTOCOL/__";return"/"!=e.charAt(0)&&(n+="/"),n+e}function a(e){if(null==e||0==e.trim().length)return e;var t="https://__/APPENDED_PROTOCOL/__",n=t.length;return e.length0&&"/"==e.charAt(0)&&(e=e.substring(1)),e=e.replace("__/DOUBLESLASH/__","//").replace("__/COLON/__",":"))}function o(e,t){var n=x(t,e),r=!!M&&w.getValue(n);if(r&&r.provider)return r;var i=new O(e,t);return w.setValue(n,i),i}function s(e,t){var n=(x(t,e),!!M&&w.getValue(e));if(n)return n;var r=new U(e,t);return M&&w.setValue(e,r),r}function u(e,t){var n=e&&e.trim().length>0&&"{"==e.trim().charAt(0),r=x(t,e),i=!!M&&w.getValue(r);if(i)return i;try{var a=new O(e,t);return M&&w.setValue(r,a),a}catch(i){if(M&&_.ValidationError.isInstance(i)&&n)return w.setValue(r,i),i;try{var a=new U(e,t);return w.setValue(r,a),a}catch(e){if(M){var o=new _.ValidationError(S.messageRegistry.CAN_NOT_PARSE_SCHEMA);return w.setValue(r,o),o}}}}function l(e,t){for(var n=e.getElementsByTagNameNS("*",t),r=[],i=0;i0&&(n+=":");for(var r=e.getElementsByTagName(n+t),i=[],a=0;a",c);f<0&&(f=c);var h=u.substring(l,f),d=u.substring(c,p).trim(),m=d.indexOf(":");try{var y=parseInt(d.substring(0,m))-1,v=parseInt(d.substring(m+1,d.length))-1,g=n+" '"+h+"'",A=new _.ValidationError(i,{msg:g});return A.internalRange={start:{line:y,column:v,position:null},end:{line:y,column:v+h.length,position:null}},A}catch(e){}}return new _.ValidationError(S.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:e})}function h(e,t,n){if(!n||"string"!=typeof n)return null;t=t||N(e,{verbose:!0}),"#"==n.charAt(0)&&(n=n.substring(1)),"/"==n.charAt(0)&&(n=n.substring(1));var r=t;if(n.length>0)for(var i=n.split("/"),a=0,o=i;aR&&this.last;){var r=this.last.key;delete this.errors[r],this.size-=r.length,this.last=this.last.next}},e}(),w=new C;e.cleanCache=function(){w=new C};var P=function(){function e(){}return e.prototype.contextPath=function(){return""},e.prototype.normalizePath=function(e){return""},e.prototype.content=function(e){return""},e.prototype.hasAsyncRequests=function(){return!1},e.prototype.resolvePath=function(e,t){return""},e.prototype.isAbsolutePath=function(e){return!1},e.prototype.contentAsync=function(e){var t=this;return{then:function(n){return n(t.content(e))},resolve:function(){return null}}},e.prototype.promiseResolve=function(e){return{then:function(t){return t(e)},resolve:function(){return null}}},e}(),L=function(e,t,n){return"__EXAMPLE_"+(""+e).trim()+t.trim()+n},O=function(){function e(e,t){if(this.schema=e,this.provider=t,this.EXAMPLE_ERROR_ENTRY=S.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,this.SCHEMA_ERROR_ENTRY=S.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,t?this.provider=t:this.provider=new P,!e||0==e.trim().length||"{"!=e.trim().charAt(0))throw new _.ValidationError(S.messageRegistry.INVALID_JSON_SCHEMA);m(e,!1);var r=JSON.parse(e);if(r){try{var i=n(71),a=this.provider.contextPath();this.setupId(r,a),this.updateGraph(r,a);var o=""+r.$schema;o.indexOf("http://json-schema.org/draft-04/")==-1?r=i.v4(r):this.fixRequired(r)}catch(e){if(_.ValidationError.isInstance(e))throw e;throw new _.ValidationError(S.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:e.message})}delete r.$schema,this.jsonSchema=r}}return e.prototype.fixRequired=function(e){},e.prototype.getType=function(){return"source.json"},e.prototype.validateObject=function(e){this.validate(JSON.stringify(e))},e.prototype.getMissingReferences=function(e,t){var n=this;void 0===t&&(t=!1);var r=[],i=E.getValidator();e.forEach(function(e){return i.setRemoteReference(e.reference,e.content||{})});var a=null;if(this.jsonSchema.id&&"string"==typeof this.jsonSchema.id){a=this.jsonSchema.id;var o=a.indexOf("#");o!=-1&&(a=a.substr(0,o))}try{i.validateSchema(this.jsonSchema)}catch(e){return[]}var r=i.getMissingRemoteReferences(),s=[];return r&&(s=g.filter(r,function(e){return!i.isResourceLoaded(e)&&e!=a})),t?s.map(function(e){return n.provider.normalizePath(e)}):s},e.prototype.getSchemaPath=function(e,t){if(void 0===t&&(t=!1),!e)return"";if(!e.id)return"";var n=e.id.trim();if(n.lastIndexOf("#")!==n.length-1)return n;var r=n.substr(0,n.length-1);return t?this.provider.normalizePath(r):r},e.prototype.patchSchema=function(e){var t=this;if(!e)return e;if(!e.id)return e;var n=e.id.trim();n.lastIndexOf("#")!==n.length-1&&(n+="#",e.id=n);var r=n.substr(0,n.length-1);if(!this.provider.isAbsolutePath(r))return e;r=this.provider.normalizePath(r);var a=[];this.collectRefContainers(e,a),a.forEach(function(e){var n=e.$ref;if("string"==typeof n&&0!==n.indexOf("#")){n.indexOf("#")===-1&&(n+="#");var a;a=t.provider.isAbsolutePath(n)?i(n):t.provider.resolvePath(r,n),e.$ref=a}})},e.prototype.removeFragmentPartOfIDs=function(e){var t=this;if(e){if(Array.isArray(e))return void e.forEach(function(e){return t.removeFragmentPartOfIDs(e)});if("object"==typeof e){var n=e.id;if(n&&"string"==typeof e.id){var r=n.indexOf("#");r>=0&&(n=n.substring(0,r).trim(),n?e.id=n:delete e.id)}Object.keys(e).forEach(function(n){return t.removeFragmentPartOfIDs(e[n])})}}},e.prototype.collectRefContainers=function(e,t){var n=this;Object.keys(e).forEach(function(r){return"$ref"===r?void t.push(e):void(e[r]&&"object"==typeof e[r]&&n.collectRefContainers(e[r],t))})},e.prototype.validate=function(e,t){var r=this;void 0===t&&(t=[]);var i=L(e,this.schema,this.provider.contextPath()),o=w.getValue(i);if(o){if(o instanceof Error)throw o}else{var s=L("__SCHEMA_VALIDATION__",this.schema,this.provider.contextPath()),u=w.getValue(s);if(u&&u instanceof Error){if(_.ValidationError.isInstance(u)){var l=u,p=new _.ValidationError(l.messageEntry,l.parameters);p.filePath=l.filePath,p.additionalErrors=l.additionalErrors,p.internalPath=l.internalPath,p.isWarning=l.isWarning,u=p}throw u}if(0==t.length&&(m(e,!0),this.jsonSchema.id)){var c=this.jsonSchema.id;if("#"==c.charAt(c.length-1)){var f=c.substring(0,c.length-1);t.push({reference:f,content:this.jsonSchema})}}var h=JSON.parse(e),d=E.getValidator();t.forEach(function(e){return d.setRemoteReference(e.reference,e.content)}),d.validate(h,this.jsonSchema);var y=d.getMissingRemoteReferences().filter(function(e){return!g.find(t,function(t){return e===t.reference})});if(!y||0===y.length)return void this.acceptErrors(i,d.getLastErrors(),e,!0);var v=[];y.forEach(function(e){var t,o=a(e),s={reference:e};try{var u=n(71),l=r.provider.content(o);m(l,!0);var p=JSON.parse(l),c=r.provider.normalizePath(o);r.setupId(p,c),r.updateGraph(p,c),t=u.v4(p),delete t.$schema,s.content=t}catch(e){if(_.ValidationError.isInstance(e))throw e.filePath=o,w.setValue(i,e),e;s.error=e}finally{v.push(s)}}),this.provider.hasAsyncRequests()||(v.forEach(function(e){t.push(e)}),this.validate(e,t))}},e.checkIfNonObjectAssignmentFailure=function(e){var t="__$validated",n="called on non-object";if(!e)return null;if(e.indexOf(t)!=-1){var r="Cannot assign to read only property '__$validated' of ",i="Cannot create property '__$validated' on string '";return 0==e.indexOf(r)&&e.length>r.length?e.substr(r.length,e.length-r.length):0==e.indexOf(i)&&e.length>i.length+1&&"'"==e.charAt(e.length-1)?e.substr(i.length,e.length-i.length-1):""}return e.indexOf(n)!=-1?"":null},e.prototype.validateSelf=function(t){var r=this;void 0===t&&(t=[]);var i=L("__SCHEMA_VALIDATION__",this.schema,this.provider.contextPath()),o=w.getValue(i);if(o){if(o instanceof Error)throw o}else{var s=E.getValidator();t.forEach(function(e){return s.setRemoteReference(e.reference,e.content)});try{delete this.jsonSchema.id,s.validateSchema(this.jsonSchema)}catch(t){var u=e.checkIfNonObjectAssignmentFailure(t.message);if(null!==u){var l=u,p="Assignment to non-object.";l&&(p="Unexpected value '"+l+"'"),this.acceptErrors(i,[{message:p,params:[]}],null,!0,!0)}throw t}var c=s.getMissingRemoteReferences().filter(function(e){return!g.find(t,function(t){return e===t.reference})});if(!c||0===c.length)return void this.acceptErrors(i,s.getLastErrors(),null,!0,!0);var f=[];c.forEach(function(e,t){if(!(t>0)){var o,s=a(e),u={reference:e};try{var l=n(71),p=r.provider.content(s);m(p,!0);var c=JSON.parse(p),h=r.provider.normalizePath(s);r.setupId(c,h),r.updateGraph(c,h),o=l.v4(c),delete o.$schema,u.content=o}catch(e){if(_.ValidationError.isInstance(e))throw e.filePath=s,w.setValue(i,e),e;u.error=e}finally{f.push(u)}}}),this.provider.hasAsyncRequests()||(f.forEach(function(e){t.push(e)}),this.validateSelf(t))}},e.prototype.setupId=function(e,t){t&&e&&(this.removeFragmentPartOfIDs(e),e.id&&(this.provider.isAbsolutePath(e.id)||(e.id=this.provider.resolvePath(t,e.id))),e.id=t.replace(/\\/g,"/"),"#"!=e.id.charAt(e.id.length-1)&&(e.id=e.id+"#"),e.id=i(e.id),this.patchSchema(e))},e.prototype.acceptErrors=function(t,n,r,i,a){var o=this;void 0===i&&(i=!1),void 0===a&&(a=!1);var s=null!=r,u=null!=r?r:this.schema;if(n&&n.length>0){var l=N(u,{verbose:!0}),p=n.map(function(t){var n,i=s&&e.EXAMPLE_ERROR_CODES[t.code];n=i?o.EXAMPLE_ERROR_ENTRY:o.SCHEMA_ERROR_ENTRY;var p=new _.ValidationError(n,{msg:t.message});return(i||null==r)&&(p.internalRange=h(u,l,t.path)),p.isWarning=a,p.error=t,p.internalPath=t.path,p}),c=p[0];if(c.additionalErrors=p.slice(1),w.setValue(t,c),i)throw c}else w.setValue(t,1)},e.prototype.contentAsync=function(e){var t,r=this,i=a(e),o=n(71),s=this.provider.contentAsync(i);if(!s)return this.provider.promiseResolve({reference:i,content:null,error:new _.ValidationError(S.messageRegistry.REFERENCE_NOT_FOUND,{ref:i})});var u=s.then(function(n){var a={reference:e};try{m(n,!0);var s=JSON.parse(n),u=r.provider.normalizePath(i);r.setupId(s,u),r.updateGraph(s,u),t=o.v4(s),delete t.$schema,a.content=t}catch(e){throw a.error=e,a.reference=i,e}return a});return u},e.prototype.updateGraph=function(e,t){t.indexOf("#")<0&&(t+="#"),this.graph||(this.graph=new K(t));var n=this.graph.addNode(e,t);if(n){if(r(this.provider)){var i=this.provider,a=i.rootPath(),o=a.length;n=n.map(function(e){var t=e.trim();return i.isWebPath(t)?i.isWebPath(a)&&t.length>=o&&t.substring(0,o)==a&&(t=t.substring(o)):t=i.relativePath(a,t).replace(/\\/g,"/"),t.length&&"#"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t})}var s=new _.ValidationError(S.messageRegistry.CIRCULAR_REFS_IN_JSON_SCHEMA_DETAILS,{cycle:n.join(" -> ")});throw s}},e.SCHEMA_ERROR_CODES={KEYWORD_TYPE_EXPECTED:!0,KEYWORD_MUST_BE:!0,KEYWORD_DEPENDENCY:!0,KEYWORD_PATTERN:!0,KEYWORD_UNDEFINED_STRICT:!0,KEYWORD_VALUE_TYPE:!0,CUSTOM_MODE_FORCE_PROPERTIES:!0,UNKNOWN_FORMAT:!0,PARENT_SCHEMA_VALIDATION_FAILED:!0,REF_UNRESOLVED:!0,KEYWORD_UNEXPECTED:!0,SCHEMA_NOT_AN_OBJECT:!0,SCHEMA_NOT_REACHABLE:!0,UNRESOLVABLE_REFERENCE:!0},e.EXAMPLE_ERROR_CODES={MULTIPLE_OF:!0,MAXIMUM:!0,MAXIMUM_EXCLUSIVE:!0,MAX_LENGTH:!0,MIN_LENGTH:!0,PATTERN:!0,ARRAY_ADDITIONAL_ITEMS:!0,ARRAY_LENGTH_LONG:!0,ARRAY_LENGTH_SHORT:!0,ARRAY_UNIQUE:!0,OBJECT_PROPERTIES_MAXIMUM:!0,OBJECT_PROPERTIES_MINIMUM:!0,OBJECT_MISSING_REQUIRED_PROPERTY:!0,OBJECT_ADDITIONAL_PROPERTIES:!0,OBJECT_DEPENDENCY_KEY:!0,ENUM_MISMATCH:!0,ANY_OF_MISSING:!0,ONE_OF_MISSING:!0,ONE_OF_MULTIPLE:!0,NOT_PASSED:!0,INVALID_FORMAT:!0,UNKNOWN_FORMAT:!0,INVALID_TYPE:!0},e}();t.JSONSchemaObject=O;var D=10,U=function(){function e(e,t){if(this.schema=e,this.provider=t,this.extraElementData=null,this.references={},this.contentToResult={},t||(this.provider=new P),"<"!=e.charAt(0))throw new _.ValidationError(S.messageRegistry.INVALID_XML_SCHEMA);this.schemaString=this.handleReferenceElement(e)}return e.prototype.getType=function(){return"text.xml"},e.prototype.validateObject=function(e){if(this.extraElementData){var t=Object.keys(e)[0],n=new _.ValidationError(S.messageRegistry.EXTERNAL_TYPE_ERROR,{typeName:this.extraElementData.requestedName,objectName:t});if(!this.extraElementData.type&&!this.extraElementData.originalName)return void this.acceptErrors("key",[n],!0);if(this.extraElementData.originalName&&t!==this.extraElementData.originalName)return void this.acceptErrors("key",[n],!0);if(this.extraElementData.type){var r=e[t];delete e[t],e[this.extraElementData.name]=r}}this.validate(A.jsonToXml(e))},e.prototype.collectReferences=function(e,t,n){var r,i=this;r=new T(b).parseFromString(e);var a=p(r,"schema",this.namspacePrefix)[0],o=l(a,"import"),s=l(a,"include"),u=o.concat(s);return u.forEach(function(e){var r=e.getAttribute("schemaLocation");if(r){var a=i.provider.resolvePath(t,r),o=n[a];if(!o){var s,u=Object.keys(n).length,l=i.provider.content(a);try{s=i.collectReferences(l,a,n)}catch(e){s=l}o=A.createXmlSchemaReference(a,u,s),n[a]=o}e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd")}}),r.toString()},e.prototype.getMissingReferences=function(){var e,t=this;e=new T(b).parseFromString(this.schemaString);var n=p(e,"schema",this.namspacePrefix)[0],r=p(n,"import",this.namspacePrefix),i=p(n,"include",this.namspacePrefix),a=r.concat(i),o=[];return a.forEach(function(e){var n=e.getAttribute("schemaLocation");if(n){var r=t.provider.resolvePath(t.provider.contextPath(),n);o.push(r)}}),o},e.prototype.collectReferencesAsync=function(e,t,n){var r,i=this;r=new T(b).parseFromString(e);var a=p(r,"schema",this.namspacePrefix)[0],o=l(a,"import"),s=l(a,"include"),u=o.concat(s);return Promise.all(u.map(function(e){var r=e.getAttribute("schemaLocation");if(r){var a=i.provider.resolvePath(t,r),o=n[a]; -return o?(e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd"),{}):i.provider.contentAsync(a).then(function(t){return i.collectReferencesAsync(t,a,n).then(function(e){return e},function(e){return t}).then(function(t){var r=Object.keys(n).length;return o=A.createXmlSchemaReference(a,r,t),n[a]=o,e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd"),{}})})}return{}})).then(function(e){return Promise.resolve(r.toString())})},e.prototype.loadSchemaReferencesAsync=function(){return this.collectReferencesAsync(this.schemaString,this.provider.contextPath(),{})},e.prototype.validate=function(e){try{var t=this.contentToResult[e];if(t===!1)return;if(t)throw t;var n={},r=this.collectReferences(this.schemaString,this.provider.contextPath(),n),i=A.getValidator(r);if(this.provider.hasAsyncRequests())return;var a=i.validate(e,Object.keys(n).map(function(e){return n[e]}));this.acceptErrors("key",a,!0),this.contentToResult[e]=!1,Object.keys(this.contentToResult).length>D&&(this.contentToResult={})}catch(t){throw this.contentToResult[e]=t,t}},e.prototype.handleReferenceElement=function(e){var t=new T(b).parseFromString(e);this.namspacePrefix=c(t);var n=p(t,"schema",this.namspacePrefix)[0],r=p(n,"element",this.namspacePrefix),i=g.find(r,function(e){return"true"===e.getAttribute("extraelement")});if(!i)return e;var a={};return a.name=i.getAttribute("name"),a.type=i.getAttribute("type"),a.originalName=i.getAttribute("originalname"),a.requestedName=i.getAttribute("requestedname"),a.type||n.removeChild(i),i.removeAttribute("originalname"),i.removeAttribute("requestedname"),i.removeAttribute("extraelement"),this.extraElementData=a,t.toString()},e.prototype.acceptErrors=function(e,t,n){if(void 0===n&&(n=!1),t&&t.length>0){var r=t.map(function(e){return e.message}).join(", "),i=new _.ValidationError(S.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,{msg:r});if(i.errors=t,w.setValue(e,i),n)throw i}else;},e}();t.XMLSchemaObject=U,t.getJSONSchema=o;var x=function(e,t){var n="";e&&(n=e.contextPath());var r="__SCHEMA_"+(""+t).trim()+n.trim();return r};t.getXMLSchema=s,t.createSchema=u;var k="Cannot tokenize symbol",F="Unexpected token";t.messageToValidationError=f,t.getJSONRange=h,t.tryParseJSON=m;var B=function(){function e(e){this.segments=e}return e.prototype.length=function(){return this.segments.length},e}(),V=function(){function e(e){this.url=e,this.processed=!1,this.refFromRoot=new B([]),this.refsOut={},this.referees={}}return e}(),K=function(){function e(e){this.rootPath=e,this.nodes={}}return e.prototype.node=function(e){return this.nodes[e]},e.prototype.addNode=function(e,t){var n=this.nodes[t];if(n){if(n.processed)return}else n=new V(t),this.nodes[t]=n;for(var r=y(e),i=Object.keys(n.referees).map(function(e){return n.referees[e]}),a=null,o=function(e){var r=n.referees[e];r&&(a=[s.rootPath].concat(r.refFromRoot.segments).concat(r.refsOut[t].segments).concat([e]));var o=s.nodes[e];o||(o=new V(e),o.refFromRoot=new B(n.refFromRoot.segments.concat([e])),s.nodes[e]=o);for(var u=i.filter(function(e){return!o.referees[e.url]}),l=0,p=u;l"}function a(e){return new l(e)}function o(e){var t=e&&Object.keys(e)[0];if(t){var n=e[t];s(n)}return i(e)}function s(e){if(e&&"string"!=typeof e){var t=[];Object.keys(e).forEach(function(n){if("$"!=n)if(0===n.indexOf("@")){var r={key:n,value:e[n]};t.push(r)}else if(u(e[n])){var i=e[n];i.forEach(function(e){return s(e)})}else"string"!=typeof e[n]&&s(e[n])}),e.$||(e.$={});var n=e.$;t.forEach(function(t){delete e[t.key];var r=t.key.substring(1);n[r]=t.value})}}function u(e){return!!e&&("object"==typeof e&&"number"==typeof e.length)}Object.defineProperty(t,"__esModule",{value:!0});var l,p=n(63);try{l=n(64).XMLValidator}catch(e){}if(!l){var c=function(){function e(e){}return e.prototype.validate=function(e,t){return[]},e}();l=c}t.createXmlSchemaReference=r,t.getValidator=a,t.jsonToXml=o},function(e,t){/*! +this._contextRequirements=[],this._type=e}return e.prototype.withAllowQuestion=function(){this._allowsOptionalProperties=!0},e.prototype.getAllowQuestion=function(){return this._allowsOptionalProperties},e.prototype.withCanInherit=function(e){this._canInherit.push(e)},e.prototype.getReferenceIs=function(){return this._referenceIs},e.prototype.withReferenceIs=function(e){this._referenceIs=e},e.prototype.descriminatorValue=function(){return 0==this.valueRequirements().length?this.nameId():this.valueRequirements()[0].value},e.prototype.getCanInherit=function(){return this._canInherit},e.prototype.withAllowAny=function(){this._allowsAnyChildren=!0},e.prototype.getAllowAny=function(){return this._allowsAnyChildren||this._type.isExternal()},e.prototype.globallyDeclaredBy=function(){return this._declaredBy},e.prototype.setGloballyDeclaredBy=function(e){this._declaredBy.push(e)},e.prototype.setDeclaringNode=function(e){this._node=e},e.prototype.nameId=function(){return this._type.nameId()},e.prototype.universe=function(){return this._type.universe()},e.prototype.isAssignableFrom=function(e){return this._type.isAssignableFrom(e)},e.prototype.setConsumesRefs=function(e){this._consumesRef=e},e.prototype.definingPropertyIsEnough=function(e){this._defining.push(e)},e.prototype.getDefining=function(){return this._defining},e.prototype.getConsumesRefs=function(){return this._consumesRef},e.prototype.addAlias=function(e){this._aliases.push(e)},e.prototype.getAliases=function(){return this._aliases},e.prototype.valueRequirements=function(){return this._type.valueRequirements()},e.prototype.isAnnotation=function(){return this._annotationChecked?this._isAnnotation:(this._annotationChecked=!0,this._isAnnotation=this._type.allSuperTypes().some(function(e){return e.key()&&"AnnotationRef"==e.key().name}),this._isAnnotation)},e.prototype.allowValue=function(){return this._allowsValueSet?this._allowsValue:this._type.allProperties().some(function(e){return e.isFromParentValue()||e.canBeValue()})?(this._allowsValue=!0,this._allowsValueSet=!0,!0):(this._allowsValueSet=!0,!1)},e.prototype.key=function(){return this._type.key()},e.prototype.getRepresentationOf=function(){return this._representationOf},e.prototype.getPath=function(){return""},e.prototype.isDeclaration=function(){return!!this._isTemplate||(!!this._convertsToGlobal||(!!this._declaresType||!(!this.key()||"Library"!==this.key().name)))},e.prototype.isGlobalDeclaration=function(){return!!this._actuallyExports||(!!this._isTemplate||!!this._declaresType)},e.prototype.isTypeSystemMember=function(){return null!=this._declaresType},e.prototype.getExtendedType=function(){return this.universe().type(this._declaresType)},e.prototype.setInlinedTemplates=function(e){return this._isTemplate=e,this},e.prototype.getRuntimeExtenders=function(){return this._runtimeExtenders},e.prototype.isInlinedTemplates=function(){return this._isTemplate},e.prototype.setExtendedTypeName=function(t){this._declaresType=t;var n=this.universe().type(t);if(n instanceof m){var r=n;r.getAdapter(e)._runtimeExtenders.push(this._type)}},e.prototype.getKeyProp=function(){for(var e=this._type.allProperties(),t=0;t0){var e=[];return this.subStatus.forEach(function(t){return e=e.concat(t.getErrors())}),e}return[this]}return[]},e.prototype.getSubStatuses=function(){return this.subStatus},e.prototype.getSeverity=function(){return this.severity},e.prototype.getMessage=function(){return this.message},e.prototype.setMessage=function(e){this.message=e},e.prototype.getSource=function(){return this.source},e.prototype.getCode=function(){return this.code},e.prototype.setCode=function(e){this.code=e},e.prototype.isWarning=function(){return this.severity==e.WARNING},e.prototype.isError=function(){return this.severity==e.ERROR},e.prototype.isOk=function(){return this.severity===e.OK},e.prototype.isInfo=function(){return this.severity===e.INFO},e.prototype.setSource=function(e){this.source=e},e.prototype.toString=function(){return this.isOk()?"OK":this.message},e.prototype.getExtra=function(e){return this.takeNodeFromSource&&e==N.SOURCE_EXTRA&&this.source instanceof R?this.source.node():null},e.prototype.putExtra=function(e,t){},e.prototype.setInternalRange=function(e){this.internalRange=e},e.prototype.getInternalRange=function(){return this.internalRange},e.prototype.getInternalPath=function(){return this.internalPath},e.prototype.setInternalPath=function(e){this.internalPath=e},e.prototype.getFilePath=function(){return this.filePath},e.prototype.setFilePath=function(e){this.filePath=e},e.CODE_CONFLICTING_TYPE_KIND=4,e.CODE_INCORRECT_DISCRIMINATOR=t.messageRegistry.INCORRECT_DISCRIMINATOR,e.CODE_MISSING_DISCRIMINATOR=t.messageRegistry.MISSING_DISCRIMINATOR,e.ERROR=3,e.INFO=1,e.OK=0,e.WARNING=2,e}();t.Status=I,t.ok=r,t.SCHEMA_AND_TYPE=N.SCHEMA_AND_TYPE_EXTRA,t.GLOBAL=N.GLOBAL_EXTRA,t.TOPLEVEL=N.TOP_LEVEL_EXTRA,t.SOURCE_EXTRA=N.SOURCE_EXTRA;var b=function(e,n){for(var r="",i=e.message,a=0,o=i.indexOf("{{");o>=0;o=i.indexOf("{{",a)){if(r+=i.substring(a,o),a=i.indexOf("}}",o),a<0){a=o;break}o+="{{".length;var s=i.substring(o,a);a+="}}".length;var u=n[s];if(void 0===u)throw new Error(b(t.messageRegistry.MESSAGE_PARAMETER_NO_VALUE,{paramName:s}));r+=u}return r+=i.substring(a,i.length)};t.error=i;var R=function(){function e(e){this._inheritable=e,this._annotations=[]}return e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER_TypeInformation)},e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&T.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER_TypeInformation)},e.prototype.node=function(){return this._node},e.prototype.setNode=function(e){this._node=e},e.prototype.owner=function(){return this._owner},e.prototype.isInheritable=function(){return this._inheritable},e.prototype.validateSelf=function(e){var t=r();if(this.node()&&this.node().getMeta("skipValidation"))return t;for(var n=0,i=this._annotations;n=0;r=e.indexOf(".",r+1)){var i=e.substring(0,r),a=e.substr(r+1),o=t.library(i);if(o&&(n=this.getTypeByChainFromCollection(a,o)))return n}return null},e.prototype.types=function(){return this.typeList},e.prototype.typeMap=function(){return this._types},e.prototype.parent=function(){return this._parent},e.CLASS_IDENTIFIER_TypeRegistry="typesystem.TypeRegistry",e}();t.TypeRegistry=K;var j=function(){function e(){}return e.prototype.getInfos=function(e){if(e.getExtra("PInfos"))return e.getExtra("PInfos");var t={};return e.meta().forEach(function(e){if(e instanceof w.HasProperty){var n=e.value();t[n]={name:n,type:null}}}),e.meta().forEach(function(e){if(e instanceof w.PropertyIs){var n=e.propertyName();t[n]&&(t[n].type=e.value())}}),e.putExtra("PInfos",t),t},e.prototype.validate=function(e,t){var n=this,r=this.getInfos(e),i=!1;return Object.keys(r).forEach(function(e){i=i||n.validateInfo(r[e],t)}),i},e.prototype.validateInfo=function(e,t){var n=this;if(t.some(function(t){return t==e}))return!0;if(e.type instanceof ne){var r=e.type,i=!0;return r.options().forEach(function(r){n.validate(r,[e].concat(t))||(i=!1)}),i}return e.type.isArray()?void 0:this.validate(e.type,[e].concat(t))},e.prototype.validateType=function(e){var t=this,n=this.getInfos(e),r=[];return Object.keys(n).forEach(function(e){t.validateInfo(n[e],[])&&r.push(e)}),r},e}(),W=function(e){function n(n,r,i){var a=e.call(this,I.ERROR,t.messageRegistry.RESTRICTIONS_CONFLICT.code,null,i)||this;return a._conflicting=n,a._stack=r,a.source=i,a.computeMessage(),a}return _(n,e),n.prototype.computeMessage=function(){var e=null;if(null!=this._stack&&this._stack.getRestriction()instanceof w.MinMaxRestriction){var t=this._stack.getRestriction();e=this._conflicting.conflictMessage(t.facetPath(),t.value())}null==e&&(e=this._conflicting+" and "+(null!=this._stack?this._stack.getRestriction().toString():""));var n="";if(this.source instanceof q){for(var r=[],i=this._stack;i;){var a=i.getRestriction();if(a instanceof x.PropertyIs){var o={name:a.propId()};r.length>0&&(o.child=r[r.length-1]),r.push(o)}i=i.pop()}d(this,r.pop());var s=w.anotherRestrictionComponent();n=s?" between types '"+f(this.source)+"' and '"+f(s)+"'":" in type '"+f(this.source)+"'"}this.message="Restrictions conflict"+n+": "+e},n.prototype.getConflictDescription=function(){var e="";return e+="Restrictions coflict:\n",e+=this._stack.getRestriction()+" conflicts with "+this._conflicting+"\n",e+="at\n",e+=this._stack.pop()},n.prototype.getConflicting=function(){return this._conflicting},n.prototype.getStack=function(){return this._stack},n.prototype.toRestriction=function(){return new se(this._stack,this.message,this._conflicting)},n}(I);t.RestrictionsConflict=W;var H=0;t.VALIDATED_TYPE=null;var Y=function(){function e(e){if(w.MatchesProperty.isInstance(e)){this._matches=e;var t=this._matches.facetName();"propertyIs"==t?this.isProp=!0:"mapPropertyIs"==t?this.isMap=!0:"additionalProperties"==t&&(this.isAdditionalProp=!0)}else this.isFacet=!0,this._facetDecl=e}return e.prototype.name=function(){return this.isFacet?this._facetDecl.actualName():this._matches.path()},e.prototype.isPattern=function(){return this.isMap},e.prototype.isAdditional=function(){return this.isAdditionalProp},e.prototype.declaredAt=function(){return this.isFacet?this._facetDecl.owner():this._matches.owner()},e.prototype.range=function(){return this.isFacet?this._facetDecl.type():this._matches.range()},e.prototype.required=function(){return void 0!==this._required?this._required:this.isProp?!this.property().isOptional():this.isMap?!this.mapProperty().isOptional():!!this.isAdditionalProp&&!this.additionalProperty().isOptional()},e.prototype.setRequired=function(e){this._required=e},e.prototype.property=function(){return this.isProp?this._matches:null},e.prototype.mapProperty=function(){return this.isMap?this._matches:null},e.prototype.additionalProperty=function(){return this.isAdditionalProp?this._matches:null},e.prototype.annotations=function(){return this._matches?this._matches.annotations():[]},e}();t.PropertyInfo=Y;var q=function(){function e(e){this._name=e,this.metaInfo=[],this._subTypes=[],this.innerid=H++,this.extras={},this._locked=!1}return e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER_AbstractType)},e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&T.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER_AbstractType)},e.prototype.annotation=function(e){for(var t=0,n=this.annotations();t0&&c.forEach(function(e){var a=i(t.messageRegistry.CYCLIC_DEPENDENCY,n,{typeName:e});d(a,{name:e}),r.addSubStatus(a)})}if(this.supertypeAnnotations)for(var f=0;f0){var o=[];r.forEach(function(e){o.push(i(t.messageRegistry.INHERITING_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN,n,{typeName:e.value()}))}),o.forEach(function(t){return e.addSubStatus(t,"type")})}else e.addSubStatus(i(t.messageRegistry.INHERITING_UNKNOWN_TYPE,this),"type")}if(this.isUnion()){for(var s=this.typeFamily(),u=[],l=!1,p=!1,c=0,f=s;c0?(u=T.unique(u),u.length>0&&u.forEach(function(r){var a=r.value(),o=t.messageRegistry.UNION_OPTION_TYPE_DEPENDS_ON_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN;n.options().some(function(e){return e.name()==a})&&(o=t.messageRegistry.UNION_OPTION_TYPE_OPTION_IMPORTED_THROUGH_LIBRARY_CHAIN),e.addSubStatus(i(o,n,{typeName:a}),"type")})):e.addSubStatus(i(t.messageRegistry.UNKNOWN_UNION_OPTION,this),"type"))}if(this.isArray()){for(var m=this.familyWithArray(),y=this.getExtra(N.HAS_ITEMS)?"items":"type",v=[],l=!1,g=!1,A=0,_=m;A<_.length;A++){var h=_[A];h==this||h===t.RECURRENT?l=!0:h==t.UNKNOWN&&(g=!0),h.metaOfType(P.ImportedByChain).forEach(function(e){return v.push(e)})}if(l)e.addSubStatus(i(t.messageRegistry.RECURRENT_ARRAY_DEFINITION,this),y);else if(g){var S=this.oneMeta(k.ComponentShouldBeOfType).value().name();v.length>0?(v=T.unique(v),v.forEach(function(r){var a=S,o=t.messageRegistry.ARRAY_COMPONENT_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN;a?r.value()!=a&&(o=t.messageRegistry.ARRAY_COMPONENT_TYPE_DEPENDES_ON_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN,a=r.value()):S=r.value(),e.addSubStatus(i(o,n,{componentTypeName:S,typeName:a}),y)})):e.addSubStatus(i(t.messageRegistry.UNKNOWN_ARRAY_COMPONENT_TYPE,this,{componentTypeName:S}),y)}}var I=this.superTypes(),b=!1,R=!1;if(I.length>1&&I.forEach(function(e){e.isExternal()?b=!0:R=!0}),b&&R&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,this)),this instanceof ne){var M=this;M.options().forEach(function(r){r.isExternal()&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,n))})}if(this.isExternal()&&this.getExtra(N.HAS_FACETS)){var C=this.getExtra(N.HAS_FACETS);if(C.length){var w=C[C.length-1],L=i(t.messageRegistry.EXTERNAL_FACET,this,{name:w});d(L,{name:w}),e.addSubStatus(L)}}},e.prototype.familyWithArray=function(){if(this.oneMeta(P.SkipValidation))return[];var e=[];this.fillSuperTypes(e,!0);var t=this.oneMeta(k.ComponentShouldBeOfType);if(t){var n=t.value();n.oneMeta(P.SkipValidation)||(e=e.concat(n.familyWithArray().concat(n)))}return e},e.prototype.validateMeta=function(e){var t=new I(I.OK,"","",this);return this.declaredMeta().forEach(function(n){n.validateSelf(e).getErrors().forEach(function(e){return t.addSubStatus(e)})}),this.validateFacets(t),t},e.prototype.validateFacets=function(e){var n=this,r={},a={},o={};this.meta().forEach(function(e){if(e instanceof D.FacetDeclaration){var t=e;r[t.actualName()]=t,t.isOptional()||t.owner()!==n&&(o[t.actualName()]=t),t.owner()!=n&&(a[t.actualName()]=t)}}),this.declaredMeta().forEach(function(r){if(r instanceof D.FacetDeclaration){var o=r;if(o.owner()==n){var s=o.actualName();a.hasOwnProperty(s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_FACET,n,{name:s}));var u=L.getInstance().facetPrototypeWithName(s);(u&&u.isApplicable(n)||"type"==s||"properties"==o.facetName()||"schema"==s||"facets"==s||"uses"==s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_BUILTIN_FACET,n,{name:s})),"("==s.charAt(0)&&e.addSubStatus(i(t.messageRegistry.FACET_START_BRACKET,n,{name:s}))}}});var s={};this.meta().forEach(function(e){e instanceof x.PropertyIs&&(s[e.propId()]=!0)});for(var u=0,l=this.meta();u0&&e.addSubStatus(i(t.messageRegistry.MISSING_REQUIRED_FACETS,this,{facetsList:Object.keys(o).map(function(e){return"'"+e+"'"}).join(",")}))},e.prototype.allSuperTypes=function(){var e=[];return this.fillSuperTypes(e),e},e.prototype.fillSuperTypes=function(e,t){void 0===t&&(t=!1);for(var n=0,r=this.superTypes();n2)&&0==this.metaInfo.filter(function(e){return!B.NotScalar.isInstance(e)&&(P.DiscriminatorValue.isInstance(e)?e.isStrict():!P.SourceMap.isInstance(e)&&!P.ImportedByChain.isInstance(e))}).length)},e.prototype.isArray=function(){return this===t.ARRAY||this.allSuperTypes().indexOf(t.ARRAY)!=-1},e.prototype.propertySet=function(){var e=[];return this.meta().forEach(function(t){if(t instanceof x.PropertyIs){var n=t;e.push(n.propertyName())}}),T.uniq(e)},e.prototype.checkConfluent=function(){if(this.oneMeta(P.SkipValidation))return r();if(this.computeConfluent)return r();this.computeConfluent=!0;var e=w.anotherRestrictionComponentsCount();try{var t=w.optimize(this.restrictions()),n=T.find(t,function(e){return e instanceof ae});if(n){var i=null,a=null;if(n instanceof se){var o=n;i=o.getStack(),a=o.another()}var s=new W(a,i,this);return s}return r()}finally{this.computeConfluent=!1,w.releaseAnotherRestrictionComponent(e)}},e.prototype.isObject=function(){return this==t.OBJECT||T.some(this.allSuperTypes(),function(e){return e.isObject()})},e.prototype.isExternal=function(){return this==t.EXTERNAL||this.allSuperTypes().indexOf(t.EXTERNAL)!=-1},e.prototype.isBoolean=function(){return this==t.BOOLEAN||this.allSuperTypes().indexOf(t.BOOLEAN)!=-1},e.prototype.isString=function(){return this==t.STRING||this.allSuperTypes().indexOf(t.STRING)!=-1},e.prototype.isNumber=function(){return this==t.NUMBER||this.allSuperTypes().indexOf(t.NUMBER)!=-1},e.prototype.isFile=function(){return this==t.FILE||this.allSuperTypes().indexOf(t.FILE)!=-1},e.prototype.isScalar=function(){return this==t.SCALAR||this.allSuperTypes().indexOf(t.SCALAR)!=-1},e.prototype.isDateTime=function(){return this==t.DATETIME||this.allSuperTypes().indexOf(t.DATETIME)!=-1},e.prototype.isDateOnly=function(){return this==t.DATE_ONLY||this.allSuperTypes().indexOf(t.DATE_ONLY)!=-1},e.prototype.isTimeOnly=function(){return this==t.TIME_ONLY||this.allSuperTypes().indexOf(t.TIME_ONLY)!=-1},e.prototype.isInteger=function(){return this==t.INTEGER||this.allSuperTypes().indexOf(t.INTEGER)!=-1},e.prototype.isDateTimeOnly=function(){return this==t.DATETIME_ONLY||this.allSuperTypes().indexOf(t.DATETIME_ONLY)!=-1},e.prototype.isUnknown=function(){return this==t.UNKNOWN||this.allSuperTypes().indexOf(t.UNKNOWN)!=-1},e.prototype.isRecurrent=function(){return this==t.RECURRENT||this.allSuperTypes().indexOf(t.RECURRENT)!=-1},e.prototype.isBuiltin=function(){return this.metaInfo.indexOf(Q)!=-1},e.prototype.exampleObject=function(){return F.example(this)},e.prototype.isPolymorphic=function(){return this.meta().some(function(e){return e instanceof X})},e.prototype.restrictions=function(e){if(void 0===e&&(e=!1),this.isUnion()){var t=[];return this.superTypes().forEach(function(e){t=t.concat(e.restrictions())}),t=t.concat(this.meta().filter(function(e){return e instanceof C}))}var n=[],r=null;return this.meta().forEach(function(t){if(t instanceof C){if(t instanceof ue&&e){if(r)return;r=t}n.push(t)}}),n},e.prototype.customFacets=function(){return this.declaredMeta().filter(function(e){return e instanceof P.CustomFacet})},e.prototype.allCustomFacets=function(){return this.meta().filter(function(e){return e instanceof P.CustomFacet})},e.prototype.isUnion=function(){var e=!1;return!this.isBuiltin()&&(this.allSuperTypes().forEach(function(t){return e=e||t instanceof ne}),e)},e.prototype.isIntersection=function(){var e=!1;return!this.isBuiltin()&&(this.allSuperTypes().forEach(function(t){return e=e||t instanceof re}),e)},e.prototype.meta=function(){return[].concat(this.metaInfo)},e.prototype.validateDirect=function(e,n,r,a){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===a&&(a=null);var s=t.VALIDATED_TYPE;try{var u=t.autoCloseFlag;n&&(t.autoCloseFlag=!0),t.VALIDATED_TYPE=this;var l=new I(I.OK,"","",this);if(!(r||null!==e&&void 0!==e||this.nullable)){var p=null;return this.restrictions(!0).forEach(function(e){if(e instanceof le){if(p)return;p=e}}),p?i(t.messageRegistry.TYPE_EXPECTED,p,{expectedType:p.value(),actualType:"null"}):i(t.messageRegistry.OBJECT_EXPECTED,this)}if(this.restrictions(!0).forEach(function(t){return l.addSubStatus(t.check(e,a))}),(n||t.autoCloseFlag)&&this.isObject()&&!this.oneMeta(O.KnownPropertyRestriction)){var c=new O.KnownPropertyRestriction(!1);c.patchOwner(this),c.check(e).getErrors().forEach(function(e){var t=new I(I.WARNING,e.getCode(),e.getMessage(),o);d(t,e.getValidationPath()),l.addSubStatus(t)})}}finally{t.autoCloseFlag=u,t.VALIDATED_TYPE=s}return l},e.prototype.validate=function(e,n,a){void 0===n&&(n=!1),void 0===a&&(a=!0);var o=t.autoCloseFlag;if(!(a||null!==e&&void 0!==e||this.nullable))return i(t.messageRegistry.NULL_NOT_ALLOWED,this);n&&(t.autoCloseFlag=!0);try{var s=[],u=T.find([this].concat(this.allSuperTypes()),function(e){return e.getExtra(t.GLOBAL)}),l=this.allSubTypes().concat(this);u&&u!=this&&(l=l.concat(u.allSubTypes()),l.push(u));for(var p,c=0,f=l;c1;){var i=!1;e:for(var a=0;a0?t[0].value().label()+"[]":e.prototype.label.call(this)},n.prototype.contextMeta=function(){return this._contextMeta},n.prototype.setContextMeta=function(e){this._contextMeta=e},n.prototype.patch=function(e){var n=this;for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r]);this.metaInfo.filter(function(t){return t._owner===e}).forEach(function(e){return e._owner=n});for(var i=0;i=0)&&(this._superTypes[i]=t.RECURRENT)}},n.CLASS_IDENTIFIER_InheritedType="typesystem.InheritedType",n}(q);t.InheritedType=ee;var te=function(e){function t(t,n){var r=e.call(this,t)||this;return r._options=n,r}return _(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_DerivedType)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&T.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_DerivedType)},t.prototype.cloneWithFilter=function(e,t){var n=this.clone(),r=[];return t&&(n._options=this.options().map(function(e){return t(e)})),this.metaInfo.forEach(function(t){var i=e(t,n);"boolean"==typeof i?i&&r.push(t):i&&r.push(i)}),n.metaInfo=r,n},t.prototype.allOptions=function(){var e=this,t=[];return this._options.forEach(function(n){n.kind()==e.kind()?t=t.concat(n.allOptions()):t.push(n)}),T.unique(t)},t.prototype.options=function(){return this._options},t.CLASS_IDENTIFIER_DerivedType="typesystem.DerivedType",t}(q);t.DerivedType=te;var ne=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.options().forEach(function(e){e.nullable&&(r.nullable=!0)}),r}return _(n,e),n.prototype.getClassIdentifier=function(){var t=e.prototype.getClassIdentifier.call(this);return t.concat(n.CLASS_IDENTIFIER_UnionType)},n.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&T.contains(e.getClassIdentifier(),n.CLASS_IDENTIFIER_UnionType)},n.prototype.kind=function(){return"union"},n.prototype.clone=function(){return new n(this.name(),this.options())},n.prototype.isSubTypeOf=function(e){var t=!0;return this.allOptions().forEach(function(n){n.isSubTypeOf(e)||(t=!1)}),t},n.prototype.validate=function(e){return this.validateDirect(e)},n.prototype.typeFamily=function(){var e=[];return this.allOptions().forEach(function(t){e=e.concat(t.typeFamily())}),e},n.prototype.knownProperties=function(){var e=this.metaOfType(V.MatchesProperty);return this.options().forEach(function(t){e=e.concat(t.knownProperties())}),e},n.prototype.validateDirect=function(e,t){void 0===t&&(t=!1);var n=new I(I.OK,"","",this);return this.restrictions().forEach(function(t){return n.addSubStatus(t.check(e,null))}),n},n.prototype.isUnion=function(){return!0},n.prototype.isObject=function(){return T.all(this.allOptions(),function(e){return e.isObject()})},n.prototype.restrictions=function(){return[new he(this.allOptions().map(function(e){return new de(e.restrictions())}),t.messageRegistry.UNION_TYPE_FAILURE,t.messageRegistry.UNION_TYPE_FAILURE_DETAILS)]},n.prototype.label=function(){return this.options().map(function(e){return e.label()}).join("|")},n.CLASS_IDENTIFIER_UnionType="typesystem.UnionType",n}(te);t.UnionType=ne;var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_IntersectionType)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&T.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_IntersectionType)},t.prototype.kind=function(){return"intersection"},t.prototype.clone=function(){return new t(this.name(),this.options())},t.prototype.restrictions=function(){var e=[];return this.allOptions().forEach(function(t){t.oneMeta(P.SkipValidation)||(e=e.concat(t.restrictions()))}),[new de(e)]},t.prototype.label=function(){return this.options().map(function(e){return e.label()}).join("&")},t.prototype.isIntersection=function(){return!0},t.CLASS_IDENTIFIER_IntersectionType="typesystem.IntersectionType",t}(te);t.IntersectionType=re;var ie=new K;t.builtInRegistry=a,t.union=o,t.intersect=s,t.derive=u,t.deriveObjectType=l;var ae=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return _(n,e),n.prototype.check=function(e){return null===e||void 0===e?r():i(t.messageRegistry.NOTHING,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"nothing"},n.prototype.value=function(){return"!!!"},n}(C);t.NothingRestriction=ae;var oe=function(){function e(e,t,n){this._previous=e,this._restriction=t,this.id=n}return e.prototype.getRestriction=function(){return this._restriction},e.prototype.pop=function(){return this._previous},e.prototype.push=function(t){return new e(this,t,t.toString())},e}();t.RestrictionStackEntry=oe;var se=function(e){function t(t,n,r){var i=e.call(this)||this;return i._entry=t,i._message=n,i._another=r,i}return _(t,e),t.prototype.getMessage=function(){return this._message},t.prototype.getStack=function(){return this._entry},t.prototype.another=function(){return this._another},t}(ae);t.NothingRestrictionWithLocation=se;var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_GenericTypeOf)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&T.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_GenericTypeOf)},t.CLASS_IDENTIFIER_GenericTypeOf="typesystem.GenericTypeOf",t}(C);t.GenericTypeOf=ue;var le=function(e){function n(t){var n=e.call(this)||this;return n.val=t,n}return _(n,e),n.prototype.check=function(e){var n=typeof e;return null===e||void 0===e?r():(Array.isArray(e)&&(n="array"),n===this.val?r():i(t.messageRegistry.TYPE_EXPECTED,this,{expectedType:this.val,actualType:n}))},n.prototype.value=function(){return this.val},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"typeOf"},n.prototype.composeWith=function(e){if(e instanceof n){var t=e;return t.val==this.val?this:this.nothing(e)}return null},n.prototype.toString=function(){return"should be of type "+this.val},n}(ue);t.TypeOfRestriction=le;var pe=function(e){function n(){return e.call(this)||this}return _(n,e),n.prototype.check=function(e){return"number"==typeof e&&c(e)?r():i(t.messageRegistry.INTEGER_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.value=function(){return!0},n.prototype.facetName=function(){return"should be integer"},n}(ue);t.IntegerRestriction=pe;var ce=function(e){function n(){return e.call(this,"nil")||this}return _(n,e),n.prototype.check=function(e){return null===e||void 0==e||"null"===e?r():i(t.messageRegistry.NULL_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"should be nil"},n}(le);t.NullRestriction=ce;var fe=function(e){function n(){return e.call(this)||this}return _(n,e),n.prototype.check=function(e){return e?"number"==typeof e||"boolean"==typeof e||"string"==typeof e?r():i(t.messageRegistry.SCALAR_EXPECTED,this):r()},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return t.messageRegistry.SHOULD_BE_SCALAR.message},n.prototype.value=function(){return!0},n}(ue);t.ScalarRestriction=fe;var he=function(e){function n(t,n,r){var i=e.call(this)||this;return i.val=t,i._extraMessage=n,i._extraOptionMessage=r,i}return _(n,e),n.prototype.check=function(e,t){for(var n=this,a=new I(I.OK,"","",this),o=[],s=0;s0){for(var l=0,p=o;l=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){var e=this;return this._annotations||(this._annotations=this._type.meta().filter(function(e){return e.kind()==N.MetaInformationKind.Annotation}).map(function(t){return new Te(t,e.reg)})),this._annotations},e.prototype.value=function(){return Ee.storeAsJSON(this._type)},e.prototype.name=function(){return this._type.name()},e.prototype.entry=function(){return this._type},e}();t.AnnotatedType=_e;var Te=function(){function e(e,t){this.actual=e}return e.prototype.name=function(){return this.actual.facetName()},e.prototype.value=function(){return this.actual.value()},e.prototype.definition=function(){var e=ie.get(this.actual.facetName());return e},e.prototype.annotation=function(){return this.actual},e}();t.AnnotationInstance=Te,t.applyAnnotationValidationPlugins=y,t.applyTypeValidationPlugins=v,t.toValidationPath=A,t.isUnknown=E},function(e,t,n){var r,i;(function(e,n){!function(){var a="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=a._,s=Array.prototype,u=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,p=s.push,c=s.slice,f=u.toString,h=u.hasOwnProperty,d=Array.isArray,m=Object.keys,y=Object.create,v=function(){},g=function(e){return e instanceof g?e:this instanceof g?void(this._wrapped=e):new g(e)};"undefined"==typeof t||t.nodeType?a._=g:("undefined"!=typeof n&&!n.nodeType&&n.exports&&(t=n.exports=g),t._=g),g.VERSION="1.9.1";var A,E=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return g.iteratee!==A?g.iteratee(e,t):null==e?g.identity:g.isFunction(e)?E(e,t,n):g.isObject(e)&&!g.isArray(e)?g.matcher(e):g.property(e)};g.iteratee=A=function(e,t){return _(e,t,1/0)};var T=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i=0&&t<=R};g.each=g.forEach=function(e,t,n){t=E(t,n);var r,i;if(C(e))for(r=0,i=e.length;r0?0:o-1;for(i||(r=t[a?a[s]:s],s+=e);s>=0&&s=3;return t(e,E(n,i,4),r,a)}};g.reduce=g.foldl=g.inject=w(1),g.reduceRight=g.foldr=w(-1),g.find=g.detect=function(e,t,n){var r=C(e)?g.findIndex:g.findKey,i=r(e,t,n);if(void 0!==i&&i!==-1)return e[i]},g.filter=g.select=function(e,t,n){var r=[];return t=_(t,n),g.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},g.reject=function(e,t,n){return g.filter(e,g.negate(_(t)),n)},g.every=g.all=function(e,t,n){t=_(t,n);for(var r=!C(e)&&g.keys(e),i=(r||e).length,a=0;a=0},g.invoke=T(function(e,t,n){var r,i;return g.isFunction(t)?i=t:g.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),g.map(e,function(e){var a=i;if(!a){if(r&&r.length&&(e=b(e,r)),null==e)return;a=e[t]}return null==a?a:a.apply(e,n)})}),g.pluck=function(e,t){return g.map(e,g.property(t))},g.where=function(e,t){return g.filter(e,g.matcher(t))},g.findWhere=function(e,t){return g.find(e,g.matcher(t))},g.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sa&&(a=r)}else t=_(t,n),g.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},g.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sr||void 0===n)return 1;if(n0?0:i-1;a>=0&&a0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(c.call(r,o,s),g.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&at?(r&&(clearTimeout(r),r=null),s=l,o=e.apply(i,a),r||(i=a=null)):r||n.trailing===!1||(r=setTimeout(u,p)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l},g.debounce=function(e,t,n){var r,i,a=function(t,n){r=null,n&&(i=e.apply(t,n))},o=T(function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,t),s&&(i=e.apply(this,o))}else r=g.delay(a,t,this,o);return i});return o.cancel=function(){clearTimeout(r),r=null},o},g.wrap=function(e,t){return g.partial(t,e)},g.negate=function(e){return function(){return!e.apply(this,arguments)}},g.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},g.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},g.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},g.once=g.partial(g.before,2),g.restArguments=T;var k=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=F.length,r=e.constructor,i=g.isFunction(r)&&r.prototype||u,a="constructor";for(I(e,a)&&!g.contains(t,a)&&t.push(a);n--;)a=F[n],a in e&&e[a]!==i[a]&&!g.contains(t,a)&&t.push(a)};g.keys=function(e){if(!g.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)I(e,n)&&t.push(n);return k&&B(e,t),t},g.allKeys=function(e){if(!g.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&B(e,t),t},g.values=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=E(r,t[1])),t=g.allKeys(e)):(r=K,t=O(t,!1,!1),e=Object(e));for(var i=0,a=t.length;i1&&(n=t[1])):(t=g.map(O(t,!1,!1),String),r=function(e,n){return!g.contains(t,n)}),g.pick(e,r,n)}),g.defaults=V(g.allKeys,!0),g.create=function(e,t){var n=S(e);return t&&g.extendOwn(n,t),n},g.clone=function(e){return g.isObject(e)?g.isArray(e)?e.slice():g.extend({},e):e},g.tap=function(e,t){return t(e),e},g.isMatch=function(e,t){var n=g.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a":">",'"':""","'":"'","`":"`"},q=g.invert(Y),G=function(e){var t=function(t){return e[t]},n="(?:"+g.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};g.escape=G(Y),g.unescape=G(q),g.result=function(e,t,n){g.isArray(t)||(t=[t]);var r=t.length;if(!r)return g.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var z=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+$[e]};g.template=function(e,t,n){!t&&n&&(t=n),t=g.defaults({},t,g.templateSettings);var r=RegExp([(t.escape||z).source,(t.interpolate||z).source,(t.evaluate||z).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(J,Q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";var o;try{o=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return o.call(this,e,g)},u=t.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},g.chain=function(e){var t=g(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?g(t).chain():t};g.mixin=function(e){return g.each(g.functions(e),function(t){var n=g[t]=e[t];g.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),Z(this,n.apply(g,e))}}),g},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];g.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),g.each(["concat","join","slice"],function(e){var t=s[e];g.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return String(this._wrapped)},r=[],i=function(){return g}.apply(t,r),!(void 0!==i&&(n.exports=i))}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){(function(e){"use strict";function r(e){var t=null!=e.rootPath&&"function"==typeof e.rootPath,n=null!=e.isWebPath&&"function"==typeof e.isWebPath,r=null!=e.relativePath&&"function"==typeof e.relativePath;return t&&n&&r}function i(e){if(null==e||0==e.trim().length)return e;var t="https://".length;if(e.length>=t&&"https://"==e.substring(0,t))return e;e=e.replace("//","__/DOUBLESLASH/__"),e=e.replace(/^([a-zA-Z]):/,"$1__/COLON/__");var n="https://__/APPENDED_PROTOCOL/__";return"/"!=e.charAt(0)&&(n+="/"),n+e}function a(e){if(null==e||0==e.trim().length)return e;var t="https://__/APPENDED_PROTOCOL/__",n=t.length;return e.length0&&"/"==e.charAt(0)&&(e=e.substring(1)),e=e.replace("__/DOUBLESLASH/__","//").replace("__/COLON/__",":"))}function o(e,t){var n=k(t,e),r=!!M&&P.getValue(n);if(r&&r.provider)return r;var i=new D(e,t);return P.setValue(n,i),i}function s(e,t){var n=(k(t,e),!!M&&P.getValue(e));if(n)return n;var r=new x(e,t);return M&&P.setValue(e,r),r}function u(e,t){var n=e&&e.trim().length>0&&"{"==e.trim().charAt(0),r=k(t,e),i=!!M&&P.getValue(r);if(i)return i;try{var a=new D(e,t);return M&&P.setValue(r,a),a}catch(i){if(M&&T.ValidationError.isInstance(i)&&n)return P.setValue(r,i),i;try{var a=new x(e,t);return P.setValue(r,a),a}catch(e){if(M){var o=new T.ValidationError(S.messageRegistry.CAN_NOT_PARSE_SCHEMA);return P.setValue(r,o),o}}}}function l(e,t){for(var n=e.getElementsByTagNameNS("*",t),r=[],i=0;i0&&(n+=":");for(var r=e.getElementsByTagName(n+t),i=[],a=0;a",c);f<0&&(f=c);var h=u.substring(l,f),d=u.substring(c,p).trim(),m=d.indexOf(":");try{var y=parseInt(d.substring(0,m))-1,v=parseInt(d.substring(m+1,d.length))-1,g=n+" '"+h+"'",A=new T.ValidationError(i,{msg:g});return A.internalRange={start:{line:y,column:v,position:null},end:{line:y,column:v+h.length,position:null}},A}catch(e){}}return new T.ValidationError(S.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:e})}function h(e,t,n){if(!n||"string"!=typeof n)return null;t=t||N(e,{verbose:!0}),"#"==n.charAt(0)&&(n=n.substring(1)),"/"==n.charAt(0)&&(n=n.substring(1));var r=t;if(n.length>0)for(var i=n.split("/"),a=0,o=i;aC&&this.last;){var r=this.last.key;delete this.errors[r],this.size-=r.length,this.last=this.last.next}},e}(),P=new w;e.cleanCache=function(){P=new w};var L=function(){function e(){}return e.prototype.contextPath=function(){return""},e.prototype.normalizePath=function(e){return""},e.prototype.content=function(e){return""},e.prototype.hasAsyncRequests=function(){return!1},e.prototype.resolvePath=function(e,t){return""},e.prototype.isAbsolutePath=function(e){return!1},e.prototype.contentAsync=function(e){var t=this;return{then:function(n){return n(t.content(e))},resolve:function(){return null}}},e.prototype.promiseResolve=function(e){return{then:function(t){return t(e)},resolve:function(){return null}}},e}(),O=function(e,t,n){return"__EXAMPLE_"+(""+e).trim()+t.trim()+n},D=function(){function e(e,t){if(this.schema=e,this.provider=t,this.customErrors=[],this.EXAMPLE_ERROR_ENTRY=S.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,this.SCHEMA_ERROR_ENTRY=S.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,t?this.provider=t:this.provider=new L,!e||0==e.trim().length||"{"!=e.trim().charAt(0))throw new T.ValidationError(S.messageRegistry.INVALID_JSON_SCHEMA);m(e,!1);var r=JSON.parse(e);if(r){try{var i=n(73),a=this.provider.contextPath();this.setupId(r,a),this.updateGraph(r,a);var o=""+r.$schema;o.indexOf("http://json-schema.org/draft-04/")==-1?(this.customErrors=(new I.Draft3Validator).validate(e),r=i.v4(r)):this.fixRequired(r)}catch(e){if(T.ValidationError.isInstance(e))throw e;throw new T.ValidationError(S.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:e.message})}delete r.$schema,this.jsonSchema=r}}return e.prototype.fixRequired=function(e){},e.prototype.getType=function(){return"source.json"},e.prototype.validateObject=function(e){this.validate(JSON.stringify(e))},e.prototype.getMissingReferences=function(e,t){var n=this;void 0===t&&(t=!1);var r=[],i=E.getValidator();e.forEach(function(e){return i.setRemoteReference(e.reference,e.content||{})});var a=null;if(this.jsonSchema.id&&"string"==typeof this.jsonSchema.id){a=this.jsonSchema.id;var o=a.indexOf("#");o!=-1&&(a=a.substr(0,o))}try{i.validateSchema(this.jsonSchema)}catch(e){return[]}var r=i.getMissingRemoteReferences(),s=[];return r&&(s=g.filter(r,function(e){return!i.isResourceLoaded(e)&&e!=a})),t?s.map(function(e){return n.provider.normalizePath(e)}):s},e.prototype.getSchemaPath=function(e,t){if(void 0===t&&(t=!1),!e)return"";if(!e.id)return"";var n=e.id.trim();if(n.lastIndexOf("#")!==n.length-1)return n;var r=n.substr(0,n.length-1);return t?this.provider.normalizePath(r):r},e.prototype.patchSchema=function(e){var t=this;if(!e)return e;if(!e.id)return e;var n=e.id.trim();n.lastIndexOf("#")!==n.length-1&&(n+="#",e.id=n);var r=n.substr(0,n.length-1);if(!this.provider.isAbsolutePath(r))return e;r=this.provider.normalizePath(r);var a=[];this.collectRefContainers(e,a),a.forEach(function(e){var n=e.$ref;if("string"==typeof n&&0!==n.indexOf("#")){n.indexOf("#")===-1&&(n+="#");var a;a=t.provider.isAbsolutePath(n)?i(n):t.provider.resolvePath(r,n),e.$ref=a}})},e.prototype.removeFragmentPartOfIDs=function(e){var t=this;if(e){if(Array.isArray(e))return void e.forEach(function(e){return t.removeFragmentPartOfIDs(e)});if("object"==typeof e){var n=e.id;if(n&&"string"==typeof e.id){var r=n.indexOf("#");r>=0&&(n=n.substring(0,r).trim(),n?e.id=n:delete e.id)}Object.keys(e).forEach(function(n){return t.removeFragmentPartOfIDs(e[n])})}}},e.prototype.collectRefContainers=function(e,t){var n=this;Object.keys(e).forEach(function(r){return"$ref"===r?void t.push(e):void(e[r]&&"object"==typeof e[r]&&n.collectRefContainers(e[r],t))})},e.prototype.validate=function(e,t){var r=this;void 0===t&&(t=[]);var i=O(e,this.schema,this.provider.contextPath()),o=P.getValue(i);if(o){if(o instanceof Error)throw o}else{var s=O("__SCHEMA_VALIDATION__",this.schema,this.provider.contextPath()),u=P.getValue(s);if(u&&u instanceof Error){if(T.ValidationError.isInstance(u)){var l=u,p=new T.ValidationError(l.messageEntry,l.parameters);p.filePath=l.filePath,p.additionalErrors=l.additionalErrors,p.internalPath=l.internalPath,p.isWarning=l.isWarning,u=p}throw u}if(0==t.length&&(m(e,!0),this.jsonSchema.id)){var c=this.jsonSchema.id;if("#"==c.charAt(c.length-1)){var f=c.substring(0,c.length-1);t.push({reference:f,content:this.jsonSchema})}}var h=JSON.parse(e),d=E.getValidator();t.forEach(function(e){return d.setRemoteReference(e.reference,e.content)}),d.validate(h,this.jsonSchema);var y=d.getMissingRemoteReferences().filter(function(e){return!g.find(t,function(t){return e===t.reference})});if(!y||0===y.length)return void this.acceptErrors(i,d.getLastErrors(),e,!0);var v=[];y.forEach(function(e){var t,o=a(e),s={reference:e};try{var u=n(73),l=r.provider.content(o);m(l,!0);var p=JSON.parse(l),c=r.provider.normalizePath(o);r.setupId(p,c),r.updateGraph(p,c),t=u.v4(p),delete t.$schema,s.content=t}catch(e){if(T.ValidationError.isInstance(e))throw e.filePath=o,P.setValue(i,e),e;s.error=e}finally{v.push(s)}}),this.provider.hasAsyncRequests()||(v.forEach(function(e){t.push(e)}),this.validate(e,t))}},e.checkIfNonObjectAssignmentFailure=function(e){var t="__$validated",n="called on non-object";if(!e)return null;if(e.indexOf(t)!=-1){var r="Cannot assign to read only property '__$validated' of ",i="Cannot create property '__$validated' on string '";return 0==e.indexOf(r)&&e.length>r.length?e.substr(r.length,e.length-r.length):0==e.indexOf(i)&&e.length>i.length+1&&"'"==e.charAt(e.length-1)?e.substr(i.length,e.length-i.length-1):""}return e.indexOf(n)!=-1?"":null},e.prototype.validateSelf=function(t){var r=this;void 0===t&&(t=[]);var i=O("__SCHEMA_VALIDATION__",this.schema,this.provider.contextPath()),o=P.getValue(i);if(o){if(o instanceof Error)throw o}else{var s=E.getValidator();t.forEach(function(e){return s.setRemoteReference(e.reference,e.content)});try{delete this.jsonSchema.id,s.validateSchema(this.jsonSchema)}catch(t){var u=e.checkIfNonObjectAssignmentFailure(t.message);if(null!==u){var l=u,p="Assignment to non-object.";l&&(p="Unexpected value '"+l+"'"),this.acceptErrors(i,[{message:p,params:[]}],null,!0,!0)}throw t}var c=s.getMissingRemoteReferences().filter(function(e){return!g.find(t,function(t){return e===t.reference})});if(!c||0===c.length)return void this.acceptErrors(i,s.getLastErrors(),null,!0,!0);var f=[];c.forEach(function(e,t){if(!(t>0)){var o,s=a(e),u={reference:e};try{var l=n(73),p=r.provider.content(s);m(p,!0);var c=JSON.parse(p),h=r.provider.normalizePath(s);r.setupId(c,h),r.updateGraph(c,h),o=l.v4(c),delete o.$schema,u.content=o}catch(e){if(T.ValidationError.isInstance(e))throw e.filePath=s,P.setValue(i,e),e;u.error=e}finally{f.push(u)}}}),this.provider.hasAsyncRequests()||(f.forEach(function(e){t.push(e)}),this.validateSelf(t))}},e.prototype.setupId=function(e,t){t&&e&&(this.removeFragmentPartOfIDs(e),e.id&&(this.provider.isAbsolutePath(e.id)||(e.id=this.provider.resolvePath(t,e.id))),e.id=t.replace(/\\/g,"/"),"#"!=e.id.charAt(e.id.length-1)&&(e.id=e.id+"#"),e.id=i(e.id),this.patchSchema(e))},e.prototype.acceptErrors=function(t,n,r,i,a){var o=this;void 0===i&&(i=!1),void 0===a&&(a=!1);var s=null!=r,u=null!=r?r:this.schema;if(n&&n.length>0||null==r&&this.customErrors.length>0){n=n||[];var l=N(u,{verbose:!0}),p=n.map(function(t){var n,i=s&&e.EXAMPLE_ERROR_CODES[t.code];n=i?o.EXAMPLE_ERROR_ENTRY:o.SCHEMA_ERROR_ENTRY;var p=new T.ValidationError(n,{msg:t.message});return(i||null==r)&&(p.internalRange=h(u,l,t.path)),p.isWarning=a,p.error=t,p.internalPath=t.path,p});null==r&&this.customErrors.forEach(function(e){var t=new T.ValidationError(e.entry,e.params);t.internalRange=e.range,t.isWarning=e.isWarning,t.error=e,t.internalPath=e.path,p.push(t)});var c=p[0];if(c.additionalErrors=p.slice(1),P.setValue(t,c),i)throw c}else P.setValue(t,1)},e.prototype.contentAsync=function(e){var t,r=this,i=a(e),o=n(73),s=this.provider.contentAsync(i);if(!s)return this.provider.promiseResolve({reference:i,content:null,error:new T.ValidationError(S.messageRegistry.REFERENCE_NOT_FOUND,{ref:i})});var u=s.then(function(n){var a={reference:e};try{m(n,!0);var s=JSON.parse(n),u=r.provider.normalizePath(i);r.setupId(s,u),r.updateGraph(s,u),t=o.v4(s),delete t.$schema,a.content=t}catch(e){throw a.error=e,a.reference=i,e}return a});return u},e.prototype.updateGraph=function(e,t){t.indexOf("#")<0&&(t+="#"),this.graph||(this.graph=new j(t));var n=this.graph.addNode(e,t);if(n){if(r(this.provider)){var i=this.provider,a=i.rootPath(),o=a.length;n=n.map(function(e){var t=e.trim();return i.isWebPath(t)?i.isWebPath(a)&&t.length>=o&&t.substring(0,o)==a&&(t=t.substring(o)):t=i.relativePath(a,t).replace(/\\/g,"/"),t.length&&"#"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t})}var s=new T.ValidationError(S.messageRegistry.CIRCULAR_REFS_IN_JSON_SCHEMA_DETAILS,{cycle:n.join(" -> ")});throw s}},e.SCHEMA_ERROR_CODES={KEYWORD_TYPE_EXPECTED:!0,KEYWORD_MUST_BE:!0,KEYWORD_DEPENDENCY:!0,KEYWORD_PATTERN:!0,KEYWORD_UNDEFINED_STRICT:!0,KEYWORD_VALUE_TYPE:!0,CUSTOM_MODE_FORCE_PROPERTIES:!0,UNKNOWN_FORMAT:!0,PARENT_SCHEMA_VALIDATION_FAILED:!0,REF_UNRESOLVED:!0,KEYWORD_UNEXPECTED:!0,SCHEMA_NOT_AN_OBJECT:!0,SCHEMA_NOT_REACHABLE:!0,UNRESOLVABLE_REFERENCE:!0},e.EXAMPLE_ERROR_CODES={MULTIPLE_OF:!0,MAXIMUM:!0,MAXIMUM_EXCLUSIVE:!0,MAX_LENGTH:!0,MIN_LENGTH:!0,PATTERN:!0,ARRAY_ADDITIONAL_ITEMS:!0,ARRAY_LENGTH_LONG:!0,ARRAY_LENGTH_SHORT:!0,ARRAY_UNIQUE:!0,OBJECT_PROPERTIES_MAXIMUM:!0,OBJECT_PROPERTIES_MINIMUM:!0,OBJECT_MISSING_REQUIRED_PROPERTY:!0,OBJECT_ADDITIONAL_PROPERTIES:!0,OBJECT_DEPENDENCY_KEY:!0,ENUM_MISMATCH:!0,ANY_OF_MISSING:!0,ONE_OF_MISSING:!0,ONE_OF_MULTIPLE:!0,NOT_PASSED:!0,INVALID_FORMAT:!0,UNKNOWN_FORMAT:!0,INVALID_TYPE:!0},e}();t.JSONSchemaObject=D;var U=10,x=function(){function e(e,t){if(this.schema=e,this.provider=t,this.extraElementData=null,this.references={},this.contentToResult={},t||(this.provider=new L),"<"!=e.charAt(0))throw new T.ValidationError(S.messageRegistry.INVALID_XML_SCHEMA);this.schemaString=this.handleReferenceElement(e)}return e.prototype.getType=function(){return"text.xml"},e.prototype.validateObject=function(e){if(this.extraElementData){var t=Object.keys(e)[0],n=new T.ValidationError(S.messageRegistry.EXTERNAL_TYPE_ERROR,{typeName:this.extraElementData.requestedName,objectName:t});if(!this.extraElementData.type&&!this.extraElementData.originalName)return void this.acceptErrors("key",[n],!0);if(this.extraElementData.originalName&&t!==this.extraElementData.originalName)return void this.acceptErrors("key",[n],!0);if(this.extraElementData.type){var r=e[t];delete e[t],e[this.extraElementData.name]=r}}this.validate(A.jsonToXml(e))},e.prototype.collectReferences=function(e,t,n){var r,i=this;r=new _(R).parseFromString(e);var a=p(r,"schema",this.namspacePrefix)[0],o=l(a,"import"),s=l(a,"include"),u=o.concat(s);return u.forEach(function(e){var r=e.getAttribute("schemaLocation");if(r){var a=i.provider.resolvePath(t,r),o=n[a];if(!o){var s,u=Object.keys(n).length,l=i.provider.content(a);try{s=i.collectReferences(l,a,n)}catch(e){s=l}o=A.createXmlSchemaReference(a,u,s),n[a]=o}e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd")}}),r.toString()},e.prototype.getMissingReferences=function(){var e,t=this;e=new _(R).parseFromString(this.schemaString);var n=p(e,"schema",this.namspacePrefix)[0],r=p(n,"import",this.namspacePrefix),i=p(n,"include",this.namspacePrefix),a=r.concat(i),o=[];return a.forEach(function(e){var n=e.getAttribute("schemaLocation");if(n){var r=t.provider.resolvePath(t.provider.contextPath(),n); +o.push(r)}}),o},e.prototype.collectReferencesAsync=function(e,t,n){var r,i=this;r=new _(R).parseFromString(e);var a=p(r,"schema",this.namspacePrefix)[0],o=l(a,"import"),s=l(a,"include"),u=o.concat(s);return Promise.all(u.map(function(e){var r=e.getAttribute("schemaLocation");if(r){var a=i.provider.resolvePath(t,r),o=n[a];return o?(e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd"),{}):i.provider.contentAsync(a).then(function(t){return i.collectReferencesAsync(t,a,n).then(function(e){return e},function(e){return t}).then(function(t){var r=Object.keys(n).length;return o=A.createXmlSchemaReference(a,r,t),n[a]=o,e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd"),{}})})}return{}})).then(function(e){return Promise.resolve(r.toString())})},e.prototype.loadSchemaReferencesAsync=function(){return this.collectReferencesAsync(this.schemaString,this.provider.contextPath(),{})},e.prototype.validate=function(e){try{var t=this.contentToResult[e];if(t===!1)return;if(t)throw t;var n={},r=this.collectReferences(this.schemaString,this.provider.contextPath(),n),i=A.getValidator(r);if(this.provider.hasAsyncRequests())return;var a=i.validate(e,Object.keys(n).map(function(e){return n[e]}));this.acceptErrors("key",a,!0),this.contentToResult[e]=!1,Object.keys(this.contentToResult).length>U&&(this.contentToResult={})}catch(t){throw this.contentToResult[e]=t,t}},e.prototype.handleReferenceElement=function(e){var t=new _(R).parseFromString(e);this.namspacePrefix=c(t);var n=p(t,"schema",this.namspacePrefix)[0],r=p(n,"element",this.namspacePrefix),i=g.find(r,function(e){return"true"===e.getAttribute("extraelement")});if(!i)return e;var a={};return a.name=i.getAttribute("name"),a.type=i.getAttribute("type"),a.originalName=i.getAttribute("originalname"),a.requestedName=i.getAttribute("requestedname"),a.type||n.removeChild(i),i.removeAttribute("originalname"),i.removeAttribute("requestedname"),i.removeAttribute("extraelement"),this.extraElementData=a,t.toString()},e.prototype.acceptErrors=function(e,t,n){if(void 0===n&&(n=!1),t&&t.length>0){var r=t.map(function(e){return e.message}).join(", "),i=new T.ValidationError(S.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,{msg:r});if(i.errors=t,P.setValue(e,i),n)throw i}else;},e}();t.XMLSchemaObject=x,t.getJSONSchema=o;var k=function(e,t){var n="";e&&(n=e.contextPath());var r="__SCHEMA_"+(""+t).trim()+n.trim();return r};t.getXMLSchema=s,t.createSchema=u;var F="Cannot tokenize symbol",B="Unexpected token";t.messageToValidationError=f,t.getJSONRange=h,t.tryParseJSON=m;var V=function(){function e(e){this.segments=e}return e.prototype.length=function(){return this.segments.length},e}(),K=function(){function e(e){this.url=e,this.processed=!1,this.refFromRoot=new V([]),this.refsOut={},this.referees={}}return e}(),j=function(){function e(e){this.rootPath=e,this.nodes={}}return e.prototype.node=function(e){return this.nodes[e]},e.prototype.addNode=function(e,t){var n=this.nodes[t];if(n){if(n.processed)return}else n=new K(t),this.nodes[t]=n;for(var r=y(e),i=Object.keys(n.referees).map(function(e){return n.referees[e]}),a=null,o=function(e){var r=n.referees[e];r&&(a=[s.rootPath].concat(r.refFromRoot.segments).concat(r.refsOut[t].segments).concat([e]));var o=s.nodes[e];o||(o=new K(e),o.refFromRoot=new V(n.refFromRoot.segments.concat([e])),s.nodes[e]=o);for(var u=i.filter(function(e){return!o.referees[e.url]}),l=0,p=u;l"}function a(e){return new l(e)}function o(e){var t=e&&Object.keys(e)[0];if(t){var n=e[t];s(n)}return i(e)}function s(e){if(e&&"string"!=typeof e){var t=[];Object.keys(e).forEach(function(n){if("$"!=n)if(0===n.indexOf("@")){var r={key:n,value:e[n]};t.push(r)}else if(u(e[n])){var i=e[n];i.forEach(function(e){return s(e)})}else"string"!=typeof e[n]&&s(e[n])}),e.$||(e.$={});var n=e.$;t.forEach(function(t){delete e[t.key];var r=t.key.substring(1);n[r]=t.value})}}function u(e){return!!e&&("object"==typeof e&&"number"==typeof e.length)}Object.defineProperty(t,"__esModule",{value:!0});var l,p=n(63);try{l=n(64).XMLValidator}catch(e){}if(!l){var c=function(){function e(e){}return e.prototype.validate=function(e,t){return[]},e}();l=c}t.createXmlSchemaReference=r,t.getValidator=a,t.jsonToXml=o},function(e,t){/*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe * Copyright(c) 2015 Tiancheng "Timothy" Gu * MIT Licensed */ -"use strict";function n(e){var t=""+e,n=r.exec(t);if(!n)return t;var i,a="",o=0,s=0;for(o=n.index;o]/;e.exports=n},function(e,t){if("undefined"==typeof __WEBPACK_EXTERNAL_MODULE_64__){var n=new Error('Cannot find module "RAML.XmlValidation"');throw n.code="MODULE_NOT_FOUND",n}e.exports=__WEBPACK_EXTERNAL_MODULE_64__},function(e,t,n){"use strict";function r(){return new i}Object.defineProperty(t,"__esModule",{value:!0});var i;try{i=n(66).JSONValidator}catch(e){}if(!i){var a=function(){function e(){}return e.prototype.setRemoteReference=function(e,t){},e.prototype.validateSchema=function(e){},e.prototype.getMissingRemoteReferences=function(){return[]},e.prototype.isResourceLoaded=function(e){return!0},e.prototype.validate=function(e,t){},e.prototype.getLastErrors=function(){return[]},e}();i=a}t.getValidator=r},function(e,t){if("undefined"==typeof __WEBPACK_EXTERNAL_MODULE_66__){var n=new Error('Cannot find module "RAML.JsonValidation"');throw n.code="MODULE_NOT_FOUND",n}e.exports=__WEBPACK_EXTERNAL_MODULE_66__},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(e,t,n){function r(t){var r=e[t];!r&&o&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+s(n))}||function(){}}if(!e){if(t instanceof a)return t;e=t}var i={},o=e instanceof Function;return n=n||{},r("warning"),r("error"),r("fatalError"),i}function a(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function u(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function l(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new p,o=n.domBuilder||new a,s=n.errorHandler,u=n.locator,l=n.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=i(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(c.nbsp=" ",c.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,c):r.errorHandler.error("invalid doc source"),o.doc},a.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;l(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function d(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?h(parseInt(t.substr(1).replace("x","0x"))):(l.error("entity not found:"+e),e)}function m(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,d);E&&y(S),r.characters(n,0,t-S),S=t}}function y(t,n){for(;t>=g&&(n=A.exec(e));)v=n.index,g=v+n[0].length,E.lineNumber++;E.columnNumber=t-v+1}for(var v=0,g=0,A=/.*(?:\r\n?|\n)|.*$/g,E=r.locator,T=[{currentNSMap:t}],_={},S=0;;){try{var N=e.indexOf("<",S);if(N<0){if(!e.substr(S).match(/^\s*$/)){var I=r.doc,b=I.createTextNode(e.substr(S));I.appendChild(b),r.currentElement=b}return}switch(N>S&&m(N),e.charAt(N+1)){case"/":var M=e.indexOf(">",N+3),R=e.substring(N+2,M),C=T.pop();M<0?(R=e.substring(N+2).replace(/[\s<].*/,""),l.error("end tag name: "+R+" is not complete:"+C.tagName),M=N+1+R.length):R.match(/\sS?S=M:m(Math.max(N,S)+1)}}function i(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function a(e,t,n,r,i,a){for(var o,s,u=++t,l=g;;){var p=e.charAt(u);switch(p){case"=":if(l===A)o=e.slice(t,u),l=T;else{if(l!==E)throw new Error("attribute equal must after attrName");l=T}break;case"'":case'"':if(l===T||l===A){if(l===A&&(a.warning('attribute value must after "="'),o=e.slice(t,u)),t=u+1,u=e.indexOf(p,t),!(u>0))throw new Error("attribute value no end '"+p+"' match");s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t-1),l=S}else{if(l!=_)throw new Error('attribute value must after "="');s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t),a.warning('attribute "'+o+'" missed start quot('+p+")!!"),t=u+1,l=S}break;case"/":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:l=I,n.closed=!0;case _:case A:case E:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),l==g&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:break;case _:case A:s=e.slice(t,u),"/"===s.slice(-1)&&(n.closed=!0,s=s.slice(0,-1));case E:l===E&&(s=o),l==_?(a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead!!'),n.add(s,s,t));break;case T:throw new Error("attribute value missed!!")}return u;case"€":p=" ";default:if(p<=" ")switch(l){case g:n.setTagName(e.slice(t,u)),l=N;break;case A:o=e.slice(t,u),l=E;break;case _:var s=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s,t);case S:l=N}else switch(l){case E:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),n.add(o,o,t),t=u,l=A;break;case S:a.warning('attribute space is required"'+o+'"!!');case N:l=A,t=u;break;case T:l=_,t=u;break;case I:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function o(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],s=o.qName,u=o.value,p=s.indexOf(":");if(p>0)var c=o.prefix=s.slice(0,p),f=s.slice(p+1),h="xmlns"===c&&f;else f=s,c=null,h="xmlns"===s&&"";o.localName=f,h!==!1&&(null==i&&(i={},l(n,n={})),n[h]=i[h]=u,o.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(var a=e.length;a--;){o=e[a];var c=o.prefix;c&&("xml"===c&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(o.uri=n[c||""]))}var p=r.indexOf(":");p>0?(c=e.prefix=r.slice(0,p),f=e.localName=r.slice(p+1)):(c=null,f=e.localName=r);var d=e.uri=n[c||""];if(t.startElement(d,f,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(d,f,r),i)for(c in i)t.endPrefixMapping(c)}function s(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function u(e,t,n,r){var i=r[n];return null==i&&(i=e.lastIndexOf(""),i",t+4);return a>t?(n.comment(e,t+4,a-t-4),a+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,a-t-9),n.endCDATA(),a+3}var o=d(e,t),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var u=o[1][0],l=s>3&&/^public$/i.test(o[2][0])&&o[3][0],p=s>4&&o[4][0],c=o[s-1];return n.startDTD(u,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),p&&p.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function c(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function f(e){}function h(e,t){return e.__proto__=t,e}function d(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var m=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=new RegExp("[\\-\\.0-9"+m.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),v=new RegExp("^"+m.source+y.source+"*(?::"+m.source+y.source+"*)?$"),g=0,A=1,E=2,T=3,_=4,S=5,N=6,I=7;n.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),l(t,t={}),r(e,t,n,i,this.errorHandler),i.endDocument()}},f.prototype={setTagName:function(e){if(!v.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!v.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},h({},h.prototype)instanceof h||(h=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),t.XMLReader=n},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){function r(){}var i=e.prototype;if(Object.create){var a=Object.create(t.prototype);i.__proto__=a}i instanceof t||(r.prototype=t.prototype,r=new r,n(i,r),e.prototype=i=r),i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function i(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ie[e]),this.message=ie[e],Error.captureStackTrace&&Error.captureStackTrace(this,i);return n.code=e,t&&(this.message=this.message+": "+t),n}function a(){}function o(e,t){this._node=e,this._refresh=t,s(this)}function s(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);K(e,"length",r.length),n(r,e),e._inc=t}}function u(){}function l(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function p(e,t,n,r){if(r?t[l(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&g(i,e,r),v(i,e,n))}}function c(e,t,n){var r=l(t,n);if(!(r>=0))throw i(oe,new Error(e.tagName+"@"+n));for(var a=t.length-1;r"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function m(e,t){if(t(e))return!0;if(e=e.firstChild)do if(m(e,t))return!0;while(e=e.nextSibling)}function y(){}function v(e,t,n){e&&e._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function g(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete t._nsMap[n.prefix?n.localName:""]}function A(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function E(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,A(e.ownerDocument,e),t}function T(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var o=n?n.previousSibling:e.lastChild;i.previousSibling=o,a.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do i.parentNode=e;while(i!==a&&(i=i.nextSibling));return A(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function _(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,A(e.ownerDocument,e,t),t}function S(){this._nsMap={}}function N(){}function I(){}function b(){}function M(){}function R(){}function C(){}function w(){}function P(){}function L(){}function O(){}function D(){}function U(){}function x(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,a=r.namespaceURI;if(a&&null==i){var i=r.lookupPrefix(a);if(null==i)var o=[{namespace:a,prefix:null}]}return F(this,n,e,t,o),n.join("")}function k(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix==r)return o.namespace!=i}return!0}function F(e,t,n,r,i){if(r){if(e=r(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Y:i||(i=[]);var a=(i.length,e.attributes),o=a.length,s=e.firstChild,u=e.tagName;n=W===e.namespaceURI||n,t.push("<",u);for(var l=0;l"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,i),s=s.nextSibling;else for(;s;)F(s,t,n,r,i),s=s.nextSibling;t.push("")}else t.push("/>");return;case Z:case te:for(var s=e.firstChild;s;)F(s,t,n,r,i),s=s.nextSibling;return;case q:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,d),'"');case G:return t.push(e.data.replace(/[<&]/g,d));case X:return t.push("");case Q:return t.push("");case ee:var m=e.publicId,y=e.systemId;if(t.push("');else if(y&&"."!=y)t.push(' SYSTEM "',y,'">');else{var v=e.internalSubset;v&&t.push(" [",v,"]"),t.push(">")}return;case J:return t.push("");case z:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function B(e,t,n){var r;switch(t.nodeType){case Y:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case q:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(B(e,i,n)),i=i.nextSibling;return r}function V(e,t,n){var r=new t.constructor;for(var i in t){var o=t[i];"object"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new a),r.ownerDocument=e,r.nodeType){case Y:var s=t.attributes,l=r.attributes=new u,p=s.length;l._ownerElement=r;for(var c=0;c0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},n(H,h),n(H,h.prototype),y.prototype={nodeName:"#document",nodeType:Z,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==Y&&(this.documentElement=e),T(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),E(this,e)},importNode:function(e,t){return B(this,e,t)},getElementById:function(e){var t=null;return m(this.documentElement,function(n){if(n.nodeType==Y&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new S;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new a;var n=t.attributes=new u;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new O;return e.ownerDocument=this,e.childNodes=new a,e},createTextNode:function(e){var t=new b;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new M;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new R;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new D;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new N;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new L;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new S,r=t.split(":"),i=n.attributes=new u;return n.childNodes=new a,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new N,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(y,h),S.prototype={nodeType:Y,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):_(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new o(this,function(t){var n=[];return m(t,function(r){r===t||r.nodeType!=Y||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new o(this,function(n){var r=[];return m(n,function(i){i===n||i.nodeType!==Y||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},y.prototype.getElementsByTagName=S.prototype.getElementsByTagName,y.prototype.getElementsByTagNameNS=S.prototype.getElementsByTagNameNS,r(S,h),N.prototype.nodeType=q,r(N,h),I.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ie[ae])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},r(I,h),b.prototype={nodeName:"#text",nodeType:G,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(b,I),M.prototype={nodeName:"#comment",nodeType:Q},r(M,I),R.prototype={nodeName:"#cdata-section",nodeType:X},r(R,I),C.prototype.nodeType=ee,r(C,h),w.prototype.nodeType=ne,r(w,h),P.prototype.nodeType=$,r(P,h),L.prototype.nodeType=z,r(L,h),O.prototype.nodeName="#document-fragment",O.prototype.nodeType=te,r(O,h),D.prototype.nodeType=J,r(D,h),U.prototype.serializeToString=function(e,t,n){return x.call(e,t,n)},h.prototype.toString=x;try{Object.defineProperty&&(Object.defineProperty(o.prototype,"length",{get:function(){return s(this),this.$$length}}),Object.defineProperty(h.prototype,"textContent",{get:function(){return j(this)},set:function(e){switch(this.nodeType){case Y:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),K=function(e,t,n){e["$$"+t]=n})}catch(e){}t.DOMImplementation=f,t.XMLSerializer=U},function(e,t,n){var r,i,a;!function(n,o){i=[e],r=o,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a))}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t,n){var r=e.split(/\n|\r\n?|\f/),i=r[t-1],a=new Array(n).join(" ")+"^";return i+"\n"+a}function a(e){return e>="1"&&e<="9"}function o(e){return e>="0"&&e<="9"}function s(e){return o(e)||e>="a"&&e<="f"||e>="A"&&e<="F"}function u(e){return"e"===e||"E"===e}function l(e,t,n,r){var i=e.charAt(t);if("\r"===i)t++,n++,r=1,"\n"===e.charAt(t)&&t++;else if("\n"===i)t++,n++,r=1;else{if("\t"!==i&&" "!==i)return null;t++,r++}return{index:t,line:n,column:r}}function p(e,t,n,r){var i=e.charAt(t);return i in M?{type:M[i],line:n,column:r+1,index:t+1,value:null}:null}function c(e,t,n,r){for(var i in R)if(R.hasOwnProperty(i)&&e.substr(t,i.length)===i){var a=R[i],o=a.type,s=a.value;return{type:o,line:n,column:r+i.length,index:t+i.length,value:s}}return null}function f(e,t,n,r){for(var i=t,a="",o=C._START_;t0?{type:b.NUMBER,line:n,column:r+s-i,index:s,value:parseFloat(e.substring(i,s))}:null}function d(e,t){for(var n=1,r=1,i=0,a=[];i at "+t+":"+n}},I={cannotTokenizeSymbol:function(e,t,n){return"Cannot tokenize symbol <"+e+"> at "+t+":"+n}},b={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10},M={"{":b.LEFT_BRACE,"}":b.RIGHT_BRACE,"[":b.LEFT_BRACKET,"]":b.RIGHT_BRACKET,":":b.COLON,",":b.COMMA},R={true:{type:b.TRUE,value:!0},false:{type:b.FALSE,value:!1},null:{type:b.NULL,value:null}},C={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},w={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},P={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7},L=[b.STRING,b.NUMBER,b.TRUE,b.FALSE,b.NULL],O={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},D={_START_:0,KEY:1,COLON:2},U={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},x={verbose:!0,source:null},k=function(e,t){t=E({},x,t);var n=d(e,t);0===n.length&&S(N.unexpectedEnd());var r=A(e,n,0,t);if(r.index===n.length)return r.value;var i=n[r.index];S(N.unexpectedToken(e.substring(i.loc.start.offset,i.loc.end.offset),i.loc.start.line,i.loc.start.column),e,i.loc.start.line,i.loc.start.column)};e.exports=k})},function(e,t,n){(function(){function t(e,t){Array.isArray(e)||(e=[e]);for(var n=!!t,r=[],i=0;i0?b[b.length-1]:null}function i(e){for(var t;e;)t=e.owner(),e=t instanceof c.InheritedType?t.contextMeta():null;b.push(t)}function a(e){for(void 0===e&&(e=0);b.length>e;)b.pop()}function o(){return b.length}function s(e){e=e.map(function(e){return e.preoptimize()});var t=[];e.forEach(function(e){if(e instanceof y.AndRestriction){var n=e;n.options().forEach(function(e){t.push(e)})}else t.push(e)});for(var n=!0;n;){n=!1;for(var r=0;r0?s.forEach(function(e){var n=h.LIBRARY_CHAINIG_IN_FACET_TYPE,i=o.name();e.value()!=i&&(n=h.LIBRARY_CHAINIG_IN_FACET_TYPE_SUPERTYPE,i=e.value());var a=c.error(n,r,{propName:t,typeName:i});l.push(a)}):(f=c.error(h.UNKNOWN_IN_FACET_DEFINITION,r,{facetName:t,msg:o.name()}),l.push(f)):s.length>0?s.forEach(function(e){var n=h.LIBRARY_CHAINIG_IN_PROPERTY_TYPE,i=o.name();e.value()!=i&&(n=h.LIBRARY_CHAINIG_IN_PROPERTY_TYPE_SUPERTYPE,i=e.value());var a=c.error(n,r,{propName:t,typeName:i});l.push(a)}):(f=c.error(h.UNKNOWN_IN_PROPERTY_DEFINITION,r,{propName:t,typeName:o.name()}),l.push(f)),l.forEach(function(e){return c.setValidationPath(e,{name:t,child:{name:"type"}})}),1==l.length)return l[0];var p=c.ok();return l.forEach(function(e){return p.addSubStatus(e)}),p}if(e.isSubTypeOf(c.RECURRENT))return f=c.error(h.CYCLIC_DEPENDENCY,r,{typeName:e.name()});if(e.isAnonymous()){var f=e.validateType(n);if(!f.isOk()){var d;return d=i?c.error(h.ERROR_IN_FACET_RANGE,r,{facetName:t,msg:f.getMessage()}):c.error(h.ERROR_IN_RANGE,r,{propName:t,msg:f.getMessage()}),f.getErrors().forEach(function(e){d.addSubStatus(e)}),c.setValidationPath(d,{name:t}),d}return f}if(e.isUnion()){var y=m.find(e.typeFamily(),function(e){return c.isUnknown(e)});if(y){var a=void 0;return a=i?c.error(h.UNKNOWN_IN_FACET_DEFINITION,r,{facetName:t,msg:y.name()}):c.error(h.UNKNOWN_IN_PROPERTY_DEFINITION,r,{propName:t,typeName:y.name()}),c.setValidationPath(a,{name:t}),a}}return c.ok()}var p=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var c=n(58),f=n(75),h=c.messageRegistry,d=n(60),m=n(59),y=n(58),v=n(58),g=n(76),A=n(76),E=n(76),T=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return r._type=t,r.optional=n,r}return p(t,e),t.prototype.matches=function(e){return!1},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_MatchesProperty)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_MatchesProperty)},t.prototype.check=function(e,t){throw new Error(h.SHOULD_BE_NEVER_CALLED.message)},t.prototype.patchPath=function(e,t){if(e){for(var n=e,r=null,i=null;n;)if(r){var a={name:n.name};i.child=a,n=n.child,i=a}else r={name:n.name},i=r;return r.child={name:t},r}return{name:t}},t.prototype.validateProp=function(e,t,n,r){var i=e[t],a=n.validate(i,!1,!1);if(!a.isOk()){if(n.isUnknown()||n.isRecurrent()){var o=c.error(h.VALIDATING_AGAINST_UNKNOWN,this,{typeName:n.name()});return c.setValidationPath(o,this.patchPath(r,t)),o}var o=new v.Status(v.Status.OK,"","",this);return a.getErrors().forEach(function(e){return o.addSubStatus(e)}),c.setValidationPath(o,this.patchPath(r,t)),o}return c.ok()},t.prototype.validateSelfIndividual=function(e,t){return l(this._type,this.propId(),t,this,!1)},t.prototype.range=function(){return this._type},t.prototype.isOptional=function(){return this.optional},t.CLASS_IDENTIFIER_MatchesProperty="restrictions.MatchesProperty",t}(c.Constraint);t.MatchesProperty=T;var _=function(e){function t(t,n){var r=e.call(this)||this;return r._value=t,r.provider=n,r}return p(t,e),t.prototype.value=function(){return this._value},t.prototype.check=function(e){var t=null,n=this.value();if("{"==n.charAt(0))try{t=d.getJSONSchema(n,this.provider)}catch(e){if(c.ValidationError.isInstance(e)){var r=e,i=r.isWarning?c.Status.WARNING:c.Status.ERROR,a=c.error(r.messageEntry,this,r.parameters,i,r.parameters);return a}return c.error(h.INCORRECT_SCHEMA,this,{msg:e.message})}if("<"==n.charAt(0))try{t=d.getXMLSchema(n,this.provider)}catch(e){return c.ok()}if(t)try{"string"==typeof e?t.validate(e):t.validateObject(e)}catch(e){if(c.ValidationError.isInstance(e)){var r=e,o=c.Status.ERROR;r.isWarning&&(o=c.Status.WARNING);var s=c.error(r.messageEntry,this,r.parameters,o);if(s.setInternalRange(r.internalRange),s.setInternalPath(c.toValidationPath(r.internalPath)),s.setFilePath(r.filePath),!r.additionalErrors||0==r.additionalErrors.length)return s;var u=c.ok();u.addSubStatus(s);for(var l=0,p=r.additionalErrors;l0)&&i.length>0){var a=new c.Status(c.Status.OK,"","",this);return i.forEach(function(e){var n=c.error(h.UNKNOWN_PROPERTY,t,{propName:e});c.setValidationPath(n,{name:e}),a.addSubStatus(n)}),a}}return c.ok()},t.prototype.composeWith=function(e){if(!this._value)return null;if(e instanceof t){var n=e;if(m.isEqual(this.owner().propertySet(),n.owner().propertySet()))return n}if(e instanceof N){var r=e,i=r.value(),a=this.owner().propertySet();if(a.indexOf(i)==-1)return this.nothing(r)}},t.CLASS_IDENTIFIER_KnownPropertyRestriction="typesystem.KnownPropertyRestriction",t}(c.Constraint);t.KnownPropertyRestriction=S;var N=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n}return p(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_HasProperty)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_HasProperty)},t.prototype.check=function(e){return e&&"object"==typeof e&&!Array.isArray(e)?e.hasOwnProperty(this.name)?c.ok():c.error(h.REQUIRED_PROPERTY_MISSING,this,{propName:this.name}):c.ok()},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.facetName=function(){return"hasProperty"},t.prototype.value=function(){return this.name},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.name===this.name)return this}return null},t.CLASS_IDENTIFIER_HasProperty="restrictions.HasProperty",t}(c.Constraint);t.HasProperty=N;var I=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,n,r)||this;return i.name=t,i.type=n,i}return p(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_PropertyIs)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_PropertyIs)},t.prototype.matches=function(e){ -return e===this.name},t.prototype.path=function(){return this.name},t.prototype.check=function(e,t){if(e&&"object"==typeof e&&e.hasOwnProperty(this.name)){var n=this.validateProp(e,this.name,this.type,t);return n}return c.ok()},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.propId=function(){return this.name},t.prototype.propertyName=function(){return this.name},t.prototype.facetName=function(){return"propertyIs"},t.prototype.value=function(){return this.type},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.name===this.name){if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;i(e);var r=this.intersect(this.type,n.type);try{var a=r.checkConfluent();if(!a.isOk()){var o=a;return o.toRestriction()}return new t(this.name,r)}finally{this.release(r)}}}return null},t.CLASS_IDENTIFIER_PropertyIs="restrictions.PropertyIs",t}(T);t.PropertyIs=I;var b=[];t.anotherRestrictionComponent=r,t.releaseAnotherRestrictionComponent=a,t.anotherRestrictionComponentsCount=o;var M=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,n,r)||this;return i.regexp=t,i.type=n,i}return p(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_MapPropertyIs)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_MapPropertyIs)},t.prototype.path=function(){return"/"+this.regexp+"/"},t.prototype.matches=function(e){return!!e.match(this.regexp)},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.propId=function(){return"["+this.regexp+"]"},t.prototype.facetName=function(){return"mapPropertyIs"},t.prototype.value=function(){return this.type},t.prototype.regexpValue=function(){return this.regexp},t.prototype.validateSelfIndividual=function(t,n){var r=this.checkValue();return r?c.error(h.INVALID_REGEXP,this,{msg:r}):e.prototype.validateSelfIndividual.call(this,t,n)},t.prototype.checkValue=function(){try{new RegExp(this.regexp)}catch(e){return e.message}return null},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.regexp===this.regexp){if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){var a=i;return a.toRestriction()}return new t(this.regexp,r)}finally{this.release(r)}}}return null},t.prototype.check=function(e,t){if(e&&"object"==typeof e){var n={};null!=this._owner&&this._owner.meta().filter(function(e){return e instanceof I}).forEach(function(e){n[e.propertyName()]=!0});for(var r=new c.Status(c.Status.OK,"","",this),i=0,a=Object.getOwnPropertyNames(e);i0){var i=(this.owner(),m.find(this.requiredTypes(),function(e){return n.checkOwner(e)}));i&&(r=!0)}else r=!0;var a;if(r)a=this.checkValue();else{var o=this.requiredType().name();this.requiredTypes()&&this.requiredTypes().length>0&&(o="["+this.requiredTypes().map(function(e){return e.name()}).join()+"]");var a=c.error(h.FACET_USAGE_RESTRICTION,this,{facetName:this.facetName(),typeNames:o})}if(a&&!a.isOk())return c.setValidationPath(a,{name:this.facetName()}),a;var s=[e,a].filter(function(e){return e&&!e.isOk()});if(0==s.length)return c.ok();if(1==s.length)return s[0];for(var u=c.ok(),l=0,p=s;lt)return this.createError();return c.ok()},t.prototype.createError=function(){return new v.Status(v.Status.ERROR,h.MINMAX_RESTRICTION_VIOLATION.code,this.toString(),this)},t.prototype.minValue=function(){return this._isInt?0:Number.NEGATIVE_INFINITY},t.prototype.requiredType=function(){return this._requiredType},t.prototype.checkValue=function(){return"number"!=typeof this._value?c.error(h.FACET_REQUIRE_NUMBER,this,{facetName:this.facetName()},c.Status.ERROR,!0):this.isIntConstraint()&&!new f.BigNumber(this.value().toString()).isInteger()?c.error(h.FACET_REQUIRE_INTEGER,this,{facetName:this.facetName()},c.Status.ERROR,!0):this.value()n.value()?n:this:this.value()this.value())return this.nothing(e)}else if(n.value()0)i.forEach(function(t){var r=n.type.name(),i=null,a=h.ARRAY_COMPONENT_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN;t.value()!=i&&(a=h.ARRAY_COMPONENT_TYPE_DEPENDES_ON_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN,i=t.value()),e.addSubStatus(c.error(a,n,{componentTypeName:r,typeName:i}))});else if(this.type.isExternal()){var a=c.error(h.EXTERNAL_AS_COMPONENT,this);a.setValidationPath({name:"items"}),e.addSubStatus(a)}else if(c.isUnknown(this.type)||this.type.isSubTypeOf(c.RECURRENT))e.addSubStatus(c.error(h.UNKNOWN_ARRAY_COMPONENT_TYPE,this,{componentTypeName:this.type.name()}));else if(this.type.isUnion()){var o=m.find(this.type.typeFamily(),function(e){return c.isUnknown(e)});o&&e.addSubStatus(c.error(h.UNKNOWN_ARRAY_COMPONENT_TYPE,this,{componentTypeName:o.name()}))}return e},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){var a=i;return a.toRestriction()}return new t(r)}finally{this.release(r)}}return null},t.prototype.checkValue=function(){return null},t.prototype.value=function(){return this.type},t}(C);t.ComponentShouldBeOfType=K;var j=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return p(t,e),t.prototype.facetName=function(){return"pattern"},t.prototype.requiredType=function(){return c.STRING},t.prototype.check=function(e){if("string"==typeof e){var t=e;try{var n=t.match(this._value),r=!1;if(n)for(var i=0,a=n;i0?new t(r):this.nothing(e,h.NO_COMMON_FILE_TYPES.message)}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){if(!Array.isArray(this._value))return c.error(h.FILE_TYPES_SHOULD_BE_AN_ARRAY,this);for(var e=0,t=this._value;e0){var t=this.owner(),n=m.find(this.requiredTypes(),function(e){return t.isSubTypeOf(e)});if(!n){var r="["+this.requiredTypes().map(function(e){return"'"+e.name()+"'"}).join(", ")+"]";return c.error(h.ENUM_OWNER_TYPES,this,{typeNames:r},c.Status.ERROR,!0)}}if(!Array.isArray(this._value))return c.error(h.ENUM_ARRAY,this,{},c.Status.ERROR,!0);var i=c.ok();this.checkStatus=!0;try{this._value.forEach(function(t,n){var r=e.owner().validate(t);r.isOk()||(c.setValidationPath(r,{name:n}),i.addSubStatus(r))})}finally{this.checkStatus=!1}return i},t.prototype.toString=function(){var e=Array.isArray(this._value)?this._value.map(function(e){return"'"+e+"'"}).join(", "):"'"+this._value+"'";return"value should be one of: "+e},t}(C);t.Enum=Y,t.optimize=s,t.validatePropertyType=l},function(e,t,n){var r;!function(i){"use strict";function a(e){function t(e,r){var i,a,o,s,u,l,p=this;if(!(p instanceof t))return W&&w(26,"constructor call without new",e),new t(e,r);if(null!=r&&H(r,2,64,D,"base")){if(r|=0,l=e+"",10==r)return p=new t(e instanceof t?e:l),P(p,k+p.e+1,F);if((s="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(i="["+_.slice(0,r)+"]+")+"(?:\\."+i+")?$",r<37?"i":"").test(l))return O(p,l,s,r);s?(p.s=1/e<0?(l=l.slice(1),-1):1,W&&l.replace(/^0\.0*|\./,"").length>15&&w(D,T,e),s=!1):p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1,l=n(l,10,r,p.s)}else{if(e instanceof t)return p.s=e.s,p.e=e.e,p.c=(e=e.c)?e.slice():e,void(D=0);if((s="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,o=e;o>=10;o/=10,a++);return p.e=a,p.c=[e],void(D=0)}l=e+""}else{if(!y.test(l=e+""))return O(p,l,s);p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1}}for((a=l.indexOf("."))>-1&&(l=l.replace(".","")),(o=l.search(/e/i))>0?(a<0&&(a=o),a+=+l.slice(o+1),l=l.substring(0,o)):a<0&&(a=l.length),o=0;48===l.charCodeAt(o);o++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(o,u+1))if(u=l.length,s&&W&&u>15&&(e>I||e!==g(e))&&w(D,T,p.s*e),a=a-o-1,a>j)p.c=p.e=null;else if(a=0&&(u=G,G=0,e=e.replace(".",""),d=new t(r),p=d.pow(e.length-m),G=u,d.c=c(h(s(p.c),p.e),10,n),d.e=d.c.length),f=c(e,r,n),o=u=f.length;0==f[--u];f.pop());if(!f[0])return"0";if(m<0?--o:(p.c=f,p.e=o,p.s=i,p=L(p,d,y,v,n),f=p.c,l=p.r,o=p.e),a=o+y+1,m=f[a],u=n/2,l=l||a<0||null!=f[a+1],l=v<4?(null!=m||l)&&(0==v||v==(p.s<0?3:2)):m>u||m==u&&(4==v||l||6==v&&1&f[a-1]||v==(p.s<0?8:7)),a<1||!f[0])e=l?h("1",-y):"0";else{if(f.length=a,l)for(--n;++f[--a]>n;)f[a]=0,a||(++o,f=[1].concat(f));for(u=f.length;!f[--u];);for(m=0,e="";m<=u;e+=_.charAt(f[m++]));e=h(e,o)}return e}function r(e,n,r,i){var a,o,u,l,p;if(r=null!=r&&H(r,0,8,i,E)?0|r:F,!e.c)return e.toString();if(a=e.c[0],u=e.e,null==n)p=s(e.c),p=19==i||24==i&&u<=B?f(p,u):h(p,u);else if(e=P(new t(e),n,r),o=e.e,p=s(e.c),l=p.length,19==i||24==i&&(n<=o||o<=B)){for(;ll){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=o-l,n>0)for(o+1==l&&(p+=".");n--;p+="0");return e.s<0&&a?"-"+p:p}function i(e,n){var r,i,a=0;for(p(e[0])&&(e=e[0]),r=new t(e[0]);++an||e!=d(e))&&w(r,(i||"decimal places")+(en?" out of range":" not an integer"),e),!0}function C(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*N-1)>j?e.c=e.e=null:n=10;s/=10,i++);if(a=t-i,a<0)a+=N,o=t,u=c[l=0],p=u/f[i-o-1]%10|0;else if(l=v((a+1)/N),l>=c.length){if(!r)break e;for(;c.length<=l;c.push(0));u=p=0,i=1,a%=N,o=a-N+1}else{for(u=s=c[l],i=1;s>=10;s/=10,i++);a%=N,o=a-N+i,p=o<0?0:u/f[i-o-1]%10|0}if(r=r||t<0||null!=c[l+1]||(o<0?u:u%f[i-o-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(a>0?o>0?u/f[i-o]:0:c[l-1])%10&1||n==(e.s<0?8:7)),t<1||!c[0])return c.length=0,r?(t-=e.e+1,c[0]=f[(N-t%N)%N],e.e=-t||0):c[0]=e.e=0,e;if(0==a?(c.length=l,s=1,l--):(c.length=l+1,s=f[N-a],c[l]=o>0?g(u/f[i-o]%f[o])*s:0),r)for(;;){if(0==l){for(a=1,o=c[0];o>=10;o/=10,a++);for(o=c[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,c[0]==S&&(c[0]=1));break}if(c[l]+=s,c[l]!=S)break;c[l--]=0,s=1}for(a=c.length;0===c[--a];c.pop());}e.e>j?e.c=e.e=null:e.en)return null!=(e=i[n++])};return o(t="DECIMAL_PLACES")&&H(e,0,R,2,t)&&(k=0|e),r[t]=k,o(t="ROUNDING_MODE")&&H(e,0,8,2,t)&&(F=0|e),r[t]=F,o(t="EXPONENTIAL_AT")&&(p(e)?H(e[0],-R,0,2,t)&&H(e[1],0,R,2,t)&&(B=0|e[0],V=0|e[1]):H(e,-R,R,2,t)&&(B=-(V=0|(e<0?-e:e)))),r[t]=[B,V],o(t="RANGE")&&(p(e)?H(e[0],-R,-1,2,t)&&H(e[1],1,R,2,t)&&(K=0|e[0],j=0|e[1]):H(e,-R,R,2,t)&&(0|e?K=-(j=0|(e<0?-e:e)):W&&w(2,t+" cannot be zero",e))),r[t]=[K,j],o(t="ERRORS")&&(e===!!e||1===e||0===e?(D=0,H=(W=!!e)?m:l):W&&w(2,t+A,e)),r[t]=W,o(t="CRYPTO")&&(e===!0||e===!1||1===e||0===e?e?(e="undefined"==typeof crypto,!e&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?Y=!0:W?w(2,"crypto unavailable",e?void 0:crypto):Y=!1):Y=!1:W&&w(2,t+A,e)),r[t]=Y,o(t="MODULO_MODE")&&H(e,0,9,2,t)&&(q=0|e),r[t]=q,o(t="POW_PRECISION")&&H(e,0,R,2,t)&&(G=0|e),r[t]=G,o(t="FORMAT")&&("object"==typeof e?X=e:W&&w(2,t+" not an object",e)),r[t]=X,r},t.max=function(){return i(arguments,U.lt)},t.min=function(){return i(arguments,U.gt)},t.random=function(){var e=9007199254740992,n=Math.random()*e&2097151?function(){return g(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,i,a,o,s,u=0,l=[],p=new t(x);if(e=null!=e&&H(e,0,R,14)?0|e:k,o=v(e/N),Y)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));u>>11),s>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),r[u]=i[0],r[u+1]=i[1]):(l.push(s%1e14),u+=2);u=o/2}else if(crypto.randomBytes){for(r=crypto.randomBytes(o*=7);u=9e15?crypto.randomBytes(7).copy(r,u):(l.push(s%1e14),u+=7);u=o/7}else Y=!1,W&&w(14,"crypto unavailable",crypto);if(!Y)for(;u=10;s/=10,u++);ur?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(i,a,s,u,l){var p,c,f,h,d,m,y,v,A,E,T,_,I,b,M,R,C,w=i.s==a.s?1:-1,L=i.c,O=a.c;if(!(L&&L[0]&&O&&O[0]))return new t(i.s&&a.s&&(L?!O||L[0]!=O[0]:O)?L&&0==L[0]||!O?0*w:w/0:NaN);for(v=new t(w),A=v.c=[],c=i.e-a.e,w=s+c+1,l||(l=S,c=o(i.e/N)-o(a.e/N),w=w/N|0),f=0;O[f]==(L[f]||0);f++);if(O[f]>(L[f]||0)&&c--,w<0)A.push(1),h=!0;else{for(b=L.length,R=O.length,f=0,w+=2,d=g(l/(O[0]+1)),d>1&&(O=e(O,d,l),L=e(L,d,l),R=O.length,b=L.length),I=R,E=L.slice(0,R),T=E.length;T=l/2&&M++;do{if(d=0,p=n(O,E,R,T),p<0){if(_=E[0],R!=T&&(_=_*l+(E[1]||0)),d=g(_/M),d>1)for(d>=l&&(d=l-1),m=e(O,d,l),y=m.length,T=E.length;1==n(m,E,y,T);)d--,r(m,R=10;w/=10,f++);P(v,s+(v.e=f+c*N-1)+1,u,h)}else v.e=c,v.r=+h;return v}}(),O=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,u,l){var p,c=u?s:s.replace(a,"");if(i.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!u&&(c=c.replace(e,function(e,t,n){return p="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=p?e:t}),l&&(p=l,c=c.replace(n,"$1").replace(r,"0.$1")),s!=c))return new t(c,p);W&&w(D,"not a"+(l?" base "+l:"")+" number",s),o.s=null}o.c=o.e=null,D=0}}(),U.absoluteValue=U.abs=function(){var e=new t(this);return e.s<0&&(e.s=1),e},U.ceil=function(){return P(new t(this),this.e+1,2)},U.comparedTo=U.cmp=function(e,n){return D=1,u(this,new t(e,n))},U.decimalPlaces=U.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-o(this.e/N))*N,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},U.dividedBy=U.div=function(e,n){return D=3,L(this,new t(e,n),k,F)},U.dividedToIntegerBy=U.divToInt=function(e,n){return D=4,L(this,new t(e,n),0,1)},U.equals=U.eq=function(e,n){return D=5,0===u(this,new t(e,n))},U.floor=function(){return P(new t(this),this.e+1,3)},U.greaterThan=U.gt=function(e,n){return D=6,u(this,new t(e,n))>0},U.greaterThanOrEqualTo=U.gte=function(e,n){return D=7,1===(n=u(this,new t(e,n)))||0===n},U.isFinite=function(){return!!this.c},U.isInteger=U.isInt=function(){return!!this.c&&o(this.e/N)>this.c.length-2},U.isNaN=function(){return!this.s},U.isNegative=U.isNeg=function(){return this.s<0},U.isZero=function(){return!!this.c&&0==this.c[0]},U.lessThan=U.lt=function(e,n){return D=8,u(this,new t(e,n))<0},U.lessThanOrEqualTo=U.lte=function(e,n){return D=9,(n=u(this,new t(e,n)))===-1||0===n},U.minus=U.sub=function(e,n){var r,i,a,s,u=this,l=u.s;if(D=10,e=new t(e,n),n=e.s,!l||!n)return new t(NaN);if(l!=n)return e.s=-n,u.plus(e);var p=u.e/N,c=e.e/N,f=u.c,h=e.c;if(!p||!c){if(!f||!h)return f?(e.s=-n,e):new t(h?u:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-n,e):new t(f[0]?u:3==F?-0:0)}if(p=o(p),c=o(c),f=f.slice(),l=p-c){for((s=l<0)?(l=-l,a=f):(c=p,a=h),a.reverse(),n=l;n--;a.push(0));a.reverse()}else for(i=(s=(l=f.length)<(n=h.length))?l:n,l=n=0;n0)for(;n--;f[r++]=0);for(n=S-1;i>l;){if(f[--i]0?(u=s,r=p):(a=-a,r=l),r.reverse();a--;r.push(0));r.reverse()}for(a=l.length,n=p.length,a-n<0&&(r=p,p=l,l=r,n=a),a=0;n;)a=(l[--n]=l[n]+p[n]+a)/S|0,l[n]=S===l[n]?0:l[n]%S;return a&&(l=[a].concat(l),++u),C(e,l,u)},U.precision=U.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(W&&w(13,"argument"+A,e),e!=!!e&&(e=null)),!i)return null;if(n=i.length-1,t=n*N+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},U.round=function(e,n){var r=new t(this);return(null==e||H(e,0,R,15))&&P(r,~~e+this.e+1,null!=n&&H(n,0,8,15,E)?0|n:F),r},U.shift=function(e){var n=this;return H(e,-I,I,16,"argument")?n.times("1e"+d(e)):new t(n.c&&n.c[0]&&(e<-I||e>I)?n.s*(e<0?0:1/0):n)},U.squareRoot=U.sqrt=function(){var e,n,r,i,a,u=this,l=u.c,p=u.s,c=u.e,f=k+4,h=new t("0.5");if(1!==p||!l||!l[0])return new t(!p||p<0&&(!l||l[0])?NaN:l?u:1/0);if(p=Math.sqrt(+u),0==p||p==1/0?(n=s(l),(n.length+c)%2==0&&(n+="0"),p=Math.sqrt(n),c=o((c+1)/2)-(c<0||c%2),p==1/0?n="1e"+c:(n=p.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),r=new t(n)):r=new t(p+""),r.c[0])for(c=r.e,p=c+f,p<3&&(p=0);;)if(a=r,r=h.times(a.plus(L(u,a,f,1))),s(a.c).slice(0,p)===(n=s(r.c)).slice(0,p)){if(r.e=0;){for(r=0,d=T[a]%g,m=T[a]/g|0,u=p,s=a+u;s>a;)c=E[--u]%g,f=E[u]/g|0,l=m*c+f*d,c=d*c+l%g*g+y[s]+r,r=(c/v|0)+(l/g|0)+m*f,y[s--]=c%v;y[s]=r}return r?++i:y.splice(0,1),C(e,y,i)},U.toDigits=function(e,n){var r=new t(this);return e=null!=e&&H(e,1,R,18,"precision")?0|e:null,n=null!=n&&H(n,0,8,18,E)?0|n:F,e?P(r,e,n):r},U.toExponential=function(e,t){return r(this,null!=e&&H(e,0,R,19)?~~e+1:null,t,19)},U.toFixed=function(e,t){return r(this,null!=e&&H(e,0,R,20)?~~e+this.e+1:null,t,20)},U.toFormat=function(e,t){var n=r(this,null!=e&&H(e,0,R,21)?~~e+this.e+1:null,t,21);if(this.c){var i,a=n.split("."),o=+X.groupSize,s=+X.secondaryGroupSize,u=X.groupSeparator,l=a[0],p=a[1],c=this.s<0,f=c?l.slice(1):l,h=f.length;if(s&&(i=o,o=s,s=i,h-=i),o>0&&h>0){for(i=h%o||o,l=f.substr(0,i);i0&&(l+=u+f.slice(i)),c&&(l="-"+l)}n=p?l+X.decimalSeparator+((s=+X.fractionGroupSize)?p.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+X.fractionGroupSeparator):p):l}return n},U.toFraction=function(e){var n,r,i,a,o,u,l,p,c,f=W,h=this,d=h.c,m=new t(x),y=r=new t(x),v=l=new t(x);if(null!=e&&(W=!1,u=new t(e),W=f,(f=u.isInt())&&!u.lt(x)||(W&&w(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&u.c&&P(u,u.e+1,1).gte(x)?u:null)),!d)return h.toString();for(c=s(d),a=m.e=c.length-h.e-1,m.c[0]=b[(o=a%N)<0?N+o:o],e=!e||u.cmp(m)>0?a>0?m:y:u,o=j,j=1/0,u=new t(c),l.c[0]=0;p=L(u,m,0,1),i=r.plus(p.times(v)),1!=i.cmp(e);)r=v,v=i,y=l.plus(p.times(i=y)),l=i,m=u.minus(p.times(i=m)),u=i;return i=L(e.minus(r),v,0,1),l=l.plus(i.times(y)),r=r.plus(i.times(v)),l.s=y.s=h.s,a*=2,n=L(y,v,a,F).minus(h).abs().cmp(L(l,r,a,F).minus(h).abs())<1?[y.toString(),v.toString()]:[l.toString(),r.toString()],j=o,n},U.toNumber=function(){return+this},U.toPower=U.pow=function(e,n){var r,i,a,o=g(e<0?-e:+e),s=this;if(null!=n&&(D=23,n=new t(n)),!H(e,-I,I,23,"exponent")&&(!isFinite(e)||o>I&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+s,e),new t(n?r%n:r);for(n?e>1&&s.gt(x)&&s.isInt()&&n.gt(x)&&n.isInt()?s=s.mod(n):(a=n,n=null):G&&(r=v(G/N+2)),i=new t(x);;){if(o%2){if(i=i.times(s),!i.c)break;r?i.c.length>r&&(i.c.length=r):n&&(i=i.mod(n))}if(o=g(o/2),!o)break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):n&&(s=s.mod(n))}return n?i:(e<0&&(i=x.div(i)),a?i.mod(a):r?P(i,G,F):i)},U.toPrecision=function(e,t){return r(this,null!=e&&H(e,1,R,24,"precision")?0|e:null,t,24)},U.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(t=s(r.c),t=null!=e&&H(e,2,64,25,"base")?n(h(t,a),0|e,10,i):a<=B||a>=V?f(t,a):h(t,a),i<0&&r.c[0]&&(t="-"+t)),t},U.truncated=U.trunc=function(){return P(new t(this),this.e+1,1)},U.valueOf=U.toJSON=function(){var e,t=this,n=t.e;return null===n?t.toString():(e=s(t.c),e=n<=B||n>=V?f(e,n):h(e,n),t.s<0?"-"+e:e)},U.isBigNumber=!0,null!=e&&t.config(e),t}function o(e){var t=0|e;return e>0||e===t?t:t-1}function s(e){for(var t,n,r=1,i=e.length,a=e[0]+"";rl^n?1:-1;for(s=(u=i.length)<(l=a.length)?u:l,o=0;oa[o]^n?1:-1;return u==l?0:u>l^n?1:-1}function l(e,t,n){return(e=d(e))>=t&&e<=n}function p(e){return"[object Array]"==Object.prototype.toString.call(e)}function c(e,t,n){for(var r,i,a=[0],o=0,s=e.length;on-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/n|0,a[r]%=n)}return a.reverse()}function f(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function h(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(n=e.length,++t>n){for(r="0",t-=n;--t;r+="0");e+=r}else t0){var l=[],f=s.filter(function(e){var t=e.value();return Array.isArray(t)?(l=l.concat(t),t.indexOf(u)>=0):(l.push(t),t==u)});if(0==f.length){var h=l.map(function(e){return"'"+e+"'"}).join(", "),d=p.error(c.INVALID_ANNOTATION_LOCATION,this,{aName:e.prototype.facetName.call(this),aValues:h});a.addSubStatus(d)}}var m,y=r.metaOfType(T);if(y.length>0&&p.isUnknown(r)&&n.getByChain(r.name())){var v=y[0].value();m=p.error(c.LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE,this,{typeName:this.facetName(),chainedType:v})}else{var g=r.validateDirect(o,!0,!1);g.isOk()||(m=p.error(c.INVALID_ANNOTATION_VALUE,this,{msg:g.getMessage()}),m.addSubStatus(g))}return m&&a.addSubStatus(m),p.setValidationPath(a,{name:this.path}),a},t.prototype.kind=function(){return v.MetaInformationKind.Annotation},t.prototype.ownerFacet=function(){return this._ownerFacet},t.prototype.setOwnerFacet=function(e){this._ownerFacet=e},t.prototype.getPath=function(){return this.path},t}(g);t.Annotation=b;var M=function(e){function t(t,n,r,i){void 0===i&&(i=!1);var a=e.call(this,t,n,!0)||this;return a.name=t,a._type=n,a.optional=r,a.builtIn=i,a}return l(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_FacetDeclaration)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_FacetDeclaration)},t.prototype.actualName=function(){return"?"==this.name.charAt(this.name.length-1)?this.name.substr(0,this.name.length-1):this.name},t.prototype.isOptional=function(){return this.optional},t.prototype.type=function(){return this._type},t.prototype.kind=function(){return v.MetaInformationKind.FacetDeclaration},t.prototype.isBuiltIn=function(){return this.builtIn},t.prototype.validateSelfIndividual=function(e,t){return d.validatePropertyType(this._type,this.name,t,this,!1)},t.CLASS_IDENTIFIER_FacetDeclaration="metainfo.FacetDeclaration",t}(g);t.FacetDeclaration=M;var R=function(e){function t(t,n){return e.call(this,t,n,!0)||this}return l(t,e),t.prototype.kind=function(){return v.MetaInformationKind.CustomFacet},t}(g);t.CustomFacet=R;var C=function(e){function t(t){return e.call(this,"example",t)||this}return l(t,e),t.prototype.validateSelfIndividual=function(e,t){var n=p.ok();n.addSubStatus(this.validateValue(t));var r=this.validateAnnotations(t);return p.setValidationPath(r,{name:this.facetName()}),n.addSubStatus(r),n},t.prototype.validateValue=function(e){if(!this.owner().oneMeta(S)){var t=this.value(),n=!1,r=p.ok();if("object"==typeof t&&t&&t.hasOwnProperty("value")){if(o(t,null,e,r,this.facetName()),t.strict===!1||t.strict&&"object"==typeof t.strict&&t.strict.value===!1)return r;t=t.value,n=!0}var a=t;if(a=i(t,this.owner()),a instanceof p.Status&&!a.isOk())return p.setValidationPath(a,{name:"example"}),r.addSubStatus(a),r;var s=this.owner().validateDirect(a,!0,!1);if(!s.isOk()){"string"==typeof this.value();var u=p.error(c.INVALID_EXMAPLE,this,{msg:s.getMessage()});s.getErrors().forEach(function(e){u.addSubStatus(e),n?p.setValidationPath(e,{name:"example",child:{name:"value"}}):p.setValidationPath(e,{name:"example"})}),r.addSubStatus(u)}return r}},t.prototype.validateAnnotations=function(e){var t=p.ok(),n=this.value();if("object"==typeof n&&n&&n.value)for(var r=Object.keys(n).filter(function(e){return e.length>2&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)}),i=0,a=r;i0&&d.forEach(function(e){return u[e.value()]=!0})}var m=e[o];if(!u[m]){var y=p.error(f.Status.CODE_INCORRECT_DISCRIMINATOR,this,{rootType:r.name(),value:m,propName:o},f.Status.WARNING);return p.setValidationPath(y,{name:o,child:n}),y}return p.ok()}var v=p.error(f.Status.CODE_MISSING_DISCRIMINATOR,this,{rootType:r.name(),propName:o});return p.setValidationPath(v,n),v}return p.ok()},t.prototype.facetName=function(){return"discriminatorValue"},t.prototype.validateSelfIndividual=function(e,t){if(this.strict){var n=this.owner().oneMeta(V);if(this.owner().isSubTypeOf(p.OBJECT))if(this.owner().getExtra(p.GLOBAL)===!1)e.addSubStatus(p.error(c.DISCRIMINATOR_FOR_INLINE,this));else if(n){var r=m.find(this.owner().meta(),function(e){return e instanceof h.PropertyIs&&e.propertyName()==n.value()});if(r){var i=r.value().validate(this.value());i.isOk()||e.addSubStatus(p.error(c.INVALID_DISCRIMINATOR_VALUE,this,{msg:i.getMessage()}))}}else e.addSubStatus(p.error(c.DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR,this));else e.addSubStatus(p.error(c.DISCRIMINATOR_FOR_OBJECT,this))}return e.getValidationPath()||p.setValidationPath(e,{name:this.facetName()}),e},t.prototype.requiredType=function(){return p.OBJECT},t.prototype.value=function(){return this._value},t.prototype.kind=function(){return v.MetaInformationKind.DiscriminatorValue},t.prototype.isStrict=function(){return this.strict},t.CLASS_IDENTIFIER_DiscriminatorValue="metainfo.DiscriminatorValue",t}(p.Constraint);t.DiscriminatorValue=K;var j=[{propName:"strict",propType:"boolean",messageEntry:c.STRICT_BOOLEAN},{propName:"displayName",propType:"string",messageEntry:c.DISPLAY_NAME_STRING},{propName:"description",propType:"string",messageEntry:c.DESCRIPTION_STRING}]},function(e,t,n){"use strict";function r(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=!0);for(var i="<"+e,a=0;a0&&Object.keys(t).forEach(function(e){"string"==typeof t[e]&&(i=i+" "+e+'="'+t[e]+'"')}),i=i+">"+(r?"\n":"")}function i(e,t){void 0===t&&(t=0);for(var n="-1;r++)n=" "+n;var n=(t>-1?"\n":"")+n+">\n";return n}function a(e,t){t=h(t);var n=C(t),a=_(t),s=r(n,o(e,a)),u={};if(u[n]=e,t.isArray()){t.meta().filter(function(e){return e instanceof x.ComponentShouldBeOfType})[0];s+=p(u,t,1,!0)}else s+=l(e,a,1);var s=s+i(n);return s}function o(e,t){var n={},r=U.filter(t,function(e){return w(e.value()).attribute});return r.forEach(function(t){var r=t.propId(),i=R(t);e[r]&&(n[i]=e[r].toString())}),n}function s(e,t,n){var a=Object.keys(e)[0],p=e[a],c=null;if(t.isScalar()){var f=_(t);c=r(a,o(p,f),n,!t.isScalar())+p.toString()}else{if(t.isUnion())return s(e,u(p,t),n);var f=_(t);c=r(a,o(p,f),n,!t.isScalar())+l(p,f,n+1)}return c+=i(a,t.isScalar()?-1:n)}function u(e,t){var n=t.typeFamily(),r=[],i=null;return n.forEach(function(t){var n=a(e,t);if(n){var i=c(n,t);if(i){var o=f(i);r.push({type:t,errors:o&&o.length||0})}}}),i=r.length>0?r[0]:{type:n[0]},r.forEach(function(e){e.errors0&&t[0].value()}function R(e){var t=w(e.value()),n=e.propId(),r=t.name||n;return t.namespace&&(r=t.namespace+":"+r),(t.prefix||"")+r}function C(e){var t=w(e),n=e.name();""===n&&e.isUnion()&&(n="object");var r=t.name||n;return(t.prefix||"")+r}function w(e){var t=e.meta().filter(function(e){return e instanceof k.XMLInfo}).map(function(e){return e})[0],n={attribute:!1,wrapped:!1,name:!1,namespace:!1,prefix:!1};if(!t)return n;var r=t.value();return r?(Object.keys(n).forEach(function(e){n[e]=r[e]||n[e]}),n):n}function P(e,t,n){if(void 0===n&&(n=[]),"object"==typeof t){var r=P(e,t._);return delete t._,T(t,n,[],[],!0),r}if(!t&&""!==t.trim())return null;if(e.isNumber()){var i=parseFloat(t);if(!isNaN(i))return i}if(e.isBoolean()){if("true"===t)return!0;if("false"===t)return!1}return"string"==typeof t?t:null}function L(e){return!!e&&("object"==typeof e&&"number"==typeof e.length)}Object.defineProperty(t,"__esModule",{value:!0});var O=n(78),D=n(58),U=n(59),x=n(74),k=n(76),F=n(58);t.messageRegistry=n(73);var B="@unexpected_root_attributes_and_elements",V=["application/x-www-form-urlencoded","application/json","application/xml","multipart/form-data"];t.serializeToXML=a,t.readObject=c,t.getXmlErrors=f},function(e,t,n){(function(){"use strict";var e,r,i,a,o=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty;r=n(79),e=n(80),i=n(103),a=n(133),t.defaults=r.defaults,t.processors=a,t.ValidationError=function(e){function t(e){this.message=e}return o(t,e),t}(Error),t.Builder=e.Builder,t.Parser=i.Parser,t.parseString=i.parseString}).call(this)},function(e,t){(function(){t.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4, -emptyTag:"",cdata:!1}}}).call(this)},function(e,t,n){(function(){"use strict";var e,r,i,a,o,s={}.hasOwnProperty;e=n(81),r=n(79).defaults,a=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},o=function(e){return""},i=function(e){return e.replace("]]>","]]]]>")},t.Builder=function(){function t(e){var t,n,i;this.options={},n=r[.2];for(t in n)s.call(n,t)&&(i=n[t],this.options[t]=i);for(t in e)s.call(e,t)&&(i=e[t],this.options[t]=i)}return t.prototype.buildObject=function(t){var n,i,u,l,p;return n=this.options.attrkey,i=this.options.charkey,1===Object.keys(t).length&&this.options.rootName===r[.2].rootName?(p=Object.keys(t)[0],t=t[p]):p=this.options.rootName,u=function(e){return function(t,r){var l,p,c,f,h,d;if("object"!=typeof r)e.options.cdata&&a(r)?t.raw(o(r)):t.txt(r);else if(Array.isArray(r)){for(f in r)if(s.call(r,f)){p=r[f];for(h in p)c=p[h],t=u(t.ele(h),c).up()}}else for(h in r)if(s.call(r,h))if(p=r[h],h===n){if("object"==typeof p)for(l in p)d=p[l],t=t.att(l,d)}else if(h===i)t=e.options.cdata&&a(p)?t.raw(o(p)):t.txt(p);else if(Array.isArray(p))for(f in p)s.call(p,f)&&(c=p[f],t="string"==typeof c?e.options.cdata&&a(c)?t.ele(h).raw(o(c)).up():t.ele(h,c).up():u(t.ele(h),c).up());else"object"==typeof p?t=u(t.ele(h),p).up():"string"==typeof p&&e.options.cdata&&a(p)?t=t.ele(h).raw(o(p)).up():(null==p&&(p=""),t=t.ele(h,p.toString()).up());return t}}(this),l=e.create(p,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(l,t).end(this.options.renderOpts)},t}()}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u;u=n(82),o=u.assign,s=u.isFunction,t=n(83),r=n(101),a=n(99),i=n(102),e.exports.create=function(e,n,r,i){var a,s;if(null==e)throw new Error("Root element needs a name");return i=o({},n,r,i),a=new t(i),s=a.element(e),i.headless||(a.declaration(i),null==i.pubID&&null==i.sysID||a.doctype(i)),s},e.exports.begin=function(e,n,i){var a;return s(e)&&(a=[e,n],n=a[0],i=a[1],e={}),n?new r(e,n,i):new t(e)},e.exports.stringWriter=function(e){return new a(e)},e.exports.streamWriter=function(e,t){return new i(e,t)}}).call(this)},function(e,t){(function(){var t,n,r,i,a,o,s=[].slice,u={}.hasOwnProperty;t=function(){var e,t,n,r,a,o;if(o=arguments[0],a=2<=arguments.length?s.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(e=0,n=a.length;e","]]]]>"),this.assertLegalChar(e)},e.prototype.comment=function(e){if(e=""+e||"",e.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return""+e||""},e.prototype.attName=function(e){return e=""+e||""},e.prototype.attValue=function(e){return e=""+e||"",this.attEscape(e)},e.prototype.insTarget=function(e){return""+e||""},e.prototype.insValue=function(e){if(e=""+e||"",e.match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return e},e.prototype.xmlVersion=function(e){if(e=""+e||"",!e.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},e.prototype.xmlEncoding=function(e){if(e=""+e||"",!e.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/))throw new Error("Invalid encoding: "+e);return e},e.prototype.xmlStandalone=function(e){return e?"yes":"no"},e.prototype.dtdPubID=function(e){return""+e||""},e.prototype.dtdSysID=function(e){return""+e||""},e.prototype.dtdElementValue=function(e){return""+e||""},e.prototype.dtdAttType=function(e){return""+e||""},e.prototype.dtdAttDefault=function(e){return null!=e?""+e||"":e},e.prototype.dtdEntityValue=function(e){return""+e||""},e.prototype.dtdNData=function(e){return""+e||""},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(e){var t;if(t=e.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+e+" at index "+t.index);return e},e.prototype.elEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(//g,">").replace(/\r/g," ")},e.prototype.attEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(/"+this.newline},n.prototype.comment=function(e,t){return this.space(t)+""+this.newline},n.prototype.declaration=function(e,t){var n;return n=this.space(t),n+='",n+=this.newline},n.prototype.docType=function(e,n){var u,l,p,f,h;if(n||(n=0),f=this.space(n),f+="0){for(f+=" [",f+=this.newline,h=e.children,l=0,p=h.length;l",f+=this.newline},n.prototype.element=function(e,n){var i,a,o,s,u,l,h,m,y,g,A,E,T;n||(n=0),T=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),E=this.space(n),m="",m+=E+"<"+e.name,y=e.attributes;for(h in y)v.call(y,h)&&(i=y[h],m+=this.attribute(i));if(0===e.children.length||e.children.every(function(e){return""===e.value}))m+=this.allowEmpty?">"+this.newline:this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)m+=">",m+=e.children[0].value,m+=""+this.newline;else{if(this.dontprettytextnodes)for(g=e.children,o=0,u=g.length;o"+this.newline,A=e.children,s=0,l=A.length;s"+this.newline}return m},n.prototype.processingInstruction=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.raw=function(e,t){return this.space(t)+e.value+this.newline},n.prototype.text=function(e,t){return this.space(t)+e.value+this.newline},n.prototype.dtdAttList=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.dtdElement=function(e,t){return this.space(t)+""+this.newline},n.prototype.dtdEntity=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.dtdNotation=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.openNode=function(e,t){var n,r,i,a;if(t||(t=0),e instanceof p){i=this.space(t)+"<"+e.name,a=e.attributes;for(r in a)v.call(a,r)&&(n=a[r],i+=this.attribute(n));return i+=(e.children?">":"/>")+this.newline}return i=this.space(t)+"")+this.newline},n.prototype.closeNode=function(e,t){switch(t||(t=0),!1){case!(e instanceof p):return this.space(t)+""+this.newline;case!(e instanceof l):return this.space(t)+"]>"+this.newline}},n}(m)}).call(this)},function(e,t){(function(){var t,n={}.hasOwnProperty;e.exports=t=function(){function e(e){var t,r,i,a,o,s,u,l,p;e||(e={}),this.pretty=e.pretty||!1,this.allowEmpty=null!=(r=e.allowEmpty)&&r,this.pretty?(this.indent=null!=(i=e.indent)?i:" ",this.newline=null!=(a=e.newline)?a:"\n",this.offset=null!=(o=e.offset)?o:0,this.dontprettytextnodes=null!=(s=e.dontprettytextnodes)?s:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=null!=(u=e.spacebeforeslash)?u:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,l=e.writer||{};for(t in l)n.call(l,t)&&(p=l[t],this[t]=p)}return e.prototype.set=function(e){var t,r,i;e||(e={}),"pretty"in e&&(this.pretty=e.pretty),"allowEmpty"in e&&(this.allowEmpty=e.allowEmpty),this.pretty?(this.indent="indent"in e?e.indent:" ",this.newline="newline"in e?e.newline:"\n",this.offset="offset"in e?e.offset:0,this.dontprettytextnodes="dontprettytextnodes"in e?e.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in e?e.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,r=e.writer||{};for(t in r)n.call(r,t)&&(i=r[t],this[t]=i);return this},e.prototype.space=function(e){var t;return this.pretty?(t=(e||0)+this.offset+1,t>0?new Array(t).join(this.indent):""):""},e}()}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u,l,p,c,f,h,d,m,y,v,g,A,E,T,_={}.hasOwnProperty;T=n(82),A=T.isObject,g=T.isFunction,E=T.isPlainObject,f=n(85),r=n(87),i=n(88),d=n(95),v=n(96),h=n(97),l=n(89),p=n(90),a=n(91),s=n(92),o=n(93),u=n(94),t=n(86),y=n(98),m=n(99),e.exports=c=function(){function e(e,t,n){var r;e||(e={}),e.writer?E(e.writer)&&(r=e.writer,e.writer=new m(r)):e.writer=new m(e),this.options=e,this.writer=e.writer,this.stringify=new y(e),this.onDataCallback=t||function(){},this.onEndCallback=n||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.node=function(e,t,n){var r;if(null==e)throw new Error("Missing node name"); -if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),e=e.valueOf(),null==t&&(t={}),t=t.valueOf(),A(t)||(r=[t,n],n=r[0],t=r[1]),this.currentNode=new f(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},e.prototype.element=function(e,t,n){return this.currentNode&&this.currentNode instanceof p?this.dtdElement.apply(this,arguments):this.node(e,t,n)},e.prototype.attribute=function(e,n){var r,i;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(null!=e&&(e=e.valueOf()),A(e))for(r in e)_.call(e,r)&&(i=e[r],this.attribute(r,i));else g(n)&&(n=n.apply()),this.options.skipNullAttributes&&null==n||(this.currentNode.attributes[e]=new t(this,e,n));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new v(this,e),this.onData(this.writer.text(t,this.currentLevel+1)),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new r(this,e),this.onData(this.writer.cdata(t,this.currentLevel+1)),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new i(this,e),this.onData(this.writer.comment(t,this.currentLevel+1)),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new d(this,e),this.onData(this.writer.raw(t,this.currentLevel+1)),this},e.prototype.instruction=function(e,t){var n,r,i,a,o;if(this.openCurrent(),null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),Array.isArray(e))for(n=0,a=e.length;n=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){if(!e.isOpen)return!this.root&&0===this.currentLevel&&e instanceof f&&(this.root=e),this.onData(this.writer.openNode(e,this.currentLevel)),e.isOpen=!0},e.prototype.closeNode=function(e){if(!e.isClosed)return this.onData(this.writer.closeNode(e,this.currentLevel)),e.isClosed=!0},e.prototype.onData=function(e){return this.documentStarted=!0,this.onDataCallback(e)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.dtd=function(e,t,n){return this.doctype(e,t,n)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode instanceof p?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode instanceof p?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e}()}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u,l,p,c,f,h,d,m,y=function(e,t){function n(){this.constructor=e}for(var r in t)v.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},v={}.hasOwnProperty;u=n(89),l=n(90),t=n(87),r=n(88),p=n(85),f=n(95),d=n(96),c=n(97),i=n(91),a=n(93),o=n(92),s=n(94),m=n(100),e.exports=h=function(e){function n(e,t){this.stream=e,n.__super__.constructor.call(this,t)}return y(n,e),n.prototype.document=function(e){var t,n,i,a,o,s,p,f;for(s=e.children,n=0,a=s.length;n"+this.endline(e))},n.prototype.comment=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.declaration=function(e,t){return this.stream.write(this.space(t)),this.stream.write('"),this.stream.write(this.endline(e))},n.prototype.docType=function(e,n){var u,l,p,f;if(n||(n=0),this.stream.write(this.space(n)),this.stream.write("0){for(this.stream.write(" ["),this.stream.write(this.endline(e)),f=e.children,l=0,p=f.length;l"),this.stream.write(this.endline(e))},n.prototype.element=function(e,n){var i,a,o,s,u,l,h,m;n||(n=0),m=this.space(n),this.stream.write(m+"<"+e.name),l=e.attributes;for(u in l)v.call(l,u)&&(i=l[u],this.attribute(i));if(0===e.children.length||e.children.every(function(e){return""===e.value}))this.allowEmpty?this.stream.write(">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)this.stream.write(">"),this.stream.write(e.children[0].value),this.stream.write("");else{for(this.stream.write(">"+this.newline),h=e.children,o=0,s=h.length;o")}return this.stream.write(this.endline(e))},n.prototype.processingInstruction=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.raw=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},n.prototype.text=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},n.prototype.dtdAttList=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.dtdElement=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.dtdEntity=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.dtdNotation=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.endline=function(e){return e.isLastRootNode?"":this.newline},n}(m)}).call(this)},function(e,t,n){(function(){"use strict";var e,r,i,a,o,s,u,l,p=function(e,t){return function(){return e.apply(t,arguments)}},c=function(e,t){function n(){this.constructor=e}for(var r in t)f.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},f={}.hasOwnProperty;u=n(104),i=n(106),e=n(132),s=n(133),l=n(121).setImmediate,r=n(79).defaults,a=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},o=function(e,t,n){var r,i,a;for(r=0,i=e.length;r0&&(u[e.options.childkey]=p),p=u;return r.length>0?e.assignOrPush(d,l,p):(e.options.explicitRoot&&(h=p,p={},p[l]=h),e.resultObject=p,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),n=function(e){return function(n){var i,a;if(a=r[r.length-1])return a[t]+=n,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(a[e.options.childkey]=a[e.options.childkey]||[],i={"#name":"__text__"},i[t]=n,e.options.normalize&&(i[t]=i[t].replace(/\s{2,}/g," ").trim()),a[e.options.childkey].push(i)),a}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(e){return function(e){var t;if(t=n(e))return t.cdata=!0}}(this)},i.prototype.parseString=function(t,n){var r;null!=n&&"function"==typeof n&&(this.on("end",function(e){return this.reset(),n(null,e)}),this.on("error",function(e){return this.reset(),n(e)}));try{return t=t.toString(),""===t.trim()?(this.emit("end",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,l(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(e){if(r=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},i}(i.EventEmitter),t.parseString=function(e,n,r){var i,a,o;return null!=r?("function"==typeof r&&(i=r),"object"==typeof n&&(a=n)):("function"==typeof n&&(i=n),a={}),o=new t.Parser(a),o.parseString(e,i)}}).call(this)},function(e,t,n){(function(e){!function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);var i=this;a(i),i.q=i.c="",i.bufferCheckPosition=t.MAX_BUFFER_LENGTH,i.opt=n||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=j.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(k)),i.trackPosition=i.opt.position!==!1,i.trackPosition&&(i.position=i.line=i.column=0),d(i,"onready")}function i(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),r=0,i=0,a=w.length;in)switch(w[i]){case"textNode":y(e);break;case"cdata":m(e,"oncdata",e.cdata),e.cdata="";break;case"script":m(e,"onscript",e.script),e.script="";break;default:g(e,"Max buffer length exceeded: "+w[i])}r=Math.max(r,o)}var s=t.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=s+e.position}function a(e){for(var t=0,n=w.length;t"===e||l(e)}function f(e,t){return e.test(t)}function h(e,t){return!f(e,t)}function d(e,t,n){e[t]&&e[t](n)}function m(e,t,n){e.textNode&&y(e),d(e,t,n)}function y(e){e.textNode=v(e.opt,e.textNode),e.textNode&&d(e,"ontext",e.textNode),e.textNode=""}function v(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function g(e,t){return y(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,d(e,"onerror",t),e}function A(e){return e.sawRoot&&!e.closedRoot&&E(e,"Unclosed root tag"),e.state!==j.BEGIN&&e.state!==j.BEGIN_WHITESPACE&&e.state!==j.TEXT&&g(e,"Unexpected end"),y(e),e.c="",e.closed=!0,d(e,"onend"),r.call(e,e.strict,e.opt),e}function E(e,t){if("object"!=typeof e||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&g(e,t)}function T(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,m(e,"onopentagstart",n)}function _(e,t){var n=e.indexOf(":"),r=n<0?["",e]:e.split(":"),i=r[0],a=r[1];return t&&"xmlns"===e&&(i="xmlns",a=""),{prefix:i,local:a}}function S(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName))return void(e.attribName=e.attribValue="");if(e.opt.xmlns){var t=_(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==U)E(e,"xml: prefix must be bound to "+U+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==x)E(e,"xmlns: prefix must be bound to "+x+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,m(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function N(e,t){if(e.opt.xmlns){var n=e.tag,r=_(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(E(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){m(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var a=0,o=e.attribList.length;a",e.tagName="",void(e.state=j.SCRIPT);m(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--;){var i=e.tags[t];if(i.name===r)break;E(e,"Unexpected close tag")}if(t<0)return E(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=j.TEXT);e.tagName=n;for(var a=e.tags.length;a-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,m(e,"onclosetag",e.tagName);var s={};for(var u in o.ns)s[u]=o.ns[u];var l=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==l.ns&&Object.keys(o.ns).forEach(function(t){var n=o.ns[t];m(e,"onclosenamespace",{prefix:t,uri:n})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=j.TEXT}function b(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:(n=r,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),i=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),i=t.toString(10))),n=n.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==n?(E(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function M(e,t){"<"===t?(e.state=j.OPEN_WAKA,e.startTagPosition=e.position):l(t)||(E(e,"Non-whitespace before first tag."),e.textNode=t,e.state=j.TEXT)}function R(e,t){var n="";return t"===r?(m(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=j.TEXT):p(r)?(t.state=j.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case j.SGML_DECL_QUOTED:r===t.q&&(t.state=j.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case j.DOCTYPE:">"===r?(t.state=j.TEXT,m(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=j.DOCTYPE_DTD:p(r)&&(t.state=j.DOCTYPE_QUOTED,t.q=r));continue;case j.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=j.DOCTYPE);continue;case j.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=j.DOCTYPE:p(r)&&(t.state=j.DOCTYPE_DTD_QUOTED,t.q=r);continue;case j.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=j.DOCTYPE_DTD,t.q="");continue;case j.COMMENT:"-"===r?t.state=j.COMMENT_ENDING:t.comment+=r;continue;case j.COMMENT_ENDING:"-"===r?(t.state=j.COMMENT_ENDED,t.comment=v(t.opt,t.comment),t.comment&&m(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=j.COMMENT);continue;case j.COMMENT_ENDED:">"!==r?(E(t,"Malformed comment"),t.comment+="--"+r,t.state=j.COMMENT):t.state=j.TEXT;continue;case j.CDATA:"]"===r?t.state=j.CDATA_ENDING:t.cdata+=r;continue;case j.CDATA_ENDING:"]"===r?t.state=j.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=j.CDATA);continue;case j.CDATA_ENDING_2:">"===r?(t.cdata&&m(t,"oncdata",t.cdata),m(t,"onclosecdata"),t.cdata="",t.state=j.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=j.CDATA);continue;case j.PROC_INST:"?"===r?t.state=j.PROC_INST_ENDING:l(r)?t.state=j.PROC_INST_BODY:t.procInstName+=r;continue;case j.PROC_INST_BODY:if(!t.procInstBody&&l(r))continue;"?"===r?t.state=j.PROC_INST_ENDING:t.procInstBody+=r;continue;case j.PROC_INST_ENDING:">"===r?(m(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=j.TEXT):(t.procInstBody+="?"+r,t.state=j.PROC_INST_BODY);continue;case j.OPEN_TAG:f(B,r)?t.tagName+=r:(T(t),">"===r?N(t):"/"===r?t.state=j.OPEN_TAG_SLASH:(l(r)||E(t,"Invalid character in tag name"),t.state=j.ATTRIB));continue;case j.OPEN_TAG_SLASH:">"===r?(N(t,!0),I(t)):(E(t,"Forward-slash in opening tag not followed by >"),t.state=j.ATTRIB);continue;case j.ATTRIB:if(l(r))continue;">"===r?N(t):"/"===r?t.state=j.OPEN_TAG_SLASH:f(F,r)?(t.attribName=r,t.attribValue="",t.state=j.ATTRIB_NAME):E(t,"Invalid attribute name");continue;case j.ATTRIB_NAME:"="===r?t.state=j.ATTRIB_VALUE:">"===r?(E(t,"Attribute without value"),t.attribValue=t.attribName,S(t),N(t)):l(r)?t.state=j.ATTRIB_NAME_SAW_WHITE:f(B,r)?t.attribName+=r:E(t,"Invalid attribute name");continue;case j.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=j.ATTRIB_VALUE;else{if(l(r))continue;E(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",m(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?N(t):f(F,r)?(t.attribName=r,t.state=j.ATTRIB_NAME):(E(t,"Invalid attribute name"),t.state=j.ATTRIB)}continue;case j.ATTRIB_VALUE:if(l(r))continue;p(r)?(t.q=r,t.state=j.ATTRIB_VALUE_QUOTED):(E(t,"Unquoted attribute value"),t.state=j.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case j.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=j.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}S(t),t.q="",t.state=j.ATTRIB_VALUE_CLOSED;continue;case j.ATTRIB_VALUE_CLOSED:l(r)?t.state=j.ATTRIB:">"===r?N(t):"/"===r?t.state=j.OPEN_TAG_SLASH:f(F,r)?(E(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=j.ATTRIB_NAME):E(t,"Invalid attribute name");continue;case j.ATTRIB_VALUE_UNQUOTED:if(!c(r)){"&"===r?t.state=j.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}S(t),">"===r?N(t):t.state=j.ATTRIB;continue;case j.CLOSE_TAG:if(t.tagName)">"===r?I(t):f(B,r)?t.tagName+=r:t.script?(t.script+=""===r?I(t):E(t,"Invalid characters in closing tag");continue;case j.TEXT_ENTITY:case j.ATTRIB_VALUE_ENTITY_Q:case j.ATTRIB_VALUE_ENTITY_U:var s,u;switch(t.state){case j.TEXT_ENTITY:s=j.TEXT,u="textNode";break;case j.ATTRIB_VALUE_ENTITY_Q:s=j.ATTRIB_VALUE_QUOTED,u="attribValue";break;case j.ATTRIB_VALUE_ENTITY_U:s=j.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===r?(t[u]+=b(t),t.entity="",t.state=s):f(t.entity.length?K:V,r)?t.entity+=r:(E(t,"Invalid character in entity name"),t[u]+="&"+t.entity+r,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&i(t),t}t.parser=function(e,t){return new r(e,t)},t.SAXParser=r,t.SAXStream=u,t.createStream=s,t.MAX_BUFFER_LENGTH=65536;var w=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}t.prototype=e;var n=new t;return n}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),r.prototype={end:function(){A(this)},write:C,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var P;try{P=n(105).Stream}catch(e){P=function(){}}var L=t.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});u.prototype=Object.create(P.prototype,{constructor:{value:u}}),u.prototype.write=function(t){if("function"==typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)){if(!this._decoder){var r=n(131).StringDecoder;this._decoder=new r("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},u.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},u.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||L.indexOf(e)===-1||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),P.prototype.on.call(n,e,t)};var O="[CDATA[",D="DOCTYPE",U="http://www.w3.org/XML/1998/namespace",x="http://www.w3.org/2000/xmlns/",k={xml:U,xmlns:x},F=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,V=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,K=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,j=0;t.STATE={BEGIN:j++,BEGIN_WHITESPACE:j++,TEXT:j++, -TEXT_ENTITY:j++,OPEN_WAKA:j++,SGML_DECL:j++,SGML_DECL_QUOTED:j++,DOCTYPE:j++,DOCTYPE_QUOTED:j++,DOCTYPE_DTD:j++,DOCTYPE_DTD_QUOTED:j++,COMMENT_STARTING:j++,COMMENT:j++,COMMENT_ENDING:j++,COMMENT_ENDED:j++,CDATA:j++,CDATA_ENDING:j++,CDATA_ENDING_2:j++,PROC_INST:j++,PROC_INST_BODY:j++,PROC_INST_ENDING:j++,OPEN_TAG:j++,OPEN_TAG_SLASH:j++,ATTRIB:j++,ATTRIB_NAME:j++,ATTRIB_NAME_SAW_WHITE:j++,ATTRIB_VALUE:j++,ATTRIB_VALUE_QUOTED:j++,ATTRIB_VALUE_CLOSED:j++,ATTRIB_VALUE_UNQUOTED:j++,ATTRIB_VALUE_ENTITY_Q:j++,ATTRIB_VALUE_ENTITY_U:j++,CLOSE_TAG:j++,CLOSE_TAG_SAW_WHITE:j++,SCRIPT:j++,SCRIPT_ENDING:j++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r});for(var W in t.STATE)t.STATE[t.STATE[W]]=W;j=t.STATE,/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */ -String.fromCodePoint||!function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,r,i=16384,a=[],o=-1,s=arguments.length;if(!s)return"";for(var u="";++o1114111||t(l)!==l)throw RangeError("Invalid code point: "+l);l<=65535?a.push(l):(l-=65536,n=(l>>10)+55296,r=l%1024+56320,a.push(n,r)),(o+1===s||a.length>i)&&(u+=e.apply(null,a),a.length=0)}return u};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}(t)}).call(t,n(43).Buffer)},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(106).EventEmitter,a=n(107);a(r,i),r.Readable=n(108),r.Writable=n(127),r.Duplex=n(128),r.Transform=n(129),r.PassThrough=n(130),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function r(){l.readable&&l.resume&&l.resume()}function a(){p||(p=!0,e.end())}function o(){p||(p=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",n),e.removeListener("drain",r),l.removeListener("end",a),l.removeListener("close",o),l.removeListener("error",s),e.removeListener("error",s),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(l.on("end",a),l.on("close",o));var p=!1;return l.on("error",s),e.on("error",s),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var p=new Error('Uncaught, unspecified "error" event. ('+t+")");throw p.context=t,p}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,u=0;u0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){t=e.exports=n(109),t.Stream=t,t.Readable=t,t.Writable=n(120),t.Duplex=n(119),t.Transform=n(125),t.PassThrough=n(126)},function(e,t,n){(function(t,r){"use strict";function i(e){return k.from(e)}function a(e){return k.isBuffer(e)||e instanceof F}function o(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?D(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function s(e,t){O=O||n(119),e=e||{},this.objectMode=!!e.objectMode,t instanceof O&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new W,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(j||(j=n(124).StringDecoder),this.decoder=new j(e.encoding),this.encoding=e.encoding)}function u(e){return O=O||n(119),this instanceof u?(this._readableState=new s(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),void x.call(this)):new u(e)}function l(e,t,n,r,a){var o=e._readableState;if(null===t)o.reading=!1,m(e,o);else{var s;a||(s=c(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===k.prototype||(t=i(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):p(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?p(e,o,t,!1):g(e,o)):p(e,o,t,!1))):r||(o.reading=!1)}return f(o)}function p(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&y(e)),g(e,t)}function c(e,t){var n;return a(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e){return!e.ended&&(e.needReadable||e.length=q?e=q:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function d(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=h(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function m(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,y(e)}}function y(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(K("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?L(v,e):v(e))}function v(e){K("emit readable"),e.emit("readable"),N(e)}function g(e,t){t.readingMore||(t.readingMore=!0,L(A,e,t))}function A(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=b(e,t.buffer,t.decoder),n}function b(e,t,n){var r;return ea.length?a.length:e;if(i+=o===a.length?a:a.slice(0,e),e-=o,0===e){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function R(e,t){var n=k.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,L(w,t,e))}function w(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return K("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):y(this),null;if(e=d(e,t),0===e&&t.ended)return 0===t.length&&C(this),null;var r=t.needReadable;K("need readable",r),(0===t.length||t.length-e0?I(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==i&&this.emit("data",i),i},u.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(e,t){function n(e,t){K("onunpipe"),e===f&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,a())}function i(){K("onend"),e.end()}function a(){K("cleanup"),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("drain",y),e.removeListener("error",u),e.removeListener("unpipe",n),f.removeListener("end",i),f.removeListener("end",c),f.removeListener("data",s),v=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function s(t){K("ondata"),g=!1;var n=e.write(t);!1!==n||g||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&P(h.pipes,e)!==-1)&&!v&&(K("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,g=!0),f.pause())}function u(t){K("onerror",t),c(),e.removeListener("error",u),0===U(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",p),c()}function p(){K("onfinish"),e.removeListener("close",l),c()}function c(){K("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,K("pipe count=%d opts=%j",h.pipesCount,t);var d=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,m=d?i:c;h.endEmitted?L(m):f.once("end",m),e.on("unpipe",n);var y=E(f);e.on("drain",y);var v=!1,g=!1;return f.on("data",s),o(e,"error",u),e.once("close",l),e.once("finish",p),e.emit("pipe",f),h.flowing||(K("pipe resume"),f.resume()),e},u.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var t=a.allocUnsafe(e>>>0),n=this.head,r=0;n;)i(n.data,t,r),r+=n.data.length,n=n.next;return t},e}()},function(e,t,n){"use strict";function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?void(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),void this._destroy(e||null,function(e){!t&&e?(o(a,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}))}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit("error",t)}var o=n(110);e.exports={destroy:r,undestroy:i}},function(e,t,n){"use strict";function r(e){return this instanceof r?(l.call(this,e),p.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||o(a,this)}function a(e){e.end()}var o=n(110),s=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var u=n(114);u.inherits=n(115);var l=n(109),p=n(120);u.inherits(r,l);for(var c=s(p.prototype),f=0;f-1?r:R;p.WritableState=l;var P=n(114);P.inherits=n(115);var L={deprecate:n(123)},O=n(112),D=n(113).Buffer,U=i.Uint8Array||function(){},x=n(118);P.inherits(p,O),l.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(l.prototype,"buffer",{get:L.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var k;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(k=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(e){return!!k.call(this,e)||e&&e._writableState instanceof l}})):k=function(e){return e instanceof this},p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},p.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=s(e)&&!r.objectMode;return a&&!D.isBuffer(e)&&(e=o(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=u),r.ended?c(this,n):(a||f(this,r,e,n))&&(r.pendingcb++,i=d(this,r,a,e,t,n)),i},p.prototype.cork=function(){var e=this._writableState;e.corked++},p.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||T(this,e))},p.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},p.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},p.prototype._writev=null,p.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||b(this,r,n)},Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),p.prototype.destroy=x.destroy,p.prototype._undestroy=x.undestroy,p.prototype._destroy=function(e,t){this.end(),t(e)}}).call(t,n(7),n(121).setImmediate,function(){return this}())},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(122),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function l(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function p(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function f(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}var g=n(113).Buffer,A=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&r<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},function(e,t){(function(){"use strict";t.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(this)},function(e,t){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),t.normalize=function(e){return e.toLowerCase()},t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},t.stripPrefix=function(t){return t.replace(e,"")},t.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},t.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(this)},function(e,t,n){"use strict";function r(){return h?h:h=new f}Object.defineProperty(t,"__esModule",{value:!0});var i=n(58),a=n(76),o=n(58),s=n(74),u=n(76),l=n(76),p=n(74),c=function(){function e(e,t){this._construct=e,this._constructWithValue=t}return e.prototype.isSimple=function(){return null!=this._constructWithValue},e.prototype.newInstance=function(){return this._construct()},e.prototype.createWithValue=function(e){return this._constructWithValue(e)},e.prototype.isApplicable=function(e){var t=this.newInstance(),n=t.requiredType(),r=t.requiredTypes();return r&&r.length>0?r.some(function(t){return e.isSubTypeOf(t)}):e.isSubTypeOf(n)},e.prototype.isInheritable=function(){return this.newInstance().isInheritable()},e.prototype.isConstraint=function(){return this.newInstance()instanceof i.Constraint},e.prototype.isMeta=function(){return!this.isConstraint()},e.prototype.name=function(){return this.newInstance().facetName()},e}();t.FacetPrototype=c;var f=function(){function e(){var e=this;this.constraints=[new c(function(){return new s.MinProperties(1)},function(e){return new s.MinProperties(e)}),new c(function(){return new s.MaxProperties(1)},function(e){return new s.MaxProperties(e)}),new c(function(){return new s.MinItems(1)},function(e){return new s.MinItems(e)}),new c(function(){return new s.MaxItems(1)},function(e){return new s.MaxItems(e)}),new c(function(){return new s.MinLength(1)},function(e){return new s.MinLength(e)}),new c(function(){return new s.MaxLength(1)},function(e){return new s.MaxLength(e)}),new c(function(){return new s.Minimum(1)},function(e){return new s.Minimum(e)}),new c(function(){return new p.MultipleOf(1)},function(e){return new p.MultipleOf(e)}),new c(function(){return new s.Maximum(1)},function(e){return new s.Maximum(e)}),new c(function(){return new s.Enum([""])},function(e){return new s.Enum(e)}),new c(function(){return new s.Pattern(".")},function(e){return new s.Pattern(e)}),new c(function(){return new s.Format("")},function(e){return new s.Format(e)}),new c(function(){return new s.PropertyIs("x",i.ANY)},null),new c(function(){return new s.AdditionalPropertyIs(i.ANY)},null),new c(function(){return new s.MapPropertyIs(".",i.ANY)},null),new c(function(){return new s.HasProperty("x")},null),new c(function(){return new s.UniqueItems(!0)},function(e){return new s.UniqueItems(e)}),new c(function(){return new s.ComponentShouldBeOfType(i.ANY)},null),new c(function(){return new s.KnownPropertyRestriction(!1)},function(e){return new s.KnownPropertyRestriction(e)}),new c(function(){return new s.FileTypes([""])},function(e){return new s.FileTypes(e)})],this.meta=[new c(function(){return new a.Discriminator("kind")},function(e){return new a.Discriminator(e)}),new c(function(){return new a.DiscriminatorValue("x")},function(e){return new a.DiscriminatorValue(e)}),new c(function(){return new u.Default("")},function(e){return new u.Default(e)}),new c(function(){return new u.Example("")},function(e){return new u.Example(e)}),new c(function(){return new l.Required(!0)},function(e){return new l.Required(e)}),new c(function(){return new a.Examples({})},function(e){return new a.Examples(e)}),new c(function(){return new u.Description("")},function(e){return new u.Description(e)}),new c(function(){return new u.DisplayName("")},function(e){return new u.DisplayName(e)}),new c(function(){return new o.Abstract},function(e){return new o.Abstract}),new c(function(){return new o.Polymorphic},function(e){return new o.Polymorphic}),new c(function(){return new l.XMLInfo({})},function(e){return new l.XMLInfo(e)}),new c(function(){return new l.AllowedTargets({})},function(e){return new l.AllowedTargets(e)}),new c(function(){return new u.SourceMap({})},function(e){return new u.SourceMap(e)}),new c(function(){return new u.ParserMetadata({})},function(e){return new u.ParserMetadata(e)})],this.known={},this.allPrototypes().forEach(function(t){return e.known[t.name()]=t})}return e.prototype.allPrototypes=function(){return this.meta.concat(this.constraints)},e.prototype.buildFacet=function(e,t){return this.known.hasOwnProperty(e)&&this.known[e].isSimple()?this.known[e].createWithValue(t):null},e.prototype.facetPrototypeWithName=function(e){return this.known.hasOwnProperty(e)?this.known[e]:null},e.prototype.applyableTo=function(e){return this.allPrototypes().filter(function(t){return t.isApplicable(e)})},e.prototype.allMeta=function(){return this.allPrototypes().filter(function(e){return e.isMeta()})},e}();t.Registry=f;var h;t.getInstance=r},function(e,t,n){"use strict";function r(e){var t=e.oneMeta(p.Example);if(t)return t.example();if(e.getExtra(h))return null;e.putExtra(h,!0);try{var n=e.oneMeta(p.Examples);if(n){var i=n.examples();if(i&&i.length>0)return i[0]}var a=e.oneMeta(p.Default);if(a)return a.value();if(e.isObject()){var o={};return e.meta().forEach(function(e){if(e instanceof f.PropertyIs){var t=e,n=r(t.value());o[t.propertyName()]=n}}),e.superTypes().forEach(function(e){if(e.oneMeta(p.Example)||e.oneMeta(p.Examples)){var t=r(e);t&&"object"==typeof t&&Object.keys(t).forEach(function(e){o[e]=t[e]})}}),o}if(e.isArray()){var s=e.oneMeta(c.ComponentShouldBeOfType),u=[];return s&&u.push(r(s.value())),u}return e.isUnion()?r(e.typeFamily()[0]):e.isNumber()?1:!!e.isBoolean()||"some value"}finally{e.putExtra(h,!1)}}function i(e,t){var n=e[t];return null!=n&&"object"==typeof n?n.value:n}function a(e){var t=[];if(!e||"object"!=typeof e)return t;for(var n=0,r=Object.keys(e).filter(function(e){return e.length>0&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)});n0)return r;if(t&&e.isUserDefined()&&!e.isGenuineUserDefinedType()&&e.genuineUserDefinedTypeInHierarchy()){var i=e.genuineUserDefinedTypeInHierarchy(),a=i.getAdapter(l.InheritedType);if(a){var s=o(a);if(s&&s.length>0)return s}}}if(n){var u=new d(null,void 0,void 0,void 0,!1,void 0,void 0,!0);return u.setOwnerType(n),[u]}return[]}Object.defineProperty(t,"__esModule",{value:!0});var l=n(58),p=n(76),c=n(74),f=n(74),h="exampleCalculation";t.example=r;var d=function(){function e(e,t,n,r,i,a,o,s){void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),void 0===i&&(i=!0),void 0===o&&(o=!1),void 0===s&&(s=!1),this._value=e,this._name=t,this._displayName=n,this._description=r,this._strict=i,this._annotations=a,this._isSingle=o,this._empty=s,this.isExpanded=!1,this._scalarsAnnotations={},this._annotations?this._hasAnnotations=!0:this._annotations={},"boolean"!=typeof this._strict&&(this._strict=!1)}return e.prototype.rawValue=function(){return this._value},e.prototype.isEmpty=function(){return this._empty},e.prototype.isJSONString=function(){if(void 0!==this._isJSONString)return this._isJSONString;this._isJSONString=!1;var e=this.firstCharacter();if("{"==e||"["==e)try{JSON.parse(this._value),this._isJSONString=!0}catch(e){}return this._isJSONString},e.prototype.isXMLString=function(){var e=this.firstCharacter();return"<"==e},e.prototype.firstCharacter=function(){if(null==this._value)return null;if("string"!=typeof this._value)return null;var e=this._value.trim();return 0==e.length?null:e.charAt(0)},e.prototype.asXMLString=function(){return this.isXMLString()?this._value:this._owner?this._owner.asXMLString():null},e.prototype.isYAML=function(){return"string"!=typeof this._value||!(this.isJSONString()||this.isXMLString())},e.prototype.asString=function(){return"string"==typeof this._value?""+this._value:JSON.stringify(this._value,null,2)},e.prototype.asJSON=function(){if(this.isJSONString())try{return JSON.parse(this._value)}catch(e){return null}return this.isYAML()?this._value:this.asString()},e.prototype.original=function(){return this._value},e.prototype.expandAsString=function(){return JSON.stringify(this.expandAsJSON(),null,2)},e.prototype.expandAsJSON=function(){return this.isEmpty()?this.isExpanded?this._expandedValue:(this._expandedValue=r(this._ownerType),this.isExpanded=!0,this._expandedValue):this._value},e.prototype.isSingle=function(){return this._isSingle},e.prototype.strict=function(){return this._strict},e.prototype.description=function(){return this._description},e.prototype.displayName=function(){return this._displayName},e.prototype.annotations=function(){return this._annotations},e.prototype.name=function(){return this._name},e.prototype.scalarsAnnotations=function(){return this._scalarsAnnotations},e.prototype.registerScalarAnnotatoion=function(e,t){this._hasScalarAnnotations=!0;var n=this._scalarsAnnotations[t];n||(n={},this._scalarsAnnotations[t]=n),n[e.facetName()]=e},e.prototype.setOwner=function(e){this._owner=e},e.prototype.owner=function(){return this._owner},e.prototype.setOwnerType=function(e){this._ownerType=e},e.prototype.ownerType=function(){return this._ownerType},e.prototype.hasAnnotations=function(){return this._hasAnnotations},e.prototype.hasScalarAnnotations=function(){return this._hasScalarAnnotations},e}(),m=function(){function e(e,t,n,r,i,a,o,s){void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),void 0===i&&(i=!0),void 0===o&&(o=!1),void 0===s&&(s=!1),this._value=e,this._name=t,this._displayName=n,this._description=r,this._strict=i,this._annotations=a,this._isSingle=o,this._empty=s,this.isExpanded=!1,this._scalarsAnnotations={},this._annotations?this._hasAnnotations=!0:this._annotations={}}return e.prototype.annotationsMap=function(){var e={},t=this.scalarsAnnotations();return Object.keys(t).forEach(function(n){var r=[];Object.keys(t[n]).forEach(function(e){r.push(t[n][e])}),e[n]=r}),e},e.prototype.isEmpty=function(){return this._empty},e.prototype.isJSONString=function(){var e=this.firstCharacter();return"{"==e||"["==e},e.prototype.isXMLString=function(){var e=this.firstCharacter();return"<"==e},e.prototype.firstCharacter=function(){if(null==this._value)return null;if("string"!=typeof this._value)return null;var e=this._value.trim();return 0==e.length?null:e.charAt(0)},e.prototype.asXMLString=function(){return this.isXMLString()?this._value:this._owner?this._owner.asXMLString():null},e.prototype.isYAML=function(){return"string"!=typeof this._value||!(this.isJSONString()||this.isXMLString())},e.prototype.asString=function(){return"string"==typeof this._value?""+this._value:JSON.stringify(this._value,null,2)},e.prototype.asJSON=function(){if(this.isJSONString())try{return JSON.parse(this._value)}catch(e){return null}return this.isYAML()?this._value:this.asString()},e.prototype.original=function(){return this._value},e.prototype.expandAsString=function(){return JSON.stringify(this.expandAsJSON(),null,2)},e.prototype.expandAsJSON=function(){return this.isEmpty()?this.isExpanded?this._expandedValue:(this._expandedValue=r(this._ownerType),this.isExpanded=!0,this._expandedValue):this._value},e.prototype.value=function(){return this.expandAsJSON()},e.prototype.isSingle=function(){return this._isSingle},e.prototype.strict=function(){return this._strict},e.prototype.description=function(){return this._description},e.prototype.displayName=function(){return this._displayName},e.prototype.annotations=function(){var e=this,t=[];return Object.keys(this._annotations).forEach(function(n){t.push(e._annotations[n])}),t},e.prototype.name=function(){return this._name},e.prototype.scalarsAnnotations=function(){return this._scalarsAnnotations},e.prototype.registerScalarAnnotatoion=function(e,t){this._hasScalarAnnotations=!0;var n=this._scalarsAnnotations[t];n||(n={},this._scalarsAnnotations[t]=n),n[e.facetName()]=e},e.prototype.setOwner=function(e){this._owner=e},e.prototype.owner=function(){return this._owner},e.prototype.setOwnerType=function(e){this._ownerType=e},e.prototype.ownerType=function(){return this._ownerType},e.prototype.hasAnnotations=function(){return this._hasAnnotations},e.prototype.hasScalarAnnotations=function(){return this._hasScalarAnnotations},e}(),y=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=!1);var o;if(null!=t)if(t.hasOwnProperty("value")){var s=t.value,u=i(t,"displayName"),l=i(t,"description"),p=i(t,"strict"),c={};a(t).forEach(function(e){c[e.facetName()]=e}),o=new d(s,n,u,l,p,c,r);for(var f=0,h=a(t.displayName);f99)&&!s.isValid(e,t))}var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var s=n(137),u=n(58),l=u.messageRegistry,p=function(e){function t(){return e.call(this,"date-only")||this}return o(t,e),t.prototype.check=function(e){return"string"==typeof e&&r(e)?u.ok():u.error(l.INVALID_DATEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be date-only"},t}(u.TypeOfRestriction);t.DateOnlyR=p;var c=function(e){function t(){return e.call(this,"time-only")||this}return o(t,e),t.prototype.check=function(e){if("string"==typeof e){var t=/^([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/,n=e.match(t);if(!n)return u.error(l.INVALID_TIMEONLY,this);var r=n[1];return i(r)?u.ok():u.error(l.INVALID_TIMEONLY,this)}return u.error(l.INVALID_TIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be time-only"},t}(u.TypeOfRestriction);t.TimeOnlyR=c;var f=function(e){function t(){return e.call(this,"datetime-only")||this}return o(t,e),t.prototype.check=function(e){if("string"==typeof e){var t=/^(\d{4}-\d{2}-\d{2})T([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/,n=e.match(t);if(!n||n.length<3)return u.error(l.INVALID_DATETIMEONLY,this);var a=n[1],o=n[2];return r(a)&&i(o)?u.ok():u.error(l.INVALID_DATETIMEONLY,this)}return u.error(l.INVALID_DATETIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be datetime-only"},t}(u.TypeOfRestriction);t.DateTimeOnlyR=f;var h=/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\,[ ]+\d{2}[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\d{4}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,d=/(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\,[ ]+\d{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\d{2}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,m=/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\,[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\d{1,2}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,y=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(?:\.\d+)?((?:[\+\-]\d{2}:\d{2})|Z)$/,v=function(e){function t(){return e.call(this,"datetime")||this}return o(t,e),t.prototype.check=function(e){var t=u.VALIDATED_TYPE,n=!1;if(t.allFacets().forEach(function(e){"format"==e.facetName()&&"rfc2616"===e.value()&&(n=!0)}),"string"==typeof e){if(!n){var a=e.match(y);if(!a||a.length<3)return u.error(l.INVALID_RFC3339,this);var o=a[1],s=a[2];return r(o)&&i(s)?u.ok():u.error(l.INVALID_RFC3339,this)}return e.match(h)||e.match(d)||e.match(m)?u.ok():u.error(l.INVALID_RFC2616,this)}return u.error(l.INVALID_DATTIME,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be datetime"},t}(u.TypeOfRestriction);t.DateTimeR=v},function(e,t,n){var r,i;/** +"use strict";function n(e){var t=""+e,n=r.exec(t);if(!n)return t;var i,a="",o=0,s=0;for(o=n.index;o]/;e.exports=n},function(e,t){if("undefined"==typeof __WEBPACK_EXTERNAL_MODULE_64__){var n=new Error('Cannot find module "RAML.XmlValidation"');throw n.code="MODULE_NOT_FOUND",n}e.exports=__WEBPACK_EXTERNAL_MODULE_64__},function(e,t,n){"use strict";function r(){return new i}Object.defineProperty(t,"__esModule",{value:!0});var i;try{i=n(66).JSONValidator}catch(e){}if(!i){var a=function(){function e(){}return e.prototype.setRemoteReference=function(e,t){},e.prototype.validateSchema=function(e){},e.prototype.getMissingRemoteReferences=function(){return[]},e.prototype.isResourceLoaded=function(e){return!0},e.prototype.validate=function(e,t){},e.prototype.getLastErrors=function(){return[]},e}();i=a}t.getValidator=r},function(e,t){if("undefined"==typeof __WEBPACK_EXTERNAL_MODULE_66__){var n=new Error('Cannot find module "RAML.JsonValidation"');throw n.code="MODULE_NOT_FOUND",n}e.exports=__WEBPACK_EXTERNAL_MODULE_66__},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(e,t,n){function r(t){var r=e[t];!r&&o&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+s(n))}||function(){}}if(!e){if(t instanceof a)return t;e=t}var i={},o=e instanceof Function;return n=n||{},r("warning"),r("error"),r("fatalError"),i}function a(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function u(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function l(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new p,o=n.domBuilder||new a,s=n.errorHandler,u=n.locator,l=n.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=i(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(c.nbsp=" ",c.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,c):r.errorHandler.error("invalid doc source"),o.doc},a.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;l(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function d(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?h(parseInt(t.substr(1).replace("x","0x"))):(l.error("entity not found:"+e),e)}function m(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,d);E&&y(S),r.characters(n,0,t-S),S=t}}function y(t,n){for(;t>=g&&(n=A.exec(e));)v=n.index,g=v+n[0].length,E.lineNumber++;E.columnNumber=t-v+1}for(var v=0,g=0,A=/.*(?:\r\n?|\n)|.*$/g,E=r.locator,_=[{currentNSMap:t}],T={},S=0;;){try{var N=e.indexOf("<",S);if(N<0){if(!e.substr(S).match(/^\s*$/)){var I=r.doc,b=I.createTextNode(e.substr(S));I.appendChild(b),r.currentElement=b}return}switch(N>S&&m(N),e.charAt(N+1)){case"/":var R=e.indexOf(">",N+3),M=e.substring(N+2,R),C=_.pop();R<0?(M=e.substring(N+2).replace(/[\s<].*/,""),l.error("end tag name: "+M+" is not complete:"+C.tagName),R=N+1+M.length):M.match(/\sS?S=R:m(Math.max(N,S)+1)}}function i(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function a(e,t,n,r,i,a){for(var o,s,u=++t,l=g;;){var p=e.charAt(u);switch(p){case"=":if(l===A)o=e.slice(t,u),l=_;else{if(l!==E)throw new Error("attribute equal must after attrName");l=_}break;case"'":case'"':if(l===_||l===A){if(l===A&&(a.warning('attribute value must after "="'),o=e.slice(t,u)),t=u+1,u=e.indexOf(p,t),!(u>0))throw new Error("attribute value no end '"+p+"' match");s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t-1),l=S}else{if(l!=T)throw new Error('attribute value must after "="');s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t),a.warning('attribute "'+o+'" missed start quot('+p+")!!"),t=u+1,l=S}break;case"/":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:l=I,n.closed=!0;case T:case A:case E:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),l==g&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:break;case T:case A:s=e.slice(t,u),"/"===s.slice(-1)&&(n.closed=!0,s=s.slice(0,-1));case E:l===E&&(s=o),l==T?(a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead!!'),n.add(s,s,t));break;case _:throw new Error("attribute value missed!!")}return u;case"€":p=" ";default:if(p<=" ")switch(l){case g:n.setTagName(e.slice(t,u)),l=N;break;case A:o=e.slice(t,u),l=E;break;case T:var s=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s,t);case S:l=N}else switch(l){case E:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),n.add(o,o,t),t=u,l=A;break;case S:a.warning('attribute space is required"'+o+'"!!');case N:l=A,t=u;break;case _:l=T,t=u;break;case I:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function o(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],s=o.qName,u=o.value,p=s.indexOf(":");if(p>0)var c=o.prefix=s.slice(0,p),f=s.slice(p+1),h="xmlns"===c&&f;else f=s,c=null,h="xmlns"===s&&"";o.localName=f,h!==!1&&(null==i&&(i={},l(n,n={})),n[h]=i[h]=u,o.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(var a=e.length;a--;){o=e[a];var c=o.prefix;c&&("xml"===c&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(o.uri=n[c||""]))}var p=r.indexOf(":");p>0?(c=e.prefix=r.slice(0,p),f=e.localName=r.slice(p+1)):(c=null,f=e.localName=r);var d=e.uri=n[c||""];if(t.startElement(d,f,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(d,f,r),i)for(c in i)t.endPrefixMapping(c)}function s(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function u(e,t,n,r){var i=r[n];return null==i&&(i=e.lastIndexOf(""),i",t+4);return a>t?(n.comment(e,t+4,a-t-4),a+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,a-t-9),n.endCDATA(),a+3}var o=d(e,t),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var u=o[1][0],l=s>3&&/^public$/i.test(o[2][0])&&o[3][0],p=s>4&&o[4][0],c=o[s-1];return n.startDTD(u,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),p&&p.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function c(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function f(e){}function h(e,t){return e.__proto__=t,e}function d(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var m=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=new RegExp("[\\-\\.0-9"+m.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),v=new RegExp("^"+m.source+y.source+"*(?::"+m.source+y.source+"*)?$"),g=0,A=1,E=2,_=3,T=4,S=5,N=6,I=7;n.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),l(t,t={}),r(e,t,n,i,this.errorHandler),i.endDocument()}},f.prototype={setTagName:function(e){if(!v.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!v.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},h({},h.prototype)instanceof h||(h=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),t.XMLReader=n},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){function r(){}var i=e.prototype;if(Object.create){var a=Object.create(t.prototype);i.__proto__=a}i instanceof t||(r.prototype=t.prototype,r=new r,n(i,r),e.prototype=i=r),i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function i(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ie[e]),this.message=ie[e],Error.captureStackTrace&&Error.captureStackTrace(this,i);return n.code=e,t&&(this.message=this.message+": "+t),n}function a(){}function o(e,t){this._node=e,this._refresh=t,s(this)}function s(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);K(e,"length",r.length),n(r,e),e._inc=t}}function u(){}function l(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function p(e,t,n,r){if(r?t[l(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&g(i,e,r),v(i,e,n))}}function c(e,t,n){var r=l(t,n);if(!(r>=0))throw i(oe,new Error(e.tagName+"@"+n));for(var a=t.length-1;r"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function m(e,t){if(t(e))return!0;if(e=e.firstChild)do if(m(e,t))return!0;while(e=e.nextSibling)}function y(){}function v(e,t,n){e&&e._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function g(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete t._nsMap[n.prefix?n.localName:""]}function A(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function E(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,A(e.ownerDocument,e),t}function _(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var o=n?n.previousSibling:e.lastChild;i.previousSibling=o,a.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do i.parentNode=e;while(i!==a&&(i=i.nextSibling));return A(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function T(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,A(e.ownerDocument,e,t),t}function S(){this._nsMap={}}function N(){}function I(){}function b(){}function R(){}function M(){}function C(){}function w(){}function P(){}function L(){}function O(){}function D(){}function U(){}function x(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,a=r.namespaceURI;if(a&&null==i){var i=r.lookupPrefix(a);if(null==i)var o=[{namespace:a,prefix:null}]}return F(this,n,e,t,o),n.join("")}function k(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix==r)return o.namespace!=i}return!0}function F(e,t,n,r,i){if(r){if(e=r(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Y:i||(i=[]);var a=(i.length,e.attributes),o=a.length,s=e.firstChild,u=e.tagName;n=W===e.namespaceURI||n,t.push("<",u);for(var l=0;l"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,i),s=s.nextSibling;else for(;s;)F(s,t,n,r,i),s=s.nextSibling;t.push("")}else t.push("/>");return;case Z:case te:for(var s=e.firstChild;s;)F(s,t,n,r,i),s=s.nextSibling;return;case q:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,d),'"');case G:return t.push(e.data.replace(/[<&]/g,d));case X:return t.push("");case Q:return t.push("");case ee:var m=e.publicId,y=e.systemId;if(t.push("');else if(y&&"."!=y)t.push(' SYSTEM "',y,'">');else{var v=e.internalSubset;v&&t.push(" [",v,"]"),t.push(">")}return;case J:return t.push("");case z:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function B(e,t,n){var r;switch(t.nodeType){case Y:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case q:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(B(e,i,n)),i=i.nextSibling;return r}function V(e,t,n){var r=new t.constructor;for(var i in t){var o=t[i];"object"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new a),r.ownerDocument=e,r.nodeType){case Y:var s=t.attributes,l=r.attributes=new u,p=s.length;l._ownerElement=r;for(var c=0;c0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},n(H,h),n(H,h.prototype),y.prototype={nodeName:"#document",nodeType:Z,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==Y&&(this.documentElement=e),_(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),E(this,e)},importNode:function(e,t){return B(this,e,t)},getElementById:function(e){var t=null;return m(this.documentElement,function(n){if(n.nodeType==Y&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new S;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new a;var n=t.attributes=new u;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new O;return e.ownerDocument=this,e.childNodes=new a,e},createTextNode:function(e){var t=new b;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new R;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new M;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new D;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new N;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new L;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new S,r=t.split(":"),i=n.attributes=new u;return n.childNodes=new a,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new N,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(y,h),S.prototype={nodeType:Y,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):T(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new o(this,function(t){var n=[];return m(t,function(r){r===t||r.nodeType!=Y||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new o(this,function(n){var r=[];return m(n,function(i){i===n||i.nodeType!==Y||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},y.prototype.getElementsByTagName=S.prototype.getElementsByTagName,y.prototype.getElementsByTagNameNS=S.prototype.getElementsByTagNameNS,r(S,h),N.prototype.nodeType=q,r(N,h),I.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ie[ae])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},r(I,h),b.prototype={nodeName:"#text",nodeType:G,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(b,I),R.prototype={nodeName:"#comment",nodeType:Q},r(R,I),M.prototype={nodeName:"#cdata-section",nodeType:X},r(M,I),C.prototype.nodeType=ee,r(C,h),w.prototype.nodeType=ne,r(w,h),P.prototype.nodeType=$,r(P,h),L.prototype.nodeType=z,r(L,h),O.prototype.nodeName="#document-fragment",O.prototype.nodeType=te,r(O,h),D.prototype.nodeType=J,r(D,h),U.prototype.serializeToString=function(e,t,n){return x.call(e,t,n)},h.prototype.toString=x;try{Object.defineProperty&&(Object.defineProperty(o.prototype,"length",{get:function(){return s(this),this.$$length}}),Object.defineProperty(h.prototype,"textContent",{get:function(){return j(this)},set:function(e){switch(this.nodeType){case Y:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),K=function(e,t,n){e["$$"+t]=n})}catch(e){}t.DOMImplementation=f,t.XMLSerializer=U},function(e,t,n){var r,i,a;!function(n,o){i=[e],r=o,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a))}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t,n){var r=e.split(/\n|\r\n?|\f/),i=r[t-1],a=new Array(n).join(" ")+"^";return i+"\n"+a}function a(e){return e>="1"&&e<="9"}function o(e){return e>="0"&&e<="9"}function s(e){return o(e)||e>="a"&&e<="f"||e>="A"&&e<="F"}function u(e){return"e"===e||"E"===e}function l(e,t,n,r){var i=e.charAt(t);if("\r"===i)t++,n++,r=1,"\n"===e.charAt(t)&&t++;else if("\n"===i)t++,n++,r=1;else{if("\t"!==i&&" "!==i)return null;t++,r++}return{index:t,line:n,column:r}}function p(e,t,n,r){var i=e.charAt(t);return i in R?{type:R[i],line:n,column:r+1,index:t+1,value:null}:null}function c(e,t,n,r){for(var i in M)if(M.hasOwnProperty(i)&&e.substr(t,i.length)===i){var a=M[i],o=a.type,s=a.value;return{type:o,line:n,column:r+i.length,index:t+i.length,value:s}}return null}function f(e,t,n,r){for(var i=t,a="",o=C._START_;t0?{type:b.NUMBER,line:n,column:r+s-i,index:s,value:parseFloat(e.substring(i,s))}:null}function d(e,t){for(var n=1,r=1,i=0,a=[];i at "+t+":"+n}},I={cannotTokenizeSymbol:function(e,t,n){return"Cannot tokenize symbol <"+e+"> at "+t+":"+n}},b={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10},R={"{":b.LEFT_BRACE,"}":b.RIGHT_BRACE,"[":b.LEFT_BRACKET,"]":b.RIGHT_BRACKET,":":b.COLON,",":b.COMMA},M={true:{type:b.TRUE,value:!0},false:{type:b.FALSE,value:!1},null:{type:b.NULL,value:null}},C={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},w={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},P={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7},L=[b.STRING,b.NUMBER,b.TRUE,b.FALSE,b.NULL],O={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},D={_START_:0,KEY:1,COLON:2},U={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},x={verbose:!0,source:null},k=function(e,t){t=E({},x,t);var n=d(e,t);0===n.length&&S(N.unexpectedEnd());var r=A(e,n,0,t);if(r.index===n.length)return r.value;var i=n[r.index];S(N.unexpectedToken(e.substring(i.loc.start.offset,i.loc.end.offset),i.loc.start.line,i.loc.start.column),e,i.loc.start.line,i.loc.start.column)};e.exports=k})},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(70),a=n(72),o=n(60),s=function(){function e(e,t,n,r,i){this.entry=e,this.params=t,this.path=n,this.range=r,this.isWarning=i}return e}(),u=function(){function e(){}return e.prototype.validate=function(e){var t=i(e,{verbose:!0}),n=JSON.parse(e),r=[];return this.validateInternal(n,t,r,""),r},e.prototype.validateInternal=function(e,t,n,r){var i=this,a=0==r.length?"":"/"==r.charAt(r.length-1)?r:r+"/";this.doValidate(e,t,a).forEach(function(e){return n.push(e)}),"object"==typeof e&&Object.keys(e).forEach(function(r){var o=e[r];if(null==o||"object"!=typeof o||"properties"!==r&&"patternProperties"!==r)"items"!==r&&"additionalItems"!==r&&"additionalProperties"!=r||i.validateInternal(o,t,n,a+"/"+r);else for(var s=0,u=Object.keys(o);s0?b[b.length-1]:null}function i(e){for(var t;e;)t=e.owner(),e=t instanceof c.InheritedType?t.contextMeta():null;b.push(t)}function a(e){for(void 0===e&&(e=0);b.length>e;)b.pop()}function o(){return b.length}function s(e){e=e.map(function(e){return e.preoptimize()});var t=[];e.forEach(function(e){if(e instanceof y.AndRestriction){var n=e;n.options().forEach(function(e){t.push(e)})}else t.push(e)});for(var n=!0;n;){n=!1;for(var r=0;r0?s.forEach(function(e){var n=h.LIBRARY_CHAINIG_IN_FACET_TYPE,i=o.name();e.value()!=i&&(n=h.LIBRARY_CHAINIG_IN_FACET_TYPE_SUPERTYPE,i=e.value());var a=c.error(n,r,{propName:t,typeName:i});l.push(a)}):(f=c.error(h.UNKNOWN_IN_FACET_DEFINITION,r,{facetName:t,msg:o.name()}),l.push(f)):s.length>0?s.forEach(function(e){var n=h.LIBRARY_CHAINIG_IN_PROPERTY_TYPE,i=o.name();e.value()!=i&&(n=h.LIBRARY_CHAINIG_IN_PROPERTY_TYPE_SUPERTYPE,i=e.value());var a=c.error(n,r,{propName:t,typeName:i});l.push(a)}):(f=c.error(h.UNKNOWN_IN_PROPERTY_DEFINITION,r,{propName:t,typeName:o.name()}),l.push(f)),l.forEach(function(e){return c.setValidationPath(e,{name:t,child:{name:"type"}})}),1==l.length)return l[0];var p=c.ok();return l.forEach(function(e){return p.addSubStatus(e)}),p}if(e.isSubTypeOf(c.RECURRENT))return f=c.error(h.CYCLIC_DEPENDENCY,r,{typeName:e.name()});if(e.isAnonymous()){var f=e.validateType(n);if(!f.isOk()){var d;return d=i?c.error(h.ERROR_IN_FACET_RANGE,r,{facetName:t,msg:f.getMessage()}):c.error(h.ERROR_IN_RANGE,r,{propName:t,msg:f.getMessage()}),f.getErrors().forEach(function(e){d.addSubStatus(e)}),c.setValidationPath(d,{name:t}),d}return f}if(e.isUnion()){var y=m.find(e.typeFamily(),function(e){return c.isUnknown(e)});if(y){var a=void 0;return a=i?c.error(h.UNKNOWN_IN_FACET_DEFINITION,r,{facetName:t,msg:y.name()}):c.error(h.UNKNOWN_IN_PROPERTY_DEFINITION,r,{propName:t,typeName:y.name()}),c.setValidationPath(a,{name:t}),a}}return c.ok()}var p=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var c=n(58),f=n(76),h=c.messageRegistry,d=n(60),m=n(59),y=n(58),v=n(58),g=n(77),A=n(77),E=n(77),_=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return r._type=t,r.optional=n,r}return p(t,e),t.prototype.matches=function(e){return!1},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_MatchesProperty)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_MatchesProperty)},t.prototype.check=function(e,t){throw new Error(h.SHOULD_BE_NEVER_CALLED.message)},t.prototype.patchPath=function(e,t){if(e){for(var n=e,r=null,i=null;n;)if(r){var a={name:n.name};i.child=a,n=n.child,i=a}else r={name:n.name},i=r;return r.child={name:t},r}return{name:t}},t.prototype.validateProp=function(e,t,n,r){var i=e[t],a=n.validate(i,!1,!1);if(!a.isOk()){if(n.isUnknown()||n.isRecurrent()){var o=c.error(h.VALIDATING_AGAINST_UNKNOWN,this,{typeName:n.name()});return c.setValidationPath(o,this.patchPath(r,t)),o}var o=new v.Status(v.Status.OK,"","",this);return a.getErrors().forEach(function(e){return o.addSubStatus(e)}),c.setValidationPath(o,this.patchPath(r,t)),o}return c.ok()},t.prototype.validateSelfIndividual=function(e,t){return l(this._type,this.propId(),t,this,!1)},t.prototype.range=function(){return this._type},t.prototype.isOptional=function(){return this.optional},t.CLASS_IDENTIFIER_MatchesProperty="restrictions.MatchesProperty",t}(c.Constraint);t.MatchesProperty=_;var T=function(e){function t(t,n){var r=e.call(this)||this;return r._value=t,r.provider=n,r}return p(t,e),t.prototype.value=function(){return this._value},t.prototype.check=function(e){var t=null,n=this.value();if("{"==n.charAt(0))try{t=d.getJSONSchema(n,this.provider)}catch(e){if(c.ValidationError.isInstance(e)){var r=e,i=r.isWarning?c.Status.WARNING:c.Status.ERROR,a=c.error(r.messageEntry,this,r.parameters,i,r.parameters);return a}return c.error(h.INCORRECT_SCHEMA,this,{msg:e.message})}if("<"==n.charAt(0))try{t=d.getXMLSchema(n,this.provider)}catch(e){return c.ok()}if(t)try{"string"==typeof e?t.validate(e):t.validateObject(e)}catch(e){if(c.ValidationError.isInstance(e)){var r=e,o=c.Status.ERROR;r.isWarning&&(o=c.Status.WARNING);var s=c.error(r.messageEntry,this,r.parameters,o);if(s.setInternalRange(r.internalRange),s.setInternalPath(c.toValidationPath(r.internalPath)),s.setFilePath(r.filePath),!r.additionalErrors||0==r.additionalErrors.length)return s;var u=c.ok();u.addSubStatus(s);for(var l=0,p=r.additionalErrors;l0)&&i.length>0){var a=new c.Status(c.Status.OK,"","",this);return i.forEach(function(e){var n=c.error(h.UNKNOWN_PROPERTY,t,{propName:e});c.setValidationPath(n,{name:e}),a.addSubStatus(n)}),a}}return c.ok()},t.prototype.composeWith=function(e){if(!this._value)return null;if(e instanceof t){var n=e;if(m.isEqual(this.owner().propertySet(),n.owner().propertySet()))return n}if(e instanceof N){var r=e,i=r.value(),a=this.owner().propertySet();if(a.indexOf(i)==-1)return this.nothing(r)}},t.CLASS_IDENTIFIER_KnownPropertyRestriction="typesystem.KnownPropertyRestriction",t}(c.Constraint);t.KnownPropertyRestriction=S;var N=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n}return p(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_HasProperty)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_HasProperty)},t.prototype.check=function(e){return e&&"object"==typeof e&&!Array.isArray(e)?e.hasOwnProperty(this.name)?c.ok():c.error(h.REQUIRED_PROPERTY_MISSING,this,{propName:this.name}):c.ok()},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.facetName=function(){return"hasProperty"},t.prototype.value=function(){return this.name},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.name===this.name)return this}return null},t.CLASS_IDENTIFIER_HasProperty="restrictions.HasProperty",t}(c.Constraint);t.HasProperty=N;var I=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,n,r)||this;return i.name=t,i.type=n,i}return p(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_PropertyIs)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_PropertyIs)},t.prototype.matches=function(e){return e===this.name},t.prototype.path=function(){return this.name},t.prototype.check=function(e,t){if(e&&"object"==typeof e&&e.hasOwnProperty(this.name)){var n=this.validateProp(e,this.name,this.type,t);return n}return c.ok()},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.propId=function(){return this.name},t.prototype.propertyName=function(){return this.name},t.prototype.facetName=function(){return"propertyIs"},t.prototype.value=function(){return this.type},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.name===this.name){if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;i(e);var r=this.intersect(this.type,n.type);try{var a=r.checkConfluent();if(!a.isOk()){var o=a;return o.toRestriction()}return new t(this.name,r)}finally{this.release(r)}}}return null},t.CLASS_IDENTIFIER_PropertyIs="restrictions.PropertyIs",t}(_);t.PropertyIs=I;var b=[];t.anotherRestrictionComponent=r,t.releaseAnotherRestrictionComponent=a,t.anotherRestrictionComponentsCount=o;var R=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,n,r)||this;return i.regexp=t,i.type=n,i}return p(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_MapPropertyIs)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_MapPropertyIs)},t.prototype.path=function(){return"/"+this.regexp+"/"},t.prototype.matches=function(e){return!!e.match(this.regexp)},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.propId=function(){return"["+this.regexp+"]"},t.prototype.facetName=function(){return"mapPropertyIs"},t.prototype.value=function(){return this.type},t.prototype.regexpValue=function(){return this.regexp},t.prototype.validateSelfIndividual=function(t,n){var r=this.checkValue();return r?c.error(h.INVALID_REGEXP,this,{msg:r}):e.prototype.validateSelfIndividual.call(this,t,n)},t.prototype.checkValue=function(){try{new RegExp(this.regexp)}catch(e){return e.message}return null},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.regexp===this.regexp){if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){var a=i;return a.toRestriction()}return new t(this.regexp,r)}finally{this.release(r)}}}return null},t.prototype.check=function(e,t){if(e&&"object"==typeof e){var n={};null!=this._owner&&this._owner.meta().filter(function(e){return e instanceof I}).forEach(function(e){n[e.propertyName()]=!0});for(var r=new c.Status(c.Status.OK,"","",this),i=0,a=Object.getOwnPropertyNames(e);i0){var i=(this.owner(),m.find(this.requiredTypes(),function(e){return n.checkOwner(e)}));i&&(r=!0)}else r=!0;var a;if(r)a=this.checkValue();else{var o=this.requiredType().name();this.requiredTypes()&&this.requiredTypes().length>0&&(o="["+this.requiredTypes().map(function(e){return e.name()}).join()+"]");var a=c.error(h.FACET_USAGE_RESTRICTION,this,{facetName:this.facetName(),typeNames:o})}if(a&&!a.isOk())return c.setValidationPath(a,{name:this.facetName()}),a;var s=[e,a].filter(function(e){return e&&!e.isOk()});if(0==s.length)return c.ok();if(1==s.length)return s[0];for(var u=c.ok(),l=0,p=s;lt)return this.createError();return c.ok()},t.prototype.createError=function(){return new v.Status(v.Status.ERROR,h.MINMAX_RESTRICTION_VIOLATION.code,this.toString(),this)},t.prototype.minValue=function(){return this._isInt?0:Number.NEGATIVE_INFINITY},t.prototype.requiredType=function(){return this._requiredType},t.prototype.checkValue=function(){return"number"!=typeof this._value?c.error(h.FACET_REQUIRE_NUMBER,this,{facetName:this.facetName()},c.Status.ERROR,!0):this.isIntConstraint()&&!new f.BigNumber(this.value().toString()).isInteger()?c.error(h.FACET_REQUIRE_INTEGER,this,{facetName:this.facetName()},c.Status.ERROR,!0):this.value()n.value()?n:this:this.value()this.value())return this.nothing(e)}else if(n.value()0)i.forEach(function(t){var r=n.type.name(),i=null,a=h.ARRAY_COMPONENT_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN;t.value()!=i&&(a=h.ARRAY_COMPONENT_TYPE_DEPENDES_ON_TYPE_IMPORTED_THROUGH_LIBRARY_CHAIN,i=t.value()),e.addSubStatus(c.error(a,n,{componentTypeName:r,typeName:i}))});else if(this.type.isExternal()){var a=c.error(h.EXTERNAL_AS_COMPONENT,this);a.setValidationPath({name:"items"}),e.addSubStatus(a)}else if(c.isUnknown(this.type)||this.type.isSubTypeOf(c.RECURRENT))e.addSubStatus(c.error(h.UNKNOWN_ARRAY_COMPONENT_TYPE,this,{componentTypeName:this.type.name()}));else if(this.type.isUnion()){var o=m.find(this.type.typeFamily(),function(e){return c.isUnknown(e)});o&&e.addSubStatus(c.error(h.UNKNOWN_ARRAY_COMPONENT_TYPE,this,{componentTypeName:o.name()}))}return e},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){var a=i;return a.toRestriction()}return new t(r)}finally{this.release(r)}}return null},t.prototype.checkValue=function(){return null},t.prototype.value=function(){return this.type},t}(C);t.ComponentShouldBeOfType=K;var j=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return p(t,e),t.prototype.facetName=function(){return"pattern"},t.prototype.requiredType=function(){return c.STRING},t.prototype.check=function(e){if("string"==typeof e){var t=e;try{var n=t.match(this._value),r=!1;if(n)for(var i=0,a=n;i0?new t(r):this.nothing(e,h.NO_COMMON_FILE_TYPES.message)}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){if(!Array.isArray(this._value))return c.error(h.FILE_TYPES_SHOULD_BE_AN_ARRAY,this);for(var e=0,t=this._value;e0){var t=this.owner(),n=m.find(this.requiredTypes(),function(e){return t.isSubTypeOf(e)});if(!n){var r="["+this.requiredTypes().map(function(e){return"'"+e.name()+"'"}).join(", ")+"]";return c.error(h.ENUM_OWNER_TYPES,this,{typeNames:r},c.Status.ERROR,!0)}}if(!Array.isArray(this._value))return c.error(h.ENUM_ARRAY,this,{},c.Status.ERROR,!0);var i=c.ok();this.checkStatus=!0;try{this._value.forEach(function(t,n){var r=e.owner().validate(t);r.isOk()||(c.setValidationPath(r,{name:n}),i.addSubStatus(r))})}finally{this.checkStatus=!1}return i},t.prototype.toString=function(){var e=Array.isArray(this._value)?this._value.map(function(e){return"'"+e+"'"}).join(", "):"'"+this._value+"'";return"value should be one of: "+e},t}(C);t.Enum=Y,t.optimize=s,t.validatePropertyType=l},function(e,t,n){var r;!function(i){"use strict";function a(e){function t(e,r){var i,a,o,s,u,l,p=this;if(!(p instanceof t))return W&&w(26,"constructor call without new",e),new t(e,r);if(null!=r&&H(r,2,64,D,"base")){if(r|=0,l=e+"",10==r)return p=new t(e instanceof t?e:l),P(p,k+p.e+1,F);if((s="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(i="["+T.slice(0,r)+"]+")+"(?:\\."+i+")?$",r<37?"i":"").test(l))return O(p,l,s,r);s?(p.s=1/e<0?(l=l.slice(1),-1):1,W&&l.replace(/^0\.0*|\./,"").length>15&&w(D,_,e),s=!1):p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1,l=n(l,10,r,p.s)}else{if(e instanceof t)return p.s=e.s,p.e=e.e,p.c=(e=e.c)?e.slice():e,void(D=0);if((s="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,o=e;o>=10;o/=10,a++);return p.e=a,p.c=[e],void(D=0)}l=e+""}else{if(!y.test(l=e+""))return O(p,l,s);p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1}}for((a=l.indexOf("."))>-1&&(l=l.replace(".","")),(o=l.search(/e/i))>0?(a<0&&(a=o),a+=+l.slice(o+1),l=l.substring(0,o)):a<0&&(a=l.length),o=0;48===l.charCodeAt(o);o++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(o,u+1))if(u=l.length,s&&W&&u>15&&(e>I||e!==g(e))&&w(D,_,p.s*e),a=a-o-1,a>j)p.c=p.e=null;else if(a=0&&(u=G,G=0,e=e.replace(".",""),d=new t(r),p=d.pow(e.length-m),G=u,d.c=c(h(s(p.c),p.e),10,n),d.e=d.c.length),f=c(e,r,n),o=u=f.length;0==f[--u];f.pop());if(!f[0])return"0";if(m<0?--o:(p.c=f,p.e=o,p.s=i,p=L(p,d,y,v,n),f=p.c,l=p.r,o=p.e),a=o+y+1,m=f[a],u=n/2,l=l||a<0||null!=f[a+1],l=v<4?(null!=m||l)&&(0==v||v==(p.s<0?3:2)):m>u||m==u&&(4==v||l||6==v&&1&f[a-1]||v==(p.s<0?8:7)),a<1||!f[0])e=l?h("1",-y):"0";else{if(f.length=a,l)for(--n;++f[--a]>n;)f[a]=0,a||(++o,f=[1].concat(f));for(u=f.length;!f[--u];);for(m=0,e="";m<=u;e+=T.charAt(f[m++]));e=h(e,o)}return e}function r(e,n,r,i){var a,o,u,l,p;if(r=null!=r&&H(r,0,8,i,E)?0|r:F,!e.c)return e.toString();if(a=e.c[0],u=e.e,null==n)p=s(e.c),p=19==i||24==i&&u<=B?f(p,u):h(p,u);else if(e=P(new t(e),n,r),o=e.e,p=s(e.c),l=p.length,19==i||24==i&&(n<=o||o<=B)){for(;ll){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=o-l,n>0)for(o+1==l&&(p+=".");n--;p+="0");return e.s<0&&a?"-"+p:p}function i(e,n){var r,i,a=0;for(p(e[0])&&(e=e[0]),r=new t(e[0]);++an||e!=d(e))&&w(r,(i||"decimal places")+(en?" out of range":" not an integer"),e),!0}function C(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*N-1)>j?e.c=e.e=null:n=10;s/=10,i++);if(a=t-i,a<0)a+=N,o=t,u=c[l=0],p=u/f[i-o-1]%10|0;else if(l=v((a+1)/N),l>=c.length){if(!r)break e;for(;c.length<=l;c.push(0));u=p=0,i=1,a%=N,o=a-N+1}else{for(u=s=c[l],i=1;s>=10;s/=10,i++);a%=N,o=a-N+i,p=o<0?0:u/f[i-o-1]%10|0}if(r=r||t<0||null!=c[l+1]||(o<0?u:u%f[i-o-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(a>0?o>0?u/f[i-o]:0:c[l-1])%10&1||n==(e.s<0?8:7)),t<1||!c[0])return c.length=0,r?(t-=e.e+1,c[0]=f[(N-t%N)%N],e.e=-t||0):c[0]=e.e=0,e;if(0==a?(c.length=l,s=1,l--):(c.length=l+1,s=f[N-a],c[l]=o>0?g(u/f[i-o]%f[o])*s:0),r)for(;;){if(0==l){for(a=1,o=c[0];o>=10;o/=10,a++);for(o=c[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,c[0]==S&&(c[0]=1));break}if(c[l]+=s,c[l]!=S)break;c[l--]=0,s=1}for(a=c.length;0===c[--a];c.pop());}e.e>j?e.c=e.e=null:e.en)return null!=(e=i[n++])};return o(t="DECIMAL_PLACES")&&H(e,0,M,2,t)&&(k=0|e),r[t]=k,o(t="ROUNDING_MODE")&&H(e,0,8,2,t)&&(F=0|e),r[t]=F,o(t="EXPONENTIAL_AT")&&(p(e)?H(e[0],-M,0,2,t)&&H(e[1],0,M,2,t)&&(B=0|e[0],V=0|e[1]):H(e,-M,M,2,t)&&(B=-(V=0|(e<0?-e:e)))),r[t]=[B,V],o(t="RANGE")&&(p(e)?H(e[0],-M,-1,2,t)&&H(e[1],1,M,2,t)&&(K=0|e[0],j=0|e[1]):H(e,-M,M,2,t)&&(0|e?K=-(j=0|(e<0?-e:e)):W&&w(2,t+" cannot be zero",e))),r[t]=[K,j],o(t="ERRORS")&&(e===!!e||1===e||0===e?(D=0,H=(W=!!e)?m:l):W&&w(2,t+A,e)),r[t]=W,o(t="CRYPTO")&&(e===!0||e===!1||1===e||0===e?e?(e="undefined"==typeof crypto,!e&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?Y=!0:W?w(2,"crypto unavailable",e?void 0:crypto):Y=!1):Y=!1:W&&w(2,t+A,e)),r[t]=Y,o(t="MODULO_MODE")&&H(e,0,9,2,t)&&(q=0|e),r[t]=q,o(t="POW_PRECISION")&&H(e,0,M,2,t)&&(G=0|e),r[t]=G,o(t="FORMAT")&&("object"==typeof e?X=e:W&&w(2,t+" not an object",e)),r[t]=X,r},t.max=function(){return i(arguments,U.lt)},t.min=function(){return i(arguments,U.gt)},t.random=function(){var e=9007199254740992,n=Math.random()*e&2097151?function(){return g(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,i,a,o,s,u=0,l=[],p=new t(x);if(e=null!=e&&H(e,0,M,14)?0|e:k,o=v(e/N),Y)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));u>>11),s>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),r[u]=i[0],r[u+1]=i[1]):(l.push(s%1e14),u+=2);u=o/2}else if(crypto.randomBytes){for(r=crypto.randomBytes(o*=7);u=9e15?crypto.randomBytes(7).copy(r,u):(l.push(s%1e14),u+=7);u=o/7}else Y=!1,W&&w(14,"crypto unavailable",crypto);if(!Y)for(;u=10;s/=10,u++);ur?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(i,a,s,u,l){var p,c,f,h,d,m,y,v,A,E,_,T,I,b,R,M,C,w=i.s==a.s?1:-1,L=i.c,O=a.c;if(!(L&&L[0]&&O&&O[0]))return new t(i.s&&a.s&&(L?!O||L[0]!=O[0]:O)?L&&0==L[0]||!O?0*w:w/0:NaN);for(v=new t(w),A=v.c=[],c=i.e-a.e,w=s+c+1,l||(l=S,c=o(i.e/N)-o(a.e/N),w=w/N|0),f=0;O[f]==(L[f]||0);f++);if(O[f]>(L[f]||0)&&c--,w<0)A.push(1),h=!0;else{for(b=L.length,M=O.length,f=0,w+=2,d=g(l/(O[0]+1)),d>1&&(O=e(O,d,l),L=e(L,d,l),M=O.length,b=L.length),I=M,E=L.slice(0,M),_=E.length;_=l/2&&R++;do{if(d=0,p=n(O,E,M,_),p<0){if(T=E[0],M!=_&&(T=T*l+(E[1]||0)),d=g(T/R),d>1)for(d>=l&&(d=l-1),m=e(O,d,l),y=m.length,_=E.length;1==n(m,E,y,_);)d--,r(m,M=10;w/=10,f++);P(v,s+(v.e=f+c*N-1)+1,u,h)}else v.e=c,v.r=+h;return v}}(),O=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,u,l){var p,c=u?s:s.replace(a,"");if(i.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!u&&(c=c.replace(e,function(e,t,n){return p="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=p?e:t}),l&&(p=l,c=c.replace(n,"$1").replace(r,"0.$1")),s!=c))return new t(c,p);W&&w(D,"not a"+(l?" base "+l:"")+" number",s),o.s=null}o.c=o.e=null,D=0}}(),U.absoluteValue=U.abs=function(){var e=new t(this);return e.s<0&&(e.s=1),e},U.ceil=function(){return P(new t(this),this.e+1,2)},U.comparedTo=U.cmp=function(e,n){return D=1,u(this,new t(e,n))},U.decimalPlaces=U.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-o(this.e/N))*N,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},U.dividedBy=U.div=function(e,n){return D=3,L(this,new t(e,n),k,F)},U.dividedToIntegerBy=U.divToInt=function(e,n){return D=4,L(this,new t(e,n),0,1)},U.equals=U.eq=function(e,n){return D=5,0===u(this,new t(e,n))},U.floor=function(){return P(new t(this),this.e+1,3)},U.greaterThan=U.gt=function(e,n){return D=6,u(this,new t(e,n))>0},U.greaterThanOrEqualTo=U.gte=function(e,n){return D=7,1===(n=u(this,new t(e,n)))||0===n},U.isFinite=function(){return!!this.c},U.isInteger=U.isInt=function(){return!!this.c&&o(this.e/N)>this.c.length-2},U.isNaN=function(){return!this.s},U.isNegative=U.isNeg=function(){return this.s<0},U.isZero=function(){return!!this.c&&0==this.c[0]},U.lessThan=U.lt=function(e,n){return D=8,u(this,new t(e,n))<0},U.lessThanOrEqualTo=U.lte=function(e,n){return D=9,(n=u(this,new t(e,n)))===-1||0===n},U.minus=U.sub=function(e,n){var r,i,a,s,u=this,l=u.s;if(D=10,e=new t(e,n),n=e.s,!l||!n)return new t(NaN);if(l!=n)return e.s=-n,u.plus(e);var p=u.e/N,c=e.e/N,f=u.c,h=e.c;if(!p||!c){if(!f||!h)return f?(e.s=-n,e):new t(h?u:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-n,e):new t(f[0]?u:3==F?-0:0)}if(p=o(p),c=o(c), +f=f.slice(),l=p-c){for((s=l<0)?(l=-l,a=f):(c=p,a=h),a.reverse(),n=l;n--;a.push(0));a.reverse()}else for(i=(s=(l=f.length)<(n=h.length))?l:n,l=n=0;n0)for(;n--;f[r++]=0);for(n=S-1;i>l;){if(f[--i]0?(u=s,r=p):(a=-a,r=l),r.reverse();a--;r.push(0));r.reverse()}for(a=l.length,n=p.length,a-n<0&&(r=p,p=l,l=r,n=a),a=0;n;)a=(l[--n]=l[n]+p[n]+a)/S|0,l[n]=S===l[n]?0:l[n]%S;return a&&(l=[a].concat(l),++u),C(e,l,u)},U.precision=U.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(W&&w(13,"argument"+A,e),e!=!!e&&(e=null)),!i)return null;if(n=i.length-1,t=n*N+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},U.round=function(e,n){var r=new t(this);return(null==e||H(e,0,M,15))&&P(r,~~e+this.e+1,null!=n&&H(n,0,8,15,E)?0|n:F),r},U.shift=function(e){var n=this;return H(e,-I,I,16,"argument")?n.times("1e"+d(e)):new t(n.c&&n.c[0]&&(e<-I||e>I)?n.s*(e<0?0:1/0):n)},U.squareRoot=U.sqrt=function(){var e,n,r,i,a,u=this,l=u.c,p=u.s,c=u.e,f=k+4,h=new t("0.5");if(1!==p||!l||!l[0])return new t(!p||p<0&&(!l||l[0])?NaN:l?u:1/0);if(p=Math.sqrt(+u),0==p||p==1/0?(n=s(l),(n.length+c)%2==0&&(n+="0"),p=Math.sqrt(n),c=o((c+1)/2)-(c<0||c%2),p==1/0?n="1e"+c:(n=p.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),r=new t(n)):r=new t(p+""),r.c[0])for(c=r.e,p=c+f,p<3&&(p=0);;)if(a=r,r=h.times(a.plus(L(u,a,f,1))),s(a.c).slice(0,p)===(n=s(r.c)).slice(0,p)){if(r.e=0;){for(r=0,d=_[a]%g,m=_[a]/g|0,u=p,s=a+u;s>a;)c=E[--u]%g,f=E[u]/g|0,l=m*c+f*d,c=d*c+l%g*g+y[s]+r,r=(c/v|0)+(l/g|0)+m*f,y[s--]=c%v;y[s]=r}return r?++i:y.splice(0,1),C(e,y,i)},U.toDigits=function(e,n){var r=new t(this);return e=null!=e&&H(e,1,M,18,"precision")?0|e:null,n=null!=n&&H(n,0,8,18,E)?0|n:F,e?P(r,e,n):r},U.toExponential=function(e,t){return r(this,null!=e&&H(e,0,M,19)?~~e+1:null,t,19)},U.toFixed=function(e,t){return r(this,null!=e&&H(e,0,M,20)?~~e+this.e+1:null,t,20)},U.toFormat=function(e,t){var n=r(this,null!=e&&H(e,0,M,21)?~~e+this.e+1:null,t,21);if(this.c){var i,a=n.split("."),o=+X.groupSize,s=+X.secondaryGroupSize,u=X.groupSeparator,l=a[0],p=a[1],c=this.s<0,f=c?l.slice(1):l,h=f.length;if(s&&(i=o,o=s,s=i,h-=i),o>0&&h>0){for(i=h%o||o,l=f.substr(0,i);i0&&(l+=u+f.slice(i)),c&&(l="-"+l)}n=p?l+X.decimalSeparator+((s=+X.fractionGroupSize)?p.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+X.fractionGroupSeparator):p):l}return n},U.toFraction=function(e){var n,r,i,a,o,u,l,p,c,f=W,h=this,d=h.c,m=new t(x),y=r=new t(x),v=l=new t(x);if(null!=e&&(W=!1,u=new t(e),W=f,(f=u.isInt())&&!u.lt(x)||(W&&w(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&u.c&&P(u,u.e+1,1).gte(x)?u:null)),!d)return h.toString();for(c=s(d),a=m.e=c.length-h.e-1,m.c[0]=b[(o=a%N)<0?N+o:o],e=!e||u.cmp(m)>0?a>0?m:y:u,o=j,j=1/0,u=new t(c),l.c[0]=0;p=L(u,m,0,1),i=r.plus(p.times(v)),1!=i.cmp(e);)r=v,v=i,y=l.plus(p.times(i=y)),l=i,m=u.minus(p.times(i=m)),u=i;return i=L(e.minus(r),v,0,1),l=l.plus(i.times(y)),r=r.plus(i.times(v)),l.s=y.s=h.s,a*=2,n=L(y,v,a,F).minus(h).abs().cmp(L(l,r,a,F).minus(h).abs())<1?[y.toString(),v.toString()]:[l.toString(),r.toString()],j=o,n},U.toNumber=function(){return+this},U.toPower=U.pow=function(e,n){var r,i,a,o=g(e<0?-e:+e),s=this;if(null!=n&&(D=23,n=new t(n)),!H(e,-I,I,23,"exponent")&&(!isFinite(e)||o>I&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+s,e),new t(n?r%n:r);for(n?e>1&&s.gt(x)&&s.isInt()&&n.gt(x)&&n.isInt()?s=s.mod(n):(a=n,n=null):G&&(r=v(G/N+2)),i=new t(x);;){if(o%2){if(i=i.times(s),!i.c)break;r?i.c.length>r&&(i.c.length=r):n&&(i=i.mod(n))}if(o=g(o/2),!o)break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):n&&(s=s.mod(n))}return n?i:(e<0&&(i=x.div(i)),a?i.mod(a):r?P(i,G,F):i)},U.toPrecision=function(e,t){return r(this,null!=e&&H(e,1,M,24,"precision")?0|e:null,t,24)},U.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(t=s(r.c),t=null!=e&&H(e,2,64,25,"base")?n(h(t,a),0|e,10,i):a<=B||a>=V?f(t,a):h(t,a),i<0&&r.c[0]&&(t="-"+t)),t},U.truncated=U.trunc=function(){return P(new t(this),this.e+1,1)},U.valueOf=U.toJSON=function(){var e,t=this,n=t.e;return null===n?t.toString():(e=s(t.c),e=n<=B||n>=V?f(e,n):h(e,n),t.s<0?"-"+e:e)},U.isBigNumber=!0,null!=e&&t.config(e),t}function o(e){var t=0|e;return e>0||e===t?t:t-1}function s(e){for(var t,n,r=1,i=e.length,a=e[0]+"";rl^n?1:-1;for(s=(u=i.length)<(l=a.length)?u:l,o=0;oa[o]^n?1:-1;return u==l?0:u>l^n?1:-1}function l(e,t,n){return(e=d(e))>=t&&e<=n}function p(e){return"[object Array]"==Object.prototype.toString.call(e)}function c(e,t,n){for(var r,i,a=[0],o=0,s=e.length;on-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/n|0,a[r]%=n)}return a.reverse()}function f(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function h(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(n=e.length,++t>n){for(r="0",t-=n;--t;r+="0");e+=r}else t0){var l=[],f=s.filter(function(e){var t=e.value();return Array.isArray(t)?(l=l.concat(t),t.indexOf(u)>=0):(l.push(t),t==u)});if(0==f.length){var h=l.map(function(e){return"'"+e+"'"}).join(", "),d=p.error(c.INVALID_ANNOTATION_LOCATION,this,{aName:e.prototype.facetName.call(this),aValues:h});a.addSubStatus(d)}}var m,y=r.metaOfType(_);if(y.length>0&&p.isUnknown(r)&&n.getByChain(r.name())){var v=y[0].value();m=p.error(c.LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE,this,{typeName:this.facetName(),chainedType:v})}else{var g=r.validateDirect(o,!0,!1);g.isOk()||(m=p.error(c.INVALID_ANNOTATION_VALUE,this,{msg:g.getMessage()}),m.addSubStatus(g))}return m&&a.addSubStatus(m),p.setValidationPath(a,{name:this.path}),a},t.prototype.kind=function(){return v.MetaInformationKind.Annotation},t.prototype.ownerFacet=function(){return this._ownerFacet},t.prototype.setOwnerFacet=function(e){this._ownerFacet=e},t.prototype.getPath=function(){return this.path},t}(g);t.Annotation=b;var R=function(e){function t(t,n,r,i){void 0===i&&(i=!1);var a=e.call(this,t,n,!0)||this;return a.name=t,a._type=n,a.optional=r,a.builtIn=i,a}return l(t,e),t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_FacetDeclaration)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&m.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_FacetDeclaration)},t.prototype.actualName=function(){return"?"==this.name.charAt(this.name.length-1)?this.name.substr(0,this.name.length-1):this.name},t.prototype.isOptional=function(){return this.optional},t.prototype.type=function(){return this._type},t.prototype.kind=function(){return v.MetaInformationKind.FacetDeclaration},t.prototype.isBuiltIn=function(){return this.builtIn},t.prototype.validateSelfIndividual=function(e,t){return d.validatePropertyType(this._type,this.name,t,this,!1)},t.CLASS_IDENTIFIER_FacetDeclaration="metainfo.FacetDeclaration",t}(g);t.FacetDeclaration=R;var M=function(e){function t(t,n){return e.call(this,t,n,!0)||this}return l(t,e),t.prototype.kind=function(){return v.MetaInformationKind.CustomFacet},t}(g);t.CustomFacet=M;var C=function(e){function t(t){return e.call(this,"example",t)||this}return l(t,e),t.prototype.validateSelfIndividual=function(e,t){var n=p.ok();n.addSubStatus(this.validateValue(t));var r=this.validateAnnotations(t);return p.setValidationPath(r,{name:this.facetName()}),n.addSubStatus(r),n},t.prototype.validateValue=function(e){if(!this.owner().oneMeta(S)){var t=this.value(),n=!1,r=p.ok();if("object"==typeof t&&t&&t.hasOwnProperty("value")){if(o(t,null,e,r,this.facetName()),t.strict===!1||t.strict&&"object"==typeof t.strict&&t.strict.value===!1)return r;t=t.value,n=!0}var a=t;if(a=i(t,this.owner()),a instanceof p.Status&&!a.isOk())return p.setValidationPath(a,{name:"example"}),r.addSubStatus(a),r;var s=this.owner().validateDirect(a,!0,!1);if(!s.isOk()){"string"==typeof this.value();var u=p.error(c.INVALID_EXMAPLE,this,{msg:s.getMessage()});s.getErrors().forEach(function(e){u.addSubStatus(e),n?p.setValidationPath(e,{name:"example",child:{name:"value"}}):p.setValidationPath(e,{name:"example"})}),r.addSubStatus(u)}return r}},t.prototype.validateAnnotations=function(e){var t=p.ok(),n=this.value();if("object"==typeof n&&n&&n.value)for(var r=Object.keys(n).filter(function(e){return e.length>2&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)}),i=0,a=r;i0&&d.forEach(function(e){return u[e.value()]=!0})}var m=e[o];if(!u[m]){var y=p.error(f.Status.CODE_INCORRECT_DISCRIMINATOR,this,{rootType:r.name(),value:m,propName:o},f.Status.WARNING);return p.setValidationPath(y,{name:o,child:n}),y}return p.ok()}var v=p.error(f.Status.CODE_MISSING_DISCRIMINATOR,this,{rootType:r.name(),propName:o});return p.setValidationPath(v,n),v}return p.ok()},t.prototype.facetName=function(){return"discriminatorValue"},t.prototype.validateSelfIndividual=function(e,t){if(this.strict){var n=this.owner().oneMeta(V);if(this.owner().isSubTypeOf(p.OBJECT))if(this.owner().getExtra(p.GLOBAL)===!1)e.addSubStatus(p.error(c.DISCRIMINATOR_FOR_INLINE,this));else if(n){var r=m.find(this.owner().meta(),function(e){return e instanceof h.PropertyIs&&e.propertyName()==n.value()});if(r){var i=r.value().validate(this.value());i.isOk()||e.addSubStatus(p.error(c.INVALID_DISCRIMINATOR_VALUE,this,{msg:i.getMessage()}))}}else e.addSubStatus(p.error(c.DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR,this));else e.addSubStatus(p.error(c.DISCRIMINATOR_FOR_OBJECT,this))}return e.getValidationPath()||p.setValidationPath(e,{name:this.facetName()}),e},t.prototype.requiredType=function(){return p.OBJECT},t.prototype.value=function(){return this._value},t.prototype.kind=function(){return v.MetaInformationKind.DiscriminatorValue},t.prototype.isStrict=function(){return this.strict},t.CLASS_IDENTIFIER_DiscriminatorValue="metainfo.DiscriminatorValue",t}(p.Constraint);t.DiscriminatorValue=K;var j=[{propName:"strict",propType:"boolean",messageEntry:c.STRICT_BOOLEAN},{propName:"displayName",propType:"string",messageEntry:c.DISPLAY_NAME_STRING},{propName:"description",propType:"string",messageEntry:c.DESCRIPTION_STRING}]},function(e,t,n){"use strict";function r(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=!0);for(var i="<"+e,a=0;a0&&Object.keys(t).forEach(function(e){"string"==typeof t[e]&&(i=i+" "+e+'="'+t[e]+'"')}),i=i+">"+(r?"\n":"")}function i(e,t){void 0===t&&(t=0);for(var n="-1;r++)n=" "+n;var n=(t>-1?"\n":"")+n+">\n";return n}function a(e,t){t=h(t);var n=C(t),a=T(t),s=r(n,o(e,a)),u={};if(u[n]=e,t.isArray()){t.meta().filter(function(e){return e instanceof x.ComponentShouldBeOfType})[0];s+=p(u,t,1,!0)}else s+=l(e,a,1);var s=s+i(n);return s}function o(e,t){var n={},r=U.filter(t,function(e){return w(e.value()).attribute});return r.forEach(function(t){var r=t.propId(),i=M(t);e[r]&&(n[i]=e[r].toString())}),n}function s(e,t,n){var a=Object.keys(e)[0],p=e[a],c=null;if(t.isScalar()){var f=T(t);c=r(a,o(p,f),n,!t.isScalar())+p.toString()}else{if(t.isUnion())return s(e,u(p,t),n);var f=T(t);c=r(a,o(p,f),n,!t.isScalar())+l(p,f,n+1)}return c+=i(a,t.isScalar()?-1:n)}function u(e,t){var n=t.typeFamily(),r=[],i=null;return n.forEach(function(t){var n=a(e,t);if(n){var i=c(n,t);if(i){var o=f(i);r.push({type:t,errors:o&&o.length||0})}}}),i=r.length>0?r[0]:{type:n[0]},r.forEach(function(e){e.errors0&&t[0].value()}function M(e){var t=w(e.value()),n=e.propId(),r=t.name||n;return t.namespace&&(r=t.namespace+":"+r),(t.prefix||"")+r}function C(e){var t=w(e),n=e.name();""===n&&e.isUnion()&&(n="object");var r=t.name||n;return(t.prefix||"")+r; +}function w(e){var t=e.meta().filter(function(e){return e instanceof k.XMLInfo}).map(function(e){return e})[0],n={attribute:!1,wrapped:!1,name:!1,namespace:!1,prefix:!1};if(!t)return n;var r=t.value();return r?(Object.keys(n).forEach(function(e){n[e]=r[e]||n[e]}),n):n}function P(e,t,n){if(void 0===n&&(n=[]),"object"==typeof t){var r=P(e,t._);return delete t._,_(t,n,[],[],!0),r}if(!t&&""!==t.trim())return null;if(e.isNumber()){var i=parseFloat(t);if(!isNaN(i))return i}if(e.isBoolean()){if("true"===t)return!0;if("false"===t)return!1}return"string"==typeof t?t:null}function L(e){return!!e&&("object"==typeof e&&"number"==typeof e.length)}Object.defineProperty(t,"__esModule",{value:!0});var O=n(79),D=n(58),U=n(59),x=n(75),k=n(77),F=n(58);t.messageRegistry=n(72);var B="@unexpected_root_attributes_and_elements",V=["application/x-www-form-urlencoded","application/json","application/xml","multipart/form-data"];t.serializeToXML=a,t.readObject=c,t.getXmlErrors=f},function(e,t,n){(function(){"use strict";var e,r,i,a,o=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty;r=n(80),e=n(81),i=n(104),a=n(134),t.defaults=r.defaults,t.processors=a,t.ValidationError=function(e){function t(e){this.message=e}return o(t,e),t}(Error),t.Builder=e.Builder,t.Parser=i.Parser,t.parseString=i.parseString}).call(this)},function(e,t){(function(){t.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},function(e,t,n){(function(){"use strict";var e,r,i,a,o,s={}.hasOwnProperty;e=n(82),r=n(80).defaults,a=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},o=function(e){return""},i=function(e){return e.replace("]]>","]]]]>")},t.Builder=function(){function t(e){var t,n,i;this.options={},n=r[.2];for(t in n)s.call(n,t)&&(i=n[t],this.options[t]=i);for(t in e)s.call(e,t)&&(i=e[t],this.options[t]=i)}return t.prototype.buildObject=function(t){var n,i,u,l,p;return n=this.options.attrkey,i=this.options.charkey,1===Object.keys(t).length&&this.options.rootName===r[.2].rootName?(p=Object.keys(t)[0],t=t[p]):p=this.options.rootName,u=function(e){return function(t,r){var l,p,c,f,h,d;if("object"!=typeof r)e.options.cdata&&a(r)?t.raw(o(r)):t.txt(r);else if(Array.isArray(r)){for(f in r)if(s.call(r,f)){p=r[f];for(h in p)c=p[h],t=u(t.ele(h),c).up()}}else for(h in r)if(s.call(r,h))if(p=r[h],h===n){if("object"==typeof p)for(l in p)d=p[l],t=t.att(l,d)}else if(h===i)t=e.options.cdata&&a(p)?t.raw(o(p)):t.txt(p);else if(Array.isArray(p))for(f in p)s.call(p,f)&&(c=p[f],t="string"==typeof c?e.options.cdata&&a(c)?t.ele(h).raw(o(c)).up():t.ele(h,c).up():u(t.ele(h),c).up());else"object"==typeof p?t=u(t.ele(h),p).up():"string"==typeof p&&e.options.cdata&&a(p)?t=t.ele(h).raw(o(p)).up():(null==p&&(p=""),t=t.ele(h,p.toString()).up());return t}}(this),l=e.create(p,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(l,t).end(this.options.renderOpts)},t}()}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u;u=n(83),o=u.assign,s=u.isFunction,t=n(84),r=n(102),a=n(100),i=n(103),e.exports.create=function(e,n,r,i){var a,s;if(null==e)throw new Error("Root element needs a name");return i=o({},n,r,i),a=new t(i),s=a.element(e),i.headless||(a.declaration(i),null==i.pubID&&null==i.sysID||a.doctype(i)),s},e.exports.begin=function(e,n,i){var a;return s(e)&&(a=[e,n],n=a[0],i=a[1],e={}),n?new r(e,n,i):new t(e)},e.exports.stringWriter=function(e){return new a(e)},e.exports.streamWriter=function(e,t){return new i(e,t)}}).call(this)},function(e,t){(function(){var t,n,r,i,a,o,s=[].slice,u={}.hasOwnProperty;t=function(){var e,t,n,r,a,o;if(o=arguments[0],a=2<=arguments.length?s.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(e=0,n=a.length;e","]]]]>"),this.assertLegalChar(e)},e.prototype.comment=function(e){if(e=""+e||"",e.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return""+e||""},e.prototype.attName=function(e){return e=""+e||""},e.prototype.attValue=function(e){return e=""+e||"",this.attEscape(e)},e.prototype.insTarget=function(e){return""+e||""},e.prototype.insValue=function(e){if(e=""+e||"",e.match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return e},e.prototype.xmlVersion=function(e){if(e=""+e||"",!e.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},e.prototype.xmlEncoding=function(e){if(e=""+e||"",!e.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/))throw new Error("Invalid encoding: "+e);return e},e.prototype.xmlStandalone=function(e){return e?"yes":"no"},e.prototype.dtdPubID=function(e){return""+e||""},e.prototype.dtdSysID=function(e){return""+e||""},e.prototype.dtdElementValue=function(e){return""+e||""},e.prototype.dtdAttType=function(e){return""+e||""},e.prototype.dtdAttDefault=function(e){return null!=e?""+e||"":e},e.prototype.dtdEntityValue=function(e){return""+e||""},e.prototype.dtdNData=function(e){return""+e||""},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(e){var t;if(t=e.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+e+" at index "+t.index);return e},e.prototype.elEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(//g,">").replace(/\r/g," ")},e.prototype.attEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(/"+this.newline},n.prototype.comment=function(e,t){return this.space(t)+""+this.newline},n.prototype.declaration=function(e,t){var n;return n=this.space(t),n+='",n+=this.newline},n.prototype.docType=function(e,n){var u,l,p,f,h;if(n||(n=0),f=this.space(n),f+="0){for(f+=" [",f+=this.newline,h=e.children,l=0,p=h.length;l",f+=this.newline},n.prototype.element=function(e,n){var i,a,o,s,u,l,h,m,y,g,A,E,_;n||(n=0),_=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),E=this.space(n),m="",m+=E+"<"+e.name,y=e.attributes;for(h in y)v.call(y,h)&&(i=y[h],m+=this.attribute(i));if(0===e.children.length||e.children.every(function(e){return""===e.value}))m+=this.allowEmpty?">"+this.newline:this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)m+=">",m+=e.children[0].value,m+=""+this.newline;else{if(this.dontprettytextnodes)for(g=e.children,o=0,u=g.length;o"+this.newline,A=e.children,s=0,l=A.length;s"+this.newline}return m},n.prototype.processingInstruction=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.raw=function(e,t){return this.space(t)+e.value+this.newline},n.prototype.text=function(e,t){return this.space(t)+e.value+this.newline},n.prototype.dtdAttList=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.dtdElement=function(e,t){return this.space(t)+""+this.newline},n.prototype.dtdEntity=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.dtdNotation=function(e,t){var n;return n=this.space(t)+""+this.newline},n.prototype.openNode=function(e,t){var n,r,i,a;if(t||(t=0),e instanceof p){i=this.space(t)+"<"+e.name,a=e.attributes;for(r in a)v.call(a,r)&&(n=a[r],i+=this.attribute(n));return i+=(e.children?">":"/>")+this.newline}return i=this.space(t)+"")+this.newline},n.prototype.closeNode=function(e,t){ +switch(t||(t=0),!1){case!(e instanceof p):return this.space(t)+""+this.newline;case!(e instanceof l):return this.space(t)+"]>"+this.newline}},n}(m)}).call(this)},function(e,t){(function(){var t,n={}.hasOwnProperty;e.exports=t=function(){function e(e){var t,r,i,a,o,s,u,l,p;e||(e={}),this.pretty=e.pretty||!1,this.allowEmpty=null!=(r=e.allowEmpty)&&r,this.pretty?(this.indent=null!=(i=e.indent)?i:" ",this.newline=null!=(a=e.newline)?a:"\n",this.offset=null!=(o=e.offset)?o:0,this.dontprettytextnodes=null!=(s=e.dontprettytextnodes)?s:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=null!=(u=e.spacebeforeslash)?u:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,l=e.writer||{};for(t in l)n.call(l,t)&&(p=l[t],this[t]=p)}return e.prototype.set=function(e){var t,r,i;e||(e={}),"pretty"in e&&(this.pretty=e.pretty),"allowEmpty"in e&&(this.allowEmpty=e.allowEmpty),this.pretty?(this.indent="indent"in e?e.indent:" ",this.newline="newline"in e?e.newline:"\n",this.offset="offset"in e?e.offset:0,this.dontprettytextnodes="dontprettytextnodes"in e?e.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in e?e.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,r=e.writer||{};for(t in r)n.call(r,t)&&(i=r[t],this[t]=i);return this},e.prototype.space=function(e){var t;return this.pretty?(t=(e||0)+this.offset+1,t>0?new Array(t).join(this.indent):""):""},e}()}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u,l,p,c,f,h,d,m,y,v,g,A,E,_,T={}.hasOwnProperty;_=n(83),A=_.isObject,g=_.isFunction,E=_.isPlainObject,f=n(86),r=n(88),i=n(89),d=n(96),v=n(97),h=n(98),l=n(90),p=n(91),a=n(92),s=n(93),o=n(94),u=n(95),t=n(87),y=n(99),m=n(100),e.exports=c=function(){function e(e,t,n){var r;e||(e={}),e.writer?E(e.writer)&&(r=e.writer,e.writer=new m(r)):e.writer=new m(e),this.options=e,this.writer=e.writer,this.stringify=new y(e),this.onDataCallback=t||function(){},this.onEndCallback=n||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.node=function(e,t,n){var r;if(null==e)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),e=e.valueOf(),null==t&&(t={}),t=t.valueOf(),A(t)||(r=[t,n],n=r[0],t=r[1]),this.currentNode=new f(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},e.prototype.element=function(e,t,n){return this.currentNode&&this.currentNode instanceof p?this.dtdElement.apply(this,arguments):this.node(e,t,n)},e.prototype.attribute=function(e,n){var r,i;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(null!=e&&(e=e.valueOf()),A(e))for(r in e)T.call(e,r)&&(i=e[r],this.attribute(r,i));else g(n)&&(n=n.apply()),this.options.skipNullAttributes&&null==n||(this.currentNode.attributes[e]=new t(this,e,n));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new v(this,e),this.onData(this.writer.text(t,this.currentLevel+1)),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new r(this,e),this.onData(this.writer.cdata(t,this.currentLevel+1)),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new i(this,e),this.onData(this.writer.comment(t,this.currentLevel+1)),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new d(this,e),this.onData(this.writer.raw(t,this.currentLevel+1)),this},e.prototype.instruction=function(e,t){var n,r,i,a,o;if(this.openCurrent(),null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),Array.isArray(e))for(n=0,a=e.length;n=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){if(!e.isOpen)return!this.root&&0===this.currentLevel&&e instanceof f&&(this.root=e),this.onData(this.writer.openNode(e,this.currentLevel)),e.isOpen=!0},e.prototype.closeNode=function(e){if(!e.isClosed)return this.onData(this.writer.closeNode(e,this.currentLevel)),e.isClosed=!0},e.prototype.onData=function(e){return this.documentStarted=!0,this.onDataCallback(e)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.dtd=function(e,t,n){return this.doctype(e,t,n)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode instanceof p?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode instanceof p?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e}()}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u,l,p,c,f,h,d,m,y=function(e,t){function n(){this.constructor=e}for(var r in t)v.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},v={}.hasOwnProperty;u=n(90),l=n(91),t=n(88),r=n(89),p=n(86),f=n(96),d=n(97),c=n(98),i=n(92),a=n(94),o=n(93),s=n(95),m=n(101),e.exports=h=function(e){function n(e,t){this.stream=e,n.__super__.constructor.call(this,t)}return y(n,e),n.prototype.document=function(e){var t,n,i,a,o,s,p,f;for(s=e.children,n=0,a=s.length;n"+this.endline(e))},n.prototype.comment=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.declaration=function(e,t){return this.stream.write(this.space(t)),this.stream.write('"),this.stream.write(this.endline(e))},n.prototype.docType=function(e,n){var u,l,p,f;if(n||(n=0),this.stream.write(this.space(n)),this.stream.write("0){for(this.stream.write(" ["),this.stream.write(this.endline(e)),f=e.children,l=0,p=f.length;l"),this.stream.write(this.endline(e))},n.prototype.element=function(e,n){var i,a,o,s,u,l,h,m;n||(n=0),m=this.space(n),this.stream.write(m+"<"+e.name),l=e.attributes;for(u in l)v.call(l,u)&&(i=l[u],this.attribute(i));if(0===e.children.length||e.children.every(function(e){return""===e.value}))this.allowEmpty?this.stream.write(">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)this.stream.write(">"),this.stream.write(e.children[0].value),this.stream.write("");else{for(this.stream.write(">"+this.newline),h=e.children,o=0,s=h.length;o")}return this.stream.write(this.endline(e))},n.prototype.processingInstruction=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.raw=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},n.prototype.text=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},n.prototype.dtdAttList=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.dtdElement=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.dtdEntity=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.dtdNotation=function(e,t){return this.stream.write(this.space(t)+""+this.endline(e))},n.prototype.endline=function(e){return e.isLastRootNode?"":this.newline},n}(m)}).call(this)},function(e,t,n){(function(){"use strict";var e,r,i,a,o,s,u,l,p=function(e,t){return function(){return e.apply(t,arguments)}},c=function(e,t){function n(){this.constructor=e}for(var r in t)f.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},f={}.hasOwnProperty;u=n(105),i=n(107),e=n(133),s=n(134),l=n(122).setImmediate,r=n(80).defaults,a=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},o=function(e,t,n){var r,i,a;for(r=0,i=e.length;r0&&(u[e.options.childkey]=p),p=u;return r.length>0?e.assignOrPush(d,l,p):(e.options.explicitRoot&&(h=p,p={},p[l]=h),e.resultObject=p,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),n=function(e){return function(n){var i,a;if(a=r[r.length-1])return a[t]+=n,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(a[e.options.childkey]=a[e.options.childkey]||[],i={"#name":"__text__"},i[t]=n,e.options.normalize&&(i[t]=i[t].replace(/\s{2,}/g," ").trim()),a[e.options.childkey].push(i)),a}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(e){return function(e){var t;if(t=n(e))return t.cdata=!0}}(this)},i.prototype.parseString=function(t,n){var r;null!=n&&"function"==typeof n&&(this.on("end",function(e){return this.reset(),n(null,e)}),this.on("error",function(e){return this.reset(),n(e)}));try{return t=t.toString(),""===t.trim()?(this.emit("end",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,l(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(e){if(r=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},i}(i.EventEmitter),t.parseString=function(e,n,r){var i,a,o;return null!=r?("function"==typeof r&&(i=r),"object"==typeof n&&(a=n)):("function"==typeof n&&(i=n),a={}),o=new t.Parser(a),o.parseString(e,i)}}).call(this)},function(e,t,n){(function(e){!function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);var i=this;a(i),i.q=i.c="",i.bufferCheckPosition=t.MAX_BUFFER_LENGTH,i.opt=n||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=j.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(k)),i.trackPosition=i.opt.position!==!1,i.trackPosition&&(i.position=i.line=i.column=0),d(i,"onready")}function i(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),r=0,i=0,a=w.length;in)switch(w[i]){case"textNode":y(e);break;case"cdata":m(e,"oncdata",e.cdata),e.cdata="";break;case"script":m(e,"onscript",e.script),e.script="";break;default:g(e,"Max buffer length exceeded: "+w[i])}r=Math.max(r,o)}var s=t.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=s+e.position}function a(e){for(var t=0,n=w.length;t"===e||l(e)}function f(e,t){return e.test(t)}function h(e,t){return!f(e,t)}function d(e,t,n){e[t]&&e[t](n)}function m(e,t,n){e.textNode&&y(e),d(e,t,n)}function y(e){e.textNode=v(e.opt,e.textNode),e.textNode&&d(e,"ontext",e.textNode),e.textNode=""}function v(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function g(e,t){return y(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,d(e,"onerror",t),e}function A(e){return e.sawRoot&&!e.closedRoot&&E(e,"Unclosed root tag"),e.state!==j.BEGIN&&e.state!==j.BEGIN_WHITESPACE&&e.state!==j.TEXT&&g(e,"Unexpected end"),y(e),e.c="",e.closed=!0,d(e,"onend"),r.call(e,e.strict,e.opt),e}function E(e,t){if("object"!=typeof e||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&g(e,t)}function _(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,m(e,"onopentagstart",n)}function T(e,t){var n=e.indexOf(":"),r=n<0?["",e]:e.split(":"),i=r[0],a=r[1];return t&&"xmlns"===e&&(i="xmlns",a=""),{prefix:i,local:a}}function S(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName))return void(e.attribName=e.attribValue="");if(e.opt.xmlns){var t=T(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==U)E(e,"xml: prefix must be bound to "+U+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==x)E(e,"xmlns: prefix must be bound to "+x+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,m(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function N(e,t){if(e.opt.xmlns){var n=e.tag,r=T(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(E(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){m(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var a=0,o=e.attribList.length;a",e.tagName="",void(e.state=j.SCRIPT);m(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--;){var i=e.tags[t];if(i.name===r)break;E(e,"Unexpected close tag")}if(t<0)return E(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=j.TEXT);e.tagName=n;for(var a=e.tags.length;a-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,m(e,"onclosetag",e.tagName);var s={};for(var u in o.ns)s[u]=o.ns[u];var l=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==l.ns&&Object.keys(o.ns).forEach(function(t){var n=o.ns[t];m(e,"onclosenamespace",{prefix:t,uri:n})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=j.TEXT}function b(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:(n=r,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),i=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),i=t.toString(10))),n=n.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==n?(E(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function R(e,t){"<"===t?(e.state=j.OPEN_WAKA,e.startTagPosition=e.position):l(t)||(E(e,"Non-whitespace before first tag."),e.textNode=t,e.state=j.TEXT)}function M(e,t){var n="";return t"===r?(m(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=j.TEXT):p(r)?(t.state=j.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case j.SGML_DECL_QUOTED:r===t.q&&(t.state=j.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case j.DOCTYPE:">"===r?(t.state=j.TEXT,m(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=j.DOCTYPE_DTD:p(r)&&(t.state=j.DOCTYPE_QUOTED,t.q=r));continue;case j.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=j.DOCTYPE);continue;case j.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=j.DOCTYPE:p(r)&&(t.state=j.DOCTYPE_DTD_QUOTED,t.q=r);continue;case j.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=j.DOCTYPE_DTD,t.q="");continue;case j.COMMENT:"-"===r?t.state=j.COMMENT_ENDING:t.comment+=r;continue;case j.COMMENT_ENDING:"-"===r?(t.state=j.COMMENT_ENDED,t.comment=v(t.opt,t.comment),t.comment&&m(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=j.COMMENT);continue;case j.COMMENT_ENDED:">"!==r?(E(t,"Malformed comment"),t.comment+="--"+r,t.state=j.COMMENT):t.state=j.TEXT;continue;case j.CDATA:"]"===r?t.state=j.CDATA_ENDING:t.cdata+=r;continue;case j.CDATA_ENDING:"]"===r?t.state=j.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=j.CDATA);continue;case j.CDATA_ENDING_2:">"===r?(t.cdata&&m(t,"oncdata",t.cdata),m(t,"onclosecdata"),t.cdata="",t.state=j.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=j.CDATA);continue;case j.PROC_INST:"?"===r?t.state=j.PROC_INST_ENDING:l(r)?t.state=j.PROC_INST_BODY:t.procInstName+=r;continue;case j.PROC_INST_BODY:if(!t.procInstBody&&l(r))continue;"?"===r?t.state=j.PROC_INST_ENDING:t.procInstBody+=r;continue;case j.PROC_INST_ENDING:">"===r?(m(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=j.TEXT):(t.procInstBody+="?"+r,t.state=j.PROC_INST_BODY);continue;case j.OPEN_TAG:f(B,r)?t.tagName+=r:(_(t),">"===r?N(t):"/"===r?t.state=j.OPEN_TAG_SLASH:(l(r)||E(t,"Invalid character in tag name"),t.state=j.ATTRIB));continue;case j.OPEN_TAG_SLASH:">"===r?(N(t,!0),I(t)):(E(t,"Forward-slash in opening tag not followed by >"),t.state=j.ATTRIB);continue;case j.ATTRIB:if(l(r))continue;">"===r?N(t):"/"===r?t.state=j.OPEN_TAG_SLASH:f(F,r)?(t.attribName=r,t.attribValue="",t.state=j.ATTRIB_NAME):E(t,"Invalid attribute name");continue;case j.ATTRIB_NAME:"="===r?t.state=j.ATTRIB_VALUE:">"===r?(E(t,"Attribute without value"),t.attribValue=t.attribName,S(t),N(t)):l(r)?t.state=j.ATTRIB_NAME_SAW_WHITE:f(B,r)?t.attribName+=r:E(t,"Invalid attribute name");continue;case j.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=j.ATTRIB_VALUE;else{if(l(r))continue;E(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",m(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?N(t):f(F,r)?(t.attribName=r,t.state=j.ATTRIB_NAME):(E(t,"Invalid attribute name"),t.state=j.ATTRIB)}continue;case j.ATTRIB_VALUE:if(l(r))continue;p(r)?(t.q=r,t.state=j.ATTRIB_VALUE_QUOTED):(E(t,"Unquoted attribute value"),t.state=j.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case j.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=j.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}S(t),t.q="",t.state=j.ATTRIB_VALUE_CLOSED;continue;case j.ATTRIB_VALUE_CLOSED:l(r)?t.state=j.ATTRIB:">"===r?N(t):"/"===r?t.state=j.OPEN_TAG_SLASH:f(F,r)?(E(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=j.ATTRIB_NAME):E(t,"Invalid attribute name");continue;case j.ATTRIB_VALUE_UNQUOTED:if(!c(r)){"&"===r?t.state=j.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}S(t),">"===r?N(t):t.state=j.ATTRIB;continue;case j.CLOSE_TAG:if(t.tagName)">"===r?I(t):f(B,r)?t.tagName+=r:t.script?(t.script+=""===r?I(t):E(t,"Invalid characters in closing tag");continue;case j.TEXT_ENTITY:case j.ATTRIB_VALUE_ENTITY_Q:case j.ATTRIB_VALUE_ENTITY_U:var s,u;switch(t.state){case j.TEXT_ENTITY:s=j.TEXT,u="textNode";break;case j.ATTRIB_VALUE_ENTITY_Q:s=j.ATTRIB_VALUE_QUOTED,u="attribValue";break;case j.ATTRIB_VALUE_ENTITY_U:s=j.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===r?(t[u]+=b(t),t.entity="",t.state=s):f(t.entity.length?K:V,r)?t.entity+=r:(E(t,"Invalid character in entity name"),t[u]+="&"+t.entity+r,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&i(t),t}t.parser=function(e,t){return new r(e,t)},t.SAXParser=r,t.SAXStream=u, +t.createStream=s,t.MAX_BUFFER_LENGTH=65536;var w=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}t.prototype=e;var n=new t;return n}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),r.prototype={end:function(){A(this)},write:C,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var P;try{P=n(106).Stream}catch(e){P=function(){}}var L=t.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});u.prototype=Object.create(P.prototype,{constructor:{value:u}}),u.prototype.write=function(t){if("function"==typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)){if(!this._decoder){var r=n(132).StringDecoder;this._decoder=new r("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},u.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},u.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||L.indexOf(e)===-1||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),P.prototype.on.call(n,e,t)};var O="[CDATA[",D="DOCTYPE",U="http://www.w3.org/XML/1998/namespace",x="http://www.w3.org/2000/xmlns/",k={xml:U,xmlns:x},F=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,V=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,K=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,j=0;t.STATE={BEGIN:j++,BEGIN_WHITESPACE:j++,TEXT:j++,TEXT_ENTITY:j++,OPEN_WAKA:j++,SGML_DECL:j++,SGML_DECL_QUOTED:j++,DOCTYPE:j++,DOCTYPE_QUOTED:j++,DOCTYPE_DTD:j++,DOCTYPE_DTD_QUOTED:j++,COMMENT_STARTING:j++,COMMENT:j++,COMMENT_ENDING:j++,COMMENT_ENDED:j++,CDATA:j++,CDATA_ENDING:j++,CDATA_ENDING_2:j++,PROC_INST:j++,PROC_INST_BODY:j++,PROC_INST_ENDING:j++,OPEN_TAG:j++,OPEN_TAG_SLASH:j++,ATTRIB:j++,ATTRIB_NAME:j++,ATTRIB_NAME_SAW_WHITE:j++,ATTRIB_VALUE:j++,ATTRIB_VALUE_QUOTED:j++,ATTRIB_VALUE_CLOSED:j++,ATTRIB_VALUE_UNQUOTED:j++,ATTRIB_VALUE_ENTITY_Q:j++,ATTRIB_VALUE_ENTITY_U:j++,CLOSE_TAG:j++,CLOSE_TAG_SAW_WHITE:j++,SCRIPT:j++,SCRIPT_ENDING:j++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r});for(var W in t.STATE)t.STATE[t.STATE[W]]=W;j=t.STATE,/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */ +String.fromCodePoint||!function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,r,i=16384,a=[],o=-1,s=arguments.length;if(!s)return"";for(var u="";++o1114111||t(l)!==l)throw RangeError("Invalid code point: "+l);l<=65535?a.push(l):(l-=65536,n=(l>>10)+55296,r=l%1024+56320,a.push(n,r)),(o+1===s||a.length>i)&&(u+=e.apply(null,a),a.length=0)}return u};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}(t)}).call(t,n(43).Buffer)},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(107).EventEmitter,a=n(108);a(r,i),r.Readable=n(109),r.Writable=n(128),r.Duplex=n(129),r.Transform=n(130),r.PassThrough=n(131),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function r(){l.readable&&l.resume&&l.resume()}function a(){p||(p=!0,e.end())}function o(){p||(p=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",n),e.removeListener("drain",r),l.removeListener("end",a),l.removeListener("close",o),l.removeListener("error",s),e.removeListener("error",s),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(l.on("end",a),l.on("close",o));var p=!1;return l.on("error",s),e.on("error",s),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var p=new Error('Uncaught, unspecified "error" event. ('+t+")");throw p.context=t,p}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,u=0;u0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){t=e.exports=n(110),t.Stream=t,t.Readable=t,t.Writable=n(121),t.Duplex=n(120),t.Transform=n(126),t.PassThrough=n(127)},function(e,t,n){(function(t,r){"use strict";function i(e){return k.from(e)}function a(e){return k.isBuffer(e)||e instanceof F}function o(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?D(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function s(e,t){O=O||n(120),e=e||{},this.objectMode=!!e.objectMode,t instanceof O&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new W,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(j||(j=n(125).StringDecoder),this.decoder=new j(e.encoding),this.encoding=e.encoding)}function u(e){return O=O||n(120),this instanceof u?(this._readableState=new s(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),void x.call(this)):new u(e)}function l(e,t,n,r,a){var o=e._readableState;if(null===t)o.reading=!1,m(e,o);else{var s;a||(s=c(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===k.prototype||(t=i(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):p(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?p(e,o,t,!1):g(e,o)):p(e,o,t,!1))):r||(o.reading=!1)}return f(o)}function p(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&y(e)),g(e,t)}function c(e,t){var n;return a(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e){return!e.ended&&(e.needReadable||e.length=q?e=q:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function d(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=h(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function m(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,y(e)}}function y(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(K("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?L(v,e):v(e))}function v(e){K("emit readable"),e.emit("readable"),N(e)}function g(e,t){t.readingMore||(t.readingMore=!0,L(A,e,t))}function A(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=b(e,t.buffer,t.decoder),n}function b(e,t,n){var r;return ea.length?a.length:e;if(i+=o===a.length?a:a.slice(0,e),e-=o,0===e){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function M(e,t){var n=k.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,L(w,t,e))}function w(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return K("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):y(this),null;if(e=d(e,t),0===e&&t.ended)return 0===t.length&&C(this),null;var r=t.needReadable;K("need readable",r),(0===t.length||t.length-e0?I(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==i&&this.emit("data",i),i},u.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(e,t){function n(e,t){K("onunpipe"),e===f&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,a())}function i(){K("onend"),e.end()}function a(){K("cleanup"),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("drain",y),e.removeListener("error",u),e.removeListener("unpipe",n),f.removeListener("end",i),f.removeListener("end",c),f.removeListener("data",s),v=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function s(t){K("ondata"),g=!1;var n=e.write(t);!1!==n||g||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&P(h.pipes,e)!==-1)&&!v&&(K("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,g=!0),f.pause())}function u(t){K("onerror",t),c(),e.removeListener("error",u),0===U(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",p),c()}function p(){K("onfinish"),e.removeListener("close",l),c()}function c(){K("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,K("pipe count=%d opts=%j",h.pipesCount,t);var d=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,m=d?i:c;h.endEmitted?L(m):f.once("end",m),e.on("unpipe",n);var y=E(f);e.on("drain",y);var v=!1,g=!1;return f.on("data",s),o(e,"error",u),e.once("close",l),e.once("finish",p),e.emit("pipe",f),h.flowing||(K("pipe resume"),f.resume()),e},u.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var t=a.allocUnsafe(e>>>0),n=this.head,r=0;n;)i(n.data,t,r),r+=n.data.length,n=n.next;return t},e}()},function(e,t,n){"use strict";function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?void(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),void this._destroy(e||null,function(e){!t&&e?(o(a,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}))}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit("error",t)}var o=n(111);e.exports={destroy:r,undestroy:i}},function(e,t,n){"use strict";function r(e){return this instanceof r?(l.call(this,e),p.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||o(a,this)}function a(e){e.end()}var o=n(111),s=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var u=n(115);u.inherits=n(116);var l=n(110),p=n(121);u.inherits(r,l);for(var c=s(p.prototype),f=0;f-1?r:M;p.WritableState=l;var P=n(115);P.inherits=n(116);var L={deprecate:n(124)},O=n(113),D=n(114).Buffer,U=i.Uint8Array||function(){},x=n(119);P.inherits(p,O),l.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(l.prototype,"buffer",{get:L.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var k;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(k=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(e){return!!k.call(this,e)||e&&e._writableState instanceof l}})):k=function(e){return e instanceof this},p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},p.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=s(e)&&!r.objectMode;return a&&!D.isBuffer(e)&&(e=o(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=u),r.ended?c(this,n):(a||f(this,r,e,n))&&(r.pendingcb++,i=d(this,r,a,e,t,n)),i},p.prototype.cork=function(){var e=this._writableState;e.corked++},p.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},p.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},p.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},p.prototype._writev=null,p.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||b(this,r,n)},Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),p.prototype.destroy=x.destroy,p.prototype._undestroy=x.undestroy,p.prototype._destroy=function(e,t){this.end(),t(e)}}).call(t,n(7),n(122).setImmediate,function(){return this}())},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(123),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function l(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function p(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function f(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}var g=n(114).Buffer,A=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&r<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},function(e,t){(function(){"use strict";t.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(this)},function(e,t){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),t.normalize=function(e){return e.toLowerCase()},t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},t.stripPrefix=function(t){return t.replace(e,"")},t.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},t.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(this)},function(e,t,n){"use strict";function r(){return h?h:h=new f}Object.defineProperty(t,"__esModule",{value:!0});var i=n(58),a=n(77),o=n(58),s=n(75),u=n(77),l=n(77),p=n(75),c=function(){function e(e,t){this._construct=e,this._constructWithValue=t}return e.prototype.isSimple=function(){return null!=this._constructWithValue},e.prototype.newInstance=function(){return this._construct()},e.prototype.createWithValue=function(e){return this._constructWithValue(e)},e.prototype.isApplicable=function(e){var t=this.newInstance(),n=t.requiredType(),r=t.requiredTypes();return r&&r.length>0?r.some(function(t){return e.isSubTypeOf(t)}):e.isSubTypeOf(n)},e.prototype.isInheritable=function(){return this.newInstance().isInheritable()},e.prototype.isConstraint=function(){return this.newInstance()instanceof i.Constraint},e.prototype.isMeta=function(){return!this.isConstraint()},e.prototype.name=function(){return this.newInstance().facetName()},e}();t.FacetPrototype=c;var f=function(){function e(){var e=this;this.constraints=[new c(function(){return new s.MinProperties(1)},function(e){return new s.MinProperties(e)}),new c(function(){return new s.MaxProperties(1)},function(e){return new s.MaxProperties(e)}),new c(function(){return new s.MinItems(1)},function(e){return new s.MinItems(e)}),new c(function(){return new s.MaxItems(1)},function(e){return new s.MaxItems(e)}),new c(function(){return new s.MinLength(1)},function(e){return new s.MinLength(e)}),new c(function(){return new s.MaxLength(1)},function(e){return new s.MaxLength(e)}),new c(function(){return new s.Minimum(1)},function(e){return new s.Minimum(e)}),new c(function(){return new p.MultipleOf(1)},function(e){return new p.MultipleOf(e)}),new c(function(){return new s.Maximum(1)},function(e){return new s.Maximum(e)}),new c(function(){return new s.Enum([""])},function(e){return new s.Enum(e)}),new c(function(){return new s.Pattern(".")},function(e){return new s.Pattern(e)}),new c(function(){return new s.Format("")},function(e){return new s.Format(e)}),new c(function(){return new s.PropertyIs("x",i.ANY)},null),new c(function(){return new s.AdditionalPropertyIs(i.ANY)},null),new c(function(){return new s.MapPropertyIs(".",i.ANY)},null),new c(function(){return new s.HasProperty("x")},null),new c(function(){return new s.UniqueItems(!0)},function(e){return new s.UniqueItems(e)}),new c(function(){return new s.ComponentShouldBeOfType(i.ANY)},null),new c(function(){return new s.KnownPropertyRestriction(!1)},function(e){return new s.KnownPropertyRestriction(e)}),new c(function(){return new s.FileTypes([""])},function(e){return new s.FileTypes(e)})],this.meta=[new c(function(){return new a.Discriminator("kind")},function(e){return new a.Discriminator(e)}),new c(function(){return new a.DiscriminatorValue("x")},function(e){return new a.DiscriminatorValue(e)}),new c(function(){return new u.Default("")},function(e){return new u.Default(e)}),new c(function(){return new u.Example("")},function(e){return new u.Example(e)}),new c(function(){return new l.Required(!0)},function(e){return new l.Required(e)}),new c(function(){return new a.Examples({})},function(e){return new a.Examples(e)}),new c(function(){return new u.Description("")},function(e){return new u.Description(e)}),new c(function(){return new u.DisplayName("")},function(e){return new u.DisplayName(e)}),new c(function(){return new o.Abstract},function(e){return new o.Abstract}),new c(function(){return new o.Polymorphic},function(e){return new o.Polymorphic}),new c(function(){return new l.XMLInfo({})},function(e){return new l.XMLInfo(e)}),new c(function(){return new l.AllowedTargets({})},function(e){return new l.AllowedTargets(e)}),new c(function(){return new u.SourceMap({})},function(e){return new u.SourceMap(e)}),new c(function(){return new u.ParserMetadata({})},function(e){return new u.ParserMetadata(e)})],this.known={},this.allPrototypes().forEach(function(t){return e.known[t.name()]=t})}return e.prototype.allPrototypes=function(){return this.meta.concat(this.constraints)},e.prototype.buildFacet=function(e,t){return this.known.hasOwnProperty(e)&&this.known[e].isSimple()?this.known[e].createWithValue(t):null},e.prototype.facetPrototypeWithName=function(e){return this.known.hasOwnProperty(e)?this.known[e]:null},e.prototype.applyableTo=function(e){return this.allPrototypes().filter(function(t){return t.isApplicable(e)})},e.prototype.allMeta=function(){return this.allPrototypes().filter(function(e){return e.isMeta()})},e}();t.Registry=f;var h;t.getInstance=r},function(e,t,n){"use strict";function r(e){var t=e.oneMeta(p.Example);if(t)return t.example();if(e.getExtra(h))return null;e.putExtra(h,!0);try{var n=e.oneMeta(p.Examples);if(n){var i=n.examples();if(i&&i.length>0)return i[0]}var a=e.oneMeta(p.Default);if(a)return a.value();if(e.isObject()){var o={};return e.meta().forEach(function(e){if(e instanceof f.PropertyIs){var t=e,n=r(t.value());o[t.propertyName()]=n}}),e.superTypes().forEach(function(e){if(e.oneMeta(p.Example)||e.oneMeta(p.Examples)){var t=r(e);t&&"object"==typeof t&&Object.keys(t).forEach(function(e){o[e]=t[e]})}}),o}if(e.isArray()){var s=e.oneMeta(c.ComponentShouldBeOfType),u=[];return s&&u.push(r(s.value())),u}return e.isUnion()?r(e.typeFamily()[0]):e.isNumber()?1:!!e.isBoolean()||"some value"}finally{e.putExtra(h,!1)}}function i(e,t){var n=e[t];return null!=n&&"object"==typeof n?n.value:n}function a(e){var t=[];if(!e||"object"!=typeof e)return t;for(var n=0,r=Object.keys(e).filter(function(e){return e.length>0&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)});n0)return r;if(t&&e.isUserDefined()&&!e.isGenuineUserDefinedType()&&e.genuineUserDefinedTypeInHierarchy()){var i=e.genuineUserDefinedTypeInHierarchy(),a=i.getAdapter(l.InheritedType);if(a){var s=o(a);if(s&&s.length>0)return s}}}if(n){var u=new d(null,void 0,void 0,void 0,!1,void 0,void 0,!0);return u.setOwnerType(n),[u]}return[]}Object.defineProperty(t,"__esModule",{value:!0});var l=n(58),p=n(77),c=n(75),f=n(75),h="exampleCalculation";t.example=r;var d=function(){function e(e,t,n,r,i,a,o,s){void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),void 0===i&&(i=!0),void 0===o&&(o=!1),void 0===s&&(s=!1),this._value=e,this._name=t,this._displayName=n,this._description=r,this._strict=i,this._annotations=a,this._isSingle=o,this._empty=s,this.isExpanded=!1,this._scalarsAnnotations={},this._annotations?this._hasAnnotations=!0:this._annotations={},"boolean"!=typeof this._strict&&(this._strict=!1)}return e.prototype.rawValue=function(){return this._value},e.prototype.isEmpty=function(){return this._empty},e.prototype.isJSONString=function(){if(void 0!==this._isJSONString)return this._isJSONString;this._isJSONString=!1;var e=this.firstCharacter();if("{"==e||"["==e)try{JSON.parse(this._value),this._isJSONString=!0}catch(e){}return this._isJSONString},e.prototype.isXMLString=function(){var e=this.firstCharacter();return"<"==e},e.prototype.firstCharacter=function(){if(null==this._value)return null;if("string"!=typeof this._value)return null;var e=this._value.trim();return 0==e.length?null:e.charAt(0)},e.prototype.asXMLString=function(){return this.isXMLString()?this._value:this._owner?this._owner.asXMLString():null},e.prototype.isYAML=function(){return"string"!=typeof this._value||!(this.isJSONString()||this.isXMLString())},e.prototype.asString=function(){return"string"==typeof this._value?""+this._value:JSON.stringify(this._value,null,2)},e.prototype.asJSON=function(){if(this.isJSONString())try{return JSON.parse(this._value)}catch(e){return null}return this.isYAML()?this._value:this.asString()},e.prototype.original=function(){return this._value},e.prototype.expandAsString=function(){return JSON.stringify(this.expandAsJSON(),null,2)},e.prototype.expandAsJSON=function(){return this.isEmpty()?this.isExpanded?this._expandedValue:(this._expandedValue=r(this._ownerType),this.isExpanded=!0,this._expandedValue):this._value},e.prototype.isSingle=function(){return this._isSingle},e.prototype.strict=function(){return this._strict},e.prototype.description=function(){return this._description},e.prototype.displayName=function(){return this._displayName},e.prototype.annotations=function(){return this._annotations},e.prototype.name=function(){return this._name},e.prototype.scalarsAnnotations=function(){return this._scalarsAnnotations},e.prototype.registerScalarAnnotatoion=function(e,t){this._hasScalarAnnotations=!0;var n=this._scalarsAnnotations[t];n||(n={},this._scalarsAnnotations[t]=n),n[e.facetName()]=e},e.prototype.setOwner=function(e){this._owner=e},e.prototype.owner=function(){return this._owner},e.prototype.setOwnerType=function(e){this._ownerType=e},e.prototype.ownerType=function(){return this._ownerType},e.prototype.hasAnnotations=function(){return this._hasAnnotations},e.prototype.hasScalarAnnotations=function(){return this._hasScalarAnnotations},e}(),m=function(){function e(e,t,n,r,i,a,o,s){void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),void 0===i&&(i=!0),void 0===o&&(o=!1),void 0===s&&(s=!1),this._value=e,this._name=t,this._displayName=n,this._description=r,this._strict=i,this._annotations=a,this._isSingle=o,this._empty=s,this.isExpanded=!1,this._scalarsAnnotations={},this._annotations?this._hasAnnotations=!0:this._annotations={}}return e.prototype.annotationsMap=function(){var e={},t=this.scalarsAnnotations();return Object.keys(t).forEach(function(n){var r=[];Object.keys(t[n]).forEach(function(e){r.push(t[n][e])}),e[n]=r}),e},e.prototype.isEmpty=function(){return this._empty},e.prototype.isJSONString=function(){var e=this.firstCharacter();return"{"==e||"["==e},e.prototype.isXMLString=function(){var e=this.firstCharacter();return"<"==e},e.prototype.firstCharacter=function(){if(null==this._value)return null;if("string"!=typeof this._value)return null;var e=this._value.trim();return 0==e.length?null:e.charAt(0)},e.prototype.asXMLString=function(){return this.isXMLString()?this._value:this._owner?this._owner.asXMLString():null},e.prototype.isYAML=function(){return"string"!=typeof this._value||!(this.isJSONString()||this.isXMLString())},e.prototype.asString=function(){return"string"==typeof this._value?""+this._value:JSON.stringify(this._value,null,2)},e.prototype.asJSON=function(){if(this.isJSONString())try{return JSON.parse(this._value)}catch(e){return null}return this.isYAML()?this._value:this.asString()},e.prototype.original=function(){return this._value},e.prototype.expandAsString=function(){return JSON.stringify(this.expandAsJSON(),null,2)},e.prototype.expandAsJSON=function(){return this.isEmpty()?this.isExpanded?this._expandedValue:(this._expandedValue=r(this._ownerType),this.isExpanded=!0,this._expandedValue):this._value},e.prototype.value=function(){return this.expandAsJSON()},e.prototype.isSingle=function(){return this._isSingle},e.prototype.strict=function(){return this._strict},e.prototype.description=function(){return this._description},e.prototype.displayName=function(){return this._displayName},e.prototype.annotations=function(){var e=this,t=[];return Object.keys(this._annotations).forEach(function(n){t.push(e._annotations[n])}),t},e.prototype.name=function(){return this._name},e.prototype.scalarsAnnotations=function(){return this._scalarsAnnotations},e.prototype.registerScalarAnnotatoion=function(e,t){this._hasScalarAnnotations=!0;var n=this._scalarsAnnotations[t];n||(n={},this._scalarsAnnotations[t]=n),n[e.facetName()]=e},e.prototype.setOwner=function(e){this._owner=e},e.prototype.owner=function(){return this._owner},e.prototype.setOwnerType=function(e){this._ownerType=e},e.prototype.ownerType=function(){return this._ownerType},e.prototype.hasAnnotations=function(){return this._hasAnnotations},e.prototype.hasScalarAnnotations=function(){return this._hasScalarAnnotations},e}(),y=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=!1);var o;if(null!=t)if(t.hasOwnProperty("value")){var s=t.value,u=i(t,"displayName"),l=i(t,"description"),p=i(t,"strict"),c={};a(t).forEach(function(e){c[e.facetName()]=e}),o=new d(s,n,u,l,p,c,r);for(var f=0,h=a(t.displayName);f99)&&!s.isValid(e,t))}var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var s=n(138),u=n(58),l=u.messageRegistry,p=function(e){function t(){return e.call(this,"date-only")||this}return o(t,e),t.prototype.check=function(e){return"string"==typeof e&&r(e)?u.ok():u.error(l.INVALID_DATEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be date-only"},t}(u.TypeOfRestriction);t.DateOnlyR=p;var c=function(e){function t(){return e.call(this,"time-only")||this}return o(t,e),t.prototype.check=function(e){if("string"==typeof e){var t=/^([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/,n=e.match(t);if(!n)return u.error(l.INVALID_TIMEONLY,this);var r=n[1];return i(r)?u.ok():u.error(l.INVALID_TIMEONLY,this)}return u.error(l.INVALID_TIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be time-only"},t}(u.TypeOfRestriction);t.TimeOnlyR=c;var f=function(e){function t(){return e.call(this,"datetime-only")||this}return o(t,e),t.prototype.check=function(e){if("string"==typeof e){var t=/^(\d{4}-\d{2}-\d{2})T([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/,n=e.match(t);if(!n||n.length<3)return u.error(l.INVALID_DATETIMEONLY,this);var a=n[1],o=n[2];return r(a)&&i(o)?u.ok():u.error(l.INVALID_DATETIMEONLY,this)}return u.error(l.INVALID_DATETIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be datetime-only"},t}(u.TypeOfRestriction);t.DateTimeOnlyR=f;var h=/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\,[ ]+\d{2}[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\d{4}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,d=/(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\,[ ]+\d{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\d{2}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,m=/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\,[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\d{1,2}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,y=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(?:\.\d+)?((?:[\+\-]\d{2}:\d{2})|Z)$/,v=function(e){function t(){return e.call(this,"datetime")||this}return o(t,e),t.prototype.check=function(e){var t=u.VALIDATED_TYPE,n=!1;if(t.allFacets().forEach(function(e){"format"==e.facetName()&&"rfc2616"===e.value()&&(n=!0)}),"string"==typeof e){if(!n){var a=e.match(y);if(!a||a.length<3)return u.error(l.INVALID_RFC3339,this);var o=a[1],s=a[2];return r(o)&&i(s)?u.ok():u.error(l.INVALID_RFC3339,this)}return e.match(h)||e.match(d)||e.match(m)?u.ok():u.error(l.INVALID_RFC2616,this)}return u.error(l.INVALID_DATTIME,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.facetName=function(){return"should be datetime"},t}(u.TypeOfRestriction);t.DateTimeR=v},function(e,t,n){var r,i;/** * @preserve date-and-time.js (c) KNOWLEDGECODE | MIT */ -!function(a){"use strict";var o={},s="en",u={en:{MMMM:["January","February","March","April","May","June","July","August","September","October","November","December"],MMM:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dddd:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ddd:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dd:["Su","Mo","Tu","We","Th","Fr","Sa"],A:["a.m.","p.m."],formatter:{YYYY:function(e){return("000"+e.getFullYear()).slice(-4)},YY:function(e){return("0"+e.getFullYear()).slice(-2)},Y:function(e){return""+e.getFullYear()},MMMM:function(e){return this.MMMM[e.getMonth()]},MMM:function(e){return this.MMM[e.getMonth()]},MM:function(e){return("0"+(e.getMonth()+1)).slice(-2)},M:function(e){return""+(e.getMonth()+1)},DD:function(e){return("0"+e.getDate()).slice(-2)},D:function(e){return""+e.getDate()},HH:function(e){return("0"+e.getHours()).slice(-2)},H:function(e){return""+e.getHours()},A:function(e){return this.A[e.getHours()>11|0]},hh:function(e){return("0"+(e.getHours()%12||12)).slice(-2)},h:function(e){return""+(e.getHours()%12||12)},mm:function(e){return("0"+e.getMinutes()).slice(-2)},m:function(e){return""+e.getMinutes()},ss:function(e){return("0"+e.getSeconds()).slice(-2)},s:function(e){return""+e.getSeconds()},SSS:function(e){return("00"+e.getMilliseconds()).slice(-3)},SS:function(e){return("0"+(e.getMilliseconds()/10|0)).slice(-2)},S:function(e){return""+(e.getMilliseconds()/100|0)},dddd:function(e){return this.dddd[e.getDay()]},ddd:function(e){return this.ddd[e.getDay()]},dd:function(e){return this.dd[e.getDay()]},Z:function(e){var t=e.utc?0:e.getTimezoneOffset()/.6;return(t>0?"-":"+")+("000"+Math.abs(t-t%100*.4)).slice(-4)},post:function(e){return e}},parser:{find:function(e,t){for(var n,r=-1,i=0,a=0,o=e.length;ai&&(r=a,i=n.length);return{index:r,length:i}},MMMM:function(e){return this.parser.find(this.MMMM,e)},MMM:function(e){return this.parser.find(this.MMM,e)},A:function(e){return this.parser.find(this.A,e)},h:function(e,t){return(12===e?0:e)+12*t},pre:function(e){return e}}}};o.format=function(e,t,n){var r=o.addMinutes(e,n?e.getTimezoneOffset():0),i=u[s],a=i.formatter;return r.utc=n,t.replace(/(\[[^\[\]]*]|\[.*\][^\[]*\]|YYYY|YY|MMM?M?|DD|HH|hh|mm|ss|SSS?|ddd?d?|.)/g,function(e){var n=a[e];return n?a.post(n.call(i,r,t)):e.replace(/\[(.*)]/,"$1")})},o.parse=function(e,t,n){for(var r,i,a,l,p,c,f,h,d=u[s],m=d.parser.pre(e),y=0,v=/(MMMM?|A)|(YYYY)|(SSS)|(MM|DD|HH|hh|mm|ss)|(YY|M|D|H|h|m|s|SS)|(S)|(.)/g,g={2:/^\d{1,4}/,3:/^\d{1,3}/,4:/^\d\d/,5:/^\d\d?/,6:/^\d/},A={Y:1970,M:1,D:1,H:0,m:0,s:0,S:0};r=v.exec(t);){for(i=0,l=1,a="";!a;)a=r[++i];if(p=a.charAt(0),c=m.slice(y),i<2?(f=d.parser[a].call(d,c,t),A[p]=f.index,"M"===p&&A[p]++,l=f.length):i<7&&(f=(c.match(g[i])||[""])[0],A[p]=0|("S"===p?(f+"000").slice(0,-a.length):f),l=f.length),!l)return NaN;y+=l}return y===m.length&&f?(A.Y+=A.Y<70?2e3:A.Y<100?1900:0,A.H=A.H||d.parser.h(A.h||0,A.A||0),h=new Date(A.Y,A.M-1,A.D,A.H,A.m,A.s,A.S),A.Y!==h.getFullYear()||A.M-1!==h.getMonth()||A.D!==h.getDate()||A.H!==h.getHours()||A.m!==h.getMinutes()||A.s!==h.getSeconds()||A.S!==h.getMilliseconds()?NaN:n?o.addMinutes(h,-h.getTimezoneOffset()):h):NaN},o.isValid=function(e,t){return!!o.parse(e,t)},o.addYears=function(e,t){return o.addMonths(e,12*t)},o.addMonths=function(e,t){var n=new Date(e.getTime());return n.setMonth(n.getMonth()+t),n},o.addDays=function(e,t){var n=new Date(e.getTime());return n.setDate(n.getDate()+t),n},o.addHours=function(e,t){return o.addMilliseconds(e,36e5*t)},o.addMinutes=function(e,t){return o.addMilliseconds(e,6e4*t)},o.addSeconds=function(e,t){return o.addMilliseconds(e,1e3*t)},o.addMilliseconds=function(e,t){return new Date(e.getTime()+t)},o.subtract=function(e,t){var n=e.getTime()-t.getTime();return{toMilliseconds:function(){return n},toSeconds:function(){return n/1e3|0},toMinutes:function(){return n/6e4|0},toHours:function(){return n/36e5|0},toDays:function(){return n/864e5|0}}},o.isLeapYear=function(e){var t=e.getFullYear();return!((t%4||!(t%100))&&t%400)},o.isSameDay=function(e,t){return o.format(e,"YYYYMMDD")===o.format(t,"YYYYMMDD")},o.locale=function(e){return e&&("en"!==e&&a&&n(138)("./"+e),s=e),s},o.getLocales=function(e){return u[e||s]},o.setLocales=function(e,t){var n=function(e,t){var n,r,i=function(){};i.prototype=t,n=new i;for(r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n},r=u[e]||u.en,i=n(t,r);t.formatter&&(i.formatter=n(t.formatter,r.formatter)),t.parser&&(i.parser=n(t.parser,r.parser)),u[e]=i},"object"==typeof e&&"object"==typeof e.exports?e.exports=o:(r=[],i=function(){return o}.apply(t,r),!(void 0!==i&&(e.exports=i)))}(this)},function(e,t,n){function r(e){return n(i(e))}function i(e){return a[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var a={"./ar":139,"./ar.js":139,"./az":140,"./az.js":140,"./bn":141,"./bn.js":141,"./cs":142,"./cs.js":142,"./de":143,"./de.js":143,"./el":144,"./el.js":144,"./es":145,"./es.js":145,"./fa":146,"./fa.js":146,"./fr":147,"./fr.js":147,"./hi":148,"./hi.js":148,"./hu":149,"./hu.js":149,"./id":150,"./id.js":150,"./it":151,"./it.js":151,"./ja":152,"./ja.js":152,"./jv":153,"./jv.js":153,"./ko":154,"./ko.js":154,"./my":155,"./my.js":155,"./nl":156,"./nl.js":156,"./pa-in":157,"./pa-in.js":157,"./pl":158,"./pl.js":158,"./pt":159,"./pt.js":159,"./ro":160,"./ro.js":160,"./ru":161,"./ru.js":161,"./sr":162,"./sr.js":162,"./th":163,"./th.js":163,"./tr":164,"./tr.js":164,"./uk":165,"./uk.js":165,"./uz":166,"./uz.js":166,"./vi":167,"./vi.js":167,"./zh-cn":168,"./zh-cn.js":168,"./zh-tw":169,"./zh-tw.js":169};r.keys=function(){return Object.keys(a)},r.resolve=i,e.exports=r,r.id=138},function(e,t,n){var r,i,a;/** +!function(a){"use strict";var o={},s="en",u={en:{MMMM:["January","February","March","April","May","June","July","August","September","October","November","December"],MMM:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dddd:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ddd:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dd:["Su","Mo","Tu","We","Th","Fr","Sa"],A:["a.m.","p.m."],formatter:{YYYY:function(e){return("000"+e.getFullYear()).slice(-4)},YY:function(e){return("0"+e.getFullYear()).slice(-2)},Y:function(e){return""+e.getFullYear()},MMMM:function(e){return this.MMMM[e.getMonth()]},MMM:function(e){return this.MMM[e.getMonth()]},MM:function(e){return("0"+(e.getMonth()+1)).slice(-2)},M:function(e){return""+(e.getMonth()+1)},DD:function(e){return("0"+e.getDate()).slice(-2)},D:function(e){return""+e.getDate()},HH:function(e){return("0"+e.getHours()).slice(-2)},H:function(e){return""+e.getHours()},A:function(e){return this.A[e.getHours()>11|0]},hh:function(e){return("0"+(e.getHours()%12||12)).slice(-2)},h:function(e){return""+(e.getHours()%12||12)},mm:function(e){return("0"+e.getMinutes()).slice(-2)},m:function(e){return""+e.getMinutes()},ss:function(e){return("0"+e.getSeconds()).slice(-2)},s:function(e){return""+e.getSeconds()},SSS:function(e){return("00"+e.getMilliseconds()).slice(-3)},SS:function(e){return("0"+(e.getMilliseconds()/10|0)).slice(-2)},S:function(e){return""+(e.getMilliseconds()/100|0)},dddd:function(e){return this.dddd[e.getDay()]},ddd:function(e){return this.ddd[e.getDay()]},dd:function(e){return this.dd[e.getDay()]},Z:function(e){var t=e.utc?0:e.getTimezoneOffset()/.6;return(t>0?"-":"+")+("000"+Math.abs(t-t%100*.4)).slice(-4)},post:function(e){return e}},parser:{find:function(e,t){for(var n,r=-1,i=0,a=0,o=e.length;ai&&(r=a,i=n.length);return{index:r,length:i}},MMMM:function(e){return this.parser.find(this.MMMM,e)},MMM:function(e){return this.parser.find(this.MMM,e)},A:function(e){return this.parser.find(this.A,e)},h:function(e,t){return(12===e?0:e)+12*t},pre:function(e){return e}}}};o.format=function(e,t,n){var r=o.addMinutes(e,n?e.getTimezoneOffset():0),i=u[s],a=i.formatter;return r.utc=n,t.replace(/(\[[^\[\]]*]|\[.*\][^\[]*\]|YYYY|YY|MMM?M?|DD|HH|hh|mm|ss|SSS?|ddd?d?|.)/g,function(e){var n=a[e];return n?a.post(n.call(i,r,t)):e.replace(/\[(.*)]/,"$1")})},o.parse=function(e,t,n){for(var r,i,a,l,p,c,f,h,d=u[s],m=d.parser.pre(e),y=0,v=/(MMMM?|A)|(YYYY)|(SSS)|(MM|DD|HH|hh|mm|ss)|(YY|M|D|H|h|m|s|SS)|(S)|(.)/g,g={2:/^\d{1,4}/,3:/^\d{1,3}/,4:/^\d\d/,5:/^\d\d?/,6:/^\d/},A={Y:1970,M:1,D:1,H:0,m:0,s:0,S:0};r=v.exec(t);){for(i=0,l=1,a="";!a;)a=r[++i];if(p=a.charAt(0),c=m.slice(y),i<2?(f=d.parser[a].call(d,c,t),A[p]=f.index,"M"===p&&A[p]++,l=f.length):i<7&&(f=(c.match(g[i])||[""])[0],A[p]=0|("S"===p?(f+"000").slice(0,-a.length):f),l=f.length),!l)return NaN;y+=l}return y===m.length&&f?(A.Y+=A.Y<70?2e3:A.Y<100?1900:0,A.H=A.H||d.parser.h(A.h||0,A.A||0),h=new Date(A.Y,A.M-1,A.D,A.H,A.m,A.s,A.S),A.Y!==h.getFullYear()||A.M-1!==h.getMonth()||A.D!==h.getDate()||A.H!==h.getHours()||A.m!==h.getMinutes()||A.s!==h.getSeconds()||A.S!==h.getMilliseconds()?NaN:n?o.addMinutes(h,-h.getTimezoneOffset()):h):NaN},o.isValid=function(e,t){return!!o.parse(e,t)},o.addYears=function(e,t){return o.addMonths(e,12*t)},o.addMonths=function(e,t){var n=new Date(e.getTime());return n.setMonth(n.getMonth()+t),n},o.addDays=function(e,t){var n=new Date(e.getTime());return n.setDate(n.getDate()+t),n},o.addHours=function(e,t){return o.addMilliseconds(e,36e5*t)},o.addMinutes=function(e,t){return o.addMilliseconds(e,6e4*t)},o.addSeconds=function(e,t){return o.addMilliseconds(e,1e3*t)},o.addMilliseconds=function(e,t){return new Date(e.getTime()+t)},o.subtract=function(e,t){var n=e.getTime()-t.getTime();return{toMilliseconds:function(){return n},toSeconds:function(){return n/1e3|0},toMinutes:function(){return n/6e4|0},toHours:function(){return n/36e5|0},toDays:function(){return n/864e5|0}}},o.isLeapYear=function(e){var t=e.getFullYear();return!((t%4||!(t%100))&&t%400)},o.isSameDay=function(e,t){return o.format(e,"YYYYMMDD")===o.format(t,"YYYYMMDD")},o.locale=function(e){return e&&("en"!==e&&a&&n(139)("./"+e),s=e),s},o.getLocales=function(e){return u[e||s]},o.setLocales=function(e,t){var n=function(e,t){var n,r,i=function(){};i.prototype=t,n=new i;for(r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n},r=u[e]||u.en,i=n(t,r);t.formatter&&(i.formatter=n(t.formatter,r.formatter)),t.parser&&(i.parser=n(t.parser,r.parser)),u[e]=i},"object"==typeof e&&"object"==typeof e.exports?e.exports=o:(r=[],i=function(){return o}.apply(t,r),!(void 0!==i&&(e.exports=i)))}(this)},function(e,t,n){function r(e){return n(i(e))}function i(e){return a[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var a={"./ar":140,"./ar.js":140,"./az":141,"./az.js":141,"./bn":142,"./bn.js":142,"./cs":143,"./cs.js":143,"./de":144,"./de.js":144,"./el":145,"./el.js":145,"./es":146,"./es.js":146,"./fa":147,"./fa.js":147,"./fr":148,"./fr.js":148,"./hi":149,"./hi.js":149,"./hu":150,"./hu.js":150,"./id":151,"./id.js":151,"./it":152,"./it.js":152,"./ja":153,"./ja.js":153,"./jv":154,"./jv.js":154,"./ko":155,"./ko.js":155,"./my":156,"./my.js":156,"./nl":157,"./nl.js":157,"./pa-in":158,"./pa-in.js":158,"./pl":159,"./pl.js":159,"./pt":160,"./pt.js":160,"./ro":161,"./ro.js":161,"./ru":162,"./ru.js":162,"./sr":163,"./sr.js":163,"./th":164,"./th.js":164,"./tr":165,"./tr.js":165,"./uk":166,"./uk.js":166,"./uz":167,"./uz.js":167,"./vi":168,"./vi.js":168,"./zh-cn":169,"./zh-cn.js":169,"./zh-tw":170,"./zh-tw.js":170};r.keys=function(){return Object.keys(a)},r.resolve=i,e.exports=r,r.id=139},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Arabic (ar) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){var t=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],n={"٠":0,"١":1,"٢":2,"٣":3,"٤":4,"٥":5,"٦":6,"٧":7,"٨":8,"٩":9};e.setLocales("ar",{MMMM:["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],MMM:["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],dddd:["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],ddd:["أحد","إثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dd:["ح","ن","ث","ر","خ","ج","س"],A:["ص","م"],formatter:{post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{pre:function(e){return e.replace(/[٠١٢٣٤٥٦٧٨٩]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){var t=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],n={"٠":0,"١":1,"٢":2,"٣":3,"٤":4,"٥":5,"٦":6,"٧":7,"٨":8,"٩":9};e.setLocales("ar",{MMMM:["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],MMM:["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],dddd:["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],ddd:["أحد","إثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dd:["ح","ن","ث","ر","خ","ج","س"],A:["ص","م"],formatter:{post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{pre:function(e){return e.replace(/[٠١٢٣٤٥٦٧٨٩]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Azerbaijani (az) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("az",{MMMM:["yanvar","fevral","mart","aprel","may","iyun","iyul","avqust","sentyabr","oktyabr","noyabr","dekabr"],MMM:["yan","fev","mar","apr","may","iyn","iyl","avq","sen","okt","noy","dek"],dddd:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],ddd:["Baz","BzE","ÇAx","Çər","CAx","Cüm","Şən"],dd:["Bz","BE","ÇA","Çə","CA","Cü","Şə"],A:["gecə","səhər","gündüz","axşam"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<12?this.A[1]:t<17?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("az",{MMMM:["yanvar","fevral","mart","aprel","may","iyun","iyul","avqust","sentyabr","oktyabr","noyabr","dekabr"],MMM:["yan","fev","mar","apr","may","iyn","iyl","avq","sen","okt","noy","dek"],dddd:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],ddd:["Baz","BzE","ÇAx","Çər","CAx","Cüm","Şən"],dd:["Bz","BE","ÇA","Çə","CA","Cü","Şə"],A:["gecə","səhər","gündüz","axşam"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<12?this.A[1]:t<17?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Bengali (bn) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("bn",{MMMM:["জানুয়ারী","ফেবুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],MMM:["জানু","ফেব","মার্চ","এপর","মে","জুন","জুল","অগ","সেপ্ট","অক্টো","নভ","ডিসেম্"],dddd:["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পত্তিবার","শুক্রবার","শনিবার"],ddd:["রবি","সোম","মঙ্গল","বুধ","বৃহস্পত্তি","শুক্র","শনি"],dd:["রব","সম","মঙ্গ","বু","ব্রিহ","শু","শনি"],A:["রাত","সকাল","দুপুর","বিকাল"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]}},parser:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>9?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("bn",{MMMM:["জানুয়ারী","ফেবুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],MMM:["জানু","ফেব","মার্চ","এপর","মে","জুন","জুল","অগ","সেপ্ট","অক্টো","নভ","ডিসেম্"],dddd:["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পত্তিবার","শুক্রবার","শনিবার"],ddd:["রবি","সোম","মঙ্গল","বুধ","বৃহস্পত্তি","শুক্র","শনি"],dd:["রব","সম","মঙ্গ","বু","ব্রিহ","শু","শনি"],A:["রাত","সকাল","দুপুর","বিকাল"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]}},parser:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>9?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Czech (cs) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("cs",{MMMM:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],MMM:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],dddd:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],ddd:["ne","po","út","st","čt","pá","so"],dd:["ne","po","út","st","čt","pá","so"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("cs",{MMMM:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],MMM:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],dddd:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],ddd:["ne","po","út","st","čt","pá","so"],dd:["ne","po","út","st","čt","pá","so"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve German (de) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("de",{MMMM:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],MMM:["Jan.","Febr.","Mrz.","Apr.","Mai","Jun.","Jul.","Aug.","Sept.","Okt.","Nov.","Dez."],dddd:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],ddd:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],dd:["So","Mo","Di","Mi","Do","Fr","Sa"],A:["Uhr nachmittags","Uhr morgens"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("de",{MMMM:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],MMM:["Jan.","Febr.","Mrz.","Apr.","Mai","Jun.","Jul.","Aug.","Sept.","Okt.","Nov.","Dez."],dddd:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],ddd:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],dd:["So","Mo","Di","Mi","Do","Fr","Sa"],A:["Uhr nachmittags","Uhr morgens"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Greek (el) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("el",{MMMM:{nominative:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],genitive:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},MMM:["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],dddd:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],ddd:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dd:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],A:["πμ","μμ"],formatter:{MMMM:function(e,t){return this.MMMM[/D.*MMMM/.test(t)?"genitive":"nominative"][e.getMonth()]},hh:function(e){return("0"+e.getHours()%12).slice(-2)},h:function(e){return e.getHours()%12}},parser:{MMMM:function(e,t){return this.parser.find(this.MMMM[/D.*MMMM/.test(t)?"genitive":"nominative"],e)}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("el",{MMMM:{nominative:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],genitive:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},MMM:["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],dddd:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],ddd:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dd:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],A:["πμ","μμ"],formatter:{MMMM:function(e,t){return this.MMMM[/D.*MMMM/.test(t)?"genitive":"nominative"][e.getMonth()]},hh:function(e){return("0"+e.getHours()%12).slice(-2)},h:function(e){return e.getHours()%12}},parser:{MMMM:function(e,t){return this.parser.find(this.MMMM[/D.*MMMM/.test(t)?"genitive":"nominative"],e)}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Spanish (es) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("es",{MMMM:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],MMM:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic."],dddd:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],ddd:["dom.","lun.","mar.","mié.","jue.","vie.","sáb."],dd:["do","lu","ma","mi","ju","vi","sá"],A:["de la mañana","de la tarde","de la noche"],formatter:{A:function(e){var t=e.getHours();return t<12?this.A[0]:t<19?this.A[1]:this.A[2]}},parser:{h:function(e,t){return t<1?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("es",{MMMM:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],MMM:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic."],dddd:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],ddd:["dom.","lun.","mar.","mié.","jue.","vie.","sáb."],dd:["do","lu","ma","mi","ju","vi","sá"],A:["de la mañana","de la tarde","de la noche"],formatter:{A:function(e){var t=e.getHours();return t<12?this.A[0]:t<19?this.A[1]:this.A[2]}},parser:{h:function(e,t){return t<1?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Persian (fa) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){var t=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],n={"۰":0,"۱":1,"۲":2,"۳":3,"۴":4,"۵":5,"۶":6,"۷":7,"۸":8,"۹":9};e.setLocales("fa",{MMMM:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],MMM:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],dddd:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه"],ddd:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه"],dd:["ی","د","س","چ","پ","ج","ش"],A:["قبل از ظهر","بعد از ظهر"],formatter:{post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{pre:function(e){return e.replace(/[۰۱۲۳۴۵۶۷۸۹]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){var t=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],n={"۰":0,"۱":1,"۲":2,"۳":3,"۴":4,"۵":5,"۶":6,"۷":7,"۸":8,"۹":9};e.setLocales("fa",{MMMM:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],MMM:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],dddd:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه"],ddd:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه"],dd:["ی","د","س","چ","پ","ج","ش"],A:["قبل از ظهر","بعد از ظهر"],formatter:{post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{pre:function(e){return e.replace(/[۰۱۲۳۴۵۶۷۸۹]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve French (fr) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("fr",{MMMM:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],MMM:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dddd:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],ddd:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dd:["Di","Lu","Ma","Me","Je","Ve","Sa"],A:["matin","l'après-midi"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("fr",{MMMM:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],MMM:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dddd:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],ddd:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dd:["Di","Lu","Ma","Me","Je","Ve","Sa"],A:["matin","l'après-midi"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Hindi (hi) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("hi",{MMMM:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"],MMM:["जन.","फ़र.","मार्च","अप्रै.","मई","जून","जुल.","अग.","सित.","अक्टू.","नव.","दिस."],dddd:["रविवार","सोमवार","मंगलवार","बुधवार","गुरूवार","शुक्रवार","शनिवार"],ddd:["रवि","सोम","मंगल","बुध","गुरू","शुक्र","शनि"],dd:["र","सो","मं","बु","गु","शु","श"],A:["रात","सुबह","दोपहर","शाम"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]}},parser:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>9?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("hi",{MMMM:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"],MMM:["जन.","फ़र.","मार्च","अप्रै.","मई","जून","जुल.","अग.","सित.","अक्टू.","नव.","दिस."],dddd:["रविवार","सोमवार","मंगलवार","बुधवार","गुरूवार","शुक्रवार","शनिवार"],ddd:["रवि","सोम","मंगल","बुध","गुरू","शुक्र","शनि"],dd:["र","सो","मं","बु","गु","शु","श"],A:["रात","सुबह","दोपहर","शाम"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]}},parser:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>9?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Hungarian (hu) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("hu",{MMMM:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],MMM:["jan","feb","márc","ápr","máj","jún","júl","aug","szept","okt","nov","dec"],dddd:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],ddd:["vas","hét","kedd","sze","csüt","pén","szo"],dd:["v","h","k","sze","cs","p","szo"],A:["de","du"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("hu",{MMMM:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],MMM:["jan","feb","márc","ápr","máj","jún","júl","aug","szept","okt","nov","dec"],dddd:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],ddd:["vas","hét","kedd","sze","csüt","pén","szo"],dd:["v","h","k","sze","cs","p","szo"],A:["de","du"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Indonesian (id) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("id",{MMMM:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],MMM:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],dddd:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],ddd:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dd:["Mg","Sn","Sl","Rb","Km","Jm","Sb"],A:["pagi","siang","sore","malam"],formatter:{A:function(e){var t=e.getHours();return t<11?this.A[0]:t<15?this.A[1]:t<19?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<1?e:t<2&&e>=11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("id",{MMMM:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],MMM:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],dddd:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],ddd:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dd:["Mg","Sn","Sl","Rb","Km","Jm","Sb"],A:["pagi","siang","sore","malam"],formatter:{A:function(e){var t=e.getHours();return t<11?this.A[0]:t<15?this.A[1]:t<19?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<1?e:t<2&&e>=11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Italian (it) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("it",{MMMM:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],MMM:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],dddd:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],ddd:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dd:["Do","Lu","Ma","Me","Gi","Ve","Sa"],A:["di mattina","di pomerrigio"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("it",{MMMM:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],MMM:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],dddd:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],ddd:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dd:["Do","Lu","Ma","Me","Gi","Ve","Sa"],A:["di mattina","di pomerrigio"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Japanese (ja) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("ja",{MMMM:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],MMM:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],ddd:["日","月","火","水","木","金","土"],dd:["日","月","火","水","木","金","土"],A:["午前","午後"],formatter:{hh:function(e){return("0"+e.getHours()%12).slice(-2)},h:function(e){return e.getHours()%12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("ja",{MMMM:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],MMM:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],ddd:["日","月","火","水","木","金","土"],dd:["日","月","火","水","木","金","土"],A:["午前","午後"],formatter:{hh:function(e){return("0"+e.getHours()%12).slice(-2)},h:function(e){return e.getHours()%12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Javanese (jv) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("jv",{MMMM:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],MMM:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nop","Des"],dddd:["Minggu","Senen","Seloso","Rebu","Kemis","Jemuwah","Septu"],ddd:["Min","Sen","Sel","Reb","Kem","Jem","Sep"],dd:["Mg","Sn","Sl","Rb","Km","Jm","Sp"],A:["enjing","siyang","sonten","ndalu"],formatter:{A:function(e){var t=e.getHours();return t<11?this.A[0]:t<15?this.A[1]:t<19?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<1?e:t<2&&e>=11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("jv",{MMMM:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],MMM:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nop","Des"],dddd:["Minggu","Senen","Seloso","Rebu","Kemis","Jemuwah","Septu"],ddd:["Min","Sen","Sel","Reb","Kem","Jem","Sep"],dd:["Mg","Sn","Sl","Rb","Km","Jm","Sp"],A:["enjing","siyang","sonten","ndalu"],formatter:{A:function(e){var t=e.getHours();return t<11?this.A[0]:t<15?this.A[1]:t<19?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<1?e:t<2&&e>=11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Korean (ko) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("ko",{MMMM:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],MMM:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dddd:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],ddd:["일","월","화","수","목","금","토"],dd:["일","월","화","수","목","금","토"],A:["오전","오후"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("ko",{MMMM:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],MMM:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dddd:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],ddd:["일","월","화","수","목","금","토"],dd:["일","월","화","수","목","금","토"],A:["오전","오후"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Burmese (my) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){var t=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],n={"၀":0,"၁":1,"၂":2,"၃":3,"၄":4,"၅":5,"၆":6,"၇":7,"၈":8,"၉":9};e.setLocales("my",{MMMM:["ဇန်နဝါရီ","ဖေဖော်ဝါရီ","မတ်","ဧပြီ","မေ","ဇွန်","ဇူလိုင်","သြဂုတ်","စက်တင်ဘာ","အောက်တိုဘာ","နိုဝင်ဘာ","ဒီဇင်ဘာ"],MMM:["ဇန်","ဖေ","မတ်","ပြီ","မေ","ဇွန်","လိုင်","သြ","စက်","အောက်","နို","ဒီ"],dddd:["တနင်္ဂနွေ","တနင်္လာ","အင်္ဂါ","ဗုဒ္ဓဟူး","ကြာသပတေး","သောကြာ","စနေ"],ddd:["နွေ","လာ","ဂါ","ဟူး","ကြာ","သော","နေ"],dd:["နွေ","လာ","ဂါ","ဟူး","ကြာ","သော","နေ"],formatter:{post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{pre:function(e){return e.replace(/[၀၁၂၃၄၅၆၇၈၉]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){var t=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],n={"၀":0,"၁":1,"၂":2,"၃":3,"၄":4,"၅":5,"၆":6,"၇":7,"၈":8,"၉":9};e.setLocales("my",{MMMM:["ဇန်နဝါရီ","ဖေဖော်ဝါရီ","မတ်","ဧပြီ","မေ","ဇွန်","ဇူလိုင်","သြဂုတ်","စက်တင်ဘာ","အောက်တိုဘာ","နိုဝင်ဘာ","ဒီဇင်ဘာ"],MMM:["ဇန်","ဖေ","မတ်","ပြီ","မေ","ဇွန်","လိုင်","သြ","စက်","အောက်","နို","ဒီ"],dddd:["တနင်္ဂနွေ","တနင်္လာ","အင်္ဂါ","ဗုဒ္ဓဟူး","ကြာသပတေး","သောကြာ","စနေ"],ddd:["နွေ","လာ","ဂါ","ဟူး","ကြာ","သော","နေ"],dd:["နွေ","လာ","ဂါ","ဟူး","ကြာ","သော","နေ"],formatter:{post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{pre:function(e){return e.replace(/[၀၁၂၃၄၅၆၇၈၉]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Dutch (nl) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("nl",{MMMM:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],MMM:{withdots:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],withoutdots:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"]},dddd:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],ddd:["zo.","ma.","di.","wo.","do.","vr.","za."],dd:["Zo","Ma","Di","Wo","Do","Vr","Za"],formatter:{MMM:function(e,t){return this.MMM[/-MMM-/.test(t)?"withoutdots":"withdots"][e.getMonth()]}},parser:{MMM:function(e,t){return this.parser.find(this.MMM[/-MMM-/.test(t)?"withoutdots":"withdots"],e)}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("nl",{MMMM:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],MMM:{withdots:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],withoutdots:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"]},dddd:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],ddd:["zo.","ma.","di.","wo.","do.","vr.","za."],dd:["Zo","Ma","Di","Wo","Do","Vr","Za"],formatter:{MMM:function(e,t){return this.MMM[/-MMM-/.test(t)?"withoutdots":"withdots"][e.getMonth()]}},parser:{MMM:function(e,t){return this.parser.find(this.MMM[/-MMM-/.test(t)?"withoutdots":"withdots"],e)}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Punjabi (pa-in) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){var t=["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],n={"੦":0,"੧":1,"੨":2,"੩":3,"੪":4,"੫":5,"੬":6,"੭":7,"੮":8,"੯":9};e.setLocales("pa-in",{MMMM:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"],MMM:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"],dddd:["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨੀਚਰਵਾਰ"],ddd:["ਐਤ","ਸੋਮ","ਮੰਗਲ","ਬੁਧ","ਵੀਰ","ਸ਼ੁਕਰ","ਸ਼ਨੀ"],dd:["ਐਤ","ਸੋਮ","ਮੰਗਲ","ਬੁਧ","ਵੀਰ","ਸ਼ੁਕਰ","ਸ਼ਨੀ"],A:["ਰਾਤ","ਸਵੇਰ","ਦੁਪਹਿਰ","ਸ਼ਾਮ"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]},post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>=10?e:e+12},pre:function(e){return e.replace(/[੦੧੨੩੪੫੬੭੮੯]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){var t=["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],n={"੦":0,"੧":1,"੨":2,"੩":3,"੪":4,"੫":5,"੬":6,"੭":7,"੮":8,"੯":9};e.setLocales("pa-in",{MMMM:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"],MMM:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"],dddd:["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨੀਚਰਵਾਰ"],ddd:["ਐਤ","ਸੋਮ","ਮੰਗਲ","ਬੁਧ","ਵੀਰ","ਸ਼ੁਕਰ","ਸ਼ਨੀ"],dd:["ਐਤ","ਸੋਮ","ਮੰਗਲ","ਬੁਧ","ਵੀਰ","ਸ਼ੁਕਰ","ਸ਼ਨੀ"],A:["ਰਾਤ","ਸਵੇਰ","ਦੁਪਹਿਰ","ਸ਼ਾਮ"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]},post:function(e){return e.replace(/\d/g,function(e){return t[0|e]})}},parser:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>=10?e:e+12},pre:function(e){return e.replace(/[੦੧੨੩੪੫੬੭੮੯]/g,function(e){return""+n[e]})}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Polish (pl) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("pl",{MMMM:{nominative:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],subjective:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"]},MMM:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],dddd:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],ddd:["nie","pon","wt","śr","czw","pt","sb"],dd:["Nd","Pn","Wt","Śr","Cz","Pt","So"],formatter:{MMMM:function(e,t){return this.MMMM[/D MMMM/.test(t)?"subjective":"nominative"][e.getMonth()]}},parser:{MMMM:function(e,t){return this.parser.find(this.MMMM[/D MMMM/.test(t)?"subjective":"nominative"],e)}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("pl",{MMMM:{nominative:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],subjective:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"]},MMM:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],dddd:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],ddd:["nie","pon","wt","śr","czw","pt","sb"],dd:["Nd","Pn","Wt","Śr","Cz","Pt","So"],formatter:{MMMM:function(e,t){return this.MMMM[/D MMMM/.test(t)?"subjective":"nominative"][e.getMonth()]}},parser:{MMMM:function(e,t){return this.parser.find(this.MMMM[/D MMMM/.test(t)?"subjective":"nominative"],e)}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Portuguese (pt) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("pt",{MMMM:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],MMM:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dddd:["Domingo","Segunda-Feira","Terça-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","Sábado"],ddd:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dd:["Dom","2ª","3ª","4ª","5ª","6ª","Sáb"],A:["da madrugada","da manhã","da tarde","da noite"],formatter:{A:function(e){var t=e.getHours();return t<5?this.A[0]:t<12?this.A[1]:t<19?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("pt",{MMMM:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],MMM:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dddd:["Domingo","Segunda-Feira","Terça-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","Sábado"],ddd:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dd:["Dom","2ª","3ª","4ª","5ª","6ª","Sáb"],A:["da madrugada","da manhã","da tarde","da noite"],formatter:{A:function(e){var t=e.getHours();return t<5?this.A[0]:t<12?this.A[1]:t<19?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Romanian (ro) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("ro",{MMMM:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],MMM:["ian.","febr.","mart.","apr.","mai","iun.","iul.","aug.","sept.","oct.","nov.","dec."],dddd:["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],ddd:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],dd:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("ro",{MMMM:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],MMM:["ian.","febr.","mart.","apr.","mai","iun.","iul.","aug.","sept.","oct.","nov.","dec."],dddd:["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],ddd:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],dd:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Russian (ru) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("ru",{MMMM:["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],MMM:["янв","фев","мар","апр","мая","июня","июля","авг","сен","окт","ноя","дек"],dddd:["Воскресенье","Понедельник","Вторник","Среду","Четверг","Пятницу","Субботу"],ddd:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dd:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],A:["ночи","утра","дня","вечера"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<12?this.A[1]:t<17?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("ru",{MMMM:["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],MMM:["янв","фев","мар","апр","мая","июня","июля","авг","сен","окт","ноя","дек"],dddd:["Воскресенье","Понедельник","Вторник","Среду","Четверг","Пятницу","Субботу"],ddd:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dd:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],A:["ночи","утра","дня","вечера"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<12?this.A[1]:t<17?this.A[2]:this.A[3]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Serbian (sr) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("sr",{MMMM:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],MMM:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],dddd:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],ddd:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],dd:["ne","po","ut","sr","če","pe","su"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("sr",{MMMM:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],MMM:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],dddd:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],ddd:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],dd:["ne","po","ut","sr","če","pe","su"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Thai (th) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("th",{MMMM:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],MMM:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dddd:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],ddd:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์"],dd:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],A:["ก่อนเที่ยง","หลังเที่ยง"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("th",{MMMM:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],MMM:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dddd:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],ddd:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์"],dd:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],A:["ก่อนเที่ยง","หลังเที่ยง"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Turkish (tr) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("tr",{MMMM:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],MMM:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dddd:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],ddd:["Paz","Pts","Sal","Çar","Per","Cum","Cts"],dd:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("tr",{MMMM:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],MMM:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dddd:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],ddd:["Paz","Pts","Sal","Çar","Per","Cum","Cts"],dd:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Ukrainian (uk) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("uk",{MMMM:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"],MMM:["січ","лют","бер","квіт","трав","черв","лип","серп","вер","жовт","лист","груд"],dddd:{nominative:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"],accusative:["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"],genitive:["неділі","понеділка","вівторка","середи","четверга","п’ятниці","суботи"]},ddd:["нд","пн","вт","ср","чт","пт","сб"],dd:["нд","пн","вт","ср","чт","пт","сб"],A:["ночі","ранку","дня","вечора"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<12?this.A[1]:t<17?this.A[2]:this.A[3]},dddd:function(e,t){var n="nominative";return/(\[[ВвУу]\]) ?dddd/.test(t)?n="accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)&&(n="genitive"),this.dddd[n][e.getDay()]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("uk",{MMMM:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"],MMM:["січ","лют","бер","квіт","трав","черв","лип","серп","вер","жовт","лист","груд"],dddd:{nominative:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"],accusative:["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"],genitive:["неділі","понеділка","вівторка","середи","четверга","п’ятниці","суботи"]},ddd:["нд","пн","вт","ср","чт","пт","сб"],dd:["нд","пн","вт","ср","чт","пт","сб"],A:["ночі","ранку","дня","вечора"],formatter:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<12?this.A[1]:t<17?this.A[2]:this.A[3]},dddd:function(e,t){var n="nominative";return/(\[[ВвУу]\]) ?dddd/.test(t)?n="accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)&&(n="genitive"),this.dddd[n][e.getDay()]}},parser:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Uzbek (uz) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("uz",{MMMM:["январ","феврал","март","апрел","май","июн","июл","август","сентябр","октябр","ноябр","декабр"],MMM:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],dddd:["Якшанба","Душанба","Сешанба","Чоршанба","Пайшанба","Жума","Шанба"],ddd:["Якш","Душ","Сеш","Чор","Пай","Жум","Шан"],dd:["Як","Ду","Се","Чо","Па","Жу","Ша"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("uz",{MMMM:["январ","феврал","март","апрел","май","июн","июл","август","сентябр","октябр","ноябр","декабр"],MMM:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],dddd:["Якшанба","Душанба","Сешанба","Чоршанба","Пайшанба","Жума","Шанба"],ddd:["Якш","Душ","Сеш","Чор","Пай","Жум","Шан"],dd:["Як","Ду","Се","Чо","Па","Жу","Ша"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Vietnamese (vi) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("vi",{MMMM:["tháng 1","tháng 2","tháng 3","tháng 4","tháng 5","tháng 6","tháng 7","tháng 8","tháng 9","tháng 10","tháng 11","tháng 12"],MMM:["Th01","Th02","Th03","Th04","Th05","Th06","Th07","Th08","Th09","Th10","Th11","Th12"],dddd:["chủ nhật","thứ hai","thứ ba","thứ tư","thứ năm","thứ sáu","thứ bảy"],ddd:["CN","T2","T3","T4","T5","T6","T7"],dd:["CN","T2","T3","T4","T5","T6","T7"],A:["sa","ch"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("vi",{MMMM:["tháng 1","tháng 2","tháng 3","tháng 4","tháng 5","tháng 6","tháng 7","tháng 8","tháng 9","tháng 10","tháng 11","tháng 12"],MMM:["Th01","Th02","Th03","Th04","Th05","Th06","Th07","Th08","Th09","Th10","Th11","Th12"],dddd:["chủ nhật","thứ hai","thứ ba","thứ tư","thứ năm","thứ sáu","thứ bảy"],ddd:["CN","T2","T3","T4","T5","T6","T7"],dd:["CN","T2","T3","T4","T5","T6","T7"],A:["sa","ch"]})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Chinese (zh-cn) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("zh-cn",{MMMM:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],MMM:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ddd:["周日","周一","周二","周三","周四","周五","周六"],dd:["日","一","二","三","四","五","六"],A:["凌晨","早上","上午","中午","下午","晚上"],formatter:{A:function(e){var t=100*e.getHours()+e.getMinutes();return t<600?this.A[0]:t<900?this.A[1]:t<1130?this.A[2]:t<1230?this.A[3]:t<1800?this.A[4]:this.A[5]}},parser:{h:function(e,t){return t<4?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** +!function(o){"use strict";var s=function(e){e.setLocales("zh-cn",{MMMM:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],MMM:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ddd:["周日","周一","周二","周三","周四","周五","周六"],dd:["日","一","二","三","四","五","六"],A:["凌晨","早上","上午","中午","下午","晚上"],formatter:{A:function(e){var t=100*e.getHours()+e.getMinutes();return t<600?this.A[0]:t<900?this.A[1]:t<1130?this.A[2]:t<1230?this.A[3]:t<1800?this.A[4]:this.A[5]}},parser:{h:function(e,t){return t<4?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){var r,i,a;/** * @preserve date-and-time.js locale configuration * @preserve Chinese (zh-tw) * @preserve It is using moment.js locale configuration as a reference. */ -!function(o){"use strict";var s=function(e){e.setLocales("zh-tw",{MMMM:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],MMM:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ddd:["周日","周一","周二","周三","周四","周五","周六"],dd:["日","一","二","三","四","五","六"],A:["早上","上午","中午","下午","晚上"],formatter:{A:function(e){var t=100*e.getHours()+e.getMinutes();return t<900?this.A[0]:t<1130?this.A[1]:t<1230?this.A[2]:t<1800?this.A[3]:this.A[4]}},parser:{h:function(e,t){return t<3?e:e>11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(137)):(i=[n(137)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){"use strict";function r(e,t,n,r){return void 0===n&&(n=T.builtInRegistry()),v(e,new D(null,t,!1,r),n,!1,!1,!0,!1,!1,[])}function i(e,t,n){return void 0===t&&(t=T.builtInRegistry()),u(new D(null,e,!1,n),t)}function a(e){return"?"==e.charAt(e.length-1)}function o(e,t){void 0===t&&(t=T.builtInRegistry());var n=e.provider&&e.provider();return u(new D(null,e,!1,n),t)}function s(e){return new F(e)}function u(e,t,n){void 0===n&&(n=!1);var r=new x(e.path());if(e.anchor){if(e.anchor().__$$)return e.anchor().__$$;e.anchor().__$$=r}var i=e.childWithKey("types");i&&i.kind()===E.ARRAY&&(i=s(i));var a=e.childWithKey("schemas");a&&a.kind()===E.ARRAY&&(a=s(a));var o=new k(i,a,t,r);if(i&&i.kind()!==E.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=T.derive(e.key(),[T.REFERENCE]);r.add(t),o.addType(t)}),a&&a.kind()!==E.SCALAR&&a.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=T.derive(e.key(),[T.REFERENCE]);r.add(t),o.addType(t)}),!n){var l=e.childWithKey("uses");l&&l.kind()===E.ARRAY&&(l=s(l)),l&&l.kind()===E.MAP&&l.children().forEach(function(e){r.addLibrary(e.key(),u(e,t))})}i&&i.kind()!==E.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){o.get(e.key())}),a&&a.kind()!==E.SCALAR&&a.children().filter(function(e){return e.key()&&!0}).forEach(function(e){o.get(e.key())}),o.types().forEach(function(e){return r.add(e)});var i=e.childWithKey("annotationTypes");return i&&i.kind()===E.ARRAY&&(i=s(i)),null!=i&&i.kind()===E.MAP&&i.children().forEach(function(e){r.addAnnotationType(v(e.key(),e,o,!1,!0,!1,!1,!1,[]))}),r}function l(e,t,n){var r=new U,i=!1,o=e.childWithKey("required");if(o){var s=o.value();if("boolean"==typeof s)i=!0;else if(s&&"object"==typeof s&&"boolean"==typeof s.value){i=!0;var u=Object.keys(s).filter(function(e){return e=e.trim(),e.length>1&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)});u.length&&(r.annotations=u.map(function(e){return e=e.trim(),{name:e.substring(1,e.length-1).trim(),key:e,value:s[e]}}))}s===!1&&(r.optional=!0,r.id=e.key())}var l=e.key();!i&&a(e.key())&&(l=l.substr(0,l.length-1),r.optional=!0),null!=l&&0==l.length||"/.*/"===l?r.additonal=!0:"/"==l.charAt(0)&&"/"==l.charAt(l.length-1)&&(l=l.substring(1,l.length-1),r.regExp=!0);var p=[].concat(n);p.push(l),r.type=v(null,e,t,!1,!1,!1,!1,!0,p);var c=e.getMeta("chaining");if(c&&c.length>0&&0==r.type.metaOfType(R.ImportedByChain).length){var f=r.type;if(r.type.isArray()){var h=r.type.metaOfType(N.ComponentShouldBeOfType);if(h&&h.length>0){var d=h[0].value();f=T.derive("",[d]),h[0].type=f}}else if(r.type.isUnion()){var m=r.type.allOptions();m.length>0&&(f=T.derive("",[m[0]]),m[0]=f)}if(0==f.metaOfType(R.ImportedByChain).length){!f.isSubTypeOf(T.UNKNOWN)&&T.InheritedType.isInstance(f)&&f.addSuper(T.UNKNOWN);for(var y=0,g=c;y0&&(t.types=n);var n={};return e.annotationTypes().forEach(function(e){n[e.name()]=c(e)}),Object.keys(n).length>0&&(t.annotationTypes=n),t}function h(e){if(e.isAnonymous()){if(e.isArray()){var t=e.oneMeta(N.ComponentShouldBeOfType);if(t){var n=t.value();return n.isAnonymous()&&n.isUnion()?"("+h(n)+")[]":h(n)+"[]"}}return e.isUnion()?e.options().map(function(e){return h(e)}).join(" | "):e.superTypes().map(function(e){return h(e)}).join(" , ")}return e.name()}function d(e,t){if(t===T.ANY||e===t||e.superTypes().some(function(e){return d(e,t)}))return!0;if(e.isUnion()&&e.options){var n=e.options();if(n.some(function(e){return d(e,t)}))return!0}if(t.isUnion()&&t.options){var n=t.options();if(n.some(function(t){return e==t}))return!0}return!1}function m(e,t){var n=e.requiredType(),r=e.requiredTypes();return r&&r.length>0?r.some(function(e){return d(t,e)}):d(t,n)}function y(e,t){for(var n=t.kind()==E.ARRAY?t.children():[t],r=0;r0){var w=I;if(d.isArray()){var L=d.metaOfType(N.ComponentShouldBeOfType);if(L&&L.length>0){var D=L[0].value();w=T.derive("",[D]),L[0].type=w}}else if(d.isUnion()){var U=d.allOptions();U.length>0&&(w=T.derive("",[U[0]]),U[0]=w)}if(0==w.metaOfType(R.ImportedByChain).length){w.isSubTypeOf(T.UNKNOWN)||w.addSuper(T.UNKNOWN);for(var F=0,B=C;F0&&G.filter(function(e){return e.length>0}).length>0)for(var Q=0,Z=G;Q=0&&n.get($.name())}var pe=T.derive(e,W);o&&H&&pe.addMeta(new R.TypeAttributeValue(H.value()));for(var ce=0;ce0&&k.isInstance(n)&&(pe=g(pe,n));var he=pe,de=null;if(t.children().forEach(function(e){var r=e.key(),i=e.childWithKey("value"),a=e;if("example"!=r&&"discriminatorValue"!=r&&i&&(a=i),r&&"type"!==r&&"uses"!==r&&"schema"!==r&&("properties"!=r&&"additionalProperties"!=r||!pe.isSubTypeOf(T.OBJECT))){var s;if("items"==r){if(pe.isSubTypeOf(T.ARRAY)){var u=[],l=[a];if(a.kind()==E.ARRAY){l=a.children();var f=T.error(_.ITEMS_SHOULD_BE_REFERENCE_OR_INLINE_TYPE,he);f.setValidationPath({name:"items"}),pe.putExtra(S.PARSE_ERROR,f)}var u=l.map(function(e){var r=e.childWithKey("value");if(!r||r.kind()!=E.SCALAR&&r.kind()!=E.MAP||(e=r),e.kind()==E.SCALAR){var i=e.value();if(null==i||"Null"==i||"NULL"==i)return T.STRING;var o=b.parseToType(""+i,n,t);return V(o,a),o}if(e.kind()==E.MAP){var s=[].concat(c);return s.push("#super"),v("",e,n,!1,!1,!1,!1,!1,s)}}),h=1==u.length?u[0]:T.derive("",u);return s=new P.ComponentShouldBeOfType(h),he.addMeta(s),he.putExtra(S.HAS_ITEMS,!0),y(s,e),s}if(!o){var d=T.error(_.ITEMS_DEFINED_FOR_NON_ARRAY,he);d.setValidationPath({name:"items"}),pe.putExtra(S.PARSE_ERROR,d)}}else{if("required"==r&&!p)return;if("facets"===r)return void(de=[r]);if("default"==r||"xml"==r||"required"==r)de=de?de.concat(r):[r];else if("("==r.charAt(0)&&")"==r.charAt(r.length-1)){var g=new R.Annotation(r.substr(1,r.length-2),a.value(),r);return g.setNode(a),void pe.addMeta(g)}if(s=M.getInstance().buildFacet(r,a.value()),s&&("format"!=r||m(s,pe)))s.setNode(a),pe.addMeta(s);else{var A=new R.CustomFacet(r,a.value());A.setNode(a),pe.addMeta(A)}}s&&y(s,e)}}),0==pe.metaOfType(R.DiscriminatorValue).length&&a&&pe.addMeta(new R.DiscriminatorValue(pe.name(),!1)),pe.isSubTypeOf(T.OBJECT)){var me=t.childWithKey("properties"),ye=!1;if(me)if(pe.addMeta(new R.HasPropertiesFacet),me.kind()==E.MAP)me.children().forEach(function(e){ye=!0;var t=[].concat(c);t.push("#props"),l(e,n,t).add(pe,t)});else{var ve=T.error(_.PROPERTIES_MAP,he);ve.setValidationPath({name:"properties"}),pe.putExtra(S.PARSE_ERROR,ve)}var ge=t.childWithKey("additionalProperties");if(ge){var X=ge.childWithKey("value");if(X&&(ge=X),"boolean"==typeof ge.value())pe.addMeta(new O.KnownPropertyRestriction(ge.value()));else{var ve=T.error(_.ADDITIONAL_PROPERTIES_BOOLEAN,he);ve.setValidationPath({name:"additionalProperties"}),pe.putExtra(S.PARSE_ERROR,ve)}}}var me=t.childWithKey("facets");if(me)if(me.kind()==E.MAP)me.children().forEach(function(e){var t=[].concat(c);t.push("#facets");var r=l(e,n,t);pe.addMeta(new R.FacetDeclaration(r.id,r.type,r.optional))});else{var ve=T.error(_.FACETS_MAP,he);ve.setValidationPath({name:"facets"}),pe.putExtra(S.PARSE_ERROR,ve)}if(pe.isAnonymous()&&pe.isEmpty()&&1==pe.superTypes().length){var Ae=pe.superTypes()[0];return V(Ae,t),Ae}return t.kind()!=E.SCALAR&&pe.addMeta(new R.NotScalar),Y&&he.putExtra(T.SCHEMA_AND_TYPE,!0),he.putExtra(T.GLOBAL,a),he.putExtra(T.SOURCE_EXTRA,t),de&&he.putExtra(S.HAS_FACETS,de),V(he,t),t.getMeta("acceptAllScalarsAsStrings")&&he.addMeta(new R.AcceptAllScalarsAsStrings),he}function g(e,t){for(var n,r=t;r&&!(n=r.typeMap()[e.name()]);)r=r.parent();return null!=n&&n.isSubTypeOf(T.REFERENCE)?null!=n&&n.isSubTypeOf(T.REFERENCE)&&(n.patch(e),e=n):t.addType(e),e.putExtra(S.TOP_LEVEL_EXTRA,!0),e}var A=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var E,T=n(58),_=T.messageRegistry,S=n(72),N=n(74),I=n(58),b=n(171),M=n(134),R=n(76),C=n(76),w=n(58),P=n(74),L=n(59),O=n(74);!function(e){e[e.SCALAR=0]="SCALAR",e[e.ARRAY=1]="ARRAY",e[e.MAP=2]="MAP"}(E=t.NodeKind||(t.NodeKind={}));var D=function(){function e(e,t,n,r){void 0===n&&(n=!1),this._key=e,this.obj=t,this.inArr=n,this.provider=r}return e.prototype.value=function(){return this.obj},e.prototype.key=function(){if(!this._key&&this.kind()===E.MAP&&this.inArr){var e=Object.keys(this.obj);if(1===e.length)return e[0]}return this._key},e.prototype.childWithKey=function(t){return null==this.obj?null:this.obj.hasOwnProperty(t)?new e(t,this.obj[t],!1,this.contentProvider()):null},e.prototype.children=function(){var t=this;return Array.isArray(this.obj)?this.obj.map(function(n){return new e(null,n,!0,t.contentProvider())}):this.obj&&"object"==typeof this.obj?Object.keys(this.obj).map(function(n){return new e(n,t.obj[n],!1,t.provider)}):[]},e.prototype.kind=function(){return this.obj?Array.isArray(this.obj)?E.ARRAY:"object"==typeof this.obj?E.MAP:E.SCALAR:E.SCALAR},e.prototype.contentProvider=function(){return this.provider},e.prototype.getMeta=function(e){return null},e.prototype.path=function(){return JSON.stringify(this.obj)},e}();t.parseJSON=r,t.parseJSONTypeCollection=i;var U=function(){function e(){}return e.prototype.add=function(e,t){this.optional||this.additonal||this.regExp||this.type.isSubTypeOf(T.NIL)||e.addMeta(new N.HasProperty(this.id));var n;if(n=this.additonal?new N.AdditionalPropertyIs(this.type):this.regExp?new N.MapPropertyIs(this.id,this.type,this.optional):new N.PropertyIs(this.id,this.type,this.optional),null!=n&&(e.addMeta(n),this.type instanceof T.InheritedType&&null==this.type.name()&&this.type.setContextMeta(n),this.annotations&&this.annotations.length))for(var r=0,i=this.annotations;r0&&(1==this.superTypes.length?e.type=this.superTypes[0]:e.type=this.superTypes),this.customFacets&&this.customFacets.forEach(function(t){return e[t.facetName()]=t.value()}),this.annotations&&this.annotations.forEach(function(t){return e["("+t.facetName()+")"]=t.value()}),this.facetDeclarations&&this.facetDeclarations.length>0){var t={};this.facetDeclarations.forEach(function(e){var n=e.facetName();e.isOptional()&&(n+="?");var r=null;r=e.type().isAnonymous()?e.type().isEmpty()?h(e.type()):p(e.type()).toJSON():h(e.type()),t[n]=r}),e.facets=t}if(this.properties&&this.properties.length>0){var n={};this.properties.forEach(function(e){var t=e.id;e.optional&&(t+="?"),e.additonal&&(t="/.*/"),e.regExp&&(t="/"+e.id+"/");var r=null;r=e.type.isAnonymous()?e.type.isEmpty()?h(e.type):p(e.type).toJSON():h(e.type),n[t]=r}),e.properties=n}return this.basicFacets&&this.basicFacets.forEach(function(t){e[t.facetName()]=t.value()}),1==Object.keys(e).length&&!this.notAScalar&&e.type?e.type:(void 0!==this.additionalProperties&&(e.additionalProperties=this.additionalProperties),e)},e}();t.TypeProto=B,t.toProto=p,t.storeAsJSON=c;var V=function(e,t){t.getMeta("skipValidation")&&e.addMeta(new R.SkipValidation)};t.parse=v},function(e,t,n){"use strict";function r(e,t,n,r,i){if(void 0===r&&(r=null),void 0===i&&(i=!1),null==e)return null;try{var o=e.trim();if(o.length>0){var s="{"==o.charAt(0);if(s||"<"==o.charAt(0)&&o.length>1&&"<"!=o.charAt(1)){var u=n,l=void 0;do l=u,u=l.childWithKey("type");while(u);var c=l&&l.contentProvider&&l.contentProvider();return new h.ExternalType("",o,s,c,r)}var f=p(e),d=a(f,t,i);return d}return h.derive(e,[h.STRING])}catch(t){return h.derive(e,[h.UNKNOWN])}}function i(e,t){for(;e>0;){var n=h.derive("",[h.ARRAY]);n.addMeta(new m.ComponentShouldBeOfType(t)),t=n,e--}return t}function a(e,t,n){if("union"==e.type){var r=e;return h.union("",[a(r.first,t,n),a(r.rest,t,n)])}if("parens"==e.type){var s=e,u=a(s.expr,t,n);return i(s.arr,u)}var l=e;if("?"==l.value.charAt(l.value.length-1)){var p=o(t,l.value.substr(0,l.value.length-1),n);p||(p=h.derive(l.value,[h.UNKNOWN])),p=h.union(l.value,[p,h.NIL]);var c=l.arr;return i(c,p)}var p=o(t,l.value,n);if(!p){p=h.derive(l.value,[h.UNKNOWN]);var f=t.getByChain(l.value);f&&p.addMeta(new y.ImportedByChain(l.value))}var c=l.arr;return i(c,p)}function o(e,t,n){return d.AccumulatingRegistry.isInstance(e)?e.get(t,n):e.get(t)}function s(e){if(e.isSubTypeOf(h.ARRAY)){var t=e.oneMeta(m.ComponentShouldBeOfType);return t?t.value().isUnion()?"("+s(t.value())+")[]":s(t.value())+"[]":"array"}if(e instanceof h.UnionType){var n=e;return n.options().map(function(e){return s(e)}).join(" | ")}return e.isAnonymous()&&e.isEmpty()?e.superTypes().map(function(e){return s(e)}).join(" , "):e.name()}function u(e,t){if(t(e),"union"==e.type){var n=e;u(n.first,t),u(n.rest,t)}else if("parens"==e.type){var r=e;u(r.expr,t)}}function l(e){var t,n=0;if("name"==e.type){var r=e;t=r.value,n=r.arr}else if("union"==e.type){var i=e;t=l(i.first)+" | "+l(i.rest)}else if("parens"==e.type){var a=e;t="("+l(a.expr)+")",n=a.arr}for(;--n>=0;)t+="[]";return t}function p(e){var t=f.parse(e);return t=c(t)}function c(e){if("name"==e.type){var t=e,n=t.value;if(n&&n.length&&"?"==n.charAt(n.length-1)){var r=n.substring(0,n.length-1),i=p(r),a={type:"union",first:i,rest:{type:"name",value:"nil"}};return"number"==typeof t.arr&&t.arr>0&&(a={type:"parens",expr:a,arr:t.arr}),a}return t}if("union"==e.type){var o=e;o.first=c(o.first),o.rest=c(o.rest)}else if("parens"==e.type){var s=e;s.expr=c(s.expr)}return e}Object.defineProperty(t,"__esModule",{value:!0});var f=n(172),h=n(58),d=n(170),m=n(74),y=n(76);t.parseToType=r,t.storeToString=s,t.visit=u,t.serializeToString=l,t.parse=p},function(e,t){"use strict";var n=function(){function e(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function t(e,n,r,i){this.message=e,this.expected=n,this.found=r,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function n(e){function n(t){var n,r,i=G[t];if(i)return i;for(n=t-1;!G[n];)n--;for(i=G[n],i={line:i.line,column:i.column,seenCR:i.seenCR};nX&&(X=Y,z=[]),z.push(e))}function a(e,n,r,i){function a(e){var t=1;for(e.sort(function(e,t){return e.descriptiont.description?1:0});t1?o.slice(0,-1).join(", ")+" or "+o[e.length-1]:o[0],i=t?'"'+n(t)+'"':"end of input","Expected "+r+" but "+i+" found."}return null!==n&&a(n),new t(null!==e?e:o(n,r),n,r,i)}function o(){var t,n,r,a,u,p,c,f;return t=Y,n=l(),n!==h?(r=s(),r!==h?(a=Y,u=l(),u!==h?(124===e.charCodeAt(Y)?(p=y,Y++):(p=h,0===$&&i(v)),p!==h?(c=l(),c!==h?(f=o(),f!==h?(u=[u,p,c,f],a=u):(Y=a,a=h)):(Y=a,a=h)):(Y=a,a=h)):(Y=a,a=h),a===h&&(a=null),a!==h?(q=t,n=g(r,a),t=n):(Y=t,t=h)):(Y=t,t=h)):(Y=t,t=h),t}function s(){var t,n,r,a,s,p,c,f,d,m;if(t=Y,40===e.charCodeAt(Y)?(n=A,Y++):(n=h,0===$&&i(E)),n!==h)if(r=l(),r!==h)if(a=o(),a!==h)if(s=l(),s!==h)if(41===e.charCodeAt(Y)?(p=T,Y++):(p=h,0===$&&i(_)),p!==h){for(c=[],f=Y,d=l(),d!==h?(e.substr(Y,2)===S?(m=S,Y+=2):(m=h,0===$&&i(N)),m!==h?(d=[d,m],f=d):(Y=f,f=h)):(Y=f,f=h);f!==h;)c.push(f),f=Y,d=l(),d!==h?(e.substr(Y,2)===S?(m=S,Y+=2):(m=h,0===$&&i(N)),m!==h?(d=[d,m],f=d):(Y=f,f=h)):(Y=f,f=h);c!==h?(q=t,n=I(a,c),t=n):(Y=t,t=h)}else Y=t,t=h;else Y=t,t=h;else Y=t,t=h;else Y=t,t=h;else Y=t,t=h;return t===h&&(t=u()),t}function u(){var t,n,r,a,o,s;if($++,t=Y,n=[],r=p(),r!==h)for(;r!==h;)n.push(r),r=p();else n=h;if(n!==h){for(r=[],a=Y,o=l(),o!==h?(e.substr(Y,2)===S?(s=S,Y+=2):(s=h,0===$&&i(N)),s!==h?(o=[o,s],a=o):(Y=a,a=h)):(Y=a,a=h);a!==h;)r.push(a),a=Y,o=l(),o!==h?(e.substr(Y,2)===S?(s=S,Y+=2):(s=h,0===$&&i(N)),s!==h?(o=[o,s],a=o):(Y=a,a=h)):(Y=a,a=h);r!==h?(q=t,n=M(n,r),t=n):(Y=t,t=h)}else Y=t,t=h;return $--,t===h&&(n=h,0===$&&i(b)),t}function l(){var t,n;for($++,t=[],C.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=h,0===$&&i(w));n!==h;)t.push(n),C.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=h,0===$&&i(w));return $--,t===h&&(n=h,0===$&&i(R)),t}function p(){var t;return P.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=h,0===$&&i(L)),t===h&&(95===e.charCodeAt(Y)?(t=O,Y++):(t=h,0===$&&i(D)),t===h&&(45===e.charCodeAt(Y)?(t=U,Y++):(t=h,0===$&&i(x)),t===h&&(46===e.charCodeAt(Y)?(t=k,Y++):(t=h,0===$&&i(F)),t===h&&(B.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=h,0===$&&i(V)),t===h&&(K.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=h,0===$&&i(j)),t===h&&(63===e.charCodeAt(Y)?(t=W,Y++):(t=h,0===$&&i(H)))))))),t}var c,f=arguments.length>1?arguments[1]:{},h={},d={Term:o},m=o,y="|",v={type:"literal",value:"|",description:'"|"'},g=function(e,t){return t?{type:"union",first:e,rest:t[3]}:e},A="(",E={type:"literal",value:"(",description:'"("'},T=")",_={type:"literal",value:")",description:'")"'},S="[]",N={type:"literal",value:"[]",description:'"[]"'},I=function(e,t){return{type:"parens",expr:e,arr:t.length}},b={type:"other",description:"name"},M=function(e,t){return{type:"name",value:e.join(""),arr:t.length}},R={type:"other",description:"whitespace"},C=/^[ \t\n\r]/,w={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},P=/^[A-Z]/,L={type:"class",value:"[A-Z]",description:"[A-Z]"},O="_",D={type:"literal",value:"_",description:'"_"'},U="-",x={type:"literal",value:"-",description:'"-"'},k=".",F={type:"literal",value:".",description:'"."'},B=/^[a-z:#\/]/,V={type:"class",value:"[a-z]",description:"[a-z]"},K=/^[0-9]/,j={type:"class",value:"[0-9]",description:"[0-9]"},W="?",H={type:"literal",value:"?",description:'"?"'},Y=0,q=0,G=[{line:1,column:1,seenCR:!1}],X=0,z=[],$=0;if("startRule"in f){if(!(f.startRule in d))throw new Error("Can't start parsing from rule \""+f.startRule+'".');m=d[f.startRule]}if(c=m(),c!==h&&Y===e.length)return c;throw c!==h&&Y0&&this.superTypes().forEach(function(r){r instanceof t&&r.allFacets(e).forEach(function(e){return n[e.nameId()]=e})}),this._facets.forEach(function(e){return n[e.nameId()]=e}),this._allFacets=Object.keys(n).map(function(e){return n[e]}),this._allFacets},t.prototype.facets=function(){return[].concat(this._facets)},t.prototype.facet=function(e){return u.find(this.allFacets(),function(t){return t.nameId()==e})},t.prototype.typeId=function(){return this.nameId()},t.prototype.allProperties=function(e){if(void 0===e&&(e={}),this._props)return this._props;var n=i(this);if(e[n])return[];e[n]=this;var r={};this.superTypes().length>0&&this.superTypes().forEach(function(n){n instanceof t?n.allProperties(e).forEach(function(e){return r[e.nameId()]=e}):n.allProperties().forEach(function(e){return r[e.nameId()]=e})});for(var a in this.fixedFacets())delete r[a];return this.properties().forEach(function(e){return r[e.nameId()]=e}),this._props=Object.keys(r).map(function(e){return r[e]}),this._props},t.prototype.property=function(e){return u.find(this.allProperties(),function(t){return t.nameId()==e})},t.prototype.hasValueTypeInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasValueTypeInHierarchy()}finally{t.uc=!1}})},t.prototype.isAnnotationType=function(){return!1},t.prototype.hasStructure=function(){return!1},t.prototype.key=function(){return this._key?this._key:this._universe&&(this._key=this.universe().matched()[this.nameId()],!this._key)?null:this._key},t.prototype.hasArrayInHierarchy=function(){var e=null!=u.find(this.allSuperTypes(),function(e){return e instanceof N});return e},t.prototype.arrayInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof N&&(t=e)}),t},t.prototype.unionInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof S&&(t=e)}),t},t.prototype.hasExternalInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e instanceof I}finally{t.uc=!1}})},t.prototype.hasUnionInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasUnionInHierarchy()}finally{t.uc=!1}})},t.prototype.fixFacet=function(e,t,n){void 0===n&&(n=!1),n?this._fixedBuildInFacets[e]=t:this._fixedFacets[e]=t},t.prototype.getFixedFacets=function(){return this.fixedFacets()},t.prototype.fixedFacets=function(){return this.collectFixedFacets(!1)},t.prototype.fixedBuiltInFacets=function(){return this.collectFixedFacets(!0)},t.prototype.collectFixedFacets=function(e){for(var t=e?this._fixedBuildInFacets:this._fixedFacets,n={},r=0,i=Object.keys(t);r0&&!n.hideProperties&&(a+=e+i+"Properties:\n",s.forEach(function(n){var r="",o=n.range();o instanceof h&&(r+=o.nameId()),o instanceof t&&(r+="[",r+=o.getTypeClassName(),r+="]"),a+=e+i+i+n.nameId()+" : "+r+"\n"}));var l=this.superTypes(),p=l;return l&&!n.printStandardSuperclasses&&(p=u.filter(l,function(e){var n=e instanceof h?e.nameId():"",i=e instanceof t?e.getTypeClassName():"";return!r.isStandardSuperclass(n,i)})),p&&p.length>0&&(a+=e+i+"Super types:\n",p.forEach(function(t){a+=t.printDetails(e+i+i,{hideProperties:n.hideSuperTypeProperties,hideSuperTypeProperties:n.hideSuperTypeProperties,printStandardSuperclasses:n.printStandardSuperclasses})})),a},t.prototype.getTypeClassName=function(){return this.constructor.toString().match(/\w+/g)[1]},t.prototype.isStandardSuperclass=function(e,t){return"TypeDeclaration"===e&&"NodeClass"===t||("ObjectTypeDeclaration"===e&&"NodeClass"===t||"RAMLLanguageElement"===e&&"NodeClass"===t)},t.prototype.examples=function(e){return g.exampleFromNominal(this,e)},t.prototype.isGenuineUserDefinedType=function(){if(this.buildIn)return!1;if(this.properties()&&this.properties().length>0)return!0;var e=this.fixedFacets();if(e&&Object.keys(e).length>0)return!0;var t=this.fixedBuiltInFacets();return!!(t&&Object.keys(t).length>0)||this.isTopLevel()&&this.nameId()&&this.nameId().length>0},t.prototype.genuineUserDefinedTypeInHierarchy=function(){if(this.isGenuineUserDefinedType())return this;var e=null,t=this.allSuperTypes();return t.forEach(function(t){!e&&t.isGenuineUserDefinedType()&&(e=t)}),e},t.prototype.hasGenuineUserDefinedTypeInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.isGenuineUserDefinedType()}finally{t.uc=!1}})},t.prototype.customProperties=function(){return[].concat(this._customProperties)},t.prototype.allCustomProperties=function(){var e=[];return this.superTypes().forEach(function(t){return e=e.concat(t.allCustomProperties())}),e=e.concat(this.customProperties())},t.prototype.registerCustomProperty=function(e){if(e.domain()!=this)throw new Error(p.SHOULD_BE_ALREADY_OWNED.message);if(this._customProperties.indexOf(e)!=-1)throw new Error(p.ALREADY_INCLUDED.message);this._customProperties.push(e)},t.prototype.setCustom=function(e){this._isCustom=e},t.prototype.isCustom=function(){return this._isCustom},t.prototype.isUnion=function(){return!1},t.prototype.union=function(){return null},t.prototype.isExternal=function(){return!1},t.prototype.external=function(){return null},t.prototype.isArray=function(){return!1},t.prototype.isObject=function(){if("object"==this.nameId())return!0;for(var e=0,t=this.allSuperTypes();e11?e:e+12}}})};"object"==typeof e&&"object"==typeof e.exports?s(n(138)):(i=[n(138)],r=s,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}(this)},function(e,t,n){"use strict";function r(e,t,n,r){return void 0===n&&(n=_.builtInRegistry()),v(e,new D(null,t,!1,r),n,!1,!1,!0,!1,!1,[])}function i(e,t,n){return void 0===t&&(t=_.builtInRegistry()),u(new D(null,e,!1,n),t)}function a(e){return"?"==e.charAt(e.length-1)}function o(e,t){void 0===t&&(t=_.builtInRegistry());var n=e.provider&&e.provider();return u(new D(null,e,!1,n),t)}function s(e){return new F(e)}function u(e,t,n){void 0===n&&(n=!1);var r=new x(e.path());if(e.anchor){if(e.anchor().__$$)return e.anchor().__$$;e.anchor().__$$=r}var i=e.childWithKey("types");i&&i.kind()===E.ARRAY&&(i=s(i));var a=e.childWithKey("schemas");a&&a.kind()===E.ARRAY&&(a=s(a));var o=new k(i,a,t,r);if(i&&i.kind()!==E.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=_.derive(e.key(),[_.REFERENCE]);r.add(t),o.addType(t)}),a&&a.kind()!==E.SCALAR&&a.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=_.derive(e.key(),[_.REFERENCE]);r.add(t),o.addType(t)}),!n){var l=e.childWithKey("uses");l&&l.kind()===E.ARRAY&&(l=s(l)),l&&l.kind()===E.MAP&&l.children().forEach(function(e){r.addLibrary(e.key(),u(e,t))})}i&&i.kind()!==E.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){o.get(e.key())}),a&&a.kind()!==E.SCALAR&&a.children().filter(function(e){return e.key()&&!0}).forEach(function(e){o.get(e.key())}),o.types().forEach(function(e){return r.add(e)});var i=e.childWithKey("annotationTypes");return i&&i.kind()===E.ARRAY&&(i=s(i)),null!=i&&i.kind()===E.MAP&&i.children().forEach(function(e){r.addAnnotationType(v(e.key(),e,o,!1,!0,!1,!1,!1,[]))}),r}function l(e,t,n){var r=new U,i=!1,o=e.childWithKey("required");if(o){var s=o.value();if("boolean"==typeof s)i=!0;else if(s&&"object"==typeof s&&"boolean"==typeof s.value){i=!0;var u=Object.keys(s).filter(function(e){return e=e.trim(),e.length>1&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)});u.length&&(r.annotations=u.map(function(e){return e=e.trim(),{name:e.substring(1,e.length-1).trim(),key:e,value:s[e]}}))}s===!1&&(r.optional=!0,r.id=e.key())}var l=e.key();!i&&a(e.key())&&(l=l.substr(0,l.length-1),r.optional=!0),null!=l&&0==l.length||"/.*/"===l?r.additonal=!0:"/"==l.charAt(0)&&"/"==l.charAt(l.length-1)&&(l=l.substring(1,l.length-1),r.regExp=!0);var p=[].concat(n);p.push(l),r.type=v(null,e,t,!1,!1,!1,!1,!0,p);var c=e.getMeta("chaining");if(c&&c.length>0&&0==r.type.metaOfType(M.ImportedByChain).length){var f=r.type;if(r.type.isArray()){var h=r.type.metaOfType(N.ComponentShouldBeOfType);if(h&&h.length>0){var d=h[0].value();f=_.derive("",[d]),h[0].type=f}}else if(r.type.isUnion()){var m=r.type.allOptions();m.length>0&&(f=_.derive("",[m[0]]),m[0]=f)}if(0==f.metaOfType(M.ImportedByChain).length){!f.isSubTypeOf(_.UNKNOWN)&&_.InheritedType.isInstance(f)&&f.addSuper(_.UNKNOWN);for(var y=0,g=c;y0&&(t.types=n);var n={};return e.annotationTypes().forEach(function(e){n[e.name()]=c(e)}),Object.keys(n).length>0&&(t.annotationTypes=n),t}function h(e){if(e.isAnonymous()){if(e.isArray()){var t=e.oneMeta(N.ComponentShouldBeOfType);if(t){var n=t.value();return n.isAnonymous()&&n.isUnion()?"("+h(n)+")[]":h(n)+"[]"}}return e.isUnion()?e.options().map(function(e){return h(e)}).join(" | "):e.superTypes().map(function(e){return h(e)}).join(" , ")}return e.name()}function d(e,t){if(t===_.ANY||e===t||e.superTypes().some(function(e){return d(e,t)}))return!0;if(e.isUnion()&&e.options){var n=e.options();if(n.some(function(e){return d(e,t)}))return!0}if(t.isUnion()&&t.options){var n=t.options();if(n.some(function(t){return e==t}))return!0}return!1}function m(e,t){var n=e.requiredType(),r=e.requiredTypes();return r&&r.length>0?r.some(function(e){return d(t,e)}):d(t,n)}function y(e,t){for(var n=t.kind()==E.ARRAY?t.children():[t],r=0;r0){var w=I;if(d.isArray()){var L=d.metaOfType(N.ComponentShouldBeOfType);if(L&&L.length>0){var D=L[0].value();w=_.derive("",[D]),L[0].type=w}}else if(d.isUnion()){var U=d.allOptions();U.length>0&&(w=_.derive("",[U[0]]),U[0]=w)}if(0==w.metaOfType(M.ImportedByChain).length){w.isSubTypeOf(_.UNKNOWN)||w.addSuper(_.UNKNOWN);for(var F=0,B=C;F0&&G.filter(function(e){return e.length>0}).length>0)for(var Q=0,Z=G;Q=0&&n.get($.name())}var pe=_.derive(e,W);o&&H&&pe.addMeta(new M.TypeAttributeValue(H.value()));for(var ce=0;ce0&&k.isInstance(n)&&(pe=g(pe,n));var he=pe,de=null;if(t.children().forEach(function(e){var r=e.key(),i=e.childWithKey("value"),a=e;if("example"!=r&&"discriminatorValue"!=r&&i&&(a=i),r&&"type"!==r&&"uses"!==r&&"schema"!==r&&("properties"!=r&&"additionalProperties"!=r||!pe.isSubTypeOf(_.OBJECT))){var s;if("items"==r){if(pe.isSubTypeOf(_.ARRAY)){var u=[],l=[a];if(a.kind()==E.ARRAY){l=a.children();var f=_.error(T.ITEMS_SHOULD_BE_REFERENCE_OR_INLINE_TYPE,he);f.setValidationPath({name:"items"}),pe.putExtra(S.PARSE_ERROR,f)}var u=l.map(function(e){var r=e.childWithKey("value");if(!r||r.kind()!=E.SCALAR&&r.kind()!=E.MAP||(e=r),e.kind()==E.SCALAR){var i=e.value();if(null==i||"Null"==i||"NULL"==i)return _.STRING;var o=b.parseToType(""+i,n,t);return V(o,a),o}if(e.kind()==E.MAP){var s=[].concat(c);return s.push("#super"),v("",e,n,!1,!1,!1,!1,!1,s)}}),h=1==u.length?u[0]:_.derive("",u);return s=new P.ComponentShouldBeOfType(h),he.addMeta(s),he.putExtra(S.HAS_ITEMS,!0),y(s,e),s}if(!o){var d=_.error(T.ITEMS_DEFINED_FOR_NON_ARRAY,he);d.setValidationPath({name:"items"}),pe.putExtra(S.PARSE_ERROR,d)}}else{if("required"==r&&!p)return;if("facets"===r)return void(de=[r]);if("default"==r||"xml"==r||"required"==r)de=de?de.concat(r):[r];else if("("==r.charAt(0)&&")"==r.charAt(r.length-1)){var g=new M.Annotation(r.substr(1,r.length-2),a.value(),r);return g.setNode(a),void pe.addMeta(g)}if(s=R.getInstance().buildFacet(r,a.value()),s&&("format"!=r||m(s,pe)))s.setNode(a),pe.addMeta(s);else{var A=new M.CustomFacet(r,a.value());A.setNode(a),pe.addMeta(A)}}s&&y(s,e)}}),0==pe.metaOfType(M.DiscriminatorValue).length&&a&&pe.addMeta(new M.DiscriminatorValue(pe.name(),!1)),pe.isSubTypeOf(_.OBJECT)){var me=t.childWithKey("properties"),ye=!1;if(me)if(pe.addMeta(new M.HasPropertiesFacet),me.kind()==E.MAP)me.children().forEach(function(e){ye=!0;var t=[].concat(c);t.push("#props"),l(e,n,t).add(pe,t)});else{var ve=_.error(T.PROPERTIES_MAP,he);ve.setValidationPath({name:"properties"}),pe.putExtra(S.PARSE_ERROR,ve)}var ge=t.childWithKey("additionalProperties");if(ge){var X=ge.childWithKey("value");if(X&&(ge=X),"boolean"==typeof ge.value())pe.addMeta(new O.KnownPropertyRestriction(ge.value()));else{var ve=_.error(T.ADDITIONAL_PROPERTIES_BOOLEAN,he);ve.setValidationPath({name:"additionalProperties"}),pe.putExtra(S.PARSE_ERROR,ve)}}}var me=t.childWithKey("facets");if(me)if(me.kind()==E.MAP)me.children().forEach(function(e){var t=[].concat(c);t.push("#facets");var r=l(e,n,t);pe.addMeta(new M.FacetDeclaration(r.id,r.type,r.optional))});else{var ve=_.error(T.FACETS_MAP,he);ve.setValidationPath({name:"facets"}),pe.putExtra(S.PARSE_ERROR,ve)}if(pe.isAnonymous()&&pe.isEmpty()&&1==pe.superTypes().length){var Ae=pe.superTypes()[0];return V(Ae,t),Ae}return t.kind()!=E.SCALAR&&pe.addMeta(new M.NotScalar),Y&&he.putExtra(_.SCHEMA_AND_TYPE,!0),he.putExtra(_.GLOBAL,a),he.putExtra(_.SOURCE_EXTRA,t),de&&he.putExtra(S.HAS_FACETS,de),V(he,t),t.getMeta("acceptAllScalarsAsStrings")&&he.addMeta(new M.AcceptAllScalarsAsStrings),he}function g(e,t){for(var n,r=t;r&&!(n=r.typeMap()[e.name()]);)r=r.parent();return null!=n&&n.isSubTypeOf(_.REFERENCE)?null!=n&&n.isSubTypeOf(_.REFERENCE)&&(n.patch(e),e=n):t.addType(e),e.putExtra(S.TOP_LEVEL_EXTRA,!0),e}var A=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var E,_=n(58),T=_.messageRegistry,S=n(74),N=n(75),I=n(58),b=n(172),R=n(135),M=n(77),C=n(77),w=n(58),P=n(75),L=n(59),O=n(75);!function(e){e[e.SCALAR=0]="SCALAR",e[e.ARRAY=1]="ARRAY",e[e.MAP=2]="MAP"}(E=t.NodeKind||(t.NodeKind={}));var D=function(){function e(e,t,n,r){void 0===n&&(n=!1),this._key=e,this.obj=t,this.inArr=n,this.provider=r}return e.prototype.value=function(){return this.obj},e.prototype.key=function(){if(!this._key&&this.kind()===E.MAP&&this.inArr){var e=Object.keys(this.obj);if(1===e.length)return e[0]}return this._key},e.prototype.childWithKey=function(t){return null==this.obj?null:this.obj.hasOwnProperty(t)?new e(t,this.obj[t],!1,this.contentProvider()):null},e.prototype.children=function(){var t=this;return Array.isArray(this.obj)?this.obj.map(function(n){return new e(null,n,!0,t.contentProvider())}):this.obj&&"object"==typeof this.obj?Object.keys(this.obj).map(function(n){return new e(n,t.obj[n],!1,t.provider)}):[]},e.prototype.kind=function(){return this.obj?Array.isArray(this.obj)?E.ARRAY:"object"==typeof this.obj?E.MAP:E.SCALAR:E.SCALAR},e.prototype.contentProvider=function(){return this.provider},e.prototype.getMeta=function(e){return null},e.prototype.path=function(){return JSON.stringify(this.obj)},e}();t.parseJSON=r,t.parseJSONTypeCollection=i;var U=function(){function e(){}return e.prototype.add=function(e,t){this.optional||this.additonal||this.regExp||this.type.isSubTypeOf(_.NIL)||e.addMeta(new N.HasProperty(this.id));var n;if(n=this.additonal?new N.AdditionalPropertyIs(this.type):this.regExp?new N.MapPropertyIs(this.id,this.type,this.optional):new N.PropertyIs(this.id,this.type,this.optional),null!=n&&(e.addMeta(n),this.type instanceof _.InheritedType&&null==this.type.name()&&this.type.setContextMeta(n),this.annotations&&this.annotations.length))for(var r=0,i=this.annotations;r0&&(1==this.superTypes.length?e.type=this.superTypes[0]:e.type=this.superTypes),this.customFacets&&this.customFacets.forEach(function(t){return e[t.facetName()]=t.value()}),this.annotations&&this.annotations.forEach(function(t){return e["("+t.facetName()+")"]=t.value()}),this.facetDeclarations&&this.facetDeclarations.length>0){var t={};this.facetDeclarations.forEach(function(e){var n=e.facetName();e.isOptional()&&(n+="?");var r=null;r=e.type().isAnonymous()?e.type().isEmpty()?h(e.type()):p(e.type()).toJSON():h(e.type()),t[n]=r}),e.facets=t}if(this.properties&&this.properties.length>0){var n={};this.properties.forEach(function(e){var t=e.id;e.optional&&(t+="?"),e.additonal&&(t="/.*/"),e.regExp&&(t="/"+e.id+"/");var r=null;r=e.type.isAnonymous()?e.type.isEmpty()?h(e.type):p(e.type).toJSON():h(e.type),n[t]=r}),e.properties=n}return this.basicFacets&&this.basicFacets.forEach(function(t){e[t.facetName()]=t.value()}),1==Object.keys(e).length&&!this.notAScalar&&e.type?e.type:(void 0!==this.additionalProperties&&(e.additionalProperties=this.additionalProperties),e)},e}();t.TypeProto=B,t.toProto=p,t.storeAsJSON=c;var V=function(e,t){t.getMeta("skipValidation")&&e.addMeta(new M.SkipValidation)};t.parse=v},function(e,t,n){"use strict";function r(e,t,n,r,i){if(void 0===r&&(r=null),void 0===i&&(i=!1),null==e)return null;try{var o=e.trim();if(o.length>0){var s="{"==o.charAt(0);if(s||"<"==o.charAt(0)&&o.length>1&&"<"!=o.charAt(1)){var u=n,l=void 0;do l=u,u=l.childWithKey("type");while(u);var c=l&&l.contentProvider&&l.contentProvider();return new h.ExternalType("",o,s,c,r)}var f=p(e),d=a(f,t,i);return d}return h.derive(e,[h.STRING])}catch(t){return h.derive(e,[h.UNKNOWN])}}function i(e,t){for(;e>0;){var n=h.derive("",[h.ARRAY]);n.addMeta(new m.ComponentShouldBeOfType(t)),t=n,e--}return t}function a(e,t,n){if("union"==e.type){var r=e;return h.union("",[a(r.first,t,n),a(r.rest,t,n)])}if("parens"==e.type){var s=e,u=a(s.expr,t,n);return i(s.arr,u)}var l=e;if("?"==l.value.charAt(l.value.length-1)){var p=o(t,l.value.substr(0,l.value.length-1),n);p||(p=h.derive(l.value,[h.UNKNOWN])),p=h.union(l.value,[p,h.NIL]);var c=l.arr;return i(c,p)}var p=o(t,l.value,n);if(!p){p=h.derive(l.value,[h.UNKNOWN]);var f=t.getByChain(l.value);f&&p.addMeta(new y.ImportedByChain(l.value))}var c=l.arr;return i(c,p)}function o(e,t,n){return d.AccumulatingRegistry.isInstance(e)?e.get(t,n):e.get(t)}function s(e){if(e.isSubTypeOf(h.ARRAY)){var t=e.oneMeta(m.ComponentShouldBeOfType);return t?t.value().isUnion()?"("+s(t.value())+")[]":s(t.value())+"[]":"array"}if(e instanceof h.UnionType){var n=e;return n.options().map(function(e){return s(e)}).join(" | ")}return e.isAnonymous()&&e.isEmpty()?e.superTypes().map(function(e){return s(e)}).join(" , "):e.name()}function u(e,t){if(t(e),"union"==e.type){var n=e;u(n.first,t),u(n.rest,t)}else if("parens"==e.type){var r=e;u(r.expr,t)}}function l(e){var t,n=0;if("name"==e.type){var r=e;t=r.value,n=r.arr}else if("union"==e.type){var i=e;t=l(i.first)+" | "+l(i.rest)}else if("parens"==e.type){var a=e;t="("+l(a.expr)+")",n=a.arr}for(;--n>=0;)t+="[]";return t}function p(e){var t=f.parse(e);return t=c(t)}function c(e){if("name"==e.type){var t=e,n=t.value;if(n&&n.length&&"?"==n.charAt(n.length-1)){var r=n.substring(0,n.length-1),i=p(r),a={type:"union",first:i,rest:{type:"name",value:"nil"}};return"number"==typeof t.arr&&t.arr>0&&(a={type:"parens",expr:a,arr:t.arr}),a}return t}if("union"==e.type){var o=e;o.first=c(o.first),o.rest=c(o.rest)}else if("parens"==e.type){var s=e;s.expr=c(s.expr)}return e}Object.defineProperty(t,"__esModule",{value:!0});var f=n(173),h=n(58),d=n(171),m=n(75),y=n(77);t.parseToType=r,t.storeToString=s,t.visit=u,t.serializeToString=l,t.parse=p},function(e,t){"use strict";var n=function(){function e(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function t(e,n,r,i){this.message=e,this.expected=n,this.found=r,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function n(e){function n(t){var n,r,i=G[t];if(i)return i;for(n=t-1;!G[n];)n--;for(i=G[n],i={line:i.line,column:i.column,seenCR:i.seenCR};nX&&(X=Y,z=[]),z.push(e))}function a(e,n,r,i){function a(e){var t=1;for(e.sort(function(e,t){return e.descriptiont.description?1:0});t1?o.slice(0,-1).join(", ")+" or "+o[e.length-1]:o[0],i=t?'"'+n(t)+'"':"end of input","Expected "+r+" but "+i+" found."}return null!==n&&a(n),new t(null!==e?e:o(n,r),n,r,i)}function o(){var t,n,r,a,u,p,c,f;return t=Y,n=l(),n!==h?(r=s(),r!==h?(a=Y,u=l(),u!==h?(124===e.charCodeAt(Y)?(p=y,Y++):(p=h,0===$&&i(v)),p!==h?(c=l(),c!==h?(f=o(),f!==h?(u=[u,p,c,f],a=u):(Y=a,a=h)):(Y=a,a=h)):(Y=a,a=h)):(Y=a,a=h),a===h&&(a=null),a!==h?(q=t,n=g(r,a),t=n):(Y=t,t=h)):(Y=t,t=h)):(Y=t,t=h),t}function s(){var t,n,r,a,s,p,c,f,d,m;if(t=Y,40===e.charCodeAt(Y)?(n=A,Y++):(n=h,0===$&&i(E)),n!==h)if(r=l(),r!==h)if(a=o(),a!==h)if(s=l(),s!==h)if(41===e.charCodeAt(Y)?(p=_,Y++):(p=h,0===$&&i(T)),p!==h){for(c=[],f=Y,d=l(),d!==h?(e.substr(Y,2)===S?(m=S,Y+=2):(m=h,0===$&&i(N)),m!==h?(d=[d,m],f=d):(Y=f,f=h)):(Y=f,f=h);f!==h;)c.push(f),f=Y,d=l(),d!==h?(e.substr(Y,2)===S?(m=S,Y+=2):(m=h,0===$&&i(N)),m!==h?(d=[d,m],f=d):(Y=f,f=h)):(Y=f,f=h);c!==h?(q=t,n=I(a,c),t=n):(Y=t,t=h)}else Y=t,t=h;else Y=t,t=h;else Y=t,t=h;else Y=t,t=h;else Y=t,t=h;return t===h&&(t=u()),t}function u(){var t,n,r,a,o,s;if($++,t=Y,n=[],r=p(),r!==h)for(;r!==h;)n.push(r),r=p();else n=h;if(n!==h){for(r=[],a=Y,o=l(),o!==h?(e.substr(Y,2)===S?(s=S,Y+=2):(s=h,0===$&&i(N)),s!==h?(o=[o,s],a=o):(Y=a,a=h)):(Y=a,a=h);a!==h;)r.push(a),a=Y,o=l(),o!==h?(e.substr(Y,2)===S?(s=S,Y+=2):(s=h,0===$&&i(N)),s!==h?(o=[o,s],a=o):(Y=a,a=h)):(Y=a,a=h);r!==h?(q=t,n=R(n,r),t=n):(Y=t,t=h)}else Y=t,t=h;return $--,t===h&&(n=h,0===$&&i(b)),t}function l(){var t,n;for($++,t=[],C.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=h,0===$&&i(w));n!==h;)t.push(n),C.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=h,0===$&&i(w));return $--,t===h&&(n=h,0===$&&i(M)),t}function p(){var t;return P.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=h,0===$&&i(L)),t===h&&(95===e.charCodeAt(Y)?(t=O,Y++):(t=h,0===$&&i(D)),t===h&&(45===e.charCodeAt(Y)?(t=U,Y++):(t=h,0===$&&i(x)),t===h&&(46===e.charCodeAt(Y)?(t=k,Y++):(t=h,0===$&&i(F)),t===h&&(B.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=h,0===$&&i(V)),t===h&&(K.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=h,0===$&&i(j)),t===h&&(63===e.charCodeAt(Y)?(t=W,Y++):(t=h,0===$&&i(H)))))))),t}var c,f=arguments.length>1?arguments[1]:{},h={},d={Term:o},m=o,y="|",v={type:"literal",value:"|",description:'"|"'},g=function(e,t){return t?{type:"union",first:e,rest:t[3]}:e},A="(",E={type:"literal",value:"(",description:'"("'},_=")",T={type:"literal",value:")",description:'")"'},S="[]",N={type:"literal",value:"[]",description:'"[]"'},I=function(e,t){return{type:"parens",expr:e,arr:t.length}},b={type:"other",description:"name"},R=function(e,t){return{type:"name",value:e.join(""),arr:t.length}},M={type:"other",description:"whitespace"},C=/^[ \t\n\r]/,w={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},P=/^[A-Z]/,L={type:"class",value:"[A-Z]",description:"[A-Z]"},O="_",D={type:"literal",value:"_",description:'"_"'},U="-",x={type:"literal",value:"-",description:'"-"'},k=".",F={type:"literal",value:".",description:'"."'},B=/^[a-z:#\/]/,V={type:"class",value:"[a-z]",description:"[a-z]"},K=/^[0-9]/,j={type:"class",value:"[0-9]",description:"[0-9]"},W="?",H={type:"literal",value:"?",description:'"?"'},Y=0,q=0,G=[{line:1,column:1,seenCR:!1}],X=0,z=[],$=0;if("startRule"in f){if(!(f.startRule in d))throw new Error("Can't start parsing from rule \""+f.startRule+'".');m=d[f.startRule]}if(c=m(),c!==h&&Y===e.length)return c;throw c!==h&&Y0&&this.superTypes().forEach(function(r){r instanceof t&&r.allFacets(e).forEach(function(e){return n[e.nameId()]=e})}),this._facets.forEach(function(e){return n[e.nameId()]=e}),this._allFacets=Object.keys(n).map(function(e){return n[e]}),this._allFacets},t.prototype.facets=function(){return[].concat(this._facets)},t.prototype.facet=function(e){return u.find(this.allFacets(),function(t){return t.nameId()==e})},t.prototype.typeId=function(){return this.nameId()},t.prototype.allProperties=function(e){if(void 0===e&&(e={}),this._props)return this._props;var n=i(this);if(e[n])return[];e[n]=this;var r={};this.superTypes().length>0&&this.superTypes().forEach(function(n){n instanceof t?n.allProperties(e).forEach(function(e){return r[e.nameId()]=e}):n.allProperties().forEach(function(e){return r[e.nameId()]=e})});for(var a in this.fixedFacets())delete r[a];return this.properties().forEach(function(e){return r[e.nameId()]=e}),this._props=Object.keys(r).map(function(e){return r[e]}),this._props},t.prototype.property=function(e){return u.find(this.allProperties(),function(t){return t.nameId()==e})},t.prototype.hasValueTypeInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasValueTypeInHierarchy()}finally{t.uc=!1}})},t.prototype.isAnnotationType=function(){return!1},t.prototype.hasStructure=function(){return!1},t.prototype.key=function(){return this._key?this._key:this._universe&&(this._key=this.universe().matched()[this.nameId()],!this._key)?null:this._key},t.prototype.hasArrayInHierarchy=function(){var e=null!=u.find(this.allSuperTypes(),function(e){return e instanceof N});return e},t.prototype.arrayInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof N&&(t=e)}),t},t.prototype.unionInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof S&&(t=e)}),t},t.prototype.hasExternalInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e instanceof I}finally{t.uc=!1}})},t.prototype.hasUnionInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasUnionInHierarchy()}finally{t.uc=!1}})},t.prototype.fixFacet=function(e,t,n){void 0===n&&(n=!1),n?this._fixedBuildInFacets[e]=t:this._fixedFacets[e]=t},t.prototype.getFixedFacets=function(){return this.fixedFacets()},t.prototype.fixedFacets=function(){return this.collectFixedFacets(!1)},t.prototype.fixedBuiltInFacets=function(){return this.collectFixedFacets(!0)},t.prototype.collectFixedFacets=function(e){for(var t=e?this._fixedBuildInFacets:this._fixedFacets,n={},r=0,i=Object.keys(t);r0&&!n.hideProperties&&(a+=e+i+"Properties:\n",s.forEach(function(n){var r="",o=n.range();o instanceof h&&(r+=o.nameId()),o instanceof t&&(r+="[",r+=o.getTypeClassName(),r+="]"),a+=e+i+i+n.nameId()+" : "+r+"\n"}));var l=this.superTypes(),p=l;return l&&!n.printStandardSuperclasses&&(p=u.filter(l,function(e){var n=e instanceof h?e.nameId():"",i=e instanceof t?e.getTypeClassName():"";return!r.isStandardSuperclass(n,i)})),p&&p.length>0&&(a+=e+i+"Super types:\n",p.forEach(function(t){a+=t.printDetails(e+i+i,{hideProperties:n.hideSuperTypeProperties,hideSuperTypeProperties:n.hideSuperTypeProperties,printStandardSuperclasses:n.printStandardSuperclasses})})),a},t.prototype.getTypeClassName=function(){return this.constructor.toString().match(/\w+/g)[1]},t.prototype.isStandardSuperclass=function(e,t){return"TypeDeclaration"===e&&"NodeClass"===t||("ObjectTypeDeclaration"===e&&"NodeClass"===t||"RAMLLanguageElement"===e&&"NodeClass"===t)},t.prototype.examples=function(e){return g.exampleFromNominal(this,e)},t.prototype.isGenuineUserDefinedType=function(){if(this.buildIn)return!1;if(this.properties()&&this.properties().length>0)return!0;var e=this.fixedFacets();if(e&&Object.keys(e).length>0)return!0;var t=this.fixedBuiltInFacets();return!!(t&&Object.keys(t).length>0)||this.isTopLevel()&&this.nameId()&&this.nameId().length>0},t.prototype.genuineUserDefinedTypeInHierarchy=function(){if(this.isGenuineUserDefinedType())return this;var e=null,t=this.allSuperTypes();return t.forEach(function(t){!e&&t.isGenuineUserDefinedType()&&(e=t)}),e},t.prototype.hasGenuineUserDefinedTypeInHierarchy=function(){return null!=u.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.isGenuineUserDefinedType()}finally{t.uc=!1}})},t.prototype.customProperties=function(){return[].concat(this._customProperties)},t.prototype.allCustomProperties=function(){var e=[];return this.superTypes().forEach(function(t){return e=e.concat(t.allCustomProperties())}),e=e.concat(this.customProperties())},t.prototype.registerCustomProperty=function(e){if(e.domain()!=this)throw new Error(p.SHOULD_BE_ALREADY_OWNED.message);if(this._customProperties.indexOf(e)!=-1)throw new Error(p.ALREADY_INCLUDED.message);this._customProperties.push(e)},t.prototype.setCustom=function(e){this._isCustom=e},t.prototype.isCustom=function(){return this._isCustom},t.prototype.isUnion=function(){return!1},t.prototype.union=function(){return null},t.prototype.isExternal=function(){return!1},t.prototype.external=function(){return null},t.prototype.isArray=function(){return!1},t.prototype.isObject=function(){if("object"==this.nameId())return!0;for(var e=0,t=this.allSuperTypes();e
The value MUST be one of
* OAuth 1.0,
* OAuth 2.0,
* BasicSecurityScheme Authentication
* DigestSecurityScheme Authentication
* x-<other>"] }],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute MAY be used to describe a security schemes property."]}],valueConstraint:null,optional:!1},{name:"describedBy",type:{typeName:"SecuritySchemePart",nameSpace:"",basicName:"SecuritySchemePart",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.description",arguments:["A description of the request components related to Security that are determined by the scheme: the headers, query parameters or responses. As a best practice, even for standard security schemes, API designers SHOULD describe these properties of security schemes. Including the security scheme description completes an API documentation."]}],valueConstraint:null,optional:!1},{name:"settings",type:{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The settings attribute MAY be used to provide security scheme-specific information. The required attributes vary depending on the type of security scheme is being declared. It describes the minimum set of properties which any processing application MUST provide and validate if it chooses to implement the security scheme. Processing applications MAY choose to recognize other properties for things such as token lifetime, preferred cryptographic algorithms, and more."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[],moduleName:null,annotationOverridings:{}},{name:"SecuritySchemeRef",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"securitySchemeName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns the name of security scheme, this reference refers to."]}],valueConstraint:null,optional:!1},{name:"securityScheme",type:{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns AST node of security scheme, this reference refers to, or null."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],extends:[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"requestTokenUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Temporary Credential Request endpoint as defined in RFC5849 Section 2.1"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Resource Owner Authorization endpoint as defined in RFC5849 Section 2.2"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"tokenCredentialsUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Request endpoint as defined in RFC5849 Section 2.3"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]},{name:"MetaModel.functionalDescriminator",arguments:["$parent.type=='OAuth 1.0'"]}],extends:[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"accessTokenUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Endpoint as defined in RFC6749 Section 3.2. Not required forby implicit grant type."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Authorization Endpoint as defined in RFC6749 Section 3.1. Required forby authorization_code and implicit grant types."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationGrants",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of: authorization_code, password, client_credentials, implicit, or refresh_token."]},{name:"MetaModel.markdownDescription",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of:
* authorization_code
* password
* client_credentials
* implicit
* refresh_token."]}],valueConstraint:null,optional:!1},{name:"scopes",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of scopes supported by the security scheme as defined in RFC6749 Section 3.3"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],extends:[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 2.0"},optional:!1},{name:"settings",type:{typeName:"OAuth2SecuritySchemeSettings",nameSpace:"",basicName:"OAuth2SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 1.0"},optional:!1},{name:"settings",type:{typeName:"OAuth1SecuritySchemeSettings",nameSpace:"",basicName:"OAuth1SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"BasicSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Basic Authentication"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"DigestSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Digest Authentication"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"CustomSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"x-{other}"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}]},function(e,t){e.exports=[{classes:[{name:"Library",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["contains description of why library exist"]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Namespace which the library is imported under"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"LibraryBase",nameSpace:"",basicName:"LibraryBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"LibraryBase",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"schemas",type:{base:{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:['Alias for the equivalent "types" property, for compatibility with RAML 0.8. Deprecated - API definitions should use the "types" property, as the "schemas" alias for that property name may be removed in a future RAML version. The "types" property allows for XML and JSON schemas.']}],valueConstraint:null,optional:!1},{name:"types",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.MODELS"]},{name:"MetaModel.description",arguments:["Declarations of (data) types for use within this API"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of (data) types for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map type names to type declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"traits",type:{base:{typeName:"Methods.Trait",nameSpace:"Methods",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declarations of traits used in this API"]},{name:"MetaModel.description",arguments:["Declarations of traits for use within this API"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of traits for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map trait names to trait declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"resourceTypes",type:{base:{typeName:"Resources.ResourceType",nameSpace:"Resources",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declaration of resource types used in this API"]},{name:"MetaModel.description",arguments:["Declarations of resource types for use within this API"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of resource types for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map resource type names to resource type declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"annotationTypes",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["decls","true"]},{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declarations of annotation types for use by annotations"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of annotation types for use by annotations."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map annotation type names to annotation type declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"securitySchemes",type:{base:{typeName:"Security.AbstractSecurityScheme",nameSpace:"Security",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Security schemas declarations"]},{name:"MetaModel.description",arguments:["Declarations of security schemes for use within this API."]},{name:"MetaModel.markdownDescription",arguments:["Declarations of security schemes for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map security scheme names to security scheme declarations; or an array of such objects"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.internalClass",arguments:[]}],extends:[{typeName:"FragmentDeclaration",nameSpace:"",basicName:"FragmentDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"Api",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["Short plain-text label for the API"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the API"]}],valueConstraint:null,optional:!1},{name:"version",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The version of the API, e.g. 'v1'"]}],valueConstraint:null,optional:!1},{name:"baseUri",type:{typeName:"Sys.FullUriTemplateString",nameSpace:"Sys",basicName:"FullUriTemplateString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},annotations:[{name:"MetaModel.description",arguments:["A URI that's to be used as the base of all the resources' URIs. Often used as the base of the URL of each resource, containing the location of the API. Can be a template URI."]}],valueConstraint:null,optional:!1},{name:"baseUriParameters",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.BURI"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.description",arguments:["Named parameters used in the baseUri (template)"]}],valueConstraint:null,optional:!1},{name:"protocols",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HTTP","HTTPS"]]},{name:"MetaModel.description",arguments:["The protocols supported by the API"]},{name:"MetaModel.valueDescription",arguments:['Array of strings, with each being "HTTP" or "HTTPS", case-insensitive']}],valueConstraint:null,optional:!1},{name:"mediaType",type:{base:{typeName:"Bodies.MimeType",nameSpace:"Bodies",basicName:"MimeType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.oftenKeys",arguments:[["application/json","application/xml","application/x-www-form-urlencoded","multipart/form-data"]]},{name:"MetaModel.description",arguments:['The default media type to use for request and response bodies (payloads), e.g. "application/json"']},{name:"MetaModel.inherited",arguments:[]},{name:"MetaModel.valueDescription",arguments:["Media type string"]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["The security schemes that apply to every resource and method in the API"]}],valueConstraint:null,optional:!1},{name:"resources",type:{base:{typeName:"Resources.Resource",nameSpace:"Resources",basicName:"Resource",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.documentationTableLabel",arguments:["/<relativeUri>"]},{name:"MetaModel.newInstanceName",arguments:["New Resource"]},{name:"MetaModel.description",arguments:["The resources of the API, identified as relative URIs that begin with a slash (/). Every property whose key begins with a slash (/), and is either at the root of the API definition or is the child property of a resource property, is a resource property, e.g.: /users, /{groupId}, etc"]}],valueConstraint:null,optional:!1},{name:"documentation",type:{base:{typeName:"DocumentationItem",nameSpace:"",basicName:"DocumentationItem",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Additional overall documentation for the API"]}],valueConstraint:null,optional:!1},{name:"RAMLVersion",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:['Returns RAML version. "RAML10" string is returned for RAML 1.0. "RAML08" string is returned for RAML 0.8.']}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"LibraryBase",nameSpace:"",basicName:"LibraryBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this API. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"Overlay",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["contains description of why overlay exist"]}],valueConstraint:null,optional:!1},{name:"extends",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["Location of a valid RAML API definition (or overlay or extension), the overlay is applied to."]}],valueConstraint:null,optional:!1},{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Short plain-text label for the API"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Api",nameSpace:"",basicName:"Api",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"Extension",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["contains description of why extension exist"]}],valueConstraint:null,optional:!1},{name:"extends",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["Location of a valid RAML API definition (or overlay or extension), the extension is applied to"]}],valueConstraint:null,optional:!1},{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Short plain-text label for the API"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Api",nameSpace:"",basicName:"Api",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"UsesDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"key",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name prefix (without dot) used to refer imported declarations"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Content of the schema"]},{name:"MetaModel.canBeValue",arguments:[]},{name:"MetaModel.value",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"FragmentDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"uses",type:{base:{typeName:"UsesDeclaration",nameSpace:"",basicName:"UsesDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"DocumentationItem",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Title of documentation section"]},{name:"MetaModel.required",arguments:[]}],valueConstraint:null,optional:!1},{name:"content",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},annotations:[{name:"MetaModel.description",arguments:["Content of documentation section"]},{name:"MetaModel.required",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts",Resources:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts",Decls:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},{classes:[{name:"SpecPartMetaData",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!0,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts" },{classes:[{name:"ValueType",methods:[{returnType:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},name:"value",start:170,end:210,text:"\n\n value():string {\n return null\n }",arguments:[]}],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"StringType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["string"]},{name:"MetaModel.alias",arguments:["string"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"AnyType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["any"]},{name:"MetaModel.alias",arguments:["any"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"NumberType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["number"]},{name:"MetaModel.alias",arguments:["number"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"IntegerType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["integer"]},{name:"MetaModel.alias",arguments:["integer"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"NullType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["null"]},{name:"MetaModel.alias",arguments:["null"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"TimeOnlyType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["time-only"]},{name:"MetaModel.alias",arguments:["time-only"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateOnlyType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["date-only"]},{name:"MetaModel.alias",arguments:["date-only"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeOnlyType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["datetime-only"]},{name:"MetaModel.alias",arguments:["datetime-only"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["datetime"]},{name:"MetaModel.alias",arguments:["datetime"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FileType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["file"]},{name:"MetaModel.alias",arguments:["file"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"BooleanType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["boolean"]},{name:"MetaModel.alias",arguments:["boolean"]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"Reference",methods:[],typeParameters:["T"],typeParameterConstraint:[null],implements:[],fields:[{name:"structuredValue",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns a structured object if the reference point to one."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns name of referenced object"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"UriTemplate",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type currently serves both for absolute and relative urls"]}],extends:[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"StatusCodeString",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"RelativeUriString",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes relative uri templates"]}],extends:[{typeName:"UriTemplate",nameSpace:"",basicName:"UriTemplate",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FullUriTemplateString",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes absolute uri templates"]}],extends:[{typeName:"UriTemplate",nameSpace:"",basicName:"UriTemplate",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FixedUriString",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes fixed uris"]}],extends:[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"ContentType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"MarkdownString",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.innerType",arguments:["markdown"]},{name:"MetaModel.description",arguments:["[GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/)"]}],extends:[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"SchemaString",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Schema at this moment only two subtypes are supported (json schema and xsd)"]},{name:"MetaModel.alias",arguments:["schema"]}],extends:[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"},{classes:[{name:"ExampleSpec",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"value",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.example",arguments:[]},{name:"MetaModel.selfNode",arguments:[]},{name:"MetaModel.description",arguments:["String representation of example"]},{name:"MetaModel.required",arguments:[]},{name:"MetaModel.valueDescription",arguments:["* Valid value for this type
* String representing the serialized version of a valid value"]}],valueConstraint:null,optional:!1},{name:"structuredValue",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of example, if possible"]}],valueConstraint:null,optional:!1},{name:"strict",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["By default, examples are validated against any type declaration. Set this to false to allow examples that need not validate."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.description",arguments:["Example identifier, if specified"]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the example"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the example"]},{name:"MetaModel.valueDescription",arguments:["markdown string"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this example. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"TypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Type name for top level types. For properties and parameters -- property o parameter name, respectively. For bodies -- media type."]},{name:"MetaModel.extraMetaKey",arguments:["headers"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the type display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"facets",type:{base:{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.declaringFields",arguments:[]},{name:"MetaModel.description",arguments:["When extending from a type you can define new facets (which can then be set to concrete values by subtypes)."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"fixedFacets",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns facets fixed by the type. Value is an object with properties named after facets fixed. Value of each property is a value of the corresponding facet."]}],valueConstraint:null,optional:!1},{name:"schema",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.allowMultiple",arguments:[]},{name:"MetaModel.description",arguments:['Alias for the equivalent "type" property, for compatibility with RAML 0.8. Deprecated - API definitions should use the "type" property, as the "schema" alias for that property name may be removed in a future RAML version. The "type" property allows for XML and JSON schemas.']},{name:"MetaModel.valueDescription",arguments:["Single string denoting the base type or type expression"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.allowMultiple",arguments:[]},{name:"MetaModel.canBeValue",arguments:[]},{name:"MetaModel.defaultValue",arguments:["string"]},{name:"MetaModel.descriminatingProperty",arguments:[]},{name:"MetaModel.description",arguments:["A base type which the current type extends, or more generally a type expression."]},{name:"MetaModel.valueDescription",arguments:["string denoting the base type or type expression"]}],valueConstraint:null,optional:!1},{name:"structuredType",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.description",arguments:["Inlined supertype definition."]},{name:"MetaModel.valueDescription",arguments:["Inlined supertype definition"]}],valueConstraint:null,optional:!1},{name:"location",type:{typeName:"ModelLocation",nameSpace:"",basicName:"ModelLocation",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.system",arguments:[]},{name:"MetaModel.description",arguments:["Location of the parameter (can not be edited by user)"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"locationKind",type:{typeName:"LocationKind",nameSpace:"",basicName:"LocationKind",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.system",arguments:[]},{name:"MetaModel.description",arguments:["Kind of location"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"default",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Provides default value for a property"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"example",type:{typeName:"ExampleSpec",nameSpace:"",basicName:"ExampleSpec",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.example",arguments:[]},{name:"MetaModel.selfNode",arguments:[]},{name:"MetaModel.description",arguments:["An example of this type instance represented as string or yaml map/sequence. This can be used, e.g., by documentation generators to generate sample values for an object of this type. Cannot be present if the examples property is present."]},{name:"MetaModel.valueDescription",arguments:["* Valid value for this type
* String representing the serialized version of a valid value"]}],valueConstraint:null,optional:!1},{name:"examples",type:{base:{typeName:"ExampleSpec",nameSpace:"",basicName:"ExampleSpec",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.example",arguments:[]},{name:"MetaModel.selfNode",arguments:[]},{name:"MetaModel.description",arguments:["An example of this type instance represented as string. This can be used, e.g., by documentation generators to generate sample values for an object of this type. Cannot be present if the example property is present."]},{name:"MetaModel.valueDescription",arguments:["* Valid value for this type
* String representing the serialized version of a valid value"]}],valueConstraint:null,optional:!1},{name:"required",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.requireValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.description",arguments:["For property or parameter states if it is required."]},{name:"MetaModel.describesAnnotation",arguments:["required"]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.defaultBooleanValue",arguments:[!0]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the type"]},{name:"MetaModel.valueDescription",arguments:["markdown string"]}],valueConstraint:null,optional:!1},{name:"xml",type:{typeName:"XMLFacetInfo",nameSpace:"",basicName:"XMLFacetInfo",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[],valueConstraint:null,optional:!1},{name:"allowedTargets",type:{base:{typeName:"AnnotationTarget",nameSpace:"",basicName:"AnnotationTarget",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["API","DocumentationItem","Resource","Method","Response","RequestBody","ResponseBody","TypeDeclaration","NamedExample","ResourceType","Trait","SecurityScheme","SecuritySchemeSettings","AnnotationTypeDeclaration","Library","Overlay","Extension","Scalar"]]},{name:"MetaModel.description",arguments:["Restrictions on where annotations of this type can be applied. If this property is specified, annotations of this type may only be applied on a property corresponding to one of the target names specified as the value of this property."]},{name:"MetaModel.valueDescription",arguments:["An array, or single, of names allowed target nodes."]}],valueConstraint:null,optional:!1},{name:"isAnnotation",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether the type represents annotation"]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["For types defined in traits or resource types returns object representation of parametrized properties"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.canInherit",arguments:["mediaType"]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this type. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"XMLFacetInfo",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"attribute",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["If attribute is set to true, a type instance should be serialized as an XML attribute. It can only be true for scalar types."]}],valueConstraint:null,optional:!1},{name:"wrapped",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["If wrapped is set to true, a type instance should be wrapped in its own XML element. It can not be true for scalar types and it can not be true at the same moment when attribute is true."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Allows to override the name of the XML element or XML attribute in it's XML representation."]}],valueConstraint:null,optional:!1},{name:"namespace",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Allows to configure the name of the XML namespace."]}],valueConstraint:null,optional:!1},{name:"prefix",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Allows to configure the prefix which will be used during serialization to XML."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"ArrayTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"array"},optional:!1},{name:"uniqueItems",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["uniqueItems"]},{name:"MetaModel.description",arguments:["Should items in array be unique"]}],valueConstraint:null,optional:!1},{name:"items",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.allowMultiple",arguments:[]},{name:"MetaModel.canBeValue",arguments:[]},{name:"MetaModel.description",arguments:["Array component type."]},{name:"MetaModel.valueDescription",arguments:["Inline type declaration or type name."]}],valueConstraint:null,optional:!1},{name:"structuredItems",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.description",arguments:["Inlined component type definition"]},{name:"MetaModel.valueDescription",arguments:["Inlined component type definition"]}],valueConstraint:null,optional:!1},{name:"minItems",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minItems"]},{name:"MetaModel.description",arguments:["Minimum amount of items in array"]},{name:"MetaModel.valueDescription",arguments:["integer ( >= 0 ). Defaults to 0"]}],valueConstraint:null,optional:!1},{name:"maxItems",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maxItems"]},{name:"MetaModel.description",arguments:["Maximum amount of items in array"]},{name:"MetaModel.valueDescription",arguments:["integer ( >= 0 ). Defaults to undefined."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.alias",arguments:["array"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"UnionTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"union"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.requireValue",arguments:["locationKind","LocationKind.MODELS"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"ObjectTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[{name:"MetaModel.hide",arguments:[]}],valueConstraint:{isCallConstraint:!1,value:"object"},optional:!1},{name:"properties",type:{base:{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.description",arguments:["The properties that instances of this type may or must have."]},{name:"MetaModel.valueDescription",arguments:["An object whose keys are the properties' names and whose values are property declarations."]}],valueConstraint:null,optional:!1},{name:"minProperties",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minProperties"]},{name:"MetaModel.description",arguments:["The minimum number of properties allowed for instances of this type."]}],valueConstraint:null,optional:!1},{name:"maxProperties",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maxProperties"]},{name:"MetaModel.description",arguments:["The maximum number of properties allowed for instances of this type."]}],valueConstraint:null,optional:!1},{name:"additionalProperties",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description", arguments:["A Boolean that indicates if an object instance has additional properties."]}],valueConstraint:null,optional:!1},{name:"discriminator",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Type property name to be used as discriminator, or boolean"]}],valueConstraint:null,optional:!1},{name:"discriminatorValue",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The value of discriminator for the type."]}],valueConstraint:null,optional:!1},{name:"enum",type:{base:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.definingPropertyIsEnough",arguments:["properties"]},{name:"MetaModel.setsContextValue",arguments:["field","true"]},{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"StringTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"string"},optional:!1},{name:"pattern",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["pattern"]},{name:"MetaModel.description",arguments:["Regular expression that this string should path"]},{name:"MetaModel.valueDescription",arguments:["regexp"]}],valueConstraint:null,optional:!1},{name:"minLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minLength"]},{name:"MetaModel.description",arguments:["Minimum length of the string"]}],valueConstraint:null,optional:!1},{name:"maxLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maxLength"]},{name:"MetaModel.description",arguments:["Maximum length of the string"]}],valueConstraint:null,optional:!1},{name:"enum",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.facetId",arguments:["enum"]},{name:"MetaModel.describesAnnotation",arguments:["oneOf"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value must be a string"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"BooleanTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"boolean"},optional:!1},{name:"enum",type:{base:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value must be a boolean"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"NumberTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"number"},optional:!1},{name:"minimum",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minimum"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type number or integer) The minimum attribute specifies the parameter's minimum value."]}],valueConstraint:null,optional:!1},{name:"maximum",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maximum"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type number or integer) The maximum attribute specifies the parameter's maximum value."]}],valueConstraint:null,optional:!1},{name:"enum",type:{base:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.facetId",arguments:["enum"]},{name:"MetaModel.describesAnnotation",arguments:["oneOf"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"format",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.oneOf",arguments:[["int32","int64","int","long","float","double","int16","int8"]]},{name:"MetaModel.description",arguments:["Value format"]}],valueConstraint:null,optional:!1},{name:"multipleOf",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:['A numeric instance is valid against "multipleOf" if the result of the division of the instance by this keyword\'s value is an integer.']}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value MUST be a number. Indicate floating point numbers as defined by YAML."]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"IntegerTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"integer"},optional:!1},{name:"format",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.oneOf",arguments:[["int32","int64","int","long","int16","int8"]]},{name:"MetaModel.description",arguments:["Value format"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value MUST be a integer."]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"NumberTypeDeclaration",nameSpace:"",basicName:"NumberTypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateOnlyTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"date-only"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['the "full-date" notation of RFC3339, namely yyyy-mm-dd (no implications about time or timezone-offset)']},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"TimeOnlyTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"time-only"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['the "partial-time" notation of RFC3339, namely hh:mm:ss[.ff...] (no implications about date or timezone-offset)']},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeOnlyTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"datetime-only"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['combined date-only and time-only with a separator of "T", namely yyyy-mm-ddThh:mm:ss[.ff...] (no implications about timezone-offset)']},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"datetime"},optional:!1},{name:"format",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.oneOf",arguments:[["rfc3339","rfc2616"]]},{name:"MetaModel.description",arguments:["Format used for this date time rfc3339 or rfc2616"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['a timestamp, either in the "date-time" notation of RFC3339, if format is omitted or is set to rfc3339, or in the format defined in RFC2616, if format is set to rfc2616.']},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"TypeInstance",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"properties",type:{base:{typeName:"TypeInstanceProperty",nameSpace:"",basicName:"TypeInstanceProperty",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Array of instance properties"]}],valueConstraint:null,optional:!1},{name:"isScalar",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether the type is scalar"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["For instances of scalar types returns scalar value"]}],valueConstraint:null,optional:!1},{name:"isArray",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Indicates whether the instance is array"]}],valueConstraint:null,optional:!1},{name:"items",type:{base:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Returns components of array instances"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}},{name:"TypeInstanceProperty",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Property name"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.description",arguments:["Property value"]}],valueConstraint:null,optional:!1},{name:"values",type:{base:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Array of values if property value is array"]}],valueConstraint:null,optional:!1},{name:"isArray",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether property has array as value"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[{name:"ModelLocation",members:["QUERY","HEADERS","URI","FORM","BURI","ANNOTATION","MODEL","SECURITYSCHEMATYPE"]},{name:"LocationKind",members:["APISTRUCTURE","DECLARATIONS","MODELS"]}],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts",Declarations:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},{classes:[{name:"MimeType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This sub type of the string represents mime types"]}],extends:[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"}],moduleName:null,annotationOverridings:{}},{name:"Response",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"code",type:{typeName:"Sys.StatusCodeString",nameSpace:"Sys",basicName:"StatusCodeString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.extraMetaKey",arguments:["statusCodes"]},{name:"MetaModel.description",arguments:["Responses MUST be a map of one or more HTTP status codes, where each status code itself is a map that describes that status code."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"headers",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.HEADERS"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.newInstanceName",arguments:["New Header"]},{name:"MetaModel.description",arguments:["Detailed information about any response headers returned by this method"]},{name:"MetaModel.valueDescription",arguments:["Object whose property names are the response header names and whose values describe the values."]}],valueConstraint:null,optional:!1},{name:"body",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Body"]},{name:"MetaModel.description",arguments:["The body of the response: a body declaration"]},{name:"MetaModel.valueDescription",arguments:["Object whose properties are either
* Media types and whose values are type objects describing the request body for that media type, or
* a type object describing the request body for the default media type specified in the root mediaType property."]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the response"]},{name:"MetaModel.valueDescription",arguments:["Markdown string"]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["For responses defined in traits or resource types returns object representation of parametrized properties"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"}],moduleName:null,annotationOverridings:{displayName:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the response"]}],annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this response. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},{classes:[{name:"Annotable",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"annotations",type:{base:{typeName:"Decls.AnnotationRef",nameSpace:"Decls",basicName:"AnnotationRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},typeKind:1},annotations:[{name:"MetaModel.noDirectParse",arguments:[]},{name:"MetaModel.setsContextValue",arguments:["locationKind","datamodel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.setsContextValue",arguments:["location","datamodel.ModelLocation.ANNOTATION"]},{name:"MetaModel.description",arguments:["Most of RAML model elements may have attached annotations decribing additional meta data about this element"]},{name:"MetaModel.documentationTableLabel",arguments:["(<annotationName>)"]},{name:"MetaModel.valueDescription",arguments:["A value corresponding to the declared type of this annotation."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Decls:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},{classes:[{name:"AnnotationRef",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"annotation",type:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced annotation"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Annotations allow you to attach information to your API"]},{name:"MetaModel.tags",arguments:[["annotations"]]}],extends:[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"}],moduleName:null,annotationOverridings:{}},{name:"AnnotationTarget",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Elements to which this Annotation can be applied (enum)"]},{name:"MetaModel.tags",arguments:[["annotations"]]}],extends:[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},{classes:[{name:"TraitRef",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"trait",type:{typeName:"Trait",nameSpace:"",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced trait"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"Trait",nameSpace:"",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{}},{name:"Trait",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name of the trait"]}],valueConstraint:null,optional:!1},{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Instructions on how and when the trait should be used."]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of parametrized properties of the trait"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.inlinedTemplates",arguments:[]},{name:"MetaModel.allowQuestion",arguments:[]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],extends:[{typeName:"MethodBase",nameSpace:"",basicName:"MethodBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{displayName:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the trait display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}]}},{name:"MethodBase",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"body",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Body"]},{name:"MetaModel.description",arguments:["Some method verbs expect the resource to be sent as a request body. For example, to create a resource, the request must include the details of the resource to create. Resources CAN have alternate representations. For example, an API might support both JSON and XML representations. A method's body is defined in the body property as a hashmap, in which the key MUST be a valid media type."]}],valueConstraint:null,optional:!1},{name:"protocols",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HTTP","HTTPS"]]},{name:"MetaModel.description",arguments:["A method can override the protocols specified in the resource or at the API root, by employing this property."]},{name:"MetaModel.valueDescription",arguments:["array of strings of value HTTP or HTTPS, or a single string of such kind, case-insensitive"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"TraitRef",nameSpace:"",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed traits"]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme."]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Operation",nameSpace:"",basicName:"Operation",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{}},{name:"Method",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"method",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.extraMetaKey",arguments:["methods"]},{name:"MetaModel.oneOf",arguments:[["get","put","post","delete","options","head","patch","trace","connect"]]},{name:"MetaModel.description",arguments:["Method that can be called"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["For types defined in resource types returns object representation of parametrized properties"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"MethodBase",nameSpace:"",basicName:"MethodBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts" }],moduleName:null,annotationOverridings:{displayName:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the method display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}]}},{name:"Operation",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"queryParameters",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.QUERY"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.newInstanceName",arguments:["New query parameter"]},{name:"MetaModel.description",arguments:["An APIs resources MAY be filtered (to return a subset of results) or altered (such as transforming a response body from JSON to XML format) by the use of query strings. If the resource or its method supports a query string, the query string MUST be defined by the queryParameters property"]}],valueConstraint:null,optional:!1},{name:"headers",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.HEADERS"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.description",arguments:["Headers that allowed at this position"]},{name:"MetaModel.newInstanceName",arguments:["New Header"]}],valueConstraint:null,optional:!1},{name:"queryString",type:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.description",arguments:["Specifies the query string needed by this method. Mutually exclusive with queryParameters."]}],valueConstraint:null,optional:!1},{name:"responses",type:{base:{typeName:"Bodies.Response",nameSpace:"Bodies",basicName:"Response",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["response","true"]},{name:"MetaModel.newInstanceName",arguments:["New Response"]},{name:"MetaModel.description",arguments:["Information about the expected responses to a request"]},{name:"MetaModel.valueDescription",arguments:["An object whose keys are the HTTP status codes of the responses and whose values describe the responses."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},{classes:[{name:"SecuritySchemePart",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:"Operation",nameSpace:"",basicName:"Operation",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.description",arguments:['Annotations to be applied to this security scheme part. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"requestTokenUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Temporary Credential Request endpoint as defined in RFC5849 Section 2.1"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Resource Owner Authorization endpoint as defined in RFC5849 Section 2.2"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"tokenCredentialsUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Request endpoint as defined in RFC5849 Section 2.3"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"signatures",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HMAC-SHA1","RSA-SHA1","PLAINTEXT"]]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.description",arguments:["List of the signature methods used by the server. Available methods: HMAC-SHA1, RSA-SHA1, PLAINTEXT"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]},{name:"MetaModel.functionalDescriminator",arguments:["$parent.type=='OAuth 1.0'"]}],extends:[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"accessTokenUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Endpoint as defined in RFC6749 Section 3.2. Not required forby implicit grant type."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The URI of the Authorization Endpoint as defined in RFC6749 Section 3.1. Required forby authorization_code and implicit grant types."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationGrants",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.oftenKeys",arguments:[["authorization_code","password","client_credentials","implicit"]]},{name:"MetaModel.description",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of: authorization_code, password, client_credentials, implicit, or any absolute url."]},{name:"MetaModel.markdownDescription",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of:
* authorization_code
* password
* client_credentials
* implicit
* or any absolute url."]}],valueConstraint:null,optional:!1},{name:"scopes",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of scopes supported by the security scheme as defined in RFC6749 Section 3.3"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],extends:[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"SecuritySchemeRef",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"securitySchemeName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns the name of security scheme, this reference refers to."]}],valueConstraint:null,optional:!1},{name:"securityScheme",type:{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns AST node of security scheme, this reference refers to, or null."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"AbstractSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.startFrom",arguments:[""]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.description",arguments:["Name of the security scheme"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.oneOf",arguments:[["OAuth 1.0","OAuth 2.0","Basic Authentication","Digest Authentication","Pass Through","x-{other}"]]},{name:"MetaModel.descriminatingProperty",arguments:[]},{name:"MetaModel.description",arguments:["The securitySchemes property MUST be used to specify an API's security mechanisms, including the required settings and the authentication methods that the API supports. one authentication method is allowed if the API supports them."]},{name:"MetaModel.valueDescription",arguments:["string

The value MUST be one of
* OAuth 1.0,
* OAuth 2.0,
* BasicSecurityScheme Authentication
* DigestSecurityScheme Authentication
* Pass Through
* x-<other>"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute MAY be used to describe a security schemes property."]},{name:"MetaModel.description",arguments:["The description MAY be used to describe a securityScheme."]}],valueConstraint:null,optional:!1},{name:"describedBy",type:{typeName:"SecuritySchemePart",nameSpace:"",basicName:"SecuritySchemePart",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["A description of the request components related to Security that are determined by the scheme: the headers, query parameters or responses. As a best practice, even for standard security schemes, API designers SHOULD describe these properties of security schemes. Including the security scheme description completes an API documentation."]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the security scheme display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"settings",type:{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The settings attribute MAY be used to provide security scheme-specific information. The required attributes vary depending on the type of security scheme is being declared. It describes the minimum set of properties which any processing application MUST provide and validate if it chooses to implement the security scheme. Processing applications MAY choose to recognize other properties for things such as token lifetime, preferred cryptographic algorithms, and more."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 2.0"},optional:!1},{name:"settings",type:{typeName:"OAuth2SecuritySchemeSettings",nameSpace:"",basicName:"OAuth2SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 1.0"},optional:!1},{name:"settings",type:{typeName:"OAuth1SecuritySchemeSettings",nameSpace:"",basicName:"OAuth1SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"PassThroughSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Pass Through"},optional:!1},{name:"settings",type:{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"BasicSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Basic Authentication"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"DigestSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Digest Authentication"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"CustomSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"x-{other}"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],extends:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},{classes:[{name:"ResourceTypeRef",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"resourceType",type:{typeName:"ResourceType",nameSpace:"",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced resource type"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"ResourceType",nameSpace:"",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{}},{name:"ResourceType",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the resource type display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name of the resource type"]}],valueConstraint:null,optional:!1},{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Instructions on how and when the resource type should be used."]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of parametrized properties of the resource type"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.inlinedTemplates",arguments:[]},{name:"MetaModel.allowQuestion",arguments:[]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],extends:[{typeName:"ResourceBase",nameSpace:"",basicName:"ResourceBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{}},{name:"ResourceBase",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"methods",type:{base:{typeName:"Methods.Method",nameSpace:"Methods",basicName:"Method",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Methods that are part of this resource type definition"]},{name:"MetaModel.markdownDescription",arguments:["The methods available on this resource."]},{name:"MetaModel.documentationTableLabel",arguments:["get?
patch?
put?
post?
delete?
options?
head?"]},{name:"MetaModel.valueDescription",arguments:["Object describing the method"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"Methods.TraitRef",nameSpace:"Methods",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of the traits to apply to all methods declared (implicitly or explicitly) for this resource. Individual methods may override this declaration"]},{name:"MetaModel.valueDescription",arguments:["array, which can contain each of the following elements:
* name of unparametrized trait
* a key-value pair with trait name as key and a map of trait parameters as value
* inline trait declaration

(or a single element of any above kind)"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"ResourceTypeRef",nameSpace:"",basicName:"ResourceTypeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.description",arguments:["The resource type which this resource inherits."]},{name:"MetaModel.valueDescription",arguments:["one of the following elements:
* name of unparametrized resource type
* a key-value pair with resource type name as key and a map of its parameters as value
* inline resource type declaration"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["The security schemes that apply to all methods declared (implicitly or explicitly) for this resource."]},{name:"MetaModel.valueDescription",arguments:["array of security scheme names or a single security scheme name"]}],valueConstraint:null,optional:!1},{name:"uriParameters",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.URI"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.description",arguments:["Detailed information about any URI parameters of this resource"]},{name:"MetaModel.valueDescription",arguments:["object whose property names are the URI parameter names and whose values describe the values"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{}},{name:"Resource",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"relativeUri",type:{typeName:"Sys.RelativeUriString",nameSpace:"Sys",basicName:"RelativeUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.startFrom",arguments:["/"]},{name:"MetaModel.description",arguments:["Relative URL of this resource from the parent resource"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the resource display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"resources",type:{base:{typeName:"Resource",nameSpace:"",basicName:"Resource",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Resource"]},{name:"MetaModel.description",arguments:['A nested resource is identified as any property whose name begins with a slash ("/") and is therefore treated as a relative URI.']},{name:"MetaModel.documentationTableLabel",arguments:["/<relativeUri>"]},{name:"MetaModel.valueDescription",arguments:["object describing the nested resource"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:"ResourceBase",nameSpace:"",basicName:"ResourceBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{description:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the resource."]},{name:"MetaModel.valueDescription",arguments:["Markdown string"]}],annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this resource. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts", -Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},{classes:[{name:"FileTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"file"},optional:!1},{name:"fileTypes",type:{base:{typeName:"Sys.ContentType",nameSpace:"Sys",basicName:"ContentType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of valid content-type strings for the file. The file type */* should be a valid value."]}],valueConstraint:null,optional:!1},{name:"minLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The minLength attribute specifies the parameter value's minimum number of bytes."]}],valueConstraint:null,optional:!1},{name:"maxLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The maxLength attribute specifies the parameter value's maximum number of bytes."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["(Applicable only to Form properties) Value is a file. Client generators SHOULD use this type to handle file uploads correctly."]}],extends:[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts"}]},function(e,t,n){"use strict";function r(e,t){var n=new s.Universe(t,""),r={};return _(e,n,{},r),Object.keys(r).forEach(function(e){A(r[e],n)}),Object.keys(r).forEach(function(e){E(r[e],n)}),Object.keys(r).forEach(function(e){T(r[e],n)}),n.types().forEach(function(e){if(e instanceof s.NodeClass){var t=e;if(t.properties().forEach(function(e){var t=e.range(),n=e;t.hasValueTypeInHierarchy()||t.properties().forEach(function(e){if(e.getAdapter(p.RAMLPropertyService).isKey()){var t=e.keyPrefix();t&&(n.withKeyRestriction(t),n.merge());var r=e.enumOptions();r&&(n.withEnumOptions(r),n.merge())}})}),t.getAdapter(p.RAMLService).isGlobalDeclaration()){if(t.getAdapter(p.RAMLService).getActuallyExports()&&"$self"!=t.getAdapter(p.RAMLService).getActuallyExports()){var r=t.property(t.getAdapter(p.RAMLService).getActuallyExports()).range();if(r.hasValueTypeInHierarchy()){var i=r.getAdapter(p.RAMLService);i.setGloballyDeclaredBy(t)}}if(t.getAdapter(p.RAMLService).getConvertsToGlobal()){var r=n.type(t.getAdapter(p.RAMLService).getConvertsToGlobal());if(r.hasValueTypeInHierarchy()){var i=r.getAdapter(p.RAMLService);i.setGloballyDeclaredBy(t)}}}}}),n}function i(e,t,n,r,i){var a=s.prop(e.name(),"",t,n,r);e.isMultiValue()&&a.withMultiValue(!0),a.unmerge(),n||console.log(e.name()+":"+t.nameId()+" has undefined type"),n.hasValueTypeInHierarchy()||n.properties().forEach(function(e){if(e.getAdapter(p.RAMLPropertyService).isKey()){var t=e.keyPrefix();t&&(a.withKeyRestriction(t),a.merge());var n=e.enumOptions();n&&(a.withEnumOptions(n),a.merge())}}),S(e,a,i)}var a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(181),s=n(56),u=n(189),l=n(190),p=s,c=function(){function e(e,t){this._field=e,this._clazz=t}return e.prototype.name=function(){return this._field.name},e.prototype.range=function(){return this._clazz.getModule().typeFor(this._field.type,this._clazz)},e.prototype.isMultiValue=function(){return this._field.type.typeKind==o.TypeKind.ARRAY},e.prototype.isKey=function(){return null!=u.find(this._field.annotations,function(e){return"MetaModel.key"==e.name})},e.prototype.isSimpleValue=function(){return null!=u.find(this._field.annotations,function(e){return"MetaModel.value"==e.name})},e.prototype.annotations=function(){return this._field.annotations},e}(),f=function(){function e(e,t){this._field=e,this._clazz=t}return e.prototype.name=function(){return this._field.name},e.prototype.value=function(){return this._field.valueConstraint},e}(),h=function(){function e(e,t){this._clazz=e,this.mw=t}return e.prototype.typeMeta=function(){return this._clazz.annotations},e.prototype.path=function(){return this.mw.path()},e.prototype.getModule=function(){return this.mw},e.prototype.typeArgs=function(){return this._clazz.typeParameters},e.prototype.typConstraints=function(){var e=this;return this._clazz.typeParameterConstraint.map(function(t){return t?e.mw.classForName(t):null})},e.prototype.methods=function(){return this._clazz.methods},e.prototype.name=function(){return this._clazz.name},e.prototype.members=function(){var e=this;return this._clazz.fields.filter(function(e){return null==e.valueConstraint}).map(function(t){return new c(t,e)})},e.prototype.constraints=function(){var e=this;return this._clazz.fields.filter(function(e){return null!=e.valueConstraint}).map(function(t){return new f(t,e)})},e.prototype.isSubTypeOf=function(e){if(this==e)return!0;var t=!1;return this.getAllSuperTypes().forEach(function(n){t||(t=t||n.isSubTypeOf(e))}),t},e.prototype.getExtendsClauses=function(){return this._clazz.extends},e.prototype.getSuperTypes=function(){var e=this,t=[];return this._clazz.extends.forEach(function(n){var r=e.mw.classForName(n.typeName);r&&t.push(r)}),t},e.prototype.getAllSuperTypes=function(){var e=this,t=[];return this._clazz.extends.forEach(function(n){var r=e.mw.classForName(n.typeName);if(r){var i=r.getAllSuperTypes();t.push(r),t.concat(i)}}),u.unique(t)},e.prototype.annotationOverridings=function(){return this._clazz.annotationOverridings},e}(),d=function(){function e(){}return e.prototype.members=function(){return[]},e.prototype.methods=function(){return[]},e.prototype.isSubTypeOf=function(e){return!1},e.prototype.getSuperTypes=function(){return[]},e.prototype.getAllSuperTypes=function(){return[]},e.prototype.name=function(){return null},e.prototype.constraints=function(){return[]},e.prototype.typeMeta=function(){return[]},e.prototype.getModule=function(){throw new Error("Not implemented")},e.prototype.annotationOverridings=function(){return{}},e}(),m=function(e){function t(t,n){var r=e.call(this)||this;return r._clazz=t,r.mw=n,r}return a(t,e),t.prototype.getModule=function(){return this.mw},t.prototype.values=function(){return this._clazz.members},t.prototype.name=function(){return this._clazz.name},t}(d),y=function(e){function t(t,n){var r=e.call(this)||this;return r._clazz=t,r.mw=n,r}return a(t,e),t.prototype.elements=function(){return this._clazz},t.prototype.name=function(){return this._clazz.map(function(e){return e.name()}).join("|")},t}(d),v=function(){function e(e){var t=this;this._univers=e,this.name2Class={},this.namespaceToMod={},this._classes=[],e.classes.forEach(function(e){var n=new h(e,t);t._classes.push(n),t.name2Class[e.name]=n,e.moduleName&&(t.name2Class[e.moduleName+"."+e.name]=n)}),e.enumDeclarations.forEach(function(e){var n=new m(e,t);t._classes.push(n),t.name2Class[e.name]=n})}return e.prototype.typeFor=function(e,t){var n=this;switch(e.typeKind){case o.TypeKind.BASIC:var r=e,i=r.typeName;"string"==i&&(i="StringType"),"number"==i&&(i="NumberType"),"boolean"==i&&(i="BooleanType"),"any"==i&&(i="AnyType");var a=u.indexOf(t.typeArgs(),i);if(a!=-1){var s=t.typConstraints()[a];return s?s:this.classForName("ValueType")}return this.classForName(i);case o.TypeKind.UNION:var l=e;return new y(l.options.map(function(e){return n.typeFor(e,t)}),this);case o.TypeKind.ARRAY:var p=e;return this.typeFor(p.base,t)}return null},e.prototype.path=function(){return this._univers.name},e.prototype.classForName=function(e,t){var n=this;if(void 0===t&&(t={}),!e)return null;var r=this.name2Class[e];if(!r&&!t[this.path()]){t[this.path()]=this;var i=e.indexOf(".");if(i!=-1){var a=this.namespaceToMod[e.substring(0,i)];if(!a)throw new Error;return a.classForName(e.substring(i+1),t)}Object.keys(this.namespaceToMod).forEach(function(i){if("MetaModel"!=i){var a=n.namespaceToMod[i].classForName(e,t);a&&(r=a)}})}return r},e.prototype.classes=function(){return this._classes},e}(),g=function(e,t){if(e){var n;if(e instanceof y){throw new Error("Union type support was removed from definition system")}return n=t.type(e.name())}},A=function(e,t){var n=e.classForName("ValueType");e.classes().forEach(function(e){if(e instanceof m){var r=new s.EnumType(e.name(),t,e.getModule().path());return r.values=e.values(),void t.register(r)}if(e.isSubTypeOf(n)){var i=e.getAllSuperTypes();i.push(e);var a=null;if(i.forEach(function(e){var t=e.getExtendsClauses();t.forEach(function(e){if(e.typeKind==o.TypeKind.BASIC){var t=e;if("Reference"==t.basicName){var n=t.typeArguments[0];a=n.typeName;var r=a.indexOf(".");r!=-1&&(a=a.substring(r+1))}}})}),a){var u=new s.ReferenceType(e.name(),e.getModule().path(),a,t);u.setBuiltIn(!0),t.register(u)}else{var l=new s.ValueType(e.name(),t,e.getModule().path());l.setBuiltIn(!0),t.register(l)}}else{var p=new s.NodeClass(e.name(),t,e.getModule().path());p.setBuiltIn(!0),t.register(p)}})},E=function(e,t){e.classes().forEach(function(e){e.getSuperTypes().forEach(function(n){var r=t.type(e.name()),i=t.type(n.name());if(!r||!i){var r=t.type(e.name()),i=t.type(n.name());throw new Error}t.registerSuperClass(r,i)})})},T=function(e,t){e.classes().forEach(function(e){var n=t.type(e.name());e.typeMeta().forEach(function(n){var r=g(e,t);l.handleTypeAnnotation(n,r)}),e.members().forEach(function(e){var r=e.range(),a=g(r,t);null==a&&console.log(r+":"+e.name());var o=e.annotations().map(function(e){return e.name}).indexOf("MetaModel.customHandling")>=0;i(e,n,a,o)}),Object.keys(e.annotationOverridings()).forEach(function(r){var a=[].concat(e.annotationOverridings()[r]),o={};a.forEach(function(e){return o[e.name]=!0});for(var s,u=e.getSuperTypes(),l={},p=0;p0&&"RamlWrapper"!=o&&(i=o+"."+i),n.typeArguments&&0!=n.typeArguments.length&&(i+="<"+n.typeArguments.map(function(e){return r(e)}).join(", ")+">"),t?n.nameSpace&&t[n.nameSpace]?[i]:[]:[i]}if(e.typeKind==a.TypeKind.UNION){var s=e,u=[];return s.options.forEach(function(e){return u=u.concat(r(e,t))}),u}return[]}function i(e){return o.getHelperMethods(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(181),o=n(183),s={RamlWrapper:!0},u=function(){function e(e,t,n,r,i){this.originalName=e,this.wrapperMethodName=t,this.returnType=n,this.args=r,this.meta=i}return e.prototype.targetWrappers=function(){var e=!0,t=[];return this.args.forEach(function(n){var i=r(n.type,s);if(0!=i.length)return e&&0==t.length?void(t=t.concat(i)):(t=[],void(e=!1))}),t},e.prototype.callArgs=function(){return this.args.map(function(e){return 0==r(e.type,s).length?e:{name:"this",type:null,optional:!1,defaultValue:void 0}})},e}();t.HelperMethod=u,t.flatten=r,t.getHelperMethods=i},function(e,t,n){"use strict";function r(e){var t=[],n=l.readFileSync(u.resolve(e)).toString(),r=o.createSourceFile("sample.ts",n,o.ScriptTarget.ES3,!0);return s.Matching.visit(r,function(r){var s=r;if(s.kind==o.SyntaxKind.FunctionDeclaration){var u=i(s,n);if(!u)return;var l=s.name.text,f=l;u.name?f=u.name:u.name=l;var f=u.name?u.name:l,h=s.parameters?s.parameters.map(function(t){return a(t,e)}):[],d=(!!u.override&&u.override,p.buildType(s.type,e));t.push(new c.HelperMethod(l,f,d,h,u))}}),t}function i(e,t){var n=o.getLeadingCommentRanges(t,e.pos);if(!n)return null;var r=n.map(function(e){return t.substring(e.pos,e.end)}).join("\n"),i=r.indexOf("__$helperMethod__");if(i<0)return null;i+="__$helperMethod__".length;var a=r.indexOf("__$meta__");if(a<0)return{comment:f(r.substring(i))};var s=f(r.substring(i,a)),u=r.indexOf("{",a);if(u<0)return{comment:s};try{var l=JSON.parse(f(r.substring(u)));return l.comment=s.trim().length>0?s:null,l.override=l.override||!1,l.primary=l.primary||!1,l.deprecated=l.deprecated||!1,l}catch(e){console.log(e)}return{}}function a(e,t){var n,r=e.name.text,i=p.buildType(e.type,t),a=null!=e.questionToken;return null!=e.initializer&&(n=p.parseArg(e.initializer),a=!0),{name:r,type:i,defaultValue:n,optional:a}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(184),s=n(185),u=n(6),l=n(186),p=n(187),c=n(182);t.getHelperMethods=r;var f=function(e){return e.replace(/^\s*\/\*+/g,"").replace(/\*+\/\s*$/g,"").split("\n").map(function(e){return e.replace(/^\s*\/\//g,"").replace(/^\s*\* {0,1}/g,"")}).join("\n").trim()}},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE_184__},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(184);!function(e){function t(n,r){var i=r(n);if(i)return i==e.SKIP?null:i;var o=a.forEachChild(n,function(e){var n=t(e,r);if(n)return n});return o}function n(e,t){void 0===t&&(t=function(e){return!0});for(var n=e.split("."),r=null,a=0;a0&&null==n.path[n.path.length-1].arguments?(n.path[n.path.length-1].arguments=t.arguments,n.path[n.path.length-1]._callExpression=t,n):null}else if(e.kind==a.SyntaxKind.PropertyAccessExpression){var r=e,i=this.doMatch(r.expression);if(i)return r.name.kind==a.SyntaxKind.Identifier?(i.path.push(new _(r.name.text,r.name)),i):null}else if(e.kind==a.SyntaxKind.Identifier){var o=e;if(this.rootMatcher.doMatch(o))return new S(o.text,o)}return null},e.prototype.nodeType=function(){return null},e}();e.CallBaseMatcher=I,e.ident=i,e.anyNode=o,e.call=s,e.exprStmt=u,e.assign=l,e.varDecl=p,e.field=c,e.classDeclaration=f}(i=t.Matching||(t.Matching={}))},function(e,t){function n(e){return null}function r(e,t){}function i(e){return!1}function a(e){}function o(e){}function s(e){return{isDirectory:function(){return!1},isSymbolicLink:function(){return!1},isFile:function(){return!1}}}function u(e){return this.statSync(e)}function l(e,t){return[]}function p(e){}t.readFileSync=n,t.writeFileSync=r,t.existsSync=i,t.mkdirSync=a,t.readdirSync=o,t.statSync=s,t.lstatSync=u,t.list=l,t.onChange=p},function(e,t,n){"use strict";function r(e){return A.createSourceFile("sample.ts",e,A.ScriptTarget.ES3,!0)}function i(e,n,s){var u=r(e),l={classes:[],aliases:[],enumDeclarations:[],imports:{},name:s};n[s]=l;var p=null;return t.tsm.Matching.visit(u,function(r){if(r.kind==A.SyntaxKind.ModuleDeclaration){var u=r;p=u.name.text}if(r.kind==A.SyntaxKind.ImportEqualsDeclaration){var c=r,f=c.name.text;if("RamlWrapper"==f)return;var h=c.moduleReference,d=h.expression,m=d.text,v=E.resolve(E.dirname(s)+"/",m)+".ts";if(!E.existsSync(v))throw new Error("Path "+m+" resolve to "+v+"do not exists");if(!n[v]){var g=E.readFileSync(v);i(g,n,v)}l.imports[f]=n[v]}if(r.kind==A.SyntaxKind.TypeAliasDeclaration){var T=r;if(T.name){var N=T.name.text,I=y(T.type,s);l.aliases.push({name:N,type:I})}}if(r.kind==A.SyntaxKind.EnumDeclaration){var b=r,M=[];b.members&&b.members.forEach(function(e){M.push(e.name.text)}),b.name&&l.enumDeclarations.push({name:b.name.text,members:M})}var R=r.kind==A.SyntaxKind.InterfaceDeclaration,C=r.kind==A.SyntaxKind.ClassDeclaration;if(R||C){var w=r;if(w){var P={},L=_.classDecl(w.name.text,R);return L.moduleName=p,l.classes.push(L),w.members.forEach(function(t){if(t.kind==A.SyntaxKind.MethodDeclaration){var n=t,r=o(n,e,s);L.methods.push(r)}var i=S.doMatch(t);if(i){var u=a(i,s);if("$"==u.name)L.annotations=u.annotations;else if("$"!=u.name.charAt(0)||"$ref"==u.name)P[u.name]=u,L.fields.push(u);else{var l=u.name.substr(1),p=P[l];if(p)p.annotations=u.annotations;else if("$$"!=u.name){var c=L.annotationOverridings[l];c||(c=[]),L.annotationOverridings[l]=c.concat(u.annotations)}}}}),w.typeParameters&&w.typeParameters.forEach(function(e){L.typeParameters.push(e.name.text),null==e.constraint?L.typeParameterConstraint.push(null):L.typeParameterConstraint.push(e.constraint.typeName.text)}),w.heritageClauses&&w.heritageClauses.forEach(function(e){e.types.forEach(function(t){if(e.token==A.SyntaxKind.ExtendsKeyword)L.extends.push(y(t,s));else{if(e.token!=A.SyntaxKind.ImplementsKeyword)throw new Error("Unknown token class heritage");L.implements.push(y(t,s))}})}),t.tsm.Matching.SKIP}}}),l}function a(e,t){return{name:e.name.text,type:y(e.type,t),annotations:"$"==e.name.text.charAt(0)?l(e.initializer):[],valueConstraint:"$"!=e.name.text.charAt(0)?u(e.initializer):null,optional:null!=e.questionToken}}function o(e,t,n){var r=e.name.text,i=t.substring(e.pos,e.end),a=[];e.parameters.forEach(function(e){a.push(s(e,t,n))});var o={returnType:y(e.type,n),name:r,start:e.pos,end:e.end,text:i,arguments:a};return o}function s(e,t,n){var r=t.substring(e.pos,e.end);return{name:e.name.text,start:e.pos,end:e.end,text:r,type:y(e.type,n)}}function u(e){return null==e?null:e.kind==A.SyntaxKind.CallExpression?{isCallConstraint:!0,value:p(e)}:{isCallConstraint:!1,value:c(e)}}function l(e){if(null==e)return[];if(e.kind==A.SyntaxKind.ArrayLiteralExpression){var t=e,n=[];return t.elements.forEach(function(e){n.push(p(e))}),n}throw new Error("Only Array Literals supported now")}function p(e){if(e.kind==A.SyntaxKind.CallExpression){var t=e,n=f(t.expression),r={name:n,arguments:[]};return t.arguments.forEach(function(e){r.arguments.push(c(e))}),r}throw new Error("Only call expressions may be annotations")}function c(e){if(e.kind==A.SyntaxKind.StringLiteral){var t=e;return t.text}if(e.kind==A.SyntaxKind.NoSubstitutionTemplateLiteral){var n=e;return n.text}if(e.kind==A.SyntaxKind.ArrayLiteralExpression){var r=e,i=[];return r.elements.forEach(function(e){i.push(c(e))}),i}if(e.kind==A.SyntaxKind.TrueKeyword)return!0;if(e.kind==A.SyntaxKind.PropertyAccessExpression){var a=e;return c(a.expression)+"."+c(a.name)}if(e.kind==A.SyntaxKind.Identifier){var o=e;return o.text}if(e.kind==A.SyntaxKind.FalseKeyword)return!1;if(e.kind==A.SyntaxKind.NumericLiteral){var s=e;return Number(s.text)}if(e.kind==A.SyntaxKind.BinaryExpression){var u=e;if(u.operatorToken.kind=A.SyntaxKind.PlusToken)return c(u.left)+c(u.right)}throw new Error("Unknown value in annotation")}function f(e){if(e.kind==A.SyntaxKind.Identifier)return e.text;if(e.kind==A.SyntaxKind.PropertyAccessExpression){var t=e;return f(t.expression)+"."+f(t.name)}throw new Error("Only simple identifiers are supported now")}function h(e,t){var n=e.indexOf("."),r=n!=-1?e.substring(0,n):"",i=n!=-1?e.substring(n+1):e;return{typeName:e,nameSpace:r,basicName:i,typeKind:T.TypeKind.BASIC,typeArguments:[],modulePath:t}}function d(e){return{base:e,typeKind:T.TypeKind.ARRAY}}function m(e){return{options:e,typeKind:T.TypeKind.UNION}}function y(e,t){if(null==e)return null;if(e.kind==A.SyntaxKind.StringKeyword)return h("string",null);if(e.kind==A.SyntaxKind.NumberKeyword)return h("number",null);if(e.kind==A.SyntaxKind.BooleanKeyword)return h("boolean",null);if(e.kind==A.SyntaxKind.AnyKeyword)return h("any",null);if(e.kind==A.SyntaxKind.VoidKeyword)return h("void",null);if(e.kind==A.SyntaxKind.TypeReference){var n=e,r=h(g(n.typeName),t);return n.typeArguments&&n.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}if(e.kind==A.SyntaxKind.ArrayType){var i=e;return d(y(i.elementType,t))}if(e.kind==A.SyntaxKind.UnionType){var a=e;return m(a.types.map(function(e){return y(e,t)}))}if(e.kind==A.SyntaxKind.ExpressionWithTypeArguments){var o=e,r=h(v(o.expression),t);return o.typeArguments&&o.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}throw new Error("Case not supported: "+e.kind)}function v(e){return e.name?e.name.text:e.text}function g(e){if(e.kind==A.SyntaxKind.Identifier)return e.text;var t=e;return g(t.left)+"."+g(t.right)}Object.defineProperty(t,"__esModule",{value:!0});var A=n(184);t.tsm=n(185),t.helperMethodExtractor=n(183);var E=n(188),T=n(181),_=n(181),S=t.tsm.Matching.field();t.parseStruct=i,t.parseArg=c,t.buildType=y},function(e,t,n){"use strict";function r(e,t){return s.resolve(e,t)}function i(e){return u.readFileSync(e).toString()}function a(e){return s.dirname(e)}function o(e){return u.existsSync(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),u=n(186);t.resolve=r,t.readFileSync=i,t.dirname=a,t.existsSync=o},function(e,t,n){var r,i;(function(e,n){!function(){var a="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=a._,s=Array.prototype,u=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,p=s.push,c=s.slice,f=u.toString,h=u.hasOwnProperty,d=Array.isArray,m=Object.keys,y=Object.create,v=function(){},g=function(e){return e instanceof g?e:this instanceof g?void(this._wrapped=e):new g(e)};"undefined"==typeof t||t.nodeType?a._=g:("undefined"!=typeof n&&!n.nodeType&&n.exports&&(t=n.exports=g),t._=g),g.VERSION="1.9.1";var A,E=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},T=function(e,t,n){return g.iteratee!==A?g.iteratee(e,t):null==e?g.identity:g.isFunction(e)?E(e,t,n):g.isObject(e)&&!g.isArray(e)?g.matcher(e):g.property(e)};g.iteratee=A=function(e,t){return T(e,t,1/0)};var _=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i=0&&t<=M};g.each=g.forEach=function(e,t,n){t=E(t,n);var r,i;if(C(e))for(r=0,i=e.length;r0?0:o-1;for(i||(r=t[a?a[s]:s],s+=e);s>=0&&s=3;return t(e,E(n,i,4),r,a)}};g.reduce=g.foldl=g.inject=w(1),g.reduceRight=g.foldr=w(-1),g.find=g.detect=function(e,t,n){var r=C(e)?g.findIndex:g.findKey,i=r(e,t,n);if(void 0!==i&&i!==-1)return e[i]},g.filter=g.select=function(e,t,n){var r=[];return t=T(t,n),g.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},g.reject=function(e,t,n){return g.filter(e,g.negate(T(t)),n)},g.every=g.all=function(e,t,n){t=T(t,n);for(var r=!C(e)&&g.keys(e),i=(r||e).length,a=0;a=0},g.invoke=_(function(e,t,n){var r,i;return g.isFunction(t)?i=t:g.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),g.map(e,function(e){var a=i;if(!a){if(r&&r.length&&(e=b(e,r)),null==e)return;a=e[t]}return null==a?a:a.apply(e,n)})}),g.pluck=function(e,t){return g.map(e,g.property(t))},g.where=function(e,t){return g.filter(e,g.matcher(t))},g.findWhere=function(e,t){return g.find(e,g.matcher(t))},g.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sa&&(a=r)}else t=T(t,n),g.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},g.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sr||void 0===n)return 1;if(n0?0:i-1;a>=0&&a0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(c.call(r,o,s),g.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&at?(r&&(clearTimeout(r),r=null),s=l,o=e.apply(i,a),r||(i=a=null)):r||n.trailing===!1||(r=setTimeout(u,p)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l},g.debounce=function(e,t,n){var r,i,a=function(t,n){r=null,n&&(i=e.apply(t,n))},o=_(function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,t),s&&(i=e.apply(this,o))}else r=g.delay(a,t,this,o);return i});return o.cancel=function(){clearTimeout(r),r=null},o},g.wrap=function(e,t){return g.partial(t,e)},g.negate=function(e){return function(){return!e.apply(this,arguments)}},g.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},g.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},g.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},g.once=g.partial(g.before,2),g.restArguments=_;var k=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=F.length,r=e.constructor,i=g.isFunction(r)&&r.prototype||u,a="constructor";for(I(e,a)&&!g.contains(t,a)&&t.push(a);n--;)a=F[n],a in e&&e[a]!==i[a]&&!g.contains(t,a)&&t.push(a)};g.keys=function(e){if(!g.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)I(e,n)&&t.push(n);return k&&B(e,t),t},g.allKeys=function(e){if(!g.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&B(e,t),t},g.values=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=E(r,t[1])),t=g.allKeys(e)):(r=K,t=O(t,!1,!1),e=Object(e));for(var i=0,a=t.length;i1&&(n=t[1])):(t=g.map(O(t,!1,!1),String),r=function(e,n){return!g.contains(t,n)}),g.pick(e,r,n)}),g.defaults=V(g.allKeys,!0),g.create=function(e,t){var n=S(e);return t&&g.extendOwn(n,t),n},g.clone=function(e){return g.isObject(e)?g.isArray(e)?e.slice():g.extend({},e):e},g.tap=function(e,t){return t(e),e},g.isMatch=function(e,t){var n=g.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a":">",'"':""","'":"'","`":"`"},q=g.invert(Y),G=function(e){var t=function(t){return e[t]},n="(?:"+g.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};g.escape=G(Y),g.unescape=G(q),g.result=function(e,t,n){g.isArray(t)||(t=[t]);var r=t.length;if(!r)return g.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var z=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+$[e]};g.template=function(e,t,n){!t&&n&&(t=n),t=g.defaults({},t,g.templateSettings);var r=RegExp([(t.escape||z).source,(t.interpolate||z).source,(t.evaluate||z).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(J,Q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";var o;try{o=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return o.call(this,e,g)},u=t.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},g.chain=function(e){var t=g(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?g(t).chain():t};g.mixin=function(e){return g.each(g.functions(e),function(t){var n=g[t]=e[t];g.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),Z(this,n.apply(g,e))}}),g},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];g.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),g.each(["concat","join","slice"],function(e){var t=s[e];g.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return String(this._wrapped)},r=[],i=function(){return g}.apply(t,r),!(void 0!==i&&(n.exports=i))}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){"use strict";function r(e,t){"MetaModel.declaresSubTypeOf"==e.name&&t.getAdapter(u.RAMLService).setExtendedTypeName(e.arguments[0]),"MetaModel.nameAtRuntime"==e.name&&t.setNameAtRuntime(e.arguments[0]),"MetaModel.description"==e.name&&t.withDescription(e.arguments[0]),"MetaModel.inlinedTemplates"==e.name&&t.getAdapter(u.RAMLService).setInlinedTemplates(!0),"MetaModel.requireValue"==e.name&&t.getAdapter(u.RAMLService).withContextRequirement(""+e.arguments[0],""+e.arguments[1]),"MetaModel.referenceIs"==e.name&&t.getAdapter(u.RAMLService).withReferenceIs(""+e.arguments[0]),"MetaModel.actuallyExports"==e.name&&t.getAdapter(u.RAMLService).withActuallyExports(""+e.arguments[0]),"MetaModel.convertsToGlobalOfType"==e.name&&t.getAdapter(u.RAMLService).withConvertsToGlobal(""+e.arguments[0]),"MetaModel.allowAny"==e.name&&t.getAdapter(u.RAMLService).withAllowAny(),"MetaModel.allowQuestion"==e.name&&t.getAdapter(u.RAMLService).withAllowQuestion(),"MetaModel.alias"==e.name&&t.getAdapter(u.RAMLService).addAlias(""+e.arguments[0]),"MetaModel.consumesRefs"==e.name&&t.getAdapter(u.RAMLService).setConsumesRefs(!0),"MetaModel.canInherit"==e.name&&t.getAdapter(u.RAMLService).withCanInherit(""+e.arguments[0]),"MetaModel.definingPropertyIsEnough"==e.name&&t.getAdapter(u.RAMLService).definingPropertyIsEnough(""+e.arguments[0]),"MetaModel.customHandling"==e.name&&t.setCustom(!0),"MetaModel.superclasses"==e.name&&t.getAdapter(u.RAMLService).registerSupertypes(e.arguments[0]),"MetaModel.possibleInterfaces"==e.name&&t.getAdapter(u.RAMLService).registerPossibleInterfaces(e.arguments[0])}function i(e,n){t.annotationHandlers[n.name](n,e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(56),o=n(191),s=n(189),u=a;t.handleTypeAnnotation=r,t.annotationHandlers={key:function(e,t){t.withFromParentKey(),t.withKey(!0)},value:function(e,t){t.withFromParentValue()},canBeValue:function(e,t){t.withCanBeValue()},unmerged:function(e,t){t.unmerge()},startFrom:function(e,t){t.withKeyRestriction(e.arguments[0]),t.merge()},oneOf:function(e,t){t.withEnumOptions(e.arguments[0])},oftenKeys:function(e,t){t.withOftenKeys(e.arguments[0])},embeddedInMaps:function(e,t){t.getAdapter(u.RAMLPropertyParserService).withEmbedMap()},system:function(e,t){t.getAdapter(u.RAMLPropertyParserService).withSystem(!0)},required:function(e,t){"false"!=e.arguments[0]&&e.arguments[0]!==!1&&t.withRequired(!0)},noDirectParse:function(e,t){"false"!=e.arguments[0]&&e.arguments[0]!==!1&&t.withNoDirectParse()},setsContextValue:function(e,t){t.addChildValueConstraint(new a.ChildValueConstraint(""+e.arguments[0],""+e.arguments[1]))},defaultValue:function(e,t){t.setDefaultVal(""+e.arguments[0])},defaultIntegerValue:function(e,t){t.setDefaultIntegerVal(e.arguments[0])},defaultBooleanValue:function(e,t){t.setDefaultBooleanVal(e.arguments[0])},facetId:function(e,t){"minItems"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Array){var n=Number.parseInt(""+t.value());if(n>e.length)return"array should contain at least "+t.value()+" items"}return null}),"enum"==e.arguments[0]&&t.setFacetValidator(function(e,t){var n=e+"",r=t;try{if(!r.some(function(e){return e==n}))return"value should be one of :"+r.join(",")}catch(e){return}return null}),"maxItems"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Array){var n=Number.parseInt(""+t);if(nObject.keys(e).length)return"object should contain at least "+t.value()+" properties"}return null}),"maxProperties"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Object){var n=Number.parseInt(""+t);if(ne.length)return"string length should be at least "+n}return null}),"maxLength"==e.arguments[0]&&t.setFacetValidator(function(e,t){if("number"!=typeof e&&"boolean"!=typeof e||(e=""+e),"string"==typeof e){var n=Number.parseInt(""+t);if(ne)return"value should be not less then "+n}return null}),"maximum"==e.arguments[0]&&t.setFacetValidator(function(e,t){if("string"==typeof e&&(e=parseFloat(e)),"number"==typeof e){var n=parseFloat(t);if(n=0;i(e,n,a,o)}),Object.keys(e.annotationOverridings()).forEach(function(r){var a=[].concat(e.annotationOverridings()[r]),o={};a.forEach(function(e){return o[e.name]=!0});for(var s,u=e.getSuperTypes(),l={},p=0;p0&&"RamlWrapper"!=o&&(i=o+"."+i),n.typeArguments&&0!=n.typeArguments.length&&(i+="<"+n.typeArguments.map(function(e){return r(e)}).join(", ")+">"),t?n.nameSpace&&t[n.nameSpace]?[i]:[]:[i]}if(e.typeKind==a.TypeKind.UNION){var s=e,u=[];return s.options.forEach(function(e){return u=u.concat(r(e,t))}),u}return[]}function i(e){return o.getHelperMethods(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(182),o=n(184),s={RamlWrapper:!0},u=function(){function e(e,t,n,r,i){this.originalName=e,this.wrapperMethodName=t,this.returnType=n,this.args=r,this.meta=i}return e.prototype.targetWrappers=function(){var e=!0,t=[];return this.args.forEach(function(n){var i=r(n.type,s);if(0!=i.length)return e&&0==t.length?void(t=t.concat(i)):(t=[],void(e=!1))}),t},e.prototype.callArgs=function(){return this.args.map(function(e){return 0==r(e.type,s).length?e:{name:"this",type:null,optional:!1,defaultValue:void 0}})},e}();t.HelperMethod=u,t.flatten=r,t.getHelperMethods=i},function(e,t,n){"use strict";function r(e){var t=[],n=l.readFileSync(u.resolve(e)).toString(),r=o.createSourceFile("sample.ts",n,o.ScriptTarget.ES3,!0);return s.Matching.visit(r,function(r){var s=r;if(s.kind==o.SyntaxKind.FunctionDeclaration){var u=i(s,n);if(!u)return;var l=s.name.text,f=l;u.name?f=u.name:u.name=l;var f=u.name?u.name:l,h=s.parameters?s.parameters.map(function(t){return a(t,e)}):[],d=(!!u.override&&u.override,p.buildType(s.type,e));t.push(new c.HelperMethod(l,f,d,h,u))}}),t}function i(e,t){var n=o.getLeadingCommentRanges(t,e.pos);if(!n)return null;var r=n.map(function(e){return t.substring(e.pos,e.end)}).join("\n"),i=r.indexOf("__$helperMethod__");if(i<0)return null;i+="__$helperMethod__".length;var a=r.indexOf("__$meta__");if(a<0)return{comment:f(r.substring(i))};var s=f(r.substring(i,a)),u=r.indexOf("{",a);if(u<0)return{comment:s};try{var l=JSON.parse(f(r.substring(u)));return l.comment=s.trim().length>0?s:null,l.override=l.override||!1,l.primary=l.primary||!1,l.deprecated=l.deprecated||!1,l}catch(e){console.log(e)}return{}}function a(e,t){var n,r=e.name.text,i=p.buildType(e.type,t),a=null!=e.questionToken;return null!=e.initializer&&(n=p.parseArg(e.initializer),a=!0),{name:r,type:i,defaultValue:n,optional:a}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(185),s=n(186),u=n(6),l=n(187),p=n(188),c=n(183);t.getHelperMethods=r;var f=function(e){return e.replace(/^\s*\/\*+/g,"").replace(/\*+\/\s*$/g,"").split("\n").map(function(e){return e.replace(/^\s*\/\//g,"").replace(/^\s*\* {0,1}/g,"")}).join("\n").trim()}},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE_185__},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(185);!function(e){function t(n,r){var i=r(n);if(i)return i==e.SKIP?null:i;var o=a.forEachChild(n,function(e){var n=t(e,r);if(n)return n});return o}function n(e,t){void 0===t&&(t=function(e){return!0});for(var n=e.split("."),r=null,a=0;a0&&null==n.path[n.path.length-1].arguments?(n.path[n.path.length-1].arguments=t.arguments,n.path[n.path.length-1]._callExpression=t,n):null}else if(e.kind==a.SyntaxKind.PropertyAccessExpression){var r=e,i=this.doMatch(r.expression);if(i)return r.name.kind==a.SyntaxKind.Identifier?(i.path.push(new T(r.name.text,r.name)),i):null}else if(e.kind==a.SyntaxKind.Identifier){var o=e;if(this.rootMatcher.doMatch(o))return new S(o.text,o)}return null},e.prototype.nodeType=function(){return null},e}();e.CallBaseMatcher=I,e.ident=i,e.anyNode=o,e.call=s,e.exprStmt=u,e.assign=l,e.varDecl=p,e.field=c,e.classDeclaration=f}(i=t.Matching||(t.Matching={}))},function(e,t){function n(e){return null}function r(e,t){}function i(e){return!1}function a(e){}function o(e){}function s(e){return{isDirectory:function(){return!1},isSymbolicLink:function(){return!1},isFile:function(){return!1}}}function u(e){return this.statSync(e)}function l(e,t){return[]}function p(e){}t.readFileSync=n,t.writeFileSync=r,t.existsSync=i,t.mkdirSync=a,t.readdirSync=o,t.statSync=s,t.lstatSync=u,t.list=l,t.onChange=p},function(e,t,n){"use strict";function r(e){return A.createSourceFile("sample.ts",e,A.ScriptTarget.ES3,!0)}function i(e,n,s){var u=r(e),l={classes:[],aliases:[],enumDeclarations:[],imports:{},name:s};n[s]=l;var p=null;return t.tsm.Matching.visit(u,function(r){if(r.kind==A.SyntaxKind.ModuleDeclaration){var u=r;p=u.name.text}if(r.kind==A.SyntaxKind.ImportEqualsDeclaration){var c=r,f=c.name.text;if("RamlWrapper"==f)return;var h=c.moduleReference,d=h.expression,m=d.text,v=E.resolve(E.dirname(s)+"/",m)+".ts";if(!E.existsSync(v))throw new Error("Path "+m+" resolve to "+v+"do not exists");if(!n[v]){var g=E.readFileSync(v);i(g,n,v)}l.imports[f]=n[v]}if(r.kind==A.SyntaxKind.TypeAliasDeclaration){var _=r;if(_.name){var N=_.name.text,I=y(_.type,s);l.aliases.push({name:N,type:I})}}if(r.kind==A.SyntaxKind.EnumDeclaration){var b=r,R=[];b.members&&b.members.forEach(function(e){R.push(e.name.text)}),b.name&&l.enumDeclarations.push({name:b.name.text,members:R})}var M=r.kind==A.SyntaxKind.InterfaceDeclaration,C=r.kind==A.SyntaxKind.ClassDeclaration;if(M||C){var w=r;if(w){var P={},L=T.classDecl(w.name.text,M);return L.moduleName=p,l.classes.push(L),w.members.forEach(function(t){if(t.kind==A.SyntaxKind.MethodDeclaration){var n=t,r=o(n,e,s);L.methods.push(r)}var i=S.doMatch(t);if(i){var u=a(i,s);if("$"==u.name)L.annotations=u.annotations;else if("$"!=u.name.charAt(0)||"$ref"==u.name)P[u.name]=u,L.fields.push(u);else{var l=u.name.substr(1),p=P[l];if(p)p.annotations=u.annotations;else if("$$"!=u.name){var c=L.annotationOverridings[l];c||(c=[]),L.annotationOverridings[l]=c.concat(u.annotations)}}}}),w.typeParameters&&w.typeParameters.forEach(function(e){L.typeParameters.push(e.name.text),null==e.constraint?L.typeParameterConstraint.push(null):L.typeParameterConstraint.push(e.constraint.typeName.text)}),w.heritageClauses&&w.heritageClauses.forEach(function(e){e.types.forEach(function(t){if(e.token==A.SyntaxKind.ExtendsKeyword)L.extends.push(y(t,s));else{if(e.token!=A.SyntaxKind.ImplementsKeyword)throw new Error("Unknown token class heritage");L.implements.push(y(t,s))}})}),t.tsm.Matching.SKIP}}}),l}function a(e,t){return{name:e.name.text,type:y(e.type,t),annotations:"$"==e.name.text.charAt(0)?l(e.initializer):[],valueConstraint:"$"!=e.name.text.charAt(0)?u(e.initializer):null,optional:null!=e.questionToken}}function o(e,t,n){var r=e.name.text,i=t.substring(e.pos,e.end),a=[];e.parameters.forEach(function(e){a.push(s(e,t,n))});var o={returnType:y(e.type,n),name:r,start:e.pos,end:e.end,text:i,arguments:a};return o}function s(e,t,n){var r=t.substring(e.pos,e.end);return{name:e.name.text,start:e.pos,end:e.end,text:r,type:y(e.type,n)}}function u(e){return null==e?null:e.kind==A.SyntaxKind.CallExpression?{isCallConstraint:!0,value:p(e)}:{isCallConstraint:!1,value:c(e)}}function l(e){if(null==e)return[];if(e.kind==A.SyntaxKind.ArrayLiteralExpression){var t=e,n=[];return t.elements.forEach(function(e){n.push(p(e))}),n}throw new Error("Only Array Literals supported now")}function p(e){if(e.kind==A.SyntaxKind.CallExpression){var t=e,n=f(t.expression),r={name:n,arguments:[]};return t.arguments.forEach(function(e){r.arguments.push(c(e))}),r}throw new Error("Only call expressions may be annotations")}function c(e){if(e.kind==A.SyntaxKind.StringLiteral){var t=e;return t.text}if(e.kind==A.SyntaxKind.NoSubstitutionTemplateLiteral){var n=e;return n.text}if(e.kind==A.SyntaxKind.ArrayLiteralExpression){var r=e,i=[];return r.elements.forEach(function(e){i.push(c(e))}),i}if(e.kind==A.SyntaxKind.TrueKeyword)return!0;if(e.kind==A.SyntaxKind.PropertyAccessExpression){var a=e;return c(a.expression)+"."+c(a.name)}if(e.kind==A.SyntaxKind.Identifier){var o=e;return o.text}if(e.kind==A.SyntaxKind.FalseKeyword)return!1;if(e.kind==A.SyntaxKind.NumericLiteral){var s=e;return Number(s.text)}if(e.kind==A.SyntaxKind.BinaryExpression){var u=e;if(u.operatorToken.kind=A.SyntaxKind.PlusToken)return c(u.left)+c(u.right)}throw new Error("Unknown value in annotation")}function f(e){if(e.kind==A.SyntaxKind.Identifier)return e.text;if(e.kind==A.SyntaxKind.PropertyAccessExpression){var t=e;return f(t.expression)+"."+f(t.name)}throw new Error("Only simple identifiers are supported now")}function h(e,t){var n=e.indexOf("."),r=n!=-1?e.substring(0,n):"",i=n!=-1?e.substring(n+1):e;return{typeName:e,nameSpace:r,basicName:i,typeKind:_.TypeKind.BASIC,typeArguments:[],modulePath:t}}function d(e){return{base:e,typeKind:_.TypeKind.ARRAY}}function m(e){return{options:e,typeKind:_.TypeKind.UNION}}function y(e,t){if(null==e)return null;if(e.kind==A.SyntaxKind.StringKeyword)return h("string",null);if(e.kind==A.SyntaxKind.NumberKeyword)return h("number",null);if(e.kind==A.SyntaxKind.BooleanKeyword)return h("boolean",null);if(e.kind==A.SyntaxKind.AnyKeyword)return h("any",null);if(e.kind==A.SyntaxKind.VoidKeyword)return h("void",null);if(e.kind==A.SyntaxKind.TypeReference){var n=e,r=h(g(n.typeName),t);return n.typeArguments&&n.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}if(e.kind==A.SyntaxKind.ArrayType){var i=e;return d(y(i.elementType,t))}if(e.kind==A.SyntaxKind.UnionType){var a=e;return m(a.types.map(function(e){return y(e,t)}))}if(e.kind==A.SyntaxKind.ExpressionWithTypeArguments){var o=e,r=h(v(o.expression),t);return o.typeArguments&&o.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}throw new Error("Case not supported: "+e.kind)}function v(e){return e.name?e.name.text:e.text}function g(e){if(e.kind==A.SyntaxKind.Identifier)return e.text;var t=e;return g(t.left)+"."+g(t.right)}Object.defineProperty(t,"__esModule",{value:!0});var A=n(185);t.tsm=n(186),t.helperMethodExtractor=n(184);var E=n(189),_=n(182),T=n(182),S=t.tsm.Matching.field();t.parseStruct=i,t.parseArg=c,t.buildType=y},function(e,t,n){"use strict";function r(e,t){return s.resolve(e,t)}function i(e){return u.readFileSync(e).toString()}function a(e){return s.dirname(e)}function o(e){return u.existsSync(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),u=n(187);t.resolve=r,t.readFileSync=i,t.dirname=a,t.existsSync=o},function(e,t,n){var r,i;(function(e,n){!function(){var a="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=a._,s=Array.prototype,u=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,p=s.push,c=s.slice,f=u.toString,h=u.hasOwnProperty,d=Array.isArray,m=Object.keys,y=Object.create,v=function(){},g=function(e){return e instanceof g?e:this instanceof g?void(this._wrapped=e):new g(e)};"undefined"==typeof t||t.nodeType?a._=g:("undefined"!=typeof n&&!n.nodeType&&n.exports&&(t=n.exports=g),t._=g),g.VERSION="1.9.1";var A,E=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return g.iteratee!==A?g.iteratee(e,t):null==e?g.identity:g.isFunction(e)?E(e,t,n):g.isObject(e)&&!g.isArray(e)?g.matcher(e):g.property(e)};g.iteratee=A=function(e,t){return _(e,t,1/0)};var T=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i=0&&t<=R};g.each=g.forEach=function(e,t,n){t=E(t,n);var r,i;if(C(e))for(r=0,i=e.length;r0?0:o-1;for(i||(r=t[a?a[s]:s],s+=e);s>=0&&s=3;return t(e,E(n,i,4),r,a)}};g.reduce=g.foldl=g.inject=w(1),g.reduceRight=g.foldr=w(-1),g.find=g.detect=function(e,t,n){var r=C(e)?g.findIndex:g.findKey,i=r(e,t,n);if(void 0!==i&&i!==-1)return e[i]},g.filter=g.select=function(e,t,n){var r=[];return t=_(t,n),g.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},g.reject=function(e,t,n){return g.filter(e,g.negate(_(t)),n)},g.every=g.all=function(e,t,n){t=_(t,n);for(var r=!C(e)&&g.keys(e),i=(r||e).length,a=0;a=0},g.invoke=T(function(e,t,n){var r,i;return g.isFunction(t)?i=t:g.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),g.map(e,function(e){var a=i;if(!a){if(r&&r.length&&(e=b(e,r)),null==e)return;a=e[t]}return null==a?a:a.apply(e,n)})}),g.pluck=function(e,t){return g.map(e,g.property(t))},g.where=function(e,t){return g.filter(e,g.matcher(t))},g.findWhere=function(e,t){return g.find(e,g.matcher(t))},g.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sa&&(a=r)}else t=_(t,n),g.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},g.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=C(e)?e:g.values(e);for(var s=0,u=e.length;sr||void 0===n)return 1;if(n0?0:i-1;a>=0&&a0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(c.call(r,o,s),g.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&at?(r&&(clearTimeout(r),r=null),s=l,o=e.apply(i,a),r||(i=a=null)):r||n.trailing===!1||(r=setTimeout(u,p)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l},g.debounce=function(e,t,n){var r,i,a=function(t,n){r=null,n&&(i=e.apply(t,n))},o=T(function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,t),s&&(i=e.apply(this,o))}else r=g.delay(a,t,this,o);return i});return o.cancel=function(){clearTimeout(r),r=null},o},g.wrap=function(e,t){return g.partial(t,e)},g.negate=function(e){return function(){return!e.apply(this,arguments)}},g.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},g.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},g.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},g.once=g.partial(g.before,2),g.restArguments=T;var k=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=F.length,r=e.constructor,i=g.isFunction(r)&&r.prototype||u,a="constructor";for(I(e,a)&&!g.contains(t,a)&&t.push(a);n--;)a=F[n],a in e&&e[a]!==i[a]&&!g.contains(t,a)&&t.push(a)};g.keys=function(e){if(!g.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)I(e,n)&&t.push(n);return k&&B(e,t),t},g.allKeys=function(e){if(!g.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&B(e,t),t},g.values=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=E(r,t[1])),t=g.allKeys(e)):(r=K,t=O(t,!1,!1),e=Object(e));for(var i=0,a=t.length;i1&&(n=t[1])):(t=g.map(O(t,!1,!1),String),r=function(e,n){return!g.contains(t,n)}),g.pick(e,r,n)}),g.defaults=V(g.allKeys,!0),g.create=function(e,t){var n=S(e);return t&&g.extendOwn(n,t),n},g.clone=function(e){return g.isObject(e)?g.isArray(e)?e.slice():g.extend({},e):e},g.tap=function(e,t){return t(e),e},g.isMatch=function(e,t){var n=g.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a":">",'"':""","'":"'","`":"`"},q=g.invert(Y),G=function(e){var t=function(t){return e[t]},n="(?:"+g.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};g.escape=G(Y),g.unescape=G(q),g.result=function(e,t,n){g.isArray(t)||(t=[t]);var r=t.length;if(!r)return g.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var z=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+$[e]};g.template=function(e,t,n){!t&&n&&(t=n),t=g.defaults({},t,g.templateSettings);var r=RegExp([(t.escape||z).source,(t.interpolate||z).source,(t.evaluate||z).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(J,Q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";var o;try{o=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return o.call(this,e,g)},u=t.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},g.chain=function(e){var t=g(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?g(t).chain():t};g.mixin=function(e){return g.each(g.functions(e),function(t){var n=g[t]=e[t];g.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),Z(this,n.apply(g,e))}}),g},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];g.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),g.each(["concat","join","slice"],function(e){var t=s[e];g.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return String(this._wrapped)},r=[],i=function(){return g}.apply(t,r),!(void 0!==i&&(n.exports=i))}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){"use strict";function r(e,t){"MetaModel.declaresSubTypeOf"==e.name&&t.getAdapter(u.RAMLService).setExtendedTypeName(e.arguments[0]),"MetaModel.nameAtRuntime"==e.name&&t.setNameAtRuntime(e.arguments[0]),"MetaModel.description"==e.name&&t.withDescription(e.arguments[0]),"MetaModel.inlinedTemplates"==e.name&&t.getAdapter(u.RAMLService).setInlinedTemplates(!0),"MetaModel.requireValue"==e.name&&t.getAdapter(u.RAMLService).withContextRequirement(""+e.arguments[0],""+e.arguments[1]),"MetaModel.referenceIs"==e.name&&t.getAdapter(u.RAMLService).withReferenceIs(""+e.arguments[0]),"MetaModel.actuallyExports"==e.name&&t.getAdapter(u.RAMLService).withActuallyExports(""+e.arguments[0]),"MetaModel.convertsToGlobalOfType"==e.name&&t.getAdapter(u.RAMLService).withConvertsToGlobal(""+e.arguments[0]),"MetaModel.allowAny"==e.name&&t.getAdapter(u.RAMLService).withAllowAny(),"MetaModel.allowQuestion"==e.name&&t.getAdapter(u.RAMLService).withAllowQuestion(),"MetaModel.alias"==e.name&&t.getAdapter(u.RAMLService).addAlias(""+e.arguments[0]),"MetaModel.consumesRefs"==e.name&&t.getAdapter(u.RAMLService).setConsumesRefs(!0),"MetaModel.canInherit"==e.name&&t.getAdapter(u.RAMLService).withCanInherit(""+e.arguments[0]),"MetaModel.definingPropertyIsEnough"==e.name&&t.getAdapter(u.RAMLService).definingPropertyIsEnough(""+e.arguments[0]),"MetaModel.customHandling"==e.name&&t.setCustom(!0),"MetaModel.superclasses"==e.name&&t.getAdapter(u.RAMLService).registerSupertypes(e.arguments[0]),"MetaModel.possibleInterfaces"==e.name&&t.getAdapter(u.RAMLService).registerPossibleInterfaces(e.arguments[0])}function i(e,n){t.annotationHandlers[n.name](n,e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(56),o=n(192),s=n(190),u=a;t.handleTypeAnnotation=r,t.annotationHandlers={key:function(e,t){t.withFromParentKey(),t.withKey(!0)},value:function(e,t){t.withFromParentValue()},canBeValue:function(e,t){t.withCanBeValue()},unmerged:function(e,t){t.unmerge()},startFrom:function(e,t){t.withKeyRestriction(e.arguments[0]),t.merge()},oneOf:function(e,t){t.withEnumOptions(e.arguments[0])},oftenKeys:function(e,t){t.withOftenKeys(e.arguments[0])},embeddedInMaps:function(e,t){t.getAdapter(u.RAMLPropertyParserService).withEmbedMap()},system:function(e,t){t.getAdapter(u.RAMLPropertyParserService).withSystem(!0)},required:function(e,t){"false"!=e.arguments[0]&&e.arguments[0]!==!1&&t.withRequired(!0)},noDirectParse:function(e,t){"false"!=e.arguments[0]&&e.arguments[0]!==!1&&t.withNoDirectParse()},setsContextValue:function(e,t){t.addChildValueConstraint(new a.ChildValueConstraint(""+e.arguments[0],""+e.arguments[1]))},defaultValue:function(e,t){t.setDefaultVal(""+e.arguments[0])},defaultIntegerValue:function(e,t){t.setDefaultIntegerVal(e.arguments[0])},defaultBooleanValue:function(e,t){t.setDefaultBooleanVal(e.arguments[0])},facetId:function(e,t){"minItems"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Array){var n=Number.parseInt(""+t.value());if(n>e.length)return"array should contain at least "+t.value()+" items"}return null}),"enum"==e.arguments[0]&&t.setFacetValidator(function(e,t){var n=e+"",r=t;try{if(!r.some(function(e){return e==n}))return"value should be one of :"+r.join(",")}catch(e){return}return null}),"maxItems"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Array){var n=Number.parseInt(""+t);if(nObject.keys(e).length)return"object should contain at least "+t.value()+" properties"}return null}),"maxProperties"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Object){var n=Number.parseInt(""+t);if(ne.length)return"string length should be at least "+n}return null}),"maxLength"==e.arguments[0]&&t.setFacetValidator(function(e,t){if("number"!=typeof e&&"boolean"!=typeof e||(e=""+e),"string"==typeof e){var n=Number.parseInt(""+t);if(ne)return"value should be not less then "+n}return null}),"maximum"==e.arguments[0]&&t.setFacetValidator(function(e,t){if("string"==typeof e&&(e=parseFloat(e)),"number"==typeof e){var n=parseFloat(t);if(n0?n[0].value(e):this._originalNode.value(e),g.isInstance(t)){var r=t.key();if(r)for(var i=this;1==i.children().length&&(i.kind()==a.Kind.MAPPING||i.kind()==a.Kind.MAP||i.kind()==a.Kind.SEQ);)if(i=i.children()[0],i.originalNode().key()==r){t=i;break}this._valueOverride=t}return t},t.prototype.patchAdoptedNodes=function(e){var t=this;this._adoptedNodes=[],e.forEach(function(e){return t.adopt(e.node,e.transformer)}),this._adoptedNodes.length>0&&(this._originalNode=this._adoptedNodes[0]),this.resetChildren()},t.prototype.children=function(){var e=this;if(this._children)return this._children;for(var n=[],r=!1,i=!1,o=0,s=this._adoptedNodes;o0&&(i=!0,l[0].key()&&this.originalNode().valueKind()!=a.Kind.SEQ&&(r=!0)),r&&i)break}if(r)n=this.collectChildrenWithKeys();else if(i){n=this.collectChildrenWithKeys();var p={};this._adoptedNodes.forEach(function(r){return r.children().filter(function(e){return!e.key()}).forEach(function(i){var a=r==e.primaryNode(),o=e.buildKey(i);if(a||!p[o]){p[o]=!0;var s=r.transformer()?r.transformer():e.transformer(),u=g.isInstance(i)?i.originalNode():i;n.push(new t(u,e,s,e.ramlVersion,a))}})})}else n=[];return this._children=n,this._preserveAnnotations&&this._children.forEach(function(e){return e.preserveAnnotations()}),n},t.prototype.buildKey=function(e){var t=o.serialize(e),n=this.nodeDefinition();if(n&&(n.key()==p.Universe08.TraitRef||n.key()==p.Universe08.ResourceTypeRef||n.key()==p.Universe10.TraitRef||n.key()==p.Universe10.ResourceTypeRef)&&t&&"object"==typeof t){var r=Object.keys(t);r.length>0&&(t=r[0])}return null==t?"":s(t)},t.prototype.collectChildrenWithKeys=function(){for(var e=this,n=[],r={},i=0,a=this._adoptedNodes;i=0;if(a.forEach(function(t){var n=t.node.optional()&&("RAML10"!=e.ramlVersion||v&&u);o=o&&n,s=s||t.isPrimary}),s){var l=[];a.filter(function(e){return e.isPrimary}).forEach(function(n){var r=n.transformer?n.transformer:e.transformer();l.push(new t(n.node,e,r,e.ramlVersion,!0))});var p=l[0];a.filter(function(e){return!e.isPrimary}).forEach(function(e){p.adopt(e.node,e.transformer)}),l.forEach(function(e){return n.push(e)})}else if(!o){for(var c=a[0].transformer?a[0].transformer:e.transformer(),p=new t(a[0].node,e,c,e.ramlVersion,!1),f=1;f=0?this._children[o]=a:this._children.push(a),a},t.prototype.removeChild=function(e){if(this._children&&null!=e){var t=this._children.indexOf(e);if(t>=0){for(var n=t;n="0"&&r<="9";)t+=r,u();if("."===r)for(t+=".";u()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,u(),"-"!==r&&"+"!==r||(t+=r,u());r>="0"&&r<="9";)t+=r,u();return e=+t,isFinite(e)?e:void s("Bad number")},p=function(){var e,t,n,i="";if('"'===r)for(;u();){if('"'===r)return u(),i;if("\\"===r)if(u(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if("string"!=typeof o[r])break;i+=o[r]}else i+=r}s("Bad string")},c=function(){for(;r&&r<=" ";)u()},f=function(){switch(r){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}s("Unexpected '"+r+"'")},h=function(){var e=[];if("["===r){if(u("["),c(),"]"===r)return u("]"),e;for(;r;){if(e.push(a()),c(),"]"===r)return u("]"),e;u(","),c()}}s("Bad array")},d=function(){var e,t={};if("{"===r){if(u("{"),c(),"}"===r)return u("}"),t;for(;r;){if(e=p(),c(),u(":"),Object.hasOwnProperty.call(t,e)&&s('Duplicate key "'+e+'"'),t[e]=a(),c(),"}"===r)return u("}"),t;u(","),c()}}s("Bad object")};a=function(){switch(c(),r){case"{":return d();case"[":return h();case'"':return p();case"-":return l();default:return r>="0"&&r<="9"?l():f()}},e.exports=function(e,t){var o;return i=e,n=0,r=" ",o=a(),c(),r&&s("Syntax error"),"function"==typeof t?function e(n,r){var i,a,o=n[r];if(o&&"object"==typeof o)for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(a=e(o,i),void 0!==a?o[i]=a:delete o[i]);return t.call(n,r,o)}({"":o},""):o}},function(e,t){function n(e){return s.lastIndex=0,s.test(e)?'"'+e.replace(s,function(e){var t=u[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function r(e,t){var s,u,l,p,c,f=i,h=t[e];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(e)),"function"==typeof o&&(h=o.call(t,e,h)),typeof h){case"string":return n(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(i+=a,c=[],"[object Array]"===Object.prototype.toString.apply(h)){for(p=h.length,s=0;s=0;i=e.indexOf("<<",r)){if(t+=e.substring(r,i),r=e.indexOf(">>",i),r<0)return{status:S.ERROR};r+=">>".length;var a=e.substring(i,r),o=N+i+N;n[o]=a,t+=o}return 0==t.length?{status:S.NOT_REQUIRED}:(t+=e.substring(r,e.length),{resultingString:t,substitutions:n,status:S.OK})}function i(e,t){if(null==e)return{status:S.NOT_REQUIRED};for(var n="",r=0,i=e.indexOf(N);i>=0;i=e.indexOf(N,r)){if(n+=e.substring(r,i),r=e.indexOf(N,i+1),r<0)return{status:S.ERROR};r+=N.length;var a=e.substring(i,r),o=t[a];if(null==o)return{status:S.ERROR};n+=o}return 0==n.length?{status:S.NOT_REQUIRED}:(n+=e.substring(r,e.length),{resultingString:n,substitutions:t,status:S.OK})}function a(e){var t=!1;if(!e)return!1;if("?"==e.charAt(e.length-1))t=!0;else for(var n=0;n=0&&(i=e.substring(0,o),a=e.substring(o+1));for(var s,u=!1,l=n.length;l>0;l--){var p=n[l-1],c=p.highLevel();if(c.isElement()&&_.isLibraryType(c.asElement().definition())){if(u)break;u=!0}var f=p;if(i){f=null;var h=r.nsMap(p);if(h){var d=h[i];d&&(f=d.unit)}}if(f){var m=f.highLevel();if(m&&m.isElement()&&(s=T.find(m.asElement().elementsOfKind(t),function(e){return e.name()==a})))break}}return s}function f(e){var t=e.indexOf("<<");if(t<0)return!1;if(0!=t)return!0;var n=e.indexOf(">>",t);return n+">>".length!=e.length}function h(e){var t,n=e.getExtra("SOURCE");if(m.LowLevelWrapperForTypeSystem.isInstance(n))t=n.node();else if(m.ASTNodeImpl.isInstance(n))t=n.lowLevel();else if(v.ASTNode.isInstance(n)||A.LowLevelProxyNode.isInstance(n)||g.AstNode.isInstance(n));if(!t)return null;var r=t.unit();return r}Object.defineProperty(t,"__esModule",{value:!0});var d,m=n(55),y=n(21),v=n(4),g=n(20),A=n(198),E=n(203),T=n(16),_=n(204);!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.PATH=1]="PATH"}(d=t.PatchMode||(t.PatchMode={}));var S;!function(e){e[e.OK=0]="OK",e[e.NOT_REQUIRED=1]="NOT_REQUIRED",e[e.ERROR=2]="ERROR"}(S=t.ParametersEscapingStatus||(t.ParametersEscapingStatus={}));var N="__P_A_R_A_M_E_T_E_R__";t.escapeTemplateParameters=r,t.unescapeTemplateParameters=i,t.checkExpression=a,t.patchMethodIs=s,t.prepareTraitRefNode=u,t.toOriginal=l;var I=function(){function e(e,t,n,r,i,a){this._namespace=e,this._name=t,this._collectionName=n,this._referencedUnit=r,this._isChained=i,this._mode=a,this.gotQuestion=!1;var o=this._name.length;"string"!=typeof this._name&&(this._name=""+this._name),this._name&&"?"==this._name.charAt(o-1)&&(this.gotQuestion=!0,this._name=this._name.substring(0,o-1))}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&T.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER_PatchedReference)},e.prototype.getClassIdentifier=function(){return[e.CLASS_IDENTIFIER_PatchedReference]},e.prototype.namespace=function(){return this._namespace},e.prototype.name=function(){return this._name},e.prototype.collectionName=function(){return this._collectionName},e.prototype.referencedUnit=function(){return this._referencedUnit},e.prototype.mode=function(){return this._mode},e.prototype.value=function(){if(null==this._namespace)return this._name;var e=this._mode==d.PATH?"/":".";return this._namespace+e+this._name+(this.gotQuestion?"?":"")},e.prototype.isChained=function(){return this._isChained},e.CLASS_IDENTIFIER_PatchedReference="referencePatcher.PatchedReference",e}();t.PatchedReference=I,t.instanceOfPatchedReference=p;(function(){function e(e){this.name=e,this.array=[]}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&T.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.CLASS_IDENTIFIER="referencePatcher.ElementsCollection",e})(),function(){function e(e){this.unit=e}return e}();t.getDeclaration=c,t.isCompoundValue=f;t.typeUnit=h},function(e,t){e.exports={34:{code:"34",message:""},INVALID_PARAMETER_NAME:{code:"INVALID_PARAMETER_NAME",message:"Invalid parameter name: '{{paramName}}' is reserved"},UNUSED_PARAMETER:{code:"UNUSED_PARAMETER",message:"Unused parameter: '{{paramName}}'"},UNUSED_PARAMETER_MISSING_SEPARATING_SPACE:{code:"UNUSED_PARAMETER_MISSING_SEPARATING_SPACE",message:"Unused parameter: '{{paramName}}'. Probably, separating space is missing after colon and supposed mapping is '{{correctMapping}}'"},INVALID_PROPERTY_OWNER_TYPE:{code:"INVALID_PROPERTY_OWNER_TYPE",message:"Property '{{propName}}' can only be used if type is {{namesStr}}"},NODE_KEY_IS_A_MAP:{code:"NODE_KEY_IS_A_MAP",message:"Node key can not be a map"},NODE_KEY_IS_A_SEQUENCE:{code:"NODE_KEY_IS_A_SEQUENCE",message:"Node key can not be a sequence"},SEQUENCE_REQUIRED:{code:"SEQUENCE_REQUIRED",message:"Node: '{{name}}' should be wrapped in sequence"},PROPERTY_MUST_BE_A_MAP_10:{code:"PROPERTY_MUST_BE_A_MAP_10",message:"'{{propName}}' should be a map in RAML 1.0"},PROPERTY_MUST_BE_A_MAP:{code:"PROPERTY_MUST_BE_A_MAP",message:"Property '{{propName}}' should be a map"},PROPERTY_MUST_BE_A_SEQUENCE:{code:"PROPERTY_MUST_BE_A_SEQUENCE",message:"Property '{{propName}}' should be a sequence"},INVALID_PROPERTY_RANGE:{code:"INVALID_PROPERTY_RANGE",message:"Property '{{propName}}' must be a {{range}}"},MAP_REQUIRED:{code:"MAP_REQUIRED",message:"should be a map in RAML 1.0"},UNRESOLVED_REFERENCE:{code:"UNRESOLVED_REFERENCE",message:"Reference: '{{ref}}' can not be resolved"},SCALAR_PROHIBITED:{code:"SCALAR_PROHIBITED",message:"Property '{{propName}}' can not have scalar value"},UNKNOWN_NODE:{code:"UNKNOWN_NODE",message:"Unknown node: '{{name}}'"},INVALID_PROPERTY_USAGE:{code:"INVALID_PROPERTY_USAGE",message:"{{ramlVersion}} does not allow using '{{propName}}' property within {{typeName | !pluralize |!sentencecase | !lowercase}}"},INVALID_SUBRESOURCE_USAGE:{code:"INVALID_SUBRESOURCE_USAGE",message:"Subresources are not allowed in {{typeName | !pluralize |!sentencecase | !lowercase}}"},INVALID_METHOD_USAGE:{code:"INVALID_METHOD_USAGE",message:"Declaring methods is not allowed in {{typeName | !pluralize |!sentencecase | !lowercase}}"},RECURSIVE_DEFINITION:{code:"RECURSIVE_DEFINITION",message:"Recursive definition: '{{name}}'"},QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE:{code:"QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE",message:"'queryString' and 'queryParameters' properties are mutually exclusive. '{{propName}}' is already specified."},ISSUES_IN_THE_LIBRARY:{code:"ISSUES_IN_THE_LIBRARY",message:"Issues in the used library: '{{value}}'"},INVALID_LIBRARY_PATH:{code:"INVALID_LIBRARY_PATH",message:"Can not resolve library from path: '{{path}}'"},EMPTY_FILE:{code:"EMPTY_FILE",message:"Empty file: {{path}}"},SPACES_IN_KEY:{code:"SPACES_IN_KEY",message:"Keys should not have spaces '{{value}}'"},INCLUDE_ERROR:{code:"INCLUDE_ERROR",message:"{{msg}}"},PATH_EXCEEDS_ROOT:{code:"PATH_EXCEEDS_ROOT",message:"Resolved include path exceeds file system root"},ILLEGAL_PATTERN:{code:"ILLEGAL_PATTERN",message:"Illegal pattern: '{{value}}'"},UNKNOWN_FUNCTION:{code:"UNKNOWN_FUNCTION",message:"Unknown function applied to parameter: '{{transformerName}}'"},REQUEST_BODY_DISABLED:{code:"REQUEST_BODY_DISABLED",message:"Request body is disabled for '{{methodName}}' method."},SCALAR_EXPECTED:{code:"SCALAR_EXPECTED",message:"Scalar is expected here"},UNKNOWN_ANNOTATION:{code:"UNKNOWN_ANNOTATION",message:"Unknown annotation: '{{aName}}'"},SECUREDBY_LIST_08:{code:"SECUREDBY_LIST_08",message:"'securedBy' should be a list in RAML08"},INVALID_ANNOTATION_LOCATION:{code:"INVALID_ANNOTATION_LOCATION",message:"Annotation '{{aName}}' can not be placed at this location, allowed targets are: {{aValues}}"},BOOLEAN_EXPECTED:{code:"BOOLEAN_EXPECTED",message:"'true' or 'false' is expected here"},NUMBER_EXPECTED:{code:"NUMBER_EXPECTED",message:"Value of '{{propName}}' must be a number"},STATUS_MUST_BE_3NUMBER:{code:"STATUS_MUST_BE_3NUMBER",message:"Status code should be 3 digits number."},EMPTY_VALUE_NOT_ALLOWED:{code:"EMPTY_VALUE_NOT_ALLOWED",message:"Empty value is not allowed here"},INVALID_VALUE_SCHEMA:{code:"INVALID_VALUE_SCHEMA",message:"Invalid value schema: '{{iValue}}'"},INVALID_VALUE:{code:"INVALID_VALUE",message:"Invalid value: '{{iValue}}'. Allowed values are: {{aValues}}"},SCHEMA_EXCEPTION:{code:"SCHEMA_EXCEPTION",message:"Schema exception: {{msg}}"},SCHEMA_ERROR:{code:"SCHEMA_ERROR",message:"{{msg}}"},MISSING_VERSION:{code:"MISSING_VERSION",message:"Missing 'version'"},URI_PARAMETER_NAME_MISSING:{code:"URI_PARAMETER_NAME_MISSING",message:"URI parameter must have name specified"},URI_EXCEPTION:{code:"URI_EXCEPTION",message:"{{msg}}"},INVALID_MEDIATYPE:{code:"INVALID_MEDIATYPE",message:"Invalid media type '{{mediaType}}'"},MEDIATYPE_EXCEPTION:{code:"MEDIATYPE_EXCEPTION",message:"{{msg}}"},FORM_IN_RESPONSE:{code:"FORM_IN_RESPONSE",message:"Form related media types can not be used in responses"},UNUSED_URL_PARAMETER:{code:"UNUSED_URL_PARAMETER",message:"Unused url parameter {{paramName}}"},UNRECOGNIZED_ELEMENT:{code:"UNRECOGNIZED_ELEMENT",message:"Unrecognized {{referencedToName}}: '{{ref}}'."},TYPES_VARIETY_RESTRICTION:{code:"TYPES_VARIETY_RESTRICTION",message:"Type can be either of: string, number, integer, file, date or boolean"},UNRECOGNIZED_SECURITY_SCHEME:{code:"UNRECOGNIZED_SECURITY_SCHEME",message:"Unrecognized security scheme type: '{{ref}}'. Allowed values are: 'OAuth 1.0', 'OAuth 2.0', 'Basic Authentication', 'DigestSecurityScheme Authentication', 'x-{other}'"},DUPLICATE_TRAIT_REFERENCE:{code:"DUPLICATE_TRAIT_REFERENCE",message:"Duplicate trait reference: '{{refValue}}'."},IS_IS_ARRAY:{code:"IS_IS_ARRAY",message:"Property 'is' must be an array"},RESOURCE_TYPE_NAME:{code:"RESOURCE_TYPE_NAME",message:"Resource type name must be provided"},MULTIPLE_RESOURCE_TYPES:{code:"MULTIPLE_RESOURCE_TYPES",message:"A resource or resourceType can inherit from a single resourceType"},UNKNOWN_RAML_VERSION:{code:"UNKNOWN_RAML_VERSION",message:"Unknown version of RAML expected to see one of '#%RAML 0.8' or '#%RAML 1.0'"},UNKNOWN_TOPL_LEVEL_TYPE:{code:"UNKNOWN_TOPL_LEVEL_TYPE",message:"Unknown top level type: '{{typeName}}'"},REDUNDANT_FRAGMENT_NAME:{code:"REDUNDANT_FRAGMENT_NAME",message:"Redundant fragment name: '{{typeName}}'"},CONTEXT_REQUIREMENT_VIOLATION:{code:"CONTEXT_REQUIREMENT_VIOLATION",message:"{{v1}} should be {{v2}} to use type {{v3}}"},WEB_FORMS:{code:"WEB_FORMS",message:"File type can be only used in web forms"},MISSING_REQUIRED_PROPERTY:{code:"MISSING_REQUIRED_PROPERTY",message:"Missing required property '{{propName}}'"},VALUE_FOR_REQUIRED_PROPERTY_NOT_PROVIDED:{code:"VALUE_FOR_REQUIRED_PROPERTY_NOT_PROVIDED",message:"Value is not provided for required property '{{propName}}'"},VALUE_NOT_PROVIDED:{code:"VALUE_NOT_PROVIDED",message:"Value is not provided for parameter: '{{propName}}'"},SUSPICIOUS_DOUBLEQUOTE:{code:"SUSPICIOUS_DOUBLEQUOTE",message:'Suspicious double quoted multiline scalar, it is likely that you forgot closing "{{value}}'},ANNOTATION_TARGET_MUST_BE_A_STRING:{code:"ANNOTATION_TARGET_MUST_BE_A_STRING",message:"Annotation target must be set by a string"},ALLOWED_TARGETS_MUST_BE_ARRAY:{code:"ALLOWED_TARGETS_MUST_BE_ARRAY",message:"'allowedTargets' property value must be an array of type names or a single type name"},UNSUPPORTED_ANNOTATION_TARGET:{code:"UNSUPPORTED_ANNOTATION_TARGET",message:"Unsupported annotation target: '{{aTarget}}'"},SCHEMA_NAME_MUST_BE_STRING:{code:"SCHEMA_NAME_MUST_BE_STRING",message:"Schema '{{name}}' must be a string"},FORM_PARAMS_IN_RESPONSE:{code:"FORM_PARAMS_IN_RESPONSE",message:"Form parameters can not be used in response"},FORM_PARAMS_WITH_EXAMPLE:{code:"FORM_PARAMS_WITH_EXAMPLE",message:"'formParameters' property cannot be used together with the 'example' or 'schema' properties"},AUTHORIZATION_GRANTS_ENUM:{code:"AUTHORIZATION_GRANTS_ENUM",message:"'authorizationGrants' value should be one of 'authorization_code', 'implicit', 'password', 'client_credentials' or to be an abolute URI"},AUTHORIZATION_URI_REQUIRED:{code:"AUTHORIZATION_URI_REQUIRED",message:"'authorizationUri' is required when `authorization_code` or `implicit` grant type are used "},REPEATING_COMPONENTS_IN_ENUM:{code:"REPEATING_COMPONENTS_IN_ENUM",message:"'enum' value contains repeating components"},INTEGER_EXPECTED:{code:"INTEGER_EXPECTED",message:"Integer is expected"},NUMBER_EXPECTED_2:{code:"NUMBER_EXPECTED_2",message:"Number is expected"},RESOURCE_TYPE_NULL:{code:"RESOURCE_TYPE_NULL",message:"Resource type can not be null"},SCALAR_PROHIBITED_2:{code:"SCALAR_PROHIBITED_2",message:"Node '{{name}}' can not be a scalar"},VERSION_NOT_ALLOWED:{code:"VERSION_NOT_ALLOWED",message:"'version' parameter not allowed here",comment:"I dont like the message, but its coming from JS 0.8 parser @Denis"},INVALID_OVERLAY_NODE:{code:"INVALID_OVERLAY_NODE",message:"The '{{nodeId}}' node does not match any node of the master api."},INVALID_OVERRIDE_IN_OVERLAY:{code:"INVALID_OVERRIDE_IN_OVERLAY",message:"Property '{{propName}}' is not allowed to be overriden or added in overlays"},KEYS_SHOULD_BE_UNIQUE:{code:"KEYS_SHOULD_BE_UNIQUE",message:"Keys should be unique"},ALREADY_EXISTS:{code:"ALREADY_EXISTS",message:"{{capitalized}} '{{name}}' already exists"},ALREADY_EXISTS_IN_CONTEXT:{code:"ALREADY_EXISTS_IN_CONTEXT",message:"{{name}}' already exists in this context"},PROPERTY_USED:{code:"PROPERTY_USED",message:"Property already used: '{{propName}}'"},PARENT_PROPERTY_USED:{code:"PARENT_PROPERTY_USED",message:"{{parent}} property already used: '{{propName}}'"},INVALID_JSON_SCHEMA:{code:"INVALID_JSON_SCHEMA",message:"Invalid JSON schema. Unexpected value '{{propName}}'"},EXAMPLE_SCHEMA_FAILURE:{code:"EXAMPLE_SCHEMA_FAILURE",message:"Example does not conform to schema: {{msg}}"},CAN_NOT_PARSE_JSON:{code:"CAN_NOT_PARSE_JSON",message:"Can not parse JSON: {{msg}}"},CAN_NOT_PARSE_XML:{code:"CAN_NOT_PARSE_XML",message:"Can not parse XML: {{msg}}"},OPTIONAL_SCLARAR_PROPERTIES_10:{code:"OPTIONAL_SCLARAR_PROPERTIES_10",message:"Optional scalar properties are not allowed in {{templateName|!pluralize|!sentencecase|!lowercase}} and their descendants: '{{propName}}?'"},OPTIONAL_PROPERTIES_10:{code:"OPTIONAL_PROPERTIES_10",message:"Optional properties are not allowed in '{{propName|!pluralize|!sentencecase|!lowercase}}': '{{oPropName}}'"},ONLY_METHODS_CAN_BE_OPTIONAL:{code:"ONLY_METHODS_CAN_BE_OPTIONAL",message:"Only method nodes can be optional"},PROPERTY_UNUSED:{code:"PROPERTY_UNUSED",message:"{{propName}} unused"},CYCLE_IN_DEFINITION:{code:"CYCLE_IN_DEFINITION",message:"{{typeName}} definition contains cycle: {{cycle}}"},SEQUENCE_NOT_ALLOWED_10:{code:"SEQUENCE_NOT_ALLOWED_10",message:"In RAML 1.0 {{propName|!singularize|!sentencecase|!lowercase}} is not allowed to have sequence as definition"},MAP_EXPECTED:{code:"MAP_EXPECTED",message:"Map is expected here"},ERROR_IN_INCLUDED_FILE:{code:"ERROR_IN_INCLUDED_FILE",message:"Error in the included file: {{msg}}"},NODE_SHOULD_HAVE_VALUE:{code:"NODE_SHOULD_HAVE_VALUE",message:"node should have at least one member value"},NAMED_PARAMETER_NEEDS_TYPE:{code:"NAMED_PARAMETER_NEEDS_TYPE",message:"named parameter needs at least one type"},ENUM_IS_EMPTY:{code:"ENUM_IS_EMPTY",message:"enum is empty"},ENUM_MUST_BE_AN_ARRAY:{code:"ENUM_MUST_BE_AN_ARRAY",message:"the value of enum must be an array"},DEFINITION_SHOULD_BE_A_MAP:{code:"DEFINITION_SHOULD_BE_A_MAP",message:"{{typeName}} definition should be a map"},RESOURCES_SHARE_SAME_URI:{code:"RESOURCES_SHARE_SAME_URI",message:"Resources share same URI"},TYPES_AND_SCHEMAS_ARE_EXCLUSIVE:{code:"TYPES_AND_SCHEMAS_ARE_EXCLUSIVE",message:"'types' and 'schemas' are mutually exclusive"},TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS:{code:"TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS",message:"Trait or resource type parameter name must contain non whitespace characters"},INVALID_SECURITY_SCHEME_SCOPE:{code:"INVALID_SECURITY_SCHEME_SCOPE",message:"The '{{invalidScope}}' scope is not allowed for the '{{securityScheme}}' security scheme. Allowed scopes are: {{allowedScopes}}."},INCLUDE_TAG_MISSING:{code:"INCLUDE_TAG_MISSING",message:"The '!include' tag is missing"},LIBRARY_PATH_MUST_BE_A_STRING:{code:"LIBRARY_PATH_MUST_BE_A_STRING",message:"Library path must be string"},INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL:{code:"INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL",message:"Invalid resource name: unmatched '{{symbol}}'"},MESSAGE_PARAMETER_NO_VALUE:{code:"MESSAGE_PARAMETER_NO_VALUE",message:"Message parameter '{{paramName}}' has no value specified."},SETVALUE_ONLY_MULTI_VALUES_PROPERTIES:{code:"SETVALUE_ONLY_MULTI_VALUES_PROPERTIES",message:"setValue(string) only apply to multi-values properties"},ISEMPTY_ONLY_MULTI_VALUES_ATTRIBUTES:{code:"ISEMPTY_ONLY_MULTI_VALUES_ATTRIBUTES",message:"isEmpty() only apply to multi-values attributes"},PLUGIN_REPORTS_AN_ERROR:{code:"PLUGIN_REPORTS_AN_ERROR",message:"The {{pluginId}} plugin reports an error"},PROPERTIES_SHOULD_HAVE_SAME_GRAMMAR_KIND:{code:"PROPERTIES_SHOULD_HAVE_SAME_GRAMMAR_KIND",message:"Different properties with same name should have same grammar kind at this moment"},MISSING_TITLE:{code:"MISSING_TITLE",message:"missing title"},INVALID_ARGUMENT:{code:"INVALID_ARGUMENT",message:"Invalid Argument"},METHOD_OWNED_BY:{code:"METHOD_OWNED_BY",message:"Method is supposed to be owned by Resource or ResourceType. Here the method is owned by {{owner}}"},POSITION_EXCEEDS_TEXT_LENGTH:{code:"POSITION_EXCEEDS_TEXT_LENGTH",message:"Character position exceeds text length: {{pos}} > + {{length}}. Unit path: {{absPath}}"},LINE_MAPPER_HAS_NULL_CONTENT:{code:"LINE_MAPPER_HAS_NULL_CONTENT",message:"Line Mapper has been given null content{{path}}"},EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS:{code:"EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS",message:"Extensions and overlays list should contain legal file paths"},CAN_NOT_RESOLVE:{code:"CAN_NOT_RESOLVE",message:"Can not resolve {{path}}"},CAN_NOT_RESOLVE_REASON:{code:"CAN_NOT_RESOLVE_REASON",message:"Can not resolve {{path}} due to: {{reason}}"},INVALID_FIRST_LINE:{code:"INVALID_FIRST_LINE",message:"Invalid first line. A RAML document is expected to start with '#%RAML '."},EXTENSIONS_AND_OVERLAYS_NOT_SUPPORTED_0_8:{code:"EXTENSIONS_AND_OVERLAYS_NOT_SUPPORTED_0_8",message:"Extensions and overlays are not supported in RAML 0.8."},API_CONTAINS_ERROR:{code:"API_CONTAINS_ERROR",message:"Api contains errors."},COULD_NOT_SET_STRUCTURED_VALUE:{code:"COULD_NOT_SET_STRUCTURED_VALUE",message:"couldn't set structured value to a key: {{key}}"},NOT_IMPLEMENTED:{code:"NOT_IMPLEMENTED",message:"not implemented"},COULD_NOT_MIX_TYPES_INHERITANCE:{code:"COULD_NOT_MIX_TYPES_INHERITANCE",message:"couldn't mix user defined and basic types in inheritance"},SPECIFY_APIPATH:{code:"SPECIFY_APIPATH",message:"Please, specify -apiPath parameter"},UNABLE_TO_EXECUTE_GET:{code:"UNABLE_TO_EXECUTE_GET",message:"Unable to execute GET {{url}}"},UNIT_PATH_IS_NULL:{code:"UNIT_PATH_IS_NULL",message:"Unit path is null"},FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER:{code:"FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER",message:"Provided FSResolver is unable to list files. Please, use ExtendedFSResolver."},NOT_IMPLEMENTED_INSERT_INTO_EMPTY_REF:{code:"NOT_IMPLEMENTED_INSERT_INTO_EMPTY_REF",message:"not implemented: insert into empty include ref"},ATTR_SETVALUE_NOT_RESOLVE:{code:"ATTR_SETVALUE_NOT_RESOLVE",message:"attr.setValue: couldn't resolve: {{path}}"},ONLY_MAP_NODES_ALLOWED:{code:"ONLY_MAP_NODES_ALLOWED",message:"only MAP/MAPPING nodes allowed as values"},UNSUPPORTED_CHANGE_VALUE_CASE:{code:"UNSUPPORTED_CHANGE_VALUE_CASE",message:"Unsupported change value case: {{name}}"},UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION:{code:"UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION",message:"Unsupported case: attribute value conversion: {{curval}} ==> {{newval}} not supported"},UNSUPPORTED_COMMAND:{code:"UNSUPPORTED_COMMAND",message:"UNSUPPORTED_COMMAND: {{name}}"},NEW_NODE_CONTENTS_ERROR_BELOW:{code:"NEW_NODE_CONTENTS_ERROR_BELOW",message:"New node contents (causes error below): \n {{content}}"},REPARSE_ERROR:{code:"REPARSE_ERROR",message:"Reparse error {{content}}"},INSERT_INTO_MAPPING_VALUE_NOT_SUPPORTED:{code:"INSERT_INTO_MAPPING_VALUE_NOT_SUPPORTED",message:"Insert into mapping with {{value}} value not supported"},INSERT_INTO_NOT_SUPPORTED:{code:"INSERT_INTO_NOT_SUPPORTED",message:"Insert into {{name}} unsupported"},DELETE_FROM_NOT_SUPPORTED:{code:"DELETE_FROM_NOT_SUPPORTED",message:"Delete from {{name}} unsupported"},CAN_NOT_BE_PARSED:{code:"CAN_NOT_BE_PARSED",message:"{path} can not be parsed"},RECURSIVE_DEFINITION_EMPTY:{code:"RECURSIVE_DEFINITION_EMPTY",message:"Recursive definition"},SHOULD_NEVER_HAPPEN_KIND:{code:"SHOULD_NEVER_HAPPEN_KIND",message:"Should never happen; kind : {{kind}}"},UNKNOWN_NODE_KIND:{code:"UNKNOWN_NODE_KIND",message:"Unknown node kind: '{{kind}}'"},NOT_IMPLEMENTED_KIND:{code:"NOT_IMPLEMENTED_KIND",message:"markup not implemented: {{kind}}"},EXPECTED_INSTEAD_OF:{code:"EXPECTED_INSTEAD_OF",message:"{{expected}} expected instead of {{received}}"},INSERTION_POINT_TYPE:{code:"INSERTION_POINT_TYPE",message:"insertion point type: {{type}}"},UNSUPPORTED_OPERATION_EXCEPTION:{code:"UNSUPPORTED_OPERATION_EXCEPTION",message:"Unsupported operation exception"},UNABLE_TO_FIND_CHILD:{code:"UNABLE_TO_FIND_CHILD",message:"Unable to find correct child"},NETWORK_ERROR:{code:"NETWORK_ERROR",message:"Network Error"},COULD_NOT_LOAD_API_FROM:{code:"COULD_NOT_LOAD_API_FROM",message:"couldn't load api from {{path}}"},METHOD_MUST_BE_OVERRIDDEN:{code:"METHOD_MUST_BE_OVERRIDDEN",message:"The method must be overridden"},UNKNOWN_ANNOTATION_TYPE:{code:"UNKNOWN_ANNOTATION_TYPE",message:"Using unknown annotation type: '{{typeName}}'"},LIBRARY_CHAINIG_IN_ANNOTATION_TYPE:{code:"LIBRARY_CHAINIG_IN_ANNOTATION_TYPE",message:"Annotation type '{{typeName}}' imported through a library chain. Library chainig is not allowed."},LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE:{code:"LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE",message:"Annotation type '{{typeName}}' depends on '{{chainedType}}' imported through a library chain. Library chainig is not allowed."},PROTOCOLS_ARRAY:{code:"PROTOCOLS_ARRAY",message:"'protocols' value should be a non empty array"}}},function(e,t,n){"use strict";function r(e,t){if(void 0===t&&(t=0),t>20)return[];try{var n=[],i=e.leftType();i&&n.push(i);var a=e.rightType();if(a)if(a.hasUnionInHierarchy()){var o=r(a.unionInHierarchy(),t+1);n=n.concat(o)}else n.push(a);return n}finally{}}function i(e){var t=e.definition();if(!t||!R.isTypeDeclarationDescendant(t))return!1;var n=e.lowLevel();if(n.valueKind()!==T.Kind.SEQ)return!1;var r=n.children();if(null==r)return!1;for(var i=0,a=r;i0&&l.forEach(function(e){u||y(e,n,u)&&(u=e)}),u}}finally{r._node&&delete r._node.descriminate}}function m(e){for(var t,n=[e].concat(e.allSuperTypes()),r=0;r=r.length&&(r=i.keyPrefix(),n=i):(n=i,r=i.nameId()))}),n},e}(),x=0,k=function(){function e(){this.shouldDescriminate=!1}return e.prototype.process=function(e,t){var n=this,a=e.lowLevel(),o=e;o._mergedChildren=null;var s=a._node?a._node:a;try{if(s.currentChildren)return s.currentChildren;if(!e.definition())return;if(null==e.parent()&&!this.shouldDescriminate){this.shouldDescriminate=!0;try{var u=this.process(e,t),l=e;l._children=u,l._mergedChildren=null;var p=h(e);p&&l.patchType(p);var u=this.process(e,t);l._children=u,l._mergedChildren=null}finally{this.shouldDescriminate=!1}}if(e.definition().hasUnionInHierarchy()&&e.parent()&&e.property().nameId()==M.Universe10.LibraryBase.properties.annotations.name){var c=r(e.definition().unionInHierarchy()),f=null,d=null,m=null,y=1e3,v=e;if(c.forEach(function(r){if(!f&&!r.hasUnionInHierarchy()){v.patchType(r);if(0==x){x++;try{for(var i=n.process(e,t),a=0,o=0;oa&&(y=a,d=i,m=r)}finally{x--}}}}),f)return v.patchType(m),f;d&&v.patchType(m)}var g=new U(e.definition().allProperties());if(null==e.parent()||e.lowLevel().includePath()){var A=e.definition().universe();"RAML10"==A.version()&&(e.definition().property("uses")||A.type("FragmentDeclaration").allProperties().forEach(function(e){return g.add(e)}))}var E=e,_=E._allowQuestion||e.definition().getAdapter(C.RAMLService).getAllowQuestion(),S=[];if(g.parentKey){if(e.lowLevel().key()){var I=new N.ASTPropImpl(e.lowLevel(),e,g.parentKey.range(),g.parentKey,!0);S.push(I);var b=e.property()&&R.isBodyProperty(e.property())&&e.lowLevel().key()==e.property().nameId();if(b){F(E);I.overrideValue(E._computedKey)}}if(e.lowLevel().valueKind()===T.Kind.SEQ&&!i(e)){var w=new N.BasicASTNode(e.lowLevel(),E);return w.errorMessage={entry:O.DEFINITION_SHOULD_BE_A_MAP,parameters:{typeName:e.definition().nameId()}},S.push(w),S}}if(null!=e.lowLevel().value(!0))if(g.parentValue)S.push(new N.ASTPropImpl(e.lowLevel(),e,g.parentValue.range(),g.parentValue));else if(g.canBeValue){var P=e.lowLevel().value();null==P&&(P=e.lowLevel().value(!0)),"string"==typeof P&&P.trim().length>0&&S.push(new N.ASTPropImpl(e.lowLevel(),e,g.canBeValue.range(),g.canBeValue))}if(E._children=S,E._mergedChildren=null,E.definition().getAdapter(C.RAMLService).isUserDefined())S=this.processChildren(t,E,S,_,g);else if(E.definition().key()==M.Universe08.Api||E.definition().key()==M.Universe10.Api){var L=t.filter(function(e){return"uses"==e.key()});S=this.processChildren(L,E,S,_,g);var D=t.filter(function(e){return"types"==e.key()});S=this.processChildren(D,E,S,_,g);var k=t.filter(function(e){return"types"!=e.key()&&"uses"!=e.key()});S=this.processChildren(k,E,S,_,g)}else S=this.processChildren(t,E,S,_,g);return E._children=S,E._mergedChildren=null,S}finally{}},e.prototype.isTypeDeclarationShortcut=function(e,t){var n=R.isTypeOrSchemaProperty(t),r=e.definition()&&R.isTypeDeclarationTypeOrDescendant(e.definition());return!!(r&&n&&e.lowLevel()&&e.lowLevel().valueKind()===T.Kind.SEQ)},e.prototype.processChildren=function(e,t,n,r,i){var a=this,o=M.Universe10.TypeDeclaration.name,s=M.Universe10.TypeDeclaration.properties.type.name,u=M.Universe10.ArrayTypeDeclaration.properties.items.name;if(t.definition()&&t.definition().isAssignableFrom(o)&&t.lowLevel()&&i.canBeValue&&(i.canBeValue.nameId()===s||i.canBeValue.nameId()===u)&&t.lowLevel()._node&&t.lowLevel()._node.value&&t.lowLevel()._node.value.kind===T.Kind.SEQ)return e.forEach(function(e){var r=new N.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue);n.push(r)}),n;var l=t.root().lowLevel().unit();e.forEach(function(e){if(i.canBeValue&&a.isTypeDeclarationShortcut(t,i.canBeValue))return void n.push(new N.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue));var o=e.key(),s=null!=o?i.match(o):null;if(null!=s){var u=s.range();if(s.isAnnotation()&&"annotations"!=o){var p=new N.ASTPropImpl(e,t,u,s);return void n.push(p)}var c=!1,f=s.isMultiValue();u.isArray()?(f=!0,u=u.array().componentType(),c=!0):u.hasArrayInHierarchy()&&(f=!0,c=!0);var h,m=!1;if(t.reuseMode()&&e.valueKind()!=T.Kind.SEQ){var y=t.reusedNode();if(y){var A=[e],b=t.lowLevel();!s.isMerged()&&f&&(h=[],A=e.children(),b=e);for(var w=0,P=A;w0||k.length>1)&&f)if(k.length>1&&R.isTypeDeclarationDescendant(t.definition())&&(R.isTypeOrSchemaProperty(s)||R.isItemsProperty(s))&&e.valueKind()!=T.Kind.SEQ){var p=new N.ASTPropImpl(e,t,u,s);n.push(p),t.setComputed(s.nameId(),p)}else{var V=[];k.forEach(function(e){var r=new N.ASTPropImpl(e,t,u,s);n.push(r),V.push(e.value())}),s.isInherited()&&t.setComputed(s.nameId(),V)}else{s.isInherited()&&t.setComputed(s.nameId(),e.value());var K=new N.ASTPropImpl(e,t,u,s),j=e;if(e.isAnnotatedScalar()&&(j=_.find(e.children(),function(e){return"value"==e.key()})),j.valueKind()==T.Kind.SEQ||j.valueKind()==T.Kind.MAP){var W=s.range().nameId();s.getAdapter(C.RAMLPropertyService).isExampleProperty()||("MarkdownString"==W?W="string":"StringType"==W?W="string":"NumberType"==W?W="number":"BooleanType"==W&&(W="boolean"),"string"!=W&&"number"!=W&&"boolean"!=W||(K.errorMessage={entry:O.INVALID_PROPERTY_RANGE,parameters:{propName:s.groupName(),range:W}},0==h.length&&"enum"==s.groupName()&&(K.errorMessage={entry:O.ENUM_IS_EMPTY,parameters:{}},e.valueKind()==T.Kind.MAP&&(K.errorMessage={entry:O.ENUM_MUST_BE_AN_ARRAY,parameters:{}}))))}n.push(K)}return}var H=[];if(t._children=n,t._mergedChildren=null,null!=e.value()&&("string"==typeof e.value()||"boolean"==typeof e.value()||"number"==typeof e.value())&&(""+e.value()).trim().length>0){var Y=s.range();if(!Y.allProperties().some(function(e){var t=e;return!!t&&(t.canBeValue()&&t.isFromParentValue())})){var q=new N.BasicASTNode(e,t);q.getLowLevelEnd=function(){return-1},q.getLowLevelStart=function(){return-1},q.knownProperty=s,n.push(q)}}if(s.isMerged()){var G=new N.ASTNodeImpl(e,t,u,s);G._allowQuestion=r,H.push(G)}else if(f)if(s.getAdapter(C.RAMLPropertyService).isEmbedMap()){var X=h,z=[],$=!1;if(X.forEach(function(e){e.kind()==T.Kind.INCLUDE_REF&&"RAML08"==t.universe().version()?e.children().forEach(function(e){var n=new N.ASTNodeImpl(e,t,u,s);n._allowQuestion=r,H.push(n),$=!0}):z.push(e)}),X=z,0==X.length){if(s.range().key()==M.Universe08.ResourceType&&!$){var J=new N.BasicASTNode(e,t);J.errorMessage={entry:O.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push(J)}if(e.valueKind()==T.Kind.SCALAR&&s.range().key()==M.Universe08.AbstractSecurityScheme){var J=new N.BasicASTNode(e.parent(),t);J.errorMessage={entry:O.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push(J)}}if(X.forEach(function(e){var i=e.children();if(i.length>0&&"RAML08"==t.universe().version()&&R.isSchemasProperty(s))for(var a=0,o=i;a0&&ee.getAdapter(C.RAMLService).getCanInherit().forEach(function(n){for(var i=t.computedValue(n),a=Array.isArray(i)?i:[i],o=0;o0?te.forEach(function(e){return H.push(e)}):Z.forEach(function(e){return H.push(e)})}else H.push(new N.ASTNodeImpl(e,t,u,s));t._children=t._children.concat(H),t._mergedChildren=null,n=n.concat(H),H.forEach(function(e){var n=d(s,t,e);n&&n!=e.definition()&&e.patchType(n),e._associatedDef=null,s.childRestrictions().forEach(function(t){e.setComputed(t.name,t.value)});e.definition()})}else{var ne=new N.BasicASTNode(e,t),re=!I.LowLevelCompositeNode.isInstance(e)||null!=e.primaryNode();if(!re){var ie=E.typeOfContainingTemplate(ne),ae=o?o.indexOf("<<"):-1,oe=ae>=0&&o.indexOf(">>",ae)>=0;ie?oe||(re=!0):(re=!0,R.isMethodType(t.definition())?ie=t.definition().universe().type(S.universesInfo.Universe10.Trait.name):R.isResourceType(t.definition())&&(ie=t.definition().universe().type(S.universesInfo.Universe10.ResourceType.name)),ie&&null!=ie.property(o)&&(re=!1),re&&oe&&(re=!v(t)))}re&&n.push(ne)}});var p=t.reusedNode();if(p&&t.lowLevel().valueKind()!=T.Kind.SEQ){var c={};p.elements().forEach(function(e){return c[e.property().nameId()+"_"+e.lowLevel().key()]=e}),p.attrs().forEach(function(e){return c[e.property().nameId()+"_"+e.lowLevel().key()]=e}),n.filter(function(e){return e.isElement()||e.isAttr()}).forEach(function(e){var n=c[e.property().nameId()+"_"+e.lowLevel().key()];n&&n!=e&&e.isElement()&&e.lowLevel().parent().valueKind()!=T.Kind.SEQ&&(e.setReusedNode(n),e.setReuseMode(t.reuseMode()))})}return n},e}();t.BasicNodeBuilder=k,t.mapType=o,t.doDescrimination=h;var F=function(e){for(var t=!1,n=e;n;){var r=n.definition();if(R.isTraitType(r)||R.isResourceTypeType(r)){t=!0;break}n=n.parent()}return t}},function(e,t,n){"use strict";function r(e,t,n){return N.findDeclaration(e,t,n)}function i(e,t){return N.findUsages(e,t)}function a(e){return N.globalDeclarations(e)}function o(e,t,n){N.refFinder(e,t,n)}function s(e,t){return N.findDeclarationByNode(e,t)}function u(e,t){return N.determineCompletionKind(e,t)}function l(e,t){return N.enumValues(e,t)}function p(e,t){return I.qName(e,t)}function c(e,t){return N.subTypesWithLocals(e,t)}function f(e,t){return N.nodesDeclaringType(e,t)}function h(e){return N.isExampleNodeContent(e)}function d(e){return N.findExampleContentType(e)}function m(e,t){return N.parseDocumentationContent(e,t)}function y(e,t){return N.parseStructuredExample(e,t)}function v(e){return N.isExampleNode(e)}function g(e,t){return N.referenceTargets(e,t)}function A(e){return b.getNominalTypeSource(e)}function E(e,t){return N.findAllSubTypes(e,t)}function T(e){return N.declRoot(e)}function _(e,t,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!0),N.deepFindNode(e,t,n,r,i)}function S(e){return N.allChildren(e)}Object.defineProperty(t,"__esModule",{value:!0});var N=n(209),I=n(55),b=n(210);t.findDeclaration=r,t.findUsages=i,t.globalDeclarations=a,t.refFinder=o,t.findDeclarationByNode=s;var M;!function(e){e[e.VALUE_COMPLETION=0]="VALUE_COMPLETION",e[e.KEY_COMPLETION=1]="KEY_COMPLETION",e[e.PATH_COMPLETION=2]="PATH_COMPLETION",e[e.DIRECTIVE_COMPLETION=3]="DIRECTIVE_COMPLETION",e[e.VERSION_COMPLETION=4]="VERSION_COMPLETION",e[e.ANNOTATION_COMPLETION=5]="ANNOTATION_COMPLETION",e[e.SEQUENCE_KEY_COPLETION=6]="SEQUENCE_KEY_COPLETION",e[e.INCOMMENT=7]="INCOMMENT"}(M=t.LocationKind||(t.LocationKind={})),t.determineCompletionKind=u,t.enumValues=l,t.qName=p,t.subTypesWithLocals=c,t.nodesDeclaringType=f,t.isExampleNodeContent=h,t.findExampleContentType=d,t.parseDocumentationContent=m,t.parseStructuredExample=y,t.isExampleNode=v,t.referenceTargets=g,t.getNominalTypeSource=A,t.findAllSubTypes=E,t.declRoot=T,t.deepFindNode=_,t.allChildren=S},function(e,t,n){"use strict";function r(e){for(var t=[],n={};null!=e.parent();)e.lowLevel().includePath()&&(t=t.concat(a(e,n))),e=e.parent();return t=t.concat(a(e,n))}function i(e){var t=e.node();if(t&&U.isParseResult(t))return t;var n=K.getNominalPropertySource2(e);return n?n.getSource():null}function a(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=[]),!e.lowLevel())return[];var r=e.lowLevel().unit().absolutePath();if(t[r]=!0,!F.ASTNodeImpl.isInstance(e))return n;var i=!1;return e.elements().forEach(function(e){if(e.definition().key()==B.Universe10.UsesDeclaration){if(i)return;var r=e.attr("value");if(r){var o=e.lowLevel().unit().resolve(r.value());if(o&&j.isWaitingFor(o.absolutePath()))return void(i=!0);null!=o&&o.isRAMLUnit()&&!t[o.absolutePath()]&&o.highLevel().isElement()&&a(o.highLevel().asElement(),t,n)}}else n.push(e)}),n}function o(e,t){for(var n="",r=e-1;r>=0;r--){var i=t.charAt(r);if(" "==i||"\t"==i)n?n+=i:n=i;else if("\r"==i||"\n"==i)return n}}function s(e,t,n,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){if(F.ASTNodeImpl.isInstance(e)){for(var a=e,o=r?a.children():a.directChildren(),u=0;u=0;r--){var i=e.charAt(r);if("\r"==i||"\n"==i||" "==i||"\t"==i||'"'==i||"'"==i||":"==i){n=r+1;break}}for(var a=-1,r=t;r=0;r--){var i=e[r];if(" "==i||"\r"==i||"\n"==i||"|"==i||"["==i||"]"==i||":"==i||"("==i||")"==i)break;n=i+n}for(var r=t+1;r0){var i=r(t).filter(function(e){return null!=x.find(s.globallyDeclaredBy(),function(t){return t==e.definition()})});return i}}return[]}function f(e,t){if(t){var n=[];if(e.getAdapter(V.RAMLPropertyService).isTypeExpr()){var i=r(t).filter(function(e){var t=e.definition().key();return t===B.Universe08.GlobalSchema||e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)});var a=t.definition().universe().type(B.Universe10.TypeDeclaration.name);if(a){var o=a.allSubTypes();n=n.concat(o.map(function(e){return e.getAdapter(V.RAMLService).descriminatorValue()}))}return n}var s=e.range().key();if((s==B.Universe08.SchemaString||s==B.Universe10.SchemaString)&&"RAML10"==e.range().universe().version()&&e.range().hasValueTypeInHierarchy()){var i=r(t).filter(function(e){return e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)})}if(e.getAdapter(V.RAMLPropertyService).isDescriminating()){var o=S(e.domain(),t);n=n.concat(o.map(function(e){return e.getAdapter(V.RAMLService).descriminatorValue()}))}else if(e.isReference()){var u=b(e.referencesTo(),t);n=u.map(function(e){return F.qName(e,t)})}else if(e.range().hasValueTypeInHierarchy()){var l=e.range().getAdapter(V.RAMLService);if(l.globallyDeclaredBy().length>0){var i=r(t).filter(function(e){return null!=x.find(l.globallyDeclaredBy(),function(t){return t==e.definition()})});n=n.concat(i.map(function(e){return F.qName(e,t)}))}}return e.isAllowNull()&&n.push("null"),e.enumOptions()&&(n=n.concat(e.enumOptions())),n}return e.enumOptions()&&"string"==typeof e.enumOptions()?[e.enumOptions()+""]:e.enumOptions()}function h(e){return e.isElement()&&e.asElement().definition().key()!=B.Universe10.Library?null:e.asElement().attrValue("name")}function d(e,t){var n=e.lowLevel().unit();if(!n)return null;var r=e.lowLevel().start(),i=e.lowLevel().end();if(null!=t&&t==H.KEY_COMPLETION?(r=e.lowLevel().keyStart(),i=e.lowLevel().keyEnd()):null!=t&&t==H.VALUE_COMPLETION&&(r=e.lowLevel().valueStart(),i=e.lowLevel().valueEnd()),r==-1||i==-1)return null;var a=Math.floor((r+i)/2);return m(n,a,t)}function m(e,t,n){var r=s(F.fromUnit(e),t,t,!1),a=null;if(r.isElement()&&r.asElement().definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)&&r.asElement().directChildren().forEach(function(e){if(e.isUnknown()&&e.getLowLevelStart()t){var n=r.asElement().localType();n.allFacets().forEach(function(t){if(t.nameId()==e.lowLevel().key()&&k.UserDefinedProp.isInstance(t)){var n=i(t);a=n}})}}),!r.property())return r;if("example"==r.property().nameId()){r.parent().localType();r.lowLevel().children().forEach(function(e){"example"==e.key()&&e.children().forEach(function(e){if(e.start()t){var n=r.parent().asElement().localType();n.allProperties().forEach(function(t){if(t.nameId()==e.key()&&k.UserDefinedProp.isInstance(t)){var n=i(t);a=n}})}})})}if(a)return a;var o=null!=n?n:T(e.contents(),t);if(o==H.VALUE_COMPLETION){var l=r;if(F.ASTPropImpl.isInstance(r)){var p=r;if(p&&p.value()){if(!F.StructuredValue.isInstance(p.value()))return W(t,e.contents(),p,l);var c=p.value(),f=c.toHighLevel();if(f){var h=x.find(f.attrs(),function(e){return e.lowLevel().start()=t});if(h)return W(t,e.contents(),h,f,p.property())}}}else{var d=l.property();if(d)return W(t,e.contents(),null,l,d)}}if(o==H.KEY_COMPLETION||o==H.SEQUENCE_KEY_COPLETION){var l=r,m=r.property();if(D.UserDefinedProp.isInstance(m)){var g=m;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&D.isUserDefinedClass(l.definition())){var A=l.definition();return A.isAssignableFrom("TypeDeclaration")?r:A.getAdapter(V.RAMLService).getDeclaringNode()}if(F.ASTPropImpl.isInstance(r)){var _=r;if(E(_)){var S=y(_);if(S){var N=v(_,S);if(N){var r=s(N,t,t);if(m=r.property(),D.UserDefinedProp.isInstance(m)){var g=m;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&D.isUserDefinedClass(l.definition())){var A=l.definition();return A.getAdapter(V.RAMLService).getDeclaringNode()}}}}}}if(o==H.PATH_COMPLETION){var I=u(e.contents(),t);if(I){var b=e.resolve(I);return b}}}function y(e){var t=null;if(e.isElement()?t=e:e.isAttr()&&(t=e.parent()),!t.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)){var n=t.parent();if(!n)return null;if(n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))t=n;else{if(n=n.parent(),null==n)return null;if(!n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))return null;t=n}}return t.localType()}function v(e,t){return F.StructuredValue.isInstance(e.value())?new F.ASTNodeImpl(e.value().lowLevel(),e.parent(),t,e.property()):null}function g(e,t){return new F.ASTNodeImpl(e.lowLevel(),e,t,e.property())}function A(e){return e.definition().key()==B.Universe10.ExampleSpec}function E(e){var t=B.Universe10.TypeDeclaration.properties.example.name,n=B.Universe10.ObjectTypeDeclaration.name;if(!F.ASTPropImpl.isInstance(e))return!1;var r=e,i=r.parent(),a=i&&i.property();a&&a.nameId();return!!(t===r.name()&&r.isString()&&F.ASTNodeImpl.isInstance(i)&&i.definition().isAssignableFrom(n))}function T(e,t){for(var n=!1,r=!1,i=!1,a=t-1;a>=0;a--){var s=e.charAt(a);if("("==s)i=!0;else{if(i){if("\r"==s||"\n"==s){for(var u=!1,l=t-1;l=0;a--){var s=e.charAt(a);if("#"==s){if(0==a)return H.VERSION_COMPLETION;for(var l=a-1;l>=0;l--){var c=e.charAt(l);if("\r"==c||"\n"==c)break;if("!"==c&&e.indexOf("!include",l)==l)return H.PATH_COMPLETION}return H.INCOMMENT}if(":"==s)return n?H.DIRECTIVE_COMPLETION:H.VALUE_COMPLETION;if("\r"==s||"\n"==s){for(var f=!1,h=o(t,e),d=a;d>0;d--){if(s=e.charAt(d),":"==s){if(f){var m=o(d,e);if(m.length0&&n){var u=r(n),l=e.getAdapter(V.RAMLService).getRuntimeExtenders();n.root();l.forEach(function(t){var n=u.filter(function(n){var r=n.definition().allSuperTypes();r.push(n.definition());var i=n.definition()==t||null!=x.find(r,function(e){return e==t})||null!=x.find(r,function(t){return t==e});return i});s=s.concat(n.map(function(e){return e.localType()}))})}return s=x.unique(s),a._subTypesCache[i]=s,s}function N(e,n,i){n=t.declRoot(n);var a=r(n),o=x.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.types.name});return o.localType()}function I(e,n,i){n=t.declRoot(n);var a=r(n),o=x.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.schemas.name});return o.localType()}function b(e,t){var n=[],i=[e].concat(e.getAdapter(V.RAMLService).getRuntimeExtenders());if(t){var a=t;i.forEach(function(e){var t=r(a),i=t.filter(function(t){return t.definition().isAssignableFrom(e.nameId())});n=n.concat(i)})}var o=!e.hasValueTypeInHierarchy();if(o&&e.getAdapter(V.RAMLService).isInlinedTemplates()&&t){var a=t,s=r(a).filter(function(t){return t.definition()==e});n=n.concat(s)}else{var a=t,u={};e.allSubTypes().forEach(function(e){return u[e.nameId()]=!0}),u[e.nameId()]=!0;var s=r(a).filter(function(e){return u[e.definition().nameId()]});n=n.concat(s)}return n}function M(e,t){var n=e.range();return S(n,t)}function R(e,t){if(t){if(e.isDescriminator()){var n=e.range(),i=n.getAdapter(V.RAMLService).getRuntimeExtenders();if(i.length>0&&t){var a=[];return i.forEach(function(e){var n=r(t).filter(function(t){return t.definition()==e});a=a.concat(n)}),a}return[]}if(e.isReference())return b(e.referencesTo(),t);if(e.range().hasValueTypeInHierarchy()){var o=e.range().getAdapter(V.RAMLService);if(o.globallyDeclaredBy&&o.globallyDeclaredBy().length>0){var s=r(t).filter(function(e){return null!=x.find(o.globallyDeclaredBy(),function(t){return t==e.definition()})});return s}}}return[]}function C(e){var t=[];return w(e,t),t}function w(e,t){e.children().forEach(function(e){t.push(e),w(e,t)})}function P(e,t,n){e.elements().forEach(function(e){P(e,t,n);e.definition()}),e.attrs().forEach(function(r){var i=r.property(),a=r.value();if(D.UserDefinedProp.isInstance(i)){var o=i.node();o==t?n.push(r):o&&o.lowLevel().start()==t.lowLevel().start()&&o.lowLevel().unit()==t.lowLevel().unit()&&n.push(r)}if(E(r)){var s=y(r);if(s){var u=v(r,s);u&&P(u,t,n)}}else if(i.getAdapter(V.RAMLPropertyService).isTypeExpr()&&"string"==typeof a){var l=e.localType();Y(l,r,t,n);var p=h(t);if(p&&a.indexOf(p)!=-1){var c=L(r);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}if(i.isReference()||i.isDescriminator()){if("string"==typeof a){var f=R(i,e);x.find(f,function(e){return e.name()==a&&e==t})&&n.push(r);var p=h(t);if(p&&a.indexOf(p)!=-1){var c=L(r);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}else if(F.StructuredValue.isInstance(a)){var d=a;if(d){var m=d.valueName(),f=R(i,e);x.find(f,function(e){return e.name()==m&&e==t})&&n.push(r);var g=d.toHighLevel();g&&P(g,t,n);var p=h(t);if(p&&m.indexOf(p)!=-1){var c=L(g);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}}}else{var f=R(i,e);x.find(f,function(e){return e.name()==a&&e==t})&&n.push(r)}})}function L(e){if(!e.lowLevel)return null;var t=e.lowLevel();if(!t)return null;if(t.key()){var n=Math.floor((t.keyEnd()+t.keyStart())/2),r=O(t.unit(),n);if(r)return r}if(t.value()){var n=Math.floor((t.valueEnd()+t.valueStart())/2),r=O(t.unit(),n);if(r)return r}return null}function O(e,t){var n=m(e,t);if(n&&n.isElement&&n.isElement())for(var r=n.asElement(),i=r;i;){if(i.definition().key()==B.Universe10.Library)return i;i=i.parent()}return null}Object.defineProperty(t,"__esModule",{value:!0});var D=n(56),U=n(197),x=n(16),k=n(56),F=n(55),B=n(203),V=k,K=n(210),j=n(211);t.declRoot=function(e){for(var t=e;;){if(t.definition().key()==B.Universe10.Library)break;var n=t.parent();if(!n)break;t=n}return t},t.globalDeclarations=r,t.findDeclarations=a,t.deepFindNode=s,t.extractName=l;var W=function(e,t,n,r,a){void 0===a&&(a=n.property());var o=c(a,r),s=l(t,e),u=x.find(o,function(e){return F.qName(e,r)==s});if(u)return u;if(D.UserDefinedProp.isInstance(a)){ -var p=a;return i(p)}return null};t.findUsages=p,t.referenceTargets=c,t.enumValues=f,t.findDeclarationByNode=d,t.findDeclaration=m,t.findExampleContentType=y,t.parseDocumentationContent=v,t.parseStructuredExample=g,t.isExampleNode=A,t.isExampleNodeContent=E,t.determineCompletionKind=T;var H;!function(e){e[e.VALUE_COMPLETION=0]="VALUE_COMPLETION",e[e.KEY_COMPLETION=1]="KEY_COMPLETION",e[e.PATH_COMPLETION=2]="PATH_COMPLETION",e[e.DIRECTIVE_COMPLETION=3]="DIRECTIVE_COMPLETION",e[e.VERSION_COMPLETION=4]="VERSION_COMPLETION",e[e.ANNOTATION_COMPLETION=5]="ANNOTATION_COMPLETION",e[e.SEQUENCE_KEY_COPLETION=6]="SEQUENCE_KEY_COPLETION",e[e.INCOMMENT=7]="INCOMMENT"}(H=t.LocationKind||(t.LocationKind={})),t.resolveReference=_,t.subTypesWithLocals=S,t.subTypesWithName=N,t.schemasWithName=I,t.nodesDeclaringType=b,t.findAllSubTypes=M,t.allChildren=C;var Y=function(e,t,n,r){var i=e.getAdapter(V.RAMLService).getDeclaringNode();if(i&&n.isSameNode(i))return void r.push(t);if(e.isArray()&&Y(e.array().componentType(),t,n,r),e.isUnion()){var a=e.union();Y(a.leftType(),t,n,r),Y(a.rightType(),t,n,r)}e.superTypes().some(function(e){return e.nameId()==n.name()})&&r.push(t)};t.refFinder=P},function(e,t,n){"use strict";function r(e){var t=e.getExtra(p.SOURCE_EXTRA);return null==t?null:l.isSourceProvider(t)?t:f.isLowLevelNode(t)?{getSource:function(){return t.highLevelNode()}}:c.isParseResult(t)?{getSource:function(){return t}}:null}function i(e){return r(e)}function a(e){var t=e.getAdapters();return t?d.find(t,function(e){return l.rt.isParsedType(e)}):null}function o(e){if(!e)return null;var t=e.getExtra(p.SOURCE_EXTRA);if(t)return r(e);var n=a(e);return n?i(n):null}function s(e,t){var n=o(e);return n?{getSource:function(){var e=n.getSource(),r=e.asElement();if(null==r)return null;var i=r.elementsOfKind(h.Universe10.ObjectTypeDeclaration.properties.properties.name);return null==i||0==i.length?null:d.find(i,function(e){return t==e.attrValue(h.Universe10.TypeDeclaration.properties.name.name)})}}:null}function u(e){return s(e.domain(),e.nameId())}Object.defineProperty(t,"__esModule",{value:!0});var l=n(56),p=l.rt,c=n(197),f=n(5),h=n(203),d=n(16);t.getExtraProviderSource=r,t.getRTypeSource=i,t.findRTypeByNominal=a,t.getNominalTypeSource=o,t.getNominalPropertySource=s,t.getNominalPropertySource2=u},function(e,t,n){"use strict";function r(){return Object.keys(h).length>0}function i(e){f.push(e)}function a(e){h[e]=!0}function o(e){delete h[e],f.forEach(function(t){return t(e)})}function s(e){return!!h[e]}function u(e,t){c.set(e,t)}function l(e){return c.get(e)}Object.defineProperty(t,"__esModule",{value:!0});var p=(n(212),n(213)),c=p(50);t.hasAsyncRequests=r,t.addLoadCallback=i;var f=[],h={};t.addNotify=a,t.removeNotity=o,t.isWaitingFor=s,t.set=u,t.get=l},function(e,t){"use strict";var n=function(){function e(e,t,n,r){if("number"!=typeof e)throw new TypeError("statusCode must be a number but was "+typeof e);if(null===t)throw new TypeError("headers cannot be null");if("object"!=typeof t)throw new TypeError("headers must be an object but was "+typeof t);this.statusCode=e;var i={};for(var a in t)i[a.toLowerCase()]=t[a];this.headers=i,this.body=n,this.url=r}return e.prototype.getBody=function(e){if(this.statusCode>=300){var t=new Error("Server responded with status code "+this.statusCode+":\n"+this.body.toString());throw t.statusCode=this.statusCode,t.headers=this.headers,t.body=this.body,t.url=this.url,t}return e&&"string"!=typeof this.body?this.body.toString(e):this.body},e}();e.exports=n},function(e,t,n){var r,i,a;!function(n,o){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=o():(i=[],r=o,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}("object"==typeof window?window:this,function(){"use strict";function e(n){return this instanceof e?void(this._LRUCacheState=new t(n)):new e(n)}function t(e){this.capacity=e>0?+e:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList=new n}function n(){this.length=0,this.head=null,this.end=null}function r(e){this.key=e,this.p=null,this.n=null}function i(e,t){t!==e.head&&(e.end?e.end===t&&(e.end=t.n):e.end=t,a(t.n,t.p),a(t,e.head),e.head=t,e.head.n=null)}function a(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}var o=void 0,s=e.prototype;return s.get=function(e){var t=this._LRUCacheState,n=t.hash[e];if(n)return i(t.linkedList,n),t.data[e]},s.set=function(e,t){var n=this._LRUCacheState,a=n.hash[e];return t===o?this:(a||(n.hash[e]=new r(e),n.linkedList.length+=1,a=n.hash[e]),i(n.linkedList,a),n.data[e]=t,n.linkedList.length>n.capacity&&this.remove(n.linkedList.end.key),this)},s.update=function(e,t){return this.has(e)&&this.set(e,t(this.get(e))),this},s.remove=function(e){var t=this._LRUCacheState,n=t.hash[e];return n?(n===t.linkedList.head&&(t.linkedList.head=n.p),n===t.linkedList.end&&(t.linkedList.end=n.n),a(n.n,n.p),delete t.hash[e],delete t.data[e],t.linkedList.length-=1,this):this},s.removeAll=function(){return this._LRUCacheState=new t(this._LRUCacheState.capacity),this},s.info=function(){var e=this._LRUCacheState;return{capacity:e.capacity,length:e.linkedList.length}},s.keys=function(){for(var e=[],t=this._LRUCacheState.linkedList.head;t;)e.push(t.key),t=t.p;return e},s.has=function(e){return!!this._LRUCacheState.hash[e]},s.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},s.popStale=function(){var e=this.staleKey();if(!e)return null;var t=[e,this._LRUCacheState.data[e]];return this.remove(e),t},e})},function(e,t){function n(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,n=e.subtype,r=e.suffix,i=e.type;if(!i||!h.test(i))throw new TypeError("invalid type");if(!n||!f.test(n))throw new TypeError("invalid subtype");var o=i+"/"+n;if(r){if(!h.test(r))throw new TypeError("invalid suffix");o+="+"+r}if(t&&"object"==typeof t)for(var s,u=Object.keys(t).sort(),p=0;p0&&!u.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(c,"\\$1")+'"'}function o(e){var t=d.exec(e.toLowerCase());if(!t)throw new TypeError("invalid media type");var n,r=t[1],i=t[2],a=i.lastIndexOf("+");a!==-1&&(n=i.substr(a+1),i=i.substr(0,a));var o={type:r,subtype:i,suffix:n};return o}/*! +properties:{name:{name:"name",range:"StringType",domain:"BodyLike"},schema:{name:"schema",range:"XMLSchemaString",domain:"XMLBody"},example:{name:"example",range:"ExampleString",domain:"BodyLike"},formParameters:{name:"formParameters",range:"Parameter",domain:"BodyLike"},description:{name:"description",range:"MarkdownString",domain:"BodyLike"}}},JSONBody:{name:"JSONBody",properties:{name:{name:"name",range:"StringType",domain:"BodyLike"},schema:{name:"schema",range:"JSonSchemaString",domain:"JSONBody"},example:{name:"example",range:"ExampleString",domain:"BodyLike"},formParameters:{name:"formParameters",range:"Parameter",domain:"BodyLike"},description:{name:"description",range:"MarkdownString",domain:"BodyLike"}}},Response:{name:"Response",properties:{code:{name:"code",range:"StatusCodeString",domain:"Response"},headers:{name:"headers",range:"Parameter",domain:"Response"},body:{name:"body",range:"BodyLike",domain:"Response"},description:{name:"description",range:"MarkdownString",domain:"Response"},parametrizedProperties:{name:"parametrizedProperties"}}},Resource:{name:"Resource",properties:{relativeUri:{name:"relativeUri",range:"RelativeUriString",domain:"Resource"},type:{name:"type",range:"ResourceTypeRef",domain:"Resource"},is:{name:"is",range:"TraitRef",domain:"Resource"},securedBy:{name:"securedBy",range:"SecuritySchemeRef",domain:"Resource"},uriParameters:{name:"uriParameters",range:"Parameter",domain:"Resource"},methods:{name:"methods",range:"Method",domain:"Resource"},resources:{name:"resources",range:"Resource",domain:"Resource"},displayName:{name:"displayName",range:"StringType",domain:"Resource"},baseUriParameters:{name:"baseUriParameters",range:"Parameter",domain:"Resource"},description:{name:"description",range:"MarkdownString",domain:"Resource"}}},ResourceTypeRef:{name:"ResourceTypeRef",properties:{resourceType:{name:"resourceType"}}},ResourceType:{name:"ResourceType",properties:{name:{name:"name",range:"StringType",domain:"ResourceType"},usage:{name:"usage",range:"StringType",domain:"ResourceType"},methods:{name:"methods",range:"Method",domain:"ResourceType"},is:{name:"is",range:"TraitRef",domain:"ResourceType"},type:{name:"type",range:"ResourceTypeRef",domain:"ResourceType"},securedBy:{name:"securedBy",range:"SecuritySchemeRef",domain:"ResourceType"},uriParameters:{name:"uriParameters",range:"Parameter",domain:"ResourceType"},displayName:{name:"displayName",range:"StringType",domain:"ResourceType"},baseUriParameters:{name:"baseUriParameters",range:"Parameter",domain:"ResourceType"},description:{name:"description",range:"MarkdownString",domain:"ResourceType"},parametrizedProperties:{name:"parametrizedProperties"}}},MethodBase:{name:"MethodBase",properties:{responses:{name:"responses",range:"Response",domain:"MethodBase"},body:{name:"body",range:"BodyLike",domain:"MethodBase"},protocols:{name:"protocols",range:"StringType",domain:"MethodBase"},securedBy:{name:"securedBy",range:"SecuritySchemeRef",domain:"MethodBase"},baseUriParameters:{name:"baseUriParameters",range:"Parameter",domain:"MethodBase"},queryParameters:{name:"queryParameters",range:"Parameter",domain:"MethodBase"},headers:{name:"headers",range:"Parameter",domain:"MethodBase"},description:{name:"description",range:"MarkdownString",domain:"MethodBase"}}},Method:{name:"Method",properties:{responses:{name:"responses",range:"Response",domain:"MethodBase"},body:{name:"body",range:"BodyLike",domain:"MethodBase"},protocols:{name:"protocols",range:"StringType",domain:"MethodBase"},securedBy:{name:"securedBy",range:"SecuritySchemeRef",domain:"MethodBase"},baseUriParameters:{name:"baseUriParameters",range:"Parameter",domain:"MethodBase"},queryParameters:{name:"queryParameters",range:"Parameter",domain:"MethodBase"},headers:{name:"headers",range:"Parameter",domain:"MethodBase"},description:{name:"description",range:"MarkdownString",domain:"MethodBase"},method:{name:"method",range:"StringType",domain:"Method"},is:{name:"is",range:"TraitRef",domain:"Method"},parametrizedProperties:{name:"parametrizedProperties"}}},Trait:{name:"Trait",properties:{responses:{name:"responses",range:"Response",domain:"MethodBase"},body:{name:"body",range:"BodyLike",domain:"MethodBase"},protocols:{name:"protocols",range:"StringType",domain:"MethodBase"},securedBy:{name:"securedBy",range:"SecuritySchemeRef",domain:"MethodBase"},baseUriParameters:{name:"baseUriParameters",range:"Parameter",domain:"MethodBase"},queryParameters:{name:"queryParameters",range:"Parameter",domain:"MethodBase"},headers:{name:"headers",range:"Parameter",domain:"MethodBase"},description:{name:"description",range:"MarkdownString",domain:"MethodBase"},name:{name:"name",range:"StringType",domain:"Trait"},usage:{name:"usage",range:"StringType",domain:"Trait"},displayName:{name:"displayName",range:"StringType",domain:"Trait"},parametrizedProperties:{name:"parametrizedProperties"}}},TraitRef:{name:"TraitRef",properties:{trait:{name:"trait"}}},SecuritySchemePart:{name:"SecuritySchemePart",properties:{responses:{name:"responses",range:"Response",domain:"SecuritySchemePart"},body:{name:"body",range:"BodyLike",domain:"MethodBase"},protocols:{name:"protocols",range:"StringType",domain:"MethodBase"},securedBy:{name:"securedBy",range:"SecuritySchemeRef",domain:"MethodBase"},baseUriParameters:{name:"baseUriParameters",range:"Parameter",domain:"MethodBase"},queryParameters:{name:"queryParameters",range:"Parameter",domain:"SecuritySchemePart"},headers:{name:"headers",range:"Parameter",domain:"SecuritySchemePart"},description:{name:"description",range:"MarkdownString",domain:"SecuritySchemePart"},displayName:{name:"displayName",range:"StringType",domain:"SecuritySchemePart"},is:{name:"is",range:"TraitRef",domain:"SecuritySchemePart"}}},SecuritySchemeSettings:{name:"SecuritySchemeSettings",properties:{}},AbstractSecurityScheme:{name:"AbstractSecurityScheme",properties:{name:{name:"name",range:"StringType",domain:"AbstractSecurityScheme"},type:{name:"type",range:"StringType",domain:"AbstractSecurityScheme"},description:{name:"description",range:"MarkdownString",domain:"AbstractSecurityScheme"},describedBy:{name:"describedBy",range:"SecuritySchemePart",domain:"AbstractSecurityScheme"},settings:{name:"settings",range:"SecuritySchemeSettings",domain:"AbstractSecurityScheme"}}},SecuritySchemeRef:{name:"SecuritySchemeRef",properties:{securitySchemeName:{name:"securitySchemeName"},securityScheme:{name:"securityScheme"}}},OAuth1SecuritySchemeSettings:{name:"OAuth1SecuritySchemeSettings",properties:{requestTokenUri:{name:"requestTokenUri",range:"FixedUri",domain:"OAuth1SecuritySchemeSettings"},authorizationUri:{name:"authorizationUri",range:"FixedUri",domain:"OAuth1SecuritySchemeSettings"},tokenCredentialsUri:{name:"tokenCredentialsUri",range:"FixedUri",domain:"OAuth1SecuritySchemeSettings"}}},OAuth2SecuritySchemeSettings:{name:"OAuth2SecuritySchemeSettings",properties:{accessTokenUri:{name:"accessTokenUri",range:"FixedUri",domain:"OAuth2SecuritySchemeSettings"},authorizationUri:{name:"authorizationUri",range:"FixedUri",domain:"OAuth2SecuritySchemeSettings"},authorizationGrants:{name:"authorizationGrants",range:"StringType",domain:"OAuth2SecuritySchemeSettings"},scopes:{name:"scopes",range:"StringType",domain:"OAuth2SecuritySchemeSettings"}}},OAuth2SecurityScheme:{name:"OAuth2SecurityScheme",properties:{name:{name:"name",range:"StringType",domain:"AbstractSecurityScheme"},type:{name:"type",range:"StringType",domain:"AbstractSecurityScheme"},description:{name:"description",range:"MarkdownString",domain:"AbstractSecurityScheme"},describedBy:{name:"describedBy",range:"SecuritySchemePart",domain:"AbstractSecurityScheme"},settings:{name:"settings",range:"OAuth2SecuritySchemeSettings",domain:"OAuth2SecurityScheme"}}},OAuth1SecurityScheme:{name:"OAuth1SecurityScheme",properties:{name:{name:"name",range:"StringType",domain:"AbstractSecurityScheme"},type:{name:"type",range:"StringType",domain:"AbstractSecurityScheme"},description:{name:"description",range:"MarkdownString",domain:"AbstractSecurityScheme"},describedBy:{name:"describedBy",range:"SecuritySchemePart",domain:"AbstractSecurityScheme"},settings:{name:"settings",range:"OAuth1SecuritySchemeSettings",domain:"OAuth1SecurityScheme"}}},BasicSecurityScheme:{name:"BasicSecurityScheme",properties:{name:{name:"name",range:"StringType",domain:"AbstractSecurityScheme"},type:{name:"type",range:"StringType",domain:"AbstractSecurityScheme"},description:{name:"description",range:"MarkdownString",domain:"AbstractSecurityScheme"},describedBy:{name:"describedBy",range:"SecuritySchemePart",domain:"AbstractSecurityScheme"},settings:{name:"settings",range:"SecuritySchemeSettings",domain:"AbstractSecurityScheme"}}},DigestSecurityScheme:{name:"DigestSecurityScheme",properties:{name:{name:"name",range:"StringType",domain:"AbstractSecurityScheme"},type:{name:"type",range:"StringType",domain:"AbstractSecurityScheme"},description:{name:"description",range:"MarkdownString",domain:"AbstractSecurityScheme"},describedBy:{name:"describedBy",range:"SecuritySchemePart",domain:"AbstractSecurityScheme"},settings:{name:"settings",range:"SecuritySchemeSettings",domain:"AbstractSecurityScheme"}}},CustomSecurityScheme:{name:"CustomSecurityScheme",properties:{name:{name:"name",range:"StringType",domain:"AbstractSecurityScheme"},type:{name:"type",range:"StringType",domain:"AbstractSecurityScheme"},description:{name:"description",range:"MarkdownString",domain:"AbstractSecurityScheme"},describedBy:{name:"describedBy",range:"SecuritySchemePart",domain:"AbstractSecurityScheme"},settings:{name:"settings",range:"SecuritySchemeSettings",domain:"AbstractSecurityScheme"}}}},Universe10:{Library:{name:"Library",properties:{annotations:{name:"annotations"},uses:{name:"uses"},schemas:{name:"schemas"},types:{name:"types"},traits:{name:"traits"},resourceTypes:{name:"resourceTypes"},annotationTypes:{name:"annotationTypes"},securitySchemes:{name:"securitySchemes"},usage:{name:"usage"},name:{name:"name"}}},LibraryBase:{name:"LibraryBase",properties:{annotations:{name:"annotations"},uses:{name:"uses"},schemas:{name:"schemas"},types:{name:"types"},traits:{name:"traits"},resourceTypes:{name:"resourceTypes"},annotationTypes:{name:"annotationTypes"},securitySchemes:{name:"securitySchemes"}}},Api:{name:"Api",properties:{annotations:{name:"annotations"},uses:{name:"uses"},schemas:{name:"schemas"},types:{name:"types"},traits:{name:"traits"},resourceTypes:{name:"resourceTypes"},annotationTypes:{name:"annotationTypes"},securitySchemes:{name:"securitySchemes"},title:{name:"title"},description:{name:"description"},version:{name:"version"},baseUri:{name:"baseUri"},baseUriParameters:{name:"baseUriParameters"},protocols:{name:"protocols"},mediaType:{name:"mediaType"},securedBy:{name:"securedBy"},resources:{name:"resources"},documentation:{name:"documentation"},RAMLVersion:{name:"RAMLVersion",range:"StringType",domain:"Api"}}},Overlay:{name:"Overlay",properties:{annotations:{name:"annotations"},uses:{name:"uses"},schemas:{name:"schemas"},types:{name:"types"},traits:{name:"traits"},resourceTypes:{name:"resourceTypes"},annotationTypes:{name:"annotationTypes"},securitySchemes:{name:"securitySchemes"},title:{name:"title"},description:{name:"description"},version:{name:"version"},baseUri:{name:"baseUri"},baseUriParameters:{name:"baseUriParameters"},protocols:{name:"protocols"},mediaType:{name:"mediaType"},securedBy:{name:"securedBy"},resources:{name:"resources"},documentation:{name:"documentation"},usage:{name:"usage"},extends:{name:"extends"}}},Extension:{name:"Extension",properties:{annotations:{name:"annotations"},uses:{name:"uses"},schemas:{name:"schemas"},types:{name:"types"},traits:{name:"traits"},resourceTypes:{name:"resourceTypes"},annotationTypes:{name:"annotationTypes"},securitySchemes:{name:"securitySchemes"},title:{name:"title"},description:{name:"description"},version:{name:"version"},baseUri:{name:"baseUri"},baseUriParameters:{name:"baseUriParameters"},protocols:{name:"protocols"},mediaType:{name:"mediaType"},securedBy:{name:"securedBy"},resources:{name:"resources"},documentation:{name:"documentation"},usage:{name:"usage"},extends:{name:"extends"}}},UsesDeclaration:{name:"UsesDeclaration",properties:{annotations:{name:"annotations"},key:{name:"key"},value:{name:"value"}}},FragmentDeclaration:{name:"FragmentDeclaration",properties:{annotations:{name:"annotations"},uses:{name:"uses"}}},DocumentationItem:{name:"DocumentationItem",properties:{annotations:{name:"annotations"},title:{name:"title"},content:{name:"content"}}},ValueType:{name:"ValueType",properties:{annotations:{name:"annotations"}}},StringType:{name:"StringType",properties:{annotations:{name:"annotations"}}},AnyType:{name:"AnyType",properties:{annotations:{name:"annotations"}}},NumberType:{name:"NumberType",properties:{annotations:{name:"annotations"}}},IntegerType:{name:"IntegerType",properties:{annotations:{name:"annotations"}}},NullType:{name:"NullType",properties:{annotations:{name:"annotations"}}},TimeOnlyType:{name:"TimeOnlyType",properties:{annotations:{name:"annotations"}}},DateOnlyType:{name:"DateOnlyType",properties:{annotations:{name:"annotations"}}},DateTimeOnlyType:{name:"DateTimeOnlyType",properties:{annotations:{name:"annotations"}}},DateTimeType:{name:"DateTimeType",properties:{annotations:{name:"annotations"}}},FileType:{name:"FileType",properties:{annotations:{name:"annotations"}}},BooleanType:{name:"BooleanType",properties:{annotations:{name:"annotations"}}},Reference:{name:"Reference",properties:{annotations:{name:"annotations"},structuredValue:{name:"structuredValue",range:"TypeInstance",domain:"Reference"},name:{name:"name",range:"StringType",domain:"Reference"}}},UriTemplate:{name:"UriTemplate",properties:{annotations:{name:"annotations"}}},StatusCodeString:{name:"StatusCodeString",properties:{annotations:{name:"annotations"}}},RelativeUriString:{name:"RelativeUriString",properties:{annotations:{name:"annotations"}}},FullUriTemplateString:{name:"FullUriTemplateString",properties:{annotations:{name:"annotations"}}},FixedUriString:{name:"FixedUriString",properties:{annotations:{name:"annotations"}}},ContentType:{name:"ContentType",properties:{annotations:{name:"annotations"}}},MarkdownString:{name:"MarkdownString",properties:{annotations:{name:"annotations"}}},SchemaString:{name:"SchemaString",properties:{annotations:{name:"annotations"}}},ExampleSpec:{name:"ExampleSpec",properties:{annotations:{name:"annotations"},value:{name:"value"},strict:{name:"strict"},name:{name:"name"},displayName:{name:"displayName"},description:{name:"description"},structuredValue:{name:"structuredValue",range:"TypeInstance",domain:"ExampleSpec"}}},TypeDeclaration:{name:"TypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},fixedFacets:{name:"fixedFacets",range:"TypeInstance",domain:"TypeDeclaration"},structuredType:{name:"structuredType",range:"TypeInstance",domain:"TypeDeclaration"},parametrizedProperties:{name:"parametrizedProperties",range:"TypeInstance",domain:"TypeDeclaration"}}},XMLFacetInfo:{name:"XMLFacetInfo",properties:{annotations:{name:"annotations"},attribute:{name:"attribute"},wrapped:{name:"wrapped"},name:{name:"name"},namespace:{name:"namespace"},prefix:{name:"prefix"}}},ArrayTypeDeclaration:{name:"ArrayTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},uniqueItems:{name:"uniqueItems"},items:{name:"items"},minItems:{name:"minItems"},maxItems:{name:"maxItems"},structuredItems:{name:"structuredItems",range:"TypeInstance",domain:"ArrayTypeDeclaration"}}},UnionTypeDeclaration:{name:"UnionTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"}}},ObjectTypeDeclaration:{name:"ObjectTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},properties:{name:"properties"},minProperties:{name:"minProperties"},maxProperties:{name:"maxProperties"},additionalProperties:{name:"additionalProperties"},discriminator:{name:"discriminator"},discriminatorValue:{name:"discriminatorValue"},enum:{name:"enum"}}},StringTypeDeclaration:{name:"StringTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},pattern:{name:"pattern"},minLength:{name:"minLength"},maxLength:{name:"maxLength"},enum:{name:"enum"}}},BooleanTypeDeclaration:{name:"BooleanTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},enum:{name:"enum"}}},NumberTypeDeclaration:{name:"NumberTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},minimum:{name:"minimum"},maximum:{name:"maximum"},enum:{name:"enum"},format:{name:"format"},multipleOf:{name:"multipleOf"}}},IntegerTypeDeclaration:{name:"IntegerTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},minimum:{name:"minimum"},maximum:{name:"maximum"},enum:{name:"enum"},format:{name:"format"},multipleOf:{name:"multipleOf"}}},DateOnlyTypeDeclaration:{name:"DateOnlyTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"}}},TimeOnlyTypeDeclaration:{name:"TimeOnlyTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"}}},DateTimeOnlyTypeDeclaration:{name:"DateTimeOnlyTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"}}},DateTimeTypeDeclaration:{name:"DateTimeTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},format:{name:"format"}}},TypeInstance:{name:"TypeInstance",properties:{properties:{name:"properties"},isScalar:{name:"isScalar"},value:{name:"value"},isArray:{name:"isArray"},items:{name:"items"}}},TypeInstanceProperty:{name:"TypeInstanceProperty",properties:{name:{name:"name"},value:{name:"value"},values:{name:"values"},isArray:{name:"isArray"}}},ModelLocation:{name:"ModelLocation",properties:{}},LocationKind:{name:"LocationKind",properties:{}},MimeType:{name:"MimeType",properties:{annotations:{name:"annotations"}}},Response:{name:"Response",properties:{annotations:{name:"annotations"},code:{name:"code"},headers:{name:"headers"},body:{name:"body"},description:{name:"description"},parametrizedProperties:{name:"parametrizedProperties",range:"TypeInstance",domain:"Response"}}},Annotable:{name:"Annotable",properties:{annotations:{name:"annotations"}}},AnnotationRef:{name:"AnnotationRef",properties:{annotations:{name:"annotations"},annotation:{name:"annotation",range:"TypeDeclaration",domain:"AnnotationRef"}}},AnnotationTarget:{name:"AnnotationTarget",properties:{annotations:{name:"annotations"}}},TraitRef:{name:"TraitRef",properties:{annotations:{name:"annotations"},trait:{name:"trait",range:"Trait",domain:"TraitRef"}}},Trait:{name:"Trait",properties:{annotations:{name:"annotations"},queryParameters:{name:"queryParameters"},headers:{name:"headers"},queryString:{name:"queryString"},responses:{name:"responses"},body:{name:"body"},protocols:{name:"protocols"},is:{name:"is"},securedBy:{name:"securedBy"},description:{name:"description"},displayName:{name:"displayName"},name:{name:"name"},usage:{name:"usage"},parametrizedProperties:{name:"parametrizedProperties",range:"TypeInstance",domain:"Trait"}}},MethodBase:{name:"MethodBase",properties:{annotations:{name:"annotations"},queryParameters:{name:"queryParameters"},headers:{name:"headers"},queryString:{name:"queryString"},responses:{name:"responses"},body:{name:"body"},protocols:{name:"protocols"},is:{name:"is"},securedBy:{name:"securedBy"},description:{name:"description"},displayName:{name:"displayName"}}},Method:{name:"Method",properties:{annotations:{name:"annotations"},queryParameters:{name:"queryParameters"},headers:{name:"headers"},queryString:{name:"queryString"},responses:{name:"responses"},body:{name:"body"},protocols:{name:"protocols"},is:{name:"is"},securedBy:{name:"securedBy"},description:{name:"description"},displayName:{name:"displayName"},method:{name:"method"},parametrizedProperties:{name:"parametrizedProperties",range:"TypeInstance",domain:"Method"}}},Operation:{name:"Operation",properties:{annotations:{name:"annotations"},queryParameters:{name:"queryParameters"},headers:{name:"headers"},queryString:{name:"queryString"},responses:{name:"responses"}}},SecuritySchemePart:{name:"SecuritySchemePart",properties:{annotations:{name:"annotations"},queryParameters:{name:"queryParameters"},headers:{name:"headers"},queryString:{name:"queryString"},responses:{name:"responses"}}},SecuritySchemeSettings:{name:"SecuritySchemeSettings",properties:{annotations:{name:"annotations"}}},OAuth1SecuritySchemeSettings:{name:"OAuth1SecuritySchemeSettings",properties:{annotations:{name:"annotations"},requestTokenUri:{name:"requestTokenUri"},authorizationUri:{name:"authorizationUri"},tokenCredentialsUri:{name:"tokenCredentialsUri"},signatures:{name:"signatures"}}},OAuth2SecuritySchemeSettings:{name:"OAuth2SecuritySchemeSettings",properties:{annotations:{name:"annotations"},accessTokenUri:{name:"accessTokenUri"},authorizationUri:{name:"authorizationUri"},authorizationGrants:{name:"authorizationGrants"},scopes:{name:"scopes"}}},SecuritySchemeRef:{name:"SecuritySchemeRef",properties:{annotations:{name:"annotations"},securitySchemeName:{name:"securitySchemeName",range:"StringType",domain:"SecuritySchemeRef"},securityScheme:{name:"securityScheme",range:"AbstractSecurityScheme",domain:"SecuritySchemeRef"}}},AbstractSecurityScheme:{name:"AbstractSecurityScheme",properties:{annotations:{name:"annotations"},name:{name:"name"},type:{name:"type"},description:{name:"description"},describedBy:{name:"describedBy"},displayName:{name:"displayName"},settings:{name:"settings"}}},OAuth2SecurityScheme:{name:"OAuth2SecurityScheme",properties:{annotations:{name:"annotations"},name:{name:"name"},type:{name:"type"},description:{name:"description"},describedBy:{name:"describedBy"},displayName:{name:"displayName"},settings:{name:"settings"}}},OAuth1SecurityScheme:{name:"OAuth1SecurityScheme",properties:{annotations:{name:"annotations"},name:{name:"name"},type:{name:"type"},description:{name:"description"},describedBy:{name:"describedBy"},displayName:{name:"displayName"},settings:{name:"settings"}}},PassThroughSecurityScheme:{name:"PassThroughSecurityScheme",properties:{annotations:{name:"annotations"},name:{name:"name"},type:{name:"type"},description:{name:"description"},describedBy:{name:"describedBy"},displayName:{name:"displayName"},settings:{name:"settings"}}},BasicSecurityScheme:{name:"BasicSecurityScheme",properties:{annotations:{name:"annotations"},name:{name:"name"},type:{name:"type"},description:{name:"description"},describedBy:{name:"describedBy"},displayName:{name:"displayName"},settings:{name:"settings"}}},DigestSecurityScheme:{name:"DigestSecurityScheme",properties:{annotations:{name:"annotations"},name:{name:"name"},type:{name:"type"},description:{name:"description"},describedBy:{name:"describedBy"},displayName:{name:"displayName"},settings:{name:"settings"}}},CustomSecurityScheme:{name:"CustomSecurityScheme",properties:{annotations:{name:"annotations"},name:{name:"name"},type:{name:"type"},description:{name:"description"},describedBy:{name:"describedBy"},displayName:{name:"displayName"},settings:{name:"settings"}}},ResourceTypeRef:{name:"ResourceTypeRef",properties:{annotations:{name:"annotations"},resourceType:{name:"resourceType",range:"ResourceType",domain:"ResourceTypeRef"}}},ResourceType:{name:"ResourceType",properties:{annotations:{name:"annotations"},methods:{name:"methods"},is:{name:"is"},type:{name:"type"},description:{name:"description"},securedBy:{name:"securedBy"},uriParameters:{name:"uriParameters"},displayName:{name:"displayName"},name:{name:"name"},usage:{name:"usage"},parametrizedProperties:{name:"parametrizedProperties",range:"TypeInstance",domain:"ResourceType"}}},ResourceBase:{name:"ResourceBase",properties:{annotations:{name:"annotations"},methods:{name:"methods"},is:{name:"is"},type:{name:"type"},description:{name:"description"},securedBy:{name:"securedBy"},uriParameters:{name:"uriParameters"}}},Resource:{name:"Resource",properties:{annotations:{name:"annotations"},methods:{name:"methods"},is:{name:"is"},type:{name:"type"},description:{name:"description"},securedBy:{name:"securedBy"},uriParameters:{name:"uriParameters"},relativeUri:{name:"relativeUri"},displayName:{name:"displayName"},resources:{name:"resources"}}},FileTypeDeclaration:{name:"FileTypeDeclaration",properties:{annotations:{name:"annotations"},name:{name:"name"},displayName:{name:"displayName"},facets:{name:"facets"},schema:{name:"schema"},type:{name:"type"},location:{name:"location"},locationKind:{name:"locationKind"},default:{name:"default"},example:{name:"example"},examples:{name:"examples"},required:{name:"required"},description:{name:"description"},xml:{name:"xml"},allowedTargets:{name:"allowedTargets"},isAnnotation:{name:"isAnnotation"},fileTypes:{name:"fileTypes"},minLength:{name:"minLength"},maxLength:{name:"maxLength"}}}}};e.exports=n},function(e,t){(function(e){"use strict";function n(e){return e.asElement&&e.getKind&&e.asAttr&&e.lowLevel}function r(){var t=e.ramlValidation;if(t){var n=t.nodeValidators;if(Array.isArray(n))return n}return[]}function i(){var t=e.ramlValidation;if(t){var n=t.astAnnotationValidators;if(Array.isArray(n))return n}return[]}Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){e[e.BASIC=0]="BASIC",e[e.NODE=1]="NODE",e[e.ATTRIBUTE=2]="ATTRIBUTE"}(a=t.NodeKind||(t.NodeKind={}));var o;!function(e){e[e.RAML10=0]="RAML10",e[e.RAML08=1]="RAML08"}(o=t.RAMLVersion||(t.RAMLVersion={})),t.isParseResult=n;var s;!function(e){e[e.UNRESOLVED_REFERENCE=0]="UNRESOLVED_REFERENCE",e[e.YAML_ERROR=1]="YAML_ERROR",e[e.UNKNOWN_NODE=2]="UNKNOWN_NODE",e[e.MISSING_REQUIRED_PROPERTY=3]="MISSING_REQUIRED_PROPERTY",e[e.PROPERTY_EXPECT_TO_HAVE_SINGLE_VALUE=4]="PROPERTY_EXPECT_TO_HAVE_SINGLE_VALUE",e[e.KEY_SHOULD_BE_UNIQUE_INTHISCONTEXT=5]="KEY_SHOULD_BE_UNIQUE_INTHISCONTEXT",e[e.UNABLE_TO_RESOLVE_INCLUDE_FILE=6]="UNABLE_TO_RESOLVE_INCLUDE_FILE",e[e.INVALID_VALUE_SCHEMA=7]="INVALID_VALUE_SCHEMA",e[e.MISSED_CONTEXT_REQUIREMENT=8]="MISSED_CONTEXT_REQUIREMENT",e[e.NODE_HAS_VALUE=9]="NODE_HAS_VALUE",e[e.ONLY_OVERRIDE_ALLOWED=10]="ONLY_OVERRIDE_ALLOWED",e[e.ILLEGAL_PROPERTY_VALUE=11]="ILLEGAL_PROPERTY_VALUE",e[e.ILLEGAL_PROPERTY=12]="ILLEGAL_PROPERTY",e[e.INVALID_PROPERTY=13]="INVALID_PROPERTY"}(s=t.IssueCode||(t.IssueCode={})),t.getNodeValidationPlugins=r,t.getNodeAnnotationValidationPlugins=i}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){var t=e;return t.valueName&&t.toHighLevel&&t.toHighLevel2}var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=n(20),s=n(200),u=n(4),l=n(15),p=n(204),c=n(56),f=n(205),h=n(206),d=n(16),m=n(207),y=function(){function e(e,t,n){this._parent=e,this._transformer=t,this.ramlVersion=n}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&d.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.hasInnerIncludeError=function(){ +return this._originalNode.hasInnerIncludeError()},e.prototype.keyKind=function(){return this._originalNode.keyKind()},e.prototype.primaryNode=function(){return null},e.prototype.isAnnotatedScalar=function(){return this._originalNode.isAnnotatedScalar()},e.prototype.actual=function(){return this._originalNode?this._originalNode.actual():this},e.prototype.transformer=function(){return this._transformer},e.prototype.setTransformer=function(e){this._transformer=e},e.prototype.originalNode=function(){return this._originalNode},e.prototype.start=function(){return this._originalNode.start()},e.prototype.end=function(){return this._originalNode.end()},e.prototype.value=function(e){throw new Error(m.METHOD_MUST_BE_OVERRIDDEN.message)},e.prototype.includeErrors=function(){return this._originalNode.includeErrors()},e.prototype.includePath=function(){return this._originalNode.includePath()},e.prototype.includeReference=function(){return this._originalNode.includeReference()},e.prototype.setKeyOverride=function(e){this._keyOverride=e},e.prototype.setValueOverride=function(e){this._valueOverride=e},e.prototype.key=function(e){return void 0===e&&(e=!1),this._keyOverride?this._keyOverride:this._originalNode.key(e)},e.prototype.optional=function(){return this.originalNode().optional()},e.prototype.children=function(){throw new Error(m.METHOD_MUST_BE_OVERRIDDEN.message)},e.prototype.parent=function(){return this._parent},e.prototype.unit=function(){return this._originalNode.unit()},e.prototype.containingUnit=function(){return this._originalNode.containingUnit()},e.prototype.includeBaseUnit=function(){return this._originalNode.unit()},e.prototype.anchorId=function(){return this._originalNode.anchorId()},e.prototype.errors=function(){return this._originalNode.errors()},e.prototype.anchoredFrom=function(){return this._originalNode.anchoredFrom()},e.prototype.includedFrom=function(){return this._originalNode.includedFrom()},e.prototype.visit=function(e){e(this)&&this.children().forEach(function(t){return t.visit(e)})},e.prototype.addChild=function(e){},e.prototype.execute=function(e){},e.prototype.dump=function(){return null},e.prototype.dumpToObject=function(e){var t=o.serialize2(this,e);if(this.kind()==a.Kind.MAPPING){var n={};return n[this.key(!0)]=t,n}return t},e.prototype.keyStart=function(){return this._originalNode.keyStart()},e.prototype.keyEnd=function(){return this._originalNode.keyEnd()},e.prototype.valueStart=function(){return this._originalNode.valueStart()},e.prototype.valueEnd=function(){return this._originalNode.valueEnd()},e.prototype.isValueLocal=function(){return this._originalNode.isValueLocal()},e.prototype.kind=function(){return this._originalNode.kind()},e.prototype.valueKind=function(){return this._originalNode.valueKind()},e.prototype.anchorValueKind=function(){return this._originalNode.anchorValueKind()},e.prototype.resolvedValueKind=function(){return this._originalNode.resolvedValueKind()},e.prototype.show=function(e){this._originalNode.show(e)},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode?this._highLevelNode:this._originalNode.highLevelNode()},e.prototype.text=function(e){throw new Error(m.NOT_IMPLEMENTED.message)},e.prototype.copy=function(){throw new Error(m.NOT_IMPLEMENTED.message)},e.prototype.markup=function(e){throw new Error(m.NOT_IMPLEMENTED.message)},e.prototype.nodeDefinition=function(){return u.getDefinitionForLowLevelNode(this)},e.prototype.includesContents=function(){return this._originalNode.includesContents()},e.prototype.root=function(){for(var e=this;e.parent();){var t=e.parent();e=t}return e},e.prototype.find=function(e){var t=null;return this.children().forEach(function(n){n.key()&&n.key()==e&&(t||(t=n))}),t},e.prototype.isMap=function(){return this.kind()==a.Kind.MAP},e.prototype.isMapping=function(){return this.kind()==a.Kind.MAPPING},e.prototype.isSeq=function(){return this.kind()==a.Kind.SEQ},e.prototype.isScalar=function(){return this.kind()==a.Kind.SCALAR},e.prototype.isValueSeq=function(){return this.valueKind()==a.Kind.SEQ},e.prototype.isValueMap=function(){return this.valueKind()==a.Kind.MAP},e.prototype.isValueInclude=function(){return this.valueKind()==a.Kind.INCLUDE_REF},e.prototype.isValueScalar=function(){return this.valueKind()==a.Kind.SCALAR},e.prototype.definingUnitSequence=function(){var e=h.toOriginal(this).key(),t=this.transformer();return t?t.definingUnitSequence(e):null},e.prototype.addMeta=function(e,t){this._meta=this._meta||{},this._meta[e]=t},e.prototype.getMeta=function(e){return this._meta&&this._meta[e]},e.CLASS_IDENTIFIER="LowLevelASTProxy.LowLevelProxyNode",e}();t.LowLevelProxyNode=y;var v=function(e){function t(t,n,r,i,a){void 0===a&&(a=!0);var o=e.call(this,n,r,i)||this;o.isPrimary=a,o._adoptedNodes=[],o._preserveAnnotations=!1,o.nonMergableChildren={};var s=o.parent()?o.parent().originalNode():null;return g.isInstance(t)?o._originalNode=t:o._originalNode=new g(t,s,r,o.ramlVersion),o._adoptedNodes.push(o._originalNode),o}return i(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&d.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelCompositeNode)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_LowLevelCompositeNode)},t.prototype.originalNode=function(){return this._originalNode},t.prototype.adoptedNodes=function(){return this._adoptedNodes},t.prototype.primaryNode=function(){return this.isPrimary?this._originalNode:null},t.prototype.parent=function(){return this._parent},t.prototype.adopt=function(e,t){for(;y.isInstance(e);)e=e.originalNode();t||(t=this._transformer);var n=this.parent()?this.parent().originalNode():null,r=new g(e,n,t,this.ramlVersion);this._adoptedNodes.push(r),this._children&&this._children.forEach(function(e){return e._parent=null}),this._children=null,this.highLevelNode()&&this.highLevelNode().resetChildren()},t.prototype.value=function(e){if(this._valueOverride)return this._valueOverride;var t,n=this._adoptedNodes.filter(function(e){return null!=e.value()});if(t=n.length>0?n[0].value(e):this._originalNode.value(e),g.isInstance(t)){var r=t.key();if(r)for(var i=this;1==i.children().length&&(i.kind()==a.Kind.MAPPING||i.kind()==a.Kind.MAP||i.kind()==a.Kind.SEQ);)if(i=i.children()[0],i.originalNode().key()==r){t=i;break}this._valueOverride=t}return t},t.prototype.patchAdoptedNodes=function(e){var t=this;this._adoptedNodes=[],e.forEach(function(e){return t.adopt(e.node,e.transformer)}),this._adoptedNodes.length>0&&(this._originalNode=this._adoptedNodes[0]),this.resetChildren()},t.prototype.children=function(){var e=this;if(this._children)return this._children;for(var n=[],r=!1,i=!1,o=0,s=this._adoptedNodes;o0&&(i=!0,l[0].key()&&this.originalNode().valueKind()!=a.Kind.SEQ&&(r=!0)),r&&i)break}if(r)n=this.collectChildrenWithKeys();else if(i){n=this.collectChildrenWithKeys();var p={};this._adoptedNodes.forEach(function(r){return r.children().filter(function(e){return!e.key()}).forEach(function(i){var a=r==e.primaryNode(),o=e.buildKey(i);if(a||!p[o]){p[o]=!0;var s=r.transformer()?r.transformer():e.transformer(),u=g.isInstance(i)?i.originalNode():i;n.push(new t(u,e,s,e.ramlVersion,a))}})})}else n=[];return this._children=n,this._preserveAnnotations&&this._children.forEach(function(e){return e.preserveAnnotations()}),n},t.prototype.buildKey=function(e){var t=o.serialize(e),n=this.nodeDefinition();if(n&&(n.key()==p.Universe08.TraitRef||n.key()==p.Universe08.ResourceTypeRef||n.key()==p.Universe10.TraitRef||n.key()==p.Universe10.ResourceTypeRef)&&t&&"object"==typeof t){var r=Object.keys(t);r.length>0&&(t=r[0])}return null==t?"":s(t)},t.prototype.collectChildrenWithKeys=function(){for(var e=this,n=[],r={},i=0,a=this._adoptedNodes;i=0;if(a.forEach(function(t){var n=t.node.optional()&&("RAML10"!=e.ramlVersion||v&&u);o=o&&n,s=s||t.isPrimary}),s){var l=[];a.filter(function(e){return e.isPrimary}).forEach(function(n){var r=n.transformer?n.transformer:e.transformer();l.push(new t(n.node,e,r,e.ramlVersion,!0))});var p=l[0];a.filter(function(e){return!e.isPrimary}).forEach(function(e){p.adopt(e.node,e.transformer)}),l.forEach(function(e){return n.push(e)})}else if(!o){for(var c=a[0].transformer?a[0].transformer:e.transformer(),p=new t(a[0].node,e,c,e.ramlVersion,!1),f=1;f=0?this._children[o]=a:this._children.push(a),a},t.prototype.removeChild=function(e){if(this._children&&null!=e){var t=this._children.indexOf(e);if(t>=0){for(var n=t;n="0"&&r<="9";)t+=r,u();if("."===r)for(t+=".";u()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,u(),"-"!==r&&"+"!==r||(t+=r,u());r>="0"&&r<="9";)t+=r,u();return e=+t,isFinite(e)?e:void s("Bad number")},p=function(){var e,t,n,i="";if('"'===r)for(;u();){if('"'===r)return u(),i;if("\\"===r)if(u(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if("string"!=typeof o[r])break;i+=o[r]}else i+=r}s("Bad string")},c=function(){for(;r&&r<=" ";)u()},f=function(){switch(r){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}s("Unexpected '"+r+"'")},h=function(){var e=[];if("["===r){if(u("["),c(),"]"===r)return u("]"),e;for(;r;){if(e.push(a()),c(),"]"===r)return u("]"),e;u(","),c()}}s("Bad array")},d=function(){var e,t={};if("{"===r){if(u("{"),c(),"}"===r)return u("}"),t;for(;r;){if(e=p(),c(),u(":"),Object.hasOwnProperty.call(t,e)&&s('Duplicate key "'+e+'"'),t[e]=a(),c(),"}"===r)return u("}"),t;u(","),c()}}s("Bad object")};a=function(){switch(c(),r){case"{":return d();case"[":return h();case'"':return p();case"-":return l();default:return r>="0"&&r<="9"?l():f()}},e.exports=function(e,t){var o;return i=e,n=0,r=" ",o=a(),c(),r&&s("Syntax error"),"function"==typeof t?function e(n,r){var i,a,o=n[r];if(o&&"object"==typeof o)for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(a=e(o,i),void 0!==a?o[i]=a:delete o[i]);return t.call(n,r,o)}({"":o},""):o}},function(e,t){function n(e){return s.lastIndex=0,s.test(e)?'"'+e.replace(s,function(e){var t=u[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function r(e,t){var s,u,l,p,c,f=i,h=t[e];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(e)),"function"==typeof o&&(h=o.call(t,e,h)),typeof h){case"string":return n(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(i+=a,c=[],"[object Array]"===Object.prototype.toString.apply(h)){for(p=h.length,s=0;s=0;i=e.indexOf("<<",r)){if(t+=e.substring(r,i),r=e.indexOf(">>",i),r<0)return{status:S.ERROR};r+=">>".length;var a=e.substring(i,r),o=N+i+N;n[o]=a,t+=o}return 0==t.length?{status:S.NOT_REQUIRED}:(t+=e.substring(r,e.length),{resultingString:t,substitutions:n,status:S.OK})}function i(e,t){if(null==e)return{status:S.NOT_REQUIRED};for(var n="",r=0,i=e.indexOf(N);i>=0;i=e.indexOf(N,r)){if(n+=e.substring(r,i),r=e.indexOf(N,i+1),r<0)return{status:S.ERROR};r+=N.length;var a=e.substring(i,r),o=t[a];if(null==o)return{status:S.ERROR};n+=o}return 0==n.length?{status:S.NOT_REQUIRED}:(n+=e.substring(r,e.length),{resultingString:n,substitutions:t,status:S.OK})}function a(e){var t=!1;if(!e)return!1;if("?"==e.charAt(e.length-1))t=!0;else for(var n=0;n=0&&(i=e.substring(0,o),a=e.substring(o+1));for(var s,u=!1,l=n.length;l>0;l--){var p=n[l-1],c=p.highLevel();if(c.isElement()&&T.isLibraryType(c.asElement().definition())){if(u)break;u=!0}var f=p;if(i){f=null;var h=r.nsMap(p);if(h){var d=h[i];d&&(f=d.unit)}}if(f){var m=f.highLevel();if(m&&m.isElement()&&(s=_.find(m.asElement().elementsOfKind(t),function(e){return e.name()==a})))break}}return s}function f(e){var t=e.indexOf("<<");if(t<0)return!1;if(0!=t)return!0;var n=e.indexOf(">>",t);return n+">>".length!=e.length}function h(e){var t,n=e.getExtra("SOURCE");if(m.LowLevelWrapperForTypeSystem.isInstance(n))t=n.node();else if(m.ASTNodeImpl.isInstance(n))t=n.lowLevel();else if(v.ASTNode.isInstance(n)||A.LowLevelProxyNode.isInstance(n)||g.AstNode.isInstance(n));if(!t)return null;var r=t.unit();return r}Object.defineProperty(t,"__esModule",{value:!0});var d,m=n(55),y=n(21),v=n(4),g=n(20),A=n(199),E=n(204),_=n(16),T=n(205);!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.PATH=1]="PATH"}(d=t.PatchMode||(t.PatchMode={}));var S;!function(e){e[e.OK=0]="OK",e[e.NOT_REQUIRED=1]="NOT_REQUIRED",e[e.ERROR=2]="ERROR"}(S=t.ParametersEscapingStatus||(t.ParametersEscapingStatus={}));var N="__P_A_R_A_M_E_T_E_R__";t.escapeTemplateParameters=r,t.unescapeTemplateParameters=i,t.checkExpression=a,t.patchMethodIs=s,t.prepareTraitRefNode=u,t.toOriginal=l;var I=function(){function e(e,t,n,r,i,a){this._namespace=e,this._name=t,this._collectionName=n,this._referencedUnit=r,this._isChained=i,this._mode=a,this.gotQuestion=!1;var o=this._name.length;"string"!=typeof this._name&&(this._name=""+this._name),this._name&&"?"==this._name.charAt(o-1)&&(this.gotQuestion=!0,this._name=this._name.substring(0,o-1))}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&_.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER_PatchedReference)},e.prototype.getClassIdentifier=function(){return[e.CLASS_IDENTIFIER_PatchedReference]},e.prototype.namespace=function(){return this._namespace},e.prototype.name=function(){return this._name},e.prototype.collectionName=function(){return this._collectionName},e.prototype.referencedUnit=function(){return this._referencedUnit},e.prototype.mode=function(){return this._mode},e.prototype.value=function(){if(null==this._namespace)return this._name;var e=this._mode==d.PATH?"/":".";return this._namespace+e+this._name+(this.gotQuestion?"?":"")},e.prototype.isChained=function(){return this._isChained},e.CLASS_IDENTIFIER_PatchedReference="referencePatcher.PatchedReference",e}();t.PatchedReference=I,t.instanceOfPatchedReference=p;(function(){function e(e){this.name=e,this.array=[]}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&_.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.CLASS_IDENTIFIER="referencePatcher.ElementsCollection",e})(),function(){function e(e){this.unit=e}return e}();t.getDeclaration=c,t.isCompoundValue=f;t.typeUnit=h},function(e,t){e.exports={34:{code:"34",message:""},INVALID_PARAMETER_NAME:{code:"INVALID_PARAMETER_NAME",message:"Invalid parameter name: '{{paramName}}' is reserved"},UNUSED_PARAMETER:{code:"UNUSED_PARAMETER",message:"Unused parameter: '{{paramName}}'"},UNUSED_PARAMETER_MISSING_SEPARATING_SPACE:{code:"UNUSED_PARAMETER_MISSING_SEPARATING_SPACE",message:"Unused parameter: '{{paramName}}'. Probably, separating space is missing after colon and supposed mapping is '{{correctMapping}}'"},INVALID_PROPERTY_OWNER_TYPE:{code:"INVALID_PROPERTY_OWNER_TYPE",message:"Property '{{propName}}' can only be used if type is {{namesStr}}"},NODE_KEY_IS_A_MAP:{code:"NODE_KEY_IS_A_MAP",message:"Node key can not be a map"},NODE_KEY_IS_A_SEQUENCE:{code:"NODE_KEY_IS_A_SEQUENCE",message:"Node key can not be a sequence"},SEQUENCE_REQUIRED:{code:"SEQUENCE_REQUIRED",message:"Node: '{{name}}' should be wrapped in sequence"},PROPERTY_MUST_BE_A_MAP_10:{code:"PROPERTY_MUST_BE_A_MAP_10",message:"'{{propName}}' should be a map in RAML 1.0"},PROPERTY_MUST_BE_A_MAP:{code:"PROPERTY_MUST_BE_A_MAP",message:"Property '{{propName}}' should be a map"},PROPERTY_MUST_BE_A_SEQUENCE:{code:"PROPERTY_MUST_BE_A_SEQUENCE",message:"Property '{{propName}}' should be a sequence"},INVALID_PROPERTY_RANGE:{code:"INVALID_PROPERTY_RANGE",message:"Property '{{propName}}' must be a {{range}}"},MAP_REQUIRED:{code:"MAP_REQUIRED",message:"should be a map in RAML 1.0"},UNRESOLVED_REFERENCE:{code:"UNRESOLVED_REFERENCE",message:"Reference: '{{ref}}' can not be resolved"},SCALAR_PROHIBITED:{code:"SCALAR_PROHIBITED",message:"Property '{{propName}}' can not have scalar value"},UNKNOWN_NODE:{code:"UNKNOWN_NODE",message:"Unknown node: '{{name}}'"},INVALID_PROPERTY_USAGE:{code:"INVALID_PROPERTY_USAGE",message:"{{ramlVersion}} does not allow using '{{propName}}' property within {{typeName | !pluralize |!sentencecase | !lowercase}}"},INVALID_SUBRESOURCE_USAGE:{code:"INVALID_SUBRESOURCE_USAGE",message:"Subresources are not allowed in {{typeName | !pluralize |!sentencecase | !lowercase}}"},INVALID_METHOD_USAGE:{code:"INVALID_METHOD_USAGE",message:"Declaring methods is not allowed in {{typeName | !pluralize |!sentencecase | !lowercase}}"},RECURSIVE_DEFINITION:{code:"RECURSIVE_DEFINITION",message:"Recursive definition: '{{name}}'"},QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE:{code:"QUERY_STRING_AND_QUERY_PARAMETERS_ARE_MUTUALLY_EXCLUSIVE",message:"'queryString' and 'queryParameters' properties are mutually exclusive. '{{propName}}' is already specified."},ISSUES_IN_THE_LIBRARY:{code:"ISSUES_IN_THE_LIBRARY",message:"Issues in the used library: '{{value}}'"},INVALID_LIBRARY_PATH:{code:"INVALID_LIBRARY_PATH",message:"Can not resolve library from path: '{{path}}'"},EMPTY_FILE:{code:"EMPTY_FILE",message:"Empty file: {{path}}"},SPACES_IN_KEY:{code:"SPACES_IN_KEY",message:"Keys should not have spaces '{{value}}'"},INCLUDE_ERROR:{code:"INCLUDE_ERROR",message:"{{msg}}"},PATH_EXCEEDS_ROOT:{code:"PATH_EXCEEDS_ROOT",message:"Resolved include path exceeds file system root"},ILLEGAL_PATTERN:{code:"ILLEGAL_PATTERN",message:"Illegal pattern: '{{value}}'"},UNKNOWN_FUNCTION:{code:"UNKNOWN_FUNCTION",message:"Unknown function applied to parameter: '{{transformerName}}'"},REQUEST_BODY_DISABLED:{code:"REQUEST_BODY_DISABLED",message:"Request body is disabled for '{{methodName}}' method."},SCALAR_EXPECTED:{code:"SCALAR_EXPECTED",message:"Scalar is expected here"},UNKNOWN_ANNOTATION:{code:"UNKNOWN_ANNOTATION",message:"Unknown annotation: '{{aName}}'"},SECUREDBY_LIST_08:{code:"SECUREDBY_LIST_08",message:"'securedBy' should be a list in RAML08"},INVALID_ANNOTATION_LOCATION:{code:"INVALID_ANNOTATION_LOCATION",message:"Annotation '{{aName}}' can not be placed at this location, allowed targets are: {{aValues}}"},BOOLEAN_EXPECTED:{code:"BOOLEAN_EXPECTED",message:"'true' or 'false' is expected here"},NUMBER_EXPECTED:{code:"NUMBER_EXPECTED",message:"Value of '{{propName}}' must be a number"},STATUS_MUST_BE_3NUMBER:{code:"STATUS_MUST_BE_3NUMBER",message:"Status code should be 3 digits number."},EMPTY_VALUE_NOT_ALLOWED:{code:"EMPTY_VALUE_NOT_ALLOWED",message:"Empty value is not allowed here"},INVALID_VALUE_SCHEMA:{code:"INVALID_VALUE_SCHEMA",message:"Invalid value schema: '{{iValue}}'"},INVALID_VALUE:{code:"INVALID_VALUE",message:"Invalid value: '{{iValue}}'. Allowed values are: {{aValues}}"},SCHEMA_EXCEPTION:{code:"SCHEMA_EXCEPTION",message:"Schema exception: {{msg}}"},SCHEMA_ERROR:{code:"SCHEMA_ERROR",message:"{{msg}}"},MISSING_VERSION:{code:"MISSING_VERSION",message:"Missing 'version'"},URI_PARAMETER_NAME_MISSING:{code:"URI_PARAMETER_NAME_MISSING",message:"URI parameter must have name specified"},URI_EXCEPTION:{code:"URI_EXCEPTION",message:"{{msg}}"},INVALID_MEDIATYPE:{code:"INVALID_MEDIATYPE",message:"Invalid media type '{{mediaType}}'"},MEDIATYPE_EXCEPTION:{code:"MEDIATYPE_EXCEPTION",message:"{{msg}}"},FORM_IN_RESPONSE:{code:"FORM_IN_RESPONSE",message:"Form related media types can not be used in responses"},UNUSED_URL_PARAMETER:{code:"UNUSED_URL_PARAMETER",message:"Unused url parameter {{paramName}}"},UNRECOGNIZED_ELEMENT:{code:"UNRECOGNIZED_ELEMENT",message:"Unrecognized {{referencedToName}}: '{{ref}}'."},TYPES_VARIETY_RESTRICTION:{code:"TYPES_VARIETY_RESTRICTION",message:"Type can be either of: string, number, integer, file, date or boolean"},UNRECOGNIZED_SECURITY_SCHEME:{code:"UNRECOGNIZED_SECURITY_SCHEME",message:"Unrecognized security scheme type: '{{ref}}'. Allowed values are: 'OAuth 1.0', 'OAuth 2.0', 'Basic Authentication', 'DigestSecurityScheme Authentication', 'x-{other}'"},DUPLICATE_TRAIT_REFERENCE:{code:"DUPLICATE_TRAIT_REFERENCE",message:"Duplicate trait reference: '{{refValue}}'."},IS_IS_ARRAY:{code:"IS_IS_ARRAY",message:"Property 'is' must be an array"},RESOURCE_TYPE_NAME:{code:"RESOURCE_TYPE_NAME",message:"Resource type name must be provided"},MULTIPLE_RESOURCE_TYPES:{code:"MULTIPLE_RESOURCE_TYPES",message:"A resource or resourceType can inherit from a single resourceType"},UNKNOWN_RAML_VERSION:{code:"UNKNOWN_RAML_VERSION",message:"Unknown version of RAML expected to see one of '#%RAML 0.8' or '#%RAML 1.0'"},UNKNOWN_TOPL_LEVEL_TYPE:{code:"UNKNOWN_TOPL_LEVEL_TYPE",message:"Unknown top level type: '{{typeName}}'"},REDUNDANT_FRAGMENT_NAME:{code:"REDUNDANT_FRAGMENT_NAME",message:"Redundant fragment name: '{{typeName}}'"},CONTEXT_REQUIREMENT_VIOLATION:{code:"CONTEXT_REQUIREMENT_VIOLATION",message:"{{v1}} should be {{v2}} to use type {{v3}}"},WEB_FORMS:{code:"WEB_FORMS",message:"File type can be only used in web forms"},MISSING_REQUIRED_PROPERTY:{code:"MISSING_REQUIRED_PROPERTY",message:"Missing required property '{{propName}}'"},VALUE_FOR_REQUIRED_PROPERTY_NOT_PROVIDED:{code:"VALUE_FOR_REQUIRED_PROPERTY_NOT_PROVIDED",message:"Value is not provided for required property '{{propName}}'"},VALUE_NOT_PROVIDED:{code:"VALUE_NOT_PROVIDED",message:"Value is not provided for parameter: '{{propName}}'"},SUSPICIOUS_DOUBLEQUOTE:{code:"SUSPICIOUS_DOUBLEQUOTE",message:'Suspicious double quoted multiline scalar, it is likely that you forgot closing "{{value}}'},ANNOTATION_TARGET_MUST_BE_A_STRING:{code:"ANNOTATION_TARGET_MUST_BE_A_STRING",message:"Annotation target must be set by a string"},ALLOWED_TARGETS_MUST_BE_ARRAY:{code:"ALLOWED_TARGETS_MUST_BE_ARRAY",message:"'allowedTargets' property value must be an array of type names or a single type name"},UNSUPPORTED_ANNOTATION_TARGET:{code:"UNSUPPORTED_ANNOTATION_TARGET",message:"Unsupported annotation target: '{{aTarget}}'"},SCHEMA_NAME_MUST_BE_STRING:{code:"SCHEMA_NAME_MUST_BE_STRING",message:"Schema '{{name}}' must be a string"},FORM_PARAMS_IN_RESPONSE:{code:"FORM_PARAMS_IN_RESPONSE",message:"Form parameters can not be used in response"},FORM_PARAMS_WITH_EXAMPLE:{code:"FORM_PARAMS_WITH_EXAMPLE",message:"'formParameters' property cannot be used together with the 'example' or 'schema' properties"},AUTHORIZATION_GRANTS_ENUM:{code:"AUTHORIZATION_GRANTS_ENUM",message:"'authorizationGrants' value should be one of 'authorization_code', 'implicit', 'password', 'client_credentials' or to be an abolute URI"},AUTHORIZATION_URI_REQUIRED:{code:"AUTHORIZATION_URI_REQUIRED",message:"'authorizationUri' is required when `authorization_code` or `implicit` grant type are used "},REPEATING_COMPONENTS_IN_ENUM:{code:"REPEATING_COMPONENTS_IN_ENUM",message:"'enum' value contains repeating components"},INTEGER_EXPECTED:{code:"INTEGER_EXPECTED",message:"Integer is expected"},NUMBER_EXPECTED_2:{code:"NUMBER_EXPECTED_2",message:"Number is expected"},RESOURCE_TYPE_NULL:{code:"RESOURCE_TYPE_NULL",message:"Resource type can not be null"},SCALAR_PROHIBITED_2:{code:"SCALAR_PROHIBITED_2",message:"Node '{{name}}' can not be a scalar"},VERSION_NOT_ALLOWED:{code:"VERSION_NOT_ALLOWED",message:"'version' parameter not allowed here",comment:"I dont like the message, but its coming from JS 0.8 parser @Denis"},INVALID_OVERLAY_NODE:{code:"INVALID_OVERLAY_NODE",message:"The '{{nodeId}}' node does not match any node of the master api."},INVALID_OVERRIDE_IN_OVERLAY:{code:"INVALID_OVERRIDE_IN_OVERLAY",message:"Property '{{propName}}' is not allowed to be overriden or added in overlays"},KEYS_SHOULD_BE_UNIQUE:{code:"KEYS_SHOULD_BE_UNIQUE",message:"Keys should be unique"},ALREADY_EXISTS:{code:"ALREADY_EXISTS",message:"{{capitalized}} '{{name}}' already exists"},ALREADY_EXISTS_IN_CONTEXT:{code:"ALREADY_EXISTS_IN_CONTEXT",message:"{{name}}' already exists in this context"},PROPERTY_USED:{code:"PROPERTY_USED",message:"Property already used: '{{propName}}'"},PARENT_PROPERTY_USED:{code:"PARENT_PROPERTY_USED",message:"{{parent}} property already used: '{{propName}}'"},INVALID_JSON_SCHEMA:{code:"INVALID_JSON_SCHEMA",message:"Invalid JSON schema. Unexpected value '{{propName}}'"},EXAMPLE_SCHEMA_FAILURE:{code:"EXAMPLE_SCHEMA_FAILURE",message:"Example does not conform to schema: {{msg}}"},CAN_NOT_PARSE_JSON:{code:"CAN_NOT_PARSE_JSON",message:"Can not parse JSON: {{msg}}"},CAN_NOT_PARSE_XML:{code:"CAN_NOT_PARSE_XML",message:"Can not parse XML: {{msg}}"},OPTIONAL_SCLARAR_PROPERTIES_10:{code:"OPTIONAL_SCLARAR_PROPERTIES_10",message:"Optional scalar properties are not allowed in {{templateName|!pluralize|!sentencecase|!lowercase}} and their descendants: '{{propName}}?'"},OPTIONAL_PROPERTIES_10:{code:"OPTIONAL_PROPERTIES_10",message:"Optional properties are not allowed in '{{propName|!pluralize|!sentencecase|!lowercase}}': '{{oPropName}}'"},ONLY_METHODS_CAN_BE_OPTIONAL:{code:"ONLY_METHODS_CAN_BE_OPTIONAL",message:"Only method nodes can be optional"},PROPERTY_UNUSED:{code:"PROPERTY_UNUSED",message:"{{propName}} unused"},CYCLE_IN_DEFINITION:{code:"CYCLE_IN_DEFINITION",message:"{{typeName}} definition contains cycle: {{cycle}}"},SEQUENCE_NOT_ALLOWED_10:{code:"SEQUENCE_NOT_ALLOWED_10",message:"In RAML 1.0 {{propName|!singularize|!sentencecase|!lowercase}} is not allowed to have sequence as definition"},MAP_EXPECTED:{code:"MAP_EXPECTED",message:"Map is expected here"},ERROR_IN_INCLUDED_FILE:{code:"ERROR_IN_INCLUDED_FILE",message:"Error in the included file: {{msg}}"},NODE_SHOULD_HAVE_VALUE:{code:"NODE_SHOULD_HAVE_VALUE",message:"node should have at least one member value"},NAMED_PARAMETER_NEEDS_TYPE:{code:"NAMED_PARAMETER_NEEDS_TYPE",message:"named parameter needs at least one type"},ENUM_IS_EMPTY:{code:"ENUM_IS_EMPTY",message:"enum is empty"},ENUM_MUST_BE_AN_ARRAY:{code:"ENUM_MUST_BE_AN_ARRAY",message:"the value of enum must be an array"},DEFINITION_SHOULD_BE_A_MAP:{code:"DEFINITION_SHOULD_BE_A_MAP",message:"{{typeName}} definition should be a map"},RESOURCES_SHARE_SAME_URI:{code:"RESOURCES_SHARE_SAME_URI",message:"Resources share same URI"},TYPES_AND_SCHEMAS_ARE_EXCLUSIVE:{code:"TYPES_AND_SCHEMAS_ARE_EXCLUSIVE",message:"'types' and 'schemas' are mutually exclusive"},TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS:{code:"TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS",message:"Trait or resource type parameter name must contain non whitespace characters"},INVALID_SECURITY_SCHEME_SCOPE:{code:"INVALID_SECURITY_SCHEME_SCOPE",message:"The '{{invalidScope}}' scope is not allowed for the '{{securityScheme}}' security scheme. Allowed scopes are: {{allowedScopes}}."},INCLUDE_TAG_MISSING:{code:"INCLUDE_TAG_MISSING",message:"The '!include' tag is missing"},LIBRARY_PATH_MUST_BE_A_STRING:{code:"LIBRARY_PATH_MUST_BE_A_STRING",message:"Library path must be string"},INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL:{code:"INVALID_RESOURCE_NAME_UNMATCHED_SYMBOL",message:"Invalid resource name: unmatched '{{symbol}}'"},MESSAGE_PARAMETER_NO_VALUE:{code:"MESSAGE_PARAMETER_NO_VALUE",message:"Message parameter '{{paramName}}' has no value specified."},SETVALUE_ONLY_MULTI_VALUES_PROPERTIES:{code:"SETVALUE_ONLY_MULTI_VALUES_PROPERTIES",message:"setValue(string) only apply to multi-values properties"},ISEMPTY_ONLY_MULTI_VALUES_ATTRIBUTES:{code:"ISEMPTY_ONLY_MULTI_VALUES_ATTRIBUTES",message:"isEmpty() only apply to multi-values attributes"},PLUGIN_REPORTS_AN_ERROR:{code:"PLUGIN_REPORTS_AN_ERROR",message:"The {{pluginId}} plugin reports an error"},PROPERTIES_SHOULD_HAVE_SAME_GRAMMAR_KIND:{code:"PROPERTIES_SHOULD_HAVE_SAME_GRAMMAR_KIND",message:"Different properties with same name should have same grammar kind at this moment"},MISSING_TITLE:{code:"MISSING_TITLE",message:"missing title"},INVALID_ARGUMENT:{code:"INVALID_ARGUMENT",message:"Invalid Argument"},METHOD_OWNED_BY:{code:"METHOD_OWNED_BY",message:"Method is supposed to be owned by Resource or ResourceType. Here the method is owned by {{owner}}"},POSITION_EXCEEDS_TEXT_LENGTH:{code:"POSITION_EXCEEDS_TEXT_LENGTH",message:"Character position exceeds text length: {{pos}} > + {{length}}. Unit path: {{absPath}}"},LINE_MAPPER_HAS_NULL_CONTENT:{code:"LINE_MAPPER_HAS_NULL_CONTENT",message:"Line Mapper has been given null content{{path}}"},EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS:{code:"EXTENSIONS_AND_OVERLAYS_LEGAL_FILE_PATHS",message:"Extensions and overlays list should contain legal file paths"},CAN_NOT_RESOLVE:{code:"CAN_NOT_RESOLVE",message:"Can not resolve {{path}}"},CAN_NOT_RESOLVE_REASON:{code:"CAN_NOT_RESOLVE_REASON",message:"Can not resolve {{path}} due to: {{reason}}"},INVALID_FIRST_LINE:{code:"INVALID_FIRST_LINE",message:"Invalid first line. A RAML document is expected to start with '#%RAML '."},EXTENSIONS_AND_OVERLAYS_NOT_SUPPORTED_0_8:{code:"EXTENSIONS_AND_OVERLAYS_NOT_SUPPORTED_0_8",message:"Extensions and overlays are not supported in RAML 0.8."},API_CONTAINS_ERROR:{code:"API_CONTAINS_ERROR",message:"Api contains errors."},COULD_NOT_SET_STRUCTURED_VALUE:{code:"COULD_NOT_SET_STRUCTURED_VALUE",message:"couldn't set structured value to a key: {{key}}"},NOT_IMPLEMENTED:{code:"NOT_IMPLEMENTED",message:"not implemented"},COULD_NOT_MIX_TYPES_INHERITANCE:{code:"COULD_NOT_MIX_TYPES_INHERITANCE",message:"couldn't mix user defined and basic types in inheritance"},SPECIFY_APIPATH:{code:"SPECIFY_APIPATH",message:"Please, specify -apiPath parameter"},UNABLE_TO_EXECUTE_GET:{code:"UNABLE_TO_EXECUTE_GET",message:"Unable to execute GET {{url}}"},UNIT_PATH_IS_NULL:{code:"UNIT_PATH_IS_NULL",message:"Unit path is null"},FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER:{code:"FSRESOLVER_IS_UNABLE_USE_EXTENDEDFSRESOLVER",message:"Provided FSResolver is unable to list files. Please, use ExtendedFSResolver."},NOT_IMPLEMENTED_INSERT_INTO_EMPTY_REF:{code:"NOT_IMPLEMENTED_INSERT_INTO_EMPTY_REF",message:"not implemented: insert into empty include ref"},ATTR_SETVALUE_NOT_RESOLVE:{code:"ATTR_SETVALUE_NOT_RESOLVE",message:"attr.setValue: couldn't resolve: {{path}}"},ONLY_MAP_NODES_ALLOWED:{code:"ONLY_MAP_NODES_ALLOWED",message:"only MAP/MAPPING nodes allowed as values"},UNSUPPORTED_CHANGE_VALUE_CASE:{code:"UNSUPPORTED_CHANGE_VALUE_CASE",message:"Unsupported change value case: {{name}}"},UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION:{code:"UNSUPPORTED_CASE_ATTRIBUTE_VALUE_CONVERSION",message:"Unsupported case: attribute value conversion: {{curval}} ==> {{newval}} not supported"},UNSUPPORTED_COMMAND:{code:"UNSUPPORTED_COMMAND",message:"UNSUPPORTED_COMMAND: {{name}}"},NEW_NODE_CONTENTS_ERROR_BELOW:{code:"NEW_NODE_CONTENTS_ERROR_BELOW",message:"New node contents (causes error below): \n {{content}}"},REPARSE_ERROR:{code:"REPARSE_ERROR",message:"Reparse error {{content}}"},INSERT_INTO_MAPPING_VALUE_NOT_SUPPORTED:{code:"INSERT_INTO_MAPPING_VALUE_NOT_SUPPORTED",message:"Insert into mapping with {{value}} value not supported"},INSERT_INTO_NOT_SUPPORTED:{code:"INSERT_INTO_NOT_SUPPORTED",message:"Insert into {{name}} unsupported"},DELETE_FROM_NOT_SUPPORTED:{code:"DELETE_FROM_NOT_SUPPORTED",message:"Delete from {{name}} unsupported"},CAN_NOT_BE_PARSED:{code:"CAN_NOT_BE_PARSED",message:"{path} can not be parsed"},RECURSIVE_DEFINITION_EMPTY:{code:"RECURSIVE_DEFINITION_EMPTY",message:"Recursive definition"},SHOULD_NEVER_HAPPEN_KIND:{code:"SHOULD_NEVER_HAPPEN_KIND",message:"Should never happen; kind : {{kind}}"},UNKNOWN_NODE_KIND:{code:"UNKNOWN_NODE_KIND",message:"Unknown node kind: '{{kind}}'"},NOT_IMPLEMENTED_KIND:{code:"NOT_IMPLEMENTED_KIND",message:"markup not implemented: {{kind}}"},EXPECTED_INSTEAD_OF:{code:"EXPECTED_INSTEAD_OF",message:"{{expected}} expected instead of {{received}}"},INSERTION_POINT_TYPE:{code:"INSERTION_POINT_TYPE",message:"insertion point type: {{type}}"},UNSUPPORTED_OPERATION_EXCEPTION:{code:"UNSUPPORTED_OPERATION_EXCEPTION",message:"Unsupported operation exception"},UNABLE_TO_FIND_CHILD:{code:"UNABLE_TO_FIND_CHILD",message:"Unable to find correct child"},NETWORK_ERROR:{code:"NETWORK_ERROR",message:"Network Error"},COULD_NOT_LOAD_API_FROM:{code:"COULD_NOT_LOAD_API_FROM",message:"couldn't load api from {{path}}"},METHOD_MUST_BE_OVERRIDDEN:{code:"METHOD_MUST_BE_OVERRIDDEN",message:"The method must be overridden"},UNKNOWN_ANNOTATION_TYPE:{code:"UNKNOWN_ANNOTATION_TYPE",message:"Using unknown annotation type: '{{typeName}}'"},LIBRARY_CHAINIG_IN_ANNOTATION_TYPE:{code:"LIBRARY_CHAINIG_IN_ANNOTATION_TYPE",message:"Annotation type '{{typeName}}' imported through a library chain. Library chainig is not allowed."},LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE:{code:"LIBRARY_CHAINIG_IN_ANNOTATION_TYPE_SUPERTYPE",message:"Annotation type '{{typeName}}' depends on '{{chainedType}}' imported through a library chain. Library chainig is not allowed."},PROTOCOLS_ARRAY:{code:"PROTOCOLS_ARRAY",message:"'protocols' value should be a non empty array"}}},function(e,t,n){"use strict";function r(e,t){if(void 0===t&&(t=0),t>20)return[];try{var n=[],i=e.leftType();i&&n.push(i);var a=e.rightType();if(a)if(a.hasUnionInHierarchy()){var o=r(a.unionInHierarchy(),t+1);n=n.concat(o)}else n.push(a);return n}finally{}}function i(e){var t=e.definition();if(!t||!M.isTypeDeclarationDescendant(t))return!1;var n=e.lowLevel();if(n.valueKind()!==_.Kind.SEQ)return!1;var r=n.children();if(null==r)return!1;for(var i=0,a=r;i0&&l.forEach(function(e){u||y(e,n,u)&&(u=e)}),u}}finally{r._node&&delete r._node.descriminate}}function m(e){for(var t,n=[e].concat(e.allSuperTypes()),r=0;r=r.length&&(r=i.keyPrefix(),n=i):(n=i,r=i.nameId()))}),n},e}(),x=0,k=function(){function e(){this.shouldDescriminate=!1}return e.prototype.process=function(e,t){var n=this,a=e.lowLevel(),o=e;o._mergedChildren=null;var s=a._node?a._node:a;try{if(s.currentChildren)return s.currentChildren;if(!e.definition())return;if(null==e.parent()&&!this.shouldDescriminate){this.shouldDescriminate=!0;try{var u=this.process(e,t),l=e;l._children=u,l._mergedChildren=null;var p=h(e);p&&l.patchType(p);var u=this.process(e,t);l._children=u,l._mergedChildren=null}finally{this.shouldDescriminate=!1}}if(e.definition().hasUnionInHierarchy()&&e.parent()&&e.property().nameId()==R.Universe10.LibraryBase.properties.annotations.name){var c=r(e.definition().unionInHierarchy()),f=null,d=null,m=null,y=1e3,v=e;if(c.forEach(function(r){if(!f&&!r.hasUnionInHierarchy()){v.patchType(r);if(0==x){x++;try{for(var i=n.process(e,t),a=0,o=0;oa&&(y=a,d=i,m=r)}finally{x--}}}}),f)return v.patchType(m),f;d&&v.patchType(m)}var g=new U(e.definition().allProperties());if(null==e.parent()||e.lowLevel().includePath()){var A=e.definition().universe();"RAML10"==A.version()&&(e.definition().property("uses")||A.type("FragmentDeclaration").allProperties().forEach(function(e){return g.add(e)}))}var E=e,T=E._allowQuestion||e.definition().getAdapter(C.RAMLService).getAllowQuestion(),S=[];if(g.parentKey){if(e.lowLevel().key()){var I=new N.ASTPropImpl(e.lowLevel(),e,g.parentKey.range(),g.parentKey,!0);S.push(I);var b=e.property()&&M.isBodyProperty(e.property())&&e.lowLevel().key()==e.property().nameId();if(b){F(E);I.overrideValue(E._computedKey)}}if(e.lowLevel().valueKind()===_.Kind.SEQ&&!i(e)){var w=new N.BasicASTNode(e.lowLevel(),E);return w.errorMessage={entry:O.DEFINITION_SHOULD_BE_A_MAP,parameters:{typeName:e.definition().nameId()}},S.push(w),S}}if(null!=e.lowLevel().value(!0))if(g.parentValue)S.push(new N.ASTPropImpl(e.lowLevel(),e,g.parentValue.range(),g.parentValue));else if(g.canBeValue){var P=e.lowLevel().value();null==P&&(P=e.lowLevel().value(!0)),"string"==typeof P&&P.trim().length>0&&S.push(new N.ASTPropImpl(e.lowLevel(),e,g.canBeValue.range(),g.canBeValue))}if(E._children=S,E._mergedChildren=null,E.definition().getAdapter(C.RAMLService).isUserDefined())S=this.processChildren(t,E,S,T,g);else if(E.definition().key()==R.Universe08.Api||E.definition().key()==R.Universe10.Api){var L=t.filter(function(e){return"uses"==e.key()});S=this.processChildren(L,E,S,T,g);var D=t.filter(function(e){return"types"==e.key()});S=this.processChildren(D,E,S,T,g);var k=t.filter(function(e){return"types"!=e.key()&&"uses"!=e.key()});S=this.processChildren(k,E,S,T,g)}else S=this.processChildren(t,E,S,T,g);return E._children=S,E._mergedChildren=null,S}finally{}},e.prototype.isTypeDeclarationShortcut=function(e,t){var n=M.isTypeOrSchemaProperty(t),r=e.definition()&&M.isTypeDeclarationTypeOrDescendant(e.definition());return!!(r&&n&&e.lowLevel()&&e.lowLevel().valueKind()===_.Kind.SEQ)},e.prototype.processChildren=function(e,t,n,r,i){var a=this,o=R.Universe10.TypeDeclaration.name,s=R.Universe10.TypeDeclaration.properties.type.name,u=R.Universe10.ArrayTypeDeclaration.properties.items.name;if(t.definition()&&t.definition().isAssignableFrom(o)&&t.lowLevel()&&i.canBeValue&&(i.canBeValue.nameId()===s||i.canBeValue.nameId()===u)&&t.lowLevel()._node&&t.lowLevel()._node.value&&t.lowLevel()._node.value.kind===_.Kind.SEQ)return e.forEach(function(e){var r=new N.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue);n.push(r)}),n;var l=t.root().lowLevel().unit();e.forEach(function(e){if(i.canBeValue&&a.isTypeDeclarationShortcut(t,i.canBeValue))return void n.push(new N.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue));var o=e.key(),s=null!=o?i.match(o):null;if(null!=s){var u=s.range();if(s.isAnnotation()&&"annotations"!=o){var p=new N.ASTPropImpl(e,t,u,s);return void n.push(p)}var c=!1,f=s.isMultiValue();u.isArray()?(f=!0,u=u.array().componentType(),c=!0):u.hasArrayInHierarchy()&&(f=!0,c=!0);var h,m=!1;if(t.reuseMode()&&e.valueKind()!=_.Kind.SEQ){var y=t.reusedNode();if(y){var A=[e],b=t.lowLevel();!s.isMerged()&&f&&(h=[],A=e.children(),b=e);for(var w=0,P=A;w0||k.length>1)&&f)if(k.length>1&&M.isTypeDeclarationDescendant(t.definition())&&(M.isTypeOrSchemaProperty(s)||M.isItemsProperty(s))&&e.valueKind()!=_.Kind.SEQ){var p=new N.ASTPropImpl(e,t,u,s);n.push(p),t.setComputed(s.nameId(),p)}else{var V=[];k.forEach(function(e){var r=new N.ASTPropImpl(e,t,u,s);n.push(r),V.push(e.value())}),s.isInherited()&&t.setComputed(s.nameId(),V)}else{s.isInherited()&&t.setComputed(s.nameId(),e.value());var K=new N.ASTPropImpl(e,t,u,s),j=e;if(e.isAnnotatedScalar()&&(j=T.find(e.children(),function(e){return"value"==e.key()})),j.valueKind()==_.Kind.SEQ||j.valueKind()==_.Kind.MAP){var W=s.range().nameId();s.getAdapter(C.RAMLPropertyService).isExampleProperty()||("MarkdownString"==W?W="string":"StringType"==W?W="string":"NumberType"==W?W="number":"BooleanType"==W&&(W="boolean"),"string"!=W&&"number"!=W&&"boolean"!=W||(K.errorMessage={entry:O.INVALID_PROPERTY_RANGE,parameters:{propName:s.groupName(),range:W}},0==h.length&&"enum"==s.groupName()&&(K.errorMessage={entry:O.ENUM_IS_EMPTY,parameters:{}},e.valueKind()==_.Kind.MAP&&(K.errorMessage={entry:O.ENUM_MUST_BE_AN_ARRAY,parameters:{}}))))}n.push(K)}return}var H=[];if(t._children=n,t._mergedChildren=null,null!=e.value()&&("string"==typeof e.value()||"boolean"==typeof e.value()||"number"==typeof e.value())&&(""+e.value()).trim().length>0){var Y=s.range();if(!Y.allProperties().some(function(e){var t=e;return!!t&&(t.canBeValue()&&t.isFromParentValue())})){var q=new N.BasicASTNode(e,t);q.getLowLevelEnd=function(){return-1},q.getLowLevelStart=function(){return-1},q.knownProperty=s,n.push(q)}}if(s.isMerged()){var G=new N.ASTNodeImpl(e,t,u,s);G._allowQuestion=r,H.push(G)}else if(f)if(s.getAdapter(C.RAMLPropertyService).isEmbedMap()){var X=h,z=[],$=!1;if(X.forEach(function(e){e.kind()==_.Kind.INCLUDE_REF&&"RAML08"==t.universe().version()?e.children().forEach(function(e){var n=new N.ASTNodeImpl(e,t,u,s);n._allowQuestion=r,H.push(n),$=!0}):z.push(e)}),X=z,0==X.length){if(s.range().key()==R.Universe08.ResourceType&&!$){var J=new N.BasicASTNode(e,t);J.errorMessage={entry:O.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push(J)}if(e.valueKind()==_.Kind.SCALAR&&s.range().key()==R.Universe08.AbstractSecurityScheme){var J=new N.BasicASTNode(e.parent(),t);J.errorMessage={entry:O.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push(J)}}if(X.forEach(function(e){var i=e.children();if(i.length>0&&"RAML08"==t.universe().version()&&M.isSchemasProperty(s))for(var a=0,o=i;a0&&ee.getAdapter(C.RAMLService).getCanInherit().forEach(function(n){for(var i=t.computedValue(n),a=Array.isArray(i)?i:[i],o=0;o0?te.forEach(function(e){return H.push(e)}):Z.forEach(function(e){return H.push(e)})}else H.push(new N.ASTNodeImpl(e,t,u,s));t._children=t._children.concat(H),t._mergedChildren=null,n=n.concat(H),H.forEach(function(e){var n=d(s,t,e);n&&n!=e.definition()&&e.patchType(n),e._associatedDef=null,s.childRestrictions().forEach(function(t){e.setComputed(t.name,t.value)});e.definition()})}else{var ne=new N.BasicASTNode(e,t),re=!I.LowLevelCompositeNode.isInstance(e)||null!=e.primaryNode();if(!re){var ie=E.typeOfContainingTemplate(ne),ae=o?o.indexOf("<<"):-1,oe=ae>=0&&o.indexOf(">>",ae)>=0;ie?oe||(re=!0):(re=!0,M.isMethodType(t.definition())?ie=t.definition().universe().type(S.universesInfo.Universe10.Trait.name):M.isResourceType(t.definition())&&(ie=t.definition().universe().type(S.universesInfo.Universe10.ResourceType.name)),ie&&null!=ie.property(o)&&(re=!1),re&&oe&&(re=!v(t)))}re&&n.push(ne)}});var p=t.reusedNode();if(p&&t.lowLevel().valueKind()!=_.Kind.SEQ){var c={};p.elements().forEach(function(e){return c[e.property().nameId()+"_"+e.lowLevel().key()]=e}),p.attrs().forEach(function(e){return c[e.property().nameId()+"_"+e.lowLevel().key()]=e}),n.filter(function(e){return e.isElement()||e.isAttr()}).forEach(function(e){var n=c[e.property().nameId()+"_"+e.lowLevel().key()];n&&n!=e&&e.isElement()&&e.lowLevel().parent().valueKind()!=_.Kind.SEQ&&(e.setReusedNode(n),e.setReuseMode(t.reuseMode()))})}return n},e}();t.BasicNodeBuilder=k,t.mapType=o,t.doDescrimination=h;var F=function(e){for(var t=!1,n=e;n;){var r=n.definition();if(M.isTraitType(r)||M.isResourceTypeType(r)){t=!0;break}n=n.parent()}return t}},function(e,t,n){"use strict";function r(e,t,n){return N.findDeclaration(e,t,n)}function i(e,t){return N.findUsages(e,t)}function a(e){return N.globalDeclarations(e)}function o(e,t,n){N.refFinder(e,t,n)}function s(e,t){return N.findDeclarationByNode(e,t)}function u(e,t){return N.determineCompletionKind(e,t)}function l(e,t){return N.enumValues(e,t)}function p(e,t){return I.qName(e,t)}function c(e,t){return N.subTypesWithLocals(e,t)}function f(e,t){return N.nodesDeclaringType(e,t)}function h(e){return N.isExampleNodeContent(e)}function d(e){return N.findExampleContentType(e)}function m(e,t){return N.parseDocumentationContent(e,t)}function y(e,t){return N.parseStructuredExample(e,t)}function v(e){return N.isExampleNode(e)}function g(e,t){return N.referenceTargets(e,t)}function A(e){return b.getNominalTypeSource(e)}function E(e,t){return N.findAllSubTypes(e,t)}function _(e){return N.declRoot(e)}function T(e,t,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!0),N.deepFindNode(e,t,n,r,i)}function S(e){return N.allChildren(e)}Object.defineProperty(t,"__esModule",{value:!0});var N=n(210),I=n(55),b=n(211);t.findDeclaration=r,t.findUsages=i,t.globalDeclarations=a,t.refFinder=o,t.findDeclarationByNode=s;var R;!function(e){e[e.VALUE_COMPLETION=0]="VALUE_COMPLETION",e[e.KEY_COMPLETION=1]="KEY_COMPLETION",e[e.PATH_COMPLETION=2]="PATH_COMPLETION",e[e.DIRECTIVE_COMPLETION=3]="DIRECTIVE_COMPLETION",e[e.VERSION_COMPLETION=4]="VERSION_COMPLETION",e[e.ANNOTATION_COMPLETION=5]="ANNOTATION_COMPLETION",e[e.SEQUENCE_KEY_COPLETION=6]="SEQUENCE_KEY_COPLETION",e[e.INCOMMENT=7]="INCOMMENT"}(R=t.LocationKind||(t.LocationKind={})),t.determineCompletionKind=u,t.enumValues=l,t.qName=p,t.subTypesWithLocals=c,t.nodesDeclaringType=f,t.isExampleNodeContent=h,t.findExampleContentType=d,t.parseDocumentationContent=m,t.parseStructuredExample=y,t.isExampleNode=v,t.referenceTargets=g,t.getNominalTypeSource=A,t.findAllSubTypes=E,t.declRoot=_,t.deepFindNode=T,t.allChildren=S},function(e,t,n){"use strict";function r(e){for(var t=[],n={};null!=e.parent();)e.lowLevel().includePath()&&(t=t.concat(a(e,n))),e=e.parent();return t=t.concat(a(e,n))}function i(e){var t=e.node();if(t&&U.isParseResult(t))return t;var n=K.getNominalPropertySource2(e);return n?n.getSource():null}function a(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=[]),!e.lowLevel())return[];var r=e.lowLevel().unit().absolutePath();if(t[r]=!0,!F.ASTNodeImpl.isInstance(e))return n;var i=!1;return e.elements().forEach(function(e){if(e.definition().key()==B.Universe10.UsesDeclaration){if(i)return;var r=e.attr("value");if(r){var o=e.lowLevel().unit().resolve(r.value());if(o&&j.isWaitingFor(o.absolutePath()))return void(i=!0);null!=o&&o.isRAMLUnit()&&!t[o.absolutePath()]&&o.highLevel().isElement()&&a(o.highLevel().asElement(),t,n)}}else n.push(e)}),n}function o(e,t){for(var n="",r=e-1;r>=0;r--){var i=t.charAt(r);if(" "==i||"\t"==i)n?n+=i:n=i;else if("\r"==i||"\n"==i)return n}}function s(e,t,n,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){if(F.ASTNodeImpl.isInstance(e)){for(var a=e,o=r?a.children():a.directChildren(),u=0;u=0;r--){var i=e.charAt(r);if("\r"==i||"\n"==i||" "==i||"\t"==i||'"'==i||"'"==i||":"==i){n=r+1;break}}for(var a=-1,r=t;r=0;r--){var i=e[r];if(" "==i||"\r"==i||"\n"==i||"|"==i||"["==i||"]"==i||":"==i||"("==i||")"==i)break;n=i+n}for(var r=t+1;r0){var i=r(t).filter(function(e){return null!=x.find(s.globallyDeclaredBy(),function(t){return t==e.definition()})});return i}}return[]}function f(e,t){if(t){var n=[];if(e.getAdapter(V.RAMLPropertyService).isTypeExpr()){var i=r(t).filter(function(e){var t=e.definition().key();return t===B.Universe08.GlobalSchema||e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)});var a=t.definition().universe().type(B.Universe10.TypeDeclaration.name);if(a){var o=a.allSubTypes();n=n.concat(o.map(function(e){return e.getAdapter(V.RAMLService).descriminatorValue()}))}return n}var s=e.range().key();if((s==B.Universe08.SchemaString||s==B.Universe10.SchemaString)&&"RAML10"==e.range().universe().version()&&e.range().hasValueTypeInHierarchy()){var i=r(t).filter(function(e){return e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)})}if(e.getAdapter(V.RAMLPropertyService).isDescriminating()){var o=S(e.domain(),t);n=n.concat(o.map(function(e){return e.getAdapter(V.RAMLService).descriminatorValue()}))}else if(e.isReference()){var u=b(e.referencesTo(),t);n=u.map(function(e){return F.qName(e,t)})}else if(e.range().hasValueTypeInHierarchy()){var l=e.range().getAdapter(V.RAMLService);if(l.globallyDeclaredBy().length>0){var i=r(t).filter(function(e){return null!=x.find(l.globallyDeclaredBy(),function(t){return t==e.definition()})});n=n.concat(i.map(function(e){return F.qName(e,t)}))}}return e.isAllowNull()&&n.push("null"),e.enumOptions()&&(n=n.concat(e.enumOptions())),n}return e.enumOptions()&&"string"==typeof e.enumOptions()?[e.enumOptions()+""]:e.enumOptions()}function h(e){return e.isElement()&&e.asElement().definition().key()!=B.Universe10.Library?null:e.asElement().attrValue("name")}function d(e,t){var n=e.lowLevel().unit();if(!n)return null;var r=e.lowLevel().start(),i=e.lowLevel().end();if(null!=t&&t==H.KEY_COMPLETION?(r=e.lowLevel().keyStart(),i=e.lowLevel().keyEnd()):null!=t&&t==H.VALUE_COMPLETION&&(r=e.lowLevel().valueStart(),i=e.lowLevel().valueEnd()),r==-1||i==-1)return null;var a=Math.floor((r+i)/2);return m(n,a,t)}function m(e,t,n){var r=s(F.fromUnit(e),t,t,!1),a=null;if(r.isElement()&&r.asElement().definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)&&r.asElement().directChildren().forEach(function(e){if(e.isUnknown()&&e.getLowLevelStart()t){var n=r.asElement().localType();n.allFacets().forEach(function(t){if(t.nameId()==e.lowLevel().key()&&k.UserDefinedProp.isInstance(t)){var n=i(t);a=n}})}}),!r.property())return r;if("example"==r.property().nameId()){r.parent().localType();r.lowLevel().children().forEach(function(e){"example"==e.key()&&e.children().forEach(function(e){if(e.start()t){var n=r.parent().asElement().localType();n.allProperties().forEach(function(t){if(t.nameId()==e.key()&&k.UserDefinedProp.isInstance(t)){var n=i(t);a=n}})}})})}if(a)return a;var o=null!=n?n:_(e.contents(),t);if(o==H.VALUE_COMPLETION){var l=r;if(F.ASTPropImpl.isInstance(r)){var p=r;if(p&&p.value()){if(!F.StructuredValue.isInstance(p.value()))return W(t,e.contents(),p,l);var c=p.value(),f=c.toHighLevel();if(f){var h=x.find(f.attrs(),function(e){return e.lowLevel().start()=t});if(h)return W(t,e.contents(),h,f,p.property())}}}else{var d=l.property();if(d)return W(t,e.contents(),null,l,d)}}if(o==H.KEY_COMPLETION||o==H.SEQUENCE_KEY_COPLETION){var l=r,m=r.property();if(D.UserDefinedProp.isInstance(m)){var g=m;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&D.isUserDefinedClass(l.definition())){var A=l.definition();return A.isAssignableFrom("TypeDeclaration")?r:A.getAdapter(V.RAMLService).getDeclaringNode()}if(F.ASTPropImpl.isInstance(r)){var T=r;if(E(T)){var S=y(T);if(S){var N=v(T,S);if(N){var r=s(N,t,t);if(m=r.property(),D.UserDefinedProp.isInstance(m)){var g=m;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&D.isUserDefinedClass(l.definition())){var A=l.definition();return A.getAdapter(V.RAMLService).getDeclaringNode()}}}}}}if(o==H.PATH_COMPLETION){var I=u(e.contents(),t);if(I){var b=e.resolve(I);return b}}}function y(e){var t=null;if(e.isElement()?t=e:e.isAttr()&&(t=e.parent()),!t.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)){var n=t.parent();if(!n)return null;if(n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))t=n;else{if(n=n.parent(),null==n)return null;if(!n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))return null;t=n}}return t.localType()}function v(e,t){return F.StructuredValue.isInstance(e.value())?new F.ASTNodeImpl(e.value().lowLevel(),e.parent(),t,e.property()):null}function g(e,t){return new F.ASTNodeImpl(e.lowLevel(),e,t,e.property())}function A(e){return e.definition().key()==B.Universe10.ExampleSpec}function E(e){var t=B.Universe10.TypeDeclaration.properties.example.name,n=B.Universe10.ObjectTypeDeclaration.name;if(!F.ASTPropImpl.isInstance(e))return!1;var r=e,i=r.parent(),a=i&&i.property();a&&a.nameId();return!!(t===r.name()&&r.isString()&&F.ASTNodeImpl.isInstance(i)&&i.definition().isAssignableFrom(n))}function _(e,t){for(var n=!1,r=!1,i=!1,a=t-1;a>=0;a--){var s=e.charAt(a);if("("==s)i=!0;else{if(i){if("\r"==s||"\n"==s){for(var u=!1,l=t-1;l=0;a--){var s=e.charAt(a);if("#"==s){if(0==a)return H.VERSION_COMPLETION;for(var l=a-1;l>=0;l--){var c=e.charAt(l);if("\r"==c||"\n"==c)break;if("!"==c&&e.indexOf("!include",l)==l)return H.PATH_COMPLETION}return H.INCOMMENT}if(":"==s)return n?H.DIRECTIVE_COMPLETION:H.VALUE_COMPLETION;if("\r"==s||"\n"==s){for(var f=!1,h=o(t,e),d=a;d>0;d--){if(s=e.charAt(d),":"==s){if(f){var m=o(d,e);if(m.length0&&n){var u=r(n),l=e.getAdapter(V.RAMLService).getRuntimeExtenders();n.root();l.forEach(function(t){var n=u.filter(function(n){var r=n.definition().allSuperTypes();r.push(n.definition());var i=n.definition()==t||null!=x.find(r,function(e){return e==t})||null!=x.find(r,function(t){return t==e});return i});s=s.concat(n.map(function(e){return e.localType()}))})}return s=x.unique(s),a._subTypesCache[i]=s,s}function N(e,n,i){n=t.declRoot(n);var a=r(n),o=x.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.types.name});return o.localType()}function I(e,n,i){n=t.declRoot(n);var a=r(n),o=x.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.schemas.name});return o.localType()}function b(e,t){var n=[],i=[e].concat(e.getAdapter(V.RAMLService).getRuntimeExtenders());if(t){var a=t;i.forEach(function(e){var t=r(a),i=t.filter(function(t){return t.definition().isAssignableFrom(e.nameId())});n=n.concat(i)})}var o=!e.hasValueTypeInHierarchy();if(o&&e.getAdapter(V.RAMLService).isInlinedTemplates()&&t){var a=t,s=r(a).filter(function(t){return t.definition()==e});n=n.concat(s)}else{var a=t,u={};e.allSubTypes().forEach(function(e){return u[e.nameId()]=!0}),u[e.nameId()]=!0;var s=r(a).filter(function(e){return u[e.definition().nameId()]});n=n.concat(s)}return n}function R(e,t){var n=e.range();return S(n,t)}function M(e,t){if(t){if(e.isDescriminator()){var n=e.range(),i=n.getAdapter(V.RAMLService).getRuntimeExtenders();if(i.length>0&&t){var a=[];return i.forEach(function(e){var n=r(t).filter(function(t){return t.definition()==e});a=a.concat(n)}),a}return[]}if(e.isReference())return b(e.referencesTo(),t);if(e.range().hasValueTypeInHierarchy()){var o=e.range().getAdapter(V.RAMLService);if(o.globallyDeclaredBy&&o.globallyDeclaredBy().length>0){var s=r(t).filter(function(e){return null!=x.find(o.globallyDeclaredBy(),function(t){return t==e.definition()})});return s}}}return[]}function C(e){var t=[];return w(e,t),t}function w(e,t){e.children().forEach(function(e){t.push(e),w(e,t)})}function P(e,t,n){e.elements().forEach(function(e){P(e,t,n);e.definition()}),e.attrs().forEach(function(r){var i=r.property(),a=r.value();if(D.UserDefinedProp.isInstance(i)){var o=i.node();o==t?n.push(r):o&&o.lowLevel().start()==t.lowLevel().start()&&o.lowLevel().unit()==t.lowLevel().unit()&&n.push(r)}if(E(r)){var s=y(r);if(s){var u=v(r,s);u&&P(u,t,n)}}else if(i.getAdapter(V.RAMLPropertyService).isTypeExpr()&&"string"==typeof a){var l=e.localType();Y(l,r,t,n);var p=h(t);if(p&&a.indexOf(p)!=-1){var c=L(r);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}if(i.isReference()||i.isDescriminator()){if("string"==typeof a){var f=M(i,e);x.find(f,function(e){return e.name()==a&&e==t})&&n.push(r);var p=h(t);if(p&&a.indexOf(p)!=-1){var c=L(r);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}else if(F.StructuredValue.isInstance(a)){var d=a;if(d){var m=d.valueName(),f=M(i,e);x.find(f,function(e){return e.name()==m&&e==t})&&n.push(r);var g=d.toHighLevel();g&&P(g,t,n);var p=h(t);if(p&&m.indexOf(p)!=-1){var c=L(g);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}}}else{var f=M(i,e);x.find(f,function(e){return e.name()==a&&e==t})&&n.push(r)}})}function L(e){if(!e.lowLevel)return null;var t=e.lowLevel();if(!t)return null;if(t.key()){var n=Math.floor((t.keyEnd()+t.keyStart())/2),r=O(t.unit(),n);if(r)return r}if(t.value()){var n=Math.floor((t.valueEnd()+t.valueStart())/2),r=O(t.unit(),n);if(r)return r}return null}function O(e,t){var n=m(e,t);if(n&&n.isElement&&n.isElement())for(var r=n.asElement(),i=r;i;){if(i.definition().key()==B.Universe10.Library)return i;i=i.parent()}return null}Object.defineProperty(t,"__esModule",{value:!0});var D=n(56),U=n(198),x=n(16),k=n(56),F=n(55),B=n(204),V=k,K=n(211),j=n(212);t.declRoot=function(e){for(var t=e;;){if(t.definition().key()==B.Universe10.Library)break;var n=t.parent();if(!n)break;t=n}return t},t.globalDeclarations=r,t.findDeclarations=a,t.deepFindNode=s,t.extractName=l;var W=function(e,t,n,r,a){void 0===a&&(a=n.property());var o=c(a,r),s=l(t,e),u=x.find(o,function(e){return F.qName(e,r)==s});if(u)return u;if(D.UserDefinedProp.isInstance(a)){ +var p=a;return i(p)}return null};t.findUsages=p,t.referenceTargets=c,t.enumValues=f,t.findDeclarationByNode=d,t.findDeclaration=m,t.findExampleContentType=y,t.parseDocumentationContent=v,t.parseStructuredExample=g,t.isExampleNode=A,t.isExampleNodeContent=E,t.determineCompletionKind=_;var H;!function(e){e[e.VALUE_COMPLETION=0]="VALUE_COMPLETION",e[e.KEY_COMPLETION=1]="KEY_COMPLETION",e[e.PATH_COMPLETION=2]="PATH_COMPLETION",e[e.DIRECTIVE_COMPLETION=3]="DIRECTIVE_COMPLETION",e[e.VERSION_COMPLETION=4]="VERSION_COMPLETION",e[e.ANNOTATION_COMPLETION=5]="ANNOTATION_COMPLETION",e[e.SEQUENCE_KEY_COPLETION=6]="SEQUENCE_KEY_COPLETION",e[e.INCOMMENT=7]="INCOMMENT"}(H=t.LocationKind||(t.LocationKind={})),t.resolveReference=T,t.subTypesWithLocals=S,t.subTypesWithName=N,t.schemasWithName=I,t.nodesDeclaringType=b,t.findAllSubTypes=R,t.allChildren=C;var Y=function(e,t,n,r){var i=e.getAdapter(V.RAMLService).getDeclaringNode();if(i&&n.isSameNode(i))return void r.push(t);if(e.isArray()&&Y(e.array().componentType(),t,n,r),e.isUnion()){var a=e.union();Y(a.leftType(),t,n,r),Y(a.rightType(),t,n,r)}e.superTypes().some(function(e){return e.nameId()==n.name()})&&r.push(t)};t.refFinder=P},function(e,t,n){"use strict";function r(e){var t=e.getExtra(p.SOURCE_EXTRA);return null==t?null:l.isSourceProvider(t)?t:f.isLowLevelNode(t)?{getSource:function(){return t.highLevelNode()}}:c.isParseResult(t)?{getSource:function(){return t}}:null}function i(e){return r(e)}function a(e){var t=e.getAdapters();return t?d.find(t,function(e){return l.rt.isParsedType(e)}):null}function o(e){if(!e)return null;var t=e.getExtra(p.SOURCE_EXTRA);if(t)return r(e);var n=a(e);return n?i(n):null}function s(e,t){var n=o(e);return n?{getSource:function(){var e=n.getSource(),r=e.asElement();if(null==r)return null;var i=r.elementsOfKind(h.Universe10.ObjectTypeDeclaration.properties.properties.name);return null==i||0==i.length?null:d.find(i,function(e){return t==e.attrValue(h.Universe10.TypeDeclaration.properties.name.name)})}}:null}function u(e){return s(e.domain(),e.nameId())}Object.defineProperty(t,"__esModule",{value:!0});var l=n(56),p=l.rt,c=n(198),f=n(5),h=n(204),d=n(16);t.getExtraProviderSource=r,t.getRTypeSource=i,t.findRTypeByNominal=a,t.getNominalTypeSource=o,t.getNominalPropertySource=s,t.getNominalPropertySource2=u},function(e,t,n){"use strict";function r(){return Object.keys(h).length>0}function i(e){f.push(e)}function a(e){h[e]=!0}function o(e){delete h[e],f.forEach(function(t){return t(e)})}function s(e){return!!h[e]}function u(e,t){c.set(e,t)}function l(e){return c.get(e)}Object.defineProperty(t,"__esModule",{value:!0});var p=(n(213),n(214)),c=p(50);t.hasAsyncRequests=r,t.addLoadCallback=i;var f=[],h={};t.addNotify=a,t.removeNotity=o,t.isWaitingFor=s,t.set=u,t.get=l},function(e,t){"use strict";var n=function(){function e(e,t,n,r){if("number"!=typeof e)throw new TypeError("statusCode must be a number but was "+typeof e);if(null===t)throw new TypeError("headers cannot be null");if("object"!=typeof t)throw new TypeError("headers must be an object but was "+typeof t);this.statusCode=e;var i={};for(var a in t)i[a.toLowerCase()]=t[a];this.headers=i,this.body=n,this.url=r}return e.prototype.getBody=function(e){if(this.statusCode>=300){var t=new Error("Server responded with status code "+this.statusCode+":\n"+this.body.toString());throw t.statusCode=this.statusCode,t.headers=this.headers,t.body=this.body,t.url=this.url,t}return e&&"string"!=typeof this.body?this.body.toString(e):this.body},e}();e.exports=n},function(e,t,n){var r,i,a;!function(n,o){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=o():(i=[],r=o,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}("object"==typeof window?window:this,function(){"use strict";function e(n){return this instanceof e?void(this._LRUCacheState=new t(n)):new e(n)}function t(e){this.capacity=e>0?+e:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList=new n}function n(){this.length=0,this.head=null,this.end=null}function r(e){this.key=e,this.p=null,this.n=null}function i(e,t){t!==e.head&&(e.end?e.end===t&&(e.end=t.n):e.end=t,a(t.n,t.p),a(t,e.head),e.head=t,e.head.n=null)}function a(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}var o=void 0,s=e.prototype;return s.get=function(e){var t=this._LRUCacheState,n=t.hash[e];if(n)return i(t.linkedList,n),t.data[e]},s.set=function(e,t){var n=this._LRUCacheState,a=n.hash[e];return t===o?this:(a||(n.hash[e]=new r(e),n.linkedList.length+=1,a=n.hash[e]),i(n.linkedList,a),n.data[e]=t,n.linkedList.length>n.capacity&&this.remove(n.linkedList.end.key),this)},s.update=function(e,t){return this.has(e)&&this.set(e,t(this.get(e))),this},s.remove=function(e){var t=this._LRUCacheState,n=t.hash[e];return n?(n===t.linkedList.head&&(t.linkedList.head=n.p),n===t.linkedList.end&&(t.linkedList.end=n.n),a(n.n,n.p),delete t.hash[e],delete t.data[e],t.linkedList.length-=1,this):this},s.removeAll=function(){return this._LRUCacheState=new t(this._LRUCacheState.capacity),this},s.info=function(){var e=this._LRUCacheState;return{capacity:e.capacity,length:e.linkedList.length}},s.keys=function(){for(var e=[],t=this._LRUCacheState.linkedList.head;t;)e.push(t.key),t=t.p;return e},s.has=function(e){return!!this._LRUCacheState.hash[e]},s.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},s.popStale=function(){var e=this.staleKey();if(!e)return null;var t=[e,this._LRUCacheState.data[e]];return this.remove(e),t},e})},function(e,t){function n(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,n=e.subtype,r=e.suffix,i=e.type;if(!i||!h.test(i))throw new TypeError("invalid type");if(!n||!f.test(n))throw new TypeError("invalid subtype");var o=i+"/"+n;if(r){if(!h.test(r))throw new TypeError("invalid suffix");o+="+"+r}if(t&&"object"==typeof t)for(var s,u=Object.keys(t).sort(),p=0;p0&&!u.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(c,"\\$1")+'"'}function o(e){var t=d.exec(e.toLowerCase());if(!t)throw new TypeError("invalid media type");var n,r=t[1],i=t[2],a=i.lastIndexOf("+");a!==-1&&(n=i.substr(a+1),i=i.substr(0,a));var o={type:r,subtype:i,suffix:n};return o}/*! * media-typer * Copyright(c) 2014 Douglas Christopher Wilson * MIT Licensed */ -var s=/; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g,u=/^[\u0020-\u007e\u0080-\u00ff]+$/,l=/^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/,p=/\\([\u0000-\u007f])/g,c=/([\\"])/g,f=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,h=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,d=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;t.format=n,t.parse=r},function(e,t,n){"use strict";function r(e){for(var t=-1,n=e.lowLevel().children(),r=0;rl){var d=p-1;return d<0?null:(console.log("insert to node: "+d),s[d])}}}return null}for(var m=null,p=0;p=0&&(i=e.substring(0,o),a=e.substring(o+1));for(var s,u=!1,l=r,p=l.length;p>0;p--){var c=l[p-1],f=_.ramlFirstLine(c.contents()),h=f&&3==f.length&&f[2];if(h==L.universesInfo.Universe10.Library.name){if(u)break;u=!0}var d=c;if(i){d=null;var m=n.nsMap(c);if(m){var y=m[i];y&&(d=y.unit)}}if(d){var v=n.unitModel(d),g=v[t];if(P.ElementsCollection.isInstance(g)){if(s=g.getElement(a))break;if(1==p&&(h==L.universesInfo.Universe10.Extension.name||h==L.universesInfo.Universe10.Overlay.name)){var A=P.extendedUnit(c);A&&(p++,r[0]=A)}}}}return s}function g(e){var t=e.children().filter(function(e){var t=e.key();return t&&t.length>0&&"/"==t.charAt(0)});return t}function A(e){return e?"*/*"==e?null:(e.indexOf("/*")==e.length-2&&(e=e.substring(0,e.length-2)+"/xxx"),D.parse(e)):null}var E=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var T=n(4),_=n(55),S=n(21),N=n(15),I=n(198),b=n(217),M=n(16),R=n(218),C=n(222),w=n(205),P=n(223),L=n(56),O=n(204),D=(n(206),n(214)),U=n(224);t.expandTraitsAndResourceTypes=r,t.expandTraitsAndResourceTypesHL=i,t.expandLibraries=a,t.expandLibrary=o,t.expandLibrariesHL=s,t.expandLibraryHL=u,t.mergeAPIs=l;var x=function(){function e(){}return e.prototype.expandTraitsAndResourceTypes=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1),this.init(e);var r=e.lowLevel();if(!r)return e;if(r.actual().libExpanded)return e;var i=this.createHighLevelNode(e,!1,t);if(e.definition().key()==L.universesInfo.Universe10.Overlay)return i;var a=e.lowLevel().unit(),o=a.project().namespaceResolver().hasFragments(a),s=this.expandHighLevelNode(i,t,e,o);return s?s:e},e.prototype.init=function(e){var t=e.lowLevel(),n=_.ramlFirstLine(t.unit().contents());n&&n.length>=2&&"0.8"==n[1]?this.ramlVersion="RAML08":this.ramlVersion="RAML10";var r=t.children().filter(function(e){return e.key()==L.universesInfo.Universe10.Api.properties.mediaType.name});r.length>0&&(this.defaultMediaType=r[0].value());var i=e.lowLevel().unit(),a=i.project();a.setMainUnitPath(i.absolutePath()),this.namespaceResolver=a.namespaceResolver()},e.prototype.expandHighLevelNode=function(e,t,n,r){var i=this;void 0===r&&(r=!1),this.init(e),e.setMergeMode(n.getMergeMode());var a=!1,o=e.lowLevel();if(I.LowLevelCompositeNode.isInstance(o)){var s=g(o);s.forEach(function(e){return a=i.processResource(e)||a})}if(!a&&!r&&null==e.getMaster())return null;if(_.ASTNodeImpl.isInstance(e)){var u=e;null!=u.reusedNode()&&u.setReuseMode(!0)}return"RAML10"==this.ramlVersion&&(t=t||new C.ReferencePatcher,t.process(o),o.actual().referencePatcher=t),e},e.prototype.createHighLevelNode=function(e,t,n,r,i){void 0===t&&(t=!0),void 0===n&&(n=null),void 0===r&&(r=!1),void 0===i&&(i=!0),i&&this.init(e);for(var a=e,o=[],s=a;s;){var u,l=s.lowLevel(),c=_.ramlFirstLine(l.unit().contents());c&&(c.length<3||c[2]!=L.universesInfo.Universe10.Overlay.name)||r?(I.LowLevelCompositeNode.isInstance(l)&&(l=l.originalNode().originalNode()),u=new I.LowLevelCompositeNode(l,null,null,this.ramlVersion)):u=l;var f=s.definition(),h=new _.ASTNodeImpl(u,null,f,null);if(h.setUniverse(s.universe()),o.push(h),!t)break;M.find(l.children(),function(e){return e.key()==L.universesInfo.Universe10.Overlay.properties.extends.name});s=s.getMaster()}var d=o.pop();o=o.reverse();var m=a.getMergeMode(),y=p(d,o,m,n,r);return y.setReusedNode(a.reusedNode()),y},e.prototype.processResource=function(e,t){var n=this;void 0===t&&(t=[]);var r=!1,i=t.concat(e),a=this.collectResourceData(e,e,void 0,void 0,i);if(!I.LowLevelProxyNode.isInstance(e))return r;e.preserveAnnotations(),e.takeOnlyOriginalChildrenWithKey(L.universesInfo.Universe10.ResourceBase.properties.type.name),e.takeOnlyOriginalChildrenWithKey(L.universesInfo.Universe10.FragmentDeclaration.properties.uses.name),a.filter(function(e){return null!=e.resourceType}).forEach(function(t){var n=t.resourceType.node,i=t.resourceType.transformer;i.owner=e,e.adopt(n,i),r=!0});for(var o,s=e.children().filter(function(e){return y(e.key())}),u=function(){var e=c.key();c.takeOnlyOriginalChildrenWithKey(L.universesInfo.Universe10.FragmentDeclaration.properties.uses.name),o=[],a.forEach(function(t){var n=t.methodTraits[e];n&&(o=o.concat(n),n.forEach(function(e){var t=e.node,n=e.transformer;n.owner=c,c.adopt(t,n),r=!0}));var i=t.traits;i&&(o=o.concat(i),i.forEach(function(e){var t=e.node,n=e.transformer;n.owner=c,c.adopt(t,n),r=!0}))})},l=0,p=s;l0&&(s[f]=h)}}var d,m=M.find(t.children(),function(e){return e.key()==L.universesInfo.Universe10.ResourceBase.properties.type.name});if(null!=m){var v=c(i);m.valueKind()==S.Kind.SCALAR&&(m=T.createScalar(m.value())),d=this.readGenerictData(e,m,t,"resource type",r,v)}var g={resourceType:d,traits:o,methodTraits:s};if(n.push(g),d){var A=d.node,E=A.key()+"/"+A.unit().absolutePath();a[E]?g.resourceType=null:(a[E]=!0,this.collectResourceData(e,A,n,d.transformer,i,a))}return n},e.prototype.extractTraits=function(e,t,n,r){void 0===r&&(r={}),n=n.concat([e]);for(var i=[],a=-1;a>")){var o=e.substring(2,e.length-2),s=this.structuredParams[o];if(null!=s)return{value:s,errors:a}}for(var u=e,l=new V,p=0,c=u.indexOf("<<");c>=0;c=u.indexOf("<<",p)){l.append(u.substring(p,c));var f=c;if(c+="<<".length,p=this.paramUpperBound(u,c),p==-1)break;var h=u.substring(c,p);p+=">>".length;var d,y=u.substring(f,p),o=void 0,v=m(h);if(v.length>0){var g=h.indexOf("|");if(o=h.substring(0,g).trim(),d=this.scalarParamValues[o],d&&"string"==typeof d&&d.indexOf("<<")>=0&&this.vDelegate&&(d=this.vDelegate.transform(d,t,n,r).value),d){w.PatchedReference.isInstance(d)&&(d=d.value());for(var A=0,E=v;A=0&&this.vDelegate&&(d=this.vDelegate.transform(d,t,n,r).value);null!==d&&void 0!==d||(i[o]=!0,d=y),l.append(d)}return l.append(u.substring(p,u.length)),{value:l.value(),errors:a}}return{value:e,errors:a}},e.prototype.paramUpperBound=function(e,t){for(var n=0,r=t;r>",r)){if(0==n)return r;n--,r++}return e.length},e.prototype.children=function(e){var t=this.substitutionNode(e);return t?t.children():null},e.prototype.valueKind=function(e){var t=this.substitutionNode(e);return t?t.valueKind():null},e.prototype.anchorValueKind=function(e){var t=this.substitutionNode(e);return t&&t.valueKind()==S.Kind.ANCHOR_REF?t.anchorValueKind():null},e.prototype.resolvedValueKind=function(e){var t=this.substitutionNode(e);return t&&t.resolvedValueKind()},e.prototype.includePath=function(e){var t=this.substitutionNode(e);return t?t.includePath():null},e.prototype.substitutionNode=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1);var r=this.paramName(e,n),i=r&&(this.scalarParams[r]||this.structuredParams[r]);return i?(t.push(i),this.vDelegate?this.vDelegate.substitutionNode(i,t)||i:i):null},e.prototype.paramNodesChain=function(e,t){var n=[];return this.substitutionNode(C.toOriginal(e),n,t),n.length>0?n:null},e.prototype.paramName=function(e,t){var n;t?e.kind()==S.Kind.MAPPING&&(n=(""+e.key()).trim()):e.valueKind()==S.Kind.SCALAR&&(n=(""+e.value()).trim());var r;return n&&(N.stringStartsWith(n,"(")&&N.stringEndsWith(n,")")&&(n=n.substring(1,n.length-1)),N.stringStartsWith(n,"<<")&&N.stringEndsWith(n,">>")&&(r=n.substring(2,n.length-2))),r},e.prototype.definingUnitSequence=function(e){if(e.length<2)return null;if("("==e.charAt(0)&&")"==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),e.length<4)return null;if("<<"!=e.substring(0,2))return null;if(">>"!=e.substring(e.length-2,e.length))return null;var t=e.substring(2,e.length-2);return t.indexOf("<<")>=0||t.indexOf(">>")>=0?null:this._definingUnitSequence(t)},e.prototype._definingUnitSequence=function(e){return this.scalarParamValues&&this.scalarParamValues[e]?this.unitsChain:this.vDelegate?this.vDelegate._definingUnitSequence(e):null},e}();t.ValueTransformer=K;var j=function(e){function t(t,n,r){var i=e.call(this,null!=n?n.templateKind:"",null!=n?n.templateName:"",r)||this;return i.owner=t,i.delegate=n,i}return E(t,e),t.prototype.transform=function(t,n,r,i){if(null==t||null!=r&&!r())return{value:t,errors:[]};var a={value:t,errors:[]},o=!1;H.forEach(function(e){return o=o||t.toString().indexOf("<<"+e)>=0}),o&&(this.initParams(),a=e.prototype.transform.call(this,t,n,r,i));var s=null!=this.delegate?this.delegate.transform(a.value,n,r,i):a.value;return null!=r&&r()&&null!=i&&(s.value=i(s.value,this)),s},t.prototype.initParams=function(){for(var e,t,n="",r=this.owner,i=r,a=null;i;){var o=i.key();if(null!=o)if(N.stringStartsWith(o,"/")){if(!t)for(var s=o.split("/"),u=s.length-1;u>=0;u--){var l=s[u];if(l.indexOf("{")==-1){t=s[u];break}l.length>0&&(a=l)}n=o+n}else e=o;i=i.parent()}t||a&&(t=""),this.scalarParamValues={resourcePath:n,resourcePathName:t},e&&(this.scalarParamValues.methodName=e)},t.prototype.children=function(e){return null!=this.delegate?this.delegate.children(e):null},t.prototype.valueKind=function(e){return null!=this.delegate?this.delegate.valueKind(e):null},t.prototype.includePath=function(e){return null!=this.delegate?this.delegate.includePath(e):null},t.prototype.anchorValueKind=function(e){return null!=this.delegate?this.delegate.anchorValueKind(e):null},t.prototype.resolvedValueKind=function(e){return null!=this.delegate?this.delegate.resolvedValueKind(e):null},t.prototype.substitutionNode=function(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=!1),this.delegate?this.delegate.substitutionNode(e,t,n):null},t.prototype._definingUnitSequence=function(e){return this.scalarParamValues&&this.scalarParamValues[e]?this.unitsChain:this.delegate?this.delegate._definingUnitSequence(e):null},t}(K);t.DefaultTransformer=j;var W,H=["resourcePath","resourcePathName","methodName"];t.isPossibleMethodName=y;var Y={};Y[L.universesInfo.Universe10.TypeDeclaration.properties.type.name]=!0,Y[L.universesInfo.Universe10.TypeDeclaration.properties.example.name]=!0,Y[L.universesInfo.Universe08.BodyLike.properties.schema.name]=!0,Y[L.universesInfo.Universe10.ObjectTypeDeclaration.properties.properties.name]=!0,t.parseMediaType=A},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){function e(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function t(e,t){return e===t?t:e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function n(e,t){return e.replace(/\$(\d{1,2})/g,function(e,n){return t[n]||""})}function r(e,r){return e.replace(r[0],function(i,a){var o=n(r[1],arguments);return""===i?t(e[a-1],o):t(i,o)})}function i(e,t,n){if(!e.length||p.hasOwnProperty(e))return t;for(var i=n.length;i--;){var a=n[i];if(a[0].test(t))return r(t,a)}return t}function a(e,n,r){return function(a){var o=a.toLowerCase();return n.hasOwnProperty(o)?t(a,o):e.hasOwnProperty(o)?t(a,e[o]):i(o,a,r)}}function o(e,t,n,r){return function(r){var a=r.toLowerCase();return!!t.hasOwnProperty(a)||!e.hasOwnProperty(a)&&i(a,a,n)===a}}function s(e,t,n){var r=1===t?s.singular(e):s.plural(e);return(n?t+" ":"")+r}var u=[],l=[],p={},c={},f={};return s.plural=a(f,c,u),s.isPlural=o(f,c,u),s.singular=a(c,f,l),s.isSingular=o(c,f,l),s.addPluralRule=function(t,n){u.push([e(t),n])},s.addSingularRule=function(t,n){l.push([e(t),n])},s.addUncountableRule=function(e){return"string"==typeof e?void(p[e.toLowerCase()]=!0):(s.addPluralRule(e,"$0"),void s.addSingularRule(e,"$0"))},s.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),f[e]=t,c[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["whiskey","whiskies"]].forEach(function(e){return s.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|tlas|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/(m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return s.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/(m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i,"$1"],[/(analy|ba|diagno|parenthe|progno|synop|the|empha|cri)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return s.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","alcohol","ammo","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","flounder","fun","gallows","garbage","graffiti","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","manga","news","pike","plankton","pliers","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","species","staff","swine","tennis","traffic","transporation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(s.addUncountableRule),s})},function(e,t,n){"use strict";function r(e){var t=e.value();if("string"==typeof t||null==t){ -var n=f.createNode(t,null,e.lowLevel().unit());n._actualNode().startPosition=e.lowLevel().valueStart(),n._actualNode().endPosition=e.lowLevel().valueEnd();var r=new c.StructuredValue(n,e.parent(),e.property());return r}return t}function i(e){var t=e._meta;t.resetPrimitiveValuesMeta();var n=e.highLevel();return n.definition().allProperties().forEach(function(r){var i=r.nameId(),a=n.attributes(i),o=!1,s=!1;if(a.forEach(function(e){o=o||null!=e.value(),s=s||e.optional()}),!o){var u=e.getDefaultsCalculator(),l=u.attributeDefaultIfEnabled(n,r);if(null!=l){var p=u.insertionKind(n,r);p==h.InsertionKind.CALCULATED?t.registerCalculatedValue(i):p==h.InsertionKind.BY_DEFAULT&&t.registerInsertedAsDefaultValue(i)}}}),t}function a(e,t){return t?e.map(function(e){return t(e)}):e.map(function(e){return e.value()})}function o(e){var t=[],n=e.errors();null!=n&&(t=t.concat(n));var r=t.map(function(t){return u(e,t)}),i=s(r);return i}function s(e){var t=[],n={};e.map(function(e){n[JSON.stringify(e)]=e});for(var r=Object.keys(n),i=0;i0&&(s.trace=t.extras.map(function(t){return u(e,t)})),s}function l(e){if(e.isScalar())return!0;for(var t=e.allSuperTypes().filter(function(e){return e.isUnion()||e.isIntersection()}),n=0,r=t;n0?new T(e[0]):null}return new T(this.node)},e.prototype.values=function(){return this.isArray()?this.node.children().map(function(e){return new T(e)}):[new T(this.node)]},e.prototype.isArray=function(){var e=this.node.children();if(e.length>0&&null==e[0].key())return!0;var t=this.node.highLevelNode();if(t){var n=t.property();if(n){var r=n.range();if(r)return r.isArray()}}return this.node.valueKind()==v.Kind.SEQ},e.CLASS_IDENTIFIER="parserCore.TypeInstancePropertyImpl",e}();t.TypeInstancePropertyImpl=_;var S=function(){function e(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1),this._insertedAsDefault=e,this._calculated=t,this._optional=n}return e.prototype.calculated=function(){return this._calculated},e.prototype.insertedAsDefault=function(){return this._insertedAsDefault},e.prototype.setCalculated=function(){this._calculated=!0},e.prototype.setInsertedAsDefault=function(){this._insertedAsDefault=!0},e.prototype.setOptional=function(){this._optional=!0},e.prototype.optional=function(){return this._optional},e.prototype.isDefault=function(){return!(this._insertedAsDefault||this._calculated||this._optional)},e.prototype.toJSON=function(){var e={};return this._calculated&&(e.calculated=!0),this._insertedAsDefault&&(e.insertedAsDefault=!0),this._optional&&(e.optional=!0),e},e}();t.ValueMetadataImpl=S;var N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.valuesMeta={},t}return p(t,e),t.prototype.primitiveValuesMeta=function(){return this.valuesMeta},t.prototype.registerInsertedAsDefaultValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new S(!0):t.setInsertedAsDefault()},t.prototype.registerCalculatedValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new S(!1,!0):t.setCalculated()},t.prototype.registerOptionalValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new S(!1,!1,!0):t.setOptional()},t.prototype.resetPrimitiveValuesMeta=function(){this.valuesMeta={}},t.prototype.isDefault=function(){return!!e.prototype.isDefault.call(this)&&0==Object.keys(this.valuesMeta).length},t.prototype.toJSON=function(){var t=this,n=e.prototype.toJSON.call(this),r={},i=Object.keys(this.valuesMeta);return i.length>0&&(i.forEach(function(e){var n=t.valuesMeta[e].toJSON();Object.keys(n).length>0&&(r[e]=n)}),n.primitiveValuesMeta=r),n},t}(S);t.NodeMetadataImpl=N,t.fillElementMeta=i,t.attributesToValues=a,t.errors=o,t.filterErrors=s,t.basicError=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(56),i=n(203),a=n(204),o=r,s=n(208),u=function(){function e(e,t){void 0===t&&(t=!1),this.enabled=e,this.toHighLevel=t,this.unconditionalValueCalculators=[new v],this.valueCalculators=[new h,new f,new c,new p,new d(this.toHighLevel),new m,new y]}return e.prototype.attributeDefaultIfEnabled=function(e,t){return this.enabled?this.getAttributeDefault(e,t):this.getUnconditionalAttributeDefault(t,e)},e.prototype.getUnconditionalAttributeDefault=function(e,t){if(!t||!e)return null;for(var n=0;n0?n:null},e.prototype.matches=function(e,t){var n=t.definition();return null!=n&&a.isSecuredByProperty(e)},e.prototype.kind=function(e,t){return l.CALCULATED},e}(),m=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n,r=t.attr(i.Universe10.Api.properties.baseUri.name);if(r){var o=r.value();if(o&&"string"==typeof o){var s=o.indexOf("://");s>=0&&(n=[o.substring(0,s).toUpperCase()]),n||(n=["HTTP"])}}return n},e.prototype.matches=function(e,t){if(!a.isProtocolsProperty(e))return!1;var n=t.definition(),r=!1;if(a.isApiSibling(n))r=!0;else if(a.isResourceType(n))r=!0;else if(a.isMethodType(n)){var i=t.parent();r=i&&a.isResourceType(i.definition())}return r},e.prototype.kind=function(e,t){return l.CALCULATED},e}(),y=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n=t.attr(i.Universe10.Api.properties.version.name);if(n){var r=n.value();if(r&&r.trim())return[r]}return null},e.prototype.matches=function(e,t){if(!a.isEnumProperty(e))return!1;var n=t.property();if(!n)return!1;if(!a.isBaseUriParametersProperty(n))return!1;var r=t.attr(i.Universe10.TypeDeclaration.properties.name.name),o=r&&r.value();return"version"==o},e.prototype.kind=function(e,t){return l.CALCULATED},e}(),v=function(){function e(){}return e.prototype.calculate=function(e,t){var n=t.definition();if(null==n)return null;var r=n.getAdapter(o.RAMLService);if(null==r)return null;var i=r.getKeyProp();if(null==i)return null;var a=t.attr(i.nameId());return null==a?null:!a.optional()&&null},e.prototype.matches=function(e,t){return a.isRequiredProperty(e)},e.prototype.kind=function(e,t){return l.BY_DEFAULT},e}()},function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=!0),new T({rootNodeDetails:!0,serializeMetadata:t}).dump(e)}function i(e){if(e.properties().length)return!1;if(e.annotations().length)return!1;if(e.facets().length)return!1;var t=e.fixedFacets();if(t&&Object.keys(t).length)return!1;var n=e.fixedBuiltInFacets();return(!n||!Object.keys(n).length)&&!e.description()}function a(e){if(!e.parent())return!0;if(e.lowLevel().libProcessed)return!1;if(!m.isLibraryType(e.root().definition()))return!1;var t=e.lowLevel().includePath();if(null==t)return!1;var n=e.lowLevel().unit().resolve(t);return!(!n||!n.contents().startsWith("#%RAML"))}var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var s=n(203),u=n(218),l=n(198),p=n(56),c=p.tsInterfaces,f=n(21),h=n(55),d=n(207),m=n(204),y=n(203),v=n(15),g=n(16),A=n(221),E=n(6);t.dump=r;var T=function(){function e(e){this.options=e,this.nodeTransformers=[new Y,new K,new z,new M,new U,new x,new G,new L,new O,new j,new W,new k,new X,new q],this.nodePropertyTransformers=[new b,new R,new C,new P,new w,new D,new H],this.ignore=new S([new _(m.isResponseType,m.isDisplayNameProperty),new _(m.isApiSibling,m.isDisplayNameProperty),new _(m.isAnnotationRefTypeOrDescendant,m.isAnnotationProperty),new _(m.isSecuritySchemeRefType,m.isSecuritySchemeProperty),new _(m.isTraitRefType,m.isTraitProperty),new _(m.isResourceTypeRefType,m.isResourceTypeProperty),new _(m.isApiSibling,m.isRAMLVersionProperty),new _(m.isTypeDeclarationDescendant,m.isStructuredItemsProperty)]),this.missingProperties=new $,this.options=this.options||{},null==this.options.serializeMetadata&&(this.options.serializeMetadata=!0)}return e.prototype.printMissingProperties=function(){return this.missingProperties.print()},e.prototype.dump=function(e){var t=e.highLevel(),n=t&&t.parent(),r=!n&&this.options.rootNodeDetails,i=this.dumpInternal(e,r,!0);return i},e.prototype.dumpInternal=function(e,t,n,r){var i=this;if(void 0===t&&(t=!1),void 0===n&&(n=!1),null==e)return null;if(u.BasicNodeImpl.isInstance(e)){var o={},l=e,c=l.highLevel().definition();c.allProperties().filter(function(e){return!i.ignore.match(l.definition(),e)&&!(!n&&"uses"==e.nameId()&&!a(l.highLevel()))}).forEach(function(e){o[e.nameId()]=e}),c.allCustomProperties().filter(function(e){return!i.ignore.match(l.definition(),e)}).forEach(function(e){o[e.nameId()]=e});var f=this.dumpProperties(o,e);if(o.schema&&this.options.dumpSchemaContents&&o.schema.range().key()==y.Universe08.SchemaString){var d=l.highLevel().root().elementsOfKind("schemas");d.forEach(function(e){if(e.name()==f.schema){var t=e.attr("value");t&&(f.schema=t.value(),f.schemaContent=t.value())}})}if(this.serializeScalarsAnnotations(f,l,o),this.serializeMeta(f,l),this.canBeFragment(e)&&A.isFragment(e)){var v=A.asFragment(e),g=v.uses();g.length>0&&(f.uses=g.map(function(e){return e.toJSON()}))}if(m.isTypeDeclarationDescendant(c)){var E=l.highLevel().property();if(E&&!(m.isHeadersProperty(E)||m.isQueryParametersProperty(E)||m.isUriParametersProperty(E)||m.isPropertiesProperty(E)||m.isBaseUriParametersProperty(E))){delete f.required;var T=f.__METADATA__;if(T){var _=T.primitiveValuesMeta;_&&delete _.required}}}if(this.options.sourceMap&&"object"==typeof f){var S=h.actualPath(e.highLevel());e.highLevel().lowLevel()&&e.highLevel().lowLevel().actual()&&e.highLevel().lowLevel().actual().actualPath&&(S=e.highLevel().lowLevel().actual().actualPath);var N=f.sourceMap;N||(N={},f.sourceMap=N),N.path||(N.path=S)}this.nodeTransformers.forEach(function(t){t.match(e,r||e.highLevel().property())&&(f=t.transform(f,e))});var I={};if(t){if(c){var b=c.universe(),M=b.version();I.ramlVersion=M;var R=c.nameId();if(!R&&c.isAssignableFrom(p.universesInfo.Universe10.TypeDeclaration.name)){var C=b.type(p.universesInfo.Universe10.TypeDeclaration.name),w={};C.allSubTypes().forEach(function(e){return w[e.nameId()]=!0});for(var P=0,L=c.allSuperTypes();P0});return r.length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):null==t.range.start?1:null==e.range.start?-1:e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.stringLooksLikeXML=function(e){return"<"===e[0]&&">"===e[e.length-1]},e.prototype.stringLooksLikeJSON=function(e){return"{"===e[0]&&"}"===e[e.length-1]},e.prototype.dumpProperties=function(e,t){var n,r=this,a={};t.highLevel().isElement()&&(n=t.highLevel().definition());var o={};if(Object.keys(e).forEach(function(l){var y;if(n&&(y=n.property(l),y||(y=g.find(n.allCustomProperties(),function(e){return e.nameId()==l}))),!t[l])return void r.missingProperties.addProperty(e[l],t.kind());var v=e[l],A=t[l](),T=A;if(T&&"structuredType"==l&&"object"==typeof T){T=null;var _=t.highLevel(),S=_.lowLevel();S.children().forEach(function(e){if("type"==e.key()||"schema"==e.key()){var t=_.definition().universe().type(s.Universe10.TypeDeclaration.name),n=_.definition().universe().type(s.Universe10.TypeDeclaration.name),i=new h.ASTNodeImpl(e,_,t,n.property(e.key()));i.patchType(d.doDescrimination(i)),T=r.dumpInternal(i.wrapperNode(),!1,!1,y),l=e.key()}})}else if("items"==l&&"object"==typeof T){var N=Array.isArray(T),I=!N;if(N&&(I=null!=g.find(T,function(e){return"object"==typeof e})),I){T=null;var _=t.highLevel(),S=_.lowLevel();S.children().forEach(function(e){if("items"==e.key()){var t,n=_.definition().universe().type(s.Universe10.TypeDeclaration.name),a=_.definition().universe().type(s.Universe10.ArrayTypeDeclaration.name),o=void 0,u=e,p=void 0;do if(t=!0,o=new h.ASTNodeImpl(u,_,n,a.property(s.Universe10.ArrayTypeDeclaration.properties.items.name)),p=o.localType(),p&&i(p)&&1==p.superTypes().length){var m=u.children().filter(function(e){return"type"==e.key()});if(1==m.length){if(m[0].resolvedValueKind()==f.Kind.SCALAR){T=m[0].value();break}u=m[0],t=!1}}while(!t);null==T&&(o.patchType(d.doDescrimination(o)),T=r.dumpInternal(o.wrapperNode(),!1,!1,y)),p.getExtra(c.TOP_LEVEL_EXTRA)&&"object"==typeof T&&!Array.isArray(T)&&(T=T.type),Array.isArray(T)&&1==T.length&&(T=T[0]),l=e.key()}})}}var b=Array.isArray(T)?T.length>0:null!=T;if(n&&n.isAssignableFrom("TypeDeclaration")&&("type"===l||"schema"==l)&&b)if(Array.isArray(T)){var M=T.length>0?T[0]:null;if(null==M){var R=t.getDefaultsCalculator();if(R){var C=p.getUniverse("RAML10").type("TypeDeclaration").property("type");M=R.attributeDefaultIfEnabled(t.highLevel().asElement(),C)}T[0]=M}var _=t.highLevel(),w=_.localType(),P=!1,L=!1;if(w&&w.hasExternalInHierarchy()){var O=M.trim();P="{"===O[0]&&"}"===O[O.length-1],L="<"===O[0]&&">"===O[O.length-1]}P?a.typePropertyKind="JSON":L?a.typePropertyKind="XML":a.typePropertyKind="TYPE_EXPRESSION"}else"object"==typeof T&&(a.typePropertyKind="INPLACE");if(("type"===l||"schema"==l)&&T&&T.forEach&&"string"==typeof T[0]){var O=T[0].trim(),D=r.stringLooksLikeJSON(O),U=r.stringLooksLikeXML(O);if(D||U){var x=t.highLevel().lowLevel().includePath&&t.highLevel().lowLevel().includePath();if(!x&&t.highLevel().isElement()){var k=t.highLevel().asElement().attr("type");k||(k=t.highLevel().asElement().attr("schema")),k&&(x=k.lowLevel().includePath&&k.lowLevel().includePath())}if(x){var F=x.indexOf("#"),B="";F>=0&&(B=x.substring(F),x=x.substring(0,F));var V,K=t.highLevel().lowLevel().unit().resolve(x).absolutePath();V=0===K.indexOf("http://")||0===K.indexOf("https://")?K:E.relative(t.highLevel().lowLevel().unit().project().getRootPath(),K),V=V.replace(/\\/g,"/");var j=V+B;if(a.schemaPath=j,r.options.sourceMap){var W=a.sourceMap;W||(W={},a.sourceMap=W),W.path=j}}}}if((T||"type"!=l)&&(T||"schema"!=l)&&(T||"items"!=l)){if(t.definition&&m.isTypeDeclarationDescendant(t.definition())&&m.isTypeProperty(v)){var H=t[s.Universe10.TypeDeclaration.properties.schema.name]();if(null!=H&&(!Array.isArray(H)||0!=H.length))return;var _=t.highLevel(),S=_.lowLevel(),Y=!1;if(S.children().forEach(function(e){if("schema"==e.key())return void(Y=!0)}),Y)return}if(Array.isArray(T)){for(var q=[],G=0,X=T;G0&&(o[l]=ee.map(function(e){return{path:e}}))}}else{var z=r.dumpInternal(T);if(u.TypeInstanceImpl.isInstance(T))return void(a[l]=z);if(null==z&&u.BasicNodeImpl.isInstance(t)&&!r.isDefined(t,l))return;if(u.BasicNodeImpl.isInstance(t)&&r.nodePropertyTransformers.forEach(function(e){e.match(t,v)&&(z=e.transform(z,t))}),a[l]=z,"example"===l&&r.options&&r.options.dumpXMLRepresentationOfExamples&&T.expandable&&T.expandable._owner&&(z.asXMLString=T.expandable.asXMLString()),A&&e[l].isValueProperty()){var oe=Array.isArray(A)?A[0]:A;if(u.AttributeNodeImpl.isInstance(oe)){var ie=oe.highLevel();if(!ie.isFromKey()){var ae=h.actualPath(ie,!0);ae&&(o[l]=[{path:ae}])}}}}}}),this.options.sourceMap&&Object.keys(o).length>0){var l=a.sourceMap;l||(l={},a.sourceMap=l),l.scalarsSources=o}return a},e.prototype.serializeScalarsAnnotations=function(e,t,n){var r=this;if(t.scalarsAnnotations){for(var i={},a=t.scalarsAnnotations(),o=0,s=Object.keys(n);o0)if(Array.isArray(l[0])){var p=[];l.forEach(function(e,t){p.push(e.map(function(e){return r.dumpInternal(e)}))}),p.filter(function(e){return e.length>0}).length>0&&(i[u]=p)}else i[u]=l.map(function(e){return r.dumpInternal(e)})}}Object.keys(i).length>0&&(e.scalarsAnnotations=i)}},e.prototype.serializeMeta=function(e,t){if(this.options.serializeMetadata){var n=t.meta();n.isDefault()||(e.__METADATA__=n.toJSON())}},e.prototype.serializeTypeInstance=function(e){var t=this;if(e.isScalar())return e.value();if(e.isArray())return e.items().map(function(e){return t.serializeTypeInstance(e)});var n=e.properties();if(0==n.length)return null;var r={};return n.forEach(function(e){return r[e.name()]=t.serializeTypeInstanceProperty(e)}),r},e.prototype.serializeTypeInstanceProperty=function(e){var t=this;if(e.isArray()){var n=e.values(),r=[];return n.forEach(function(e){return r.push(t.serializeTypeInstance(e))}),r}return this.serializeTypeInstance(e.value())},e.prototype.isDefined=function(e,t){var n=e.highLevel();return n.elementsOfKind(t).length>0||n.attributes(t).length>0},e}();t.JsonSerializer=T;var _=function(){function e(e,t){this.typeMatcher=e,this.propMatcher=t}return e.prototype.match=function(e,t){return(null==e||this.typeMatcher(e))&&(null==t||this.propMatcher(t))},e}(),S=function(){function e(e){this.matchers=e}return e.prototype.match=function(e,t){for(var n=this.matchers.length,r=0;r0&&e[0][this.propName]){var n={};return e.forEach(function(e){var r=e[t.propName],i=n[r];i?Array.isArray(i)?i.push(e):n[r]=[i,e]:n[r]=e}),n}return e},e}(),I=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return this.matcher.match(e.definition?e.definition():null,t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e[this.propName]]=e, -t},e}(),b=function(e){function t(){return e.call(this,new S([new _(m.isApiSibling,m.isBaseUriParametersProperty),new _(m.isResourceBaseSibling,m.isUriParametersProperty),new _(m.isResourceBaseSibling,m.isQueryParametersProperty),new _(m.isTraitType,m.isQueryParametersProperty),new _(m.isMethodType,m.isQueryParametersProperty),new _(m.isSecuritySchemePartType,m.isQueryParametersProperty),new _(m.isTraitType,m.isHeadersProperty),new _(m.isMethodType,m.isHeadersProperty),new _(m.isSecuritySchemePartType,m.isHeadersProperty),new _(m.isResponseType,m.isHeadersProperty),new _(m.isBodyLikeType,m.isFormParametersProperty)]),"name")||this}return o(t,e),t}(N),M=function(e){function t(){return e.call(this,new S([new _(m.isLibraryBaseSibling,m.isTypesProperty),new _(function(e){return m.isLibraryBaseSibling(e)&&m.isRAML10Type(e)},m.isSchemasProperty)]),"name")||this}return o(t,e),t.prototype.match=function(e,t){var n=null!=e.parent()&&this.matcher.match(e.parent().definition(),t);return!!n},t}(I),R=(function(e){function t(){return e.call(this,new S([new _(m.isLibraryBaseSibling,m.isUsesProperty)]),"name")||this}return o(t,e),t}(N),function(e){function t(){return e.call(this,new S([new _(m.isObjectTypeDeclarationSibling,m.isPropertiesProperty)]),"name")||this}return o(t,e),t}(N)),C=function(e){function t(){return e.call(this,new S([new _(m.isMethodBaseSibling,m.isResponsesProperty)]),"code")||this}return o(t,e),t}(N),w=function(e){function t(){return e.call(this,new S([new _(function(e){return!0},m.isAnnotationsProperty)]),"name")||this}return o(t,e),t}(N),P=function(e){function t(){return e.call(this,new S([new _(m.isResponseType,m.isBodyProperty),new _(m.isMethodBaseSibling,m.isBodyProperty)]),"name")||this}return o(t,e),t}(N),L=function(e){function t(){return e.call(this,new S([new _(m.isTraitType,m.isTraitsProperty)]),"name")||this}return o(t,e),t}(I),O=function(e){function t(){return e.call(this,new S([new _(m.isResourceTypeType,m.isResourceTypesProperty)]),"name")||this}return o(t,e),t.prototype.transform=function(t){var n=y.Universe10.ResourceBase.properties.methods.name;if(Array.isArray(t))return t;var r=t[n];return r&&r.forEach(function(e){var n=Object.keys(e);if(n.length>0){var r=n[0];t[r]=e[r]}}),delete t[n],e.prototype.transform.call(this,t)},t}(I),D=function(e){function t(){return e.call(this,new S([new _(m.isTypeDeclarationSibling,m.isFacetsProperty)]),"name")||this}return o(t,e),t}(N),U=function(e){function t(){return e.call(this,null,"name")||this}return o(t,e),t.prototype.match=function(e,t){return null!=t&&m.isSecuritySchemesProperty(t)},t}(I),x=function(e){function t(){return e.call(this,new S([new _(m.isLibraryBaseSibling,m.isAnnotationTypesProperty)]),"name")||this}return o(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},t}(I),k=function(e){function t(){return e.call(this,null,"method")||this}return o(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&m.isResourceTypeType(e.parent().definition())&&m.isMethodsProperty(t)},t}(I),F=s.Universe10.ExampleSpec.properties.name.name,B=s.Universe10.ExampleSpec.properties.value.name,V="structuredContent",K=(function(){function e(){}return e.prototype.match=function(e,t){return m.isExampleSpecType(e.definition())},e.prototype.transform=function(e){var t=this;if(Array.isArray(e)&&e.length>0){if(e[0][F]){var n={};return e.forEach(function(e){return n[e[F]]=t.getActualExample(e)}),n}var r=e.map(function(e){return t.getActualExample(e)});return r}return e},e.prototype.getActualExample=function(e){return e[V]?e[V]:e[B]},e}(),function(){function e(){}return e.prototype.match=function(e,t){return e.definition&&m.isTypeDeclarationSibling(e.definition())},e.prototype.transform=function(e){var t=Array.isArray(e),n=t?e:[e];return n.forEach(function(e){var t=e.example;t&&(e.example=t.structuredValue,e.structuredExample=t)}),t?n:n[0]},e}()),j=function(){function e(){this.matcher=new _(function(e){return m.isApiType(e)&&m.isRAML08Type(e)},m.isSchemasProperty)}return e.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e.key]=e.value,e.sourceMap&&e.sourceMap.path&&(t.sourceMap={path:e.sourceMap.path}),t},e.prototype.getActualExample=function(e){return e[V]?e[V]:e[B]},e}(),W=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&m.isProtocolsProperty(t)},e.prototype.transform=function(e){return"string"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},e}(),H=function(){function e(){this.usecases=new S([new _(m.isApiSibling,m.isMediaTypeProperty)])}return e.prototype.match=function(e,t){return this.usecases.match(e.definition(),t)},e.prototype.transform=function(e){return Array.isArray(e)&&1==e.length?e[0]:e},e}(),Y=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&m.isResourcesProperty(t)},e.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[y.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split("/");r.length>0&&0==r[0].length;)r.shift();e.relativeUriPathSegments=r,e.absoluteUri=t.absoluteUri()}return e},e}(),q=function(){function e(){}return e.prototype.match=function(e,t){return!(!e.parent()||!e.parent().highLevel().lowLevel().libProcessed)&&(m.isAnnotationTypesProperty(t)||m.isTypesProperty(t)||m.isResourceTypesProperty(t)||m.isTraitsProperty(t)||m.isSecuritySchemesProperty(t))},e.prototype.transform=function(e,t){for(var n=t.highLevel().lowLevel(),r=n.key(),i=n;l.LowLevelProxyNode.isInstance(i);)i=i.originalNode();var a=i.key(),o=e[Object.keys(e)[0]];return o.name=a,o.displayName==r&&(o.displayName=a),e},e}(),G=function(){function e(){}return e.prototype.match=function(e,t){var n=e.highLevel();if(!n)return!1;var r=n.definition();return!!r&&(m.isResourceTypeType(r)||m.isTraitType(r)||m.isMethodType(r)||m.isResponseType(r)||m.isParameterDescendant(r)||m.isBodyLikeType(r)||m.isTypeDeclarationDescendant(r))},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t=s.Universe10.Trait.properties.parametrizedProperties.name,n=e[t];return n&&(Object.keys(n).forEach(function(t){e[t]=n[t]}),delete e[t]),e},e}(),X=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&(m.isSecuredByProperty(t)||m.isIsProperty(t)||null!=e.parent()&&(m.isResourceType(e.parent().highLevel().definition())||m.isResourceTypeType(e.parent().highLevel().definition()))&&m.isTypeProperty(t))},e.prototype.transform=function(e){return e?Array.isArray(e)?e:this.toSimpleValue(e):null},e.prototype.toSimpleValue=function(e){var t=e.name,n=e.structuredValue;if(n){var r={};return r[t]=n,r}return t},e}(),z=function(){function e(){}return e.prototype.match=function(e,t){if(!u.BasicNodeImpl.isInstance(e))return!1;var n=e.highLevel(),r=n.definition();if(!m.isTypeDeclarationDescendant(r))return!1;var i=n.localType();return!(!i||!i.isArray())},e.prototype.transform=function(e){var t=y.Universe10.TypeDeclaration.properties.type.name,n=y.Universe10.TypeDeclaration.properties.schema.name,r=y.Universe10.ArrayTypeDeclaration.properties.items.name,i=e[t];return i||(i=e[n]),1==i.length&&v.stringEndsWith(i[0],"[]")&&(null==e[r]&&(e[r]=i[0].substring(0,i[0].length-2)),i[0]="array"),e},e}(),$=function(){function e(){this.map={}}return e.prototype.addProperty=function(e,t){var n=this.map[t];n||(n=new J(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return Object.keys(this.map).map(function(t){return e.map[t].print()}).join("\n")+"\n"},e}(),J=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.domain().nameId(),n=this.map[t];n||(n=new Q(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return this.typeName+":\n"+Object.keys(this.map).map(function(t){return" "+e.map[t].print()}).join("\n")},e}(),Q=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.nameId();this.map[t]=e},e.prototype.print=function(){return this.typeName+": "+Object.keys(this.map).sort().join(", ")},e}();t.isEmpty=i},function(e,t){"use strict";function n(e){return"Api"==e.kind()&&"RAML10"==e.RAMLVersion()}function r(e){return"LibraryBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function i(e){return"Annotable"==e.kind()&&"RAML10"==e.RAMLVersion()}function a(e){return"AnnotationRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function o(e){return"Reference"==e.kind()&&"RAML10"==e.RAMLVersion()}function s(e){return"ValueType"==e.kind()&&"RAML10"==e.RAMLVersion()}function u(e){return"StringType"==e.kind()&&"RAML10"==e.RAMLVersion()}function l(e){return"UriTemplate"==e.kind()&&"RAML10"==e.RAMLVersion()}function p(e){return"RelativeUriString"==e.kind()&&"RAML10"==e.RAMLVersion()}function c(e){return"FullUriTemplateString"==e.kind()&&"RAML10"==e.RAMLVersion()}function f(e){return"StatusCodeString"==e.kind()&&"RAML10"==e.RAMLVersion()}function h(e){return"FixedUriString"==e.kind()&&"RAML10"==e.RAMLVersion()}function d(e){return"ContentType"==e.kind()&&"RAML10"==e.RAMLVersion()}function m(e){return"MarkdownString"==e.kind()&&"RAML10"==e.RAMLVersion()}function y(e){return"SchemaString"==e.kind()&&"RAML10"==e.RAMLVersion()}function v(e){return"MimeType"==e.kind()&&"RAML10"==e.RAMLVersion()}function g(e){return"AnyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function A(e){return"NumberType"==e.kind()&&"RAML10"==e.RAMLVersion()}function E(e){return"IntegerType"==e.kind()&&"RAML10"==e.RAMLVersion()}function T(e){return"NullType"==e.kind()&&"RAML10"==e.RAMLVersion()}function _(e){return"TimeOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function S(e){return"DateOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function N(e){return"DateTimeOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function I(e){return"DateTimeType"==e.kind()&&"RAML10"==e.RAMLVersion()}function b(e){return"FileType"==e.kind()&&"RAML10"==e.RAMLVersion()}function M(e){return"BooleanType"==e.kind()&&"RAML10"==e.RAMLVersion()}function R(e){return"AnnotationTarget"==e.kind()&&"RAML10"==e.RAMLVersion()}function C(e){return"TraitRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function w(e){return"Trait"==e.kind()&&"RAML10"==e.RAMLVersion()}function P(e){return"MethodBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function L(e){return"Operation"==e.kind()&&"RAML10"==e.RAMLVersion()}function O(e){return"TypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function D(e){return"ModelLocation"==e.kind()&&"RAML10"==e.RAMLVersion()}function U(e){return"LocationKind"==e.kind()&&"RAML10"==e.RAMLVersion()}function x(e){return"ExampleSpec"==e.kind()&&"RAML10"==e.RAMLVersion()}function k(e){return"UsesDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function F(e){return"XMLFacetInfo"==e.kind()&&"RAML10"==e.RAMLVersion()}function B(e){return"ArrayTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function V(e){return"UnionTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function K(e){return"ObjectTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function j(e){return"StringTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function W(e){return"BooleanTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function H(e){return"NumberTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function Y(e){return"IntegerTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function q(e){return"DateOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function G(e){return"TimeOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function X(e){return"DateTimeOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function z(e){return"DateTimeTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function $(e){return"FileTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function J(e){return"Response"==e.kind()&&"RAML10"==e.RAMLVersion()}function Q(e){return"SecuritySchemePart"==e.kind()&&"RAML10"==e.RAMLVersion()}function Z(e){return"SecuritySchemeRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function ee(e){return"AbstractSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function te(e){return"SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function ne(e){return"OAuth1SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function re(e){return"OAuth2SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function ie(e){return"OAuth2SecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function ae(e){return"OAuth1SecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function oe(e){return"PassThroughSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function se(e){return"BasicSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function ue(e){return"DigestSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function le(e){return"CustomSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function pe(e){return"Method"==e.kind()&&"RAML10"==e.RAMLVersion()}function ce(e){return"ResourceTypeRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function fe(e){return"ResourceType"==e.kind()&&"RAML10"==e.RAMLVersion()}function he(e){return"ResourceBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function de(e){return"Resource"==e.kind()&&"RAML10"==e.RAMLVersion()}function me(e){return"DocumentationItem"==e.kind()&&"RAML10"==e.RAMLVersion()}function ye(e){return"Library"==e.kind()&&"RAML10"==e.RAMLVersion()}function ve(e){return"Overlay"==e.kind()&&"RAML10"==e.RAMLVersion()}function ge(e){return"Extension"==e.kind()&&"RAML10"==e.RAMLVersion()}function Ae(e){return null==e.highLevel().parent()}function Ee(e){return Ae(e)?e:null}Object.defineProperty(t,"__esModule",{value:!0}),t.isApi=n,t.isLibraryBase=r,t.isAnnotable=i,t.isAnnotationRef=a,t.isReference=o,t.isValueType=s,t.isStringType=u,t.isUriTemplate=l,t.isRelativeUriString=p,t.isFullUriTemplateString=c,t.isStatusCodeString=f,t.isFixedUriString=h,t.isContentType=d,t.isMarkdownString=m,t.isSchemaString=y,t.isMimeType=v,t.isAnyType=g,t.isNumberType=A,t.isIntegerType=E,t.isNullType=T,t.isTimeOnlyType=_,t.isDateOnlyType=S,t.isDateTimeOnlyType=N,t.isDateTimeType=I,t.isFileType=b,t.isBooleanType=M,t.isAnnotationTarget=R,t.isTraitRef=C,t.isTrait=w,t.isMethodBase=P,t.isOperation=L,t.isTypeDeclaration=O,t.isModelLocation=D,t.isLocationKind=U,t.isExampleSpec=x,t.isUsesDeclaration=k,t.isXMLFacetInfo=F,t.isArrayTypeDeclaration=B,t.isUnionTypeDeclaration=V,t.isObjectTypeDeclaration=K,t.isStringTypeDeclaration=j,t.isBooleanTypeDeclaration=W,t.isNumberTypeDeclaration=H,t.isIntegerTypeDeclaration=Y,t.isDateOnlyTypeDeclaration=q,t.isTimeOnlyTypeDeclaration=G,t.isDateTimeOnlyTypeDeclaration=X,t.isDateTimeTypeDeclaration=z,t.isFileTypeDeclaration=$,t.isResponse=J,t.isSecuritySchemePart=Q,t.isSecuritySchemeRef=Z,t.isAbstractSecurityScheme=ee,t.isSecuritySchemeSettings=te,t.isOAuth1SecuritySchemeSettings=ne,t.isOAuth2SecuritySchemeSettings=re,t.isOAuth2SecurityScheme=ie,t.isOAuth1SecurityScheme=ae,t.isPassThroughSecurityScheme=oe,t.isBasicSecurityScheme=se,t.isDigestSecurityScheme=ue,t.isCustomSecurityScheme=le,t.isMethod=pe,t.isResourceTypeRef=ce,t.isResourceType=fe,t.isResourceBase=he,t.isResource=de,t.isDocumentationItem=me,t.isLibrary=ye,t.isOverlay=ve,t.isExtension=ge,t.isFragment=Ae,t.asFragment=Ee},function(e,t,n){"use strict";function r(){if(!m){m={};for(var e=0,n=Object.keys(t.transitions);e=0})}function s(e,t){return t.referencePatcher.patchType(e,t),!1}function u(e,t){return t.meta.templatesCollection=I.universesInfo.Universe10.LibraryBase.properties.traits.name,e.kind()!=g.Kind.SCALAR&&null==e.key()&&(e=e.children()[0]),t.referencePatcher.patchReference(e,t,"traits"),!1}function l(e,t){t.meta.templatesCollection=I.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name;var n=e.children();if(n.length>0)t.referencePatcher.patchReference(n[0],t,"resourceTypes");else{var r=e,i=new T.LowLevelCompositeNode(A.createScalar(e.value()),null,r.transformer(),"RAML10",!0);t.referencePatcher.patchReference(i,t,"resourceTypes"),t.registerOnly||r.setValueOverride(i.value())}return!1}function p(e,t){var n=h(e).key(),r=e,i=r.transformer(),a=t.referencePatcher.resolveReferenceValue(n.substring(1,n.length-1),t,i,"annotationTypes");return a&&(t.referencePatcher.registerPatchedReference(a),t.registerOnly||(r.setKeyOverride("("+a.value()+")"),a.isChained()&&r.addMeta("chaining",[{value:a.value(),kind:"annotationRef"}]))),!1}function c(e,t){return"securedBy"==e.key()&&(e=e.children()[0]),t.referencePatcher.patchReference(e,t,"securitySchemes"),!1}function f(e,t){var n=S.find(e.children(),function(e){return e.key()==I.universesInfo.Universe10.MethodBase.properties.is.name});return n&&n.filterChildren(),!1}function h(e){for(var t=0;t<2&&T.LowLevelProxyNode.isInstance(e);t++)e=e.originalNode();return e}function d(e){for(var t=0,n=e.elements();t"==s)){var u=M.checkExpression(a),l=i.transformer(),p=a,c={status:M.ParametersEscapingStatus.NOT_REQUIRED},f=l?l.unitsChain:null;if(null!=l||a.indexOf("<<")>=0){var d=h(i),m=d.value();if(c=M.escapeTemplateParameters(m),c.status==M.ParametersEscapingStatus.OK)p=u?c.resultingString:m;else{if(c.status==M.ParametersEscapingStatus.ERROR)return;l=null}}var y;if(f){y=[];for(var v=0,g=f;v=0&&M.isCompoundValue(p)&&(p=a,l=null);var R=this.resolveReferenceValue(p,t,l,r);null!=R&&(this.registerPatchedReference(R),E=R.value(),R.isChained()&&_.push({kind:"type",value:E}))}if(null==E||t.registerOnly||(i.setValueOverride(E),_.length>0&&i.addMeta("chaining",_)),T&&t.popUnit(),y)for(var C=0;C=0){var s=!0,u=t.resolver.nsMap(t.rootUnit),l=n.transform(e,!0,function(){return s},function(e,n){var i=a.resolveReferenceValueBasic(e,t,r,n.unitsChain);null==i&&(i=new M.PatchedReference(null,e,r,t.rootUnit,!1,M.PatchMode.DEFAULT));var l,p=i.namespace();if(p){var c=u&&u[p];c&&(l=c.unit)}l||(l=t.rootUnit);var f=t.resolver.unitModel(l);return s=o?(f.annotationTypes.hasElement(i.name()),!1):(f.types.hasElement(i.name()),!1),i});i=l.value}return void 0!==i&&M.instanceOfPatchedReference(i)||(i=this.resolveReferenceValueBasic(e,t,r)),i},e.prototype.resolveReferenceValueBasic=function(e,t,n,r){if(null==e||"string"!=typeof e)return null;var i="types"==n||"annotationTypes"==n,a=i&&E.stringEndsWith(e,"?"),o=a?e.substring(0,e.length-1):e;if(!(o.indexOf("<<")>=0)){var s,u,l,p=o.lastIndexOf("."),c=r||t.units;if(p>=0){l=o.substring(0,p),u=o.substring(p+1);for(var f=c.length;f>0;f--){var h=c[f-1],d=this.libExpMode?t.resolver.expandedNSMap(h):t.resolver.nsMap(h),m=d&&d[l];if(null!=m&&(s=m.unit,null!=s))break}}else{if(i&&null!=I.rt.builtInTypes().get(o))return null;u=o,s=c[c.length-1]}if(null==s&&!this.libExpMode){if(l&&l.length>0){for(var v=void 0,f=c.length;f>0;f--){var h=c[f-1],g=t.resolver.expandedNSMap(h),m=g&&g[l];if(null!=m&&(v=m.unit,null!=v))break}if(null!=v){var A=t.resolver.resolveNamespace(t.rootUnit,v);if(null!=A){var T=A.namespace();return a&&(u+="?"),new M.PatchedReference(T,u,n,v,!0,this.mode)}}}return null}if(s.absolutePath()==t.rootUnit.absolutePath())return null==l||0==l.length?null:new M.PatchedReference(null,u,n,s,!1,this.mode);var _=t.resolver.resolveNamespace(t.rootUnit,s);if(null==_)return null;var S=_.namespace();if(null==S)return null;if(this.mode==M.PatchMode.PATH){var N=s.absolutePath().replace(/\\/g,"/");y.isWebPath(N)||(N="file://"+N),S=N+"#/"+n}return a&&(u+="?"),new M.PatchedReference(S,u,n,s,!1,this.mode)}},e.prototype.patchNodeName=function(e,t,n){var r=e,i=r.key(),a="annotationTypes"==n;a&&(i=i.substring(1,i.length-1));var o=this.resolveReferenceValueBasic(i,t,n,[r.unit()]);if(null!=o){this.registerPatchedReference(o);var s=o.value();a&&(s="("+s+")"),t.registerOnly||r.setKeyOverride(s)}},e.prototype.patchReference=function(e,t,n,r){void 0===r&&(r=!1);var i=e;if(T.LowLevelProxyNode.isInstance(i)){var a=i.transformer();if(e.kind()==g.Kind.SCALAR){var o=i.value();if(null!=a){var s=h(i);o=s.value()}var u=this.resolveReferenceValue(o,t,a,n);if(null!=u){var l=u.value();t.registerOnly||i.setValueOverride(l),this.registerPatchedReference(u)}}else{var p=h(e).key(),o=p;if(null!=p){var u=this.resolveReferenceValue(o,t,a,n);if(null!=u){var l=u.value();t.registerOnly||e.setKeyOverride(l),this.registerPatchedReference(u)}var c=t.meta.templatesCollection;if(c&&(null==u&&o.indexOf(".")<0&&(u=new M.PatchedReference("",o,c,t.rootUnit,!1,M.PatchMode.DEFAULT)),u)){var f=t.resolver.getComponent(t.rootUnit,c,u.namespace(),u.name());if(f)for(var d=m[I.universesInfo.Universe10.TypeDeclaration.name],y=0,v=e.children();y0)c=u[0],c.children().forEach(function(e){return m[e.key()]=!0});else{var y=A.createMapNode("uses");y._parent=p,y.setUnit(p.unit()),c=a.replaceChild(null,y)}for(var v=0,g=f.concat(d);v0&&t.removeChild(r[0])}},e.prototype.registerPatchedReference=function(e){var t=e.collectionName();if(t){var n=e.referencedUnit().absolutePath(),r=this._outerDependencies[n];null==r&&(r={},this._outerDependencies[n]=r);var i=r[t];null==i&&(i={},r[t]=i),i[e.name()]=e}},e.prototype.expandLibraries=function(e,t){void 0===t&&(t=!1);var n=this.libExpMode;if(this.libExpMode=!0,!e.actual().libExpanded){var r=e.unit(),i=r.project(),a=[],o=i.namespaceResolver(),s=o.expandedPathMap(r);if(null!=s){for(var u=Object.keys(s).sort(),l=0,p=u;l0)for(var m=0,y=d;m0){d.needTypesReset=!0;var s=r.highLevel().types(),h=s.getTypeRegistry().getByChain(a.value());if(h)for(var m=r.project().namespaceResolver(),y=0,g=h.allSubTypes();y>")&&(e=e.substring("<<".length,e.length-">>".length),e.indexOf("<<")<0&&(t.meta.params[e]=!0))}function p(e,t,n){for(var r=[],i=0,a=e.children();i>")&&(s=s.substring(2,s.length-2),s.indexOf("<<")>=0||r.push({setParam:o.key(),readParam:s}))}}if(0!=r.length){for(var u=e.key(),l=[],p=u.length,c=0;c0)for(var c=l.length-1;c>=0;c--){var h=l[c],d=u.substring(0,h),m=u.substring(h+1,p);f=t.resolver.getComponent(t.rootUnit,n,d,m,t.meta.passed)}else f=t.resolver.getComponent(t.rootUnit,n,null,u,t.meta.passed);if(f&&f.isInitialized())for(var y=0,v=r;y0){var N=S[0],M=N.value();if(M){var R=e.unit.resolve(M);if(R){var C=t.unitModel(R);e.master=C}}}}}}function d(e,t,n){void 0===n&&(n={});var r=O[e.kind];if(r){var i=e.id();if(!n[i]){n[i]=!0;try{var a=new S.Scope,o=e.node.unit().project().getMainUnit();if(o){var s=o.ast(),u=I.ramlFirstLine(o.contents());if(s&&3==u.length){var l="1.0"==u[1]?b.getUniverse("RAML10"):b.getUniverse("RAML08");if(l){var p=u[2],c=l.type(p);c&&_.isApiSibling(c)&&(a.hasRootMediaType=null!=M.find(s.children(),function(e){return"mediaType"==e.key()}))}}}var f=new S.State(null,e.node.unit(),a,t);f.meta.params={},f.meta.passed=n,r.processNode(e.node,f),e.typeValuedParameters=f.meta.params}finally{delete n[i]}}}}function m(e){var t=I.ramlFirstLine(e.contents());if(!t)return!1;if(t.length<3||!t[2])return!0;var n=t[2],r=b.getUniverse("RAML10");if(!r)return!1;var i=r.type(n);return!!i&&_.isLibraryBaseSibling(i)}function y(e,t,n){void 0===n&&(n=!1);var r;n?(r=[],t.forEach(function(e){var t=e.children();t.length>0&&r.push(t[0])})):r=t,r.forEach(function(t){e.array.push(t);var n=t.key();e.map[n]=t;var r=v(t,e.name);r&&(e.templateModels||(e.templateModels={}),e.templateModels[n]=r)})}function v(e,t){var n;if(t==b.universesInfo.Universe10.LibraryBase.properties.traits.name?n=b.universesInfo.Universe10.Trait.name:t==b.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name&&(n=b.universesInfo.Universe10.ResourceType.name),n){i();var r=O[n];if(!r)return null;var a=e.key();return new D(a,n,e,null)}}Object.defineProperty(t,"__esModule",{value:!0});var g=n(5),A=n(6),E=n(203),T=n(21),_=n(204),S=n(222),N=n(211),I=n(55),b=n(56),M=n(16),R=n(15),C=function(){function e(){this.expandedAbsToNsMap={},this._expandedNSMap={},this.byPathMap={},this.byNsMap={},this._hasFragments={},this._unitModels={}}return e.prototype.hasTemplates=function(e){var t=this.unitModel(e);if(!t.traits.isEmpty()||!t.resourceTypes.isEmpty())return!0;var n=this.expandedPathMap(e);if(n)for(var i=0,a=Object.keys(n);i0&&C.length>0&&n.charAt(0).toLowerCase()!=C.charAt(0).toLowerCase()?C:A.relative(n,C),M=M.replace(/\\/g,"/");var P=new w(N,_.unit,M);c[P.absolutePath()]||(i[E]=P,a.push(P),c[P.absolutePath()]=!0)}}o.forEach(function(e){if(e.valueKind()==T.Kind.INCLUDE_REF){var t=s.resolve(e.includePath());if(t){if(!t.isRAMLUnit())return;m(t.ast())}}else m(e)}),null==r.parent()&&(p[u]=!1)}},void m(s)):"continue"},v=0;vt.length)return!1;if(e.lengthi)return!1}return!0},e.prototype.hasFragments=function(e){if(!e.isRAMLUnit())return!1;var t=I.ramlFirstLine(e.contents());return!(!t||t.length<2||"1.0"!=t[1])&&(this.expandedPathMap(e),!!this._hasFragments[e.absolutePath()])},e.prototype.unitModel=function(e,t){var n=e.absolutePath(),r=this._unitModels[n];return r?r:(r=new L(e),this._unitModels[n]=r,h(r,this,t),r)},e.prototype.deleteUnitModel=function(e){delete this._unitModels[e]},e.prototype.getComponent=function(e,t,n,r,i){var a=this.expandedNSMap(e);if(a){var o=e;if(n){var s=a[n];o=s?s.unit:null}if(o){var u=this.unitModel(o,i),l=u[t];if(l&&P.isInstance(l)){var p=l.getTemplateModel(r);return p&&!p.isInitialized()&&d(p,this,i),p}}}},e}();t.NamespaceResolver=C;var w=function(){function e(e,t,n){this.usesNodes=e,this.unit=t,this.includePath=n,this.namespaceSegments=this.usesNodes.map(function(e){return e.key()})}return e.prototype.steps=function(){return this.namespaceSegments.length},e.prototype.namespace=function(){return this.namespaceSegments.join(".")},e.prototype.absolutePath=function(){return this.unit.absolutePath()},e}();t.UsesInfo=w;var P=function(){function e(e){this.name=e,this.array=[],this.map={}}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&M.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.hasElement=function(e){return null!=this.map[e]},e.prototype.getElement=function(e){return this.map[e]},e.prototype.getTemplateModel=function(e){return this.templateModels?this.templateModels[e]:null},e.prototype.isEmpty=function(){return 0==this.array.length},e.CLASS_IDENTIFIER="namespaceResolver.ElementsCollection",e}();t.ElementsCollection=P;var L=function(){function e(e){this.unit=e,this.init()}return e.prototype.type=function(){return this._type},e.prototype.init=function(){this.types=new P(b.universesInfo.Universe10.LibraryBase.properties.types.name),this.annotationTypes=new P(b.universesInfo.Universe10.LibraryBase.properties.annotationTypes.name),this.securitySchemes=new P(b.universesInfo.Universe10.LibraryBase.properties.securitySchemes.name),this.traits=new P(b.universesInfo.Universe10.LibraryBase.properties.traits.name),this.resourceTypes=new P(b.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name);var e=I.ramlFirstLine(this.unit.contents());e&&(e.length<3||!e[2]?this._type=b.universesInfo.Universe10.Api.name:this._type=e[2])},e.prototype.isOverlayOrExtension=function(){return this._type==b.universesInfo.Universe10.Overlay.name||this._type==b.universesInfo.Universe10.Extension.name},e.prototype.extensionSet=function(){if(!this._extensionSet){this._extensionSet={},this._extensionChain=[];for(var e=this;e;){var t=e.unit.absolutePath();if(this._extensionSet[t])break;this._extensionSet[t]=e,this._extensionChain.push(e),e=e.master}}return this._extensionSet},e.prototype.extensionChain=function(){return this._extensionChain||this.extensionSet(),this._extensionChain},e}();t.UnitModel=L;var O,D=function(){function e(e,t,n,r){this.name=e,this.kind=t,this.node=n,this.typeValuedParameters=r}return e.prototype.isInitialized=function(){return null!=this.typeValuedParameters},e.prototype.id=function(){return this.node.unit().absolutePath()+"|"+this.kind+"|"+this.node.key()},e}();t.TemplateModel=D;var U=function(){function e(){this.parent=new S.ReferencePatcherActionsAndConditionsFactory}return e.prototype.action=function(e){var t=c;return"##patch"==e?t=s:"##patchAnnotationName"==e?t=u:"##patchResourceTypeReference"==e?t=o:"##patchTraitReference"==e&&(t=a),t},e.prototype.condition=function(e){return this.parent.condition(e)},e}();t.NamespaceResolverActionsAndConditionsFactory=U,t.extendedUnit=f,t.initUnitModel=h,t.isLibraryBaseDescendant=m},function(e,t,n){t.no=t.noCase=n(225),t.dot=t.dotCase=n(230),t.swap=t.swapCase=n(231),t.path=t.pathCase=n(233),t.upper=t.upperCase=n(232),t.lower=t.lowerCase=n(226),t.camel=t.camelCase=n(234),t.snake=t.snakeCase=n(235),t.title=t.titleCase=n(236),t.param=t.paramCase=n(237),t.header=t.headerCase=n(238),t.pascal=t.pascalCase=n(239),t.constant=t.constantCase=n(241),t.sentence=t.sentenceCase=n(242),t.isUpper=t.isUpperCase=n(243),t.isLower=t.isLowerCase=n(244),t.ucFirst=t.upperCaseFirst=n(240),t.lcFirst=t.lowerCaseFirst=n(245)},function(e,t,n){var r=n(226),i=n(227),a=n(228),o=n(229);e.exports=function(e,t,n){function s(e,t,r){return 0===t||t===r.length-e.length?"":n}return null==e?"":(n="string"!=typeof n?" ":n,e=String(e).replace(a,"$1 $2").replace(o,"$1 $2").replace(i,s),r(e,t))}},function(e,t){var n={tr:{regexp:/\u0130|\u0049|\u0049\u0307/g,map:{"İ":"i",I:"ı","İ":"i"}},az:{regexp:/[\u0130]/g,map:{"İ":"i",I:"ı","İ":"i"}},lt:{regexp:/[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,map:{I:"i̇",J:"j̇","Į":"į̇","Ì":"i̇̀","Í":"i̇́","Ĩ":"i̇̃"}}};e.exports=function(e,t){var r=n[t];return e=null==e?"":String(e),r&&(e=e.replace(r.regexp,function(e){return r.map[e]})),e.toLowerCase()}},function(e,t){e.exports=/[^A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g},function(e,t){e.exports=/([a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])/g},function(e,t){e.exports=/([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A][a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])/g; -},function(e,t,n){var r=n(225);e.exports=function(e,t){return r(e,t,".")}},function(e,t,n){var r=n(232),i=n(226);e.exports=function(e,t){if(null==e)return"";for(var n="",a=0;a0&&(i=n[r][0].attr);var o=new f.UserDefinedProp(r,i);o.withDomain(e);var s=a[r];o.getAdapter(v.RAMLPropertyService).putMeta("templatePaths",s);var u;if("RAML10"==t.definition().universe().version()){var l=n[r].filter(function(e){return A.isStringTypeType(e.tp)}).length>0;u=l?m.Universe10.StringType.name:m.Universe10.AnyType.name}else u=m.Universe08.StringType.name;var p=d.unique(n[r].map(function(e){return e.tp})).filter(function(e){return e&&e.nameId()!=u});o.withRange(1==p.length?p[0]:t.definition().universe().type(u)),o.withRequired(!0),1==p.length&&"RAML10"==t.definition().universe().version()&&p[0].key()==m.Universe10.SchemaString&&o.getAdapter(v.RAMLPropertyService).setTypeExpression(!0),o.unmerge()});var l=new f.UserDefinedProp("____key",t);return l.withDomain(e),l.withKey(!0),l.withFromParentKey(!0),l.withRange(t.definition().universe().type(m.Universe08.StringType.name)),e}function o(e,t){"RAML08"==t.universe().version()&&e.getAdapter(v.RAMLService).withAllowAny();var n=t.property(t.getAdapter(v.RAMLService).getReferenceIs());return n&&n.range().properties().forEach(function(t){var n=new f.Property(t.nameId());n.unmerge(),n.withDomain(e),n.withRange(t.range()),n.withMultiValue(t.isMultiValue())}),e}function s(e){if(!e)return null;if(e.associatedType())return e.associatedType();var t=e.root(),n=t.definition()&&A.isApiSibling(t.definition()),r=e.root().lowLevel().libProcessed;if((!n||r)&&e.definition().isAssignableFrom(m.Universe10.TypeDeclaration.name)){var i=e.parent();if(i&&i.definition().isAssignableFrom(m.Universe10.TypeDeclaration.name)){var s=i.localType();if(null!=s)if(A.isPropertiesProperty(e.property())){var l=e.name(),p=s.properties().find(function(e){return e.nameId()==l});if(p){var c=p.range();if(c)return c}}else if(A.isItemsProperty(e.property())&&s.isArray()){var d=s.array().componentType();if(d)return d}else if(A.isTypeProperty(e.property())){var y=s.superTypes(),d=y&&1==y.length&&y[0];if(d)return d}}}var g=e.lowLevel().unit(),E=g?g.path():"";h.setPropertyConstructor(function(t){var n=null,r=e.elementsOfKind("properties").filter(function(e){return e.name()==t});r&&(n=r[0]);var i=new f.UserDefinedProp(t,n);return i.unmerge(),i});try{var T=e.definition();if(e.property()&&e.property().nameId()==m.Universe10.LibraryBase.properties.annotationTypes.name){var S=new _(e.name(),e.definition().universe(),e,E,""),N=u(e);S._superTypes.push(N),0==e.elementsOfKind(m.Universe10.ObjectTypeDeclaration.properties.properties.name).length&&S.getAdapter(v.RAMLService).withAllowAny();var I=T.getAdapter(v.RAMLService).getExtendedType();return I&&S._superTypes.push(I),S}var S=new f.UserDefinedClass(e.name(),e.definition().universe(),e,E,"");if(e.setAssociatedType(S),T.getAdapter(v.RAMLService).isInlinedTemplates())return a(S,e);if(T.getAdapter(v.RAMLService).getReferenceIs())return o(S,T);var b=u(e);b.getAdapter(v.RAMLService).setDeclaringNode(e),e.setAssociatedType(b)}finally{h.setPropertyConstructor(null)}return b}function u(e){return h.toNominal(e.parsedType(),function(t){var n=e.definition().universe().type(t);if(!n){new f.UserDefinedClass("",e.definition().universe(),e,"","")}return n})}function l(e){return function(t){var n=e.type(t);if(!n){new f.UserDefinedClass("",e,null,"","")}return n}}function p(e,t){var n=d.find(e.elementsOfKind("types"),function(e){return e.name()==t.name()});n&&h.setPropertyConstructor(function(e){var t=n.elementsOfKind("properties").filter(function(t){return t.name()==e}),r=null;if(t&&t.length>0)r=t[0];else{var t=n.elementsOfKind("facets").filter(function(t){return t.name()==e});t&&t.length>0&&(r=t[0])}var i=new f.UserDefinedProp(e,r);return i.unmerge(),i});var r=l(e.definition().universe());return h.toNominal(t,r)}var c=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var f=n(56),h=f.rt,d=n(16),m=n(203),y=n(55),v=f,g=n(19),A=n(204);h.setPropertyConstructor(function(e){var t=new f.Property(e);return t.unmerge(),t});var E=function(e,t){void 0===t&&(t=!1),t&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));for(var n=[],r=0;;){var i=e.indexOf("<<",r);if(i==-1)break;var a=e.indexOf(">>",i),o=0==i&&a==e.length-2,s=e.substring(i+2,a);r=i+2;var u=s.indexOf("|");u!=-1&&(o=!1,s=s.substring(0,u)),s=s.trim(),n.push(s)}return{parameterUsages:n,isFull:o}},T=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=E(e,a),s=o.parameterUsages,u=o.isFull,l=n?n.property().range():null;a&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)?(l=i.type(m.Universe10.SchemaString.name),r=!1):n&&(n.property().nameId()!=m.Universe10.TypeDeclaration.properties.type.name&&n.property().nameId()!=m.Universe10.TypeDeclaration.properties.schema.name||n.property().domain().key()==m.Universe10.TypeDeclaration&&(l=i.type(m.Universe10.SchemaString.name))),!u||r?l=i.type(m.Universe10.StringType.name):null==l&&"RAML10"==i.version()&&(l=i.type(m.Universe10.AnyType.name));for(var p=0,c=s;p=0}function r(e){return n(e)&&e.length>2&&"|"==e[0]&&("\n"==e[1]||"\r"==e[1]||"\n"==e[2])}function i(e,t){var r="";if(n(e)){r+="|\n";for(var i=f(e),a=0;a0;){var n=e[t-1];if(" "!=n&&"\t"!=n&&"\r"!=n&&"\n"!=n)break;t--}return e.substring(0,t)}function c(e){return o(p(e))}function f(e){var t=e.match(/^.*((\r\n|\n|\r)|$)/gm);return t}function h(e,t){if(!e||!t||e.length0;){var n=this.contents[t-1];if(" "!=n&&"\t"!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.extendToStartOfLine=function(){for(var t=this.start;t>0;){var n=this.contents[t-1];if("\r"==n||"\n"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.extendAnyUntilNewLines=function(){var t=this.end;if(t>0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0;){var n=this.contents[t-1];if(" "!=n)break;t--}return new e(this.contents,t,this.end)},e.prototype.extendCharIfAny=function(t){var n=this.end;return n0&&this.contents[n-1]==t&&n--,new e(this.contents,n,this.end)},e.prototype.extendToNewlines=function(){var t=this.end;if(t>0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0;){var n=this.contents[t-1];if("\r"==n||"\n"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.reduceNewlinesEnd=function(){for(var t=this.end;t>this.start;){var n=this.contents[t-1];if("\r"!=n&&"\n"!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.reduceSpaces=function(){for(var t=this.end;t>this.start;){var n=this.contents[t-1];if(" "!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.replace=function(e){return this.sub(0,this.start)+e+this.sub(this.end,this.unitText().length)},e.prototype.remove=function(){return this.sub(0,this.start)+this.sub(this.end,this.unitText().length)},e}();t.TextRange=y},function(e,t,n){"use strict";function r(e){return e.highLevel().localType()}function i(e){return e.highLevel().localType()}function a(e){var t=new we.Project(Le.dirname(e)),n=t.unit(Le.basename(e));return n&&n.isRAMLUnit()?Ae.fromUnit(n).wrapperNode():null}function o(e){var t="",n=e;do e=n,t=e.relativeUri().value()+t,n=e.parent();while(n.definition().key().name==Ie.Universe10.Resource.name);return t}function s(e){return Me.expandLibrary(e)}function u(e,t){return void 0===t&&(t=!1),t?p(e):l(e)}function l(e){var t=e.highLevel().lowLevel();return Re.LowLevelProxyNode.isInstance(t)?e:Me.expandTraitsAndResourceTypes(e)}function p(e){return Me.expandLibraries(e)}function c(e){var t="",n=e;do e=n,t=e.relativeUri().value()+t,n=e.parent();while(n.definition().key().name==Ie.Universe10.Resource.name);n=x(e);var r=n.baseUri(),i=r?r.value():"";return i=i?i:"",e&&(i=i.replace(/\/+$/,"")),t=i+t}function f(e,t){return e.runtimeType().validate(t).map(function(e){return e.getMessage()})}function h(e,t){return e.runtimeType().validate(t)}function d(e){return m(e)}function m(e){return e.highLevel().lowLevel().actual().libExpanded?e.traits_original():Ue.allTraits(e.highLevel(),!0).map(function(e){return e.wrapperNode()})}function y(e){return v(e)}function v(e){return e.highLevel().lowLevel().actual().libExpanded?e.resourceTypes_original():Ue.allResourceTypes(e.highLevel(),!0).map(function(e){return e.wrapperNode()})}function g(e){var t=[],n=e;do e=n,t.push(e.relativeUri().value()),n=e.parent();while(n.definition().key().name==Ie.Universe10.Resource.name);return t.reverse()}function A(e){return de.ResourceImpl.isInstance(e.parent())?e.parent():null}function E(e){var t=e.parent();return t.definition().key().name==Ie.Universe10.Resource.name?t:null}function T(e,t){if(null==e)return null;var n=e.resources();return n?(n=n.filter(function(e){return e.relativeUri().value()==t}),0==n.length?null:n[0]):null}function _(e,t){if(!e)return null;for(var n=null,r=0;r=0;if(s){var u=a?i.getAnnotationTypeRegistry():i.getTypeRegistry();n=u.get(o)}else n=a?i.getAnnotationType(o):i.getType(o)}}return new ye.TypeInstanceImpl(t,n)}function Y(e){var t=e.highLevel().value();return"string"==typeof t||null==t?t:Ae.StructuredValue.isInstance(t)?t.valueName():null}function q(e){return z(e)}function G(e){return z(e)}function X(e){return z(e)}function z(e){var t=e.highLevel(),n=t.parent(),r=e.name(),i=Ce.referenceTargets(t.property(),n).filter(function(e){return Ae.qName(e,n)==r});return 0==i.length?null:i[0].wrapperNode()}function $(e,t,n,r){void 0===r&&(r=!0);var i=t.lowLevel(),a=t.definition().property(n?"example":"examples"),o=_e.getUniverse("RAML10"),s=o.type(Ne.Universe10.ExampleSpec.name),u=e.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==n});return u.map(function(e){var n=e.asJSON(),o=e.isSingle()?"example":null,u=i.unit(),l=new Pe.AstNode(u,n,i,null,o),p=r?new Ae.ASTNodeImpl(l,t,s,a):t,c=e.annotations(),f=ke(c,l,p,u),h=e.scalarsAnnotations(),d={};Object.keys(h).forEach(function(e){return d[e]=ke(h[e],l,p,u)});var m=new Ke(p,e,f,{description:function(){return d.description||[]},displayName:function(){return d.displayName||[]},strict:function(){return d.strict||[]}});return m})}function J(e,t){void 0===t&&(t=!1);var n=e.runtimeDefinition();if(!n)return[];var r=n.getExtra(Se.TOP_LEVEL_EXTRA),i=e.highLevel().property(),a=i&&(Oe.isTypesProperty(i)||Oe.isSchemasProperty(i));if(a||!r){var o=e.highLevel();return $(n,o,t)}return[]}function Q(e){var t=J(e,!0);return t.length>0?t[0]:null}function Z(e){return J(e)}function ee(e){var t=e.runtimeDefinition(),n=t.fixedFacets();if(e.kind()==Ne.Universe10.UnionTypeDeclaration.name)for(var r=t.allFixedBuiltInFacets(),i=0,a=Object.keys(r);i=0&&(l=t.indexOf("}",++c),!(l<0));c=t.indexOf("{",l)){var f=t.substring(c,l);if(p[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var h=a.universe(),d=h.type(Ne.Universe10.StringTypeDeclaration.name),m=Te.createStubNode(d,null,f,i.lowLevel().unit()),y=me.buildWrapperNode(m),v=y.highLevel();v.setParent(i),y.meta().setCalculated(),y.setName(f),v.patchProp(o),u.push(y)}}return Object.keys(s).filter(function(e){return!p[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function ce(e){if(e.kind()==Ne.Universe10.Method.name||Oe.isTypeDeclarationSibling(e.definition())){for(var t=!1,n=e.highLevel().parent();null!=n;){var r=n.definition();if(Oe.isResourceTypeType(r)||Oe.isTraitType(r)){t=!0;break}n=n.parent()}if(!t)return null}var i=e.highLevel();if(null==i)return null;var a=i.lowLevel();if(null==a)return null;var o=a.children().filter(function(e){var t=e.key();return!!t&&(("("!=t.charAt(0)||")"!=t.charAt(t.length-1))&&t.indexOf("<<")>=0)});if(0==o.length)return null;var s=new ye.TypeInstanceImpl(o);return s}var fe=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var he=n(221),de=n(2),me=n(249),ye=n(218),ve=n(250),ge=n(197),Ae=n(55),Ee=n(19),Te=n(3),_e=n(56),Se=_e.tsInterfaces,Ne=n(203),Ie=n(203),be=n(17),Me=n(216),Re=n(198),Ce=n(208),we=n(4),Pe=n(20),Le=n(6),Oe=n(204),De=n(207),Ue=n(253),xe=n(206);t.resolveType=r,t.runtimeType=i,t.load=a,t.completeRelativeUri=o,t.expandLibrarySpec=s,t.expandSpec=u,t.expandTraitsAndResourceTypes=l,t.expandLibraries=p,t.absoluteUri=c,t.validateInstance=f,t.validateInstanceWithDetailedStatuses=h,t.traitsPrimary=d,t.allTraits=m,t.resourceTypesPrimary=y,t.allResourceTypes=v,t.relativeUriSegments=g,t.parentResource=A,t.parent=E,t.childResource=T,t.getResource=_,t.childMethod=S,t.getMethod=N,t.ownerApi=b,t.methodId=M,t.isOkRange=R,t.allResources=C,t.matchUri=w;t.uriParametersPrimary=P,t.uriParameters=L,t.baseUriParametersPrimary=O,t.baseUriParameters=D,t.absoluteUriParameters=U,t.protocolsPrimary=k,t.allProtocols=F,t.securedByPrimary=B,t.allSecuredBy=V,t.securitySchemeName=K,t.securityScheme=j,t.RAMLVersion=W,t.structuredValue=H,t.referenceName=Y,t.referencedTrait=q,t.referencedAnnotation=G,t.referencedResourceType=X;var ke=function(e,t,n,r){var i=[];if(e)for(var a=_e.getUniverse("RAML10"),o=a.type("Annotable").property("annotations"),s=0,u=Object.keys(e);s0?e.type()[0]:"string",this.example=e.example(),this.required=e.required(),this.default=e.default()}return e}(),Ke=function(e){function t(t,n,r,i){var a=e.call(this,t)||this;return a.expandable=n,a._annotations=r,a._scalarAnnotations=i,a}return fe(t,e),t.prototype.value=function(){return this.expandable.asString()},t.prototype.structuredValue=function(){var e;e=this.expandable.isJSONString()||this.expandable.isYAML()?this.expandable.asJSON():this.expandable.original();var t=this._node.lowLevel(),n=this.expandable.isSingle()?"example":null,r=new Pe.AstNode(t.unit(),e,t,null,n);return new ye.TypeInstanceImpl(r)},t.prototype.strict=function(){return this.expandable.strict()},t.prototype.description=function(){var e=this.expandable.description();if(null==e&&null!==e)return null;var t=Te.createAttr(this._node.definition().property(Ne.Universe10.ExampleSpec.properties.description.name),e);t.lowLevel().setUnit(this._node.lowLevel().unit());var n=new de.MarkdownStringImpl(t);return n},t.prototype.name=function(){return this.expandable.name()},t.prototype.displayName=function(){return this.expandable.displayName()},t.prototype.annotations=function(){return this._annotations},t.prototype.scalarsAnnotations=function(){return this._scalarAnnotations},t.prototype.uses=function(){return e.prototype.elements.call(this,"uses")},t}(ye.BasicNodeImpl);t.ExampleSpecImpl=Ke},function(e,t,n){"use strict";function r(e){return e.isBuiltIn()?s[e.nameId()]:null}function i(e,t){void 0===t&&(t=!0);var n=e.definition(),i=(n.nameId(),r(n));if(!i){for(var o=a(n),u=n.allSuperTypes().sort(function(e,t){return o[e.nameId()]-o[t.nameId()]}),l=null,p=0;po)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},Annotable:function(e,t){return new o.AnnotableImpl(e,t)},AnnotationRef:function(e){return new o.AnnotationRefImpl(e)},AnnotationTarget:function(e){return new o.AnnotationTargetImpl(e)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},ArrayTypeDeclaration:function(e,t){return new o.ArrayTypeDeclarationImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},ContentType:function(e){return new o.ContentTypeImpl(e)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateOnlyType:function(e){return new o.DateOnlyTypeImpl(e)},DateOnlyTypeDeclaration:function(e,t){return new o.DateOnlyTypeDeclarationImpl(e,t)},DateTimeOnlyType:function(e){return new o.DateTimeOnlyTypeImpl(e)},DateTimeOnlyTypeDeclaration:function(e,t){return new o.DateTimeOnlyTypeDeclarationImpl(e,t)},DateTimeType:function(e){return new o.DateTimeTypeImpl(e)},DateTimeTypeDeclaration:function(e,t){return new o.DateTimeTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},Extension:function(e,t){return new o.ExtensionImpl(e,t)},FileType:function(e){return new o.FileTypeImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUriString:function(e){return new o.FixedUriStringImpl(e)},FragmentDeclaration:function(e,t){return new o.FragmentDeclarationImpl(e,t)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},IntegerType:function(e){return new o.IntegerTypeImpl(e)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},Library:function(e,t){return new o.LibraryImpl(e,t)},LibraryBase:function(e,t){return new o.LibraryBaseImpl(e,t)},LocationKind:function(e){return new o.LocationKindImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},ModelLocation:function(e){return new o.ModelLocationImpl(e)},NullType:function(e){return new o.NullTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},ObjectTypeDeclaration:function(e,t){ -return new o.ObjectTypeDeclarationImpl(e,t)},Operation:function(e,t){return new o.OperationImpl(e,t)},Overlay:function(e,t){return new o.OverlayImpl(e,t)},PassThroughSecurityScheme:function(e,t){return new o.PassThroughSecuritySchemeImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceBase:function(e,t){return new o.ResourceBaseImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},TimeOnlyType:function(e){return new o.TimeOnlyTypeImpl(e)},TimeOnlyTypeDeclaration:function(e,t){return new o.TimeOnlyTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},TypeDeclaration:function(e,t){return new o.TypeDeclarationImpl(e,t)},UnionTypeDeclaration:function(e,t){return new o.UnionTypeDeclarationImpl(e,t)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},UsesDeclaration:function(e,t){return new o.UsesDeclarationImpl(e,t)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLFacetInfo:function(e,t){return new o.XMLFacetInfoImpl(e,t)}}},function(e,t,n){"use strict";function r(e,t,n,r){var i=r.end!==!1,a=r.strict,o="";r.sensitive||(o+="i");var s=e.replace(c,function(e,r,i,a){if(a)return"\\"+a;n.push({name:i,prefix:r||"/"}),r=r?"\\"+r:"";var o=t[i],s=o&&l[o.type]||"[^"+(r||"\\/")+"]+",u=o&&o.required===!1;return Array.isArray(o.enum)&&o.enum.length&&(s="(?:"+o.enum.map(function(e){return String(e).replace(p,"\\$1")}).join("|")+")"),r+"("+s+")"+(u?"?":"")}),u="/"===e.charAt(e.length-1);return a||(s=(u?s.slice(0,-2):s)+"(?:\\/(?=$))?"),s+=i?"$":a&&u?"":"(?=\\/|$)",new RegExp("^"+s+(i?"$":""),o)}function i(e){try{return decodeURIComponent(e)}catch(n){var t=new Error('Failed to decode param "'+e+'"');throw t.status=400,t}}function a(e,t,n){if(n=n||{},"/"===e&&n.end===!1)return o;t=t||{};var a=[],l=r(e,t,a,n),p=s.sanitize()(t),c=u.validate()(t);return function(e){var n=l.exec(e);if(!n)return!1;if(t.mediaTypeExtension&&n.length>1&&!n[n.length-1]){var r=n[n.length-2],o=r.lastIndexOf(".");o>=0&&(n[n.length-2]=r.substring(0,o),n[n.length-1]=r.substring(o))}for(var s=n[0],u={},f=1;f1)return null;t=t[0]}return i(t,r,a)}});return function(e,t,n){for(var r=0;r=e}}function u(e){return function(t){return t<=e}}function l(t){return function(n){return e.byteLength(n)>=t}}function p(t){return function(n){return e.byteLength(n)<=t}}function c(e){return e&&0!=e.length?function(t){return e.indexOf(t)>-1}:function(e){return!0}}function f(e){var t="string"==typeof e?new RegExp(e):e;return t.test.bind(t)}function h(e,t,n,r,i){return{valid:e,rule:r,attr:i,value:n,key:t}}function d(e,t){var n=[];return Object.keys(e).forEach(function(r){var i=t[r];if(i){var a=e[r];n.push([r,i(a,r),a])}}),function(e,t,r){for(var i=0;i=0&&(p=t.indexOf("}",++f),!(p<0));f=t.indexOf("{",p)){var h=t.substring(f,p);if(c[h]=!0,u[h])u[h].forEach(function(e){return l.push(e)});else{var d=T.actualUnit(a.lowLevel()),m=o.universe(),y=m.type(N.Universe10.StringTypeDeclaration.name),v=_.createStubNode(y,null,h,d);v.setParent(n),i&&v.wrapperNode().meta().setCalculated(),v.attrOrCreate("name").setValue(h),v.patchProp(s),l.push(v)}}return Object.keys(u).filter(function(e){return!c[e]}).forEach(function(e){return u[e].forEach(function(e){return l.push(e)})}),l}function o(e){var t="",n=e;do e=n,t=e.attr(N.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent();while(P.isResourceType(n.definition()));return t}function s(e){if(!P.isResourceType(e.definition()))return null;var t="",n=e;do e=n,t=e.attr(N.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent();while(P.isResourceType(n.definition()));var r="";n=n.getSlaveCounterPart()||n;var i=n.attr(N.Universe10.Api.properties.baseUri.name);return i&&(r=i?i.value():""),r=r?r:"",e&&(r=r.replace(/\/+$/,"")),t=r+t}function u(e,t){void 0===t&&(t=!1);var n=c(e,!0,t);return n.length>0?n[0]:null}function l(e,t){return void 0===t&&(t=!1),c(e,!1,t)}function p(e,t){void 0===t&&(t=!1);var n;n=e.isJSONString()||e.isYAML()?e.asJSON():e.original();var r={value:n,strict:e.strict(),name:e.name()};if(e.hasAnnotations()){var i=e.annotations(),a=f(i);a.length>0&&(r.annotations=a)}if(e.hasScalarAnnotations()){var o=e.scalarsAnnotations(),s={};Object.keys(o).forEach(function(e){var t=f(o[e]);t.length>0&&(s[e]=[t])}),Object.keys(s).length>0&&(r.scalarsAnnotations=s)}var u=e.displayName();u&&(r.displayName=u);var l=e.description();return null!=l&&(r.description=l),t&&(r.asXMLString=e.asXMLString()),r}function c(e,t,n){void 0===n&&(n=!1);var r=e.localType();r.isAnnotationType()&&(r=S.find(r.superTypes(),function(e){return e.nameId()==r.nameId()}));var i=r.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==t}).map(function(e){return p(e,n)});return i}function f(e){var t=[];return e&&Object.keys(e).forEach(function(n){t.push({name:n,value:e[n].value()})}),t}function h(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:m(e,function(e){return P.isTraitType(e)},t,"Trait")}function d(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:m(e,function(e){return P.isResourceTypeType(e)},t,"ResourceType")}function m(e,t,n,r){var i=w.globalDeclarations(e).filter(function(e){return t(e.definition())}),a=e.lowLevel(),o=a.includePath();o||(o=a.unit().path());for(var s="RAML10"==e.definition().universe().version()&&!P.isOverlayType(e.definition()),u=s?new M.TraitsAndResourceTypesExpander:null,l=[],p=new C.ReferencePatcher,c="ResourceType"==r?"resourceTypes":"traits",f=e.definition().allProperties().find(function(e){return e.nameId()==c}),h=0,d=i;h=0)});if(0==o.length)return null;var s={};return o.forEach(function(e){var t=e.dumpToObject();Object.keys(t).forEach(function(e){return s[e]=t[e]})}),s}function A(e){var t=e.localType(),n=t.fixedFacets(),r=Object.keys(n),i=[];if(t.hasUnionInHierarchy())i=r.map(function(e){return{name:e,value:n[e]}});else for(var a=0,o=r;a=0&&(s=t.indexOf("}",++p),!(s<0));p=t.indexOf("{",s)){var c=t.substring(p,s);if(u[c]=!0,a[c])a[c].forEach(function(e){o.registerValue(e),o.registerMeta(null)});else{l=!0;var f=n.definition().universe(),h=f.type(L.Universe10.StringTypeDeclaration.name),d=x.createStubNode(h,null,c,n.lowLevel().unit());if(d.setParent(n),d.attrOrCreate("name").setValue(c),d.patchProp(r),o.registerValue(d),i){o.hasMeta=!0;var m=new y.NodeMetadataImpl;m.setCalculated(),o.registerMeta(m)}}}return l?(Object.keys(a).filter(function(e){return!u[e]}).forEach(function(e){return a[e].forEach(function(e){o.registerValue(e),o.hasMeta&&o.registerMeta(null)})}),o):e}function o(e,t,n,r){if(0==t.length)return null;var i=e.lowLevel().unit().absolutePath(),a=new j(n);return t.forEach(function(e){if(a.registerValue(e),r)if(e.lowLevel().unit().absolutePath()!=i){a.hasMeta=!0;var t=new y.NodeMetadataImpl;t.setCalculated(),a.mArr.push(t)}else a.mArr.push(null)}),a}function s(e,t,n,r){var i;if(e.isElement())i=e.asElement().definition();else if(e.isAttr()){var a=e.asAttr().property();a&&(i=a.range())}if((i instanceof A.UserDefinedClass||i.isUserDefined())&&(i=k.find(i.allSuperTypes(),function(e){return!e.isUserDefined()})),null==i)return n;var o=i.universe().version(),s=r[o];if(!s)return n;var u=s[i.nameId()];if(!u)return n;var l=t?t.nameId():"__$$anyprop__",p=u[l];if(p||(p=u.__$$anyprop__),!p)return n;for(var c=0,f=p;c=0&&(a=t.substring(i),t=t.substring(0,i));var o=e.lowLevel().unit().resolve(t).absolutePath(),s=void 0;s=O.stringStartsWith(o,"http://")||O.stringStartsWith(o,"https://")?o:F.relative(e.lowLevel().unit().project().getRootPath(),o),s=s.replace(/\\/g,"/"),r=s+a}return r}function h(e,t){for(var n=t.key(),r=t;v.LowLevelProxyNode.isInstance(r);)r=r.originalNode();var i=r.key();if(v.LowLevelProxyNode.isInstance(t)&&i&&i.indexOf("<<")>=0&&t.key().indexOf("<<")<=0&&(i=t.key()),null!=i){var a=e;a.displayName==n&&(a.displayName=i)}}var d=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var m=n(203),y=n(218),v=n(198),g=n(21),A=n(56),E=A.tsInterfaces,T=n(55),_=n(19),S=n(4),N=n(20),I=n(205),b=n(222),M=n(255),R=n(220),C=A.rt,w=C.typeExpressions,P=n(204),L=n(203),O=n(15),D=n(219),U=n(253),x=n(3),k=n(16),F=n(6),B="application/raml+yaml";t.dump=r;var V=function(e){var t,n=e.root();if(n){var r=n.lowLevel();if(r){var i=r.unit();i&&(t=i.absolutePath())}}return t};t.appendSourcePath=i;var K=function(){function e(e){this.options=e,this.nodePropertyTransformers=[new Z],this.nodeTransformersMap={},this.nodePropertyTransformersMap={},this.options=this.options||{},null==this.options.allParameters&&(this.options.allParameters=!0),null==this.options.expandSecurity&&(this.options.expandSecurity=!0),null==this.options.serializeMetadata&&(this.options.serializeMetadata=!1),null==this.options.attributeDefaults&&(this.options.attributeDefaults=!0),null==this.options.expandExpressions&&(this.options.expandExpressions=!0),null==this.options.expandTypes||this.options.expandTypes&&(this.options.typeExpansionRecursionDepth||(this.options.typeExpansionRecursionDepth=0)),this.defaultsCalculator=new D.AttributeDefaultsCalculator(!0,!0),this.nodeTransformers=[new ee,new Q(this.options,this),new te(this.options,this),new se(this),new ne,new re,new ie,new ae,new oe,new pe,new ue(this.options.expandSecurity),new le(this.options.allParameters,this.options.serializeMetadata)],u(this.nodeTransformers,this.nodeTransformersMap),u(this.nodePropertyTransformers,this.nodePropertyTransformersMap)}return e.prototype.init=function(e){this._astRoot=e,this.helpersMap={baseUriParameters:W,uriParameters:H};var t=e.isElement();if(t){e.types();var n=e.asElement(),r=n.definition();if("RAML08"==r.universe().version()&&P.isApiType(r)){var i={};n.elementsOfKind(L.Universe08.Api.properties.schemas.name).forEach(function(e){return i[e.name()]=e}),this.helpersMap.schemaContent=new q(i)}P.isApiSibling(r)?(this.helpersMap.traits=new Y(U.allTraits(n,!1)),this.helpersMap.resourceTypes=new Y(U.allResourceTypes(n,!1))):P.isLibraryType(r)||delete this.options.expandTypes}},e.prototype.astRoot=function(){return this._astRoot},e.prototype.dispose=function(){delete this.helpersMap},e.prototype.dump=function(e){this.init(e);var t=e.isElement(),n=e.parent(),r=!n&&this.options.rootNodeDetails,i=V(e),a=this.dumpInternal(e,null,i,null,!0);if(r){var o=a;if(a={},a.specification=o,t){var s=e.asElement(),u=s.definition();if(u){var l=u.universe(),p=l.version();a.ramlVersion=p;var c=u.nameId();if(!c&&u.isAssignableFrom(A.universesInfo.Universe10.TypeDeclaration.name)){var f=l.type(A.universesInfo.Universe10.TypeDeclaration.name),h={};f.allSubTypes().forEach(function(e){return h[e.nameId()]=!0});for(var d=0,m=u.allSuperTypes();d0&&(E.uses=_),l=E}else{for(var N={},I=c.attrs().concat(c.children().filter(function(e){return!e.isAttr()})),b=0,M=I;b0,m.push(t),v.push(T.actualPath(e,!0))}),g&&(V[t]=m),v.filter(function(e){return null!=e}).length>0&&(K[t]=v.map(function(e){return{path:e}}))}P.isTypeDeclarationDescendant(h)&&P.isTypeProperty(e)&&i.arr.map(function(e){return e.value()}).filter(function(e){return T.isStructuredValue(e)}).length>0&&(d=d[0])}else if(d=H.dumpInternal(i.val,i.prop,n),e.isValueProperty()){var E=i.val.asAttr();if(E.isAnnotatedScalar()){var _=E.annotations().map(function(e){return o.dumpInternal(e,null,n)});_.length>0&&(V[t]=[_])}if(!E.isFromKey()){var S=T.actualPath(E,!0);S&&(K[t]=[{path:S}])}}}else void 0!==u?d=u:H.options.attributeDefaults&&(F=H.defaultsCalculator.attributeDefaultIfEnabled(c,e),null!=F&&(r=r||new y.NodeMetadataImpl,Array.isArray(F)?F=F.map(function(t){return T.isASTPropImpl(t)?o.dumpInternal(t,e,n):t}):T.BasicASTNode.isInstance(F)&&(F=H.dumpInternal(F,e,n)),d=F,null!=d&&e.isMultiValue()&&!Array.isArray(d)&&(d=[d]),B=H.defaultsCalculator.insertionKind(c,e),B==D.InsertionKind.CALCULATED?r.registerCalculatedValue(t):B==D.InsertionKind.BY_DEFAULT&&r.registerInsertedAsDefaultValue(t)));if(d=s(c,e,d,H.nodePropertyTransformersMap),null!=d){if(("type"===t||"schema"==t)&&d&&d.forEach&&"string"==typeof d[0]){var I=d[0].trim(),b="{"===I[0]&&"}"===I[I.length-1],M="<"===I[0]&&">"===I[I.length-1];if(b||M){var R=f(c);if(R){l.schemaPath=R;var C=l.sourceMap;C||(C={},l.sourceMap=C),C.path=R}}}l[t]=d}},H=this,Y=0,q=h.allProperties().concat(h.allCustomProperties());Y0&&(l.scalarsAnnotations=V),this.options.sourceMap&&Object.keys(K).length>0){var z=l.sourceMap;z||(z={},l.sourceMap=z),z.scalarsSources=K}var $=U.getTemplateParametrizedProperties(c);if($&&(l.parametrizedProperties=$),P.isTypeDeclarationDescendant(h)){var J=U.typeFixedFacets(c);J&&(l.fixedFacets=J)}l=s(c,d,l,this.nodeTransformersMap)}this.options.sourceMap&&"object"==typeof l&&i(c,l)}else if(e.isAttr()){var Q=e.asAttr(),Z=Q.value(),C=Q.property(),ee=C.range(),te=ee.isValueType();if(te&&Q.value&&(Z=Q.value(),null==Z&&P.isAnyTypeType(ee))){var ne=Q.lowLevel();Q.isAnnotatedScalar()&&(ne=k.find(ne.children(),function(e){return"value"==e.key()})),ne&&ne.valueKind()!=g.Kind.SCALAR&&(Z=Q.lowLevel().dumpToObject())}null==Z||"number"!=typeof Z&&"string"!=typeof Z&&"boolean"!=typeof Z?T.isStructuredValue(Z)?(Z=Q.plainValue(),T.BasicASTNode.isInstance(Z)&&(Z=this.dumpInternal(Z,t||Q.property(),n,null,!0))):(S.ASTNode.isInstance(Z)||v.LowLevelProxyNode.isInstance(Z))&&(Z=Z.dumpToObject()):P.isStringTypeDescendant(C.range())&&(Z=""+Z),Z=s(Q,t||Q.property(),Z,this.nodeTransformersMap),l=Z}else{var x=e.lowLevel();l=x?x.dumpToObject():null}return e.setJSON(l),l},e.prototype.getDefaultsCalculator=function(){return this.defaultsCalculator},e.prototype.canBeFragment=function(e){var t=e.definition(),n=[t].concat(t.allSubTypes()),r=n.filter(function(e){return e.getAdapter(A.RAMLService).possibleInterfaces().filter(function(e){return e.nameId()==A.universesInfo.Universe10.FragmentDeclaration.name}).length>0});return r.length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):null==t.range.start?1:null==e.range.start?-1:null==t.range.start?1:null==e.range.start?-1:e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.serializeMeta=function(e,t,n){if(this.options.serializeMetadata){var r=t.definition(),i=P.isMethodType(r)&&t.optional();if(n||i){var a=n||new y.NodeMetadataImpl(!1,!1);i&&a.setOptional(),e.__METADATA__=a.toJSON()}}},e.prototype.applyHelpers=function(e,t,n,r){var i=n.nameId(),a=this.helpersMap[i];if(!a)return e;var o=a.apply(t,e,n,r);return o?o:e},e}();t.JsonSerializer=K;var j=function(){function e(e){this.prop=e,this.arr=[],this.mArr=[],this.isMultiValue=e.isMultiValue()}return e.prototype.registerValue=function(e){this.isMultiValue?this.arr.push(e):this.val=e},e.prototype.registerMeta=function(e){this.isMultiValue&&this.mArr.push(e)},e}(),W={apply:function(e,t,n,r){var i=e.attr(L.Universe10.Api.properties.baseUri.name),o=i?i.value():"";return a(t,o,e,n,r)}},H={apply:function(e,t,n,r){var i=e.attr(L.Universe10.Resource.properties.relativeUri.name);if(!i)return t;var o=i.value();return a(t,o,e,n,r)}},Y=function(){function e(e){this.arr=e}return e.prototype.apply=function(e,t,n,r){return o(e,this.arr,n,r)},e}(),q=function(){function e(e){this.schemasCache08=e}return e.prototype.apply=function(e,t,n,r){var i=null,a=U.schemaContent08Internal(e,this.schemasCache08);return a&&(i=new j(n),i.registerValue(a)),i},e}();t.applyTransformersMap=s;var G=function(){function e(){}return e.prototype.match=function(e,t){if(null==e)return!1;var n=this.registrationInfo(),r=e.universe().version();if((e instanceof A.UserDefinedClass||e.isUserDefined())&&(e=k.find(e.allSuperTypes(),function(e){return!e.isUserDefined()}),null==e))return null==t;var i=n[r];if(!i)return!1;var a=i[e.nameId()];if(!a)return!1;var o=null==t||a[t.nameId()]===!0||a.__$$anyprop__===!0;return o},e}(),X=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=["RAML10","RAML08"]);var a=e.call(this)||this;return a.typeName=t,a.propName=n,a.applyToDescendatns=r,a.restrictToUniverses=i,a}return d(t,e),t.prototype.registrationInfo=function(){var e=this;if(this.regInfo)return this.regInfo;for(var t={},n=[],r=0,i=this.restrictToUniverses;r0&&(e.regInfo[n]=r)}),this.regInfo},t}(G),z=function(){function e(e){this.matcher=e}return e.prototype.match=function(e,t){var n;if(e.isElement())n=e.asElement().definition();else if(e.isAttr()){var r=e.asAttr().property();r&&(n=r.range())}return!!n&&this.matcher.match(n,t)},e.prototype.registrationInfo=function(){return this.matcher.registrationInfo()},e}(),$=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=["RAML10","RAML08"]);var a=e.call(this,new X(t,n,r,i))||this;return a.typeName=t,a.propName=n,a.applyToDescendatns=r,a.restrictToUniverses=i,a}return d(t,e),t}(z),J=function(e){function t(t){var n=e.call(this)||this;return n.matchers=t,n}return d(t,e),t.prototype.registrationInfo=function(){return this.regInfo?this.regInfo:(this.regInfo=l(this.matchers.map(function(e){return e.registrationInfo()})),this.regInfo)},t}(G),Q=function(e){function t(t,n){void 0===t&&(t={});var r=e.call(this,L.Universe10.Resource.name,null,!0)||this;return r.options=t,r.owner=n,r}return d(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[L.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split("/");r.length>0&&0==r[0].length;)r.shift();if(e.relativeUriPathSegments=r,e.absoluteUri=U.absoluteUri(t.asElement()),e.completeRelativeUri=U.completeRelativeUri(t.asElement()),P.isResourceType(t.parent().definition()))e.parentUri=U.completeRelativeUri(t.parent()),e.absoluteParentUri=U.absoluteUri(t.parent());else{e.parentUri="";var i=this.owner.astRoot().asElement()||t.parent(),a=i.attr(L.Universe10.Api.properties.baseUri.name),o=a&&a.value()||"";e.absoluteParentUri=o}}return e},t}($),Z=function(e){function t(){return e.call(this,L.Universe10.TypeDeclaration.name,L.Universe10.ArrayTypeDeclaration.properties.items.name,!0)||this}return d(t,e),t.prototype.transform=function(e,t){if(!e||!Array.isArray(e)||1!=e.length||"object"!=typeof e[0]||!t.isElement())return e;var n,r,i,a=t.asElement(),o=e[0],s=a.definition().universe().type(m.Universe10.TypeDeclaration.name),u=a.definition().universe().type(m.Universe10.ArrayTypeDeclaration.name),l=a.attr("items").lowLevel();do if(i=!0,n=new T.ASTNodeImpl(l,a,s,u.property(m.Universe10.ArrayTypeDeclaration.properties.items.name)),r=n.localType(),r&&R.isEmpty(r)&&1==r.superTypes().length){var p=l.children().filter(function(e){return"type"==e.key()});if(1==p.length){if(p[0].resolvedValueKind()==g.Kind.SCALAR){o=p[0].value();break}l=p[0],i=!1,o=o.type[0]}}while(!i);return r.getExtra(E.TOP_LEVEL_EXTRA)&&"object"==typeof o&&!Array.isArray(o)&&(o=o.type),Array.isArray(o)||(o=[o]),o},t}($),ee=function(e){function t(){return e.call(this,L.Universe10.Method.name,null,!0)||this}return d(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=t.parent();return P.isResourceType(n.definition())?(e.parentUri=U.completeRelativeUri(n),e.absoluteParentUri=U.absoluteUri(n),e):e},t}($),te=function(e){function t(t,n){void 0===t&&(t={});var r=e.call(this,L.Universe10.TypeDeclaration.name,null,!0)||this;return r.options=t,r.owner=n,r.facetsToExtract={maxItems:!0,minItems:!0,discriminatorValue:!0,discriminator:!0,pattern:!0,minLength:!0,maxLength:!0,enum:!0,minimum:!0,maximum:!0,format:!0,fileTypes:!0},r}return d(t,e),t.prototype.transform=function(e,t,n){var r=this,a=t.property();if(this.options.expandTypes&&t&&t.isElement()){var o=t.parent();if(o&&P.isTypeDeclarationDescendant(o.definition()))return{};var s=t.asElement().parsedType(),u=null!=_.typeOfContainingTemplate(t),l=a&&P.isAnnotationTypesProperty(a),p=new M.TypeExpander({node:t.asElement(),typeCollection:t.types(),typeExpansionRecursionDepth:this.options.typeExpansionRecursionDepth,serializeMetadata:this.options.serializeMetadata,sourceMap:this.options.sourceMap,isInsideTemplate:u,isAnnotationType:l}).serializeType(s);return a&&P.isParametersProperty(a)&&(p.name&&O.stringEndsWith(p.name,"?")?(p.name=p.name.substring(0,p.name.length-1),p.hasOwnProperty("required")||(p.required=!1)):p.hasOwnProperty("required")||(p.required=!0,this.appendMeta(p,"required","insertedAsDefault")),p.displayName&&O.stringEndsWith(p.displayName,"?")&&(p.displayName=p.displayName.substring(0,p.displayName.length-1)),e.hasOwnProperty("enum")&&!p.hasOwnProperty("enum")&&(p.enum=e.enum, -this.appendMeta(p,"enum","calculated")),e.__METADATA__&&e.__METADATA__.calculated===!0&&this.appendMeta(p,null,"calculated")),a&&P.isBodyProperty(a)&&(p.name!=e.name&&(p.name=e.name,p.displayName=e.displayName),this.appendMeta(p,"name","calculated",e.__METADATA__),this.appendMeta(p,"displayName","calculated",e.__METADATA__)),e&&"object"==typeof e&&e.hasOwnProperty("parametrizedProperties")&&(p.parametrizedProperties=e.parametrizedProperties),p}var c=Array.isArray(e);if(c&&0==e.length)return e;var f=c?e[0]:e;this.options.sourceMap&&i(t,f);var h=f[A.universesInfo.Universe10.ObjectTypeDeclaration.properties.additionalProperties.name];"boolean"!=typeof h&&h&&delete f[A.universesInfo.Universe10.ObjectTypeDeclaration.properties.additionalProperties.name];var d=a,m=t.asElement().localType().getExtra(E.TOP_LEVEL_EXTRA),y=a&&(P.isTypesProperty(a)||P.isSchemasProperty(a));if(y||!m){var v=U.typeExample(t.asElement(),this.options.dumpXMLRepresentationOfExamples);if(v)f.examples=[v];else{var g=U.typeExamples(t.asElement(),this.options.dumpXMLRepresentationOfExamples);g.length>0&&(f.examples=g)}delete f.example,null!=f.examples&&(f.simplifiedExamples=f.examples.map(function(e){if(null==e)return e;var t=e.value;return null==t?t:"object"==typeof t?JSON.stringify(t):t}))}if(f.hasOwnProperty("schema")){if(f.hasOwnProperty("type")){var T=f.type;Array.isArray(T)||(T=[T],f.type=T),f.type=k.unique(T)}else f.type=f.schema;delete f.schema}n&&P.isSchemaProperty(n)&&"schema"==f.name&&(f.name="type","schema"==f.displayName&&(f.displayName="type")),Array.isArray(f.type)||(f.type=[f.type]);var S=t.isElement()&&t.asElement().parsedType();if(S&&S.isUnion()){var N=t.root().types().getTypeRegistry();S.declaredFacets().filter(function(e){return!f.hasOwnProperty(e.facetName())&&(!!e.validateSelf(N).isOk()&&(!!r.facetsToExtract[e.facetName()]&&("discriminatorValue"!=e.facetName()||e.isStrict())))}).forEach(function(e){return f[e.facetName()]=e.value()})}if(f.mediaType=B,t&&t.isElement()){var I=t.asElement(),b=I.localType().isExternal()?I.localType():null;if(!b)for(var R=0,C=I.localType().allSuperTypes();R"===K[K.length-1];j?f.typePropertyKind="JSON":W?f.typePropertyKind="XML":f.typePropertyKind="TYPE_EXPRESSION"}else f.typePropertyKind="TYPE_EXPRESSION"}else"object"==typeof T&&(f.typePropertyKind="INPLACE");return this.options.expandExpressions&&this.processExpressions(f,t),e},t.prototype.processExpressions=function(e,t){this.parseExpressions(e,t)},t.prototype.parseExpressions=function(e,t){var n=e.type,r=Array.isArray(n)&&n.map(function(e){return"string"==typeof e});if(this.parseExpressionsForProperty(e,"items",t),this.parseExpressionsForProperty(e,"type",t),r)for(var i=t.asElement().parsedType(),a=function(t){if(!r[t])return"continue";var n=e.type[t];if(n&&"object"==typeof n){var a=!1;o.isEmptyUnion(i)||1!=e.type.length||(a=Object.keys(n).filter(function(t){return"type"!=t&&!e.hasOwnProperty(t)}).length>0),a?Object.keys(n).forEach(function(t){e[t]=n[t]}):n.name||(n.name="type",n.displayName="type",n.typePropertyKind="TYPE_EXPRESSION",o.appendMeta(n,"displayName","calculated"))}},o=this,s=0;s=0)if(p=I.escapeTemplateParameters(s),p.status==I.ParametersEscapingStatus.OK){if(u=p.resultingString,l=I.checkExpression(u),!l){a.push(s);continue}}else if(p.status==I.ParametersEscapingStatus.ERROR){a.push(s);continue}var c=void 0;try{c=w.parse(u)}catch(e){a.push(s);continue}if(c){var f=this.expressionToObject(c,p,n,e.sourceMap);null!=f&&a.push(f)}else a.push(s)}else{var h=this.options.typeReferences?this.typeReference(n,s):s;a.push(h)}}else a.push(s)}e[t]=i?a[0]:a}},t.prototype.expressionToObject=function(e,t,n,r){var i,a=0;if("name"==e.type){var o=e;if(a=o.arr,i=o.value,t.status==I.ParametersEscapingStatus.OK){var s=I.unescapeTemplateParameters(i,t.substitutions);s.status==I.ParametersEscapingStatus.OK&&(i=s.resultingString)}this.options.typeReferences&&(i=this.typeReference(n,i))}else if("union"==e.type){var u=e;i={type:["union"],anyOf:[]};for(var l=c(u),p=0,f=l;p0)for(;a-- >0;)i={type:["array"],items:[i]},a>0&&(i.name="items",i.displayName="items",i.typePropertyKind="TYPE_EXPRESSION",this.appendMeta(i,"displayName","calculated"),this.appendSource(i,r));return"object"==typeof i&&(i.typePropertyKind="TYPE_EXPRESSION",i.sourceMap=r),i},t.prototype.typeReference=function(e,t){if(!t)return t;var n=this.owner.astRoot(),r=n.isElement()&&n.asElement().types(),i=r&&r.getTypeRegistry().getByChain(t);if(i)if(i.isBuiltin());else{var a=i.getExtra(C.SOURCE_EXTRA),o=void 0;T.BasicASTNode.isInstance(a)?o=a.lowLevel():S.ASTNode.isInstance(a)||N.AstNode.isInstance(a)||v.LowLevelProxyNode.isInstance(a)?o=a:T.LowLevelWrapperForTypeSystem.isInstance(a)&&(o=a.node());var s=n.lowLevel();if(s.actual().libExpanded)t="#/specification/types/"+i.name();else{var u="",l=s.unit(),p=o.unit();if(p.absolutePath()!=l.absolutePath()){var c=p.project().namespaceResolver(),f=c.expandedPathMap(l)[p.absolutePath()];u+=f.includePath}t=u+"#/specification/types/"+i.name()}}else;return t},t}($),ne=function(e){function t(){return e.call(this,new J([new X(L.Universe10.TypeDeclaration.name,L.Universe10.LibraryBase.properties.annotationTypes.name,!0,["RAML10"]),new X(L.Universe10.TypeDeclaration.name,L.Universe10.LibraryBase.properties.types.name,!0,["RAML10"]),new X(L.Universe10.Trait.name,L.Universe10.LibraryBase.properties.traits.name,!0,["RAML10"]),new X(L.Universe10.AbstractSecurityScheme.name,L.Universe10.LibraryBase.properties.securitySchemes.name,!0,["RAML10"]),new X(L.Universe10.ResourceType.name,L.Universe10.LibraryBase.properties.resourceTypes.name,!0,["RAML10"])]))||this}return d(t,e),t.prototype.transform=function(e,t){return t.parent()&&t.parent().lowLevel().libProcessed?(h(e,t.lowLevel()),e):e},t}(z),re=function(e){function t(){return e.call(this,new J([new X(L.Universe10.ResourceType.name,null,!0),new X(L.Universe10.Trait.name,null,!0),new X(L.Universe10.Method.name,null,!0),new X(L.Universe10.Response.name,null,!0),new X(L.Universe08.Parameter.name,null,!0),new X(L.Universe08.BodyLike.name,null,!0),new X(L.Universe10.TypeDeclaration.name,null,!0)]))||this}return d(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=A.universesInfo.Universe10.Trait.properties.parametrizedProperties.name,r=e[n];return r&&(Object.keys(r).forEach(function(t){e[t]=r[t]}),delete e[n]),e},t}(z),ie=function(e){function t(){return e.call(this,L.Universe08.GlobalSchema.name,L.Universe08.Api.properties.schemas.name,!0,["RAML08"])||this}return d(t,e),t.prototype.transform=function(e,t){return Array.isArray(e)?e:(e.sourceMap&&(delete e.sourceMap.scalarsSources,0==Object.keys(e.sourceMap).length&&delete e.sourceMap),e.name=e.key,delete e.key,e)},t}($),ae=function(e){function t(){return e.call(this,new J([new X(L.Universe10.Api.name,L.Universe10.Api.properties.protocols.name,!0),new X(L.Universe10.MethodBase.name,L.Universe10.MethodBase.properties.protocols.name,!0)]))||this}return d(t,e),t.prototype.transform=function(e,t){return"string"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},t}(z),oe=function(e){function t(){return e.call(this,new J([new X(L.Universe10.SecuritySchemeRef.name,L.Universe10.Api.properties.securedBy.name,!0),new X(L.Universe10.TraitRef.name,L.Universe10.MethodBase.properties.is.name,!0),new X(L.Universe10.ResourceTypeRef.name,L.Universe10.ResourceBase.properties.type.name,!0)]))||this}return d(t,e),t.prototype.transform=function(e,t){return null==e?null:Array.isArray(e)?e:this.toSimpleValue(e)},t.prototype.toSimpleValue=function(e){if("object"!=typeof e)return{name:e};var t={name:e.name},n=e.value;return n&&Object.keys(n).forEach(function(e){t.parameters=t.parameters||[],t.parameters.push({name:e,value:n[e]})}),t},t}(z),se=function(e){function t(t){var n=e.call(this,L.Universe10.LibraryBase.name,null,!0,["RAML10"])||this;return n.dumper=t,n}return d(t,e),t.prototype.getReferencePatcher=function(){return this.referencePatcher=this.referencePatcher||new b.ReferencePatcher,this.referencePatcher},t.prototype.transform=function(e,t){var n=t.lowLevel(),r=n&&n.actual(),i=r&&r.libExpanded;if(!i)return e;var a=e[A.universesInfo.Universe10.FragmentDeclaration.properties.uses.name];if(!a||!Array.isArray(a)||0==a.length)return e;var o=n.unit(),s=o.project().namespaceResolver();if(!s)return e;var u=s.expandedNSMap(o);if(!u)return e;for(var l=A.universesInfo.Universe10.Library.properties.usage.name,p=A.universesInfo.Universe10.Annotable.properties.annotations.name,c=0,f=a;c0){for(var T=t.root().definition().universe().type(L.Universe10.Annotable.name),_=T.property(L.Universe10.Annotable.properties.annotations.name),S=[],N=0,I=g;N0&&(h[p]=S)}}}return e},t}($),ue=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this,new J([new X(L.Universe10.Api.name,null,!0),new X(L.Universe10.Overlay.name,null,!0),new X(L.Universe10.Extension.name,null,!0),new X(L.Universe10.Library.name,null,!0)]))||this;return n.enabled=t,n}return d(t,e),t.prototype.match=function(t,n){return!!this.enabled&&e.prototype.match.call(this,t,n)},t.prototype.registrationInfo=function(){return this.enabled?e.prototype.registrationInfo.call(this):null},t.prototype.transform=function(e,t){return this.processApi(e),e},t.prototype.processApi=function(e){var t=e[A.universesInfo.Universe10.Api.properties.securitySchemes.name];if(t&&0!=t.length){for(var n={},r=0,i=t;r0){var u=a.settings;u||(u={},a.settings=u);for(var l=0,p=s;l0&&(e[n]=i);for(var a=t.concat(r),o=e[A.universesInfo.Universe10.ResourceBase.properties.methods.name]||[],s=0,u=o;s0&&(e[n]=r)},t.prototype.appendSecurityData=function(e){for(var t=A.universesInfo.Universe10.Operation.properties.headers.name,n=A.universesInfo.Universe10.Operation.properties.responses.name,r=A.universesInfo.Universe10.Operation.properties.queryParameters.name,i=e[A.universesInfo.Universe10.Method.properties.securedBy.name]||[],a=0,o=i;a0&&(e[t]=(e[t]||[]).concat(l)),p.length>0&&(e[n]=(e[n]||[]).concat(p)),c.length>0&&(e[r]=(e[r]||[]).concat(c))}}},t.prototype.extract=function(e,t){var n=e[t]||[];if(n=JSON.parse(JSON.stringify(n)),this.serializeMetadata)for(var r=0,i=n;r=0)return!1;if("discriminatorValue"==t){var n=e.isStrict;return"function"!=typeof n||n.call(e)}if("__METADATA__"==t){var r=e.value(),i=r.primitiveValuesMeta;return!(!i&&0==Object.keys(r).length)&&(!i||!!Object.keys(i).filter(function(e){return"displayName"!=e&&"required"!=e}).length)}return!0});return 0==n.length}function o(e){if(!e)return null;var t=h.find(e.declaredFacets(),function(e){return e.kind()==f.MetaInformationKind.TypeAttributeValue});return t?t.value():null}function s(e,t){if(!e||!m.ASTNodeImpl.isInstance(e))return null;var n=e.attr("type")||e.attr("schema")||e;return m.resolveSchemaFragment(n,t)}var u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var l=n(56),p=n(207),c=l.rt,f=c.tsInterfaces,h=n(16),d=n(21),m=n(55),y=n(205),v=l.rt.typeExpressions,g=n(254),A=function(){function e(e,t,n,r,i,a,o){void 0===i&&(i=!1),void 0===o&&(o=null),this._original=e,this._name=t,this._type=n,this._required=r,this.isFacet=i,this._metadata=a,this._src=o}return e.prototype.name=function(){return this._original?this._original.name():this._name},e.prototype.original=function(){return this._original},e.prototype.append=function(t,n){var r;if(this._type.isUnion()){var i=this._type,a=n.branchingOption(i.branchId()),o=i.options()[a];if(o.isBuiltIn())r=o;else{var s=new _(o.original(),[],null,[],[],o.name());o.append(s,n),r=s}}else{var s=new _(this._type.original(),[],null,[],[],this._type.name());this._type.append(s,n),r=s}var u=new e(this._original,this._name,r,this.required(),this.isFacet,this.metadata(),this._src);this.isFacet?t.addFacet(u):t.addProperty(u)},e.prototype.setType=function(e){this._type=e},e.prototype.type=function(){return this._type},e.prototype.required=function(){return null!=this._required?this._required:this._original.required()},e.prototype.metadata=function(){return this._metadata},e.prototype.annotations=function(){return this._original?this._original.annotations():[]},e.prototype.source=function(){var e=this._original||this._src;return e?new _(e.declaredAt(),[],null,[],[],null):null},e}();t.PropertyEntry=A;var E=function(){function e(e,t){this._original=e,this._superTypes=t,this._id=""+T++}return e.prototype.id=function(){return this._id},e.prototype.branchingRegistry=function(){return this._branchingRegistry},e.prototype.setBranchingRegistry=function(e){this._branchingRegistry=e},e.prototype.name=function(){return this._original&&this._original.name()},e.prototype.isUnion=function(){return!1},e.prototype.isBuiltIn=function(){return!1},e.prototype.isExternal=function(){if(this._original)return this._original.isExternal();for(var e=0,t=this.superTypes();e0){for(var i={},a=0,o=this._properties;a0)for(var h=0,d=this._facets;hthis.arr.length-1)throw new Error("Branch index exceeds total branches count");return this.arr[e]},e.prototype.typeMap=function(){return this._typeMap},e.prototype.expander=function(){return this._expander},e}(),R=function(){function e(e){this._expander=e,this.arr=[]}return e.prototype.expander=function(){return this._expander},e.prototype.nextBranchId=function(e){var t=this.arr.length;return this.arr.push(e),t},e.prototype.possibleBranches=function(e){for(var t=this,n=[],r=[],i=1,a=1,o=this.arr.length,s=0;s=0;n&&(t=this.expandHierarchy(t,t.branchingRegistry()));var r=this.dump(t,n);return r},e.prototype.createHierarchyEntry=function(e,t,n,r){void 0===n&&(n=new b);var i=!1;r||(i=!0,r=new R(this));var a=this.doCreateHierarchyEntry(e,t,n,r);return i&&a.setBranchingRegistry(r),a},e.prototype.doCreateHierarchyEntry=function(e,t,n,r){if(void 0===n&&(n=new b),e.isBuiltin()){var i=n.typeByName(e.name());return i||(i=new S(e),n.addType(i)),i}var s=0;if(!e.name()&&e.isEmpty()&&2==e.superTypes().length&&1==e.superTypes().filter(function(e){return"unknown"!=e.name()}).length&&(e=h.find(e.superTypes(),function(e){return"unknown"!=e.name()})),e.name()&&n.hasTypeByName(e.name())){if(t<=0)return n.typeByName(e.name());s=t,t--}if(this.options.isInsideTemplate&&1==e.superTypes().length){var u=void 0,l=o(e);if(u=l?l:e.superTypes()[0].isBuiltin()?e.name():e.superTypes()[0].name(),u&&u.indexOf("<<")>=0){var p=this.processExpression(u,t,n,r,e);if(p)return p}}if(e.isUnion()&&0==e.superTypes().length){for(var c=e.options(),f=[],d=0,m=c;d=0?e.properties():e.declaredProperties();if(t>=0&&O.length>1){for(var f=[],U=0,x=O;U0)for(var V=0,K=D;V=0?e.allDefinedFacets():e.definedFacets();if(X.length>0)for(var z=0,$=X;z<$.length;z++){var j=$[z],J=this.processPropertyHierarchy(j,t,e,n,r,!0);A.addFacet(J)}return t==this.options.typeExpansionRecursionDepth&&n.removeType(A),A},e.prototype.processExpression=function(e,t,n,r,i){void 0===n&&(n=new b);var a=y.checkExpression(e);if(!a)return null;var o,s=y.escapeTemplateParameters(e);if(s.status!=y.ParametersEscapingStatus.OK)return null;if(o=s.resultingString,a=y.checkExpression(o),!a)return null;var u;try{if(u=v.parse(o),!u)return null;var l=this.expressionToObject(u,s,t,n,r,i);return l}catch(e){return null}},e.prototype.expressionToObject=function(e,t,n,r,i,a){void 0===r&&(r=new b);var o,s=0;if("name"==e.type){var u=e;s=u.arr;var p=u.value;if(t.status==y.ParametersEscapingStatus.OK){var c=y.unescapeTemplateParameters(p,t.substitutions);c.status==y.ParametersEscapingStatus.OK&&(p=c.resultingString)}var f=l.rt.builtInTypes().get(p);if(f||(f=this.options.typeCollection.getType(p)),f)o=this.createHierarchyEntry(f,n,r,i);else{var h=new _(l.rt.builtInTypes().get("unknown"),[],null,[],[],"unknown"),d=0===s?a:null;o=new _(d,[h],null,[],[],p),o.setTypeAttributeValue(p)}}else if("union"==e.type){for(var m=e,v=g.toOptionsArray(m),A=[],E=0,T=v;E0)for(var w=new S(l.rt.builtInTypes().get("array"));s-- >0;){var d=0===s?a:null;o=new _(null,[w],o,[],[],null)}return o},e.prototype.extractParserMetadata=function(e){var t,n=e.declaredFacets().filter(function(e){return"__METADATA__"==e.facetName()});return n.length&&(t=n[0].value()),t},e.prototype.processPropertyHierarchy=function(e,t,n,i,o,s){void 0===s&&(s=!1);var u=e.range(),l=this.extractParserMetadata(u),p=e.declaredAt(),c=t;if(p.name()&&(!n.name()||p.name()!=n.name())&&i.hasTypeByName(p.name())&&t<=0){var f=i.property(p.name(),e.name());if(f)return f;c--}a(u)&&(u=u.superTypes()[0],t>=0&&r(l,this.extractParserMetadata(u)));var h=new A(e,null,null,e.required(),s,l);p.name()&&i.addProperty(p.name(),e.name(),h);var d=this.createHierarchyEntry(u,c,i,o);return h.setType(d),h},e.prototype.expandHierarchy=function(e,t,n){if(!t)return e;for(var r=[],i=0,a=t.possibleBranches(n);i3)r.type=[o[0].name()],r.typePropertyKind="TYPE_EXPRESSION";else{var u=e.schema();if(u){u=u.trim();var l=s(this.options.node,u);l&&(u=l),r.type=[u],e.schemaPath()&&(r.schemaPath=e.schemaPath());var p="{"===u[0]&&"}"===u[u.length-1],c="<"===u[0]&&">"===u[u.length-1];p?r.typePropertyKind="JSON":c?r.typePropertyKind="XML":r.typePropertyKind="TYPE_EXPRESSION"}}else if(e.isUnion()){r.typePropertyKind="TYPE_EXPRESSION";var f=e,h=f.options();if(h.length>0){r.type=["union"];var d=[];r.anyOf=d;for(var m=0,y=h;m=0&&(g=A[0])}else g.name&&g.name.indexOf("<<")>=0&&(g=g.name);d.push(g)}}}}else{o.length&&(o[0].name()||o[0].isUnion())?r.typePropertyKind="TYPE_EXPRESSION":r.typePropertyKind="INPLACE";var E=e,T=void 0;if(this.options.isInsideTemplate){if(T=e.typeAttributeValue(),!T){var _=e.original()&&e.original().superTypes();if(_&&1==_.length&&_[0].isUnknown()){var S=_[0].name();S.indexOf("<<")>=0&&(T=S)}}T&&!Array.isArray(T)&&(T=[T])}if(T)r.type=T,r.typePropertyKind="TYPE_EXPRESSION";else if(t){var N=E.possibleBuiltInTypes();N.length>0&&(r.type=N)}else{for(var N=[],I=0,b=o;I0){var P=[];r.properties=P;for(var L=0,O=w;L0){var k=[];r.facets=k;for(var F=0,B=x;F1&&(W=j.superTypes()),r.items=W.map(function(r){if(!t&&r.name())return r.name();var i=n.dump(j,t);if(n.appendSourceFromExtras(i,E),j.isUnion()||i.name||(i.name="items",i.displayName="items",n.appendMeta(i,"displayName","calculated")),n.options.isInsideTemplate)if(i.name==e.name()&&i.type){var a=i.type;a.length&&a[0].indexOf("<<")>=0&&(i=a[0])}else i.name&&i.name.indexOf("<<")>=0&&(i=i.name);return i})}this.dumpFacets(e,r,t)}var H=e.examples(t);if(H.length>0){var Y=[],q=[];r.examples=q,r.simplifiedExamples=Y;for(var G=0,X=H;G=0&&(i={type:[i.name],typePropertyKind:"TYPE_EXPRESSION"}),i.__METADATA__&&(i.__METADATA__=JSON.parse(JSON.stringify(i.__METADATA__))),(null==i.displayName||a.name())&&(i.displayName=e.name(),this.appendMeta(i,"displayName","calculated"))),this.appendSourceFromExtras(i,e.source()||t),i.name=e.name(),r||(i.required=e.required()),!r&&e.required()){var o=!1;if(e.original()){if(e.original().range().getExtra("HAS_FACETS")){var s=e.original().range().getExtra("HAS_FACETS");s.length&&s.indexOf("required")>=0&&(o=!0)}o||this.appendMeta(i,"required","insertedAsDefault")}else a.name()||a.isBuiltIn()?this.appendMeta(i,"required","insertedAsDefault"):this.sourceHasKey(a,"required")||this.appendMeta(i,"required","insertedAsDefault")}var u=a;if((a.isBuiltIn()||a.original()&&a.original().isBuiltin())&&e.original()){var l=e.original().range();l.isBuiltin()||(u=new _(l,[],null,[],[],null))}if((n||u!=a)&&this.checkIfTypePropertyIsDefault(u,i),this.checkIfPropertyTypeIsCalculated(i,e,r,n),e.annotations()&&e.annotations().length){var p=i.scalarsAnnotations;p||(p={},i.scalarsAnnotations=p),p.required=[[]];for(var c=0,f=e.annotations();c0){var n=[];t.annotations=n,e.forEach(function(e){n.push({name:e.name(),value:e.value()})})}},e.prototype.dumpFacets=function(e,t,n){var r=[];if(e.original()){r=n?e.original().allCustomFacets()||[]:e.original().customFacets()||[];var a={};e.original().allDefinedFacets().forEach(function(e){return a[e.name()]=!0}),r=r.filter(function(e){return a[e.facetName()]===!0})}if(this.options.isInsideTemplate){var o=[];r=r.filter(function(e){return!(e.facetName().indexOf("<<")>=0)||(o.push(e),!1)});for(var s=0,u=o;s0){var p=[];t.fixedFacets=p,r.forEach(function(e){try{var t=e.value();"object"==typeof t&&JSON.stringify(t),p.push({name:e.facetName(),value:t})}catch(t){console.log("Error while dumping "+e.facetName()),console.log(t)}})}for(var c=e.possibleBuiltInTypes({}),h=i(c),d={},m=n?e.allFacets():e.declaredFacets(),y=0,v=m;y1)this.removeMeta(e,"type");else if(1==u.length&&u[0].resolvedValueKind()==d.Kind.SCALAR){var p=u[0];r&&!l.rt.builtInTypes().get(p.value())||this.removeMeta(e,"type")}}else{var c=h.find(s.children(),function(e){return"type"==e.key()});if(c||(c=h.find(s.children(),function(e){return"schema"==e.key()})),c)if(c.resolvedValueKind()==d.Kind.SEQ){var u=c.children();if(u.length>1)this.removeMeta(e,"type");else if(1==u.length&&u[0].resolvedValueKind()==d.Kind.SCALAR){var p=u[0];r&&!l.rt.builtInTypes().get(p.value())||this.removeMeta(e,"type")}}else c.resolvedValueKind()==d.Kind.SCALAR&&(r&&!l.rt.builtInTypes().get(c.value())||this.removeMeta(e,"type"))}}}}}},e.prototype.patchDisplayName=function(e,t){if(!t.displayName&&t.name){t.displayName=t.name;var n=void 0,r=e.original()&&e.original().getExtra("SOURCE");if(r)if(m.LowLevelWrapperForTypeSystem.isInstance(r))n=r.node();else if(m.ASTNodeImpl.isInstance(r)){n=r.lowLevel()}n?g.patchDisplayName(t,n):t.displayName=t.name,this.appendMeta(t,"displayName","calculated")}t.hasOwnProperty("displayName")&&null!=t.displayName&&(t.displayName=""+t.displayName)},e}();t.TypeExpander=C;var w=function(){function e(){this.map={},this.init()}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.init=function(){for(var e=[l.getUniverse("RAML10").type(l.universesInfo.Universe10.TypeDeclaration.name),l.getUniverse("RAML10").type(l.universesInfo.Universe10.StringTypeDeclaration.name),l.getUniverse("RAML10").type(l.universesInfo.Universe10.FileTypeDeclaration.name)],t=0,n=e;to)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(257);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BodyLike:function(e,t){return new o.BodyLikeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateTypeDeclaration:function(e,t){return new o.DateTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},ExampleString:function(e){return new o.ExampleStringImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUri:function(e){return new o.FixedUriImpl(e)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},GlobalSchema:function(e,t){return new o.GlobalSchemaImpl(e,t)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},JSONBody:function(e,t){return new o.JSONBodyImpl(e,t)},JSONExample:function(e){return new o.JSONExampleImpl(e)},JSonSchemaString:function(e){return new o.JSonSchemaStringImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},Parameter:function(e,t){return new o.ParameterImpl(e,t)},ParameterLocation:function(e){return new o.ParameterLocationImpl(e)},RAMLSimpleElement:function(e,t){return new o.RAMLSimpleElementImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLBody:function(e,t){return new o.XMLBodyImpl(e,t)},XMLExample:function(e){return new o.XMLExampleImpl(e)},XMLSchemaString:function(e){return new o.XMLSchemaStringImpl(e)}}},function(e,t,n){"use strict";function r(e){var t=w.getUniverse("RAML08"),n=t.type("Method"),r=C.createStubNode(n,null,e);return r}function i(e){var t=w.getUniverse("RAML08"),n=t.type("StringTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function a(e){var t=w.getUniverse("RAML08"),n=t.type("BooleanTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function o(e){var t=w.getUniverse("RAML08"),n=t.type("NumberTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function s(e){var t=w.getUniverse("RAML08"),n=t.type("IntegerTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function u(e){var t=w.getUniverse("RAML08"),n=t.type("DateTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function l(e){var t=w.getUniverse("RAML08"),n=t.type("FileTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function p(e){var t=w.getUniverse("RAML08"),n=t.type("XMLBody"),r=C.createStubNode(n,null,e);return r}function c(e){var t=w.getUniverse("RAML08"),n=t.type("JSONBody"),r=C.createStubNode(n,null,e);return r}function f(e){var t=w.getUniverse("RAML08"),n=t.type("SecuritySchemePart"),r=C.createStubNode(n,null,e);return r}function h(e){var t=w.getUniverse("RAML08"),n=t.type("Trait"),r=C.createStubNode(n,null,e);return r}function d(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth1SecuritySchemeSettings"),r=C.createStubNode(n,null,e);return r}function m(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth2SecuritySchemeSettings"),r=C.createStubNode(n,null,e);return r}function y(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth2SecurityScheme"),r=C.createStubNode(n,null,e);return r}function v(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth1SecurityScheme"),r=C.createStubNode(n,null,e);return r}function g(e){var t=w.getUniverse("RAML08"),n=t.type("BasicSecurityScheme"),r=C.createStubNode(n,null,e);return r}function A(e){var t=w.getUniverse("RAML08"),n=t.type("DigestSecurityScheme"),r=C.createStubNode(n,null,e);return r}function E(e){var t=w.getUniverse("RAML08"),n=t.type("CustomSecurityScheme"),r=C.createStubNode(n,null,e);return r}function T(e){var t=w.getUniverse("RAML08"),n=t.type("GlobalSchema"),r=C.createStubNode(n,null,e);return r}function _(e){var t=w.getUniverse("RAML08"),n=t.type("DocumentationItem"),r=C.createStubNode(n,null,e);return r}function S(e,t,n){return L.loadApi(e,t,n).getOrElse(null)}function N(e,t,n){return L.loadApi(e,t,n).getOrElse(null)}function I(e,t,n){return L.loadApiAsync(e,t,n)}function b(e,t,n){return L.loadRAMLAsync(e,t,n)}function M(e){return L.getLanguageElementByRuntimeType(e)}var R=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var C=n(3),w=n(56),P=n(218),L=n(1),O=n(258),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.title=function(){return e.prototype.attribute.call(this,"title",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate("title").setValue(""+e),this},t.prototype.version=function(){return e.prototype.attribute.call(this,"version",this.toString)},t.prototype.setVersion=function(e){return this.highLevel().attrOrCreate("version").setValue(""+e),this},t.prototype.baseUri=function(){return e.prototype.attribute.call(this,"baseUri",function(e){return new Re(e)})},t.prototype.baseUriParameters_original=function(){return e.prototype.elements.call(this,"baseUriParameters")},t.prototype.uriParameters=function(){return e.prototype.elements.call(this,"uriParameters")},t.prototype.protocols=function(){return e.prototype.attributes.call(this,"protocols",this.toString)},t.prototype.setProtocols=function(e){return this.highLevel().attrOrCreate("protocols").setValue(""+e),this},t.prototype.mediaType=function(){return e.prototype.attribute.call(this,"mediaType",function(e){return new Ie(e)})},t.prototype.schemas=function(){return e.prototype.elements.call(this,"schemas")},t.prototype.traits_original=function(){return e.prototype.elements.call(this,"traits")},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,"securedBy",function(e){return new pe(e)})},t.prototype.securitySchemes=function(){return e.prototype.elements.call(this,"securitySchemes")},t.prototype.resourceTypes_original=function(){return e.prototype.elements.call(this,"resourceTypes")},t.prototype.resources=function(){return e.prototype.elements.call(this,"resources")},t.prototype.documentation=function(){return e.prototype.elements.call(this,"documentation")},t.prototype.wrapperClassName=function(){return"ApiImpl"},t.prototype.kind=function(){return"Api"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat("Api")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat("RAML08.ApiImpl")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&"function"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t=0&&(l=t.indexOf("}",++c),!(l<0));c=t.indexOf("{",l)){var f=t.substring(c,l);if(p[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var h=i&&z.actualUnit(i),d=new Y.StringTypeDeclarationImpl(f);d.setName(f);var m=d.highLevel();m.lowLevel().setUnit(h),m.setParent(a),d.meta().setCalculated(),m.patchProp(o),u.push(d)}}return Object.keys(s).filter(function(e){return!p[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function W(e){var t=e.schema();if(null==t)return null;var n=t.value();if(!n)return null;if(ee.stringStartsWith(n,"{")||ee.stringStartsWith(n,"[")||ee.stringStartsWith(n,"<"))return n;var r=e.highLevel(),i=r.root(),a=i.elementsOfKind($.Universe08.Api.properties.schemas.name),o=ae.find(a,function(e){return e.name()==n});if(!o)return n;if(!o.getKind||o.getKind()!=X.NodeKind.NODE)return n;if(o.definition().key()!=$.Universe08.GlobalSchema)return n;var s=o.attr($.Universe08.GlobalSchema.properties.value.name);return null==s?null:s.value()}function H(e){var t=e.highLevel();if(null==t)return null;var n=t.lowLevel();if(null==n)return null;var r=n.children().filter(function(e){return e.key().indexOf("<<")>=0});if(0==r.length)return null;var i=new G.TypeInstanceImpl(r);return i}Object.defineProperty(t,"__esModule",{value:!0});var Y=n(257),q=n(256),G=n(218),X=n(197),z=n(55),$=n(203),J=n(216),Q=n(198),Z=n(19),ee=n(15),te=n(208),ne=n(204),re=n(4),ie=n(6),ae=n(16),oe=n(206);t.load=r,t.expandTraitsAndResourceTypes=i,t.completeRelativeUri=a,t.absoluteUri=o,t.qName=s,t.traitsPrimary=u,t.allTraits=l,t.resourceTypesPrimary=p,t.allResourceTypes=c,t.relativeUriSegments=h,t.parentResource=d,t.parent=m,t.childResource=y,t.getResource=v,t.childMethod=g,t.getMethod=A,t.ownerApi=T,t.methodId=_,t.isOkRange=S,t.allResources=N;t.uriParametersPrimary=I,t.uriParameters=b,t.baseUriParametersPrimary=M,t.baseUriParameters=R,t.absoluteUriParameters=C,t.protocolsPrimary=w,t.allProtocols=P,t.securedByPrimary=L,t.allSecuredBy=O,t.securitySchemeName=D,t.securityScheme=U,t.RAMLVersion=x,t.structuredValue=k,t.referenceName=F,t.referencedTrait=B,t.referencedResourceType=V,t.schemaContent=W,t.getTemplateParametrizedProperties=H},function(e,t,n){(function(e,r){!function(i){"use strict";function a(e,t){e=Array.isArray(e)?e:[e];var n,r;for(n=0;n="0"&&e[r]<="9";)r+=1;if(r===t)throw new Error("Expected an integer at position ".concat(r,"."));return r-t}function T(e,t,n,r,i){var a,o=1;return s(e,t,n,r),t+=r.length-1,"("===e[t+1]&&(t+=2,a=E(e,t,n),o=parseInt(e.substring(t,t+a),10),t+=a,s(e,t,n,")"),++t),i.push({kind:r[0],index:o}),t}function _(e,t){var n=t.cursor-1,r=e.length,i=e.indexOf("]",t.cursor),a=null,o=!1,u=[];for(i=r&&n>0;)t.push(e[n]);break;case"i":case"s":if(s.index1&&"0"===t[0])return-1;if(1===n&&"-"===t[0])return e.length;for(;++r"9")return-1;return parseInt(t,10)}function l(e,t){if("undefined"!=typeof e){var n,r,i=e,a=t.length,o=-1;if(a){for(;++or))return;i=i[r]}else i=i[n];return i}return e}}function p(e,t,n,i){if(0===n.length)throw new Error("Cannot set the root object; assign it directly.");if("undefined"!=typeof e){var a,o,s,l=e,p=n.length,c=n.length-1,f=-1;if(!p)return l;for(;++fo)){if(l.length===o)return l.push(t),r;throw new ReferenceError("Not found: ".concat(i(n.slice(0,f+1),!0),"."))}if(f===c)return s=l[o],l[o]=t,s;l=l[o]}else{if(f===c)return s=l[a],l[a]=t,s;if(l=l[a],"undefined"==typeof l)throw new ReferenceError("Not found: ".concat(i(n.slice(0,f+1),!0),"."))}if(f===p)return l}}function c(e){if(this.encode=e.length>0&&"#"===e[0]?s:a,Array.isArray(e))this.path=e;else{var t=e.length>0&&"#"===e[0]?o:i;this.path=t(e)}}var f,h,d=[];"object"==typeof e&&e?(f=e,h=e.JsonPointer):"undefined"!=typeof window?(f=window,h=window.JsonPointer):f={},h&&d.push(function(){f.JsonPointer===c&&(f.JsonPointer=h,h=r)}),Object.defineProperty(c.prototype,"pointer",{enumerable:!0,get:function(){return a(this.path)}}),Object.defineProperty(c.prototype,"uriFragmentIdentifier",{ -enumerable:!0,get:function(){return s(this.path)}}),c.prototype.get=function(e){return l(e,this.path)},c.prototype.set=function(e,t){return p(e,t,this.path,this.encode)},c.prototype.toString=function(){return this.pointer},c.create=function(e){return new c(e)},c.get=function(e,t){var n=t.length>0&&"#"===t[0]?o:i;return l(e,n(t))},c.set=function(e,t,n){var r=t.length>0&&"#"===t[0]?s:a,u=t.length>0&&"#"===t[0]?o:i;return p(e,n,u(t),r)},c.decodePointer=i,c.encodePointer=a,c.decodeUriFragmentIdentifier=o,c.encodeUriFragmentIdentifier=s,c.noConflict=function(){return d&&(d.forEach(function(e){e()}),d=null),c},"undefined"!=typeof n&&n&&"object"==typeof t&&t&&n.exports===t?n.exports=c:f.JsonPointer=c}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){"use strict";function r(e){return a.isWebPath(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(5),o=n(211),s=function(){function e(e){this.unit=e}return e.prototype.contextPath=function(){if(!this.unit)return"";var e=this.unit.absolutePath();return e||""},e.prototype.normalizePath=function(e){if(!e)return e;var t;if(r(e)){var n=0===e.toLowerCase().indexOf("https")?"https://":"http://";t=n+i.normalize(e.substring(n.length)).replace(/\\/g,"/")}else t=i.normalize(e).replace(/\\/g,"/");return t},e.prototype.content=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolve(n);return r?r.contents()||"":""},e.prototype.contentAsync=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolveAsync(n);if(!r)return Promise.resolve("");var i=r.then(function(e){return e&&e.contents()||""});return i},e.prototype.toRelativeIfNeeded=function(e){var t=e;return!i.isAbsolute(e)||r(e)||r(this.unit.absolutePath())||(t=i.relative(i.dirname(this.unit.absolutePath()),e)),t},e.prototype.hasAsyncRequests=function(){return o.hasAsyncRequests()},e.prototype.resolvePath=function(e,t){return a.buildPath(t,e,this.unit.project().getRootPath())},e.prototype.isAbsolutePath=function(e){return!!e&&(!!r(e)||i.isAbsolute(e))},e.prototype.promiseResolve=function(e){return Promise.resolve(e)},e.prototype.rootPath=function(){return this.unit.project().getRootPath()},e.prototype.isWebPath=function(e){return a.isWebPath(e)},e.prototype.relativePath=function(e,t){return i.relative(e,t)},e}();t.ContentProvider=s},function(e,t,n){"use strict";function r(){return l.hasAsyncRequests()}function i(e){l.addLoadCallback(e)}function a(){return h.getTransformNames()}function o(e){return p.getFragmentDefenitionName(e)}function s(e,t,n){if(c.ReferenceType.isInstance(n.range())){var r=(n.range(),f.createNode(e));return new p.StructuredValue(r,t,n)}return e}function u(e){return(new d.UrlParameterNameValidator).parseUrl(e)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(211),p=n(55),c=n(56),f=n(4),h=n(216),d=n(19),m=n(207),y=n(203);t.hasAsyncRequests=r,t.addLoadCallback=i,t.getTransformerNames=a,t.updateType=function(e){var t=m.doDescrimination(e);null==t&&e.property()&&(t=e.property().range()),t&&e.patchType(t)},t.getFragmentDefenitionName=o,t.genStructuredValue=s,t.parseUrl=u;var v=function(){function e(e,t){this.node=e,this.targetUnitRoot=t}return e}();t.UnitLink=v;var g=function(){function e(e,t){this.errors=e,this.primaryUnitRoot=t}return e.prototype.accept=function(e){this.transformIssue(e),this.errors.push(e)},e.prototype.transformIssue=function(e){var t=this,n=null,r=this.findIssueTail(e);r.node&&(n=r.node.lowLevel().unit());var i=this.primaryUnitRoot.lowLevel().unit();if(n&&i&&n!=i){var a=this.findPathToNodeUnit(this.primaryUnitRoot,r.node);if(a&&a.length>0){var o=a.map(function(n){return t.convertConnectingNodeToError(n,e)});if(o&&o.length>0)for(var s=r,u=o.length-1;u>=0;u--){var l=o[u];s.extras=[],s.extras.push(l),s=l}}}},e.prototype.begin=function(){},e.prototype.end=function(){},e.prototype.acceptUnique=function(e){for(var t=0,n=this.errors;t1){var s={};a.forEach(function(e){var t=e.highLevel(),n="";null!=t.parent()&&(n+=t.parent().id()+"."),n+=t.localId();var r=s[n];null==r&&(r=[],s[n]=r),r.push(e)});var u=Object.keys(s);u.length>1&&a.forEach(function(e){t.accept(r.createIssue1(i.RESOURCES_SHARE_SAME_URI,{},e.highLevel(),!1))})}}},e.prototype.acceptResource=function(e){var t=e.absoluteUri(),n=this.uriToResources[t];n||(n=[],this.uriToResources[t]=n),n.push(e),n.length>1&&(this.conflictingUriToResources[t]=n)},e}();e.exports=a},function(e,t,n){"use strict";function r(e,t,n){null==n&&(n=i(e)),n.length>0&&(n+=":");for(var r=e.getElementsByTagName(n+t),a=[],o=0;o"))return!1;var t=new p.DOMParser(f).parseFromString(e),n=r(t,"schema",i(t));return n.length>0}catch(e){return!1}}function o(e){var t={};if(1==e.nodeType){if(e.attributes.length>0)for(var n=0;n=t+n||t?new java.lang.String(e,t,n)+"":e}function l(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new p,o=n.domBuilder||new a,s=n.errorHandler,u=n.locator,l=n.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=i(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(c.nbsp=" ",c.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,c):r.errorHandler.error("invalid doc source"),o.doc},a.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;l(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function d(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?h(parseInt(t.substr(1).replace("x","0x"))):(l.error("entity not found:"+e),e)}function m(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,d);E&&y(S),r.characters(n,0,t-S),S=t}}function y(t,n){for(;t>=g&&(n=A.exec(e));)v=n.index,g=v+n[0].length,E.lineNumber++;E.columnNumber=t-v+1}for(var v=0,g=0,A=/.*(?:\r\n?|\n)|.*$/g,E=r.locator,T=[{currentNSMap:t}],_={},S=0;;){try{var N=e.indexOf("<",S);if(N<0){if(!e.substr(S).match(/^\s*$/)){var I=r.doc,b=I.createTextNode(e.substr(S));I.appendChild(b),r.currentElement=b}return}switch(N>S&&m(N),e.charAt(N+1)){case"/":var M=e.indexOf(">",N+3),R=e.substring(N+2,M),C=T.pop();M<0?(R=e.substring(N+2).replace(/[\s<].*/,""),l.error("end tag name: "+R+" is not complete:"+C.tagName),M=N+1+R.length):R.match(/\sS?S=M:m(Math.max(N,S)+1)}}function i(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function a(e,t,n,r,i,a){for(var o,s,u=++t,l=g;;){var p=e.charAt(u);switch(p){case"=":if(l===A)o=e.slice(t,u),l=T;else{if(l!==E)throw new Error("attribute equal must after attrName");l=T}break;case"'":case'"':if(l===T||l===A){if(l===A&&(a.warning('attribute value must after "="'),o=e.slice(t,u)),t=u+1,u=e.indexOf(p,t),!(u>0))throw new Error("attribute value no end '"+p+"' match");s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t-1),l=S}else{if(l!=_)throw new Error('attribute value must after "="');s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t),a.warning('attribute "'+o+'" missed start quot('+p+")!!"),t=u+1,l=S}break;case"/":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:l=I,n.closed=!0;case _:case A:case E:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),l==g&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:break;case _:case A:s=e.slice(t,u),"/"===s.slice(-1)&&(n.closed=!0,s=s.slice(0,-1));case E:l===E&&(s=o),l==_?(a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead!!'),n.add(s,s,t));break;case T:throw new Error("attribute value missed!!")}return u;case"€":p=" ";default:if(p<=" ")switch(l){case g:n.setTagName(e.slice(t,u)),l=N;break;case A:o=e.slice(t,u),l=E;break;case _:var s=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s,t);case S:l=N}else switch(l){case E:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),n.add(o,o,t),t=u,l=A;break;case S:a.warning('attribute space is required"'+o+'"!!');case N:l=A,t=u;break;case T:l=_,t=u;break;case I:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function o(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],s=o.qName,u=o.value,p=s.indexOf(":");if(p>0)var c=o.prefix=s.slice(0,p),f=s.slice(p+1),h="xmlns"===c&&f;else f=s,c=null,h="xmlns"===s&&"";o.localName=f,h!==!1&&(null==i&&(i={},l(n,n={})),n[h]=i[h]=u,o.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(var a=e.length;a--;){o=e[a];var c=o.prefix;c&&("xml"===c&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(o.uri=n[c||""]))}var p=r.indexOf(":");p>0?(c=e.prefix=r.slice(0,p),f=e.localName=r.slice(p+1)):(c=null,f=e.localName=r);var d=e.uri=n[c||""];if(t.startElement(d,f,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(d,f,r),i)for(c in i)t.endPrefixMapping(c)}function s(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function u(e,t,n,r){var i=r[n];return null==i&&(i=e.lastIndexOf(""),i",t+4);return a>t?(n.comment(e,t+4,a-t-4),a+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,a-t-9),n.endCDATA(),a+3}var o=d(e,t),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var u=o[1][0],l=s>3&&/^public$/i.test(o[2][0])&&o[3][0],p=s>4&&o[4][0],c=o[s-1];return n.startDTD(u,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),p&&p.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function c(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function f(e){}function h(e,t){return e.__proto__=t,e}function d(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var m=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=new RegExp("[\\-\\.0-9"+m.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),v=new RegExp("^"+m.source+y.source+"*(?::"+m.source+y.source+"*)?$"),g=0,A=1,E=2,T=3,_=4,S=5,N=6,I=7;n.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),l(t,t={}),r(e,t,n,i,this.errorHandler),i.endDocument()}},f.prototype={setTagName:function(e){if(!v.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!v.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},h({},h.prototype)instanceof h||(h=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),t.XMLReader=n},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){function r(){}var i=e.prototype;if(Object.create){var a=Object.create(t.prototype);i.__proto__=a}i instanceof t||(r.prototype=t.prototype,r=new r,n(i,r),e.prototype=i=r),i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function i(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ie[e]),this.message=ie[e],Error.captureStackTrace&&Error.captureStackTrace(this,i);return n.code=e,t&&(this.message=this.message+": "+t),n}function a(){}function o(e,t){this._node=e,this._refresh=t,s(this)}function s(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);K(e,"length",r.length),n(r,e),e._inc=t}}function u(){}function l(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function p(e,t,n,r){if(r?t[l(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&g(i,e,r),v(i,e,n))}}function c(e,t,n){var r=l(t,n);if(!(r>=0))throw i(oe,new Error(e.tagName+"@"+n));for(var a=t.length-1;r"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function m(e,t){if(t(e))return!0;if(e=e.firstChild)do if(m(e,t))return!0;while(e=e.nextSibling)}function y(){}function v(e,t,n){e&&e._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function g(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete t._nsMap[n.prefix?n.localName:""]}function A(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function E(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,A(e.ownerDocument,e),t}function T(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var o=n?n.previousSibling:e.lastChild;i.previousSibling=o,a.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do i.parentNode=e;while(i!==a&&(i=i.nextSibling));return A(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function _(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,A(e.ownerDocument,e,t),t}function S(){this._nsMap={}}function N(){}function I(){}function b(){}function M(){}function R(){}function C(){}function w(){}function P(){}function L(){}function O(){}function D(){}function U(){}function x(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,a=r.namespaceURI;if(a&&null==i){var i=r.lookupPrefix(a);if(null==i)var o=[{namespace:a,prefix:null}]}return F(this,n,e,t,o),n.join("")}function k(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix==r)return o.namespace!=i}return!0}function F(e,t,n,r,i){if(r){if(e=r(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Y:i||(i=[]);var a=(i.length,e.attributes),o=a.length,s=e.firstChild,u=e.tagName;n=W===e.namespaceURI||n,t.push("<",u);for(var l=0;l"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,i),s=s.nextSibling;else for(;s;)F(s,t,n,r,i),s=s.nextSibling;t.push("")}else t.push("/>");return;case Z:case te:for(var s=e.firstChild;s;)F(s,t,n,r,i),s=s.nextSibling;return;case q:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,d),'"');case G:return t.push(e.data.replace(/[<&]/g,d));case X:return t.push("");case Q:return t.push("");case ee:var m=e.publicId,y=e.systemId;if(t.push("');else if(y&&"."!=y)t.push(' SYSTEM "',y,'">');else{var v=e.internalSubset;v&&t.push(" [",v,"]"),t.push(">")}return;case J:return t.push("");case z:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function B(e,t,n){var r;switch(t.nodeType){case Y:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case q:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(B(e,i,n)),i=i.nextSibling;return r}function V(e,t,n){var r=new t.constructor;for(var i in t){var o=t[i];"object"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new a),r.ownerDocument=e,r.nodeType){case Y:var s=t.attributes,l=r.attributes=new u,p=s.length;l._ownerElement=r;for(var c=0;c0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},n(H,h),n(H,h.prototype),y.prototype={nodeName:"#document",nodeType:Z,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==Y&&(this.documentElement=e),T(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),E(this,e)},importNode:function(e,t){return B(this,e,t)},getElementById:function(e){var t=null;return m(this.documentElement,function(n){if(n.nodeType==Y&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new S;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new a;var n=t.attributes=new u;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new O;return e.ownerDocument=this,e.childNodes=new a,e},createTextNode:function(e){var t=new b;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new M;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new R;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new D;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new N;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new L;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new S,r=t.split(":"),i=n.attributes=new u;return n.childNodes=new a,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new N,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(y,h),S.prototype={nodeType:Y,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):_(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new o(this,function(t){var n=[];return m(t,function(r){r===t||r.nodeType!=Y||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new o(this,function(n){var r=[];return m(n,function(i){i===n||i.nodeType!==Y||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},y.prototype.getElementsByTagName=S.prototype.getElementsByTagName,y.prototype.getElementsByTagNameNS=S.prototype.getElementsByTagNameNS, -r(S,h),N.prototype.nodeType=q,r(N,h),I.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ie[ae])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},r(I,h),b.prototype={nodeName:"#text",nodeType:G,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(b,I),M.prototype={nodeName:"#comment",nodeType:Q},r(M,I),R.prototype={nodeName:"#cdata-section",nodeType:X},r(R,I),C.prototype.nodeType=ee,r(C,h),w.prototype.nodeType=ne,r(w,h),P.prototype.nodeType=$,r(P,h),L.prototype.nodeType=z,r(L,h),O.prototype.nodeName="#document-fragment",O.prototype.nodeType=te,r(O,h),D.prototype.nodeType=J,r(D,h),U.prototype.serializeToString=function(e,t,n){return x.call(e,t,n)},h.prototype.toString=x;try{Object.defineProperty&&(Object.defineProperty(o.prototype,"length",{get:function(){return s(this),this.$$length}}),Object.defineProperty(h.prototype,"textContent",{get:function(){return j(this)},set:function(e){switch(this.nodeType){case Y:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),K=function(e,t,n){e["$$"+t]=n})}catch(e){}t.DOMImplementation=f,t.XMLSerializer=U},function(e,t,n){(function(e){(function(){var r,i=[].slice;r=n(271),t.allowUnsafeEval=function(t){var n;n=e.eval;try{return e.eval=function(e){return r.runInThisContext(e)},t()}finally{e.eval=n}},t.allowUnsafeNewFunction=function(n){var r;r=e.Function;try{return e.Function=t.Function,n()}finally{e.Function=r}},t.Function=function(){var e,t,n,a,o,s,u;for(n=2<=arguments.length?i.call(arguments,0,o=arguments.length-1):(o=0,[]),e=arguments[o++],a=[],s=0,u=n.length;s");if(v>0&&d.length>v+2){var g=d.charAt(v+2);"\n"!=g&&(m=d.slice(0,v+2)+"\n"+d.slice(v+2))}return{content:m,validation:[]}}catch(e){console.log(e)}return{content:e,validation:[]}},e.prototype.completeReference=function(e,t){try{var n=new f(y).parseFromString(e),r=[],i=p(n,"xs:schema")[0],a=p(i,"xs:element"),o=p(i,"xs:complexType");a.forEach(function(e){return r.push(e.getAttribute("name"))}),o.forEach(function(e){return r.push(e.getAttribute("name"))});var s=0===t.asString().trim().length;return s?r:r.filter(function(e){return 0===e.indexOf(t.asString())})}catch(e){return[]}},e}()}).call(t,n(43).Buffer)},function(e,t,n){e.exports=n(277)},function(e,t,n){(function(e){/*! +var s=/; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g,u=/^[\u0020-\u007e\u0080-\u00ff]+$/,l=/^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/,p=/\\([\u0000-\u007f])/g,c=/([\\"])/g,f=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,h=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,d=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;t.format=n,t.parse=r},function(e,t,n){"use strict";function r(e){for(var t=-1,n=e.lowLevel().children(),r=0;rl){var d=p-1;return d<0?null:(console.log("insert to node: "+d),s[d])}}}return null}for(var m=null,p=0;p=0&&(i=e.substring(0,o),a=e.substring(o+1));for(var s,u=!1,l=r,p=l.length;p>0;p--){var c=l[p-1],f=T.ramlFirstLine(c.contents()),h=f&&3==f.length&&f[2];if(h==L.universesInfo.Universe10.Library.name){if(u)break;u=!0}var d=c;if(i){d=null;var m=n.nsMap(c);if(m){var y=m[i];y&&(d=y.unit)}}if(d){var v=n.unitModel(d),g=v[t];if(P.ElementsCollection.isInstance(g)){if(s=g.getElement(a))break;if(1==p&&(h==L.universesInfo.Universe10.Extension.name||h==L.universesInfo.Universe10.Overlay.name)){var A=P.extendedUnit(c);A&&(p++,r[0]=A)}}}}return s}function g(e){var t=e.children().filter(function(e){var t=e.key();return t&&t.length>0&&"/"==t.charAt(0)});return t}function A(e){return e?"*/*"==e?null:(e.indexOf("/*")==e.length-2&&(e=e.substring(0,e.length-2)+"/xxx"),D.parse(e)):null}var E=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var _=n(4),T=n(55),S=n(21),N=n(15),I=n(199),b=n(218),R=n(16),M=n(219),C=n(223),w=n(206),P=n(224),L=n(56),O=n(205),D=(n(207),n(215)),U=n(225);t.expandTraitsAndResourceTypes=r,t.expandTraitsAndResourceTypesHL=i,t.expandLibraries=a,t.expandLibrary=o,t.expandLibrariesHL=s,t.expandLibraryHL=u,t.mergeAPIs=l;var x=function(){function e(){}return e.prototype.expandTraitsAndResourceTypes=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1),this.init(e);var r=e.lowLevel();if(!r)return e;if(r.actual().libExpanded)return e;var i=this.createHighLevelNode(e,!1,t);if(e.definition().key()==L.universesInfo.Universe10.Overlay)return i;var a=e.lowLevel().unit(),o=a.project().namespaceResolver().hasFragments(a),s=this.expandHighLevelNode(i,t,e,o);return s?s:e},e.prototype.init=function(e){var t=e.lowLevel(),n=T.ramlFirstLine(t.unit().contents());n&&n.length>=2&&"0.8"==n[1]?this.ramlVersion="RAML08":this.ramlVersion="RAML10";var r=t.children().filter(function(e){return e.key()==L.universesInfo.Universe10.Api.properties.mediaType.name});r.length>0&&(this.defaultMediaType=r[0].value());var i=e.lowLevel().unit(),a=i.project();a.setMainUnitPath(i.absolutePath()),this.namespaceResolver=a.namespaceResolver()},e.prototype.expandHighLevelNode=function(e,t,n,r){var i=this;void 0===r&&(r=!1),this.init(e),e.setMergeMode(n.getMergeMode());var a=!1,o=e.lowLevel();if(I.LowLevelCompositeNode.isInstance(o)){var s=g(o);s.forEach(function(e){return a=i.processResource(e)||a})}if(!a&&!r&&null==e.getMaster())return null;if(T.ASTNodeImpl.isInstance(e)){var u=e;null!=u.reusedNode()&&u.setReuseMode(!0)}return"RAML10"==this.ramlVersion&&(t=t||new C.ReferencePatcher,t.process(o),o.actual().referencePatcher=t),e},e.prototype.createHighLevelNode=function(e,t,n,r,i){void 0===t&&(t=!0),void 0===n&&(n=null),void 0===r&&(r=!1),void 0===i&&(i=!0),i&&this.init(e);for(var a=e,o=[],s=a;s;){var u,l=s.lowLevel(),c=T.ramlFirstLine(l.unit().contents());c&&(c.length<3||c[2]!=L.universesInfo.Universe10.Overlay.name)||r?(I.LowLevelCompositeNode.isInstance(l)&&(l=l.originalNode().originalNode()),u=new I.LowLevelCompositeNode(l,null,null,this.ramlVersion)):u=l;var f=s.definition(),h=new T.ASTNodeImpl(u,null,f,null);if(h.setUniverse(s.universe()),o.push(h),!t)break;R.find(l.children(),function(e){return e.key()==L.universesInfo.Universe10.Overlay.properties.extends.name});s=s.getMaster()}var d=o.pop();o=o.reverse();var m=a.getMergeMode(),y=p(d,o,m,n,r);return y.setReusedNode(a.reusedNode()),y},e.prototype.processResource=function(e,t){var n=this;void 0===t&&(t=[]);var r=!1,i=t.concat(e),a=this.collectResourceData(e,e,void 0,void 0,i);if(!I.LowLevelProxyNode.isInstance(e))return r;e.preserveAnnotations(),e.takeOnlyOriginalChildrenWithKey(L.universesInfo.Universe10.ResourceBase.properties.type.name),e.takeOnlyOriginalChildrenWithKey(L.universesInfo.Universe10.FragmentDeclaration.properties.uses.name),a.filter(function(e){return null!=e.resourceType}).forEach(function(t){var n=t.resourceType.node,i=t.resourceType.transformer;i.owner=e,e.adopt(n,i),r=!0});for(var o,s=e.children().filter(function(e){return y(e.key())}),u=function(){var e=c.key();c.takeOnlyOriginalChildrenWithKey(L.universesInfo.Universe10.FragmentDeclaration.properties.uses.name),o=[],a.forEach(function(t){var n=t.methodTraits[e];n&&(o=o.concat(n),n.forEach(function(e){var t=e.node,n=e.transformer;n.owner=c,c.adopt(t,n),r=!0}));var i=t.traits;i&&(o=o.concat(i),i.forEach(function(e){var t=e.node,n=e.transformer;n.owner=c,c.adopt(t,n),r=!0}))})},l=0,p=s;l0&&(s[f]=h)}}var d,m=R.find(t.children(),function(e){return e.key()==L.universesInfo.Universe10.ResourceBase.properties.type.name});if(null!=m){var v=c(i);m.valueKind()==S.Kind.SCALAR&&(m=_.createScalar(m.value())),d=this.readGenerictData(e,m,t,"resource type",r,v)}var g={resourceType:d,traits:o,methodTraits:s};if(n.push(g),d){var A=d.node,E=A.key()+"/"+A.unit().absolutePath();a[E]?g.resourceType=null:(a[E]=!0,this.collectResourceData(e,A,n,d.transformer,i,a))}return n},e.prototype.extractTraits=function(e,t,n,r){void 0===r&&(r={}),n=n.concat([e]);for(var i=[],a=-1;a>")){var o=e.substring(2,e.length-2),s=this.structuredParams[o];if(null!=s)return{value:s,errors:a}}for(var u=e,l=new V,p=0,c=u.indexOf("<<");c>=0;c=u.indexOf("<<",p)){l.append(u.substring(p,c));var f=c;if(c+="<<".length,p=this.paramUpperBound(u,c),p==-1)break;var h=u.substring(c,p);p+=">>".length;var d,y=u.substring(f,p),o=void 0,v=m(h);if(v.length>0){var g=h.indexOf("|");if(o=h.substring(0,g).trim(),d=this.scalarParamValues[o],d&&"string"==typeof d&&d.indexOf("<<")>=0&&this.vDelegate&&(d=this.vDelegate.transform(d,t,n,r).value),d){w.PatchedReference.isInstance(d)&&(d=d.value());for(var A=0,E=v;A=0&&this.vDelegate&&(d=this.vDelegate.transform(d,t,n,r).value);null!==d&&void 0!==d||(i[o]=!0,d=y),l.append(d)}return l.append(u.substring(p,u.length)),{value:l.value(),errors:a}}return{value:e,errors:a}},e.prototype.paramUpperBound=function(e,t){for(var n=0,r=t;r>",r)){if(0==n)return r;n--,r++}return e.length},e.prototype.children=function(e){var t=this.substitutionNode(e);return t?t.children():null},e.prototype.valueKind=function(e){var t=this.substitutionNode(e);return t?t.valueKind():null},e.prototype.anchorValueKind=function(e){var t=this.substitutionNode(e);return t&&t.valueKind()==S.Kind.ANCHOR_REF?t.anchorValueKind():null},e.prototype.resolvedValueKind=function(e){var t=this.substitutionNode(e);return t&&t.resolvedValueKind()},e.prototype.includePath=function(e){var t=this.substitutionNode(e);return t?t.includePath():null},e.prototype.substitutionNode=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1);var r=this.paramName(e,n),i=r&&(this.scalarParams[r]||this.structuredParams[r]);return i?(t.push(i),this.vDelegate?this.vDelegate.substitutionNode(i,t)||i:i):null},e.prototype.paramNodesChain=function(e,t){var n=[];return this.substitutionNode(C.toOriginal(e),n,t),n.length>0?n:null},e.prototype.paramName=function(e,t){var n;t?e.kind()==S.Kind.MAPPING&&(n=(""+e.key()).trim()):e.valueKind()==S.Kind.SCALAR&&(n=(""+e.value()).trim());var r;return n&&(N.stringStartsWith(n,"(")&&N.stringEndsWith(n,")")&&(n=n.substring(1,n.length-1)),N.stringStartsWith(n,"<<")&&N.stringEndsWith(n,">>")&&(r=n.substring(2,n.length-2))),r},e.prototype.definingUnitSequence=function(e){if(e.length<2)return null;if("("==e.charAt(0)&&")"==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),e.length<4)return null;if("<<"!=e.substring(0,2))return null;if(">>"!=e.substring(e.length-2,e.length))return null;var t=e.substring(2,e.length-2);return t.indexOf("<<")>=0||t.indexOf(">>")>=0?null:this._definingUnitSequence(t)},e.prototype._definingUnitSequence=function(e){return this.scalarParamValues&&this.scalarParamValues[e]?this.unitsChain:this.vDelegate?this.vDelegate._definingUnitSequence(e):null},e}();t.ValueTransformer=K;var j=function(e){function t(t,n,r){var i=e.call(this,null!=n?n.templateKind:"",null!=n?n.templateName:"",r)||this;return i.owner=t,i.delegate=n,i}return E(t,e),t.prototype.transform=function(t,n,r,i){if(null==t||null!=r&&!r())return{value:t,errors:[]};var a={value:t,errors:[]},o=!1;H.forEach(function(e){return o=o||t.toString().indexOf("<<"+e)>=0}),o&&(this.initParams(),a=e.prototype.transform.call(this,t,n,r,i));var s=null!=this.delegate?this.delegate.transform(a.value,n,r,i):a.value;return null!=r&&r()&&null!=i&&(s.value=i(s.value,this)),s},t.prototype.initParams=function(){for(var e,t,n="",r=this.owner,i=r,a=null;i;){var o=i.key();if(null!=o)if(N.stringStartsWith(o,"/")){if(!t)for(var s=o.split("/"),u=s.length-1;u>=0;u--){var l=s[u];if(l.indexOf("{")==-1){t=s[u];break}l.length>0&&(a=l)}n=o+n}else e=o;i=i.parent()}t||a&&(t=""),this.scalarParamValues={resourcePath:n,resourcePathName:t},e&&(this.scalarParamValues.methodName=e)},t.prototype.children=function(e){return null!=this.delegate?this.delegate.children(e):null},t.prototype.valueKind=function(e){return null!=this.delegate?this.delegate.valueKind(e):null},t.prototype.includePath=function(e){return null!=this.delegate?this.delegate.includePath(e):null},t.prototype.anchorValueKind=function(e){return null!=this.delegate?this.delegate.anchorValueKind(e):null},t.prototype.resolvedValueKind=function(e){return null!=this.delegate?this.delegate.resolvedValueKind(e):null},t.prototype.substitutionNode=function(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=!1),this.delegate?this.delegate.substitutionNode(e,t,n):null},t.prototype._definingUnitSequence=function(e){return this.scalarParamValues&&this.scalarParamValues[e]?this.unitsChain:this.delegate?this.delegate._definingUnitSequence(e):null},t}(K);t.DefaultTransformer=j;var W,H=["resourcePath","resourcePathName","methodName"];t.isPossibleMethodName=y;var Y={};Y[L.universesInfo.Universe10.TypeDeclaration.properties.type.name]=!0,Y[L.universesInfo.Universe10.TypeDeclaration.properties.example.name]=!0,Y[L.universesInfo.Universe08.BodyLike.properties.schema.name]=!0,Y[L.universesInfo.Universe10.ObjectTypeDeclaration.properties.properties.name]=!0,t.parseMediaType=A},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){function e(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function t(e,t){return e===t?t:e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function n(e,t){return e.replace(/\$(\d{1,2})/g,function(e,n){return t[n]||""})}function r(e,r){return e.replace(r[0],function(i,a){var o=n(r[1],arguments);return""===i?t(e[a-1],o):t(i,o)})}function i(e,t,n){if(!e.length||p.hasOwnProperty(e))return t;for(var i=n.length;i--;){var a=n[i];if(a[0].test(t))return r(t,a)}return t}function a(e,n,r){return function(a){var o=a.toLowerCase();return n.hasOwnProperty(o)?t(a,o):e.hasOwnProperty(o)?t(a,e[o]):i(o,a,r)}}function o(e,t,n,r){return function(r){var a=r.toLowerCase();return!!t.hasOwnProperty(a)||!e.hasOwnProperty(a)&&i(a,a,n)===a}}function s(e,t,n){var r=1===t?s.singular(e):s.plural(e);return(n?t+" ":"")+r}var u=[],l=[],p={},c={},f={};return s.plural=a(f,c,u),s.isPlural=o(f,c,u),s.singular=a(c,f,l),s.isSingular=o(c,f,l),s.addPluralRule=function(t,n){u.push([e(t),n])},s.addSingularRule=function(t,n){l.push([e(t),n])},s.addUncountableRule=function(e){return"string"==typeof e?void(p[e.toLowerCase()]=!0):(s.addPluralRule(e,"$0"),void s.addSingularRule(e,"$0"))},s.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),f[e]=t,c[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["whiskey","whiskies"]].forEach(function(e){return s.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|tlas|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/(m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return s.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/(m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i,"$1"],[/(analy|ba|diagno|parenthe|progno|synop|the|empha|cri)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return s.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","alcohol","ammo","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","flounder","fun","gallows","garbage","graffiti","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","manga","news","pike","plankton","pliers","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","species","staff","swine","tennis","traffic","transporation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(s.addUncountableRule),s})},function(e,t,n){"use strict";function r(e){var t=e.value();if("string"==typeof t||null==t){ +var n=f.createNode(t,null,e.lowLevel().unit());n._actualNode().startPosition=e.lowLevel().valueStart(),n._actualNode().endPosition=e.lowLevel().valueEnd();var r=new c.StructuredValue(n,e.parent(),e.property());return r}return t}function i(e){var t=e._meta;t.resetPrimitiveValuesMeta();var n=e.highLevel();return n.definition().allProperties().forEach(function(r){var i=r.nameId(),a=n.attributes(i),o=!1,s=!1;if(a.forEach(function(e){o=o||null!=e.value(),s=s||e.optional()}),!o){var u=e.getDefaultsCalculator(),l=u.attributeDefaultIfEnabled(n,r);if(null!=l){var p=u.insertionKind(n,r);p==h.InsertionKind.CALCULATED?t.registerCalculatedValue(i):p==h.InsertionKind.BY_DEFAULT&&t.registerInsertedAsDefaultValue(i)}}}),t}function a(e,t){return t?e.map(function(e){return t(e)}):e.map(function(e){return e.value()})}function o(e){var t=[],n=e.errors();null!=n&&(t=t.concat(n));var r=t.map(function(t){return u(e,t)}),i=s(r);return i}function s(e){var t=[],n={};e.map(function(e){n[JSON.stringify(e)]=e});for(var r=Object.keys(n),i=0;i0&&(s.trace=t.extras.map(function(t){return u(e,t)})),s}function l(e){if(e.isScalar())return!0;for(var t=e.allSuperTypes().filter(function(e){return e.isUnion()||e.isIntersection()}),n=0,r=t;n0?new _(e[0]):null}return new _(this.node)},e.prototype.values=function(){return this.isArray()?this.node.children().map(function(e){return new _(e)}):[new _(this.node)]},e.prototype.isArray=function(){var e=this.node.children();if(e.length>0&&null==e[0].key())return!0;var t=this.node.highLevelNode();if(t){var n=t.property();if(n){var r=n.range();if(r)return r.isArray()}}return this.node.valueKind()==v.Kind.SEQ},e.CLASS_IDENTIFIER="parserCore.TypeInstancePropertyImpl",e}();t.TypeInstancePropertyImpl=T;var S=function(){function e(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1),this._insertedAsDefault=e,this._calculated=t,this._optional=n}return e.prototype.calculated=function(){return this._calculated},e.prototype.insertedAsDefault=function(){return this._insertedAsDefault},e.prototype.setCalculated=function(){this._calculated=!0},e.prototype.setInsertedAsDefault=function(){this._insertedAsDefault=!0},e.prototype.setOptional=function(){this._optional=!0},e.prototype.optional=function(){return this._optional},e.prototype.isDefault=function(){return!(this._insertedAsDefault||this._calculated||this._optional)},e.prototype.toJSON=function(){var e={};return this._calculated&&(e.calculated=!0),this._insertedAsDefault&&(e.insertedAsDefault=!0),this._optional&&(e.optional=!0),e},e}();t.ValueMetadataImpl=S;var N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.valuesMeta={},t}return p(t,e),t.prototype.primitiveValuesMeta=function(){return this.valuesMeta},t.prototype.registerInsertedAsDefaultValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new S(!0):t.setInsertedAsDefault()},t.prototype.registerCalculatedValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new S(!1,!0):t.setCalculated()},t.prototype.registerOptionalValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new S(!1,!1,!0):t.setOptional()},t.prototype.resetPrimitiveValuesMeta=function(){this.valuesMeta={}},t.prototype.isDefault=function(){return!!e.prototype.isDefault.call(this)&&0==Object.keys(this.valuesMeta).length},t.prototype.toJSON=function(){var t=this,n=e.prototype.toJSON.call(this),r={},i=Object.keys(this.valuesMeta);return i.length>0&&(i.forEach(function(e){var n=t.valuesMeta[e].toJSON();Object.keys(n).length>0&&(r[e]=n)}),n.primitiveValuesMeta=r),n},t}(S);t.NodeMetadataImpl=N,t.fillElementMeta=i,t.attributesToValues=a,t.errors=o,t.filterErrors=s,t.basicError=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(56),i=n(204),a=n(205),o=r,s=n(209),u=function(){function e(e,t){void 0===t&&(t=!1),this.enabled=e,this.toHighLevel=t,this.unconditionalValueCalculators=[new v],this.valueCalculators=[new h,new f,new c,new p,new d(this.toHighLevel),new m,new y]}return e.prototype.attributeDefaultIfEnabled=function(e,t){return this.enabled?this.getAttributeDefault(e,t):this.getUnconditionalAttributeDefault(t,e)},e.prototype.getUnconditionalAttributeDefault=function(e,t){if(!t||!e)return null;for(var n=0;n0?n:null},e.prototype.matches=function(e,t){var n=t.definition();return null!=n&&a.isSecuredByProperty(e)},e.prototype.kind=function(e,t){return l.CALCULATED},e}(),m=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n,r=t.attr(i.Universe10.Api.properties.baseUri.name);if(r){var o=r.value();if(o&&"string"==typeof o){var s=o.indexOf("://");s>=0&&(n=[o.substring(0,s).toUpperCase()]),n||(n=["HTTP"])}}return n},e.prototype.matches=function(e,t){if(!a.isProtocolsProperty(e))return!1;var n=t.definition(),r=!1;if(a.isApiSibling(n))r=!0;else if(a.isResourceType(n))r=!0;else if(a.isMethodType(n)){var i=t.parent();r=i&&a.isResourceType(i.definition())}return r},e.prototype.kind=function(e,t){return l.CALCULATED},e}(),y=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n=t.attr(i.Universe10.Api.properties.version.name);if(n){var r=n.value();if(r&&r.trim())return[r]}return null},e.prototype.matches=function(e,t){if(!a.isEnumProperty(e))return!1;var n=t.property();if(!n)return!1;if(!a.isBaseUriParametersProperty(n))return!1;var r=t.attr(i.Universe10.TypeDeclaration.properties.name.name),o=r&&r.value();return"version"==o},e.prototype.kind=function(e,t){return l.CALCULATED},e}(),v=function(){function e(){}return e.prototype.calculate=function(e,t){var n=t.definition();if(null==n)return null;var r=n.getAdapter(o.RAMLService);if(null==r)return null;var i=r.getKeyProp();if(null==i)return null;var a=t.attr(i.nameId());return null==a?null:!a.optional()&&null},e.prototype.matches=function(e,t){return a.isRequiredProperty(e)},e.prototype.kind=function(e,t){return l.BY_DEFAULT},e}()},function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=!0),new _({rootNodeDetails:!0,serializeMetadata:t}).dump(e)}function i(e){if(e.properties().length)return!1;if(e.annotations().length)return!1;if(e.facets().length)return!1;var t=e.fixedFacets();if(t&&Object.keys(t).length)return!1;var n=e.fixedBuiltInFacets();return(!n||!Object.keys(n).length)&&!e.description()}function a(e){if(!e.parent())return!0;if(e.lowLevel().libProcessed)return!1;if(!m.isLibraryType(e.root().definition()))return!1;var t=e.lowLevel().includePath();if(null==t)return!1;var n=e.lowLevel().unit().resolve(t);return!(!n||!n.contents().startsWith("#%RAML"))}var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var s=n(204),u=n(219),l=n(199),p=n(56),c=p.tsInterfaces,f=n(21),h=n(55),d=n(208),m=n(205),y=n(204),v=n(15),g=n(16),A=n(222),E=n(6);t.dump=r;var _=function(){function e(e){this.options=e,this.nodeTransformers=[new q,new K,new j,new $,new R,new U,new x,new X,new L,new O,new W,new H,new k,new z,new G],this.nodePropertyTransformers=[new b,new M,new C,new P,new w,new D,new Y],this.ignore=new S([new T(m.isResponseType,m.isDisplayNameProperty),new T(m.isApiSibling,m.isDisplayNameProperty),new T(m.isAnnotationRefTypeOrDescendant,m.isAnnotationProperty),new T(m.isSecuritySchemeRefType,m.isSecuritySchemeProperty),new T(m.isTraitRefType,m.isTraitProperty),new T(m.isResourceTypeRefType,m.isResourceTypeProperty),new T(m.isApiSibling,m.isRAMLVersionProperty),new T(m.isTypeDeclarationDescendant,m.isStructuredItemsProperty)]),this.missingProperties=new J,this.options=this.options||{},null==this.options.serializeMetadata&&(this.options.serializeMetadata=!0)}return e.prototype.printMissingProperties=function(){return this.missingProperties.print()},e.prototype.dump=function(e){var t=e.highLevel(),n=t&&t.parent(),r=!n&&this.options.rootNodeDetails,i=this.dumpInternal(e,r,!0);return i},e.prototype.dumpInternal=function(e,t,n,r){var i=this;if(void 0===t&&(t=!1),void 0===n&&(n=!1),null==e)return null;if(u.BasicNodeImpl.isInstance(e)){var o={},l=e,c=l.highLevel().definition();c.allProperties().filter(function(e){return!i.ignore.match(l.definition(),e)&&!(!n&&"uses"==e.nameId()&&!a(l.highLevel()))}).forEach(function(e){o[e.nameId()]=e}),c.allCustomProperties().filter(function(e){return!i.ignore.match(l.definition(),e)}).forEach(function(e){o[e.nameId()]=e});var f=this.dumpProperties(o,e);if(o.schema&&this.options.dumpSchemaContents&&o.schema.range().key()==y.Universe08.SchemaString){var d=l.highLevel().root().elementsOfKind("schemas");d.forEach(function(e){if(e.name()==f.schema){var t=e.attr("value");t&&(f.schema=t.value(),f.schemaContent=t.value())}})}if(this.serializeScalarsAnnotations(f,l,o),this.serializeMeta(f,l),this.canBeFragment(e)&&A.isFragment(e)){var v=A.asFragment(e),g=v.uses();g.length>0&&(f.uses=g.map(function(e){return e.toJSON()}))}if(m.isTypeDeclarationDescendant(c)){var E=l.highLevel().property();if(E&&!(m.isHeadersProperty(E)||m.isQueryParametersProperty(E)||m.isUriParametersProperty(E)||m.isPropertiesProperty(E)||m.isBaseUriParametersProperty(E))){delete f.required;var _=f.__METADATA__;if(_){var T=_.primitiveValuesMeta;T&&delete T.required}}}if(this.options.sourceMap&&"object"==typeof f){var S=h.actualPath(e.highLevel());e.highLevel().lowLevel()&&e.highLevel().lowLevel().actual()&&e.highLevel().lowLevel().actual().actualPath&&(S=e.highLevel().lowLevel().actual().actualPath);var N=f.sourceMap;N||(N={},f.sourceMap=N),N.path||(N.path=S)}this.nodeTransformers.forEach(function(t){t.match(e,r||e.highLevel().property())&&(f=t.transform(f,e))});var I={};if(t){if(c){var b=c.universe(),R=b.version();I.ramlVersion=R;var M=c.nameId();if(!M&&c.isAssignableFrom(p.universesInfo.Universe10.TypeDeclaration.name)){var C=b.type(p.universesInfo.Universe10.TypeDeclaration.name),w={};C.allSubTypes().forEach(function(e){return w[e.nameId()]=!0});for(var P=0,L=c.allSuperTypes();P0});return r.length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):null==t.range.start?1:null==e.range.start?-1:e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.stringLooksLikeXML=function(e){return"<"===e[0]&&">"===e[e.length-1]},e.prototype.stringLooksLikeJSON=function(e){return"{"===e[0]&&"}"===e[e.length-1]},e.prototype.dumpProperties=function(e,t){var n,r=this,a={};t.highLevel().isElement()&&(n=t.highLevel().definition());var o={};if(Object.keys(e).forEach(function(l){var y;if(n&&(y=n.property(l),y||(y=g.find(n.allCustomProperties(),function(e){return e.nameId()==l}))),!t[l])return void r.missingProperties.addProperty(e[l],t.kind());var v=e[l],A=t[l](),_=A;if(_&&"structuredType"==l&&"object"==typeof _){_=null;var T=t.highLevel(),S=T.lowLevel();S.children().forEach(function(e){if("type"==e.key()||"schema"==e.key()){var t=T.definition().universe().type(s.Universe10.TypeDeclaration.name),n=T.definition().universe().type(s.Universe10.TypeDeclaration.name),i=new h.ASTNodeImpl(e,T,t,n.property(e.key()));i.patchType(d.doDescrimination(i)),_=r.dumpInternal(i.wrapperNode(),!1,!1,y),l=e.key()}})}else if("items"==l&&"object"==typeof _){var N=Array.isArray(_),I=!N;if(N&&(I=null!=g.find(_,function(e){return"object"==typeof e})),I){_=null;var T=t.highLevel(),S=T.lowLevel();S.children().forEach(function(e){if("items"==e.key()){var t,n=T.definition().universe().type(s.Universe10.TypeDeclaration.name),a=T.definition().universe().type(s.Universe10.ArrayTypeDeclaration.name),o=void 0,u=e,p=void 0;do if(t=!0,o=new h.ASTNodeImpl(u,T,n,a.property(s.Universe10.ArrayTypeDeclaration.properties.items.name)),p=o.localType(),p&&i(p)&&1==p.superTypes().length){var m=u.children().filter(function(e){return"type"==e.key()});if(1==m.length){if(m[0].resolvedValueKind()==f.Kind.SCALAR){_=m[0].value();break}u=m[0],t=!1}}while(!t);null==_&&(o.patchType(d.doDescrimination(o)),_=r.dumpInternal(o.wrapperNode(),!1,!1,y)),p.getExtra(c.TOP_LEVEL_EXTRA)&&"object"==typeof _&&!Array.isArray(_)&&(_=_.type),Array.isArray(_)&&1==_.length&&(_=_[0]),l=e.key()}})}}var b=Array.isArray(_)?_.length>0:null!=_;if(n&&n.isAssignableFrom("TypeDeclaration")&&("type"===l||"schema"==l)&&b)if(Array.isArray(_)){var R=_.length>0?_[0]:null;if(null==R){var M=t.getDefaultsCalculator();if(M){var C=p.getUniverse("RAML10").type("TypeDeclaration").property("type");R=M.attributeDefaultIfEnabled(t.highLevel().asElement(),C)}_[0]=R}var T=t.highLevel(),w=T.localType(),P=!1,L=!1;if(w&&w.hasExternalInHierarchy()){var O=R.trim();P="{"===O[0]&&"}"===O[O.length-1],L="<"===O[0]&&">"===O[O.length-1]}P?a.typePropertyKind="JSON":L?a.typePropertyKind="XML":a.typePropertyKind="TYPE_EXPRESSION"}else"object"==typeof _&&(a.typePropertyKind="INPLACE");if(("type"===l||"schema"==l)&&_&&_.forEach&&"string"==typeof _[0]){var O=_[0].trim(),D=r.stringLooksLikeJSON(O),U=r.stringLooksLikeXML(O);if(D||U){var x=t.highLevel().lowLevel().includePath&&t.highLevel().lowLevel().includePath();if(!x&&t.highLevel().isElement()){var k=t.highLevel().asElement().attr("type");k||(k=t.highLevel().asElement().attr("schema")),k&&(x=k.lowLevel().includePath&&k.lowLevel().includePath())}if(x){var F=x.indexOf("#"),B="";F>=0&&(B=x.substring(F),x=x.substring(0,F));var V,K=t.highLevel().lowLevel().unit().resolve(x).absolutePath();V=0===K.indexOf("http://")||0===K.indexOf("https://")?K:E.relative(t.highLevel().lowLevel().unit().project().getRootPath(),K),V=V.replace(/\\/g,"/");var j=V+B;if(a.schemaPath=j,r.options.sourceMap){var W=a.sourceMap;W||(W={},a.sourceMap=W),W.path=j}}}}if((_||"type"!=l)&&(_||"schema"!=l)&&(_||"items"!=l)){if(t.definition&&m.isTypeDeclarationDescendant(t.definition())&&m.isTypeProperty(v)){var H=t[s.Universe10.TypeDeclaration.properties.schema.name]();if(null!=H&&(!Array.isArray(H)||0!=H.length))return;var T=t.highLevel(),S=T.lowLevel(),Y=!1;if(S.children().forEach(function(e){if("schema"==e.key())return void(Y=!0)}),Y)return}if(Array.isArray(_)){for(var q=[],G=0,X=_;G0&&(o[l]=ee.map(function(e){return{path:e}}))}}else{var z=r.dumpInternal(_);if(u.TypeInstanceImpl.isInstance(_))return void(a[l]=z);if(null==z&&u.BasicNodeImpl.isInstance(t)&&!r.isDefined(t,l))return;if(u.BasicNodeImpl.isInstance(t)&&r.nodePropertyTransformers.forEach(function(e){e.match(t,v)&&(z=e.transform(z,t))}),a[l]=z,"example"===l&&r.options&&r.options.dumpXMLRepresentationOfExamples&&_.expandable&&_.expandable._owner&&(z.asXMLString=_.expandable.asXMLString()),A&&e[l].isValueProperty()){var oe=Array.isArray(A)?A[0]:A;if(u.AttributeNodeImpl.isInstance(oe)){var ie=oe.highLevel();if(!ie.isFromKey()){var ae=h.actualPath(ie,!0);ae&&(o[l]=[{path:ae}])}}}}}}),this.options.sourceMap&&Object.keys(o).length>0){var l=a.sourceMap;l||(l={},a.sourceMap=l),l.scalarsSources=o}return a},e.prototype.serializeScalarsAnnotations=function(e,t,n){var r=this;if(t.scalarsAnnotations){for(var i={},a=t.scalarsAnnotations(),o=0,s=Object.keys(n);o0)if(Array.isArray(l[0])){var p=[];l.forEach(function(e,t){p.push(e.map(function(e){return r.dumpInternal(e)}))}),p.filter(function(e){return e.length>0}).length>0&&(i[u]=p)}else i[u]=l.map(function(e){return r.dumpInternal(e)})}}Object.keys(i).length>0&&(e.scalarsAnnotations=i)}},e.prototype.serializeMeta=function(e,t){if(this.options.serializeMetadata){var n=t.meta();n.isDefault()||(e.__METADATA__=n.toJSON())}},e.prototype.serializeTypeInstance=function(e){var t=this;if(e.isScalar())return e.value();if(e.isArray())return e.items().map(function(e){return t.serializeTypeInstance(e)});var n=e.properties();if(0==n.length)return null;var r={};return n.forEach(function(e){return r[e.name()]=t.serializeTypeInstanceProperty(e)}),r},e.prototype.serializeTypeInstanceProperty=function(e){var t=this;if(e.isArray()){var n=e.values(),r=[];return n.forEach(function(e){return r.push(t.serializeTypeInstance(e))}),r}return this.serializeTypeInstance(e.value())},e.prototype.isDefined=function(e,t){var n=e.highLevel();return n.elementsOfKind(t).length>0||n.attributes(t).length>0},e}();t.JsonSerializer=_;var T=function(){function e(e,t){this.typeMatcher=e,this.propMatcher=t}return e.prototype.match=function(e,t){return(null==e||this.typeMatcher(e))&&(null==t||this.propMatcher(t))},e}(),S=function(){function e(e){this.matchers=e}return e.prototype.match=function(e,t){for(var n=this.matchers.length,r=0;r0&&e[0][this.propName]){var n={};return e.forEach(function(e){var r=e[t.propName],i=n[r];i?Array.isArray(i)?i.push(e):n[r]=[i,e]:n[r]=e}),n}return e},e}(),I=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return this.matcher.match(e.definition?e.definition():null,t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e[this.propName]]=e, +t},e}(),b=function(e){function t(){return e.call(this,new S([new T(m.isApiSibling,m.isBaseUriParametersProperty),new T(m.isResourceBaseSibling,m.isUriParametersProperty),new T(m.isResourceBaseSibling,m.isQueryParametersProperty),new T(m.isTraitType,m.isQueryParametersProperty),new T(m.isMethodType,m.isQueryParametersProperty),new T(m.isSecuritySchemePartType,m.isQueryParametersProperty),new T(m.isTraitType,m.isHeadersProperty),new T(m.isMethodType,m.isHeadersProperty),new T(m.isSecuritySchemePartType,m.isHeadersProperty),new T(m.isResponseType,m.isHeadersProperty),new T(m.isBodyLikeType,m.isFormParametersProperty)]),"name")||this}return o(t,e),t}(N),R=function(e){function t(){return e.call(this,new S([new T(m.isLibraryBaseSibling,m.isTypesProperty),new T(function(e){return m.isLibraryBaseSibling(e)&&m.isRAML10Type(e)},m.isSchemasProperty)]),"name")||this}return o(t,e),t.prototype.match=function(e,t){var n=null!=e.parent()&&this.matcher.match(e.parent().definition(),t);return!!n},t}(I),M=(function(e){function t(){return e.call(this,new S([new T(m.isLibraryBaseSibling,m.isUsesProperty)]),"name")||this}return o(t,e),t}(N),function(e){function t(){return e.call(this,new S([new T(m.isObjectTypeDeclarationSibling,m.isPropertiesProperty)]),"name")||this}return o(t,e),t}(N)),C=function(e){function t(){return e.call(this,new S([new T(m.isMethodBaseSibling,m.isResponsesProperty)]),"code")||this}return o(t,e),t}(N),w=function(e){function t(){return e.call(this,new S([new T(function(e){return!0},m.isAnnotationsProperty)]),"name")||this}return o(t,e),t}(N),P=function(e){function t(){return e.call(this,new S([new T(m.isResponseType,m.isBodyProperty),new T(m.isMethodBaseSibling,m.isBodyProperty)]),"name")||this}return o(t,e),t}(N),L=function(e){function t(){return e.call(this,new S([new T(m.isTraitType,m.isTraitsProperty)]),"name")||this}return o(t,e),t}(I),O=function(e){function t(){return e.call(this,new S([new T(m.isResourceTypeType,m.isResourceTypesProperty)]),"name")||this}return o(t,e),t.prototype.transform=function(t){var n=y.Universe10.ResourceBase.properties.methods.name;if(Array.isArray(t))return t;var r=t[n];return r&&r.forEach(function(e){var n=Object.keys(e);if(n.length>0){var r=n[0];t[r]=e[r]}}),delete t[n],e.prototype.transform.call(this,t)},t}(I),D=function(e){function t(){return e.call(this,new S([new T(m.isTypeDeclarationSibling,m.isFacetsProperty)]),"name")||this}return o(t,e),t}(N),U=function(e){function t(){return e.call(this,null,"name")||this}return o(t,e),t.prototype.match=function(e,t){return null!=t&&m.isSecuritySchemesProperty(t)},t}(I),x=function(e){function t(){return e.call(this,new S([new T(m.isLibraryBaseSibling,m.isAnnotationTypesProperty)]),"name")||this}return o(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},t}(I),k=function(e){function t(){return e.call(this,null,"method")||this}return o(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&m.isResourceTypeType(e.parent().definition())&&m.isMethodsProperty(t)},t}(I),F=s.Universe10.ExampleSpec.properties.name.name,B=s.Universe10.ExampleSpec.properties.value.name,V="structuredContent",K=(function(){function e(){}return e.prototype.match=function(e,t){return m.isExampleSpecType(e.definition())},e.prototype.transform=function(e){var t=this;if(Array.isArray(e)&&e.length>0){if(e[0][F]){var n={};return e.forEach(function(e){return n[e[F]]=t.getActualExample(e)}),n}var r=e.map(function(e){return t.getActualExample(e)});return r}return e},e.prototype.getActualExample=function(e){return e[V]?e[V]:e[B]},e}(),function(){function e(){}return e.prototype.match=function(e,t){return e.definition&&m.isTypeDeclarationSibling(e.definition())},e.prototype.transform=function(e){var t=Array.isArray(e),n=t?e:[e];return n.forEach(function(e){var t=e.example;t&&(e.example=t.structuredValue,e.structuredExample=t)}),t?n:n[0]},e}()),j=function(){function e(){}return e.prototype.match=function(e,t){return e.definition&&m.isTypeDeclarationSibling(e.definition())},e.prototype.transform=function(e,t){var n=t.highLevel();if(null==n||!n.isElement())return e;var r=n.asElement(),i=s.Universe10.TypeDeclaration.properties.default.name,a=r.attr(i);if(null==a||null!=a.value())return e;var o=Array.isArray(e),u=o?e:[e];return u.forEach(function(e){if(null==e[i]){var t=a.lowLevel().dumpToObject();"object"==typeof t&&t.hasOwnProperty(i)?e[i]=t[i]:e[i]=t}}),o?u:u[0]},e}(),W=function(){function e(){this.matcher=new T(function(e){return m.isApiType(e)&&m.isRAML08Type(e)},m.isSchemasProperty)}return e.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e.key]=e.value,e.sourceMap&&e.sourceMap.path&&(t.sourceMap={path:e.sourceMap.path}),t},e.prototype.getActualExample=function(e){return e[V]?e[V]:e[B]},e}(),H=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&m.isProtocolsProperty(t)},e.prototype.transform=function(e){return"string"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},e}(),Y=function(){function e(){this.usecases=new S([new T(m.isApiSibling,m.isMediaTypeProperty)])}return e.prototype.match=function(e,t){return this.usecases.match(e.definition(),t)},e.prototype.transform=function(e){return Array.isArray(e)&&1==e.length?e[0]:e},e}(),q=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&m.isResourcesProperty(t)},e.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[y.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split("/");r.length>0&&0==r[0].length;)r.shift();e.relativeUriPathSegments=r,e.absoluteUri=t.absoluteUri()}return e},e}(),G=function(){function e(){}return e.prototype.match=function(e,t){return!(!e.parent()||!e.parent().highLevel().lowLevel().libProcessed)&&(m.isAnnotationTypesProperty(t)||m.isTypesProperty(t)||m.isResourceTypesProperty(t)||m.isTraitsProperty(t)||m.isSecuritySchemesProperty(t))},e.prototype.transform=function(e,t){for(var n=t.highLevel().lowLevel(),r=n.key(),i=n;l.LowLevelProxyNode.isInstance(i);)i=i.originalNode();var a=i.key(),o=e[Object.keys(e)[0]];return o.name=a,o.displayName==r&&(o.displayName=a),e},e}(),X=function(){function e(){}return e.prototype.match=function(e,t){var n=e.highLevel();if(!n)return!1;var r=n.definition();return!!r&&(m.isResourceTypeType(r)||m.isTraitType(r)||m.isMethodType(r)||m.isResponseType(r)||m.isParameterDescendant(r)||m.isBodyLikeType(r)||m.isTypeDeclarationDescendant(r))},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t=s.Universe10.Trait.properties.parametrizedProperties.name,n=e[t];return n&&(Object.keys(n).forEach(function(t){e[t]=n[t]}),delete e[t]),e},e}(),z=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&(m.isSecuredByProperty(t)||m.isIsProperty(t)||null!=e.parent()&&(m.isResourceType(e.parent().highLevel().definition())||m.isResourceTypeType(e.parent().highLevel().definition()))&&m.isTypeProperty(t))},e.prototype.transform=function(e){return e?Array.isArray(e)?e:this.toSimpleValue(e):null},e.prototype.toSimpleValue=function(e){var t=e.name,n=e.structuredValue;if(n){var r={};return r[t]=n,r}return t},e}(),$=function(){function e(){}return e.prototype.match=function(e,t){if(!u.BasicNodeImpl.isInstance(e))return!1;var n=e.highLevel(),r=n.definition();if(!m.isTypeDeclarationDescendant(r))return!1;var i=n.localType();return!(!i||!i.isArray())},e.prototype.transform=function(e){var t=y.Universe10.TypeDeclaration.properties.type.name,n=y.Universe10.TypeDeclaration.properties.schema.name,r=y.Universe10.ArrayTypeDeclaration.properties.items.name,i=e[t];return i||(i=e[n]),1==i.length&&v.stringEndsWith(i[0],"[]")&&(null==e[r]&&(e[r]=i[0].substring(0,i[0].length-2)),i[0]="array"),e},e}(),J=function(){function e(){this.map={}}return e.prototype.addProperty=function(e,t){var n=this.map[t];n||(n=new Q(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return Object.keys(this.map).map(function(t){return e.map[t].print()}).join("\n")+"\n"},e}(),Q=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.domain().nameId(),n=this.map[t];n||(n=new Z(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return this.typeName+":\n"+Object.keys(this.map).map(function(t){return" "+e.map[t].print()}).join("\n")},e}(),Z=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.nameId();this.map[t]=e},e.prototype.print=function(){return this.typeName+": "+Object.keys(this.map).sort().join(", ")},e}();t.isEmpty=i},function(e,t){"use strict";function n(e){return"Api"==e.kind()&&"RAML10"==e.RAMLVersion()}function r(e){return"LibraryBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function i(e){return"Annotable"==e.kind()&&"RAML10"==e.RAMLVersion()}function a(e){return"AnnotationRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function o(e){return"Reference"==e.kind()&&"RAML10"==e.RAMLVersion()}function s(e){return"ValueType"==e.kind()&&"RAML10"==e.RAMLVersion()}function u(e){return"StringType"==e.kind()&&"RAML10"==e.RAMLVersion()}function l(e){return"UriTemplate"==e.kind()&&"RAML10"==e.RAMLVersion()}function p(e){return"RelativeUriString"==e.kind()&&"RAML10"==e.RAMLVersion()}function c(e){return"FullUriTemplateString"==e.kind()&&"RAML10"==e.RAMLVersion()}function f(e){return"StatusCodeString"==e.kind()&&"RAML10"==e.RAMLVersion()}function h(e){return"FixedUriString"==e.kind()&&"RAML10"==e.RAMLVersion()}function d(e){return"ContentType"==e.kind()&&"RAML10"==e.RAMLVersion()}function m(e){return"MarkdownString"==e.kind()&&"RAML10"==e.RAMLVersion()}function y(e){return"SchemaString"==e.kind()&&"RAML10"==e.RAMLVersion()}function v(e){return"MimeType"==e.kind()&&"RAML10"==e.RAMLVersion()}function g(e){return"AnyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function A(e){return"NumberType"==e.kind()&&"RAML10"==e.RAMLVersion()}function E(e){return"IntegerType"==e.kind()&&"RAML10"==e.RAMLVersion()}function _(e){return"NullType"==e.kind()&&"RAML10"==e.RAMLVersion()}function T(e){return"TimeOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function S(e){return"DateOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function N(e){return"DateTimeOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function I(e){return"DateTimeType"==e.kind()&&"RAML10"==e.RAMLVersion()}function b(e){return"FileType"==e.kind()&&"RAML10"==e.RAMLVersion()}function R(e){return"BooleanType"==e.kind()&&"RAML10"==e.RAMLVersion()}function M(e){return"AnnotationTarget"==e.kind()&&"RAML10"==e.RAMLVersion()}function C(e){return"TraitRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function w(e){return"Trait"==e.kind()&&"RAML10"==e.RAMLVersion()}function P(e){return"MethodBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function L(e){return"Operation"==e.kind()&&"RAML10"==e.RAMLVersion()}function O(e){return"TypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function D(e){return"ModelLocation"==e.kind()&&"RAML10"==e.RAMLVersion()}function U(e){return"LocationKind"==e.kind()&&"RAML10"==e.RAMLVersion()}function x(e){return"ExampleSpec"==e.kind()&&"RAML10"==e.RAMLVersion()}function k(e){return"UsesDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function F(e){return"XMLFacetInfo"==e.kind()&&"RAML10"==e.RAMLVersion()}function B(e){return"ArrayTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function V(e){return"UnionTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function K(e){return"ObjectTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function j(e){return"StringTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function W(e){return"BooleanTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function H(e){return"NumberTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function Y(e){return"IntegerTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function q(e){return"DateOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function G(e){return"TimeOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function X(e){return"DateTimeOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function z(e){return"DateTimeTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function $(e){return"FileTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function J(e){return"Response"==e.kind()&&"RAML10"==e.RAMLVersion()}function Q(e){return"SecuritySchemePart"==e.kind()&&"RAML10"==e.RAMLVersion()}function Z(e){return"SecuritySchemeRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function ee(e){return"AbstractSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function te(e){return"SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function ne(e){return"OAuth1SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function re(e){return"OAuth2SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function ie(e){return"OAuth2SecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function ae(e){return"OAuth1SecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function oe(e){return"PassThroughSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function se(e){return"BasicSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function ue(e){return"DigestSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function le(e){return"CustomSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function pe(e){return"Method"==e.kind()&&"RAML10"==e.RAMLVersion()}function ce(e){return"ResourceTypeRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function fe(e){return"ResourceType"==e.kind()&&"RAML10"==e.RAMLVersion()}function he(e){return"ResourceBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function de(e){return"Resource"==e.kind()&&"RAML10"==e.RAMLVersion()}function me(e){return"DocumentationItem"==e.kind()&&"RAML10"==e.RAMLVersion()}function ye(e){return"Library"==e.kind()&&"RAML10"==e.RAMLVersion()}function ve(e){return"Overlay"==e.kind()&&"RAML10"==e.RAMLVersion()}function ge(e){return"Extension"==e.kind()&&"RAML10"==e.RAMLVersion()}function Ae(e){return null==e.highLevel().parent()}function Ee(e){return Ae(e)?e:null}Object.defineProperty(t,"__esModule",{value:!0}),t.isApi=n,t.isLibraryBase=r,t.isAnnotable=i,t.isAnnotationRef=a,t.isReference=o,t.isValueType=s,t.isStringType=u,t.isUriTemplate=l,t.isRelativeUriString=p,t.isFullUriTemplateString=c,t.isStatusCodeString=f,t.isFixedUriString=h,t.isContentType=d,t.isMarkdownString=m,t.isSchemaString=y,t.isMimeType=v,t.isAnyType=g,t.isNumberType=A,t.isIntegerType=E,t.isNullType=_,t.isTimeOnlyType=T,t.isDateOnlyType=S,t.isDateTimeOnlyType=N,t.isDateTimeType=I,t.isFileType=b,t.isBooleanType=R,t.isAnnotationTarget=M,t.isTraitRef=C,t.isTrait=w,t.isMethodBase=P,t.isOperation=L,t.isTypeDeclaration=O,t.isModelLocation=D,t.isLocationKind=U,t.isExampleSpec=x,t.isUsesDeclaration=k,t.isXMLFacetInfo=F,t.isArrayTypeDeclaration=B,t.isUnionTypeDeclaration=V,t.isObjectTypeDeclaration=K,t.isStringTypeDeclaration=j,t.isBooleanTypeDeclaration=W,t.isNumberTypeDeclaration=H,t.isIntegerTypeDeclaration=Y,t.isDateOnlyTypeDeclaration=q,t.isTimeOnlyTypeDeclaration=G,t.isDateTimeOnlyTypeDeclaration=X,t.isDateTimeTypeDeclaration=z,t.isFileTypeDeclaration=$,t.isResponse=J,t.isSecuritySchemePart=Q,t.isSecuritySchemeRef=Z,t.isAbstractSecurityScheme=ee,t.isSecuritySchemeSettings=te,t.isOAuth1SecuritySchemeSettings=ne,t.isOAuth2SecuritySchemeSettings=re,t.isOAuth2SecurityScheme=ie,t.isOAuth1SecurityScheme=ae,t.isPassThroughSecurityScheme=oe,t.isBasicSecurityScheme=se,t.isDigestSecurityScheme=ue,t.isCustomSecurityScheme=le,t.isMethod=pe,t.isResourceTypeRef=ce,t.isResourceType=fe,t.isResourceBase=he,t.isResource=de,t.isDocumentationItem=me,t.isLibrary=ye,t.isOverlay=ve,t.isExtension=ge,t.isFragment=Ae,t.asFragment=Ee},function(e,t,n){"use strict";function r(){if(!m){m={};for(var e=0,n=Object.keys(t.transitions);e=0})}function s(e,t){return t.referencePatcher.patchType(e,t),!1}function u(e,t){return t.meta.templatesCollection=I.universesInfo.Universe10.LibraryBase.properties.traits.name,e.kind()!=g.Kind.SCALAR&&null==e.key()&&(e=e.children()[0]),t.referencePatcher.patchReference(e,t,"traits"),!1}function l(e,t){t.meta.templatesCollection=I.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name;var n=e.children();if(n.length>0)t.referencePatcher.patchReference(n[0],t,"resourceTypes");else{var r=e,i=new _.LowLevelCompositeNode(A.createScalar(e.value()),null,r.transformer(),"RAML10",!0);t.referencePatcher.patchReference(i,t,"resourceTypes"),t.registerOnly||r.setValueOverride(i.value())}return!1}function p(e,t){var n=h(e).key(),r=e,i=r.transformer(),a=t.referencePatcher.resolveReferenceValue(n.substring(1,n.length-1),t,i,"annotationTypes");return a&&(t.referencePatcher.registerPatchedReference(a),t.registerOnly||(r.setKeyOverride("("+a.value()+")"),a.isChained()&&r.addMeta("chaining",[{value:a.value(),kind:"annotationRef"}]))),!1}function c(e,t){return"securedBy"==e.key()&&(e=e.children()[0]),t.referencePatcher.patchReference(e,t,"securitySchemes"),!1}function f(e,t){var n=S.find(e.children(),function(e){return e.key()==I.universesInfo.Universe10.MethodBase.properties.is.name});return n&&n.filterChildren(),!1}function h(e){for(var t=0;t<2&&_.LowLevelProxyNode.isInstance(e);t++)e=e.originalNode();return e}function d(e){for(var t=0,n=e.elements();t"==s)){var u=R.checkExpression(a),l=i.transformer(),p=a,c={status:R.ParametersEscapingStatus.NOT_REQUIRED},f=l?l.unitsChain:null;if(null!=l||a.indexOf("<<")>=0){var d=h(i),m=d.value();if(c=R.escapeTemplateParameters(m),c.status==R.ParametersEscapingStatus.OK)p=u?c.resultingString:m;else{if(c.status==R.ParametersEscapingStatus.ERROR)return;l=null}}var y;if(f){y=[];for(var v=0,g=f;v=0&&R.isCompoundValue(p)&&(p=a,l=null);var M=this.resolveReferenceValue(p,t,l,r);null!=M&&(this.registerPatchedReference(M),E=M.value(),M.isChained()&&T.push({kind:"type",value:E}))}if(null==E||t.registerOnly||(i.setValueOverride(E),T.length>0&&i.addMeta("chaining",T)),_&&t.popUnit(),y)for(var C=0;C=0){var s=!0,u=t.resolver.nsMap(t.rootUnit),l=n.transform(e,!0,function(){return s},function(e,n){var i=a.resolveReferenceValueBasic(e,t,r,n.unitsChain);null==i&&(i=new R.PatchedReference(null,e,r,t.rootUnit,!1,R.PatchMode.DEFAULT));var l,p=i.namespace();if(p){var c=u&&u[p];c&&(l=c.unit)}l||(l=t.rootUnit);var f=t.resolver.unitModel(l);return s=o?(f.annotationTypes.hasElement(i.name()),!1):(f.types.hasElement(i.name()),!1),i});i=l.value}return void 0!==i&&R.instanceOfPatchedReference(i)||(i=this.resolveReferenceValueBasic(e,t,r)),i},e.prototype.resolveReferenceValueBasic=function(e,t,n,r){if(null==e||"string"!=typeof e)return null;var i="types"==n||"annotationTypes"==n,a=i&&E.stringEndsWith(e,"?"),o=a?e.substring(0,e.length-1):e;if(!(o.indexOf("<<")>=0)){var s,u,l,p=o.lastIndexOf("."),c=r||t.units;if(p>=0){l=o.substring(0,p),u=o.substring(p+1);for(var f=c.length;f>0;f--){var h=c[f-1],d=this.libExpMode?t.resolver.expandedNSMap(h):t.resolver.nsMap(h),m=d&&d[l];if(null!=m&&(s=m.unit,null!=s))break}}else{if(i&&null!=I.rt.builtInTypes().get(o))return null;u=o,s=c[c.length-1]}if(null==s&&!this.libExpMode){if(l&&l.length>0){for(var v=void 0,f=c.length;f>0;f--){var h=c[f-1],g=t.resolver.expandedNSMap(h),m=g&&g[l];if(null!=m&&(v=m.unit,null!=v))break}if(null!=v){var A=t.resolver.resolveNamespace(t.rootUnit,v);if(null!=A){var _=A.namespace();return a&&(u+="?"),new R.PatchedReference(_,u,n,v,!0,this.mode)}}}return null}if(s.absolutePath()==t.rootUnit.absolutePath())return null==l||0==l.length?null:new R.PatchedReference(null,u,n,s,!1,this.mode);var T=t.resolver.resolveNamespace(t.rootUnit,s);if(null==T)return null;var S=T.namespace();if(null==S)return null;if(this.mode==R.PatchMode.PATH){var N=s.absolutePath().replace(/\\/g,"/");y.isWebPath(N)||(N="file://"+N),S=N+"#/"+n}return a&&(u+="?"),new R.PatchedReference(S,u,n,s,!1,this.mode)}},e.prototype.patchNodeName=function(e,t,n){var r=e,i=r.key(),a="annotationTypes"==n;a&&(i=i.substring(1,i.length-1));var o=this.resolveReferenceValueBasic(i,t,n,[r.unit()]);if(null!=o){this.registerPatchedReference(o);var s=o.value();a&&(s="("+s+")"),t.registerOnly||r.setKeyOverride(s)}},e.prototype.patchReference=function(e,t,n,r){void 0===r&&(r=!1);var i=e;if(_.LowLevelProxyNode.isInstance(i)){var a=i.transformer();if(e.kind()==g.Kind.SCALAR){var o=i.value();if(null!=a){var s=h(i);o=s.value()}var u=this.resolveReferenceValue(o,t,a,n);if(null!=u){var l=u.value();t.registerOnly||i.setValueOverride(l),this.registerPatchedReference(u)}}else{var p=h(e).key(),o=p;if(null!=p){var u=this.resolveReferenceValue(o,t,a,n);if(null!=u){var l=u.value();t.registerOnly||e.setKeyOverride(l),this.registerPatchedReference(u)}var c=t.meta.templatesCollection;if(c&&(null==u&&o.indexOf(".")<0&&(u=new R.PatchedReference("",o,c,t.rootUnit,!1,R.PatchMode.DEFAULT)),u)){var f=t.resolver.getComponent(t.rootUnit,c,u.namespace(),u.name());if(f)for(var d=m[I.universesInfo.Universe10.TypeDeclaration.name],y=0,v=e.children();y0)c=u[0],c.children().forEach(function(e){return m[e.key()]=!0});else{var y=A.createMapNode("uses");y._parent=p,y.setUnit(p.unit()),c=a.replaceChild(null,y)}for(var v=0,g=f.concat(d);v0&&t.removeChild(r[0])}},e.prototype.registerPatchedReference=function(e){var t=e.collectionName();if(t){var n=e.referencedUnit().absolutePath(),r=this._outerDependencies[n];null==r&&(r={},this._outerDependencies[n]=r);var i=r[t];null==i&&(i={},r[t]=i),i[e.name()]=e}},e.prototype.expandLibraries=function(e,t){void 0===t&&(t=!1);var n=this.libExpMode;if(this.libExpMode=!0,!e.actual().libExpanded){var r=e.unit(),i=r.project(),a=[],o=i.namespaceResolver(),s=o.expandedPathMap(r);if(null!=s){for(var u=Object.keys(s).sort(),l=0,p=u;l0)for(var m=0,y=d;m0){d.needTypesReset=!0;var s=r.highLevel().types(),h=s.getTypeRegistry().getByChain(a.value());if(h)for(var m=r.project().namespaceResolver(),y=0,g=h.allSubTypes();y>")&&(e=e.substring("<<".length,e.length-">>".length),e.indexOf("<<")<0&&(t.meta.params[e]=!0))}function p(e,t,n){for(var r=[],i=0,a=e.children();i>")&&(s=s.substring(2,s.length-2),s.indexOf("<<")>=0||r.push({setParam:o.key(),readParam:s}))}}if(0!=r.length){for(var u=e.key(),l=[],p=u.length,c=0;c0)for(var c=l.length-1;c>=0;c--){var h=l[c],d=u.substring(0,h),m=u.substring(h+1,p);f=t.resolver.getComponent(t.rootUnit,n,d,m,t.meta.passed)}else f=t.resolver.getComponent(t.rootUnit,n,null,u,t.meta.passed);if(f&&f.isInitialized())for(var y=0,v=r;y0){var N=S[0],R=N.value();if(R){var M=e.unit.resolve(R);if(M){var C=t.unitModel(M);e.master=C}}}}}}function d(e,t,n){void 0===n&&(n={});var r=O[e.kind];if(r){var i=e.id();if(!n[i]){n[i]=!0;try{var a=new S.Scope,o=e.node.unit().project().getMainUnit();if(o){var s=o.ast(),u=I.ramlFirstLine(o.contents());if(s&&3==u.length){var l="1.0"==u[1]?b.getUniverse("RAML10"):b.getUniverse("RAML08");if(l){var p=u[2],c=l.type(p);c&&T.isApiSibling(c)&&(a.hasRootMediaType=null!=R.find(s.children(),function(e){return"mediaType"==e.key()}))}}}var f=new S.State(null,e.node.unit(),a,t);f.meta.params={},f.meta.passed=n,r.processNode(e.node,f),e.typeValuedParameters=f.meta.params}finally{delete n[i]}}}}function m(e){var t=I.ramlFirstLine(e.contents());if(!t)return!1;if(t.length<3||!t[2])return!0;var n=t[2],r=b.getUniverse("RAML10");if(!r)return!1;var i=r.type(n);return!!i&&T.isLibraryBaseSibling(i)}function y(e,t,n){void 0===n&&(n=!1);var r;n?(r=[],t.forEach(function(e){var t=e.children();t.length>0&&r.push(t[0])})):r=t,r.forEach(function(t){e.array.push(t);var n=t.key();e.map[n]=t;var r=v(t,e.name);r&&(e.templateModels||(e.templateModels={}),e.templateModels[n]=r)})}function v(e,t){var n;if(t==b.universesInfo.Universe10.LibraryBase.properties.traits.name?n=b.universesInfo.Universe10.Trait.name:t==b.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name&&(n=b.universesInfo.Universe10.ResourceType.name),n){i();var r=O[n];if(!r)return null;var a=e.key();return new D(a,n,e,null)}}Object.defineProperty(t,"__esModule",{value:!0});var g=n(5),A=n(6),E=n(204),_=n(21),T=n(205),S=n(223),N=n(212),I=n(55),b=n(56),R=n(16),M=n(15),C=function(){function e(){this.expandedAbsToNsMap={},this._expandedNSMap={},this.byPathMap={},this.byNsMap={},this._hasFragments={},this._unitModels={}}return e.prototype.hasTemplates=function(e){var t=this.unitModel(e);if(!t.traits.isEmpty()||!t.resourceTypes.isEmpty())return!0;var n=this.expandedPathMap(e);if(n)for(var i=0,a=Object.keys(n);i0&&C.length>0&&n.charAt(0).toLowerCase()!=C.charAt(0).toLowerCase()?C:A.relative(n,C),R=R.replace(/\\/g,"/");var P=new w(N,T.unit,R);c[P.absolutePath()]||(i[E]=P,a.push(P),c[P.absolutePath()]=!0)}}o.forEach(function(e){if(e.valueKind()==_.Kind.INCLUDE_REF){var t=s.resolve(e.includePath());if(t){if(!t.isRAMLUnit())return;m(t.ast())}}else m(e)}),null==r.parent()&&(p[u]=!1)}},void m(s)):"continue"},v=0;vt.length)return!1;if(e.lengthi)return!1}return!0},e.prototype.hasFragments=function(e){if(!e.isRAMLUnit())return!1;var t=I.ramlFirstLine(e.contents());return!(!t||t.length<2||"1.0"!=t[1])&&(this.expandedPathMap(e),!!this._hasFragments[e.absolutePath()])},e.prototype.unitModel=function(e,t){var n=e.absolutePath(),r=this._unitModels[n];return r?r:(r=new L(e),this._unitModels[n]=r,h(r,this,t),r)},e.prototype.deleteUnitModel=function(e){delete this._unitModels[e]},e.prototype.getComponent=function(e,t,n,r,i){var a=this.expandedNSMap(e);if(a){var o=e;if(n){var s=a[n];o=s?s.unit:null}if(o){var u=this.unitModel(o,i),l=u[t];if(l&&P.isInstance(l)){var p=l.getTemplateModel(r);return p&&!p.isInitialized()&&d(p,this,i),p}}}},e}();t.NamespaceResolver=C;var w=function(){function e(e,t,n){this.usesNodes=e,this.unit=t,this.includePath=n,this.namespaceSegments=this.usesNodes.map(function(e){return e.key()})}return e.prototype.steps=function(){return this.namespaceSegments.length},e.prototype.namespace=function(){return this.namespaceSegments.join(".")},e.prototype.absolutePath=function(){return this.unit.absolutePath()},e}();t.UsesInfo=w;var P=function(){function e(e){this.name=e,this.array=[],this.map={}}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&R.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.hasElement=function(e){return null!=this.map[e]},e.prototype.getElement=function(e){return this.map[e]},e.prototype.getTemplateModel=function(e){return this.templateModels?this.templateModels[e]:null},e.prototype.isEmpty=function(){return 0==this.array.length},e.CLASS_IDENTIFIER="namespaceResolver.ElementsCollection",e}();t.ElementsCollection=P;var L=function(){function e(e){this.unit=e,this.init()}return e.prototype.type=function(){return this._type},e.prototype.init=function(){this.types=new P(b.universesInfo.Universe10.LibraryBase.properties.types.name),this.annotationTypes=new P(b.universesInfo.Universe10.LibraryBase.properties.annotationTypes.name),this.securitySchemes=new P(b.universesInfo.Universe10.LibraryBase.properties.securitySchemes.name),this.traits=new P(b.universesInfo.Universe10.LibraryBase.properties.traits.name),this.resourceTypes=new P(b.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name);var e=I.ramlFirstLine(this.unit.contents());e&&(e.length<3||!e[2]?this._type=b.universesInfo.Universe10.Api.name:this._type=e[2])},e.prototype.isOverlayOrExtension=function(){return this._type==b.universesInfo.Universe10.Overlay.name||this._type==b.universesInfo.Universe10.Extension.name},e.prototype.extensionSet=function(){if(!this._extensionSet){this._extensionSet={},this._extensionChain=[];for(var e=this;e;){var t=e.unit.absolutePath();if(this._extensionSet[t])break;this._extensionSet[t]=e,this._extensionChain.push(e),e=e.master}}return this._extensionSet},e.prototype.extensionChain=function(){return this._extensionChain||this.extensionSet(),this._extensionChain},e}();t.UnitModel=L;var O,D=function(){function e(e,t,n,r){this.name=e,this.kind=t,this.node=n,this.typeValuedParameters=r}return e.prototype.isInitialized=function(){return null!=this.typeValuedParameters},e.prototype.id=function(){return this.node.unit().absolutePath()+"|"+this.kind+"|"+this.node.key()},e}();t.TemplateModel=D;var U=function(){function e(){this.parent=new S.ReferencePatcherActionsAndConditionsFactory}return e.prototype.action=function(e){var t=c;return"##patch"==e?t=s:"##patchAnnotationName"==e?t=u:"##patchResourceTypeReference"==e?t=o:"##patchTraitReference"==e&&(t=a),t},e.prototype.condition=function(e){return this.parent.condition(e)},e}();t.NamespaceResolverActionsAndConditionsFactory=U,t.extendedUnit=f,t.initUnitModel=h,t.isLibraryBaseDescendant=m},function(e,t,n){t.no=t.noCase=n(226),t.dot=t.dotCase=n(231),t.swap=t.swapCase=n(232),t.path=t.pathCase=n(234),t.upper=t.upperCase=n(233),t.lower=t.lowerCase=n(227),t.camel=t.camelCase=n(235),t.snake=t.snakeCase=n(236),t.title=t.titleCase=n(237),t.param=t.paramCase=n(238),t.header=t.headerCase=n(239),t.pascal=t.pascalCase=n(240),t.constant=t.constantCase=n(242),t.sentence=t.sentenceCase=n(243),t.isUpper=t.isUpperCase=n(244),t.isLower=t.isLowerCase=n(245),t.ucFirst=t.upperCaseFirst=n(241),t.lcFirst=t.lowerCaseFirst=n(246)},function(e,t,n){var r=n(227),i=n(228),a=n(229),o=n(230);e.exports=function(e,t,n){function s(e,t,r){return 0===t||t===r.length-e.length?"":n}return null==e?"":(n="string"!=typeof n?" ":n,e=String(e).replace(a,"$1 $2").replace(o,"$1 $2").replace(i,s),r(e,t))}},function(e,t){var n={tr:{regexp:/\u0130|\u0049|\u0049\u0307/g,map:{"İ":"i",I:"ı","İ":"i"}},az:{regexp:/[\u0130]/g,map:{"İ":"i",I:"ı","İ":"i"}},lt:{regexp:/[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,map:{I:"i̇",J:"j̇","Į":"į̇","Ì":"i̇̀","Í":"i̇́","Ĩ":"i̇̃"}}};e.exports=function(e,t){var r=n[t];return e=null==e?"":String(e),r&&(e=e.replace(r.regexp,function(e){return r.map[e]})),e.toLowerCase()}},function(e,t){e.exports=/[^A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g},function(e,t){e.exports=/([a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])/g},function(e,t){e.exports=/([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A])([A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A][a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])/g; +},function(e,t,n){var r=n(226);e.exports=function(e,t){return r(e,t,".")}},function(e,t,n){var r=n(233),i=n(227);e.exports=function(e,t){if(null==e)return"";for(var n="",a=0;a0&&(i=n[r][0].attr);var o=new f.UserDefinedProp(r,i);o.withDomain(e);var s=a[r];o.getAdapter(v.RAMLPropertyService).putMeta("templatePaths",s);var u;if("RAML10"==t.definition().universe().version()){var l=n[r].filter(function(e){return A.isStringTypeType(e.tp)}).length>0;u=l?m.Universe10.StringType.name:m.Universe10.AnyType.name}else u=m.Universe08.StringType.name;var p=d.unique(n[r].map(function(e){return e.tp})).filter(function(e){return e&&e.nameId()!=u});o.withRange(1==p.length?p[0]:t.definition().universe().type(u)),o.withRequired(!0),1==p.length&&"RAML10"==t.definition().universe().version()&&p[0].key()==m.Universe10.SchemaString&&o.getAdapter(v.RAMLPropertyService).setTypeExpression(!0),o.unmerge()});var l=new f.UserDefinedProp("____key",t);return l.withDomain(e),l.withKey(!0),l.withFromParentKey(!0),l.withRange(t.definition().universe().type(m.Universe08.StringType.name)),e}function o(e,t){"RAML08"==t.universe().version()&&e.getAdapter(v.RAMLService).withAllowAny();var n=t.property(t.getAdapter(v.RAMLService).getReferenceIs());return n&&n.range().properties().forEach(function(t){var n=new f.Property(t.nameId());n.unmerge(),n.withDomain(e),n.withRange(t.range()),n.withMultiValue(t.isMultiValue())}),e}function s(e){if(!e)return null;if(e.associatedType())return e.associatedType();var t=e.root(),n=t.definition()&&A.isApiSibling(t.definition()),r=e.root().lowLevel().libProcessed;if((!n||r)&&e.definition().isAssignableFrom(m.Universe10.TypeDeclaration.name)){var i=e.parent();if(i&&i.definition().isAssignableFrom(m.Universe10.TypeDeclaration.name)){var s=i.localType();if(null!=s)if(A.isPropertiesProperty(e.property())){var l=e.name(),p=s.properties().find(function(e){return e.nameId()==l});if(p){var c=p.range();if(c)return c}}else if(A.isItemsProperty(e.property())&&s.isArray()){var d=s.array().componentType();if(d)return d}else if(A.isTypeProperty(e.property())){var y=s.superTypes(),d=y&&1==y.length&&y[0];if(d)return d}}}var g=e.lowLevel().unit(),E=g?g.path():"";h.setPropertyConstructor(function(t){var n=null,r=e.elementsOfKind("properties").filter(function(e){return e.name()==t});r&&(n=r[0]);var i=new f.UserDefinedProp(t,n);return i.unmerge(),i});try{var _=e.definition();if(e.property()&&e.property().nameId()==m.Universe10.LibraryBase.properties.annotationTypes.name){var S=new T(e.name(),e.definition().universe(),e,E,""),N=u(e);S._superTypes.push(N),0==e.elementsOfKind(m.Universe10.ObjectTypeDeclaration.properties.properties.name).length&&S.getAdapter(v.RAMLService).withAllowAny();var I=_.getAdapter(v.RAMLService).getExtendedType();return I&&S._superTypes.push(I),S}var S=new f.UserDefinedClass(e.name(),e.definition().universe(),e,E,"");if(e.setAssociatedType(S),_.getAdapter(v.RAMLService).isInlinedTemplates())return a(S,e);if(_.getAdapter(v.RAMLService).getReferenceIs())return o(S,_);var b=u(e);b.getAdapter(v.RAMLService).setDeclaringNode(e),e.setAssociatedType(b)}finally{h.setPropertyConstructor(null)}return b}function u(e){return h.toNominal(e.parsedType(),function(t){var n=e.definition().universe().type(t);if(!n){new f.UserDefinedClass("",e.definition().universe(),e,"","")}return n})}function l(e){return function(t){var n=e.type(t);if(!n){new f.UserDefinedClass("",e,null,"","")}return n}}function p(e,t){var n=d.find(e.elementsOfKind("types"),function(e){return e.name()==t.name()});n&&h.setPropertyConstructor(function(e){var t=n.elementsOfKind("properties").filter(function(t){return t.name()==e}),r=null;if(t&&t.length>0)r=t[0];else{var t=n.elementsOfKind("facets").filter(function(t){return t.name()==e});t&&t.length>0&&(r=t[0])}var i=new f.UserDefinedProp(e,r);return i.unmerge(),i});var r=l(e.definition().universe());return h.toNominal(t,r)}var c=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var f=n(56),h=f.rt,d=n(16),m=n(204),y=n(55),v=f,g=n(19),A=n(205);h.setPropertyConstructor(function(e){var t=new f.Property(e);return t.unmerge(),t});var E=function(e,t){void 0===t&&(t=!1),t&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));for(var n=[],r=0;;){var i=e.indexOf("<<",r);if(i==-1)break;var a=e.indexOf(">>",i),o=0==i&&a==e.length-2,s=e.substring(i+2,a);r=i+2;var u=s.indexOf("|");u!=-1&&(o=!1,s=s.substring(0,u)),s=s.trim(),n.push(s)}return{parameterUsages:n,isFull:o}},_=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=E(e,a),s=o.parameterUsages,u=o.isFull,l=n?n.property().range():null;a&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)?(l=i.type(m.Universe10.SchemaString.name),r=!1):n&&(n.property().nameId()!=m.Universe10.TypeDeclaration.properties.type.name&&n.property().nameId()!=m.Universe10.TypeDeclaration.properties.schema.name||n.property().domain().key()==m.Universe10.TypeDeclaration&&(l=i.type(m.Universe10.SchemaString.name))),!u||r?l=i.type(m.Universe10.StringType.name):null==l&&"RAML10"==i.version()&&(l=i.type(m.Universe10.AnyType.name));for(var p=0,c=s;p=0}function r(e){return n(e)&&e.length>2&&"|"==e[0]&&("\n"==e[1]||"\r"==e[1]||"\n"==e[2])}function i(e,t){var r="";if(n(e)){r+="|\n";for(var i=f(e),a=0;a0;){var n=e[t-1];if(" "!=n&&"\t"!=n&&"\r"!=n&&"\n"!=n)break;t--}return e.substring(0,t)}function c(e){return o(p(e))}function f(e){var t=e.match(/^.*((\r\n|\n|\r)|$)/gm);return t}function h(e,t){if(!e||!t||e.length0;){var n=this.contents[t-1];if(" "!=n&&"\t"!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.extendToStartOfLine=function(){for(var t=this.start;t>0;){var n=this.contents[t-1];if("\r"==n||"\n"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.extendAnyUntilNewLines=function(){var t=this.end;if(t>0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0;){var n=this.contents[t-1];if(" "!=n)break;t--}return new e(this.contents,t,this.end)},e.prototype.extendCharIfAny=function(t){var n=this.end;return n0&&this.contents[n-1]==t&&n--,new e(this.contents,n,this.end)},e.prototype.extendToNewlines=function(){var t=this.end;if(t>0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0;){var n=this.contents[t-1];if("\r"==n||"\n"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.reduceNewlinesEnd=function(){for(var t=this.end;t>this.start;){var n=this.contents[t-1];if("\r"!=n&&"\n"!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.reduceSpaces=function(){for(var t=this.end;t>this.start;){var n=this.contents[t-1];if(" "!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.replace=function(e){return this.sub(0,this.start)+e+this.sub(this.end,this.unitText().length)},e.prototype.remove=function(){return this.sub(0,this.start)+this.sub(this.end,this.unitText().length)},e}();t.TextRange=y},function(e,t,n){"use strict";function r(e){return e.highLevel().localType()}function i(e){return e.highLevel().localType()}function a(e){var t=new we.Project(Le.dirname(e)),n=t.unit(Le.basename(e));return n&&n.isRAMLUnit()?Ae.fromUnit(n).wrapperNode():null}function o(e){var t="",n=e;do e=n,t=e.relativeUri().value()+t,n=e.parent();while(n.definition().key().name==Ie.Universe10.Resource.name);return t}function s(e){return Re.expandLibrary(e)}function u(e,t){return void 0===t&&(t=!1),t?p(e):l(e)}function l(e){var t=e.highLevel().lowLevel();return Me.LowLevelProxyNode.isInstance(t)?e:Re.expandTraitsAndResourceTypes(e)}function p(e){return Re.expandLibraries(e)}function c(e){var t="",n=e;do e=n,t=e.relativeUri().value()+t,n=e.parent();while(n.definition().key().name==Ie.Universe10.Resource.name);n=x(e);var r=n.baseUri(),i=r?r.value():"";return i=i?i:"",e&&(i=i.replace(/\/+$/,"")),t=i+t}function f(e,t){return e.runtimeType().validate(t).map(function(e){return e.getMessage()})}function h(e,t){return e.runtimeType().validate(t)}function d(e){return m(e)}function m(e){return e.highLevel().lowLevel().actual().libExpanded?e.traits_original():Ue.allTraits(e.highLevel(),!0).map(function(e){return e.wrapperNode()})}function y(e){return v(e)}function v(e){return e.highLevel().lowLevel().actual().libExpanded?e.resourceTypes_original():Ue.allResourceTypes(e.highLevel(),!0).map(function(e){return e.wrapperNode()})}function g(e){var t=[],n=e;do e=n,t.push(e.relativeUri().value()),n=e.parent();while(n.definition().key().name==Ie.Universe10.Resource.name);return t.reverse()}function A(e){return de.ResourceImpl.isInstance(e.parent())?e.parent():null}function E(e){var t=e.parent();return t.definition().key().name==Ie.Universe10.Resource.name?t:null}function _(e,t){if(null==e)return null;var n=e.resources();return n?(n=n.filter(function(e){return e.relativeUri().value()==t}),0==n.length?null:n[0]):null}function T(e,t){if(!e)return null;for(var n=null,r=0;r=0;if(s){var u=a?i.getAnnotationTypeRegistry():i.getTypeRegistry();n=u.get(o)}else n=a?i.getAnnotationType(o):i.getType(o)}}return new ye.TypeInstanceImpl(t,n)}function Y(e){var t=e.highLevel().value();return"string"==typeof t||null==t?t:Ae.StructuredValue.isInstance(t)?t.valueName():null}function q(e){return z(e)}function G(e){return z(e)}function X(e){return z(e)}function z(e){var t=e.highLevel(),n=t.parent(),r=e.name(),i=Ce.referenceTargets(t.property(),n).filter(function(e){return Ae.qName(e,n)==r});return 0==i.length?null:i[0].wrapperNode()}function $(e,t,n,r){void 0===r&&(r=!0);var i=t.lowLevel(),a=t.definition().property(n?"example":"examples"),o=Te.getUniverse("RAML10"),s=o.type(Ne.Universe10.ExampleSpec.name),u=e.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==n});return u.map(function(e){var n=e.asJSON(),o=e.isSingle()?"example":null,u=i.unit(),l=new Pe.AstNode(u,n,i,null,o),p=r?new Ae.ASTNodeImpl(l,t,s,a):t,c=e.annotations(),f=ke(c,l,p,u),h=e.scalarsAnnotations(),d={};Object.keys(h).forEach(function(e){return d[e]=ke(h[e],l,p,u)});var m=new Ke(p,e,f,{description:function(){return d.description||[]},displayName:function(){return d.displayName||[]},strict:function(){return d.strict||[]}});return m})}function J(e,t){void 0===t&&(t=!1);var n=e.runtimeDefinition();if(!n)return[];var r=n.getExtra(Se.TOP_LEVEL_EXTRA),i=e.highLevel().property(),a=i&&(Oe.isTypesProperty(i)||Oe.isSchemasProperty(i));if(a||!r){var o=e.highLevel();return $(n,o,t)}return[]}function Q(e){var t=J(e,!0);return t.length>0?t[0]:null}function Z(e){return J(e)}function ee(e){var t=e.runtimeDefinition(),n=t.fixedFacets();if(e.kind()==Ne.Universe10.UnionTypeDeclaration.name)for(var r=t.allFixedBuiltInFacets(),i=0,a=Object.keys(r);i=0&&(l=t.indexOf("}",++c),!(l<0));c=t.indexOf("{",l)){var f=t.substring(c,l);if(p[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var h=a.universe(),d=h.type(Ne.Universe10.StringTypeDeclaration.name),m=_e.createStubNode(d,null,f,i.lowLevel().unit()),y=me.buildWrapperNode(m),v=y.highLevel();v.setParent(i),y.meta().setCalculated(),y.setName(f),v.patchProp(o),u.push(y)}}return Object.keys(s).filter(function(e){return!p[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function ce(e){if(e.kind()==Ne.Universe10.Method.name||Oe.isTypeDeclarationSibling(e.definition())){for(var t=!1,n=e.highLevel().parent();null!=n;){var r=n.definition();if(Oe.isResourceTypeType(r)||Oe.isTraitType(r)){t=!0;break}n=n.parent()}if(!t)return null}var i=e.highLevel();if(null==i)return null;var a=i.lowLevel();if(null==a)return null;var o=a.children().filter(function(e){var t=e.key();return!!t&&(("("!=t.charAt(0)||")"!=t.charAt(t.length-1))&&t.indexOf("<<")>=0)});if(0==o.length)return null;var s=new ye.TypeInstanceImpl(o);return s}var fe=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var he=n(222),de=n(2),me=n(250),ye=n(219),ve=n(251),ge=n(198),Ae=n(55),Ee=n(19),_e=n(3),Te=n(56),Se=Te.tsInterfaces,Ne=n(204),Ie=n(204),be=n(17),Re=n(217),Me=n(199),Ce=n(209),we=n(4),Pe=n(20),Le=n(6),Oe=n(205),De=n(208),Ue=n(254),xe=n(207);t.resolveType=r,t.runtimeType=i,t.load=a,t.completeRelativeUri=o,t.expandLibrarySpec=s,t.expandSpec=u,t.expandTraitsAndResourceTypes=l,t.expandLibraries=p,t.absoluteUri=c,t.validateInstance=f,t.validateInstanceWithDetailedStatuses=h,t.traitsPrimary=d,t.allTraits=m,t.resourceTypesPrimary=y,t.allResourceTypes=v,t.relativeUriSegments=g,t.parentResource=A,t.parent=E,t.childResource=_,t.getResource=T,t.childMethod=S,t.getMethod=N,t.ownerApi=b,t.methodId=R,t.isOkRange=M,t.allResources=C,t.matchUri=w;t.uriParametersPrimary=P,t.uriParameters=L,t.baseUriParametersPrimary=O,t.baseUriParameters=D,t.absoluteUriParameters=U,t.protocolsPrimary=k,t.allProtocols=F,t.securedByPrimary=B,t.allSecuredBy=V,t.securitySchemeName=K,t.securityScheme=j,t.RAMLVersion=W,t.structuredValue=H,t.referenceName=Y,t.referencedTrait=q,t.referencedAnnotation=G,t.referencedResourceType=X;var ke=function(e,t,n,r){var i=[];if(e)for(var a=Te.getUniverse("RAML10"),o=a.type("Annotable").property("annotations"),s=0,u=Object.keys(e);s0?e.type()[0]:"string",this.example=e.example(),this.required=e.required(),this.default=e.default()}return e}(),Ke=function(e){function t(t,n,r,i){var a=e.call(this,t)||this;return a.expandable=n,a._annotations=r,a._scalarAnnotations=i,a}return fe(t,e),t.prototype.value=function(){return this.expandable.asString()},t.prototype.structuredValue=function(){var e;e=this.expandable.isJSONString()||this.expandable.isYAML()?this.expandable.asJSON():this.expandable.original();var t=this._node.lowLevel(),n=this.expandable.isSingle()?"example":null,r=new Pe.AstNode(t.unit(),e,t,null,n);return new ye.TypeInstanceImpl(r)},t.prototype.strict=function(){return this.expandable.strict()},t.prototype.description=function(){var e=this.expandable.description();if(null==e&&null!==e)return null;var t=_e.createAttr(this._node.definition().property(Ne.Universe10.ExampleSpec.properties.description.name),e);t.lowLevel().setUnit(this._node.lowLevel().unit());var n=new de.MarkdownStringImpl(t);return n},t.prototype.name=function(){return this.expandable.name()},t.prototype.displayName=function(){return this.expandable.displayName()},t.prototype.annotations=function(){return this._annotations},t.prototype.scalarsAnnotations=function(){return this._scalarAnnotations},t.prototype.uses=function(){return e.prototype.elements.call(this,"uses")},t}(ye.BasicNodeImpl);t.ExampleSpecImpl=Ke},function(e,t,n){"use strict";function r(e){return e.isBuiltIn()?s[e.nameId()]:null}function i(e,t){void 0===t&&(t=!0);var n=e.definition(),i=(n.nameId(),r(n));if(!i){for(var o=a(n),u=n.allSuperTypes().sort(function(e,t){return o[e.nameId()]-o[t.nameId()]}),l=null,p=0;po)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},Annotable:function(e,t){return new o.AnnotableImpl(e,t)},AnnotationRef:function(e){return new o.AnnotationRefImpl(e)},AnnotationTarget:function(e){return new o.AnnotationTargetImpl(e)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},ArrayTypeDeclaration:function(e,t){return new o.ArrayTypeDeclarationImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},ContentType:function(e){return new o.ContentTypeImpl(e)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateOnlyType:function(e){return new o.DateOnlyTypeImpl(e)},DateOnlyTypeDeclaration:function(e,t){return new o.DateOnlyTypeDeclarationImpl(e,t)},DateTimeOnlyType:function(e){return new o.DateTimeOnlyTypeImpl(e)},DateTimeOnlyTypeDeclaration:function(e,t){return new o.DateTimeOnlyTypeDeclarationImpl(e,t)},DateTimeType:function(e){return new o.DateTimeTypeImpl(e)},DateTimeTypeDeclaration:function(e,t){return new o.DateTimeTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},Extension:function(e,t){return new o.ExtensionImpl(e,t)},FileType:function(e){return new o.FileTypeImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUriString:function(e){return new o.FixedUriStringImpl(e)},FragmentDeclaration:function(e,t){return new o.FragmentDeclarationImpl(e,t)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},IntegerType:function(e){return new o.IntegerTypeImpl(e)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},Library:function(e,t){return new o.LibraryImpl(e,t)},LibraryBase:function(e,t){return new o.LibraryBaseImpl(e,t)},LocationKind:function(e){return new o.LocationKindImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},ModelLocation:function(e){return new o.ModelLocationImpl(e)},NullType:function(e){return new o.NullTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},ObjectTypeDeclaration:function(e,t){ +return new o.ObjectTypeDeclarationImpl(e,t)},Operation:function(e,t){return new o.OperationImpl(e,t)},Overlay:function(e,t){return new o.OverlayImpl(e,t)},PassThroughSecurityScheme:function(e,t){return new o.PassThroughSecuritySchemeImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceBase:function(e,t){return new o.ResourceBaseImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},TimeOnlyType:function(e){return new o.TimeOnlyTypeImpl(e)},TimeOnlyTypeDeclaration:function(e,t){return new o.TimeOnlyTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},TypeDeclaration:function(e,t){return new o.TypeDeclarationImpl(e,t)},UnionTypeDeclaration:function(e,t){return new o.UnionTypeDeclarationImpl(e,t)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},UsesDeclaration:function(e,t){return new o.UsesDeclarationImpl(e,t)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLFacetInfo:function(e,t){return new o.XMLFacetInfoImpl(e,t)}}},function(e,t,n){"use strict";function r(e,t,n,r){var i=r.end!==!1,a=r.strict,o="";r.sensitive||(o+="i");var s=e.replace(c,function(e,r,i,a){if(a)return"\\"+a;n.push({name:i,prefix:r||"/"}),r=r?"\\"+r:"";var o=t[i],s=o&&l[o.type]||"[^"+(r||"\\/")+"]+",u=o&&o.required===!1;return Array.isArray(o.enum)&&o.enum.length&&(s="(?:"+o.enum.map(function(e){return String(e).replace(p,"\\$1")}).join("|")+")"),r+"("+s+")"+(u?"?":"")}),u="/"===e.charAt(e.length-1);return a||(s=(u?s.slice(0,-2):s)+"(?:\\/(?=$))?"),s+=i?"$":a&&u?"":"(?=\\/|$)",new RegExp("^"+s+(i?"$":""),o)}function i(e){try{return decodeURIComponent(e)}catch(n){var t=new Error('Failed to decode param "'+e+'"');throw t.status=400,t}}function a(e,t,n){if(n=n||{},"/"===e&&n.end===!1)return o;t=t||{};var a=[],l=r(e,t,a,n),p=s.sanitize()(t),c=u.validate()(t);return function(e){var n=l.exec(e);if(!n)return!1;if(t.mediaTypeExtension&&n.length>1&&!n[n.length-1]){var r=n[n.length-2],o=r.lastIndexOf(".");o>=0&&(n[n.length-2]=r.substring(0,o),n[n.length-1]=r.substring(o))}for(var s=n[0],u={},f=1;f1)return null;t=t[0]}return i(t,r,a)}});return function(e,t,n){for(var r=0;r=e}}function u(e){return function(t){return t<=e}}function l(t){return function(n){return e.byteLength(n)>=t}}function p(t){return function(n){return e.byteLength(n)<=t}}function c(e){return e&&0!=e.length?function(t){return e.indexOf(t)>-1}:function(e){return!0}}function f(e){var t="string"==typeof e?new RegExp(e):e;return t.test.bind(t)}function h(e,t,n,r,i){return{valid:e,rule:r,attr:i,value:n,key:t}}function d(e,t){var n=[];return Object.keys(e).forEach(function(r){var i=t[r];if(i){var a=e[r];n.push([r,i(a,r),a])}}),function(e,t,r){for(var i=0;i=0&&(p=t.indexOf("}",++f),!(p<0));f=t.indexOf("{",p)){var h=t.substring(f,p);if(c[h]=!0,u[h])u[h].forEach(function(e){return l.push(e)});else{var d=_.actualUnit(a.lowLevel()),m=o.universe(),y=m.type(N.Universe10.StringTypeDeclaration.name),v=T.createStubNode(y,null,h,d);v.setParent(n),i&&v.wrapperNode().meta().setCalculated(),v.attrOrCreate("name").setValue(h),v.patchProp(s),l.push(v)}}return Object.keys(u).filter(function(e){return!c[e]}).forEach(function(e){return u[e].forEach(function(e){return l.push(e)})}),l}function o(e){var t="",n=e;do e=n,t=e.attr(N.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent();while(P.isResourceType(n.definition()));return t}function s(e){if(!P.isResourceType(e.definition()))return null;var t="",n=e;do e=n,t=e.attr(N.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent();while(P.isResourceType(n.definition()));var r="";n=n.getSlaveCounterPart()||n;var i=n.attr(N.Universe10.Api.properties.baseUri.name);return i&&(r=i?i.value():""),r=r?r:"",e&&(r=r.replace(/\/+$/,"")),t=r+t}function u(e,t){void 0===t&&(t=!1);var n=c(e,!0,t);return n.length>0?n[0]:null}function l(e,t){return void 0===t&&(t=!1),c(e,!1,t)}function p(e,t){void 0===t&&(t=!1);var n;n=e.isJSONString()||e.isYAML()?e.asJSON():e.original();var r={value:n,strict:e.strict(),name:e.name()};if(e.hasAnnotations()){var i=e.annotations(),a=f(i);a.length>0&&(r.annotations=a)}if(e.hasScalarAnnotations()){var o=e.scalarsAnnotations(),s={};Object.keys(o).forEach(function(e){var t=f(o[e]);t.length>0&&(s[e]=[t])}),Object.keys(s).length>0&&(r.scalarsAnnotations=s)}var u=e.displayName();u&&(r.displayName=u);var l=e.description();return null!=l&&(r.description=l),t&&(r.asXMLString=e.asXMLString()),r}function c(e,t,n){void 0===n&&(n=!1);var r=e.localType();r.isAnnotationType()&&(r=S.find(r.superTypes(),function(e){return e.nameId()==r.nameId()}));var i=r.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==t}).map(function(e){return p(e,n)});return i}function f(e){var t=[];return e&&Object.keys(e).forEach(function(n){t.push({name:n,value:e[n].value()})}),t}function h(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:m(e,function(e){return P.isTraitType(e)},t,"Trait")}function d(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:m(e,function(e){return P.isResourceTypeType(e)},t,"ResourceType")}function m(e,t,n,r){var i=w.globalDeclarations(e).filter(function(e){return t(e.definition())}),a=e.lowLevel(),o=a.includePath();o||(o=a.unit().path());for(var s="RAML10"==e.definition().universe().version()&&!P.isOverlayType(e.definition()),u=s?new R.TraitsAndResourceTypesExpander:null,l=[],p=new C.ReferencePatcher,c="ResourceType"==r?"resourceTypes":"traits",f=e.definition().allProperties().find(function(e){return e.nameId()==c}),h=0,d=i;h=0)});if(0==o.length)return null;var s={};return o.forEach(function(e){var t=e.dumpToObject();Object.keys(t).forEach(function(e){return s[e]=t[e]})}),s}function A(e){var t=e.localType(),n=t.fixedFacets(),r=Object.keys(n),i=[];if(t.hasUnionInHierarchy())i=r.map(function(e){return{name:e,value:n[e]}});else for(var a=0,o=r;a=0&&(s=t.indexOf("}",++p),!(s<0));p=t.indexOf("{",s)){var c=t.substring(p,s);if(u[c]=!0,a[c])a[c].forEach(function(e){o.registerValue(e),o.registerMeta(null)});else{l=!0;var f=n.definition().universe(),h=f.type(L.Universe10.StringTypeDeclaration.name),d=x.createStubNode(h,null,c,n.lowLevel().unit());if(d.setParent(n),d.attrOrCreate("name").setValue(c),d.patchProp(r),o.registerValue(d),i){o.hasMeta=!0;var m=new y.NodeMetadataImpl;m.setCalculated(),o.registerMeta(m)}}}return l?(Object.keys(a).filter(function(e){return!u[e]}).forEach(function(e){return a[e].forEach(function(e){o.registerValue(e),o.hasMeta&&o.registerMeta(null)})}),o):e}function o(e,t,n,r){if(0==t.length)return null;var i=e.lowLevel().unit().absolutePath(),a=new j(n);return t.forEach(function(e){if(a.registerValue(e),r)if(e.lowLevel().unit().absolutePath()!=i){a.hasMeta=!0;var t=new y.NodeMetadataImpl;t.setCalculated(),a.mArr.push(t)}else a.mArr.push(null)}),a}function s(e,t,n,r){var i;if(e.isElement())i=e.asElement().definition();else if(e.isAttr()){var a=e.asAttr().property();a&&(i=a.range())}if((i instanceof A.UserDefinedClass||i.isUserDefined())&&(i=k.find(i.allSuperTypes(),function(e){return!e.isUserDefined()})),null==i)return n;var o=i.universe().version(),s=r[o];if(!s)return n;var u=s[i.nameId()];if(!u)return n;var l=t?t.nameId():"__$$anyprop__",p=u[l];if(p||(p=u.__$$anyprop__),!p)return n;for(var c=0,f=p;c=0&&(a=t.substring(i),t=t.substring(0,i));var o=e.lowLevel().unit().resolve(t).absolutePath(),s=void 0;s=O.stringStartsWith(o,"http://")||O.stringStartsWith(o,"https://")?o:F.relative(e.lowLevel().unit().project().getRootPath(),o),s=s.replace(/\\/g,"/"),r=s+a}return r}function h(e,t){for(var n=t.key(),r=t;v.LowLevelProxyNode.isInstance(r);)r=r.originalNode();var i=r.key();if(v.LowLevelProxyNode.isInstance(t)&&i&&i.indexOf("<<")>=0&&t.key().indexOf("<<")<=0&&(i=t.key()),null!=i){var a=e;a.displayName==n&&(a.displayName=i)}}var d=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var m=n(204),y=n(219),v=n(199),g=n(21),A=n(56),E=A.tsInterfaces,_=n(55),T=n(19),S=n(4),N=n(20),I=n(206),b=n(223),R=n(256),M=n(221),C=A.rt,w=C.typeExpressions,P=n(205),L=n(204),O=n(15),D=n(220),U=n(254),x=n(3),k=n(16),F=n(6),B="application/raml+yaml";t.dump=r;var V=function(e){var t,n=e.root();if(n){var r=n.lowLevel();if(r){var i=r.unit();i&&(t=i.absolutePath())}}return t};t.appendSourcePath=i;var K=function(){function e(e){this.options=e,this.nodePropertyTransformers=[new Z],this.nodeTransformersMap={},this.nodePropertyTransformersMap={},this.options=this.options||{},null==this.options.allParameters&&(this.options.allParameters=!0),null==this.options.expandSecurity&&(this.options.expandSecurity=!0),null==this.options.serializeMetadata&&(this.options.serializeMetadata=!1),null==this.options.attributeDefaults&&(this.options.attributeDefaults=!0),null==this.options.expandExpressions&&(this.options.expandExpressions=!0),null==this.options.expandTypes||this.options.expandTypes&&(this.options.typeExpansionRecursionDepth||(this.options.typeExpansionRecursionDepth=0)),this.defaultsCalculator=new D.AttributeDefaultsCalculator(!0,!0),this.nodeTransformers=[new ee,new Q(this.options,this),new te(this.options,this),new se(this),new ne,new re,new ie,new ae,new oe,new pe,new ue(this.options.expandSecurity),new le(this.options.allParameters,this.options.serializeMetadata)],u(this.nodeTransformers,this.nodeTransformersMap),u(this.nodePropertyTransformers,this.nodePropertyTransformersMap)}return e.prototype.init=function(e){this._astRoot=e,this.helpersMap={baseUriParameters:W,uriParameters:H};var t=e.isElement();if(t){e.types();var n=e.asElement(),r=n.definition();if("RAML08"==r.universe().version()&&P.isApiType(r)){var i={};n.elementsOfKind(L.Universe08.Api.properties.schemas.name).forEach(function(e){return i[e.name()]=e}),this.helpersMap.schemaContent=new q(i)}P.isApiSibling(r)?(this.helpersMap.traits=new Y(U.allTraits(n,!1)),this.helpersMap.resourceTypes=new Y(U.allResourceTypes(n,!1))):P.isLibraryType(r)||delete this.options.expandTypes}},e.prototype.astRoot=function(){return this._astRoot},e.prototype.dispose=function(){delete this.helpersMap},e.prototype.dump=function(e){this.init(e);var t=e.isElement(),n=e.parent(),r=!n&&this.options.rootNodeDetails,i=V(e),a=this.dumpInternal(e,null,i,null,!0);if(r){var o=a;if(a={},a.specification=o,t){var s=e.asElement(),u=s.definition();if(u){var l=u.universe(),p=l.version();a.ramlVersion=p;var c=u.nameId();if(!c&&u.isAssignableFrom(A.universesInfo.Universe10.TypeDeclaration.name)){var f=l.type(A.universesInfo.Universe10.TypeDeclaration.name),h={};f.allSubTypes().forEach(function(e){return h[e.nameId()]=!0});for(var d=0,m=u.allSuperTypes();d0&&(E.uses=T),l=E}else{for(var N={},I=c.attrs().concat(c.children().filter(function(e){return!e.isAttr()})),b=0,R=I;b0,m.push(t),v.push(_.actualPath(e,!0))}),g&&(V[t]=m),v.filter(function(e){return null!=e}).length>0&&(K[t]=v.map(function(e){return{path:e}}))}P.isTypeDeclarationDescendant(h)&&P.isTypeProperty(e)&&i.arr.map(function(e){return e.value()}).filter(function(e){return _.isStructuredValue(e)}).length>0&&(d=d[0])}else if(d=H.dumpInternal(i.val,i.prop,n),e.isValueProperty()){var E=i.val.asAttr();if(E.isAnnotatedScalar()){var T=E.annotations().map(function(e){return o.dumpInternal(e,null,n)});T.length>0&&(V[t]=[T])}if(!E.isFromKey()){var S=_.actualPath(E,!0);S&&(K[t]=[{path:S}])}}}else void 0!==u?d=u:H.options.attributeDefaults&&(F=H.defaultsCalculator.attributeDefaultIfEnabled(c,e),null!=F&&(r=r||new y.NodeMetadataImpl,Array.isArray(F)?F=F.map(function(t){return _.isASTPropImpl(t)?o.dumpInternal(t,e,n):t}):_.BasicASTNode.isInstance(F)&&(F=H.dumpInternal(F,e,n)),d=F,null!=d&&e.isMultiValue()&&!Array.isArray(d)&&(d=[d]),B=H.defaultsCalculator.insertionKind(c,e),B==D.InsertionKind.CALCULATED?r.registerCalculatedValue(t):B==D.InsertionKind.BY_DEFAULT&&r.registerInsertedAsDefaultValue(t)));if(d=s(c,e,d,H.nodePropertyTransformersMap),null!=d){if(("type"===t||"schema"==t)&&d&&d.forEach&&"string"==typeof d[0]){var I=d[0].trim(),b="{"===I[0]&&"}"===I[I.length-1],R="<"===I[0]&&">"===I[I.length-1];if(b||R){var M=f(c);if(M){l.schemaPath=M;var C=l.sourceMap;C||(C={},l.sourceMap=C),C.path=M}}}l[t]=d}},H=this,Y=0,q=h.allProperties().concat(h.allCustomProperties());Y0&&(l.scalarsAnnotations=V),this.options.sourceMap&&Object.keys(K).length>0){var z=l.sourceMap;z||(z={},l.sourceMap=z),z.scalarsSources=K}var $=U.getTemplateParametrizedProperties(c);if($&&(l.parametrizedProperties=$),P.isTypeDeclarationDescendant(h)){var J=U.typeFixedFacets(c);J&&(l.fixedFacets=J)}l=s(c,d,l,this.nodeTransformersMap)}this.options.sourceMap&&"object"==typeof l&&i(c,l)}else if(e.isAttr()){var Q=e.asAttr(),Z=Q.value(),C=Q.property(),ee=C.range(),te=ee.isValueType();if(te&&Q.value&&(Z=Q.value(),null==Z&&P.isAnyTypeType(ee))){var ne=Q.lowLevel();if(Q.isAnnotatedScalar()&&(ne=k.find(ne.children(),function(e){return"value"==e.key()})),ne&&ne.valueKind()!=g.Kind.SCALAR){Z=Q.lowLevel().dumpToObject();var re=C.nameId();Q.lowLevel().key()==re&&"object"==typeof Z&&Z.hasOwnProperty(re)&&(Z=Z[re])}}null==Z||"number"!=typeof Z&&"string"!=typeof Z&&"boolean"!=typeof Z?_.isStructuredValue(Z)?(Z=Q.plainValue(),_.BasicASTNode.isInstance(Z)&&(Z=this.dumpInternal(Z,t||Q.property(),n,null,!0))):(S.ASTNode.isInstance(Z)||v.LowLevelProxyNode.isInstance(Z))&&(Z=Z.dumpToObject()):P.isStringTypeDescendant(C.range())&&(Z=""+Z),Z=s(Q,t||Q.property(),Z,this.nodeTransformersMap),l=Z}else{var x=e.lowLevel();l=x?x.dumpToObject():null}return e.setJSON(l),l},e.prototype.getDefaultsCalculator=function(){return this.defaultsCalculator},e.prototype.canBeFragment=function(e){var t=e.definition(),n=[t].concat(t.allSubTypes()),r=n.filter(function(e){return e.getAdapter(A.RAMLService).possibleInterfaces().filter(function(e){return e.nameId()==A.universesInfo.Universe10.FragmentDeclaration.name}).length>0});return r.length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):null==t.range.start?1:null==e.range.start?-1:null==t.range.start?1:null==e.range.start?-1:e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.serializeMeta=function(e,t,n){if(this.options.serializeMetadata){var r=t.definition(),i=P.isMethodType(r)&&t.optional();if(n||i){var a=n||new y.NodeMetadataImpl(!1,!1);i&&a.setOptional(),e.__METADATA__=a.toJSON()}}},e.prototype.applyHelpers=function(e,t,n,r){var i=n.nameId(),a=this.helpersMap[i];if(!a)return e;var o=a.apply(t,e,n,r);return o?o:e},e}();t.JsonSerializer=K;var j=function(){function e(e){this.prop=e,this.arr=[],this.mArr=[],this.isMultiValue=e.isMultiValue()}return e.prototype.registerValue=function(e){this.isMultiValue?this.arr.push(e):this.val=e},e.prototype.registerMeta=function(e){this.isMultiValue&&this.mArr.push(e)},e}(),W={apply:function(e,t,n,r){var i=e.attr(L.Universe10.Api.properties.baseUri.name),o=i?i.value():"";return a(t,o,e,n,r)}},H={apply:function(e,t,n,r){var i=e.attr(L.Universe10.Resource.properties.relativeUri.name);if(!i)return t;var o=i.value();return a(t,o,e,n,r)}},Y=function(){function e(e){this.arr=e}return e.prototype.apply=function(e,t,n,r){return o(e,this.arr,n,r)},e}(),q=function(){function e(e){this.schemasCache08=e}return e.prototype.apply=function(e,t,n,r){var i=null,a=U.schemaContent08Internal(e,this.schemasCache08);return a&&(i=new j(n),i.registerValue(a)),i},e}();t.applyTransformersMap=s;var G=function(){function e(){}return e.prototype.match=function(e,t){if(null==e)return!1;var n=this.registrationInfo(),r=e.universe().version();if((e instanceof A.UserDefinedClass||e.isUserDefined())&&(e=k.find(e.allSuperTypes(),function(e){return!e.isUserDefined()}),null==e))return null==t;var i=n[r];if(!i)return!1;var a=i[e.nameId()];if(!a)return!1;var o=null==t||a[t.nameId()]===!0||a.__$$anyprop__===!0;return o},e}(),X=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=["RAML10","RAML08"]);var a=e.call(this)||this;return a.typeName=t,a.propName=n,a.applyToDescendatns=r,a.restrictToUniverses=i,a}return d(t,e),t.prototype.registrationInfo=function(){var e=this;if(this.regInfo)return this.regInfo;for(var t={},n=[],r=0,i=this.restrictToUniverses;r0&&(e.regInfo[n]=r)}),this.regInfo},t}(G),z=function(){function e(e){this.matcher=e}return e.prototype.match=function(e,t){var n;if(e.isElement())n=e.asElement().definition();else if(e.isAttr()){var r=e.asAttr().property();r&&(n=r.range())}return!!n&&this.matcher.match(n,t)},e.prototype.registrationInfo=function(){return this.matcher.registrationInfo()},e}(),$=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=["RAML10","RAML08"]);var a=e.call(this,new X(t,n,r,i))||this;return a.typeName=t,a.propName=n,a.applyToDescendatns=r,a.restrictToUniverses=i,a}return d(t,e),t}(z),J=function(e){function t(t){var n=e.call(this)||this;return n.matchers=t,n}return d(t,e),t.prototype.registrationInfo=function(){return this.regInfo?this.regInfo:(this.regInfo=l(this.matchers.map(function(e){return e.registrationInfo()})),this.regInfo)},t}(G),Q=function(e){function t(t,n){void 0===t&&(t={});var r=e.call(this,L.Universe10.Resource.name,null,!0)||this;return r.options=t,r.owner=n,r}return d(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[L.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split("/");r.length>0&&0==r[0].length;)r.shift();if(e.relativeUriPathSegments=r,e.absoluteUri=U.absoluteUri(t.asElement()),e.completeRelativeUri=U.completeRelativeUri(t.asElement()),P.isResourceType(t.parent().definition()))e.parentUri=U.completeRelativeUri(t.parent()),e.absoluteParentUri=U.absoluteUri(t.parent());else{e.parentUri="";var i=this.owner.astRoot().asElement()||t.parent(),a=i.attr(L.Universe10.Api.properties.baseUri.name),o=a&&a.value()||"";e.absoluteParentUri=o}}return e},t}($),Z=function(e){function t(){return e.call(this,L.Universe10.TypeDeclaration.name,L.Universe10.ArrayTypeDeclaration.properties.items.name,!0)||this}return d(t,e),t.prototype.transform=function(e,t){if(!e||!Array.isArray(e)||1!=e.length||"object"!=typeof e[0]||!t.isElement())return e;var n,r,i,a=t.asElement(),o=e[0],s=a.definition().universe().type(m.Universe10.TypeDeclaration.name),u=a.definition().universe().type(m.Universe10.ArrayTypeDeclaration.name),l=a.attr("items").lowLevel();do if(i=!0,n=new _.ASTNodeImpl(l,a,s,u.property(m.Universe10.ArrayTypeDeclaration.properties.items.name)),r=n.localType(),r&&M.isEmpty(r)&&1==r.superTypes().length){var p=l.children().filter(function(e){return"type"==e.key()});if(1==p.length){if(p[0].resolvedValueKind()==g.Kind.SCALAR){o=p[0].value();break}l=p[0],i=!1,o=o.type[0]}}while(!i);return r.getExtra(E.TOP_LEVEL_EXTRA)&&"object"==typeof o&&!Array.isArray(o)&&(o=o.type),Array.isArray(o)||(o=[o]),o},t}($),ee=function(e){function t(){return e.call(this,L.Universe10.Method.name,null,!0)||this}return d(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=t.parent();return P.isResourceType(n.definition())?(e.parentUri=U.completeRelativeUri(n),e.absoluteParentUri=U.absoluteUri(n),e):e},t}($),te=function(e){function t(t,n){void 0===t&&(t={});var r=e.call(this,L.Universe10.TypeDeclaration.name,null,!0)||this;return r.options=t,r.owner=n,r.facetsToExtract={maxItems:!0,minItems:!0,discriminatorValue:!0,discriminator:!0,pattern:!0,minLength:!0,maxLength:!0,enum:!0,minimum:!0,maximum:!0,format:!0,fileTypes:!0},r}return d(t,e),t.prototype.transform=function(e,t,n){var r=this,a=t.property();if(this.options.expandTypes&&t&&t.isElement()){var o=t.parent();if(o&&P.isTypeDeclarationDescendant(o.definition()))return{};var s=t.asElement().parsedType(),u=null!=T.typeOfContainingTemplate(t),l=a&&P.isAnnotationTypesProperty(a),p=new R.TypeExpander({node:t.asElement(),typeCollection:t.types(),typeExpansionRecursionDepth:this.options.typeExpansionRecursionDepth,serializeMetadata:this.options.serializeMetadata,sourceMap:this.options.sourceMap,isInsideTemplate:u,isAnnotationType:l}).serializeType(s);return a&&P.isParametersProperty(a)&&(p.name&&O.stringEndsWith(p.name,"?")?(p.name=p.name.substring(0,p.name.length-1),p.hasOwnProperty("required")||(p.required=!1)):p.hasOwnProperty("required")||(p.required=!0,this.appendMeta(p,"required","insertedAsDefault")),p.displayName&&O.stringEndsWith(p.displayName,"?")&&(p.displayName=p.displayName.substring(0,p.displayName.length-1)), +e.hasOwnProperty("enum")&&!p.hasOwnProperty("enum")&&(p.enum=e.enum,this.appendMeta(p,"enum","calculated")),e.__METADATA__&&e.__METADATA__.calculated===!0&&this.appendMeta(p,null,"calculated")),a&&P.isBodyProperty(a)&&(p.name!=e.name&&(p.name=e.name,p.displayName=e.displayName),this.appendMeta(p,"name","calculated",e.__METADATA__),this.appendMeta(p,"displayName","calculated",e.__METADATA__)),e&&"object"==typeof e&&e.hasOwnProperty("parametrizedProperties")&&(p.parametrizedProperties=e.parametrizedProperties),p}var c=Array.isArray(e);if(c&&0==e.length)return e;var f=c?e[0]:e;this.options.sourceMap&&i(t,f);var h=f[A.universesInfo.Universe10.ObjectTypeDeclaration.properties.additionalProperties.name];"boolean"!=typeof h&&h&&delete f[A.universesInfo.Universe10.ObjectTypeDeclaration.properties.additionalProperties.name];var d=a,m=t.asElement().localType().getExtra(E.TOP_LEVEL_EXTRA),y=a&&(P.isTypesProperty(a)||P.isSchemasProperty(a));if(y||!m){var v=U.typeExample(t.asElement(),this.options.dumpXMLRepresentationOfExamples);if(v)f.examples=[v];else{var g=U.typeExamples(t.asElement(),this.options.dumpXMLRepresentationOfExamples);g.length>0&&(f.examples=g)}delete f.example,null!=f.examples&&(f.simplifiedExamples=f.examples.map(function(e){if(null==e)return e;var t=e.value;return null==t?t:"object"==typeof t?JSON.stringify(t):t}))}if(f.hasOwnProperty("schema")){if(f.hasOwnProperty("type")){var _=f.type;Array.isArray(_)||(_=[_],f.type=_),f.type=k.unique(_)}else f.type=f.schema;delete f.schema}n&&P.isSchemaProperty(n)&&"schema"==f.name&&(f.name="type","schema"==f.displayName&&(f.displayName="type")),Array.isArray(f.type)||(f.type=[f.type]);var S=t.isElement()&&t.asElement().parsedType();if(S&&S.isUnion()){var N=t.root().types().getTypeRegistry();S.declaredFacets().filter(function(e){return!f.hasOwnProperty(e.facetName())&&(!!e.validateSelf(N).isOk()&&(!!r.facetsToExtract[e.facetName()]&&("discriminatorValue"!=e.facetName()||e.isStrict())))}).forEach(function(e){return f[e.facetName()]=e.value()})}if(f.mediaType=B,t&&t.isElement()){var I=t.asElement(),b=I.localType().isExternal()?I.localType():null;if(!b)for(var M=0,C=I.localType().allSuperTypes();M"===K[K.length-1];j?f.typePropertyKind="JSON":W?f.typePropertyKind="XML":f.typePropertyKind="TYPE_EXPRESSION"}else f.typePropertyKind="TYPE_EXPRESSION"}else"object"==typeof _&&(f.typePropertyKind="INPLACE");return this.options.expandExpressions&&this.processExpressions(f,t),e},t.prototype.processExpressions=function(e,t){this.parseExpressions(e,t)},t.prototype.parseExpressions=function(e,t){var n=e.type,r=Array.isArray(n)&&n.map(function(e){return"string"==typeof e});if(this.parseExpressionsForProperty(e,"items",t),this.parseExpressionsForProperty(e,"type",t),r)for(var i=t.asElement().parsedType(),a=function(t){if(!r[t])return"continue";var n=e.type[t];if(n&&"object"==typeof n){var a=!1;o.isEmptyUnion(i)||1!=e.type.length||(a=Object.keys(n).filter(function(t){return"type"!=t&&!e.hasOwnProperty(t)}).length>0),a?Object.keys(n).forEach(function(t){e[t]=n[t]}):n.name||(n.name="type",n.displayName="type",n.typePropertyKind="TYPE_EXPRESSION",o.appendMeta(n,"displayName","calculated"))}},o=this,s=0;s=0)if(p=I.escapeTemplateParameters(s),p.status==I.ParametersEscapingStatus.OK){if(u=p.resultingString,l=I.checkExpression(u),!l){a.push(s);continue}}else if(p.status==I.ParametersEscapingStatus.ERROR){a.push(s);continue}var c=void 0;try{c=w.parse(u)}catch(e){a.push(s);continue}if(c){var f=this.expressionToObject(c,p,n,e.sourceMap);null!=f&&a.push(f)}else a.push(s)}else{var h=this.options.typeReferences?this.typeReference(n,s):s;a.push(h)}}else a.push(s)}e[t]=i?a[0]:a}},t.prototype.expressionToObject=function(e,t,n,r){var i,a=0;if("name"==e.type){var o=e;if(a=o.arr,i=o.value,t.status==I.ParametersEscapingStatus.OK){var s=I.unescapeTemplateParameters(i,t.substitutions);s.status==I.ParametersEscapingStatus.OK&&(i=s.resultingString)}this.options.typeReferences&&(i=this.typeReference(n,i))}else if("union"==e.type){var u=e;i={type:["union"],anyOf:[]};for(var l=c(u),p=0,f=l;p0)for(;a-- >0;)i={type:["array"],items:[i]},a>0&&(i.name="items",i.displayName="items",i.typePropertyKind="TYPE_EXPRESSION",this.appendMeta(i,"displayName","calculated"),this.appendSource(i,r));return"object"==typeof i&&(i.typePropertyKind="TYPE_EXPRESSION",i.sourceMap=r),i},t.prototype.typeReference=function(e,t){if(!t)return t;var n=this.owner.astRoot(),r=n.isElement()&&n.asElement().types(),i=r&&r.getTypeRegistry().getByChain(t);if(i)if(i.isBuiltin());else{var a=i.getExtra(C.SOURCE_EXTRA),o=void 0;_.BasicASTNode.isInstance(a)?o=a.lowLevel():S.ASTNode.isInstance(a)||N.AstNode.isInstance(a)||v.LowLevelProxyNode.isInstance(a)?o=a:_.LowLevelWrapperForTypeSystem.isInstance(a)&&(o=a.node());var s=n.lowLevel();if(s.actual().libExpanded)t="#/specification/types/"+i.name();else{var u="",l=s.unit(),p=o.unit();if(p.absolutePath()!=l.absolutePath()){var c=p.project().namespaceResolver(),f=c.expandedPathMap(l)[p.absolutePath()];u+=f.includePath}t=u+"#/specification/types/"+i.name()}}else;return t},t}($),ne=function(e){function t(){return e.call(this,new J([new X(L.Universe10.TypeDeclaration.name,L.Universe10.LibraryBase.properties.annotationTypes.name,!0,["RAML10"]),new X(L.Universe10.TypeDeclaration.name,L.Universe10.LibraryBase.properties.types.name,!0,["RAML10"]),new X(L.Universe10.Trait.name,L.Universe10.LibraryBase.properties.traits.name,!0,["RAML10"]),new X(L.Universe10.AbstractSecurityScheme.name,L.Universe10.LibraryBase.properties.securitySchemes.name,!0,["RAML10"]),new X(L.Universe10.ResourceType.name,L.Universe10.LibraryBase.properties.resourceTypes.name,!0,["RAML10"])]))||this}return d(t,e),t.prototype.transform=function(e,t){return t.parent()&&t.parent().lowLevel().libProcessed?(h(e,t.lowLevel()),e):e},t}(z),re=function(e){function t(){return e.call(this,new J([new X(L.Universe10.ResourceType.name,null,!0),new X(L.Universe10.Trait.name,null,!0),new X(L.Universe10.Method.name,null,!0),new X(L.Universe10.Response.name,null,!0),new X(L.Universe08.Parameter.name,null,!0),new X(L.Universe08.BodyLike.name,null,!0),new X(L.Universe10.TypeDeclaration.name,null,!0)]))||this}return d(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=A.universesInfo.Universe10.Trait.properties.parametrizedProperties.name,r=e[n];return r&&(Object.keys(r).forEach(function(t){e[t]=r[t]}),delete e[n]),e},t}(z),ie=function(e){function t(){return e.call(this,L.Universe08.GlobalSchema.name,L.Universe08.Api.properties.schemas.name,!0,["RAML08"])||this}return d(t,e),t.prototype.transform=function(e,t){return Array.isArray(e)?e:(e.sourceMap&&(delete e.sourceMap.scalarsSources,0==Object.keys(e.sourceMap).length&&delete e.sourceMap),e.name=e.key,delete e.key,e)},t}($),ae=function(e){function t(){return e.call(this,new J([new X(L.Universe10.Api.name,L.Universe10.Api.properties.protocols.name,!0),new X(L.Universe10.MethodBase.name,L.Universe10.MethodBase.properties.protocols.name,!0)]))||this}return d(t,e),t.prototype.transform=function(e,t){return"string"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},t}(z),oe=function(e){function t(){return e.call(this,new J([new X(L.Universe10.SecuritySchemeRef.name,L.Universe10.Api.properties.securedBy.name,!0),new X(L.Universe10.TraitRef.name,L.Universe10.MethodBase.properties.is.name,!0),new X(L.Universe10.ResourceTypeRef.name,L.Universe10.ResourceBase.properties.type.name,!0)]))||this}return d(t,e),t.prototype.transform=function(e,t){return null==e?null:Array.isArray(e)?e:this.toSimpleValue(e)},t.prototype.toSimpleValue=function(e){if("object"!=typeof e)return{name:e};var t={name:e.name},n=e.value;return n&&Object.keys(n).forEach(function(e){t.parameters=t.parameters||[],t.parameters.push({name:e,value:n[e]})}),t},t}(z),se=function(e){function t(t){var n=e.call(this,L.Universe10.LibraryBase.name,null,!0,["RAML10"])||this;return n.dumper=t,n}return d(t,e),t.prototype.getReferencePatcher=function(){return this.referencePatcher=this.referencePatcher||new b.ReferencePatcher,this.referencePatcher},t.prototype.transform=function(e,t){var n=t.lowLevel(),r=n&&n.actual(),i=r&&r.libExpanded;if(!i)return e;var a=e[A.universesInfo.Universe10.FragmentDeclaration.properties.uses.name];if(!a||!Array.isArray(a)||0==a.length)return e;var o=n.unit(),s=o.project().namespaceResolver();if(!s)return e;var u=s.expandedNSMap(o);if(!u)return e;for(var l=A.universesInfo.Universe10.Library.properties.usage.name,p=A.universesInfo.Universe10.Annotable.properties.annotations.name,c=0,f=a;c0){for(var _=t.root().definition().universe().type(L.Universe10.Annotable.name),T=_.property(L.Universe10.Annotable.properties.annotations.name),S=[],N=0,I=g;N0&&(h[p]=S)}}}return e},t}($),ue=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this,new J([new X(L.Universe10.Api.name,null,!0),new X(L.Universe10.Overlay.name,null,!0),new X(L.Universe10.Extension.name,null,!0),new X(L.Universe10.Library.name,null,!0)]))||this;return n.enabled=t,n}return d(t,e),t.prototype.match=function(t,n){return!!this.enabled&&e.prototype.match.call(this,t,n)},t.prototype.registrationInfo=function(){return this.enabled?e.prototype.registrationInfo.call(this):null},t.prototype.transform=function(e,t){return this.processApi(e),e},t.prototype.processApi=function(e){var t=e[A.universesInfo.Universe10.Api.properties.securitySchemes.name];if(t&&0!=t.length){for(var n={},r=0,i=t;r0){var u=a.settings;u||(u={},a.settings=u);for(var l=0,p=s;l0&&(e[n]=i);for(var a=t.concat(r),o=e[A.universesInfo.Universe10.ResourceBase.properties.methods.name]||[],s=0,u=o;s0&&(e[n]=r)},t.prototype.appendSecurityData=function(e){for(var t=A.universesInfo.Universe10.Operation.properties.headers.name,n=A.universesInfo.Universe10.Operation.properties.responses.name,r=A.universesInfo.Universe10.Operation.properties.queryParameters.name,i=e[A.universesInfo.Universe10.Method.properties.securedBy.name]||[],a=0,o=i;a0&&(e[t]=(e[t]||[]).concat(l)),p.length>0&&(e[n]=(e[n]||[]).concat(p)),c.length>0&&(e[r]=(e[r]||[]).concat(c))}}},t.prototype.extract=function(e,t){var n=e[t]||[];if(n=JSON.parse(JSON.stringify(n)),this.serializeMetadata)for(var r=0,i=n;r=0)return!1;if("discriminatorValue"==t){var n=e.isStrict;return"function"!=typeof n||n.call(e)}if("__METADATA__"==t){var r=e.value(),i=r.primitiveValuesMeta;return!(!i&&0==Object.keys(r).length)&&(!i||!!Object.keys(i).filter(function(e){return"displayName"!=e&&"required"!=e}).length)}return!0});return 0==n.length}function o(e){if(!e)return null;var t=h.find(e.declaredFacets(),function(e){return e.kind()==f.MetaInformationKind.TypeAttributeValue});return t?t.value():null}function s(e,t){if(!e||!m.ASTNodeImpl.isInstance(e))return null;var n=e.attr("type")||e.attr("schema")||e;return m.resolveSchemaFragment(n,t)}var u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var l=n(56),p=n(208),c=l.rt,f=c.tsInterfaces,h=n(16),d=n(21),m=n(55),y=n(206),v=l.rt.typeExpressions,g=n(255),A=function(){function e(e,t,n,r,i,a,o){void 0===i&&(i=!1),void 0===o&&(o=null),this._original=e,this._name=t,this._type=n,this._required=r,this.isFacet=i,this._metadata=a,this._src=o}return e.prototype.name=function(){return this._original?this._original.name():this._name},e.prototype.original=function(){return this._original},e.prototype.append=function(t,n){var r;if(this._type.isUnion()){var i=this._type,a=n.branchingOption(i.branchId()),o=i.options()[a];if(o.isBuiltIn())r=o;else{var s=new T(o.original(),[],null,[],[],o.name());o.append(s,n),r=s}}else{var s=new T(this._type.original(),[],null,[],[],this._type.name());this._type.append(s,n),r=s}var u=new e(this._original,this._name,r,this.required(),this.isFacet,this.metadata(),this._src);this.isFacet?t.addFacet(u):t.addProperty(u)},e.prototype.setType=function(e){this._type=e},e.prototype.type=function(){return this._type},e.prototype.required=function(){return null!=this._required?this._required:this._original.required()},e.prototype.metadata=function(){return this._metadata},e.prototype.annotations=function(){return this._original?this._original.annotations():[]},e.prototype.source=function(){var e=this._original||this._src;return e?new T(e.declaredAt(),[],null,[],[],null):null},e}();t.PropertyEntry=A;var E=function(){function e(e,t){this._original=e,this._superTypes=t,this._id=""+_++}return e.prototype.id=function(){return this._id},e.prototype.branchingRegistry=function(){return this._branchingRegistry},e.prototype.setBranchingRegistry=function(e){this._branchingRegistry=e},e.prototype.name=function(){return this._original&&this._original.name()},e.prototype.isUnion=function(){return!1},e.prototype.isBuiltIn=function(){return!1},e.prototype.isExternal=function(){if(this._original)return this._original.isExternal();for(var e=0,t=this.superTypes();e0){for(var i={},a=0,o=this._properties;a0)for(var h=0,d=this._facets;hthis.arr.length-1)throw new Error("Branch index exceeds total branches count");return this.arr[e]},e.prototype.typeMap=function(){return this._typeMap},e.prototype.expander=function(){return this._expander},e}(),M=function(){function e(e){this._expander=e,this.arr=[]}return e.prototype.expander=function(){return this._expander},e.prototype.nextBranchId=function(e){var t=this.arr.length;return this.arr.push(e),t},e.prototype.possibleBranches=function(e){for(var t=this,n=[],r=[],i=1,a=1,o=this.arr.length,s=0;s=0;n&&(t=this.expandHierarchy(t,t.branchingRegistry()));var r=this.dump(t,n);return r},e.prototype.createHierarchyEntry=function(e,t,n,r){void 0===n&&(n=new b);var i=!1;r||(i=!0,r=new M(this));var a=this.doCreateHierarchyEntry(e,t,n,r);return i&&a.setBranchingRegistry(r),a},e.prototype.doCreateHierarchyEntry=function(e,t,n,r){if(void 0===n&&(n=new b),e.isBuiltin()){var i=n.typeByName(e.name());return i||(i=new S(e),n.addType(i)),i}var s=0;if(!e.name()&&e.isEmpty()&&2==e.superTypes().length&&1==e.superTypes().filter(function(e){return"unknown"!=e.name()}).length&&(e=h.find(e.superTypes(),function(e){return"unknown"!=e.name()})),e.name()&&n.hasTypeByName(e.name())){if(t<=0)return n.typeByName(e.name());s=t,t--}if(this.options.isInsideTemplate&&1==e.superTypes().length){var u=void 0,l=o(e);if(u=l?l:e.superTypes()[0].isBuiltin()?e.name():e.superTypes()[0].name(),u&&u.indexOf("<<")>=0){var p=this.processExpression(u,t,n,r,e);if(p)return p}}if(e.isUnion()&&0==e.superTypes().length){for(var c=e.options(),f=[],d=0,m=c;d=0?e.properties():e.declaredProperties();if(t>=0&&O.length>1){for(var f=[],U=0,x=O;U0)for(var V=0,K=D;V=0?e.allDefinedFacets():e.definedFacets();if(X.length>0)for(var z=0,$=X;z<$.length;z++){var j=$[z],J=this.processPropertyHierarchy(j,t,e,n,r,!0);A.addFacet(J)}return t==this.options.typeExpansionRecursionDepth&&n.removeType(A),A},e.prototype.processExpression=function(e,t,n,r,i){void 0===n&&(n=new b);var a=y.checkExpression(e);if(!a)return null;var o,s=y.escapeTemplateParameters(e);if(s.status!=y.ParametersEscapingStatus.OK)return null;if(o=s.resultingString,a=y.checkExpression(o),!a)return null;var u;try{if(u=v.parse(o),!u)return null;var l=this.expressionToObject(u,s,t,n,r,i);return l}catch(e){return null}},e.prototype.expressionToObject=function(e,t,n,r,i,a){void 0===r&&(r=new b);var o,s=0;if("name"==e.type){var u=e;s=u.arr;var p=u.value;if(t.status==y.ParametersEscapingStatus.OK){var c=y.unescapeTemplateParameters(p,t.substitutions);c.status==y.ParametersEscapingStatus.OK&&(p=c.resultingString)}var f=l.rt.builtInTypes().get(p);if(f||(f=this.options.typeCollection.getType(p)),f)o=this.createHierarchyEntry(f,n,r,i);else{var h=new T(l.rt.builtInTypes().get("unknown"),[],null,[],[],"unknown"),d=0===s?a:null;o=new T(d,[h],null,[],[],p),o.setTypeAttributeValue(p)}}else if("union"==e.type){for(var m=e,v=g.toOptionsArray(m),A=[],E=0,_=v;E<_.length;E++){var I=_[E];if(null==I){o=null;break}var R=this.expressionToObject(I,t,n,r,i);A.push(R)}var M=i.nextBranchId(A.length);o=new N(a,A,M)}else if("parens"==e.type){var C=e;s=C.arr,o=this.expressionToObject(C.expr,t,n,r,i,a)}if(null!=o&&s>0)for(var w=new S(l.rt.builtInTypes().get("array"));s-- >0;){var d=0===s?a:null;o=new T(null,[w],o,[],[],null)}return o},e.prototype.extractParserMetadata=function(e){var t,n=e.declaredFacets().filter(function(e){return"__METADATA__"==e.facetName()});return n.length&&(t=n[0].value()),t},e.prototype.processPropertyHierarchy=function(e,t,n,i,o,s){void 0===s&&(s=!1);var u=e.range(),l=this.extractParserMetadata(u),p=e.declaredAt(),c=t;if(p.name()&&(!n.name()||p.name()!=n.name())&&i.hasTypeByName(p.name())&&t<=0){var f=i.property(p.name(),e.name());if(f)return f;c--}a(u)&&(u=u.superTypes()[0],t>=0&&r(l,this.extractParserMetadata(u)));var h=new A(e,null,null,e.required(),s,l);p.name()&&i.addProperty(p.name(),e.name(),h);var d=this.createHierarchyEntry(u,c,i,o);return h.setType(d),h},e.prototype.expandHierarchy=function(e,t,n){if(!t)return e;for(var r=[],i=0,a=t.possibleBranches(n);i3)r.type=[o[0].name()],r.typePropertyKind="TYPE_EXPRESSION";else{var u=e.schema();if(u){u=u.trim();var l=s(this.options.node,u);l&&(u=l),r.type=[u],e.schemaPath()&&(r.schemaPath=e.schemaPath());var p="{"===u[0]&&"}"===u[u.length-1],c="<"===u[0]&&">"===u[u.length-1];p?r.typePropertyKind="JSON":c?r.typePropertyKind="XML":r.typePropertyKind="TYPE_EXPRESSION"}}else if(e.isUnion()){r.typePropertyKind="TYPE_EXPRESSION";var f=e,h=f.options();if(h.length>0){r.type=["union"];var d=[];r.anyOf=d;for(var m=0,y=h;m=0&&(g=A[0])}else g.name&&g.name.indexOf("<<")>=0&&(g=g.name);d.push(g)}}}}else{o.length&&(o[0].name()||o[0].isUnion())?r.typePropertyKind="TYPE_EXPRESSION":r.typePropertyKind="INPLACE";var E=e,_=void 0;if(this.options.isInsideTemplate){if(_=e.typeAttributeValue(),!_){var T=e.original()&&e.original().superTypes();if(T&&1==T.length&&T[0].isUnknown()){var S=T[0].name();S.indexOf("<<")>=0&&(_=S)}}_&&!Array.isArray(_)&&(_=[_])}if(_)r.type=_,r.typePropertyKind="TYPE_EXPRESSION";else if(t){var N=E.possibleBuiltInTypes();N.length>0&&(r.type=N)}else{for(var N=[],I=0,b=o;I0){var P=[];r.properties=P;for(var L=0,O=w;L0){var k=[];r.facets=k;for(var F=0,B=x;F1&&(W=j.superTypes()),r.items=W.map(function(r){if(!t&&r.name())return r.name();var i=n.dump(j,t);if(n.appendSourceFromExtras(i,E),j.isUnion()||i.name||(i.name="items",i.displayName="items",n.appendMeta(i,"displayName","calculated")),n.options.isInsideTemplate)if(i.name==e.name()&&i.type){var a=i.type;a.length&&a[0].indexOf("<<")>=0&&(i=a[0])}else i.name&&i.name.indexOf("<<")>=0&&(i=i.name);return i})}this.dumpFacets(e,r,t)}var H=e.examples(t);if(H.length>0){var Y=[],q=[];r.examples=q,r.simplifiedExamples=Y;for(var G=0,X=H;G=0&&(i={type:[i.name],typePropertyKind:"TYPE_EXPRESSION"}),i.__METADATA__&&(i.__METADATA__=JSON.parse(JSON.stringify(i.__METADATA__))),(null==i.displayName||a.name())&&(i.displayName=e.name(),this.appendMeta(i,"displayName","calculated"))),this.appendSourceFromExtras(i,e.source()||t),i.name=e.name(),r||(i.required=e.required()),!r&&e.required()){var o=!1;if(e.original()){if(e.original().range().getExtra("HAS_FACETS")){var s=e.original().range().getExtra("HAS_FACETS");s.length&&s.indexOf("required")>=0&&(o=!0)}o||this.appendMeta(i,"required","insertedAsDefault")}else a.name()||a.isBuiltIn()?this.appendMeta(i,"required","insertedAsDefault"):this.sourceHasKey(a,"required")||this.appendMeta(i,"required","insertedAsDefault")}var u=a;if((a.isBuiltIn()||a.original()&&a.original().isBuiltin())&&e.original()){var l=e.original().range();l.isBuiltin()||(u=new T(l,[],null,[],[],null))}if((n||u!=a)&&this.checkIfTypePropertyIsDefault(u,i),this.checkIfPropertyTypeIsCalculated(i,e,r,n),e.annotations()&&e.annotations().length){var p=i.scalarsAnnotations;p||(p={},i.scalarsAnnotations=p),p.required=[[]];for(var c=0,f=e.annotations();c0){var n=[];t.annotations=n,e.forEach(function(e){n.push({name:e.name(),value:e.value()})})}},e.prototype.dumpFacets=function(e,t,n){var r=[];if(e.original()){r=n?e.original().allCustomFacets()||[]:e.original().customFacets()||[];var a={};e.original().allDefinedFacets().forEach(function(e){return a[e.name()]=!0}),r=r.filter(function(e){return a[e.facetName()]===!0})}if(this.options.isInsideTemplate){var o=[];r=r.filter(function(e){return!(e.facetName().indexOf("<<")>=0)||(o.push(e),!1)});for(var s=0,u=o;s0){var p=[];t.fixedFacets=p,r.forEach(function(e){try{var t=e.value();"object"==typeof t&&JSON.stringify(t),p.push({name:e.facetName(),value:t})}catch(t){console.log("Error while dumping "+e.facetName()),console.log(t)}})}for(var c=e.possibleBuiltInTypes({}),h=i(c),d={},m=n?e.allFacets():e.declaredFacets(),y=0,v=m;y1)this.removeMeta(e,"type");else if(1==u.length&&u[0].resolvedValueKind()==d.Kind.SCALAR){var p=u[0];r&&!l.rt.builtInTypes().get(p.value())||this.removeMeta(e,"type")}}else{var c=h.find(s.children(),function(e){return"type"==e.key()});if(c||(c=h.find(s.children(),function(e){return"schema"==e.key()})),c)if(c.resolvedValueKind()==d.Kind.SEQ){var u=c.children();if(u.length>1)this.removeMeta(e,"type");else if(1==u.length&&u[0].resolvedValueKind()==d.Kind.SCALAR){var p=u[0];r&&!l.rt.builtInTypes().get(p.value())||this.removeMeta(e,"type")}}else c.resolvedValueKind()==d.Kind.SCALAR&&(r&&!l.rt.builtInTypes().get(c.value())||this.removeMeta(e,"type"))}}}}}},e.prototype.patchDisplayName=function(e,t){if(!t.displayName&&t.name){t.displayName=t.name;var n=void 0,r=e.original()&&e.original().getExtra("SOURCE");if(r)if(m.LowLevelWrapperForTypeSystem.isInstance(r))n=r.node();else if(m.ASTNodeImpl.isInstance(r)){n=r.lowLevel()}n?g.patchDisplayName(t,n):t.displayName=t.name,this.appendMeta(t,"displayName","calculated")}t.hasOwnProperty("displayName")&&null!=t.displayName&&(t.displayName=""+t.displayName)},e}();t.TypeExpander=C;var w=function(){function e(){this.map={},this.init()}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.init=function(){for(var e=[l.getUniverse("RAML10").type(l.universesInfo.Universe10.TypeDeclaration.name),l.getUniverse("RAML10").type(l.universesInfo.Universe10.StringTypeDeclaration.name),l.getUniverse("RAML10").type(l.universesInfo.Universe10.FileTypeDeclaration.name)],t=0,n=e;to)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(258);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BodyLike:function(e,t){return new o.BodyLikeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateTypeDeclaration:function(e,t){return new o.DateTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},ExampleString:function(e){return new o.ExampleStringImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUri:function(e){return new o.FixedUriImpl(e)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},GlobalSchema:function(e,t){return new o.GlobalSchemaImpl(e,t)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},JSONBody:function(e,t){return new o.JSONBodyImpl(e,t)},JSONExample:function(e){return new o.JSONExampleImpl(e)},JSonSchemaString:function(e){return new o.JSonSchemaStringImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},Parameter:function(e,t){return new o.ParameterImpl(e,t)},ParameterLocation:function(e){return new o.ParameterLocationImpl(e)},RAMLSimpleElement:function(e,t){return new o.RAMLSimpleElementImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLBody:function(e,t){return new o.XMLBodyImpl(e,t)},XMLExample:function(e){return new o.XMLExampleImpl(e)},XMLSchemaString:function(e){return new o.XMLSchemaStringImpl(e)}}},function(e,t,n){"use strict";function r(e){var t=w.getUniverse("RAML08"),n=t.type("Method"),r=C.createStubNode(n,null,e);return r}function i(e){var t=w.getUniverse("RAML08"),n=t.type("StringTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function a(e){var t=w.getUniverse("RAML08"),n=t.type("BooleanTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function o(e){var t=w.getUniverse("RAML08"),n=t.type("NumberTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function s(e){var t=w.getUniverse("RAML08"),n=t.type("IntegerTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function u(e){var t=w.getUniverse("RAML08"),n=t.type("DateTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function l(e){var t=w.getUniverse("RAML08"),n=t.type("FileTypeDeclaration"),r=C.createStubNode(n,null,e);return r}function p(e){var t=w.getUniverse("RAML08"),n=t.type("XMLBody"),r=C.createStubNode(n,null,e);return r}function c(e){var t=w.getUniverse("RAML08"),n=t.type("JSONBody"),r=C.createStubNode(n,null,e);return r}function f(e){var t=w.getUniverse("RAML08"),n=t.type("SecuritySchemePart"),r=C.createStubNode(n,null,e);return r}function h(e){var t=w.getUniverse("RAML08"),n=t.type("Trait"),r=C.createStubNode(n,null,e);return r}function d(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth1SecuritySchemeSettings"),r=C.createStubNode(n,null,e);return r}function m(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth2SecuritySchemeSettings"),r=C.createStubNode(n,null,e);return r}function y(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth2SecurityScheme"),r=C.createStubNode(n,null,e);return r}function v(e){var t=w.getUniverse("RAML08"),n=t.type("OAuth1SecurityScheme"),r=C.createStubNode(n,null,e);return r}function g(e){var t=w.getUniverse("RAML08"),n=t.type("BasicSecurityScheme"),r=C.createStubNode(n,null,e);return r}function A(e){var t=w.getUniverse("RAML08"),n=t.type("DigestSecurityScheme"),r=C.createStubNode(n,null,e);return r}function E(e){var t=w.getUniverse("RAML08"),n=t.type("CustomSecurityScheme"),r=C.createStubNode(n,null,e);return r}function _(e){var t=w.getUniverse("RAML08"),n=t.type("GlobalSchema"),r=C.createStubNode(n,null,e);return r}function T(e){var t=w.getUniverse("RAML08"),n=t.type("DocumentationItem"),r=C.createStubNode(n,null,e);return r}function S(e,t,n){return L.loadApi(e,t,n).getOrElse(null)}function N(e,t,n){return L.loadApi(e,t,n).getOrElse(null)}function I(e,t,n){return L.loadApiAsync(e,t,n)}function b(e,t,n){return L.loadRAMLAsync(e,t,n)}function R(e){return L.getLanguageElementByRuntimeType(e)}var M=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var C=n(3),w=n(56),P=n(219),L=n(1),O=n(259),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.title=function(){return e.prototype.attribute.call(this,"title",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate("title").setValue(""+e),this},t.prototype.version=function(){return e.prototype.attribute.call(this,"version",this.toString)},t.prototype.setVersion=function(e){return this.highLevel().attrOrCreate("version").setValue(""+e),this},t.prototype.baseUri=function(){return e.prototype.attribute.call(this,"baseUri",function(e){return new Me(e)})},t.prototype.baseUriParameters_original=function(){return e.prototype.elements.call(this,"baseUriParameters")},t.prototype.uriParameters=function(){return e.prototype.elements.call(this,"uriParameters")},t.prototype.protocols=function(){return e.prototype.attributes.call(this,"protocols",this.toString)},t.prototype.setProtocols=function(e){return this.highLevel().attrOrCreate("protocols").setValue(""+e),this},t.prototype.mediaType=function(){return e.prototype.attribute.call(this,"mediaType",function(e){return new Ie(e)})},t.prototype.schemas=function(){return e.prototype.elements.call(this,"schemas")},t.prototype.traits_original=function(){return e.prototype.elements.call(this,"traits")},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,"securedBy",function(e){return new pe(e)})},t.prototype.securitySchemes=function(){return e.prototype.elements.call(this,"securitySchemes")},t.prototype.resourceTypes_original=function(){return e.prototype.elements.call(this,"resourceTypes")},t.prototype.resources=function(){return e.prototype.elements.call(this,"resources")},t.prototype.documentation=function(){return e.prototype.elements.call(this,"documentation")},t.prototype.wrapperClassName=function(){return"ApiImpl"},t.prototype.kind=function(){return"Api"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat("Api")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat("RAML08.ApiImpl")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&"function"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t=0&&(l=t.indexOf("}",++c),!(l<0));c=t.indexOf("{",l)){var f=t.substring(c,l);if(p[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var h=i&&z.actualUnit(i),d=new Y.StringTypeDeclarationImpl(f);d.setName(f);var m=d.highLevel();m.lowLevel().setUnit(h),m.setParent(a),d.meta().setCalculated(),m.patchProp(o),u.push(d)}}return Object.keys(s).filter(function(e){return!p[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function W(e){var t=e.schema();if(null==t)return null;var n=t.value();if(!n)return null;if(ee.stringStartsWith(n,"{")||ee.stringStartsWith(n,"[")||ee.stringStartsWith(n,"<"))return n;var r=e.highLevel(),i=r.root(),a=i.elementsOfKind($.Universe08.Api.properties.schemas.name),o=ae.find(a,function(e){return e.name()==n});if(!o)return n;if(!o.getKind||o.getKind()!=X.NodeKind.NODE)return n;if(o.definition().key()!=$.Universe08.GlobalSchema)return n;var s=o.attr($.Universe08.GlobalSchema.properties.value.name);return null==s?null:s.value()}function H(e){var t=e.highLevel();if(null==t)return null;var n=t.lowLevel();if(null==n)return null;var r=n.children().filter(function(e){return e.key().indexOf("<<")>=0});if(0==r.length)return null;var i=new G.TypeInstanceImpl(r);return i}Object.defineProperty(t,"__esModule",{value:!0});var Y=n(258),q=n(257),G=n(219),X=n(198),z=n(55),$=n(204),J=n(217),Q=n(199),Z=n(19),ee=n(15),te=n(209),ne=n(205),re=n(4),ie=n(6),ae=n(16),oe=n(207);t.load=r,t.expandTraitsAndResourceTypes=i,t.completeRelativeUri=a,t.absoluteUri=o,t.qName=s,t.traitsPrimary=u,t.allTraits=l,t.resourceTypesPrimary=p,t.allResourceTypes=c,t.relativeUriSegments=h,t.parentResource=d,t.parent=m,t.childResource=y,t.getResource=v,t.childMethod=g,t.getMethod=A,t.ownerApi=_,t.methodId=T,t.isOkRange=S,t.allResources=N;t.uriParametersPrimary=I,t.uriParameters=b,t.baseUriParametersPrimary=R,t.baseUriParameters=M,t.absoluteUriParameters=C,t.protocolsPrimary=w,t.allProtocols=P,t.securedByPrimary=L,t.allSecuredBy=O,t.securitySchemeName=D,t.securityScheme=U,t.RAMLVersion=x,t.structuredValue=k,t.referenceName=F,t.referencedTrait=B,t.referencedResourceType=V,t.schemaContent=W,t.getTemplateParametrizedProperties=H},function(e,t,n){(function(e,r){!function(i){"use strict";function a(e,t){e=Array.isArray(e)?e:[e];var n,r;for(n=0;n="0"&&e[r]<="9";)r+=1;if(r===t)throw new Error("Expected an integer at position ".concat(r,"."));return r-t}function _(e,t,n,r,i){var a,o=1;return s(e,t,n,r),t+=r.length-1,"("===e[t+1]&&(t+=2,a=E(e,t,n),o=parseInt(e.substring(t,t+a),10),t+=a,s(e,t,n,")"),++t),i.push({kind:r[0],index:o}),t}function T(e,t){var n=t.cursor-1,r=e.length,i=e.indexOf("]",t.cursor),a=null,o=!1,u=[];for(i=r&&n>0;)t.push(e[n]);break;case"i":case"s":if(s.index1&&"0"===t[0])return-1;if(1===n&&"-"===t[0])return e.length;for(;++r"9")return-1;return parseInt(t,10)}function l(e,t){if("undefined"!=typeof e){var n,r,i=e,a=t.length,o=-1;if(a){for(;++or))return;i=i[r]}else i=i[n];return i}return e}}function p(e,t,n,i){if(0===n.length)throw new Error("Cannot set the root object; assign it directly.");if("undefined"!=typeof e){var a,o,s,l=e,p=n.length,c=n.length-1,f=-1;if(!p)return l;for(;++fo)){if(l.length===o)return l.push(t),r;throw new ReferenceError("Not found: ".concat(i(n.slice(0,f+1),!0),"."))}if(f===c)return s=l[o],l[o]=t,s;l=l[o]}else{if(f===c)return s=l[a],l[a]=t,s;if(l=l[a],"undefined"==typeof l)throw new ReferenceError("Not found: ".concat(i(n.slice(0,f+1),!0),"."))}if(f===p)return l}}function c(e){if(this.encode=e.length>0&&"#"===e[0]?s:a,Array.isArray(e))this.path=e;else{var t=e.length>0&&"#"===e[0]?o:i;this.path=t(e)}}var f,h,d=[];"object"==typeof e&&e?(f=e,h=e.JsonPointer):"undefined"!=typeof window?(f=window,h=window.JsonPointer):f={},h&&d.push(function(){f.JsonPointer===c&&(f.JsonPointer=h, +h=r)}),Object.defineProperty(c.prototype,"pointer",{enumerable:!0,get:function(){return a(this.path)}}),Object.defineProperty(c.prototype,"uriFragmentIdentifier",{enumerable:!0,get:function(){return s(this.path)}}),c.prototype.get=function(e){return l(e,this.path)},c.prototype.set=function(e,t){return p(e,t,this.path,this.encode)},c.prototype.toString=function(){return this.pointer},c.create=function(e){return new c(e)},c.get=function(e,t){var n=t.length>0&&"#"===t[0]?o:i;return l(e,n(t))},c.set=function(e,t,n){var r=t.length>0&&"#"===t[0]?s:a,u=t.length>0&&"#"===t[0]?o:i;return p(e,n,u(t),r)},c.decodePointer=i,c.encodePointer=a,c.decodeUriFragmentIdentifier=o,c.encodeUriFragmentIdentifier=s,c.noConflict=function(){return d&&(d.forEach(function(e){e()}),d=null),c},"undefined"!=typeof n&&n&&"object"==typeof t&&t&&n.exports===t?n.exports=c:f.JsonPointer=c}()}).call(t,function(){return this}(),n(10)(e))},function(e,t,n){"use strict";function r(e){return a.isWebPath(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(5),o=n(212),s=function(){function e(e){this.unit=e}return e.prototype.contextPath=function(){if(!this.unit)return"";var e=this.unit.absolutePath();return e||""},e.prototype.normalizePath=function(e){if(!e)return e;var t;if(r(e)){var n=0===e.toLowerCase().indexOf("https")?"https://":"http://";t=n+i.normalize(e.substring(n.length)).replace(/\\/g,"/")}else t=i.normalize(e).replace(/\\/g,"/");return t},e.prototype.content=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolve(n);return r?r.contents()||"":""},e.prototype.contentAsync=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolveAsync(n);if(!r)return Promise.resolve("");var i=r.then(function(e){return e&&e.contents()||""});return i},e.prototype.toRelativeIfNeeded=function(e){var t=e;return!i.isAbsolute(e)||r(e)||r(this.unit.absolutePath())||(t=i.relative(i.dirname(this.unit.absolutePath()),e)),t},e.prototype.hasAsyncRequests=function(){return o.hasAsyncRequests()},e.prototype.resolvePath=function(e,t){return a.buildPath(t,e,this.unit.project().getRootPath())},e.prototype.isAbsolutePath=function(e){return!!e&&(!!r(e)||i.isAbsolute(e))},e.prototype.promiseResolve=function(e){return Promise.resolve(e)},e.prototype.rootPath=function(){return this.unit.project().getRootPath()},e.prototype.isWebPath=function(e){return a.isWebPath(e)},e.prototype.relativePath=function(e,t){return i.relative(e,t)},e}();t.ContentProvider=s},function(e,t,n){"use strict";function r(){return l.hasAsyncRequests()}function i(e){l.addLoadCallback(e)}function a(){return h.getTransformNames()}function o(e){return p.getFragmentDefenitionName(e)}function s(e,t,n){if(c.ReferenceType.isInstance(n.range())){var r=(n.range(),f.createNode(e));return new p.StructuredValue(r,t,n)}return e}function u(e){return(new d.UrlParameterNameValidator).parseUrl(e)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(212),p=n(55),c=n(56),f=n(4),h=n(217),d=n(19),m=n(208),y=n(204);t.hasAsyncRequests=r,t.addLoadCallback=i,t.getTransformerNames=a,t.updateType=function(e){var t=m.doDescrimination(e);null==t&&e.property()&&(t=e.property().range()),t&&e.patchType(t)},t.getFragmentDefenitionName=o,t.genStructuredValue=s,t.parseUrl=u;var v=function(){function e(e,t){this.node=e,this.targetUnitRoot=t}return e}();t.UnitLink=v;var g=function(){function e(e,t){this.errors=e,this.primaryUnitRoot=t}return e.prototype.accept=function(e){this.transformIssue(e),this.errors.push(e)},e.prototype.transformIssue=function(e){var t=this,n=null,r=this.findIssueTail(e);r.node&&(n=r.node.lowLevel().unit());var i=this.primaryUnitRoot.lowLevel().unit();if(n&&i&&n!=i){var a=this.findPathToNodeUnit(this.primaryUnitRoot,r.node);if(a&&a.length>0){var o=a.map(function(n){return t.convertConnectingNodeToError(n,e)});if(o&&o.length>0)for(var s=r,u=o.length-1;u>=0;u--){var l=o[u];s.extras=[],s.extras.push(l),s=l}}}},e.prototype.begin=function(){},e.prototype.end=function(){},e.prototype.acceptUnique=function(e){for(var t=0,n=this.errors;t1){var s={};a.forEach(function(e){var t=e.highLevel(),n="";null!=t.parent()&&(n+=t.parent().id()+"."),n+=t.localId();var r=s[n];null==r&&(r=[],s[n]=r),r.push(e)});var u=Object.keys(s);u.length>1&&a.forEach(function(e){t.accept(r.createIssue1(i.RESOURCES_SHARE_SAME_URI,{},e.highLevel(),!1))})}}},e.prototype.acceptResource=function(e){var t=e.absoluteUri(),n=this.uriToResources[t];n||(n=[],this.uriToResources[t]=n),n.push(e),n.length>1&&(this.conflictingUriToResources[t]=n)},e}();e.exports=a},function(e,t,n){"use strict";function r(e,t,n){null==n&&(n=i(e)),n.length>0&&(n+=":");for(var r=e.getElementsByTagName(n+t),a=[],o=0;o"))return!1;var t=new p.DOMParser(f).parseFromString(e),n=r(t,"schema",i(t));return n.length>0}catch(e){return!1}}function o(e){var t={};if(1==e.nodeType){if(e.attributes.length>0)for(var n=0;n=t+n||t?new java.lang.String(e,t,n)+"":e}function l(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new p,o=n.domBuilder||new a,s=n.errorHandler,u=n.locator,l=n.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=i(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(c.nbsp=" ",c.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,c):r.errorHandler.error("invalid doc source"),o.doc},a.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;l(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function d(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?h(parseInt(t.substr(1).replace("x","0x"))):(l.error("entity not found:"+e),e)}function m(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,d);E&&y(S),r.characters(n,0,t-S),S=t}}function y(t,n){for(;t>=g&&(n=A.exec(e));)v=n.index,g=v+n[0].length,E.lineNumber++;E.columnNumber=t-v+1}for(var v=0,g=0,A=/.*(?:\r\n?|\n)|.*$/g,E=r.locator,_=[{currentNSMap:t}],T={},S=0;;){try{var N=e.indexOf("<",S);if(N<0){if(!e.substr(S).match(/^\s*$/)){var I=r.doc,b=I.createTextNode(e.substr(S));I.appendChild(b),r.currentElement=b}return}switch(N>S&&m(N),e.charAt(N+1)){case"/":var R=e.indexOf(">",N+3),M=e.substring(N+2,R),C=_.pop();R<0?(M=e.substring(N+2).replace(/[\s<].*/,""),l.error("end tag name: "+M+" is not complete:"+C.tagName),R=N+1+M.length):M.match(/\sS?S=R:m(Math.max(N,S)+1)}}function i(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function a(e,t,n,r,i,a){for(var o,s,u=++t,l=g;;){var p=e.charAt(u);switch(p){case"=":if(l===A)o=e.slice(t,u),l=_;else{if(l!==E)throw new Error("attribute equal must after attrName");l=_}break;case"'":case'"':if(l===_||l===A){if(l===A&&(a.warning('attribute value must after "="'),o=e.slice(t,u)),t=u+1,u=e.indexOf(p,t),!(u>0))throw new Error("attribute value no end '"+p+"' match");s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t-1),l=S}else{if(l!=T)throw new Error('attribute value must after "="');s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t),a.warning('attribute "'+o+'" missed start quot('+p+")!!"),t=u+1,l=S}break;case"/":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:l=I,n.closed=!0;case T:case A:case E:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),l==g&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case g:n.setTagName(e.slice(t,u));case S:case N:case I:break;case T:case A:s=e.slice(t,u),"/"===s.slice(-1)&&(n.closed=!0,s=s.slice(0,-1));case E:l===E&&(s=o),l==T?(a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead!!'),n.add(s,s,t));break;case _:throw new Error("attribute value missed!!")}return u;case"€":p=" ";default:if(p<=" ")switch(l){case g:n.setTagName(e.slice(t,u)),l=N;break;case A:o=e.slice(t,u),l=E;break;case T:var s=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s,t);case S:l=N}else switch(l){case E:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),n.add(o,o,t),t=u,l=A;break;case S:a.warning('attribute space is required"'+o+'"!!');case N:l=A,t=u;break;case _:l=T,t=u;break;case I:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function o(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],s=o.qName,u=o.value,p=s.indexOf(":");if(p>0)var c=o.prefix=s.slice(0,p),f=s.slice(p+1),h="xmlns"===c&&f;else f=s,c=null,h="xmlns"===s&&"";o.localName=f,h!==!1&&(null==i&&(i={},l(n,n={})),n[h]=i[h]=u,o.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(var a=e.length;a--;){o=e[a];var c=o.prefix;c&&("xml"===c&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(o.uri=n[c||""]))}var p=r.indexOf(":");p>0?(c=e.prefix=r.slice(0,p),f=e.localName=r.slice(p+1)):(c=null,f=e.localName=r);var d=e.uri=n[c||""];if(t.startElement(d,f,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(d,f,r),i)for(c in i)t.endPrefixMapping(c)}function s(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function u(e,t,n,r){var i=r[n];return null==i&&(i=e.lastIndexOf(""),i",t+4);return a>t?(n.comment(e,t+4,a-t-4),a+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,a-t-9),n.endCDATA(),a+3}var o=d(e,t),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var u=o[1][0],l=s>3&&/^public$/i.test(o[2][0])&&o[3][0],p=s>4&&o[4][0],c=o[s-1];return n.startDTD(u,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),p&&p.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function c(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function f(e){}function h(e,t){return e.__proto__=t,e}function d(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var m=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=new RegExp("[\\-\\.0-9"+m.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),v=new RegExp("^"+m.source+y.source+"*(?::"+m.source+y.source+"*)?$"),g=0,A=1,E=2,_=3,T=4,S=5,N=6,I=7;n.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),l(t,t={}),r(e,t,n,i,this.errorHandler),i.endDocument()}},f.prototype={setTagName:function(e){if(!v.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!v.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},h({},h.prototype)instanceof h||(h=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),t.XMLReader=n},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){function r(){}var i=e.prototype;if(Object.create){var a=Object.create(t.prototype);i.__proto__=a}i instanceof t||(r.prototype=t.prototype,r=new r,n(i,r),e.prototype=i=r),i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function i(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ie[e]),this.message=ie[e],Error.captureStackTrace&&Error.captureStackTrace(this,i);return n.code=e,t&&(this.message=this.message+": "+t),n}function a(){}function o(e,t){this._node=e,this._refresh=t,s(this)}function s(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);K(e,"length",r.length),n(r,e),e._inc=t}}function u(){}function l(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function p(e,t,n,r){if(r?t[l(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&g(i,e,r),v(i,e,n))}}function c(e,t,n){var r=l(t,n);if(!(r>=0))throw i(oe,new Error(e.tagName+"@"+n));for(var a=t.length-1;r"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function m(e,t){if(t(e))return!0;if(e=e.firstChild)do if(m(e,t))return!0;while(e=e.nextSibling)}function y(){}function v(e,t,n){e&&e._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function g(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete t._nsMap[n.prefix?n.localName:""]}function A(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function E(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,A(e.ownerDocument,e),t}function _(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var o=n?n.previousSibling:e.lastChild;i.previousSibling=o,a.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do i.parentNode=e;while(i!==a&&(i=i.nextSibling));return A(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function T(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,A(e.ownerDocument,e,t),t}function S(){this._nsMap={}}function N(){}function I(){}function b(){}function R(){}function M(){}function C(){}function w(){}function P(){}function L(){}function O(){}function D(){}function U(){}function x(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,a=r.namespaceURI;if(a&&null==i){var i=r.lookupPrefix(a);if(null==i)var o=[{namespace:a,prefix:null}]}return F(this,n,e,t,o),n.join("")}function k(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix==r)return o.namespace!=i}return!0}function F(e,t,n,r,i){if(r){if(e=r(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Y:i||(i=[]);var a=(i.length,e.attributes),o=a.length,s=e.firstChild,u=e.tagName;n=W===e.namespaceURI||n,t.push("<",u);for(var l=0;l"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,i),s=s.nextSibling;else for(;s;)F(s,t,n,r,i),s=s.nextSibling;t.push("")}else t.push("/>");return;case Z:case te:for(var s=e.firstChild;s;)F(s,t,n,r,i),s=s.nextSibling;return;case q:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,d),'"');case G:return t.push(e.data.replace(/[<&]/g,d));case X:return t.push("");case Q:return t.push("");case ee:var m=e.publicId,y=e.systemId;if(t.push("');else if(y&&"."!=y)t.push(' SYSTEM "',y,'">');else{var v=e.internalSubset;v&&t.push(" [",v,"]"),t.push(">")}return;case J:return t.push("");case z:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function B(e,t,n){var r;switch(t.nodeType){case Y:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case q:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(B(e,i,n)),i=i.nextSibling;return r}function V(e,t,n){var r=new t.constructor;for(var i in t){var o=t[i];"object"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new a),r.ownerDocument=e,r.nodeType){case Y:var s=t.attributes,l=r.attributes=new u,p=s.length;l._ownerElement=r;for(var c=0;c0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==q?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},n(H,h),n(H,h.prototype),y.prototype={nodeName:"#document",nodeType:Z,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==Y&&(this.documentElement=e),_(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),E(this,e)},importNode:function(e,t){return B(this,e,t)},getElementById:function(e){var t=null;return m(this.documentElement,function(n){if(n.nodeType==Y&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new S;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new a;var n=t.attributes=new u;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new O;return e.ownerDocument=this,e.childNodes=new a,e},createTextNode:function(e){var t=new b;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new R;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new M;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new D;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new N;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new L;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new S,r=t.split(":"),i=n.attributes=new u;return n.childNodes=new a,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new N,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(y,h),S.prototype={nodeType:Y,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):T(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new o(this,function(t){var n=[];return m(t,function(r){r===t||r.nodeType!=Y||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new o(this,function(n){var r=[];return m(n,function(i){i===n||i.nodeType!==Y||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i); +}),r})}},y.prototype.getElementsByTagName=S.prototype.getElementsByTagName,y.prototype.getElementsByTagNameNS=S.prototype.getElementsByTagNameNS,r(S,h),N.prototype.nodeType=q,r(N,h),I.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ie[ae])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},r(I,h),b.prototype={nodeName:"#text",nodeType:G,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(b,I),R.prototype={nodeName:"#comment",nodeType:Q},r(R,I),M.prototype={nodeName:"#cdata-section",nodeType:X},r(M,I),C.prototype.nodeType=ee,r(C,h),w.prototype.nodeType=ne,r(w,h),P.prototype.nodeType=$,r(P,h),L.prototype.nodeType=z,r(L,h),O.prototype.nodeName="#document-fragment",O.prototype.nodeType=te,r(O,h),D.prototype.nodeType=J,r(D,h),U.prototype.serializeToString=function(e,t,n){return x.call(e,t,n)},h.prototype.toString=x;try{Object.defineProperty&&(Object.defineProperty(o.prototype,"length",{get:function(){return s(this),this.$$length}}),Object.defineProperty(h.prototype,"textContent",{get:function(){return j(this)},set:function(e){switch(this.nodeType){case Y:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),K=function(e,t,n){e["$$"+t]=n})}catch(e){}t.DOMImplementation=f,t.XMLSerializer=U},function(e,t,n){(function(e){(function(){var r,i=[].slice;r=n(272),t.allowUnsafeEval=function(t){var n;n=e.eval;try{return e.eval=function(e){return r.runInThisContext(e)},t()}finally{e.eval=n}},t.allowUnsafeNewFunction=function(n){var r;r=e.Function;try{return e.Function=t.Function,n()}finally{e.Function=r}},t.Function=function(){var e,t,n,a,o,s,u;for(n=2<=arguments.length?i.call(arguments,0,o=arguments.length-1):(o=0,[]),e=arguments[o++],a=[],s=0,u=n.length;s");if(v>0&&d.length>v+2){var g=d.charAt(v+2);"\n"!=g&&(m=d.slice(0,v+2)+"\n"+d.slice(v+2))}return{content:m,validation:[]}}catch(e){console.log(e)}return{content:e,validation:[]}},e.prototype.completeReference=function(e,t){try{var n=new f(y).parseFromString(e),r=[],i=p(n,"xs:schema")[0],a=p(i,"xs:element"),o=p(i,"xs:complexType");a.forEach(function(e){return r.push(e.getAttribute("name"))}),o.forEach(function(e){return r.push(e.getAttribute("name"))});var s=0===t.asString().trim().length;return s?r:r.filter(function(e){return 0===e.indexOf(t.asString())})}catch(e){return[]}},e}()}).call(t,n(43).Buffer)},function(e,t,n){e.exports=n(278)},function(e,t,n){(function(e){/*! * urlsafe-base64 */ -t.version="1.0.0",t.encode=function(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.decode=function(t){return t+=Array(5-t.length%4).join("="),t=t.replace(/\-/g,"+").replace(/\_/g,"/"),new e(t,"base64")},t.validate=function(e){return/^[A-Za-z0-9\-_]+$/.test(e)}}).call(t,n(43).Buffer)},function(e,t,n){"use strict";function r(e){if(!e||!e.trim()||"{"!=e.trim().charAt(0))return!1;try{var t=JSON.parse(e);return t&&"object"==typeof t}catch(t){return s.isXmlScheme(e)}}function i(e,t){if(s.isXmlScheme(e))return p.getXMLSchema(e,new u.ContentProvider(t)).loadSchemaReferencesAsync().then(function(){return t});var n=p.getJSONSchema(e,new u.ContentProvider(t)),r=n.getMissingReferences([]).map(function(e){return n.contentAsync(e)});if(0===r.length)return Promise.resolve(t);var i=Promise.all(r),a=o(i,n);return a.then(function(){return t})}function a(e,t){var n=p.createSchema(e,new u.ContentProvider(t));return n&&n.getMissingReferences?n.getMissingReferences([],!0):[]}function o(e,t){return e.then(function(e){if(e.length>0){var n=t.getMissingReferences(e);if(0===n.length)return[];var r=[];return n.forEach(function(e){r.push(t.contentAsync(e))}),o(Promise.all(r.concat(e)),t)}return Promise.resolve([])})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(266),u=n(261),l=n(56),p=l.getSchemaUtils();t.isScheme=r,t.startDownloadingReferencesAsync=i,t.getReferences=a},function(e,t){t.XMLHttpRequest=XMLHttpRequest},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.api10=n(281),t.common10=n(282),t.datamodel10=n(283),t.methods10=n(284),t.resources10=n(285),t.security10=n(286),t.api08=n(287),t.bodies08=n(288),t.common08=n(289),t.methods08=n(290),t.parameters08=n(291),t.resources08=n(292),t.security08=n(293)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){(function(t){!function(n){function r(){}function i(e,t){return function(){e.apply(t,arguments)}}function a(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):(e._handled=!0,void a._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?s:u)(t.promise,e._value);var r;try{r=n(e._value)}catch(e){return void u(t.promise,e)}s(t.promise,r)}))}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void c(i(n,t),e)}e._state=1,e._value=t,l(e)}catch(t){u(e,t)}}function u(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t0){var r=e.split("|");n.anyOf=this.makeUnion(r,t)}else if(t[e]){var a=this.generateType(t[e]);n.type="object",n.properties=a.properties}else n.type=e;return n},e.prototype.allTypes=function(e){var t=e.root(),n=t.elementsOfKind("types"),r={};return n.forEach(function(e){r[e.name()]=e}),r},e.prototype.resolveType=function(e,t){var n=this.allTypes(e);return n[t]},e.prototype.generateProperty=function(e,t){var n=this,i=this.allTypes(e),a={},o=e.definition().allProperties();o.forEach(function(t){if("name"!=t.nameId()){var o=e.attrValue(t.nameId());if(null!=o&&void 0!=o&&"undefined"!=o)if("type"==t.nameId()){var s=n.generateTypeExp(o,i);r.extend(a,s)}else if("enum"==t.nameId()){var u=e.attributes("enum"),l=u.map(function(e){return e.value()});a.enum=l}else a[t.nameId()]=o}}),t&&(a.required=!1);var s=(e.elements(),this.generateProperties(e));return Object.getOwnPropertyNames(s).length>0&&(a.properties=s),a},e.prototype.generateProperties=function(e){var t=this,n={},r=e.elements(),i=!0;return r.forEach(function(e){var r=e.attrValue("name");if("string"==typeof r){r=r.trim();var a=e.optional();n[r]=t.generateProperty(e,a),i=!1}}),n},e}();t.ModelToSchemaGenerator=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modify=n(301)},function(e,t,n){"use strict";function r(e){return new u.TypeDeclarationImpl(e)}function i(e){return new u.ObjectTypeDeclarationImpl(e)}function a(e,t){e.setSchema(t)}function o(e,t){var n=(l.getUniverse("RAML10").type(l.universesInfo.Universe10.ExampleSpec.name),l.universesInfo.Universe10.TypeDeclaration.properties.example.name),r=e.highLevel(),i=r.lowLevel(),a=r.children().filter(function(e){return e.lowLevel().key()==n}),o=p.createNode(n);c.setAttr(o,t),a.length>0&&(c.removeNode(i,a[0].lowLevel()),a[0]._node=o,c.insertNode(i,o)),r.createAttr&&r.createAttr(n,t)}function s(e,t){e.add(t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(2),l=n(56),p=n(4),c=n(5);t.createTypeDeclaration=r,t.createObjectTypeDeclaration=i,t.setTypeDeclarationSchema=a,t.setTypeDeclarationExample=o,t.addChild=s},function(e,t,n){"use strict";function r(e){return i.expandTraitsAndResourceTypes(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(216);t.expandTraitsAndResourceTypes=r},function(e,t,n){"use strict";function r(e){return i.completeRelativeUri(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(248);t.completeRelativeUri=r}])}); +t.version="1.0.0",t.encode=function(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.decode=function(t){return t+=Array(5-t.length%4).join("="),t=t.replace(/\-/g,"+").replace(/\_/g,"/"),new e(t,"base64")},t.validate=function(e){return/^[A-Za-z0-9\-_]+$/.test(e)}}).call(t,n(43).Buffer)},function(e,t,n){"use strict";function r(e){if(!e||!e.trim()||"{"!=e.trim().charAt(0))return!1;try{var t=JSON.parse(e);return t&&"object"==typeof t}catch(t){return s.isXmlScheme(e)}}function i(e,t){if(s.isXmlScheme(e))return p.getXMLSchema(e,new u.ContentProvider(t)).loadSchemaReferencesAsync().then(function(){return t});var n=p.getJSONSchema(e,new u.ContentProvider(t)),r=n.getMissingReferences([]).map(function(e){return n.contentAsync(e)});if(0===r.length)return Promise.resolve(t);var i=Promise.all(r),a=o(i,n);return a.then(function(){return t})}function a(e,t){var n=p.createSchema(e,new u.ContentProvider(t));return n&&n.getMissingReferences?n.getMissingReferences([],!0):[]}function o(e,t){return e.then(function(e){if(e.length>0){var n=t.getMissingReferences(e);if(0===n.length)return[];var r=[];return n.forEach(function(e){r.push(t.contentAsync(e))}),o(Promise.all(r.concat(e)),t)}return Promise.resolve([])})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(267),u=n(262),l=n(56),p=l.getSchemaUtils();t.isScheme=r,t.startDownloadingReferencesAsync=i,t.getReferences=a},function(e,t){t.XMLHttpRequest=XMLHttpRequest},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.api10=n(282),t.common10=n(283),t.datamodel10=n(284),t.methods10=n(285),t.resources10=n(286),t.security10=n(287),t.api08=n(288),t.bodies08=n(289),t.common08=n(290),t.methods08=n(291),t.parameters08=n(292),t.resources08=n(293),t.security08=n(294)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){(function(t){!function(n){function r(){}function i(e,t){return function(){e.apply(t,arguments)}}function a(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):(e._handled=!0,void a._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?s:u)(t.promise,e._value);var r;try{r=n(e._value)}catch(e){return void u(t.promise,e)}s(t.promise,r)}))}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void c(i(n,t),e)}e._state=1,e._value=t,l(e)}catch(t){u(e,t)}}function u(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t0){var r=e.split("|");n.anyOf=this.makeUnion(r,t)}else if(t[e]){var a=this.generateType(t[e]);n.type="object",n.properties=a.properties}else n.type=e;return n},e.prototype.allTypes=function(e){var t=e.root(),n=t.elementsOfKind("types"),r={};return n.forEach(function(e){r[e.name()]=e}),r},e.prototype.resolveType=function(e,t){var n=this.allTypes(e);return n[t]},e.prototype.generateProperty=function(e,t){var n=this,i=this.allTypes(e),a={},o=e.definition().allProperties();o.forEach(function(t){if("name"!=t.nameId()){var o=e.attrValue(t.nameId());if(null!=o&&void 0!=o&&"undefined"!=o)if("type"==t.nameId()){var s=n.generateTypeExp(o,i);r.extend(a,s)}else if("enum"==t.nameId()){var u=e.attributes("enum"),l=u.map(function(e){return e.value()});a.enum=l}else a[t.nameId()]=o}}),t&&(a.required=!1);var s=(e.elements(),this.generateProperties(e));return Object.getOwnPropertyNames(s).length>0&&(a.properties=s),a},e.prototype.generateProperties=function(e){var t=this,n={},r=e.elements(),i=!0;return r.forEach(function(e){var r=e.attrValue("name");if("string"==typeof r){r=r.trim();var a=e.optional();n[r]=t.generateProperty(e,a),i=!1}}),n},e}();t.ModelToSchemaGenerator=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modify=n(302)},function(e,t,n){"use strict";function r(e){return new u.TypeDeclarationImpl(e)}function i(e){return new u.ObjectTypeDeclarationImpl(e)}function a(e,t){e.setSchema(t)}function o(e,t){var n=(l.getUniverse("RAML10").type(l.universesInfo.Universe10.ExampleSpec.name),l.universesInfo.Universe10.TypeDeclaration.properties.example.name),r=e.highLevel(),i=r.lowLevel(),a=r.children().filter(function(e){return e.lowLevel().key()==n}),o=p.createNode(n);c.setAttr(o,t),a.length>0&&(c.removeNode(i,a[0].lowLevel()),a[0]._node=o,c.insertNode(i,o)),r.createAttr&&r.createAttr(n,t)}function s(e,t){e.add(t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(2),l=n(56),p=n(4),c=n(5);t.createTypeDeclaration=r,t.createObjectTypeDeclaration=i,t.setTypeDeclarationSchema=a,t.setTypeDeclarationExample=o,t.addChild=s},function(e,t,n){"use strict";function r(e){return i.expandTraitsAndResourceTypes(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(217);t.expandTraitsAndResourceTypes=r},function(e,t,n){"use strict";function r(e){return i.completeRelativeUri(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(249);t.completeRelativeUri=r}])}); (function(factory) { // Setup highlight.js for different environments. First is Node.js or