UNPKG

hivetaxi-sdk

Version:

HiveTaxi SDK for JavaScript

11 lines 220 kB
// HiveTaxi SDK for JavaScript v1.0.0
// Copyright HiveTaxi.com, Inc. or its affiliates. All Rights Reserved.
// License at https://sdk.hivetaxi.com/js/BUNDLE_LICENSE.txt
!function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r||e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,r){t.exports={version:"1.0",metadata:{apiVersion:"1.0",endpointPrefix:"cartography",protocol:"rest-json",serviceFullName:"HiveTaxi Cartographer Service",signatureVersion:"v1",targetPrefix:"Cartographer_1.0"},operations:{ListPointTypes:{http:{method:"GET",requestUri:"/api/cartography/1.0/address/points/types"},output:{type:"list",member:{type:"structure",required:["id","value"],members:{id:{},value:{}}}},alias:"GetPointTypes"},FindSettlements:{http:{method:"GET",requestUri:"/api/cartography/1.0/address/settlements"},input:{type:"structure",required:["pattern"],members:{pattern:{location:"querystring"}}},output:{shape:"S3"}},FindAddresses:{http:{method:"GET",requestUri:"/api/cartography/1.0/address/addresses"},input:{type:"structure",required:["pattern","parent"],members:{pattern:{location:"querystring"},parent:{type:"long",location:"querystring"}}},output:{shape:"S3"},alias:"FindStreets"},GetAddressPoints:{http:{method:"GET",requestUri:"/api/cartography/1.0/address/points"},input:{type:"structure",required:["parent"],members:{parent:{type:"long",location:"querystring"}}},output:{type:"list",member:{type:"structure",required:["id","info","coordinates"],members:{id:{type:"long"},info:{type:"structure",members:{house:{},housing:{},building:{},lit:{}}},coordinates:{shape:"Sd"}}}}},ListTimezones:{http:{method:"GET",requestUri:"/api/cartography/1.0/timezones"},output:{type:"list",member:{type:"structure",required:["id","value"],members:{id:{type:"integer"},value:{type:"string"}}}},alias:"GetTimezones"},ListObjectLevels:{http:{method:"GET",requestUri:"/api/cartography/1.0/address/objects/levels"},output:{type:"list",member:{type:"structure",required:["id","name"],members:{id:{},name:{}}}},alias:"GetObjectLevels"},FindObjects:{http:{method:"GET",requestUri:"/api/cartography/1.1/address/objects/find"},input:{type:"structure",members:{id:{type:"integer",location:"querystring"},existence:{type:"string",location:"querystring"},formalName:{type:"string",location:"querystring"},shortName:{type:"string",location:"querystring"},levelIds:{type:"string",location:"querystring"},guid:{type:"string",location:"querystring"},parentGuid:{type:"string",location:"querystring"},limit:{type:"integer",location:"querystring"},offset:{type:"integer",location:"querystring"},orderBy:{type:"string",location:"querystring"}}},output:{type:"list",member:{type:"structure",required:["id","formalName","shortName","levelId","guid","removed"],members:{id:{type:"integer"},formalName:{type:"string"},shortName:{type:"string"},levelId:{type:"integer"},guid:{type:"string"},parentGuid:{type:"string"},parentFormalName:{type:"string"},parentShortName:{type:"string"},parentLevelId:{type:"integer"},timezoneId:{type:"integer"},center:{shape:"Sd"},removed:{type:"boolean"}}}},alias:"GetObjects"},AddObject:{http:{requestUri:"/api/cartography/1.0/address/objects/add"},input:{type:"structure",required:["formalName","levelId","shortName","parentGuid"],members:{formalName:{},shortName:{},levelId:{type:"integer"},parentGuid:{},timezoneId:{type:"integer"},center:{shape:"Sd"}}},output:{type:"structure",required:["id"],members:{id:{type:"long"}}},alias:"CreateObject"},EditObject:{http:{requestUri:"/api/cartography/1.0/address/objects/edit"},input:{type:"structure",required:["id","formalName","shortName","levelId","parentGuid"],members:{id:{type:"long"},formalName:{},shortName:{},levelId:{type:"integer"},parentGuid:{},timezoneId:{type:"integer"},center:{shape:"Sd"}}},output:{},alias:"UpdateObject"},MoveObjects:{http:{requestUri:"/api/cartography/1.0/address/objects/edit-parent"},input:{type:"structure",required:["ids","parentGuid"],members:{ids:{type:"list",member:{type:"long"}},parentGuid:{}}},output:{},alias:"ChangeParent"},RemoveObjects:{http:{requestUri:"/api/cartography/1.0/address/objects/remove"},input:{type:"structure",required:["ids"],members:{ids:{type:"list",member:{type:"long"}}}},output:{},alias:"DeleteObjects"},RestoreObjects:{http:{requestUri:"/api/cartography/1.0/address/objects/restore"},input:{type:"structure",required:["ids"],members:{ids:{type:"list",member:{type:"long"}}}},output:{},alias:"UndeleteObjects"}},shapes:{S3:{type:"list",member:{type:"structure",required:["levels"],members:{levels:{type:"list",member:{type:"structure",members:{id:{type:"integer"},type:{type:"integer"},name:{},prefix:{}}}},priority:{type:"integer"},center:{type:"structure",required:["coordinates"],members:{coordinates:{type:"list",member:{type:"float"}}}}}}},Sd:{type:"structure",required:["lon","lat"],members:{lon:{type:"float"},lat:{type:"float"}}}},paginators:{},waiters:{}}},{}],2:[function(e,t,r){t.exports={version:"1.0",metadata:{apiVersion:"1.0",endpointPrefix:"client",protocol:"rest-json",serviceFullName:"HiveTaxi Client Service",signatureVersion:"v1"},operations:{GetOrderStatus:{http:{method:"GET",requestUri:"/1.0/order/status"},input:{type:"structure",required:["id"],members:{id:{type:"integer"}}},output:{type:"structure",required:["state"],members:{state:{type:"integer"},assignee:{share:"Assignee"}}},alias:"orderStatus"}},shapes:{}}},{}],3:[function(e,t,r){t.exports={versiob:2,waiters:{OrderAccepted:{delay:5,operation:"GetOrderStatus",maxAttempts:25,acceptors:[{expected:1,matcher:"path",state:"success",argument:"state"},{expected:"ResourceNotFoundException",matcher:"error",state:"retry"}]},OrderAssigned:{delay:20,operation:"GetOrderStatus",maxAttempts:25,acceptors:[{expected:2,matcher:"path",state:"success",argument:"state"},{expected:"ResourceNotFoundException",matcher:"error",state:"retry"}]},OrderWaiting:{delay:15,operation:"GetOrderStatus",maxAttempts:240,acceptors:[{expected:3,matcher:"path",state:"success",argument:"state"},{expected:"ResourceNotFoundException",matcher:"error",state:"retry"}]},OrderCompleted:{delay:20,operation:"GetOrderStatus",maxAttempts:25,acceptors:[{expected:4,matcher:"path",state:"success",argument:"state"},{expected:"ResourceNotFoundException",matcher:"error",state:"retry"}]},OrderExists:{delay:5,operation:"GetOrderStatus",maxAttempts:20,acceptors:[{expected:200,matcher:"status",state:"success"},{expected:301,matcher:"status",state:"success"},{expected:403,matcher:"status",state:"success"},{expected:404,matcher:"status",state:"retry"}]},OrderNotExists:{delay:5,operation:"GetOrderStatus",maxAttempts:20,acceptors:[{expected:404,matcher:"status",state:"success"},{expected:"ResourceNotFoundException",matcher:"error",state:"success"}]}}}},{}],4:[function(e,t,r){t.exports={version:"1.0",metadata:{apiVersion:"1.0",endpointPrefix:"contractor",protocol:"json-rpc",serviceFullName:"HiveTaxi Contractor Service",signatureVersion:"v1",targetPrefix:"Contractor"},operations:{AddEmployeePhone:{http:{target:"Employees.addEmployeePhone",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","employeeId","phone"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},employeeId:{type:"integer"},phone:{type:"string"}}}},RemoveEmployeePhone:{http:{target:"Employees.removeEmployeePhone",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","employeeId","phone"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},employeeId:{type:"integer"},phone:{type:"string"}}}},GetGroups:{http:{target:"Contractor.getGroups",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor"],members:{contractor:{type:"integer",location:"uri"},requestId:{type:"integer"}}},output:{type:"structure",required:["result"],members:{result:{type:"list",member:{type:"structure",required:["groupId","name","locked"],members:{groupId:{type:"integer"},name:{},locked:{type:"boolean"}}}}}}},AddEmployee:{http:{target:"Employees.addEmployee",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","firstName","lastName"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},firstName:{},lastName:{},middleName:{},requestId:{type:"integer"}}}},EditEmployee:{http:{target:"Employees.editEmployee",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","employeeId","firstName","lastName"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},employeeId:{type:"integer"},firstName:{},lastName:{},middleName:{},requestId:{type:"integer"}}}},GetEmployee:{http:{target:"Employees.getEmployee",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","employeeId"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},employeeId:{type:"integer"},requestId:{type:"integer"}}},output:{type:"structure",required:["result"],members:{result:{type:"structure",required:["groupId","employeeId","firstName","lastName","locked","phones"],members:{groupId:{type:"integer"},employeeId:{type:"integer"},firstName:{},lastName:{},middleName:{},locked:{type:"boolean"},phones:{type:"list",member:{type:"string"}}}}}}},GetEmployees:{http:{target:"Employees.getEmployees",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},requestId:{type:"integer"}}},output:{type:"structure",required:["result"],members:{result:{type:"list",member:{type:"structure",required:["groupId","employeeId","firstName","lastName","locked"],members:{groupId:{type:"integer"},employeeId:{type:"integer"},firstName:{},lastName:{},middleName:{},locked:{type:"boolean"}}}}}}},LockEmployee:{http:{target:"Employees.lockEmployee",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","employeeId"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},employeeId:{type:"integer"},requestId:{type:"integer"}}}},RemoveEmployee:{http:{target:"Employees.removeEmployee",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","employeeId"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},employeeId:{type:"integer"},requestId:{type:"integer"}}}},UnlockEmployee:{http:{target:"Employees.unlockEmployee",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor","groupId","employeeId"],members:{contractor:{type:"integer",location:"uri"},groupId:{type:"integer"},employeeId:{type:"integer"},requestId:{type:"integer"}}}},GetUserInfo:{http:{target:"User.getInfo",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor"],members:{contractor:{type:"integer",location:"uri"},requestId:{type:"integer"}}},output:{type:"structure",required:["result"],members:{result:{type:"structure",required:["name"],members:{name:{}}}}}},GetAccountState:{http:{target:"Contractor.getAccountState",requestUri:"/api/contractors/{contractor}"},input:{type:"structure",required:["contractor"],members:{contractor:{type:"integer",location:"uri"}}},output:{type:"structure",required:["result"],members:{result:{type:"structure",required:["balance"],members:{balance:{type:"float"}}}}}}},shapes:{},paginators:{},waiters:{}}},{}],5:[function(e,t,r){t.exports={version:"1.0",metadata:{apiVersion:"1.0",endpointPrefix:"driver",protocol:"rest-json",serviceFullName:"HiveTaxi Driver Service",signatureVersion:"v1",targetPrefix:"Driver_1.0"},operations:{ResubmitActivationCode:{http:{method:"GET",requestUri:"/1.0/driver/resubmit"},input:{type:"structure",required:["id"],members:{id:{type:"integer",location:"querystring",locationName:"id"},confirmationType:{type:"string",location:"querystring",locationName:"confirmationType"}}},output:{}}},shapes:{},waiters:{}}},{}],6:[function(e,t,r){e("../lib/node_loader");e("../lib/core");t.exports={Cartographer:e("./cartographer"),Client:e("./client"),Driver:e("./driver"),Contractor:e("./contractor")}},{"../lib/core":14,"../lib/node_loader":12,"./cartographer":7,"./client":8,"./contractor":9,"./driver":10}],7:[function(e,t,r){e("../lib/node_loader");var n=e("../lib/core"),i=e("../lib/service"),o=e("../lib/api_loader");o.services.cartographer={},n.Cartographer=i.defineService("cartographer",["1.0"]),Object.defineProperty(o.services.cartographer,"1.0",{get:function(){return e("../apis/cartographer-1.0.min.json")},enumerable:!0,configurable:!0}),t.exports=n.Cartographer},{"../apis/cartographer-1.0.min.json":1,"../lib/api_loader":11,"../lib/core":14,"../lib/node_loader":12,"../lib/service":42}],8:[function(e,t,r){e("../lib/node_loader");var n=e("../lib/core"),i=e("../lib/service"),o=e("../lib/api_loader");o.services.client={},n.Client=i.defineService("client",["1.0"]),Object.defineProperty(o.services.client,"1.0",{get:function(){var t=e("../apis/client-1.0.min.json");return t.waiters=e("../apis/client-1.0.waiters2.json").waiters,t},enumerable:!0,configurable:!0}),t.exports=n.Client},{"../apis/client-1.0.min.json":2,"../apis/client-1.0.waiters2.json":3,"../lib/api_loader":11,"../lib/core":14,"../lib/node_loader":12,"../lib/service":42}],9:[function(e,t,r){e("../lib/node_loader");var n=e("../lib/core"),i=e("../lib/service"),o=e("../lib/api_loader");o.services.contractor={},n.Contractor=i.defineService("contractor",["1.0"]),Object.defineProperty(o.services.contractor,"1.0",{get:function(){return e("../apis/contractor-1.0.min.json")},enumerable:!0,configurable:!0}),t.exports=n.Contractor},{"../apis/contractor-1.0.min.json":4,"../lib/api_loader":11,"../lib/core":14,"../lib/node_loader":12,"../lib/service":42}],10:[function(e,t,r){e("../lib/node_loader");var n=e("../lib/core"),i=e("../lib/service"),o=e("../lib/api_loader");o.services.driver={},n.Driver=i.defineService("driver",["1.0"]),Object.defineProperty(o.services.driver,"1.0",{get:function(){return e("../apis/driver-1.0.min.json")},enumerable:!0,configurable:!0}),t.exports=n.Driver},{"../apis/driver-1.0.min.json":5,"../lib/api_loader":11,"../lib/core":14,"../lib/node_loader":12,"../lib/service":42}],11:[function(e,t,r){var n=e("./core");n.apiLoader=function(e,t){if(!n.apiLoader.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return n.apiLoader.services[e][t]},n.apiLoader.services={},t.exports=n.apiLoader},{"./core":14}],12:[function(e,t,r){(function(t){var r=e("./util");r.crypto.lib=e("crypto-browserify"),r.Buffer=e("buffer/").Buffer,r.url=e("url/"),r.querystring=e("querystring/");var n=e("./core");e("./api_loader"),n.XML.Parser=e("./xml/browser_parser"),e("./http/xhr"),void 0===t&&(t={browser:!0})}).call(this,e("_process"))},{"./api_loader":11,"./core":14,"./http/xhr":19,"./util":48,"./xml/browser_parser":49,_process:112,"buffer/":53,"crypto-browserify":55,"querystring/":119,"url/":120}],13:[function(e,t,r){var n=e("./core");e("./credentials"),e("./credentials/credential_provider_chain");var i;n.Config=n.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),n.util.each.call(this,this.keys,function(t,r){this.set(t,e[t],r)})},getCredentials:function(e){function t(t){e(t,t?null:i.credentials)}function r(e,t){return new n.util.error(t||new Error,{code:"CredentialsError",message:e})}var i=this;i.credentials?"function"==typeof i.credentials.get?function(){i.credentials.get(function(e){e&&(e=r("Could not load credentials from "+i.credentials.constructor.name,e)),t(e)})}():function(){var e=null;i.credentials.accessKeyId&&i.credentials.secretAccessKey||(e=r("Missing credentials")),t(e)}():i.credentialProvider?i.credentialProvider.resolve(function(e,n){e&&(e=r("Could not load credentials from any providers",e)),i.credentials=n,t(e)}):t(r("No credentials to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),n.util.each.call(this,e,function(e,r){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||n.Service.hasService(e))&&this.set(e,r)})},loadFromPath:function(e){this.clear();var t=JSON.parse(n.util.readFileSync(e)),r=new n.FileSystemCredentials(e),i=new n.CredentialProviderChain;return i.providers.unshift(r),i.resolve(function(e,r){if(e)throw e;t.credentials=r}),this.constructor(t),this},clear:function(){n.util.each.call(this,this.keys,function(e){delete this[e]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,r){void 0===t?(void 0===r&&(r=this.keys[e]),this[e]="function"==typeof r?r.call(this):r):"httpOptions"===e&&this[e]?this[e]=n.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{base:100}},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&(e=n.util.copy(e),e.credentials=new n.Credentials(e)),e},setPromisesDependency:function(e){i=e;var t=[n.Request,n.Credentials,n.CredentialProviderChain];n.util.addPromises(t,e)},getPromisesDependency:function(){return i}}),n.config=new n.Config},{"./core":14,"./credentials":15,"./credentials/credential_provider_chain":16}],14:[function(e,t,r){var n={util:e("./util")};({}).toString(),t.exports=n,n.util.update(n,{VERSION:"1.0.0",Signers:{},Protocol:{Json:e("./protocol/json"),Query:e("./protocol/query"),Rest:e("./protocol/rest"),RestJson:e("./protocol/rest_json"),RestXml:e("./protocol/rest_xml"),JsonRpc:e("./protocol/json_rpc")},XML:{Builder:e("./xml/builder"),Parser:null},JSON:{Builder:e("./json/builder"),Parser:e("./json/parser")},Model:{Api:e("./model/api"),Operation:e("./model/operation"),Shape:e("./model/shape"),Paginator:e("./model/paginator"),ResourceWaiter:e("./model/resource_waiter")},util:e("./util"),apiLoader:function(){throw new Error("No API loader set")}}),e("./service"),e("./credentials"),e("./credentials/credential_provider_chain"),e("./config"),e("./http"),e("./sequential_executor"),e("./event_listeners"),e("./request"),e("./response"),e("./resource_waiter"),e("./signers/request_signer"),e("./param_validator"),n.events=new n.SequentialExecutor},{"./config":13,"./credentials":15,"./credentials/credential_provider_chain":16,"./event_listeners":17,"./http":18,"./json/builder":20,"./json/parser":21,"./model/api":22,"./model/operation":24,"./model/paginator":25,"./model/resource_waiter":26,"./model/shape":27,"./param_validator":28,"./protocol/json":29,"./protocol/json_rpc":30,"./protocol/query":31,"./protocol/rest":32,"./protocol/rest_json":33,"./protocol/rest_xml":34,"./request":38,"./resource_waiter":39,"./response":40,"./sequential_executor":41,"./service":42,"./signers/request_signer":45,"./util":48,"./xml/builder":50}],15:[function(e,t,r){var n=e("./core");n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=n.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||(this.expired||!this.accessKeyId||!this.secretAccessKey)},get:function(e){var t=this;this.needsRefresh()?this.refresh(function(r){r||(t.expired=!1),e&&e(r)}):e&&e()},refresh:function(e){this.expired=!1,e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},{"./core":14}],16:[function(e,t,r){var n=e("../core");n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){this.providers=e||n.CredentialProviderChain.defaultProviders.slice(0)},resolve:function(e){function t(i,o){if(!i&&o||r===n.length)return void e(i,o);var s=n[r++];o="function"==typeof s?s.call():s,o.get?o.get(function(e){t(e,e?null:o)}):t(null,o)}if(0===this.providers.length)return e(new Error("No providers")),this;var r=0,n=this.providers.slice(0);return t(),this}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},{"../core":14}],17:[function(e,t,r){var n=e("./core"),i=e("./sequential_executor");n.EventListeners={Core:{}},n.EventListeners={Core:(new i).addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(e,t){if(!e.service.api.signatureVersion)return t();e.service.config.getCredentials(function(r){r&&(e.response.error=n.util.error(r,{code:"CredentialsError",message:"Missing credentials in config"})),t()})}),e("VALIDATE_REGION","validate",function(e){e.service.config.region||e.service.isGlobalEndpoint||(e.response.error=n.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))}),e("VALIDATE_PARAMETERS","validate",function(e){var t=e.service.api.operations[e.operation].input,r=e.service.config.paramValidation;new n.ParamValidator(r).validate(t,e.params)}),t("COMPUTE_SHA256","afterBuild",function(e,t){if(e.haltHandlersOnError(),!e.service.api.signatureVersion)return t();if(e.service.getSignerClass(e)===n.Signers.V1){var r=e.httpRequest.body||"";n.util.computeSha256(r,function(r,n){r?t(r):(e.httpRequest.headers["X-Hive-Content-Sha256"]=n,t())})}else t()}),e("SET_CONTENT_LENGTH","afterBuild",function(e){if(void 0===e.httpRequest.headers["Content-Length"]){var t=n.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=t}}),e("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),e("RESTART","restart",function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)}),t("SIGN","sign",function(e,t){var r=e.service;if(!r.api.signatureVersion)return t();r.config.getCredentials(function(i,o){if(i)return e.response.error=i,t();try{var s=n.util.date.getDate(),a=r.getSignerClass(e),u=new a(e.httpRequest,r.api.signingName||r.api.endpointPrefix,r.config.signatureCache);u.setServiceClientId(r._clientId),delete e.httpRequest.headers.Authorization,delete e.httpRequest.headers.Date,delete e.httpRequest.headers["X-Hive-Date"],u.addAuthorization(o,s),e.signedAt=s}catch(t){e.response.error=t}t()})}),e("VALIDATE_RESPONSE","validateResponse",function(e){this.service.successfulResponse(e,this)?(e.data={},e.error=null):(e.data=null,e.error=n.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),t("SEND","send",function(e,t){function r(r){e.httpResponse.stream=r,r.on("headers",function(t,i){e.request.emit("httpHeaders",[t,i,e]),e.httpResponse.streaming||(2===n.HttpClient.streamsApiVersion?r.on("readable",function(){var t=r.read();null!==t&&e.request.emit("httpData",[t,e])}):r.on("data",function(t){e.request.emit("httpData",[t,e])}))}),r.on("end",function(){e.request.emit("httpDone"),t()})}function i(t){t.on("sendProgress",function(t){e.request.emit("httpUploadProgress",[t,e])}),t.on("receiveProgress",function(t){e.request.emit("httpDownloadProgress",[t,e])})}function o(r){e.error=n.util.error(r,{code:"NetworkingError",region:e.request.httpRequest.region,hostname:e.request.httpRequest.endpoint.hostname,retryable:!0}),e.request.emit("httpError",[e.error,e],function(){t()})}function s(){var t=n.HttpClient.getInstance(),s=e.request.service.config.httpOptions||{};try{i(t.handleRequest(e.request.httpRequest,s,r,o))}catch(e){o(e)}}e.httpResponse._abortCallback=t,e.error=null,e.data=null,(n.util.date.getDate()-this.signedAt)/1e3>=600?this.emit("sign",[this],function(e){e?t(e):s()}):s()}),e("HTTP_HEADERS","httpHeaders",function(e,t,r){r.httpResponse.statusCode=e,r.httpResponse.headers=t,r.httpResponse.body=new n.util.Buffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var i=t.date||t.Date;if(i){var o=Date.parse(i);r.request.service.config.correctClockSkew&&n.util.isClockSkewed(o)&&n.util.applyClockOffset(o)}}),e("HTTP_DATA","httpData",function(e,t){if(e){if(n.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],i={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[i,t])}t.httpResponse.buffers.push(new n.util.Buffer(e))}}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=n.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers}),e("FINALIZE_ERROR","retry",function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))}),e("INVALIDATE_CREDENTIALS","retry",function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}}),e("EXPIRED_SIGNATURE","retry",function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)}),e("CLOCK_SKEWED","retry",function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&n.config.isClockSkewed&&(e.error.retryable=!0)}),e("REDIRECT","retry",function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)}),e("RETRY_CHECK","retry",function(e){e.error&&(e.error.redirect&&e.redirectCount<e.maxRedirects?e.error.retryDelay=0:e.retryCount<e.maxRetries&&(e.error.retryDelay=this.service.retryDelays(e.retryCount)||0))}),t("RESET_RETRY_STATE","afterRetry",function(e,t){var r,n=!1;e.error&&(r=e.error.retryDelay||0,e.error.retryable&&e.retryCount<e.maxRetries?(e.retryCount++,n=!0):e.error.redirect&&e.redirectCount<e.maxRedirects&&(e.redirectCount++,n=!0)),n?(e.error=null,setTimeout(t,r)):t()})}),CorePost:(new i).addNamedListeners(function(e){e("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",function(e){if("NetworkingError"===e.code&&"ENOTFOUND"===e.errno){var t="Inaccessible host: `"+e.hostname+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=n.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}})}),Logger:(new i).addNamedListeners(function(t){t("LOG_REQUEST","complete",function(t){var r=t.request,i=r.service.config.logger;if(i){var o=function(){var o=n.util.date.getDate().getTime(),s=(o-r.startTime.getTime())/1e3,a=!!i.isTTY,u=t.httpResponse.statusCode,c=e("util").inspect(r.params,!0,null),l="";return a&&(l+=""),l+="[HiveTaxi "+r.service.serviceIdentifier+" "+u,l+=" "+s.toString()+"s "+t.retryCount+" retries]",a&&(l+=""),l+=" "+n.util.string.lowerFirst(r.operation),l+="("+c+")",a&&(l+=""),l}();"function"==typeof i.log?i.log(o):"function"==typeof i.write&&i.write(o+"\n")}})}),Json:(new i).addNamedListeners(function(t){var r=e("./protocol/json");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),JsonRpc:(new i).addNamedListeners(function(t){var r=e("./protocol/json_rpc");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),Rest:(new i).addNamedListeners(function(t){var r=e("./protocol/rest");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),RestJson:(new i).addNamedListeners(function(t){var r=e("./protocol/rest_json");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),RestXml:(new i).addNamedListeners(function(t){var r=e("./protocol/rest_xml");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),Query:(new i).addNamedListeners(function(t){var r=e("./protocol/query");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)})}},{"./core":14,"./protocol/json":29,"./protocol/json_rpc":30,"./protocol/query":31,"./protocol/rest":32,"./protocol/rest_json":33,"./protocol/rest_xml":34,"./sequential_executor":41,util:123}],18:[function(e,t,r){var n=e("./core"),i=n.util.inherit;n.Endpoint=i({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),void 0===e||null===e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return n.util.copy(e);if(!e.match(/^http/)){e=((t&&void 0!==t.sslEnabled?t.sslEnabled:n.config.sslEnabled)?"https":"http")+"://"+e}n.util.update(this,n.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=i({constructor:function(e,t,r,i){e=new n.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this.setUserAgent(r),i&&this.setOrgIdHeader(i)},setUserAgent:function(e){var t=n.util.isBrowser()?"X-Hive-":"",r="";"string"==typeof e&&e&&(r+=" "+e),this.headers[t+"User-Agent"]=n.util.userAgent()+r},setOrgIdHeader:function(e){this.headers["X-Hive-OrgId"]=e},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=n.util.queryStringParse(e),n.util.queryParamsToString(e)):""}}),n.HttpResponse=i({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),n.HttpClient=i({}),n.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},{"./core":14}],19:[function(e,t,r){var n=e("../core"),i=e("events").EventEmitter;e("../http"),n.XHRClient=n.util.inherit({handleRequest:function(e,t,r,o){var s=this,a=e.endpoint,u=new i,c=a.protocol+"//"+a.hostname;80!==a.port&&443!==a.port&&(c+=":"+a.port),c+=e.path;var l=new XMLHttpRequest,p=!1;e.stream=l,l.addEventListener("readystatechange",function(){try{if(0===l.status)return}catch(e){return}if(this.readyState>=this.HEADERS_RECEIVED&&!p){try{l.responseType="arraybuffer"}catch(e){}u.statusCode=l.status,u.headers=s.parseHeaders(l.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers),p=!0}this.readyState===this.DONE&&s.finishRequest(l,u)},!1),l.upload.addEventListener("progress",function(e){u.emit("sendProgress",e)}),l.addEventListener("progress",function(e){u.emit("receiveProgress",e)},!1),l.addEventListener("timeout",function(){
o(n.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),l.addEventListener("error",function(){o(n.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),r(u),l.open(e.method,c,!1!==t.xhrAsync),n.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)}),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.send(e.body)}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;l.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return n.util.arrayEach(e.split(/\r?\n/),function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)}),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var i=e.response;r=new n.util.Buffer(i.byteLength);for(var o=new Uint8Array(i),s=0;s<r.length;++s)r[s]=o[s]}try{r||"string"!=typeof e.responseText||(r=new n.util.Buffer(e.responseText))}catch(e){}r&&t.emit("data",r),t.emit("end")}}),n.HttpClient.prototype=n.XHRClient.prototype,n.HttpClient.streamsApiVersion=1},{"../core":14,"../http":18,events:60}],20:[function(e,t,r){function n(){}function i(e,t){if(t&&void 0!==e&&null!==e)switch(t.type){case"structure":return o(e,t);case"map":return a(e,t);case"list":return s(e,t);default:return u(e,t)}}function o(e,t){var r={};return c.each(e,function(e,n){var o=t.members[e];if(o){if("body"!==o.location)return;var s=o.isLocationName?o.name:e,a=i(n,o);void 0!==a&&(r[s]=a)}}),r}function s(e,t){var r=[];return c.arrayEach(e,function(e){var n=i(e,t.member);void 0!==n&&r.push(n)}),r}function a(e,t){var r={};return c.each(e,function(e,n){var o=i(n,t.value);void 0!==o&&(r[e]=o)}),r}function u(e,t){return t.toWireFormat(e)}var c=e("../util");n.prototype.build=function(e,t){return JSON.stringify(i(e,t))},t.exports=n},{"../util":48}],21:[function(e,t,r){function n(){}function i(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return o(e,t);case"map":return a(e,t);case"list":return s(e,t);default:return u(e,t)}}function o(e,t){if(null!=e){var r={},n=t.members;return c.each(n,function(t,n){var o=n.isLocationName?n.name:t;if(Object.prototype.hasOwnProperty.call(e,o)){var s=e[o],a=i(s,n);void 0!==a&&(r[t]=a)}}),r}}function s(e,t){if(null!=e){var r=[];return c.arrayEach(e,function(e){var n=i(e,t.member);void 0===n?r.push(null):r.push(n)}),r}}function a(e,t){if(null!=e){var r={};return c.each(e,function(e,n){var o=i(n,t.value);r[e]=void 0===o?null:o}),r}}function u(e,t){return t.toType(e)}var c=e("../util");n.prototype.parse=function(e,t){return i(JSON.parse(e),t)},t.exports=n},{"../util":48}],22:[function(e,t,r){function n(e,t){e=e||{},t=t||{},t.api=this,e.metadata=e.metadata||{},l(this,"isApi",!0,!1),l(this,"apiVersion",e.metadata.apiVersion),l(this,"endpointPrefix",e.metadata.endpointPrefix),l(this,"signingName",e.metadata.signingName),l(this,"globalEndpoint",e.metadata.globalEndpoint),l(this,"signatureVersion",e.metadata.signatureVersion),l(this,"jsonVersion",e.metadata.jsonVersion),l(this,"targetPrefix",e.metadata.targetPrefix),l(this,"protocol",e.metadata.protocol),l(this,"timestampFormat",e.metadata.timestampFormat),l(this,"xmlNamespaceUri",e.metadata.xmlNamespace),l(this,"abbreviation",e.metadata.serviceAbbreviation),l(this,"fullName",e.metadata.serviceFullName),p(this,"className",function(){var t=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return t?t=t.replace(/^HiveTaxi\s*|\(.*|\s+|\W+/g,""):null}),l(this,"operations",new i(e.operations,t,function(e,r){return new o(e,r,t)},c.string.lowerFirst)),l(this,"shapes",new i(e.shapes,t,function(e,r){return s.create(r,t)})),l(this,"paginators",new i(e.paginators,t,function(e,r){return new a(e,r,t)})),l(this,"waiters",new i(e.waiters,t,function(e,r){return new u(e,r,t)},c.string.lowerFirst)),t.documentation&&(l(this,"documentation",e.documentation),l(this,"documentationUrl",e.documentationUrl))}var i=e("./collection"),o=e("./operation"),s=e("./shape"),a=e("./paginator"),u=e("./resource_waiter"),c=e("../util"),l=c.property,p=c.memoizedProperty;t.exports=n},{"../util":48,"./collection":23,"./operation":24,"./paginator":25,"./resource_waiter":26,"./shape":27}],23:[function(e,t,r){function n(e,t,r,n){o(this,n(e),function(){return r(e,t)})}function i(e,t,r,i){i=i||String;var o=this;for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&n.call(o,s,e[s],r,i)}var o=e("../util").memoizedProperty;t.exports=i},{"../util":48}],24:[function(e,t,r){function n(e,t,r){r=r||{},s(this,"name",t.name||e),s(this,"api",r.api,!1),t.http=t.http||{},s(this,"httpMethod",t.http.method||"POST"),s(this,"httpPath",t.http.requestUri||"/"),s(this,"authtype",t.authtype||""),s(this,"httpTarget",t.http.target||""),a(this,"input",function(){return t.input?i.create(t.input,r):new i.create({type:"structure"},r)}),a(this,"output",function(){return t.output?i.create(t.output,r):new i.create({type:"structure"},r)}),a(this,"errors",function(){var e=[];if(!t.errors)return null;for(var n=0;n<t.errors.length;n++)e.push(i.create(t.errors[n],r));return e}),a(this,"paginator",function(){return r.api.paginators[e]}),r.documentation&&(s(this,"documentation",t.documentation),s(this,"documentationUrl",t.documentationUrl))}var i=e("./shape"),o=e("../util"),s=o.property,a=o.memoizedProperty;t.exports=n},{"../util":48,"./shape":27}],25:[function(e,t,r){function n(e,t){i(this,"inputToken",t.input_token),i(this,"limitKey",t.limit_key),i(this,"moreResults",t.more_results),i(this,"outputToken",t.output_token),i(this,"resultKey",t.result_key)}var i=e("../util").property;t.exports=n},{"../util":48}],26:[function(e,t,r){function n(e,t,r){r=r||{},o(this,"name",e),o(this,"api",r.api,!1),t.operation&&o(this,"operation",i.string.lowerFirst(t.operation));var n=this;["type","description","delay","maxAttempts","acceptors"].forEach(function(e){var r=t[e];r&&o(n,e,r)})}var i=e("../util"),o=i.property;t.exports=n},{"../util":48}],27:[function(e,t,r){function n(e,t,r){null!==r&&void 0!==r&&v.property.apply(this,arguments)}function i(e,t){e.constructor.prototype[t]||v.memoizedProperty.apply(this,arguments)}function o(e,t,r){t=t||{},n(this,"shape",e.shape),n(this,"api",t.api,!1),n(this,"type",e.type),n(this,"enum",e.enum),n(this,"min",e.min),n(this,"max",e.max),n(this,"pattern",e.pattern),n(this,"location",e.location||this.location||"body"),n(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),n(this,"isStreaming",e.streaming||this.isStreaming||!1),n(this,"isComposite",e.isComposite||!1),n(this,"isShape",!0,!1),n(this,"isQueryName",!!e.queryName,!1),n(this,"isLocationName",!!e.locationName,!1),t.documentation&&(n(this,"documentation",e.documentation),n(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&n(this,"isXmlAttribute",e.xmlAttribute||!1),n(this,"defaultValue",null),this.toWireFormat=function(e){return null===e||void 0===e?"":e},this.toType=function(e){return e}}function s(e){o.apply(this,arguments),n(this,"isComposite",!0),e.flattened&&n(this,"flattened",e.flattened||!1)}function a(e,t){var r=null,a=!this.isShape;s.apply(this,arguments),a&&(n(this,"defaultValue",function(){return{}}),n(this,"members",{}),n(this,"memberNames",[]),n(this,"required",[]),n(this,"isRequired",function(){return!1})),e.members&&(n(this,"members",new g(e.members,t,function(e,r){return o.create(r,t,e)})),i(this,"memberNames",function(){return e.xmlOrder||Object.keys(e.members)})),e.required&&(n(this,"required",e.required),n(this,"isRequired",function(t){if(!r){r={};for(var n=0;n<e.required.length;n++)r[e.required[n]]=!0}return r[t]},!1,!0)),n(this,"resultWrapper",e.resultWrapper||null),e.payload&&n(this,"payload",e.payload),"string"==typeof e.xmlNamespace?n(this,"xmlNamespaceUri",e.xmlNamespace):"object"==typeof e.xmlNamespace&&(n(this,"xmlNamespacePrefix",e.xmlNamespace.prefix),n(this,"xmlNamespaceUri",e.xmlNamespace.uri))}function u(e,t){var r=this,a=!this.isShape;if(s.apply(this,arguments),a&&n(this,"defaultValue",function(){return[]}),e.member&&i(this,"member",function(){return o.create(e.member,t)}),this.flattened){var u=this.name;i(this,"name",function(){return r.member.name||u})}}function c(e,t){var r=!this.isShape;s.apply(this,arguments),r&&(n(this,"defaultValue",function(){return{}}),n(this,"key",o.create({type:"string"},t)),n(this,"value",o.create({type:"string"},t))),e.key&&i(this,"key",function(){return o.create(e.key,t)}),e.value&&i(this,"value",function(){return o.create(e.value,t)})}function l(e){var t=this;if(o.apply(this,arguments),"header"===this.location)n(this,"timestampFormat","rfc822");else if(e.timestampFormat)n(this,"timestampFormat",e.timestampFormat);else if(this.api)if(this.api.timestampFormat)n(this,"timestampFormat",this.api.timestampFormat);else switch(this.api.protocol){case"json":case"rest-json":n(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":n(this,"timestampFormat","iso8601")}this.toType=function(e){return null===e||void 0===e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?v.date.parseTimestamp(e):null},this.toWireFormat=function(e){return v.date.format(e,t.timestampFormat)}}function p(){if(o.apply(this,arguments),this.api)switch(this.api.protocol){case"rest-xml":case"query":this.toType=function(e){return e||""}}}function h(){o.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseFloat(e)},this.toWireFormat=this.toType}function f(){o.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseInt(e,10)},this.toWireFormat=this.toType}function d(){o.apply(this,arguments),this.toType=v.base64.decode,this.toWireFormat=v.base64.encode}function y(){d.apply(this,arguments)}function m(){o.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null===e||void 0===e?null:"true"===e}}var g=e("./collection"),v=e("../util");o.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},o.types={structure:a,list:u,map:c,boolean:m,timestamp:l,float:h,integer:f,string:p,base64:y,binary:d},o.resolve=function(e,t){if(e.shape){var r=t.api.shapes[e.shape];if(!r)throw new Error("Cannot find shape reference: "+e.shape);return r}return null},o.create=function(e,t,r){if(e.isShape)return e;var n=o.resolve(e,t);if(n){var i=Object.keys(e);if(t.documentation||(i=i.filter(function(e){return!e.match(/documentation/)})),i===["shape"])return n;var s=function(){n.constructor.call(this,e,t,r)};return s.prototype=n,new s}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var a=e.type;if(o.normalizedTypes[e.type]&&(e.type=o.normalizedTypes[e.type]),o.types[e.type])return new o.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+a)},o.shapes={StructureShape:a,ListShape:u,MapShape:c,StringShape:p,BooleanShape:m,Base64Shape:y},t.exports=o},{"../util":48,"./collection":23}],28:[function(e,t,r){var n=e("./core");n.ParamValidator=n.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,n.util.error(new Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(n.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,r){this.validateType(t,r,["object"],"structure");for(var n,i=0;e.required&&i<e.required.length;i++){n=e.required[i];var o=t[n];void 0!==o&&null!==o||this.fail("MissingRequiredParameter","Missing required key '"+n+"' in "+r)}for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n],a=e.members[n];if(void 0!==a){var u=[r,n].join(".");this.validateMember(a,s,u)}else this.fail("UnexpectedParameter","Unexpected key '"+n+"' found in "+r)}return!0},validateMember:function(e,t,r){switch(e.type){case"structure":return this.validateStructure(e,t,r);case"list":return this.validateList(e,t,r);case"map":return this.validateMap(e,t,r);default:return this.validateScalar(e,t,r)}},validateList:function(e,t,r){if(this.validateType(t,r,[Array])){this.validateRange(e,t.length,r,"list member count");for(var n=0;n<t.length;n++)this.validateMember(e.member,t[n],r+"["+n+"]")}},validateMap:function(e,t,r){if(this.validateType(t,r,["object"],"map")){var n=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(this.validateMember(e.key,i,r+"[key='"+i+"']"),this.validateMember(e.value,t[i],r+"['"+i+"']"),n++);this.validateRange(e,n,r,"map member count")}},validateScalar:function(e,t,r){switch(e.type){case null:case void 0:case"string":return this.validateString(e,t,r);case"base64":case"binary":return this.validatePayload(t,r);case"integer":case"float":return this.validateNumber(e,t,r);case"boolean":return this.validateType(t,r,["boolean"]);case"timestamp":return this.validateType(t,r,[Date,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/,"number"],"Date object, ISO-8601 string, or a UNIX timestamp");default:return this.fail("UnkownType","Unhandled type "+e.type+" for "+r)}},validateString:function(e,t,r){this.validateType(t,r,["string"])&&(this.validateEnum(e,t,r),this.validateRange(e,t.length,r,"string length"),this.validatePattern(e,t,r))},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r))},validateRange:function(e,t,r,n){this.validation.min&&void 0!==e.min&&t<e.min&&this.fail("MinRangeError","Expected "+n+" >= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(e,t,r,i){if(null===e||void 0===e)return!1;for(var o=!1,s=0;s<r.length;s++){if("string"==typeof r[s]){if(typeof e===r[s])return!0}else if(r[s]instanceof RegExp){if((e||"").toString().match(r[s]))return!0}else{if(e instanceof r[s])return!0;if(n.util.isType(e,r[s]))return!0;i||o||(r=r.slice()),r[s]=n.util.typeName(r[s])}o=!0}var a=i;a||(a=r.join(", ").replace(/,([^,]+)$/,", or$1"));var u=a.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+t+" to be a"+u+" "+a),!1},validateNumber:function(e,t,r){if(null!==t&&void 0!==t){if("string"==typeof t){var n=parseFloat(t);n.toString()===t&&(t=n)}this.validateType(t,r,["number"])&&this.validateRange(e,t,r,"numeric value")}},validatePayload:function(e,t){if(null!==e&&void 0!==e&&"string"!=typeof e&&(!e||"number"!=typeof e.byteLength)){if(n.util.isNode()){var r=n.util.stream.Stream;if(n.util.Buffer.isBuffer(e)||e instanceof r)return}var i=["Buffer","Stream","File","Blob","ArrayBuffer","DataView"];if(e)for(var o=0;o<i.length;o++){if(n.util.isType(e,i[o]))return;if(n.util.typeName(e.constructor)===i[o])return}this.fail("InvalidParameterType","Expected "+t+" to be a string, Buffer, Stream, Blob, or typed array object")}}})},{"./core":14}],29:[function(e,t,r){function n(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,i=r.jsonVersion||"1.0",o=r.operations[e.operation].input,s=new a;1===i&&(i="1.0"),t.body=s.build(e.params||{},o),t.headers["Content-Type"]="application/x-hive-json-"+i,t.headers["X-Hive-Target"]=n}function i(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-hive-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),r.body.length>0){var n=JSON.parse(r.body.toString());(n.__type||n.code)&&(t.code=(n.__type||n.code).toString().split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=n.message||n.Message||null}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=s.error(new Error,t)}function o(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation],n=r.output||{},i=new u;e.data=i.parse(t,n)}}var s=e("../util"),a=e("../json/builder"),u=e("../json/parser");t.exports={buildRequest:n,extractError:i,extractData:o}},{"../json/builder":20,"../json/parser":21,"../util":48}],30:[function(e,t,r){function n(e){var t=new l,r=e.service.api.operations[e.operation],n=r.input,i=n,o={},s=e.service.api.targetPrefix+"."+r.name,a={method:r.httpTarget||s,version:e.service.api.apiVersion};if(n.payload){var u=n.members[n.payload];if(void 0===e.params[n.payload])return;"structure"===u.type&&(i=u,o=e.params[n.payload])}else o=e.params;o.hasOwnProperty("requestId")&&o.requestId&&(a.id=o.requestId,delete o.requestId),a.params=JSON.parse(t.build(o,i)),e.httpRequest.body=JSON.stringify(a)}function i(e){e.service.api.operations[e.operation];u.buildRequest(e),e.httpRequest.method="POST",e.httpRequest.headers["Content-Type"]="application/json",n(e)}function o(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-hive-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),r.body.length>0){var n=JSON.parse(r.body.toString());n.error&&(t.code=n.error.code.toString().split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=n.error.message||n.error.Message||null,n.id&&(t.requestId=n.id)}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=a.error(new Error,t)}function s(e){u.extractData(e);var t=JSON.parse(e.httpResponse.body.toString()||"{}");if(!a.isEmpty(t)&&t.hasOwnProperty("error"))return void o(e);var r=e.request,n=r.service.api.operations[r.operation].output||{};if(n.payload){var i=n.members[n.payload],s=e.httpResponse.body;if(i.isStreaming)e.data[n.payload]=s;else if("structure"===i.type||"list"===i.type){var l=new p;e.data[n.payload]=l.parse(s,i)}else e.data[n.payload]=s.toString()}else{var h=e.data;c.extractData(e),a.isEmpty(h)||(e.data=a.merge(h,e.data))}!a.isEmpty(e.data)&&e.data.hasOwnProperty("result")&&(e.data=e.data.result)}var a=e("../util"),u=e("./rest"),c=e("./json"),l=e("../json/builder"),p=e("../json/parser");t.exports={buildRequest:i,extractError:o,extractData:s}},{"../json/builder":20,"../json/parser":21,"../util":48,"./json":29,"./rest":32}],31:[function(e,t,r){function n(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name},(new u).serialize(e.params,t.input,function(e,t){r.params[e]=t}),r.body=a.queryParamsToString(r.params)}function i(e){var t,r=e.httpResponse.body.toString();t=r.match("<UnknownOperationException")?{Code:"UnknownOperation",Message:"Unknown operation "+e.request.operation}:(new s.XML.Parser).parse(r),t.requestId&&!e.requestId&&(e.requestId=t.requestId),t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=a.error(new Error,{code:t.Code,message:t.Message}):e.error=a.error(new Error,{code:e.httpResponse.statusCode,message:null})}function o(e){var t=e.request,r=t.service.api.operations[t.operation],n=r.output||{},i=n;if(i.resultWrapper){var o=c.create({type:"structure"});o.members[i.resultWrapper]=n,o.memberNames=[i.resultWrapper],a.property(n,"name",n.resultWrapper),n=o}var u=new s.XML.Parser;if(n&&n.members&&!n.members._XHIVERequestId){var l=c.create({type:"string"},{api:{protocol:"query"}},"requestId");n.members._XHIVERequestId=l}var p=u.parse(e.httpResponse.body.toString(),n);e.requestId=p._XHIVERequestId||p.requestId,p._XHIVERequestId&&delete p._XHIVERequestId,i.resultWrapper&&p[i.resultWrapper]&&(a.update(p,p[i.resultWrapper]),delete p[i.resultWrapper]),e.data=p}var s=e("../core"),a=e("../util"),u=e("../query/query_param_serializer"),c=e("../model/shape");t.exports={buildRequest:n,extractError:i,extractData:o}},{"../core":14,"../model/shape":27,"../query/query_param_serializer":35,"../util":48}],32:[function(e,t,r){function n(e){e.httpRequest.method=e.service.api.operations[e.operation].httpMethod}function i(e){var t=e.service.api.operations[e.operation],r=t.input,n=[e.httpRequest.endpoint.path,t.httpPath].join("/");n=n.replace(/\/+/g,"/");var i={},o=!1;if(c.each(r.members,function(t,r){var s=e.params[t];if(null!==s&&void 0!==s)if("uri"===r.location){var a=new RegExp("\\{"+r.name+"(\\+)?\\}");n=n.replace(a,function(e,t){return(t?c.uriEscapePath:c.uriEscape)(String(s))})}else"querystring"===r.location&&(o=!0,"list"===r.type?i[r.name]=s.map(function(e){return c.uriEscape(String(e))}):"map"===r.type?c.each(s,function(e,t){Array.isArray(t)?i[e]=t.map(function(e){return c.uriEscape(String(e))}):i[e]=c.uriEscape(String(t))}):i[r.name]=c.uriEscape(String(s)))}),o){n+=n.indexOf("?")>=0?"&":"?";var s=[];c.arrayEach(Object.keys(i).sort(),function(e){Array.isArray(i[e])||(i[e]=[i[e]]);for(var t=0;t<i[e].length;t++)s.push(c.uriEscape(String(e))+"="+i[e][t])}),n+=s.join("&")}e.httpRequest.path=n}function o(e){var t=e.service.api.operations[e.operation];c.each(t.input.members,function(t,r){var n=e.params[t];null!==n&&void 0!==n&&("headers"===r.location&&"map"===r.type?c.each(n,function(t,n){e.httpRequest.headers[r.name+t]=n}):"header"===r.location&&(n=r.toWireFormat(n).toString(),e.httpRequest.headers[r.name]=n))})}function s(e){n(e),i(e),o(e)}function a(){}function u(e){var t=e.request,r={},n=e.httpResponse,i=t.service.api.operations[t.operation],o=i.output,s={};c.each(n.headers,function(e,t){s[e.toLowerCase()]=t}),c.each(o.members,function(e,t){var i=(t.name||e).toLowerCase();if("headers"===t.location&&"map"===t.type){r[e]={};var o=t.isLocationName?t.name:"",a=new RegExp("^"+o+"(.+)","i");c.each(n.headers,function(t,n){var i=t.match(a);null!==i&&(r[e][i[1]]=n)})}else"header"===t.location?void 0!==s[i]&&(r[e]=s[i]):"statusCode"===t.location&&(r[e]=parseInt(n.statusCode,10))}),e.data=r}var c=e("../util");t.exports={buildRequest:s,extractError:a,extractData:u}},{"../util":48}],33:[function(e,t,r){function n(e){var t=new l,r=e.service.api.operations[e.operation].input;if(r.payload){var n={},i=r.members[r.payload];if(void 0===(n=e.params[r.payload]))return;"structure"===i.type?e.httpRequest.body=t.build(n,i):e.httpRequest.body=n}else e.httpRequest.body=t.build(e.params,r)}function i(e){u.buildRequest(e),["GET","HEAD","DELETE"].indexOf(e.httpRequest.method)<0&&n(e)}function o(e){c.extractError(e)}function s(e){u.extractData(e);var t=e.request,r=t.service.api.operations[t.operation].output||{};if(r.payload){var n=r.members[r.payload],i=e.httpResponse.body;if(n.isStreaming)e.data[r.payload]=i;else if("structure"===n.type||"list"===n.type){var o=new p;e.data[r.payload]=o.parse(i,n)}else e.data[r.payload]=i.toString()}else{var s=e.data;c.extractData(e),a.isEmpty(s)||(e.data=a.merge(s,e.data))}}var a=e("../util"),u=e("./rest"),c=e("./json"),l=e("../json/builder"),p=e("../json/parser");t.exports={buildRequest:i,extractError:o,extractData:s}},{"../json/builder":20,"../json/parser":21,"../util":48,"./json":29,"./rest":32}],34:[function(e,t,r){function n(e){var t=e.service.api.operations[e.operation].input,r=new a.XML.Builder,n=e.params,i=t.payload;if(i){var o=t.members[i];if(void 0===(n=n[i]))return;if("structure"===o.type){var s=o.name;e.httpRequest.body=r.toXML(n,o,s,!0)}else e.httpRequest.body=n}else e.httpRequest.body=r.toXML(n,t,t.name||t.shape||u.string.upperFirst(e.operation)+"Request")}function i(e){c.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&n(e)}function o(e){c.extractError(e);var t=(new a.XML.Parser).parse(e.httpResponse.body.toString());t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=u.error(new Error,{code:t.Code,message:t.Message}):e.error=u.error(new Error,{code:e.httpResponse.statusCode,message:null})}function s(e){c.extractData(e);var t,r=e.request,n=e.httpResponse.body,i=r.service.api.operations[r.operation],o=i.output,s=o.payload;if(s){var l=o.members[s];l.isStreaming?e.data[s]=n:"structure"===l.type?(t=new a.XML.Parser,e.data[s]=t.parse(n.toString(),l)):e.data[s]=n.toString()}else if(n.length>0){t=new a.XML.Parser;var p=t.parse(n.toString(),o);u.update(e.data,p)}}var a=e("../core"),u=e("../util"),c=e("./rest");t.exports={buildRequest:i,extractError:o,extractData:s}},{"../core":14,"../util":48,"./rest":32}],35:[function(e,t,r){function n(){}function i(e){return e.isQueryName?e.name:e.isLocationName?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function o(e,t,r,n){c.each(r.members,function(r,o){var s=t[r];if(null!==s&&void 0!==s){var a=i(o);a=e?e+"."+a:a,u(a,s,o,n)}})}function s(e,t,r,n){var i=1;c.each(t,function(t,o){var s=r.flattened?".":".entry.",a=s+i+++".",c=a+(r.key.name||"key"),l=a+(r.value.name||"value");u(e+c,t,r.key,n),u(e+l,o,r.value,n)})}function a(e,t,r,n){var o=r.member||{};if(0===t.length)return void n.call(this,e,null);c.arrayEach(t,function(t,s){var a="."+(s+1);if(r.flattened){if(o.name){var c=e.split(".");c.pop(),c.push(i(o)),e=c.join(".")}}else a=".member"+a;u(e+a,t,o,n)})}function u(e,t,r,n){null!==t&&void 0!==t&&("structure"===r.type?o(e,t,r,n):"list"===r.type?a(e,t,r,n):"map"===r.type?s(e,t,r,n):n(e,r.toWireFormat(t).toString()))}var c=e("../util");n.prototype.serialize=function(e,t,r){o("",e,t,r)},t.exports=n},{"../util":48}],36:[function(e,t,r){t.exports={rules:{"*/*":{endpoint:"{service}-{region}.hivetaxi.com"},"ru/*":"globalRU"},patterns:{globalSSL:{endpoint:"api.hivetaxi.com",globalEndpoint:!0},globalRU:{endpoint:"api.hivetaxi.ru"},dash:{endpoint:"{service}-{region}.hivetaxi.com"}}}},{}],37:[function(e,t,r){function n(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}function i(e){var t=e.config.region,r=n(t),i=e.api.endpointPrefix;return[[t,i],[r,i],[t,"*"],[r,"*"],["*",i],["*","*"]].map(function(e){return e[0]&&e[1]?e.join("/"):null})}function o(e,t){a.each(t,function(t,r){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=r))})}function s(e){for(var t=i(e),r=0;r<t.length;r++){var n=t[r];if(n&&Object.prototype.hasOwnProperty.call(u.rules,n)){var s=u.rules[n];return"string"==typeof s&&(s=u.patterns[s]),e.isGlobalEndpoint=!!s.globalEndpoint,s.signatureVersion||(s.signatureVersion="v1"),void o(e,s)}}}var a=e("./util"),u=e("./region_config.json");t.exports=s},{"./region_config.json":36,"./util":48}],38:[function(e,t,r){(function(t){function r(e){return Object.prototype.hasOwnProperty.call(u,e._asm.currentState)}var n=e("./core"),i=e("./state_machine"),o=n.util.inherit,s=n.util.domain,a=e("jmespath"),u={success:1,error:1,complete:1},c=new i;c.setupStates=function(){var e=function(e,t){var n=this;n._haltHandlersOnError=!1,n.emit(n._asm.currentState,function(e){if(e)if(r(n)){if(!(s&&n.domain instanceof s.Domain))throw e;e.domainEmitter=n,e.domain=n.domain,e.domainThrown=!1,n.domain.emit("error",e)}else n.response.error=e,t(e);else t(n.response.error)})};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)},c.setupStates(),n.Request=o({constructor:function(e,t,r){var o,a=e.endpoint,u=e.config.region,l=e.config.customUserAgent;e._originalConfig&&e._originalConfig.orgId&&(o=e._originalConfig.orgId),e._orgId&&(o=e._orgId),e.isGlobalEndpoint&&(u="global"),this.domain=s&&s.active,this.service=e,this.operation=t,this.params=r||{},this.httpRequest=new n.HttpRequest(a,u,l,o),this.startTime=n.util.date.getDate(),this.response=new n.Response(this),this._asm=new i(c.states,"validate"),this._haltHandlersOnError=!1,n.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(e){return e&&this.on("complete",function(t){e.call(t,t.error,t.data)}),this.runTo(),this.response},build:function(e){return this.runTo("send",e)},runTo:function(e,t){return this._asm.runTo(e,t,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(e){e.error=n.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(e){function t(r){e.call(r,r.error,r.data,function(i){!1!==i&&(r.hasNextPage()?r.nextPage().on("complete",t).send():e.call(r,null,null,n.util.fn.noop))})}e=n.util.fn.makeAsync(e,3),this.on("complete",t).send()},eachItem:function(e){function t(t,i){if(t)return e(t,null);if(null===i)return e(null,null);var o=r.service.paginationConfig(r.operation),s=o.resultKey;Array.isArray(s)&&(s=s[0]);var u=a.search(i,s),c=!0;return n.util.arrayEach(u,function(t){if(!1===(c=e(null,t)))return n.util.abort}),c}var r=this;this.eachPage(t)},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var e=n.util.stream,r=this,i=null;return 2===n.HttpClient.streamsApiVersion?(i=new e.PassThrough,r.send()):(i=new e.Stream,i.readable=!0,i.sent=!1,i.on("newListener",function(e){i.sent||"data"!==e||(i.sent=!0,t.nextTick(function(){r.send()}))})),this.on("httpHeaders",function(t,o,s){if(t<300){r.removeListener("httpData",n.EventListeners.Core.HTTP_DATA),r.removeListener("httpError",n.EventListeners.Core.HTTP_ERROR),r.on("httpError",function(e){s.error=e,s.error.retryable=!1});var a,u=!1;if("HEAD"!==r.httpRequest.method&&(a=parseInt(o["content-length"],10)),void 0!==a&&!isNaN(a)&&a>=0){u=!0;var c=0}var l=function(){u&&c!==a?i.emit("error",n.util.error(new Error("Stream content length mismatch. Received "+c+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===n.HttpClient.streamsApiVersion?i.end():i.emit("end")},p=s.httpResponse.createUnbufferedStream();if(2===n.HttpClient.streamsApiVersion)if(u){var h=new e.PassThrough;h._write=function(t){return t&&t.length&&(c+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},h.on("end",l),p.pipe(h).pipe(i,{end:!1})}else p.pipe(i);else u&&p.on("data",function(e){e&&e.length&&(c+=e.length)}),p.on("data",function(e){i.emit("data",e)}),p.on("end",l);p.on("error",function(e){u=!1,i.emit("error",e)})}}),this.on("error",function(e){i.emit("error",e)}),i},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),n.SequentialExecutor.prototype.emit.call(this,e,t,function(e){e&&(this.response.error=e),r.call(this,e)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new n.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this.removeListener("validate",n.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",n.EventListeners.Core.SIGN),this},toGet:function(){return"query"===this.service.api.protocol&&(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},
buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),n.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return new e(function(e,r){t.on("complete",function(t){t.error?r(t.error):e(t.data)}),t.runTo()})}},n.Request.deletePromisesFromClass=function(){delete this.prototype.promise},n.util.addPromises(n.Request),n.util.mixin(n.Request,n.SequentialExecutor)}).call(this,e("_process"))},{"./core":14,"./state_machine":47,_process:112,jmespath:63}],39:[function(e,t,r){function n(e){var t=e.request._waiter,r=t.config.acceptors,n=!1,i="retry";r.forEach(function(r){if(!n){var o=t.matchers[r.matcher];o&&o(e,r.expected,r.argument)&&(n=!0,i=r.state)}}),!n&&e.error&&(i="failure"),"success"===i?t.setSuccess(e):t.setError(e,"retry"===i)}var i=e("./core"),o=i.util.inherit,s=e("jmespath");i.ResourceWaiter=o({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){var n=s.search(e.data,r);return s.strictDeepEqual(n,t)},pathAll:function(e,t,r){var n=s.search(e.data,r);Array.isArray(n)||(n=[n]);var i=n.length;if(!i)return!1;for(var o=0;o<i;o++)if(!s.strictDeepEqual(n[o],t))return!1;return!0},pathAny:function(e,t,r){var n=s.search(e.data,r);Array.isArray(n)||(n=[n]);for(var i=n.length,o=0;o<i;o++)if(s.strictDeepEqual(n[o],t))return!0;return!1},status:function(e,t){var r=e.httpResponse.statusCode;return"number"==typeof r&&r===t},error:function(e,t){return"string"==typeof t&&e.error?t===e.error.code:t===!!e.error}},listeners:(new i.SequentialExecutor).addNamedListeners(function(e){e("RETRY_CHECK","retry",function(e){var t=e.request._waiter;e.error&&"ResourceNotReady"===e.error.code&&(e.error.retryDelay=1e3*(t.config.delay||0))}),e("CHECK_OUTPUT","extractData",n),e("CHECK_ERROR","extractError",n)}),wait:function(e,t){"function"==typeof e&&(t=e,e=void 0);var r=this.service.makeRequest(this.config.operation,e);return r._waiter=this,r.response.maxRetries=this.config.maxAttempts,r.addListeners(this.listeners),t&&r.send(t),r},setSuccess:function(e){e.error=null,e.data=e.data||{},e.request.removeAllListeners("extractData")},setError:function(e,t){e.data=null,e.error=i.util.error(e.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:t})},loadWaiterConfig:function(e){if(!this.service.api.waiters[e])throw new i.util.error(new Error,{code:"StateNotFoundError",message:"State "+e+" not found."});this.config=this.service.api.waiters[e]}})},{"./core":14,jmespath:63}],40:[function(e,t,r){var n=e("./core"),i=n.util.inherit,o=e("jmespath");n.Response=i({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new n.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,i=this.request.operation;try{t=r.paginationConfig(i,!0)}catch(e){this.error=e}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var o=n.util.copy(this.request.params);if(this.nextPageTokens){var s=t.inputToken;"string"==typeof s&&(s=[s]);for(var a=0;a<s.length;a++)o[s[a]]=this.nextPageTokens[a];return r.makeRequest(this.request.operation,o,e)}return e?e(null,null):null},hasNextPage:function(){return this.cacheNextPageTokens(),!!this.nextPageTokens||void 0===this.nextPageTokens&&void 0},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var e=this.request.service.paginationConfig(this.request.operation);if(!e)return this.nextPageTokens;if(this.nextPageTokens=null,e.moreResults&&!o.search(this.data,e.moreResults))return this.nextPageTokens;var t=e.outputToken;return"string"==typeof t&&(t=[t]),n.util.arrayEach.call(this,t,function(e){var t=o.search(this.data,e);t&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(t))}),this.nextPageTokens}})},{"./core":14,jmespath:63}],41:[function(e,t,r){var n=e("./core");n.SequentialExecutor=n.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t){return this._events[e]?this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t){return t._isAsync=!0,this.on(e,t)},removeListener:function(e,t){var r=this._events[e];if(r){for(var n=r.length,i=-1,o=0;o<n;++o)r[o]===t&&(i=o);i>-1&&r.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),i=n.length;return this.callListeners(n,t,r),i>0},callListeners:function(e,t,r,i){function o(i){if(i&&(a=n.util.error(a||new Error,i),s._haltHandlersOnError))return r.call(s,a);s.callListeners(e,t,r,a)}for(var s=this,a=i||null;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(s,t.concat([o]));try{u.apply(s,t)}catch(e){a=n.util.error(a||new Error,e)}if(a&&s._haltHandlersOnError)return void r.call(s,a)}r.call(s,a)},addListeners:function(e){var t=this;return e._events&&(e=e._events),n.util.each(e,function(e,r){"function"==typeof r&&(r=[r]),n.util.arrayEach(r,function(r){t.on(e,r)})}),t},addNamedListener:function(e,t,r){return this[e]=r,this.addListener(t,r),this},addNamedAsyncListener:function(e,t,r){return r._isAsync=!0,this.addNamedListener(e,t,r)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,t.exports=n.SequentialExecutor},{"./core":14}],42:[function(e,t,r){var n=e("./core"),i=e("./model/api"),o=e("./region_config"),s=n.util.inherit,a=0;n.Service=s({constructor:function(e){if(!this.loadServiceClass)throw n.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});if(t){var r=n.util.copy(e),i=new t(e);return Object.defineProperty(i,"_originalConfig",{get:function(){return r},enumerable:!1,configurable:!0}),i._clientId=++a,i}this.initialize(e)},initialize:function(e){var t=n.config[this.serviceIdentifier];this.config=new n.Config(n.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||o(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint)},validateService:function(){},loadServiceClass:function(e){var t=e;if(n.util.isEmpty(this.api)){if(t.apiConfig)return n.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){t=new n.Config(n.config),t.update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&n.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e||(e="100"),Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(n.util.versionCompare),r=null,i=t.length-1;i>=0;i--)if("*"!==t[i][t[i].length-1]&&(r=t[i]),n.util.versionCompare(t[i].replace(/[ *]*$/,""),e)<=0)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var i=this.api.operations[e];i&&(t=n.util.copy(t),n.util.each(this.config.params,function(e,r){i.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=r))}))}var o=new n.Request(this,e,t);return this.addAllRequestListeners(o),r&&o.send(r),o},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new n.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[n.events,n.EventListeners.Core,this.serviceInterface(),n.EventListeners.CorePost],r=0;r<t.length;r++)t[r]&&e.addListeners(t[r]);this.config.paramValidation||e.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&e.addListeners(n.EventListeners.Logger),this.setupRequestListeners(e)},setupRequestListeners:function(){},getSignerClass:function(){var e;return e=this.config.signatureVersion?this.config.signatureVersion:this.api.signatureVersion,n.Signers.RequestSigner.getVersion(e)},serviceInterface:function(){switch(this.api.protocol){case"query":return n.EventListeners.Query;case"json":return n.EventListeners.Json;case"rest-json":return n.EventListeners.RestJson;case"rest-xml":return n.EventListeners.RestXml;case"json-rpc":return n.EventListeners.JsonRpc}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e){return n.util.calculateRetryDelay(e,this.config.retryDelayOptions)},retryableError:function(e){return!!this.networkingError(e)||(!!this.expiredCredentialsError(e)||(!!this.throttledError(e)||e.statusCode>=500))},networkingError:function(e){return"NetworkingError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},throttledError:function(e){switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=t.replace(/\{service\}/g,this.api.endpointPrefix),t=t.replace(/\{region\}/g,this.config.region),t=t.replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new n.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var i=new Error;throw n.util.error(i,"No pagination configuration for "+e)}return null}return r}}),n.util.update(n.Service,{defineMethods:function(e){n.util.each(e.prototype.api.operations,function(t){if(!e.prototype[t]){"none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,r){return this.makeUnauthenticatedRequest(t,e,r)}:e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)}}})},defineService:function(e,t,r){n.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var i=s(n.Service,r||{});if("string"==typeof e){n.Service.addVersions(i,t);var o=i.serviceIdentifier||e;i.serviceIdentifier=o}else i.prototype.api=e,n.Service.defineMethods(i);return i},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r<t.length;r++)void 0===e.services[t[r]]&&(e.services[t[r]]=null);e.apiVersions=Object.keys(e.services).sort(n.util.versionCompare)},defineServiceApi:function(e,t,r){function o(e){e.isApi?a.prototype.api=e:a.prototype.api=new i(e)}var a=s(e,{serviceIdentifier:e.serviceIdentifier});if("string"==typeof t){if(r)o(r);else try{o(n.apiLoader(e.serviceIdentifier,t))}catch(r){throw n.util.error(r,{message:"Could not find API configuration "+e.serviceIdentifier+"-"+t})}Object.prototype.hasOwnProperty.call(e.services,t)||(e.apiVersions=e.apiVersions.concat(t).sort(n.util.versionCompare)),e.services[t]=a}else o(t);return n.Service.defineMethods(a),a},hasService:function(e){return Object.prototype.hasOwnProperty.call(n.Service._serviceMap,e)},_serviceMap:{}}),t.exports=n.Service},{"./core":14,"./model/api":22,"./region_config":37}],43:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.BasicAuth=i(n.Signers.RequestSigner,{constructor:function(e,t,r){n.Signers.RequestSigner.call(this,e),this.serviceName=t,this.signatureCache=r},algorithm:"Basic",addAuthorization:function(e){this.request.headers.Authorization=this.authorization(e),delete this.request.headers["User-Agent"],delete this.request.headers["X-Hive-User-Agent"]},credentialString:function(e){return n.util.base64.encode(e.accessKeyId+":"+e.secretAccessKey)},authorization:function(e){var t=[],r=this.credentialString(e);return t.push(this.algorithm+" "+r),t.join(", ")}}),t.exports=n.Signers.BasicAuth},{"../core":14}],44:[function(e,t,r){function n(e){var t=e.httpRequest.headers[a],r=e.service.getSignerClass(e);if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Hive-User-Agent"],r===o.Signers.V1){if(t>604800){throw o.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV1 signing.",retryable:!1})}e.httpRequest.headers[a]=t}else{if(r!==o.Signers.S3)throw o.util.error(new Error,{message:"Presigning only supports SigV1 signing.",code:"UnsupportedSigner",retryable:!1});e.httpRequest.headers[a]=parseInt(o.util.date.unixTimestamp()+t,10).toString()}}function i(e){var t=e.httpRequest.endpoint,r=o.util.urlParse(e.httpRequest.path),n={};r.search&&(n=o.util.queryStringParse(r.search.substr(1))),o.util.each(e.httpRequest.headers,function(e,t){e===a&&(e="Expires"),0===e.indexOf("x-hive-meta-")&&(delete n[e],e=e.toLowerCase()),n[e]=t}),delete e.httpRequest.headers[a];var i=n.Authorization.split(" ");if("HIVE"===i[0])i=i[1].split(":"),n.AccessKeyId=i[0],n.Signature=i[1];else if("HIVE-HMAC-SHA256"===i[0]){i.shift();var s=i.join(" "),u=s.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];n["X-Hive-Signature"]=u,delete n.Expires}delete n.Authorization,delete n.Host,t.pathname=r.pathname,t.search=o.util.queryParamsToString(n)}var o=e("../core"),s=o.util.inherit,a="presigned-expires";o.Signers.Presign=s({sign:function(e,t,r){if(e.httpRequest.headers[a]=t||3600,e.on("build",n),e.on("sign",i),e.removeListener("afterBuild",o.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",o.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return o.util.urlFormat(e.httpRequest.endpoint)}e.build(function(){this.response.error?r(this.response.error):r(null,o.util.urlFormat(e.httpRequest.endpoint))})}}),t.exports=o.Signers.Presign},{"../core":14}],45:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.RequestSigner=i({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),n.Signers.RequestSigner.getVersion=function(e){switch(e){case"v1":return n.Signers.V1;case"basic_auth":return n.Signers.BasicAuth}throw new Error("Unknown signing version "+e)},e("./basic_auth"),e("./v1"),e("./presign")},{"../core":14,"./basic_auth":43,"./presign":44,"./v1":46}],46:[function(e,t,r){var n=e("../core"),i=n.util.inherit,o={},s=[];n.Signers.V1=i(n.Signers.RequestSigner,{constructor:function(e,t,r){n.Signers.RequestSigner.call(this,e),this.serviceName=t,this.signatureCache=r},algorithm:"hmac",addAuthorization:function(e,t,r){var i=n.util.date.rfc822(t);this.nonce=r,this.addHeaders(e,i),this.request.headers.Authentication=this.authorization(e,i)},addHeaders:function(e,t){this.request.headers["X-Hive-Date"]=t,delete this.request.headers["X-Hive-Content-Sha256"],delete this.request.headers["User-Agent"],delete this.request.headers["X-Hive-User-Agent"],e.sessionToken&&(this.request.headers["x-hive-security-token"]=e.sessionToken)},authorization:function(e,t){var r=[],n=this.nonce||(new Date).valueOf(),i=this.signature(e,t,n);return r.push(this.algorithm+" "+e.accessKeyId+":"+n+":"+i),r.join()},signature:function(e,t,r){var i=null;r=r||this.nonce;var a=this.serviceName+(this.getServiceClientId()?"_"+this.getServiceClientId():"");this.signatureCache&&((i=o[a])||(s.push(a),s.length>50&&delete o[s.shift()]));var u=n.util.date.from(t).toDateString();if(!i||i.akid!==e.accessKeyId||i.region!==this.request.region||i.date!==u){var c=this.secretAccessKey(e);if(!this.signatureCache)return n.util.crypto.hmac(new n.util.Buffer(c||"","binary"),this.stringToSign(t,r),"base64");o[a]={region:this.request.region,date:u,key:c,akid:e.accessKeyId}}var l=o[a].key;return n.util.crypto.hmac(new n.util.Buffer(l||"","binary"),this.stringToSign(t,r),"base64")},secretAccessKey:function(e){if(!e.secretAccessKey.match(/^\w+?:\/\//))return n.util.crypto.sha256(e.secretAccessKey);var t=e.secretAccessKey.split("://",2),r=t[0],i=t[1];switch(r.toLowerCase()){case"sha256":return i;case"b64":case"base64":return n.util.base64.decode(i);case"text":case"plain":case"plain-text":return n.util.crypto.sha256(e.secretAccessKey);default:return""}},stringToSign:function(e,t){var r=[];return r.push(this.request.method),r.push(this.request.pathname()),r.push(e),r.push(t),r.join("")},canonicalString:function(){var e=[],t=this.request.pathname();return t=n.util.uriEscapePath(t),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.join("\n")},canonicalHeaders:function(){var e=[];n.util.each.call(this,this.request.headers,function(t,r){e.push([t,r])}),e.sort(function(e,t){return e[0].toLowerCase()<t[0].toLowerCase()?-1:1});var t=[];return n.util.arrayEach.call(this,e,function(e){var r=e[0].toLowerCase();this.isSignableHeader(r)&&t.push(r+":"+this.canonicalHeaderValues(e[1].toString()))}),t.join("\n")},canonicalHeaderValues:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var e=[];return n.util.each.call(this,this.request.headers,function(t){t=t.toLowerCase(),this.isSignableHeader(t)&&e.push(t)}),e.sort().join(";")},unsignableHeaders:["authentication","content-type","content-length","user-agent","expect"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-hive-")||this.unsignableHeaders.indexOf(e)<0}}),t.exports=n.Signers.V1},{"../core":14}],47:[function(e,t,r){function n(e,t){this.currentState=t||null,this.states=e||{}}n.prototype.runTo=function(e,t,r,n){"function"==typeof e&&(n=r,r=t,t=e,e=null);var i=this,o=i.states[i.currentState];o.fn.call(r||i,n,function(n){if(n){if(!o.fail)return t?t.call(r,n):null;i.currentState=o.fail}else{if(!o.accept)return t?t.call(r):null;i.currentState=o.accept}if(i.currentState===e)return t?t.call(r,n):null;i.runTo(e,t,r,n)})},n.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},t.exports=n},{}],48:[function(e,t,r){(function(r){var n,i={engine:function(){return i.isBrowser()&&"undefined"!=typeof navigator?navigator.userAgent:r.platform+"/"+r.version},userAgent:function(){var t=i.isBrowser()?"js":"nodejs",r="hivetaxi-sdk-"+t+"/"+e("./core").VERSION;return"nodejs"===t&&(r+=" "+i.engine()),r},isBrowser:function(){return r&&r.browser},isNode:function(){return!i.isBrowser()},uriEscape:function(e){var t=encodeURIComponent(e);return t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape),t=t.replace(/[*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uriEscapePath:function(e){var t=[];return i.arrayEach(e.split("/"),function(e){t.push(i.uriEscape(e))}),t.join("/")},urlParse:function(e){return i.url.parse(e)},urlFormat:function(e){return i.url.format(e)},queryStringParse:function(e){return i.querystring.parse(e)},queryParamsToString:function(e){var t=[],r=i.uriEscape,n=Object.keys(e).sort();return i.arrayEach(n,function(n){var o=e[n],s=r(n),a=s+"=";if(Array.isArray(o)){var u=[];i.arrayEach(o,function(e){u.push(r(e))}),a=s+"="+u.sort().join("&"+s+"=")}else void 0!==o&&null!==o&&(a=s+"="+r(o));t.push(a)}),t.join("&")},readFileSync:function(t){return i.isBrowser()?null:e("fs").readFileSync(t,"utf-8")},versionCompare:function(e,t,r){function n(e){return(i?/^\d+[A-Za-z]*$/:/^\d+$/).test(e)}var i=r&&r.lexicographical,o=r&&r.zeroExtend,s=e.split("."),a=t.split(".");if(!s.every(n)||!a.every(n))return NaN;if(o){for(;s.length<a.length;)s.push("0");for(;a.length<s.length;)a.push("0")}i||(s=s.map(Number),a=a.map(Number));for(var u=0;u<s.length;++u){if(a.length==u)return 1;if(s[u]!=a[u])return s[u]>a[u]?1:-1}return s.length!=a.length?-1:0},base64:{encode:function(e){return new i.Buffer(e).toString("base64")},decode:function(e){return new i.Buffer(e,"base64")}},buffer:{toStream:function(e){i.Buffer.isBuffer(e)||(e=new i.Buffer(e));var t=new i.stream.Readable,r=0;return t._read=function(n){if(r>=e.length)return t.push(null);var i=r+n;i>e.length&&(i=e.length),t.push(e.slice(r,i)),r=i},t},concat:function(e){var t,r=0,n=0,o=null;for(t=0;t<e.length;t++)r+=e[t].length;for(o=new i.Buffer(r),t=0;t<e.length;t++)e[t].copy(o,n),n+=e[t].length;return o}},string:{byteLength:function(t){if(null===t||void 0===t)return 0;if("string"==typeof t&&(t=new i.Buffer(t)),"number"==typeof t.byteLength)return t.byteLength;if("number"==typeof t.length)return t.length;if("number"==typeof t.size)return t.size;if("string"==typeof t.path)return e("fs").lstatSync(t.path).size;throw i.error(new Error("Cannot determine length of "+t),{object:t})},upperFirst:function(e){return e[0].toUpperCase()+e.substr(1)},lowerFirst:function(e){return e[0].toLowerCase()+e.substr(1)}},ini:{parse:function(e){var t,r={};return i.arrayEach(e.split(/\r?\n/),function(e){e=e.split(/(^|\s)[;#]/)[0];var n=e.match(/^\s*\[([^\[\]]+)\]\s*$/);if(n)t=n[1];else if(t){var i=e.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);i&&(r[t]=r[t]||{},r[t][i[1]]=i[2])}}),r}},fn:{noop:function(){},makeAsync:function(e,t){return t&&t<=e.length?e:function(){var t=Array.prototype.slice.call(arguments,0);t.pop()(e.apply(null,t))}}},date:{getDate:function(){return n||(n=e("./core")),n.config.systemClockOffset?new Date((new Date).getTime()+n.config.systemClockOffset):new Date},iso8601:function(e){return void 0===e&&(e=i.date.getDate()),e.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(e){return void 0===e&&(e=i.date.getDate()),e.toUTCString()},rfc822tz:function(e){function t(e,t){if(e=""+e,e.length>=t)return e;var r=new Array(t-e.length||0);return r.push(e),r.join("0")}var r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return void 0===e&&(e=i.date.getDate()),n[e.getDay()]+", "+t(e.getDate(),1)+" "+r[e.getMonth()]+" "+e.getFullYear()+" "+t(e.getHours(),2)+":"+t(e.getMinutes(),2)+":"+t(e.getSeconds(),2)+" "+function(e){var r=e>0?"-":"+",n=Math.abs(Math.floor(e/60)),i=Math.abs(e%60);return r+t(n,2)+t(i,2)}(e.getTimezoneOffset())},unixTimestamp:function(e){return void 0===e&&(e=i.date.getDate()),e.getTime()/1e3},from:function(e){return"number"==typeof e?new Date(1e3*e):new Date(e)},format:function(e,t){return t||(t="iso8601"),i.date[t](i.date.from(e))},parseTimestamp:function(e){if("number"==typeof e)return new Date(1e3*e);if(e.match(/^\d+$/))return new Date(1e3*e);if(e.match(/^\d{4}/))return new Date(e);if(e.match(/^\w{3},/))return new Date(e);throw i.error(new Error("unhandled timestamp format: "+e),{code:"TimestampParserError"})}},crypto:{crc32Table:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],crc32:function(e){var t=i.crypto.crc32Table,r=-1;"string"==typeof e&&(e=new i.Buffer(e));for(var n=0;n<e.length;n++){r=r>>>8^t[255&(r^e.readUInt8(n))]}return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=new i.Buffer(t)),i.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return i.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return i.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var o=i.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=new i.Buffer(t));var s=i.arraySliceFn(t),a=i.Buffer.isBuffer(t);if(i.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",function(e){o.update(e)}),t.on("error",function(e){n(e)}),t.on("end",function(){n(null,o.digest(r))});else{if(!n||!s||a||"undefined"==typeof FileReader){i.isBrowser()&&"object"==typeof t&&!a&&(t=new i.Buffer(new Uint8Array(t)));var u=o.update(t).digest(r);return n&&n(null,u),u}var c=0,l=new FileReader;l.onerror=function(){n(new Error("Failed to read data."))},l.onload=function(){var e=new i.Buffer(new Uint8Array(l.result));o.update(e),c+=e.length,l._continueReading()},l._continueReading=function(){if(c>=t.size)return void n(null,o.digest(r));var e=c+524288;e>t.size&&(e=t.size),l.readAsArrayBuffer(s.call(t,c,e))},l._continueReading()}},toHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push(("0"+e.charCodeAt(r).toString(16)).substr(-2,2));return t.join("")},createHash:function(e){return i.crypto.lib.createHash(e)}},abort:{},each:function(e,t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=t.call(this,r,e[r]);if(n===i.abort)break}},arrayEach:function(e,t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=t.call(this,e[r],parseInt(r,10));if(n===i.abort)break}},update:function(e,t){return i.each(t,function(t,r){e[t]=r}),e},merge:function(e,t){return i.update(i.copy(e),t)},copy:function(e){if(null===e||void 0===e)return e;var t={};for(var r in e)t[r]=e[r];return t},isEmpty:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},arraySliceFn:function(e){var t=e.slice||e.webkitSlice||e.mozSlice;return"function"==typeof t?t:null},isType:function(e,t){return"function"==typeof t&&(t=i.typeName(t)),Object.prototype.toString.call(e)==="[object "+t+"]"},typeName:function(e){if(Object.prototype.hasOwnProperty.call(e,"name"))return e.name;var t=e.toString(),r=t.match(/^\s*function (.+)\(/);return r?r[1]:t},error:function(e,t){var r=null;return"string"==typeof e.message&&""!==e.message&&("string"==typeof t||t&&t.message)&&(r=i.copy(e),r.message=e.message),e.message=e.message||null,"string"==typeof t?e.message=t:"object"==typeof t&&null!==t&&(i.update(e,t),t.message&&(e.message=t.message),(t.code||t.name)&&(e.code=t.code||t.name),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.time=new Date,r&&(e.originalError=r),e},inherit:function(e,t){var r=null;if(void 0===t)t=e,e=Object,r={};else{var n=function(){};n.prototype=e.prototype,r=new n}return t.constructor===Object&&(t.constructor=function(){if(e!==Object)return e.apply(this,arguments)}),t.constructor.prototype=r,i.update(t.constructor.prototype,t),t.constructor.__super__=e,t.constructor},mixin:function(){for(var e=arguments[0],t=1;t<arguments.length;t++)for(var r in arguments[t].prototype){var n=arguments[t].prototype[r];"constructor"!==r&&(e.prototype[r]=n)}return e},hideProperties:function(e,t){"function"==typeof Object.defineProperty&&i.arrayEach(t,function(t){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0})})},property:function(e,t,r,n,i){var o={configurable:!0,enumerable:void 0===n||n};"function"!=typeof r||i?(o.value=r,o.writable=!0):o.get=r,Object.defineProperty(e,t,o)},memoizedProperty:function(e,t,r,n){var o=null;i.property(e,t,function(){return null===o&&(o=r()),o},n)},computeSha256:function(t,r){if(i.isNode()){var n=i.stream.Stream,o=e("fs");if(t instanceof n){if("string"!=typeof t.path)return r(new Error("Non-file stream objects are not supported with SigV1"));var s={};"number"==typeof t.start&&(s.start=t.start),"number"==typeof t.end&&(s.end=t.end),t=o.createReadStream(t.path,s)}}i.crypto.sha256(t,"hex",function(e,t){e?r(e):r(null,t)})},isClockSkewed:function(e){if(e)return i.property(n.config,"isClockSkewed",Math.abs((new Date).getTime()-e)>=3e5,!1),n.config.isClockSkewed},applyClockOffset:function(e){e&&(n.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-hive-request-id"]||e.httpResponse.headers["x-hive-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){if(void 0===t&&n&&n.config&&(t=n.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t)var r=!0;Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var o=e[i];r?o.deletePromisesFromClass&&o.deletePromisesFromClass():o.addPromisesToClass&&o.addPromisesToClass(t)}},promisifyMethod:function(e,t){return function(){var r=this;return new t(function(t,n){r[e](function(e,r){
e?n(e):t(r)})})}},calculateRetryDelay:function(e,t){t||(t={});var r=t.customBackoff||null;if("function"==typeof r)return r(e);var n=t.base||100;return Math.random()*(Math.pow(2,e)*n)},handleRequestWithRetries:function(e,t,o){t||(t={});var s=n.HttpClient.getInstance(),a=t.httpOptions||{},u=0,c=function(e){var r=t.maxRetries||0;if(e&&"TimeoutError"===e.code&&(e.retryable=!0),e&&e.retryable&&u<r){u++;var n=i.calculateRetryDelay(u,t.retryDelayOptions);setTimeout(l,n+(e.retryAfter||0))}else o(e)},l=function(){var t="";s.handleRequest(e,a,function(e){e.on("data",function(e){t+=e.toString()}),e.on("end",function(){var r=e.statusCode;if(r<300)o(null,t);else{var n=1e3*parseInt(e.headers["retry-after"],10)||0,s=i.error(new Error,{retryable:r>=500||429===r});n&&s.retryable&&(s.retryAfter=n),c(s)}})},c)};r.nextTick(l)}};t.exports=i}).call(this,e("_process"))},{"./core":14,_process:112,fs:52}],49:[function(e,t,r){function n(){}function i(e,t){switch(t||(t={}),t.type){case"structure":return o(e,t);case"map":return s(e,t);case"list":return a(e,t);case void 0:case null:return c(e);default:return u(e,t)}}function o(e,t){var r={};return null===e?r:(l.each(t.members,function(t,n){if(n.isXmlAttribute){if(Object.prototype.hasOwnProperty.call(e.attributes,n.name)){var o=e.attributes[n.name].value;r[t]=i({textContent:o},n)}}else{var s=n.flattened?e:e.getElementsByTagName(n.name)[0];s?r[t]=i(s,n):n.flattened||"list"!==n.type||(r[t]=n.defaultValue)}}),r)}function s(e,t){for(var r={},n=t.key.name||"key",o=t.value.name||"value",s=t.flattened?t.name:"entry",a=e.firstElementChild;a;){if(a.nodeName===s){var u=a.getElementsByTagName(n)[0].textContent,c=a.getElementsByTagName(o)[0];r[u]=i(c,t.value)}a=a.nextElementSibling}return r}function a(e,t){for(var r=[],n=t.flattened?t.name:t.member.name||"member",o=e.firstElementChild;o;)o.nodeName===n&&r.push(i(o,t.member)),o=o.nextElementSibling;return r}function u(e,t){if(e.getAttribute){var r=e.getAttribute("encoding");"base64"===r&&(t=new p.create({type:r}))}var n=e.textContent;return""===n&&(n=null),"function"==typeof t.toType?t.toType(n):n}function c(e){if(void 0===e||null===e)return"";if(!e.firstElementChild)return null===e.parentNode.parentNode?{}:0===e.childNodes.length?"":e.textContent;for(var t={type:"structure",members:{}},r=e.firstElementChild;r;){var n=r.nodeName;Object.prototype.hasOwnProperty.call(t.members,n)?t.members[n].type="list":t.members[n]={name:n},r=r.nextElementSibling}return o(e,t)}var l=e("../util"),p=e("../model/shape");n.prototype.parse=function(e,t){if(""===e.replace(/^\s+/,""))return{};var r,n;try{if(window.DOMParser){try{r=(new DOMParser).parseFromString(e,"text/xml")}catch(e){throw l.error(new Error("Parse error in document"),{originalError:e,code:"XMLParserError",retryable:!0})}if(null===r.documentElement)throw l.error(new Error("Cannot parse empty document."),{code:"XMLParserError",retryable:!0});var o=r.getElementsByTagName("parsererror")[0];if(o&&(o.parentNode===r||"body"===o.parentNode.nodeName||o.parentNode.parentNode===r||"body"===o.parentNode.parentNode.nodeName)){var s=o.getElementsByTagName("div")[0]||o;throw l.error(new Error(s.textContent||"Parser error in document"),{code:"XMLParserError",retryable:!0})}}else{if(!window.ActiveXObject)throw new Error("Cannot load XML parser");if(r=new window.ActiveXObject("Microsoft.XMLDOM"),r.async=!1,!r.loadXML(e))throw l.error(new Error("Parse error in document"),{code:"XMLParserError",retryable:!0})}}catch(e){n=e}if(r&&r.documentElement&&!n){var a=i(r.documentElement,t),u=r.getElementsByTagName("ResponseMetadata")[0];return u&&(a.ResponseMetadata=i(u,{})),a}if(n)throw l.error(n||new Error,{code:"XMLParserError",retryable:!0});return{}},t.exports=n},{"../model/shape":27,"../util":48}],50:[function(e,t,r){function n(){}function i(e,t,r){switch(r.type){case"structure":return o(e,t,r);case"map":return s(e,t,r);case"list":return a(e,t,r);default:return u(e,t,r)}}function o(e,t,r){l.arrayEach(r.memberNames,function(n){var o=r.members[n];if("body"===o.location){var s=t[n],a=o.name;if(void 0!==s&&null!==s)if(o.isXmlAttribute)e.att(a,s);else if(o.flattened)i(e,s,o);else{var u=e.ele(a);c(u,o),i(u,s,o)}}})}function s(e,t,r){var n=r.key.name||"key",o=r.value.name||"value";l.each(t,function(t,s){var a=e.ele(r.flattened?r.name:"entry");i(a.ele(n),t,r.key),i(a.ele(o),s,r.value)})}function a(e,t,r){r.flattened?l.arrayEach(t,function(t){var n=r.member.name||r.name;i(e.ele(n),t,r.member)}):l.arrayEach(t,function(t){var n=r.member.name||"member";i(e.ele(n),t,r.member)})}function u(e,t,r){e.txt(r.toWireFormat(t))}function c(e,t){var r,n="xmlns";t.xmlNamespaceUri?(r=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(n+=":"+t.xmlNamespacePrefix)):e.isRoot&&t.api.xmlNamespaceUri&&(r=t.api.xmlNamespaceUri),r&&e.att(n,r)}var l=e("../util"),p=e("xmlbuilder");n.prototype.toXML=function(e,t,r,n){var o=p.create(r);return c(o,t),i(o,e,t),o.children.length>0||n?o.root().toString():""},t.exports=n},{"../util":48,xmlbuilder:140}],51:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function o(e){var t,r,i,o,s,a=e.length;o=n(e),s=new p(3*a/4-o),r=o>0?a-4:a;var u=0;for(t=0;t<r;t+=4)i=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,s[u++]=255&i):1===o&&(i=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function a(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(s(n));return i.join("")}function u(e){for(var t,r=e.length,n=r%3,i="",o=[],s=0,u=r-n;s<u;s+=16383)o.push(a(e,s,s+16383>u?u:s+16383));return 1===n?(t=e[r-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=u;for(var c=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f<d;++f)c[f]=h[f],l[h.charCodeAt(f)]=f;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],52:[function(e,t,r){},{}],53:[function(e,t,r){(function(t){"use strict";function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=o.prototype):(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,r){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,r)}function s(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?h(e,t,r,n):"string"==typeof t?l(e,t,r):f(e,t)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,r,n){return a(t),t<=0?i(e,t):void 0!==r?"string"==typeof n?i(e,t).fill(r,n):i(e,t).fill(r):i(e,t)}function c(e,t){if(a(t),e=i(e,t<0?0:0|d(t)),!o.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function l(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!o.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|m(t,r);e=i(e,n);var s=e.write(t,r);return s!==n&&(e=e.slice(0,s)),e}function p(e,t){var r=t.length<0?0:0|d(t.length);e=i(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),o.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=o.prototype):e=p(e,t),e}function f(e,t){if(o.isBuffer(t)){var r=0|d(t.length);return e=i(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||W(t.length)?i(e,0):p(e,t);if("Buffer"===t.type&&Q(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),o.alloc(+e)}function m(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return q(this,t,r);case"utf8":case"utf-8":return j(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}var c;if(i){var l=-1;for(c=r;c<a;c++)if(o(e,c)===o(t,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*s}else-1!==l&&(c-=c-l),l=-1}else for(r+u>a&&(r=a-u),c=r;c>=0;c--){for(var p=!0,h=0;h<u;h++)if(o(e,c+h)!==o(t,h)){p=!1;break}if(p)return c}return-1}function E(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function _(e,t,r,n){return Y(V(t,e.length-r),e,r,n)}function x(e,t,r,n){return Y(z(t),e,r,n)}function R(e,t,r,n){return x(e,t,r,n)}function S(e,t,r,n){return Y(G(t),e,r,n)}function A(e,t,r,n){return Y(K(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,r))}function j(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o=e[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,c,l,p;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128==(192&u)&&(p=(31&o)<<6|63&u)>127&&(s=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&o)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(s=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(s=p)}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return C(n)}function C(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Z));return r}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function O(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function q(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=X(e[o]);return i}function L(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function k(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,i){return i||M(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,i){return i||M(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,r,n,52,8),r+8}function F(e){if(e=H(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function H(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function X(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function K(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function G(e){return J.toByteArray(F(e))}function Y(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return e!==e}var J=e("base64-js"),$=e("ieee754"),Q=e("isarray");r.Buffer=o,r.SlowBuffer=y,r.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,r){return s(null,e,t,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,r){return u(null,e,t,r)},o.allocUnsafe=function(e){return c(null,e)},o.allocUnsafeSlow=function(e){return c(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},o.byteLength=m,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?j(this,0,e):g.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,n,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,a=r-t,u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),p=0;p<u;++p)if(c[p]!==l[p]){s=c[p],a=l[p];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return R(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n;if(o.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=o.prototype;else{var i=t-e;n=new o(i,void 0);for(var s=0;s<i;++s)n[s]=this[s+e]}return n},o.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),$.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),$.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),$.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),$.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;i>=0;--i)e[i+t]=this[i+r];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:V(new o(e,n).toString()),u=a.length;for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":51,ieee754:61,isarray:62}],54:[function(e,t,r){function n(e,t){if(e.length%a!=0){var r=e.length+(a-e.length%a);e=s.concat([e,u],r)}for(var n=[],i=t?e.readInt32BE:e.readInt32LE,o=0;o<e.length;o+=a)n.push(i.call(e,o));return n}function i(e,t,r){for(var n=new s(t),i=r?n.writeInt32BE:n.writeInt32LE,o=0;o<e.length;o++)i.call(n,e[o],4*o,!0);return n}function o(e,t,r,o){return s.isBuffer(e)||(e=new s(e)),i(t(n(e,o),e.length*c),r,o)}var s=e("buffer").Buffer,a=4,u=new s(a);u.fill(0);var c=8;t.exports={hash:o}},{buffer:53}],55:[function(e,t,r){function n(e,t,r){s.isBuffer(t)||(t=new s(t)),s.isBuffer(r)||(r=new s(r)),t.length>h?t=e(t):t.length<h&&(t=s.concat([t,f],h));for(var n=new s(h),i=new s(h),o=0;o<h;o++)n[o]=54^t[o],i[o]=92^t[o];var a=e(s.concat([n,r]));return e(s.concat([i,a]))}function i(e,t){e=e||"sha1";var r=p[e],i=[],a=0;return r||o("algorithm:",e,"is not yet supported"),{update:function(e){return s.isBuffer(e)||(e=new s(e)),i.push(e),a+=e.length,this},digest:function(e){var o=s.concat(i),a=t?n(r,t,o):r(o);return i=null,e?a.toString(e):a}}}function o(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}var s=e("buffer").Buffer,a=e("./sha"),u=e("./sha256"),c=e("./rng"),l=e("./md5"),p={sha1:a,sha256:u,md5:l},h=64,f=new s(h);f.fill(0),r.createHash=function(e){return i(e)},r.createHmac=function(e,t){return i(e,t)},r.randomBytes=function(e,t){if(!t||!t.call)return new s(c(e));try{t.call(this,void 0,new s(c(e)))}catch(e){t(e)}},function(e,t){for(var r in e)t(e[r],r)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){r[e]=function(){o("sorry,",e,"is not implemented yet")}})},{"./md5":56,"./rng":57,"./sha":58,"./sha256":59,buffer:53}],56:[function(e,t,r){function n(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,l=271733878,p=0;p<e.length;p+=16){var h=r,f=n,d=i,y=l;r=o(r,n,i,l,e[p+0],7,-680876936),l=o(l,r,n,i,e[p+1],12,-389564586),i=o(i,l,r,n,e[p+2],17,606105819),n=o(n,i,l,r,e[p+3],22,-1044525330),r=o(r,n,i,l,e[p+4],7,-176418897),l=o(l,r,n,i,e[p+5],12,1200080426),i=o(i,l,r,n,e[p+6],17,-1473231341),n=o(n,i,l,r,e[p+7],22,-45705983),r=o(r,n,i,l,e[p+8],7,1770035416),l=o(l,r,n,i,e[p+9],12,-1958414417),i=o(i,l,r,n,e[p+10],17,-42063),n=o(n,i,l,r,e[p+11],22,-1990404162),r=o(r,n,i,l,e[p+12],7,1804603682),l=o(l,r,n,i,e[p+13],12,-40341101),i=o(i,l,r,n,e[p+14],17,-1502002290),n=o(n,i,l,r,e[p+15],22,1236535329),r=s(r,n,i,l,e[p+1],5,-165796510),l=s(l,r,n,i,e[p+6],9,-1069501632),i=s(i,l,r,n,e[p+11],14,643717713),n=s(n,i,l,r,e[p+0],20,-373897302),r=s(r,n,i,l,e[p+5],5,-701558691),l=s(l,r,n,i,e[p+10],9,38016083),i=s(i,l,r,n,e[p+15],14,-660478335),n=s(n,i,l,r,e[p+4],20,-405537848),r=s(r,n,i,l,e[p+9],5,568446438),l=s(l,r,n,i,e[p+14],9,-1019803690),i=s(i,l,r,n,e[p+3],14,-187363961),n=s(n,i,l,r,e[p+8],20,1163531501),r=s(r,n,i,l,e[p+13],5,-1444681467),l=s(l,r,n,i,e[p+2],9,-51403784),i=s(i,l,r,n,e[p+7],14,1735328473),n=s(n,i,l,r,e[p+12],20,-1926607734),r=a(r,n,i,l,e[p+5],4,-378558),l=a(l,r,n,i,e[p+8],11,-2022574463),i=a(i,l,r,n,e[p+11],16,1839030562),n=a(n,i,l,r,e[p+14],23,-35309556),r=a(r,n,i,l,e[p+1],4,-1530992060),l=a(l,r,n,i,e[p+4],11,1272893353),i=a(i,l,r,n,e[p+7],16,-155497632),n=a(n,i,l,r,e[p+10],23,-1094730640),r=a(r,n,i,l,e[p+13],4,681279174),l=a(l,r,n,i,e[p+0],11,-358537222),i=a(i,l,r,n,e[p+3],16,-722521979),n=a(n,i,l,r,e[p+6],23,76029189),r=a(r,n,i,l,e[p+9],4,-640364487),l=a(l,r,n,i,e[p+12],11,-421815835),i=a(i,l,r,n,e[p+15],16,530742520),n=a(n,i,l,r,e[p+2],23,-995338651),r=u(r,n,i,l,e[p+0],6,-198630844),l=u(l,r,n,i,e[p+7],10,1126891415),i=u(i,l,r,n,e[p+14],15,-1416354905),n=u(n,i,l,r,e[p+5],21,-57434055),r=u(r,n,i,l,e[p+12],6,1700485571),l=u(l,r,n,i,e[p+3],10,-1894986606),i=u(i,l,r,n,e[p+10],15,-1051523),n=u(n,i,l,r,e[p+1],21,-2054922799),r=u(r,n,i,l,e[p+8],6,1873313359),l=u(l,r,n,i,e[p+15],10,-30611744),i=u(i,l,r,n,e[p+6],15,-1560198380),n=u(n,i,l,r,e[p+13],21,1309151649),r=u(r,n,i,l,e[p+4],6,-145523070),l=u(l,r,n,i,e[p+11],10,-1120210379),i=u(i,l,r,n,e[p+2],15,718787259),n=u(n,i,l,r,e[p+9],21,-343485551),r=c(r,h),n=c(n,f),i=c(i,d),l=c(l,y)}return Array(r,n,i,l)}function i(e,t,r,n,i,o){return c(l(c(c(t,e),c(n,o)),i),r)}function o(e,t,r,n,o,s,a){return i(t&r|~t&n,e,t,o,s,a)}function s(e,t,r,n,o,s,a){return i(t&n|r&~n,e,t,o,s,a)}function a(e,t,r,n,o,s,a){return i(t^r^n,e,t,o,s,a)}function u(e,t,r,n,o,s,a){return i(r^(t|~n),e,t,o,s,a)}function c(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e,t){return e<<t|e>>>32-t}var p=e("./helpers");t.exports=function(e){return p.hash(e,n,16)}},{"./helpers":54}],57:[function(e,t,r){!function(){var e,r,n=this;e=function(e){for(var t,t,r=new Array(e),n=0;n<e;n++)0==(3&n)&&(t=4294967296*Math.random()),r[n]=t>>>((3&n)<<3)&255;return r},n.crypto&&crypto.getRandomValues&&(r=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=r||e}()},{}],58:[function(e,t,r){function n(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r=Array(80),n=1732584193,u=-271733879,c=-1732584194,l=271733878,p=-1009589776,h=0;h<e.length;h+=16){for(var f=n,d=u,y=c,m=l,g=p,v=0;v<80;v++){r[v]=v<16?e[h+v]:a(r[v-3]^r[v-8]^r[v-14]^r[v-16],1);var b=s(s(a(n,5),i(v,u,c,l)),s(s(p,r[v]),o(v)));p=l,l=c,c=a(u,30),u=n,n=b}n=s(n,f),u=s(u,d),c=s(c,y),l=s(l,m),p=s(p,g)}return Array(n,u,c,l,p)}function i(e,t,r,n){return e<20?t&r|~t&n:e<40?t^r^n:e<60?t&r|t&n|r&n:t^r^n}function o(e){
return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function s(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e,t){return e<<t|e>>>32-t}var u=e("./helpers");t.exports=function(e){return u.hash(e,n,20,!0)}},{"./helpers":54}],59:[function(e,t,r){var n=e("./helpers"),i=function(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},o=function(e,t){return e>>>t|e<<32-t},s=function(e,t){return e>>>t},a=function(e,t,r){return e&t^~e&r},u=function(e,t,r){return e&t^e&r^t&r},c=function(e){return o(e,2)^o(e,13)^o(e,22)},l=function(e){return o(e,6)^o(e,11)^o(e,25)},p=function(e){return o(e,7)^o(e,18)^s(e,3)},h=function(e){return o(e,17)^o(e,19)^s(e,10)},f=function(e,t){var r,n,o,s,f,d,y,m,g,v,b,w,E=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),_=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var g=0;g<e.length;g+=16){r=_[0],n=_[1],o=_[2],s=_[3],f=_[4],d=_[5],y=_[6],m=_[7];for(var v=0;v<64;v++)x[v]=v<16?e[v+g]:i(i(i(h(x[v-2]),x[v-7]),p(x[v-15])),x[v-16]),b=i(i(i(i(m,l(f)),a(f,d,y)),E[v]),x[v]),w=i(c(r),u(r,n,o)),m=y,y=d,d=f,f=i(s,b),s=o,o=n,n=r,r=i(b,w);_[0]=i(r,_[0]),_[1]=i(n,_[1]),_[2]=i(o,_[2]),_[3]=i(s,_[3]),_[4]=i(f,_[4]),_[5]=i(d,_[5]),_[6]=i(y,_[6]),_[7]=i(m,_[7])}return _};t.exports=function(e){return n.hash(e,f,32,!0)}},{"./helpers":54}],60:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,o,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(r=this._events[e],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(s(r))for(o=Array.prototype.slice.call(arguments,1),c=r.slice(),n=c.length,u=0;u<n;u++)c[u].apply(this,o);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,o,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],o=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=o;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],61:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,p=r?i-1:0,h=r?-1:1,f=e[t+p];for(p+=h,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+e[t+p],p+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+p],p+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,p=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+p>=1?h/u:h*Math.pow(2,1-p),t*u>=2&&(s++,u/=2),s+p>=l?(a=0,s=l):s+p>=1?(a=(t*u-1)*Math.pow(2,i),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+f]=255&s,f+=d,s/=256,c-=8);e[r+f-d]|=128*y}},{}],62:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],63:[function(e,t,r){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,i){if(e===i)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(i))return!1;if(!0===t(e)){if(e.length!==i.length)return!1;for(var o=0;o<e.length;o++)if(!1===n(e[o],i[o]))return!1;return!0}if(!0===r(e)){var s={};for(var a in e)if(hasOwnProperty.call(e,a)){if(!1===n(e[a],i[a]))return!1;s[a]=!0}for(var u in i)if(hasOwnProperty.call(i,u)&&!0!==s[u])return!1;return!0}return!1}function i(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(r(e)){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}return!1}function o(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}function s(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e}function a(e){return e>="0"&&e<="9"||"-"===e}function u(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e}function c(){}function l(){}function p(e){this.runtime=e}function h(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[g]}]},avg:{_func:this._functionAvg,_signature:[{types:[x]}]},ceil:{_func:this._functionCeil,_signature:[{types:[g]}]},contains:{_func:this._functionContains,_signature:[{types:[b,w]},{types:[v]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[b]},{types:[b]}]},floor:{_func:this._functionFloor,_signature:[{types:[g]}]},length:{_func:this._functionLength,_signature:[{types:[b,w,E]}]},map:{_func:this._functionMap,_signature:[{types:[_]},{types:[w]}]},max:{_func:this._functionMax,_signature:[{types:[x,R]}]},merge:{_func:this._functionMerge,_signature:[{types:[E],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[w]},{types:[_]}]},sum:{_func:this._functionSum,_signature:[{types:[x]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[b]},{types:[b]}]},min:{_func:this._functionMin,_signature:[{types:[x,R]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[w]},{types:[_]}]},type:{_func:this._functionType,_signature:[{types:[v]}]},keys:{_func:this._functionKeys,_signature:[{types:[E]}]},values:{_func:this._functionValues,_signature:[{types:[E]}]},sort:{_func:this._functionSort,_signature:[{types:[R,x]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[w]},{types:[_]}]},join:{_func:this._functionJoin,_signature:[{types:[b]},{types:[R]}]},reverse:{_func:this._functionReverse,_signature:[{types:[b,w]}]},to_array:{_func:this._functionToArray,_signature:[{types:[v]}]},to_string:{_func:this._functionToString,_signature:[{types:[v]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[v]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[v],variadic:!0}]}}}function f(e){return(new l).parse(e)}function d(e){return(new c).tokenize(e)}function y(e,t){var r=new l,n=new h,i=new p(n);n._interpreter=i;var o=r.parse(t);return i.search(o,e)}var m;m="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var g=0,v=1,b=2,w=3,E=4,_=6,x=8,R=9,S={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},A={"<":!0,">":!0,"=":!0,"!":!0},T={" ":!0,"\t":!0,"\n":!0};c.prototype={tokenize:function(e){var t=[];this._current=0;for(var r,n,i;this._current<e.length;)if(s(e[this._current]))r=this._current,n=this._consumeUnquotedIdentifier(e),t.push({type:"UnquotedIdentifier",value:n,start:r});else if(void 0!==S[e[this._current]])t.push({type:S[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(a(e[this._current]))i=this._consumeNumber(e),t.push(i);else if("["===e[this._current])i=this._consumeLBracket(e),t.push(i);else if('"'===e[this._current])r=this._current,n=this._consumeQuotedIdentifier(e),t.push({type:"QuotedIdentifier",value:n,start:r});else if("'"===e[this._current])r=this._current,n=this._consumeRawStringLiteral(e),t.push({type:"Literal",value:n,start:r});else if("`"===e[this._current]){r=this._current;var o=this._consumeLiteral(e);t.push({type:"Literal",value:o,start:r})}else if(void 0!==A[e[this._current]])t.push(this._consumeOperator(e));else if(void 0!==T[e[this._current]])this._current++;else if("&"===e[this._current])r=this._current,this._current++,"&"===e[this._current]?(this._current++,t.push({type:"And",value:"&&",start:r})):t.push({type:"Expref",value:"&",start:r});else{if("|"!==e[this._current]){var u=new Error("Unknown character:"+e[this._current]);throw u.name="LexerError",u}r=this._current,this._current++,"|"===e[this._current]?(this._current++,t.push({type:"Or",value:"||",start:r})):t.push({type:"Pipe",value:"|",start:r})}return t},_consumeUnquotedIdentifier:function(e){var t=this._current;for(this._current++;this._current<e.length&&u(e[this._current]);)this._current++;return e.slice(t,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var r=e.length;'"'!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var r=e.length;"'"!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var r=e.length;a(e[this._current])&&this._current<r;)this._current++;return{type:"Number",value:parseInt(e.slice(t,this._current)),start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:"Filter",value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:"Flatten",value:"[]",start:t}):{type:"Lbracket",value:"[",start:t}},_consumeOperator:function(e){var t=this._current,r=e[t];return this._current++,"!"===r?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===r?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"`"!==e[i+1]?i++:i+=2,this._current=i}var o=m(e.slice(r,this._current));return o=o.replace("\\`","`"),t=this._looksLikeJSON(o)?JSON.parse(o):JSON.parse('"'+o+'"'),this._current++,t},_looksLikeJSON:function(e){var t='[{"',r=["true","false","null"],n="-0123456789";if(""===e)return!1;if(t.indexOf(e[0])>=0)return!0;if(r.indexOf(e)>=0)return!0;if(!(n.indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var j={};j.EOF=0,j.UnquotedIdentifier=0,j.QuotedIdentifier=0,j.Rbracket=0,j.Rparen=0,j.Comma=0,j.Rbrace=0,j.Number=0,j.Current=0,j.Expref=0,j.Pipe=1,j.Or=2,j.And=3,j.EQ=5,j.GT=5,j.LT=5,j.GTE=5,j.LTE=5,j.NE=5,j.Flatten=9,j.Star=20,j.Filter=21,j.Dot=40,j.Not=45,j.Lbrace=50,j.Lbracket=55,j.Lparen=60,l.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=new c,r=t.tokenize(e);r.push({type:"EOF",value:"",start:e.length}),this.tokens=r},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e<j[n];)this._advance(),r=this.led(n,r),n=this._lookahead(0);return r},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,r,n;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var i={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return i;case"Not":return r=this.expression(j.Not),{type:"NotExpression",children:[r]};case"Star":return t={type:"Identity"},r=null,r="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(j.Star),{type:"ValueProjection",children:[t,r]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return t={type:"Flatten",children:[{type:"Identity"}]},r=this._parseProjectionRHS(j.Flatten),{type:"Projection",children:[t,r]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(r=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},r)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),r=this._parseProjectionRHS(j.Star),{type:"Projection",children:[{type:"Identity"},r]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return n=this.expression(j.Expref),{type:"ExpressionReference",children:[n]};case"Lparen":for(var o=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(n={type:"Current"},this._advance()):n=this.expression(0),o.push(n);return this._match("Rparen"),o[0];default:this._errorToken(e)}},led:function(e,t){var r;switch(e){case"Dot":var n=j.Dot;return"Star"!==this._lookahead(0)?(r=this._parseDotRHS(n),{type:"Subexpression",children:[t,r]}):(this._advance(),r=this._parseProjectionRHS(n),{type:"ValueProjection",children:[t,r]});case"Pipe":return r=this.expression(j.Pipe),{type:"Pipe",children:[t,r]};case"Or":return r=this.expression(j.Or),{type:"OrExpression",children:[t,r]};case"And":return r=this.expression(j.And),{type:"AndExpression",children:[t,r]};case"Lparen":for(var i,o=t.name,s=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(i={type:"Current"},this._advance()):i=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),s.push(i);return this._match("Rparen"),{type:"Function",name:o,children:s};case"Filter":var a=this.expression(0);return this._match("Rbracket"),r="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(j.Filter),{type:"FilterProjection",children:[t,r,a]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(j.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case"Lbracket":var u=this._lookaheadToken(0);return"Number"===u.type||"Colon"===u.type?(r=this._parseIndexExpression(),this._projectIfSlice(t,r)):(this._match("Star"),this._match("Rbracket"),r=this._parseProjectionRHS(j.Star),{type:"Projection",children:[t,r]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),r=new Error("Expected "+e+", got: "+t.type);throw r.name="ParserError",r}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match("Rbracket"),e},_projectIfSlice:function(e,t){var r={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[r,this._parseProjectionRHS(j.Star)]}:r},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,r=this._lookahead(0);"Rbracket"!==r&&t<3;){if("Colon"===r)t++,this._advance();else{if("Number"!==r){var n=this._lookahead(0),i=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw i.name="Parsererror",i}e[t]=this._lookaheadToken(0).value,this._advance()}r=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(j[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return["UnquotedIdentifier","QuotedIdentifier","Star"].indexOf(t)>=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(j[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n,i=[],o=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),r=this.expression(0),n={type:"KeyValuePair",name:t,value:r},i.push(n),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:i}}},p.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,s){var a,u,c,l,p,h,f,d,y;switch(e.type){case"Field":return null===s?null:r(s)?(h=s[e.name],void 0===h?null:h):null;case"Subexpression":for(c=this.visit(e.children[0],s),y=1;y<e.children.length;y++)if(null===(c=this.visit(e.children[1],c)))return null;return c;case"IndexExpression":return f=this.visit(e.children[0],s),this.visit(e.children[1],f);case"Index":if(!t(s))return null;var m=e.value;return m<0&&(m=s.length+m),c=s[m],void 0===c&&(c=null),c;case"Slice":if(!t(s))return null;var g=e.children.slice(0),v=this.computeSliceParams(s.length,g),b=v[0],w=v[1],E=v[2];if(c=[],E>0)for(y=b;y<w;y+=E)c.push(s[y]);else for(y=b;y>w;y+=E)c.push(s[y]);return c;case"Projection":var _=this.visit(e.children[0],s);if(!t(_))return null;for(d=[],y=0;y<_.length;y++)null!==(u=this.visit(e.children[1],_[y]))&&d.push(u);return d;case"ValueProjection":if(_=this.visit(e.children[0],s),!r(_))return null;d=[];var x=o(_);for(y=0;y<x.length;y++)null!==(u=this.visit(e.children[1],x[y]))&&d.push(u);return d;case"FilterProjection":if(_=this.visit(e.children[0],s),!t(_))return null;var R=[],S=[];for(y=0;y<_.length;y++)a=this.visit(e.children[2],_[y]),i(a)||R.push(_[y]);for(var A=0;A<R.length;A++)null!==(u=this.visit(e.children[1],R[A]))&&S.push(u);return S;case"Comparator":switch(l=this.visit(e.children[0],s),p=this.visit(e.children[1],s),e.name){case"EQ":c=n(l,p);break;case"NE":c=!n(l,p);break;case"GT":c=l>p;break;case"GTE":c=l>=p;break;case"LT":c=l<p;break;case"LTE":c=l<=p;break;default:throw new Error("Unknown comparator: "+e.name)}return c;case"Flatten":var T=this.visit(e.children[0],s);if(!t(T))return null;var j=[];for(y=0;y<T.length;y++)u=T[y],t(u)?j.push.apply(j,u):j.push(u);return j;case"Identity":return s;case"MultiSelectList":if(null===s)return null;for(d=[],y=0;y<e.children.length;y++)d.push(this.visit(e.children[y],s));return d;case"MultiSelectHash":if(null===s)return null;d={};var C;for(y=0;y<e.children.length;y++)C=e.children[y],d[C.name]=this.visit(C.value,s);return d;case"OrExpression":return a=this.visit(e.children[0],s),i(a)&&(a=this.visit(e.children[1],s)),a;case"AndExpression":return l=this.visit(e.children[0],s),!0===i(l)?l:this.visit(e.children[1],s);case"NotExpression":return l=this.visit(e.children[0],s),i(l);case"Literal":return e.value;case"Pipe":return f=this.visit(e.children[0],s),this.visit(e.children[1],f);case"Current":return s;case"Function":var I=[];for(y=0;y<e.children.length;y++)I.push(this.visit(e.children[y],s));return this.runtime.callFunction(e.name,I);case"ExpressionReference":var O=e.children[0];return O.jmespathType="Expref",O;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var r=t[0],n=t[1],i=t[2],o=[null,null,null];if(null===i)i=1;else if(0===i){var s=new Error("Invalid slice, step cannot be 0");throw s.name="RuntimeError",s}var a=i<0;return r=null===r?a?e-1:0:this.capSliceRange(e,r,i),n=null===n?a?-1:e:this.capSliceRange(e,n,i),o[0]=r,o[1]=n,o[2]=i,o},capSliceRange:function(e,t,r){return t<0?(t+=e)<0&&(t=r<0?-1:0):t>=e&&(t=r<0?e-1:e),t}},h.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){var n;if(r[r.length-1].variadic){if(t.length<r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+r.length+n+" but received "+t.length)}else if(t.length!==r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+r.length+n+" but received "+t.length);for(var i,o,s,a=0;a<r.length;a++){s=!1,i=r[a].types,o=this._getTypeName(t[a]);for(var u=0;u<i.length;u++)if(this._typeMatches(o,i[u],t[a])){s=!0;break}if(!s)throw new Error("TypeError: "+e+"() expected argument "+(a+1)+" to be type "+i+" but received type "+o+" instead.")}},_typeMatches:function(e,t,r){if(t===v)return!0;if(t!==R&&t!==x&&t!==w)return e===t;if(t===w)return e===w;if(e===w){var n;t===x?n=g:t===R&&(n=b);for(var i=0;i<r.length;i++)if(!this._typeMatches(this._getTypeName(r[i]),n,r[i]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return b;case"[object Number]":return g;case"[object Array]":return w;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return"Expref"===e.jmespathType?_:E}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],r=e[1];return-1!==t.indexOf(r,t.length-r.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===b){for(var t=e[0],r="",n=t.length-1;n>=0;n--)r+=t[n];return r}var i=e[0].slice(0);return i.reverse(),i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t/r.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],i=e[1],o=0;o<i.length;o++)t.push(r.visit(n,i[o]));return t},_functionMerge:function(e){for(var t={},r=0;r<e.length;r++){var n=e[r];for(var i in n)t[i]=n[i]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===g)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)r.localeCompare(t[n])<0&&(r=t[n]);return r}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===g)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)t[n].localeCompare(r)<0&&(r=t[n]);return r}return null},_functionSum:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case g:return"number";case b:return"string";case w:return"array";case E:return"object";case 5:return"boolean";case _:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],r=Object.keys(t),n=[],i=0;i<r.length;i++)n.push(t[r[i]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===w?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===b?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,r=this._getTypeName(e[0]);return r===g?e[0]:r!==b||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var r=this._interpreter,n=e[1],i=this._getTypeName(r.visit(n,t[0]));if([g,b].indexOf(i)<0)throw new Error("TypeError");for(var o=this,s=[],a=0;a<t.length;a++)s.push([a,t[a]]);s.sort(function(e,t){var s=r.visit(n,e[1]),a=r.visit(n,t[1]);if(o._getTypeName(s)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(s));if(o._getTypeName(a)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(a));return s>a?1:s<a?-1:e[0]-t[0]});for(var u=0;u<s.length;u++)t[u]=s[u][1];return t},_functionMaxBy:function(e){for(var t,r,n=e[1],i=e[0],o=this.createKeyFunction(n,[g,b]),s=-1/0,a=0;a<i.length;a++)(r=o(i[a]))>s&&(s=r,t=i[a]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],i=e[0],o=this.createKeyFunction(n,[g,b]),s=1/0,a=0;a<i.length;a++)(r=o(i[a]))<s&&(s=r,t=i[a]);return t},createKeyFunction:function(e,t){var r=this,n=this._interpreter;return function(i){var o=n.visit(e,i);if(t.indexOf(r._getTypeName(o))<0){var s="TypeError: expected one of "+t+", received "+r._getTypeName(o);throw new Error(s)}return o}}},e.tokenize=d,e.compile=f,e.search=y,e.strictDeepEqual=n}(void 0===r?this.jmespath={}:r)},{}],64:[function(e,t,r){function n(e,t,r){var n=a(e)?i:s;return"function"==typeof t&&void 0===r||(t=o(t,r,3)),n(e,t)}var i=e("../internal/arrayEvery"),o=e("../internal/baseCallback"),s=e("../internal/baseEvery"),a=e("../lang/isArray");t.exports=n},{"../internal/arrayEvery":65,"../internal/baseCallback":67,"../internal/baseEvery":71,"../lang/isArray":98}],65:[function(e,t,r){function n(e,t){for(var r=-1,n=e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}t.exports=n},{}],66:[function(e,t,r){function n(e,t,r){var n=o(t);if(!r)return i(t,e,n);for(var s=-1,a=n.length;++s<a;){var u=n[s],c=e[u],l=r(c,t[u],u,e,t);(l===l?l===c:c!==c)&&(void 0!==c||u in e)||(e[u]=l)}return e}var i=e("./baseCopy"),o=e("../object/keys");t.exports=n},{"../object/keys":107,"./baseCopy":68}],67:[function(e,t,r){function n(e,t,r){var n=typeof e;return"function"==n?void 0!==t&&c(e)?a(e,t,r):e:null==e?u:"object"==n?i(e):void 0===t?s(e+""):o(e+"",t)}var i=e("./baseMatches"),o=e("./baseMatchesProperty"),s=e("./baseProperty"),a=e("./bindCallback"),u=e("../utility/identity"),c=e("./isBindable");t.exports=n},{"../utility/identity":111,"./baseMatches":78,"./baseMatchesProperty":79,"./baseProperty":80,"./bindCallback":83,"./isBindable":88}],68:[function(e,t,r){function n(e,t,r){r||(r=t,t={});for(var n=-1,i=r.length;++n<i;){var o=r[n];t[o]=e[o]}return t}t.exports=n},{}],69:[function(e,t,r){(function(r){var n=e("../lang/isObject"),i=function(){function e(){}return function(t){if(n(t)){e.prototype=t;var i=new e;e.prototype=null}return i||r.Object()}}();t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isObject":102}],70:[function(e,t,r){function n(e,t){var r=e?e.length:0;if(!o(r))return i(e,t);for(var n=-1,a=s(e);++n<r&&!1!==t(a[n],n,a););return e}var i=e("./baseForOwn"),o=e("./isLength"),s=e("./toObject");t.exports=n},{"./baseForOwn":73,"./isLength":91,"./toObject":96}],71:[function(e,t,r){function n(e,t){var r=!0;return i(e,function(e,n,i){return r=!!t(e,n,i)}),r}var i=e("./baseEach");t.exports=n},{"./baseEach":70}],72:[function(e,t,r){function n(e,t,r){for(var n=-1,o=i(e),s=r(e),a=s.length;++n<a;){var u=s[n];if(!1===t(o[u],u,o))break}return e}var i=e("./toObject");t.exports=n},{"./toObject":96}],73:[function(e,t,r){function n(e,t){return i(e,t,o)}var i=e("./baseFor"),o=e("../object/keys");t.exports=n},{"../object/keys":107,"./baseFor":72}],74:[function(e,t,r){function n(e,t,r,o,s,a){if(e===t)return 0!==e||1/e==1/t;var u=typeof e,c=typeof t;return"function"!=u&&"object"!=u&&"function"!=c&&"object"!=c||null==e||null==t?e!==e&&t!==t:i(e,t,n,r,o,s,a)}var i=e("./baseIsEqualDeep");t.exports=n},{"./baseIsEqualDeep":75}],75:[function(e,t,r){function n(e,t,r,n,h,y,m){var g=a(e),v=a(t),b=l,w=l;g||(b=d.call(e),b==c?b=p:b!=p&&(g=u(e))),v||(w=d.call(t),w==c?w=p:w!=p&&(v=u(t)));var E=b==p,_=w==p,x=b==w;if(x&&!g&&!E)return o(e,t,b);var R=E&&f.call(e,"__wrapped__"),S=_&&f.call(t,"__wrapped__");if(R||S)return r(R?e.value():e,S?t.value():t,n,h,y,m);if(!x)return!1;y||(y=[]),m||(m=[]);for(var A=y.length;A--;)if(y[A]==e)return m[A]==t;y.push(e),m.push(t);var T=(g?i:s)(e,t,r,n,h,y,m);return y.pop(),m.pop(),T}var i=e("./equalArrays"),o=e("./equalByTag"),s=e("./equalObjects"),a=e("../lang/isArray"),u=e("../lang/isTypedArray"),c="[object Arguments]",l="[object Array]",p="[object Object]",h=Object.prototype,f=h.hasOwnProperty,d=h.toString
;t.exports=n},{"../lang/isArray":98,"../lang/isTypedArray":104,"./equalArrays":85,"./equalByTag":86,"./equalObjects":87}],76:[function(e,t,r){function n(e){return"function"==typeof e||!1}t.exports=n},{}],77:[function(e,t,r){function n(e,t,r,n,o){var a=t.length;if(null==e)return!a;for(var u=-1,c=!o;++u<a;)if(c&&n[u]?r[u]!==e[t[u]]:!s.call(e,t[u]))return!1;for(u=-1;++u<a;){var l=t[u];if(c&&n[u])var p=s.call(e,l);else{var h=e[l],f=r[u];p=o?o(h,f,l):void 0,void 0===p&&(p=i(f,h,o,!0))}if(!p)return!1}return!0}var i=e("./baseIsEqual"),o=Object.prototype,s=o.hasOwnProperty;t.exports=n},{"./baseIsEqual":74}],78:[function(e,t,r){function n(e){var t=s(e),r=t.length;if(1==r){var n=t[0],a=e[n];if(o(a))return function(e){return null!=e&&e[n]===a&&u.call(e,n)}}for(var c=Array(r),l=Array(r);r--;)a=e[t[r]],c[r]=a,l[r]=o(a);return function(e){return i(e,t,c,l)}}var i=e("./baseIsMatch"),o=e("./isStrictComparable"),s=e("../object/keys"),a=Object.prototype,u=a.hasOwnProperty;t.exports=n},{"../object/keys":107,"./baseIsMatch":77,"./isStrictComparable":93}],79:[function(e,t,r){function n(e,t){return o(t)?function(r){return null!=r&&r[e]===t}:function(r){return null!=r&&i(t,r[e],null,!0)}}var i=e("./baseIsEqual"),o=e("./isStrictComparable");t.exports=n},{"./baseIsEqual":74,"./isStrictComparable":93}],80:[function(e,t,r){function n(e){return function(t){return null==t?void 0:t[e]}}t.exports=n},{}],81:[function(e,t,r){var n=e("../utility/identity"),i=e("./metaMap"),o=i?function(e,t){return i.set(e,t),e}:n;t.exports=o},{"../utility/identity":111,"./metaMap":94}],82:[function(e,t,r){function n(e){return"string"==typeof e?e:null==e?"":e+""}t.exports=n},{}],83:[function(e,t,r){function n(e,t,r){if("function"!=typeof e)return i;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,n,i){return e.call(t,r,n,i)};case 4:return function(r,n,i,o){return e.call(t,r,n,i,o)};case 5:return function(r,n,i,o,s){return e.call(t,r,n,i,o,s)}}return function(){return e.apply(t,arguments)}}var i=e("../utility/identity");t.exports=n},{"../utility/identity":111}],84:[function(e,t,r){function n(e){return function(){var t=arguments,r=t.length,n=t[0];if(r<2||null==n)return n;var s=t[r-2],a=t[r-1],u=t[3];r>3&&"function"==typeof s?(s=i(s,a,5),r-=2):(s=r>2&&"function"==typeof a?a:null,r-=s?1:0),u&&o(t[1],t[2],u)&&(s=3==r?null:s,r=2);for(var c=0;++c<r;){var l=t[c];l&&e(n,l,s)}return n}}var i=e("./bindCallback"),o=e("./isIterateeCall");t.exports=n},{"./bindCallback":83,"./isIterateeCall":90}],85:[function(e,t,r){function n(e,t,r,n,i,o,s){var a=-1,u=e.length,c=t.length,l=!0;if(u!=c&&!(i&&c>u))return!1;for(;l&&++a<u;){var p=e[a],h=t[a];if(l=void 0,n&&(l=i?n(h,p,a):n(p,h,a)),void 0===l)if(i)for(var f=c;f--&&(h=t[f],!(l=p&&p===h||r(p,h,n,i,o,s))););else l=p&&p===h||r(p,h,n,i,o,s)}return!!l}t.exports=n},{}],86:[function(e,t,r){function n(e,t,r){switch(r){case i:case o:return+e==+t;case s:return e.name==t.name&&e.message==t.message;case a:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case u:case c:return e==t+""}return!1}var i="[object Boolean]",o="[object Date]",s="[object Error]",a="[object Number]",u="[object RegExp]",c="[object String]";t.exports=n},{}],87:[function(e,t,r){function n(e,t,r,n,o,a,u){var c=i(e),l=c.length;if(l!=i(t).length&&!o)return!1;for(var p,h=-1;++h<l;){var f=c[h],d=s.call(t,f);if(d){var y=e[f],m=t[f];d=void 0,n&&(d=o?n(m,y,f):n(y,m,f)),void 0===d&&(d=y&&y===m||r(y,m,n,o,a,u))}if(!d)return!1;p||(p="constructor"==f)}if(!p){var g=e.constructor,v=t.constructor;if(g!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof v&&v instanceof v))return!1}return!0}var i=e("../object/keys"),o=Object.prototype,s=o.hasOwnProperty;t.exports=n},{"../object/keys":107}],88:[function(e,t,r){function n(e){var t=!(s.funcNames?e.name:s.funcDecomp);if(!t){var r=c.call(e);s.funcNames||(t=!a.test(r)),t||(t=u.test(r)||o(e),i(e,t))}return t}var i=e("./baseSetData"),o=e("../lang/isNative"),s=e("../support"),a=/^\s*function[ \n\r\t]+\w/,u=/\bthis\b/,c=Function.prototype.toString;t.exports=n},{"../lang/isNative":101,"../support":110,"./baseSetData":81}],89:[function(e,t,r){function n(e,t){return e=+e,t=null==t?i:t,e>-1&&e%1==0&&e<t}var i=Math.pow(2,53)-1;t.exports=n},{}],90:[function(e,t,r){function n(e,t,r){if(!s(r))return!1;var n=typeof t;if("number"==n)var a=r.length,u=o(a)&&i(t,a);else u="string"==n&&t in r;if(u){var c=r[t];return e===e?e===c:c!==c}return!1}var i=e("./isIndex"),o=e("./isLength"),s=e("../lang/isObject");t.exports=n},{"../lang/isObject":102,"./isIndex":89,"./isLength":91}],91:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=Math.pow(2,53)-1;t.exports=n},{}],92:[function(e,t,r){function n(e){return e&&"object"==typeof e||!1}t.exports=n},{}],93:[function(e,t,r){function n(e){return e===e&&(0===e?1/e>0:!i(e))}var i=e("../lang/isObject");t.exports=n},{"../lang/isObject":102}],94:[function(e,t,r){(function(r){var n=e("../lang/isNative"),i=n(i=r.WeakMap)&&i,o=i&&new i;t.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":101}],95:[function(e,t,r){function n(e){for(var t=u(e),r=t.length,n=r&&e.length,l=n&&a(n)&&(o(e)||c.nonEnumArgs&&i(e)),h=-1,f=[];++h<r;){var d=t[h];(l&&s(d,n)||p.call(e,d))&&f.push(d)}return f}var i=e("../lang/isArguments"),o=e("../lang/isArray"),s=e("./isIndex"),a=e("./isLength"),u=e("../object/keysIn"),c=e("../support"),l=Object.prototype,p=l.hasOwnProperty;t.exports=n},{"../lang/isArguments":97,"../lang/isArray":98,"../object/keysIn":108,"../support":110,"./isIndex":89,"./isLength":91}],96:[function(e,t,r){function n(e){return i(e)?e:Object(e)}var i=e("../lang/isObject");t.exports=n},{"../lang/isObject":102}],97:[function(e,t,r){function n(e){var t=o(e)?e.length:void 0;return i(t)&&u.call(e)==s||!1}var i=e("../internal/isLength"),o=e("../internal/isObjectLike"),s="[object Arguments]",a=Object.prototype,u=a.toString;t.exports=n},{"../internal/isLength":91,"../internal/isObjectLike":92}],98:[function(e,t,r){var n=e("../internal/isLength"),i=e("./isNative"),o=e("../internal/isObjectLike"),s=Object.prototype,a=s.toString,u=i(u=Array.isArray)&&u,c=u||function(e){return o(e)&&n(e.length)&&"[object Array]"==a.call(e)||!1};t.exports=c},{"../internal/isLength":91,"../internal/isObjectLike":92,"./isNative":101}],99:[function(e,t,r){function n(e){if(null==e)return!0;var t=e.length;return a(t)&&(o(e)||c(e)||i(e)||u(e)&&s(e.splice))?!t:!l(e).length}var i=e("./isArguments"),o=e("./isArray"),s=e("./isFunction"),a=e("../internal/isLength"),u=e("../internal/isObjectLike"),c=e("./isString"),l=e("../object/keys");t.exports=n},{"../internal/isLength":91,"../internal/isObjectLike":92,"../object/keys":107,"./isArguments":97,"./isArray":98,"./isFunction":100,"./isString":103}],100:[function(e,t,r){(function(r){var n=e("../internal/baseIsFunction"),i=e("./isNative"),o=Object.prototype,s=o.toString,a=i(a=r.Uint8Array)&&a,u=n(/x/)||a&&!n(a)?function(e){return"[object Function]"==s.call(e)}:n;t.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../internal/baseIsFunction":76,"./isNative":101}],101:[function(e,t,r){function n(e){return null!=e&&(l.call(e)==s?p.test(c.call(e)):o(e)&&a.test(e)||!1)}var i=e("../string/escapeRegExp"),o=e("../internal/isObjectLike"),s="[object Function]",a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.toString,p=RegExp("^"+i(l).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{"../internal/isObjectLike":92,"../string/escapeRegExp":109}],102:[function(e,t,r){function n(e){var t=typeof e;return"function"==t||e&&"object"==t||!1}t.exports=n},{}],103:[function(e,t,r){function n(e){return"string"==typeof e||i(e)&&a.call(e)==o||!1}var i=e("../internal/isObjectLike"),o="[object String]",s=Object.prototype,a=s.toString;t.exports=n},{"../internal/isObjectLike":92}],104:[function(e,t,r){function n(e){return o(e)&&i(e.length)&&s[u.call(e)]||!1}var i=e("../internal/isLength"),o=e("../internal/isObjectLike"),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var a=Object.prototype,u=a.toString;t.exports=n},{"../internal/isLength":91,"../internal/isObjectLike":92}],105:[function(e,t,r){var n=e("../internal/baseAssign"),i=e("../internal/createAssigner"),o=i(n);t.exports=o},{"../internal/baseAssign":66,"../internal/createAssigner":84}],106:[function(e,t,r){function n(e,t,r){var n=o(e);return r&&s(e,t,r)&&(t=null),t?i(t,n,a(t)):n}var i=e("../internal/baseCopy"),o=e("../internal/baseCreate"),s=e("../internal/isIterateeCall"),a=e("./keys");t.exports=n},{"../internal/baseCopy":68,"../internal/baseCreate":69,"../internal/isIterateeCall":90,"./keys":107}],107:[function(e,t,r){var n=e("../internal/isLength"),i=e("../lang/isNative"),o=e("../lang/isObject"),s=e("../internal/shimKeys"),a=i(a=Object.keys)&&a,u=a?function(e){if(e)var t=e.constructor,r=e.length;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&r&&n(r)?s(e):o(e)?a(e):[]}:s;t.exports=u},{"../internal/isLength":91,"../internal/shimKeys":95,"../lang/isNative":101,"../lang/isObject":102}],108:[function(e,t,r){function n(e){if(null==e)return[];u(e)||(e=Object(e));var t=e.length;t=t&&a(t)&&(o(e)||c.nonEnumArgs&&i(e))&&t||0;for(var r=e.constructor,n=-1,l="function"==typeof r&&r.prototype===e,h=Array(t),f=t>0;++n<t;)h[n]=n+"";for(var d in e)f&&s(d,t)||"constructor"==d&&(l||!p.call(e,d))||h.push(d);return h}var i=e("../lang/isArguments"),o=e("../lang/isArray"),s=e("../internal/isIndex"),a=e("../internal/isLength"),u=e("../lang/isObject"),c=e("../support"),l=Object.prototype,p=l.hasOwnProperty;t.exports=n},{"../internal/isIndex":89,"../internal/isLength":91,"../lang/isArguments":97,"../lang/isArray":98,"../lang/isObject":102,"../support":110}],109:[function(e,t,r){function n(e){return e=i(e),e&&s.test(e)?e.replace(o,"\\$&"):e}var i=e("../internal/baseToString"),o=/[.*+?^${}()|[\]\/\\]/g,s=RegExp(o.source);t.exports=n},{"../internal/baseToString":82}],110:[function(e,t,r){(function(r){var n=e("./lang/isNative"),i=/\bthis\b/,o=Object.prototype,s=(s=r.window)&&s.document,a=o.propertyIsEnumerable,u={};!function(e){u.funcDecomp=!n(r.WinRTError)&&i.test(function(){return this}),u.funcNames="string"==typeof Function.name;try{u.dom=11===s.createDocumentFragment().nodeType}catch(e){u.dom=!1}try{u.nonEnumArgs=!a.call(arguments,1)}catch(e){u.nonEnumArgs=!0}}(0,0),t.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lang/isNative":101}],111:[function(e,t,r){function n(e){return e}t.exports=n},{}],112:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(p===setTimeout)return setTimeout(e,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function s(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?y=d.concat(y):g=-1,y.length&&u())}function u(){if(!m){var e=o(a);m=!0;for(var t=y.length;t;){for(d=y,y=[];++g<t;)d&&d[g].run();g=-1,t=y.length}d=null,m=!1,s(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var p,h,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(e){p=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,y=[],m=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];y.push(new c(e,t)),1!==y.length||m||o(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.prependListener=l,f.prependOnceListener=l,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],113:[function(e,t,r){(function(e){!function(n){function i(e){throw RangeError(L[e])}function o(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function s(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(q,"."),n+o(e.split("."),t).join(".")}function a(e){for(var t,r,n=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function u(e){return o(e,function(e){var t="";return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:_}function l(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,r){var n=0;for(e=r?D(e/A):e>>1,e+=D(e/t);e>P*R>>1;n+=_)e=D(e/P);return D(n+(P+1)*e/(e+S))}function h(e){var t,r,n,o,s,a,l,h,f,d,y=[],m=e.length,g=0,v=j,b=T;for(r=e.lastIndexOf(C),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&i("not-basic"),y.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<m;){for(s=g,a=1,l=_;o>=m&&i("invalid-input"),h=c(e.charCodeAt(o++)),(h>=_||h>D((E-g)/a))&&i("overflow"),g+=h*a,f=l<=b?x:l>=b+R?R:l-b,!(h<f);l+=_)d=_-f,a>D(E/d)&&i("overflow"),a*=d;t=y.length+1,b=p(g-s,t,0==s),D(g/t)>E-v&&i("overflow"),v+=D(g/t),g%=t,y.splice(g++,0,v)}return u(y)}function f(e){var t,r,n,o,s,u,c,h,f,d,y,m,g,v,b,w=[];for(e=a(e),m=e.length,t=j,r=0,s=T,u=0;u<m;++u)(y=e[u])<128&&w.push(N(y));for(n=o=w.length,o&&w.push(C);n<m;){for(c=E,u=0;u<m;++u)(y=e[u])>=t&&y<c&&(c=y);for(g=n+1,c-t>D((E-r)/g)&&i("overflow"),r+=(c-t)*g,t=c,u=0;u<m;++u)if(y=e[u],y<t&&++r>E&&i("overflow"),y==t){for(h=r,f=_;d=f<=s?x:f>=s+R?R:f-s,!(h<d);f+=_)b=h-d,v=_-d,w.push(N(l(d+b%v,0))),h=D(b/v);w.push(N(l(h,0))),s=p(r,g,n==o),r=0,++n}++r,++t}return w.join("")}function d(e){return s(e,function(e){return I.test(e)?h(e.slice(4).toLowerCase()):e})}function y(e){return s(e,function(e){return O.test(e)?"xn--"+f(e):e})}var m="object"==typeof r&&r&&!r.nodeType&&r,g="object"==typeof t&&t&&!t.nodeType&&t,v="object"==typeof e&&e;v.global!==v&&v.window!==v&&v.self!==v||(n=v);var b,w,E=2147483647,_=36,x=1,R=26,S=38,A=700,T=72,j=128,C="-",I=/^xn--/,O=/[^\x20-\x7E]/,q=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=_-x,D=Math.floor,N=String.fromCharCode;if(b={version:"1.3.2",ucs2:{decode:a,encode:u},decode:h,encode:f,toASCII:y,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return b});else if(m&&g)if(t.exports==m)g.exports=b;else for(w in b)b.hasOwnProperty(w)&&(m[w]=b[w]);else n.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],114:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var p,h,f,d,y=e[l].replace(a,"%20"),m=y.indexOf(r);m>=0?(p=y.substr(0,m),h=y.substr(m+1)):(p=y,h=""),f=decodeURIComponent(p),d=decodeURIComponent(h),n(s,f)?i(s[f])?s[f].push(d):s[f]=[s[f],d]:s[f]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],115:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?n(s(e),function(s){var a=encodeURIComponent(i(s))+r;return o(e[s])?n(e[s],function(e){return a+encodeURIComponent(i(e))}).join(t):a+encodeURIComponent(i(e[s]))}).join(t):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],116:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":114,"./encode":115}],117:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var l,p,h,f,d=e[c].replace(s,"%20"),y=d.indexOf(r);y>=0?(l=d.substr(0,y),p=d.substr(y+1)):(l=d,p=""),h=decodeURIComponent(l),f=decodeURIComponent(p),n(o,h)?Array.isArray(o[h])?o[h].push(f):o[h]=[o[h],f]:o[h]=f}return o}},{}],118:[function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},{}],119:[function(e,t,r){arguments[4][116][0].apply(r,arguments)},{"./decode":117,"./encode":118,dup:116}],120:[function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&c(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return u(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function u(e){return"string"==typeof e}function c(e){return"object"==typeof e&&null!==e}function l(e){return null===e}function p(e){return null==e}var h=e("punycode");r.parse=i,r.resolve=s,r.resolveObject=a,r.format=o,r.Url=n;var f=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,y=["<",">",'"',"`"," ","\r","\n","\t"],m=["{","}","|","\\","^","`"].concat(y),g=["'"].concat(m),v=["%","/","?",";","#"].concat(g),b=["/","?","#"],w=/^[a-z0-9A-Z_-]{0,63}$/,E=/^([a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},R={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=e("querystring");n.prototype.parse=function(e,t,r){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=f.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&x[i]||(n=n.substr(2),this.slashes=!0)}if(!x[i]&&(s||i&&!R[i])){for(var a=-1,c=0;c<b.length;c++){var l=n.indexOf(b[c]);-1!==l&&(-1===a||l<a)&&(a=l)}var p,d;d=-1===a?n.lastIndexOf("@"):n.lastIndexOf("@",a),-1!==d&&(p=n.slice(0,d),n=n.slice(d+1),this.auth=decodeURIComponent(p)),a=-1;for(var c=0;c<v.length;c++){var l=n.indexOf(v[c]);-1!==l&&(-1===a||l<a)&&(a=l)}-1===a&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var m=this.hostname.split(/\./),c=0,A=m.length;c<A;c++){var T=m[c];if(T&&!T.match(w)){for(var j="",C=0,I=T.length;C<I;C++)T.charCodeAt(C)>127?j+="x":j+=T[C];if(!j.match(w)){var O=m.slice(0,c),q=m.slice(c+1),L=T.match(E);L&&(O.push(L[1]),q.unshift(L[2])),q.length&&(n="/"+q.join(".")+n),this.hostname=O.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!y){for(var P=this.hostname.split("."),D=[],c=0;c<P.length;++c){var N=P[c];D.push(N.match(/[^A-Za-z0-9_-]/)?"xn--"+h.encode(N):N)}this.hostname=D.join(".")}var k=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+k,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!_[o])for(var c=0,A=g.length;c<A;c++){var U=g[c],B=encodeURIComponent(U);B===U&&(B=escape(U)),n=n.split(U).join(B)}var F=n.indexOf("#");-1!==F&&(this.hash=n.substr(F),n=n.slice(0,F));var H=n.indexOf("?");if(-1!==H?(this.search=n.substr(H),this.query=n.substr(H+1),t&&(this.query=S.parse(this.query)),n=n.slice(0,H)):t&&(this.search="",this.query={}),n&&(this.pathname=n),R[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var k=this.pathname||"",N=this.search||"";this.path=k+N}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(o=S.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||R[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+r+s+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(u(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),R[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!R[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||x[e.protocol])r.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),h=c||a||r.host&&e.pathname,f=h,d=r.pathname&&r.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],y=r.protocol&&!R[r.protocol];if(y&&(r.hostname="",r.port=null,r.host&&(""===d[0]?d[0]=r.host:d.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),h=h&&(""===i[0]||""===d[0])),c)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,d=i;else if(i.length)d||(d=[]),d.pop(),d=d.concat(i),r.search=e.search,r.query=e.query;else if(!p(e.search)){if(y){r.hostname=r.host=d.shift();var m=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return r.search=e.search,r.query=e.query,l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=d.slice(-1)[0],v=(r.host||e.host)&&("."===g||".."===g)||""===g,b=0,w=d.length;w>=0;w--)g=d[w],"."==g?d.splice(w,1):".."===g?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!h&&!f)for(;b--;b)d.unshift("..");!h||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),v&&"/"!==d.join("/").substr(-1)&&d.push("");var E=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(y){r.hostname=r.host=E?"":d.length?d.shift():"";var m=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return h=h||r.host&&d.length,h&&!E&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=d.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:113,querystring:116}],121:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],122:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],123:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(t)?n.showHidden=t:t&&r._extend(n,t),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=u(e,i,n)),i}var o=c(e,t);if(o)return o;var s=Object.keys(t),y=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),S(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(t);if(0===s.length){if(A(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(R(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return l(t)}var g="",v=!1,w=["{","}"];if(d(t)&&(v=!0,w=["[","]"]),A(t)){g=" [Function"+(t.name?": "+t.name:"")+"]"}if(_(t)&&(g=" "+RegExp.prototype.toString.call(t)),R(t)&&(g=" "+Date.prototype.toUTCString.call(t)),S(t)&&(g=" "+l(t)),0===s.length&&(!v||0==t.length))return w[0]+g+w[1];if(n<0)return _(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=v?p(e,t,n,y,s):s.map(function(r){return h(e,t,n,y,r,v)}),e.seen.pop(),f(E,g,w)}function c(e,t){if(E(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)O(t,String(s))?o.push(h(e,t,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))}),o}function h(e,t,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),O(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=m(r)?u(e,c.value,null):u(e,c.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return"   "+e}).join("\n"))):a=e.stylize("[Circular]","special")),E(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function f(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return null==e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function E(e){return void 0===e}function _(e){return x(e)&&"[object RegExp]"===j(e)}function x(e){return"object"==typeof e&&null!==e}function R(e){return x(e)&&"[object Date]"===j(e)}function S(e){return x(e)&&("[object Error]"===j(e)||e instanceof Error)}function A(e){return"function"==typeof e}function T(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function j(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}function I(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var q=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(e).replace(q,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),a=n[r];r<o;a=n[++r])m(a)||!x(a)?s+=" "+a:s+=" "+i(a);return s},r.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(E(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var s=!1;return o};var L,P={};r.debuglog=function(e){if(E(L)&&(L=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!P[e])if(new RegExp("\\b"+e+"\\b","i").test(L)){var n=t.pid;P[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else P[e]=function(){};return P[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=y,r.isNull=m,r.isNullOrUndefined=g,r.isNumber=v,r.isString=b,r.isSymbol=w,r.isUndefined=E,r.isRegExp=_,r.isObject=x,r.isDate=R,r.isError=S,
r.isFunction=A,r.isPrimitive=T,r.isBuffer=e("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",I(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":122,_process:112,inherits:121}],124:[function(e,t,r){(function(){var r;r=e("lodash/object/create"),t.exports=function(){function e(e,t,r){if(this.stringify=e.stringify,null==t)throw new Error("Missing attribute name of element "+e.name);if(null==r)throw new Error("Missing attribute value for attribute "+t+" of element "+e.name);this.name=this.stringify.attName(t),this.value=this.stringify.attValue(r)}return e.prototype.clone=function(){return r(e.prototype,this)},e.prototype.toString=function(e,t){return" "+this.name+'="'+this.value+'"'},e}()}).call(this)},{"lodash/object/create":106}],125:[function(e,t,r){(function(){var r,n;n=e("./XMLStringifier"),e("./XMLDeclaration"),e("./XMLDocType"),r=e("./XMLElement"),t.exports=function(){function e(e,t){var i,o;if(null==e)throw new Error("Root element needs a name");null==t&&(t={}),this.options=t,this.stringify=new n(t),o=new r(this,"doc"),i=o.element(e),i.isRoot=!0,i.documentObject=this,this.rootObject=i,t.headless||(i.declaration(t),null==t.pubID&&null==t.sysID||i.doctype(t))}return e.prototype.root=function(){return this.rootObject},e.prototype.end=function(e){return this.toString(e)},e.prototype.toString=function(e){var t,r,n,i,o,s;return r=(null!=e?e.pretty:void 0)||!1,null!=(i=null!=e?e.indent:void 0)?i:"  ",null!=(o=null!=e?e.offset:void 0)?o:0,t=null!=(s=null!=e?e.newline:void 0)?s:"\n",n="",null!=this.xmldec&&(n+=this.xmldec.toString(e)),null!=this.doctype&&(n+=this.doctype.toString(e)),n+=this.rootObject.toString(e),r&&n.slice(-t.length)===t&&(n=n.slice(0,-t.length)),n},e}()}).call(this)},{"./XMLDeclaration":132,"./XMLDocType":133,"./XMLElement":134,"./XMLStringifier":138}],126:[function(e,t,r){(function(){var r,n,i=function(e,t){function r(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;n=e("lodash/object/create"),r=e("./XMLNode"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(r)}return i(t,e),t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="<![CDATA["+this.text+"]]>",o&&(s+=n),s},t}(r)}).call(this)},{"./XMLNode":135,"lodash/object/create":106}],127:[function(e,t,r){(function(){var r,n,i=function(e,t){function r(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;n=e("lodash/object/create"),r=e("./XMLNode"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing comment text");this.text=this.stringify.comment(r)}return i(t,e),t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="\x3c!-- "+this.text+" --\x3e",o&&(s+=n),s},t}(r)}).call(this)},{"./XMLNode":135,"lodash/object/create":106}],128:[function(e,t,r){(function(){var r;r=e("lodash/object/create"),t.exports=function(){function e(e,t,r,n,i,o){if(this.stringify=e.stringify,null==t)throw new Error("Missing DTD element name");if(null==r)throw new Error("Missing DTD attribute name");if(!n)throw new Error("Missing DTD attribute type");if(!i)throw new Error("Missing DTD attribute default");if(0!==i.indexOf("#")&&(i="#"+i),!i.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(o&&!i.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(t),this.attributeName=this.stringify.attName(r),this.attributeType=this.stringify.dtdAttType(n),this.defaultValue=this.stringify.dtdAttDefault(o),this.defaultValueType=i}return e.prototype.clone=function(){return r(e.prototype,this)},e.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="<!ATTLIST "+this.elementName+" "+this.attributeName+" "+this.attributeType,"#DEFAULT"!==this.defaultValueType&&(s+=" "+this.defaultValueType),this.defaultValue&&(s+=' "'+this.defaultValue+'"'),s+=">",o&&(s+=n),s},e}()}).call(this)},{"lodash/object/create":106}],129:[function(e,t,r){(function(){var r,n;r=e("lodash/object/create"),n=e("lodash/lang/isArray"),t.exports=function(){function e(e,t,r){if(this.stringify=e.stringify,null==t)throw new Error("Missing DTD element name");r||(r="(#PCDATA)"),n(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.eleName(t),this.value=this.stringify.dtdElementValue(r)}return e.prototype.clone=function(){return r(e.prototype,this)},e.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="<!ELEMENT "+this.name+" "+this.value+">",o&&(s+=n),s},e}()}).call(this)},{"lodash/lang/isArray":98,"lodash/object/create":106}],130:[function(e,t,r){(function(){var r,n;r=e("lodash/object/create"),n=e("lodash/lang/isObject"),t.exports=function(){function e(e,t,r,i){if(this.stringify=e.stringify,null==r)throw new Error("Missing entity name");if(null==i)throw new Error("Missing entity value");if(this.pe=!!t,this.name=this.stringify.eleName(r),n(i)){if(!i.pubID&&!i.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(i.pubID&&!i.sysID)throw new Error("System identifier is required for a public external entity");if(null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID)),null!=i.nData&&(this.nData=this.stringify.dtdNData(i.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(i)}return e.prototype.clone=function(){return r(e.prototype,this)},e.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="<!ENTITY",this.pe&&(s+=" %"),s+=" "+this.name,this.value?s+=' "'+this.value+'"':(this.pubID&&this.sysID?s+=' PUBLIC "'+this.pubID+'" "'+this.sysID+'"':this.sysID&&(s+=' SYSTEM "'+this.sysID+'"'),this.nData&&(s+=" NDATA "+this.nData)),s+=">",o&&(s+=n),s},e}()}).call(this)},{"lodash/lang/isObject":102,"lodash/object/create":106}],131:[function(e,t,r){(function(){var r;r=e("lodash/object/create"),t.exports=function(){function e(e,t,r){if(this.stringify=e.stringify,null==t)throw new Error("Missing notation name");if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(t),null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return e.prototype.clone=function(){return r(e.prototype,this)},e.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="<!NOTATION "+this.name,this.pubID&&this.sysID?s+=' PUBLIC "'+this.pubID+'" "'+this.sysID+'"':this.pubID?s+=' PUBLIC "'+this.pubID+'"':this.sysID&&(s+=' SYSTEM "'+this.sysID+'"'),s+=">",o&&(s+=n),s},e}()}).call(this)},{"lodash/object/create":106}],132:[function(e,t,r){(function(){var r,n,i,o=function(e,t){function r(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},s={}.hasOwnProperty;n=e("lodash/object/create"),i=e("lodash/lang/isObject"),r=e("./XMLNode"),t.exports=function(e){function t(e,r,n,o){var s;t.__super__.constructor.call(this,e),i(r)&&(s=r,r=s.version,n=s.encoding,o=s.standalone),r||(r="1.0"),null!=r&&(this.version=this.stringify.xmlVersion(r)),null!=n&&(this.encoding=this.stringify.xmlEncoding(n)),null!=o&&(this.standalone=this.stringify.xmlStandalone(o))}return o(t,e),t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="<?xml",null!=this.version&&(s+=' version="'+this.version+'"'),null!=this.encoding&&(s+=' encoding="'+this.encoding+'"'),null!=this.standalone&&(s+=' standalone="'+this.standalone+'"'),s+="?>",o&&(s+=n),s},t}(r)}).call(this)},{"./XMLNode":135,"lodash/lang/isObject":102,"lodash/object/create":106}],133:[function(e,t,r){(function(){var r,n,i,o,s,a,u,c,l;c=e("lodash/object/create"),l=e("lodash/lang/isObject"),r=e("./XMLCData"),n=e("./XMLComment"),i=e("./XMLDTDAttList"),s=e("./XMLDTDEntity"),o=e("./XMLDTDElement"),a=e("./XMLDTDNotation"),u=e("./XMLProcessingInstruction"),t.exports=function(){function e(e,t,r){var n,i;this.documentObject=e,this.stringify=this.documentObject.stringify,this.children=[],l(t)&&(n=t,t=n.pubID,r=n.sysID),null==r&&(i=[t,r],r=i[0],t=i[1]),null!=t&&(this.pubID=this.stringify.dtdPubID(t)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return e.prototype.clone=function(){return c(e.prototype,this)},e.prototype.element=function(e,t){var r;return r=new o(this,e,t),this.children.push(r),this},e.prototype.attList=function(e,t,r,n,o){var s;return s=new i(this,e,t,r,n,o),this.children.push(s),this},e.prototype.entity=function(e,t){var r;return r=new s(this,!1,e,t),this.children.push(r),this},e.prototype.pEntity=function(e,t){var r;return r=new s(this,!0,e,t),this.children.push(r),this},e.prototype.notation=function(e,t){var r;return r=new a(this,e,t),this.children.push(r),this},e.prototype.cdata=function(e){var t;return t=new r(this,e),this.children.push(t),this},e.prototype.comment=function(e){var t;return t=new n(this,e),this.children.push(t),this},e.prototype.instruction=function(e,t){var r;return r=new u(this,e,t),this.children.push(r),this},e.prototype.root=function(){return this.documentObject.root()},e.prototype.document=function(){return this.documentObject},e.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l,p,h,f,d;if(u=(null!=e?e.pretty:void 0)||!1,i=null!=(l=null!=e?e.indent:void 0)?l:"  ",a=null!=(p=null!=e?e.offset:void 0)?p:0,s=null!=(h=null!=e?e.newline:void 0)?h:"\n",t||(t=0),d=new Array(t+a+1).join(i),c="",u&&(c+=d),c+="<!DOCTYPE "+this.root().name,this.pubID&&this.sysID?c+=' PUBLIC "'+this.pubID+'" "'+this.sysID+'"':this.sysID&&(c+=' SYSTEM "'+this.sysID+'"'),this.children.length>0){for(c+=" [",u&&(c+=s),f=this.children,n=0,o=f.length;n<o;n++)r=f[n],c+=r.toString(e,t+1);c+="]"}return c+=">",u&&(c+=s),c},e.prototype.ele=function(e,t){return this.element(e,t)},e.prototype.att=function(e,t,r,n,i){return this.attList(e,t,r,n,i)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.up=function(){return this.root()},e.prototype.doc=function(){return this.document()},e}()}).call(this)},{"./XMLCData":126,"./XMLComment":127,"./XMLDTDAttList":128,"./XMLDTDElement":129,"./XMLDTDEntity":130,"./XMLDTDNotation":131,"./XMLProcessingInstruction":136,"lodash/lang/isObject":102,"lodash/object/create":106}],134:[function(e,t,r){(function(){var r,n,i,o,s,a,u,c,l=function(e,t){function r(){this.constructor=e}for(var n in t)p.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},p={}.hasOwnProperty;o=e("lodash/object/create"),c=e("lodash/lang/isObject"),a=e("lodash/lang/isArray"),u=e("lodash/lang/isFunction"),s=e("lodash/collection/every"),n=e("./XMLNode"),r=e("./XMLAttribute"),i=e("./XMLProcessingInstruction"),t.exports=function(e){function t(e,r,n){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing element name");this.name=this.stringify.eleName(r),this.children=[],this.instructions=[],this.attributes={},null!=n&&this.attribute(n)}return l(t,e),t.prototype.clone=function(){var e,r,n,i,s,a,u,c;n=o(t.prototype,this),n.isRoot&&(n.documentObject=null),n.attributes={},u=this.attributes;for(r in u)p.call(u,r)&&(e=u[r],n.attributes[r]=e.clone());for(n.instructions=[],c=this.instructions,i=0,s=c.length;i<s;i++)a=c[i],n.instructions.push(a.clone());return n.children=[],this.children.forEach(function(e){var t;return t=e.clone(),t.parent=n,n.children.push(t)}),n},t.prototype.attribute=function(e,t){var n,i;if(null!=e&&(e=e.valueOf()),c(e))for(n in e)p.call(e,n)&&(i=e[n],this.attribute(n,i));else u(t)&&(t=t.apply()),this.options.skipNullAttributes&&null==t||(this.attributes[e]=new r(this,e,t));return this},t.prototype.removeAttribute=function(e){var t,r,n;if(null==e)throw new Error("Missing attribute name");if(e=e.valueOf(),a(e))for(r=0,n=e.length;r<n;r++)t=e[r],delete this.attributes[t];else delete this.attributes[e];return this},t.prototype.instruction=function(e,t){var r,n,o,s,l;if(null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),a(e))for(r=0,l=e.length;r<l;r++)n=e[r],this.instruction(n);else if(c(e))for(n in e)p.call(e,n)&&(o=e[n],this.instruction(n,o));else u(t)&&(t=t.apply()),s=new i(this,e,t),this.instructions.push(s);return this},t.prototype.toString=function(e,t){var r,n,i,o,a,u,c,l,h,f,d,y,m,g,v,b,w,E,_,x;for(y=(null!=e?e.pretty:void 0)||!1,o=null!=(g=null!=e?e.indent:void 0)?g:"  ",d=null!=(v=null!=e?e.offset:void 0)?v:0,f=null!=(b=null!=e?e.newline:void 0)?b:"\n",t||(t=0),x=new Array(t+d+1).join(o),m="",w=this.instructions,i=0,c=w.length;i<c;i++)a=w[i],m+=a.toString(e,t+1);y&&(m+=x),m+="<"+this.name,E=this.attributes;for(h in E)p.call(E,h)&&(r=E[h],m+=r.toString(e));if(0===this.children.length||s(this.children,function(e){return""===e.value}))m+="/>",y&&(m+=f);else if(y&&1===this.children.length&&null!=this.children[0].value)m+=">",m+=this.children[0].value,m+="</"+this.name+">",m+=f;else{for(m+=">",y&&(m+=f),_=this.children,u=0,l=_.length;u<l;u++)n=_[u],m+=n.toString(e,t+1);y&&(m+=x),m+="</"+this.name+">",y&&(m+=f)}return m},t.prototype.att=function(e,t){return this.attribute(e,t)},t.prototype.ins=function(e,t){return this.instruction(e,t)},t.prototype.a=function(e,t){return this.attribute(e,t)},t.prototype.i=function(e,t){return this.instruction(e,t)},t}(n)}).call(this)},{"./XMLAttribute":124,"./XMLNode":135,"./XMLProcessingInstruction":136,"lodash/collection/every":64,"lodash/lang/isArray":98,"lodash/lang/isFunction":100,"lodash/lang/isObject":102,"lodash/object/create":106}],135:[function(e,t,r){(function(){var r,n,i,o,s,a,u,c,l,p,h,f={}.hasOwnProperty;h=e("lodash/lang/isObject"),c=e("lodash/lang/isArray"),p=e("lodash/lang/isFunction"),l=e("lodash/lang/isEmpty"),s=null,r=null,n=null,i=null,o=null,a=null,u=null,t.exports=function(){function t(t){this.parent=t,this.options=this.parent.options,this.stringify=this.parent.stringify,null===s&&(s=e("./XMLElement"),r=e("./XMLCData"),n=e("./XMLComment"),i=e("./XMLDeclaration"),o=e("./XMLDocType"),a=e("./XMLRaw"),u=e("./XMLText"))}return t.prototype.clone=function(){throw new Error("Cannot clone generic XMLNode")},t.prototype.element=function(e,t,r){var n,i,o,s,a,u,d;if(s=null,null==t&&(t={}),t=t.valueOf(),h(t)||(u=[t,r],r=u[0],t=u[1]),null!=e&&(e=e.valueOf()),c(e))for(i=0,a=e.length;i<a;i++)n=e[i],s=this.element(n);else if(p(e))s=this.element(e.apply());else if(h(e))for(o in e)f.call(e,o)&&(d=e[o],p(d)&&(d=d.apply()),h(d)&&l(d)&&(d=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===o.indexOf(this.stringify.convertAttKey)?s=this.attribute(o.substr(this.stringify.convertAttKey.length),d):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===o.indexOf(this.stringify.convertPIKey)?s=this.instruction(o.substr(this.stringify.convertPIKey.length),d):h(d)?!this.options.ignoreDecorators&&this.stringify.convertListKey&&0===o.indexOf(this.stringify.convertListKey)&&c(d)?s=this.element(d):(s=this.element(o),s.element(d)):s=this.element(o,d));else s=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(r):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(r):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(r):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(r):this.node(e,t,r);if(null==s)throw new Error("Could not create any elements with: "+e);return s},t.prototype.insertBefore=function(e,t,r){var n,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i),n=this.parent.element(e,t,r),Array.prototype.push.apply(this.parent.children,o),n},t.prototype.insertAfter=function(e,t,r){var n,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),n=this.parent.element(e,t,r),Array.prototype.push.apply(this.parent.children,o),n},t.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element");return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},t.prototype.node=function(e,t,r){var n,i;return null!=e&&(e=e.valueOf()),null==t&&(t={}),t=t.valueOf(),h(t)||(i=[t,r],r=i[0],t=i[1]),n=new s(this,e,t),null!=r&&n.text(r),this.children.push(n),n},t.prototype.text=function(e){var t;return t=new u(this,e),this.children.push(t),this},t.prototype.cdata=function(e){var t;return t=new r(this,e),this.children.push(t),this},t.prototype.comment=function(e){var t;return t=new n(this,e),this.children.push(t),this},t.prototype.raw=function(e){var t;return t=new a(this,e),this.children.push(t),this},t.prototype.declaration=function(e,t,r){var n,o;return n=this.document(),o=new i(n,e,t,r),n.xmldec=o,n.root()},t.prototype.doctype=function(e,t){var r,n;return r=this.document(),n=new o(r,e,t),r.doctype=n,n},t.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},t.prototype.root=function(){var e;if(this.isRoot)return this;for(e=this.parent;!e.isRoot;)e=e.parent;return e},t.prototype.document=function(){return this.root().documentObject},t.prototype.end=function(e){return this.document().toString(e)},t.prototype.prev=function(){var e;if(this.isRoot)throw new Error("Root node has no siblings");if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[e-1]},t.prototype.next=function(){var e;if(this.isRoot)throw new Error("Root node has no siblings");if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[e+1]},t.prototype.importXMLBuilder=function(e){var t;return t=e.root().clone(),t.parent=this,t.isRoot=!1,this.children.push(t),this},t.prototype.ele=function(e,t,r){return this.element(e,t,r)},t.prototype.nod=function(e,t,r){return this.node(e,t,r)},t.prototype.txt=function(e){return this.text(e)},t.prototype.dat=function(e){return this.cdata(e)},t.prototype.com=function(e){return this.comment(e)},t.prototype.doc=function(){return this.document()},t.prototype.dec=function(e,t,r){return this.declaration(e,t,r)},t.prototype.dtd=function(e,t){return this.doctype(e,t)},t.prototype.e=function(e,t,r){return this.element(e,t,r)},t.prototype.n=function(e,t,r){return this.node(e,t,r)},t.prototype.t=function(e){return this.text(e)},t.prototype.d=function(e){return this.cdata(e)},t.prototype.c=function(e){return this.comment(e)},t.prototype.r=function(e){return this.raw(e)},t.prototype.u=function(){return this.up()},t}()}).call(this)},{"./XMLCData":126,"./XMLComment":127,"./XMLDeclaration":132,"./XMLDocType":133,"./XMLElement":134,"./XMLRaw":137,"./XMLText":139,"lodash/lang/isArray":98,"lodash/lang/isEmpty":99,"lodash/lang/isFunction":100,"lodash/lang/isObject":102}],136:[function(e,t,r){(function(){var r;r=e("lodash/object/create"),t.exports=function(){function e(e,t,r){if(this.stringify=e.stringify,null==t)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(t),r&&(this.value=this.stringify.insValue(r))}return e.prototype.clone=function(){return r(e.prototype,this)},e.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+="<?",s+=this.target,this.value&&(s+=" "+this.value),s+="?>",o&&(s+=n),s},e}()}).call(this)},{"lodash/object/create":106}],137:[function(e,t,r){(function(){var r,n,i=function(e,t){function r(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;n=e("lodash/object/create"),r=e("./XMLNode"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing raw text");this.value=this.stringify.raw(r)}return i(t,e),t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+=this.value,o&&(s+=n),s},t}(r)}).call(this)},{"./XMLNode":135,"lodash/object/create":106}],138:[function(e,t,r){(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},r={}.hasOwnProperty;t.exports=function(){function t(t){this.assertLegalChar=e(this.assertLegalChar,this);var n,i,o;this.allowSurrogateChars=null!=t?t.allowSurrogateChars:void 0,i=(null!=t?t.stringify:void 0)||{};for(n in i)r.call(i,n)&&(o=i[n],this[n]=o)}return t.prototype.eleName=function(e){return e=""+e||"",this.assertLegalChar(e)},t.prototype.eleText=function(e){return e=""+e||"",this.assertLegalChar(this.elEscape(e))},t.prototype.cdata=function(e){if(e=""+e||"",e.match(/]]>/))throw new Error("Invalid CDATA text: "+e);return this.assertLegalChar(e)},t.prototype.comment=function(e){if(e=""+e||"",e.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},t.prototype.raw=function(e){return""+e||""},t.prototype.attName=function(e){return""+e||""},t.prototype.attValue=function(e){return e=""+e||"",this.attEscape(e)},t.prototype.insTarget=function(e){return""+e||""},t.prototype.insValue=function(e){if(e=""+e||"",e.match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return e},t.prototype.xmlVersion=function(e){if(e=""+e||"",!e.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},t.prototype.xmlEncoding=function(e){if(e=""+e||"",!e.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/))throw new Error("Invalid encoding: "+e);return e},t.prototype.xmlStandalone=function(e){return e?"yes":"no"},t.prototype.dtdPubID=function(e){return""+e||""},t.prototype.dtdSysID=function(e){return""+e||""},t.prototype.dtdElementValue=function(e){return""+e||""},t.prototype.dtdAttType=function(e){return""+e||""},t.prototype.dtdAttDefault=function(e){return null!=e?""+e||"":e},t.prototype.dtdEntityValue=function(e){return""+e||""},t.prototype.dtdNData=function(e){return""+e||""},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.convertListKey="#list",t.prototype.assertLegalChar=function(e){var t,r;if(t=this.allowSurrogateChars?/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/:/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/,r=e.match(t))throw new Error("Invalid character ("+r+") in string: "+e+" at index "+r.index);return e},t.prototype.elEscape=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},t.prototype.attEscape=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},t}()}).call(this)},{}],139:[function(e,t,r){(function(){var r,n,i=function(e,t){function r(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;n=e("lodash/object/create"),r=e("./XMLNode"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing element text");this.value=this.stringify.eleText(r)}return i(t,e),t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(e,t){var r,n,i,o,s,a,u,c,l;return o=(null!=e?e.pretty:void 0)||!1,r=null!=(a=null!=e?e.indent:void 0)?a:"  ",i=null!=(u=null!=e?e.offset:void 0)?u:0,n=null!=(c=null!=e?e.newline:void 0)?c:"\n",t||(t=0),l=new Array(t+i+1).join(r),s="",o&&(s+=l),s+=this.value,o&&(s+=n),s},t}(r)}).call(this)},{"./XMLNode":135,"lodash/object/create":106}],140:[function(e,t,r){(function(){var r,n;n=e("lodash/object/assign"),r=e("./XMLBuilder"),t.exports.create=function(e,t,i,o){return o=n({},t,i,o),new r(e,o).root()}}).call(this)},{"./XMLBuilder":125,"lodash/object/assign":105}],141:[function(e,t,r){e("./browser_loader");var n=e("./core");"undefined"!=typeof window&&(window.HiveTaxi=n),void 0!==t&&(t.exports=n),"undefined"!=typeof self&&(self.HiveTaxi=n),e("../clients/browser_default")},{"../clients/browser_default":6,"./browser_loader":12,"./core":14}]},{},[141]);