UNPKG

colu

Version:

Colu SDK for engine and colored-coins api.

2 lines 2.67 MB
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};!function(f){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.Colu=f()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function after(count,callback,err_cb){function proxy(err,result){if(proxy.count<=0)throw new Error("after called too many times");--proxy.count,err?(bail=!0,callback(err),callback=err_cb):0!==proxy.count||bail||callback(null,result)}var bail=!1;return err_cb=err_cb||noop,proxy.count=count,0===count?callback():proxy}function noop(){}module.exports=after}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\after\\index.js","/node_modules\\after",require("form-data"))},{_process:403,buffer:149,"form-data":278}],2:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function SCHEMA_URI_FORMAT_FUNC(str){return SCHEMA_URI_FORMAT.test(str)}function Ajv(opts){function validate(schemaKeyRef,data){var v;if("string"==typeof schemaKeyRef){if(v=getSchema(schemaKeyRef),!v)throw new Error('no schema with key or ref "'+schemaKeyRef+'"')}else{var schemaObj=_addSchema(schemaKeyRef);v=schemaObj.validate||_compile(schemaObj)}var valid=v(data);return v.$async===!0?"*"==self._opts.async?co(valid):valid:(self.errors=v.errors,valid)}function compile(schema,_meta){var schemaObj=_addSchema(schema,void 0,_meta);return schemaObj.validate||_compile(schemaObj)}function addSchema(schema,key,_skipValidation,_meta){if(Array.isArray(schema))for(var i=0;i<schema.length;i++)addSchema(schema[i],void 0,_skipValidation,_meta);else key=resolve.normalizeId(key||schema.id),checkUnique(key),self._schemas[key]=_addSchema(schema,_skipValidation,_meta,!0)}function addMetaSchema(schema,key,skipValidation){addSchema(schema,key,skipValidation,!0)}function validateSchema(schema,throwOrLogError){var $schema=schema.$schema||self._opts.defaultMeta||defaultMeta(),currentUriFormat=self._formats.uri;self._formats.uri="function"==typeof currentUriFormat?SCHEMA_URI_FORMAT_FUNC:SCHEMA_URI_FORMAT;var valid;try{valid=validate($schema,schema)}finally{self._formats.uri=currentUriFormat}if(!valid&&throwOrLogError){var message="schema is invalid: "+errorsText();if("log"!=self._opts.validateSchema)throw new Error(message);console.error(message)}return valid}function defaultMeta(){var meta=self._opts.meta;return self._opts.defaultMeta="object"==("undefined"==typeof meta?"undefined":_typeof(meta))?meta.id||meta:self._opts.v5?v5.META_SCHEMA_ID:META_SCHEMA_ID,self._opts.defaultMeta}function getSchema(keyRef){var schemaObj=_getSchemaObj(keyRef);switch("undefined"==typeof schemaObj?"undefined":_typeof(schemaObj)){case"object":return schemaObj.validate||_compile(schemaObj);case"string":return getSchema(schemaObj);case"undefined":return _getSchemaFragment(keyRef)}}function _getSchemaFragment(ref){var res=resolve.schema.call(self,{schema:{}},ref);if(res){var schema=res.schema,root=res.root,baseId=res.baseId,v=compileSchema.call(self,schema,root,void 0,baseId);return self._fragments[ref]=new SchemaObject({ref:ref,fragment:!0,schema:schema,root:root,baseId:baseId,validate:v}),v}}function _getSchemaObj(keyRef){return keyRef=resolve.normalizeId(keyRef),self._schemas[keyRef]||self._refs[keyRef]||self._fragments[keyRef]}function removeSchema(schemaKeyRef){if(schemaKeyRef instanceof RegExp)return _removeAllSchemas(self._schemas,schemaKeyRef),void _removeAllSchemas(self._refs,schemaKeyRef);switch("undefined"==typeof schemaKeyRef?"undefined":_typeof(schemaKeyRef)){case"undefined":return _removeAllSchemas(self._schemas),_removeAllSchemas(self._refs),void self._cache.clear();case"string":var schemaObj=_getSchemaObj(schemaKeyRef);return schemaObj&&self._cache.del(schemaObj.jsonStr),delete self._schemas[schemaKeyRef],void delete self._refs[schemaKeyRef];case"object":var jsonStr=stableStringify(schemaKeyRef);self._cache.del(jsonStr);var id=schemaKeyRef.id;id&&(id=resolve.normalizeId(id),delete self._schemas[id],delete self._refs[id])}}function _removeAllSchemas(schemas,regex){for(var keyRef in schemas){var schemaObj=schemas[keyRef];schemaObj.meta||regex&&!regex.test(keyRef)||(self._cache.del(schemaObj.jsonStr),delete schemas[keyRef])}}function _addSchema(schema,skipValidation,meta,shouldAddSchema){if("object"!=("undefined"==typeof schema?"undefined":_typeof(schema)))throw new Error("schema should be object");var jsonStr=stableStringify(schema),cached=self._cache.get(jsonStr);if(cached)return cached;shouldAddSchema=shouldAddSchema||self._opts.addUsedSchema!==!1;var id=resolve.normalizeId(schema.id);id&&shouldAddSchema&&checkUnique(id);var recursiveMeta,willValidate=self._opts.validateSchema!==!1&&!skipValidation;willValidate&&!(recursiveMeta=schema.id&&schema.id==schema.$schema)&&validateSchema(schema,!0);var localRefs=resolve.ids.call(self,schema),schemaObj=new SchemaObject({id:id,schema:schema,localRefs:localRefs,jsonStr:jsonStr,meta:meta});return"#"!=id[0]&&shouldAddSchema&&(self._refs[id]=schemaObj),self._cache.put(jsonStr,schemaObj),willValidate&&recursiveMeta&&validateSchema(schema,!0),schemaObj}function _compile(schemaObj,root){function callValidate(){var _validate=schemaObj.validate,result=_validate.apply(null,arguments);return callValidate.errors=_validate.errors,result}if(schemaObj.compiling)return schemaObj.validate=callValidate,callValidate.schema=schemaObj.schema,callValidate.errors=null,callValidate.root=root?root:callValidate,schemaObj.schema.$async===!0&&(callValidate.$async=!0),callValidate;schemaObj.compiling=!0;var currentOpts;schemaObj.meta&&(currentOpts=self._opts,self._opts=self._metaOpts);var v;try{v=compileSchema.call(self,schemaObj.schema,root,schemaObj.localRefs)}finally{schemaObj.compiling=!1,schemaObj.meta&&(self._opts=currentOpts)}return schemaObj.validate=v,schemaObj.refs=v.refs,schemaObj.refVal=v.refVal,schemaObj.root=v.root,v}function errorsText(errors,options){if(errors=errors||self.errors,!errors)return"No errors";options=options||{};for(var separator=void 0===options.separator?", ":options.separator,dataVar=void 0===options.dataVar?"data":options.dataVar,text="",i=0;i<errors.length;i++){var e=errors[i];e&&(text+=dataVar+e.dataPath+" "+e.message+separator)}return text.slice(0,-separator.length)}function addFormat(name,format){"string"==typeof format&&(format=new RegExp(format)),self._formats[name]=format}function addDraft4MetaSchema(){if(self._opts.meta!==!1){var metaSchema=require("./refs/json-schema-draft-04.json");addMetaSchema(metaSchema,META_SCHEMA_ID,!0),self._refs["http://json-schema.org/schema"]=META_SCHEMA_ID}}function addInitialSchemas(){var optsSchemas=self._opts.schemas;if(optsSchemas)if(Array.isArray(optsSchemas))addSchema(optsSchemas);else for(var key in optsSchemas)addSchema(optsSchemas[key],key)}function addInitialFormats(){for(var name in self._opts.formats){var format=self._opts.formats[name];addFormat(name,format)}}function checkUnique(id){if(self._schemas[id]||self._refs[id])throw new Error('schema with key or id "'+id+'" already exists')}function getMetaSchemaOptions(){for(var metaOpts=util.copy(self._opts),i=0;i<META_IGNORE_OPTIONS.length;i++)delete metaOpts[META_IGNORE_OPTIONS[i]];return metaOpts}if(!(this instanceof Ajv))return new Ajv(opts);var self=this;opts=this._opts=util.copy(opts)||{},this._schemas={},this._refs={},this._fragments={},this._formats=formats(opts.format),this._cache=opts.cache||new Cache,this._loadingSchemas={},this._compilations=[],this.RULES=rules(),this.validate=validate,this.compile=compile,this.addSchema=addSchema,this.addMetaSchema=addMetaSchema,this.validateSchema=validateSchema,this.getSchema=getSchema,this.removeSchema=removeSchema,this.addFormat=addFormat,this.errorsText=errorsText,this._addSchema=_addSchema,this._compile=_compile,opts.loopRequired=opts.loopRequired||1/0,(opts.async||opts.transpile)&&async.setup(opts),opts.beautify===!0&&(opts.beautify={indent_size:2}),"property"==opts.errorDataPath&&(opts._errorDataPathProperty=!0),this._metaOpts=getMetaSchemaOptions(),opts.formats&&addInitialFormats(),addDraft4MetaSchema(),opts.v5&&v5.enable(this),"object"==_typeof(opts.meta)&&addMetaSchema(opts.meta),addInitialSchemas()}var compileSchema=require("./compile"),resolve=require("./compile/resolve"),Cache=require("./cache"),SchemaObject=require("./compile/schema_obj"),stableStringify=require("json-stable-stringify"),formats=require("./compile/formats"),rules=require("./compile/rules"),v5=require("./v5"),util=require("./compile/util"),async=require("./async"),co=require("co");module.exports=Ajv,Ajv.prototype.compileAsync=async.compile;var customKeyword=require("./keyword");Ajv.prototype.addKeyword=customKeyword.add,Ajv.prototype.getKeyword=customKeyword.get,Ajv.prototype.removeKeyword=customKeyword.remove,Ajv.ValidationError=require("./compile/validation_error");var META_SCHEMA_ID="http://json-schema.org/draft-04/schema",SCHEMA_URI_FORMAT=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes"]}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\ajv.js","/node_modules\\ajv\\lib",require("form-data"))},{"./async":3,"./cache":4,"./compile":8,"./compile/formats":7,"./compile/resolve":9,"./compile/rules":10,"./compile/schema_obj":11,"./compile/util":13,"./compile/validation_error":14,"./keyword":39,"./refs/json-schema-draft-04.json":40,"./v5":42,_process:403,buffer:149,co:153,"form-data":278,"json-stable-stringify":43}],3:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function setupAsync(opts,required){required!==!1&&(required=!0);var check,async=opts.async,transpile=opts.transpile;switch("undefined"==typeof transpile?"undefined":_typeof(transpile)){case"string":var get=TRANSPILE[transpile];if(!get)throw new Error("bad transpiler: "+transpile);return opts._transpileFunc=get(opts,required);case"undefined":case"boolean":if("string"==typeof async){if(check=ASYNC[async],!check)throw new Error("bad async mode: "+async);return opts.transpile=check(opts,required)}for(var i=0;i<MODES.length;i++){var _opts=MODES[i];if(setupAsync(_opts,!1))return util.copy(_opts,opts),opts.transpile}throw new Error("generators, nodent and regenerator are not available");case"function":return opts._transpileFunc=opts.transpile;default:throw new Error("bad transpiler: "+transpile)}}function checkGenerators(opts,required){try{return new Function("(function*(){})()")(),!0}catch(e){if(required)throw new Error("generators not supported")}}function checkAsyncFunction(opts,required){try{return new Function("(async function(){})()")(),!0}catch(e){if(required)throw new Error("es7 async functions not supported")}}function getRegenerator(opts,required){try{if(!regenerator){var name="regenerator";regenerator=require(name),regenerator.runtime()}return opts.async&&opts.async!==!0||(opts.async="es7"),regeneratorTranspile}catch(e){if(required)throw new Error("regenerator not available")}}function regeneratorTranspile(code){return regenerator.compile(code).code}function getNodent(opts,required){try{if(!nodent){var name="nodent";nodent=require(name)({log:!1,dontInstallRequireHook:!0})}return"es7"!=opts.async&&(opts.async&&opts.async!==!0&&console.warn("nodent transpiles only es7 async functions"),opts.async="es7"),nodentTranspile}catch(e){if(required)throw new Error("nodent not available")}}function nodentTranspile(code){return nodent.compile(code,"",{promises:!0,sourcemap:!1}).code}function compileAsync(schema,callback){function _compileAsync(schema,callback,firstCall){function loadMissingSchema(e){function schemaLoaded(err,sch){if(err)return callback(err);if(!self._refs[ref]&&!self._schemas[ref])try{self.addSchema(sch,ref)}catch(e){return void callback(e)}_compileAsync(schema,callback)}var ref=e.missingSchema;if(self._refs[ref]||self._schemas[ref])return callback(new Error("Schema "+ref+" is loaded but "+e.missingRef+" cannot be resolved"));var _callbacks=self._loadingSchemas[ref];_callbacks?"function"==typeof _callbacks?self._loadingSchemas[ref]=[_callbacks,schemaLoaded]:_callbacks[_callbacks.length]=schemaLoaded:(self._loadingSchemas[ref]=schemaLoaded,self._opts.loadSchema(ref,function(err,sch){var _callbacks=self._loadingSchemas[ref];if(delete self._loadingSchemas[ref],"function"==typeof _callbacks)_callbacks(err,sch);else for(var i=0;i<_callbacks.length;i++)_callbacks[i](err,sch)}))}function deferCallback(err,validate){return firstCall?void setTimeout(function(){callback(err,validate)}):callback(err,validate)}var validate;try{validate=self.compile(schema)}catch(e){return void(e.missingSchema?loadMissingSchema(e):deferCallback(e))}deferCallback(null,validate)}var schemaObj,self=this;try{schemaObj=this._addSchema(schema)}catch(e){return void setTimeout(function(){callback(e)})}if(schemaObj.validate)setTimeout(function(){callback(null,schemaObj.validate)});else{if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");_compileAsync(schema,callback,!0)}}module.exports={setup:setupAsync,compile:compileAsync};var regenerator,nodent,util=require("./compile/util"),ASYNC={"*":checkGenerators,"co*":checkGenerators,es7:checkAsyncFunction},TRANSPILE={nodent:getNodent,regenerator:getRegenerator},MODES=[{async:"co*"},{async:"es7",transpile:"nodent"},{async:"co*",transpile:"regenerator"}]}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\async.js","/node_modules\\ajv\\lib",require("form-data"))},{"./compile/util":13,_process:403,buffer:149,"form-data":278}],4:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){var Cache=module.exports=function(){this._cache={}};Cache.prototype.put=function(key,value){this._cache[key]=value},Cache.prototype.get=function(key){return this._cache[key]},Cache.prototype.del=function(key){delete this._cache[key]},Cache.prototype.clear=function(){this._cache={}}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\cache.js","/node_modules\\ajv\\lib",require("form-data"))},{_process:403,buffer:149,"form-data":278}],5:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){module.exports={$ref:require("../dotjs/ref"),allOf:require("../dotjs/allOf"),anyOf:require("../dotjs/anyOf"),dependencies:require("../dotjs/dependencies"),enum:require("../dotjs/enum"),format:require("../dotjs/format"),items:require("../dotjs/items"),maximum:require("../dotjs/_limit"),minimum:require("../dotjs/_limit"),maxItems:require("../dotjs/_limitItems"),minItems:require("../dotjs/_limitItems"),maxLength:require("../dotjs/_limitLength"),minLength:require("../dotjs/_limitLength"),maxProperties:require("../dotjs/_limitProperties"),minProperties:require("../dotjs/_limitProperties"),multipleOf:require("../dotjs/multipleOf"),not:require("../dotjs/not"),oneOf:require("../dotjs/oneOf"),pattern:require("../dotjs/pattern"),properties:require("../dotjs/properties"),required:require("../dotjs/required"),uniqueItems:require("../dotjs/uniqueItems"),validate:require("../dotjs/validate")}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\_rules.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{"../dotjs/_limit":16,"../dotjs/_limitItems":17,"../dotjs/_limitLength":18,"../dotjs/_limitProperties":19,"../dotjs/allOf":20,"../dotjs/anyOf":21,"../dotjs/dependencies":24,"../dotjs/enum":25,"../dotjs/format":26,"../dotjs/items":27,"../dotjs/multipleOf":28,"../dotjs/not":29,"../dotjs/oneOf":30,"../dotjs/pattern":31,"../dotjs/properties":33,"../dotjs/ref":34,"../dotjs/required":35,"../dotjs/uniqueItems":37,"../dotjs/validate":38,_process:403,buffer:149,"form-data":278}],6:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){module.exports=function equal(a,b){if(a===b)return!0;var i,arrA=Array.isArray(a),arrB=Array.isArray(b);if(arrA&&arrB){if(a.length!=b.length)return!1;for(i=0;i<a.length;i++)if(!equal(a[i],b[i]))return!1;return!0}if(arrA!=arrB)return!1;if(a&&b&&"object"===("undefined"==typeof a?"undefined":_typeof(a))&&"object"===("undefined"==typeof b?"undefined":_typeof(b))){var keys=Object.keys(a);if(keys.length!==Object.keys(b).length)return!1;var dateA=a instanceof Date,dateB=b instanceof Date;if(dateA&&dateB)return a.getTime()==b.getTime();if(dateA!=dateB)return!1;var regexpA=a instanceof RegExp,regexpB=b instanceof RegExp;if(regexpA&&regexpB)return a.toString()==b.toString();if(regexpA!=regexpB)return!1;for(i=0;i<keys.length;i++)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=0;i<keys.length;i++)if(!equal(a[keys[i]],b[keys[i]]))return!1;return!0}return!1}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\equal.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{_process:403,buffer:149,"form-data":278}],7:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function formats(mode){mode="full"==mode?"full":"fast";var formatDefs=util.copy(formats[mode]);for(var fName in formats.compare)formatDefs[fName]={validate:formatDefs[fName],compare:formats.compare[fName]};return formatDefs}function date(str){var matches=str.match(DATE);if(!matches)return!1;var month=+matches[1],day=+matches[2];return month>=1&&month<=12&&day>=1&&day<=DAYS[month]}function time(str,full){var matches=str.match(TIME);if(!matches)return!1;var hour=matches[1],minute=matches[2],second=matches[3],timeZone=matches[5];return hour<=23&&minute<=59&&second<=59&&(!full||timeZone)}function date_time(str){var dateTime=str.split(DATE_TIME_SEPARATOR);return 2==dateTime.length&&date(dateTime[0])&&time(dateTime[1],!0)}function hostname(str){return str.length<=255&&HOSTNAME.test(str)}function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}function regex(str){try{return new RegExp(str),!0}catch(e){return!1}}function compareDate(d1,d2){if(d1&&d2)return d1>d2?1:d1<d2?-1:d1===d2?0:void 0}function compareTime(t1,t2){if(t1&&t2&&(t1=t1.match(TIME),t2=t2.match(TIME),t1&&t2))return t1=t1[1]+t1[2]+t1[3]+(t1[4]||""),t2=t2[1]+t2[2]+t2[3]+(t2[4]||""),t1>t2?1:t1<t2?-1:t1===t2?0:void 0}function compareDateTime(dt1,dt2){if(dt1&&dt2){dt1=dt1.split(DATE_TIME_SEPARATOR),dt2=dt2.split(DATE_TIME_SEPARATOR);var res=compareDate(dt1[0],dt2[0]);if(void 0!==res)return res||compareTime(dt1[1],dt2[1])}}var util=require("./util"),DATE=/^\d\d\d\d-(\d\d)-(\d\d)$/,DAYS=[0,31,29,31,30,31,30,31,31,30,31,30,31],TIME=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,HOSTNAME=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,URI=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,UUID=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,JSON_POINTER=/^(?:\/(?:[^~\/]|~0|~1)*)*$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,RELATIVE_JSON_POINTER=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/;module.exports=formats,formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"relative-json-pointer":RELATIVE_JSON_POINTER},formats.full={date:date,time:time,"date-time":date_time,uri:uri,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:hostname,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"relative-json-pointer":RELATIVE_JSON_POINTER},formats.compare={date:compareDate,time:compareTime,"date-time":compareDateTime};var DATE_TIME_SEPARATOR=/t|\s/i,NOT_URI_FRAGMENT=/\/|\:/}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\formats.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{"./util":13,_process:403,buffer:149,"form-data":278}],8:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function loadBeautify(){if(void 0===beautify){var name="js-beautify";try{beautify=require(name).js_beautify}catch(e){beautify=!1}}}function compile(schema,root,localRefs,baseId){function callValidate(){var validate=compilation.validate,result=validate.apply(null,arguments);return callValidate.errors=validate.errors,result}function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===!0;$async&&!opts.transpile&&async.setup(opts);var sourceCode=validateGenerator({isTop:!0,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode,opts.beautify&&(loadBeautify(),beautify?sourceCode=beautify(sourceCode,opts.beautify):console.error('"npm install js-beautify" to use beautify option'));var validate,validateCode,transpile=opts._transpileFunc;try{validateCode=$async&&transpile?transpile(sourceCode):sourceCode;var makeValidate=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",validateCode);validate=makeValidate(self,RULES,formats,root,refVal,defaults,customRules,co,equal,ucs2length,ValidationError),refVal[0]=validate}catch(e){throw console.error("Error compiling schema, function code:",validateCode),e}return validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,$async&&(validate.$async=!0),keepSourceCode&&(validate.sourceCode=sourceCode),opts.sourceCode===!0&&(validate.source={patterns:patterns,defaults:defaults}),validate}function resolveRef(baseId,ref,isRoot){ref=resolve.url(baseId,ref);var _refVal,refCode,refIndex=refs[ref];if(void 0!==refIndex)return _refVal=refVal[refIndex],refCode="refVal["+refIndex+"]",resolvedRef(_refVal,refCode);if(!isRoot&&root.refs){var rootRefId=root.refs[ref];if(void 0!==rootRefId)return _refVal=root.refVal[rootRefId],refCode=addLocalRef(ref,_refVal),resolvedRef(_refVal,refCode)}refCode=addLocalRef(ref);var v=resolve.call(self,localCompile,root,ref);if(!v){var localSchema=localRefs&&localRefs[ref];localSchema&&(v=resolve.inlineRef(localSchema,opts.inlineRefs)?localSchema:compile.call(self,localSchema,root,localRefs,baseId))}return v?(replaceLocalRef(ref,v),resolvedRef(v,refCode)):void 0}function addLocalRef(ref,v){var refId=refVal.length;return refVal[refId]=v,refs[ref]=refId,"refVal"+refId}function replaceLocalRef(ref,v){var refId=refs[ref];refVal[refId]=v}function resolvedRef(refVal,code){return"object"==("undefined"==typeof refVal?"undefined":_typeof(refVal))?{code:code,schema:refVal,inline:!0}:{code:code,$async:refVal&&refVal.$async}}function usePattern(regexStr){var index=patternsHash[regexStr];return void 0===index&&(index=patternsHash[regexStr]=patterns.length,patterns[index]=regexStr),"pattern"+index}function useDefault(value){switch("undefined"==typeof value?"undefined":_typeof(value)){case"boolean":case"number":return""+value;case"string":return util.toQuotedString(value);case"object":if(null===value)return"null";var valueStr=stableStringify(value),index=defaultsHash[valueStr];return void 0===index&&(index=defaultsHash[valueStr]=defaults.length,defaults[index]=value),"default"+index}}function useCustomRule(rule,schema,parentSchema,it){var validateSchema=rule.definition.validateSchema;if(validateSchema&&self._opts.validateSchema!==!1){var valid=validateSchema(schema);if(!valid){var message="keyword schema is invalid: "+self.errorsText(validateSchema.errors);if("log"!=self._opts.validateSchema)throw new Error(message);console.error(message)}}var validate,compile=rule.definition.compile,inline=rule.definition.inline,macro=rule.definition.macro;compile?validate=compile.call(self,schema,parentSchema,it):macro?(validate=macro.call(self,schema,parentSchema,it),opts.validateSchema!==!1&&self.validateSchema(validate,!0)):validate=inline?inline.call(self,it,rule.keyword,schema,parentSchema):rule.definition.validate;var index=customRules.length;return customRules[index]=validate,{code:"customRule"+index,validate:validate}}var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[],keepSourceCode=opts.sourceCode!==!1;root=root||{schema:schema,refVal:refVal,refs:refs};var c=checkCompiling.call(this,schema,root,baseId),compilation=this._compilations[c.index];if(c.compiling)return compilation.callValidate=callValidate;var formats=this._formats,RULES=this.RULES;try{var v=localCompile(schema,root,localRefs,baseId);compilation.validate=v;var cv=compilation.callValidate;return cv&&(cv.schema=v.schema,cv.errors=null,cv.refs=v.refs,cv.refVal=v.refVal,cv.root=v.root,cv.$async=v.$async,keepSourceCode&&(cv.sourceCode=v.sourceCode)),v}finally{endCompiling.call(this,schema,root,baseId)}}function checkCompiling(schema,root,baseId){var index=compIndex.call(this,schema,root,baseId);return index>=0?{index:index,compiling:!0}:(index=this._compilations.length,this._compilations[index]={schema:schema,root:root,baseId:baseId},{index:index,compiling:!1})}function endCompiling(schema,root,baseId){var i=compIndex.call(this,schema,root,baseId);i>=0&&this._compilations.splice(i,1)}function compIndex(schema,root,baseId){for(var i=0;i<this._compilations.length;i++){var c=this._compilations[i];if(c.schema==schema&&c.root==root&&c.baseId==baseId)return i; }return-1}function patternCode(i,patterns){return"var pattern"+i+" = new RegExp("+util.toQuotedString(patterns[i])+");"}function defaultCode(i){return"var default"+i+" = defaults["+i+"];"}function refValCode(i,refVal){return refVal[i]?"var refVal"+i+" = refVal["+i+"];":""}function customRuleCode(i){return"var customRule"+i+" = customRules["+i+"];"}function vars(arr,statement){if(!arr.length)return"";for(var code="",i=0;i<arr.length;i++)code+=statement(i,arr);return code}var beautify,resolve=require("./resolve"),util=require("./util"),stableStringify=require("json-stable-stringify"),async=require("../async"),validateGenerator=require("../dotjs/validate"),co=require("co"),ucs2length=util.ucs2length,equal=require("./equal"),ValidationError=require("./validation_error");module.exports=compile}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\index.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{"../async":3,"../dotjs/validate":38,"./equal":6,"./resolve":9,"./util":13,"./validation_error":14,_process:403,buffer:149,co:153,"form-data":278,"json-stable-stringify":43}],9:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function resolve(compile,root,ref){var refVal=this._refs[ref];if("string"==typeof refVal){if(!this._refs[refVal])return resolve.call(this,compile,root,refVal);refVal=this._refs[refVal]}if(refVal=refVal||this._schemas[ref],refVal instanceof SchemaObject)return inlineRef(refVal.schema,this._opts.inlineRefs)?refVal.schema:refVal.validate||this._compile(refVal);var schema,v,baseId,res=resolveSchema.call(this,root,ref);return res&&(schema=res.schema,root=res.root,baseId=res.baseId),schema instanceof SchemaObject?v=schema.validate||compile.call(this,schema.schema,root,void 0,baseId):schema&&(v=inlineRef(schema,this._opts.inlineRefs)?schema:compile.call(this,schema,root,void 0,baseId)),v}function resolveSchema(root,ref){var p=url.parse(ref,!1,!0),refPath=_getFullPath(p),baseId=getFullPath(root.schema.id);if(refPath!==baseId){var id=normalizeId(refPath),refVal=this._refs[id];if("string"==typeof refVal)return resolveRecursive.call(this,root,refVal,p);if(refVal instanceof SchemaObject)refVal.validate||this._compile(refVal),root=refVal;else{if(refVal=this._schemas[id],!(refVal instanceof SchemaObject))return;if(refVal.validate||this._compile(refVal),id==normalizeId(ref))return{schema:refVal,root:root,baseId:baseId};root=refVal}if(!root.schema)return;baseId=getFullPath(root.schema.id)}return getJsonPointer.call(this,p,baseId,root.schema,root)}function resolveRecursive(root,ref,parsedRef){var res=resolveSchema.call(this,root,ref);if(res){var schema=res.schema,baseId=res.baseId;return root=res.root,schema.id&&(baseId=resolveUrl(baseId,schema.id)),getJsonPointer.call(this,parsedRef,baseId,schema,root)}}function getJsonPointer(parsedRef,baseId,schema,root){if(parsedRef.hash=parsedRef.hash||"","#/"==parsedRef.hash.slice(0,2)){for(var parts=parsedRef.hash.split("/"),i=1;i<parts.length;i++){var part=parts[i];if(part){if(part=util.unescapeFragment(part),schema=schema[part],!schema)break;if(schema.id&&!PREVENT_SCOPE_CHANGE[part]&&(baseId=resolveUrl(baseId,schema.id)),schema.$ref){var $ref=resolveUrl(baseId,schema.$ref),res=resolveSchema.call(this,root,$ref);res&&(schema=res.schema,root=res.root,baseId=res.baseId)}}}return schema&&schema!=root.schema?{schema:schema,root:root,baseId:baseId}:void 0}}function inlineRef(schema,limit){return limit!==!1&&(void 0===limit||limit===!0?checkNoRef(schema):limit?countKeys(schema)<=limit:void 0)}function checkNoRef(schema){var item;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)if(item=schema[i],"object"==("undefined"==typeof item?"undefined":_typeof(item))&&!checkNoRef(item))return!1}else for(var key in schema){if("$ref"==key)return!1;if(item=schema[key],"object"==("undefined"==typeof item?"undefined":_typeof(item))&&!checkNoRef(item))return!1}return!0}function countKeys(schema){var item,count=0;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)if(item=schema[i],"object"==("undefined"==typeof item?"undefined":_typeof(item))&&(count+=countKeys(item)),count==1/0)return 1/0}else for(var key in schema){if("$ref"==key)return 1/0;if(SIMPLE_INLINED[key])count++;else if(item=schema[key],"object"==("undefined"==typeof item?"undefined":_typeof(item))&&(count+=countKeys(item)+1),count==1/0)return 1/0}return count}function getFullPath(id,normalize){normalize!==!1&&(id=normalizeId(id));var p=url.parse(id,!1,!0);return _getFullPath(p)}function _getFullPath(p){var protocolSeparator=p.protocol||"//"==p.href.slice(0,2)?"//":"";return(p.protocol||"")+protocolSeparator+(p.host||"")+(p.path||"")+"#"}function normalizeId(id){return id?id.replace(TRAILING_SLASH_HASH,""):""}function resolveUrl(baseId,id){return id=normalizeId(id),url.resolve(baseId,id)}function resolveIds(schema){function _resolveIds(schema,fullPath,baseId){if(Array.isArray(schema))for(var i=0;i<schema.length;i++)_resolveIds.call(this,schema[i],fullPath+"/"+i,baseId);else if(schema&&"object"==("undefined"==typeof schema?"undefined":_typeof(schema))){if("string"==typeof schema.id){var id=baseId=baseId?url.resolve(baseId,schema.id):schema.id;id=normalizeId(id);var refVal=this._refs[id];if("string"==typeof refVal&&(refVal=this._refs[refVal]),refVal&&refVal.schema){if(!equal(schema,refVal.schema))throw new Error('id "'+id+'" resolves to more than one schema')}else if(id!=normalizeId(fullPath))if("#"==id[0]){if(localRefs[id]&&!equal(schema,localRefs[id]))throw new Error('id "'+id+'" resolves to more than one schema');localRefs[id]=schema}else this._refs[id]=fullPath}for(var key in schema)_resolveIds.call(this,schema[key],fullPath+"/"+util.escapeFragment(key),baseId)}}var id=normalizeId(schema.id),localRefs={};return _resolveIds.call(this,schema,getFullPath(id,!1),id),localRefs}var url=require("url"),equal=require("./equal"),util=require("./util"),SchemaObject=require("./schema_obj");module.exports=resolve,resolve.normalizeId=normalizeId,resolve.fullPath=getFullPath,resolve.url=resolveUrl,resolve.ids=resolveIds,resolve.inlineRef=inlineRef,resolve.schema=resolveSchema;var PREVENT_SCOPE_CHANGE=util.toHash(["properties","patternProperties","enum","dependencies","definitions"]),SIMPLE_INLINED=util.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),TRAILING_SLASH_HASH=/#\/?$/}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\resolve.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{"./equal":6,"./schema_obj":11,"./util":13,_process:403,buffer:149,"form-data":278,url:524}],10:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){var ruleModules=require("./_rules"),toHash=require("./util").toHash;module.exports=function(){var RULES=[{type:"number",rules:["maximum","minimum","multipleOf"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","properties"]},{rules:["$ref","enum","not","anyOf","oneOf","allOf"]}],ALL=["type","additionalProperties","patternProperties"],KEYWORDS=["additionalItems","$schema","id","title","description","default"],TYPES=["number","integer","string","array","object","boolean","null"];return RULES.all=toHash(ALL),RULES.forEach(function(group){group.rules=group.rules.map(function(keyword){ALL.push(keyword);var rule=RULES.all[keyword]={keyword:keyword,code:ruleModules[keyword]};return rule})}),RULES.keywords=toHash(ALL.concat(KEYWORDS)),RULES.types=toHash(TYPES),RULES.custom={},RULES}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\rules.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{"./_rules":5,"./util":13,_process:403,buffer:149,"form-data":278}],11:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function SchemaObject(obj){util.copy(obj,this)}var util=require("./util");module.exports=SchemaObject}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\schema_obj.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{"./util":13,_process:403,buffer:149,"form-data":278}],12:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){module.exports=function(str){for(var value,length=0,len=str.length,pos=0;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),56320==(64512&value)&&pos++);return length}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\ucs2length.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{_process:403,buffer:149,"form-data":278}],13:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function copy(o,to){to=to||{};for(var key in o)to[key]=o[key];return to}function checkDataType(dataType,data,negate){var EQUAL=negate?" !== ":" === ",AND=negate?" || ":" && ",OK=negate?"!":"",NOT=negate?"":"!";switch(dataType){case"null":return data+EQUAL+"null";case"array":return OK+"Array.isArray("+data+")";case"object":return"("+OK+data+AND+"typeof "+data+EQUAL+'"object"'+AND+NOT+"Array.isArray("+data+"))";case"integer":return"(typeof "+data+EQUAL+'"number"'+AND+NOT+"("+data+" % 1)"+AND+data+EQUAL+data+")";default:return"typeof "+data+EQUAL+'"'+dataType+'"'}}function checkDataTypes(dataTypes,data){switch(dataTypes.length){case 1:return checkDataType(dataTypes[0],data,!0);default:var code="",types=toHash(dataTypes);types.array&&types.object&&(code=types.null?"(":"(!"+data+" || ",code+="typeof "+data+' !== "object")',delete types.null,delete types.array,delete types.object),types.number&&delete types.integer;for(var t in types)code+=(code?" && ":"")+checkDataType(t,data,!0);return code}}function coerceToTypes(optionCoerceTypes,dataTypes){if(Array.isArray(dataTypes)){for(var types=[],i=0;i<dataTypes.length;i++){var t=dataTypes[i];COERCE_TO_TYPES[t]?types[types.length]=t:"array"===optionCoerceTypes&&"array"===t&&(types[types.length]=t)}if(types.length)return types}else{if(COERCE_TO_TYPES[dataTypes])return[dataTypes];if("array"===optionCoerceTypes&&"array"===dataTypes)return["array"]}}function toHash(arr){for(var hash={},i=0;i<arr.length;i++)hash[arr[i]]=!0;return hash}function getProperty(key){return"number"==typeof key?"["+key+"]":IDENTIFIER.test(key)?"."+key:"['"+escapeQuotes(key)+"']"}function escapeQuotes(str){return str.replace(SINGLE_QUOTE,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function varOccurences(str,dataVar){dataVar+="[^0-9]";var matches=str.match(new RegExp(dataVar,"g"));return matches?matches.length:0}function varReplace(str,dataVar,expr){return dataVar+="([^0-9])",expr=expr.replace(/\$/g,"$$$$"),str.replace(new RegExp(dataVar,"g"),expr+"$1")}function cleanUpCode(out){return out.replace(EMPTY_ELSE,"").replace(EMPTY_IF_NO_ELSE,"").replace(EMPTY_IF_WITH_ELSE,"if (!($1))")}function cleanUpVarErrors(out,async){var matches=out.match(ERRORS_REGEXP);return matches&&2===matches.length?async?out.replace(REMOVE_ERRORS_ASYNC,"").replace(RETURN_ASYNC,RETURN_TRUE_ASYNC):out.replace(REMOVE_ERRORS,"").replace(RETURN_VALID,RETURN_TRUE):out}function schemaHasRules(schema,rules){for(var key in schema)if(rules[key])return!0}function schemaHasRulesExcept(schema,rules,exceptKeyword){for(var key in schema)if(key!=exceptKeyword&&rules[key])return!0}function toQuotedString(str){return"'"+escapeQuotes(str)+"'"}function getPathExpr(currentPath,expr,jsonPointers,isNumber){var path=jsonPointers?"'/' + "+expr+(isNumber?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):isNumber?"'[' + "+expr+" + ']'":"'[\\'' + "+expr+" + '\\']'";return joinPaths(currentPath,path)}function getPath(currentPath,prop,jsonPointers){var path=toQuotedString(jsonPointers?"/"+escapeJsonPointer(prop):getProperty(prop));return joinPaths(currentPath,path)}function getData($data,lvl,paths){var up,jsonPointer,data,matches;if(""===$data)return"rootData";if("/"==$data[0]){if(!JSON_POINTER.test($data))throw new Error("Invalid JSON-pointer: "+$data);jsonPointer=$data,data="rootData"}else{if(matches=$data.match(RELATIVE_JSON_POINTER),!matches)throw new Error("Invalid JSON-pointer: "+$data);if(up=+matches[1],jsonPointer=matches[2],"#"==jsonPointer){if(up>=lvl)throw new Error("Cannot access property/index "+up+" levels up, current level is "+lvl);return paths[lvl-up]}if(up>lvl)throw new Error("Cannot access data "+up+" levels up, current level is "+lvl);if(data="data"+(lvl-up||""),!jsonPointer)return data}for(var expr=data,segments=jsonPointer.split("/"),i=0;i<segments.length;i++){var segment=segments[i];segment&&(data+=getProperty(unescapeJsonPointer(segment)),expr+=" && "+data)}return expr}function joinPaths(a,b){return'""'==a?b:(a+" + "+b).replace(/' \+ '/g,"")}function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}function escapeJsonPointer(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(str){return str.replace(/~1/g,"/").replace(/~0/g,"~")}module.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,ucs2length:require("./ucs2length"),varOccurences:varOccurences,varReplace:varReplace,cleanUpCode:cleanUpCode,cleanUpVarErrors:cleanUpVarErrors,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,stableStringify:require("json-stable-stringify"),toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};var COERCE_TO_TYPES=toHash(["string","number","integer","boolean","null"]),IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i,SINGLE_QUOTE=/'|\\/g,EMPTY_ELSE=/else\s*{\s*}/g,EMPTY_IF_NO_ELSE=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,EMPTY_IF_WITH_ELSE=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,ERRORS_REGEXP=/[^v\.]errors/g,REMOVE_ERRORS=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,REMOVE_ERRORS_ASYNC=/var errors = 0;|var vErrors = null;/g,RETURN_VALID="return errors === 0;",RETURN_TRUE="validate.errors = null; return true;",RETURN_ASYNC=/if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,RETURN_TRUE_ASYNC="return true;",JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\util.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{"./ucs2length":12,_process:403,buffer:149,"form-data":278,"json-stable-stringify":43}],14:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){function ValidationError(errors){this.message="validation failed",this.errors=errors,this.ajv=this.validation=!0}module.exports=ValidationError,ValidationError.prototype=Object.create(Error.prototype),ValidationError.prototype.constructor=ValidationError}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules\\ajv\\lib\\compile\\validation_error.js","/node_modules\\ajv\\lib\\compile",require("form-data"))},{_process:403,buffer:149,"form-data":278}],15:[function(require,module,exports){(function(process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname,FormData){module.exports=function(it,$keyword){var $errorKeyword,out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl;if(out+="var "+$valid+" = undefined;",it.opts.format===!1)return out+=" "+$valid+" = true; ";var $schemaFormat=it.schema.format,$isDataFormat=it.opts.v5&&$schemaFormat.$data,$closingBraces="";if($isDataFormat){var $schemaValueFormat=it.util.getData($schemaFormat.$data,$dataLvl,it.dataPathArr),$format="format"+$lvl,$compare="compare"+$lvl;out+=" var "+$format+" = formats["+$schemaValueFormat+"] , "+$compare+" = "+$format+" && "+$format+".compare;"}else{var $format=it.formats[$