angular-jsoneditor
Version:
Angular wrapper for jsoneditor
2 lines • 682 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("angular-jsoneditor",[],t):"object"==typeof exports?exports["angular-jsoneditor"]=t():e["angular-jsoneditor"]=t()}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=n(r);t.default=angular.module("angular-jsoneditor",[]).directive("angularJsoneditor",o.default),e.exports=t.default},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=n(r);i(75),i(78),t.default=function(){"ngInject";return{restrict:"E",require:"ngModel",scope:{options:"="},link:function(e,t,i,n){var r=void 0,s=function(i){var s=angular.extend({},{},i);return s.onChange=function(){var t=!1;try{n.$setViewValue(r.get()),t=!0}catch(e){throw e}finally{n.$setValidity("json",t),n.$setTouched(),e.$apply(),i.onChange&&"function"==typeof i.onChange&&i.onChange()}},t.html(""),new o.default(t[0],s)};r=s(e.options),e.$watch("options",function(t,i){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];if(t[n]!==i[n])if("mode"===n)r.setMode(o);else{if("name"!==n)return r=s(t),void e.updateJsonEditor();r.setName(o)}}},!0),e.$on("$destroy",function(){r=null}),e.updateJsonEditor=function(){r.set(n.$viewValue||{})},n.$render=e.updateJsonEditor,e.$watch(function(){return n.$modelValue},function(t){angular.equals(t,r.get())||e.updateJsonEditor()},!0)}}},e.exports=t.default},function(e,t,i){e.exports=i(3)},function(e,t,i){"use strict";function n(e,t,i){if(!(this instanceof n))throw new Error('JSONEditor constructor called without "new".');var r=a.getInternetExplorerVersion();if(r!=-1&&r<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");if(t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,delete t.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,delete t.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,delete t.editable),t)){var o=["ace","theme","ajv","schema","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys"];Object.keys(t).forEach(function(e){o.indexOf(e)===-1&&console.warn('Unknown option "'+e+'". This option will be ignored')})}arguments.length&&this._create(e,t,i)}var r;try{r=i(4)}catch(e){}var o=i(55),s=i(66),a=i(58);n.modes={},n.prototype.DEBOUNCE_INTERVAL=150,n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||"tree";this.setMode(n)},n.prototype.destroy=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){return this.json},n.prototype.setText=function(e){this.json=a.parse(e)},n.prototype.getText=function(){return JSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){return this.options&&this.options.name},n.prototype.setMode=function(e){var t,i,r=this.container,o=a.extend({},this.options),s=o.mode;o.mode=e;var l=n.modes[e];if(!l)throw new Error('Unknown mode "'+o.mode+'"');try{var c="text"==l.data;if(i=this.getName(),t=this[c?"getText":"get"](),this.destroy(),a.clear(this),a.extend(this,l.mixin),this.create(r,o),this.setName(i),this[c?"setText":"set"](t),"function"==typeof l.load)try{l.load.call(this)}catch(e){console.error(e)}if("function"==typeof o.onModeChange&&e!==s)try{o.onModeChange(e,s)}catch(e){console.error(e)}}catch(e){this._onError(e)}},n.prototype.getMode=function(){return this.options.mode},n.prototype._onError=function(e){if(!this.options||"function"!=typeof this.options.onError)throw e;this.options.onError(e)},n.prototype.setSchema=function(e){if(e){var t;try{t=this.options.ajv||r({allErrors:!0,verbose:!0})}catch(e){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}t&&(this.validateSchema=t.compile(e),this.options.schema=e,this.validate()),this.refresh()}else this.validateSchema=null,this.options.schema=null,this.validate(),this.refresh()},n.prototype.validate=function(){},n.prototype.refresh=function(){},n.registerMode=function(e){var t,i;if(a.isArray(e))for(t=0;t<e.length;t++)n.registerMode(e[t]);else{if(!("mode"in e))throw new Error('Property "mode" missing');if(!("mixin"in e))throw new Error('Property "mixin" missing');if(!("data"in e))throw new Error('Property "data" missing');var r=e.mode;if(r in n.modes)throw new Error('Mode "'+r+'" already registered');if("function"!=typeof e.mixin.create)throw new Error('Required function "create" missing on mixin');var o=["setMode","registerMode","modes"];for(t=0;t<o.length;t++)if(i=o[t],i in e.mixin)throw new Error('Reserved property "'+i+'" not allowed in mixin');n.modes[r]=e}},n.registerMode(o),n.registerMode(s),e.exports=n},function(e,t,i){"use strict";function n(e){return v.test(e)}function r(e){function t(e,t){var i;if("string"==typeof e){if(i=x(e),!i)throw new Error('no schema with key or ref "'+e+'"')}else{var n=$(e);i=n.validate||D(n)}var r=i(t);return i.async?"*"==P._opts.async?m(r):r:(P.errors=i.errors,r)}function w(e){var t=$(e);return t.validate||D(t)}function b(e,t,i,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)b(e[r],void 0,i,n);else{t=s.normalizeId(t||e.id),j(t);var o=P._schemas[t]=$(e,i,!0);o.meta=n}}function A(e,t,i){b(e,t,i,!0)}function C(e,i){var r=e.$schema||P._opts.defaultMeta||E(),o=P._formats.uri;P._formats.uri="function"==typeof o?n:v;var s=t(r,e);if(P._formats.uri=o,!s&&i){var a="schema is invalid:"+B();if("log"!=P._opts.validateSchema)throw new Error(a);console.error(a)}return s}function E(){var e=P._opts.meta;return P._opts.defaultMeta="object"==typeof e?e.id||e:P._opts.v5?u.META_SCHEMA_ID:g,P._opts.defaultMeta}function x(e){var t=F(e);switch(typeof t){case"object":return t.validate||D(t);case"string":return x(t)}}function F(e){return e=s.normalizeId(e),P._schemas[e]||P._refs[e]}function k(e){switch(typeof e){case"undefined":return S(P._schemas),S(P._refs),void P._cache.clear();case"string":var t=F(e);return t&&P._cache.del(t.jsonStr),delete P._schemas[e],void delete P._refs[e];case"object":if(e instanceof RegExp)return S(P._schemas,e),void S(P._refs,e);var i=c(e);P._cache.del(i);var n=e.id;n&&(n=s.normalizeId(n),delete P._schemas[n],delete P._refs[n])}}function S(e,t){for(var i in e){var n=e[i];n.meta||t&&!t.test(i)||(P._cache.del(n.jsonStr),delete e[i])}}function $(e,t,i){if("object"!=typeof e)throw new Error("schema should be object");var n=c(e),r=P._cache.get(n);if(r)return r;i=i||P._opts.addUsedSchema!==!1;var o=s.normalizeId(e.id);o&&i&&j(o),P._opts.validateSchema===!1||t||C(e,!0);var a=s.ids.call(P,e),h=new l({id:o,schema:e,localRefs:a,jsonStr:n});return"#"!=o[0]&&i&&(P._refs[o]=h),P._cache.put(n,h),h}function D(e,t){function i(){var t=e.validate,n=t.apply(null,arguments);return i.errors=t.errors,n}if(e.compiling)return e.validate=i,i.schema=e.schema,i.errors=null,i.root=t?t:i,e.schema.$async===!0&&(i.async=!0),i;e.compiling=!0;var n;e.meta&&(n=P._opts,P._opts=P._metaOpts);var r;try{r=o.call(P,e.schema,t,e.localRefs)}finally{e.compiling=!1,e.meta&&(P._opts=n)}return e.validate=r,e.refs=r.refs,e.refVal=r.refVal,e.root=r.root,r}function B(e,t){if(e=e||P.errors,!e)return"No errors";t=t||{};for(var i=void 0===t.separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,r="",o=0;o<e.length;o++){var s=e[o];s&&(r+=n+s.dataPath+" "+s.message+i)}return r.slice(0,-i.length)}function _(e,t){"string"==typeof t&&(t=new RegExp(t)),P._formats[e]=t}function L(){if(P._opts.meta!==!1){var e=i(54);A(e,g,!0),P._refs["http://json-schema.org/schema"]=g}var t=P._opts.schemas;if(t)if(Array.isArray(t))b(t);else for(var n in t)b(t[n],n)}function R(){for(var e in P._opts.formats){var t=P._opts.formats[e];_(e,t)}}function j(e){if(P._schemas[e]||P._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function T(){for(var e=f.copy(P._opts),t=0;t<y.length;t++)delete e[y[t]];return e}if(!(this instanceof r))return new r(e);var P=this;e=this._opts=f.copy(e)||{},this._schemas={},this._refs={},this._formats=h(e.format),this._cache=e.cache||new a,this._loadingSchemas={},this.RULES=d(),this.validate=t,this.compile=w,this.addSchema=b,this.addMetaSchema=A,this.validateSchema=C,this.getSchema=x,this.removeSchema=k,this.addFormat=_,this.errorsText=B,this._addSchema=$,this._compile=D,e.loopRequired=e.loopRequired||1/0,(e.async||e.transpile)&&p.setup(e),e.beautify===!0&&(e.beautify={indent_size:2}),"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),this._metaOpts=T(),L(),e.formats&&R(),e.v5&&u.enable(this),"object"==typeof e.meta&&A(e.meta)}var o=i(5),s=i(6),a=i(25),l=i(20),c=i(16),h=i(26),d=i(27),u=i(47),f=i(15),p=i(21),m=i(23);e.exports=r,r.prototype.compileAsync=p.compile,r.prototype.addKeyword=i(53),r.ValidationError=i(24);var g="http://json-schema.org/draft-04/schema",v=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,y=["removeAdditional","useDefaults","coerceTypes"]},function(module,exports,__webpack_require__){"use strict";function compile(schema,root,localRefs,baseId){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&&(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,eval(validateCode),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),validate.sourceCode=sourceCode,validate}function resolveRef(e,t,i){t=resolve.url(e,t);var n,r,o=refs[t];if(void 0!==o)return n=refVal[o],r="refVal["+o+"]",resolvedRef(n,r);if(!i){var s=root.refs[t];if(void 0!==s)return n=root.refVal[s],r=addLocalRef(t,n),resolvedRef(n,r)}r=addLocalRef(t);var a=resolve.call(self,localCompile,root,t);if(!a){var l=localRefs&&localRefs[t];l&&(a=resolve.inlineRef(l,opts.inlineRefs)?l:compile.call(self,l,root,localRefs,e))}return a?(replaceLocalRef(t,a),resolvedRef(a,r)):void 0}function addLocalRef(e,t){var i=refVal.length;return refVal[i]=t,refs[e]=i,"refVal"+i}function replaceLocalRef(e,t){var i=refs[e];refVal[i]=t}function resolvedRef(e,t){return"object"==typeof e?{code:t,schema:e,inline:!0}:{code:t,async:e&&e.async}}function usePattern(e){var t=patternsHash[e];return void 0===t&&(t=patternsHash[e]=patterns.length,patterns[t]=e),"pattern"+t}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return util.toQuotedString(e);case"object":if(null===e)return"null";var t=stableStringify(e),i=defaultsHash[t];return void 0===i&&(i=defaultsHash[t]=defaults.length,defaults[i]=e),"default"+i}}function useCustomRule(e,t,i,n){var r,o=e.definition.compile,s=e.definition.inline,a=e.definition.macro;o?r=o.call(self,t,i):a?(r=a.call(self,t,i),opts.validateSchema!==!1&&self.validateSchema(r,!0)):r=s?s.call(self,n,e.keyword,t,i):e.definition.validate;var l=customRules.length;return customRules[l]=r,{code:"customRule"+l,validate:r}}var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var formats=this._formats,RULES=this.RULES;return localCompile(schema,root,localRefs,baseId)}function patternCode(e,t){return"var pattern"+e+" = new RegExp("+util.toQuotedString(t[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,t){return t[e]?"var refVal"+e+" = refVal["+e+"];":""}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,t){if(!e.length)return"";for(var i="",n=0;n<e.length;n++)i+=t(n,e);return i}var resolve=__webpack_require__(6),util=__webpack_require__(15),stableStringify=__webpack_require__(16),async=__webpack_require__(21),beautify=function(){try{return __webpack_require__(!function(){var e=new Error('Cannot find module "js-beautify"');throw e.code="MODULE_NOT_FOUND",e}()).js_beautify}catch(e){}}(),validateGenerator=__webpack_require__(22);module.exports=compile;var co=__webpack_require__(23),ucs2length=util.ucs2length,equal=__webpack_require__(14),ValidationError=__webpack_require__(24)},function(e,t,i){"use strict";function n(e,t,i){var o=this._refs[i];if("string"==typeof o){if(!this._refs[o])return n.call(this,e,t,o);o=this._refs[o]}if(o=o||this._schemas[i],o instanceof y)return a(o.schema,this._opts.inlineRefs)?o.schema:o.validate||this._compile(o);var s,l,c,h=r.call(this,t,i);return h&&(s=h.schema,t=h.root,c=h.baseId),s instanceof y?l=s.validate||e.call(this,s.schema,t,void 0,c):s&&(l=a(s,this._opts.inlineRefs)?s:e.call(this,s,t,void 0,c)),l}function r(e,t){var i=m.parse(t,!1,!0),n=d(i),r=h(e.schema.id);if(n!==r){var a=u(n),l=this._refs[a];if("string"==typeof l)return o.call(this,e,l,i);if(l instanceof y)l.validate||this._compile(l),e=l;else if(l=this._schemas[a],l instanceof y){if(l.validate||this._compile(l),a==u(t))return{schema:l,root:e,baseId:r};e=l}if(!e.schema)return;r=h(e.schema.id)}return s.call(this,i,r,e.schema,e)}function o(e,t,i){var n=r.call(this,e,t);if(n){var o=n.schema,a=n.baseId;return e=n.root,o.id&&(a=f(a,o.id)),s.call(this,i,a,o,e)}}function s(e,t,i,n){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var o=e.hash.split("/"),s=1;s<o.length;s++){var a=o[s];if(a){if(a=v.unescapeFragment(a),i=i[a],!i)break;if(i.id&&!w[a]&&(t=f(t,i.id)),i.$ref){var l=f(t,i.$ref),c=r.call(this,n,l);c&&(i=c.schema,n=c.root,t=c.baseId)}}}return i&&i!=n.schema?{schema:i,root:n,baseId:t}:void 0}}function a(e,t){return t!==!1&&(void 0===t||t===!0?l(e):t?c(e)<=t:void 0)}function l(e){var t;if(Array.isArray(e)){for(var i=0;i<e.length;i++)if(t=e[i],"object"==typeof t&&!l(t))return!1}else for(var n in e){if("$ref"==n)return!1;if(t=e[n],"object"==typeof t&&!l(t))return!1}return!0}function c(e){var t,i=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(t=e[n],"object"==typeof t&&(i+=c(t)),i==1/0)return 1/0}else for(var r in e){if("$ref"==r)return 1/0;if(b[r])i++;else if(t=e[r],"object"==typeof t&&(i+=c(t)+1),i==1/0)return 1/0}return i}function h(e,t){t!==!1&&(e=u(e));var i=m.parse(e,!1,!0);return d(i)}function d(e){return(e.protocol||"")+(e.protocol?"//":"")+(e.host||"")+(e.path||"")+"#"}function u(e){return e?e.replace(A,""):""}function f(e,t){return t=u(t),m.resolve(e,t)}function p(e){function t(e,i,r){if(Array.isArray(e))for(var o=0;o<e.length;o++)t.call(this,e[o],i+"/"+o,r);else if(e&&"object"==typeof e){if("string"==typeof e.id){var s=r=r?m.resolve(r,e.id):e.id;s=u(s);var a=this._refs[s];if("string"==typeof a&&(a=this._refs[a]),a&&a.schema){if(!g(e,a.schema))throw new Error('id "'+s+'" resolves to more than one schema')}else if(s!=u(i))if("#"==s[0]){if(n[s]&&!g(e,n[s]))throw new Error('id "'+s+'" resolves to more than one schema');n[s]=e}else this._refs[s]=i}for(var l in e)t.call(this,e[l],i+"/"+v.escapeFragment(l),r)}}var i=u(e.id),n={};return t.call(this,e,h(i,!1),i),n}var m=i(7),g=i(14),v=i(15),y=i(20);e.exports=n,n.normalizeId=u,n.fullPath=h,n.url=f,n.ids=p,n.inlineRef=a;var w=v.toHash(["properties","patternProperties","enum","dependencies","definitions"]),b=v.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),A=/#\/?$/},function(e,t,i){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function r(e,t,i){if(e&&c.isObject(e)&&e instanceof n)return e;var r=new n;return r.parse(e,t,i),r}function o(e){return c.isString(e)&&(e=r(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return r(e,!1,!0).resolve(t)}function a(e,t){return e?r(e,!1,!0).resolveObject(t):t}var l=i(8),c=i(10);t.parse=r,t.resolve=s,t.resolveObject=a,t.format=o,t.Url=n;var h=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(f),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y=255,w=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},C={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=i(11);n.prototype.parse=function(e,t,i){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),r=n!==-1&&n<e.indexOf("#")?"?":"#",o=e.split(r),s=/\\/g;o[0]=o[0].replace(s,"/"),e=o.join(r);var a=e;if(a=a.trim(),!i&&1===e.split("#").length){var d=u.exec(a);if(d)return this.path=a,this.href=a,this.pathname=d[1],d[2]?(this.search=d[2],t?this.query=x.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=h.exec(a);if(f){f=f[0];var p=f.toLowerCase();this.protocol=p,a=a.substr(f.length)}if(i||f||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var F="//"===a.substr(0,2);!F||f&&C[f]||(a=a.substr(2),this.slashes=!0)}if(!C[f]&&(F||f&&!E[f])){for(var k=-1,S=0;S<v.length;S++){var $=a.indexOf(v[S]);$!==-1&&(k===-1||$<k)&&(k=$)}var D,B;B=k===-1?a.lastIndexOf("@"):a.lastIndexOf("@",k),B!==-1&&(D=a.slice(0,B),a=a.slice(B+1),this.auth=decodeURIComponent(D)),k=-1;for(var S=0;S<g.length;S++){var $=a.indexOf(g[S]);$!==-1&&(k===-1||$<k)&&(k=$)}k===-1&&(k=a.length),this.host=a.slice(0,k),a=a.slice(k),this.parseHost(),this.hostname=this.hostname||"";var _="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!_)for(var L=this.hostname.split(/\./),S=0,R=L.length;S<R;S++){var j=L[S];if(j&&!j.match(w)){for(var T="",P=0,M=j.length;P<M;P++)T+=j.charCodeAt(P)>127?"x":j[P];if(!T.match(w)){var O=L.slice(0,S),N=L.slice(S+1),I=j.match(b);I&&(O.push(I[1]),N.unshift(I[2])),N.length&&(a="/"+N.join(".")+a),this.hostname=O.join(".");break}}}this.hostname.length>y?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=l.toASCII(this.hostname));var W=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+W,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!A[p])for(var S=0,R=m.length;S<R;S++){var z=m[S];if(a.indexOf(z)!==-1){var V=encodeURIComponent(z);V===z&&(V=escape(z)),a=a.split(z).join(V)}}var U=a.indexOf("#");U!==-1&&(this.hash=a.substr(U),a=a.slice(0,U));var K=a.indexOf("?");if(K!==-1?(this.search=a.substr(K),this.query=a.substr(K+1),t&&(this.query=x.parse(this.query)),a=a.slice(0,K)):t&&(this.search="",this.query={}),a&&(this.pathname=a),E[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var W=this.pathname||"",q=this.search||"";this.path=W+q}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",n=this.hash||"",r=!1,o="";this.host?r=e+this.host:this.hostname&&(r=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(o=x.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||E[t])&&r!==!1?(r="//"+(r||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):r||(r=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),i=i.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+r+i+s+n},n.prototype.resolve=function(e){return this.resolveObject(r(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(c.isString(e)){var t=new n;t.parse(e,!1,!0),e=t}for(var i=new n,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];i[s]=this[s]}if(i.hash=e.hash,""===e.href)return i.href=i.format(),i;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),l=0;l<a.length;l++){var h=a[l];"protocol"!==h&&(i[h]=e[h])}return E[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(e.protocol&&e.protocol!==i.protocol){if(!E[e.protocol]){for(var d=Object.keys(e),u=0;u<d.length;u++){var f=d[u];i[f]=e[f]}return i.href=i.format(),i}if(i.protocol=e.protocol,e.host||C[e.protocol])i.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),i.pathname=p.join("/")}if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var m=i.pathname||"",g=i.search||"";i.path=m+g}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var v=i.pathname&&"/"===i.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=y||v||i.host&&e.pathname,b=w,A=i.pathname&&i.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],x=i.protocol&&!E[i.protocol];if(x&&(i.hostname="",i.port=null,i.host&&(""===A[0]?A[0]=i.host:A.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===A[0])),y)i.host=e.host||""===e.host?e.host:i.host,i.hostname=e.hostname||""===e.hostname?e.hostname:i.hostname,i.search=e.search,i.query=e.query,A=p;else if(p.length)A||(A=[]),A.pop(),A=A.concat(p),i.search=e.search,i.query=e.query;else if(!c.isNullOrUndefined(e.search)){if(x){i.hostname=i.host=A.shift();var F=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");F&&(i.auth=F.shift(),i.host=i.hostname=F.shift())}return i.search=e.search,i.query=e.query,c.isNull(i.pathname)&&c.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!A.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var k=A.slice(-1)[0],S=(i.host||e.host||A.length>1)&&("."===k||".."===k)||""===k,$=0,D=A.length;D>=0;D--)k=A[D],"."===k?A.splice(D,1):".."===k?(A.splice(D,1),$++):$&&(A.splice(D,1),$--);if(!w&&!b)for(;$--;$)A.unshift("..");!w||""===A[0]||A[0]&&"/"===A[0].charAt(0)||A.unshift(""),S&&"/"!==A.join("/").substr(-1)&&A.push("");var B=""===A[0]||A[0]&&"/"===A[0].charAt(0);if(x){i.hostname=i.host=B?"":A.length?A.shift():"";var F=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");F&&(i.auth=F.shift(),i.host=i.hostname=F.shift())}return w=w||i.host&&A.length,w&&!B&&A.unshift(""),A.length?i.pathname=A.join("/"):(i.pathname=null,i.path=null),c.isNull(i.pathname)&&c.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},n.prototype.parseHost=function(){var e=this.host,t=d.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,i){var n;(function(e,r){!function(o){function s(e){throw RangeError(L[e])}function a(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function l(e,t){var i=e.split("@"),n="";i.length>1&&(n=i[0]+"@",e=i[1]),e=e.replace(_,".");var r=e.split("."),o=a(r,t).join(".");return n+o}function c(e){for(var t,i,n=[],r=0,o=e.length;r<o;)t=e.charCodeAt(r++),t>=55296&&t<=56319&&r<o?(i=e.charCodeAt(r++),56320==(64512&i)?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--)):n.push(t);return n}function h(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=T(e>>>10&1023|55296),e=56320|1023&e),t+=T(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:A}function u(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function f(e,t,i){var n=0;for(e=i?j(e/F):e>>1,e+=j(e/t);e>R*E>>1;n+=A)e=j(e/R);return j(n+(R+1)*e/(e+x))}function p(e){var t,i,n,r,o,a,l,c,u,p,m=[],g=e.length,v=0,y=S,w=k;for(i=e.lastIndexOf($),i<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&s("not-basic"),m.push(e.charCodeAt(n));for(r=i>0?i+1:0;r<g;){for(o=v,a=1,l=A;r>=g&&s("invalid-input"),c=d(e.charCodeAt(r++)),(c>=A||c>j((b-v)/a))&&s("overflow"),v+=c*a,u=l<=w?C:l>=w+E?E:l-w,!(c<u);l+=A)p=A-u,a>j(b/p)&&s("overflow"),a*=p;t=m.length+1,w=f(v-o,t,0==o),j(v/t)>b-y&&s("overflow"),y+=j(v/t),v%=t,m.splice(v++,0,y)}return h(m)}function m(e){var t,i,n,r,o,a,l,h,d,p,m,g,v,y,w,x=[];for(e=c(e),g=e.length,t=S,i=0,o=k,a=0;a<g;++a)m=e[a],m<128&&x.push(T(m));for(n=r=x.length,r&&x.push($);n<g;){for(l=b,a=0;a<g;++a)m=e[a],m>=t&&m<l&&(l=m);for(v=n+1,l-t>j((b-i)/v)&&s("overflow"),i+=(l-t)*v,t=l,a=0;a<g;++a)if(m=e[a],m<t&&++i>b&&s("overflow"),m==t){for(h=i,d=A;p=d<=o?C:d>=o+E?E:d-o,!(h<p);d+=A)w=h-p,y=A-p,x.push(T(u(p+w%y,0))),h=j(w/y);x.push(T(u(h,0))),o=f(i,v,n==r),i=0,++n}++i,++t}return x.join("")}function g(e){return l(e,function(e){return D.test(e)?p(e.slice(4).toLowerCase()):e})}function v(e){return l(e,function(e){return B.test(e)?"xn--"+m(e):e})}var y=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof r&&r);y.global!==y&&y.window!==y&&y.self!==y||(o=y);var w,b=2147483647,A=36,C=1,E=26,x=38,F=700,k=72,S=128,$="-",D=/^xn--/,B=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=A-C,j=Math.floor,T=String.fromCharCode;w={version:"1.3.2",ucs2:{decode:c,encode:h},decode:p,encode:m,toASCII:v,toUnicode:g},n=function(){return w}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))}(this)}).call(t,i(9)(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,i){"use strict";t.decode=t.parse=i(12),t.encode=t.stringify=i(13)},function(e,t){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,r){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var l=e.length;a>0&&l>a&&(l=a);for(var c=0;c<l;++c){var h,d,u,f,p=e[c].replace(s,"%20"),m=p.indexOf(n);m>=0?(h=p.substr(0,m),d=p.substr(m+1)):(h=p,d=""),u=decodeURIComponent(h),f=decodeURIComponent(d),i(o,u)?Array.isArray(o[u])?o[u].push(f):o[u]=[o[u],f]:o[u]=f}return o}},function(e,t){"use strict";var i=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,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(r){var o=encodeURIComponent(i(r))+n;return Array.isArray(e[r])?e[r].map(function(e){return o+encodeURIComponent(i(e))}).join(t):o+encodeURIComponent(i(e[r]))}).join(t):r?encodeURIComponent(i(r))+n+encodeURIComponent(i(e)):""}},function(e,t){"use strict";e.exports=function e(t,i){if(t===i)return!0;var n,r=Array.isArray(t),o=Array.isArray(i);if(r&&o){if(t.length!=i.length)return!1;for(n=0;n<t.length;n++)if(!e(t[n],i[n]))return!1;return!0}if(r!=o)return!1;if(t&&i&&"object"==typeof t&&"object"==typeof i){var s=Object.keys(t);if(s.length!==Object.keys(i).length)return!1;for(n=0;n<s.length;n++)if(void 0===i[s[n]])return!1;for(n=0;n<s.length;n++)if(!e(t[s[n]],i[s[n]]))return!1;return!0}return!1}},function(e,t,i){"use strict";function n(e,t){t=t||{};for(var i in e)t[i]=e[i];return t}function r(e,t,i){var n=i?" !== ":" === ",r=i?" || ":" && ",o=i?"!":"",s=i?"":"!";switch(e){case"null":return t+n+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+r+"typeof "+t+n+'"object"'+r+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+r+s+"("+t+" % 1))";default:return"typeof "+t+n+'"'+e+'"'}}function o(e,t){switch(e.length){case 1:return r(e[0],t,!0);default:var i="",n=a(e);n.array&&n.object&&(i=n.null?"(":"(!"+t+" || ",i+="typeof "+t+' !== "object")',delete n.null,delete n.array,delete n.object),n.number&&delete n.integer;for(var o in n)i+=(i?" && ":"")+r(o,t,!0);return i}}function s(e){if(Array.isArray(e)){for(var t=[],i=0;i<e.length;i++){var n=e[i];F[n]&&(t[t.length]=n)}if(t.length)return t}else if(F[e])return[e]}function a(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=!0;return t}function l(e){return"number"==typeof e?"["+e+"]":k.test(e)?"."+e:"['"+e.replace(S,"\\$&")+"']"}function c(e){return e.replace(S,"\\$&")}function h(e){for(var t,i=0,n=e.length,r=0;r<n;)i++,t=e.charCodeAt(r++),t>=55296&&t<=56319&&r<n&&(t=e.charCodeAt(r),56320==(64512&t)&&r++);return i}function d(e,t){t+="[^0-9]";var i=e.match(new RegExp(t,"g"));return i?i.length:0}function u(e,t,i){return t+="([^0-9])",i=i.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),i+"$1")}function f(e){return e.replace($,"").replace(D,"").replace(B,"if (!($1))")}function p(e,t){var i=e.match(_);return i&&2===i.length?t?e.replace(R,"").replace(P,M):e.replace(L,"").replace(j,T):e}function m(e,t){for(var i in e)if(t[i])return!0}function g(e){return"'"+c(e)+"'"}function v(e,t,i,n){var r=i?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return b(e,r)}function y(e,t,i){var n=g(i?"/"+E(t):l(t));return b(e,n)}function w(e,t,i){var n=e.match(O);if(!n)throw new Error("Invalid relative JSON-pointer: "+e);var r=+n[1],o=n[2];if("#"==o){if(r>=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return i[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);var s="data"+(t-r||"");if(!o)return s;for(var a=s,c=o.split("/"),h=0;h<c.length;h++){var d=c[h];d&&(s+=l(x(d)),a+=" && "+s)}return a}function b(e,t){return'""'==e?t:(e+" + "+t).replace(/' \+ '/g,"")}function A(e){return x(decodeURIComponent(e))}function C(e){return encodeURIComponent(E(e))}function E(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function x(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports={copy:n,checkDataType:r,checkDataTypes:o,coerceToTypes:s,toHash:a,getProperty:l,escapeQuotes:c,ucs2length:h,varOccurences:d,varReplace:u,cleanUpCode:f,cleanUpVarErrors:p,schemaHasRules:m,stableStringify:i(16),toQuotedString:g,getPathExpr:v,getPath:y,getData:w,unescapeFragment:A,escapeFragment:C,escapeJsonPointer:E};var F=a(["string","number","integer","boolean","null"]),k=/^[a-z$_][a-z$_0-9]*$/i,S=/'|\\/g,$=/else\s*{\s*}/g,D=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,B=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,_=/[^v\.]errors/g,L=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,R=/var errors = 0;|var vErrors = null;/g,j="return errors === 0;",T="validate.errors = null; return true;",P=/if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,M="return true;",O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
},function(e,t,i){var n="undefined"!=typeof JSON?JSON:i(17);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var i=t.space||"";"number"==typeof i&&(i=Array(i+1).join(" "));var s="boolean"==typeof t.cycles&&t.cycles,a=t.replacer||function(e,t){return t},l=t.cmp&&function(e){return function(t){return function(i,n){var r={key:i,value:t[i]},o={key:n,value:t[n]};return e(r,o)}}}(t.cmp),c=[];return function e(t,h,d,u){var f=i?"\n"+new Array(u+1).join(i):"",p=i?": ":":";if(d&&d.toJSON&&"function"==typeof d.toJSON&&(d=d.toJSON()),d=a.call(t,h,d),void 0!==d){if("object"!=typeof d||null===d)return n.stringify(d);if(r(d)){for(var m=[],g=0;g<d.length;g++){var v=e(d,g,d[g],u+1)||n.stringify(null);m.push(f+i+v)}return"["+m.join(",")+f+"]"}if(c.indexOf(d)!==-1){if(s)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}c.push(d);for(var y=o(d).sort(l&&l(d)),m=[],g=0;g<y.length;g++){var h=y[g],w=e(d,h,d[h],u+1);if(w){var b=n.stringify(h)+p+w;m.push(f+i+b)}}return c.splice(c.indexOf(d),1),"{"+m.join(",")+f+"}"}}({"":e},"",e,0)};var r=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},i=[];for(var n in e)t.call(e,n)&&i.push(n);return i}},function(e,t,i){t.parse=i(18),t.stringify=i(19)},function(e,t){var i,n,r,o,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},a=function(e){throw{name:"SyntaxError",message:e,at:i,text:r}},l=function(e){return e&&e!==n&&a("Expected '"+e+"' instead of '"+n+"'"),n=r.charAt(i),i+=1,n},c=function(){var e,t="";for("-"===n&&(t="-",l("-"));n>="0"&&n<="9";)t+=n,l();if("."===n)for(t+=".";l()&&n>="0"&&n<="9";)t+=n;if("e"===n||"E"===n)for(t+=n,l(),"-"!==n&&"+"!==n||(t+=n,l());n>="0"&&n<="9";)t+=n,l();return e=+t,isFinite(e)?e:void a("Bad number")},h=function(){var e,t,i,r="";if('"'===n)for(;l();){if('"'===n)return l(),r;if("\\"===n)if(l(),"u"===n){for(i=0,t=0;t<4&&(e=parseInt(l(),16),isFinite(e));t+=1)i=16*i+e;r+=String.fromCharCode(i)}else{if("string"!=typeof s[n])break;r+=s[n]}else r+=n}a("Bad string")},d=function(){for(;n&&n<=" ";)l()},u=function(){switch(n){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}a("Unexpected '"+n+"'")},f=function(){var e=[];if("["===n){if(l("["),d(),"]"===n)return l("]"),e;for(;n;){if(e.push(o()),d(),"]"===n)return l("]"),e;l(","),d()}}a("Bad array")},p=function(){var e,t={};if("{"===n){if(l("{"),d(),"}"===n)return l("}"),t;for(;n;){if(e=h(),d(),l(":"),Object.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=o(),d(),"}"===n)return l("}"),t;l(","),d()}}a("Bad object")};o=function(){switch(d(),n){case"{":return p();case"[":return f();case'"':return h();case"-":return c();default:return n>="0"&&n<="9"?c():u()}},e.exports=function(e,t){var s;return r=e,i=0,n=" ",s=o(),d(),n&&a("Syntax error"),"function"==typeof t?function e(i,n){var r,o,s=i[n];if(s&&"object"==typeof s)for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(o=e(s,r),void 0!==o?s[r]=o:delete s[r]);return t.call(i,n,s)}({"":s},""):s}},function(e,t){function i(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=l[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function n(e,t){var a,l,c,h,d,u=r,f=t[e];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON&&(f=f.toJSON(e)),"function"==typeof s&&(f=s.call(t,e,f)),typeof f){case"string":return i(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(r+=o,d=[],"[object Array]"===Object.prototype.toString.apply(f)){for(h=f.length,a=0;a<h;a+=1)d[a]=n(a,f)||"null";return c=0===d.length?"[]":r?"[\n"+r+d.join(",\n"+r)+"\n"+u+"]":"["+d.join(",")+"]",r=u,c}if(s&&"object"==typeof s)for(h=s.length,a=0;a<h;a+=1)l=s[a],"string"==typeof l&&(c=n(l,f),c&&d.push(i(l)+(r?": ":":")+c));else for(l in f)Object.prototype.hasOwnProperty.call(f,l)&&(c=n(l,f),c&&d.push(i(l)+(r?": ":":")+c));return c=0===d.length?"{}":r?"{\n"+r+d.join(",\n"+r)+"\n"+u+"}":"{"+d.join(",")+"}",r=u,c}}var r,o,s,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};e.exports=function(e,t,i){var a;if(r="",o="","number"==typeof i)for(a=0;a<i;a+=1)o+=" ";else"string"==typeof i&&(o=i);if(s=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return n("",{"":e})}},function(e,t,i){"use strict";function n(e){r.copy(e,this)}var r=i(15);e.exports=n},function(module,exports,__webpack_require__){"use strict";function setupAsync(e,t){t!==!1&&(t=!0);var i,n=e.async,r=e.transpile;switch(typeof r){case"string":var o=TRANSPILE[r];if(!o)throw new Error("bad transpiler: "+r);return e._transpileFunc=o(e,t);case"undefined":case"boolean":if("string"==typeof n){if(i=ASYNC[n],!i)throw new Error("bad async mode: "+n);return e.transpile=i(e,t)}for(var s=0;s<MODES.length;s++){var a=MODES[s];if(setupAsync(a,!1))return util.copy(a,e),e.transpile}throw new Error("generators, nodent and regenerator are not available");case"function":return e._transpileFunc=e.transpile;default:throw new Error("bad transpiler: "+r)}}function checkGenerators(opts,required){try{return eval("(function*(){})()"),!0}catch(e){if(required)throw new Error("generators not supported")}}function checkAsyncFunction(opts,required){try{return eval("(async function(){})()"),!0}catch(e){if(required)throw new Error("es7 async functions not supported")}}function getRegenerator(e,t){try{return regenerator||(regenerator=__webpack_require__(!function(){var e=new Error('Cannot find module "regenerator"');throw e.code="MODULE_NOT_FOUND",e}()),regenerator.runtime()),e.async&&e.async!==!0||(e.async="es7"),regeneratorTranspile}catch(e){if(t)throw new Error("regenerator not available")}}function regeneratorTranspile(e){return regenerator.compile(e).code}function getNodent(e,t){try{return nodent||(nodent=__webpack_require__(!function(){var e=new Error('Cannot find module "nodent"');throw e.code="MODULE_NOT_FOUND",e}())({log:!1,dontInstallRequireHook:!0})),"es7"!=e.async&&(e.async&&e.async!==!0&&console.warn("nodent transpiles only es7 async functions"),e.async="es7"),nodentTranspile}catch(e){if(t)throw new Error("nodent not available")}}function nodentTranspile(e){return nodent.compile(e,"",{promises:!0,sourcemap:!1}).code}function compileAsync(e,t){function i(e,t,n){function o(n){function o(n,o){if(n)return t(n);if(!r._refs[s]&&!r._schemas[s])try{r.addSchema(o,s)}catch(e){return void t(e)}i(e,t)}var s=n.missingSchema;if(r._refs[s]||r._schemas[s])return t(new Error("Schema "+s+" is loaded but"+n.missingRef+"cannot be resolved"));var a=r._loadingSchemas[s];a?"function"==typeof a?r._loadingSchemas[s]=[a,o]:a[a.length]=o:(r._loadingSchemas[s]=o,r._opts.loadSchema(s,function(e,t){var i=r._loadingSchemas[s];if(delete r._loadingSchemas[s],"function"==typeof i)i(e,t);else for(var n=0;n<i.length;n++)i[n](e,t)}))}function s(e,i){return n?void setTimeout(function(){t(e,i)}):t(e,i)}var a;try{a=r.compile(e)}catch(e){return void(e.missingSchema?o(e):s(e))}s(null,a)}var n,r=this;try{n=this._addSchema(e)}catch(e){return void setTimeout(function(){t(e)})}if(n.validate)setTimeout(function(){t(null,n.validate)});else{if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");i(e,t,!0)}}module.exports={setup:setupAsync,compile:compileAsync};var util=__webpack_require__(15),ASYNC={"*":checkGenerators,"co*":checkGenerators,es7:checkAsyncFunction},TRANSPILE={nodent:getNodent,regenerator:getRegenerator},MODES=[{async:"co*"},{async:"es7",transpile:"nodent"},{async:"co*",transpile:"regenerator"}],regenerator,nodent},function(e,t){"use strict";e.exports=function(e,t){function i(e){for(var t=0;t<e.rules.length;t++)if(n(e.rules[t]))return!0}function n(t){return void 0!==e.schema[t.keyword]||"properties"==t.keyword&&(e.schema.additionalProperties===!1||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length||e.opts.v5&&e.schema.patternGroups&&Object.keys(e.schema.patternGroups).length)}var r="",o=e.schema.$async===!0;if(e.isTop){var s=e.isTop,a=e.level=0,l=e.dataLevel=0,c="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,o){e.async=!0;var h="es7"==e.opts.async;e.yieldAwait=h?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],r+=" validate = ",o?h?r+=" (async function ":("co*"==e.opts.async&&(r+="co.wrap"),r+="(function* "):r+=" (function ",r+=" (data, dataPath, parentData, parentDataProperty) { 'use strict'; var vErrors = null; ",r+=" var errors = 0; "}else{var a=e.level,l=e.dataLevel,c="data"+(l||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),o&&!e.async)throw new Error("async schema in sync schema");r+=" var errs_"+a+" = errors;"}var d,u="valid"+a,f=!e.opts.allErrors,p="",m="",g=e.schema.type,v=Array.isArray(g);if(g&&e.opts.coerceTypes){var y=e.util.coerceToTypes(g);if(y){var w=e.schemaPath+".type",b=e.errSchemaPath+"/type",A=v?"checkDataTypes":"checkDataType";r+=" if ("+e.util[A](g,c,!0)+") { ";var C="dataType"+a,E="coerced"+a;r+=" var "+C+" = typeof "+c+"; var "+E+" = undefined; ";var x="",F=y;if(F)for(var k,S=-1,$=F.length-1;S<$;)k=F[S+=1],S&&(r+=" if ("+E+" === undefined) { ",x+="}"),"string"==k?r+=" if ("+C+" == 'number' || "+C+" == 'boolean') "+E+" = '' + "+c+"; else if ("+c+" === null) "+E+" = ''; ":"number"==k||"integer"==k?(r+=" if ("+C+" == 'boolean' || "+c+" === null || ("+C+" == 'string' && "+c+" && "+c+" == +"+c+" ","integer"==k&&(r+=" && !("+c+" % 1)"),r+=")) "+E+" = +"+c+"; "):"boolean"==k?r+=" if ("+c+" === 'false' || "+c+" === 0 || "+c+" === null) "+E+" = false; else if ("+c+" === 'true' || "+c+" === 1) "+E+" = true; ":"null"==k&&(r+=" if ("+c+" === '' || "+c+" === 0 || "+c+" === false) "+E+" = null; ");r+=" "+x+" if ("+E+" === undefined) { ";var D=D||[];D.push(r),r="",e.createErrors!==!1?(r+=" { keyword: '"+(d||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+b+"\" , params: { type: '",r+=v?""+g.join(","):""+g,r+="' } ",e.opts.messages!==!1&&(r+=" , message: 'should be ",r+=v?""+g.join(","):""+g,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var B=r;if(r=D.pop(),r+=!e.compositeRule&&f?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",l){var _="data"+(l-1||""),L=e.dataPathArr[l];r+=" "+c+" = "+_+"["+L+"] = "+E+"; "}else r+=" data = "+E+"; if (parentData !== undefined) parentData[parentDataProperty] = "+E+"; ";r+=" } } "}}var R=e.RULES;if(R)for(var j,T=-1,P=R.length-1;T<P;)if(j=R[T+=1],i(j)){if(j.type&&(r+=" if ("+e.util.checkDataType(j.type,c)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==j.type&&e.schema.properties){var M=e.schema.properties,O=Object.keys(M),N=O;if(N)for(var I,W=-1,H=N.length-1;W<H;){I=N[W+=1];var z=M[I];if(void 0!==z.default){var V=c+e.util.getProperty(I);r+=" if ("+V+" === undefined) "+V+" = ",r+="clone"==e.opts.useDefaults?" "+JSON.stringify(z.default)+" ":" "+e.useDefault(z.default)+" ",r+="; "}}}else if("array"==j.type&&Array.isArray(e.schema.items)){var U=e.schema.items;if(U)for(var z,S=-1,K=U.length-1;S<K;)if(z=U[S+=1],void 0!==z.default){var V=c+"["+S+"]";r+=" if ("+V+" === undefined) "+V+" = ",r+="clone"==e.opts.useDefaults?" "+JSON.stringify(z.default)+" ":" "+e.useDefault(z.default)+" ",r+="; "}}var q=j.rules;if(q)for(var G,Y=-1,J=q.length-1;Y<J;)if(G=q[Y+=1],n(G)){if(G.custom){var M=e.schema[G.keyword],Q=e.useCustomRule(G,M,e.schema,e),X=Q.code+".errors",w=e.schemaPath+"."+G.keyword,b=e.errSchemaPath+"/"+G.keyword,Z="errs"+a,S="i"+a,ee="ruleErr"+a,te=G.definition,ie=te.async,ne=te.inline,re=te.macro;if(ie&&!e.async)throw new Error("async keyword in sync schema");if(ne||re||(r+=""+X+" = null;"),r+="var "+Z+" = errors;var valid"+a+";",ne&&te.statements)r+=" "+Q.validate;else if(re){var oe=e.util.copy(e);oe.level++,oe.schema=Q.validate,oe.schemaPath="";var se=e.compositeRule;e.compositeRule=oe.compositeRule=!0;var ae=e.validate(oe).replace(/validate\.schema/g,Q.code);e.compositeRule=oe.compositeRule=se,r+=" "+ae}else if(te.compile||te.validate){var D=D||[];D.push(r),r="",r+=" "+Q.code+".call( ",r+=e.opts.passContext?"this":"self";Q.validate.length;r+=te.compile||te.schema===!1?" , "+c+" ":" , validate.schema"+w+" , "+c+" , validate.schema"+e.schemaPath+" ",r+=" , (dataPath || '')",'""'!=e.errorPath&&(r+=" + "+e.errorPath),r+=l?" , data"+(l-1||"")+" , "+e.dataPathArr[l]+" ":" , parentData , parentDataProperty ",r+=" ) ";var le=r;r=D.pop(),te.errors!==!1&&(ie?(X="customErrors"+a,r+=" var "+X+" = null; try { valid"+a+" = "+e.yieldAwait+le+"; } catch (e) { valid"+a+" = false; if (e instanceof ValidationError) "+X+" = e.errors; else throw e; } "):r+=" "+Q.code+".errors = null; ")}r+="if (! ",r+=ne?te.statements?" valid"+a+" ":" ("+Q.validate+") ":re?" valid"+oe.level+" ":ie?te.errors===!1?" ("+e.yieldAwait+le+") ":" valid"+a+" ":" "+le+" ",r+=") { ",d=G.keyword;var D=D||[];D.push(r),r="";var D=D||[];D.push(r),r="",e.createErrors!==!1?(r+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+b+"\" , params: { keyword: '"+G.keyword+"' } ",e.opts.messages!==!1&&(r+=" , message: 'should pass \""+G.keyword+"\" keyword validation' "),e.opts.verbose&&(r+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var B=r;r=D.pop(),r+=!e.compositeRule&&f?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var ce=r;r=D.pop(),ne?te.errors?"full"!=te.errors&&(r+=" for (var "+S+"="+Z+"; "+S+"<errors; "+S+"++) { var "+ee+" = vErrors["+S+"]; if ("+ee+".dataPath === undefined) { "+ee+".dataPath = (dataPath || '') + "+e.errorPath+"; } if ("+ee+".schemaPath === undefined) { "+ee+'.schemaPath = "'+b+'"; } ',e.opts.verbose&&(r+=" "+ee+".schema = validate.schema"+w+"; "+ee+".data = "+c+"; "),r+=" } "):te.errors===!1?r+=" "+ce+" ":(r+=" if ("+Z+" == errors) { "+ce+" } else { for (var "+S+"="+Z+"; "+S+"<errors; "+S+"++) { var "+ee+" = vErrors["+S+"]; if ("+ee+".dataPath === undefined) { "+ee+".dataPath = (dataPath || '') + "+e.errorPath+"; } if ("+ee+".schemaPath === undefined) { "+ee+'.schemaPath = "'+b+'"; } ',e.opts.verbose&&(r+=" "+ee+".schema = validate.schema"+w+"; "+ee+".data = "+c+"; "),r+=" } } "):re?(r+=" var err = ",e.createErrors!==!1?(r+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+b+"\" , params: { keyword: '"+G.keyword+"' } ",e.opts.messages!==!1&&(r+=" , message: 'should pass \""+G.keyword+"\" keyword validation' "),e.opts.verbose&&(r+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(r+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false ")):te.errors===!1?r+=" "+ce+" ":(r+=" if (Array.isArray("+X+")) { if (vErrors === null) vErrors = "+X+"; else vErrors.concat("+X+"); errors = vErrors.length; for (var "+S+"="+Z+"; "+S+"<errors; "+S+"++) { var "+ee+" = vErrors["+S+"]; "+ee+".dataPath = (dataPath || '') + "+e.errorPath+"; "+ee+'.schemaPath = "'+b+'"; ',e.opts.verbose&&(r+=" "+ee+".schema = validate.schema"+w+"; "+ee+".data = "+c+"; "),r+=" } } else { "+ce+" } "),d=void 0,r+=" } ",f&&(r+=" else { ")}else r+=" "+G.code(e,G.keyword)+" ";f&&(p+="}")}if(f&&(r+=" "+p+" ",p=""),j.type&&(r+=" } ",g&&g===j.type)){var he=!0;r+=" else { ";var w=e.schemaPath+".type",b=e.errSchemaPath+"/type",D=D||[];D.push(r),r="",e.createErrors!==!1?(r+=" { keyword: '"+(d||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+b+"\" , params: { type: '",r+=v?""+g.join(","):""+g,r+="' } ",e.opts.messages!==!1&&(r+=" , message: 'should be ",r+=v?""+g.join(","):""+g,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var B=r;r=D.pop(),r+=!e.compositeRule&&f?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } "}f&&(r+=" if (errors === ",r+=s?"0":"errs_"+a,r+=") { ",m+="}")}if(g&&!he&&(!e.opts.coerceTypes||!y)){var w=e.schemaPath+".type",b=e.errSchemaPath+"/type",A=v?"checkDataTypes":"checkDataType";r+=" if ("+e.util[A](g,c,!0)+") { ";var D=D||[];D.push(r),r="",e.createErrors!==!1?(r+=" { keyword: '"+(d||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+b+"\" , params: { type: '",r+=v?""+g.join(","):""+g,r+="' } ",e.opts.messages!==!1&&(r+=" , message: 'should be ",r+=v?""+g.join(","):""+g,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var B=r;r=D.pop(),r+=!e.compositeRule&&f?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err