/** * swagger-client - swagger-client is a javascript client for use with swaggering APIs. * @version v2.1.32 * @link http://swagger.io * @license Apache-2.0 */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SwaggerClient = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&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}var i=typeof require=="function"&&require;for(var o=0;o0){t=e.url.substring(e.url.indexOf("?")+1);var i=t.split("&");if(i&&i.length>0)for(var r=0;r0&&o[0]===this.name)return!1}}return e.url.indexOf("?")>0?e.url=e.url+"&"+this.name+"="+this.value:e.url=e.url+"?"+this.name+"="+this.value,!0}if("header"===this.type)return void 0===e.headers[this.name]&&(e.headers[this.name]=this.value),!0},(module.exports.CookieAuthorization=function(e){this.cookie=e}).prototype.apply=function(e){return e.cookieJar=e.cookieJar||new CookieJar,e.cookieJar.setCookie(this.cookie),!0},(module.exports.PasswordAuthorization=function(e,t){3===arguments.length&&(helpers.log("PasswordAuthorization: the 'name' argument has been removed, pass only username and password"),e=arguments[1],t=arguments[2]),this.username=e,this.password=t}).prototype.apply=function(e){return void 0===e.headers.Authorization&&(e.headers.Authorization="Basic "+btoa(this.username+":"+this.password)),!0}; },{"./helpers":4,"btoa":13,"cookiejar":18,"lodash-compat/collection/each":53,"lodash-compat/collection/includes":56,"lodash-compat/lang/isArray":141,"lodash-compat/lang/isObject":145}],3:[function(require,module,exports){ "use strict";var _={bind:require("lodash-compat/function/bind"),cloneDeep:require("lodash-compat/lang/cloneDeep"),find:require("lodash-compat/collection/find"),forEach:require("lodash-compat/collection/forEach"),indexOf:require("lodash-compat/array/indexOf"),isArray:require("lodash-compat/lang/isArray"),isObject:require("lodash-compat/lang/isObject"),isFunction:require("lodash-compat/lang/isFunction"),isPlainObject:require("lodash-compat/lang/isPlainObject"),isUndefined:require("lodash-compat/lang/isUndefined")},auth=require("./auth"),helpers=require("./helpers"),Model=require("./types/model"),Operation=require("./types/operation"),OperationGroup=require("./types/operationGroup"),Resolver=require("./resolver"),SwaggerHttp=require("./http"),SwaggerSpecConverter=require("./spec-converter"),Q=require("q"),reservedClientTags=["apis","authorizationScheme","authorizations","basePath","build","buildFrom1_1Spec","buildFrom1_2Spec","buildFromSpec","clientAuthorizations","convertInfo","debug","defaultErrorCallback","defaultSuccessCallback","enableCookies","fail","failure","finish","help","host","idFromOp","info","initialize","isBuilt","isValid","modelPropertyMacro","models","modelsArray","options","parameterMacro","parseUri","progress","resourceCount","sampleModels","selfReflect","setConsolidatedModels","spec","supportedSubmitMethods","swaggerRequestHeaders","tagFromLabel","title","url","useJQuery","jqueryAjaxCache"],reservedApiTags=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],supportedOperationMethods=["delete","get","head","options","patch","post","put"],SwaggerClient=module.exports=function(e,t){return this.authorizations=null,this.authorizationScheme=null,this.basePath=null,this.debug=!1,this.enableCookies=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,this.jqueryAjaxCache=!1,this.swaggerObject={},this.deferredClient=void 0,this.clientAuthorizations=new auth.SwaggerAuthorizations,void 0!==e?this.initialize(e,t):this};SwaggerClient.prototype.initialize=function(e,t){if(this.models={},this.sampleModels={},"string"==typeof e?this.url=e:_.isObject(e)&&(t=e,this.url=t.url),this.url&&this.url.indexOf("http:")===-1&&this.url.indexOf("https:")===-1&&"undefined"!=typeof window&&void 0!==window.location&&(this.url=window.location.origin+this.url),t=t||{},this.clientAuthorizations.add(t.authorizations),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.connectionAgent=t.connectionAgent||null,this.parameterMacro=t.parameterMacro||null,this.usePromise=t.usePromise||null,this.timeout=t.timeout||null,this.fetchSpecTimeout=void 0!==t.fetchSpecTimeout?t.fetchSpecTimeout:t.timeout||null,this.usePromise&&(this.deferredClient=Q.defer()),"function"==typeof t.success&&(this.success=t.success),t.useJQuery&&(this.useJQuery=t.useJQuery),t.jqueryAjaxCache&&(this.jqueryAjaxCache=t.jqueryAjaxCache),t.enableCookies&&(this.enableCookies=t.enableCookies),this.options=t||{},this.options.timeout=this.timeout,this.options.fetchSpecTimeout=this.fetchSpecTimeout,this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(e){throw e},this.progress=t.progress||function(){},this.spec=_.cloneDeep(t.spec),t.scheme&&(this.scheme=t.scheme),this.usePromise||"function"==typeof t.success)return this.ready=!0,this.build()},SwaggerClient.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.spec?this.progress("fetching resource list; Please wait."):this.progress("fetching resource list: "+this.url+"; Please wait.");var i={useJQuery:this.useJQuery,jqueryAjaxCache:this.jqueryAjaxCache,connectionAgent:this.connectionAgent,enableCookies:this.enableCookies,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return t&&t.url&&"http"!==t.url.substring(0,4)?t.fail("Please specify the protocol for "+t.url):!e.errObj||"ECONNABORTED"!==e.errObj.code&&e.errObj.message.indexOf("timeout")===-1?0===e.status?t.fail("Can't read from server. It may not have the appropriate access-control-origin settings."):404===e.status?t.fail("Can't read swagger JSON from "+t.url):t.fail(e.status+" : "+e.statusText+" "+t.url):t.fail("Request timed out after "+t.fetchSpecTimeout+"ms")},response:function(e){var i=e.obj;if(!i)return t.fail("failed to parse JSON/YAML response");if(t.swaggerVersion=i.swaggerVersion,t.swaggerObject=i,i.swagger&&2===parseInt(i.swagger))t.swaggerVersion=i.swagger,(new Resolver).resolve(i,t.url,t.buildFromSpec,t),t.isValid=!0;else{var s=new SwaggerSpecConverter;t.oldSwaggerObject=t.swaggerObject,s.setDocumentationLocation(t.url),s.convert(i,t.clientAuthorizations,t.options,function(e){t.swaggerObject=e,(new Resolver).resolve(e,t.url,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.fetchSpecTimeout&&(i.timeout=this.fetchSpecTimeout),this.spec&&"object"==typeof this.spec)t.swaggerObject=this.spec,setTimeout(function(){(new Resolver).resolve(t.spec,t.url,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(i),e)return i;(new SwaggerHttp).execute(i,this.options)}return this.usePromise?this.deferredClient.promise:this},SwaggerClient.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=_.cloneDeep(e.securityDefinitions),this.security=e.security,this.title=e.title||"";var t,i,s,r,o={},n=this;if(e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=this.securityDefinitions,this.securityDefinitions)for(t in this.securityDefinitions){var a=this.securityDefinitions[t];a.vendorExtensions={};for(var h in a)if(helpers.extractExtensions(h,a),"scopes"===h){var c=a[h];if("object"==typeof c){c.vendorExtensions={};for(var l in c)helpers.extractExtensions(l,c),0===l.indexOf("x-")&&delete c[l]}}}if(Array.isArray(e.tags))for(o={},i=0;i-1?"_"+e:e,i=_.indexOf(reservedApiTags,e)>-1?"_"+e:e,s=n[t];if(t!==e&&helpers.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name. Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),i!==e&&helpers.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"' instead of 'client.apis."+e+"'."),_.indexOf(reservedApiTags,h)>-1&&(helpers.log("The '"+h+"' operationId conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"._"+h+"' instead of 'client.apis."+i+"."+h+"'."),h="_"+h,c.nickname=h),_.isUndefined(s)){s=n[t]=n.apis[i]={},s.operations={},s.label=i,s.apis={};var r=o[e];_.isUndefined(r)||(s.description=r.description,s.externalDocs=r.externalDocs,s.vendorExtensions=r.vendorExtensions),n[t].help=_.bind(n.help,s),n.apisArray.push(new OperationGroup(e,s.description,s.externalDocs,c))}h=n.makeUniqueOperationId(h,n.apis[i]),_.isFunction(s.help)||(s.help=_.bind(n.help,s)),n.apis[i][h]=s[h]=_.bind(c.execute,c),n.apis[i][h].help=s[h].help=_.bind(c.help,c),n.apis[i][h].asCurl=s[h].asCurl=_.bind(c.asCurl,c),s.apis[h]=s.operations[h]=c;var a=_.find(n.apisArray,function(t){return t.tag===e});a&&a.operationsArray.push(c)})}})});var g=[];return _.forEach(Object.keys(o),function(e){var t;for(t in n.apisArray){var i=n.apisArray[t];i&&e===i.name&&(g.push(i),n.apisArray[t]=null)}}),_.forEach(n.apisArray,function(e){e&&g.push(e)}),n.apisArray=g,_.forEach(e.definitions,function(e,t){e.id=t.toLowerCase(),e.name=t,n.modelsArray.push(e)}),this.isBuilt=!0,this.usePromise?(this.isValid=!0,this.isBuilt=!0,this.deferredClient.resolve(this),this.deferredClient.promise):(this.success&&this.success(),this)},SwaggerClient.prototype.makeUniqueOperationId=function(e,t){for(var i=0,s=e;;){var r=!1;if(_.forEach(t.operations,function(e){e.nickname===s&&(r=!0)}),!r)return s;s=e+"_"+i,i++}return e},SwaggerClient.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,i=t.exec(e);return{scheme:i[4]?i[4].replace(":",""):void 0,host:i[11],port:i[12],path:i[15]}},SwaggerClient.prototype.help=function(e){var t="";return this instanceof SwaggerClient?_.forEach(this.apis,function(e,i){_.isPlainObject(e)&&(t+="operations for the '"+i+"' tag\n",_.forEach(e.operations,function(e,i){t+=" * "+i+": "+e.summary+"\n"}))}):(this instanceof OperationGroup||_.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",_.forEach(this.apis,function(e,i){t+=" * "+i+": "+e.summary+"\n"})),e?t:(helpers.log(t),t)},SwaggerClient.prototype.tagFromLabel=function(e){return e},SwaggerClient.prototype.idFromOp=function(e,t,i){i&&i.operationId||(i=i||{},i.operationId=t+"_"+e);var s=i.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return s=s.replace(/((_){2,})/g,"_"),s=s.replace(/^(_)*/g,""),s=s.replace(/([_])*$/g,"")},SwaggerClient.prototype.setHost=function(e){this.host=e,this.apis&&_.forEach(this.apis,function(t){t.operations&&_.forEach(t.operations,function(t){t.host=e})})},SwaggerClient.prototype.setBasePath=function(e){this.basePath=e,this.apis&&_.forEach(this.apis,function(t){t.operations&&_.forEach(t.operations,function(t){t.basePath=e})})},SwaggerClient.prototype.setSchemes=function(e){this.schemes=e,e&&e.length>0&&this.apis&&_.forEach(this.apis,function(t){t.operations&&_.forEach(t.operations,function(t){t.scheme=e[0]})})},SwaggerClient.prototype.fail=function(e){if(this.usePromise)return this.deferredClient.reject(e),this.deferredClient.promise;this.failure,this.failure(e)}; },{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":50,"lodash-compat/collection/find":54,"lodash-compat/collection/forEach":55,"lodash-compat/function/bind":59,"lodash-compat/lang/cloneDeep":139,"lodash-compat/lang/isArray":141,"lodash-compat/lang/isFunction":143,"lodash-compat/lang/isObject":145,"lodash-compat/lang/isPlainObject":146,"lodash-compat/lang/isUndefined":149,"q":158}],4:[function(require,module,exports){ (function (process){ "use strict";var _={isPlainObject:require("lodash-compat/lang/isPlainObject"),indexOf:require("lodash-compat/array/indexOf")};module.exports.__bind=function(e,o){return function(){return e.apply(o,arguments)}};var log=module.exports.log=function(){console&&"test"!==process.env.NODE_ENV&&console.log(Array.prototype.slice.call(arguments)[0])};module.exports.fail=function(e){log(e)},module.exports.optionHtml=function(e,o){return''+e+":"+o+""};var resolveSchema=module.exports.resolveSchema=function(e){return _.isPlainObject(e.schema)&&(e=resolveSchema(e.schema)),e};module.exports.simpleRef=function(e){return void 0===e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},module.exports.extractExtensions=function(e,o,n){e&&o&&"string"==typeof e&&0===e.indexOf("x-")&&(o.vendorExtensions=o.vendorExtensions||{},o.vendorExtensions[e]=n?n:o[e])}; }).call(this,require('_process')) },{"_process":12,"lodash-compat/array/indexOf":50,"lodash-compat/lang/isPlainObject":146}],5:[function(require,module,exports){ (function (Buffer){ "use strict";var helpers=require("./helpers"),request=require("superagent"),jsyaml=require("js-yaml"),_={isObject:require("lodash-compat/lang/isObject"),keys:require("lodash-compat/object/keys")},JQueryHttpClient=function(){this.type="JQueryHttpClient"},SuperagentHttpClient=function(){this.type="SuperagentHttpClient"},SwaggerHttp=module.exports=function(){};SwaggerHttp.prototype.execute=function(e,t){var r;r=t&&t.client?t.client:new SuperagentHttpClient(t),r.opts=t||{},t&&t.requestAgent&&(request=t.requestAgent);var n=!1;if("undefined"!=typeof window&&void 0!==window.jQuery&&(n=!0),"options"===e.method.toLowerCase()&&"SuperagentHttpClient"===r.type&&(log("forcing jQuery as OPTIONS are not supported by SuperAgent"),e.useJQuery=!0),this.isInternetExplorer()&&(e.useJQuery===!1||!n))throw new Error("Unsupported configuration! JQuery is required but not available");(e&&e.useJQuery===!0||this.isInternetExplorer()&&n)&&(r=new JQueryHttpClient(t));var o=e.on.response,s=e.on.error,a=function(e){return t&&t.requestInterceptor&&(e=t.requestInterceptor.apply(e)),e},i=function(r){return t&&t.responseInterceptor&&(r=t.responseInterceptor.apply(r,[e])),o(r)},u=function(r){t&&t.responseInterceptor&&(r=t.responseInterceptor.apply(r,[e])),s(r)};return e.on.error=function(e){u(e)},e.on.response=function(e){e&&e.status>=400?u(e):i(e)},_.isObject(e)&&_.isObject(e.body)&&e.body.type&&"formData"===e.body.type&&t.useJQuery&&(e.contentType=!1,e.processData=!1,delete e.headers["Content-Type"]),e=a(e)||e,e.beforeSend?e.beforeSend(function(t){r.execute(t||e)}):r.execute(e),e.deferred?e.deferred.promise:e},SwaggerHttp.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(t.indexOf("msie")!==-1){parseInt(t.split("msie")[1])<=8&&(e=!0)}}return e},JQueryHttpClient.prototype.execute=function(e){var t=this.jQuery||"undefined"!=typeof window&&window.jQuery,r=e.on,n=e;if(void 0===t||t===!1)throw new Error("Unsupported configuration! JQuery is required but not available");return e.type=e.method,e.cache=e.jqueryAjaxCache,e.data=e.body,delete e.jqueryAjaxCache,delete e.useJQuery,delete e.body,e.complete=function(e){for(var t={},o=e.getAllResponseHeaders().split("\n"),s=0;s=200&&e.status<300)r.response(d);else{if(!(0===e.status||e.status>=400&&e.status<599))return r.response(d);r.error(d)}},t.support.cors=!0,t.ajax(e)},SuperagentHttpClient.prototype.execute=function(e){var t=e.method.toLowerCase(),r=e.timeout;"delete"===t&&(t="del");var n,o=e.headers||{};try{n=request[t](e.url)}catch(t){if(e.on&&e.on.error){var s={errObj:t,status:500,statusText:t.message||"invalid url"};return void e.on.error(s)}}e.connectionAgent&&n.agent(e.connectionAgent),r&&n.timeout(r),e.enableCookies&&n.withCredentials();var a=e.headers.Accept;if(this.binaryRequest(a)&&n.on("request",function(){this.xhr&&(this.xhr.responseType="blob")}),e.body)if(_.isObject(e.body)){var i=e.headers["Content-Type"]||"";if(0===i.indexOf("multipart/form-data"))if(delete o["Content-Type"],"[object FormData]"==={}.toString.apply(e.body))n.send(e.body);else{var u,p,d;for(u in e.body)if(p=e.body[u],Array.isArray(p))for(d in p)n.field(u,d);else n.field(u,p)}else _.isObject(e.body)&&(e.body=JSON.stringify(e.body),n.send(e.body))}else n.send(e.body);var l;for(l in o)n.set(l,o[l]);"function"==typeof n.buffer&&n.buffer(),n.end(function(t,r){r=r||{status:0,headers:{error:"no response from server"}};var n,o={url:e.url,method:e.method,headers:r.headers};if(!t&&r.error&&(t=r.error),t&&e.on&&e.on.error){if(o.errObj=t,o.status=r?r.status:500,o.statusText=r?r.text:t.message,r.headers&&r.headers["content-type"]&&r.headers["content-type"].indexOf("application/json")>=0)try{o.obj=JSON.parse(o.statusText)}catch(e){o.obj=null}n=e.on.error}else if(r&&e.on&&e.on.response){var s;if(r.body&&_.keys(r.body).length>0)s=r.body;else try{s=jsyaml.safeLoad(r.text),s="string"==typeof s?null:s}catch(e){helpers.log("cannot parse JSON/YAML content")}"function"==typeof Buffer&&Buffer.isBuffer(s)?o.data=s:o.obj="object"==typeof s?s:null,o.status=r.status,o.statusText=r.text,n=e.on.response}r.xhr&&r.xhr.response?o.data=r.xhr.response:o.data||(o.data=o.statusText),n&&n(o)})},SuperagentHttpClient.prototype.binaryRequest=function(e){return!!e&&(/^image/i.test(e)||/^application\/pdf/.test(e)||/^application\/octet-stream/.test(e))}; }).call(this,require("buffer").Buffer) },{"./helpers":4,"buffer":14,"js-yaml":19,"lodash-compat/lang/isObject":145,"lodash-compat/object/keys":150,"superagent":159}],6:[function(require,module,exports){ "use strict";function splitUrl(e){var i={},r=/[a-z]+:\/\//i.exec(e);r&&(i.proto=r[0].slice(0,-3),e=e.slice(i.proto.length+1)),"//"===e.slice(0,2)&&(i.domain=e.slice(2).split("/")[0],e=e.slice(2+i.domain.length));var o=e.split("#");return o[0].length&&(i.path=o[0]),o.length>1&&(i.fragment=o.slice(1).join("#")),i}function unsplitUrl(e){var i=e.path;return void 0===i&&(i=""),void 0!==e.fragment&&(i+="#"+e.fragment),void 0!==e.domain&&("/"===i.slice(0,1)&&(i=i.slice(1)),i="//"+e.domain+"/"+i,void 0!==e.proto&&(i=e.proto+":"+i)),i}function joinUrl(e,i){var r=splitUrl(i);if(void 0!==r.domain)return i;var o=splitUrl(e);if(void 0===r.path)o.fragment=r.fragment;else if("/"===r.path.slice(0,1))o.path=r.path,o.fragment=r.fragment;else{var t=void 0===o.path?[]:o.path.split("/"),s=r.path.split("/");for(t.length&&t.pop();".."===s[0]||"."===s[0];)".."===s[0]&&t.pop(),s.shift();o.path=t.concat(s).join("/"),o.fragment=r.fragment}return unsplitUrl(o)}var SwaggerHttp=require("./http"),_={isObject:require("lodash-compat/lang/isObject"),cloneDeep:require("lodash-compat/lang/cloneDeep"),isArray:require("lodash-compat/lang/isArray"),isString:require("lodash-compat/lang/isString")},Resolver=module.exports=function(){this.failedUrls=[],this.resolverCache={},this.pendingUrls={}};Resolver.prototype.processAllOf=function(e,i,r,o,t,s){var l,n,f;r["x-resolved-from"]=["#/definitions/"+i];var a=r.allOf;for(a.sort(function(e,i){return e.$ref&&i.$ref?0:e.$ref?-1:1}),l=0;l=0){for(var Q=0;Q0&&(J+="/"),J+=E[H];z.root=J,C.push(z)}else if(S=z.key.split("#"),2===S.length){0!==S[0].indexOf("http:")&&0!==S[0].indexOf("https:")||(z.root=S[0]),t=S[1].split("/");var B,F=e;for(H=0;H1){n=null;break}p.length>0&&(n=n[p])}var h=s.key;f=s.key.split("/");var c=f[f.length-1];c.indexOf("#")>=0&&(c=c.split("#")[1]),null!==n&&void 0!==n?o[h]={name:c,obj:n,key:s.key,root:s.root}:t[h]={root:s.root,location:s.location}},Resolver.prototype.finish=function(e,i,r,o,t,s,l){var n,f;for(n in r){var a=r[n],p=a.key,h=o[p];if(h)if(e.definitions=e.definitions||{},"ref"===a.resolveAs){if(l!==!0)for(p in h.obj)f=this.retainRoot(p,h.obj[p],a.root),h.obj[p]=f;e.definitions[h.name]=h.obj,a.obj.$ref="#/definitions/"+h.name}else if("inline"===a.resolveAs){var c=a.obj;c["x-resolved-from"]=[a.key],delete c.$ref;for(p in h.obj)f=h.obj[p],l!==!0&&(f=this.retainRoot(p,h.obj[p],a.root)),c[p]=f}}0===this.countUnresolvedRefs(e)||this.iteration>5?(this.resolveAllOf(e.definitions),this.resolverCache=null,s.call(this.scope,e,t)):(this.iteration+=1,this.resolve(e,i,s,this.scope))},Resolver.prototype.countUnresolvedRefs=function(e){var i,r=this.getRefs(e),o=[],t=[];for(i in r)0===i.indexOf("#")?o.push(i.substring(1)):t.push(i);for(i=0;i0&&(e+="/"),e+=f[l];c=!0}if(h.indexOf("#")>=0)if(0===h.indexOf("/"))a=h.split("#"),n=e.split("//"),f=n[1].split("/"),e=n[0]+"//"+f[0]+a[0],s=a[1];else{if(a=h.split("#"),""!==a[0]){if(f=e.split("/"),f=f.slice(0,f.length-1),!c){e="";for(var v=0;v0&&(e+="/"),e+=f[v]}e+="/"+h.split("#")[0]}s=a[1]}if(0===h.indexOf("http:")||0===h.indexOf("https:"))h.indexOf("#")>=0?(e=h.split("#")[0],s=h.split("#")[1]):(e=h,s=""),o.push({obj:r,resolveAs:"inline",root:e,key:p,location:s});else if(0===h.indexOf("#"))s=h.split("#")[1],o.push({obj:r,resolveAs:"inline",root:e,key:p,location:s});else if(0===h.indexOf("/")&&h.indexOf("#")===-1){s=h;var d=e.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);d&&(e=d[0]+h.substring(1),s=""),o.push({obj:r,resolveAs:"inline",root:e,key:p,location:s})}else o.push({obj:r,resolveAs:"inline",root:e,key:p,location:s})}else"array"===r.type&&this.resolveTo(e,r.items,o,s)},Resolver.prototype.resolveTo=function(e,i,r,o){var t,s,l=i.$ref,n=e;if(void 0!==l&&null!==l){if(l.indexOf("#")>=0){var f=l.split("#");if(f[0]&&0===l.indexOf("/"));else if(!f[0]||0!==f[0].indexOf("http:")&&0!==f[0].indexOf("https:")){if(f[0]&&f[0].length>0){for(t=e.split("/"),n="",s=0;s'+e+":"+t+""};module.exports.typeFromJsonSchema=function(e,t){var i;return"integer"===e&&"int32"===t?i="integer":"integer"===e&&"int64"===t?i="long":"integer"===e&&void 0===t?i="long":"string"===e&&"date-time"===t?i="date-time":"string"===e&&"date"===t?i="date":"number"===e&&"float"===t?i="float":"number"===e&&"double"===t?i="double":"number"===e&&void 0===t?i="double":"boolean"===e?i="boolean":"string"===e&&(i="string"),i};var getStringSignature=module.exports.getStringSignature=function(e,t){var i="";return void 0!==e.$ref?i+=Helpers.simpleRef(e.$ref):void 0===e.type?i+="object":"array"===e.type?t?i+=getStringSignature(e.items||e.$ref||{}):(i+="Array[",i+=getStringSignature(e.items||e.$ref||{}),i+="]"):i+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&void 0===e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&void 0===e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&void 0===e.format?"double":"boolean"===e.type?"boolean":e.$ref?Helpers.simpleRef(e.$ref):e.type,i},schemaToJSON=module.exports.schemaToJSON=function(e,t,i,n){e=Helpers.resolveSchema(e),"function"!=typeof n&&(n=function(e){return(e||{}).default}),i=i||{};var r,s,o=e.type||"object",a=e.format;return _.isUndefined(e.example)?_.isUndefined(e.items)&&_.isArray(e.enum)&&(s=e.enum[0]):s=e.example,_.isUndefined(s)&&(e.$ref?(r=t[Helpers.simpleRef(e.$ref)],_.isUndefined(r)||(_.isUndefined(i[r.name])?(i[r.name]=r,s=schemaToJSON(r.definition,t,i,n),delete i[r.name]):s="array"===r.type?[]:{})):_.isUndefined(e.default)?"string"===o?s="date-time"===a?(new Date).toISOString():"date"===a?(new Date).toISOString().split("T")[0]:"string":"integer"===o?s=0:"number"===o?s=0:"boolean"===o?s=!0:"object"===o?(s={},_.forEach(e.properties,function(e,r){var o=_.cloneDeep(e);o.default=n(e),s[r]=schemaToJSON(o,t,i,n)})):"array"===o&&(s=[],_.isArray(e.items)?_.forEach(e.items,function(e){s.push(schemaToJSON(e,t,i,n))}):_.isPlainObject(e.items)?s.push(schemaToJSON(e.items,t,i,n)):_.isUndefined(e.items)?s.push({}):Helpers.log("Array type's 'items' property is not an array or an object, cannot process")):s=e.default),s};module.exports.schemaToHTML=function(e,t,i,n){function r(e,t,n){var r,s=t;return e.$ref?(s=e.title||Helpers.simpleRef(e.$ref),r=i[s]):_.isUndefined(t)&&(s=e.title||"Inline Model "+ ++d,r={definition:e}),n!==!0&&(m[s]=_.isUndefined(r)?{}:r.definition),s}function s(e){var t='',i=e.type||"object";return e.$ref?t+=r(e,Helpers.simpleRef(e.$ref)):"object"===i?t+=_.isUndefined(e.properties)?"object":r(e):"array"===i?(t+="Array[",_.isArray(e.items)?t+=_.map(e.items,r).join(","):_.isPlainObject(e.items)?t+=_.isUndefined(e.items.$ref)?_.isUndefined(e.items.type)||_.indexOf(["array","object"],e.items.type)!==-1?r(e.items):e.items.type:r(e.items,Helpers.simpleRef(e.items.$ref)):(Helpers.log("Array type's 'items' schema is not an array or an object, cannot process"),t+="object"),t+="]"):t+=e.type,t+=""}function o(e,t){var i="",n=e.type||"object",r="array"===n;switch(r&&(n=_.isPlainObject(e.items)&&!_.isUndefined(e.items.type)?e.items.type:"object"),_.isUndefined(e.default)||(i+=optionHtml("Default",e.default)),n){case"string":e.minLength&&(i+=optionHtml("Min. Length",e.minLength)),e.maxLength&&(i+=optionHtml("Max. Length",e.maxLength)),e.pattern&&(i+=optionHtml("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(i+=optionHtml("Min. Value",e.minimum)),e.exclusiveMinimum&&(i+=optionHtml("Exclusive Min.","true")),e.maximum&&(i+=optionHtml("Max. Value",e.maximum)),e.exclusiveMaximum&&(i+=optionHtml("Exclusive Max.","true")),e.multipleOf&&(i+=optionHtml("Multiple Of",e.multipleOf))}if(r&&(e.minItems&&(i+=optionHtml("Min. Items",e.minItems)),e.maxItems&&(i+=optionHtml("Max. Items",e.maxItems)),e.uniqueItems&&(i+=optionHtml("Unique Items","true")),e.collectionFormat&&(i+=optionHtml("Coll. Format",e.collectionFormat))),_.isUndefined(e.items)&&_.isArray(e.enum)){var s;s="number"===n||"integer"===n?e.enum.join(", "):'"'+e.enum.join('", "')+'"',i+=optionHtml("Enum",s)}return i.length>0&&(t=''+t+'"+i+"
'+n+"
"),t}function a(e,t){var a=e.type||"object",m="array"===e.type,d=p+t+" "+(m?"[":"{")+"";if(t&&l.push(t),m)_.isArray(e.items)?d+="
"+_.map(e.items,function(e){var t=e.type||"object";return _.isUndefined(e.$ref)?_.indexOf(["array","object"],t)>-1?"object"===t&&_.isUndefined(e.properties)?"object":r(e):o(e,t):r(e,Helpers.simpleRef(e.$ref))}).join(",
"):_.isPlainObject(e.items)?d+=_.isUndefined(e.items.$ref)?_.indexOf(["array","object"],e.items.type||"object")>-1?(_.isUndefined(e.items.type)||"object"===e.items.type)&&_.isUndefined(e.items.properties)?"
object
":"
"+r(e.items)+"
":"
"+o(e.items,e.items.type)+"
":"
"+r(e.items,Helpers.simpleRef(e.items.$ref))+"
":(Helpers.log("Array type's 'items' property is not an array or an object, cannot process"),d+="
object
");else if(e.$ref)d+="
"+r(e,t)+"
";else if("object"===a){if(_.isPlainObject(e.properties)){var f=_.map(e.properties,function(t,r){var a,p,m=_.indexOf(e.required,r)>=0,l=_.cloneDeep(t),d=m?"required":"",f=''+r+" (";return l.default=n(l),l=Helpers.resolveSchema(l),p=t.description||l.description,_.isUndefined(l.$ref)||(a=i[Helpers.simpleRef(l.$ref)],_.isUndefined(a)||_.indexOf([void 0,"array","object"],a.definition.type)!==-1||(l=Helpers.resolveSchema(a.definition))),f+=s(l),m||(f+=', optional'),t.readOnly&&(f+=', read only'),f+=")",_.isUndefined(p)||(f+=': '+p+""),l.enum&&(f+=' = [\''+l.enum.join("', '")+"']"),""+o(l,f)}).join(",
");f&&(d+=f+"")}}else d+="
"+o(e,a)+"
";return d+p+(m?"]":"}")+""}var p='';if(_.isObject(arguments[0])&&(e=void 0,t=arguments[0],i=arguments[1],n=arguments[2]),i=i||{},t=Helpers.resolveSchema(t),_.isEmpty(t))return p+"Empty";if("string"==typeof t.$ref&&(e=Helpers.simpleRef(t.$ref),t=i[e],void 0===t))return p+e+" is not defined!";"string"!=typeof e&&(e=t.title||"Inline Model"),t.definition&&(t=t.definition),"function"!=typeof n&&(n=function(e){return(e||{}).default});for(var m={},l=[],d=0,f=a(t,e);_.keys(m).length>0;)_.forEach(m,function(e,t){var i=_.indexOf(l,t)>-1;delete m[t],i||(l.push(t),f+="
"+a(e,t))});return f}; },{"./helpers":4,"lodash-compat/array/indexOf":50,"lodash-compat/collection/forEach":55,"lodash-compat/collection/map":57,"lodash-compat/lang/cloneDeep":139,"lodash-compat/lang/isArray":141,"lodash-compat/lang/isEmpty":142,"lodash-compat/lang/isObject":145,"lodash-compat/lang/isPlainObject":146,"lodash-compat/lang/isUndefined":149,"lodash-compat/object/keys":150}],8:[function(require,module,exports){ "use strict";var SwaggerHttp=require("./http"),_={isObject:require("lodash-compat/lang/isObject")},SwaggerSpecConverter=module.exports=function(){this.errors=[],this.warnings=[],this.modelMap={}};SwaggerSpecConverter.prototype.setDocumentationLocation=function(e){this.docLocation=e},SwaggerSpecConverter.prototype.convert=function(e,t,r,i){if(!e||!Array.isArray(e.apis))return this.finish(i,null);this.clientAuthorizations=t;var s={swagger:"2.0"};s.originalVersion=e.swaggerVersion,this.apiInfo(e,s),this.securityDefinitions(e,s),e.basePath&&this.setDocumentationLocation(e.basePath);var o,n=!1;for(o=0;o0?(t.host=s.substring(0,o),t.basePath=s.substring(o)):(t.host=s,t.basePath="/")):0===e.basePath.indexOf("https://")?(s=e.basePath.substring("https://".length),o=s.indexOf("/"),o>0?(t.host=s.substring(0,o),t.basePath=s.substring(o)):(t.host=s,t.basePath="/")):t.basePath=e.basePath;var n;if(e.authorizations&&(n=e.authorizations),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),_.isObject(e))for(r in e.models){var a=e.models[r],p=a.id||r;this.modelMap[p]=r}for(i=0;i0?n.required=o:n.required=s.required,t.definitions[r]=n}}},SwaggerSpecConverter.prototype.extractTag=function(e){var t=e||"default";return 0!==t.indexOf("http:")&&0!==t.indexOf("https:")||(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},SwaggerSpecConverter.prototype.operations=function(e,t,r,i,s){if(Array.isArray(r)){var o;s.paths||(s.paths={});var n=s.paths[e]||{},a=this.extractTag(t);s.tags=s.tags||[];var p=!1;for(o=0;o0&&(t=t.substring(0,i))}var s=t;return 0===r.indexOf("http:")||0===r.indexOf("https:")?s=r:(t.endsWith("/")&&(s=t.substring(0,t.length-1)),s+=r),s=s.replace("{format}","json")},SwaggerSpecConverter.prototype.securityDefinitions=function(e,t){if(e.authorizations){var r;for(r in e.authorizations){var i=!1,s={vendorExtensions:{}},o=e.authorizations[r];if("apiKey"===o.type)s.type="apiKey",s.in=o.passAs,s.name=o.keyname||r,i=!0;else if("basicAuth"===o.type)s.type="basicAuth",i=!0;else if("oauth2"===o.type){var n,a=o.scopes||[],p={};for(n in a){var u=a[n];p[u.scope]=u.description}if(s.type="oauth2",n>0&&(s.scopes=p),o.grantTypes){if(o.grantTypes.implicit){var c=o.grantTypes.implicit;s.flow="implicit",s.authorizationUrl=c.loginEndpoint,i=!0}if(o.grantTypes.authorization_code&&!s.flow){var f=o.grantTypes.authorization_code;s.flow="accessCode",s.authorizationUrl=f.tokenRequestEndpoint.url,s.tokenUrl=f.tokenEndpoint.url,i=!0}}}i&&(t.securityDefinitions=t.securityDefinitions||{},t.securityDefinitions[r]=s)}}},SwaggerSpecConverter.prototype.apiInfo=function(e,t){if(e.info){var r=e.info;t.info={},r.contact&&(t.info.contact={},t.info.contact.email=r.contact),r.description&&(t.info.description=r.description),r.title&&(t.info.title=r.title),r.termsOfServiceUrl&&(t.info.termsOfService=r.termsOfServiceUrl),(r.license||r.licenseUrl)&&(t.license={},r.license&&(t.license.name=r.license),r.licenseUrl&&(t.license.url=r.licenseUrl))}else this.warnings.push("missing info section")},SwaggerSpecConverter.prototype.finish=function(e,t){e(t)}; },{"./http":5,"lodash-compat/lang/isObject":145}],9:[function(require,module,exports){ "use strict";var log=require("../helpers").log,_={isPlainObject:require("lodash-compat/lang/isPlainObject"),isString:require("lodash-compat/lang/isString")},SchemaMarkup=require("../schema-markup.js"),jsyaml=require("js-yaml"),Model=module.exports=function(e,i,t,s){return this.definition=i||{},this.isArray="array"===i.type,this.models=t||{},this.name=e||i.title||"Inline Model",this.modelPropertyMacro=s||function(e){return e.default},this};Model.prototype.createJSONSample=Model.prototype.getSampleValue=function(e){return e=e||{},e[this.name]=this,this.examples&&_.isPlainObject(this.examples)&&this.examples["application/json"]?(this.definition.example=this.examples["application/json"],_.isString(this.definition.example)&&(this.definition.example=jsyaml.safeLoad(this.definition.example))):this.definition.example||(this.definition.example=this.examples),SchemaMarkup.schemaToJSON(this.definition,this.models,e,this.modelPropertyMacro)},Model.prototype.getMockSignature=function(){return SchemaMarkup.schemaToHTML(this.name,this.definition,this.models,this.modelPropertyMacro)}; },{"../helpers":4,"../schema-markup.js":7,"js-yaml":19,"lodash-compat/lang/isPlainObject":146,"lodash-compat/lang/isString":147}],10:[function(require,module,exports){ "use strict";function itemByPriority(e,t){if(_.isEmpty(t))return e[0];for(var r=0,i=t.length;r-1)return t[r];return e[0]}var _={cloneDeep:require("lodash-compat/lang/cloneDeep"),isUndefined:require("lodash-compat/lang/isUndefined"),isEmpty:require("lodash-compat/lang/isEmpty"),isObject:require("lodash-compat/lang/isObject")},helpers=require("../helpers"),Model=require("./model"),SwaggerHttp=require("../http"),Q=require("q"),Operation=module.exports=function(e,t,r,i,s,o,a,n,l){var p=[];e=e||{},o=o||{},e&&e.options&&(this.client=e.options.client||null,this.requestInterceptor=e.options.requestInterceptor||null,this.responseInterceptor=e.options.responseInterceptor||null,this.requestAgent=e.options.requestAgent),this.authorizations=o.security,this.basePath=e.basePath||"/",this.clientAuthorizations=l,this.consumes=o.consumes||e.consumes||["application/json"],this.produces=o.produces||e.produces||["application/json"],this.deprecated=o.deprecated,this.description=o.description,this.host=e.host,this.method=i||p.push("Operation "+r+" is missing method."),this.models=n||{},this.nickname=r||p.push("Operations must have a nickname."),this.operation=o,this.operations={},this.parameters=null!==o?o.parameters||[]:{},this.parent=e,this.path=s||p.push("Operation "+this.nickname+" is missing path."),this.responses=o.responses||{},this.scheme=t||e.scheme||"http",this.schemes=o.schemes||e.schemes,this.security=o.security||e.security,this.summary=o.summary||"",this.timeout=e.timeout,this.type=null,this.useJQuery=e.useJQuery,this.jqueryAjaxCache=e.jqueryAjaxCache,this.enableCookies=e.enableCookies;var u;if(this.host||("undefined"!=typeof window?this.host=window.location.host:this.host="localhost"),this.parameterMacro=e.parameterMacro||function(e,t){return t.default},this.inlineModels=[],"/"!==this.basePath&&"/"===this.basePath.slice(-1)&&(this.basePath=this.basePath.slice(0,-1)),"string"==typeof this.deprecated)switch(this.deprecated.toLowerCase()){case"true":case"yes":case"1":this.deprecated=!0;break;case"false":case"no":case"0":case null:this.deprecated=!1;break;default:this.deprecated=Boolean(this.deprecated)}var h,c;if(a)for(u in a)c=new Model(u,a[u],this.models,e.modelPropertyMacro),c&&(this.models[u]=c);else a={};for(h=0;h0&&this.resource&&this.resource.api&&this.resource.api.fail&&this.resource.api.fail(p),this};Operation.prototype.isDefaultArrayItemValue=function(e,t){return t.default&&Array.isArray(t.default)?t.default.indexOf(e)!==-1:e===t.default},Operation.prototype.getType=function(e){var t,r=e.type,i=e.format,s=!1;"integer"===r&&"int32"===i?t="integer":"integer"===r&&"int64"===i?t="long":"integer"===r?t="integer":"string"===r?t="date-time"===i?"date-time":"date"===i?"date":"string":"number"===r&&"float"===i?t="float":"number"===r&&"double"===i?t="double":"number"===r?t="double":"boolean"===r?t="boolean":"array"===r?(s=!0,e.items&&(t=this.getType(e.items))):"file"===r&&(t="file"),e.$ref&&(t=helpers.simpleRef(e.$ref));var o=e.schema;if(o){var a=o.$ref;return a?(a=helpers.simpleRef(a),s?[a]:a):"object"===o.type?this.addInlineModel(o):this.getType(o)}return s?[t]:t},Operation.prototype.addInlineModel=function(e){var t=this.inlineModels.length,r=this.resolveModel(e,{});return r?(this.inlineModels.push(r),"Inline Model "+t):null},Operation.prototype.getInlineModel=function(e){if(/^Inline Model \d+$/.test(e)){var t=parseInt(e.substr("Inline Model".length).trim(),10);return this.inlineModels[t]}return null},Operation.prototype.resolveModel=function(e,t){if(void 0!==e.$ref){var r=e.$ref;if(0===r.indexOf("#/definitions/")&&(r=r.substring("#/definitions/".length)),t[r])return new Model(r,t[r],this.models,this.parent.modelPropertyMacro)}else if(e&&"object"==typeof e&&("object"===e.type||_.isUndefined(e.type)))return new Model(void 0,e,this.models,this.parent.modelPropertyMacro);return null},Operation.prototype.help=function(e){for(var t=this.nickname+": "+this.summary+"\n",r=0;r=0&&(d=!0),i&&!d){var m="";for(a in l){s=l[a].param,n=l[a].value;var f;r&&r.maskPasswords&&(f=l[a].password),void 0!==n&&(Array.isArray(n)?(""!==m&&(m+="&"),m+=this.encodeQueryCollection(s.collectionFormat,a,n,f)):(""!==m&&(m+="&"),m+=encodeURIComponent(a)+"="+mask(encodeURIComponent(n),f)))}o=m}else if(d){var y;if("function"==typeof FormData){y=new FormData,y.type="formData";for(a in l)if(s=l[a].param,n=t[a],void 0!==n)if("[object File]"==={}.toString.apply(n))y.append(a,n);else if("file"===n.type&&n.value)y.append(a,n.value);else if(Array.isArray(n))if("multi"===s.collectionFormat){y.delete(a);for(var v in n)y.append(a,n[v])}else y.append(a,this.encodeQueryCollection(s.collectionFormat,a,n).split("=").slice(1).join("="));else y.append(a,n);o=y}else{y={};for(a in l)if(n=t[a],Array.isArray(n)){var g,b=s.collectionFormat||"multi";if("ssv"===b)g=" ";else if("pipes"===b)g="|";else if("tsv"===b)g="\t";else{if("multi"===b){y[a]=n;break}g=","}var x;n.forEach(function(e){x?x+=g:x="",x+=e}),y[a]=x}else y[a]=n;o=y}e["Content-Type"]="multipart/form-data"}return o},Operation.prototype.getModelSampleJSON=function(e,t){var r,i,s;if(t=t||{},r=e instanceof Array,s=r?e[0]:e,t[s]?i=t[s].createJSONSample():this.getInlineModel(s)&&(i=this.getInlineModel(s).createJSONSample()),i){if(i=r?[i]:i,"string"==typeof i)return i;if(_.isObject(i)){var o=i;if(i instanceof Array&&i.length>0&&(o=i[0]),o.nodeName&&"Node"==typeof o){var a=(new XMLSerializer).serializeToString(o);return this.formatXml(a)}return JSON.stringify(i,null,2)}return i}},Operation.prototype.do=function(e,t,r,i,s){return this.execute(e,t,r,i,s)},Operation.prototype.execute=function(e,t,r,i,s){var o,a,n,l,p=e||{},u={};_.isObject(t)&&(u=t,o=r,a=i),l=void 0!==u.timeout?u.timeout:this.timeout,this.client&&(u.client=this.client),this.requestAgent&&(u.requestAgent=this.requestAgent),!u.requestInterceptor&&this.requestInterceptor&&(u.requestInterceptor=this.requestInterceptor),!u.responseInterceptor&&this.responseInterceptor&&(u.responseInterceptor=this.responseInterceptor),"function"==typeof t&&(o=t,a=r),this.parent.usePromise?n=Q.defer():(o=o||this.parent.defaultSuccessCallback||helpers.log,a=a||this.parent.defaultErrorCallback||helpers.log),void 0===u.useJQuery&&(u.useJQuery=this.useJQuery),void 0===u.jqueryAjaxCache&&(u.jqueryAjaxCache=this.jqueryAjaxCache),void 0===u.enableCookies&&(u.enableCookies=this.enableCookies);var h=this.getMissingParams(p);if(h.length>0){var c="missing required params: "+h;return helpers.fail(c),this.parent.usePromise?(n.reject(c),n.promise):(a(c,s),{})}var d,m=this.getHeaderParams(p),f=this.setContentTypes(p,u),y={};for(d in m)y[d]=m[d];for(d in f)y[d]=f[d];var v=this.getBody(f,p,u),g=this.urlify(p,u.maskPasswords);if(g.indexOf(".{format}")>0&&y){var b=y.Accept||y.accept;b&&b.indexOf("json")>0?g=g.replace(".{format}",".json"):b&&b.indexOf("xml")>0&&(g=g.replace(".{format}",".xml"))}var x={url:g,method:this.method.toUpperCase(),body:v,enableCookies:u.enableCookies,useJQuery:u.useJQuery,jqueryAjaxCache:u.jqueryAjaxCache,deferred:n,headers:y,clientAuthorizations:u.clientAuthorizations,operation:this,connectionAgent:this.connectionAgent,on:{response:function(e){return n?(n.resolve(e),n.promise):o(e,s)},error:function(e){return n?(n.reject(e),n.promise):a(e,s)}}};return l&&(x.timeout=l),this.clientAuthorizations.apply(x,this.operation.security),u.mock===!0?(u.requestInterceptor&&u.requestInterceptor.apply(x),x):(new SwaggerHttp).execute(x,u)},Operation.prototype.setContentTypes=function(e,t){var r,i,s=this.parameters,o=e.parameterContentType||itemByPriority(this.consumes,["application/json","application/yaml"]),a=t.responseContentType||itemByPriority(this.produces,["application/json","application/yaml"]),n=[],l=[],p={};for(i=0;i0){if(o=void 0,t.requestContentType)o=t.requestContentType;else if(n.length>0)o="multipart/form-data";else if(this.consumes&&this.consumes.length>0)for(var m in this.consumes){var f=this.consumes[m];0!==f.indexOf("application/x-www-form-urlencoded")&&0!==f.indexOf("multipart/form-data")||(o=f)}void 0===o&&(o="application/x-www-form-urlencoded")}}else o=null;return o&&this.consumes&&this.consumes.indexOf(o)===-1&&helpers.log("server doesn't consume "+o+", try "+JSON.stringify(this.consumes)),this.matchesAccept(a)||helpers.log("server can't produce "+a),o&&""!==r||"application/x-www-form-urlencoded"===o?p["Content-Type"]=o:this.consumes&&this.consumes.length>0&&"application/x-www-form-urlencoded"===this.consumes[0]&&(p["Content-Type"]=this.consumes[0]),a&&(p.Accept=a),p},Operation.prototype.matchesAccept=function(e){return!e||!this.produces||(this.produces.indexOf(e)!==-1||this.produces.indexOf("*/*")!==-1)},Operation.prototype.asCurl=function(e,t){var r={mock:!0,maskPasswords:!0};if("object"==typeof t)for(var i in t)r[i]=t[i];var s=this.execute(e,r);this.clientAuthorizations.apply(s,this.operation.security);var o=[];if(o.push("-X "+this.method.toUpperCase()),void 0!==s.headers){var a;for(a in s.headers){var n=s.headers[a];"string"==typeof n&&(n=n.replace(/\'/g,"\\u0027")),o.push("--header '"+a+": "+n+"'")}}var l=!1,p=!1,u=s.headers["Content-Type"];if(u&&0===u.indexOf("application/x-www-form-urlencoded")?l=!0:u&&0===u.indexOf("multipart/form-data")&&(l=!0,p=!0),s.body){var h;if(_.isObject(s.body)){if(p){p=!0;for(var c=0;c0&&(o+="&"),o+=this.encodeQueryKey(t)+"="+mask(this.encodeQueryParam(r[s]),i);else{var a="";if("csv"===e)a=",";else if("ssv"===e)a="%20";else if("tsv"===e)a="%09";else if("pipes"===e)a="|";else if("brackets"===e)for(s=0;s1?arguments[1]:"utf8"):fromObject(this,t)):arguments.length>1?new Buffer(t,arguments[1]):new Buffer(t)}function fromNumber(t,e){if(t=allocate(t,e<0?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r>>1&&(t.parent=rootParent),t}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function SlowBuffer(t,e){if(!(this instanceof SlowBuffer))return new SlowBuffer(t,e);var r=new Buffer(t,e);return delete r.parent,r}function byteLength(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function slowToString(t,e,r){var n=!1;if(e|=0,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),e<0&&(e=0),r>this.length&&(r=this.length),r<=e)return"";for(;;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"binary":return binarySlice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function hexWrite(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var f=e.length;if(f%2!==0)throw new Error("Invalid hex string");n>f/2&&(n=f/2);for(var o=0;o239?4:f>223?3:f>191?2:1;if(i+u<=r){var s,a,h,c;switch(u){case 1:f<128&&(o=f);break;case 2:s=t[i+1],128===(192&s)&&(c=(31&f)<<6|63&s,c>127&&(o=c));break;case 3:s=t[i+1],a=t[i+2],128===(192&s)&&128===(192&a)&&(c=(15&f)<<12|(63&s)<<6|63&a,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:s=t[i+1],a=t[i+2],h=t[i+3],128===(192&s)&&128===(192&a)&&128===(192&h)&&(c=(15&f)<<18|(63&s)<<12|(63&a)<<6|63&h,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",f=e;fr)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,i,f){if(!Buffer.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>i||et.length)throw new RangeError("index out of range")}function objectWriteUInt16(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,f=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function objectWriteUInt32(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,f=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function checkIEEE754(t,e,r,n,i,f){if(e>i||et.length)throw new RangeError("index out of range");if(r<0)throw new RangeError("index out of range")}function writeFloat(t,e,r,n,i){return i||checkIEEE754(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,i){return i||checkIEEE754(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(t,e,r,n,52,8),r+8}function base64clean(t){if(t=stringtrim(t).replace(INVALID_BASE64_RE,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function toHex(t){return t<16?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){e=e||1/0;for(var r,n=t.length,i=null,f=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&f.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&f.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&f.push(239,191,189),i=r;continue}r=i-55296<<10|r-56320|65536}else i&&(e-=3)>-1&&f.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;f.push(r)}else if(r<2048){if((e-=2)<0)break;f.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;f.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;f.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return f}function asciiToBytes(t){for(var e=[],r=0;r>8,i=r%256,f.push(i),f.push(n);return f}function base64ToBytes(t){return base64.toByteArray(base64clean(t))}function blitBuffer(t,e,r,n){for(var i=0;i=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("is-array");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),Buffer.isBuffer=function(t){return!(null==t||!t._isBuffer)},Buffer.compare=function(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,f=Math.min(r,n);i0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},Buffer.prototype.compare=function(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:Buffer.compare(this,t)},Buffer.prototype.indexOf=function(t,e){function r(t,e,r){for(var n=-1,i=0;r+i2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(e<0&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(Buffer.isBuffer(t))return r(this,t,e);if("number"==typeof t)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):r(this,[t],e);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},Buffer.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},Buffer.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var f=this.length-e;if((void 0===r||r>f)&&(r=f),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"binary":return binaryWrite(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e0&&(i*=256);)n+=this[t+--e]*i;return n},Buffer.prototype.readUInt8=function(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,f=0;++f=i&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=e,i=1,f=this[t+--n];n>0&&(i*=256);)f+=this[t+--n]*i;return i*=128,f>=i&&(f-=Math.pow(2,8*e)),f},Buffer.prototype.readInt8=function(t,e){return e||checkOffset(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},Buffer.prototype.readInt16LE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||checkInt(this,t,e,r,Math.pow(2,8*r),0);var i=1,f=0;for(this[e]=255&t;++f=0&&(f*=256);)this[e+i]=t/f&255;return e+r},Buffer.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t,e+1},Buffer.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var f=0,o=1,u=t<0?1:0;for(this[e]=255&t;++f>0)-u&255;return e+r},Buffer.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var f=r-1,o=1,u=t<0?1:0;for(this[e+f]=255&t;--f>=0&&(o*=256);)this[e+f]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t,e+1},Buffer.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;i--)t[i+e]=this[i+r];else if(f<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i=this.length)throw new RangeError("start out of bounds");if(r<0||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;n0)throw new Error("Invalid string. Length must be a multiple of 4");var u=t.length;A="="===t.charAt(u-2)?2:"="===t.charAt(u-1)?1:0,i=new a(3*t.length/4-A),c=A>0?t.length-4:t.length;var f=0;for(n=0,h=0;n>16),e((65280&o)>>8),e(255&o);return 2===A?(o=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&o)):1===A&&(o=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(o>>8&255),e(255&o)),i}function n(t){function r(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var n,a,h,c=t.length%3,o="";for(n=0,h=t.length-c;n>2),o+=r(a<<4&63),o+="==";break;case 2:a=(t[t.length-2]<<8)+t[t.length-1],o+=r(a>>10),o+=r(a>>4&63),o+=r(a<<2&63),o+="="}return o}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,h="+".charCodeAt(0),c="/".charCodeAt(0),o="0".charCodeAt(0),A="a".charCodeAt(0),i="A".charCodeAt(0),u="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=n}("undefined"==typeof exports?this.base64js={}:exports); },{}],16:[function(require,module,exports){ exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; },{}],17:[function(require,module,exports){ var isArray=Array.isArray,str=Object.prototype.toString;module.exports=isArray||function(r){return!!r&&"[object Array]"==str.call(r)}; },{}],18:[function(require,module,exports){ !function(){"use strict";function t(i,e,n,s){return this instanceof t?(this.domain=i||void 0,this.path=e||"/",this.secure=!!n,this.script=!!s,this):new t(i,e,n,s)}function i(t,e,n){return t instanceof i?t:this instanceof i?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(n||"/"),this.explicit_path=!1,this.domain=e||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,t&&this.parse(t,e,n),this):new i(t,e,n)}function e(){var t,n,s;return this instanceof e?(t=Object.create(null),this.setCookie=function(e,r,a){var o,h;if(e=new i(e,r,a),o=e.expiration_date<=Date.now(),void 0!==t[e.name]){for(n=t[e.name],h=0;hi&&" "!==e[u+1],u=o);else if(!isPrintable(l))return 5;p=p&&isPlainSafe(l)}s=s||c&&o-u-1>i&&" "!==e[u+1]}return a||s?" "===e[0]&&n>9?5:s?4:3:p&&!r(e)?1:2}function writeScalar(e,t,n,i){e.dump=function(){function r(t){return testImplicitResolving(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(t)!==-1)return"'"+t+"'";var o=e.indent*Math.max(1,n),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o);switch(chooseScalarStyle(t,i||e.flowLevel>-1&&n>=e.flowLevel,e.indent,l,r)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,o));case 4:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,l),o));case 5:return'"'+escapeString(t,l)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var n=" "===e[0]?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function dropEndingNewline(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function foldString(e,t){for(var n,i,r=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=n!==-1?n:e.length,r.lastIndex=n,foldLine(e.slice(0,n),t)}(),l="\n"===e[0]||" "===e[0];i=r.exec(e);){var a=i[1],s=i[2];n=" "===s[0],o+=a+(l||n||""===s?"":"\n")+foldLine(s,t),l=n}return o}function foldLine(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,l=0,a=0,s="";n=r.exec(e);)a=n.index,a-o>t&&(i=l>o?l:a,s+="\n"+e.slice(o,i),o=i+1),l=a;return s+="\n",s+=e.length-o>t&&l>o?e.slice(o,l)+"\n"+e.slice(l+1):e.slice(o),s.slice(1)}function escapeString(e){for(var t,n,i="",r=0;r1024&&(a+="? "),a+=e.dump+": ",writeNode(e,t,l,!1,!1)&&(a+=e.dump,s+=a));e.tag=c,e.dump="{"+s+"}"}function writeBlockMapping(e,t,n,i){var r,o,l,a,s,c,u="",p=e.tag,E=Object.keys(n);if(e.sortKeys===!0)E.sort();else if("function"==typeof e.sortKeys)E.sort(e.sortKeys);else if(e.sortKeys)throw new YAMLException("sortKeys must be a boolean or a function");for(r=0,o=E.length;r1024,s&&(c+=e.dump&&10===e.dump.charCodeAt(0)?"?":"? "),c+=e.dump,s&&(c+=generateNextLine(e,t)),writeNode(e,t+1,a,!0,s)&&(c+=e.dump&&10===e.dump.charCodeAt(0)?":":": ",c+=e.dump,u+=c));e.tag=p,e.dump=u||"{}"}function detectType(e,t,n){var i,r,o,l,a,s;for(r=n?e.explicitTypes:e.implicitTypes,o=0,l=r.length;o tag resolver accepts not "'+s+'" style');i=a.represent[s](t,s)}e.dump=i}return!0}return!1}function writeNode(e,t,n,i,r,o){e.tag=null,e.dump=n,detectType(e,n,!1)||detectType(e,n,!0);var l=_toString.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var a,s,c="[object Object]"===l||"[object Array]"===l;if(c&&(a=e.duplicates.indexOf(n),s=a!==-1),(null!==e.tag&&"?"!==e.tag||s||2!==e.indent&&t>0)&&(r=!1),s&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(c&&s&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===l)i&&0!==Object.keys(e.dump).length?(writeBlockMapping(e,t,e.dump,r),s&&(e.dump="&ref_"+a+e.dump)):(writeFlowMapping(e,t,e.dump),s&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===l)i&&0!==e.dump.length?(writeBlockSequence(e,t,e.dump,r),s&&(e.dump="&ref_"+a+e.dump)):(writeFlowSequence(e,t,e.dump),s&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==l){if(e.skipInvalid)return!1;throw new YAMLException("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&writeScalar(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function getDuplicateReferences(e,t){var n,i,r=[],o=[];for(inspectNode(e,r,o),n=0,i=o.length;n>10)+55296,(e-65536&1023)+56320)}function State(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||DEFAULT_FULL_SCHEMA,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function generateError(e,t){return new YAMLException(t,new Mark(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){e.onWarning&&e.onWarning.call(null,generateError(e,t))}function captureSegment(e,t,n,i){var o,r,a,s;if(t1&&(e.result+=common.repeat("\n",t-1))}function readPlainScalar(e,t,n){var i,o,r,a,s,p,c,l,u,d=e.kind,h=e.result;if(u=e.input.charCodeAt(e.position),is_WS_OR_EOL(u)||is_FLOW_INDICATOR(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o)))return!1;for(e.kind="scalar",e.result="",r=a=e.position,s=!1;0!==u;){if(58===u){if(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o))break}else if(35===u){if(i=e.input.charCodeAt(e.position-1),is_WS_OR_EOL(i))break}else{if(e.position===e.lineStart&&testDocumentSeparator(e)||n&&is_FLOW_INDICATOR(u))break;if(is_EOL(u)){if(p=e.line,c=e.lineStart,l=e.lineIndent,skipSeparationSpace(e,!1,-1),e.lineIndent>=t){s=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=p,e.lineStart=c,e.lineIndent=l;break}}s&&(captureSegment(e,r,a,!1),writeFoldedLines(e,e.line-p),r=a=e.position,s=!1),is_WHITE_SPACE(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return captureSegment(e,r,a,!1),!!e.result||(e.kind=d,e.result=h,!1)}function readSingleQuotedScalar(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(captureSegment(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=e.position,e.position++,o=e.position}else is_EOL(n)?(captureSegment(e,i,o,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),i=o=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var n,i,o,r,a,s;if(s=e.input.charCodeAt(e.position),34!==s)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return captureSegment(e,n,e.position,!0),e.position++,!0;if(92===s){if(captureSegment(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),is_EOL(s))skipSeparationSpace(e,!1,t);else if(s<256&&simpleEscapeCheck[s])e.result+=simpleEscapeMap[s],e.position++;else if((a=escapedHexLen(s))>0){for(o=a,r=0;o>0;o--)s=e.input.charCodeAt(++e.position),(a=fromHexCode(s))>=0?r=(r<<4)+a:throwError(e,"expected hexadecimal character");e.result+=charFromCodepoint(r),e.position++}else throwError(e,"unknown escape sequence");n=i=e.position}else is_EOL(s)?(captureSegment(e,n,i,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),n=i=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var n,i,o,r,a,s,p,c,l,u,d,h=!0,f=e.tag,A=e.anchor,m={};if(d=e.input.charCodeAt(e.position),91===d)r=93,p=!1,i=[];else{if(123!==d)return!1;r=125,p=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),d=e.input.charCodeAt(++e.position);0!==d;){if(skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),d===r)return e.position++,e.tag=f,e.anchor=A,e.kind=p?"mapping":"sequence",e.result=i,!0;h||throwError(e,"missed comma between flow collection entries"),l=c=u=null,a=s=!1,63===d&&(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)&&(a=s=!0,e.position++,skipSeparationSpace(e,!0,t))),n=e.line,composeNode(e,t,1,!1,!0),l=e.tag,c=e.result,skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(a=!0,d=e.input.charCodeAt(++e.position),skipSeparationSpace(e,!0,t),composeNode(e,t,1,!1,!0),u=e.result),p?storeMappingPair(e,i,m,l,c,u):a?i.push(storeMappingPair(e,null,m,l,c,u)):i.push(c),skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var n,i,o,r,a=1,s=!1,p=!1,c=t,l=0,u=!1;if(r=e.input.charCodeAt(e.position),124===r)i=!1;else{if(62!==r)return!1;i=!0}for(e.kind="scalar",e.result="";0!==r;)if(r=e.input.charCodeAt(++e.position),43===r||45===r)1===a?a=43===r?3:2:throwError(e,"repeat of a chomping mode identifier");else{if(!((o=fromDecimalCode(r))>=0))break;0===o?throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?throwError(e,"repeat of an indentation width identifier"):(c=t+o-1,p=!0)}if(is_WHITE_SPACE(r)){do r=e.input.charCodeAt(++e.position);while(is_WHITE_SPACE(r));if(35===r)do r=e.input.charCodeAt(++e.position);while(!is_EOL(r)&&0!==r)}for(;0!==r;){for(readLineBreak(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!p||e.lineIndentc&&(c=e.lineIndent),is_EOL(r))l++;else{if(e.lineIndentt)&&0!==o)throwError(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(composeNode(e,t,4,!0,o)&&(A?h=e.result:f=e.result),A||(storeMappingPair(e,l,u,d,h,f,r,a),d=h=f=null),skipSeparationSpace(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)throwError(e,"bad indentation of a mapping entry");else if(e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):throwError(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||A}function readDocument(e){var t,n,i,o,r=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(skipSeparationSpace(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),i=[],n.length<1&&throwError(e,"directive name must not be less than one character in length");0!==o;){for(;is_WHITE_SPACE(o);)o=e.input.charCodeAt(++e.position);if(35===o){do o=e.input.charCodeAt(++e.position);while(0!==o&&!is_EOL(o));break}if(is_EOL(o))break;for(t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==o&&readLineBreak(e),_hasOwnProperty.call(directiveHandlers,n)?directiveHandlers[n](e,n,i):throwWarning(e,'unknown document directive "'+n+'"')}if(skipSeparationSpace(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,skipSeparationSpace(e,!0,-1)):a&&throwError(e,"directives end mark is expected"),composeNode(e,e.lineIndent-1,4,!1,!0),skipSeparationSpace(e,!0,-1),e.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(e.input.slice(r,e.position))&&throwWarning(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&testDocumentSeparator(e))return void(46===e.input.charCodeAt(e.position)&&(e.position+=3,skipSeparationSpace(e,!0,-1)));e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(e-1))===-1;)if(e-=1,this.position-e>i/2-1){n=" ... ",e+=5;break}for(r="",o=this.position;oi/2-1){r=" ... ",o-=5;break}return s=this.buffer.slice(e,o),common.repeat(" ",t)+n+s+r+"\n"+common.repeat(" ",t+this.position-e+n.length)+"^"},Mark.prototype.toString=function(t){var i,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(i=this.getSnippet(),i&&(n+=":\n"+i)),n},module.exports=Mark; },{"./common":21}],26:[function(require,module,exports){ "use strict";function compileList(i,e,t){var c=[];return i.include.forEach(function(i){t=compileList(i,e,t)}),i[e].forEach(function(i){t.forEach(function(e,t){e.tag===i.tag&&e.kind===i.kind&&c.push(t)}),t.push(i)}),t.filter(function(i,e){return c.indexOf(e)===-1})}function compileMap(){function i(i){c[i.kind][i.tag]=c.fallback[i.tag]=i}var e,t,c={scalar:{},sequence:{},mapping:{},fallback:{}};for(e=0,t=arguments.length;e64)){if(e<0)return!1;u+=6}return u%8===0}function constructYamlBinary(r){var e,n,u=r.replace(/[\r\n=]/g,""),f=u.length,t=BASE64_MAP,a=0,i=[];for(e=0;e>16&255),i.push(a>>8&255),i.push(255&a)),a=a<<6|t.indexOf(u.charAt(e));return n=f%4*6,0===n?(i.push(a>>16&255),i.push(a>>8&255),i.push(255&a)):18===n?(i.push(a>>10&255),i.push(a>>2&255)):12===n&&i.push(a>>4&255),NodeBuffer?NodeBuffer.from?NodeBuffer.from(i):new NodeBuffer(i):i}function representYamlBinary(r){var e,n,u="",f=0,t=r.length,a=BASE64_MAP;for(e=0;e>18&63],u+=a[f>>12&63],u+=a[f>>6&63],u+=a[63&f]),f=(f<<8)+r[e];return n=t%3,0===n?(u+=a[f>>18&63],u+=a[f>>12&63],u+=a[f>>6&63],u+=a[63&f]):2===n?(u+=a[f>>10&63],u+=a[f>>4&63],u+=a[f<<2&63],u+=a[64]):1===n&&(u+=a[f>>2&63],u+=a[f<<4&63],u+=a[64],u+=a[64]),u}function isBinary(r){return NodeBuffer&&NodeBuffer.isBuffer(r)}var NodeBuffer;try{NodeBuffer=require("buffer").Buffer}catch(r){}var Type=require("../type"),BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}); },{"../type":32,"buffer":14}],34:[function(require,module,exports){ "use strict";function resolveYamlBoolean(e){if(null===e)return!1;var r=e.length;return 4===r&&("true"===e||"True"===e||"TRUE"===e)||5===r&&("false"===e||"False"===e||"FALSE"===e)}function constructYamlBoolean(e){return"true"===e||"True"===e||"TRUE"===e}function isBoolean(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}); },{"../type":32}],35:[function(require,module,exports){ "use strict";function resolveYamlFloat(e){return null!==e&&!!YAML_FLOAT_PATTERN.test(e)}function constructYamlFloat(e){var r,t,a,n;return r=e.replace(/_/g,"").toLowerCase(),t="-"===r[0]?-1:1,n=[],"+-".indexOf(r[0])>=0&&(r=r.slice(1)),".inf"===r?1===t?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===r?NaN:r.indexOf(":")>=0?(r.split(":").forEach(function(e){n.unshift(parseFloat(e,10))}),r=0,a=1,n.forEach(function(e){r+=e*a,a*=60}),t*r):t*parseFloat(r,10)}function representYamlFloat(e,r){var t;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(e))return"-0.0";return t=e.toString(10),SCIENTIFIC_WITHOUT_DOT.test(t)?t.replace("e",".e"):t}function isFloat(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||common.isNegativeZero(e))}var common=require("../common"),Type=require("../type"),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}); },{"../common":21,"../type":32}],36:[function(require,module,exports){ "use strict";function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(null===e)return!1;var r,t=e.length,n=0,i=!1;if(!t)return!1;if(r=e[n],"-"!==r&&"+"!==r||(r=e[++n]),"0"===r){if(n+1===t)return!0;if(r=e[++n],"b"===r){for(n++;n3)return!1;if("/"!==r[r.length-n.length-1])return!1}return!0}function constructJavascriptRegExp(e){var r=e,t=/\/([gim]*)$/.exec(e),n="";return"/"===r[0]&&(t&&(n=t[1]),r=r.slice(1,r.length-n.length-1)),new RegExp(r,n)}function representJavascriptRegExp(e){var r="/"+e.source+"/";return e.global&&(r+="g"),e.multiline&&(r+="m"),e.ignoreCase&&(r+="i"),r}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp}); },{"../../type":32}],39:[function(require,module,exports){ "use strict";function resolveJavascriptUndefined(){return!0}function constructJavascriptUndefined(){}function representJavascriptUndefined(){return""}function isUndefined(e){return void 0===e}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined}); },{"../../type":32}],40:[function(require,module,exports){ "use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}); },{"../type":32}],41:[function(require,module,exports){ "use strict";function resolveYamlMerge(e){return"<<"===e||null===e}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}); },{"../type":32}],42:[function(require,module,exports){ "use strict";function resolveYamlNull(l){if(null===l)return!0;var e=l.length;return 1===e&&"~"===l||4===e&&("null"===l||"Null"===l||"NULL"===l)}function constructYamlNull(){return null}function isNull(l){return null===l}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}); },{"../type":32}],43:[function(require,module,exports){ "use strict";function resolveYamlOmap(r){if(null===r)return!0;var t,e,n,o,u,a=[],l=r;for(t=0,e=l.length;t=0;--n){var s=this.leading[n];t.end.offset>=s.start&&(i.unshift(s.comment),this.leading.splice(n,1),this.trailing.splice(n,1))}i.length&&(e.innerComments=i)}},e.prototype.findTrailingComments=function(e,t){var i=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var n=this.trailing[r];n.start>=t.end.offset&&i.unshift(n.comment)}return this.trailing.length=0,i}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var a=s.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(i=s.node.trailingComments,delete s.node.trailingComments)}return i},e.prototype.findLeadingComments=function(e,t){for(var i,r=[];this.stack.length>0;){var n=this.stack[this.stack.length-1];if(!(n&&n.start>=t.start.offset))break;i=this.stack.pop().node}if(i){for(var s=i.leadingComments?i.leadingComments.length:0,a=s-1;a>=0;--a){var o=i.leadingComments[a];o.range[1]<=t.start.offset&&(r.unshift(o),i.leadingComments.splice(a,1))}return i.leadingComments&&0===i.leadingComments.length&&delete i.leadingComments,r}for(var a=this.leading.length-1;a>=0;--a){var n=this.leading[a];n.start<=t.start.offset&&(r.unshift(n.comment),this.leading.splice(a,1))}return r},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var i=this.findTrailingComments(e,t),n=this.findLeadingComments(e,t);n.length>0&&(e.leadingComments=n),i.length>0&&(e.trailingComments=i),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var i="L"===e.type[0]?"Line":"Block",r={type:i,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var n={comment:{type:i,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(n.comment.loc=e.loc),e.type=i,this.leading.push(n),this.trailing.push(n)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=n},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,i){"use strict";var r=i(4),n=i(5),s=i(6),a=i(7),o=i(8),u=i(2),h=i(10),c=function(){function e(e,t,i){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=i,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],i=1;i0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,i=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var n=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=i,this.context.firstCoverInitializedNameError=r,n},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,i=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var n=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&i,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,n},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,i,r=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(r,new h.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,n.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),i=this.getTokenRaw(t),e=this.finalize(r,new h.Literal(t.value,i));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value="true"===t.value,i=this.getTokenRaw(t),e=this.finalize(r,new h.Literal(t.value,i));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value=null,i=this.getTokenRaw(t),e=this.finalize(r,new h.Literal(t.value,i));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),i=this.getTokenRaw(t),e=this.finalize(r,new h.RegexLiteral(t.value,i,t.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new h.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new h.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new h.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var i=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(i)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new h.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.finalize(e,new h.FunctionExpression(null,i.params,r,!1))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),i=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,n.Messages.StrictOctalLiteral);var r=this.getTokenRaw(t);i=this.finalize(e,new h.Literal(t.value,r));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:i=this.finalize(e,new h.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(i=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return i},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,i,r,s=this.createNode(),o=this.lookahead,u=!1,c=!1,l=!1;o.type===a.Token.Identifier?(this.nextToken(),i=this.finalize(s,new h.Identifier(o.value))):this.match("*")?this.nextToken():(u=this.match("["),i=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(o.type===a.Token.Identifier&&"get"===o.value&&p)t="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(o.type===a.Token.Identifier&&"set"===o.value&&p)t="set",u=this.match("["),i=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(o.type===a.Token.Punctuator&&"*"===o.value&&p)t="init",u=this.match("["),i=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(),c=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(n.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=this.parsePropertyMethodFunction(),c=!0;else if(o.type===a.Token.Identifier){var d=this.finalize(s,new h.Identifier(o.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),l=!0;var m=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(s,new h.AssignmentPattern(d,m))}else l=!0,r=d}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new h.Property(t,i,u,r,c,l))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],i={value:!1};!this.match("}");)t.push(this.parseObjectProperty(i)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new h.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),i={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new h.TemplateElement(i,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),i={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new h.TemplateElement(i,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],i=[],r=this.parseTemplateHead();for(i.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),i.push(r);return this.finalize(e,new h.TemplateLiteral(i,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[]};else{var t=this.lookahead,i=[];if(this.match("..."))e=this.parseRestElement(i),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e]};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var n=[];for(this.context.isAssignmentTarget=!1,n.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:"ArrowParameterPlaceHolder",params:[e]}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var s=0;s0){this.nextToken(),i.prec=r,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var n=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),o=[s,i,a];;){if(r=this.binaryPrecedence(this.lookahead),r<=0)break;for(;o.length>2&&r<=o[o.length-2].prec;){a=o.pop();var u=o.pop().value;s=o.pop(),n.pop();var c=this.startNode(n[n.length-1]);o.push(this.finalize(c,new h.BinaryExpression(u,s,a)))}i=this.nextToken(),i.prec=r,o.push(i),n.push(this.lookahead),o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var l=o.length-1;for(t=o[l],n.pop();l>1;){var c=this.startNode(n.pop());t=this.finalize(c,new h.BinaryExpression(o[l-1].value,o[l-2],t)),l-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var i=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=i,this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new h.ConditionalExpression(t,r,n)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern: for(var i=0;i")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=this.reinterpretAsCoverFormalsList(e);if(r){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var o=this.startNode(t);this.expect("=>");var c=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),l=c.type!==u.Syntax.BlockStatement;this.context.strict&&r.firstRestricted&&this.throwUnexpectedToken(r.firstRestricted,r.message),this.context.strict&&r.stricted&&this.tolerateUnexpectedToken(r.stricted,r.message),e=this.finalize(o,new h.ArrowFunctionExpression(r.params,c,l)),this.context.strict=s,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(n.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var p=e;this.scanner.isRestrictedWord(p.name)&&this.tolerateUnexpectedToken(i,n.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(p.name)&&this.tolerateUnexpectedToken(i,n.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),i=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new h.AssignmentExpression(i.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var i=[];for(i.push(t);this.startMarker.index",t.TokenName[i.Identifier]="Identifier",t.TokenName[i.Keyword]="Keyword",t.TokenName[i.NullLiteral]="Null",t.TokenName[i.NumericLiteral]="Numeric",t.TokenName[i.Punctuator]="Punctuator",t.TokenName[i.StringLiteral]="String",t.TokenName[i.RegularExpression]="RegularExpression",t.TokenName[i.Template]="Template"},function(e,t,i){"use strict";function r(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function n(e){return"01234567".indexOf(e)}var s=i(4),a=i(5),o=i(9),u=i(7),h=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,i,r;for(this.trackComment&&(t=[],i=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(++this.index,o.Character.isLineTerminator(n)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[i+e,this.index-1],range:[i,this.index-1],loc:r};t.push(s)}return 13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!1,slice:[i+e,this.index],range:[i,this.index],loc:r};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,i;for(this.trackComment&&(e=[],t=this.index-2,i={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(o.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:i};e.push(n)}return e}++this.index}else++this.index}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:i};e.push(n)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var i=this.source.charCodeAt(this.index);if(o.Character.isWhiteSpace(i))++this.index;else if(o.Character.isLineTerminator(i))++this.index,13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===i)if(i=this.source.charCodeAt(this.index+1),47===i){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==i)break;this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===i){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==i)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var i=this.source.charCodeAt(e+1);if(i>=56320&&i<=57343){t=1024*(t-55296)+i-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,i=0,n=0;n1114111||"}"!==e)&&this.throwUnexpectedToken(),o.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!o.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=o.Character.fromCodePoint(e);this.index+=t.length;var i;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,i=this.scanUnicodeCodePointEscape()):(i=this.scanHexEscape("u"),e=i.charCodeAt(0),i&&"\\"!==i&&o.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=i);!this.eof()&&(e=this.codePointAt(this.index),o.Character.isIdentifierPart(e));)i=o.Character.fromCodePoint(e),t+=i,this.index+=i.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,i=this.scanUnicodeCodePointEscape()):(i=this.scanHexEscape("u"),e=i.charCodeAt(0),i&&"\\"!==i&&o.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=i);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,i=n(e);return!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,i=8*i+n(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(i=8*i+n(this.source[this.index++]))),{code:i,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,i=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===i.length?u.Token.Identifier:this.isKeyword(i)?u.Token.Keyword:"null"===i?u.Token.NullLiteral:"true"===i||"false"===i?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,i="";!this.eof()&&(t=this.source[this.index],"0"===t||"1"===t);)i+=this.source[this.index++];return 0===i.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(o.Character.isIdentifierStart(t)||o.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(i,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var i="",r=!1;for(o.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,i="0"+this.source[this.index++]):++this.index;!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];return r||0!==i.length||this.throwUnexpectedToken(),(o.Character.isIdentifierStart(this.source.charCodeAt(this.index))||o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(i,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var n=parseInt(t||i,16);return n>1114111&&r.throwUnexpectedToken(a.Messages.InvalidRegExp),n<=65535?String.fromCharCode(n):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(i)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],i=!1,r=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],o.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(o.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(i)"]"===e&&(i=!1);else{if("/"===e){r=!0;break}"["===e&&(i=!0)}return r||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),{value:t.substr(1,t.length-2),literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var i=this.source[this.index];if(!o.Character.isIdentifierPart(i.charCodeAt(0)))break;if(++this.index,"\\"!==i||this.eof())t+=i,e+=i;else if(i=this.source[this.index],"u"===i){++this.index;var r=this.index;if(i=this.scanHexEscape("u"))for(t+=i,e+="\\u";r=55296&&e<57343&&o.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=h},function(e,t){"use strict";var i={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&i.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&i.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,i){"use strict";var r=i(2),n=function(){function e(e){this.type=r.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=n;var s=function(){function e(e){this.type=r.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=s;var a=function(){function e(e,t,i){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=i}return e}();t.ArrowFunctionExpression=a;var o=function(){function e(e,t,i){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=i}return e}();t.AssignmentExpression=o;var u=function(){function e(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var h=function(){function e(e,t,i){var n="||"===e||"&&"===e;this.type=n?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=i}return e}();t.BinaryExpression=h;var c=function(){function e(e){this.type=r.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=c;var l=function(){function e(e){this.type=r.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=l;var p=function(){function e(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=p;var d=function(){function e(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=d;var m=function(){function e(e){this.type=r.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=m;var D=function(){function e(e,t,i){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=i}return e}();t.ClassDeclaration=D;var x=function(){function e(e,t,i){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=i}return e}();t.ClassExpression=x;var f=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=f;var E=function(){function e(e,t,i){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=i}return e}();t.ConditionalExpression=E;var C=function(){function e(e){this.type=r.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=C;var y=function(){function e(){this.type=r.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=y;var A=function(){function e(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=A;var S=function(){function e(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=S;var v=function(){function e(){this.type=r.Syntax.EmptyStatement}return e}();t.EmptyStatement=v;var F=function(){function e(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=F;var g=function(){function e(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=g;var k=function(){function e(e,t,i){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=i}return e}();t.ExportNamedDeclaration=k;var w=function(){function e(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=w;var T=function(){function e(e){this.type=r.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=T;var B=function(){function e(e,t,i){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=i,this.each=!1}return e}();t.ForInStatement=B;var b=function(){function e(e,t,i){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=i}return e}();t.ForOfStatement=b;var N=function(){function e(e,t,i,n){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=i,this.body=n}return e}();t.ForStatement=N;var I=function(){function e(e,t,i,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=i,this.generator=n,this.expression=!1}return e}();t.FunctionDeclaration=I;var P=function(){function e(e,t,i,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=i,this.generator=n,this.expression=!1}return e}();t.FunctionExpression=P;var M=function(){function e(e){this.type=r.Syntax.Identifier,this.name=e}return e}();t.Identifier=M;var L=function(){function e(e,t,i){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=i}return e}();t.IfStatement=L;var X=function(){function e(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=X;var J=function(){function e(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=J;var U=function(){function e(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=U;var z=function(){function e(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=z;var R=function(){function e(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=R;var O=function(){function e(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=O;var K=function(){function e(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=K;var H=function(){function e(e,t,i,n,s){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=i,this.kind=n,this.static=s}return e}();t.MethodDefinition=H;var W=function(){function e(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=W;var j=function(){function e(e){this.type=r.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=j;var G=function(){function e(e){this.type=r.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=G;var V=function(){function e(e,t){this.type=r.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=V;var Y=function(){function e(e,t,i,n,s,a){this.type=r.Syntax.Property,this.key=t,this.computed=i,this.value=n,this.kind=e,this.method=s,this.shorthand=a}return e}();t.Property=Y;var q=function(){function e(e,t,i){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex=i}return e}();t.RegexLiteral=q;var _=function(){function e(e){this.type=r.Syntax.RestElement,this.argument=e}return e}();t.RestElement=_;var $=function(){function e(e){this.type=r.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Z=function(){function e(e){this.type=r.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Z;var Q=function(){function e(e){this.type=r.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Q;var ee=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=r.Syntax.Super}return e}();t.Super=te;var ie=function(){function e(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=ie;var re=function(){function e(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=re;var ne=function(){function e(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ne;var se=function(){function e(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=se;var ae=function(){function e(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=ae;var oe=function(){function e(){this.type=r.Syntax.ThisExpression}return e}();t.ThisExpression=oe;var ue=function(){function e(e){this.type=r.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var he=function(){function e(e,t,i){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=i}return e}();t.TryStatement=he;var ce=function(){function e(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=ce;var le=function(){function e(e,t,i){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=i}return e}();t.UpdateExpression=le;var pe=function(){function e(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=pe;var de=function(){function e(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=de;var me=function(){function e(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=me;var De=function(){function e(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=De;var xe=function(){function e(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=xe},function(e,t,i){"use strict";function r(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var i=e;t=r(i.namespace)+":"+r(i.name);break;case c.JSXSyntax.JSXMemberExpression:var n=e;t=r(n.object)+"."+r(n.property)}return t}var n,s=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},a=i(9),o=i(7),u=i(3),h=i(12),c=i(13),l=i(10),p=i(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(n||(n={})),o.TokenName[n.Identifier]="JSXIdentifier",o.TokenName[n.Text]="JSXText";var d=function(e){function t(t,i,r){e.call(this,t,i,r)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",i=!0,r=!1,n=!1,s=!1;!this.scanner.eof()&&i&&!r;){var o=this.scanner.source[this.scanner.index];if(o===e)break;if(r=";"===o,t+=o,++this.scanner.index,!r)switch(t.length){case 2:n="#"===o;break;case 3:n&&(s="x"===o,i=s||a.Character.isDecimalDigit(o.charCodeAt(0)),n=n&&!s);break;default:i=i&&!(n&&!a.Character.isDecimalDigit(o.charCodeAt(0))),i=i&&!(s&&!a.Character.isHexDigit(o.charCodeAt(0)))}}if(i&&r&&t.length>2){var u=t.substr(1,t.length-2);n&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):n||s||!h.XHTMLEntities[u]||(t=h.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var i=this.scanner.index,r=this.scanner.source[this.scanner.index++],s="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===r)break;s+="&"===u?this.scanXHTMLEntity(r):u}return{type:o.Token.StringLiteral,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(46===e){var h=this.scanner.source.charCodeAt(this.scanner.index+1),c=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===h&&46===c?"...":".",i=this.scanner.index;return this.scanner.index+=t.length,{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(96===e)return{type:o.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){var i=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var l=this.scanner.source.slice(i,this.scanner.index);return{type:n.Identifier,value:l,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var i=this.scanner.source[this.scanner.index];if("{"===i||"<"===i)break;++this.scanner.index,t+=i,a.Character.isLineTerminator(i.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===i&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var r={type:n.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,i=this.scanner.lineStart;this.scanner.scanComments();var r=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=i,r},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===o.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===o.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==n.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new p.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXNamespacedName(i,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var n=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXMemberExpression(n,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),i=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=i;this.expectJSX(":");var n=this.parseJSXIdentifier();e=this.finalize(t,new p.JSXNamespacedName(r,n))}else e=i;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==o.Token.StringLiteral&&this.throwUnexpectedToken(t);var i=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,i))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),i=null;return this.matchJSX("=")&&(this.expectJSX("="),i=this.parseJSXAttributeValue()),this.finalize(e,new p.JSXAttribute(t,i))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(t,r,i))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new p.JSXClosingElement(t))}var i=this.parseJSXElementName(),r=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(i,n,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new p.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),i=this.nextJSXText();if(i.start0))break;var a=this.finalize(e.node,new p.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),i=[],r=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:i});i=n.children,r=n.closing}return this.finalize(e,new p.JSXElement(t,i,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=d},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,i){"use strict";var r=i(13),n=function(){function e(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=n;var s=function(){function e(e,t,i){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=i}return e}();t.JSXElement=s;var a=function(){function e(){this.type=r.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=a;var o=function(){function e(e){ this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=o;var u=function(){function e(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var h=function(){function e(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=h;var c=function(){function e(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=c;var l=function(){function e(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=l;var p=function(){function e(e,t,i){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=i}return e}();t.JSXOpeningElement=p;var d=function(){function e(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=d;var m=function(){function e(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=m},function(e,t,i){"use strict";var r=i(8),n=i(6),s=i(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var i=this.values[this.paren-1];t="if"===i||"while"===i||"for"===i||"with"===i;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];t=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var n=this.values[this.curly-5];t=!n||!this.beforeFunctionExpression(n)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),o=function(){function e(e,t){this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t-1:!!t&&baseIndexOf(e,r,i)>-1}var baseIndexOf=require("../internal/baseIndexOf"),getLength=require("../internal/getLength"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values"),nativeMax=Math.max;module.exports=includes; },{"../internal/baseIndexOf":79,"../internal/getLength":113,"../internal/isIterateeCall":123,"../internal/isLength":126,"../lang/isArray":141,"../lang/isString":147,"../object/values":153}],57:[function(require,module,exports){ function map(a,r,e){var i=isArray(a)?arrayMap:baseMap;return r=baseCallback(r,e,3),i(a,r)}var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");module.exports=map; },{"../internal/arrayMap":65,"../internal/baseCallback":68,"../internal/baseMap":84,"../lang/isArray":141}],58:[function(require,module,exports){ var getNative=require("../internal/getNative"),nativeNow=getNative(Date,"now"),now=nativeNow||function(){return(new Date).getTime()};module.exports=now; },{"../internal/getNative":115}],59:[function(require,module,exports){ var createWrapper=require("../internal/createWrapper"),replaceHolders=require("../internal/replaceHolders"),restParam=require("./restParam"),BIND_FLAG=1,PARTIAL_FLAG=32,bind=restParam(function(e,r,a){var l=1;if(a.length){var n=replaceHolders(a,bind.placeholder);l|=32}return createWrapper(e,l,r,a,n)});bind.placeholder={},module.exports=bind; },{"../internal/createWrapper":107,"../internal/replaceHolders":133,"./restParam":60}],60:[function(require,module,exports){ function restParam(r,t){if("function"!=typeof r)throw new TypeError(FUNC_ERROR_TEXT);return t=nativeMax(void 0===t?r.length-1:+t||0,0),function(){for(var a=arguments,e=-1,n=nativeMax(a.length-t,0),i=Array(n);++en?0:n+r),l=void 0===l||l>n?n:+l||0,l<0&&(l+=n),n=r>l?0:l-r>>>0,r>>>=0;for(var o=Array(n);++a>>1,d=n[y];(r?d<=e:d-1?a[d]:void 0}return baseFind(a,i,e)}}var baseCallback=require("./baseCallback"),baseFind=require("./baseFind"),baseFindIndex=require("./baseFindIndex"),isArray=require("../lang/isArray");module.exports=createFind; },{"../lang/isArray":141,"./baseCallback":68,"./baseFind":73,"./baseFindIndex":74}],104:[function(require,module,exports){ function createForEach(r,a){return function(e,i,n){return"function"==typeof i&&void 0===n&&isArray(e)?r(e,i):a(e,bindCallback(i,n,3))}}var bindCallback=require("./bindCallback"),isArray=require("../lang/isArray");module.exports=createForEach; },{"../lang/isArray":141,"./bindCallback":95}],105:[function(require,module,exports){ (function (global){ function createHybridWrapper(r,e,a,o,i,t,p,s,l,c){function A(){for(var L=arguments.length,y=L,_=Array(L);y--;)_[y]=arguments[y];if(o&&(_=composeArgs(_,o,i)),t&&(_=composeArgsRight(_,t,p)),g||u){var C=A.placeholder,G=replaceHolders(_,C);if(L-=G.length,Lf))return!1;for(;++o-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}var MAX_SAFE_INTEGER=9007199254740991;module.exports=isLength; },{}],127:[function(require,module,exports){ function isObjectLike(e){return!!e&&"object"==typeof e}module.exports=isObjectLike; },{}],128:[function(require,module,exports){ function isStrictComparable(e){return e===e&&!isObject(e)}var isObject=require("../lang/isObject");module.exports=isStrictComparable; },{"../lang/isObject":145}],129:[function(require,module,exports){ function mergeData(r,e){var a=r[1],o=e[1],p=a|o,s=p<128,l=128==o&&8==a||128==o&&256==a&&r[7].length<=e[8]||384==o&&8==a;if(!s&&!l)return r;1&o&&(r[2]=e[2],p|=1&a?0:4);var A=e[3];if(A){var i=r[3];r[3]=i?composeArgs(i,A,e[4]):arrayCopy(A),r[4]=i?replaceHolders(r[3],PLACEHOLDER):arrayCopy(e[4])}return A=e[5],A&&(i=r[5],r[5]=i?composeArgsRight(i,A,e[6]):arrayCopy(A),r[6]=i?replaceHolders(r[5],PLACEHOLDER):arrayCopy(e[6])),A=e[7],A&&(r[7]=arrayCopy(A)),128&o&&(r[8]=null==r[8]?e[8]:nativeMin(r[8],e[8])),null==r[9]&&(r[9]=e[9]),r[0]=e[0],r[1]=p,r}var arrayCopy=require("./arrayCopy"),composeArgs=require("./composeArgs"),composeArgsRight=require("./composeArgsRight"),replaceHolders=require("./replaceHolders"),BIND_FLAG=1,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,ARY_FLAG=128,REARG_FLAG=256,PLACEHOLDER="__lodash_placeholder__",nativeMin=Math.min;module.exports=mergeData; },{"./arrayCopy":63,"./composeArgs":97,"./composeArgsRight":98,"./replaceHolders":133}],130:[function(require,module,exports){ (function (global){ var getNative=require("./getNative"),WeakMap=getNative(global,"WeakMap"),metaMap=WeakMap&&new WeakMap;module.exports=metaMap; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"./getNative":115}],131:[function(require,module,exports){ var realNames={};module.exports=realNames; },{}],132:[function(require,module,exports){ function reorder(r,e){for(var n=r.length,a=nativeMin(e.length,n),i=arrayCopy(r);a--;){var o=e[a];r[a]=isIndex(o,n)?i[o]:void 0}return r}var arrayCopy=require("./arrayCopy"),isIndex=require("./isIndex"),nativeMin=Math.min;module.exports=reorder; },{"./arrayCopy":63,"./isIndex":122}],133:[function(require,module,exports){ function replaceHolders(e,r){for(var l=-1,o=e.length,a=-1,d=[];++l0){if(++e>=150)return t}else e=0;return baseSetData(t,r)}}();module.exports=setData; },{"../date/now":58,"./baseSetData":89}],135:[function(require,module,exports){ function shimKeys(r){for(var e=keysIn(r),s=e.length,i=s&&r.length,n=!!i&&isLength(i)&&(isArray(r)||isArguments(r)||isString(r)),t=-1,o=[];++t0,u=support.enumErrorProps&&(r===errorProto||r instanceof Error),c=support.enumPrototypes&&isFunction(r);++t=_&&r<=ut}function f(){if(V)try{throw new Error}catch(r){var t=r.stack.split("\n"),n=t[0].indexOf("@")>0?t[1]:t[2],e=u(n);if(!e)return;return G=e[0],e[1]}}function s(t,n,e){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(n+" is deprecated, use "+e+" instead.",new Error("").stack),t.apply(t,arguments)}}function p(t){return t instanceof h?t:k(t)?O(t):E(t)}function a(){function t(t){n=t,i.source=t,L(e,function(n,e){p.nextTick(function(){t.promiseDispatch.apply(t,e)})},void 0),e=void 0,r=void 0}var n,e=[],r=[],o=Y(a.prototype),i=Y(h.prototype);if(i.promiseDispatch=function(t,o,i){var u=K(arguments);e?(e.push(u),"when"===o&&i[1]&&r.push(i[1])):p.nextTick(function(){n.promiseDispatch.apply(n,u)})},i.valueOf=function(){if(e)return i;var t=v(n);return m(t)&&(n=t),t},i.inspect=function(){return n?n.inspect():{state:"pending"}},p.longStackSupport&&V)try{throw new Error}catch(t){i.stack=t.stack.substring(t.stack.indexOf("\n")+1)}return o.promise=i,o.resolve=function(e){n||t(p(e))},o.fulfill=function(e){n||t(E(e))},o.reject=function(e){n||t(R(e))},o.notify=function(t){n||L(r,function(n,e){p.nextTick(function(){e(t)})},void 0)},o}function l(t){if("function"!=typeof t)throw new TypeError("resolver must be a function.");var n=a();try{t(n.resolve,n.reject,n.notify)}catch(t){n.reject(t)}return n.promise}function d(t){return l(function(n,e){for(var r=0,o=t.length;r=r)throw new TypeError}for(;e2?t.resolve(K(arguments,1)):t.resolve(e)}},p.Promise=l,p.promise=l,l.race=d,l.all=I,l.reject=R,l.resolve=p,p.passByCopy=function(t){return t},h.prototype.passByCopy=function(){return this},p.join=function(t,n){return p(t).join(n)},h.prototype.join=function(t){return p([this,t]).spread(function(t,n){if(t===n)return t;throw new Error("Can't join: not the same: "+t+" "+n)})},p.race=d,h.prototype.race=function(){return this.then(p.race)},p.makePromise=h,h.prototype.toString=function(){return"[object Promise]"},h.prototype.then=function(t,n,e){function o(n){try{return"function"==typeof t?t(n):n}catch(t){return R(t)}}function i(t){if("function"==typeof n){r(t,c);try{return n(t)}catch(t){return R(t)}}return R(t)}function u(t){return"function"==typeof e?e(t):t}var c=this,f=a(),s=!1;return p.nextTick(function(){c.promiseDispatch(function(t){s||(s=!0,f.resolve(o(t)))},"when",[function(t){s||(s=!0,f.resolve(i(t)))}])}),c.promiseDispatch(void 0,"when",[void 0,function(t){var n,e=!1;try{n=u(t)}catch(t){if(e=!0,!p.onerror)throw t;p.onerror(t)}e||f.notify(n)}]),f.promise},p.tap=function(t,n){return p(t).tap(n)},h.prototype.tap=function(t){return t=p(t),this.then(function(n){return t.fcall(n).thenResolve(n)})},p.when=y,h.prototype.thenResolve=function(t){return this.then(function(){return t})},p.thenResolve=function(t,n){return p(t).thenResolve(n)},h.prototype.thenReject=function(t){return this.then(function(){throw t})},p.thenReject=function(t,n){return p(t).thenReject(n)},p.nearer=v,p.isPromise=m,p.isPromiseAlike=k,p.isPending=j,h.prototype.isPending=function(){return"pending"===this.inspect().state},p.isFulfilled=w,h.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},p.isRejected=g,h.prototype.isRejected=function(){return"rejected"===this.inspect().state};var et=[],rt=[],ot=[],it=!0;p.resetUnhandledRejections=b,p.getUnhandledReasons=function(){return et.slice()},p.stopUnhandledRejectionTracking=function(){b(),it=!1},b(),p.reject=R,p.fulfill=E,p.master=S,p.spread=N,h.prototype.spread=function(t,n){return this.all().then(function(n){return t.apply(void 0,n)},n)},p.async=D,p.spawn=P,p.return=C,p.promised=Q,p.dispatch=A,h.prototype.dispatch=function(t,n){var e=this,r=a();return p.nextTick(function(){e.promiseDispatch(r.resolve,t,n)}),r.promise},p.get=function(t,n){return p(t).dispatch("get",[n])},h.prototype.get=function(t){return this.dispatch("get",[t])},p.set=function(t,n,e){return p(t).dispatch("set",[n,e])},h.prototype.set=function(t,n){return this.dispatch("set",[t,n])},p.del=p.delete=function(t,n){return p(t).dispatch("delete",[n])},h.prototype.del=h.prototype.delete=function(t){return this.dispatch("delete",[t])},p.mapply=p.post=function(t,n,e){return p(t).dispatch("post",[n,e])},h.prototype.mapply=h.prototype.post=function(t,n){return this.dispatch("post",[t,n])},p.send=p.mcall=p.invoke=function(t,n){return p(t).dispatch("post",[n,K(arguments,2)])},h.prototype.send=h.prototype.mcall=h.prototype.invoke=function(t){return this.dispatch("post",[t,K(arguments,1)])},p.fapply=function(t,n){return p(t).dispatch("apply",[void 0,n])},h.prototype.fapply=function(t){return this.dispatch("apply",[void 0,t])},p.try=p.fcall=function(t){return p(t).dispatch("apply",[void 0,K(arguments,1)])},h.prototype.fcall=function(){return this.dispatch("apply",[void 0,K(arguments)])},p.fbind=function(t){var n=p(t),e=K(arguments,1);return function(){return n.dispatch("apply",[this,e.concat(K(arguments))])}},h.prototype.fbind=function(){var t=this,n=K(arguments);return function(){return t.dispatch("apply",[this,n.concat(K(arguments))])}},p.keys=function(t){return p(t).dispatch("keys",[])},h.prototype.keys=function(){return this.dispatch("keys",[])},p.all=I,h.prototype.all=function(){return I(this)},p.any=F,h.prototype.any=function(){return F(this)},p.allResolved=s(U,"allResolved","allSettled"),h.prototype.allResolved=function(){return U(this)},p.allSettled=M,h.prototype.allSettled=function(){return this.then(function(t){return I(X(t,function(t){function n(){return t.inspect()}return t=p(t),t.then(n,n)}))})},p.fail=p.catch=function(t,n){return p(t).then(void 0,n)},h.prototype.fail=h.prototype.catch=function(t){return this.then(void 0,t)},p.progress=B,h.prototype.progress=function(t){return this.then(void 0,void 0,t)},p.fin=p.finally=function(t,n){return p(t).finally(n)},h.prototype.fin=h.prototype.finally=function(t){return t=p(t),this.then(function(n){return t.fcall().then(function(){return n})},function(n){return t.fcall().then(function(){throw n})})},p.done=function(t,n,e,r){return p(t).done(n,e,r)},h.prototype.done=function(t,n,e){var o=function(t){p.nextTick(function(){if(r(t,i),!p.onerror)throw t;p.onerror(t)})},i=t||n||e?this.then(t,n,e):this;"object"==typeof process&&process&&process.domain&&(o=process.domain.bind(o)),i.then(void 0,o)},p.timeout=function(t,n,e){return p(t).timeout(n,e)},h.prototype.timeout=function(t,n){var e=a(),r=setTimeout(function(){n&&"string"!=typeof n||(n=new Error(n||"Timed out after "+t+" ms"),n.code="ETIMEDOUT"),e.reject(n)},t);return this.then(function(t){clearTimeout(r),e.resolve(t)},function(t){clearTimeout(r),e.reject(t)},e.notify),e.promise},p.delay=function(t,n){return void 0===n&&(n=t,t=void 0),p(t).delay(n)},h.prototype.delay=function(t){return this.then(function(n){var e=a();return setTimeout(function(){e.resolve(n)},t),e.promise})},p.nfapply=function(t,n){return p(t).nfapply(n)},h.prototype.nfapply=function(t){var n=a(),e=K(t);return e.push(n.makeNodeResolver()),this.fapply(e).fail(n.reject),n.promise},p.nfcall=function(t){var n=K(arguments,1);return p(t).nfapply(n)},h.prototype.nfcall=function(){var t=K(arguments),n=a();return t.push(n.makeNodeResolver()),this.fapply(t).fail(n.reject),n.promise},p.nfbind=p.denodeify=function(t){var n=K(arguments,1);return function(){var e=n.concat(K(arguments)),r=a();return e.push(r.makeNodeResolver()),p(t).fapply(e).fail(r.reject),r.promise}},h.prototype.nfbind=h.prototype.denodeify=function(){var t=K(arguments);return t.unshift(this),p.denodeify.apply(void 0,t)},p.nbind=function(t,n){var e=K(arguments,2);return function(){function r(){return t.apply(n,arguments)}var o=e.concat(K(arguments)),i=a();return o.push(i.makeNodeResolver()),p(r).fapply(o).fail(i.reject),i.promise}},h.prototype.nbind=function(){var t=K(arguments,0);return t.unshift(this),p.nbind.apply(void 0,t)},p.nmapply=p.npost=function(t,n,e){return p(t).npost(n,e)},h.prototype.nmapply=h.prototype.npost=function(t,n){var e=K(n||[]),r=a();return e.push(r.makeNodeResolver()),this.dispatch("post",[t,e]).fail(r.reject),r.promise},p.nsend=p.nmcall=p.ninvoke=function(t,n){var e=K(arguments,2),r=a();return e.push(r.makeNodeResolver()),p(t).dispatch("post",[n,e]).fail(r.reject),r.promise},h.prototype.nsend=h.prototype.nmcall=h.prototype.ninvoke=function(t){var n=K(arguments,1),e=a();return n.push(e.makeNodeResolver()),this.dispatch("post",[t,n]).fail(e.reject),e.promise},p.nodeify=$,h.prototype.nodeify=function(t){if(!t)return this;this.then(function(n){p.nextTick(function(){t(null,n)})},function(n){p.nextTick(function(){t(n)})})},p.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var ut=f();return p}); }).call(this,require('_process')) },{"_process":12}],159:[function(require,module,exports){ function noop(){}function serialize(e){if(!isObject(e))return e;var t=[];for(var r in e)pushEncodedKeyValuePair(t,r,e[r]);return t.join("&")}function pushEncodedKeyValuePair(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach(function(r){pushEncodedKeyValuePair(e,t,r)});else if(isObject(r))for(var s in r)pushEncodedKeyValuePair(e,t+"["+s+"]",r[s]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function parseString(e){for(var t,r,s={},n=e.split("&"),o=0,i=n.length;o=300)&&(s=new Error(t.statusText||"Unsuccessful HTTP response"),s.original=e,s.response=t,s.status=t.status)}catch(e){s=e}s?r.callback(s,t):r.callback(null,t)})}function del(e,t){var r=request("DELETE",e);return t&&r.end(t),r}var root;"undefined"!=typeof window?root=window:"undefined"!=typeof self?root=self:(console.warn("Using browser-only version of superagent in non-browser environment"),root=this);var Emitter=require("emitter"),requestBase=require("./request-base"),isObject=require("./is-object"),request=module.exports=require("./request").bind(null,Request);request.getXHR=function(){if(!(!root.XMLHttpRequest||root.location&&"file:"==root.location.protocol&&root.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var trim="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};request.serializeObject=serialize,request.parseString=parseString,request.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},request.serialize={"application/x-www-form-urlencoded":serialize,"application/json":JSON.stringify},request.parse={"application/x-www-form-urlencoded":parseString,"application/json":JSON.parse},Response.prototype.get=function(e){return this.header[e.toLowerCase()]},Response.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=type(t);var r=params(t);for(var s in r)this[s]=r[s]},Response.prototype._parseBody=function(e){var t=request.parse[this.type];return!t&&isJSON(this.type)&&(t=request.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},Response.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},Response.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,s="cannot "+t+" "+r+" ("+this.status+")",n=new Error(s);return n.status=this.status,n.method=t,n.url=r,n},request.Response=Response,Emitter(Request.prototype);for(var key in requestBase)Request.prototype[key]=requestBase[key];Request.prototype.type=function(e){return this.set("Content-Type",request.types[e]||e),this},Request.prototype.responseType=function(e){return this._responseType=e,this},Request.prototype.accept=function(e){return this.set("Accept",request.types[e]||e),this},Request.prototype.auth=function(e,t,r){switch(r||(r={type:"basic"}),r.type){case"basic":var s=btoa(e+":"+t);this.set("Authorization","Basic "+s);break;case"auto":this.username=e,this.password=t}return this},Request.prototype.query=function(e){return"string"!=typeof e&&(e=serialize(e)),e&&this._query.push(e),this},Request.prototype.attach=function(e,t,r){return this._getFormData().append(e,t,r||t.name),this},Request.prototype._getFormData=function(){return this._formData||(this._formData=new root.FormData),this._formData},Request.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},Request.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},Request.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},Request.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},Request.prototype.end=function(e){var t=this,r=this.xhr=request.getXHR(),s=this._timeout,n=this._formData||this._data;this._callback=e||noop,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(t){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var o=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{r.onprogress=o.bind(null,"download"),r.upload&&(r.upload.onprogress=o.bind(null,"upload"))}catch(e){}if(s&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},s)),this._appendQueryString(),this.username&&this.password?r.open(this.method,this.url,!0,this.username,this.password):r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],u=this._serializer||request.serialize[i?i.split(";")[0]:""];!u&&isJSON(i)&&(u=request.serialize["application/json"]),u&&(n=u(n))}for(var a in this.header)null!=this.header[a]&&r.setRequestHeader(a,this.header[a]);return this._responseType&&(r.responseType=this._responseType),this.emit("request",this),r.send(void 0!==n?n:null),this},request.Request=Request,request.get=function(e,t,r){var s=request("GET",e);return"function"==typeof t&&(r=t,t=null),t&&s.query(t),r&&s.end(r),s},request.head=function(e,t,r){var s=request("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.options=function(e,t,r){var s=request("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.del=del,request.delete=del,request.patch=function(e,t,r){var s=request("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.post=function(e,t,r){var s=request("POST",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.put=function(e,t,r){var s=request("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s}; },{"./is-object":160,"./request":162,"./request-base":161,"emitter":163}],160:[function(require,module,exports){ function isObject(e){return null!==e&&"object"==typeof e}module.exports=isObject; },{}],161:[function(require,module,exports){ var isObject=require("./is-object");exports.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},exports.parse=function(t){return this._parser=t,this},exports.serialize=function(t){return this._serializer=t,this},exports.timeout=function(t){return this._timeout=t,this},exports.then=function(t,e){if(!this._fullfilledPromise){var i=this;this._fullfilledPromise=new Promise(function(t,e){i.end(function(i,r){i?e(i):t(r)})})}return this._fullfilledPromise.then(t,e)},exports.catch=function(t){return this.then(void 0,t)},exports.use=function(t){return t(this),this},exports.get=function(t){return this._header[t.toLowerCase()]},exports.getHeader=exports.get,exports.set=function(t,e){if(isObject(t)){for(var i in t)this.set(i,t[i]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},exports.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},exports.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(isObject(t)){for(var i in t)this.field(i,t[i]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return this._getFormData().append(t,e),this},exports.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},exports.withCredentials=function(){return this._withCredentials=!0,this},exports.redirects=function(t){return this._maxRedirects=t,this},exports.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},exports._isHost=function(t){switch({}.toString.call(t)){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}},exports.send=function(t){var e=isObject(t),i=this._header["content-type"];if(e&&isObject(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(i||this.type("form"),i=this._header["content-type"],this._data="application/x-www-form-urlencoded"==i?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(i||this.type("json"),this)}; },{"./is-object":160}],162:[function(require,module,exports){ function request(e,n,t){return"function"==typeof t?new e("GET",n).end(t):2==arguments.length?new e("GET",n):new e(n,t)}module.exports=request; },{}],163:[function(require,module,exports){ function Emitter(t){if(t)return mixin(t)}function mixin(t){for(var e in Emitter.prototype)t[e]=Emitter.prototype[e];return t}"undefined"!=typeof module&&(module.exports=Emitter),Emitter.prototype.on=Emitter.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Emitter.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,s=0;s